O'Reilly logo

Three.js Essentials by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing colors of individual particles

In this example, we're going to create a visualization that shows the amplitude of the individual frequencies of the currently playing audio. For each frequency, the height of a particle and its color will change to reflect the amplitude. The result looks something like the following screenshot:

Customizing colors of individual particles

In this screenshot, you can see the lower frequencies to the left and the higher frequencies to the right. As you can see, the height and color of the individual particles are different. In the following couple of sections, we'll see how to do this.

Coloring individual particles

Let's start simple and create a THREE.ParticleSystem ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required