Skip to content

Commit

Permalink
use speed fix on metaballs
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuulala committed Dec 20, 2024
2 parents 6e224a7 + 1836d5d commit 0cb82a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/shaders-react/src/shader-mount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ export const ShaderMount: React.FC<ShaderMountProps> = ({
}, [uniforms]);

useEffect(() => {
shaderMountRef.current?.setSeed(seed);
shaderMountRef.current?.setSpeed(speed);
}, [speed, seed]);
}, [speed]);

useEffect(() => {
shaderMountRef.current?.setSeed(seed);
}, [seed]);

return <canvas ref={canvasRef} style={style} />;
};

0 comments on commit 0cb82a6

Please sign in to comment.