SplineCurve 样条曲线

—> Curve

根据点集来绘制光滑的2D曲线.

function SplineCurve( points ) { } var pointsArr = [new THREE.Vector2(4,4), new THREE.Vector2(5,2), new THREE.Vector2(4,1), new THREE.Vector2(5,0), new THREE.Vector2(4,-1), new THREE.Vector2(5,-2), new THREE.Vector2(4,-4)]; var curve = new THREE.SplineCurve(pointsArr), 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 : 'SplineCurve'
Description : 类型

points : Array

Default value : []
Description : 点集.

isSplineCurve : Boolean

Default value : true
Description : 类型是否为SplineCurve