Skip to main content

Curve

QuadraticBezierCurve3

Create a smooth 3dquadratic bezier curve, defined by a startpoint, endpoint and a single control point.

Code Example

const curve = new THREE.QuadraticBezierCurve3( new THREE.Vector3( -10, 0, 0 ),
new THREE.Vector3( 20, 15, 0 ), new THREE.Vector3( 10, 0, 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

QuadraticBezierCurve3

function QuadraticBezierCurve3( v0: Vector3, v1: Vector3, v2: Vector3 ): void;  

v0 – The starting point
v1 – The middle control point
v2 – The ending point

Properties

See the base Curve class for common properties.

v0

v0: Vector3;  

The startpoint.

v1

v1: Vector3;  

The control point.

v2

v2: Vector3;  

The endpoint.

Methods

See the base Curve class for common methods.

Source

src/extras/curves/QuadraticBezierCurve3.js