提交 8bad3a49 编写于 作者: W WestLangley

Vector3.unproject(): Avoid computing inverse

上级 3b2137d8
import { _Math } from './Math.js';
import { Matrix4 } from './Matrix4.js';
import { Quaternion } from './Quaternion.js';
/**
......@@ -318,17 +317,11 @@ Object.assign( Vector3.prototype, {
},
unproject: function () {
unproject: function ( camera ) {
var matrix = new Matrix4();
return this.applyMatrix4( camera.projectionMatrixInverse ).applyMatrix4( camera.matrixWorld );
return function unproject( camera ) {
return this.applyMatrix4( matrix.getInverse( camera.projectionMatrix ) ).applyMatrix4( camera.matrixWorld );
};
}(),
},
transformDirection: function ( m ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册