How to change color without full rerender?
On your site https://www.shadergradient.co/customize colors change quickly and without losing animation frames. How can I reproduce this?
This happens to me when I try to change the color of the react state-
https://github.com/user-attachments/assets/6d7f3a3f-ba50-47e3-897a-6578d5422710
@shizz-x Can you tell me a little more about the environment you're experiencing this issue in? I'm wondering if you're working in Framer or in a local development environment (React, etc.) Also, it would be helpful if you could explain a bit more about the code you're using or how you're implementing it.
I've updated prop change & shader material updating logic from v2 (packages/shadergradient-v2/src/ShaderGradient/Mesh/Materials.tsx)
check our new package (@shadergradient/react) and this example :)
apps/example-nextjs-dev/app/page.tsx