浏览代码

TubeGeometry. Fixed NoTaper. See #5679.

Mr.doob 10 年之前
父节点
当前提交
54c1e82351
共有 1 个文件被更改,包括 9 次插入5 次删除
  1. 9 5
      src/extras/geometries/TubeGeometry.js

+ 9 - 5
src/extras/geometries/TubeGeometry.js

@@ -83,7 +83,7 @@ THREE.TubeGeometry = function ( path, segments, radius, radialSegments, closed,
 		normal = normals[ i ];
 		normal = normals[ i ];
 		binormal = binormals[ i ];
 		binormal = binormals[ i ];
 
 
-		r = radius * taper(u);
+		r = radius * taper( u );
 
 
 		for ( j = 0; j < radialSegments; j ++ ) {
 		for ( j = 0; j < radialSegments; j ++ ) {
 
 
@@ -139,12 +139,16 @@ THREE.TubeGeometry = function ( path, segments, radius, radialSegments, closed,
 THREE.TubeGeometry.prototype = Object.create( THREE.Geometry.prototype );
 THREE.TubeGeometry.prototype = Object.create( THREE.Geometry.prototype );
 THREE.TubeGeometry.prototype.constructor = THREE.TubeGeometry;
 THREE.TubeGeometry.prototype.constructor = THREE.TubeGeometry;
 
 
-THREE.TubeGeometry.NoTaper = function(u) {
-	return u;
+THREE.TubeGeometry.NoTaper = function ( u ) {
+
+	return 1;
+
 };
 };
 
 
-THREE.TubeGeometry.SinusoidalTaper = function(u) {
-	return Math.sin(Math.PI * u);
+THREE.TubeGeometry.SinusoidalTaper = function ( u ) {
+
+	return Math.sin( Math.PI * u );
+
 };
 };
 
 
 // For computing of Frenet frames, exposing the tangents, normals and binormals the spline
 // For computing of Frenet frames, exposing the tangents, normals and binormals the spline