Summary
That’s a wrap for this chapter. We’ve explained what sprites and points are and how you can style these objects with the materials available. In this chapter, you saw how you can use THREE.Sprite
directly, and that if you want to create a large number of particles, you should use a THREE.Points
object. With THREE.Points
, all the elements share the same material, and the only property you can change for an individual particle is its color by setting the vertexColors
property of the material to true
and providing a color value in the colors
array of THREE.BufferGeometry
, which is used to create THREE.Points
. 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.Points
objects.
So far, we have created meshes based on geometries provided by Three.js. This works well for simple models, such as spheres and cubes, but isn’...