Skip to content

Commit

Permalink
USDExporter: Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed May 21, 2021
1 parent 14fab09 commit 73eedf0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions examples/jsm/exporters/USDZExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ function buildMaterial( material ) {
{
uniform token info:id = "UsdTransform2d"
float2 inputs:in.connect = </Materials/Material_${ material.id }/uvReader_st.outputs:result>
float2 inputs:scale = (${ texture.repeat.x },${ texture.repeat.y })
float2 inputs:translation = (${ texture.offset.x },${ texture.offset.y })
float2 inputs:scale = ${ buildVector2( texture.repeat ) }
float2 inputs:translation = ${ buildVector2( texture.offset ) }
float2 outputs:result
}
Expand Down Expand Up @@ -456,4 +456,10 @@ function buildColor( color ) {

}

function buildVector2( vector ) {

return `(${ vector.x }, ${ vector.y })`;

}

export { USDZExporter };

0 comments on commit 73eedf0

Please sign in to comment.