@spiffcommerce/preview 5.3.5 → 5.3.6
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.
- package/dist/index.d.mts +1 -0
- package/dist/index.esm.js +270 -264
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8,15 +8,15 @@ import { Color4 as f, Color3 as w } from "@babylonjs/core/Maths/math.color";
|
|
|
8
8
|
import { Vector3 as m, Quaternion as y, Vector2 as ie, Matrix as se } from "@babylonjs/core/Maths/math.vector";
|
|
9
9
|
import { DracoCompression as Me } from "@babylonjs/core/Meshes/Compression/dracoCompression";
|
|
10
10
|
import { Observable as C } from "@babylonjs/core/Misc/observable";
|
|
11
|
-
import { Tools as
|
|
12
|
-
import { Scene as
|
|
13
|
-
import { GLTF2 as
|
|
11
|
+
import { Tools as Pe } from "@babylonjs/core/Misc/tools";
|
|
12
|
+
import { Scene as xe } from "@babylonjs/core/scene";
|
|
13
|
+
import { GLTF2 as Ae } from "@babylonjs/loaders/glTF";
|
|
14
14
|
import { PBRMaterial as F } from "@babylonjs/core/Materials/PBR/pbrMaterial";
|
|
15
|
-
import { MirrorTexture as
|
|
16
|
-
import { Color3 as
|
|
15
|
+
import { MirrorTexture as Te } from "@babylonjs/core/Materials/Textures/mirrorTexture";
|
|
16
|
+
import { Color3 as Re, Vector3 as ne, Plane as Ee } from "@babylonjs/core/Maths/math";
|
|
17
17
|
import { ReflectionProbe as Oe } from "@babylonjs/core/Probes/reflectionProbe";
|
|
18
18
|
import { GlowLayer as Le } from "@babylonjs/core/Layers/glowLayer";
|
|
19
|
-
import { ActionManager as
|
|
19
|
+
import { ActionManager as T } from "@babylonjs/core/Actions/actionManager";
|
|
20
20
|
import { ExecuteCodeAction as re } from "@babylonjs/core/Actions/directActions";
|
|
21
21
|
import { Mesh as Ie } from "@babylonjs/core/Meshes/mesh";
|
|
22
22
|
import { TransformNode as Se } from "@babylonjs/core/Meshes/transformNode";
|
|
@@ -26,9 +26,9 @@ import { Animation as v } from "@babylonjs/core/Animations/animation";
|
|
|
26
26
|
import { QuadraticEase as De, EasingFunction as ke } from "@babylonjs/core/Animations/easing";
|
|
27
27
|
import { AssetsManager as ze } from "@babylonjs/core/Misc/assetsManager";
|
|
28
28
|
import { ColorCurves as ae } from "@babylonjs/core/Materials/colorCurves";
|
|
29
|
-
import { ImageProcessingConfiguration as
|
|
29
|
+
import { ImageProcessingConfiguration as x } from "@babylonjs/core/Materials/imageProcessingConfiguration";
|
|
30
30
|
import { DefaultRenderingPipeline as Ve } from "@babylonjs/core/PostProcesses/RenderPipeline";
|
|
31
|
-
import { DepthOfFieldEffectBlurLevel as
|
|
31
|
+
import { DepthOfFieldEffectBlurLevel as R } from "@babylonjs/core/PostProcesses/depthOfFieldEffect";
|
|
32
32
|
import "@babylonjs/core/Rendering/depthRendererSceneComponent";
|
|
33
33
|
import "@babylonjs/core/Engines/Extensions/engine.views";
|
|
34
34
|
import "@babylonjs/core/Meshes/instancedMesh";
|
|
@@ -43,28 +43,28 @@ var I = /* @__PURE__ */ ((s) => (s[s.Orbit = 0] = "Orbit", s[s.Pan = 1] = "Pan",
|
|
|
43
43
|
class oe {
|
|
44
44
|
constructor(e) {
|
|
45
45
|
this.getSceneClearColor = () => {
|
|
46
|
-
var i,
|
|
47
|
-
const t = (i = this.customOptions) != null && i.transparentBackground || (
|
|
48
|
-
if (this.customOptions && ((o = this.customOptions) != null && o.transparentBackground) || (
|
|
46
|
+
var i, r, o, a;
|
|
47
|
+
const t = (i = this.customOptions) != null && i.transparentBackground || (r = this.customOptions) != null && r.backgroundImage ? 0 : 1;
|
|
48
|
+
if (this.customOptions && ((o = this.customOptions) != null && o.transparentBackground) || (a = this.customOptions) != null && a.backgroundImage)
|
|
49
49
|
return new f(0, 0, 0, t).toLinearSpace();
|
|
50
50
|
if (this.customOptions && this.customOptions.backgroundColor) {
|
|
51
|
-
const
|
|
51
|
+
const n = w.FromHexString(
|
|
52
52
|
this.customOptions.backgroundColor
|
|
53
53
|
);
|
|
54
54
|
return new f(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
n.r,
|
|
56
|
+
n.g,
|
|
57
|
+
n.b,
|
|
58
58
|
t
|
|
59
59
|
).toLinearSpace();
|
|
60
60
|
}
|
|
61
61
|
return new f(0.98, 0.98, 0.98, t).toLinearSpace();
|
|
62
62
|
}, this.highlightColorFromConfig = () => this.customOptions && this.customOptions.highlightColor ? this.hexToColor4(this.customOptions.highlightColor) : new f(0.98, 0.98, 0.98, 1).toLinearSpace(), this.hexToColor4 = (t, i = 1) => {
|
|
63
|
-
const
|
|
63
|
+
const r = w.FromHexString(t);
|
|
64
64
|
return new f(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
r.r,
|
|
66
|
+
r.g,
|
|
67
|
+
r.b,
|
|
68
68
|
i
|
|
69
69
|
).toLinearSpace();
|
|
70
70
|
}, this.customOptions = e;
|
|
@@ -80,13 +80,13 @@ class oe {
|
|
|
80
80
|
* Configuration related to the scene
|
|
81
81
|
*/
|
|
82
82
|
get scene() {
|
|
83
|
-
var e, t, i,
|
|
83
|
+
var e, t, i, r, o;
|
|
84
84
|
return {
|
|
85
85
|
clearColor: this.getSceneClearColor(),
|
|
86
86
|
transparentBackground: ((e = this.customOptions) == null ? void 0 : e.transparentBackground) || ((t = this.customOptions) == null ? void 0 : t.backgroundImage),
|
|
87
87
|
environment: {
|
|
88
88
|
file: ((i = this.customOptions) == null ? void 0 : i.environmentFile) ?? "assets/model-viewer/default.env",
|
|
89
|
-
intensity: ((
|
|
89
|
+
intensity: ((r = this.customOptions) == null ? void 0 : r.environmentIntensity) ?? 1,
|
|
90
90
|
rotationY: (((o = this.customOptions) == null ? void 0 : o.environmentRotationY) ?? 0) * (Math.PI / 180)
|
|
91
91
|
// Convert to radians
|
|
92
92
|
}
|
|
@@ -96,7 +96,7 @@ class oe {
|
|
|
96
96
|
* Configuration related to the camera used to view and interact with the scene.
|
|
97
97
|
*/
|
|
98
98
|
get camera() {
|
|
99
|
-
var e, t, i,
|
|
99
|
+
var e, t, i, r, o, a, n, l, c, d, u, g, p;
|
|
100
100
|
return {
|
|
101
101
|
autoOrientation: ((e = this.customOptions) == null ? void 0 : e.disableAutomaticOrientation) ?? !0,
|
|
102
102
|
autoRotation: {
|
|
@@ -105,8 +105,8 @@ class oe {
|
|
|
105
105
|
},
|
|
106
106
|
limits: {
|
|
107
107
|
min: {
|
|
108
|
-
alpha: (
|
|
109
|
-
beta: (
|
|
108
|
+
alpha: (r = this.customOptions) != null && r.lowerAlphaLimitDeg ? ((o = this.customOptions) == null ? void 0 : o.lowerAlphaLimitDeg) * Math.PI / 180 : void 0,
|
|
109
|
+
beta: (a = this.customOptions) != null && a.lowerBetaLimitDeg ? ((n = this.customOptions) == null ? void 0 : n.lowerBetaLimitDeg) * Math.PI / 180 : void 0,
|
|
110
110
|
radius: (l = this.customOptions) == null ? void 0 : l.minZoomOverride
|
|
111
111
|
},
|
|
112
112
|
max: {
|
|
@@ -129,10 +129,10 @@ class oe {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
get lighting() {
|
|
132
|
-
var e, t, i,
|
|
132
|
+
var e, t, i, r;
|
|
133
133
|
return {
|
|
134
134
|
exposure: ((t = (e = this.customOptions) == null ? void 0 : e.lighting) == null ? void 0 : t.exposure) ?? 0.9,
|
|
135
|
-
contrast: ((
|
|
135
|
+
contrast: ((r = (i = this.customOptions) == null ? void 0 : i.lighting) == null ? void 0 : r.contrast) ?? 1.6
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
get emissiveGlowIntensity() {
|
|
@@ -140,12 +140,12 @@ class oe {
|
|
|
140
140
|
return ((e = this.customOptions) == null ? void 0 : e.emissiveGlowIntensity) ?? 0.5;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
class
|
|
143
|
+
class P {
|
|
144
144
|
/**
|
|
145
145
|
* Returns the resolution expected for generated textures.
|
|
146
146
|
*/
|
|
147
147
|
static getDynamicTextureResolution() {
|
|
148
|
-
return this.getIsMobile() || !
|
|
148
|
+
return this.getIsMobile() || !P.offscreenRenderingSupported() ? {
|
|
149
149
|
width: 1024,
|
|
150
150
|
height: 1024
|
|
151
151
|
} : {
|
|
@@ -253,11 +253,11 @@ class Ne {
|
|
|
253
253
|
return this.loader.loadNodeAsync(
|
|
254
254
|
e,
|
|
255
255
|
t,
|
|
256
|
-
function(
|
|
256
|
+
function(r) {
|
|
257
257
|
t.extras && Object.keys(t.extras).forEach((o) => {
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
}), i(
|
|
258
|
+
const a = t.extras[o];
|
|
259
|
+
r.metadata[o] = a;
|
|
260
|
+
}), i(r);
|
|
261
261
|
}
|
|
262
262
|
);
|
|
263
263
|
}
|
|
@@ -289,7 +289,7 @@ class Ne {
|
|
|
289
289
|
}
|
|
290
290
|
if (e.extras.translucency) {
|
|
291
291
|
const i = t;
|
|
292
|
-
i.subSurface.isTranslucencyEnabled = !0, i.subSurface.translucencyIntensity = e.extras.translucency, e.extras.translucencyR && e.extras.translucencyG && e.extras.translucencyB && (i.subSurface.tintColor = new
|
|
292
|
+
i.subSurface.isTranslucencyEnabled = !0, i.subSurface.translucencyIntensity = e.extras.translucency, e.extras.translucencyR && e.extras.translucencyG && e.extras.translucencyB && (i.subSurface.tintColor = new Re(
|
|
293
293
|
e.extras.translucencyR,
|
|
294
294
|
e.extras.translucencyG,
|
|
295
295
|
e.extras.translucencyB
|
|
@@ -316,20 +316,20 @@ class Ne {
|
|
|
316
316
|
*/
|
|
317
317
|
applyReflections(e) {
|
|
318
318
|
function t(o) {
|
|
319
|
-
const
|
|
320
|
-
return o.transformNodes.forEach((
|
|
321
|
-
|
|
322
|
-
}), o.meshes.forEach((
|
|
323
|
-
|
|
324
|
-
}),
|
|
319
|
+
const a = [];
|
|
320
|
+
return o.transformNodes.forEach((n) => {
|
|
321
|
+
n.metadata && n.metadata.reflective && a.push(...n.getChildMeshes());
|
|
322
|
+
}), o.meshes.forEach((n) => {
|
|
323
|
+
n.metadata && n.metadata.reflective && !a.includes(n) && a.push(n);
|
|
324
|
+
}), a;
|
|
325
325
|
}
|
|
326
|
-
function i(o,
|
|
327
|
-
const
|
|
328
|
-
if (!
|
|
326
|
+
function i(o, a = 1) {
|
|
327
|
+
const n = o.material;
|
|
328
|
+
if (!n)
|
|
329
329
|
return;
|
|
330
|
-
const l = new
|
|
330
|
+
const l = new Te(
|
|
331
331
|
"mirror",
|
|
332
|
-
|
|
332
|
+
P.getMirrorTextureResolution(),
|
|
333
333
|
e,
|
|
334
334
|
!0
|
|
335
335
|
);
|
|
@@ -347,19 +347,19 @@ class Ne {
|
|
|
347
347
|
o.position,
|
|
348
348
|
u.scale(-1)
|
|
349
349
|
);
|
|
350
|
-
l.mirrorPlane = g, l.level =
|
|
350
|
+
l.mirrorPlane = g, l.level = a, n.reflectionTexture = l;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
const
|
|
354
|
-
"probe-" +
|
|
352
|
+
function r(o) {
|
|
353
|
+
const a = o.material, n = new Oe(
|
|
354
|
+
"probe-" + a.name,
|
|
355
355
|
Ge,
|
|
356
356
|
e
|
|
357
357
|
);
|
|
358
|
-
|
|
358
|
+
n.attachToMesh(o), n.renderList && n.renderList.push(...t(e)), a.reflectionTexture = n.cubeTexture;
|
|
359
359
|
}
|
|
360
360
|
e.meshes.forEach((o) => {
|
|
361
|
-
const
|
|
362
|
-
|
|
361
|
+
const a = o.metadata;
|
|
362
|
+
a && (a.mirrorTexture && i(o, a.mirrorTexture), a.reflectionProbe && r(o));
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
}
|
|
@@ -391,30 +391,30 @@ async function be(s, e, t) {
|
|
|
391
391
|
if (i && i.scene.uid === e.uid)
|
|
392
392
|
return i;
|
|
393
393
|
{
|
|
394
|
-
const
|
|
394
|
+
const r = await fe.LoadAssetContainerAsync(
|
|
395
395
|
s,
|
|
396
396
|
void 0,
|
|
397
397
|
e,
|
|
398
398
|
t
|
|
399
399
|
);
|
|
400
|
-
return le.set(s,
|
|
400
|
+
return le.set(s, r), r;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function qe(s, e, t, i,
|
|
403
|
+
function qe(s, e, t, i, r = "") {
|
|
404
404
|
t.forEach((o) => {
|
|
405
|
-
const
|
|
406
|
-
s.filter((d) => d.name ===
|
|
407
|
-
const u = i.get(
|
|
405
|
+
const a = o.getID(), n = o.getName(), l = P.getDynamicTextureResolution();
|
|
406
|
+
s.filter((d) => d.name === r + n).forEach((d) => {
|
|
407
|
+
const u = i.get(a), g = !1;
|
|
408
408
|
if (u)
|
|
409
409
|
he(d, u), u.update(g);
|
|
410
410
|
else {
|
|
411
411
|
const p = _e(
|
|
412
|
-
|
|
412
|
+
n,
|
|
413
413
|
e,
|
|
414
414
|
l.width,
|
|
415
415
|
l.height
|
|
416
416
|
);
|
|
417
|
-
i.set(
|
|
417
|
+
i.set(a, p), o.setStaticContext(
|
|
418
418
|
p.getContext()
|
|
419
419
|
), he(d, p), p.onLoadObservable.addOnce(() => {
|
|
420
420
|
p.update(g);
|
|
@@ -424,15 +424,15 @@ function qe(s, e, t, i, a = "") {
|
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
function _e(s, e, t, i) {
|
|
427
|
-
const
|
|
427
|
+
const r = new Fe(
|
|
428
428
|
s,
|
|
429
429
|
{ width: t, height: i },
|
|
430
430
|
e,
|
|
431
|
-
|
|
431
|
+
P.shouldMipMap(),
|
|
432
432
|
Be.TRILINEAR_SAMPLINGMODE,
|
|
433
433
|
pe.TEXTUREFORMAT_RGBA
|
|
434
|
-
), o =
|
|
435
|
-
return o && (o.fillStyle = "#f5f5f5", o.fillRect(0, 0, t, i),
|
|
434
|
+
), o = r.getContext();
|
|
435
|
+
return o && (o.fillStyle = "#f5f5f5", o.fillRect(0, 0, t, i), r.update()), r;
|
|
436
436
|
}
|
|
437
437
|
function he(s, e) {
|
|
438
438
|
if (s instanceof F) {
|
|
@@ -451,24 +451,24 @@ const M = 60, ce = 1;
|
|
|
451
451
|
function de(s) {
|
|
452
452
|
return s.targetedAnimations.map((t) => t.animation.framePerSecond).reduce((t, i) => t + i, 0) / s.targetedAnimations.length || 0;
|
|
453
453
|
}
|
|
454
|
-
function We(s, e, t, i,
|
|
455
|
-
const o =
|
|
454
|
+
function We(s, e, t, i, r) {
|
|
455
|
+
const o = r ? s.filter((a) => a.name === r) : s;
|
|
456
456
|
if (o.length === 0) {
|
|
457
|
-
console.warn(`No animations found for name: ${
|
|
457
|
+
console.warn(`No animations found for name: ${r}`);
|
|
458
458
|
return;
|
|
459
459
|
}
|
|
460
460
|
if (i !== void 0 && t !== void 0 && i === t) {
|
|
461
|
-
o.forEach((
|
|
462
|
-
|
|
463
|
-
const
|
|
464
|
-
|
|
461
|
+
o.forEach((a) => {
|
|
462
|
+
a.stop();
|
|
463
|
+
const n = de(a), l = i * n;
|
|
464
|
+
a.start(e, ce, l, l);
|
|
465
465
|
});
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
|
-
o.forEach((
|
|
469
|
-
|
|
470
|
-
const
|
|
471
|
-
|
|
468
|
+
o.forEach((a) => {
|
|
469
|
+
a.stop();
|
|
470
|
+
const n = de(a), l = i !== void 0 ? i * n : void 0, c = t !== void 0 ? t * n : void 0;
|
|
471
|
+
a.start(e, ce, l, c);
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
474
|
function ve(s) {
|
|
@@ -481,82 +481,84 @@ function Ue(s) {
|
|
|
481
481
|
ve(e);
|
|
482
482
|
}
|
|
483
483
|
function Ye(s, e, t) {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
n
|
|
507
|
-
)
|
|
508
|
-
), i.push(
|
|
509
|
-
T(
|
|
510
|
-
"cameraBetaLerp",
|
|
511
|
-
"beta",
|
|
512
|
-
e.beta,
|
|
513
|
-
ue(t.latDeg),
|
|
514
|
-
v.ANIMATIONTYPE_FLOAT,
|
|
515
|
-
n
|
|
516
|
-
)
|
|
517
|
-
), t.radius !== void 0) {
|
|
518
|
-
const c = Math.max(0.01, t.radius);
|
|
519
|
-
i.push(
|
|
520
|
-
T(
|
|
521
|
-
"cameraRadiusLerp",
|
|
522
|
-
"radius",
|
|
523
|
-
e.radius,
|
|
524
|
-
c,
|
|
484
|
+
return new Promise((i) => {
|
|
485
|
+
s.stopAnimation(e), e.animations = [], Math.abs(e.alpha) > 2 * Math.PI && (e.alpha = Qe(e.alpha, 0, 2 * Math.PI));
|
|
486
|
+
const r = [], o = t.target, a = 0, n = o ? 1 : 0;
|
|
487
|
+
if (t.target && Object.keys(t.target).length > 0 && r.push(
|
|
488
|
+
A(
|
|
489
|
+
"cameraTargetLerp",
|
|
490
|
+
"target",
|
|
491
|
+
new m().copyFrom(e.target),
|
|
492
|
+
new m(
|
|
493
|
+
t.target.x,
|
|
494
|
+
t.target.y,
|
|
495
|
+
t.target.z
|
|
496
|
+
),
|
|
497
|
+
v.ANIMATIONTYPE_VECTOR3,
|
|
498
|
+
a
|
|
499
|
+
)
|
|
500
|
+
), r.push(
|
|
501
|
+
A(
|
|
502
|
+
"cameraAlphaLerp",
|
|
503
|
+
"alpha",
|
|
504
|
+
e.alpha,
|
|
505
|
+
ue(t.lonDeg),
|
|
525
506
|
v.ANIMATIONTYPE_FLOAT,
|
|
526
507
|
n
|
|
527
508
|
)
|
|
528
|
-
)
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
509
|
+
), r.push(
|
|
510
|
+
A(
|
|
511
|
+
"cameraBetaLerp",
|
|
512
|
+
"beta",
|
|
513
|
+
e.beta,
|
|
514
|
+
ue(t.latDeg),
|
|
515
|
+
v.ANIMATIONTYPE_FLOAT,
|
|
516
|
+
n
|
|
517
|
+
)
|
|
518
|
+
), t.radius !== void 0) {
|
|
519
|
+
const d = Math.max(0.01, t.radius);
|
|
520
|
+
r.push(
|
|
521
|
+
A(
|
|
522
|
+
"cameraRadiusLerp",
|
|
523
|
+
"radius",
|
|
524
|
+
e.radius,
|
|
525
|
+
d,
|
|
526
|
+
v.ANIMATIONTYPE_FLOAT,
|
|
527
|
+
n
|
|
528
|
+
)
|
|
529
|
+
);
|
|
540
530
|
}
|
|
541
|
-
|
|
531
|
+
e.animations.push(...r);
|
|
532
|
+
const c = e.useAutoRotationBehavior;
|
|
533
|
+
e.disableAutoRotationBehavior(), s.beginAnimation(
|
|
534
|
+
e,
|
|
535
|
+
0,
|
|
536
|
+
o ? M * 2 : M,
|
|
537
|
+
!1,
|
|
538
|
+
1,
|
|
539
|
+
() => {
|
|
540
|
+
e.animations = [], c && e.enableAutoRotationBehavior(), i();
|
|
541
|
+
}
|
|
542
|
+
);
|
|
543
|
+
});
|
|
542
544
|
}
|
|
543
545
|
function ue(s) {
|
|
544
546
|
return s * Math.PI / 180;
|
|
545
547
|
}
|
|
546
|
-
function
|
|
547
|
-
const
|
|
548
|
-
|
|
548
|
+
function A(s, e, t, i, r, o = 0, a = v.ANIMATIONLOOPMODE_CONSTANT) {
|
|
549
|
+
const n = new De();
|
|
550
|
+
n.setEasingMode(ke.EASINGMODE_EASEINOUT);
|
|
549
551
|
const l = new v(
|
|
550
552
|
s,
|
|
551
553
|
e,
|
|
552
554
|
M,
|
|
553
|
-
|
|
554
|
-
|
|
555
|
+
r,
|
|
556
|
+
a
|
|
555
557
|
), c = [];
|
|
556
558
|
return o > 0 && c.push({ frame: 0, value: t }), c.push({ frame: M * o, value: t }), c.push({
|
|
557
559
|
frame: M * (o + 1),
|
|
558
560
|
value: i
|
|
559
|
-
}), l.setKeys(c), l.setEasingFunction(
|
|
561
|
+
}), l.setKeys(c), l.setEasingFunction(n), l;
|
|
560
562
|
}
|
|
561
563
|
function Qe(s, e, t) {
|
|
562
564
|
return s < e ? s = t - (e - s) % (t - e) : s = e + (s - e) % (t - e);
|
|
@@ -591,26 +593,26 @@ function $e(s, e, t, i) {
|
|
|
591
593
|
);
|
|
592
594
|
}), et(s, e);
|
|
593
595
|
}
|
|
594
|
-
function je(s, e, t, i,
|
|
596
|
+
function je(s, e, t, i, r) {
|
|
595
597
|
const o = Ze[s];
|
|
596
598
|
if (!o)
|
|
597
599
|
throw new Error("Unexpected texture name encountered.");
|
|
598
|
-
const
|
|
599
|
-
|
|
600
|
+
const a = e[o], n = a == null ? void 0 : a.fileLink;
|
|
601
|
+
n ? s === "reflectionTexture" ? n.endsWith(".env") || n.endsWith(".dds") ? i.addCubeTextureTask(
|
|
600
602
|
s,
|
|
601
|
-
|
|
603
|
+
n,
|
|
602
604
|
void 0,
|
|
603
605
|
!1,
|
|
604
606
|
void 0,
|
|
605
607
|
!0
|
|
606
|
-
) :
|
|
608
|
+
) : n.endsWith(".hdr") ? i.addHDRCubeTextureTask(
|
|
607
609
|
s,
|
|
608
|
-
|
|
610
|
+
n,
|
|
609
611
|
128,
|
|
610
612
|
!1,
|
|
611
613
|
!0,
|
|
612
614
|
!1
|
|
613
|
-
) : i.addTextureTask(s,
|
|
615
|
+
) : i.addTextureTask(s, n, !1, !1) : i.addTextureTask(s, n, !1, !1) : r && t[s] && (t[s] && t[s].dispose(), t[s] = null, Xe(s, t));
|
|
614
616
|
}
|
|
615
617
|
function Xe(s, e) {
|
|
616
618
|
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);
|
|
@@ -638,15 +640,15 @@ class tt {
|
|
|
638
640
|
* instead remove material textures when they aren't defined. this is useful for material editor applications
|
|
639
641
|
* where we want to undo changes are remove effects from display.
|
|
640
642
|
*/
|
|
641
|
-
async applyMaterial(e, t, i,
|
|
643
|
+
async applyMaterial(e, t, i, r) {
|
|
642
644
|
return new Promise((o) => {
|
|
643
|
-
const
|
|
645
|
+
const a = this.materialVariantMap.get(e);
|
|
644
646
|
this.materialVariantMap.set(e, {
|
|
645
|
-
...
|
|
647
|
+
...a,
|
|
646
648
|
...t
|
|
647
649
|
});
|
|
648
|
-
const
|
|
649
|
-
(d) => d.name ===
|
|
650
|
+
const n = this.renameClonedAsset(e), l = this.scene.materials.filter(
|
|
651
|
+
(d) => d.name === n
|
|
650
652
|
);
|
|
651
653
|
if (l.length === 0) {
|
|
652
654
|
o();
|
|
@@ -658,7 +660,7 @@ class tt {
|
|
|
658
660
|
t,
|
|
659
661
|
d,
|
|
660
662
|
c,
|
|
661
|
-
|
|
663
|
+
r
|
|
662
664
|
)
|
|
663
665
|
), c.onProgress = (d, u, g) => {
|
|
664
666
|
i && i(d / u * 100, 100, g.name);
|
|
@@ -666,7 +668,7 @@ class tt {
|
|
|
666
668
|
d.forEach((u) => {
|
|
667
669
|
const g = u;
|
|
668
670
|
i && i(100, 100, u.name), this.scene.materials.filter(
|
|
669
|
-
(b) => b.name ===
|
|
671
|
+
(b) => b.name === n
|
|
670
672
|
).forEach(
|
|
671
673
|
(b) => Je(
|
|
672
674
|
u.name,
|
|
@@ -686,21 +688,21 @@ class tt {
|
|
|
686
688
|
* @param model The details for the new model, when undefined we should remove the variant associated to the given key.
|
|
687
689
|
* @param onProgress A load progress callback that can be used for loading bars and event timing.
|
|
688
690
|
*/
|
|
689
|
-
async applyModel(e, t, i,
|
|
691
|
+
async applyModel(e, t, i, r) {
|
|
690
692
|
var l, c;
|
|
691
693
|
if (i && t && !this.keysThatRemovedBaseModel.includes(e) && this.keysThatRemovedBaseModel.push(e), !i)
|
|
692
694
|
return this.keysThatRemovedBaseModel.includes(e) && this.keysThatRemovedBaseModel.length === 1 && await this.setBaseModelEnabled(!0), (l = this.loadedContainerForKey.get(e)) == null || l.dispose(), this.loadedContainerForKey.delete(e), this.loadedMaterialsForKey.delete(e), this.keysThatRemovedBaseModel = this.keysThatRemovedBaseModel.filter(
|
|
693
695
|
(d) => d !== e
|
|
694
696
|
), Promise.resolve(void 0);
|
|
695
|
-
const
|
|
697
|
+
const a = (await be(i, this.scene, r)).instantiateModelsToScene(
|
|
696
698
|
this.renameClonedAsset,
|
|
697
699
|
!0
|
|
698
700
|
);
|
|
699
|
-
this.loadedContainerForKey.has(e) && ((c = this.loadedContainerForKey.get(e)) == null || c.dispose(), this.loadedContainerForKey.delete(e), this.loadedMaterialsForKey.delete(e)), t && await this.setBaseModelEnabled(!1), this.loadedContainerForKey.set(e,
|
|
700
|
-
const
|
|
701
|
+
this.loadedContainerForKey.has(e) && ((c = this.loadedContainerForKey.get(e)) == null || c.dispose(), this.loadedContainerForKey.delete(e), this.loadedMaterialsForKey.delete(e)), t && await this.setBaseModelEnabled(!1), this.loadedContainerForKey.set(e, a), this.loadedMaterialsForKey.set(e, we(a));
|
|
702
|
+
const n = [];
|
|
701
703
|
return this.materialVariantMap.forEach(async (d, u) => {
|
|
702
|
-
|
|
703
|
-
}), await Promise.all(
|
|
704
|
+
n.push(this.applyMaterial(u, d));
|
|
705
|
+
}), await Promise.all(n), a;
|
|
704
706
|
}
|
|
705
707
|
dispose() {
|
|
706
708
|
this.loadedContainerForKey.forEach((e) => e == null ? void 0 : e.dispose()), this.loadedContainerForKey.clear(), this.loadedMaterialsForKey.forEach(
|
|
@@ -726,8 +728,8 @@ function we(s) {
|
|
|
726
728
|
const e = [];
|
|
727
729
|
return s.rootNodes.forEach((t) => {
|
|
728
730
|
t.getChildMeshes().forEach((i) => {
|
|
729
|
-
i.material && !e.includes(i.material) && e.push(i.material), i.subMeshes && i.subMeshes.forEach((
|
|
730
|
-
const o =
|
|
731
|
+
i.material && !e.includes(i.material) && e.push(i.material), i.subMeshes && i.subMeshes.forEach((r) => {
|
|
732
|
+
const o = r.getMaterial(!1);
|
|
731
733
|
o && !e.includes(o) && e.push(o);
|
|
732
734
|
});
|
|
733
735
|
});
|
|
@@ -747,41 +749,41 @@ class it {
|
|
|
747
749
|
const {
|
|
748
750
|
enablePicking: t,
|
|
749
751
|
modelDetails: i,
|
|
750
|
-
previewService:
|
|
752
|
+
previewService: r,
|
|
751
753
|
progressHandler: o,
|
|
752
|
-
scene:
|
|
754
|
+
scene: a
|
|
753
755
|
} = e;
|
|
754
|
-
this.enablePicking = t, this.contextService = i.contextService, this.id = Ke(), this.previewService =
|
|
755
|
-
|
|
756
|
+
this.enablePicking = t, this.contextService = i.contextService, this.id = Ke(), this.previewService = r, this.scene = a, this.variantManager = new tt(
|
|
757
|
+
a,
|
|
756
758
|
this.renameClonedAsset.bind(this),
|
|
757
759
|
this.setBaseModelEnabled.bind(this)
|
|
758
760
|
), this.transformRoot = new Se("root", this.scene);
|
|
759
|
-
const
|
|
761
|
+
const n = async () => {
|
|
760
762
|
if (!i.model)
|
|
761
763
|
throw new Error(
|
|
762
764
|
"Model container constructed with no URL. This is currently unsupported."
|
|
763
765
|
);
|
|
764
766
|
return this.assetContainer = await be(
|
|
765
767
|
i.model,
|
|
766
|
-
|
|
768
|
+
a,
|
|
767
769
|
o
|
|
768
770
|
), this.initialized = !0, await this.instantiate(), this;
|
|
769
771
|
};
|
|
770
|
-
this.importPromise =
|
|
772
|
+
this.importPromise = n();
|
|
771
773
|
}
|
|
772
774
|
//#region Interface implementation
|
|
773
|
-
async applyMaterialVariant(e, t, i,
|
|
775
|
+
async applyMaterialVariant(e, t, i, r) {
|
|
774
776
|
if (!this.initialized) {
|
|
775
777
|
if (this.materialReadyToLoadCallbacks.has(e)) {
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
+
const a = this.materialReadyToLoadCallbacks.get(e);
|
|
779
|
+
a == null || a.set(
|
|
778
780
|
t,
|
|
779
781
|
this.applyMaterialVariant.bind(
|
|
780
782
|
this,
|
|
781
783
|
e,
|
|
782
784
|
t,
|
|
783
785
|
i,
|
|
784
|
-
|
|
786
|
+
r
|
|
785
787
|
)
|
|
786
788
|
);
|
|
787
789
|
} else {
|
|
@@ -789,15 +791,15 @@ class it {
|
|
|
789
791
|
e,
|
|
790
792
|
/* @__PURE__ */ new Map()
|
|
791
793
|
);
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
+
const a = this.materialReadyToLoadCallbacks.get(e);
|
|
795
|
+
a == null || a.set(
|
|
794
796
|
t,
|
|
795
797
|
this.applyMaterialVariant.bind(
|
|
796
798
|
this,
|
|
797
799
|
e,
|
|
798
800
|
t,
|
|
799
801
|
i,
|
|
800
|
-
|
|
802
|
+
r
|
|
801
803
|
)
|
|
802
804
|
);
|
|
803
805
|
}
|
|
@@ -807,36 +809,36 @@ class it {
|
|
|
807
809
|
await this.variantManager.applyMaterial(
|
|
808
810
|
e,
|
|
809
811
|
i,
|
|
810
|
-
(
|
|
812
|
+
(a, n, l) => {
|
|
811
813
|
this.materialVariantObservable.notifyObservers({
|
|
812
|
-
remainingCount:
|
|
813
|
-
totalCount:
|
|
814
|
+
remainingCount: a,
|
|
815
|
+
totalCount: n,
|
|
814
816
|
taskName: l
|
|
815
817
|
});
|
|
816
818
|
},
|
|
817
|
-
|
|
819
|
+
r
|
|
818
820
|
);
|
|
819
821
|
};
|
|
820
822
|
if (this.materialChangesInProgress.includes(e)) {
|
|
821
823
|
if (this.queuedMaterialChanges.has(e)) {
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
+
const a = this.queuedMaterialChanges.get(e);
|
|
825
|
+
a == null || a.set(t, o);
|
|
824
826
|
} else {
|
|
825
827
|
this.queuedMaterialChanges.set(
|
|
826
828
|
e,
|
|
827
829
|
/* @__PURE__ */ new Map()
|
|
828
830
|
);
|
|
829
|
-
const
|
|
830
|
-
|
|
831
|
+
const a = this.queuedMaterialChanges.get(e);
|
|
832
|
+
a == null || a.set(t, o);
|
|
831
833
|
}
|
|
832
834
|
return;
|
|
833
835
|
}
|
|
834
836
|
if (this.materialChangesInProgress.push(e), await o(), this.queuedMaterialChanges.has(e)) {
|
|
835
|
-
const
|
|
836
|
-
if (!
|
|
837
|
+
const a = this.queuedMaterialChanges.get(e);
|
|
838
|
+
if (!a)
|
|
837
839
|
throw new Error("Target material is undefined");
|
|
838
|
-
|
|
839
|
-
await
|
|
840
|
+
a.forEach(async (n) => {
|
|
841
|
+
await n();
|
|
840
842
|
}), this.queuedMaterialChanges.delete(e);
|
|
841
843
|
}
|
|
842
844
|
this.materialChangesInProgress.splice(
|
|
@@ -857,36 +859,36 @@ class it {
|
|
|
857
859
|
);
|
|
858
860
|
return;
|
|
859
861
|
}
|
|
860
|
-
const
|
|
862
|
+
const r = () => this.variantManager.applyModel(
|
|
861
863
|
e,
|
|
862
864
|
i,
|
|
863
865
|
t == null ? void 0 : t.model,
|
|
864
|
-
(
|
|
866
|
+
(n) => {
|
|
865
867
|
this.modelVariantObservable.notifyObservers({
|
|
866
|
-
...
|
|
868
|
+
...n,
|
|
867
869
|
key: e
|
|
868
870
|
});
|
|
869
871
|
}
|
|
870
872
|
);
|
|
871
873
|
if (this.modelChangesInProgress.includes(e)) {
|
|
872
|
-
this.queuedModelChanges.set(e,
|
|
874
|
+
this.queuedModelChanges.set(e, r);
|
|
873
875
|
return;
|
|
874
876
|
}
|
|
875
|
-
const
|
|
877
|
+
const a = await (async () => {
|
|
876
878
|
this.modelChangesInProgress.push(e);
|
|
877
|
-
let
|
|
879
|
+
let n = await r();
|
|
878
880
|
if (this.queuedModelChanges.has(e)) {
|
|
879
881
|
const l = this.queuedModelChanges.get(e);
|
|
880
882
|
if (!l)
|
|
881
883
|
throw new Error("Queued change resolved undefined");
|
|
882
|
-
|
|
884
|
+
n = await l(), this.queuedModelChanges.delete(e);
|
|
883
885
|
}
|
|
884
886
|
return this.modelChangesInProgress.splice(
|
|
885
887
|
this.modelChangesInProgress.indexOf(e),
|
|
886
888
|
1
|
|
887
|
-
),
|
|
889
|
+
), n;
|
|
888
890
|
})();
|
|
889
|
-
this.modelInstance && ve(this.modelInstance.animationGroups), this.contextService || (this.contextService = t == null ? void 0 : t.contextService),
|
|
891
|
+
this.modelInstance && ve(this.modelInstance.animationGroups), this.contextService || (this.contextService = t == null ? void 0 : t.contextService), a ? this.configureModelInstance(a) : this.configureGlowLayer();
|
|
890
892
|
}
|
|
891
893
|
dispose() {
|
|
892
894
|
var e;
|
|
@@ -982,15 +984,15 @@ class it {
|
|
|
982
984
|
attachPickingHandler(e) {
|
|
983
985
|
e.rootNodes.forEach((t) => {
|
|
984
986
|
t.getChildMeshes(!1).forEach((i) => {
|
|
985
|
-
i.name === "targetcube_t" || i.name === "backgroundShell" || (i.actionManager || (i.actionManager = new
|
|
986
|
-
new re(
|
|
987
|
-
|
|
987
|
+
i.name === "targetcube_t" || i.name === "backgroundShell" || (i.actionManager || (i.actionManager = new T(this.scene)), i.actionManager.registerAction(
|
|
988
|
+
new re(T.OnPointerOverTrigger, (r) => {
|
|
989
|
+
r.meshUnderPointer && i.material && this.materialSelectedObservable.notifyObservers({
|
|
988
990
|
id: i.material.id,
|
|
989
991
|
name: this.stripIdFromName(i.material.name)
|
|
990
992
|
});
|
|
991
993
|
})
|
|
992
994
|
), i.actionManager.registerAction(
|
|
993
|
-
new re(
|
|
995
|
+
new re(T.OnPointerOutTrigger, () => {
|
|
994
996
|
i.material && this.materialDeselectedObservable.notifyObservers({
|
|
995
997
|
id: i.material.id,
|
|
996
998
|
name: this.stripIdFromName(i.material.name)
|
|
@@ -1028,11 +1030,11 @@ class it {
|
|
|
1028
1030
|
throw new Error(
|
|
1029
1031
|
"Transform disposed! This should never happen unless there is a race condition present!"
|
|
1030
1032
|
);
|
|
1031
|
-
const t = this.transformRoot.position, i = this.transformRoot.rotationQuaternion,
|
|
1033
|
+
const t = this.transformRoot.position, i = this.transformRoot.rotationQuaternion, r = this.transformRoot.scaling;
|
|
1032
1034
|
this.transformRoot.position = m.Zero(), this.transformRoot.rotationQuaternion = y.Identity(), this.transformRoot.scaling = m.One();
|
|
1033
|
-
for (const
|
|
1034
|
-
|
|
1035
|
-
this.transformRoot.position = t, this.transformRoot.rotationQuaternion = i, this.transformRoot.scaling =
|
|
1035
|
+
for (const a of e.rootNodes)
|
|
1036
|
+
a.parent = this.transformRoot;
|
|
1037
|
+
this.transformRoot.position = t, this.transformRoot.rotationQuaternion = i, this.transformRoot.scaling = r, this.canvasPanels = ((o = this.contextService) == null ? void 0 : o.getAll()) || /* @__PURE__ */ new Map(), qe(
|
|
1036
1038
|
this.materials.concat(this.variantManager.getAllMaterials()),
|
|
1037
1039
|
this.scene,
|
|
1038
1040
|
this.canvasPanels,
|
|
@@ -1076,8 +1078,8 @@ class it {
|
|
|
1076
1078
|
var e;
|
|
1077
1079
|
(e = this.canvasPanels) == null || e.forEach(
|
|
1078
1080
|
(t, i) => {
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1081
|
+
const r = this.dynamicTextures.get(i);
|
|
1082
|
+
r && t.getStaticContextDirty() && r.isReady() && (r.update(!1), t.setStaticContextDirty(!1));
|
|
1081
1083
|
}
|
|
1082
1084
|
);
|
|
1083
1085
|
}
|
|
@@ -1112,17 +1114,17 @@ class it {
|
|
|
1112
1114
|
//#endregion
|
|
1113
1115
|
}
|
|
1114
1116
|
class B extends ge {
|
|
1115
|
-
constructor(e, t, i,
|
|
1117
|
+
constructor(e, t, i, r, o, a, n, l) {
|
|
1116
1118
|
super(
|
|
1117
1119
|
e,
|
|
1118
1120
|
t,
|
|
1119
1121
|
i,
|
|
1120
|
-
|
|
1122
|
+
r,
|
|
1121
1123
|
o,
|
|
1122
|
-
|
|
1124
|
+
a,
|
|
1123
1125
|
l
|
|
1124
|
-
), this.lastFocus = new m(0, 0, 0), this.panDenominator = 1, this.minZ = 0.01, this.setRadius(this.radius), this.enableFramingBehavior(), this.wheelDeltaPercentage = 0.01, this.pinchDeltaPercentage = 5e-3, this.useNaturalPinchZoom = !0,
|
|
1125
|
-
|
|
1126
|
+
), this.lastFocus = new m(0, 0, 0), this.panDenominator = 1, this.minZ = 0.01, this.setRadius(this.radius), this.enableFramingBehavior(), this.wheelDeltaPercentage = 0.01, this.pinchDeltaPercentage = 5e-3, this.useNaturalPinchZoom = !0, n.camera.autoOrientation && (this.alpha += Math.PI), n && (n.camera.limits.min.beta && (this.lowerBetaLimit = n.camera.limits.min.beta), n.camera.limits.max.beta && (this.upperBetaLimit = n.camera.limits.max.beta), n.camera.limits.min.alpha && (this.lowerAlphaLimit = n.camera.limits.min.alpha), n.camera.limits.max.alpha && (this.upperAlphaLimit = n.camera.limits.max.alpha), n.camera.limits.min.radius && (this.lowerRadiusLimit = n.camera.limits.min.radius), n.camera.limits.max.radius && (this.upperRadiusLimit = n.camera.limits.max.radius), n.camera.autoRotation.enabled && this.enableAutoRotationBehavior(
|
|
1127
|
+
n.camera.autoRotation.idleTimeMs
|
|
1126
1128
|
));
|
|
1127
1129
|
}
|
|
1128
1130
|
/**
|
|
@@ -1159,14 +1161,14 @@ class B extends ge {
|
|
|
1159
1161
|
rerunFramingBehavior(e, t) {
|
|
1160
1162
|
const i = this.getFramingBehavior();
|
|
1161
1163
|
i.framingTime = t || 800;
|
|
1162
|
-
const
|
|
1164
|
+
const r = () => {
|
|
1163
1165
|
e && e();
|
|
1164
|
-
}, o = E(this._scene),
|
|
1165
|
-
this.setRadius(
|
|
1166
|
+
}, o = E(this._scene), a = o.max.subtract(o.min), n = o.min.add(a.scale(0.5));
|
|
1167
|
+
this.setRadius(a.length() * 1.5), this.wheelPrecision = 100 / this.radius, this.panningInertia = 0, this.panningOriginTarget.copyFrom(n), this.panDenominator = a.length(), i.zoomOnBoundingInfo(
|
|
1166
1168
|
o.min,
|
|
1167
1169
|
o.max,
|
|
1168
1170
|
void 0,
|
|
1169
|
-
|
|
1171
|
+
r
|
|
1170
1172
|
), i.framingTime = 0;
|
|
1171
1173
|
}
|
|
1172
1174
|
/**
|
|
@@ -1196,18 +1198,18 @@ class B extends ge {
|
|
|
1196
1198
|
* @param assignActive If true the camera will be assigned as the active camera on the scene.
|
|
1197
1199
|
*/
|
|
1198
1200
|
static create(e, t, i) {
|
|
1199
|
-
const
|
|
1201
|
+
const r = E(e), o = r.max.subtract(r.min), a = r.min.add(o.scale(0.5)), n = new B(
|
|
1200
1202
|
"ProductCamera",
|
|
1201
1203
|
-(Math.PI / 2),
|
|
1202
1204
|
Math.PI / 2,
|
|
1203
1205
|
o.length() * 1.5,
|
|
1204
|
-
|
|
1206
|
+
a,
|
|
1205
1207
|
e,
|
|
1206
1208
|
t
|
|
1207
1209
|
);
|
|
1208
|
-
return
|
|
1209
|
-
|
|
1210
|
-
}), i && (e.activeCamera =
|
|
1210
|
+
return n.panningInertia = 0, n.panningOriginTarget.copyFrom(a), n.panDenominator = o.length(), n.onAfterCheckInputsObservable.add(() => {
|
|
1211
|
+
n.panningSensibility = 1e3 / n.panDenominator;
|
|
1212
|
+
}), i && (e.activeCamera = n), n;
|
|
1211
1213
|
}
|
|
1212
1214
|
}
|
|
1213
1215
|
function E(s) {
|
|
@@ -1237,9 +1239,9 @@ class st {
|
|
|
1237
1239
|
return this.currentConfiguration;
|
|
1238
1240
|
}
|
|
1239
1241
|
setConfiguration(e) {
|
|
1240
|
-
var t, i,
|
|
1242
|
+
var t, i, r, o, a, n, l, c, d, u, g, p, b, D, k, z, V, G, N, H, q, _, K, W, U, Y, Q, Z, $, j, X, J, ee;
|
|
1241
1243
|
if (this.renderingPipeline.isSupported) {
|
|
1242
|
-
if (this.renderingPipeline.samples = ((t = e.antiAliasing) == null ? void 0 : t.samples) ?? h.antiAliasing.samples, this.renderingPipeline.fxaaEnabled = ((i = e.antiAliasing) == null ? void 0 : i.fxaaEnabled) ?? h.antiAliasing.fxaaEnabled, this.renderingPipeline.bloomEnabled = ((
|
|
1244
|
+
if (this.renderingPipeline.samples = ((t = e.antiAliasing) == null ? void 0 : t.samples) ?? h.antiAliasing.samples, this.renderingPipeline.fxaaEnabled = ((i = e.antiAliasing) == null ? void 0 : i.fxaaEnabled) ?? h.antiAliasing.fxaaEnabled, this.renderingPipeline.bloomEnabled = ((r = e.bloom) == null ? void 0 : r.enabled) ?? h.bloom.enabled, this.renderingPipeline.bloomKernel = ((o = e.bloom) == null ? void 0 : o.kernel) ?? h.bloom.kernel, this.renderingPipeline.bloomScale = ((a = e.bloom) == null ? void 0 : a.scale) ?? h.bloom.scale, this.renderingPipeline.bloomThreshold = ((n = e.bloom) == null ? void 0 : n.threshold) ?? h.bloom.threshold, this.renderingPipeline.bloomWeight = ((l = e.bloom) == null ? void 0 : l.weight) ?? h.bloom.weight, this.renderingPipeline.chromaticAberrationEnabled = ((c = e.chromaticAberration) == null ? void 0 : c.enabled) ?? h.chromaticAberration.enabled, this.renderingPipeline.chromaticAberration.aberrationAmount = ((d = e.chromaticAberration) == null ? void 0 : d.aberrationAmount) ?? h.chromaticAberration.aberrationAmount, this.renderingPipeline.chromaticAberration.radialIntensity = ((u = e.chromaticAberration) == null ? void 0 : u.radialIntensity) ?? h.chromaticAberration.radialIntensity, this.renderingPipeline.chromaticAberration.direction = (g = e.chromaticAberration) != null && g.direction ? new ie(
|
|
1243
1245
|
e.chromaticAberration.direction.x,
|
|
1244
1246
|
e.chromaticAberration.direction.y
|
|
1245
1247
|
) : new ie(
|
|
@@ -1248,31 +1250,31 @@ class st {
|
|
|
1248
1250
|
), this.renderingPipeline.imageProcessing.colorCurvesEnabled = ((p = e.colorCurves) == null ? void 0 : p.enabled) ?? h.colorCurves.enabled, this.renderingPipeline.imageProcessing.colorCurves = e.colorCurves ? this.updateColorCurve(e.colorCurves) : new ae(), this.renderingPipeline.depthOfFieldEnabled = ((b = e.depthOfField) == null ? void 0 : b.enabled) ?? h.depthOfField.enabled, e.depthOfField)
|
|
1249
1251
|
switch (e.depthOfField.blurLevel ?? h.depthOfField.blurLevel) {
|
|
1250
1252
|
case "Low":
|
|
1251
|
-
this.renderingPipeline.depthOfFieldBlurLevel =
|
|
1253
|
+
this.renderingPipeline.depthOfFieldBlurLevel = R.Low;
|
|
1252
1254
|
break;
|
|
1253
1255
|
case "Medium":
|
|
1254
|
-
this.renderingPipeline.depthOfFieldBlurLevel =
|
|
1256
|
+
this.renderingPipeline.depthOfFieldBlurLevel = R.Medium;
|
|
1255
1257
|
break;
|
|
1256
1258
|
case "High":
|
|
1257
|
-
this.renderingPipeline.depthOfFieldBlurLevel =
|
|
1259
|
+
this.renderingPipeline.depthOfFieldBlurLevel = R.High;
|
|
1258
1260
|
break;
|
|
1259
1261
|
}
|
|
1260
1262
|
if (this.renderingPipeline.depthOfField.focalLength = ((D = e.depthOfField) == null ? void 0 : D.focalLength) ?? h.depthOfField.focalLength, this.renderingPipeline.depthOfField.fStop = ((k = e.depthOfField) == null ? void 0 : k.fStop) ?? h.depthOfField.fStop, this.renderingPipeline.depthOfField.focusDistance = ((z = e.depthOfField) == null ? void 0 : z.focusDistance) ?? h.depthOfField.focusDistance, this.renderingPipeline.depthOfField.lensSize = ((V = e.depthOfField) == null ? void 0 : V.lensSize) ?? h.depthOfField.lensSize, this.renderingPipeline.grainEnabled = ((G = e.grain) == null ? void 0 : G.enabled) ?? h.grain.enabled, this.renderingPipeline.grain.animated = ((N = e.grain) == null ? void 0 : N.animated) ?? h.grain.animated, this.renderingPipeline.grain.intensity = ((H = e.grain) == null ? void 0 : H.intensity) ?? h.grain.intensity, this.renderingPipeline.imageProcessing.contrast = ((q = e.misc) == null ? void 0 : q.contrast) ?? h.misc.contrast, this.renderingPipeline.imageProcessing.exposure = ((_ = e.misc) == null ? void 0 : _.exposure) ?? h.misc.exposure, this.renderingPipeline.imageProcessing.toneMappingEnabled = ((K = e.misc) == null ? void 0 : K.toneMappingEnabled) ?? h.misc.toneMappingEnabled, this.renderingPipeline.imageProcessing.toneMappingEnabled)
|
|
1261
1263
|
switch (e.misc.toneMappingType ?? h.misc.toneMappingType) {
|
|
1262
1264
|
case "Standard":
|
|
1263
|
-
this.renderingPipeline.imageProcessing.toneMappingType =
|
|
1265
|
+
this.renderingPipeline.imageProcessing.toneMappingType = x.TONEMAPPING_STANDARD;
|
|
1264
1266
|
break;
|
|
1265
1267
|
case "ACES":
|
|
1266
|
-
this.renderingPipeline.imageProcessing.toneMappingType =
|
|
1268
|
+
this.renderingPipeline.imageProcessing.toneMappingType = x.TONEMAPPING_ACES;
|
|
1267
1269
|
break;
|
|
1268
1270
|
}
|
|
1269
1271
|
if (this.renderingPipeline.sharpenEnabled = ((W = e.sharpen) == null ? void 0 : W.enabled) ?? h.sharpen.enabled, this.renderingPipeline.sharpen.colorAmount = ((U = e.sharpen) == null ? void 0 : U.colorAmount) ?? h.sharpen.colorAmount, this.renderingPipeline.sharpen.edgeAmount = ((Y = e.sharpen) == null ? void 0 : Y.edgeAmount) ?? h.sharpen.edgeAmount, this.renderingPipeline.imageProcessing.vignetteEnabled = ((Q = e.vignette) == null ? void 0 : Q.enabled) ?? h.vignette.enabled, (Z = e.vignette) != null && Z.center ? (this.renderingPipeline.imageProcessing.vignetteCenterX = e.vignette.center.x, this.renderingPipeline.imageProcessing.vignetteCenterY = e.vignette.center.y) : (this.renderingPipeline.imageProcessing.vignetteCenterX = h.vignette.center.x, this.renderingPipeline.imageProcessing.vignetteCenterY = h.vignette.center.y), e.vignette)
|
|
1270
1272
|
switch ((($ = e.vignette) == null ? void 0 : $.blendMode) ?? h.vignette.blendMode) {
|
|
1271
1273
|
case "Multiply":
|
|
1272
|
-
this.renderingPipeline.imageProcessing.vignetteBlendMode =
|
|
1274
|
+
this.renderingPipeline.imageProcessing.vignetteBlendMode = x.VIGNETTEMODE_MULTIPLY;
|
|
1273
1275
|
break;
|
|
1274
1276
|
case "Opaque":
|
|
1275
|
-
this.renderingPipeline.imageProcessing.vignetteBlendMode =
|
|
1277
|
+
this.renderingPipeline.imageProcessing.vignetteBlendMode = x.VIGNETTEMODE_OPAQUE;
|
|
1276
1278
|
break;
|
|
1277
1279
|
}
|
|
1278
1280
|
(j = e.vignette) != null && j.colorRgba ? this.renderingPipeline.imageProcessing.vignetteColor = new f(
|
|
@@ -1293,7 +1295,7 @@ class st {
|
|
|
1293
1295
|
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;
|
|
1294
1296
|
}
|
|
1295
1297
|
}
|
|
1296
|
-
|
|
1298
|
+
Ae.GLTFLoader.RegisterExtension("glbPostProcessor", function(s) {
|
|
1297
1299
|
return new Ne(s);
|
|
1298
1300
|
});
|
|
1299
1301
|
fe.OnPluginActivatedObservable.add((s) => {
|
|
@@ -1311,7 +1313,7 @@ function L(s) {
|
|
|
1311
1313
|
class Wt {
|
|
1312
1314
|
constructor(e) {
|
|
1313
1315
|
var l;
|
|
1314
|
-
this.focusLostNotified = !1, this.focusLostObservable = new C(), this.modelLoadEventCallbacks = [], this.modelContainers = /* @__PURE__ */ new Map(), this.plugins = [], this.initComplete = !1, this.renderLoop = () => {
|
|
1316
|
+
this.focusLostNotified = !1, this.focusLostObservable = new C(), this.modelLoadEventCallbacks = [], this.modelContainers = /* @__PURE__ */ new Map(), this.plugins = [], this.initComplete = !1, this.currentCameraAnimationPromise = Promise.resolve(), this.renderLoop = () => {
|
|
1315
1317
|
this.engine.views && (this.modelContainers.forEach((c) => {
|
|
1316
1318
|
c.updateDynamicTextures();
|
|
1317
1319
|
}), this.scene.render(), !this.camera.target.equalsWithEpsilon(this.camera.lastFocus, 0.1) && !this.focusLostNotified && (this.focusLostObservable.notifyObservers(void 0), this.focusLostNotified = !0), this.screenshotPrepareResolve && (this.screenshotPrepareResolve(), this.screenshotPrepareResolve = void 0));
|
|
@@ -1319,18 +1321,18 @@ class Wt {
|
|
|
1319
1321
|
const i = (() => {
|
|
1320
1322
|
if (!(e != null && e.noRender))
|
|
1321
1323
|
return this.configuration.createCanvas();
|
|
1322
|
-
})(),
|
|
1324
|
+
})(), r = "1.5.6";
|
|
1323
1325
|
Me.Configuration = {
|
|
1324
1326
|
decoder: {
|
|
1325
|
-
wasmUrl: `https://www.gstatic.com/draco/versioned/decoders/${
|
|
1326
|
-
wasmBinaryUrl: `https://www.gstatic.com/draco/versioned/decoders/${
|
|
1327
|
-
fallbackUrl: `https://www.gstatic.com/draco/versioned/decoders/${
|
|
1327
|
+
wasmUrl: `https://www.gstatic.com/draco/versioned/decoders/${r}/draco_wasm_wrapper_gltf.js`,
|
|
1328
|
+
wasmBinaryUrl: `https://www.gstatic.com/draco/versioned/decoders/${r}/draco_decoder_gltf.wasm`,
|
|
1329
|
+
fallbackUrl: `https://www.gstatic.com/draco/versioned/decoders/${r}/draco_decoder_gltf.js`
|
|
1328
1330
|
}
|
|
1329
1331
|
}, i && (i.getContext("webgl2") || i.getContext("webgl"));
|
|
1330
1332
|
const o = console.log;
|
|
1331
1333
|
console.log = () => {
|
|
1332
1334
|
};
|
|
1333
|
-
const
|
|
1335
|
+
const a = i ? new pe(i, !0, {
|
|
1334
1336
|
adaptToDeviceRatio: !0,
|
|
1335
1337
|
limitDeviceRatio: 2,
|
|
1336
1338
|
premultipliedAlpha: !1,
|
|
@@ -1339,16 +1341,16 @@ class Wt {
|
|
|
1339
1341
|
stencil: this.configuration.highlights.enabled,
|
|
1340
1342
|
forceSRGBBufferSupportState: !0
|
|
1341
1343
|
}) : new Ce();
|
|
1342
|
-
console.log = o,
|
|
1344
|
+
console.log = o, a.hideLoadingUI(), window.addEventListener("resize", this.fireResizeEvent.bind(this)), this.engine = a, this.scene = new xe(a), this.scene.autoClear = !0, this.scene.autoClearDepthAndStencil = !0, this.camera = B.create(this.scene, this.configuration), this.scene.activeCamera = this.camera, this.renderingPipeline = new st(
|
|
1343
1345
|
this.scene,
|
|
1344
1346
|
!1,
|
|
1345
1347
|
this.camera
|
|
1346
1348
|
), this.scene.clearColor = this.configuration.scene.clearColor;
|
|
1347
|
-
const
|
|
1349
|
+
const n = te.CreateFromPrefilteredData(
|
|
1348
1350
|
this.configuration.scene.environment.file,
|
|
1349
1351
|
this.scene
|
|
1350
1352
|
);
|
|
1351
|
-
|
|
1353
|
+
n.rotationY = this.configuration.scene.environment.rotationY, this.scene.environmentTexture = n, this.scene.environmentIntensity = this.configuration.scene.environment.intensity, (l = this.configuration.options) != null && l.renderingPipelineConfiguration ? this.renderingPipeline.setConfiguration(
|
|
1352
1354
|
this.configuration.options.renderingPipelineConfiguration
|
|
1353
1355
|
) : (this.scene.imageProcessingConfiguration.exposure = this.configuration.lighting.exposure, this.scene.imageProcessingConfiguration.contrast = this.configuration.lighting.contrast), this.glowLayerManager = new He(
|
|
1354
1356
|
this.scene,
|
|
@@ -1404,11 +1406,14 @@ class Wt {
|
|
|
1404
1406
|
this.queuedCameraAnimation = e;
|
|
1405
1407
|
return;
|
|
1406
1408
|
}
|
|
1407
|
-
Ye(
|
|
1409
|
+
const t = () => Ye(
|
|
1408
1410
|
this.scene,
|
|
1409
1411
|
this.scene.activeCamera,
|
|
1410
1412
|
e
|
|
1411
1413
|
);
|
|
1414
|
+
this.currentCameraAnimationPromise.then(() => {
|
|
1415
|
+
this.currentCameraAnimationPromise = t();
|
|
1416
|
+
});
|
|
1412
1417
|
}
|
|
1413
1418
|
getCameraPose() {
|
|
1414
1419
|
if (this.scene && this.camera)
|
|
@@ -1439,15 +1444,16 @@ class Wt {
|
|
|
1439
1444
|
e === I.Orbit ? this.reattachControls(this.engine.views[0].target, 2) : this.reattachControls(this.engine.views[0].target, 0);
|
|
1440
1445
|
}
|
|
1441
1446
|
animateToLastCameraFocus() {
|
|
1442
|
-
|
|
1443
|
-
const
|
|
1444
|
-
const
|
|
1447
|
+
const e = () => new Promise((t) => {
|
|
1448
|
+
const i = () => {
|
|
1449
|
+
const r = this.configuration;
|
|
1445
1450
|
this.camera.rerunFramingBehavior(() => {
|
|
1446
|
-
this.focusLostNotified = !1,
|
|
1451
|
+
this.focusLostNotified = !1, r.camera.limits.min.radius && (this.camera.lowerRadiusLimit = r.camera.limits.min.radius), r.camera.limits.max.radius && (this.camera.upperRadiusLimit = r.camera.limits.max.radius), t();
|
|
1447
1452
|
});
|
|
1448
1453
|
};
|
|
1449
|
-
this.scene.onAfterRenderObservable.addOnce(
|
|
1454
|
+
this.scene.onAfterRenderObservable.addOnce(i);
|
|
1450
1455
|
});
|
|
1456
|
+
return this.currentCameraAnimationPromise.then(() => (this.currentCameraAnimationPromise = e(), this.currentCameraAnimationPromise));
|
|
1451
1457
|
}
|
|
1452
1458
|
setAutoRotation(e) {
|
|
1453
1459
|
!this.configuration.camera.autoRotation.enabled || !this.camera || (e ? this.camera.enableAutoRotationBehavior(
|
|
@@ -1469,9 +1475,9 @@ class Wt {
|
|
|
1469
1475
|
this.scene
|
|
1470
1476
|
);
|
|
1471
1477
|
try {
|
|
1472
|
-
const
|
|
1473
|
-
i.target = t.target ? new m(t.target.x, t.target.y, t.target.z) : m.Zero(), i.alpha = o, i.beta =
|
|
1474
|
-
const
|
|
1478
|
+
const r = t.latDeg * Math.PI / 180, o = t.lonDeg * Math.PI / 180;
|
|
1479
|
+
i.target = t.target ? new m(t.target.x, t.target.y, t.target.z) : m.Zero(), i.alpha = o, i.beta = r, i.radius = t.radius || this.camera.radius, i.minZ = 0.01, this.scene.render();
|
|
1480
|
+
const a = await Pe.CreateScreenshotUsingRenderTargetAsync(
|
|
1475
1481
|
this.engine,
|
|
1476
1482
|
i,
|
|
1477
1483
|
e,
|
|
@@ -1479,7 +1485,7 @@ class Wt {
|
|
|
1479
1485
|
2,
|
|
1480
1486
|
!0
|
|
1481
1487
|
);
|
|
1482
|
-
return i.dispose(),
|
|
1488
|
+
return i.dispose(), a;
|
|
1483
1489
|
} catch {
|
|
1484
1490
|
throw i.isDisposed() || i.dispose(), new Error("Failed to render screenshot");
|
|
1485
1491
|
}
|
|
@@ -1488,32 +1494,32 @@ class Wt {
|
|
|
1488
1494
|
const e = this.configuration;
|
|
1489
1495
|
if (!e)
|
|
1490
1496
|
return !0;
|
|
1491
|
-
const t = e.camera.limits.min.alpha, i = e.camera.limits.max.alpha,
|
|
1492
|
-
if (t === void 0 || i === void 0 ||
|
|
1497
|
+
const t = e.camera.limits.min.alpha, i = e.camera.limits.max.alpha, r = e.camera.limits.min.beta, o = e.camera.limits.max.beta;
|
|
1498
|
+
if (t === void 0 || i === void 0 || r === void 0 || o === void 0)
|
|
1493
1499
|
return !0;
|
|
1494
|
-
const
|
|
1500
|
+
const a = [t, i], n = [r, o], l = a.every((d) => d === t), c = n.every((d) => d === r);
|
|
1495
1501
|
return !l && !c;
|
|
1496
1502
|
}
|
|
1497
1503
|
fireResizeEvent() {
|
|
1498
1504
|
this.getNumViewports() > 0 && this.engine.resize();
|
|
1499
1505
|
}
|
|
1500
1506
|
setHighlights(e, t) {
|
|
1501
|
-
var
|
|
1502
|
-
e.length === 0 && ((
|
|
1507
|
+
var r;
|
|
1508
|
+
e.length === 0 && ((r = this.highlightLayer) == null || r.dispose(), this.highlightLayer = void 0), this.highlightLayer || (this.highlightLayer = new ye("highlights", this.scene, {
|
|
1503
1509
|
isStroke: !0,
|
|
1504
1510
|
blurVerticalSize: 0.85,
|
|
1505
1511
|
blurHorizontalSize: 0.85
|
|
1506
1512
|
}), this.highlightLayer.innerGlow = !0, this.highlightLayer.outerGlow = !1), this.highlightLayer.removeAllMeshes();
|
|
1507
1513
|
const i = t ? new w(t[0], t[1], t[2]).toLinearSpace() : void 0;
|
|
1508
1514
|
e.forEach((o) => {
|
|
1509
|
-
const
|
|
1510
|
-
(
|
|
1515
|
+
const a = this.scene.materials.find(
|
|
1516
|
+
(n) => n.name === o.name && n.id === o.id
|
|
1511
1517
|
);
|
|
1512
|
-
|
|
1513
|
-
(
|
|
1518
|
+
a && a.getBindedMeshes().forEach(
|
|
1519
|
+
(n) => {
|
|
1514
1520
|
var l;
|
|
1515
1521
|
return (l = this.highlightLayer) == null ? void 0 : l.addMesh(
|
|
1516
|
-
|
|
1522
|
+
n,
|
|
1517
1523
|
i || w.FromHexString("#fcba03")
|
|
1518
1524
|
);
|
|
1519
1525
|
}
|
|
@@ -1533,8 +1539,8 @@ class Wt {
|
|
|
1533
1539
|
});
|
|
1534
1540
|
return i.getInitializationPromise().then(() => {
|
|
1535
1541
|
this.modelContainers.size <= 1 && this.camera.rerunFramingBehavior(void 0, 1), Ue(this.scene), this.queuedCameraAnimation && (this.executeCameraAnimation(this.queuedCameraAnimation), this.queuedCameraAnimation = void 0);
|
|
1536
|
-
}), this.configuration.highlights.enabled && (i.registerMaterialSelectedCallback((
|
|
1537
|
-
this.setHighlights([
|
|
1542
|
+
}), this.configuration.highlights.enabled && (i.registerMaterialSelectedCallback((r) => {
|
|
1543
|
+
this.setHighlights([r]);
|
|
1538
1544
|
}), i.registerMaterialDeselectedCallback(() => {
|
|
1539
1545
|
this.setHighlights([]);
|
|
1540
1546
|
})), this.modelContainers.set(i.getId(), i), this.triggerModelLoadEvent({
|
|
@@ -1557,7 +1563,7 @@ class Wt {
|
|
|
1557
1563
|
}
|
|
1558
1564
|
unregisterPlugin(e) {
|
|
1559
1565
|
const t = this.plugins.indexOf(e);
|
|
1560
|
-
t > -1 && this.plugins.splice(t, 1).forEach((
|
|
1566
|
+
t > -1 && this.plugins.splice(t, 1).forEach((r) => r.dispose(!1));
|
|
1561
1567
|
}
|
|
1562
1568
|
getGlowLayerManager() {
|
|
1563
1569
|
return this.glowLayerManager;
|
|
@@ -1575,28 +1581,28 @@ class Wt {
|
|
|
1575
1581
|
* Flips a transform around the origin.
|
|
1576
1582
|
*/
|
|
1577
1583
|
flipTransform(e, t, i) {
|
|
1578
|
-
const
|
|
1584
|
+
const r = se.Compose(
|
|
1579
1585
|
O(i || { x: 1, y: 1, z: 1 }),
|
|
1580
1586
|
y.FromEulerVector(
|
|
1581
1587
|
O(t || { x: 0, y: 0, z: 0 })
|
|
1582
1588
|
),
|
|
1583
1589
|
O(e || { x: 0, y: 0, z: 0 })
|
|
1584
|
-
), o = se.RotationAxis(m.Up(), Math.PI),
|
|
1585
|
-
return
|
|
1586
|
-
position: L(
|
|
1590
|
+
), o = se.RotationAxis(m.Up(), Math.PI), a = r.multiply(o), n = m.Zero(), l = y.Identity(), c = m.Zero();
|
|
1591
|
+
return a.decompose(c, l, n), l.multiplyInPlace(y.FromEulerAngles(0, Math.PI, 0)), {
|
|
1592
|
+
position: L(n),
|
|
1587
1593
|
rotation: L(l.toEulerAngles()),
|
|
1588
1594
|
scale: L(c)
|
|
1589
1595
|
};
|
|
1590
1596
|
}
|
|
1591
1597
|
updatePreviewOptions(e) {
|
|
1592
|
-
var
|
|
1598
|
+
var r;
|
|
1593
1599
|
const t = new oe(e);
|
|
1594
1600
|
this.configuration.highlights.enabled !== t.highlights.enabled && this.engine.setStencilBuffer(t.highlights.enabled), this.scene.clearColor = t.scene.clearColor;
|
|
1595
1601
|
let i = this.scene.environmentTexture;
|
|
1596
1602
|
this.configuration.scene.environment.file !== t.scene.environment.file && (i = te.CreateFromPrefilteredData(
|
|
1597
1603
|
t.scene.environment.file,
|
|
1598
1604
|
this.scene
|
|
1599
|
-
), i.rotationY = this.configuration.scene.environment.rotationY, this.scene.environmentTexture = i), i.rotationY = t.scene.environment.rotationY, this.scene.environmentIntensity = t.scene.environment.intensity, (
|
|
1605
|
+
), 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(
|
|
1600
1606
|
t.options.renderingPipelineConfiguration
|
|
1601
1607
|
) : (this.scene.imageProcessingConfiguration.exposure = t.lighting.exposure, this.scene.imageProcessingConfiguration.contrast = t.lighting.contrast), this.glowLayerManager.setIntensity(t.emissiveGlowIntensity), this.configuration = t;
|
|
1602
1608
|
}
|
|
@@ -1618,7 +1624,7 @@ export {
|
|
|
1618
1624
|
S as MaterialEffectMode,
|
|
1619
1625
|
I as ProductCameraRig,
|
|
1620
1626
|
Ge as REFLECTION_PROBE_RESOLUTION,
|
|
1621
|
-
|
|
1627
|
+
P as RenderingConfiguration,
|
|
1622
1628
|
Wt as SpiffCommerce3DPreviewService,
|
|
1623
1629
|
h as renderingPipelineDefaults
|
|
1624
1630
|
};
|