Ver código fonte

Curve: Clean up

Mugen87 8 anos atrás
pai
commit
cfe9de7da1

+ 5 - 1
examples/js/ParametricGeometries.js

@@ -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;

+ 2 - 1
examples/js/curves/NURBSCurve.js

@@ -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;
 
 };
-