Hello.
Interested in the question of how you can set shapes with a parametric curve their own path based on spline
class CustomSinCurve extends THREE.Curve {
constructor( scale = 1 ) {
super();
this.scale = scale;
}
getPoint( t, optionalTarget = new THREE.Vector3() ) {
const tx = t * 3 - 1.5;
const ty = Math.sin( 2 * Math.PI * t );
const tz = 0;
return optionalTarget.set( tx, ty, tz ).multiplyScalar( this.scale );
}
}
const path = new CustomSinCurve( 10 );
const geometry = new THREE.TubeGeometry( path, 20, 2, 8, false );
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
https://threejs.org/examples/webgl_geometry_spline_editor.html
[new THREE.Vector3(289.76843686945404, 452.51481137238443, 56.10018915737797),
new THREE.Vector3(-53.56300074753207, 171.49711742836848, -14.495472686253045),
new THREE.Vector3(-91.40118730204415, 176.4306956436485, -6.958271935582161),
new THREE.Vector3(-383.785318791128, 491.1365363371675, 47.869296953772746)]