Skip to content

Commit 9bddc70

Browse files
committed
fixed string quotes type
1 parent 5961b65 commit 9bddc70

File tree

1 file changed

+7
-5
lines changed
  • packages/model-viewer/src/features

1 file changed

+7
-5
lines changed

packages/model-viewer/src/features/ar.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,27 +434,29 @@ configuration or device capabilities');
434434

435435
const usdzOptions = {
436436
ar: {
437-
anchoring: { type: "plane" },
437+
anchoring: { type: 'plane' },
438438
planeAnchoring: {
439-
alignment: this.arPlacement === "wall" ? "vertical" : "horizontal",
439+
alignment: this.arPlacement === 'wall' ? 'vertical' : 'horizontal',
440440
},
441441
},
442442
};
443443

444-
if (usdzOptions.ar.planeAnchoring.alignment === "vertical") {
444+
// necessary because quicklook internally rotates model when placing vertical.
445+
// See https://github.com/google/model-viewer/issues/3989
446+
if (usdzOptions.ar.planeAnchoring.alignment === 'vertical') {
445447
model.rotateX((-90 * Math.PI) / 180);
446448
model.updateMatrixWorld();
447449
}
448450

449451
const exporter = new USDZExporter() as any;
450452
const arraybuffer = await exporter.parse(model, usdzOptions);
451453
const blob = new Blob([arraybuffer], {
452-
type: "model/vnd.usdz+zip",
454+
type: 'model/vnd.usdz+zip',
453455
});
454456

455457
const url = URL.createObjectURL(blob);
456458

457-
if (usdzOptions.ar.planeAnchoring.alignment === "vertical") {
459+
if (usdzOptions.ar.planeAnchoring.alignment === 'vertical') {
458460
model.rotateX((90 * Math.PI) / 180);
459461
model.updateMatrixWorld();
460462
}

0 commit comments

Comments
 (0)