THREE.extras.curves
package THREE.extras.curves
Members list
Type members
Classlikes
class CatmullRomCurve3(points: Array[Vector3], closed: Boolean, curveType: String, tension: Double) extends Curve
A curve representing a Catmull-Rom spline.
A curve representing a Catmull-Rom spline.
//Create a closed wavey loop
const curve = new THREE.CatmullRomCurve3( [
new THREE.Vector3( -10, 0, 10 ),
new THREE.Vector3( -5, 5, 5 ),
new THREE.Vector3( 0, 0, 0 ),
new THREE.Vector3( 5, -5, 5 ),
new THREE.Vector3( 10, 0, 10 )
] );
const points = curve.getPoints( 50 );
const geometry = new THREE.BufferGeometry().setFromPoints( points );
const material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
// Create the final object to add to the scene
const curveObject = new THREE.Line( geometry, material );
Attributes
- Supertypes
A curve representing a 3D Cubic Bezier curve.
A curve representing a 3D Cubic Bezier curve.
Attributes
- Supertypes
class EllipseCurve(aX: Double, aY: Double, xRadius: Double, yRadius: Double, aStartAngle: Double, aEndAngle: Double, aClockwise: Boolean, aRotation: Double) extends Curve
A curve representing an ellipse.
A curve representing an ellipse.
const curve = new THREE.EllipseCurve(
0, 0,
10, 10,
0, 2 * Math.PI,
false,
0
);
const points = curve.getPoints( 50 );
const geometry = new THREE.BufferGeometry().setFromPoints( points );
const material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
// Create the final object to add to the scene
const ellipse = new THREE.Line( geometry, material );
Attributes
- Supertypes
class LineCurve3(v1: Vector3, v2: Vector3) extends Curve
A curve representing a 3D line segment.
A curve representing a 3D line segment.
Attributes
- Supertypes
In this article