@quick-threejs/reactive 0.1.36 → 0.1.37
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/main.mjs
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = (o, e, t) =>
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { TrianglesDrawMode as
|
|
7
|
-
function Vt() {
|
|
8
|
-
return function(o) {
|
|
9
|
-
Qe()(o), Ie.registerSingleton(o);
|
|
10
|
-
};
|
|
11
|
-
}
|
|
1
|
+
var $e = Object.defineProperty;
|
|
2
|
+
var qe = (o, e, t) => e in o ? $e(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var _ = (o, e, t) => qe(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { s as U, L as G, C as Ye, J as V, K as Qe, i as b, P as Je, a as Ie, f as Ze, m as q, b as Oe, F as et, S as tt, c as se, W as Re, U as Ne, R as st, d as nt, e as Pe, g as rt, A as W, D as $, h as Ee, Q as it } from "./app.module-CA2jMGzR.mjs";
|
|
5
|
+
import { j as Zs, n as en, l as tn, k as sn } from "./app.module-CA2jMGzR.mjs";
|
|
6
|
+
import { TrianglesDrawMode as ot, TriangleFanDrawMode as le, TriangleStripDrawMode as De, Loader as ke, FileLoader as Y, SRGBColorSpace as N, LinearSRGBColorSpace as v, BufferGeometry as Fe, BufferAttribute as z, Color as P, ColorManagement as he, LoaderUtils as X, SpotLight as at, PointLight as ct, DirectionalLight as ut, MeshBasicMaterial as K, MeshPhysicalMaterial as S, Vector2 as He, Matrix4 as Q, Vector3 as F, Quaternion as Ue, InstancedMesh as lt, InstancedBufferAttribute as ht, Object3D as Ge, TextureLoader as dt, ImageBitmapLoader as Be, InterleavedBuffer as ft, InterleavedBufferAttribute as pt, LinearFilter as de, LinearMipmapLinearFilter as je, RepeatWrapping as fe, NearestFilter as Ke, PointsMaterial as mt, Material as ne, LineBasicMaterial as gt, MeshStandardMaterial as Ve, DoubleSide as At, PropertyBinding as Tt, SkinnedMesh as _t, Mesh as Rt, LineSegments as Et, Line as wt, LineLoop as xt, Points as yt, Group as re, PerspectiveCamera as bt, MathUtils as Lt, OrthographicCamera as vt, Skeleton as St, AnimationClip as Ct, Bone as Mt, InterpolateLinear as ze, NearestMipmapNearestFilter as It, LinearMipmapNearestFilter as Ot, NearestMipmapLinearFilter as Nt, ClampToEdgeWrapping as Pt, MirroredRepeatWrapping as Dt, InterpolateDiscrete as kt, FrontSide as Ft, Texture as we, VectorKeyframeTrack as xe, NumberKeyframeTrack as ye, QuaternionKeyframeTrack as be, Box3 as Ht, Sphere as Ut, Interpolant as Gt, LoadingManager as Bt, AudioLoader as jt } from "three";
|
|
12
7
|
class _e {
|
|
13
8
|
constructor() {
|
|
14
9
|
/**
|
|
@@ -115,16 +110,16 @@ class _e {
|
|
|
115
110
|
_(this, "onReady");
|
|
116
111
|
}
|
|
117
112
|
}
|
|
118
|
-
class
|
|
113
|
+
class qs {
|
|
119
114
|
constructor() {
|
|
120
115
|
/** @description Handler triggered when the app is ready. */
|
|
121
116
|
_(this, "onReady");
|
|
122
117
|
}
|
|
123
118
|
}
|
|
124
119
|
function Le(o, e) {
|
|
125
|
-
if (e ===
|
|
120
|
+
if (e === ot)
|
|
126
121
|
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), o;
|
|
127
|
-
if (e === le || e ===
|
|
122
|
+
if (e === le || e === De) {
|
|
128
123
|
let t = o.getIndex();
|
|
129
124
|
if (t === null) {
|
|
130
125
|
const r = [], a = o.getAttribute("position");
|
|
@@ -149,7 +144,7 @@ function Le(o, e) {
|
|
|
149
144
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), o;
|
|
150
145
|
}
|
|
151
146
|
const ie = /* @__PURE__ */ new WeakMap();
|
|
152
|
-
class
|
|
147
|
+
class Kt extends ke {
|
|
153
148
|
constructor(e) {
|
|
154
149
|
super(e), this.decoderPath = "", this.decoderConfig = {}, this.decoderBinary = null, this.decoderPending = null, this.workerLimit = 4, this.workerPool = [], this.workerNextTaskID = 1, this.workerSourceURL = "", this.defaultAttributeIDs = {
|
|
155
150
|
position: "POSITION",
|
|
@@ -215,10 +210,10 @@ class zt extends Fe {
|
|
|
215
210
|
}), a;
|
|
216
211
|
}
|
|
217
212
|
_createGeometry(e) {
|
|
218
|
-
const t = new
|
|
219
|
-
e.index && t.setIndex(new
|
|
213
|
+
const t = new Fe();
|
|
214
|
+
e.index && t.setIndex(new z(e.index.array, 1));
|
|
220
215
|
for (let n = 0; n < e.attributes.length; n++) {
|
|
221
|
-
const s = e.attributes[n], i = s.name, r = s.array, a = s.itemSize, c = new
|
|
216
|
+
const s = e.attributes[n], i = s.name, r = s.array, a = s.itemSize, c = new z(r, a);
|
|
222
217
|
i === "color" && (this._assignVertexColorSpace(c, s.vertexColorSpace), c.normalized = !(r instanceof Float32Array)), t.setAttribute(i, c);
|
|
223
218
|
}
|
|
224
219
|
return t;
|
|
@@ -244,7 +239,7 @@ class zt extends Fe {
|
|
|
244
239
|
return e ? t.push(this._loadLibrary("draco_decoder.js", "text")) : (t.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), t.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(t).then((n) => {
|
|
245
240
|
const s = n[0];
|
|
246
241
|
e || (this.decoderConfig.wasmBinary = n[1]);
|
|
247
|
-
const i =
|
|
242
|
+
const i = Vt.toString(), r = [
|
|
248
243
|
"/* draco decoder */",
|
|
249
244
|
s,
|
|
250
245
|
"",
|
|
@@ -292,7 +287,7 @@ class zt extends Fe {
|
|
|
292
287
|
return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
|
|
293
288
|
}
|
|
294
289
|
}
|
|
295
|
-
function
|
|
290
|
+
function Vt() {
|
|
296
291
|
let o, e;
|
|
297
292
|
onmessage = function(r) {
|
|
298
293
|
const a = r.data;
|
|
@@ -382,42 +377,42 @@ function Xt() {
|
|
|
382
377
|
}
|
|
383
378
|
}
|
|
384
379
|
}
|
|
385
|
-
class
|
|
380
|
+
class zt extends ke {
|
|
386
381
|
constructor(e) {
|
|
387
382
|
super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
|
|
388
|
-
return new
|
|
383
|
+
return new Yt(t);
|
|
389
384
|
}), this.register(function(t) {
|
|
390
|
-
return new
|
|
385
|
+
return new Qt(t);
|
|
386
|
+
}), this.register(function(t) {
|
|
387
|
+
return new os(t);
|
|
388
|
+
}), this.register(function(t) {
|
|
389
|
+
return new as(t);
|
|
391
390
|
}), this.register(function(t) {
|
|
392
391
|
return new cs(t);
|
|
393
392
|
}), this.register(function(t) {
|
|
394
|
-
return new
|
|
393
|
+
return new Zt(t);
|
|
395
394
|
}), this.register(function(t) {
|
|
396
|
-
return new
|
|
395
|
+
return new es(t);
|
|
397
396
|
}), this.register(function(t) {
|
|
398
397
|
return new ts(t);
|
|
399
398
|
}), this.register(function(t) {
|
|
400
399
|
return new ss(t);
|
|
401
400
|
}), this.register(function(t) {
|
|
402
|
-
return new
|
|
401
|
+
return new qt(t);
|
|
403
402
|
}), this.register(function(t) {
|
|
404
|
-
return new
|
|
403
|
+
return new ns(t);
|
|
405
404
|
}), this.register(function(t) {
|
|
406
|
-
return new
|
|
405
|
+
return new Jt(t);
|
|
407
406
|
}), this.register(function(t) {
|
|
408
407
|
return new is(t);
|
|
409
408
|
}), this.register(function(t) {
|
|
410
|
-
return new
|
|
411
|
-
}), this.register(function(t) {
|
|
412
|
-
return new as(t);
|
|
413
|
-
}), this.register(function(t) {
|
|
414
|
-
return new os(t);
|
|
409
|
+
return new rs(t);
|
|
415
410
|
}), this.register(function(t) {
|
|
416
|
-
return new
|
|
411
|
+
return new Wt(t);
|
|
417
412
|
}), this.register(function(t) {
|
|
418
|
-
return new
|
|
413
|
+
return new us(t);
|
|
419
414
|
}), this.register(function(t) {
|
|
420
|
-
return new
|
|
415
|
+
return new ls(t);
|
|
421
416
|
});
|
|
422
417
|
}
|
|
423
418
|
load(e, t, n, s) {
|
|
@@ -426,10 +421,10 @@ class Wt extends Fe {
|
|
|
426
421
|
if (this.resourcePath !== "")
|
|
427
422
|
r = this.resourcePath;
|
|
428
423
|
else if (this.path !== "") {
|
|
429
|
-
const u =
|
|
430
|
-
r =
|
|
424
|
+
const u = X.extractUrlBase(e);
|
|
425
|
+
r = X.resolveURL(u, this.path);
|
|
431
426
|
} else
|
|
432
|
-
r =
|
|
427
|
+
r = X.extractUrlBase(e);
|
|
433
428
|
this.manager.itemStart(e);
|
|
434
429
|
const a = function(u) {
|
|
435
430
|
s ? s(u) : console.error(u), i.manager.itemError(e), i.manager.itemEnd(e);
|
|
@@ -465,9 +460,9 @@ class Wt extends Fe {
|
|
|
465
460
|
if (typeof e == "string")
|
|
466
461
|
i = JSON.parse(e);
|
|
467
462
|
else if (e instanceof ArrayBuffer)
|
|
468
|
-
if (c.decode(new Uint8Array(e, 0, 4)) ===
|
|
463
|
+
if (c.decode(new Uint8Array(e, 0, 4)) === Xe) {
|
|
469
464
|
try {
|
|
470
|
-
r[T.KHR_BINARY_GLTF] = new
|
|
465
|
+
r[T.KHR_BINARY_GLTF] = new hs(e);
|
|
471
466
|
} catch (l) {
|
|
472
467
|
s && s(l);
|
|
473
468
|
return;
|
|
@@ -481,7 +476,7 @@ class Wt extends Fe {
|
|
|
481
476
|
s && s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
|
|
482
477
|
return;
|
|
483
478
|
}
|
|
484
|
-
const u = new
|
|
479
|
+
const u = new ys(i, {
|
|
485
480
|
path: t || this.resourcePath || "",
|
|
486
481
|
crossOrigin: this.crossOrigin,
|
|
487
482
|
requestHeader: this.requestHeader,
|
|
@@ -499,16 +494,16 @@ class Wt extends Fe {
|
|
|
499
494
|
const l = i.extensionsUsed[h], d = i.extensionsRequired || [];
|
|
500
495
|
switch (l) {
|
|
501
496
|
case T.KHR_MATERIALS_UNLIT:
|
|
502
|
-
r[l] = new
|
|
497
|
+
r[l] = new $t();
|
|
503
498
|
break;
|
|
504
499
|
case T.KHR_DRACO_MESH_COMPRESSION:
|
|
505
|
-
r[l] = new
|
|
500
|
+
r[l] = new ds(i, this.dracoLoader);
|
|
506
501
|
break;
|
|
507
502
|
case T.KHR_TEXTURE_TRANSFORM:
|
|
508
|
-
r[l] = new
|
|
503
|
+
r[l] = new fs();
|
|
509
504
|
break;
|
|
510
505
|
case T.KHR_MESH_QUANTIZATION:
|
|
511
|
-
r[l] = new
|
|
506
|
+
r[l] = new ps();
|
|
512
507
|
break;
|
|
513
508
|
default:
|
|
514
509
|
d.indexOf(l) >= 0 && a[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
|
|
@@ -523,7 +518,7 @@ class Wt extends Fe {
|
|
|
523
518
|
});
|
|
524
519
|
}
|
|
525
520
|
}
|
|
526
|
-
function
|
|
521
|
+
function Xt() {
|
|
527
522
|
let o = {};
|
|
528
523
|
return {
|
|
529
524
|
get: function(e) {
|
|
@@ -564,7 +559,7 @@ const T = {
|
|
|
564
559
|
EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
|
|
565
560
|
EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
|
|
566
561
|
};
|
|
567
|
-
class
|
|
562
|
+
class Wt {
|
|
568
563
|
constructor(e) {
|
|
569
564
|
this.parser = e, this.name = T.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
|
|
570
565
|
}
|
|
@@ -586,13 +581,13 @@ class qt {
|
|
|
586
581
|
const l = c.range !== void 0 ? c.range : 0;
|
|
587
582
|
switch (c.type) {
|
|
588
583
|
case "directional":
|
|
589
|
-
u = new
|
|
584
|
+
u = new ut(h), u.target.position.set(0, 0, -1), u.add(u.target);
|
|
590
585
|
break;
|
|
591
586
|
case "point":
|
|
592
|
-
u = new
|
|
587
|
+
u = new ct(h), u.distance = l;
|
|
593
588
|
break;
|
|
594
589
|
case "spot":
|
|
595
|
-
u = new
|
|
590
|
+
u = new at(h), u.distance = l, c.spot = c.spot || {}, c.spot.innerConeAngle = c.spot.innerConeAngle !== void 0 ? c.spot.innerConeAngle : 0, c.spot.outerConeAngle = c.spot.outerConeAngle !== void 0 ? c.spot.outerConeAngle : Math.PI / 4, u.angle = c.spot.outerConeAngle, u.penumbra = 1 - c.spot.innerConeAngle / c.spot.outerConeAngle, u.target.position.set(0, 0, -1), u.add(u.target);
|
|
596
591
|
break;
|
|
597
592
|
default:
|
|
598
593
|
throw new Error("THREE.GLTFLoader: Unexpected light type: " + c.type);
|
|
@@ -610,12 +605,12 @@ class qt {
|
|
|
610
605
|
});
|
|
611
606
|
}
|
|
612
607
|
}
|
|
613
|
-
class
|
|
608
|
+
class $t {
|
|
614
609
|
constructor() {
|
|
615
610
|
this.name = T.KHR_MATERIALS_UNLIT;
|
|
616
611
|
}
|
|
617
612
|
getMaterialType() {
|
|
618
|
-
return
|
|
613
|
+
return K;
|
|
619
614
|
}
|
|
620
615
|
extendParams(e, t, n) {
|
|
621
616
|
const s = [];
|
|
@@ -631,7 +626,7 @@ class Yt {
|
|
|
631
626
|
return Promise.all(s);
|
|
632
627
|
}
|
|
633
628
|
}
|
|
634
|
-
class
|
|
629
|
+
class qt {
|
|
635
630
|
constructor(e) {
|
|
636
631
|
this.parser = e, this.name = T.KHR_MATERIALS_EMISSIVE_STRENGTH;
|
|
637
632
|
}
|
|
@@ -643,7 +638,7 @@ class Qt {
|
|
|
643
638
|
return i !== void 0 && (t.emissiveIntensity = i), Promise.resolve();
|
|
644
639
|
}
|
|
645
640
|
}
|
|
646
|
-
class
|
|
641
|
+
class Yt {
|
|
647
642
|
constructor(e) {
|
|
648
643
|
this.parser = e, this.name = T.KHR_MATERIALS_CLEARCOAT;
|
|
649
644
|
}
|
|
@@ -658,12 +653,12 @@ class Jt {
|
|
|
658
653
|
const i = [], r = s.extensions[this.name];
|
|
659
654
|
if (r.clearcoatFactor !== void 0 && (t.clearcoat = r.clearcoatFactor), r.clearcoatTexture !== void 0 && i.push(n.assignTexture(t, "clearcoatMap", r.clearcoatTexture)), r.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = r.clearcoatRoughnessFactor), r.clearcoatRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "clearcoatRoughnessMap", r.clearcoatRoughnessTexture)), r.clearcoatNormalTexture !== void 0 && (i.push(n.assignTexture(t, "clearcoatNormalMap", r.clearcoatNormalTexture)), r.clearcoatNormalTexture.scale !== void 0)) {
|
|
660
655
|
const a = r.clearcoatNormalTexture.scale;
|
|
661
|
-
t.clearcoatNormalScale = new
|
|
656
|
+
t.clearcoatNormalScale = new He(a, a);
|
|
662
657
|
}
|
|
663
658
|
return Promise.all(i);
|
|
664
659
|
}
|
|
665
660
|
}
|
|
666
|
-
class
|
|
661
|
+
class Qt {
|
|
667
662
|
constructor(e) {
|
|
668
663
|
this.parser = e, this.name = T.KHR_MATERIALS_DISPERSION;
|
|
669
664
|
}
|
|
@@ -679,7 +674,7 @@ class Zt {
|
|
|
679
674
|
return t.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
|
|
680
675
|
}
|
|
681
676
|
}
|
|
682
|
-
class
|
|
677
|
+
class Jt {
|
|
683
678
|
constructor(e) {
|
|
684
679
|
this.parser = e, this.name = T.KHR_MATERIALS_IRIDESCENCE;
|
|
685
680
|
}
|
|
@@ -695,7 +690,7 @@ class es {
|
|
|
695
690
|
return r.iridescenceFactor !== void 0 && (t.iridescence = r.iridescenceFactor), r.iridescenceTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceMap", r.iridescenceTexture)), r.iridescenceIor !== void 0 && (t.iridescenceIOR = r.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), r.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = r.iridescenceThicknessMinimum), r.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = r.iridescenceThicknessMaximum), r.iridescenceThicknessTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceThicknessMap", r.iridescenceThicknessTexture)), Promise.all(i);
|
|
696
691
|
}
|
|
697
692
|
}
|
|
698
|
-
class
|
|
693
|
+
class Zt {
|
|
699
694
|
constructor(e) {
|
|
700
695
|
this.parser = e, this.name = T.KHR_MATERIALS_SHEEN;
|
|
701
696
|
}
|
|
@@ -717,7 +712,7 @@ class ts {
|
|
|
717
712
|
return r.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = r.sheenRoughnessFactor), r.sheenColorTexture !== void 0 && i.push(n.assignTexture(t, "sheenColorMap", r.sheenColorTexture, N)), r.sheenRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "sheenRoughnessMap", r.sheenRoughnessTexture)), Promise.all(i);
|
|
718
713
|
}
|
|
719
714
|
}
|
|
720
|
-
class
|
|
715
|
+
class es {
|
|
721
716
|
constructor(e) {
|
|
722
717
|
this.parser = e, this.name = T.KHR_MATERIALS_TRANSMISSION;
|
|
723
718
|
}
|
|
@@ -733,7 +728,7 @@ class ss {
|
|
|
733
728
|
return r.transmissionFactor !== void 0 && (t.transmission = r.transmissionFactor), r.transmissionTexture !== void 0 && i.push(n.assignTexture(t, "transmissionMap", r.transmissionTexture)), Promise.all(i);
|
|
734
729
|
}
|
|
735
730
|
}
|
|
736
|
-
class
|
|
731
|
+
class ts {
|
|
737
732
|
constructor(e) {
|
|
738
733
|
this.parser = e, this.name = T.KHR_MATERIALS_VOLUME;
|
|
739
734
|
}
|
|
@@ -751,7 +746,7 @@ class ns {
|
|
|
751
746
|
return t.attenuationColor = new P().setRGB(a[0], a[1], a[2], v), Promise.all(i);
|
|
752
747
|
}
|
|
753
748
|
}
|
|
754
|
-
class
|
|
749
|
+
class ss {
|
|
755
750
|
constructor(e) {
|
|
756
751
|
this.parser = e, this.name = T.KHR_MATERIALS_IOR;
|
|
757
752
|
}
|
|
@@ -767,7 +762,7 @@ class rs {
|
|
|
767
762
|
return t.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
|
|
768
763
|
}
|
|
769
764
|
}
|
|
770
|
-
class
|
|
765
|
+
class ns {
|
|
771
766
|
constructor(e) {
|
|
772
767
|
this.parser = e, this.name = T.KHR_MATERIALS_SPECULAR;
|
|
773
768
|
}
|
|
@@ -785,7 +780,7 @@ class is {
|
|
|
785
780
|
return t.specularColor = new P().setRGB(a[0], a[1], a[2], v), r.specularColorTexture !== void 0 && i.push(n.assignTexture(t, "specularColorMap", r.specularColorTexture, N)), Promise.all(i);
|
|
786
781
|
}
|
|
787
782
|
}
|
|
788
|
-
class
|
|
783
|
+
class rs {
|
|
789
784
|
constructor(e) {
|
|
790
785
|
this.parser = e, this.name = T.EXT_MATERIALS_BUMP;
|
|
791
786
|
}
|
|
@@ -801,7 +796,7 @@ class os {
|
|
|
801
796
|
return t.bumpScale = r.bumpFactor !== void 0 ? r.bumpFactor : 1, r.bumpTexture !== void 0 && i.push(n.assignTexture(t, "bumpMap", r.bumpTexture)), Promise.all(i);
|
|
802
797
|
}
|
|
803
798
|
}
|
|
804
|
-
class
|
|
799
|
+
class is {
|
|
805
800
|
constructor(e) {
|
|
806
801
|
this.parser = e, this.name = T.KHR_MATERIALS_ANISOTROPY;
|
|
807
802
|
}
|
|
@@ -817,7 +812,7 @@ class as {
|
|
|
817
812
|
return r.anisotropyStrength !== void 0 && (t.anisotropy = r.anisotropyStrength), r.anisotropyRotation !== void 0 && (t.anisotropyRotation = r.anisotropyRotation), r.anisotropyTexture !== void 0 && i.push(n.assignTexture(t, "anisotropyMap", r.anisotropyTexture)), Promise.all(i);
|
|
818
813
|
}
|
|
819
814
|
}
|
|
820
|
-
class
|
|
815
|
+
class os {
|
|
821
816
|
constructor(e) {
|
|
822
817
|
this.parser = e, this.name = T.KHR_TEXTURE_BASISU;
|
|
823
818
|
}
|
|
@@ -834,7 +829,7 @@ class cs {
|
|
|
834
829
|
return t.loadTextureImage(e, i.source, r);
|
|
835
830
|
}
|
|
836
831
|
}
|
|
837
|
-
class
|
|
832
|
+
class as {
|
|
838
833
|
constructor(e) {
|
|
839
834
|
this.parser = e, this.name = T.EXT_TEXTURE_WEBP, this.isSupported = null;
|
|
840
835
|
}
|
|
@@ -864,7 +859,7 @@ class us {
|
|
|
864
859
|
})), this.isSupported;
|
|
865
860
|
}
|
|
866
861
|
}
|
|
867
|
-
class
|
|
862
|
+
class cs {
|
|
868
863
|
constructor(e) {
|
|
869
864
|
this.parser = e, this.name = T.EXT_TEXTURE_AVIF, this.isSupported = null;
|
|
870
865
|
}
|
|
@@ -894,7 +889,7 @@ class ls {
|
|
|
894
889
|
})), this.isSupported;
|
|
895
890
|
}
|
|
896
891
|
}
|
|
897
|
-
class
|
|
892
|
+
class us {
|
|
898
893
|
constructor(e) {
|
|
899
894
|
this.name = T.EXT_MESHOPT_COMPRESSION, this.parser = e;
|
|
900
895
|
}
|
|
@@ -920,7 +915,7 @@ class hs {
|
|
|
920
915
|
return null;
|
|
921
916
|
}
|
|
922
917
|
}
|
|
923
|
-
class
|
|
918
|
+
class ls {
|
|
924
919
|
constructor(e) {
|
|
925
920
|
this.name = T.EXT_MESH_GPU_INSTANCING, this.parser = e;
|
|
926
921
|
}
|
|
@@ -938,44 +933,44 @@ class ds {
|
|
|
938
933
|
return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((u) => {
|
|
939
934
|
const h = u.pop(), l = h.isGroup ? h.children : [h], d = u[0].count, f = [];
|
|
940
935
|
for (const p of l) {
|
|
941
|
-
const A = new Q(), m = new F(), g = new
|
|
936
|
+
const A = new Q(), m = new F(), g = new Ue(), R = new F(1, 1, 1), w = new lt(p.geometry, p.material, d);
|
|
942
937
|
for (let E = 0; E < d; E++)
|
|
943
938
|
c.TRANSLATION && m.fromBufferAttribute(c.TRANSLATION, E), c.ROTATION && g.fromBufferAttribute(c.ROTATION, E), c.SCALE && R.fromBufferAttribute(c.SCALE, E), w.setMatrixAt(E, A.compose(m, g, R));
|
|
944
939
|
for (const E in c)
|
|
945
940
|
if (E === "_COLOR_0") {
|
|
946
941
|
const L = c[E];
|
|
947
|
-
w.instanceColor = new
|
|
942
|
+
w.instanceColor = new ht(L.array, L.itemSize, L.normalized);
|
|
948
943
|
} else E !== "TRANSLATION" && E !== "ROTATION" && E !== "SCALE" && p.geometry.setAttribute(E, c[E]);
|
|
949
|
-
|
|
944
|
+
Ge.prototype.copy.call(w, p), this.parser.assignFinalMaterial(w), f.push(w);
|
|
950
945
|
}
|
|
951
946
|
return h.isGroup ? (h.clear(), h.add(...f), h) : f[0];
|
|
952
947
|
}));
|
|
953
948
|
}
|
|
954
949
|
}
|
|
955
|
-
const
|
|
956
|
-
class
|
|
950
|
+
const Xe = "glTF", j = 12, ve = { JSON: 1313821514, BIN: 5130562 };
|
|
951
|
+
class hs {
|
|
957
952
|
constructor(e) {
|
|
958
953
|
this.name = T.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
959
|
-
const t = new DataView(e, 0,
|
|
954
|
+
const t = new DataView(e, 0, j), n = new TextDecoder();
|
|
960
955
|
if (this.header = {
|
|
961
956
|
magic: n.decode(new Uint8Array(e.slice(0, 4))),
|
|
962
957
|
version: t.getUint32(4, !0),
|
|
963
958
|
length: t.getUint32(8, !0)
|
|
964
|
-
}, this.header.magic !==
|
|
959
|
+
}, this.header.magic !== Xe)
|
|
965
960
|
throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
|
|
966
961
|
if (this.header.version < 2)
|
|
967
962
|
throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
|
|
968
|
-
const s = this.header.length -
|
|
963
|
+
const s = this.header.length - j, i = new DataView(e, j);
|
|
969
964
|
let r = 0;
|
|
970
965
|
for (; r < s; ) {
|
|
971
966
|
const a = i.getUint32(r, !0);
|
|
972
967
|
r += 4;
|
|
973
968
|
const c = i.getUint32(r, !0);
|
|
974
969
|
if (r += 4, c === ve.JSON) {
|
|
975
|
-
const u = new Uint8Array(e,
|
|
970
|
+
const u = new Uint8Array(e, j + r, a);
|
|
976
971
|
this.content = n.decode(u);
|
|
977
972
|
} else if (c === ve.BIN) {
|
|
978
|
-
const u =
|
|
973
|
+
const u = j + r;
|
|
979
974
|
this.body = e.slice(u, u + a);
|
|
980
975
|
}
|
|
981
976
|
r += a;
|
|
@@ -984,7 +979,7 @@ class fs {
|
|
|
984
979
|
throw new Error("THREE.GLTFLoader: JSON content not found.");
|
|
985
980
|
}
|
|
986
981
|
}
|
|
987
|
-
class
|
|
982
|
+
class ds {
|
|
988
983
|
constructor(e, t) {
|
|
989
984
|
if (!t)
|
|
990
985
|
throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
|
|
@@ -1016,7 +1011,7 @@ class ps {
|
|
|
1016
1011
|
});
|
|
1017
1012
|
}
|
|
1018
1013
|
}
|
|
1019
|
-
class
|
|
1014
|
+
class fs {
|
|
1020
1015
|
constructor() {
|
|
1021
1016
|
this.name = T.KHR_TEXTURE_TRANSFORM;
|
|
1022
1017
|
}
|
|
@@ -1024,12 +1019,12 @@ class ms {
|
|
|
1024
1019
|
return (t.texCoord === void 0 || t.texCoord === e.channel) && t.offset === void 0 && t.rotation === void 0 && t.scale === void 0 || (e = e.clone(), t.texCoord !== void 0 && (e.channel = t.texCoord), t.offset !== void 0 && e.offset.fromArray(t.offset), t.rotation !== void 0 && (e.rotation = t.rotation), t.scale !== void 0 && e.repeat.fromArray(t.scale), e.needsUpdate = !0), e;
|
|
1025
1020
|
}
|
|
1026
1021
|
}
|
|
1027
|
-
class
|
|
1022
|
+
class ps {
|
|
1028
1023
|
constructor() {
|
|
1029
1024
|
this.name = T.KHR_MESH_QUANTIZATION;
|
|
1030
1025
|
}
|
|
1031
1026
|
}
|
|
1032
|
-
class
|
|
1027
|
+
class We extends Gt {
|
|
1033
1028
|
constructor(e, t, n, s) {
|
|
1034
1029
|
super(e, t, n, s);
|
|
1035
1030
|
}
|
|
@@ -1042,17 +1037,17 @@ class $e extends Bt {
|
|
|
1042
1037
|
interpolate_(e, t, n, s) {
|
|
1043
1038
|
const i = this.resultBuffer, r = this.sampleValues, a = this.valueSize, c = a * 2, u = a * 3, h = s - t, l = (n - t) / h, d = l * l, f = d * l, p = e * u, A = p - u, m = -2 * f + 3 * d, g = f - d, R = 1 - m, w = g - d + l;
|
|
1044
1039
|
for (let E = 0; E !== a; E++) {
|
|
1045
|
-
const L = r[A + E + a], M = r[A + E + c] * h, y = r[p + E + a],
|
|
1046
|
-
i[E] = R * L + w * M + m * y + g *
|
|
1040
|
+
const L = r[A + E + a], M = r[A + E + c] * h, y = r[p + E + a], B = r[p + E] * h;
|
|
1041
|
+
i[E] = R * L + w * M + m * y + g * B;
|
|
1047
1042
|
}
|
|
1048
1043
|
return i;
|
|
1049
1044
|
}
|
|
1050
1045
|
}
|
|
1051
|
-
const
|
|
1052
|
-
class
|
|
1046
|
+
const ms = new Ue();
|
|
1047
|
+
class gs extends We {
|
|
1053
1048
|
interpolate_(e, t, n, s) {
|
|
1054
1049
|
const i = super.interpolate_(e, t, n, s);
|
|
1055
|
-
return
|
|
1050
|
+
return ms.fromArray(i).normalize().toArray(i), i;
|
|
1056
1051
|
}
|
|
1057
1052
|
}
|
|
1058
1053
|
const x = {
|
|
@@ -1083,15 +1078,15 @@ const x = {
|
|
|
1083
1078
|
5125: Uint32Array,
|
|
1084
1079
|
5126: Float32Array
|
|
1085
1080
|
}, Se = {
|
|
1086
|
-
9728:
|
|
1081
|
+
9728: Ke,
|
|
1087
1082
|
9729: de,
|
|
1088
|
-
9984:
|
|
1089
|
-
9985:
|
|
1090
|
-
9986:
|
|
1091
|
-
9987:
|
|
1083
|
+
9984: It,
|
|
1084
|
+
9985: Ot,
|
|
1085
|
+
9986: Nt,
|
|
1086
|
+
9987: je
|
|
1092
1087
|
}, Ce = {
|
|
1093
|
-
33071:
|
|
1094
|
-
33648:
|
|
1088
|
+
33071: Pt,
|
|
1089
|
+
33648: Dt,
|
|
1095
1090
|
10497: fe
|
|
1096
1091
|
}, oe = {
|
|
1097
1092
|
SCALAR: 1,
|
|
@@ -1117,26 +1112,26 @@ const x = {
|
|
|
1117
1112
|
translation: "position",
|
|
1118
1113
|
rotation: "quaternion",
|
|
1119
1114
|
weights: "morphTargetInfluences"
|
|
1120
|
-
},
|
|
1115
|
+
}, As = {
|
|
1121
1116
|
CUBICSPLINE: void 0,
|
|
1122
1117
|
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
1123
1118
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
1124
|
-
LINEAR:
|
|
1125
|
-
STEP:
|
|
1119
|
+
LINEAR: ze,
|
|
1120
|
+
STEP: kt
|
|
1126
1121
|
}, ae = {
|
|
1127
1122
|
OPAQUE: "OPAQUE",
|
|
1128
1123
|
MASK: "MASK",
|
|
1129
1124
|
BLEND: "BLEND"
|
|
1130
1125
|
};
|
|
1131
|
-
function
|
|
1132
|
-
return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new
|
|
1126
|
+
function Ts(o) {
|
|
1127
|
+
return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new Ve({
|
|
1133
1128
|
color: 16777215,
|
|
1134
1129
|
emissive: 0,
|
|
1135
1130
|
metalness: 1,
|
|
1136
1131
|
roughness: 1,
|
|
1137
1132
|
transparent: !1,
|
|
1138
1133
|
depthTest: !0,
|
|
1139
|
-
side:
|
|
1134
|
+
side: Ft
|
|
1140
1135
|
})), o.DefaultMaterial;
|
|
1141
1136
|
}
|
|
1142
1137
|
function D(o, e, t) {
|
|
@@ -1146,7 +1141,7 @@ function D(o, e, t) {
|
|
|
1146
1141
|
function C(o, e) {
|
|
1147
1142
|
e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(o.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
|
|
1148
1143
|
}
|
|
1149
|
-
function
|
|
1144
|
+
function _s(o, e, t) {
|
|
1150
1145
|
let n = !1, s = !1, i = !1;
|
|
1151
1146
|
for (let u = 0, h = e.length; u < h; u++) {
|
|
1152
1147
|
const l = e[u];
|
|
@@ -1178,7 +1173,7 @@ function Es(o, e, t) {
|
|
|
1178
1173
|
return n && (o.morphAttributes.position = h), s && (o.morphAttributes.normal = l), i && (o.morphAttributes.color = d), o.morphTargetsRelative = !0, o;
|
|
1179
1174
|
});
|
|
1180
1175
|
}
|
|
1181
|
-
function
|
|
1176
|
+
function Rs(o, e) {
|
|
1182
1177
|
if (o.updateMorphTargets(), e.weights !== void 0)
|
|
1183
1178
|
for (let t = 0, n = e.weights.length; t < n; t++)
|
|
1184
1179
|
o.morphTargetInfluences[t] = e.weights[t];
|
|
@@ -1192,7 +1187,7 @@ function ws(o, e) {
|
|
|
1192
1187
|
console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
|
|
1193
1188
|
}
|
|
1194
1189
|
}
|
|
1195
|
-
function
|
|
1190
|
+
function Es(o) {
|
|
1196
1191
|
let e;
|
|
1197
1192
|
const t = o.extensions && o.extensions[T.KHR_DRACO_MESH_COMPRESSION];
|
|
1198
1193
|
if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ce(t.attributes) : e = o.indices + ":" + ce(o.attributes) + ":" + o.mode, o.targets !== void 0)
|
|
@@ -1221,13 +1216,13 @@ function me(o) {
|
|
|
1221
1216
|
throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
|
|
1222
1217
|
}
|
|
1223
1218
|
}
|
|
1224
|
-
function
|
|
1219
|
+
function ws(o) {
|
|
1225
1220
|
return o.search(/\.jpe?g($|\?)/i) > 0 || o.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : o.search(/\.webp($|\?)/i) > 0 || o.search(/^data\:image\/webp/) === 0 ? "image/webp" : o.search(/\.ktx2($|\?)/i) > 0 || o.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
|
|
1226
1221
|
}
|
|
1227
|
-
const
|
|
1228
|
-
class
|
|
1222
|
+
const xs = new Q();
|
|
1223
|
+
class ys {
|
|
1229
1224
|
constructor(e = {}, t = {}) {
|
|
1230
|
-
this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new
|
|
1225
|
+
this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new Xt(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
|
|
1231
1226
|
let n = !1, s = -1, i = !1, r = -1;
|
|
1232
1227
|
if (typeof navigator < "u") {
|
|
1233
1228
|
const a = navigator.userAgent;
|
|
@@ -1235,7 +1230,7 @@ class Ls {
|
|
|
1235
1230
|
const c = a.match(/Version\/(\d+)/);
|
|
1236
1231
|
s = n && c ? parseInt(c[1], 10) : -1, i = a.indexOf("Firefox") > -1, r = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
|
|
1237
1232
|
}
|
|
1238
|
-
typeof createImageBitmap > "u" || n && s < 17 || i && r < 98 ? this.textureLoader = new
|
|
1233
|
+
typeof createImageBitmap > "u" || n && s < 17 || i && r < 98 ? this.textureLoader = new dt(this.options.manager) : this.textureLoader = new Be(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Y(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
|
|
1239
1234
|
}
|
|
1240
1235
|
setExtensions(e) {
|
|
1241
1236
|
this.extensions = e;
|
|
@@ -1436,7 +1431,7 @@ class Ls {
|
|
|
1436
1431
|
return Promise.resolve(this.extensions[T.KHR_BINARY_GLTF].body);
|
|
1437
1432
|
const s = this.options;
|
|
1438
1433
|
return new Promise(function(i, r) {
|
|
1439
|
-
n.load(
|
|
1434
|
+
n.load(X.resolveURL(t.uri, s.path), i, void 0, function() {
|
|
1440
1435
|
r(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'));
|
|
1441
1436
|
});
|
|
1442
1437
|
});
|
|
@@ -1462,7 +1457,7 @@ class Ls {
|
|
|
1462
1457
|
const t = this, n = this.json, s = this.json.accessors[e];
|
|
1463
1458
|
if (s.bufferView === void 0 && s.sparse === void 0) {
|
|
1464
1459
|
const r = oe[s.type], a = H[s.componentType], c = s.normalized === !0, u = new a(s.count * r);
|
|
1465
|
-
return Promise.resolve(new
|
|
1460
|
+
return Promise.resolve(new z(u, r, c));
|
|
1466
1461
|
}
|
|
1467
1462
|
const i = [];
|
|
1468
1463
|
return s.bufferView !== void 0 ? i.push(this.getDependency("bufferView", s.bufferView)) : i.push(null), s.sparse !== void 0 && (i.push(this.getDependency("bufferView", s.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", s.sparse.values.bufferView))), Promise.all(i).then(function(r) {
|
|
@@ -1471,13 +1466,13 @@ class Ls {
|
|
|
1471
1466
|
if (f && f !== l) {
|
|
1472
1467
|
const g = Math.floor(d / f), R = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + g + ":" + s.count;
|
|
1473
1468
|
let w = t.cache.get(R);
|
|
1474
|
-
w || (A = new u(a, g * f, s.count * f / h), w = new
|
|
1469
|
+
w || (A = new u(a, g * f, s.count * f / h), w = new ft(A, f / h), t.cache.add(R, w)), m = new pt(w, c, d % f / h, p);
|
|
1475
1470
|
} else
|
|
1476
|
-
a === null ? A = new u(s.count * c) : A = new u(a, d, s.count * c), m = new
|
|
1471
|
+
a === null ? A = new u(s.count * c) : A = new u(a, d, s.count * c), m = new z(A, c, p);
|
|
1477
1472
|
if (s.sparse !== void 0) {
|
|
1478
1473
|
const g = oe.SCALAR, R = H[s.sparse.indices.componentType], w = s.sparse.indices.byteOffset || 0, E = s.sparse.values.byteOffset || 0, L = new R(r[1], w, s.sparse.count * g), M = new u(r[2], E, s.sparse.count * c);
|
|
1479
|
-
a !== null && (m = new
|
|
1480
|
-
for (let y = 0,
|
|
1474
|
+
a !== null && (m = new z(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
|
|
1475
|
+
for (let y = 0, B = L.length; y < B; y++) {
|
|
1481
1476
|
const I = L[y];
|
|
1482
1477
|
if (m.setX(I, M[y * c]), c >= 2 && m.setY(I, M[y * c + 1]), c >= 3 && m.setZ(I, M[y * c + 2]), c >= 4 && m.setW(I, M[y * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
1483
1478
|
}
|
|
@@ -1507,7 +1502,7 @@ class Ls {
|
|
|
1507
1502
|
const u = this.loadImageSource(t, n).then(function(h) {
|
|
1508
1503
|
h.flipY = !1, h.name = r.name || a.name || "", h.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (h.name = a.uri);
|
|
1509
1504
|
const d = (i.samplers || {})[r.sampler] || {};
|
|
1510
|
-
return h.magFilter = Se[d.magFilter] || de, h.minFilter = Se[d.minFilter] ||
|
|
1505
|
+
return h.magFilter = Se[d.magFilter] || de, h.minFilter = Se[d.minFilter] || je, h.wrapS = Ce[d.wrapS] || fe, h.wrapT = Ce[d.wrapT] || fe, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== Ke && h.minFilter !== de, s.associations.set(h, { textures: e }), h;
|
|
1511
1506
|
}).catch(function() {
|
|
1512
1507
|
return null;
|
|
1513
1508
|
});
|
|
@@ -1533,10 +1528,10 @@ class Ls {
|
|
|
1533
1528
|
t.isImageBitmapLoader === !0 && (p = function(A) {
|
|
1534
1529
|
const m = new we(A);
|
|
1535
1530
|
m.needsUpdate = !0, d(m);
|
|
1536
|
-
}), t.load(
|
|
1531
|
+
}), t.load(X.resolveURL(l, i.path), p, void 0, f);
|
|
1537
1532
|
});
|
|
1538
1533
|
}).then(function(l) {
|
|
1539
|
-
return u === !0 && a.revokeObjectURL(c), C(l, r), l.userData.mimeType = r.mimeType ||
|
|
1534
|
+
return u === !0 && a.revokeObjectURL(c), C(l, r), l.userData.mimeType = r.mimeType || ws(r.uri), l;
|
|
1540
1535
|
}).catch(function(l) {
|
|
1541
1536
|
throw console.error("THREE.GLTFLoader: Couldn't load texture", c), l;
|
|
1542
1537
|
});
|
|
@@ -1580,11 +1575,11 @@ class Ls {
|
|
|
1580
1575
|
if (e.isPoints) {
|
|
1581
1576
|
const a = "PointsMaterial:" + n.uuid;
|
|
1582
1577
|
let c = this.cache.get(a);
|
|
1583
|
-
c || (c = new
|
|
1578
|
+
c || (c = new mt(), ne.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, c.sizeAttenuation = !1, this.cache.add(a, c)), n = c;
|
|
1584
1579
|
} else if (e.isLine) {
|
|
1585
1580
|
const a = "LineBasicMaterial:" + n.uuid;
|
|
1586
1581
|
let c = this.cache.get(a);
|
|
1587
|
-
c || (c = new
|
|
1582
|
+
c || (c = new gt(), ne.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, this.cache.add(a, c)), n = c;
|
|
1588
1583
|
}
|
|
1589
1584
|
if (s || i || r) {
|
|
1590
1585
|
let a = "ClonedMaterial:" + n.uuid + ":";
|
|
@@ -1595,7 +1590,7 @@ class Ls {
|
|
|
1595
1590
|
e.material = n;
|
|
1596
1591
|
}
|
|
1597
1592
|
getMaterialType() {
|
|
1598
|
-
return
|
|
1593
|
+
return Ve;
|
|
1599
1594
|
}
|
|
1600
1595
|
/**
|
|
1601
1596
|
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
|
|
@@ -1621,17 +1616,17 @@ class Ls {
|
|
|
1621
1616
|
return d.extendMaterialParams && d.extendMaterialParams(e, a);
|
|
1622
1617
|
})));
|
|
1623
1618
|
}
|
|
1624
|
-
i.doubleSided === !0 && (a.side =
|
|
1619
|
+
i.doubleSided === !0 && (a.side = At);
|
|
1625
1620
|
const h = i.alphaMode || ae.OPAQUE;
|
|
1626
|
-
if (h === ae.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, h === ae.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && r !==
|
|
1621
|
+
if (h === ae.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, h === ae.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && r !== K && (u.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new He(1, 1), i.normalTexture.scale !== void 0)) {
|
|
1627
1622
|
const l = i.normalTexture.scale;
|
|
1628
1623
|
a.normalScale.set(l, l);
|
|
1629
1624
|
}
|
|
1630
|
-
if (i.occlusionTexture !== void 0 && r !==
|
|
1625
|
+
if (i.occlusionTexture !== void 0 && r !== K && (u.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && r !== K) {
|
|
1631
1626
|
const l = i.emissiveFactor;
|
|
1632
1627
|
a.emissive = new P().setRGB(l[0], l[1], l[2], v);
|
|
1633
1628
|
}
|
|
1634
|
-
return i.emissiveTexture !== void 0 && r !==
|
|
1629
|
+
return i.emissiveTexture !== void 0 && r !== K && u.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, N)), Promise.all(u).then(function() {
|
|
1635
1630
|
const l = new r(a);
|
|
1636
1631
|
return i.name && (l.name = i.name), C(l, i), t.associations.set(l, { materials: e }), i.extensions && D(s, l, i), l;
|
|
1637
1632
|
});
|
|
@@ -1643,7 +1638,7 @@ class Ls {
|
|
|
1643
1638
|
* @return {String}
|
|
1644
1639
|
*/
|
|
1645
1640
|
createUniqueName(e) {
|
|
1646
|
-
const t =
|
|
1641
|
+
const t = Tt.sanitizeNodeName(e || "");
|
|
1647
1642
|
return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
|
|
1648
1643
|
}
|
|
1649
1644
|
/**
|
|
@@ -1663,12 +1658,12 @@ class Ls {
|
|
|
1663
1658
|
}
|
|
1664
1659
|
const r = [];
|
|
1665
1660
|
for (let a = 0, c = e.length; a < c; a++) {
|
|
1666
|
-
const u = e[a], h =
|
|
1661
|
+
const u = e[a], h = Es(u), l = s[h];
|
|
1667
1662
|
if (l)
|
|
1668
1663
|
r.push(l.promise);
|
|
1669
1664
|
else {
|
|
1670
1665
|
let d;
|
|
1671
|
-
u.extensions && u.extensions[T.KHR_DRACO_MESH_COMPRESSION] ? d = i(u) : d = Me(new
|
|
1666
|
+
u.extensions && u.extensions[T.KHR_DRACO_MESH_COMPRESSION] ? d = i(u) : d = Me(new Fe(), u, t), s[h] = { primitive: u, promise: d }, r.push(d);
|
|
1672
1667
|
}
|
|
1673
1668
|
}
|
|
1674
1669
|
return Promise.all(r);
|
|
@@ -1681,7 +1676,7 @@ class Ls {
|
|
|
1681
1676
|
loadMesh(e) {
|
|
1682
1677
|
const t = this, n = this.json, s = this.extensions, i = n.meshes[e], r = i.primitives, a = [];
|
|
1683
1678
|
for (let c = 0, u = r.length; c < u; c++) {
|
|
1684
|
-
const h = r[c].material === void 0 ?
|
|
1679
|
+
const h = r[c].material === void 0 ? Ts(this.cache) : this.getDependency("material", r[c].material);
|
|
1685
1680
|
a.push(h);
|
|
1686
1681
|
}
|
|
1687
1682
|
return a.push(t.loadGeometries(r)), Promise.all(a).then(function(c) {
|
|
@@ -1691,18 +1686,18 @@ class Ls {
|
|
|
1691
1686
|
let g;
|
|
1692
1687
|
const R = u[f];
|
|
1693
1688
|
if (m.mode === x.TRIANGLES || m.mode === x.TRIANGLE_STRIP || m.mode === x.TRIANGLE_FAN || m.mode === void 0)
|
|
1694
|
-
g = i.isSkinnedMesh === !0 ? new
|
|
1689
|
+
g = i.isSkinnedMesh === !0 ? new _t(A, R) : new Rt(A, R), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), m.mode === x.TRIANGLE_STRIP ? g.geometry = Le(g.geometry, De) : m.mode === x.TRIANGLE_FAN && (g.geometry = Le(g.geometry, le));
|
|
1695
1690
|
else if (m.mode === x.LINES)
|
|
1696
|
-
g = new
|
|
1691
|
+
g = new Et(A, R);
|
|
1697
1692
|
else if (m.mode === x.LINE_STRIP)
|
|
1698
|
-
g = new
|
|
1693
|
+
g = new wt(A, R);
|
|
1699
1694
|
else if (m.mode === x.LINE_LOOP)
|
|
1700
|
-
g = new
|
|
1695
|
+
g = new xt(A, R);
|
|
1701
1696
|
else if (m.mode === x.POINTS)
|
|
1702
|
-
g = new
|
|
1697
|
+
g = new yt(A, R);
|
|
1703
1698
|
else
|
|
1704
1699
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
|
|
1705
|
-
Object.keys(g.geometry.morphAttributes).length > 0 &&
|
|
1700
|
+
Object.keys(g.geometry.morphAttributes).length > 0 && Rs(g, i), g.name = t.createUniqueName(i.name || "mesh_" + e), C(g, i), m.extensions && D(s, g, m), t.assignFinalMaterial(g), l.push(g);
|
|
1706
1701
|
}
|
|
1707
1702
|
for (let f = 0, p = l.length; f < p; f++)
|
|
1708
1703
|
t.associations.set(l[f], {
|
|
@@ -1730,7 +1725,7 @@ class Ls {
|
|
|
1730
1725
|
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
1731
1726
|
return;
|
|
1732
1727
|
}
|
|
1733
|
-
return n.type === "perspective" ? t = new Lt
|
|
1728
|
+
return n.type === "perspective" ? t = new bt(Lt.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new vt(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), C(t, n), Promise.resolve(t);
|
|
1734
1729
|
}
|
|
1735
1730
|
/**
|
|
1736
1731
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
@@ -1752,7 +1747,7 @@ class Ls {
|
|
|
1752
1747
|
} else
|
|
1753
1748
|
console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[u]);
|
|
1754
1749
|
}
|
|
1755
|
-
return new
|
|
1750
|
+
return new St(a, c);
|
|
1756
1751
|
});
|
|
1757
1752
|
}
|
|
1758
1753
|
/**
|
|
@@ -1775,15 +1770,15 @@ class Ls {
|
|
|
1775
1770
|
]).then(function(l) {
|
|
1776
1771
|
const d = l[0], f = l[1], p = l[2], A = l[3], m = l[4], g = [];
|
|
1777
1772
|
for (let R = 0, w = d.length; R < w; R++) {
|
|
1778
|
-
const E = d[R], L = f[R], M = p[R], y = A[R],
|
|
1773
|
+
const E = d[R], L = f[R], M = p[R], y = A[R], B = m[R];
|
|
1779
1774
|
if (E === void 0) continue;
|
|
1780
1775
|
E.updateMatrix && E.updateMatrix();
|
|
1781
|
-
const I = n._createAnimationTracks(E, L, M, y,
|
|
1776
|
+
const I = n._createAnimationTracks(E, L, M, y, B);
|
|
1782
1777
|
if (I)
|
|
1783
1778
|
for (let te = 0; te < I.length; te++)
|
|
1784
1779
|
g.push(I[te]);
|
|
1785
1780
|
}
|
|
1786
|
-
return new
|
|
1781
|
+
return new Ct(i, void 0, g);
|
|
1787
1782
|
});
|
|
1788
1783
|
}
|
|
1789
1784
|
createNodeMesh(e) {
|
|
@@ -1814,7 +1809,7 @@ class Ls {
|
|
|
1814
1809
|
]).then(function(u) {
|
|
1815
1810
|
const h = u[0], l = u[1], d = u[2];
|
|
1816
1811
|
d !== null && h.traverse(function(f) {
|
|
1817
|
-
f.isSkinnedMesh && f.bind(d,
|
|
1812
|
+
f.isSkinnedMesh && f.bind(d, xs);
|
|
1818
1813
|
});
|
|
1819
1814
|
for (let f = 0, p = l.length; f < p; f++)
|
|
1820
1815
|
h.add(l[f]);
|
|
@@ -1838,7 +1833,7 @@ class Ls {
|
|
|
1838
1833
|
a.push(u);
|
|
1839
1834
|
}), this.nodeCache[e] = Promise.all(a).then(function(u) {
|
|
1840
1835
|
let h;
|
|
1841
|
-
if (i.isBone === !0 ? h = new
|
|
1836
|
+
if (i.isBone === !0 ? h = new Mt() : u.length > 1 ? h = new re() : u.length === 1 ? h = u[0] : h = new Ge(), h !== u[0])
|
|
1842
1837
|
for (let l = 0, d = u.length; l < d; l++)
|
|
1843
1838
|
h.add(u[l]);
|
|
1844
1839
|
if (i.name && (h.userData.name = i.name, h.name = r), C(h, i), i.extensions && D(n, h, i), i.matrix !== void 0) {
|
|
@@ -1905,7 +1900,7 @@ class Ls {
|
|
|
1905
1900
|
}
|
|
1906
1901
|
break;
|
|
1907
1902
|
}
|
|
1908
|
-
const h = s.interpolation !== void 0 ?
|
|
1903
|
+
const h = s.interpolation !== void 0 ? As[s.interpolation] : ze, l = this._getArrayFromAccessor(n);
|
|
1909
1904
|
for (let d = 0, f = c.length; d < f; d++) {
|
|
1910
1905
|
const p = new u(
|
|
1911
1906
|
c[d] + "." + O[i.path],
|
|
@@ -1929,13 +1924,13 @@ class Ls {
|
|
|
1929
1924
|
}
|
|
1930
1925
|
_createCubicSplineTrackInterpolant(e) {
|
|
1931
1926
|
e.createInterpolant = function(n) {
|
|
1932
|
-
const s = this instanceof be ?
|
|
1927
|
+
const s = this instanceof be ? gs : We;
|
|
1933
1928
|
return new s(this.times, this.values, this.getValueSize() / 3, n);
|
|
1934
1929
|
}, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
|
|
1935
1930
|
}
|
|
1936
1931
|
}
|
|
1937
|
-
function
|
|
1938
|
-
const n = e.attributes, s = new
|
|
1932
|
+
function bs(o, e, t) {
|
|
1933
|
+
const n = e.attributes, s = new Ht();
|
|
1939
1934
|
if (n.POSITION !== void 0) {
|
|
1940
1935
|
const a = t.json.accessors[n.POSITION], c = a.min, u = a.max;
|
|
1941
1936
|
if (c !== void 0 && u !== void 0) {
|
|
@@ -1972,7 +1967,7 @@ function vs(o, e, t) {
|
|
|
1972
1967
|
s.expandByVector(a);
|
|
1973
1968
|
}
|
|
1974
1969
|
o.boundingBox = s;
|
|
1975
|
-
const r = new
|
|
1970
|
+
const r = new Ut();
|
|
1976
1971
|
s.getCenter(r.center), r.radius = s.min.distanceTo(s.max) / 2, o.boundingSphere = r;
|
|
1977
1972
|
}
|
|
1978
1973
|
function Me(o, e, t) {
|
|
@@ -1992,18 +1987,18 @@ function Me(o, e, t) {
|
|
|
1992
1987
|
});
|
|
1993
1988
|
s.push(r);
|
|
1994
1989
|
}
|
|
1995
|
-
return he.workingColorSpace !== v && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${he.workingColorSpace}" not supported.`), C(o, e),
|
|
1996
|
-
return e.targets !== void 0 ?
|
|
1990
|
+
return he.workingColorSpace !== v && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${he.workingColorSpace}" not supported.`), C(o, e), bs(o, e, t), Promise.all(s).then(function() {
|
|
1991
|
+
return e.targets !== void 0 ? _s(o, e.targets, t) : o;
|
|
1997
1992
|
});
|
|
1998
1993
|
}
|
|
1999
|
-
var
|
|
2000
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
1994
|
+
var Ls = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, Ss = (o, e, t, n) => {
|
|
1995
|
+
for (var s = n > 1 ? void 0 : n ? vs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2001
1996
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2002
|
-
return n && s &&
|
|
1997
|
+
return n && s && Ls(e, t, s), s;
|
|
2003
1998
|
};
|
|
2004
1999
|
let J = class {
|
|
2005
2000
|
constructor() {
|
|
2006
|
-
_(this, "workerPool",
|
|
2001
|
+
_(this, "workerPool", Ye(void 0, !0));
|
|
2007
2002
|
_(this, "canvas");
|
|
2008
2003
|
_(this, "offscreenCanvas");
|
|
2009
2004
|
_(this, "worker");
|
|
@@ -2039,7 +2034,7 @@ let J = class {
|
|
|
2039
2034
|
mouseEventHandler(o) {
|
|
2040
2035
|
return {
|
|
2041
2036
|
...this.getScreenSizes(),
|
|
2042
|
-
...
|
|
2037
|
+
...V(o, [
|
|
2043
2038
|
"ctrlKey",
|
|
2044
2039
|
"metaKey",
|
|
2045
2040
|
"shiftKey",
|
|
@@ -2066,39 +2061,39 @@ let J = class {
|
|
|
2066
2061
|
wheelEventHandler(o) {
|
|
2067
2062
|
return o.preventDefault(), {
|
|
2068
2063
|
...this.getScreenSizes(),
|
|
2069
|
-
...
|
|
2064
|
+
...V(o, ["deltaX", "deltaY"])
|
|
2070
2065
|
};
|
|
2071
2066
|
}
|
|
2072
2067
|
keyEventHandler(o) {
|
|
2073
|
-
if (
|
|
2068
|
+
if (Qe.includes(o.code))
|
|
2074
2069
|
return o.preventDefault(), {
|
|
2075
2070
|
...this.getScreenSizes(),
|
|
2076
|
-
...
|
|
2071
|
+
...V(o, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
|
|
2077
2072
|
};
|
|
2078
2073
|
}
|
|
2079
2074
|
};
|
|
2080
|
-
J =
|
|
2081
|
-
|
|
2075
|
+
J = Ss([
|
|
2076
|
+
U(G.ContainerScoped)
|
|
2082
2077
|
], J);
|
|
2083
|
-
var
|
|
2084
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2078
|
+
var Cs = Object.defineProperty, Ms = Object.getOwnPropertyDescriptor, Is = (o, e, t, n) => {
|
|
2079
|
+
for (var s = n > 1 ? void 0 : n ? Ms(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2085
2080
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2086
|
-
return n && s &&
|
|
2087
|
-
},
|
|
2088
|
-
let ge = class extends
|
|
2081
|
+
return n && s && Cs(e, t, s), s;
|
|
2082
|
+
}, Os = (o, e) => (t, n) => e(t, n, o);
|
|
2083
|
+
let ge = class extends Je {
|
|
2089
2084
|
constructor(o) {
|
|
2090
2085
|
super(), this._service = o;
|
|
2091
2086
|
}
|
|
2092
2087
|
init() {
|
|
2093
|
-
for (const o of
|
|
2088
|
+
for (const o of Ie) {
|
|
2094
2089
|
const e = o.startsWith("mouse") || o.startsWith("pointer") || o.startsWith("touch") ? this._service.mouseEventHandler.bind(this._service) : o.startsWith("key") ? this._service.keyEventHandler.bind(this._service) : o === "resize" ? this._service.uiEventHandler.bind(this._service) : o === "wheel" ? this._service.wheelEventHandler.bind(this._service) : this._service.preventDefaultHandler.bind(this._service);
|
|
2095
|
-
this[`${o}$`] =
|
|
2090
|
+
this[`${o}$`] = Ze(
|
|
2096
2091
|
o === "resize" ? window : this._service.canvas,
|
|
2097
2092
|
o
|
|
2098
2093
|
).pipe(
|
|
2099
2094
|
// @ts-ignore
|
|
2100
2095
|
q(e.bind(this)),
|
|
2101
|
-
|
|
2096
|
+
Oe((t) => !(o === "keydown" && !t))
|
|
2102
2097
|
), this[`${o}$`].subscribe((t) => {
|
|
2103
2098
|
var n, s;
|
|
2104
2099
|
(s = (n = this._service.thread) == null ? void 0 : n[o]) == null || s.call(n, t);
|
|
@@ -2106,18 +2101,18 @@ let ge = class extends et {
|
|
|
2106
2101
|
}
|
|
2107
2102
|
}
|
|
2108
2103
|
};
|
|
2109
|
-
ge =
|
|
2110
|
-
|
|
2111
|
-
|
|
2104
|
+
ge = Is([
|
|
2105
|
+
U(G.ContainerScoped),
|
|
2106
|
+
Os(0, b(J))
|
|
2112
2107
|
], ge);
|
|
2113
|
-
var
|
|
2114
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2108
|
+
var Ns = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, Ds = (o, e, t, n) => {
|
|
2109
|
+
for (var s = n > 1 ? void 0 : n ? Ps(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2115
2110
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2116
|
-
return n && s &&
|
|
2111
|
+
return n && s && Ns(e, t, s), s;
|
|
2117
2112
|
};
|
|
2118
2113
|
let Z = class {
|
|
2119
2114
|
constructor() {
|
|
2120
|
-
_(this, "loadingManager", new
|
|
2115
|
+
_(this, "loadingManager", new Bt());
|
|
2121
2116
|
_(this, "loaders", {});
|
|
2122
2117
|
_(this, "sources", []);
|
|
2123
2118
|
_(this, "loadedResources", {});
|
|
@@ -2138,7 +2133,7 @@ let Z = class {
|
|
|
2138
2133
|
};
|
|
2139
2134
|
}
|
|
2140
2135
|
_initLoaders() {
|
|
2141
|
-
this.loaders.dracoLoader = new
|
|
2136
|
+
this.loaders.dracoLoader = new Kt(this.loadingManager), this.loaders.audioLoader = new jt(this.loadingManager), this.loaders.fontLoader = new et(this.loadingManager), this.loaders.gltfLoader = new zt(this.loadingManager), this.loaders.imageLoader = new Be(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
|
|
2142
2137
|
}
|
|
2143
2138
|
_initSources(o) {
|
|
2144
2139
|
this.sources = o, this.toLoadCount = this.sources.length, this.loadedCount = 0;
|
|
@@ -2188,17 +2183,17 @@ let Z = class {
|
|
|
2188
2183
|
}
|
|
2189
2184
|
}
|
|
2190
2185
|
};
|
|
2191
|
-
Z =
|
|
2192
|
-
|
|
2186
|
+
Z = Ds([
|
|
2187
|
+
U(G.ContainerScoped)
|
|
2193
2188
|
], Z);
|
|
2194
|
-
var
|
|
2195
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2189
|
+
var ks = Object.defineProperty, Fs = Object.getOwnPropertyDescriptor, Hs = (o, e, t, n) => {
|
|
2190
|
+
for (var s = n > 1 ? void 0 : n ? Fs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2196
2191
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2197
|
-
return n && s &&
|
|
2198
|
-
},
|
|
2192
|
+
return n && s && ks(e, t, s), s;
|
|
2193
|
+
}, Us = (o, e) => (t, n) => e(t, n, o);
|
|
2199
2194
|
let ee = class {
|
|
2200
2195
|
constructor(o) {
|
|
2201
|
-
_(this, "load$$", new
|
|
2196
|
+
_(this, "load$$", new tt());
|
|
2202
2197
|
_(this, "load$", this.load$$.pipe(
|
|
2203
2198
|
q((o) => ({
|
|
2204
2199
|
...o,
|
|
@@ -2235,7 +2230,7 @@ let ee = class {
|
|
|
2235
2230
|
sampleRate: o.resource.sampleRate,
|
|
2236
2231
|
duration: o.resource.duration
|
|
2237
2232
|
}), ((s = o == null ? void 0 : o.source) == null ? void 0 : s.type) === "video" && o.resource instanceof HTMLVideoElement && (e = {
|
|
2238
|
-
...
|
|
2233
|
+
...V(o.resource, [
|
|
2239
2234
|
"autoplay",
|
|
2240
2235
|
"baseURI",
|
|
2241
2236
|
"controls",
|
|
@@ -2269,7 +2264,7 @@ let ee = class {
|
|
|
2269
2264
|
"width"
|
|
2270
2265
|
]),
|
|
2271
2266
|
buffered: o.resource.buffered.length,
|
|
2272
|
-
error: o.resource.error ?
|
|
2267
|
+
error: o.resource.error ? Ne(o.resource.error, []) : {},
|
|
2273
2268
|
played: o.resource.played.length,
|
|
2274
2269
|
seekable: o.resource.seekable.length,
|
|
2275
2270
|
textTracks: o.resource.textTracks.length
|
|
@@ -2281,9 +2276,9 @@ let ee = class {
|
|
|
2281
2276
|
se()
|
|
2282
2277
|
));
|
|
2283
2278
|
_(this, "loadCompleted$", this.load$.pipe(
|
|
2284
|
-
|
|
2279
|
+
Oe((o) => o.toLoadCount === o.loadedCount),
|
|
2285
2280
|
q(
|
|
2286
|
-
() =>
|
|
2281
|
+
() => V(this._service, [
|
|
2287
2282
|
"loadedCount",
|
|
2288
2283
|
"loadedResources",
|
|
2289
2284
|
"toLoadCount"
|
|
@@ -2294,14 +2289,14 @@ let ee = class {
|
|
|
2294
2289
|
this._service = o;
|
|
2295
2290
|
}
|
|
2296
2291
|
};
|
|
2297
|
-
ee =
|
|
2298
|
-
|
|
2299
|
-
|
|
2292
|
+
ee = Hs([
|
|
2293
|
+
U(G.ContainerScoped),
|
|
2294
|
+
Us(0, b(Z))
|
|
2300
2295
|
], ee);
|
|
2301
|
-
var
|
|
2302
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2296
|
+
var Gs = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, js = (o, e, t, n) => {
|
|
2297
|
+
for (var s = n > 1 ? void 0 : n ? Bs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2303
2298
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2304
|
-
return n && s &&
|
|
2299
|
+
return n && s && Gs(e, t, s), s;
|
|
2305
2300
|
}, ue = (o, e) => (t, n) => e(t, n, o);
|
|
2306
2301
|
let Ae = class {
|
|
2307
2302
|
constructor(o, e, t) {
|
|
@@ -2351,18 +2346,18 @@ let Ae = class {
|
|
|
2351
2346
|
this._subscriptions.forEach((o) => o.unsubscribe()), this._controller.load$$.complete();
|
|
2352
2347
|
}
|
|
2353
2348
|
};
|
|
2354
|
-
Ae =
|
|
2355
|
-
|
|
2349
|
+
Ae = js([
|
|
2350
|
+
U(G.ContainerScoped),
|
|
2356
2351
|
ue(0, b(ee)),
|
|
2357
2352
|
ue(1, b(Z)),
|
|
2358
2353
|
ue(2, b(_e))
|
|
2359
2354
|
], Ae);
|
|
2360
|
-
var
|
|
2361
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2355
|
+
var Ks = Object.defineProperty, Vs = Object.getOwnPropertyDescriptor, zs = (o, e, t, n) => {
|
|
2356
|
+
for (var s = n > 1 ? void 0 : n ? Vs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2362
2357
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2363
|
-
return n && s &&
|
|
2358
|
+
return n && s && Ks(e, t, s), s;
|
|
2364
2359
|
}, k = (o, e) => (t, n) => e(t, n, o);
|
|
2365
|
-
let Te = class extends
|
|
2360
|
+
let Te = class extends st {
|
|
2366
2361
|
constructor(e, t, n, s, i, r) {
|
|
2367
2362
|
super();
|
|
2368
2363
|
_(this, "_subscriptions", []);
|
|
@@ -2409,7 +2404,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
|
|
|
2409
2404
|
payload: {
|
|
2410
2405
|
path: this.props.location,
|
|
2411
2406
|
subject: {
|
|
2412
|
-
...
|
|
2407
|
+
...Ne(this.props, [
|
|
2413
2408
|
"canvas",
|
|
2414
2409
|
"location",
|
|
2415
2410
|
"onReady",
|
|
@@ -2425,7 +2420,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
|
|
|
2425
2420
|
this._service.worker = e.worker, this._service.thread = e.thread;
|
|
2426
2421
|
}
|
|
2427
2422
|
async _initObservableProxyEvents() {
|
|
2428
|
-
|
|
2423
|
+
Ie.forEach(
|
|
2429
2424
|
(e) => this[`${e}$`] = () => {
|
|
2430
2425
|
var t;
|
|
2431
2426
|
return (t = this._controller) == null ? void 0 : t[`${e}$`];
|
|
@@ -2441,7 +2436,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
|
|
|
2441
2436
|
e.resource
|
|
2442
2437
|
]);
|
|
2443
2438
|
(n = this._service.worker) == null || n.postMessage({
|
|
2444
|
-
token:
|
|
2439
|
+
token: nt,
|
|
2445
2440
|
payload: e
|
|
2446
2441
|
});
|
|
2447
2442
|
})
|
|
@@ -2474,22 +2469,22 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
|
|
|
2474
2469
|
this._subscriptions.map((t) => t.unsubscribe()), await this._service.workerPool.terminateAll(), ((e = this._service.canvas) == null ? void 0 : e.dataset.reactive) === "true" && (document.body.removeChild(this._service.canvas), this._service.canvas.remove(), this._service.canvas = void 0), this._initialized = !1;
|
|
2475
2470
|
}
|
|
2476
2471
|
};
|
|
2477
|
-
Te =
|
|
2478
|
-
|
|
2472
|
+
Te = zs([
|
|
2473
|
+
U(G.ContainerScoped),
|
|
2479
2474
|
k(0, b(J)),
|
|
2480
2475
|
k(1, b(ge)),
|
|
2481
2476
|
k(2, b(ee)),
|
|
2482
|
-
k(3, b(
|
|
2477
|
+
k(3, b(Pe)),
|
|
2483
2478
|
k(4, b(_e)),
|
|
2484
2479
|
k(5, b(Ae))
|
|
2485
2480
|
], Te);
|
|
2486
|
-
const
|
|
2481
|
+
const Ys = (o) => {
|
|
2487
2482
|
if (typeof (o == null ? void 0 : o.location) != "string" && !((o == null ? void 0 : o.location) instanceof URL))
|
|
2488
2483
|
throw new Error(
|
|
2489
2484
|
"Invalid register props detected. location path is required"
|
|
2490
2485
|
);
|
|
2491
|
-
const e =
|
|
2492
|
-
o.initOnConstruct = W(o.initOnConstruct) || !$(o.initOnConstruct) ? !0 : o.initOnConstruct, o.defaultCamera = o != null && o.defaultCamera && o.defaultCamera in Ee ? o.defaultCamera : Ee.PERSPECTIVE, o.withMiniCamera = W(o.withMiniCamera) || !$(o.withMiniCamera) ? !1 : o.withMiniCamera, o.startTimer = W(o.startTimer) || !$(o.startTimer) ? !0 : o.startTimer, o.fullScreen = W(o.fullScreen) || !$(o.fullScreen) ? !0 : o.fullScreen, o.onReady =
|
|
2486
|
+
const e = rt.createChildContainer();
|
|
2487
|
+
o.initOnConstruct = W(o.initOnConstruct) || !$(o.initOnConstruct) ? !0 : o.initOnConstruct, o.defaultCamera = o != null && o.defaultCamera && o.defaultCamera in Ee ? o.defaultCamera : Ee.PERSPECTIVE, o.withMiniCamera = W(o.withMiniCamera) || !$(o.withMiniCamera) ? !1 : o.withMiniCamera, o.startTimer = W(o.startTimer) || !$(o.startTimer) ? !0 : o.startTimer, o.fullScreen = W(o.fullScreen) || !$(o.fullScreen) ? !0 : o.fullScreen, o.onReady = it(o.onReady) ? o.onReady : void 0, e.register(Pe, { useValue: e }), e.register(_e, { useValue: o });
|
|
2493
2488
|
const t = e.resolve(Te);
|
|
2494
2489
|
return {
|
|
2495
2490
|
container: e,
|
|
@@ -2497,19 +2492,19 @@ const Js = (o) => {
|
|
|
2497
2492
|
};
|
|
2498
2493
|
};
|
|
2499
2494
|
export {
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2495
|
+
Zs as AppModule,
|
|
2496
|
+
en as AppProxyEventHandlersBlueprint,
|
|
2497
|
+
Pe as CONTAINER_TOKEN,
|
|
2503
2498
|
Ee as DefaultCameraType,
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2499
|
+
Qe as KEYBOARD_EVENT_CODES,
|
|
2500
|
+
nt as LOADER_SERIALIZED_LOAD_TOKEN,
|
|
2501
|
+
qs as LaunchAppProps,
|
|
2502
|
+
Ie as PROXY_EVENT_LISTENERS,
|
|
2503
|
+
Je as ProxyEventHandlersBlueprint,
|
|
2504
|
+
tn as ProxyEventObservablesBlueprint,
|
|
2505
|
+
sn as ProxyEventSubjectsBlueprint,
|
|
2511
2506
|
Te as RegisterModule,
|
|
2512
2507
|
_e as RegisterPropsBlueprint,
|
|
2513
|
-
|
|
2514
|
-
|
|
2508
|
+
st as RegisterProxyEventHandlersBlueprint,
|
|
2509
|
+
Ys as register
|
|
2515
2510
|
};
|