Curve →
QuadraticBezierCurve
Create a smooth 2dquadratic bezier curve, defined by a startpoint, endpoint and a single control point.
Code Example
const curve = new THREE.QuadraticBezierCurve( new THREE.Vector2( -10, 0 ), new
THREE.Vector2( 20, 15 ), new THREE.Vector2( 10, 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 curveObject = new THREE.Line( geometry, material );
Constructor
QuadraticBezierCurve
function QuadraticBezierCurve( v0: Vector2, v1: Vector2, v2: Vector2 ): void;
v0 – The startpoint.
v1 – The control point.
v2 – The endpoint.
Properties
See the base Curve class for common properties.
v0
v0: Vector2;
The startpoint.
v1
v1: Vector2;
The control point.
v2
v2: Vector2;
The endpoint.
Methods
See the base Curve class for common methods.