Summary
That's a wrap for this chapter. We've explained what particles, sprites, and particle systems are and how you can style these objects with the available materials. In this chapter, you saw how you can use THREE.Sprite
directly with THREE.CanvasRenderer
and THREE.WebGLRenderer
. If you want to create a large number of particles, however, you should use THREE.PointCloud
. With THREE.PointCloud
, all the particles share the same material, and the only property you can change for an individual particle is their color by setting the vertexColors
property of the material to THREE.VertexColors
and providing a color value in the colors
array of THREE.Geometry
used to create THREE.PointCloud
. We also showed how you can easily animate particles by changing their position. This works the same for an individual THREE.Sprite
instance and the vertices from the geometry used to create THREE.PointCloud
.
So far, we have created meshes based on geometries provided by Three.js. This works great for simple...