O'Reilly logo

Learning Three.js: The JavaScript 3D Library for WebGL 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

Creating a particle system from an advanced geometry

As you remember, a particle system renders each particle based on the vertices from the supplied geometry. This means that if we provide a complex geometry; for example, a torus knot or a tube, we can create a particle system based on the vertices from that specific geometry. For the last section of this chapter we'll create a torus knot, like the one we saw in the previous chapter, and render it as a particle system.

We've already explained the torus knot in the previous chapter so we won't go into much detail here. We're using the exact code from the previous chapter, and we've added a single menu option that you can use to transform the rendered mesh to a particle system. You can find the ...

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