CubicBezierCurve3 三次贝塞尔曲线

—> Curve

3D的三次贝塞尔曲线. 有两个控制点, 即比 QuadraticBezierCurve3 多了一个控制点.

function CubicBezierCurve3( v0, v1, v2, v3 ) { } var v1 = new THREE.Vector2(-3, 0, -2), v2 = new THREE.Vector2(-1, -4, 2), v3 = new THREE.Vector2(1, 4, -2), v4 = new THREE.Vector2(3, 0, 2); var curve = new THREE.CubicBezierCurve3(v1, v2, v3, v4), 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 : 'CubicBezierCurve3'
Description : 类型

v0 : Vector3

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

v1 : Vector3

Default value : new Vector3()
Description : 第1个控制点.

v2 : Vector3

Default value : new Vector3()
Description : 第2个控制点.

v3 : Vector3

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

isCubicBezierCurve3 : Boolean

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