Posted by & filed under JavaScript, JQuery.

check the canvas snow demo

In one of my last posts I created a snow storm with jquery and div elements, one disadvantages Of course is that the flakes are square. one advantage is that using divs makes it far more easier to create a creative snowstorm. For example the script could be easily recreated in a snow-tagcloud. Therefore I decides to recreate a snowstorm example this time however with the html5 canvas tag.
Beside the features I was curious about the performance of the animation. I expected the Canvas element to outrun jQuery and the DOM, in terms of animation. And indeed I ran both scripts with 1000 flakes and the canvas animation run much smoother.

image of the canvas snowstorm

And of course round snow flakes appear much more realistic

Comments are closed.