Reuse the context
This commit is contained in:
parent
b21a0f82d0
commit
0d8bbe563a
@ -20,7 +20,7 @@ function SystemCanvas({ height, width, children }: SystemCanvasProps) {
|
||||
const context = canvasRef.current.getContext("2d")
|
||||
setContext(context)
|
||||
}
|
||||
}, [frameCount])
|
||||
}, [canvasRef.current])
|
||||
|
||||
React.useEffect(() => {
|
||||
const frameId = requestAnimationFrame(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user