|
@@ -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}
|
|
|
`;
|
|
|
|
|
|
}
|