...

/

Styling Particles Using Textures

Styling Particles Using Textures

Learn how to use images to create sprites in Three.js.

So far, we’ve only rendered the particles as small squares, which is the default behavior. There are, however, two additional ways we can style particles.

In this lesson, we’ll look at the following two ways to change what the sprite looks like:

  • Use an HTML canvas to draw an image and show that for each sprite.

  • Load an external image file to define what each sprite looks like.

Let’s start by drawing the image ourselves.

Drawing an image on the canvas

In the attributes for THREE.PointsMaterial, we mentioned the map property. With ...