Răsfoiți Sursa

ColladaLoader2: WIP Z_UP

Mr.doob 9 ani în urmă
părinte
comite
3c8aa5d44d
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      examples/js/loaders/ColladaLoader2.js

+ 6 - 1
examples/js/loaders/ColladaLoader2.js

@@ -468,7 +468,12 @@ THREE.ColladaLoader.prototype = {
 					function pushVector( i ) {
 
 						var index = indices[ i + offset ] * 3;
-						array.push( source[ index + 0 ], source[ index + 1 ], source[ index + 2 ] );
+
+						if ( asset.upAxis === 'Z_UP' ) {
+							array.push( source[ index + 0 ], source[ index + 2 ], - source[ index + 1 ] );
+						} else {
+							array.push( source[ index + 0 ], source[ index + 1 ], source[ index + 2 ] );
+						}
 
 					}