Work By: Erik Kitson
@@ -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 );
+ }