Browse Source

Invert if the matrix scale is negative

Garrett Johnson 6 years ago
parent
commit
4e2b663ebd
1 changed files with 6 additions and 0 deletions
  1. 6 0
      examples/js/loaders/LDrawLoader.js

+ 6 - 0
examples/js/loaders/LDrawLoader.js

@@ -1263,6 +1263,12 @@ THREE.LDrawLoader = ( function () {
 
 						}
 
+						if ( matrix.determinant() < 0 ) {
+
+							bfcInverted = ! bfcInverted;
+
+						}
+
 						subobjects.push( {
 							material: material,
 							matrix: matrix,