canvas-confetti icon indicating copy to clipboard operation
canvas-confetti copied to clipboard

skip drawing particles that are outside the canvas area

Open catdad opened this issue 7 years ago • 2 comments

catdad avatar Jan 26 '18 16:01 catdad

Sounds amazing!

itayganor avatar Oct 18 '20 19:10 itayganor

Sorry, clicked the wrong button.

To clarify a bit more on this issue: I don't actually know if browsers already automatically don't draw elements that are not within the viewable area. Certainly they are not part of a paint, but I am not sure what costs there are. Since we realistically need to still calculate where a confetti is during the animation, we can only save part of the cost (if it in fact exists in the first place). This one is more of a reminder to do the required research, since it doesn't seem that I can find an easy answer.

catdad avatar Oct 19 '20 21:10 catdad