|
@@ -119,11 +119,18 @@ THREE.ColladaLoader.prototype = {
|
|
|
function parseAsset( xml ) {
|
|
|
|
|
|
return {
|
|
|
+ unit: parseAssetUnit( getElementsByTagName( xml, 'unit' )[ 0 ] ),
|
|
|
upAxis: parseAssetUpAxis( getElementsByTagName( xml, 'up_axis' )[ 0 ] )
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
+ function parseAssetUnit( xml ) {
|
|
|
+
|
|
|
+ return xml !== undefined ? parseFloat( xml.getAttribute( 'meter' ) ) : 1;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
function parseAssetUpAxis( xml ) {
|
|
|
|
|
|
return xml !== undefined ? xml.textContent : 'Y_UP';
|
|
@@ -1444,6 +1451,8 @@ THREE.ColladaLoader.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ scene.scale.multiplyScalar( asset.unit );
|
|
|
+
|
|
|
console.timeEnd( 'ColladaLoader' );
|
|
|
|
|
|
// console.log( scene );
|