@quick-threejs/reactive 0.1.37 → 0.1.38
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/{app.module-ThBQE5Lm.js → app.module-BHIYNoTs.js} +1 -1
- package/dist/{app.module-CA2jMGzR.mjs → app.module-Cuyp2CTi.mjs} +4 -6
- package/dist/core/app/app.module.d.ts +1 -3
- package/dist/core/app/debug/debug.module.d.ts +1 -3
- package/dist/core/app/loader/loader.controller.d.ts +1 -3
- package/dist/core/app/loader/loader.module.d.ts +1 -3
- package/dist/core/app/timer/timer.controller.d.ts +1 -3
- package/dist/core/app/timer/timer.module.d.ts +1 -3
- package/dist/core/register/loader/loader.module.d.ts +2 -1
- package/dist/core/register/register.service.d.ts +8 -38
- package/dist/main.js +3 -3
- package/dist/main.mjs +162 -157
- package/dist/worker.js +1 -1
- package/dist/worker.mjs +1 -1
- package/package.json +2 -2
package/dist/main.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = (o, e, t) =>
|
|
4
|
-
import { s as U, L as G,
|
|
5
|
-
import { j as
|
|
6
|
-
import { TrianglesDrawMode as
|
|
7
|
-
class
|
|
1
|
+
var qe = Object.defineProperty;
|
|
2
|
+
var Ye = (o, e, t) => e in o ? qe(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var _ = (o, e, t) => Ye(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { s as U, L as G, i as y, C as Qe, J as V, K as Je, P as Ze, a as Ie, f as et, m as q, b as Oe, F as tt, S as st, c as ne, W as Re, U as Ne, R as nt, d as rt, e as Pe, g as it, A as W, D as $, h as Ee, Q as ot } from "./app.module-Cuyp2CTi.mjs";
|
|
5
|
+
import { j as en, n as tn, l as sn, k as nn } from "./app.module-Cuyp2CTi.mjs";
|
|
6
|
+
import { TrianglesDrawMode as at, TriangleFanDrawMode as he, 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 de, LoaderUtils as X, SpotLight as ct, PointLight as ut, DirectionalLight as lt, MeshBasicMaterial as K, MeshPhysicalMaterial as S, Vector2 as He, Matrix4 as Q, Vector3 as F, Quaternion as Ue, InstancedMesh as ht, InstancedBufferAttribute as dt, Object3D as Ge, TextureLoader as ft, ImageBitmapLoader as Be, InterleavedBuffer as pt, InterleavedBufferAttribute as mt, LinearFilter as fe, LinearMipmapLinearFilter as je, RepeatWrapping as pe, NearestFilter as Ke, PointsMaterial as gt, Material as re, LineBasicMaterial as At, MeshStandardMaterial as Ve, DoubleSide as Tt, PropertyBinding as _t, SkinnedMesh as Rt, Mesh as Et, LineSegments as wt, Line as xt, LineLoop as yt, Points as bt, Group as ie, PerspectiveCamera as Lt, MathUtils as vt, OrthographicCamera as St, Skeleton as Ct, AnimationClip as Mt, Bone as It, InterpolateLinear as ze, NearestMipmapNearestFilter as Ot, LinearMipmapNearestFilter as Nt, NearestMipmapLinearFilter as Pt, ClampToEdgeWrapping as Dt, MirroredRepeatWrapping as kt, InterpolateDiscrete as Ft, FrontSide as Ht, Texture as we, VectorKeyframeTrack as xe, NumberKeyframeTrack as ye, QuaternionKeyframeTrack as be, Box3 as Ut, Sphere as Gt, Interpolant as Bt, LoadingManager as jt, AudioLoader as Kt } from "three";
|
|
7
|
+
class te {
|
|
8
8
|
constructor() {
|
|
9
9
|
/**
|
|
10
10
|
* @description The app worker logic location.
|
|
@@ -110,16 +110,16 @@ class _e {
|
|
|
110
110
|
_(this, "onReady");
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
class
|
|
113
|
+
class Ys {
|
|
114
114
|
constructor() {
|
|
115
115
|
/** @description Handler triggered when the app is ready. */
|
|
116
116
|
_(this, "onReady");
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
function Le(o, e) {
|
|
120
|
-
if (e ===
|
|
120
|
+
if (e === at)
|
|
121
121
|
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), o;
|
|
122
|
-
if (e ===
|
|
122
|
+
if (e === he || e === De) {
|
|
123
123
|
let t = o.getIndex();
|
|
124
124
|
if (t === null) {
|
|
125
125
|
const r = [], a = o.getAttribute("position");
|
|
@@ -131,7 +131,7 @@ function Le(o, e) {
|
|
|
131
131
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), o;
|
|
132
132
|
}
|
|
133
133
|
const n = t.count - 2, s = [];
|
|
134
|
-
if (e ===
|
|
134
|
+
if (e === he)
|
|
135
135
|
for (let r = 1; r <= n; r++)
|
|
136
136
|
s.push(t.getX(0)), s.push(t.getX(r)), s.push(t.getX(r + 1));
|
|
137
137
|
else
|
|
@@ -143,8 +143,8 @@ function Le(o, e) {
|
|
|
143
143
|
} else
|
|
144
144
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), o;
|
|
145
145
|
}
|
|
146
|
-
const
|
|
147
|
-
class
|
|
146
|
+
const oe = /* @__PURE__ */ new WeakMap();
|
|
147
|
+
class Xe extends ke {
|
|
148
148
|
constructor(e) {
|
|
149
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 = {
|
|
150
150
|
position: "POSITION",
|
|
@@ -189,8 +189,8 @@ class Kt extends ke {
|
|
|
189
189
|
}
|
|
190
190
|
decodeGeometry(e, t) {
|
|
191
191
|
const n = JSON.stringify(t);
|
|
192
|
-
if (
|
|
193
|
-
const c =
|
|
192
|
+
if (oe.has(e)) {
|
|
193
|
+
const c = oe.get(e);
|
|
194
194
|
if (c.key === n)
|
|
195
195
|
return c.promise;
|
|
196
196
|
if (e.byteLength === 0)
|
|
@@ -204,7 +204,7 @@ class Kt extends ke {
|
|
|
204
204
|
}))).then((c) => this._createGeometry(c.geometry));
|
|
205
205
|
return a.catch(() => !0).then(() => {
|
|
206
206
|
s && i && this._releaseTask(s, i);
|
|
207
|
-
}),
|
|
207
|
+
}), oe.set(e, {
|
|
208
208
|
key: n,
|
|
209
209
|
promise: a
|
|
210
210
|
}), a;
|
|
@@ -222,7 +222,7 @@ class Kt extends ke {
|
|
|
222
222
|
if (t !== N) return;
|
|
223
223
|
const n = new P();
|
|
224
224
|
for (let s = 0, i = e.count; s < i; s++)
|
|
225
|
-
n.fromBufferAttribute(e, s),
|
|
225
|
+
n.fromBufferAttribute(e, s), de.toWorkingColorSpace(n, N), e.setXYZ(s, n.r, n.g, n.b);
|
|
226
226
|
}
|
|
227
227
|
_loadLibrary(e, t) {
|
|
228
228
|
const n = new Y(this.manager);
|
|
@@ -460,7 +460,7 @@ class zt extends ke {
|
|
|
460
460
|
if (typeof e == "string")
|
|
461
461
|
i = JSON.parse(e);
|
|
462
462
|
else if (e instanceof ArrayBuffer)
|
|
463
|
-
if (c.decode(new Uint8Array(e, 0, 4)) ===
|
|
463
|
+
if (c.decode(new Uint8Array(e, 0, 4)) === We) {
|
|
464
464
|
try {
|
|
465
465
|
r[T.KHR_BINARY_GLTF] = new hs(e);
|
|
466
466
|
} catch (l) {
|
|
@@ -581,13 +581,13 @@ class Wt {
|
|
|
581
581
|
const l = c.range !== void 0 ? c.range : 0;
|
|
582
582
|
switch (c.type) {
|
|
583
583
|
case "directional":
|
|
584
|
-
u = new
|
|
584
|
+
u = new lt(h), u.target.position.set(0, 0, -1), u.add(u.target);
|
|
585
585
|
break;
|
|
586
586
|
case "point":
|
|
587
|
-
u = new
|
|
587
|
+
u = new ut(h), u.distance = l;
|
|
588
588
|
break;
|
|
589
589
|
case "spot":
|
|
590
|
-
u = new
|
|
590
|
+
u = new ct(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);
|
|
591
591
|
break;
|
|
592
592
|
default:
|
|
593
593
|
throw new Error("THREE.GLTFLoader: Unexpected light type: " + c.type);
|
|
@@ -933,13 +933,13 @@ class ls {
|
|
|
933
933
|
return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((u) => {
|
|
934
934
|
const h = u.pop(), l = h.isGroup ? h.children : [h], d = u[0].count, f = [];
|
|
935
935
|
for (const p of l) {
|
|
936
|
-
const A = new Q(), m = new F(), g = new Ue(), R = new F(1, 1, 1), w = new
|
|
936
|
+
const A = new Q(), m = new F(), g = new Ue(), R = new F(1, 1, 1), w = new ht(p.geometry, p.material, d);
|
|
937
937
|
for (let E = 0; E < d; E++)
|
|
938
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));
|
|
939
939
|
for (const E in c)
|
|
940
940
|
if (E === "_COLOR_0") {
|
|
941
941
|
const L = c[E];
|
|
942
|
-
w.instanceColor = new
|
|
942
|
+
w.instanceColor = new dt(L.array, L.itemSize, L.normalized);
|
|
943
943
|
} else E !== "TRANSLATION" && E !== "ROTATION" && E !== "SCALE" && p.geometry.setAttribute(E, c[E]);
|
|
944
944
|
Ge.prototype.copy.call(w, p), this.parser.assignFinalMaterial(w), f.push(w);
|
|
945
945
|
}
|
|
@@ -947,7 +947,7 @@ class ls {
|
|
|
947
947
|
}));
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
const
|
|
950
|
+
const We = "glTF", j = 12, ve = { JSON: 1313821514, BIN: 5130562 };
|
|
951
951
|
class hs {
|
|
952
952
|
constructor(e) {
|
|
953
953
|
this.name = T.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
@@ -956,7 +956,7 @@ class hs {
|
|
|
956
956
|
magic: n.decode(new Uint8Array(e.slice(0, 4))),
|
|
957
957
|
version: t.getUint32(4, !0),
|
|
958
958
|
length: t.getUint32(8, !0)
|
|
959
|
-
}, this.header.magic !==
|
|
959
|
+
}, this.header.magic !== We)
|
|
960
960
|
throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
|
|
961
961
|
if (this.header.version < 2)
|
|
962
962
|
throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
|
|
@@ -988,11 +988,11 @@ class ds {
|
|
|
988
988
|
decodePrimitive(e, t) {
|
|
989
989
|
const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, r = e.extensions[this.name].attributes, a = {}, c = {}, u = {};
|
|
990
990
|
for (const h in r) {
|
|
991
|
-
const l =
|
|
991
|
+
const l = me[h] || h.toLowerCase();
|
|
992
992
|
a[l] = r[h];
|
|
993
993
|
}
|
|
994
994
|
for (const h in e.attributes) {
|
|
995
|
-
const l =
|
|
995
|
+
const l = me[h] || h.toLowerCase();
|
|
996
996
|
if (r[h] !== void 0) {
|
|
997
997
|
const d = n.accessors[e.attributes[h]], f = H[d.componentType];
|
|
998
998
|
u[l] = f.name, c[l] = d.normalized === !0;
|
|
@@ -1024,7 +1024,7 @@ class ps {
|
|
|
1024
1024
|
this.name = T.KHR_MESH_QUANTIZATION;
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
|
-
class
|
|
1027
|
+
class $e extends Bt {
|
|
1028
1028
|
constructor(e, t, n, s) {
|
|
1029
1029
|
super(e, t, n, s);
|
|
1030
1030
|
}
|
|
@@ -1037,14 +1037,14 @@ class We extends Gt {
|
|
|
1037
1037
|
interpolate_(e, t, n, s) {
|
|
1038
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;
|
|
1039
1039
|
for (let E = 0; E !== a; E++) {
|
|
1040
|
-
const L = r[A + E + a], M = r[A + E + c] * h,
|
|
1041
|
-
i[E] = R * L + w * M + m *
|
|
1040
|
+
const L = r[A + E + a], M = r[A + E + c] * h, b = r[p + E + a], B = r[p + E] * h;
|
|
1041
|
+
i[E] = R * L + w * M + m * b + g * B;
|
|
1042
1042
|
}
|
|
1043
1043
|
return i;
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
const ms = new Ue();
|
|
1047
|
-
class gs extends
|
|
1047
|
+
class gs extends $e {
|
|
1048
1048
|
interpolate_(e, t, n, s) {
|
|
1049
1049
|
const i = super.interpolate_(e, t, n, s);
|
|
1050
1050
|
return ms.fromArray(i).normalize().toArray(i), i;
|
|
@@ -1079,16 +1079,16 @@ const x = {
|
|
|
1079
1079
|
5126: Float32Array
|
|
1080
1080
|
}, Se = {
|
|
1081
1081
|
9728: Ke,
|
|
1082
|
-
9729:
|
|
1083
|
-
9984:
|
|
1084
|
-
9985:
|
|
1085
|
-
9986:
|
|
1082
|
+
9729: fe,
|
|
1083
|
+
9984: Ot,
|
|
1084
|
+
9985: Nt,
|
|
1085
|
+
9986: Pt,
|
|
1086
1086
|
9987: je
|
|
1087
1087
|
}, Ce = {
|
|
1088
|
-
33071:
|
|
1089
|
-
33648:
|
|
1090
|
-
10497:
|
|
1091
|
-
},
|
|
1088
|
+
33071: Dt,
|
|
1089
|
+
33648: kt,
|
|
1090
|
+
10497: pe
|
|
1091
|
+
}, ae = {
|
|
1092
1092
|
SCALAR: 1,
|
|
1093
1093
|
VEC2: 2,
|
|
1094
1094
|
VEC3: 3,
|
|
@@ -1096,7 +1096,7 @@ const x = {
|
|
|
1096
1096
|
MAT2: 4,
|
|
1097
1097
|
MAT3: 9,
|
|
1098
1098
|
MAT4: 16
|
|
1099
|
-
},
|
|
1099
|
+
}, me = {
|
|
1100
1100
|
POSITION: "position",
|
|
1101
1101
|
NORMAL: "normal",
|
|
1102
1102
|
TANGENT: "tangent",
|
|
@@ -1117,8 +1117,8 @@ const x = {
|
|
|
1117
1117
|
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
1118
1118
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
1119
1119
|
LINEAR: ze,
|
|
1120
|
-
STEP:
|
|
1121
|
-
},
|
|
1120
|
+
STEP: Ft
|
|
1121
|
+
}, ce = {
|
|
1122
1122
|
OPAQUE: "OPAQUE",
|
|
1123
1123
|
MASK: "MASK",
|
|
1124
1124
|
BLEND: "BLEND"
|
|
@@ -1131,7 +1131,7 @@ function Ts(o) {
|
|
|
1131
1131
|
roughness: 1,
|
|
1132
1132
|
transparent: !1,
|
|
1133
1133
|
depthTest: !0,
|
|
1134
|
-
side:
|
|
1134
|
+
side: Ht
|
|
1135
1135
|
})), o.DefaultMaterial;
|
|
1136
1136
|
}
|
|
1137
1137
|
function D(o, e, t) {
|
|
@@ -1190,19 +1190,19 @@ function Rs(o, e) {
|
|
|
1190
1190
|
function Es(o) {
|
|
1191
1191
|
let e;
|
|
1192
1192
|
const t = o.extensions && o.extensions[T.KHR_DRACO_MESH_COMPRESSION];
|
|
1193
|
-
if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" +
|
|
1193
|
+
if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ue(t.attributes) : e = o.indices + ":" + ue(o.attributes) + ":" + o.mode, o.targets !== void 0)
|
|
1194
1194
|
for (let n = 0, s = o.targets.length; n < s; n++)
|
|
1195
|
-
e += ":" +
|
|
1195
|
+
e += ":" + ue(o.targets[n]);
|
|
1196
1196
|
return e;
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function ue(o) {
|
|
1199
1199
|
let e = "";
|
|
1200
1200
|
const t = Object.keys(o).sort();
|
|
1201
1201
|
for (let n = 0, s = t.length; n < s; n++)
|
|
1202
1202
|
e += t[n] + ":" + o[t[n]] + ";";
|
|
1203
1203
|
return e;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function ge(o) {
|
|
1206
1206
|
switch (o) {
|
|
1207
1207
|
case Int8Array:
|
|
1208
1208
|
return 1 / 127;
|
|
@@ -1230,7 +1230,7 @@ class ys {
|
|
|
1230
1230
|
const c = a.match(/Version\/(\d+)/);
|
|
1231
1231
|
s = n && c ? parseInt(c[1], 10) : -1, i = a.indexOf("Firefox") > -1, r = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
|
|
1232
1232
|
}
|
|
1233
|
-
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 ft(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);
|
|
1234
1234
|
}
|
|
1235
1235
|
setExtensions(e) {
|
|
1236
1236
|
this.extensions = e;
|
|
@@ -1456,25 +1456,25 @@ class ys {
|
|
|
1456
1456
|
loadAccessor(e) {
|
|
1457
1457
|
const t = this, n = this.json, s = this.json.accessors[e];
|
|
1458
1458
|
if (s.bufferView === void 0 && s.sparse === void 0) {
|
|
1459
|
-
const r =
|
|
1459
|
+
const r = ae[s.type], a = H[s.componentType], c = s.normalized === !0, u = new a(s.count * r);
|
|
1460
1460
|
return Promise.resolve(new z(u, r, c));
|
|
1461
1461
|
}
|
|
1462
1462
|
const i = [];
|
|
1463
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) {
|
|
1464
|
-
const a = r[0], c =
|
|
1464
|
+
const a = r[0], c = ae[s.type], u = H[s.componentType], h = u.BYTES_PER_ELEMENT, l = h * c, d = s.byteOffset || 0, f = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, p = s.normalized === !0;
|
|
1465
1465
|
let A, m;
|
|
1466
1466
|
if (f && f !== l) {
|
|
1467
1467
|
const g = Math.floor(d / f), R = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + g + ":" + s.count;
|
|
1468
1468
|
let w = t.cache.get(R);
|
|
1469
|
-
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 pt(A, f / h), t.cache.add(R, w)), m = new mt(w, c, d % f / h, p);
|
|
1470
1470
|
} else
|
|
1471
1471
|
a === null ? A = new u(s.count * c) : A = new u(a, d, s.count * c), m = new z(A, c, p);
|
|
1472
1472
|
if (s.sparse !== void 0) {
|
|
1473
|
-
const g =
|
|
1473
|
+
const g = ae.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);
|
|
1474
1474
|
a !== null && (m = new z(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
|
|
1475
|
-
for (let
|
|
1476
|
-
const I = L[
|
|
1477
|
-
if (m.setX(I, M[
|
|
1475
|
+
for (let b = 0, B = L.length; b < B; b++) {
|
|
1476
|
+
const I = L[b];
|
|
1477
|
+
if (m.setX(I, M[b * c]), c >= 2 && m.setY(I, M[b * c + 1]), c >= 3 && m.setZ(I, M[b * c + 2]), c >= 4 && m.setW(I, M[b * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
1478
1478
|
}
|
|
1479
1479
|
m.normalized = p;
|
|
1480
1480
|
}
|
|
@@ -1502,7 +1502,7 @@ class ys {
|
|
|
1502
1502
|
const u = this.loadImageSource(t, n).then(function(h) {
|
|
1503
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);
|
|
1504
1504
|
const d = (i.samplers || {})[r.sampler] || {};
|
|
1505
|
-
return h.magFilter = Se[d.magFilter] ||
|
|
1505
|
+
return h.magFilter = Se[d.magFilter] || fe, h.minFilter = Se[d.minFilter] || je, h.wrapS = Ce[d.wrapS] || pe, h.wrapT = Ce[d.wrapT] || pe, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== Ke && h.minFilter !== fe, s.associations.set(h, { textures: e }), h;
|
|
1506
1506
|
}).catch(function() {
|
|
1507
1507
|
return null;
|
|
1508
1508
|
});
|
|
@@ -1575,11 +1575,11 @@ class ys {
|
|
|
1575
1575
|
if (e.isPoints) {
|
|
1576
1576
|
const a = "PointsMaterial:" + n.uuid;
|
|
1577
1577
|
let c = this.cache.get(a);
|
|
1578
|
-
c || (c = new
|
|
1578
|
+
c || (c = new gt(), re.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, c.sizeAttenuation = !1, this.cache.add(a, c)), n = c;
|
|
1579
1579
|
} else if (e.isLine) {
|
|
1580
1580
|
const a = "LineBasicMaterial:" + n.uuid;
|
|
1581
1581
|
let c = this.cache.get(a);
|
|
1582
|
-
c || (c = new
|
|
1582
|
+
c || (c = new At(), re.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, this.cache.add(a, c)), n = c;
|
|
1583
1583
|
}
|
|
1584
1584
|
if (s || i || r) {
|
|
1585
1585
|
let a = "ClonedMaterial:" + n.uuid + ":";
|
|
@@ -1616,9 +1616,9 @@ class ys {
|
|
|
1616
1616
|
return d.extendMaterialParams && d.extendMaterialParams(e, a);
|
|
1617
1617
|
})));
|
|
1618
1618
|
}
|
|
1619
|
-
i.doubleSided === !0 && (a.side =
|
|
1620
|
-
const h = i.alphaMode ||
|
|
1621
|
-
if (h ===
|
|
1619
|
+
i.doubleSided === !0 && (a.side = Tt);
|
|
1620
|
+
const h = i.alphaMode || ce.OPAQUE;
|
|
1621
|
+
if (h === ce.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, h === ce.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)) {
|
|
1622
1622
|
const l = i.normalTexture.scale;
|
|
1623
1623
|
a.normalScale.set(l, l);
|
|
1624
1624
|
}
|
|
@@ -1638,7 +1638,7 @@ class ys {
|
|
|
1638
1638
|
* @return {String}
|
|
1639
1639
|
*/
|
|
1640
1640
|
createUniqueName(e) {
|
|
1641
|
-
const t =
|
|
1641
|
+
const t = _t.sanitizeNodeName(e || "");
|
|
1642
1642
|
return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
|
|
1643
1643
|
}
|
|
1644
1644
|
/**
|
|
@@ -1686,15 +1686,15 @@ class ys {
|
|
|
1686
1686
|
let g;
|
|
1687
1687
|
const R = u[f];
|
|
1688
1688
|
if (m.mode === x.TRIANGLES || m.mode === x.TRIANGLE_STRIP || m.mode === x.TRIANGLE_FAN || m.mode === void 0)
|
|
1689
|
-
g = i.isSkinnedMesh === !0 ? new
|
|
1689
|
+
g = i.isSkinnedMesh === !0 ? new Rt(A, R) : new Et(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, he));
|
|
1690
1690
|
else if (m.mode === x.LINES)
|
|
1691
|
-
g = new Et(A, R);
|
|
1692
|
-
else if (m.mode === x.LINE_STRIP)
|
|
1693
1691
|
g = new wt(A, R);
|
|
1694
|
-
else if (m.mode === x.
|
|
1692
|
+
else if (m.mode === x.LINE_STRIP)
|
|
1695
1693
|
g = new xt(A, R);
|
|
1696
|
-
else if (m.mode === x.
|
|
1694
|
+
else if (m.mode === x.LINE_LOOP)
|
|
1697
1695
|
g = new yt(A, R);
|
|
1696
|
+
else if (m.mode === x.POINTS)
|
|
1697
|
+
g = new bt(A, R);
|
|
1698
1698
|
else
|
|
1699
1699
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
|
|
1700
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,7 +1706,7 @@ class ys {
|
|
|
1706
1706
|
});
|
|
1707
1707
|
if (l.length === 1)
|
|
1708
1708
|
return i.extensions && D(s, l[0], i), l[0];
|
|
1709
|
-
const d = new
|
|
1709
|
+
const d = new ie();
|
|
1710
1710
|
i.extensions && D(s, d, i), t.associations.set(d, { meshes: e });
|
|
1711
1711
|
for (let f = 0, p = l.length; f < p; f++)
|
|
1712
1712
|
d.add(l[f]);
|
|
@@ -1725,7 +1725,7 @@ class ys {
|
|
|
1725
1725
|
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
1726
1726
|
return;
|
|
1727
1727
|
}
|
|
1728
|
-
return n.type === "perspective" ? t = new
|
|
1728
|
+
return n.type === "perspective" ? t = new Lt(vt.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new St(-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);
|
|
1729
1729
|
}
|
|
1730
1730
|
/**
|
|
1731
1731
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
@@ -1747,7 +1747,7 @@ class ys {
|
|
|
1747
1747
|
} else
|
|
1748
1748
|
console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[u]);
|
|
1749
1749
|
}
|
|
1750
|
-
return new
|
|
1750
|
+
return new Ct(a, c);
|
|
1751
1751
|
});
|
|
1752
1752
|
}
|
|
1753
1753
|
/**
|
|
@@ -1770,15 +1770,15 @@ class ys {
|
|
|
1770
1770
|
]).then(function(l) {
|
|
1771
1771
|
const d = l[0], f = l[1], p = l[2], A = l[3], m = l[4], g = [];
|
|
1772
1772
|
for (let R = 0, w = d.length; R < w; R++) {
|
|
1773
|
-
const E = d[R], L = f[R], M = p[R],
|
|
1773
|
+
const E = d[R], L = f[R], M = p[R], b = A[R], B = m[R];
|
|
1774
1774
|
if (E === void 0) continue;
|
|
1775
1775
|
E.updateMatrix && E.updateMatrix();
|
|
1776
|
-
const I = n._createAnimationTracks(E, L, M,
|
|
1776
|
+
const I = n._createAnimationTracks(E, L, M, b, B);
|
|
1777
1777
|
if (I)
|
|
1778
|
-
for (let
|
|
1779
|
-
g.push(I[
|
|
1778
|
+
for (let se = 0; se < I.length; se++)
|
|
1779
|
+
g.push(I[se]);
|
|
1780
1780
|
}
|
|
1781
|
-
return new
|
|
1781
|
+
return new Mt(i, void 0, g);
|
|
1782
1782
|
});
|
|
1783
1783
|
}
|
|
1784
1784
|
createNodeMesh(e) {
|
|
@@ -1833,7 +1833,7 @@ class ys {
|
|
|
1833
1833
|
a.push(u);
|
|
1834
1834
|
}), this.nodeCache[e] = Promise.all(a).then(function(u) {
|
|
1835
1835
|
let h;
|
|
1836
|
-
if (i.isBone === !0 ? h = new
|
|
1836
|
+
if (i.isBone === !0 ? h = new It() : u.length > 1 ? h = new ie() : u.length === 1 ? h = u[0] : h = new Ge(), h !== u[0])
|
|
1837
1837
|
for (let l = 0, d = u.length; l < d; l++)
|
|
1838
1838
|
h.add(u[l]);
|
|
1839
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) {
|
|
@@ -1850,7 +1850,7 @@ class ys {
|
|
|
1850
1850
|
* @return {Promise<Group>}
|
|
1851
1851
|
*/
|
|
1852
1852
|
loadScene(e) {
|
|
1853
|
-
const t = this.extensions, n = this.json.scenes[e], s = this, i = new
|
|
1853
|
+
const t = this.extensions, n = this.json.scenes[e], s = this, i = new ie();
|
|
1854
1854
|
n.name && (i.name = s.createUniqueName(n.name)), C(i, n), n.extensions && D(t, i, n);
|
|
1855
1855
|
const r = n.nodes || [], a = [];
|
|
1856
1856
|
for (let c = 0, u = r.length; c < u; c++)
|
|
@@ -1861,7 +1861,7 @@ class ys {
|
|
|
1861
1861
|
const u = (h) => {
|
|
1862
1862
|
const l = /* @__PURE__ */ new Map();
|
|
1863
1863
|
for (const [d, f] of s.associations)
|
|
1864
|
-
(d instanceof
|
|
1864
|
+
(d instanceof re || d instanceof we) && l.set(d, f);
|
|
1865
1865
|
return h.traverse((d) => {
|
|
1866
1866
|
const f = s.associations.get(d);
|
|
1867
1867
|
f != null && l.set(d, f);
|
|
@@ -1915,7 +1915,7 @@ class ys {
|
|
|
1915
1915
|
_getArrayFromAccessor(e) {
|
|
1916
1916
|
let t = e.array;
|
|
1917
1917
|
if (e.normalized) {
|
|
1918
|
-
const n =
|
|
1918
|
+
const n = ge(t.constructor), s = new Float32Array(t.length);
|
|
1919
1919
|
for (let i = 0, r = t.length; i < r; i++)
|
|
1920
1920
|
s[i] = t[i] * n;
|
|
1921
1921
|
t = s;
|
|
@@ -1924,13 +1924,13 @@ class ys {
|
|
|
1924
1924
|
}
|
|
1925
1925
|
_createCubicSplineTrackInterpolant(e) {
|
|
1926
1926
|
e.createInterpolant = function(n) {
|
|
1927
|
-
const s = this instanceof be ? gs :
|
|
1927
|
+
const s = this instanceof be ? gs : $e;
|
|
1928
1928
|
return new s(this.times, this.values, this.getValueSize() / 3, n);
|
|
1929
1929
|
}, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
|
|
1930
1930
|
}
|
|
1931
1931
|
}
|
|
1932
1932
|
function bs(o, e, t) {
|
|
1933
|
-
const n = e.attributes, s = new
|
|
1933
|
+
const n = e.attributes, s = new Ut();
|
|
1934
1934
|
if (n.POSITION !== void 0) {
|
|
1935
1935
|
const a = t.json.accessors[n.POSITION], c = a.min, u = a.max;
|
|
1936
1936
|
if (c !== void 0 && u !== void 0) {
|
|
@@ -1938,7 +1938,7 @@ function bs(o, e, t) {
|
|
|
1938
1938
|
new F(c[0], c[1], c[2]),
|
|
1939
1939
|
new F(u[0], u[1], u[2])
|
|
1940
1940
|
), a.normalized) {
|
|
1941
|
-
const h =
|
|
1941
|
+
const h = ge(H[a.componentType]);
|
|
1942
1942
|
s.min.multiplyScalar(h), s.max.multiplyScalar(h);
|
|
1943
1943
|
}
|
|
1944
1944
|
} else {
|
|
@@ -1956,7 +1956,7 @@ function bs(o, e, t) {
|
|
|
1956
1956
|
const d = t.json.accessors[l.POSITION], f = d.min, p = d.max;
|
|
1957
1957
|
if (f !== void 0 && p !== void 0) {
|
|
1958
1958
|
if (c.setX(Math.max(Math.abs(f[0]), Math.abs(p[0]))), c.setY(Math.max(Math.abs(f[1]), Math.abs(p[1]))), c.setZ(Math.max(Math.abs(f[2]), Math.abs(p[2]))), d.normalized) {
|
|
1959
|
-
const A =
|
|
1959
|
+
const A = ge(H[d.componentType]);
|
|
1960
1960
|
c.multiplyScalar(A);
|
|
1961
1961
|
}
|
|
1962
1962
|
a.max(c);
|
|
@@ -1967,7 +1967,7 @@ function bs(o, e, t) {
|
|
|
1967
1967
|
s.expandByVector(a);
|
|
1968
1968
|
}
|
|
1969
1969
|
o.boundingBox = s;
|
|
1970
|
-
const r = new
|
|
1970
|
+
const r = new Gt();
|
|
1971
1971
|
s.getCenter(r.center), r.radius = s.min.distanceTo(s.max) / 2, o.boundingSphere = r;
|
|
1972
1972
|
}
|
|
1973
1973
|
function Me(o, e, t) {
|
|
@@ -1978,7 +1978,7 @@ function Me(o, e, t) {
|
|
|
1978
1978
|
});
|
|
1979
1979
|
}
|
|
1980
1980
|
for (const r in n) {
|
|
1981
|
-
const a =
|
|
1981
|
+
const a = me[r] || r.toLowerCase();
|
|
1982
1982
|
a in o.attributes || s.push(i(n[r], a));
|
|
1983
1983
|
}
|
|
1984
1984
|
if (e.indices !== void 0 && !o.index) {
|
|
@@ -1987,7 +1987,7 @@ function Me(o, e, t) {
|
|
|
1987
1987
|
});
|
|
1988
1988
|
s.push(r);
|
|
1989
1989
|
}
|
|
1990
|
-
return
|
|
1990
|
+
return de.workingColorSpace !== v && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${de.workingColorSpace}" not supported.`), C(o, e), bs(o, e, t), Promise.all(s).then(function() {
|
|
1991
1991
|
return e.targets !== void 0 ? _s(o, e.targets, t) : o;
|
|
1992
1992
|
});
|
|
1993
1993
|
}
|
|
@@ -1995,14 +1995,15 @@ var Ls = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, Ss = (o, e
|
|
|
1995
1995
|
for (var s = n > 1 ? void 0 : n ? vs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
1996
1996
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
1997
1997
|
return n && s && Ls(e, t, s), s;
|
|
1998
|
-
};
|
|
1998
|
+
}, Cs = (o, e) => (t, n) => e(t, n, o);
|
|
1999
1999
|
let J = class {
|
|
2000
|
-
constructor() {
|
|
2001
|
-
_(this, "workerPool"
|
|
2000
|
+
constructor(o) {
|
|
2001
|
+
_(this, "workerPool");
|
|
2002
2002
|
_(this, "canvas");
|
|
2003
2003
|
_(this, "offscreenCanvas");
|
|
2004
2004
|
_(this, "worker");
|
|
2005
2005
|
_(this, "thread");
|
|
2006
|
+
this._props = o, this.workerPool = Qe(void 0, this._props.enableDebug);
|
|
2006
2007
|
}
|
|
2007
2008
|
init(o) {
|
|
2008
2009
|
this.worker = o.worker, this.thread = o.thread;
|
|
@@ -2065,7 +2066,7 @@ let J = class {
|
|
|
2065
2066
|
};
|
|
2066
2067
|
}
|
|
2067
2068
|
keyEventHandler(o) {
|
|
2068
|
-
if (
|
|
2069
|
+
if (Je.includes(o.code))
|
|
2069
2070
|
return o.preventDefault(), {
|
|
2070
2071
|
...this.getScreenSizes(),
|
|
2071
2072
|
...V(o, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
|
|
@@ -2073,21 +2074,22 @@ let J = class {
|
|
|
2073
2074
|
}
|
|
2074
2075
|
};
|
|
2075
2076
|
J = Ss([
|
|
2076
|
-
U(G.ContainerScoped)
|
|
2077
|
+
U(G.ContainerScoped),
|
|
2078
|
+
Cs(0, y(te))
|
|
2077
2079
|
], J);
|
|
2078
|
-
var
|
|
2079
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2080
|
+
var Ms = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, Os = (o, e, t, n) => {
|
|
2081
|
+
for (var s = n > 1 ? void 0 : n ? Is(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2080
2082
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2081
|
-
return n && s &&
|
|
2082
|
-
},
|
|
2083
|
-
let
|
|
2083
|
+
return n && s && Ms(e, t, s), s;
|
|
2084
|
+
}, Ns = (o, e) => (t, n) => e(t, n, o);
|
|
2085
|
+
let Ae = class extends Ze {
|
|
2084
2086
|
constructor(o) {
|
|
2085
2087
|
super(), this._service = o;
|
|
2086
2088
|
}
|
|
2087
2089
|
init() {
|
|
2088
2090
|
for (const o of Ie) {
|
|
2089
2091
|
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);
|
|
2090
|
-
this[`${o}$`] =
|
|
2092
|
+
this[`${o}$`] = et(
|
|
2091
2093
|
o === "resize" ? window : this._service.canvas,
|
|
2092
2094
|
o
|
|
2093
2095
|
).pipe(
|
|
@@ -2101,18 +2103,18 @@ let ge = class extends Je {
|
|
|
2101
2103
|
}
|
|
2102
2104
|
}
|
|
2103
2105
|
};
|
|
2104
|
-
|
|
2106
|
+
Ae = Os([
|
|
2105
2107
|
U(G.ContainerScoped),
|
|
2106
|
-
|
|
2107
|
-
],
|
|
2108
|
-
var
|
|
2109
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2108
|
+
Ns(0, y(J))
|
|
2109
|
+
], Ae);
|
|
2110
|
+
var Ps = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, ks = (o, e, t, n) => {
|
|
2111
|
+
for (var s = n > 1 ? void 0 : n ? Ds(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2110
2112
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2111
|
-
return n && s &&
|
|
2113
|
+
return n && s && Ps(e, t, s), s;
|
|
2112
2114
|
};
|
|
2113
2115
|
let Z = class {
|
|
2114
2116
|
constructor() {
|
|
2115
|
-
_(this, "loadingManager", new
|
|
2117
|
+
_(this, "loadingManager", new jt());
|
|
2116
2118
|
_(this, "loaders", {});
|
|
2117
2119
|
_(this, "sources", []);
|
|
2118
2120
|
_(this, "loadedResources", {});
|
|
@@ -2133,7 +2135,7 @@ let Z = class {
|
|
|
2133
2135
|
};
|
|
2134
2136
|
}
|
|
2135
2137
|
_initLoaders() {
|
|
2136
|
-
this.loaders.dracoLoader = new
|
|
2138
|
+
this.loaders.dracoLoader = new Xe(this.loadingManager), this.loaders.audioLoader = new Kt(this.loadingManager), this.loaders.fontLoader = new tt(this.loadingManager), this.loaders.gltfLoader = new zt(this.loadingManager), this.loaders.imageLoader = new Be(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
|
|
2137
2139
|
}
|
|
2138
2140
|
_initSources(o) {
|
|
2139
2141
|
this.sources = o, this.toLoadCount = this.sources.length, this.loadedCount = 0;
|
|
@@ -2183,24 +2185,24 @@ let Z = class {
|
|
|
2183
2185
|
}
|
|
2184
2186
|
}
|
|
2185
2187
|
};
|
|
2186
|
-
Z =
|
|
2188
|
+
Z = ks([
|
|
2187
2189
|
U(G.ContainerScoped)
|
|
2188
2190
|
], Z);
|
|
2189
|
-
var
|
|
2190
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2191
|
+
var Fs = Object.defineProperty, Hs = Object.getOwnPropertyDescriptor, Us = (o, e, t, n) => {
|
|
2192
|
+
for (var s = n > 1 ? void 0 : n ? Hs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2191
2193
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2192
|
-
return n && s &&
|
|
2193
|
-
},
|
|
2194
|
+
return n && s && Fs(e, t, s), s;
|
|
2195
|
+
}, Gs = (o, e) => (t, n) => e(t, n, o);
|
|
2194
2196
|
let ee = class {
|
|
2195
2197
|
constructor(o) {
|
|
2196
|
-
_(this, "load$$", new
|
|
2198
|
+
_(this, "load$$", new st());
|
|
2197
2199
|
_(this, "load$", this.load$$.pipe(
|
|
2198
2200
|
q((o) => ({
|
|
2199
2201
|
...o,
|
|
2200
2202
|
loadedCount: o.resource ? this._service.loadedCount + 1 : this._service.loadedCount,
|
|
2201
2203
|
toLoadCount: this._service.toLoadCount
|
|
2202
2204
|
})),
|
|
2203
|
-
|
|
2205
|
+
ne()
|
|
2204
2206
|
));
|
|
2205
2207
|
_(this, "serializedLoad$", this.load$.pipe(
|
|
2206
2208
|
q((o) => {
|
|
@@ -2273,7 +2275,7 @@ let ee = class {
|
|
|
2273
2275
|
resource: e
|
|
2274
2276
|
};
|
|
2275
2277
|
}),
|
|
2276
|
-
|
|
2278
|
+
ne()
|
|
2277
2279
|
));
|
|
2278
2280
|
_(this, "loadCompleted$", this.load$.pipe(
|
|
2279
2281
|
Oe((o) => o.toLoadCount === o.loadedCount),
|
|
@@ -2284,21 +2286,21 @@ let ee = class {
|
|
|
2284
2286
|
"toLoadCount"
|
|
2285
2287
|
])
|
|
2286
2288
|
),
|
|
2287
|
-
|
|
2289
|
+
ne()
|
|
2288
2290
|
));
|
|
2289
2291
|
this._service = o;
|
|
2290
2292
|
}
|
|
2291
2293
|
};
|
|
2292
|
-
ee =
|
|
2294
|
+
ee = Us([
|
|
2293
2295
|
U(G.ContainerScoped),
|
|
2294
|
-
|
|
2296
|
+
Gs(0, y(Z))
|
|
2295
2297
|
], ee);
|
|
2296
|
-
var
|
|
2297
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2298
|
+
var Bs = Object.defineProperty, js = Object.getOwnPropertyDescriptor, Ks = (o, e, t, n) => {
|
|
2299
|
+
for (var s = n > 1 ? void 0 : n ? js(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2298
2300
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2299
|
-
return n && s &&
|
|
2300
|
-
},
|
|
2301
|
-
let
|
|
2301
|
+
return n && s && Bs(e, t, s), s;
|
|
2302
|
+
}, le = (o, e) => (t, n) => e(t, n, o);
|
|
2303
|
+
let Te = class {
|
|
2302
2304
|
constructor(o, e, t) {
|
|
2303
2305
|
_(this, "_subscriptions", []);
|
|
2304
2306
|
this._controller = o, this._service = e, this._props = t, this._subscriptions.push(
|
|
@@ -2343,21 +2345,24 @@ let Ae = class {
|
|
|
2343
2345
|
this._service.setDracoDecoder(o);
|
|
2344
2346
|
}
|
|
2345
2347
|
dispose() {
|
|
2346
|
-
this._subscriptions.forEach((o) => o.unsubscribe()), this.
|
|
2348
|
+
this._subscriptions.forEach((o) => o.unsubscribe()), Object.keys(this._service.loaders).forEach((o) => {
|
|
2349
|
+
const e = this._service.loaders[o];
|
|
2350
|
+
e instanceof Xe && e.dispose(), this._service.loaders[o] = void 0;
|
|
2351
|
+
}), this._controller.load$$.complete();
|
|
2347
2352
|
}
|
|
2348
2353
|
};
|
|
2349
|
-
|
|
2354
|
+
Te = Ks([
|
|
2350
2355
|
U(G.ContainerScoped),
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
],
|
|
2355
|
-
var
|
|
2356
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
2356
|
+
le(0, y(ee)),
|
|
2357
|
+
le(1, y(Z)),
|
|
2358
|
+
le(2, y(te))
|
|
2359
|
+
], Te);
|
|
2360
|
+
var Vs = Object.defineProperty, zs = Object.getOwnPropertyDescriptor, Xs = (o, e, t, n) => {
|
|
2361
|
+
for (var s = n > 1 ? void 0 : n ? zs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
|
|
2357
2362
|
(r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
|
|
2358
|
-
return n && s &&
|
|
2363
|
+
return n && s && Vs(e, t, s), s;
|
|
2359
2364
|
}, k = (o, e) => (t, n) => e(t, n, o);
|
|
2360
|
-
let
|
|
2365
|
+
let _e = class extends nt {
|
|
2361
2366
|
constructor(e, t, n, s, i, r) {
|
|
2362
2367
|
super();
|
|
2363
2368
|
_(this, "_subscriptions", []);
|
|
@@ -2414,7 +2419,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
|
|
|
2414
2419
|
},
|
|
2415
2420
|
transferSubject: [this._service.offscreenCanvas]
|
|
2416
2421
|
}
|
|
2417
|
-
});
|
|
2422
|
+
}) || [];
|
|
2418
2423
|
if (!e || t)
|
|
2419
2424
|
throw new Error("Unable to retrieve the worker-thread info.");
|
|
2420
2425
|
this._service.worker = e.worker, this._service.thread = e.thread;
|
|
@@ -2436,7 +2441,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
|
|
|
2436
2441
|
e.resource
|
|
2437
2442
|
]);
|
|
2438
2443
|
(n = this._service.worker) == null || n.postMessage({
|
|
2439
|
-
token:
|
|
2444
|
+
token: rt,
|
|
2440
2445
|
payload: e
|
|
2441
2446
|
});
|
|
2442
2447
|
})
|
|
@@ -2469,42 +2474,42 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
|
|
|
2469
2474
|
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;
|
|
2470
2475
|
}
|
|
2471
2476
|
};
|
|
2472
|
-
|
|
2477
|
+
_e = Xs([
|
|
2473
2478
|
U(G.ContainerScoped),
|
|
2474
|
-
k(0,
|
|
2475
|
-
k(1,
|
|
2476
|
-
k(2,
|
|
2477
|
-
k(3,
|
|
2478
|
-
k(4,
|
|
2479
|
-
k(5,
|
|
2480
|
-
],
|
|
2481
|
-
const
|
|
2479
|
+
k(0, y(J)),
|
|
2480
|
+
k(1, y(Ae)),
|
|
2481
|
+
k(2, y(ee)),
|
|
2482
|
+
k(3, y(Pe)),
|
|
2483
|
+
k(4, y(te)),
|
|
2484
|
+
k(5, y(Te))
|
|
2485
|
+
], _e);
|
|
2486
|
+
const Qs = (o) => {
|
|
2482
2487
|
if (typeof (o == null ? void 0 : o.location) != "string" && !((o == null ? void 0 : o.location) instanceof URL))
|
|
2483
2488
|
throw new Error(
|
|
2484
2489
|
"Invalid register props detected. location path is required"
|
|
2485
2490
|
);
|
|
2486
|
-
const e =
|
|
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 =
|
|
2488
|
-
const t = e.resolve(
|
|
2491
|
+
const e = it.createChildContainer();
|
|
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 = ot(o.onReady) ? o.onReady : void 0, e.register(Pe, { useValue: e }), e.register(te, { useValue: o });
|
|
2493
|
+
const t = e.resolve(_e);
|
|
2489
2494
|
return {
|
|
2490
2495
|
container: e,
|
|
2491
2496
|
module: t
|
|
2492
2497
|
};
|
|
2493
2498
|
};
|
|
2494
2499
|
export {
|
|
2495
|
-
|
|
2496
|
-
|
|
2500
|
+
en as AppModule,
|
|
2501
|
+
tn as AppProxyEventHandlersBlueprint,
|
|
2497
2502
|
Pe as CONTAINER_TOKEN,
|
|
2498
2503
|
Ee as DefaultCameraType,
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2504
|
+
Je as KEYBOARD_EVENT_CODES,
|
|
2505
|
+
rt as LOADER_SERIALIZED_LOAD_TOKEN,
|
|
2506
|
+
Ys as LaunchAppProps,
|
|
2502
2507
|
Ie as PROXY_EVENT_LISTENERS,
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2508
|
+
Ze as ProxyEventHandlersBlueprint,
|
|
2509
|
+
sn as ProxyEventObservablesBlueprint,
|
|
2510
|
+
nn as ProxyEventSubjectsBlueprint,
|
|
2511
|
+
_e as RegisterModule,
|
|
2512
|
+
te as RegisterPropsBlueprint,
|
|
2513
|
+
nt as RegisterProxyEventHandlersBlueprint,
|
|
2514
|
+
Qs as register
|
|
2510
2515
|
};
|