فهرست منبع

ColladaLoader2: WIP Z_UP

Mr.doob 9 سال پیش
والد
کامیت
3c8aa5d44d
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  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 ] );
+						}
 
 					}