Преглед изворни кода

optimize Vector3.reflect, unit tests still pass.

Ben Houston пре 13 година
родитељ
комит
f864ba1fd3
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/math/Vector3.js

+ 2 - 2
src/math/Vector3.js

@@ -548,9 +548,9 @@ THREE.extend( THREE.Vector3.prototype, {
 
 
 		return function ( normal ) {
 		return function ( normal ) {
 
 
-		    v1.copy( this ).ortho( normal ).multiplyScalar( -2 );
+		    v1.copy( this ).project( normal ).multiplyScalar( 2 );
 
 
-		    return this.add( v1 );
+		    return this.subVectors( v1, this );
 
 
 		}
 		}
 
 

粤ICP备19079148号