
How do you bounce particles off a circular wall? I present a simple example and discuss some of the vector mathematics behind the code.
Read more…Published on February 6, 2012
How do you bounce particles off a circular wall? I present a simple example and discuss some of the vector mathematics behind the code.
Read more…Published on February 1, 2012
More pretty parametric curve built out of particles. I optimize my code which creates 3D particles in a 2D canvas, by using a sprite sheet. During the testing of this effect, I have observed some interesting browser differences.
Read more…Published on January 25, 2012
Playing with my 3D particle code some more, I draw a parametric curve which rotates in space and slowly dissolves away.
Read more…Published on January 23, 2012
Drawing 3D objects in a 2D canvas is rather straightforward if the objects are simple dots and you’re not worried about depth-sorting. I show you a simple example of a sphere made out of dust particles which fly around and fade away. I also discuss how to properly select a point at random on a sphere, in such a way as to ensure an even distribution of points.
Read more…Published on January 12, 2012
A simple example to illustrate the use of a sprite sheet for CPU-efficient animations. We create a sprite sheet at run time, fill it with individual frames of an animation of a growing circle, then copy from this sprite sheet later when we wish to animate a large number of circles.
Read more…Published on January 9, 2012
A newly optimized clock made of particles. The particles take the form of digits which fly into place to form the correct time. This example features many more particles than our previous example.
Read more…Published on January 2, 2012
A little HTML5 canvas experiment: a digital clock created from particles. The particles take the form of numerals which slide into place to display the correct current time. A repelling force pushes inactive particles away from the time display particles. Full source code available for you to experiment with.
Read more…Published on December 23, 2011
A celestial particle effect with pleasing color changes, enhanced by the Fast Blur code from quasimondo.
Read more…Published on December 21, 2011
A pretty particle effect in HTML5 Canvas with fading trails. We discuss some issues with browser differences, and a resulting solution for consistency across browsers.
Read more…Published on December 13, 2011
We show how to create an elliptical gradient in the HTML5 canvas, using a radial gradient along with a context transformation. Full source code available for download.
Read more…