Просмотр исходного кода

optimize Vector3.reflect, unit tests still pass.

Ben Houston 13 лет назад
Родитель
Сommit
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 ) {
 
-		    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号