I want to create a CurvePath for example
var spline = new THREE.SplineCurve3([
new THREE.Vector3(0, 0, 0),
new THREE.Vector3(1, 0, 0),
new THREE.Vector3(1, 1, 0),
]);
and I will send a particle along with path using (javascript psuedocode)
var t = 0;
function update(){
t = t + 0.05;
particle.position = spline.getPointAt(t)
}
However I want the splinecurve not to create soft bends at the edges of the shape, so for the shape above the particle will turn at a right angle at the point (1, 0, 0)
.
I know this should be implemented in LineCurve3
or something, but for all the other curves except for SplineCurve3
, getPoint()
is not implemented.
Im using THREE r59.