Take simple code:
const sine = sinCurve(1)
const tube = new THREE.Mesh(
new THREE.TubeGeometry(sine, 20, 2, 8, false),
new THREE.MeshBasicMaterial({ color: 0xffffff })
)
function sinCurve(amplitude) {
// Make simple SIN points -^_-
const points = [];
for (let i = 0; i < 5; i++) {
const x = ((2 * Math.PI) / 4) * i ;
const y = amplitude * Math.sin( x );
points.push(new THREE.Vector3(x, y,0));
}
const curve = new THREE.SplineCurve(points);
return curve;
}
Curve appears valid and works with methods like getPoints() as expected. The resultant tube-geometry has all NAN position/normal attribute values though