提交 c7fc6afe 编写于 作者: Z zz85

uses one instance of THREE.Matrix4 as proposed by @WestLangley in #1833

上级 c85a5b5b
......@@ -267,9 +267,7 @@ THREE.Object3D.prototype = {
worldToLocal: function ( vector ) {
if ( !this.__inverseMatrixWorld ) this.__inverseMatrixWorld = new THREE.Matrix4();
return this.__inverseMatrixWorld.getInverse( this.matrixWorld ).multiplyVector3( vector );
return THREE.Object3D.__m1.getInverse( this.matrixWorld ).multiplyVector3( vector );
},
......@@ -281,4 +279,6 @@ THREE.Object3D.prototype = {
};
THREE.Object3D.__m1 = new THREE.Matrix4();
THREE.Object3DCount = 0;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册