Skip to content

Commit c399a18

Browse files
authored
fix: reuse instantiated material for buildXform to avoid generating missing materials (#30661)
1 parent 4edb768 commit c399a18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/jsm/exporters/USDZExporter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class USDZExporter {
119119

120120
}
121121

122-
output += buildXform( object, geometry, material );
122+
output += buildXform( object, geometry, materials[ material.uuid ] );
123123

124124
} else {
125125

@@ -796,7 +796,7 @@ function buildCamera( camera ) {
796796
float verticalAperture = ${ ( ( Math.abs( camera.top ) + Math.abs( camera.bottom ) ) * 10 ).toPrecision( PRECISION ) }
797797
token projection = "orthographic"
798798
}
799-
799+
800800
`;
801801

802802
} else {
@@ -813,7 +813,7 @@ function buildCamera( camera ) {
813813
token projection = "perspective"
814814
float verticalAperture = ${ camera.getFilmHeight().toPrecision( PRECISION ) }
815815
}
816-
816+
817817
`;
818818

819819
}

0 commit comments

Comments
 (0)