1 note &
Plug-in Canvas Performance
After all this work on bringing canvas up to a decent speed I am thinking about a new mini-library or shiv if you will for drop in performance in canvas.
Some of the optimizations that it could do:
- Draw an image onto temp. canvas then temp canvas onto main canvas
- Use putImageData when possible
- requestAnimationFrame for draw updates
- Implement redraw regions
The last one may be tricky as the way they are implemented in Crafty is with a spatial hash map of all the entities and setters on the properties that render regions dirty therefore need redrawing.
Once it’s bulletproof in Crafty I shall look into it.
