save code

This commit is contained in:
2023-01-16 10:59:02 +03:00
parent a57be83351
commit 721c967ac8
3 changed files with 8 additions and 4 deletions

View File

@@ -52,9 +52,11 @@ const ImageCanvas = ({scrollHeight, numFrames, width, height}) => {
return;
}
if(frameIndex == 241) return
const context = canvasRef.current.getContext("2d");
let requestId;
console.log(frameIndex)
const render = () => {
context.drawImage(images[frameIndex], 0, 0);
requestId = requestAnimationFrame(render);