Closed schteppe closed 11 years ago
Hi, Nice work with the engine! Regarding the demo CanvasRenderer, I see you rerender circles very often. By caching the ones of same size + color and doing ctx.drawImage( cachedCanvas, x, y ), you can speed up things a lot.
ctx.drawImage( cachedCanvas, x, y )
For an example, see http://iainlobb.com/bunnies/bunnies.html Or: http://www.professorcloud.com/mainsite/cache-canvas.htm
Stefan
Hi, Nice work with the engine! Regarding the demo CanvasRenderer, I see you rerender circles very often. By caching the ones of same size + color and doing
ctx.drawImage( cachedCanvas, x, y )
, you can speed up things a lot.For an example, see http://iainlobb.com/bunnies/bunnies.html Or: http://www.professorcloud.com/mainsite/cache-canvas.htm
Stefan