diff --git a/src/App.css b/src/App.css index 4cde41d..617ac3b 100644 --- a/src/App.css +++ b/src/App.css @@ -7,6 +7,10 @@ canvas { margin: auto; display: block; } + +/*main{ + height: 300px; +}*/ .content { position: relative; padding: 20px; diff --git a/src/App.js b/src/App.js index 5ebeb78..963f48e 100644 --- a/src/App.js +++ b/src/App.js @@ -2,14 +2,12 @@ import './App.css'; import ImageCanvas from './imageCanvas' const App = () => ( -
-
); export default App; diff --git a/src/imageCanvas.jsx b/src/imageCanvas.jsx index e67965f..0b83b81 100644 --- a/src/imageCanvas.jsx +++ b/src/imageCanvas.jsx @@ -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);