79526317

Date: 2025-03-21 18:25:30
Score: 0.5
Natty:
Report link

I'm not an animation expert, but I've used Canvas a lot; it's super fast for most use cases, so using multiple canvases probably won't help you.

From what I know, the answer to your question depends on two things: (1) whether or not the animated images are appearing in the same place, and (2) whether they are translucent or opaque.

If they're stationary and opaque, just redraw them in place on a 500ms timer; if they're translucent (alpha < 1.0), then you have to draw something over the last one before you draw the next one so the images don't blend together.

If they're moving, then you have to redraw the original background in the old place before you draw the next image in the new place. This can be arbitrarily complex depending on what else you're drawing on the canvas.

For simple drawings, redrawing the entire canvas every frame can be fast enough; for more complex stuff, perhaps not.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Jim Haungs