Monday, 29 November 2010

JavaScript HTML5 Canvas Snow in 3D

by Seb Lee-Delisle
Snow storm in JS and HTML
Incredibly, the early bird tickets on my HTML5/JS training course sold out in just 20 minutes today! And to celebrate I thought you might like an early Christmas present – JavaScript HTML5 canvas snow in 3D! :-)
(There are still 4 standard price tickets left on the course if you’re interested in learning more about this stuff!)
I adapted one of the Mr.doob‘s three.js Particle examples. I’ve extended the particle class and added velocity to update it’s position. Anyone that knows me knows that I’ve been making snow for a while now! Most people’s first approach is to make the snow move left and right but actually you don’t need to do that. If there are lots of flakes all moving in different directions it pretty much has the same effect, and it gives much simpler and more uniform effect.
As ever, the code is fully commented and available on github.
Related posts:
  1. HTML5 Canvas 3D particles
  2. Simple 3D in HTML5 canvas
  3. Papervision3D snow

Source: JavaScript HTML5 Canvas Snow in 3D

No comments:

Post a Comment

Thank you for your comment.