提交 1db29f18 编写于 作者: J John Pywtorak

Changed console error to return null and updated WebGLRenderer to handle null...

Changed console error to return null and updated WebGLRenderer to handle null value. A valid matrix with no rotation and 0 scale will have a 0  determinant and does not need a normal matrix.

Work By: Erik Kitson
上级 1b15b5ba
......@@ -794,7 +794,7 @@ THREE.Matrix4.makeInvert3x3 = function ( m1 ) {
if ( det === 0 ) {
console.error( 'THREE.Matrix4.makeInvert3x3: Matrix not invertible.' );
return null;
}
......
......@@ -4815,7 +4815,13 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( computeNormalMatrix ) {
THREE.Matrix4.makeInvert3x3( object._modelViewMatrix ).transposeIntoArray( object._normalMatrixArray );
var inv = THREE.Matrix4.makeInvert3x3( object._modelViewMatrix );
if ( inv ) {
inv.transposeIntoArray( object._normalMatrixArray );
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册