Three.js: three js, pathcontrols

Created on 27 Nov 2014  路  9Comments  路  Source: mrdoob/three.js

hello,
I would like to ask why three.js pathcontrols.js from version 58 does not work in version 69.
Or if you could recommend me some other solution.
link of controlerhttps://threejsdoc.appspot.com/doc/three.js/src.source/extras/controls/PathControls.js.html

Question

Most helpful comment

You can build a spline with THREE.SplineCurve3 and animate a camera with the points.

All 9 comments

It was removed due to code complexity. We still don't have a replacement for it, but we're working on it.

Any update on this?

You can build a spline with THREE.SplineCurve3 and animate a camera with the points.

@zz85 Can you please tell how to animate the camera over this curveGeometry I have:

curvePath = new THREE.CurvePath();
curvePath = findAPath(startingPoint, endingPoint, curvePath);

/* My curvePath actually ends up as an Object like this : 
Object { arcLengthDivisions: 200, curves: Array[3], autoClose: false }

where curves contains three objects, each can be either of these two - LineCurve3, QuadraticBezierCurve3  */

curveGeometry = new THREE.Geometry();
curveGeometry.vertices = curvePath.getPoints( 100 );

const curveMaterial = new THREE.LineBasicMaterial( { color : 0xffff00, linewidth: 5 } );
const curveObject = new THREE.Line( curveGeometry, curveMaterial );

This ends up in a yellow coloured line (consisting of multiple curves) from startingPoint to endingPoint. I want to animate my camera over this line, something like in this example:
https://threejs.org/examples/#webgl_geometry_extrude_splines

@richa18b use Three.js forum

@sandipJava Have already posted in the forum. Somehow, got to know about PathControls.js through one of the examples, while searching, which led me here! So, thought of asking!

@richa18b , See

I just want to know where is the pathControls in last version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Horray picture Horray  路  3Comments

danieljack picture danieljack  路  3Comments

donmccurdy picture donmccurdy  路  3Comments

boyravikumar picture boyravikumar  路  3Comments

seep picture seep  路  3Comments