Writing custom shaderMaterial animating with react-spring #3212
Unanswered
phaminhieuu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm writing a custom shader material using 'shaderMaterial' from 'react-three/drei' and it can animate with react-spring/three, this is my code:
AnimateShaderMaterial
Parent component
It work pretty well when I use it multiple times in my project, but I wondering is it a good practice when I put 'extend' inside component not outside like document, because I need to pass 'uni' from the outside? Do I need to memorize the "CustomMaterial" to avoid rerendering multiple times ? Thanks
Beta Was this translation helpful? Give feedback.
All reactions