Explorar o código

Improve Quaternion closure performance

Tristan VALCKE %!s(int64=9) %!d(string=hai) anos
pai
achega
563060ae23
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/math/Quaternion.js

+ 2 - 1
src/math/Quaternion.js

@@ -332,7 +332,8 @@ Object.assign( Quaternion.prototype, {
 
 
 		// assumes direction vectors vFrom and vTo are normalized
 		// assumes direction vectors vFrom and vTo are normalized
 
 
-		var v1, r;
+		var v1 = new Vector3();
+		var r;
 
 
 		var EPS = 0.000001;
 		var EPS = 0.000001;
 
 

粤ICP备19079148号