diff --git a/examples/jsm/exporters/USDZExporter.js b/examples/jsm/exporters/USDZExporter.js index 63ecfd3aea2ecd..5520d92910d89b 100644 --- a/examples/jsm/exporters/USDZExporter.js +++ b/examples/jsm/exporters/USDZExporter.js @@ -25,6 +25,7 @@ class USDZExporter { anchoring: { type: 'plane' }, planeAnchoring: { alignment: 'horizontal' } }, + includeAnchoringProperties: true, quickLookCompatible: false, maxTextureSize: 1024, }, options ); @@ -198,6 +199,10 @@ function buildHeader() { function buildSceneStart( options ) { + const alignment = options.includeAnchoringProperties === true ? ` + token preliminary:anchoring:type = "${options.ar.anchoring.type}" + token preliminary:planeAnchoring:alignment = "${options.ar.planeAnchoring.alignment}" + ` : ''; return `def Xform "Root" { def Scope "Scenes" ( @@ -211,10 +216,7 @@ function buildSceneStart( options ) { } sceneName = "Scene" ) - { - token preliminary:anchoring:type = "${options.ar.anchoring.type}" - token preliminary:planeAnchoring:alignment = "${options.ar.planeAnchoring.alignment}" - + {${alignment} `; }