@spiffcommerce/preview 5.6.0 → 5.7.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,31 +40,31 @@ import "@babylonjs/core/Animations/animatable";
40
40
  import "@babylonjs/core/Misc/screenshotTools";
41
41
  import "@babylonjs/core/Rendering/boundingBoxRenderer";
42
42
  import "@babylonjs/loaders/glTF/2.0/Extensions";
43
- var I = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(I || {}), F = /* @__PURE__ */ ((n) => (n.None = "None", n.RemoveWhenSelected = "RemoveWhenSelected", n.ApplyWhenSelected = "ApplyWhenSelected", n))(F || {});
43
+ var I = /* @__PURE__ */ ((s) => (s[s.Orbit = 0] = "Orbit", s[s.Pan = 1] = "Pan", s))(I || {}), F = /* @__PURE__ */ ((s) => (s.None = "None", s.RemoveWhenSelected = "RemoveWhenSelected", s.ApplyWhenSelected = "ApplyWhenSelected", s))(F || {});
44
44
  const he = /* @__PURE__ */ new Map();
45
- async function D(n, e, t) {
46
- const i = he.get(n);
45
+ async function D(s, e, t) {
46
+ const i = he.get(s);
47
47
  if (i)
48
48
  return i;
49
49
  {
50
50
  const r = S.LoadAssetContainerAsync(
51
- n,
51
+ s,
52
52
  void 0,
53
53
  e,
54
54
  t
55
55
  );
56
- return he.set(n, r), r;
56
+ return he.set(s, r), r;
57
57
  }
58
58
  }
59
- S.OnPluginActivatedObservable.add((n) => {
60
- n.name === "gltf" && (n.animationStartMode = Re.NONE);
59
+ S.OnPluginActivatedObservable.add((s) => {
60
+ s.name === "gltf" && (s.animationStartMode = Re.NONE);
61
61
  });
62
62
  class ce {
63
63
  constructor(e) {
64
64
  this.getSceneClearColor = () => {
65
- var i, r, s, o;
65
+ var i, r, n, o;
66
66
  const t = (i = this.customOptions) != null && i.transparentBackground || (r = this.customOptions) != null && r.backgroundImage ? 0 : 1;
67
- if (this.customOptions && ((s = this.customOptions) != null && s.transparentBackground) || (o = this.customOptions) != null && o.backgroundImage)
67
+ if (this.customOptions && ((n = this.customOptions) != null && n.transparentBackground) || (o = this.customOptions) != null && o.backgroundImage)
68
68
  return new b(0, 0, 0, t).toLinearSpace();
69
69
  if (this.customOptions && this.customOptions.backgroundColor) {
70
70
  const a = w.FromHexString(
@@ -99,14 +99,14 @@ class ce {
99
99
  * Configuration related to the scene
100
100
  */
101
101
  get scene() {
102
- var e, t, i, r, s;
102
+ var e, t, i, r, n;
103
103
  return {
104
104
  clearColor: this.getSceneClearColor(),
105
105
  transparentBackground: ((e = this.customOptions) == null ? void 0 : e.transparentBackground) || ((t = this.customOptions) == null ? void 0 : t.backgroundImage),
106
106
  environment: {
107
107
  file: ((i = this.customOptions) == null ? void 0 : i.environmentFile) ?? "assets/model-viewer/default.env",
108
108
  intensity: ((r = this.customOptions) == null ? void 0 : r.environmentIntensity) ?? 1,
109
- rotationY: (((s = this.customOptions) == null ? void 0 : s.environmentRotationY) ?? 0) * (Math.PI / 180)
109
+ rotationY: (((n = this.customOptions) == null ? void 0 : n.environmentRotationY) ?? 0) * (Math.PI / 180)
110
110
  // Convert to radians
111
111
  }
112
112
  };
@@ -115,7 +115,7 @@ class ce {
115
115
  * Configuration related to the camera used to view and interact with the scene.
116
116
  */
117
117
  get camera() {
118
- var e, t, i, r, s, o, a, l, c, h, u, m, g;
118
+ var e, t, i, r, n, o, a, l, c, h, u, m, g;
119
119
  return {
120
120
  autoOrientation: ((e = this.customOptions) == null ? void 0 : e.disableAutomaticOrientation) ?? !0,
121
121
  autoRotation: {
@@ -124,7 +124,7 @@ class ce {
124
124
  },
125
125
  limits: {
126
126
  min: {
127
- alpha: (r = this.customOptions) != null && r.lowerAlphaLimitDeg ? ((s = this.customOptions) == null ? void 0 : s.lowerAlphaLimitDeg) * Math.PI / 180 : void 0,
127
+ alpha: (r = this.customOptions) != null && r.lowerAlphaLimitDeg ? ((n = this.customOptions) == null ? void 0 : n.lowerAlphaLimitDeg) * Math.PI / 180 : void 0,
128
128
  beta: (o = this.customOptions) != null && o.lowerBetaLimitDeg ? ((a = this.customOptions) == null ? void 0 : a.lowerBetaLimitDeg) * Math.PI / 180 : void 0,
129
129
  radius: (l = this.customOptions) == null ? void 0 : l.minZoomOverride
130
130
  },
@@ -273,9 +273,9 @@ class Ge {
273
273
  e,
274
274
  t,
275
275
  function(r) {
276
- t.extras && Object.keys(t.extras).forEach((s) => {
277
- const o = t.extras[s];
278
- r.metadata[s] = o;
276
+ t.extras && Object.keys(t.extras).forEach((n) => {
277
+ const o = t.extras[n];
278
+ r.metadata[n] = o;
279
279
  }), i(r);
280
280
  }
281
281
  );
@@ -334,16 +334,16 @@ class Ge {
334
334
  * @param scene The scene to parse.
335
335
  */
336
336
  applyReflections(e) {
337
- function t(s) {
337
+ function t(n) {
338
338
  const o = [];
339
- return s.transformNodes.forEach((a) => {
339
+ return n.transformNodes.forEach((a) => {
340
340
  a.metadata && a.metadata.reflective && o.push(...a.getChildMeshes());
341
- }), s.meshes.forEach((a) => {
341
+ }), n.meshes.forEach((a) => {
342
342
  a.metadata && a.metadata.reflective && !o.includes(a) && o.push(a);
343
343
  }), o;
344
344
  }
345
- function i(s, o = 1) {
346
- const a = s.material;
345
+ function i(n, o = 1) {
346
+ const a = n.material;
347
347
  if (!a)
348
348
  return;
349
349
  const l = new Ee(
@@ -353,32 +353,32 @@ class Ge {
353
353
  !0
354
354
  );
355
355
  l.renderList = t(e);
356
- const c = s.getVerticesData("normal");
356
+ const c = n.getVerticesData("normal");
357
357
  if (!c)
358
358
  throw new Error(
359
- "Mirror attribute specified on: " + s.name + "But no normals exist to generate a mirror from!"
359
+ "Mirror attribute specified on: " + n.name + "But no normals exist to generate a mirror from!"
360
360
  );
361
- s.computeWorldMatrix(!0);
362
- const h = s.getWorldMatrix(), u = ae.TransformNormal(
361
+ n.computeWorldMatrix(!0);
362
+ const h = n.getWorldMatrix(), u = ae.TransformNormal(
363
363
  new ae(c[0], c[1], c[2]),
364
364
  h
365
365
  ).normalize(), m = Oe.FromPositionAndNormal(
366
- s.position,
366
+ n.position,
367
367
  u.scale(-1)
368
368
  );
369
369
  l.mirrorPlane = m, l.level = o, a.reflectionTexture = l;
370
370
  }
371
- function r(s) {
372
- const o = s.material, a = new Le(
371
+ function r(n) {
372
+ const o = n.material, a = new Le(
373
373
  "probe-" + o.name,
374
374
  Ne,
375
375
  e
376
376
  );
377
- a.attachToMesh(s), a.renderList && a.renderList.push(...t(e)), o.reflectionTexture = a.cubeTexture;
377
+ a.attachToMesh(n), a.renderList && a.renderList.push(...t(e)), o.reflectionTexture = a.cubeTexture;
378
378
  }
379
- e.meshes.forEach((s) => {
380
- const o = s.metadata;
381
- o && (o.mirrorTexture && i(s, o.mirrorTexture), o.reflectionProbe && r(s));
379
+ e.meshes.forEach((n) => {
380
+ const o = n.metadata;
381
+ o && (o.mirrorTexture && i(n, o.mirrorTexture), o.reflectionProbe && r(n));
382
382
  });
383
383
  }
384
384
  }
@@ -404,10 +404,10 @@ class _e {
404
404
  }
405
405
  }
406
406
  }
407
- function He(n, e, t, i, r = "") {
408
- t.forEach((s) => {
409
- const o = s.getID(), a = s.getName(), l = A.getDynamicTextureResolution();
410
- n.filter((h) => h.name === r + a).forEach((h) => {
407
+ function He(s, e, t, i, r = "") {
408
+ t.forEach((n) => {
409
+ const o = n.getID(), a = n.getName(), l = A.getDynamicTextureResolution();
410
+ s.filter((h) => h.name === r + a).forEach((h) => {
411
411
  const u = i.get(o), m = !1;
412
412
  if (u)
413
413
  de(h, u), u.update(m);
@@ -418,7 +418,7 @@ function He(n, e, t, i, r = "") {
418
418
  l.width,
419
419
  l.height
420
420
  );
421
- i.set(o, g), s.setStaticContext(
421
+ i.set(o, g), n.setStaticContext(
422
422
  g.getContext()
423
423
  ), de(h, g), g.onLoadObservable.addOnce(() => {
424
424
  g.update(m);
@@ -427,45 +427,45 @@ function He(n, e, t, i, r = "") {
427
427
  });
428
428
  });
429
429
  }
430
- function Ke(n, e, t, i) {
430
+ function Ke(s, e, t, i) {
431
431
  const r = new Be(
432
- n,
432
+ s,
433
433
  { width: t, height: i },
434
434
  e,
435
435
  A.shouldMipMap(),
436
436
  De.TRILINEAR_SAMPLINGMODE,
437
437
  be.TEXTUREFORMAT_RGBA
438
- ), s = r.getContext();
439
- return s && (s.fillStyle = "#f5f5f5", s.fillRect(0, 0, t, i), r.update()), r;
438
+ ), n = r.getContext();
439
+ return n && (n.fillStyle = "#f5f5f5", n.fillRect(0, 0, t, i), r.update()), r;
440
440
  }
441
- function de(n, e) {
442
- if (n instanceof B) {
443
- const t = n, i = t.albedoTexture;
441
+ function de(s, e) {
442
+ if (s instanceof B) {
443
+ const t = s, i = t.albedoTexture;
444
444
  i ? (e.wrapU = i.wrapU, e.wrapV = i.wrapV) : (e.wrapU = 1, e.wrapV = 1), t.albedoTexture = e;
445
445
  } else {
446
- const t = n, i = t.diffuseTexture;
446
+ const t = s, i = t.diffuseTexture;
447
447
  i && (e.wrapU = i.wrapU, e.wrapV = i.wrapV), t.diffuseTexture = e;
448
448
  }
449
449
  }
450
450
  function Ue() {
451
- const n = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
452
- return n() + n() + "-" + n() + "-" + n() + "-" + n() + "-" + n() + n() + n();
451
+ const s = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
452
+ return s() + s() + "-" + s() + "-" + s() + "-" + s() + "-" + s() + s() + s();
453
453
  }
454
454
  const M = 60, ue = 1;
455
- function me(n) {
456
- return n.targetedAnimations.map((t) => t.animation.framePerSecond).reduce((t, i) => t + i, 0) / n.targetedAnimations.length || 0;
455
+ function me(s) {
456
+ return s.targetedAnimations.map((t) => t.animation.framePerSecond).reduce((t, i) => t + i, 0) / s.targetedAnimations.length || 0;
457
457
  }
458
- function ve(n, e, t, i, r, s) {
459
- const o = r ? n.filter((h) => h.name === r) : n;
458
+ function ve(s, e, t, i, r, n) {
459
+ const o = r ? s.filter((h) => h.name === r) : s;
460
460
  if (o.length === 0) {
461
461
  console.warn(`No animations found for name: ${r}`);
462
462
  return;
463
463
  }
464
464
  let a = 0;
465
465
  const l = () => {
466
- a++, a === o.length && s && s();
466
+ a++, a === o.length && n && n();
467
467
  }, c = (h, u, m, g, f) => {
468
- h.stop(), h.start(u, m, g, f), s && (u == !1 || u === void 0 && !h.loopAnimation ? h.onAnimationGroupEndObservable.addOnce(() => {
468
+ h.stop(), h.start(u, m, g, f), n && (u == !1 || u === void 0 && !h.loopAnimation ? h.onAnimationGroupEndObservable.addOnce(() => {
469
469
  l();
470
470
  }) : h.onAnimationLoopObservable.addOnce(() => {
471
471
  l();
@@ -483,10 +483,10 @@ function ve(n, e, t, i, r, s) {
483
483
  c(h, e, ue, m, g);
484
484
  });
485
485
  }
486
- function We(n, e, t) {
486
+ function We(s, e, t) {
487
487
  return new Promise((i) => {
488
- n.stopAnimation(e), e.animations = [], Math.abs(e.alpha) > 2 * Math.PI && (e.alpha = Ye(e.alpha, 0, 2 * Math.PI));
489
- const r = [], s = t.target, o = 0, a = s ? 1 : 0;
488
+ s.stopAnimation(e), e.animations = [], Math.abs(e.alpha) > 2 * Math.PI && (e.alpha = Ye(e.alpha, 0, 2 * Math.PI));
489
+ const r = [], n = t.target, o = 0, a = n ? 1 : 0;
490
490
  if (t.target && Object.keys(t.target).length > 0 && r.push(
491
491
  x(
492
492
  "cameraTargetLerp",
@@ -533,10 +533,10 @@ function We(n, e, t) {
533
533
  }
534
534
  e.animations.push(...r);
535
535
  const c = e.useAutoRotationBehavior;
536
- e.disableAutoRotationBehavior(), n.beginAnimation(
536
+ e.disableAutoRotationBehavior(), s.beginAnimation(
537
537
  e,
538
538
  0,
539
- s ? M * 2 : M,
539
+ n ? M * 2 : M,
540
540
  !1,
541
541
  1,
542
542
  () => {
@@ -545,29 +545,29 @@ function We(n, e, t) {
545
545
  );
546
546
  });
547
547
  }
548
- function ge(n) {
549
- return n * Math.PI / 180;
548
+ function ge(s) {
549
+ return s * Math.PI / 180;
550
550
  }
551
- function x(n, e, t, i, r, s = 0, o = v.ANIMATIONLOOPMODE_CONSTANT) {
551
+ function x(s, e, t, i, r, n = 0, o = v.ANIMATIONLOOPMODE_CONSTANT) {
552
552
  const a = new ke();
553
553
  a.setEasingMode(ze.EASINGMODE_EASEINOUT);
554
554
  const l = new v(
555
- n,
555
+ s,
556
556
  e,
557
557
  M,
558
558
  r,
559
559
  o
560
560
  ), c = [];
561
- return s > 0 && c.push({ frame: 0, value: t }), c.push({ frame: M * s, value: t }), c.push({
562
- frame: M * (s + 1),
561
+ return n > 0 && c.push({ frame: 0, value: t }), c.push({ frame: M * n, value: t }), c.push({
562
+ frame: M * (n + 1),
563
563
  value: i
564
564
  }), l.setKeys(c), l.setEasingFunction(a), l;
565
565
  }
566
- function Ye(n, e, t) {
567
- return n < e ? n = t - (e - n) % (t - e) : n = e + (n - e) % (t - e);
566
+ function Ye(s, e, t) {
567
+ return s < e ? s = t - (e - s) % (t - e) : s = e + (s - e) % (t - e);
568
568
  }
569
- function Qe(n, e, t) {
570
- n.forEach((i) => {
569
+ function Qe(s, e, t) {
570
+ s.forEach((i) => {
571
571
  t && i.name !== t || i.goToFrame(e);
572
572
  });
573
573
  }
@@ -581,7 +581,7 @@ const Ze = {
581
581
  refractionTexture: "refractionMap",
582
582
  reflectionTexture: "reflectionMap"
583
583
  };
584
- function $e(n, e, t, i) {
584
+ function $e(s, e, t, i) {
585
585
  [
586
586
  "albedoTexture",
587
587
  "bumpTexture",
@@ -591,49 +591,49 @@ function $e(n, e, t, i) {
591
591
  "metallicTexture",
592
592
  "refractionTexture",
593
593
  "reflectionTexture"
594
- ].forEach((s) => {
594
+ ].forEach((n) => {
595
595
  je(
596
- s,
597
596
  n,
597
+ s,
598
598
  e,
599
599
  t,
600
600
  i
601
601
  );
602
- }), et(n, e);
602
+ }), et(s, e);
603
603
  }
604
- function je(n, e, t, i, r) {
605
- const s = Ze[n];
606
- if (!s)
604
+ function je(s, e, t, i, r) {
605
+ const n = Ze[s];
606
+ if (!n)
607
607
  throw new Error("Unexpected texture name encountered.");
608
- const o = e[s], a = o == null ? void 0 : o.fileLink;
609
- a ? n === "reflectionTexture" ? a.endsWith(".env") || a.endsWith(".dds") ? i.addCubeTextureTask(
610
- n,
608
+ const o = e[n], a = o == null ? void 0 : o.fileLink;
609
+ a ? s === "reflectionTexture" ? a.endsWith(".env") || a.endsWith(".dds") ? i.addCubeTextureTask(
610
+ s,
611
611
  a,
612
612
  void 0,
613
613
  !1,
614
614
  void 0,
615
615
  !0
616
616
  ) : a.endsWith(".hdr") ? i.addHDRCubeTextureTask(
617
- n,
617
+ s,
618
618
  a,
619
619
  128,
620
620
  !1,
621
621
  !0,
622
622
  !1
623
- ) : i.addTextureTask(n, a, !1, !1) : i.addTextureTask(n, a, !1, !1) : r && t[n] && (t[n] && t[n].dispose(), t[n] = null, Xe(n, t));
623
+ ) : i.addTextureTask(s, a, !1, !1) : i.addTextureTask(s, a, !1, !1) : r && t[s] && (t[s] && t[s].dispose(), t[s] = null, Xe(s, t));
624
624
  }
625
- function Xe(n, e) {
626
- n === "opacityTexture" && (e.useAlphaFromAlbedoTexture = !0), n === "metallicTexture" && (e.useRoughnessFromMetallicTextureAlpha = !1, e.useRoughnessFromMetallicTextureGreen = !1, e.useMetallnessFromMetallicTextureBlue = !1), n === "refractionTexture" && (e.subSurface.isRefractionEnabled = !1, e.subSurface.refractionIntensity = 1), n === "reflectionTexture" && (e.environmentIntensity = 1), n === "emissiveTexture" && (e.emissiveIntensity = 0, e.emissiveColor = new w(0, 0, 0), e.reflectionTexture);
625
+ function Xe(s, e) {
626
+ s === "opacityTexture" && (e.useAlphaFromAlbedoTexture = !0), s === "metallicTexture" && (e.useRoughnessFromMetallicTextureAlpha = !1, e.useRoughnessFromMetallicTextureGreen = !1, e.useMetallnessFromMetallicTextureBlue = !1), s === "refractionTexture" && (e.subSurface.isRefractionEnabled = !1, e.subSurface.refractionIntensity = 1), s === "reflectionTexture" && (e.environmentIntensity = 1), s === "emissiveTexture" && (e.emissiveIntensity = 0, e.emissiveColor = new w(0, 0, 0), e.reflectionTexture);
627
627
  }
628
- function Je(n, e, t, i) {
628
+ function Je(s, e, t, i) {
629
629
  if (!e) {
630
630
  console.error("Failed to apply texture to material: material is null.");
631
631
  return;
632
632
  }
633
- n === "opacityTexture" && (e.useAlphaFromAlbedoTexture = !1), n === "metallicTexture" && (e.useRoughnessFromMetallicTextureAlpha = !1, e.useRoughnessFromMetallicTextureGreen = !0, e.useMetallnessFromMetallicTextureBlue = !0), n === "refractionTexture" && (e.subSurface.isRefractionEnabled = !0, e.subSurface.refractionIntensity = t.refractionIntensity || 1), n === "reflectionTexture" && (e.environmentIntensity = t.reflectionIntensity || 1, i.isCube && (i.rotationY = t.reflectionRotation ? t.reflectionRotation * Math.PI / 180 : 0)), e[n] = i, n === "emissiveTexture" && (e.emissiveColor = new w(1, 1, 1), e.emissiveIntensity = 1);
633
+ s === "opacityTexture" && (e.useAlphaFromAlbedoTexture = !1), s === "metallicTexture" && (e.useRoughnessFromMetallicTextureAlpha = !1, e.useRoughnessFromMetallicTextureGreen = !0, e.useMetallnessFromMetallicTextureBlue = !0), s === "refractionTexture" && (e.subSurface.isRefractionEnabled = !0, e.subSurface.refractionIntensity = t.refractionIntensity || 1), s === "reflectionTexture" && (e.environmentIntensity = t.reflectionIntensity || 1, i.isCube && (i.rotationY = t.reflectionRotation ? t.reflectionRotation * Math.PI / 180 : 0)), e[s] = i, s === "emissiveTexture" && (e.emissiveColor = new w(1, 1, 1), e.emissiveIntensity = 1);
634
634
  }
635
- function et(n, e) {
636
- n.clearCoat && (n.clearCoat === F.RemoveWhenSelected ? (e.clearCoat.isEnabled = !1, e.clearCoat.indexOfRefraction = 1.5) : n.clearCoat === F.ApplyWhenSelected && (e.clearCoat.isEnabled = !0, e.clearCoat.indexOfRefraction = n.clearCoatIOR || e.clearCoat.indexOfRefraction));
635
+ function et(s, e) {
636
+ s.clearCoat && (s.clearCoat === F.RemoveWhenSelected ? (e.clearCoat.isEnabled = !1, e.clearCoat.indexOfRefraction = 1.5) : s.clearCoat === F.ApplyWhenSelected && (e.clearCoat.isEnabled = !0, e.clearCoat.indexOfRefraction = s.clearCoatIOR || e.clearCoat.indexOfRefraction));
637
637
  }
638
638
  class tt {
639
639
  constructor(e, t, i) {
@@ -649,7 +649,7 @@ class tt {
649
649
  * where we want to undo changes are remove effects from display.
650
650
  */
651
651
  async applyMaterial(e, t, i, r) {
652
- return new Promise((s) => {
652
+ return new Promise((n) => {
653
653
  const o = this.materialVariantMap.get(e);
654
654
  this.materialVariantMap.set(e, {
655
655
  ...o,
@@ -659,7 +659,7 @@ class tt {
659
659
  (h) => h.name === a
660
660
  );
661
661
  if (l.length === 0) {
662
- s();
662
+ n();
663
663
  return;
664
664
  }
665
665
  const c = new Ve(this.scene);
@@ -685,7 +685,7 @@ class tt {
685
685
  m.texture
686
686
  )
687
687
  );
688
- }), s();
688
+ }), n();
689
689
  }, c.loadAsync();
690
690
  });
691
691
  }
@@ -699,7 +699,7 @@ class tt {
699
699
  * @param getCurrentFrame A function that returns the current frame of the animation.
700
700
  * @param getAnimationIsPlaying A function that returns whether the animation is currently playing.
701
701
  */
702
- async applyModel(e, t, i, r, s, o, a) {
702
+ async applyModel(e, t, i, r, n, o, a) {
703
703
  var u;
704
704
  if (i && t && !this.keysThatRemovedBaseModel.includes(e) && this.keysThatRemovedBaseModel.push(e), !i)
705
705
  return this.keysThatRemovedBaseModel.includes(e) && this.keysThatRemovedBaseModel.length === 1 && await this.setBaseModelEnabled(!0), (u = this.loadedContainerForKey.get(e)) == null || u.dispose(), this.loadedContainerForKey.delete(e), this.loadedMaterialsForKey.delete(e), this.keysThatRemovedBaseModel = this.keysThatRemovedBaseModel.filter(
@@ -709,13 +709,13 @@ class tt {
709
709
  this.renameClonedAsset,
710
710
  !0
711
711
  );
712
- if (this.loadedContainerForKey.has(e) && (this.loadedContainerForKey.get(e).dispose(), this.loadedContainerForKey.delete(e), this.loadedMaterialsForKey.delete(e)), s) {
713
- const m = o && o(), g = s.name ? this.renameClonedAsset(s.name) : void 0;
712
+ if (this.loadedContainerForKey.has(e) && (this.loadedContainerForKey.get(e).dispose(), this.loadedContainerForKey.delete(e), this.loadedMaterialsForKey.delete(e)), n) {
713
+ const m = o && o(), g = n.name ? this.renameClonedAsset(n.name) : void 0;
714
714
  if (ve(
715
715
  c.animationGroups,
716
- s.loop,
717
- s.to,
718
- s.from,
716
+ n.loop,
717
+ n.to,
718
+ n.from,
719
719
  g
720
720
  ), m != null) {
721
721
  const f = a && a() || !0;
@@ -752,19 +752,19 @@ class tt {
752
752
  }), e;
753
753
  }
754
754
  }
755
- function we(n) {
755
+ function we(s) {
756
756
  const e = [];
757
- return n.rootNodes.forEach((t) => {
757
+ return s.rootNodes.forEach((t) => {
758
758
  t.getChildMeshes().forEach((i) => {
759
759
  i.material && !e.includes(i.material) && e.push(i.material), i.subMeshes && i.subMeshes.forEach((r) => {
760
- const s = r.getMaterial(!1);
761
- s && !e.includes(s) && e.push(s);
760
+ const n = r.getMaterial(!1);
761
+ n && !e.includes(n) && e.push(n);
762
762
  });
763
763
  });
764
764
  }), e;
765
765
  }
766
- function pe(n, e = "") {
767
- return n.map((t) => ({
766
+ function pe(s, e = "") {
767
+ return s.map((t) => ({
768
768
  name: t.name.substring(e.length),
769
769
  loop: t.loopAnimation,
770
770
  to: t.to,
@@ -778,7 +778,7 @@ class it {
778
778
  enablePicking: t,
779
779
  modelDetails: i,
780
780
  previewService: r,
781
- progressHandler: s,
781
+ progressHandler: n,
782
782
  scene: o
783
783
  } = e;
784
784
  this.enablePicking = t, this.contextService = i.contextService, this.id = Ue(), this.previewService = r, this.scene = o, this.variantManager = new tt(
@@ -794,7 +794,7 @@ class it {
794
794
  return this.assetContainer = await D(
795
795
  i.model,
796
796
  o,
797
- s
797
+ n
798
798
  ), await this.instantiate(), this;
799
799
  };
800
800
  this.importPromise = a();
@@ -833,7 +833,7 @@ class it {
833
833
  }
834
834
  return;
835
835
  }
836
- const s = async () => {
836
+ const n = async () => {
837
837
  await this.variantManager.applyMaterial(
838
838
  e,
839
839
  i,
@@ -850,18 +850,18 @@ class it {
850
850
  if (this.materialChangesInProgress.includes(e)) {
851
851
  if (this.queuedMaterialChanges.has(e)) {
852
852
  const o = this.queuedMaterialChanges.get(e);
853
- o == null || o.set(t, s);
853
+ o == null || o.set(t, n);
854
854
  } else {
855
855
  this.queuedMaterialChanges.set(
856
856
  e,
857
857
  /* @__PURE__ */ new Map()
858
858
  );
859
859
  const o = this.queuedMaterialChanges.get(e);
860
- o == null || o.set(t, s);
860
+ o == null || o.set(t, n);
861
861
  }
862
862
  return;
863
863
  }
864
- if (this.materialChangesInProgress.push(e), await s(), this.queuedMaterialChanges.has(e)) {
864
+ if (this.materialChangesInProgress.push(e), await n(), this.queuedMaterialChanges.has(e)) {
865
865
  const o = this.queuedMaterialChanges.get(e);
866
866
  if (!o)
867
867
  throw new Error("Target material is undefined");
@@ -933,12 +933,12 @@ class it {
933
933
  const i = async () => {
934
934
  this.lastPlayedAnimation = e, this.isExecutingAnimation = !0, await new Promise((r) => {
935
935
  var o;
936
- const s = [
936
+ const n = [
937
937
  ...((o = this.modelInstance) == null ? void 0 : o.animationGroups) || [],
938
938
  ...this.variantManager.getAnimationGroups()
939
939
  ];
940
940
  ve(
941
- s,
941
+ n,
942
942
  e.loop,
943
943
  e.to,
944
944
  e.from,
@@ -1066,7 +1066,7 @@ class it {
1066
1066
  this.materials.some(e) || this.variantManager.getAllMaterials().some(e) ? this.previewService.getGlowLayerManager().includeMeshes(this.getAllMeshes()) : this.previewService.getGlowLayerManager().removeMeshes(this.getAllMeshes());
1067
1067
  }
1068
1068
  configureModelInstance(e) {
1069
- var s;
1069
+ var n;
1070
1070
  if (!this.transformRoot)
1071
1071
  throw new Error(
1072
1072
  "Transform disposed! This should never happen unless there is a race condition present!"
@@ -1078,7 +1078,7 @@ class it {
1078
1078
  for (const a of o.getChildMeshes(!1))
1079
1079
  a.alwaysSelectAsActiveMesh = !0;
1080
1080
  }
1081
- this.transformRoot.position = t, this.transformRoot.rotationQuaternion = i, this.transformRoot.scaling = r, this.canvasPanels = ((s = this.contextService) == null ? void 0 : s.getAll()) || /* @__PURE__ */ new Map(), He(
1081
+ this.transformRoot.position = t, this.transformRoot.rotationQuaternion = i, this.transformRoot.scaling = r, this.canvasPanels = ((n = this.contextService) == null ? void 0 : n.getAll()) || /* @__PURE__ */ new Map(), He(
1082
1082
  this.materials.concat(this.variantManager.getAllMaterials()),
1083
1083
  this.scene,
1084
1084
  this.canvasPanels,
@@ -1182,13 +1182,13 @@ class it {
1182
1182
  //#endregion
1183
1183
  }
1184
1184
  class k extends fe {
1185
- constructor(e, t, i, r, s, o, a, l) {
1185
+ constructor(e, t, i, r, n, o, a, l) {
1186
1186
  super(
1187
1187
  e,
1188
1188
  t,
1189
1189
  i,
1190
1190
  r,
1191
- s,
1191
+ n,
1192
1192
  o,
1193
1193
  l
1194
1194
  ), this.lastFocus = new p(0, 0, 0), this._isRunningFramingBehavior = !1, this.panDenominator = 1, this.panEnabled = !0, this.minZ = 0.01, this.updateRadiusBounds(this.radius), this.enableFramingBehavior(), this.wheelDeltaPercentage = 0.01, this.pinchDeltaPercentage = 5e-3, this.useNaturalPinchZoom = !0, a.camera.autoOrientation && (this.alpha += Math.PI), a && (a.camera.limits.min.beta && (this.lowerBetaLimit = a.camera.limits.min.beta), a.camera.limits.max.beta && (this.upperBetaLimit = a.camera.limits.max.beta), a.camera.limits.min.alpha && (this.lowerAlphaLimit = a.camera.limits.min.alpha), a.camera.limits.max.alpha && (this.upperAlphaLimit = a.camera.limits.max.alpha), a.camera.limits.min.radius && (this.lowerRadiusLimit = a.camera.limits.min.radius), a.camera.limits.max.radius && (this.upperRadiusLimit = a.camera.limits.max.radius), a.camera.autoRotation.enabled && this.enableAutoRotationBehavior(
@@ -1246,10 +1246,10 @@ class k extends fe {
1246
1246
  i.framingTime = t || 800;
1247
1247
  const r = () => {
1248
1248
  this.isRunningFramingBehavior = !1;
1249
- }, s = T(this._scene), o = s.max.subtract(s.min), a = s.min.add(o.scale(0.5));
1249
+ }, n = T(this._scene), o = n.max.subtract(n.min), a = n.min.add(o.scale(0.5));
1250
1250
  this.updateRadiusBounds(o.length() * 1.5), this.wheelPrecision = 100 / this.radius, this.panningInertia = 0, this.panningOriginTarget.copyFrom(a), this.panDenominator = o.length(), this.lastFocus.copyFrom(a), i.zoomOnBoundingInfo(
1251
- s.min,
1252
- s.max,
1251
+ n.min,
1252
+ n.max,
1253
1253
  void 0,
1254
1254
  r
1255
1255
  ), i.framingTime = 0;
@@ -1283,30 +1283,30 @@ class k extends fe {
1283
1283
  */
1284
1284
  static create(e, t, i) {
1285
1285
  var l;
1286
- const r = T(e), s = r.max.subtract(r.min), o = r.min.add(s.scale(0.5)), a = new k(
1286
+ const r = T(e), n = r.max.subtract(r.min), o = r.min.add(n.scale(0.5)), a = new k(
1287
1287
  "ProductCamera",
1288
1288
  -(Math.PI / 2),
1289
1289
  Math.PI / 2,
1290
- s.length() * 1.5,
1290
+ n.length() * 1.5,
1291
1291
  o,
1292
1292
  e,
1293
1293
  t
1294
1294
  );
1295
1295
  return a.setPanEnabled(
1296
1296
  ((l = t.options) == null ? void 0 : l.noPan) !== void 0 ? !t.options.noPan : !0
1297
- ), a.panningInertia = 0, a.panningOriginTarget.copyFrom(o), a.panDenominator = s.length(), a.onAfterCheckInputsObservable.addOnce(() => {
1297
+ ), a.panningInertia = 0, a.panningOriginTarget.copyFrom(o), a.panDenominator = n.length(), a.onAfterCheckInputsObservable.addOnce(() => {
1298
1298
  a.setPanEnabled(a.panEnabled);
1299
1299
  }), i && (e.activeCamera = a), a;
1300
1300
  }
1301
1301
  }
1302
- function T(n) {
1303
- if (n.meshes.length === 0)
1302
+ function T(s) {
1303
+ if (s.meshes.length === 0)
1304
1304
  return {
1305
1305
  min: new p(-1, -1, -1),
1306
1306
  max: new p(1, 1, 1)
1307
1307
  };
1308
- const e = n.meshes.filter((t) => t.name.toLowerCase().endsWith("_t") || t.name.toLowerCase().includes("_t_"));
1309
- return n.getWorldExtends((t) => t.isVisible && t.isEnabled() && (e.length === 0 || e.includes(t)));
1308
+ const e = s.meshes.filter((t) => t.name.toLowerCase().endsWith("_t") || t.name.toLowerCase().includes("_t_"));
1309
+ return s.getWorldExtends((t) => t.isVisible && t.isEnabled() && (e.length === 0 || e.includes(t)));
1310
1310
  }
1311
1311
  class nt {
1312
1312
  constructor(e, t = !1, i = void 0) {
@@ -1326,9 +1326,9 @@ class nt {
1326
1326
  return this.currentConfiguration;
1327
1327
  }
1328
1328
  setConfiguration(e) {
1329
- var t, i, r, s, o, a, l, c, h, u, m, g, f, z, V, q, N, G, _, H, K, U, W, Y, Q, Z, $, j, X, J, ee, te, ie;
1329
+ var t, i, r, n, o, a, l, c, h, u, m, g, f, z, V, q, N, G, _, H, K, U, W, Y, Q, Z, $, j, X, J, ee, te, ie;
1330
1330
  if (this.renderingPipeline.isSupported) {
1331
- if (this.renderingPipeline.samples = ((t = e.antiAliasing) == null ? void 0 : t.samples) ?? d.antiAliasing.samples, this.renderingPipeline.fxaaEnabled = ((i = e.antiAliasing) == null ? void 0 : i.fxaaEnabled) ?? d.antiAliasing.fxaaEnabled, this.renderingPipeline.bloomEnabled = ((r = e.bloom) == null ? void 0 : r.enabled) ?? d.bloom.enabled, this.renderingPipeline.bloomKernel = ((s = e.bloom) == null ? void 0 : s.kernel) ?? d.bloom.kernel, this.renderingPipeline.bloomScale = ((o = e.bloom) == null ? void 0 : o.scale) ?? d.bloom.scale, this.renderingPipeline.bloomThreshold = ((a = e.bloom) == null ? void 0 : a.threshold) ?? d.bloom.threshold, this.renderingPipeline.bloomWeight = ((l = e.bloom) == null ? void 0 : l.weight) ?? d.bloom.weight, this.renderingPipeline.chromaticAberrationEnabled = ((c = e.chromaticAberration) == null ? void 0 : c.enabled) ?? d.chromaticAberration.enabled, this.renderingPipeline.chromaticAberration.aberrationAmount = ((h = e.chromaticAberration) == null ? void 0 : h.aberrationAmount) ?? d.chromaticAberration.aberrationAmount, this.renderingPipeline.chromaticAberration.radialIntensity = ((u = e.chromaticAberration) == null ? void 0 : u.radialIntensity) ?? d.chromaticAberration.radialIntensity, this.renderingPipeline.chromaticAberration.direction = (m = e.chromaticAberration) != null && m.direction ? new se(
1331
+ if (this.renderingPipeline.samples = ((t = e.antiAliasing) == null ? void 0 : t.samples) ?? d.antiAliasing.samples, this.renderingPipeline.fxaaEnabled = ((i = e.antiAliasing) == null ? void 0 : i.fxaaEnabled) ?? d.antiAliasing.fxaaEnabled, this.renderingPipeline.bloomEnabled = ((r = e.bloom) == null ? void 0 : r.enabled) ?? d.bloom.enabled, this.renderingPipeline.bloomKernel = ((n = e.bloom) == null ? void 0 : n.kernel) ?? d.bloom.kernel, this.renderingPipeline.bloomScale = ((o = e.bloom) == null ? void 0 : o.scale) ?? d.bloom.scale, this.renderingPipeline.bloomThreshold = ((a = e.bloom) == null ? void 0 : a.threshold) ?? d.bloom.threshold, this.renderingPipeline.bloomWeight = ((l = e.bloom) == null ? void 0 : l.weight) ?? d.bloom.weight, this.renderingPipeline.chromaticAberrationEnabled = ((c = e.chromaticAberration) == null ? void 0 : c.enabled) ?? d.chromaticAberration.enabled, this.renderingPipeline.chromaticAberration.aberrationAmount = ((h = e.chromaticAberration) == null ? void 0 : h.aberrationAmount) ?? d.chromaticAberration.aberrationAmount, this.renderingPipeline.chromaticAberration.radialIntensity = ((u = e.chromaticAberration) == null ? void 0 : u.radialIntensity) ?? d.chromaticAberration.radialIntensity, this.renderingPipeline.chromaticAberration.direction = (m = e.chromaticAberration) != null && m.direction ? new se(
1332
1332
  e.chromaticAberration.direction.x,
1333
1333
  e.chromaticAberration.direction.y
1334
1334
  ) : new se(
@@ -1382,20 +1382,20 @@ class nt {
1382
1382
  return t.globalDensity = e.globalDensity ?? t.globalDensity, t.globalExposure = e.globalExposure ?? t.globalExposure, t.globalHue = e.globalHue ?? t.globalHue, t.globalSaturation = e.globalSaturation ?? t.globalSaturation, t.highlightsDensity = e.highlightsDensity ?? t.highlightsDensity, t.highlightsExposure = e.highlightsExposure ?? t.highlightsExposure, t.highlightsHue = e.highlightsHue ?? t.highlightsHue, t.highlightsSaturation = e.highlightsSaturation ?? t.highlightsSaturation, t.midtonesDensity = e.midtonesDensity ?? t.midtonesDensity, t.midtonesExposure = e.midtonesExposure ?? t.midtonesExposure, t.midtonesHue = e.midtonesHue ?? t.midtonesHue, t.midtonesSaturation = e.midtonesSaturation ?? t.midtonesSaturation, t.shadowsDensity = e.shadowsDensity ?? t.shadowsDensity, t.shadowsExposure = e.shadowsExposure ?? t.shadowsExposure, t.shadowsHue = e.shadowsHue ?? t.shadowsHue, t.shadowsSaturation = e.shadowsSaturation ?? t.shadowsSaturation, t;
1383
1383
  }
1384
1384
  }
1385
- xe.GLTFLoader.RegisterExtension("glbPostProcessor", function(n) {
1386
- return new Ge(n);
1385
+ xe.GLTFLoader.RegisterExtension("glbPostProcessor", function(s) {
1386
+ return new Ge(s);
1387
1387
  });
1388
- S.OnPluginActivatedObservable.add((n) => {
1389
- if (n.name === "gltf") {
1390
- const e = n;
1388
+ S.OnPluginActivatedObservable.add((s) => {
1389
+ if (s.name === "gltf") {
1390
+ const e = s;
1391
1391
  e.transparencyAsCoverage = !0;
1392
1392
  }
1393
1393
  });
1394
- function O(n) {
1395
- return new p(n.x, n.y, n.z);
1394
+ function O(s) {
1395
+ return new p(s.x, s.y, s.z);
1396
1396
  }
1397
- function L(n) {
1398
- return { x: n.x, y: n.y, z: n.z };
1397
+ function L(s) {
1398
+ return { x: s.x, y: s.y, z: s.z };
1399
1399
  }
1400
1400
  class Wt {
1401
1401
  constructor(e) {
@@ -1420,7 +1420,7 @@ class Wt {
1420
1420
  fallbackUrl: `https://www.gstatic.com/draco/versioned/decoders/${r}/draco_decoder_gltf.js`
1421
1421
  }
1422
1422
  }, i && (i.getContext("webgl2") || i.getContext("webgl"));
1423
- const s = console.log;
1423
+ const n = console.log;
1424
1424
  console.log = () => {
1425
1425
  };
1426
1426
  const o = i ? new be(i, !0, {
@@ -1432,7 +1432,7 @@ class Wt {
1432
1432
  stencil: this.configuration.highlights.enabled,
1433
1433
  forceSRGBBufferSupportState: !0
1434
1434
  }) : new Ce();
1435
- console.log = s, o.hideLoadingUI(), window.addEventListener("resize", this.fireResizeEvent.bind(this)), this.engine = o, this.scene = new Pe(o), this.camera = k.create(this.scene, this.configuration), this.scene.activeCamera = this.camera, this.renderingPipeline = new nt(
1435
+ console.log = n, o.hideLoadingUI(), window.addEventListener("resize", this.fireResizeEvent.bind(this)), this.engine = o, this.scene = new Pe(o), this.camera = k.create(this.scene, this.configuration), this.scene.activeCamera = this.camera, this.renderingPipeline = new nt(
1436
1436
  this.scene,
1437
1437
  !1,
1438
1438
  this.camera
@@ -1543,9 +1543,9 @@ class Wt {
1543
1543
  this.isAnimatingCamera = !0, await new Promise((i) => {
1544
1544
  this.focusLostNotified = !1;
1545
1545
  const r = () => {
1546
- const s = this.configuration;
1546
+ const n = this.configuration;
1547
1547
  this.camera.rerunFramingBehavior(() => {
1548
- s.camera.limits.min.radius && (this.camera.lowerRadiusLimit = s.camera.limits.min.radius), s.camera.limits.max.radius && (this.camera.upperRadiusLimit = s.camera.limits.max.radius), i();
1548
+ n.camera.limits.min.radius && (this.camera.lowerRadiusLimit = n.camera.limits.min.radius), n.camera.limits.max.radius && (this.camera.upperRadiusLimit = n.camera.limits.max.radius), i();
1549
1549
  });
1550
1550
  };
1551
1551
  this.scene.onAfterRenderObservable.addOnce(r);
@@ -1575,8 +1575,8 @@ class Wt {
1575
1575
  this.scene
1576
1576
  );
1577
1577
  try {
1578
- const r = t.latDeg * Math.PI / 180, s = t.lonDeg * Math.PI / 180;
1579
- i.target = t.target ? new p(t.target.x, t.target.y, t.target.z) : p.Zero(), i.alpha = s, i.beta = r, i.radius = t.radius || this.camera.radius, i.minZ = 0.01, this.scene.render();
1578
+ const r = t.latDeg * Math.PI / 180, n = t.lonDeg * Math.PI / 180;
1579
+ i.target = t.target ? new p(t.target.x, t.target.y, t.target.z) : p.Zero(), i.alpha = n, i.beta = r, i.radius = t.radius || this.camera.radius, i.minZ = 0.01, this.scene.render();
1580
1580
  const o = await Ae.CreateScreenshotUsingRenderTargetAsync(
1581
1581
  this.engine,
1582
1582
  i,
@@ -1594,10 +1594,10 @@ class Wt {
1594
1594
  const e = this.configuration;
1595
1595
  if (!e)
1596
1596
  return !0;
1597
- const t = e.camera.limits.min.alpha, i = e.camera.limits.max.alpha, r = e.camera.limits.min.beta, s = e.camera.limits.max.beta;
1598
- if (t === void 0 || i === void 0 || r === void 0 || s === void 0)
1597
+ const t = e.camera.limits.min.alpha, i = e.camera.limits.max.alpha, r = e.camera.limits.min.beta, n = e.camera.limits.max.beta;
1598
+ if (t === void 0 || i === void 0 || r === void 0 || n === void 0)
1599
1599
  return !0;
1600
- const o = [t, i], a = [r, s], l = o.every((h) => h === t), c = a.every((h) => h === r);
1600
+ const o = [t, i], a = [r, n], l = o.every((h) => h === t), c = a.every((h) => h === r);
1601
1601
  return !l && !c;
1602
1602
  }
1603
1603
  fireResizeEvent() {
@@ -1611,9 +1611,9 @@ class Wt {
1611
1611
  blurHorizontalSize: 0.85
1612
1612
  }), this.highlightLayer.innerGlow = !0, this.highlightLayer.outerGlow = !1), this.highlightLayer.removeAllMeshes();
1613
1613
  const i = t ? new w(t[0], t[1], t[2]).toLinearSpace() : void 0;
1614
- e.forEach((s) => {
1614
+ e.forEach((n) => {
1615
1615
  const o = this.scene.materials.find(
1616
- (a) => a.name === s.name && a.id === s.id
1616
+ (a) => a.name === n.name && a.id === n.id
1617
1617
  );
1618
1618
  o && o.getBindedMeshes().forEach(
1619
1619
  (a) => {
@@ -1630,27 +1630,27 @@ class Wt {
1630
1630
  this.renderingPipeline && this.renderingPipeline.setConfiguration(e);
1631
1631
  }
1632
1632
  loadModel(e, t) {
1633
- const i = new it({
1633
+ const { refocusCamera: i = !0, progressHandler: r } = t ?? {}, n = new it({
1634
1634
  enablePicking: this.configuration.highlights.enabled,
1635
1635
  modelDetails: e,
1636
1636
  scene: this.scene,
1637
1637
  previewService: this,
1638
- progressHandler: t
1638
+ progressHandler: r
1639
1639
  });
1640
- return i.getInitializationPromise().then(() => {
1641
- this.modelContainers.size <= 1 && this.camera.rerunFramingBehavior(() => {
1640
+ return n.getInitializationPromise().then(() => {
1641
+ this.modelContainers.size <= 1 && i && this.camera.rerunFramingBehavior(() => {
1642
1642
  this.scene.onAfterRenderObservable.addOnce(() => {
1643
1643
  this.queuedCameraAnimation && (this.executeCameraAnimation(this.queuedCameraAnimation), this.queuedCameraAnimation = void 0);
1644
1644
  });
1645
1645
  }, 1);
1646
- }), this.configuration.highlights.enabled && (i.registerMaterialSelectedCallback((r) => {
1647
- this.setHighlights([r]);
1648
- }), i.registerMaterialDeselectedCallback(() => {
1646
+ }), this.configuration.highlights.enabled && (n.registerMaterialSelectedCallback((o) => {
1647
+ this.setHighlights([o]);
1648
+ }), n.registerMaterialDeselectedCallback(() => {
1649
1649
  this.setHighlights([]);
1650
- })), this.modelContainers.set(i.getId(), i), this.triggerModelLoadEvent({
1650
+ })), this.modelContainers.set(n.getId(), n), this.triggerModelLoadEvent({
1651
1651
  eventType: "load",
1652
- modelContainer: i
1653
- }), i;
1652
+ modelContainer: n
1653
+ }), n;
1654
1654
  }
1655
1655
  async preloadModel(e) {
1656
1656
  await D(e, this.scene);
@@ -1694,7 +1694,7 @@ class Wt {
1694
1694
  O(t || { x: 0, y: 0, z: 0 })
1695
1695
  ),
1696
1696
  O(e || { x: 0, y: 0, z: 0 })
1697
- ), s = re.RotationAxis(p.Up(), Math.PI), o = r.multiply(s), a = p.Zero(), l = y.Identity(), c = p.Zero();
1697
+ ), n = re.RotationAxis(p.Up(), Math.PI), o = r.multiply(n), a = p.Zero(), l = y.Identity(), c = p.Zero();
1698
1698
  return o.decompose(c, l, a), l.multiplyInPlace(y.FromEulerAngles(0, Math.PI, 0)), {
1699
1699
  position: L(a),
1700
1700
  rotation: L(l.toEulerAngles()),
@@ -1702,7 +1702,7 @@ class Wt {
1702
1702
  };
1703
1703
  }
1704
1704
  updatePreviewOptions(e) {
1705
- var r, s;
1705
+ var r, n;
1706
1706
  const t = new ce(e);
1707
1707
  this.configuration.highlights.enabled !== t.highlights.enabled && this.engine.setStencilBuffer(t.highlights.enabled), this.scene.clearColor = t.scene.clearColor;
1708
1708
  let i = this.scene.environmentTexture;
@@ -1712,7 +1712,7 @@ class Wt {
1712
1712
  ), i.rotationY = this.configuration.scene.environment.rotationY, this.scene.environmentTexture = i), i.rotationY = t.scene.environment.rotationY, this.scene.environmentIntensity = t.scene.environment.intensity, (r = t.options) != null && r.renderingPipelineConfiguration ? this.renderingPipeline.setConfiguration(
1713
1713
  t.options.renderingPipelineConfiguration
1714
1714
  ) : (this.scene.imageProcessingConfiguration.exposure = t.lighting.exposure, this.scene.imageProcessingConfiguration.contrast = t.lighting.contrast), this.glowLayerManager.setIntensity(t.emissiveGlowIntensity), this.camera.updateConfiguration(t), this.camera.setPanEnabled(
1715
- ((s = t.options) == null ? void 0 : s.noPan) !== void 0 ? !t.options.noPan : !0
1715
+ ((n = t.options) == null ? void 0 : n.noPan) !== void 0 ? !t.options.noPan : !0
1716
1716
  ), this.scene.autoClear = !0, this.scene.autoClearDepthAndStencil = !0, this.configuration = t;
1717
1717
  }
1718
1718
  /**