Create a smooth 2d quadratic bezier curve, defined by a startpoint, endpoint and a single control point.


var curve = new v3d.QuadraticBezierCurve( new v3d.Vector2(-10, 0), new v3d.Vector2(20, 15), new v3d.Vector2(10, 0) ); var points = curve.getPoints(50); var geometry = new v3d.BufferGeometry().setFromPoints(points); var material = new v3d.LineBasicMaterial({ color : 0xff0000 }); //Create the final object to add to the scene var curveObject = new v3d.Line(geometry, material);


QuadraticBezierCurve(v0 : Vector2, v1 : Vector2, v2 : Vector2)

v0 – The startpoint.
v1 – The control point.
v2 – The endpoint.


See the base Curve class for common properties.

.isQuadraticBezierCurve : Boolean

Used to check whether this or derived classes are QuadraticBezierCurves. Default is true.

You should not change this, as it used internally for optimisation.

.v0 : Vector2

The startpoint.

.v1 : Vector2

The control point.

.v2 : Vector2

The endpoint.


See the base Curve class for common methods.


For more info on how to obtain the source code of this module see this page.