You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out that even if a <Canvas> component is mounted, it isn't initialized until it becomes visible (no parent with display: none). So first time it's made visible, there's a slight delay before the first frame is renderered.
Is there a way to force this initialization (maybe forcing an initial render early on)?
My use case :
I'm currently working on an app with multiple routes (one of those containing a r3f Canvas) with animated transitions between them.
First time the user opens the route with the Canvas, the app transition to an empty screen while the scene is being initialized.
I tried a lot of things but it either didn't work, was way too hacky to my taste or lead to too much complexity.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I found out that even if a
<Canvas>
component is mounted, it isn't initialized until it becomes visible (no parent withdisplay: none
). So first time it's made visible, there's a slight delay before the first frame is renderered.This can be seen here: https://codesandbox.io/s/r3f-bones-forked-pwm3m
Is there a way to force this initialization (maybe forcing an initial render early on)?
My use case :
I'm currently working on an app with multiple routes (one of those containing a r3f Canvas) with animated transitions between them.
First time the user opens the route with the Canvas, the app transition to an empty screen while the scene is being initialized.
I tried a lot of things but it either didn't work, was way too hacky to my taste or lead to too much complexity.
Beta Was this translation helpful? Give feedback.
All reactions