提交 cfe9de7d 编写于 作者: M Mugen87

Curve: Clean up

上级 2214329d
......@@ -180,7 +180,11 @@ THREE.ParametricGeometries.TorusKnotGeometry = function ( radius, tube, segments
this.p = p || 2;
this.q = q || 3;
function TorusKnotCurve() {}
function TorusKnotCurve() {
THREE.Curve.call( this );
}
TorusKnotCurve.prototype = Object.create( THREE.Curve.prototype );
TorusKnotCurve.prototype.constructor = TorusKnotCurve;
......
......@@ -15,6 +15,8 @@
THREE.NURBSCurve = function ( degree, knots /* array of reals */, controlPoints /* array of Vector(2|3|4) */, startKnot /* index in knots */, endKnot /* index in knots */ ) {
THREE.Curve.call( this );
this.degree = degree;
this.knots = knots;
this.controlPoints = [];
......@@ -65,4 +67,3 @@ THREE.NURBSCurve.prototype.getTangent = function ( t ) {
return tangent;
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册