|
@@ -431,6 +431,15 @@ class USDZLoader extends Loader {
|
|
|
|
|
|
const mesh = new Mesh( geometry, material );
|
|
|
|
|
|
+ if ( 'matrix4d xformOp:transform' in data ) {
|
|
|
+
|
|
|
+ const array = JSON.parse( '[' + data[ 'matrix4d xformOp:transform' ].replace( /[()]*/g, '' ) + ']' );
|
|
|
+
|
|
|
+ mesh.matrix.fromArray( array );
|
|
|
+ mesh.matrix.decompose( mesh.position, mesh.quaternion, mesh.scale );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return mesh;
|
|
|
|
|
|
}
|