4 ms·
Huh? A canvas element has a buffer and it will show the same frame as last time unless you clear and redraw it. If nothing has changed then it should be easy to
by skybrian 12y ago
Huh? A canvas element has a buffer and it will show the same frame as last time unless you clear and redraw it. If nothing has changed then it should be easy to skip the redraw.
- dandelany 12y ago> If nothing has changed That's the hard part. The virtual-dom takes care of this for you, but in the case of canvas, you'd have to determine whether or not anything actually changed, which involves keeping around a previous state and comparing it to the new state. It's certainly doable, but nowhere near as simple as using the virtual-DOM.