-
First of all, I would like to share my appreciation for this great library. Amazing job guys! ⭐ I'm currently building a rather complex animation which (as far as I can tell) can only be done via imperative code, manually issuing Three.js renders within the I have an object which is added to the scene declaratively with the So far, everything works as expected. However, some SVG assets need to be loaded before rendering the scene via the I wasn't able to replicate the flash in a sandbox but the initial renders issued before running the code in If this is not a bug, what would be the correct way to imperatively render objects when loading assets? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
not sure what i am looking at here, there is no console output in that demo. suspense will interrupt the component, it wont even get to the useframe part until the model has loaded, until then r3f will render as usual because nothing has informed it about something taking over the render loop. useframe executes 60 times per second, i don't think this is the place to set a material btw. that should be useEffect (executes after paint) or useLayoutEffect (executes before paint) what is that complex animation about though, why do you need to imperatively render it? |
Beta Was this translation helpful? Give feedback.
not sure what i am looking at here, there is no console output in that demo. suspense will interrupt the component, it wont even get to the useframe part until the model has loaded, until then r3f will render as usual because nothing has informed it about something taking over the render loop.
useframe executes 60 times per second, i don't think this is the place to set a material btw. that should be useEffect (executes after paint) or useLayoutEffect (executes before paint)
what is that complex animation about though, why do you need to imperatively render it?