Skip to content

Commit 73eedf0

Browse files
committed
USDExporter: Clean up
1 parent 14fab09 commit 73eedf0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

examples/jsm/exporters/USDZExporter.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ function buildMaterial( material ) {
338338
{
339339
uniform token info:id = "UsdTransform2d"
340340
float2 inputs:in.connect = </Materials/Material_${ material.id }/uvReader_st.outputs:result>
341-
float2 inputs:scale = (${ texture.repeat.x },${ texture.repeat.y })
342-
float2 inputs:translation = (${ texture.offset.x },${ texture.offset.y })
341+
float2 inputs:scale = ${ buildVector2( texture.repeat ) }
342+
float2 inputs:translation = ${ buildVector2( texture.offset ) }
343343
float2 outputs:result
344344
}
345345
@@ -456,4 +456,10 @@ function buildColor( color ) {
456456

457457
}
458458

459+
function buildVector2( vector ) {
460+
461+
return `(${ vector.x }, ${ vector.y })`;
462+
463+
}
464+
459465
export { USDZExporter };

0 commit comments

Comments
 (0)