Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White flash on page load (noticeable only on black/dark backgrounds) #84

Open
rohanharikr opened this issue Oct 10, 2023 · 2 comments
Open

Comments

@rohanharikr
Copy link

First of all, thank you for creating this library! The design and API is slick :^)

There seems to be a white flash on page load where the cobe globe is, noticeable only on dark backgrounds.

To replicate:

  1. Go to https://cobe.vercel.app/
  2. Switch from "Light" to "Dark" in the footer of the website
  3. Keep reloading - this happens inconsistently

What I have tried: setting a background-color property on the <canvas> element, but the white flash persists.

In https://cobe.vercel.app/, the transition is less jarring because there is a borderRadius: 50% applied to the canvas, causing a white circular flash when in normal cases would be a rectangular flash.

bug.mp4
@shuding
Copy link
Owner

shuding commented Dec 15, 2023

Have you tried giving the <canvas> a transparent background via CSS?

@rohanharikr
Copy link
Author

@shuding Yes, tried inlining background: transparent and also setting via CSS - white flash (inconsistent on page load) persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants