News for hackers. Stuff that matters.
Re:Cool water vapor effect in HTML5 Canvas by beeglebug on Friday June 28, 2013 @05:58AM (#5957101)
I like the end result, but i'm not sure why they decided to use 14 canvas tags when 1 would have worked just as well.

It seems wasteful, canvas was designed specifically to allow drawing and manipulating multiple images on a single surface, these guys are using canvas as if it were a div with a background image.

Re:Cool water vapor effect in HTML5 Canvas by kilian on Friday June 28, 2013 @06:22AM (#5957174)
Maybe they found it performed better, like Adrian Holovaty found for soundslide: http://www.holovaty.com/writing/in-defense-of-canvas/ (see "stacking canvases")
Re:Cool water vapor effect in HTML5 Canvas by robin_reala on Friday June 28, 2013 @06:37AM (#5957205)
Stacking canvases makes sense when you have ones that either only need to be built on startup or change infrequently. If everything in your animation is moving (like this one) then there’s no performance benefit.
Re:Cool water vapor effect in HTML5 Canvas by ricardobeat on Friday June 28, 2013 @10:02AM (#5957997)
Are you sure about that? Would be interesting to see a performance comparison.
Re:Cool water vapor effect in HTML5 Canvas by robin_reala on Friday June 28, 2013 @06:05AM (#5957119)
…which makes me wonder if CSS animation on stacked divs would be more efficient too?
Re:Cool water vapor effect in HTML5 Canvas by martin-adams on Friday June 28, 2013 @06:11AM (#5957139)
...or an animated GIF
Re:Cool water vapor effect in HTML5 Canvas by PavlovsCat on Friday June 28, 2013 @06:23AM (#5957175)
If you layer several animations with varying and carefully selected run times over each other, the result never exactly repeats itself. Good luck recreating that with one GIF animation :D
Re:Cool water vapor effect in HTML5 Canvas by tvararu on Friday June 28, 2013 @06:33AM (#5957195)
An animated GIF would weigh a lot more.