Session 77

Psychedelic Triangle Party

Taking a new direction, today we start building a prototype of a particle emitter for the 3D engine. It’s not quite as simple in WebGL as it was in 2D, so we’ve added a new tool – “particletoy” – as a sandbox to play with new particle concepts.

Since we expect a lot of particles on the screen, we explore “instanced rendering” for the first time. Instanced rendering allows us to send an object’s geometry to the GPU only once, and then render it multiple times with different positions and colors by passing only the values that change to the GPU. It works great with plain ol' triangles today, and more complex objects like trees/tanks/dogs in the future.