Rich-Harris/svelte-cubed

Black Screen until interaction

vipero07 opened this issue · 3 comments

https://stackblitz.com/edit/sveltekit-hegre9?file=src/routes/index.svelte

I'm not entirely certain but I believe this is not rendering the texture after it loads but rather waiting on a change to show the mesh.

i clicked your link and it seemed to load just fine.

On windows, both chrome and edge show me a black screen until after I interact with it.
it looks like this

It stays this way for me until I drag, still appears to be the case though. If you scroll, or pan, or do anything to that black box it will display correctly.

jhewt commented

I do confirm this happens on every browser I tested under macOS. One way to reliably test it is to disable cache and add some throttling.
It seems to render it without the texture (black) and once it is loaded it does not re-render the scene, unless a render is forced when a variable changes, interacting with it or just resizing the browser.

This seems to be related to the "no re-render until specified" nature of svelte-cubed, however I think when a texture is loaded it should call a frame render.