August 2018
Intermediate to advanced
528 pages
10h 58m
English
THREE.TubeGeometry creates a tube that extrudes along a 3D spline. You specify the path using a number of vertices, and THREE.TubeGeometry will create the tube. An example that you can experiment with can be found in the sources for this chapter (04-extrude-tube.html). The following screenshot shows this example:

As you can see in this example, we generate a number of random points and use those points to draw the tube. With the controls in the upper-right corner, we can define how the tube looks or generate a new tube by clicking on the newPoints button. The code needed to create a tube is very simple, as follows:
var ...
Read now
Unlock full access