End Caps of TubeGeometry

Not so difficult, actually.
You know amount of radial segments, you know amount of tubular segments, so you can get information about vertices of start and end segments:
TubePoints
https://jsfiddle.net/prisoner849/6jp3snvq/

Another thing you’ll need are points for start and end of the curve.
Something like:

var curve = _your_curve_;
var pointStart = curve.getPoint(0);
var pointEnd = curve.getPoint(1);

TubePointsWithCenters
https://jsfiddle.net/prisoner849/25mLpg3r/

The last thing is to set .index for geometries so you’ll have faces:
TubePointsWithCentersAndEndCaps
https://jsfiddle.net/prisoner849/yueLpdb2/

Or you can set index without setting that mid point, using just points of the tube’s ends :slight_smile: Creativity is up to you :blush:

2 Likes