Explorar o código

Invert if the matrix scale is negative

Garrett Johnson %!s(int64=6) %!d(string=hai) anos
pai
achega
4e2b663ebd
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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,

粤ICP备19079148号