QuadraticBezierCurve 二次贝塞尔曲线

—> Curve

2D的二次贝塞尔曲线. 有一个控制点, 即比 CubicBezierCurve 少了一个控制点.

function QuadraticBezierCurve( v0, v1, v2 ) { } var v1 = new THREE.Vector2(-3, 0), v2 = new THREE.Vector2(1, 4), v3 = new THREE.Vector2(3, 0); var curve = new THREE.QuadraticBezierCurve(v1, v2, v3), points = curve.getPoints(60); var geometry = new THREE.Geometry().setFromPoints(points), material = new THREE.LineBasicMaterial({ color: '#ff9900'}), line = new THREE.Line(geometry, material); scene.add(line);

Attributes

type : String

Default value : 'QuadraticBezierCurve'
Description : 类型

v0 : Vector2

Default value : new Vector2()
Description : 起点.

v1 : Vector2

Default value : new Vector2()
Description : 控制点.

v2 : Vector2

Default value : new Vector2()
Description : 终点.

isQuadraticBezierCurve : Boolean

Default value : true
Description : 类型是否为 QuadraticBezierCurve.

图解API