|
|
@@ -125,12 +125,12 @@ export default function useRotateCanvas() {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
- function animate() {
|
|
|
+ const animate = () => {
|
|
|
ctx.clearRect(0, 0, CANVAS_W, CANVAS_H);
|
|
|
rotateBlue && rotateBlue.draw();
|
|
|
rotateYellow && rotateYellow.draw();
|
|
|
requestAnimationFrame(animate);
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
animate();
|
|
|
}
|