All Questions
Tagged with design-patterns html5
2 questions
2
votes
1
answer
3k
views
How should I efficiently clear and redraw my canvas with lots of animated sprites?
My current solution is to clear the entire canvas and redraw all sprites on every requestFrame(). This works but feels inefficient:
I only need to clear the part of the canvas made invalid by ...
7
votes
2
answers
1k
views
Capitalizing on JavaScript's prototypal inheritance
JavaScript has a class-free object system in which objects inherit properties directly from other objects. This is really powerful, but it is unfamiliar to classically trained programmers. If you ...