浏览代码

ParametricGeometry: Remove return of surface equations

Mugen87 7 年之前
父节点
当前提交
5608b30f47
共有 4 个文件被更改,包括 10 次插入10 次删除
  1. 1 1
      examples/js/Cloth.js
  2. 7 7
      examples/js/ParametricGeometries.js
  3. 1 1
      examples/js/curves/NURBSSurface.js
  4. 1 1
      examples/js/curves/NURBSUtils.js

+ 1 - 1
examples/js/Cloth.js

@@ -52,7 +52,7 @@ function plane( width, height ) {
 		var y = ( v + 0.5 ) * height;
 		var y = ( v + 0.5 ) * height;
 		var z = 0;
 		var z = 0;
 
 
-		return target.set( x, y, z );
+		target.set( x, y, z );
 
 
 	};
 	};
 
 

+ 7 - 7
examples/js/ParametricGeometries.js

@@ -28,7 +28,7 @@ THREE.ParametricGeometries = {
 
 
 		y = - 2 * ( 1 - Math.cos( u ) / 2 ) * Math.sin( v );
 		y = - 2 * ( 1 - Math.cos( u ) / 2 ) * Math.sin( v );
 
 
-		return target.set( x, y, z );
+		target.set( x, y, z );
 
 
 	},
 	},
 
 
@@ -40,7 +40,7 @@ THREE.ParametricGeometries = {
 			var y = 0;
 			var y = 0;
 			var z = v * height;
 			var z = v * height;
 
 
-			return target.set( x, y, z );
+			target.set( x, y, z );
 
 
 		};
 		};
 
 
@@ -61,7 +61,7 @@ THREE.ParametricGeometries = {
 		y = Math.sin( v ) * ( a + u * Math.cos( v / 2 ) );
 		y = Math.sin( v ) * ( a + u * Math.cos( v / 2 ) );
 		z = u * Math.sin( v / 2 );
 		z = u * Math.sin( v / 2 );
 
 
-		return target.set( x, y, z );
+		target.set( x, y, z );
 
 
 	},
 	},
 
 
@@ -83,7 +83,7 @@ THREE.ParametricGeometries = {
 		y = ( major + x ) * Math.sin( u );
 		y = ( major + x ) * Math.sin( u );
 		x = ( major + x ) * Math.cos( u );
 		x = ( major + x ) * Math.cos( u );
 
 
-		return target.set( x, y, z );
+		target.set( x, y, z );
 
 
 	}
 	}
 
 
@@ -146,7 +146,7 @@ THREE.ParametricGeometries.TubeGeometry = function ( path, segments, radius, seg
 		pos.y += cx * normal.y + cy * binormal.y;
 		pos.y += cx * normal.y + cy * binormal.y;
 		pos.z += cx * normal.z + cy * binormal.z;
 		pos.z += cx * normal.z + cy * binormal.z;
 
 
-		return target.copy( pos );
+		target.copy( pos );
 
 
 	};
 	};
 
 
@@ -225,7 +225,7 @@ THREE.ParametricGeometries.SphereGeometry = function ( size, u, v ) {
 		var y = size * Math.sin( u ) * Math.sin( v );
 		var y = size * Math.sin( u ) * Math.sin( v );
 		var z = size * Math.cos( u );
 		var z = size * Math.cos( u );
 
 
-		return target.set( x, y, z );
+		target.set( x, y, z );
 
 
 	}
 	}
 
 
@@ -251,7 +251,7 @@ THREE.ParametricGeometries.PlaneGeometry = function ( width, depth, segmentsWidt
 		var y = 0;
 		var y = 0;
 		var z = v * depth;
 		var z = v * depth;
 
 
-		return target.set( x, y, z );
+		target.set( x, y, z );
 
 
 	}
 	}
 
 

+ 1 - 1
examples/js/curves/NURBSSurface.js

@@ -47,7 +47,7 @@ THREE.NURBSSurface.prototype = {
 		var u = this.knots1[ 0 ] + t1 * ( this.knots1[ this.knots1.length - 1 ] - this.knots1[ 0 ] ); // linear mapping t1->u
 		var u = this.knots1[ 0 ] + t1 * ( this.knots1[ this.knots1.length - 1 ] - this.knots1[ 0 ] ); // linear mapping t1->u
 		var v = this.knots2[ 0 ] + t2 * ( this.knots2[ this.knots2.length - 1 ] - this.knots2[ 0 ] ); // linear mapping t2->u
 		var v = this.knots2[ 0 ] + t2 * ( this.knots2[ this.knots2.length - 1 ] - this.knots2[ 0 ] ); // linear mapping t2->u
 
 
-		return THREE.NURBSUtils.calcSurfacePoint( this.degree1, this.degree2, this.knots1, this.knots2, this.controlPoints, u, v, target );
+		THREE.NURBSUtils.calcSurfacePoint( this.degree1, this.degree2, this.knots1, this.knots2, this.controlPoints, u, v, target );
 
 
 	}
 	}
 };
 };

+ 1 - 1
examples/js/curves/NURBSUtils.js

@@ -462,7 +462,7 @@ THREE.NURBSUtils = {
 		}
 		}
 
 
 		Sw.divideScalar( Sw.w );
 		Sw.divideScalar( Sw.w );
-		return target.set( Sw.x, Sw.y, Sw.z );
+		target.set( Sw.x, Sw.y, Sw.z );
 
 
 	}
 	}