Creating THREE.Points from existing geometry
As you may recall,
THREE.Points renders each point based on the vertices from the supplied
THREE.BufferGeometry. This means that if we provide a complex geometry (for example, a torus knot or a tube), we can create
THREE.Points based on the vertices from that specific geometry. In this final section of this chapter, we’ll create a torus knot, like the one we saw in Chapter 6, Exploring Advanced Geometries, and render it as a
We explained the torus knot in Chapter 6, so we won’t go into much detail here. The following screenshot shows the example (
Figure 7.13 – Torus knot rendered as points with a small animation
const texture = new THREE.TextureLoader().load('/assets/textures/particles/glow.png...