Skip to content

Commit

Permalink
USDZExporter: Allow to pass {ar: undefined} as options to anchor on b…
Browse files Browse the repository at this point in the history
…oth wall and floor
  • Loading branch information
vincentfretin committed May 13, 2024
1 parent eea543b commit c1e0897
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/jsm/exporters/USDZExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ function buildHeader() {

function buildSceneStart( options ) {

const alignment = options.ar !== undefined ? `
token preliminary:anchoring:type = "${options.ar.anchoring.type}"
token preliminary:planeAnchoring:alignment = "${options.ar.planeAnchoring.alignment}"
` : '';
return `def Xform "Root"
{
def Scope "Scenes" (
Expand All @@ -211,10 +215,7 @@ function buildSceneStart( options ) {
}
sceneName = "Scene"
)
{
token preliminary:anchoring:type = "${options.ar.anchoring.type}"
token preliminary:planeAnchoring:alignment = "${options.ar.planeAnchoring.alignment}"
{${alignment}
`;

}
Expand Down

0 comments on commit c1e0897

Please sign in to comment.