Browse Source

CatmullRomCurve3 clean up.

Mr.doob 9 years ago
parent
commit
0a1e50366e
2 changed files with 7 additions and 6 deletions
  1. 4 4
      src/extras/curves/CatmullRomCurve3.js
  2. 3 2
      src/extras/curves/ClosedSplineCurve3.js

+ 4 - 4
src/extras/curves/CatmullRomCurve3.js

@@ -100,11 +100,11 @@ THREE.CatmullRomCurve3 = ( function() {
 			point = ( l - ( this.closed ? 0 : 1 ) ) * t;
 			intPoint = Math.floor( point );
 			weight = point - intPoint;
-			
+
 			if ( this.closed ) {
-				
+
 				intPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / points.length ) + 1 ) * points.length;
-				
+
 			} else if ( weight === 0 && intPoint === l - 1 ) {
 
 				intPoint = l - 2;
@@ -131,7 +131,7 @@ THREE.CatmullRomCurve3 = ( function() {
 
 			if ( this.closed || intPoint + 2 < l ) {
 
-				p3 = points[ ( intPoint + 2 ) % l ]
+				p3 = points[ ( intPoint + 2 ) % l ];
 
 			} else {
 

+ 3 - 2
src/extras/curves/ClosedSplineCurve3.js

@@ -6,10 +6,11 @@
 THREE.ClosedSplineCurve3 = function ( points ) {
 
 	console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3.' );
+
 	THREE.CatmullRomCurve3.call( this, points );
 	this.type = 'catmullrom';
 	this.closed = true;
-	
+
 };
 
-THREE.ClosedSplineCurve3.prototype = Object.create( THREE.CatmullRomCurve3.prototype );
+THREE.ClosedSplineCurve3.prototype = Object.create( THREE.CatmullRomCurve3.prototype );