soonspacejs 2.16.9 → 2.16.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +380 -383
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Xr from "three";
|
|
2
|
-
import { Vector3 as A, Euler as me, MathUtils as Re, Object3D as Me, Box3 as Et, Scene as Ja, Quaternion as ue, TextureLoader as Gc, Texture as vt, ImageLoader as Wc, LoadingManager as $a, FileLoader as eo, CubeTextureLoader as Vc, CubeTexture as to, SRGBColorSpace as nt, HalfFloatType as hr, EquirectangularReflectionMapping as As, Color as ge, Vector2 as oe, Vector4 as kn, CurvePath as _c, LineCurve as Hc, LineCurve3 as qc, Line3 as ro, Matrix3 as Zt, Skeleton as ei, AnimationClip as xt, VectorKeyframeTrack as At, InterpolateLinear as zn, QuaternionKeyframeTrack as Dt, EventDispatcher as no, LoopPingPong as Kc, InterpolateDiscrete as Xc, Bone as Mn, SkinnedMesh as Un, Matrix4 as J, Uint16BufferAttribute as pr, Float32BufferAttribute as ye, StringKeyframeTrack as Yc, ColorKeyframeTrack as Qc, NumberKeyframeTrack as so, BooleanKeyframeTrack as Zc, KeyframeTrack as Jc, NormalAnimationBlendMode as $c, FogExp2 as eh, MeshStandardMaterial as We, MeshPhongMaterial as ti, MeshPhysicalMaterial as th, Mesh as le, LineSegments as Ds, LineBasicMaterial as Yr, BufferGeometry as Ae, EdgesGeometry as rh, OrthographicCamera as Jt, PerspectiveCamera as Nn, WebGLRenderer as nh, PCFShadowMap as sh, Spherical as ze, Sphere as jn, BufferAttribute as Be, ShaderMaterial as ut, WebGLRenderTarget as zt, RGBAFormat as ar, LinearFilter as dt, DataTexture as ih, NoColorSpace as ah, RepeatWrapping as wt, NearestFilter as kt, REVISION as io, RedFormat as oh, FloatType as lh, DepthTexture as ch, UnsignedIntType as hh, GLBufferAttribute as uh, InterleavedBufferAttribute as dh, Raycaster as an, BoxGeometry as ph, Sprite as rt, MeshBasicMaterial as fr, CanvasTexture as ri, SpriteMaterial as Os, BatchedMesh as yt, NormalBlending as fh, Material as Zr, CustomBlending as mh, Group as mr, InstancedMesh as Fe, LOD as ni, DynamicDrawUsage as gh, DoubleSide as st, Line as Jr, Points as Xt, Light as ao, PMREMGenerator as yh, AnimationMixer as vh, Timer as xh, LinearSRGBColorSpace as wh, NeutralToneMapping as bh, AgXToneMapping as Sh, ACESFilmicToneMapping as Mh, CineonToneMapping as Th, ReinhardToneMapping as Ch, NoToneMapping as
|
|
2
|
+
import { Vector3 as A, Euler as me, MathUtils as Re, Object3D as Me, Box3 as Et, Scene as Ja, Quaternion as ue, TextureLoader as Gc, Texture as vt, ImageLoader as Wc, LoadingManager as $a, FileLoader as eo, CubeTextureLoader as Vc, CubeTexture as to, SRGBColorSpace as nt, HalfFloatType as hr, EquirectangularReflectionMapping as As, Color as ge, Vector2 as oe, Vector4 as kn, CurvePath as _c, LineCurve as Hc, LineCurve3 as qc, Line3 as ro, Matrix3 as Zt, Skeleton as ei, AnimationClip as xt, VectorKeyframeTrack as At, InterpolateLinear as zn, QuaternionKeyframeTrack as Dt, EventDispatcher as no, LoopPingPong as Kc, InterpolateDiscrete as Xc, Bone as Mn, SkinnedMesh as Un, Matrix4 as J, Uint16BufferAttribute as pr, Float32BufferAttribute as ye, StringKeyframeTrack as Yc, ColorKeyframeTrack as Qc, NumberKeyframeTrack as so, BooleanKeyframeTrack as Zc, KeyframeTrack as Jc, NormalAnimationBlendMode as $c, FogExp2 as eh, MeshStandardMaterial as We, MeshPhongMaterial as ti, MeshPhysicalMaterial as th, Mesh as le, LineSegments as Ds, LineBasicMaterial as Yr, BufferGeometry as Ae, EdgesGeometry as rh, OrthographicCamera as Jt, PerspectiveCamera as Nn, WebGLRenderer as nh, PCFShadowMap as sh, Spherical as ze, Sphere as jn, BufferAttribute as Be, ShaderMaterial as ut, WebGLRenderTarget as zt, RGBAFormat as ar, LinearFilter as dt, DataTexture as ih, NoColorSpace as ah, RepeatWrapping as wt, NearestFilter as kt, REVISION as io, RedFormat as oh, FloatType as lh, DepthTexture as ch, UnsignedIntType as hh, GLBufferAttribute as uh, InterleavedBufferAttribute as dh, Raycaster as an, BoxGeometry as ph, Sprite as rt, MeshBasicMaterial as fr, CanvasTexture as ri, SpriteMaterial as Os, BatchedMesh as yt, NormalBlending as fh, Material as Zr, CustomBlending as mh, Group as mr, InstancedMesh as Fe, LOD as ni, DynamicDrawUsage as gh, DoubleSide as st, Line as Jr, Points as Xt, Light as ao, PMREMGenerator as yh, AnimationMixer as vh, Timer as xh, LinearSRGBColorSpace as wh, NeutralToneMapping as bh, AgXToneMapping as Sh, ACESFilmicToneMapping as Mh, CineonToneMapping as Th, ReinhardToneMapping as Ch, NoToneMapping as Ih, UVMapping as Ph, SphereGeometry as ji, CircleGeometry as Eh, PlaneGeometry as gr, ExtrudeGeometry as Ah, Shape as oo, Box2 as Ls, Triangle as lo, VideoTexture as Dh, ShapeGeometry as Oh, Plane as Lh, AmbientLight as co, DirectionalLight as ho, HemisphereLight as Rh, SpotLight as uo, PointLight as Rs, RectAreaLight as Bh, Loader as Tn, LoaderUtils as Fh, ClampToEdgeWrapping as Gi, PropertyBinding as Cn, ShapeUtils as kh, PointsMaterial as un, FrontSide as Wi, BackSide as Vi, GridHelper as zh, AxesHelper as Uh, Box3Helper as Nh, DirectionalLightHelper as jh, HemisphereLightHelper as Gh, SpotLightHelper as Wh, PointLightHelper as Vh } from "three";
|
|
3
3
|
import * as _i from "three/examples/jsm/libs/tween.module.js";
|
|
4
4
|
import Bs, { Easing as ve, Tween as _h } from "three/examples/jsm/libs/tween.module.js";
|
|
5
5
|
import $r from "camera-controls";
|
|
@@ -24,7 +24,7 @@ import * as Ki from "three/examples/jsm/utils/SkeletonUtils.js";
|
|
|
24
24
|
import * as vu from "three/examples/jsm/libs/fflate.module.js";
|
|
25
25
|
import { NURBSCurve as xu } from "three/examples/jsm/curves/NURBSCurve.js";
|
|
26
26
|
import { RectAreaLightHelper as wu } from "three/examples/jsm/helpers/RectAreaLightHelper.js";
|
|
27
|
-
const bu = "soonspacejs", Su = "2.16.
|
|
27
|
+
const bu = "soonspacejs", Su = "2.16.11", Xi = {
|
|
28
28
|
name: bu,
|
|
29
29
|
version: Su
|
|
30
30
|
}, mo = "[soonspacejs]: ";
|
|
@@ -33,10 +33,10 @@ const en = "In soonspacejs: ", Kt = (i, e) => {
|
|
|
33
33
|
let t = "";
|
|
34
34
|
for (const r in e) t += `${r}: ${e[r]};`;
|
|
35
35
|
console.log(`%c${i}`, t);
|
|
36
|
-
},
|
|
37
|
-
i in
|
|
36
|
+
}, In = {}, V = (i) => {
|
|
37
|
+
i in In || (In[i] = !0, console.warn(en + i));
|
|
38
38
|
}, si = (i) => {
|
|
39
|
-
i in
|
|
39
|
+
i in In || (In[i] = !0, console.error(en + i));
|
|
40
40
|
};
|
|
41
41
|
function Se(i) {
|
|
42
42
|
return i instanceof A ? i : new A(i.x, i.y, i.z);
|
|
@@ -88,7 +88,7 @@ function go(i, e, t = !0) {
|
|
|
88
88
|
function on(i) {
|
|
89
89
|
return i.visible ? i.parent ? on(i.parent) : !0 : !1;
|
|
90
90
|
}
|
|
91
|
-
const Cu = new A(),
|
|
91
|
+
const Cu = new A(), Iu = new A(), Pu = new A(), Eu = (i, e, t) => {
|
|
92
92
|
const r = t.width / 2, n = t.height / 2;
|
|
93
93
|
e.updateMatrixWorld();
|
|
94
94
|
const s = i.project(e);
|
|
@@ -97,10 +97,10 @@ const Cu = new A(), Pu = new A(), Iu = new A(), Eu = (i, e, t) => {
|
|
|
97
97
|
const n = Cu.set(i.x / t.width * 2 - 1, -(i.y / t.height) * 2 + 1, r);
|
|
98
98
|
return n.unproject(e), n;
|
|
99
99
|
}, yo = (i, e, t, r) => {
|
|
100
|
-
const n = Eu(
|
|
100
|
+
const n = Eu(Pu.copy(i), t, r);
|
|
101
101
|
let s = 0;
|
|
102
102
|
for (let a = 0; a < 2; ++a) {
|
|
103
|
-
const o =
|
|
103
|
+
const o = Iu.copy(n).setComponent(a, n.getComponent(a) + e), l = Au(o, t, r, o.z);
|
|
104
104
|
s = Math.max(s, i.distanceTo(l));
|
|
105
105
|
}
|
|
106
106
|
return s;
|
|
@@ -206,14 +206,14 @@ function Gt(i, e) {
|
|
|
206
206
|
function Du(i, e) {
|
|
207
207
|
return fetch(i, { ...e, headers: Gt(i, e?.headers) });
|
|
208
208
|
}
|
|
209
|
-
const
|
|
209
|
+
const Pn = /* @__PURE__ */ new WeakSet();
|
|
210
210
|
function So(i, e) {
|
|
211
211
|
const t = Object.create(i);
|
|
212
212
|
return t.resolveURL = e, Object.defineProperty(t, "abortController", { get: () => i.abortController }), t;
|
|
213
213
|
}
|
|
214
214
|
function Je(i) {
|
|
215
|
-
if (
|
|
216
|
-
|
|
215
|
+
if (Pn.has(i)) return i;
|
|
216
|
+
Pn.add(i);
|
|
217
217
|
const e = i.load;
|
|
218
218
|
return i.load = function(t, ...r) {
|
|
219
219
|
const n = this.requestHeader, s = this.manager, a = {};
|
|
@@ -230,9 +230,9 @@ function Je(i) {
|
|
|
230
230
|
}, i;
|
|
231
231
|
}
|
|
232
232
|
function Mo(i, e) {
|
|
233
|
-
if (!
|
|
233
|
+
if (!Pn.has(i)) return i;
|
|
234
234
|
const t = Object.create(i), r = new Headers(e);
|
|
235
|
-
return new Headers(i.requestHeader).forEach((n, s) => r.set(s, n)), t.requestHeader = Gt("data:", r),
|
|
235
|
+
return new Headers(i.requestHeader).forEach((n, s) => r.set(s, n)), t.requestHeader = Gt("data:", r), Pn.add(t), t;
|
|
236
236
|
}
|
|
237
237
|
function wr(i) {
|
|
238
238
|
return Je(new eo(i));
|
|
@@ -257,11 +257,11 @@ function To(i, e) {
|
|
|
257
257
|
let d, f = !1;
|
|
258
258
|
const m = new AbortController(), y = m.signal, w = this.manager.abortController.signal, x = () => m.abort(w.reason), v = () => E(y.reason);
|
|
259
259
|
n.add(m);
|
|
260
|
-
const
|
|
260
|
+
const P = () => {
|
|
261
261
|
w.removeEventListener("abort", x), y.removeEventListener("abort", v), n.delete(m), p.removeEventListener("load", C), p.removeEventListener("error", E), d && URL.revokeObjectURL(d);
|
|
262
262
|
}, C = () => {
|
|
263
263
|
if (!f) {
|
|
264
|
-
f = !0,
|
|
264
|
+
f = !0, P();
|
|
265
265
|
try {
|
|
266
266
|
a?.(p);
|
|
267
267
|
} finally {
|
|
@@ -270,7 +270,7 @@ function To(i, e) {
|
|
|
270
270
|
}
|
|
271
271
|
}, E = (z) => {
|
|
272
272
|
if (!f) {
|
|
273
|
-
f = !0,
|
|
273
|
+
f = !0, P();
|
|
274
274
|
try {
|
|
275
275
|
l?.(z);
|
|
276
276
|
} finally {
|
|
@@ -318,9 +318,9 @@ function Co(i) {
|
|
|
318
318
|
}, e;
|
|
319
319
|
}
|
|
320
320
|
const Yi = /* @__PURE__ */ new WeakSet();
|
|
321
|
-
function
|
|
321
|
+
function Io(i) {
|
|
322
322
|
return Yi.has(i) || (Yi.add(i), Je(i), i.register((e) => {
|
|
323
|
-
Je(e.fileLoader), "isImageBitmapLoader" in e.textureLoader ? Je(e.textureLoader) : e.textureLoader = Gn(e.options.manager).setCrossOrigin(e.options.crossOrigin).setRequestHeader(e.options.requestHeader), e.options.ktx2Loader &&
|
|
323
|
+
Je(e.fileLoader), "isImageBitmapLoader" in e.textureLoader ? Je(e.textureLoader) : e.textureLoader = Gn(e.options.manager).setCrossOrigin(e.options.crossOrigin).setRequestHeader(e.options.requestHeader), e.options.ktx2Loader && Po(e.options.ktx2Loader);
|
|
324
324
|
const t = e.loadTextureImage;
|
|
325
325
|
return e.loadTextureImage = function(r, n, s) {
|
|
326
326
|
const a = s === e.options.ktx2Loader ? {
|
|
@@ -344,7 +344,7 @@ function Lu(i) {
|
|
|
344
344
|
}, i;
|
|
345
345
|
}
|
|
346
346
|
const Qi = /* @__PURE__ */ new WeakSet();
|
|
347
|
-
function
|
|
347
|
+
function Po(i) {
|
|
348
348
|
if (Qi.has(i)) return i;
|
|
349
349
|
Qi.add(i), Je(i);
|
|
350
350
|
const e = i.init;
|
|
@@ -547,11 +547,8 @@ function Wu(i, e = {}) {
|
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
549
|
const Vu = Object.prototype.hasOwnProperty, _u = (i, e) => Vu.call(i, e), jt = (i) => at(i) === "String", Vn = (i) => at(i) === "Boolean", $e = (i) => at(i) === "Number", Hu = (i) => at(i) === "Null", qu = (i) => at(i) === "Undefined", Ku = (i) => at(i) === "Symbol", Xu = (i) => at(i) === "Date", Ue = Array.isArray, Ge = (i) => at(i) === "Object", En = (i) => at(i) === "Function", Yu = (i) => at(i) === "Promise", at = (i) => Object.prototype.toString.call(i).slice(8, -1), Qu = (i) => new Promise((e) => setTimeout(() => e(), i)), ks = (i) => new TextDecoder().decode(new Uint8Array(i)), Ke = () => mo + Math.random().toString(36).substring(7).split("").join("_"), ui = (i) => {
|
|
550
|
-
const {
|
|
551
|
-
|
|
552
|
-
const t = e.split(".").pop();
|
|
553
|
-
return t ? t.includes("?") ? t.split("?").shift()?.toLowerCase() : t : void 0;
|
|
554
|
-
}
|
|
550
|
+
const { pathname: e } = new URL(i, location.origin), t = e.slice(e.lastIndexOf("/") + 1), r = t.lastIndexOf(".");
|
|
551
|
+
return r < 0 ? void 0 : t.slice(r + 1).toLowerCase() || void 0;
|
|
555
552
|
}, di = 1e-5;
|
|
556
553
|
function ko(i, e = di) {
|
|
557
554
|
return Math.abs(i) < e;
|
|
@@ -586,7 +583,7 @@ const vr = (i, e) => Ue(i) ? i.map(e) : e(i), Zi = /* @__PURE__ */ Object.freeze
|
|
|
586
583
|
cloneDeep: Wn,
|
|
587
584
|
cloneMaterials: Eo,
|
|
588
585
|
computeTargetByRotation: vo,
|
|
589
|
-
configureGLTFLoader:
|
|
586
|
+
configureGLTFLoader: Io,
|
|
590
587
|
configureRequestLoader: Je,
|
|
591
588
|
consoleSspTitle: en,
|
|
592
589
|
createCubeTextureLoader: Co,
|
|
@@ -676,7 +673,7 @@ const vr = (i, e) => Ue(i) ? i.map(e) : e(i), Zi = /* @__PURE__ */ Object.freeze
|
|
|
676
673
|
"Bounce.Out": ve.Bounce.Out,
|
|
677
674
|
"Bounce.InOut": ve.Bounce.InOut
|
|
678
675
|
};
|
|
679
|
-
function
|
|
676
|
+
function It(i, e, t = {}, r, n) {
|
|
680
677
|
return new Promise((s, a) => {
|
|
681
678
|
const {
|
|
682
679
|
duration: o = 1e3,
|
|
@@ -766,7 +763,7 @@ class Ji {
|
|
|
766
763
|
if (!a) return !0;
|
|
767
764
|
a.isVector3 || (a = Se(a).clone()), a = a.clone();
|
|
768
765
|
const l = s.distanceTo(a) / r;
|
|
769
|
-
this.needsRotate && (n === 1 && t.parent && t.position.copy(t.parent.worldToLocal(s.clone())), t.lookAt(a)), await
|
|
766
|
+
this.needsRotate && (n === 1 && t.parent && t.position.copy(t.parent.worldToLocal(s.clone())), t.lookAt(a)), await It(
|
|
770
767
|
s,
|
|
771
768
|
a,
|
|
772
769
|
{
|
|
@@ -1289,7 +1286,7 @@ function yi(i) {
|
|
|
1289
1286
|
throw "缺少参数:至少传递 ts 和 us 任意之一";
|
|
1290
1287
|
let y = nn.clone(), w = nn.clone(), x = Wo.clone(), v = Me.DEFAULT_UP;
|
|
1291
1288
|
n && (n.updateWorldMatrix(!0, !1), y = n.matrix, w = n.matrixWorld, x = n.scale, v = n.up);
|
|
1292
|
-
const
|
|
1289
|
+
const P = y.clone().invert(), C = w.clone().multiply(P).clone().invert(), E = r.getTangent(0);
|
|
1293
1290
|
E.transformDirection(C);
|
|
1294
1291
|
const L = ((e = i.front) == null ? void 0 : e.clone().normalize()) ?? E, z = ((t = i.up) == null ? void 0 : t.clone().normalize()) ?? v.clone().transformDirection(C);
|
|
1295
1292
|
let H = y.clone().setPosition(0, 0, 0), q = (U) => r.getPoint(U), te = (U) => r.getTangent(U);
|
|
@@ -1408,12 +1405,12 @@ function Sd(i, e) {
|
|
|
1408
1405
|
if (!(c || u))
|
|
1409
1406
|
return x;
|
|
1410
1407
|
const v = (i.anchor ?? An).clone();
|
|
1411
|
-
let
|
|
1412
|
-
s && (s.updateWorldMatrix(!0, !1),
|
|
1413
|
-
const z =
|
|
1408
|
+
let P = nn.clone(), C = nn.clone(), E = Wo.clone(), L = Me.DEFAULT_UP;
|
|
1409
|
+
s && (s.updateWorldMatrix(!0, !1), P = s.matrix, C = s.matrixWorld, E = s.scale, L = s.up);
|
|
1410
|
+
const z = P.clone().invert(), H = C.clone().multiply(z).clone().invert(), q = e[0].delta(new A());
|
|
1414
1411
|
q.transformDirection(H);
|
|
1415
1412
|
const te = ((t = i.front) == null ? void 0 : t.clone().normalize()) ?? q, F = ((r = i.up) == null ? void 0 : r.clone().normalize()) ?? L.clone().transformDirection(H);
|
|
1416
|
-
let D =
|
|
1413
|
+
let D = P.clone().setPosition(0, 0, 0), R = D, Z = (W) => {
|
|
1417
1414
|
const O = e[W].delta(new A()).normalize();
|
|
1418
1415
|
O.transformDirection(H), w.push(O);
|
|
1419
1416
|
const X = W - 1, U = X < 0, $ = U ? te : w[X], G = new ue().setFromUnitVectors($, O);
|
|
@@ -1475,7 +1472,7 @@ function Sd(i, e) {
|
|
|
1475
1472
|
return x;
|
|
1476
1473
|
}
|
|
1477
1474
|
function Md(i) {
|
|
1478
|
-
const e = i.mixer, t = qo(i), { model: r, skeleton: n } = t, s = { ...i, target: r, skeleton: n }, { clip: a, ...o } = i.posOnBone ? Yo(s) :
|
|
1475
|
+
const e = i.mixer, t = qo(i), { model: r, skeleton: n } = t, s = { ...i, target: r, skeleton: n }, { clip: a, ...o } = i.posOnBone ? Yo(s) : Id(s);
|
|
1479
1476
|
r.animations.push(a);
|
|
1480
1477
|
const l = e?.clipAction(a, r);
|
|
1481
1478
|
return { ...o, ...t, clip: a, action: l };
|
|
@@ -1494,8 +1491,8 @@ function Td(i) {
|
|
|
1494
1491
|
const C = new At(`${y}.position`, n, w, c);
|
|
1495
1492
|
v.push(C);
|
|
1496
1493
|
}
|
|
1497
|
-
const
|
|
1498
|
-
return v.push(
|
|
1494
|
+
const P = new Dt(`${y}.quaternion`, n, x, c);
|
|
1495
|
+
return v.push(P), v;
|
|
1499
1496
|
});
|
|
1500
1497
|
return { ...o, boneTracks: u, duration: a };
|
|
1501
1498
|
}
|
|
@@ -1515,7 +1512,7 @@ function Cd(i) {
|
|
|
1515
1512
|
}, d);
|
|
1516
1513
|
const y = m[0], w = new A(), x = new ue(), v = new A();
|
|
1517
1514
|
y.decompose(w, x, v);
|
|
1518
|
-
const
|
|
1515
|
+
const P = _n(i, h), C = vi(u), E = xi({ curve: t, division: u, duration: P }), L = C.length, z = [], H = new A().setFromMatrixPosition(m[1]).negate(), q = a[0], te = (e = i.up) == null ? void 0 : e.clone().applyMatrix4(p).transformDirection(q), { points: F, rotates: D, ...R } = yi({ ...i, curve: t, ts: C, target: o, rotate: !0, front: H, up: te, anchor: null });
|
|
1519
1516
|
for (let G = 0; G < L; G++)
|
|
1520
1517
|
z.push(p.clone());
|
|
1521
1518
|
const Z = F.map((G, Y) => {
|
|
@@ -1543,7 +1540,7 @@ function Cd(i) {
|
|
|
1543
1540
|
for (let G = 1; G < U; G++) {
|
|
1544
1541
|
const Y = [], K = [], Q = [], re = [];
|
|
1545
1542
|
O.push({ points: Y, rotates: K, us: Q, matrixs: re });
|
|
1546
|
-
const de = m[G], ie = f[G], ne = G - 1, Te = O[ne], Wt = m[ne], St = f[ne], { matrixs: Tr, points: Cr, rotates:
|
|
1543
|
+
const de = m[G], ie = f[G], ne = G - 1, Te = O[ne], Wt = m[ne], St = f[ne], { matrixs: Tr, points: Cr, rotates: Ir } = Te, Ve = new A().setFromMatrixScale(Wt), Vt = ne - 1, er = Vt < 0 ? z : O[Vt].matrixs, _e = new A(), et = new ue(), tt = new A();
|
|
1547
1544
|
de.decompose(_e, et, tt);
|
|
1548
1545
|
const Ot = new A().setFromMatrixPosition(ie).sub(new A().setFromMatrixPosition(St)).length(), tr = _e.length();
|
|
1549
1546
|
for (let De = 0; De < L; De++) {
|
|
@@ -1560,7 +1557,7 @@ function Cd(i) {
|
|
|
1560
1557
|
let He = _t.clone().invert();
|
|
1561
1558
|
const ke = Oe.clone().applyMatrix4(He), ct = Cr[De];
|
|
1562
1559
|
ke.sub(ct).normalize();
|
|
1563
|
-
const Xe =
|
|
1560
|
+
const Xe = Ir[De], Ht = new J().compose(ct, Xe, Ve), rr = _e.clone().transformDirection(Ht), Lt = new ue().setFromUnitVectors(rr, ke);
|
|
1564
1561
|
Xe.premultiply(Lt).normalize(), lt.compose(ct, Xe, Ve), lt.premultiply(_t);
|
|
1565
1562
|
const Rt = lt.clone().invert();
|
|
1566
1563
|
Oe.applyMatrix4(Rt);
|
|
@@ -1576,18 +1573,18 @@ function Cd(i) {
|
|
|
1576
1573
|
Mt.premultiply(lt), re.push(Mt);
|
|
1577
1574
|
}
|
|
1578
1575
|
}
|
|
1579
|
-
return { ...R, times: E, boneSampleDatas: O, duration:
|
|
1576
|
+
return { ...R, times: E, boneSampleDatas: O, duration: P };
|
|
1580
1577
|
}
|
|
1581
|
-
function
|
|
1582
|
-
const { boneTracks: e, targetTracks: t, duration: r, ...n } =
|
|
1578
|
+
function Id(i) {
|
|
1579
|
+
const { boneTracks: e, targetTracks: t, duration: r, ...n } = Pd(i), s = t.concat(e.flat()), a = new xt(i.name, r, s);
|
|
1583
1580
|
return { ...n, clip: a };
|
|
1584
1581
|
}
|
|
1585
|
-
function
|
|
1582
|
+
function Pd(i) {
|
|
1586
1583
|
const { skeleton: e, targetPath: t } = i, { times: r, boneSampleDatas: n, duration: s, targetSampleDatas: a, ...o } = Ed(i), l = r.length, c = e.bones, u = zn, h = [], p = [], { points: d, rotates: f } = a;
|
|
1587
|
-
for (let
|
|
1588
|
-
d[
|
|
1589
|
-
const m = t ?? "", y = new At(`${m}.position`, r, h, u), w = new Dt(`${m}.quaternion`, r, p, u), x = [y, w], v = n.map((
|
|
1590
|
-
const { points: E, rotates: L } =
|
|
1584
|
+
for (let P = 0; P < l; P++)
|
|
1585
|
+
d[P].toArray(h, P * 3), f[P].toArray(p, P * 4);
|
|
1586
|
+
const m = t ?? "", y = new At(`${m}.position`, r, h, u), w = new Dt(`${m}.quaternion`, r, p, u), x = [y, w], v = n.map((P, C) => {
|
|
1587
|
+
const { points: E, rotates: L } = P, z = c[C], H = t ? `${t}.skeleton.bones[${C}]` : `${z.name || z.uuid}`, q = [], te = [];
|
|
1591
1588
|
for (let R = 0; R < l; R++)
|
|
1592
1589
|
E && E[R].toArray(q, R * 3), L[R].toArray(te, R * 4);
|
|
1593
1590
|
const F = [];
|
|
@@ -1613,12 +1610,12 @@ function Ed(i) {
|
|
|
1613
1610
|
const ie = Q.clone().multiply(de);
|
|
1614
1611
|
return w.push(ie), re;
|
|
1615
1612
|
}, m);
|
|
1616
|
-
const x = w[0], v = new A(),
|
|
1617
|
-
x.decompose(v,
|
|
1613
|
+
const x = w[0], v = new A(), P = new ue(), C = new A();
|
|
1614
|
+
x.decompose(v, P, C);
|
|
1618
1615
|
const E = _n(i, u), L = vi(c), z = y[0], H = new A().setFromMatrixPosition(w[1]).negate().transformDirection(z).transformDirection(m), { rotates: q, points: te, ...F } = yi({ ...i, curve: e, target: o, position: !0, rotate: !0, anchor: v, front: H, ts: L }), D = xi({ curve: e, division: c, duration: E }), R = te.map((Q, re) => {
|
|
1619
1616
|
const de = q[re], ie = new J().compose(Q, de, d);
|
|
1620
1617
|
return ie.premultiply(f), ie;
|
|
1621
|
-
}), Z = { points: te, rotates: q, matrixs: R }, W = [], O = R.map((Q) => (W.push(
|
|
1618
|
+
}), Z = { points: te, rotates: q, matrixs: R }, W = [], O = R.map((Q) => (W.push(P.clone()), Q.clone().multiply(x))), X = L.length, U = e.getLengths(c).map((Q) => Q / u), $ = [{ rotates: W, us: U, matrixs: O }], G = r ? function(Q, re, de) {
|
|
1622
1619
|
const ie = $[Q].us[re] - de / u;
|
|
1623
1620
|
return {
|
|
1624
1621
|
u: ie,
|
|
@@ -1638,11 +1635,11 @@ function Ed(i) {
|
|
|
1638
1635
|
for (let Q = 1; Q < Y; Q++) {
|
|
1639
1636
|
const re = [], de = [], ie = [], ne = [];
|
|
1640
1637
|
$.push({ points: re, rotates: de, us: ie, matrixs: ne });
|
|
1641
|
-
const Te = w[Q], Wt = y[Q], St = Q - 1, Tr = $[St], Cr = w[St],
|
|
1638
|
+
const Te = w[Q], Wt = y[Q], St = Q - 1, Tr = $[St], Cr = w[St], Ir = y[St], { matrixs: Ve, points: Vt, rotates: er } = Tr, _e = new A(), et = new ue(), tt = new A();
|
|
1642
1639
|
Cr.decompose(_e, et, tt);
|
|
1643
1640
|
const Ot = St - 1, tr = Ot < 0 ? R : $[Ot].matrixs, De = new A(), Oe = new ue(), ot = new A();
|
|
1644
1641
|
Te.decompose(De, Oe, ot);
|
|
1645
|
-
const lt = new A().setFromMatrixPosition(Wt).sub(new A().setFromMatrixPosition(
|
|
1642
|
+
const lt = new A().setFromMatrixPosition(Wt).sub(new A().setFromMatrixPosition(Ir)).length(), _t = De.length();
|
|
1646
1643
|
for (let He = 0; He < X; He++) {
|
|
1647
1644
|
const { point: ke, u: ct } = G(St, He, lt);
|
|
1648
1645
|
ie.push(ct), de.push(Oe.clone());
|
|
@@ -1663,14 +1660,14 @@ function Ed(i) {
|
|
|
1663
1660
|
ke.applyMatrix4(Ft);
|
|
1664
1661
|
const ht = ke.length();
|
|
1665
1662
|
ke.copy(De).multiplyScalar(ht / _t), re.push(ke);
|
|
1666
|
-
const
|
|
1663
|
+
const Pr = new J().compose(ke, Oe, ot);
|
|
1667
1664
|
if (Q === K) {
|
|
1668
1665
|
const nr = e.getTangentAt(ct);
|
|
1669
1666
|
nr.negate().transformDirection(Ft);
|
|
1670
1667
|
const sr = new ue().setFromUnitVectors(ke.clone().normalize(), nr);
|
|
1671
|
-
sr.premultiply(Oe).normalize(), de[He] = sr,
|
|
1668
|
+
sr.premultiply(Oe).normalize(), de[He] = sr, Pr.compose(ke, sr, ot);
|
|
1672
1669
|
}
|
|
1673
|
-
|
|
1670
|
+
Pr.premultiply(Xe), ne.push(Pr);
|
|
1674
1671
|
}
|
|
1675
1672
|
}
|
|
1676
1673
|
return { ...F, times: D, boneSampleDatas: $, targetSampleDatas: Z, duration: E };
|
|
@@ -3037,8 +3034,8 @@ function Gd() {
|
|
|
3037
3034
|
}
|
|
3038
3035
|
}
|
|
3039
3036
|
}
|
|
3040
|
-
h.race =
|
|
3041
|
-
function
|
|
3037
|
+
h.race = P;
|
|
3038
|
+
function P(C) {
|
|
3042
3039
|
var E = this;
|
|
3043
3040
|
if (Object.prototype.toString.call(C) !== "[object Array]")
|
|
3044
3041
|
return this.reject(new TypeError("must be an array"));
|
|
@@ -3108,8 +3105,8 @@ function Gd() {
|
|
|
3108
3105
|
} catch (M) {
|
|
3109
3106
|
if (M.name !== "TypeError")
|
|
3110
3107
|
throw M;
|
|
3111
|
-
for (var b = typeof BlobBuilder < "u" ? BlobBuilder : typeof MSBlobBuilder < "u" ? MSBlobBuilder : typeof MozBlobBuilder < "u" ? MozBlobBuilder : WebKitBlobBuilder, T = new b(),
|
|
3112
|
-
T.append(g[
|
|
3108
|
+
for (var b = typeof BlobBuilder < "u" ? BlobBuilder : typeof MSBlobBuilder < "u" ? MSBlobBuilder : typeof MozBlobBuilder < "u" ? MozBlobBuilder : WebKitBlobBuilder, T = new b(), I = 0; I < g.length; I += 1)
|
|
3109
|
+
T.append(g[I]);
|
|
3113
3110
|
return T.getBlob(S.type);
|
|
3114
3111
|
}
|
|
3115
3112
|
}
|
|
@@ -3132,20 +3129,20 @@ function Gd() {
|
|
|
3132
3129
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
3133
3130
|
return arguments[arguments.length - 1];
|
|
3134
3131
|
}
|
|
3135
|
-
var y = "local-forage-detect-blob-support", w = void 0, x = {}, v = Object.prototype.toString,
|
|
3132
|
+
var y = "local-forage-detect-blob-support", w = void 0, x = {}, v = Object.prototype.toString, P = "readonly", C = "readwrite";
|
|
3136
3133
|
function E(g) {
|
|
3137
|
-
for (var S = g.length, b = new ArrayBuffer(S), T = new Uint8Array(b),
|
|
3138
|
-
T[
|
|
3134
|
+
for (var S = g.length, b = new ArrayBuffer(S), T = new Uint8Array(b), I = 0; I < S; I++)
|
|
3135
|
+
T[I] = g.charCodeAt(I);
|
|
3139
3136
|
return b;
|
|
3140
3137
|
}
|
|
3141
3138
|
function L(g) {
|
|
3142
3139
|
return new h(function(S) {
|
|
3143
3140
|
var b = g.transaction(y, C), T = u([""]);
|
|
3144
|
-
b.objectStore(y).put(T, "key"), b.onabort = function(
|
|
3145
|
-
|
|
3141
|
+
b.objectStore(y).put(T, "key"), b.onabort = function(I) {
|
|
3142
|
+
I.preventDefault(), I.stopPropagation(), S(!1);
|
|
3146
3143
|
}, b.oncomplete = function() {
|
|
3147
|
-
var
|
|
3148
|
-
S(M || !
|
|
3144
|
+
var I = navigator.userAgent.match(/Chrome\/(\d+)/), M = navigator.userAgent.match(/Edge\//);
|
|
3145
|
+
S(M || !I || parseInt(I[1], 10) >= 43);
|
|
3149
3146
|
};
|
|
3150
3147
|
}).catch(function() {
|
|
3151
3148
|
return !1;
|
|
@@ -3158,8 +3155,8 @@ function Gd() {
|
|
|
3158
3155
|
}
|
|
3159
3156
|
function H(g) {
|
|
3160
3157
|
var S = x[g.name], b = {};
|
|
3161
|
-
b.promise = new h(function(T,
|
|
3162
|
-
b.resolve = T, b.reject =
|
|
3158
|
+
b.promise = new h(function(T, I) {
|
|
3159
|
+
b.resolve = T, b.reject = I;
|
|
3163
3160
|
}), S.deferredOperations.push(b), S.dbReady ? S.dbReady = S.dbReady.then(function() {
|
|
3164
3161
|
return b.promise;
|
|
3165
3162
|
}) : S.dbReady = b.promise;
|
|
@@ -3181,9 +3178,9 @@ function Gd() {
|
|
|
3181
3178
|
H(g), g.db.close();
|
|
3182
3179
|
else
|
|
3183
3180
|
return b(g.db);
|
|
3184
|
-
var
|
|
3185
|
-
S &&
|
|
3186
|
-
var M = l.open.apply(l,
|
|
3181
|
+
var I = [g.name];
|
|
3182
|
+
S && I.push(g.version);
|
|
3183
|
+
var M = l.open.apply(l, I);
|
|
3187
3184
|
S && (M.onupgradeneeded = function(B) {
|
|
3188
3185
|
var k = M.result;
|
|
3189
3186
|
try {
|
|
@@ -3213,8 +3210,8 @@ function Gd() {
|
|
|
3213
3210
|
function Z(g, S) {
|
|
3214
3211
|
if (!g.db)
|
|
3215
3212
|
return !0;
|
|
3216
|
-
var b = !g.db.objectStoreNames.contains(g.storeName), T = g.version < g.db.version,
|
|
3217
|
-
if (T && (g.version !== S && console.warn('The database "' + g.name + `" can't be downgraded from version ` + g.db.version + " to version " + g.version + "."), g.version = g.db.version),
|
|
3213
|
+
var b = !g.db.objectStoreNames.contains(g.storeName), T = g.version < g.db.version, I = g.version > g.db.version;
|
|
3214
|
+
if (T && (g.version !== S && console.warn('The database "' + g.name + `" can't be downgraded from version ` + g.db.version + " to version " + g.version + "."), g.version = g.db.version), I || b) {
|
|
3218
3215
|
if (b) {
|
|
3219
3216
|
var M = g.db.version + 1;
|
|
3220
3217
|
M > g.version && (g.version = M);
|
|
@@ -3226,8 +3223,8 @@ function Gd() {
|
|
|
3226
3223
|
function W(g) {
|
|
3227
3224
|
return new h(function(S, b) {
|
|
3228
3225
|
var T = new FileReader();
|
|
3229
|
-
T.onerror = b, T.onloadend = function(
|
|
3230
|
-
var M = btoa(
|
|
3226
|
+
T.onerror = b, T.onloadend = function(I) {
|
|
3227
|
+
var M = btoa(I.target.result || "");
|
|
3231
3228
|
S({
|
|
3232
3229
|
__local_forage_encoded_blob: !0,
|
|
3233
3230
|
data: M,
|
|
@@ -3254,8 +3251,8 @@ function Gd() {
|
|
|
3254
3251
|
function $(g) {
|
|
3255
3252
|
H(g);
|
|
3256
3253
|
for (var S = x[g.name], b = S.forages, T = 0; T < b.length; T++) {
|
|
3257
|
-
var
|
|
3258
|
-
|
|
3254
|
+
var I = b[T];
|
|
3255
|
+
I._dbInfo.db && (I._dbInfo.db.close(), I._dbInfo.db = null);
|
|
3259
3256
|
}
|
|
3260
3257
|
return g.db = null, D(g).then(function(M) {
|
|
3261
3258
|
return g.db = M, Z(g) ? R(g) : M;
|
|
@@ -3270,8 +3267,8 @@ function Gd() {
|
|
|
3270
3267
|
function G(g, S, b, T) {
|
|
3271
3268
|
T === void 0 && (T = 1);
|
|
3272
3269
|
try {
|
|
3273
|
-
var
|
|
3274
|
-
b(null,
|
|
3270
|
+
var I = g.db.transaction(g.storeName, S);
|
|
3271
|
+
b(null, I);
|
|
3275
3272
|
} catch (M) {
|
|
3276
3273
|
if (T > 0 && (!g.db || M.name === "InvalidStateError" || M.name === "NotFoundError"))
|
|
3277
3274
|
return h.resolve().then(function() {
|
|
@@ -3304,23 +3301,23 @@ function Gd() {
|
|
|
3304
3301
|
if (g)
|
|
3305
3302
|
for (var T in g)
|
|
3306
3303
|
b[T] = g[T];
|
|
3307
|
-
var
|
|
3308
|
-
|
|
3304
|
+
var I = x[b.name];
|
|
3305
|
+
I || (I = Y(), x[b.name] = I), I.forages.push(S), S._initReady || (S._initReady = S.ready, S.ready = U);
|
|
3309
3306
|
var M = [];
|
|
3310
3307
|
function B() {
|
|
3311
3308
|
return h.resolve();
|
|
3312
3309
|
}
|
|
3313
|
-
for (var k = 0; k <
|
|
3314
|
-
var N =
|
|
3310
|
+
for (var k = 0; k < I.forages.length; k++) {
|
|
3311
|
+
var N = I.forages[k];
|
|
3315
3312
|
N !== S && M.push(N._initReady().catch(B));
|
|
3316
3313
|
}
|
|
3317
|
-
var j =
|
|
3314
|
+
var j = I.forages.slice(0);
|
|
3318
3315
|
return h.all(M).then(function() {
|
|
3319
|
-
return b.db =
|
|
3316
|
+
return b.db = I.db, D(b);
|
|
3320
3317
|
}).then(function(_) {
|
|
3321
3318
|
return b.db = _, Z(b, S._defaultConfig.version) ? R(b) : _;
|
|
3322
3319
|
}).then(function(_) {
|
|
3323
|
-
b.db =
|
|
3320
|
+
b.db = I.db = _, S._dbInfo = b;
|
|
3324
3321
|
for (var ee = 0; ee < j.length; ee++) {
|
|
3325
3322
|
var pe = j[ee];
|
|
3326
3323
|
pe !== S && (pe._dbInfo.db = b.db, pe._dbInfo.version = b.version);
|
|
@@ -3330,16 +3327,16 @@ function Gd() {
|
|
|
3330
3327
|
function Q(g, S) {
|
|
3331
3328
|
var b = this;
|
|
3332
3329
|
g = f(g);
|
|
3333
|
-
var T = new h(function(
|
|
3330
|
+
var T = new h(function(I, M) {
|
|
3334
3331
|
b.ready().then(function() {
|
|
3335
|
-
G(b._dbInfo,
|
|
3332
|
+
G(b._dbInfo, P, function(B, k) {
|
|
3336
3333
|
if (B)
|
|
3337
3334
|
return M(B);
|
|
3338
3335
|
try {
|
|
3339
3336
|
var N = k.objectStore(b._dbInfo.storeName), j = N.get(g);
|
|
3340
3337
|
j.onsuccess = function() {
|
|
3341
3338
|
var _ = j.result;
|
|
3342
|
-
_ === void 0 && (_ = null), X(_) && (_ = O(_)),
|
|
3339
|
+
_ === void 0 && (_ = null), X(_) && (_ = O(_)), I(_);
|
|
3343
3340
|
}, j.onerror = function() {
|
|
3344
3341
|
M(j.error);
|
|
3345
3342
|
};
|
|
@@ -3352,9 +3349,9 @@ function Gd() {
|
|
|
3352
3349
|
return p(T, S), T;
|
|
3353
3350
|
}
|
|
3354
3351
|
function re(g, S) {
|
|
3355
|
-
var b = this, T = new h(function(
|
|
3352
|
+
var b = this, T = new h(function(I, M) {
|
|
3356
3353
|
b.ready().then(function() {
|
|
3357
|
-
G(b._dbInfo,
|
|
3354
|
+
G(b._dbInfo, P, function(B, k) {
|
|
3358
3355
|
if (B)
|
|
3359
3356
|
return M(B);
|
|
3360
3357
|
try {
|
|
@@ -3365,9 +3362,9 @@ function Gd() {
|
|
|
3365
3362
|
var pe = ee.value;
|
|
3366
3363
|
X(pe) && (pe = O(pe));
|
|
3367
3364
|
var xe = g(pe, ee.key, _++);
|
|
3368
|
-
xe !== void 0 ?
|
|
3365
|
+
xe !== void 0 ? I(xe) : ee.continue();
|
|
3369
3366
|
} else
|
|
3370
|
-
|
|
3367
|
+
I();
|
|
3371
3368
|
}, j.onerror = function() {
|
|
3372
3369
|
M(j.error);
|
|
3373
3370
|
};
|
|
@@ -3382,7 +3379,7 @@ function Gd() {
|
|
|
3382
3379
|
function de(g, S, b) {
|
|
3383
3380
|
var T = this;
|
|
3384
3381
|
g = f(g);
|
|
3385
|
-
var
|
|
3382
|
+
var I = new h(function(M, B) {
|
|
3386
3383
|
var k;
|
|
3387
3384
|
T.ready().then(function() {
|
|
3388
3385
|
return k = T._dbInfo, v.call(S) === "[object Blob]" ? z(k.db).then(function(N) {
|
|
@@ -3408,12 +3405,12 @@ function Gd() {
|
|
|
3408
3405
|
});
|
|
3409
3406
|
}).catch(B);
|
|
3410
3407
|
});
|
|
3411
|
-
return p(
|
|
3408
|
+
return p(I, b), I;
|
|
3412
3409
|
}
|
|
3413
3410
|
function ie(g, S) {
|
|
3414
3411
|
var b = this;
|
|
3415
3412
|
g = f(g);
|
|
3416
|
-
var T = new h(function(
|
|
3413
|
+
var T = new h(function(I, M) {
|
|
3417
3414
|
b.ready().then(function() {
|
|
3418
3415
|
G(b._dbInfo, C, function(B, k) {
|
|
3419
3416
|
if (B)
|
|
@@ -3421,7 +3418,7 @@ function Gd() {
|
|
|
3421
3418
|
try {
|
|
3422
3419
|
var N = k.objectStore(b._dbInfo.storeName), j = N.delete(g);
|
|
3423
3420
|
k.oncomplete = function() {
|
|
3424
|
-
|
|
3421
|
+
I();
|
|
3425
3422
|
}, k.onerror = function() {
|
|
3426
3423
|
M(j.error);
|
|
3427
3424
|
}, k.onabort = function() {
|
|
@@ -3437,56 +3434,56 @@ function Gd() {
|
|
|
3437
3434
|
return p(T, S), T;
|
|
3438
3435
|
}
|
|
3439
3436
|
function ne(g) {
|
|
3440
|
-
var S = this, b = new h(function(T,
|
|
3437
|
+
var S = this, b = new h(function(T, I) {
|
|
3441
3438
|
S.ready().then(function() {
|
|
3442
3439
|
G(S._dbInfo, C, function(M, B) {
|
|
3443
3440
|
if (M)
|
|
3444
|
-
return
|
|
3441
|
+
return I(M);
|
|
3445
3442
|
try {
|
|
3446
3443
|
var k = B.objectStore(S._dbInfo.storeName), N = k.clear();
|
|
3447
3444
|
B.oncomplete = function() {
|
|
3448
3445
|
T();
|
|
3449
3446
|
}, B.onabort = B.onerror = function() {
|
|
3450
3447
|
var j = N.error ? N.error : N.transaction.error;
|
|
3451
|
-
|
|
3448
|
+
I(j);
|
|
3452
3449
|
};
|
|
3453
3450
|
} catch (j) {
|
|
3454
|
-
|
|
3451
|
+
I(j);
|
|
3455
3452
|
}
|
|
3456
3453
|
});
|
|
3457
|
-
}).catch(
|
|
3454
|
+
}).catch(I);
|
|
3458
3455
|
});
|
|
3459
3456
|
return p(b, g), b;
|
|
3460
3457
|
}
|
|
3461
3458
|
function Te(g) {
|
|
3462
|
-
var S = this, b = new h(function(T,
|
|
3459
|
+
var S = this, b = new h(function(T, I) {
|
|
3463
3460
|
S.ready().then(function() {
|
|
3464
|
-
G(S._dbInfo,
|
|
3461
|
+
G(S._dbInfo, P, function(M, B) {
|
|
3465
3462
|
if (M)
|
|
3466
|
-
return
|
|
3463
|
+
return I(M);
|
|
3467
3464
|
try {
|
|
3468
3465
|
var k = B.objectStore(S._dbInfo.storeName), N = k.count();
|
|
3469
3466
|
N.onsuccess = function() {
|
|
3470
3467
|
T(N.result);
|
|
3471
3468
|
}, N.onerror = function() {
|
|
3472
|
-
|
|
3469
|
+
I(N.error);
|
|
3473
3470
|
};
|
|
3474
3471
|
} catch (j) {
|
|
3475
|
-
|
|
3472
|
+
I(j);
|
|
3476
3473
|
}
|
|
3477
3474
|
});
|
|
3478
|
-
}).catch(
|
|
3475
|
+
}).catch(I);
|
|
3479
3476
|
});
|
|
3480
3477
|
return p(b, g), b;
|
|
3481
3478
|
}
|
|
3482
3479
|
function Wt(g, S) {
|
|
3483
|
-
var b = this, T = new h(function(
|
|
3480
|
+
var b = this, T = new h(function(I, M) {
|
|
3484
3481
|
if (g < 0) {
|
|
3485
|
-
|
|
3482
|
+
I(null);
|
|
3486
3483
|
return;
|
|
3487
3484
|
}
|
|
3488
3485
|
b.ready().then(function() {
|
|
3489
|
-
G(b._dbInfo,
|
|
3486
|
+
G(b._dbInfo, P, function(B, k) {
|
|
3490
3487
|
if (B)
|
|
3491
3488
|
return M(B);
|
|
3492
3489
|
try {
|
|
@@ -3494,10 +3491,10 @@ function Gd() {
|
|
|
3494
3491
|
_.onsuccess = function() {
|
|
3495
3492
|
var ee = _.result;
|
|
3496
3493
|
if (!ee) {
|
|
3497
|
-
|
|
3494
|
+
I(null);
|
|
3498
3495
|
return;
|
|
3499
3496
|
}
|
|
3500
|
-
g === 0 || j ?
|
|
3497
|
+
g === 0 || j ? I(ee.key) : (j = !0, ee.advance(g));
|
|
3501
3498
|
}, _.onerror = function() {
|
|
3502
3499
|
M(_.error);
|
|
3503
3500
|
};
|
|
@@ -3510,11 +3507,11 @@ function Gd() {
|
|
|
3510
3507
|
return p(T, S), T;
|
|
3511
3508
|
}
|
|
3512
3509
|
function St(g) {
|
|
3513
|
-
var S = this, b = new h(function(T,
|
|
3510
|
+
var S = this, b = new h(function(T, I) {
|
|
3514
3511
|
S.ready().then(function() {
|
|
3515
|
-
G(S._dbInfo,
|
|
3512
|
+
G(S._dbInfo, P, function(M, B) {
|
|
3516
3513
|
if (M)
|
|
3517
|
-
return
|
|
3514
|
+
return I(M);
|
|
3518
3515
|
try {
|
|
3519
3516
|
var k = B.objectStore(S._dbInfo.storeName), N = k.openKeyCursor(), j = [];
|
|
3520
3517
|
N.onsuccess = function() {
|
|
@@ -3525,13 +3522,13 @@ function Gd() {
|
|
|
3525
3522
|
}
|
|
3526
3523
|
j.push(_.key), _.continue();
|
|
3527
3524
|
}, N.onerror = function() {
|
|
3528
|
-
|
|
3525
|
+
I(N.error);
|
|
3529
3526
|
};
|
|
3530
3527
|
} catch (_) {
|
|
3531
|
-
|
|
3528
|
+
I(_);
|
|
3532
3529
|
}
|
|
3533
3530
|
});
|
|
3534
|
-
}).catch(
|
|
3531
|
+
}).catch(I);
|
|
3535
3532
|
});
|
|
3536
3533
|
return p(b, g), b;
|
|
3537
3534
|
}
|
|
@@ -3539,9 +3536,9 @@ function Gd() {
|
|
|
3539
3536
|
S = m.apply(this, arguments);
|
|
3540
3537
|
var b = this.config();
|
|
3541
3538
|
g = typeof g != "function" && g || {}, g.name || (g.name = g.name || b.name, g.storeName = g.storeName || b.storeName);
|
|
3542
|
-
var T = this,
|
|
3539
|
+
var T = this, I;
|
|
3543
3540
|
if (!g.name)
|
|
3544
|
-
|
|
3541
|
+
I = h.reject("Invalid arguments");
|
|
3545
3542
|
else {
|
|
3546
3543
|
var M = g.name === b.name && T._dbInfo.db, B = M ? h.resolve(T._dbInfo.db) : D(g).then(function(k) {
|
|
3547
3544
|
var N = x[g.name], j = N.forages;
|
|
@@ -3550,7 +3547,7 @@ function Gd() {
|
|
|
3550
3547
|
j[_]._dbInfo.db = k;
|
|
3551
3548
|
return k;
|
|
3552
3549
|
});
|
|
3553
|
-
g.storeName ?
|
|
3550
|
+
g.storeName ? I = B.then(function(k) {
|
|
3554
3551
|
if (k.objectStoreNames.contains(g.storeName)) {
|
|
3555
3552
|
var N = k.version + 1;
|
|
3556
3553
|
H(g);
|
|
@@ -3560,11 +3557,11 @@ function Gd() {
|
|
|
3560
3557
|
var pe = _[ee];
|
|
3561
3558
|
pe._dbInfo.db = null, pe._dbInfo.version = N;
|
|
3562
3559
|
}
|
|
3563
|
-
var xe = new h(function(we,
|
|
3560
|
+
var xe = new h(function(we, Pe) {
|
|
3564
3561
|
var Ce = l.open(g.name, N);
|
|
3565
3562
|
Ce.onerror = function(Ye) {
|
|
3566
3563
|
var Ar = Ce.result;
|
|
3567
|
-
Ar.close(),
|
|
3564
|
+
Ar.close(), Pe(Ye);
|
|
3568
3565
|
}, Ce.onupgradeneeded = function() {
|
|
3569
3566
|
var Ye = Ce.result;
|
|
3570
3567
|
Ye.deleteObjectStore(g.storeName);
|
|
@@ -3575,8 +3572,8 @@ function Gd() {
|
|
|
3575
3572
|
});
|
|
3576
3573
|
return xe.then(function(we) {
|
|
3577
3574
|
j.db = we;
|
|
3578
|
-
for (var
|
|
3579
|
-
var Ce = _[
|
|
3575
|
+
for (var Pe = 0; Pe < _.length; Pe++) {
|
|
3576
|
+
var Ce = _[Pe];
|
|
3580
3577
|
Ce._dbInfo.db = we, q(Ce._dbInfo);
|
|
3581
3578
|
}
|
|
3582
3579
|
}).catch(function(we) {
|
|
@@ -3584,7 +3581,7 @@ function Gd() {
|
|
|
3584
3581
|
}), we;
|
|
3585
3582
|
});
|
|
3586
3583
|
}
|
|
3587
|
-
}) :
|
|
3584
|
+
}) : I = B.then(function(k) {
|
|
3588
3585
|
H(g);
|
|
3589
3586
|
var N = x[g.name], j = N.forages;
|
|
3590
3587
|
k.close();
|
|
@@ -3593,22 +3590,22 @@ function Gd() {
|
|
|
3593
3590
|
ee._dbInfo.db = null;
|
|
3594
3591
|
}
|
|
3595
3592
|
var pe = new h(function(xe, we) {
|
|
3596
|
-
var
|
|
3597
|
-
|
|
3598
|
-
var Ce =
|
|
3599
|
-
Ce && Ce.close(), we(
|
|
3600
|
-
},
|
|
3593
|
+
var Pe = l.deleteDatabase(g.name);
|
|
3594
|
+
Pe.onerror = function() {
|
|
3595
|
+
var Ce = Pe.result;
|
|
3596
|
+
Ce && Ce.close(), we(Pe.error);
|
|
3597
|
+
}, Pe.onblocked = function() {
|
|
3601
3598
|
console.warn('dropInstance blocked for database "' + g.name + '" until all open connections are closed');
|
|
3602
|
-
},
|
|
3603
|
-
var Ce =
|
|
3599
|
+
}, Pe.onsuccess = function() {
|
|
3600
|
+
var Ce = Pe.result;
|
|
3604
3601
|
Ce && Ce.close(), xe(Ce);
|
|
3605
3602
|
};
|
|
3606
3603
|
});
|
|
3607
3604
|
return pe.then(function(xe) {
|
|
3608
3605
|
N.db = xe;
|
|
3609
3606
|
for (var we = 0; we < j.length; we++) {
|
|
3610
|
-
var
|
|
3611
|
-
q(
|
|
3607
|
+
var Pe = j[we];
|
|
3608
|
+
q(Pe._dbInfo);
|
|
3612
3609
|
}
|
|
3613
3610
|
}).catch(function(xe) {
|
|
3614
3611
|
throw (te(g, xe) || h.resolve()).catch(function() {
|
|
@@ -3616,7 +3613,7 @@ function Gd() {
|
|
|
3616
3613
|
});
|
|
3617
3614
|
});
|
|
3618
3615
|
}
|
|
3619
|
-
return p(
|
|
3616
|
+
return p(I, S), I;
|
|
3620
3617
|
}
|
|
3621
3618
|
var Cr = {
|
|
3622
3619
|
_driver: "asyncStorage",
|
|
@@ -3632,16 +3629,16 @@ function Gd() {
|
|
|
3632
3629
|
keys: St,
|
|
3633
3630
|
dropInstance: Tr
|
|
3634
3631
|
};
|
|
3635
|
-
function
|
|
3632
|
+
function Ir() {
|
|
3636
3633
|
return typeof openDatabase == "function";
|
|
3637
3634
|
}
|
|
3638
3635
|
var Ve = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Vt = "~~local_forage_type~", er = /^~~local_forage_type~([^~]+)~/, _e = "__lfsc__:", et = _e.length, tt = "arbf", Ot = "blob", tr = "si08", De = "ui08", Oe = "uic8", ot = "si16", lt = "si32", _t = "ur16", He = "ui32", ke = "fl32", ct = "fl64", Xe = et + tt.length, Ht = Object.prototype.toString;
|
|
3639
3636
|
function rr(g) {
|
|
3640
|
-
var S = g.length * 0.75, b = g.length, T,
|
|
3637
|
+
var S = g.length * 0.75, b = g.length, T, I = 0, M, B, k, N;
|
|
3641
3638
|
g[g.length - 1] === "=" && (S--, g[g.length - 2] === "=" && S--);
|
|
3642
3639
|
var j = new ArrayBuffer(S), _ = new Uint8Array(j);
|
|
3643
3640
|
for (T = 0; T < b; T += 4)
|
|
3644
|
-
M = Ve.indexOf(g[T]), B = Ve.indexOf(g[T + 1]), k = Ve.indexOf(g[T + 2]), N = Ve.indexOf(g[T + 3]), _[
|
|
3641
|
+
M = Ve.indexOf(g[T]), B = Ve.indexOf(g[T + 1]), k = Ve.indexOf(g[T + 2]), N = Ve.indexOf(g[T + 3]), _[I++] = M << 2 | B >> 4, _[I++] = (B & 15) << 4 | k >> 2, _[I++] = (k & 3) << 6 | N & 63;
|
|
3645
3642
|
return j;
|
|
3646
3643
|
}
|
|
3647
3644
|
function Lt(g) {
|
|
@@ -3653,8 +3650,8 @@ function Gd() {
|
|
|
3653
3650
|
function Rt(g, S) {
|
|
3654
3651
|
var b = "";
|
|
3655
3652
|
if (g && (b = Ht.call(g)), g && (b === "[object ArrayBuffer]" || g.buffer && Ht.call(g.buffer) === "[object ArrayBuffer]")) {
|
|
3656
|
-
var T,
|
|
3657
|
-
g instanceof ArrayBuffer ? (T = g,
|
|
3653
|
+
var T, I = _e;
|
|
3654
|
+
g instanceof ArrayBuffer ? (T = g, I += tt) : (T = g.buffer, b === "[object Int8Array]" ? I += tr : b === "[object Uint8Array]" ? I += De : b === "[object Uint8ClampedArray]" ? I += Oe : b === "[object Int16Array]" ? I += ot : b === "[object Uint16Array]" ? I += _t : b === "[object Int32Array]" ? I += lt : b === "[object Uint32Array]" ? I += He : b === "[object Float32Array]" ? I += ke : b === "[object Float64Array]" ? I += ct : S(new Error("Failed to get type for BinaryArray"))), S(I + Lt(T));
|
|
3658
3655
|
} else if (b === "[object Blob]") {
|
|
3659
3656
|
var M = new FileReader();
|
|
3660
3657
|
M.onload = function() {
|
|
@@ -3673,8 +3670,8 @@ function Gd() {
|
|
|
3673
3670
|
return JSON.parse(g);
|
|
3674
3671
|
var S = g.substring(Xe), b = g.substring(et, Xe), T;
|
|
3675
3672
|
if (b === Ot && er.test(S)) {
|
|
3676
|
-
var
|
|
3677
|
-
T =
|
|
3673
|
+
var I = S.match(er);
|
|
3674
|
+
T = I[1], S = S.substring(I[0].length);
|
|
3678
3675
|
}
|
|
3679
3676
|
var M = rr(S);
|
|
3680
3677
|
switch (b) {
|
|
@@ -3720,7 +3717,7 @@ function Gd() {
|
|
|
3720
3717
|
if (g)
|
|
3721
3718
|
for (var T in g)
|
|
3722
3719
|
b[T] = typeof g[T] != "string" ? g[T].toString() : g[T];
|
|
3723
|
-
var
|
|
3720
|
+
var I = new h(function(M, B) {
|
|
3724
3721
|
try {
|
|
3725
3722
|
b.db = openDatabase(b.name, String(b.version), b.description, b.size);
|
|
3726
3723
|
} catch (k) {
|
|
@@ -3734,27 +3731,27 @@ function Gd() {
|
|
|
3734
3731
|
});
|
|
3735
3732
|
}, B);
|
|
3736
3733
|
});
|
|
3737
|
-
return b.serializer = Mt,
|
|
3734
|
+
return b.serializer = Mt, I;
|
|
3738
3735
|
}
|
|
3739
|
-
function ht(g, S, b, T,
|
|
3740
|
-
g.executeSql(b, T,
|
|
3736
|
+
function ht(g, S, b, T, I, M) {
|
|
3737
|
+
g.executeSql(b, T, I, function(B, k) {
|
|
3741
3738
|
k.code === k.SYNTAX_ERR ? B.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [S.storeName], function(N, j) {
|
|
3742
3739
|
j.rows.length ? M(N, k) : Tt(N, S, function() {
|
|
3743
|
-
N.executeSql(b, T,
|
|
3740
|
+
N.executeSql(b, T, I, M);
|
|
3744
3741
|
}, M);
|
|
3745
3742
|
}, M) : M(B, k);
|
|
3746
3743
|
}, M);
|
|
3747
3744
|
}
|
|
3748
|
-
function
|
|
3745
|
+
function Pr(g, S) {
|
|
3749
3746
|
var b = this;
|
|
3750
3747
|
g = f(g);
|
|
3751
|
-
var T = new h(function(
|
|
3748
|
+
var T = new h(function(I, M) {
|
|
3752
3749
|
b.ready().then(function() {
|
|
3753
3750
|
var B = b._dbInfo;
|
|
3754
3751
|
B.db.transaction(function(k) {
|
|
3755
3752
|
ht(k, B, "SELECT * FROM " + B.storeName + " WHERE key = ? LIMIT 1", [g], function(N, j) {
|
|
3756
3753
|
var _ = j.rows.length ? j.rows.item(0).value : null;
|
|
3757
|
-
_ && (_ = B.serializer.deserialize(_)),
|
|
3754
|
+
_ && (_ = B.serializer.deserialize(_)), I(_);
|
|
3758
3755
|
}, function(N, j) {
|
|
3759
3756
|
M(j);
|
|
3760
3757
|
});
|
|
@@ -3764,7 +3761,7 @@ function Gd() {
|
|
|
3764
3761
|
return p(T, S), T;
|
|
3765
3762
|
}
|
|
3766
3763
|
function nr(g, S) {
|
|
3767
|
-
var b = this, T = new h(function(
|
|
3764
|
+
var b = this, T = new h(function(I, M) {
|
|
3768
3765
|
b.ready().then(function() {
|
|
3769
3766
|
var B = b._dbInfo;
|
|
3770
3767
|
B.db.transaction(function(k) {
|
|
@@ -3772,11 +3769,11 @@ function Gd() {
|
|
|
3772
3769
|
for (var _ = j.rows, ee = _.length, pe = 0; pe < ee; pe++) {
|
|
3773
3770
|
var xe = _.item(pe), we = xe.value;
|
|
3774
3771
|
if (we && (we = B.serializer.deserialize(we)), we = g(we, xe.key, pe + 1), we !== void 0) {
|
|
3775
|
-
|
|
3772
|
+
I(we);
|
|
3776
3773
|
return;
|
|
3777
3774
|
}
|
|
3778
3775
|
}
|
|
3779
|
-
|
|
3776
|
+
I();
|
|
3780
3777
|
}, function(N, j) {
|
|
3781
3778
|
M(j);
|
|
3782
3779
|
});
|
|
@@ -3786,12 +3783,12 @@ function Gd() {
|
|
|
3786
3783
|
return p(T, S), T;
|
|
3787
3784
|
}
|
|
3788
3785
|
function sr(g, S, b, T) {
|
|
3789
|
-
var
|
|
3786
|
+
var I = this;
|
|
3790
3787
|
g = f(g);
|
|
3791
3788
|
var M = new h(function(B, k) {
|
|
3792
|
-
|
|
3789
|
+
I.ready().then(function() {
|
|
3793
3790
|
S === void 0 && (S = null);
|
|
3794
|
-
var N = S, j =
|
|
3791
|
+
var N = S, j = I._dbInfo;
|
|
3795
3792
|
j.serializer.serialize(S, function(_, ee) {
|
|
3796
3793
|
ee ? k(ee) : j.db.transaction(function(pe) {
|
|
3797
3794
|
ht(pe, j, "INSERT OR REPLACE INTO " + j.storeName + " (key, value) VALUES (?, ?)", [g, _], function() {
|
|
@@ -3802,7 +3799,7 @@ function Gd() {
|
|
|
3802
3799
|
}, function(pe) {
|
|
3803
3800
|
if (pe.code === pe.QUOTA_ERR) {
|
|
3804
3801
|
if (T > 0) {
|
|
3805
|
-
B(sr.apply(
|
|
3802
|
+
B(sr.apply(I, [g, N, b, T - 1]));
|
|
3806
3803
|
return;
|
|
3807
3804
|
}
|
|
3808
3805
|
k(pe);
|
|
@@ -3819,12 +3816,12 @@ function Gd() {
|
|
|
3819
3816
|
function cc(g, S) {
|
|
3820
3817
|
var b = this;
|
|
3821
3818
|
g = f(g);
|
|
3822
|
-
var T = new h(function(
|
|
3819
|
+
var T = new h(function(I, M) {
|
|
3823
3820
|
b.ready().then(function() {
|
|
3824
3821
|
var B = b._dbInfo;
|
|
3825
3822
|
B.db.transaction(function(k) {
|
|
3826
3823
|
ht(k, B, "DELETE FROM " + B.storeName + " WHERE key = ?", [g], function() {
|
|
3827
|
-
|
|
3824
|
+
I();
|
|
3828
3825
|
}, function(N, j) {
|
|
3829
3826
|
M(j);
|
|
3830
3827
|
});
|
|
@@ -3834,22 +3831,22 @@ function Gd() {
|
|
|
3834
3831
|
return p(T, S), T;
|
|
3835
3832
|
}
|
|
3836
3833
|
function hc(g) {
|
|
3837
|
-
var S = this, b = new h(function(T,
|
|
3834
|
+
var S = this, b = new h(function(T, I) {
|
|
3838
3835
|
S.ready().then(function() {
|
|
3839
3836
|
var M = S._dbInfo;
|
|
3840
3837
|
M.db.transaction(function(B) {
|
|
3841
3838
|
ht(B, M, "DELETE FROM " + M.storeName, [], function() {
|
|
3842
3839
|
T();
|
|
3843
3840
|
}, function(k, N) {
|
|
3844
|
-
|
|
3841
|
+
I(N);
|
|
3845
3842
|
});
|
|
3846
3843
|
});
|
|
3847
|
-
}).catch(
|
|
3844
|
+
}).catch(I);
|
|
3848
3845
|
});
|
|
3849
3846
|
return p(b, g), b;
|
|
3850
3847
|
}
|
|
3851
3848
|
function uc(g) {
|
|
3852
|
-
var S = this, b = new h(function(T,
|
|
3849
|
+
var S = this, b = new h(function(T, I) {
|
|
3853
3850
|
S.ready().then(function() {
|
|
3854
3851
|
var M = S._dbInfo;
|
|
3855
3852
|
M.db.transaction(function(B) {
|
|
@@ -3857,21 +3854,21 @@ function Gd() {
|
|
|
3857
3854
|
var j = N.rows.item(0).c;
|
|
3858
3855
|
T(j);
|
|
3859
3856
|
}, function(k, N) {
|
|
3860
|
-
|
|
3857
|
+
I(N);
|
|
3861
3858
|
});
|
|
3862
3859
|
});
|
|
3863
|
-
}).catch(
|
|
3860
|
+
}).catch(I);
|
|
3864
3861
|
});
|
|
3865
3862
|
return p(b, g), b;
|
|
3866
3863
|
}
|
|
3867
3864
|
function dc(g, S) {
|
|
3868
|
-
var b = this, T = new h(function(
|
|
3865
|
+
var b = this, T = new h(function(I, M) {
|
|
3869
3866
|
b.ready().then(function() {
|
|
3870
3867
|
var B = b._dbInfo;
|
|
3871
3868
|
B.db.transaction(function(k) {
|
|
3872
3869
|
ht(k, B, "SELECT key FROM " + B.storeName + " WHERE id = ? LIMIT 1", [g + 1], function(N, j) {
|
|
3873
3870
|
var _ = j.rows.length ? j.rows.item(0).key : null;
|
|
3874
|
-
|
|
3871
|
+
I(_);
|
|
3875
3872
|
}, function(N, j) {
|
|
3876
3873
|
M(j);
|
|
3877
3874
|
});
|
|
@@ -3881,7 +3878,7 @@ function Gd() {
|
|
|
3881
3878
|
return p(T, S), T;
|
|
3882
3879
|
}
|
|
3883
3880
|
function pc(g) {
|
|
3884
|
-
var S = this, b = new h(function(T,
|
|
3881
|
+
var S = this, b = new h(function(T, I) {
|
|
3885
3882
|
S.ready().then(function() {
|
|
3886
3883
|
var M = S._dbInfo;
|
|
3887
3884
|
M.db.transaction(function(B) {
|
|
@@ -3890,24 +3887,24 @@ function Gd() {
|
|
|
3890
3887
|
j.push(N.rows.item(_).key);
|
|
3891
3888
|
T(j);
|
|
3892
3889
|
}, function(k, N) {
|
|
3893
|
-
|
|
3890
|
+
I(N);
|
|
3894
3891
|
});
|
|
3895
3892
|
});
|
|
3896
|
-
}).catch(
|
|
3893
|
+
}).catch(I);
|
|
3897
3894
|
});
|
|
3898
3895
|
return p(b, g), b;
|
|
3899
3896
|
}
|
|
3900
3897
|
function fc(g) {
|
|
3901
3898
|
return new h(function(S, b) {
|
|
3902
3899
|
g.transaction(function(T) {
|
|
3903
|
-
T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(
|
|
3900
|
+
T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(I, M) {
|
|
3904
3901
|
for (var B = [], k = 0; k < M.rows.length; k++)
|
|
3905
3902
|
B.push(M.rows.item(k).name);
|
|
3906
3903
|
S({
|
|
3907
3904
|
db: g,
|
|
3908
3905
|
storeNames: B
|
|
3909
3906
|
});
|
|
3910
|
-
}, function(
|
|
3907
|
+
}, function(I, M) {
|
|
3911
3908
|
b(M);
|
|
3912
3909
|
});
|
|
3913
3910
|
}, function(T) {
|
|
@@ -3919,8 +3916,8 @@ function Gd() {
|
|
|
3919
3916
|
S = m.apply(this, arguments);
|
|
3920
3917
|
var b = this.config();
|
|
3921
3918
|
g = typeof g != "function" && g || {}, g.name || (g.name = g.name || b.name, g.storeName = g.storeName || b.storeName);
|
|
3922
|
-
var T = this,
|
|
3923
|
-
return g.name ?
|
|
3919
|
+
var T = this, I;
|
|
3920
|
+
return g.name ? I = new h(function(M) {
|
|
3924
3921
|
var B;
|
|
3925
3922
|
g.name === b.name ? B = T._dbInfo.db : B = openDatabase(g.name, "", "", 0), g.storeName ? M({
|
|
3926
3923
|
db: B,
|
|
@@ -3930,11 +3927,11 @@ function Gd() {
|
|
|
3930
3927
|
return new h(function(B, k) {
|
|
3931
3928
|
M.db.transaction(function(N) {
|
|
3932
3929
|
function j(xe) {
|
|
3933
|
-
return new h(function(we,
|
|
3930
|
+
return new h(function(we, Pe) {
|
|
3934
3931
|
N.executeSql("DROP TABLE IF EXISTS " + xe, [], function() {
|
|
3935
3932
|
we();
|
|
3936
3933
|
}, function(Ce, Ye) {
|
|
3937
|
-
|
|
3934
|
+
Pe(Ye);
|
|
3938
3935
|
});
|
|
3939
3936
|
});
|
|
3940
3937
|
}
|
|
@@ -3949,14 +3946,14 @@ function Gd() {
|
|
|
3949
3946
|
k(N);
|
|
3950
3947
|
});
|
|
3951
3948
|
});
|
|
3952
|
-
}) :
|
|
3949
|
+
}) : I = h.reject("Invalid arguments"), p(I, S), I;
|
|
3953
3950
|
}
|
|
3954
3951
|
var gc = {
|
|
3955
3952
|
_driver: "webSQLStorage",
|
|
3956
3953
|
_initStorage: Ft,
|
|
3957
|
-
_support:
|
|
3954
|
+
_support: Ir(),
|
|
3958
3955
|
iterate: nr,
|
|
3959
|
-
getItem:
|
|
3956
|
+
getItem: Pr,
|
|
3960
3957
|
setItem: lc,
|
|
3961
3958
|
removeItem: cc,
|
|
3962
3959
|
clear: hc,
|
|
@@ -3997,8 +3994,8 @@ function Gd() {
|
|
|
3997
3994
|
}
|
|
3998
3995
|
function bc(g) {
|
|
3999
3996
|
var S = this, b = S.ready().then(function() {
|
|
4000
|
-
for (var T = S._dbInfo.keyPrefix,
|
|
4001
|
-
var M = localStorage.key(
|
|
3997
|
+
for (var T = S._dbInfo.keyPrefix, I = localStorage.length - 1; I >= 0; I--) {
|
|
3998
|
+
var M = localStorage.key(I);
|
|
4002
3999
|
M.indexOf(T) === 0 && localStorage.removeItem(M);
|
|
4003
4000
|
}
|
|
4004
4001
|
});
|
|
@@ -4008,18 +4005,18 @@ function Gd() {
|
|
|
4008
4005
|
var b = this;
|
|
4009
4006
|
g = f(g);
|
|
4010
4007
|
var T = b.ready().then(function() {
|
|
4011
|
-
var
|
|
4012
|
-
return M && (M =
|
|
4008
|
+
var I = b._dbInfo, M = localStorage.getItem(I.keyPrefix + g);
|
|
4009
|
+
return M && (M = I.serializer.deserialize(M)), M;
|
|
4013
4010
|
});
|
|
4014
4011
|
return p(T, S), T;
|
|
4015
4012
|
}
|
|
4016
4013
|
function Mc(g, S) {
|
|
4017
4014
|
var b = this, T = b.ready().then(function() {
|
|
4018
|
-
for (var
|
|
4015
|
+
for (var I = b._dbInfo, M = I.keyPrefix, B = M.length, k = localStorage.length, N = 1, j = 0; j < k; j++) {
|
|
4019
4016
|
var _ = localStorage.key(j);
|
|
4020
4017
|
if (_.indexOf(M) === 0) {
|
|
4021
4018
|
var ee = localStorage.getItem(_);
|
|
4022
|
-
if (ee && (ee =
|
|
4019
|
+
if (ee && (ee = I.serializer.deserialize(ee)), ee = g(ee, _.substring(B), N++), ee !== void 0)
|
|
4023
4020
|
return ee;
|
|
4024
4021
|
}
|
|
4025
4022
|
}
|
|
@@ -4028,19 +4025,19 @@ function Gd() {
|
|
|
4028
4025
|
}
|
|
4029
4026
|
function Tc(g, S) {
|
|
4030
4027
|
var b = this, T = b.ready().then(function() {
|
|
4031
|
-
var
|
|
4028
|
+
var I = b._dbInfo, M;
|
|
4032
4029
|
try {
|
|
4033
4030
|
M = localStorage.key(g);
|
|
4034
4031
|
} catch {
|
|
4035
4032
|
M = null;
|
|
4036
4033
|
}
|
|
4037
|
-
return M && (M = M.substring(
|
|
4034
|
+
return M && (M = M.substring(I.keyPrefix.length)), M;
|
|
4038
4035
|
});
|
|
4039
4036
|
return p(T, S), T;
|
|
4040
4037
|
}
|
|
4041
4038
|
function Cc(g) {
|
|
4042
4039
|
var S = this, b = S.ready().then(function() {
|
|
4043
|
-
for (var T = S._dbInfo,
|
|
4040
|
+
for (var T = S._dbInfo, I = localStorage.length, M = [], B = 0; B < I; B++) {
|
|
4044
4041
|
var k = localStorage.key(B);
|
|
4045
4042
|
k.indexOf(T.keyPrefix) === 0 && M.push(k.substring(T.keyPrefix.length));
|
|
4046
4043
|
}
|
|
@@ -4048,25 +4045,25 @@ function Gd() {
|
|
|
4048
4045
|
});
|
|
4049
4046
|
return p(b, g), b;
|
|
4050
4047
|
}
|
|
4051
|
-
function
|
|
4048
|
+
function Ic(g) {
|
|
4052
4049
|
var S = this, b = S.keys().then(function(T) {
|
|
4053
4050
|
return T.length;
|
|
4054
4051
|
});
|
|
4055
4052
|
return p(b, g), b;
|
|
4056
4053
|
}
|
|
4057
|
-
function
|
|
4054
|
+
function Pc(g, S) {
|
|
4058
4055
|
var b = this;
|
|
4059
4056
|
g = f(g);
|
|
4060
4057
|
var T = b.ready().then(function() {
|
|
4061
|
-
var
|
|
4062
|
-
localStorage.removeItem(
|
|
4058
|
+
var I = b._dbInfo;
|
|
4059
|
+
localStorage.removeItem(I.keyPrefix + g);
|
|
4063
4060
|
});
|
|
4064
4061
|
return p(T, S), T;
|
|
4065
4062
|
}
|
|
4066
4063
|
function Ec(g, S, b) {
|
|
4067
4064
|
var T = this;
|
|
4068
4065
|
g = f(g);
|
|
4069
|
-
var
|
|
4066
|
+
var I = T.ready().then(function() {
|
|
4070
4067
|
S === void 0 && (S = null);
|
|
4071
4068
|
var M = S;
|
|
4072
4069
|
return new h(function(B, k) {
|
|
@@ -4083,22 +4080,22 @@ function Gd() {
|
|
|
4083
4080
|
});
|
|
4084
4081
|
});
|
|
4085
4082
|
});
|
|
4086
|
-
return p(
|
|
4083
|
+
return p(I, b), I;
|
|
4087
4084
|
}
|
|
4088
4085
|
function Ac(g, S) {
|
|
4089
4086
|
if (S = m.apply(this, arguments), g = typeof g != "function" && g || {}, !g.name) {
|
|
4090
4087
|
var b = this.config();
|
|
4091
4088
|
g.name = g.name || b.name, g.storeName = g.storeName || b.storeName;
|
|
4092
4089
|
}
|
|
4093
|
-
var T = this,
|
|
4094
|
-
return g.name ?
|
|
4090
|
+
var T = this, I;
|
|
4091
|
+
return g.name ? I = new h(function(M) {
|
|
4095
4092
|
g.storeName ? M(ki(g, T._defaultConfig)) : M(g.name + "/");
|
|
4096
4093
|
}).then(function(M) {
|
|
4097
4094
|
for (var B = localStorage.length - 1; B >= 0; B--) {
|
|
4098
4095
|
var k = localStorage.key(B);
|
|
4099
4096
|
k.indexOf(M) === 0 && localStorage.removeItem(k);
|
|
4100
4097
|
}
|
|
4101
|
-
}) :
|
|
4098
|
+
}) : I = h.reject("Invalid arguments"), p(I, S), I;
|
|
4102
4099
|
}
|
|
4103
4100
|
var Dc = {
|
|
4104
4101
|
_driver: "localStorageWrapper",
|
|
@@ -4107,19 +4104,19 @@ function Gd() {
|
|
|
4107
4104
|
iterate: Mc,
|
|
4108
4105
|
getItem: Sc,
|
|
4109
4106
|
setItem: Ec,
|
|
4110
|
-
removeItem:
|
|
4107
|
+
removeItem: Pc,
|
|
4111
4108
|
clear: bc,
|
|
4112
|
-
length:
|
|
4109
|
+
length: Ic,
|
|
4113
4110
|
key: Tc,
|
|
4114
4111
|
keys: Cc,
|
|
4115
4112
|
dropInstance: Ac
|
|
4116
4113
|
}, Oc = function(S, b) {
|
|
4117
4114
|
return S === b || typeof S == "number" && typeof b == "number" && isNaN(S) && isNaN(b);
|
|
4118
4115
|
}, Lc = function(S, b) {
|
|
4119
|
-
for (var T = S.length,
|
|
4120
|
-
if (Oc(S[
|
|
4116
|
+
for (var T = S.length, I = 0; I < T; ) {
|
|
4117
|
+
if (Oc(S[I], b))
|
|
4121
4118
|
return !0;
|
|
4122
|
-
|
|
4119
|
+
I++;
|
|
4123
4120
|
}
|
|
4124
4121
|
return !1;
|
|
4125
4122
|
}, zi = Array.isArray || function(g) {
|
|
@@ -4160,8 +4157,8 @@ function Gd() {
|
|
|
4160
4157
|
a(this, g);
|
|
4161
4158
|
for (var b in ir)
|
|
4162
4159
|
if (ir.hasOwnProperty(b)) {
|
|
4163
|
-
var T = ir[b],
|
|
4164
|
-
this[b] =
|
|
4160
|
+
var T = ir[b], I = T._driver;
|
|
4161
|
+
this[b] = I, Er[I] || this.defineDriver(T);
|
|
4165
4162
|
}
|
|
4166
4163
|
this._defaultConfig = Jn({}, Bc), this._config = Jn({}, this._defaultConfig, S), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
|
|
4167
4164
|
});
|
|
@@ -4177,7 +4174,7 @@ function Gd() {
|
|
|
4177
4174
|
}
|
|
4178
4175
|
return "driver" in b && b.driver ? this.setDriver(this._config.driver) : !0;
|
|
4179
4176
|
} else return typeof b == "string" ? this._config[b] : this._config;
|
|
4180
|
-
}, g.prototype.defineDriver = function(b, T,
|
|
4177
|
+
}, g.prototype.defineDriver = function(b, T, I) {
|
|
4181
4178
|
var M = new h(function(B, k) {
|
|
4182
4179
|
try {
|
|
4183
4180
|
var N = b._driver, j = new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");
|
|
@@ -4192,7 +4189,7 @@ function Gd() {
|
|
|
4192
4189
|
return;
|
|
4193
4190
|
}
|
|
4194
4191
|
}
|
|
4195
|
-
var
|
|
4192
|
+
var Pe = function() {
|
|
4196
4193
|
for (var Ar = function(Nc) {
|
|
4197
4194
|
return function() {
|
|
4198
4195
|
var jc = new Error("Method " + Nc + " is not implemented by the current driver"), Ni = h.reject(jc);
|
|
@@ -4203,7 +4200,7 @@ function Gd() {
|
|
|
4203
4200
|
b[es] || (b[es] = Ar(es));
|
|
4204
4201
|
}
|
|
4205
4202
|
};
|
|
4206
|
-
|
|
4203
|
+
Pe();
|
|
4207
4204
|
var Ce = function(Ar) {
|
|
4208
4205
|
Er[N] && console.info("Redefining LocalForage driver: " + N), Er[N] = b, Ui[N] = Ar, B();
|
|
4209
4206
|
};
|
|
@@ -4212,21 +4209,21 @@ function Gd() {
|
|
|
4212
4209
|
k(Ye);
|
|
4213
4210
|
}
|
|
4214
4211
|
});
|
|
4215
|
-
return d(M, T,
|
|
4212
|
+
return d(M, T, I), M;
|
|
4216
4213
|
}, g.prototype.driver = function() {
|
|
4217
4214
|
return this._driver || null;
|
|
4218
|
-
}, g.prototype.getDriver = function(b, T,
|
|
4215
|
+
}, g.prototype.getDriver = function(b, T, I) {
|
|
4219
4216
|
var M = Er[b] ? h.resolve(Er[b]) : h.reject(new Error("Driver not found."));
|
|
4220
|
-
return d(M, T,
|
|
4217
|
+
return d(M, T, I), M;
|
|
4221
4218
|
}, g.prototype.getSerializer = function(b) {
|
|
4222
4219
|
var T = h.resolve(Mt);
|
|
4223
4220
|
return d(T, b), T;
|
|
4224
4221
|
}, g.prototype.ready = function(b) {
|
|
4225
|
-
var T = this,
|
|
4222
|
+
var T = this, I = T._driverSet.then(function() {
|
|
4226
4223
|
return T._ready === null && (T._ready = T._initDriver()), T._ready;
|
|
4227
4224
|
});
|
|
4228
|
-
return d(
|
|
4229
|
-
}, g.prototype.setDriver = function(b, T,
|
|
4225
|
+
return d(I, b, b), I;
|
|
4226
|
+
}, g.prototype.setDriver = function(b, T, I) {
|
|
4230
4227
|
var M = this;
|
|
4231
4228
|
zi(b) || (b = [b]);
|
|
4232
4229
|
var B = this._getSupportedDrivers(b);
|
|
@@ -4245,8 +4242,8 @@ function Gd() {
|
|
|
4245
4242
|
return pe++, M._dbInfo = null, M._ready = null, M.getDriver(we).then(N).catch(xe);
|
|
4246
4243
|
}
|
|
4247
4244
|
k();
|
|
4248
|
-
var
|
|
4249
|
-
return M._driverSet = h.reject(
|
|
4245
|
+
var Pe = new Error("No available storage method found.");
|
|
4246
|
+
return M._driverSet = h.reject(Pe), M._driverSet;
|
|
4250
4247
|
}
|
|
4251
4248
|
return xe();
|
|
4252
4249
|
};
|
|
@@ -4263,14 +4260,14 @@ function Gd() {
|
|
|
4263
4260
|
k();
|
|
4264
4261
|
var ee = new Error("No available storage method found.");
|
|
4265
4262
|
return M._driverSet = h.reject(ee), M._driverSet;
|
|
4266
|
-
}), d(this._driverSet, T,
|
|
4263
|
+
}), d(this._driverSet, T, I), this._driverSet;
|
|
4267
4264
|
}, g.prototype.supports = function(b) {
|
|
4268
4265
|
return !!Ui[b];
|
|
4269
4266
|
}, g.prototype._extend = function(b) {
|
|
4270
4267
|
Jn(this, b);
|
|
4271
4268
|
}, g.prototype._getSupportedDrivers = function(b) {
|
|
4272
|
-
for (var T = [],
|
|
4273
|
-
var B = b[
|
|
4269
|
+
for (var T = [], I = 0, M = b.length; I < M; I++) {
|
|
4270
|
+
var B = b[I];
|
|
4274
4271
|
this.supports(B) && T.push(B);
|
|
4275
4272
|
}
|
|
4276
4273
|
return T;
|
|
@@ -4411,8 +4408,8 @@ class _d {
|
|
|
4411
4408
|
89
|
|
4412
4409
|
);
|
|
4413
4410
|
x.updateWorldMatrix(!0, !1);
|
|
4414
|
-
const
|
|
4415
|
-
v.applyMatrix4(
|
|
4411
|
+
const P = x.matrixWorld.clone().premultiply(h.matrixWorld.clone().invert());
|
|
4412
|
+
v.applyMatrix4(P), w.push(v);
|
|
4416
4413
|
}
|
|
4417
4414
|
}), w.length !== 0)
|
|
4418
4415
|
return po(w);
|
|
@@ -4430,10 +4427,10 @@ class _d {
|
|
|
4430
4427
|
const v = y();
|
|
4431
4428
|
if (v) {
|
|
4432
4429
|
m = v;
|
|
4433
|
-
const
|
|
4430
|
+
const P = v.getAttribute(
|
|
4434
4431
|
"position"
|
|
4435
4432
|
);
|
|
4436
|
-
|
|
4433
|
+
P.array instanceof Float32Array && this.strokeStore.setItem(w, P.array.buffer);
|
|
4437
4434
|
}
|
|
4438
4435
|
}
|
|
4439
4436
|
} else {
|
|
@@ -4499,7 +4496,7 @@ class _d {
|
|
|
4499
4496
|
duration: o = 1e3,
|
|
4500
4497
|
yoyo: l = !1
|
|
4501
4498
|
} = t;
|
|
4502
|
-
(e instanceof We || e instanceof ti || e instanceof th) && (n && e.color.set(n), e.emissive.set(r), e.emissiveIntensity = s, o !== 0 &&
|
|
4499
|
+
(e instanceof We || e instanceof ti || e instanceof th) && (n && e.color.set(n), e.emissive.set(r), e.emissiveIntensity = s, o !== 0 && It(
|
|
4503
4500
|
{ emissiveIntensity: s },
|
|
4504
4501
|
{ emissiveIntensity: a },
|
|
4505
4502
|
{
|
|
@@ -4702,8 +4699,8 @@ class Xd {
|
|
|
4702
4699
|
if (m.userData.prevVisible !== w && (y.onChange?.(w), y.elementAutoDisplay && (m.element.style.display = w === !0 ? "" : "none")), m.userData.prevVisible = w, w === !0 || y.elementAutoDisplay === !1) {
|
|
4703
4700
|
let x;
|
|
4704
4701
|
m instanceof tl ? (pt.copy(f.matrixWorldInverse), pt.transpose(), m.rotation2D !== 0 && pt.multiply(Kd.makeRotationZ(m.rotation2D)), m.matrixWorld.decompose(ia, qd, aa), pt.setPosition(ia), pt.scale(aa), pt.elements[3] = 0, pt.elements[7] = 0, pt.elements[11] = 0, pt.elements[15] = 1, x = h(pt)) : x = h(m.matrixWorld);
|
|
4705
|
-
const v = m.element,
|
|
4706
|
-
if (
|
|
4702
|
+
const v = m.element, P = a.objects.get(m);
|
|
4703
|
+
if (P === void 0 || P.style !== x) {
|
|
4707
4704
|
v.style.transform = x;
|
|
4708
4705
|
const C = { style: x };
|
|
4709
4706
|
a.objects.set(m, C);
|
|
@@ -4902,7 +4899,7 @@ class $d {
|
|
|
4902
4899
|
}
|
|
4903
4900
|
surroundOnTarget(e, t = {}) {
|
|
4904
4901
|
const { duration: r = 3e3, startAngle: n = 0, endAngle: s = 360, onStart: a } = t, o = Se(e), { controls: l } = this.viewport;
|
|
4905
|
-
return l.setTarget(o.x, o.y, o.z),
|
|
4902
|
+
return l.setTarget(o.x, o.y, o.z), It(
|
|
4906
4903
|
{
|
|
4907
4904
|
radian: tn(n)
|
|
4908
4905
|
},
|
|
@@ -6935,12 +6932,12 @@ function Tl(i) {
|
|
|
6935
6932
|
function Cl(i) {
|
|
6936
6933
|
return i && i.__esModule ? i : { default: i };
|
|
6937
6934
|
}
|
|
6938
|
-
function
|
|
6935
|
+
function Il(i, e, t, r) {
|
|
6939
6936
|
if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
6940
6937
|
if (typeof e == "function" ? i !== e || !r : !e.has(i)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6941
6938
|
return t === "m" ? r : t === "a" ? r.call(i) : r ? r.value : e.get(i);
|
|
6942
6939
|
}
|
|
6943
|
-
function
|
|
6940
|
+
function Pl(i, e, t, r, n) {
|
|
6944
6941
|
if (r === "m") throw new TypeError("Private method is not writable");
|
|
6945
6942
|
if (r === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
|
|
6946
6943
|
if (typeof e == "function" ? i !== e || !n : !e.has(i)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
@@ -7032,8 +7029,8 @@ const gp = {
|
|
|
7032
7029
|
__makeTemplateObject: Ml,
|
|
7033
7030
|
__importStar: Tl,
|
|
7034
7031
|
__importDefault: Cl,
|
|
7035
|
-
__classPrivateFieldGet:
|
|
7036
|
-
__classPrivateFieldSet:
|
|
7032
|
+
__classPrivateFieldGet: Il,
|
|
7033
|
+
__classPrivateFieldSet: Pl,
|
|
7037
7034
|
__classPrivateFieldIn: El,
|
|
7038
7035
|
__addDisposableResource: Al,
|
|
7039
7036
|
__disposeResources: Dl,
|
|
@@ -7049,9 +7046,9 @@ const gp = {
|
|
|
7049
7046
|
__asyncValues: Sl,
|
|
7050
7047
|
__await: xr,
|
|
7051
7048
|
__awaiter: fl,
|
|
7052
|
-
__classPrivateFieldGet:
|
|
7049
|
+
__classPrivateFieldGet: Il,
|
|
7053
7050
|
__classPrivateFieldIn: El,
|
|
7054
|
-
__classPrivateFieldSet:
|
|
7051
|
+
__classPrivateFieldSet: Pl,
|
|
7055
7052
|
__createBinding: Hn,
|
|
7056
7053
|
__decorate: ol,
|
|
7057
7054
|
__disposeResources: Dl,
|
|
@@ -7609,7 +7606,7 @@ function Cp() {
|
|
|
7609
7606
|
return Vr.Promise = t, Vr;
|
|
7610
7607
|
}
|
|
7611
7608
|
var wa;
|
|
7612
|
-
function
|
|
7609
|
+
function Ip() {
|
|
7613
7610
|
return wa || (wa = 1, (function(i) {
|
|
7614
7611
|
Object.defineProperty(i, "__esModule", { value: !0 }), i.SlotList = i.Slot = i.Signal = i.Promise = i.PrioritySignal = i.OnceSignal = i.MonoSignal = i.ISlot = i.ISignal = i.IPrioritySignal = i.IOnceSignal = i.GenericEvent = i.DeluxeSignal = void 0;
|
|
7615
7612
|
var e = vp();
|
|
@@ -7666,11 +7663,11 @@ function Pp() {
|
|
|
7666
7663
|
} });
|
|
7667
7664
|
})(ms)), ms;
|
|
7668
7665
|
}
|
|
7669
|
-
var ae =
|
|
7666
|
+
var ae = Ip();
|
|
7670
7667
|
function gs(i) {
|
|
7671
7668
|
return i.charAt(0).toLowerCase() + i.slice(1);
|
|
7672
7669
|
}
|
|
7673
|
-
function
|
|
7670
|
+
function Pp(i, e) {
|
|
7674
7671
|
let t = i, r;
|
|
7675
7672
|
for (; t; ) {
|
|
7676
7673
|
if (t instanceof Ee && t.stype !== "Group") {
|
|
@@ -7747,7 +7744,7 @@ class Ep {
|
|
|
7747
7744
|
point: null
|
|
7748
7745
|
}, a = /* @__PURE__ */ new Map();
|
|
7749
7746
|
n.forEach((m) => {
|
|
7750
|
-
const y =
|
|
7747
|
+
const y = Pp(m.object, this.eventExcludeStypes);
|
|
7751
7748
|
if (!y) return;
|
|
7752
7749
|
const w = y.stype;
|
|
7753
7750
|
s.object || (s.type = w, s.object = m.object, s.point = m.point);
|
|
@@ -7931,7 +7928,7 @@ class Dp extends Me {
|
|
|
7931
7928
|
p.position.set(0, 0, 2);
|
|
7932
7929
|
const d = new ph(0.8, 0.05, 0.05).translate(0.4, 0, 0), f = new le(d, R(n)), m = new le(d, R(s)), y = new le(d, R(a));
|
|
7933
7930
|
m.rotation.z = Math.PI / 2, y.rotation.y = -Math.PI / 2, this.add(f), this.add(y), this.add(m);
|
|
7934
|
-
const w = Z(n), x = Z(s), v = Z(a),
|
|
7931
|
+
const w = Z(n), x = Z(s), v = Z(a), P = Z(o), C = new rt(w), E = new rt(x), L = new rt(v), z = new rt(P), H = new rt(P), q = new rt(P);
|
|
7935
7932
|
C.userData.type = "right", E.userData.type = "top", L.userData.type = "front", z.userData.type = "left", H.userData.type = "bottom", q.userData.type = "back", C.position.x = 1, E.position.y = 1, L.position.z = 1, z.position.x = -1, z.scale.setScalar(0.8), H.position.y = -1, H.scale.setScalar(0.8), q.position.z = -1, q.scale.setScalar(0.8), this.add(C), this.add(E), this.add(L), this.add(z), this.add(H), this.add(q), c.push(C), c.push(E), c.push(L), c.push(z), c.push(H), c.push(q);
|
|
7936
7933
|
const te = new A(), F = new kn(), D = 128;
|
|
7937
7934
|
this.setLabels = function(O, X, U) {
|
|
@@ -8300,18 +8297,18 @@ function Ci(i) {
|
|
|
8300
8297
|
if (Array.isArray(i.material)) return null;
|
|
8301
8298
|
const e = i.material, t = Xn(i);
|
|
8302
8299
|
if (typeof t != "string" || t.length === 0)
|
|
8303
|
-
return e.transparent && !
|
|
8300
|
+
return e.transparent && !Ii(e) ? null : `${e.uuid}|${e.transparent ? "invisible-transparent" : "opaque"}`;
|
|
8304
8301
|
if (Hp(e)) return null;
|
|
8305
8302
|
const r = qp(e);
|
|
8306
8303
|
return r === null ? null : `${t}|${r}`;
|
|
8307
8304
|
}
|
|
8308
|
-
function
|
|
8305
|
+
function Ii(i) {
|
|
8309
8306
|
return i.transparent && i.opacity <= 0 && i.depthWrite === !1 && i.stencilWrite === !1 && i.blending === fh && i.alphaToCoverage === !1;
|
|
8310
8307
|
}
|
|
8311
8308
|
function Kp(i, e) {
|
|
8312
|
-
return !e.transparent || typeof Xn(i) == "string" ||
|
|
8309
|
+
return !e.transparent || typeof Xn(i) == "string" || Ii(e);
|
|
8313
8310
|
}
|
|
8314
|
-
function
|
|
8311
|
+
function Pi(i) {
|
|
8315
8312
|
return Array.isArray(i.material) || typeof Xn(i) != "string" ? null : i.material.color?.getHex?.() ?? null;
|
|
8316
8313
|
}
|
|
8317
8314
|
function Xp(i, e, t = Nl) {
|
|
@@ -8329,7 +8326,7 @@ function Xp(i, e, t = Nl) {
|
|
|
8329
8326
|
vertexByteLength: y
|
|
8330
8327
|
} = d, w = m * (f > 65535 ? 4 : 2);
|
|
8331
8328
|
if (f > Fl || m > kl || y + w + Vs > zl) return;
|
|
8332
|
-
const x = a + (p ? f : 0), v = o + (p ? m : 0),
|
|
8329
|
+
const x = a + (p ? f : 0), v = o + (p ? m : 0), P = l + (p ? y : 0), C = v * (x > 65535 ? 4 : 2), E = P + C + (n.length + 1) * Vs;
|
|
8333
8330
|
(n.length >= e || x > t.maxVertices || v > t.maxIndices || E > t.maxBytes) && c(), s.has(h) || (s.add(h), a += f, o += m, l += y), n.push(u);
|
|
8334
8331
|
}), c(), r;
|
|
8335
8332
|
}
|
|
@@ -8370,7 +8367,7 @@ function Qp(i) {
|
|
|
8370
8367
|
function Zp(i, e) {
|
|
8371
8368
|
e.castShadow = i.castShadow, e.receiveShadow = i.receiveShadow, e.renderOrder = i.renderOrder, e.layers.mask = i.layers.mask, e.frustumCulled = i.frustumCulled, e.customDepthMaterial = i.customDepthMaterial, e.customDistanceMaterial = i.customDistanceMaterial, e.perObjectFrustumCulled = i.frustumCulled;
|
|
8372
8369
|
const t = i.material;
|
|
8373
|
-
e.sortObjects = t.transparent && !
|
|
8370
|
+
e.sortObjects = t.transparent && !Ii(t);
|
|
8374
8371
|
}
|
|
8375
8372
|
function Jp(i, e) {
|
|
8376
8373
|
const t = [...new Set(i.map((u) => u.source.geometry))], r = t.reduce(
|
|
@@ -8380,7 +8377,7 @@ function Jp(i, e) {
|
|
|
8380
8377
|
(u, h) => u + (h.getIndex()?.count ?? 0),
|
|
8381
8378
|
0
|
|
8382
8379
|
), s = i[0].source, a = typeof Xn(s) == "string", o = a && i.every(
|
|
8383
|
-
(u) =>
|
|
8380
|
+
(u) => Pi(u.source) !== null
|
|
8384
8381
|
);
|
|
8385
8382
|
let l = s.material, c = null;
|
|
8386
8383
|
try {
|
|
@@ -8570,7 +8567,7 @@ const vs = {
|
|
|
8570
8567
|
minInstances: 2,
|
|
8571
8568
|
maxInstancesPerBatch: 512,
|
|
8572
8569
|
dynamicPromotionFrames: 2
|
|
8573
|
-
}, uf = 64 * 1024 * 1024, Ca = new J(), df = new A(0, 0, 0),
|
|
8570
|
+
}, uf = 64 * 1024 * 1024, Ca = new J(), df = new A(0, 0, 0), Ia = new J(), Pa = new Et();
|
|
8574
8571
|
function Yn(i) {
|
|
8575
8572
|
const e = i.material;
|
|
8576
8573
|
return e ? Array.isArray(e) ? [...e] : [e] : [];
|
|
@@ -8677,7 +8674,7 @@ function ff(i) {
|
|
|
8677
8674
|
positiveDeterminant: i.matrixWorld.determinant() > 0,
|
|
8678
8675
|
supportedRenderable: Ei(i),
|
|
8679
8676
|
batchedMaterialKey: i instanceof le ? Ci(i) : null,
|
|
8680
|
-
batchedMaterialColor: i instanceof le ?
|
|
8677
|
+
batchedMaterialColor: i instanceof le ? Pi(i) : null
|
|
8681
8678
|
};
|
|
8682
8679
|
}
|
|
8683
8680
|
function mf(i) {
|
|
@@ -8712,7 +8709,7 @@ function gf(i, e) {
|
|
|
8712
8709
|
}
|
|
8713
8710
|
function yf(i, e) {
|
|
8714
8711
|
const t = i, r = i instanceof Fe ? i : null, n = t.material ?? null;
|
|
8715
|
-
if (e.geometry !== (t.geometry ?? null) || e.material !== n || e.castShadow !== i.castShadow || e.receiveShadow !== i.receiveShadow || e.renderOrder !== i.renderOrder || e.layersMask !== i.layers.mask || e.frustumCulled !== i.frustumCulled || e.customDepthMaterial !== t.customDepthMaterial || e.customDistanceMaterial !== t.customDistanceMaterial || e.beforeRender !== i.onBeforeRender || e.afterRender !== i.onAfterRender || e.beforeShadow !== i.onBeforeShadow || e.afterShadow !== i.onAfterShadow || e.instanceMatrix !== (r?.instanceMatrix ?? null) || e.instanceColor !== (r?.instanceColor ?? null) || e.instanceCount !== (r?.count ?? null) || e.canInstance !== Gl(i) || e.positiveDeterminant !== i.matrixWorld.determinant() > 0 || e.supportedRenderable !== Ei(i) || e.batchedMaterialKey !== (i instanceof le ? Ci(i) : null) || e.batchedMaterialColor !== (i instanceof le ?
|
|
8712
|
+
if (e.geometry !== (t.geometry ?? null) || e.material !== n || e.castShadow !== i.castShadow || e.receiveShadow !== i.receiveShadow || e.renderOrder !== i.renderOrder || e.layersMask !== i.layers.mask || e.frustumCulled !== i.frustumCulled || e.customDepthMaterial !== t.customDepthMaterial || e.customDistanceMaterial !== t.customDistanceMaterial || e.beforeRender !== i.onBeforeRender || e.afterRender !== i.onAfterRender || e.beforeShadow !== i.onBeforeShadow || e.afterShadow !== i.onAfterShadow || e.instanceMatrix !== (r?.instanceMatrix ?? null) || e.instanceColor !== (r?.instanceColor ?? null) || e.instanceCount !== (r?.count ?? null) || e.canInstance !== Gl(i) || e.positiveDeterminant !== i.matrixWorld.determinant() > 0 || e.supportedRenderable !== Ei(i) || e.batchedMaterialKey !== (i instanceof le ? Ci(i) : null) || e.batchedMaterialColor !== (i instanceof le ? Pi(i) : null) || e.geometryContent && (!t.geometry || gf(t.geometry, e.geometryContent))) return !0;
|
|
8716
8713
|
if (Array.isArray(n)) {
|
|
8717
8714
|
if (!e.materials || e.materials.length !== n.length) return !0;
|
|
8718
8715
|
for (let s = 0; s < n.length; s++)
|
|
@@ -9152,13 +9149,13 @@ class bf {
|
|
|
9152
9149
|
}
|
|
9153
9150
|
D instanceof Fe && R instanceof Fe && (R.instanceMatrix = D.instanceMatrix, R.instanceColor = D.instanceColor, R.morphTexture = D.morphTexture), F.proxy = R, this.sourceToProxy.set(D, R), this.sourceBindings.set(D, F), this.proxyBindings.set(R, { proxy: R, sources: [F] }), n.add(R);
|
|
9154
9151
|
});
|
|
9155
|
-
const
|
|
9152
|
+
const P = y.filter(
|
|
9156
9153
|
(F) => F.kind === "instanced"
|
|
9157
9154
|
), C = y.filter(
|
|
9158
9155
|
(F) => F.kind === "merged"
|
|
9159
9156
|
), E = y.filter(
|
|
9160
9157
|
(F) => F.kind === "batched"
|
|
9161
|
-
), L =
|
|
9158
|
+
), L = P.reduce(
|
|
9162
9159
|
(F, D) => F + D.bindings.length,
|
|
9163
9160
|
0
|
|
9164
9161
|
), z = E.reduce(
|
|
@@ -9183,7 +9180,7 @@ class bf {
|
|
|
9183
9180
|
bounds: new Et(),
|
|
9184
9181
|
boundsDirty: !0,
|
|
9185
9182
|
materialTextures: Oa(q),
|
|
9186
|
-
outsideParentMatrix: e.parent?.matrixWorld.clone() ??
|
|
9183
|
+
outsideParentMatrix: e.parent?.matrixWorld.clone() ?? Ia.clone(),
|
|
9187
9184
|
outsideParentVisible: !0,
|
|
9188
9185
|
dirty: !1,
|
|
9189
9186
|
sourceSyncRequired: !0,
|
|
@@ -9202,7 +9199,7 @@ class bf {
|
|
|
9202
9199
|
active: !1,
|
|
9203
9200
|
sourceObjects: s.length,
|
|
9204
9201
|
sourceRenderables: o.length,
|
|
9205
|
-
instancedBatches:
|
|
9202
|
+
instancedBatches: P.length,
|
|
9206
9203
|
instancedObjects: L,
|
|
9207
9204
|
mergedBatches: C.length,
|
|
9208
9205
|
mergedObjects: H,
|
|
@@ -9218,7 +9215,7 @@ class bf {
|
|
|
9218
9215
|
_syncRoot(e, t = !0) {
|
|
9219
9216
|
const { root: r, tracked: n } = e, s = r.parent;
|
|
9220
9217
|
s?.updateWorldMatrix(!0, !1);
|
|
9221
|
-
const a = s?.matrixWorld ??
|
|
9218
|
+
const a = s?.matrixWorld ?? Ia, o = !e.outsideParentMatrix.equals(a);
|
|
9222
9219
|
let l = !0, c = s;
|
|
9223
9220
|
for (; c; )
|
|
9224
9221
|
l = l && c.visible, c = c.parent;
|
|
@@ -9229,26 +9226,26 @@ class bf {
|
|
|
9229
9226
|
if (!t && !o && !u && e.sourceSyncIndexes !== null) {
|
|
9230
9227
|
const y = /* @__PURE__ */ new Set([...e.sourceSyncIndexes, ...e.dynamicTrackedIndexes]), w = [...y];
|
|
9231
9228
|
for (let x = 0; x < w.length; x++)
|
|
9232
|
-
n[w[x]].object.children.forEach((
|
|
9233
|
-
const C = e.trackedIndexes.get(
|
|
9229
|
+
n[w[x]].object.children.forEach((P) => {
|
|
9230
|
+
const C = e.trackedIndexes.get(P);
|
|
9234
9231
|
C === void 0 || y.has(C) || (y.add(C), w.push(C));
|
|
9235
9232
|
});
|
|
9236
9233
|
f = [...y].sort((x, v) => x - v), d = f;
|
|
9237
9234
|
}
|
|
9238
9235
|
for (const y of d) {
|
|
9239
|
-
const w = n[y], { object: x, transform: v, parentIndex:
|
|
9240
|
-
if (
|
|
9241
|
-
const R = n[
|
|
9236
|
+
const w = n[y], { object: x, transform: v, parentIndex: P, childIndex: C } = w;
|
|
9237
|
+
if (P >= 0) {
|
|
9238
|
+
const R = n[P].object;
|
|
9242
9239
|
if (x.parent !== R || R.children[C] !== x) return !0;
|
|
9243
9240
|
}
|
|
9244
9241
|
if (xf(x, w.children)) return !0;
|
|
9245
9242
|
let E = !1;
|
|
9246
9243
|
const L = v.matrixAutoUpdate !== x.matrixAutoUpdate;
|
|
9247
9244
|
x.matrixAutoUpdate ? (E = L || v.positionX !== x.position.x || v.positionY !== x.position.y || v.positionZ !== x.position.z || v.quaternionX !== x.quaternion.x || v.quaternionY !== x.quaternion.y || v.quaternionZ !== x.quaternion.z || v.quaternionW !== x.quaternion.w || v.scaleX !== x.scale.x || v.scaleY !== x.scale.y || v.scaleZ !== x.scale.z || v.pivotX !== (x.pivot?.x ?? 0) || v.pivotY !== (x.pivot?.y ?? 0) || v.pivotZ !== (x.pivot?.z ?? 0), E && x.updateMatrix(), v.manualMatrix = null) : (E = L || v.manualMatrix === null || !v.manualMatrix.equals(x.matrix), v.manualMatrix ? v.manualMatrix.copy(x.matrix) : v.manualMatrix = x.matrix.clone()), v.positionX = x.position.x, v.positionY = x.position.y, v.positionZ = x.position.z, v.quaternionX = x.quaternion.x, v.quaternionY = x.quaternion.y, v.quaternionZ = x.quaternion.z, v.quaternionW = x.quaternion.w, v.scaleX = x.scale.x, v.scaleY = x.scale.y, v.scaleZ = x.scale.z, v.pivotX = x.pivot?.x ?? 0, v.pivotY = x.pivot?.y ?? 0, v.pivotZ = x.pivot?.z ?? 0, v.matrixAutoUpdate = x.matrixAutoUpdate, E ? (w.localChangeFrames++, w.localChangeFrames >= e.options.dynamicPromotionFrames && this._promoteDynamicDescendants(e, y) && (h = !0)) : w.localChangeFrames = 0;
|
|
9248
|
-
const z =
|
|
9245
|
+
const z = P >= 0 ? n[P].worldChanged : o, H = P >= 0 ? n[P].object.matrixWorld : a, q = v.matrixWorldAutoUpdate !== x.matrixWorldAutoUpdate;
|
|
9249
9246
|
x.matrixWorldAutoUpdate ? (w.worldChanged = q || E || z, w.worldChanged && x.matrixWorld.multiplyMatrices(H, x.matrix), v.manualWorldMatrix = null) : (w.worldChanged = q || v.manualWorldMatrix === null || !v.manualWorldMatrix.equals(x.matrixWorld), v.manualWorldMatrix ? v.manualWorldMatrix.copy(x.matrixWorld) : v.manualWorldMatrix = x.matrixWorld.clone()), w.worldChanged && La(x) && (p = !0), v.matrixWorldAutoUpdate = x.matrixWorldAutoUpdate, x.matrixWorldNeedsUpdate = !1;
|
|
9250
|
-
const F = (
|
|
9251
|
-
if (w.visibilityChanged = w.visible !== x.visible || w.worldVisible !== F ||
|
|
9247
|
+
const F = (P >= 0 ? n[P].worldVisible : l) && x.visible;
|
|
9248
|
+
if (w.visibilityChanged = w.visible !== x.visible || w.worldVisible !== F || P < 0 && u, w.visible = x.visible, w.worldVisible = F, w.renderBinding && yf(x, w.renderBinding.renderState)) return !0;
|
|
9252
9249
|
const D = w.worldChanged || w.visibilityChanged;
|
|
9253
9250
|
this.dynamicSources.has(x) ? (D ? w.stableFrames = 0 : w.stableFrames++, w.stableFrames >= e.options.dynamicPromotionFrames && (this.dynamicSources.delete(x), e.dynamicSourceCount--, e.dynamicTrackedIndexes.delete(y), w.stableFrames = 0, h = !0)) : w.stableFrames = 0, w.renderBinding?.batch?.kind === "merged" && D && !this.dynamicSources.has(x) && (this.dynamicSources.add(x), e.dynamicSourceCount++, e.dynamicTrackedIndexes.add(y), w.stableFrames = 0, h = !0);
|
|
9254
9251
|
}
|
|
@@ -9265,7 +9262,7 @@ class bf {
|
|
|
9265
9262
|
const r = t.object, n = r.geometry;
|
|
9266
9263
|
if (!n?.getAttribute("position")) return;
|
|
9267
9264
|
let s;
|
|
9268
|
-
r instanceof Fe || r instanceof yt ? (r.boundingBox || r.computeBoundingBox(), s = r.boundingBox) : (n.boundingBox || n.computeBoundingBox(), s = n.boundingBox), !(!s || s.isEmpty()) && (
|
|
9265
|
+
r instanceof Fe || r instanceof yt ? (r.boundingBox || r.computeBoundingBox(), s = r.boundingBox) : (n.boundingBox || n.computeBoundingBox(), s = n.boundingBox), !(!s || s.isEmpty()) && (Pa.copy(s).applyMatrix4(r.matrixWorld), e.bounds.union(Pa));
|
|
9269
9266
|
}), e.boundsDirty = !1;
|
|
9270
9267
|
}
|
|
9271
9268
|
_updateProxyBindings(e, t = !1) {
|
|
@@ -9646,7 +9643,7 @@ class Sf {
|
|
|
9646
9643
|
AGX: cr.AGX,
|
|
9647
9644
|
Neutral: cr.NEUTRAL
|
|
9648
9645
|
}, a = {
|
|
9649
|
-
None:
|
|
9646
|
+
None: Ih,
|
|
9650
9647
|
Reinhard: Ch,
|
|
9651
9648
|
Cineon: Th,
|
|
9652
9649
|
ACESFilmic: Mh,
|
|
@@ -9674,7 +9671,7 @@ class Sf {
|
|
|
9674
9671
|
}
|
|
9675
9672
|
async setBackgroundImage(e) {
|
|
9676
9673
|
const t = await ur({ file: e });
|
|
9677
|
-
t.mapping =
|
|
9674
|
+
t.mapping = Ph, this.scene.background = t, this.signals.backgroundChanged.dispatch();
|
|
9678
9675
|
}
|
|
9679
9676
|
setSky(e = {}) {
|
|
9680
9677
|
const { enabled: t = !0, position: r = { x: 0, y: 0, z: 0 }, scalar: n = 45e4, turbidity: s = 10, rayleigh: a = 3, elevation: o = 2, azimuth: l = 180 } = e;
|
|
@@ -9904,8 +9901,8 @@ class Sf {
|
|
|
9904
9901
|
E instanceof le && w.push(E);
|
|
9905
9902
|
});
|
|
9906
9903
|
}), this.outlineSelection = w, m.selection.set(this.autoInstancingManager.setOutlineSelection(w)), m.blur = u > 0, m.blurPass.kernelSize = u;
|
|
9907
|
-
const x = y.get("visibleEdgeColor"), v = y.get("hiddenEdgeColor"),
|
|
9908
|
-
x && x.value.set(l), v && v.value.set(c),
|
|
9904
|
+
const x = y.get("visibleEdgeColor"), v = y.get("hiddenEdgeColor"), P = y.get("edgeStrength");
|
|
9905
|
+
x && x.value.set(l), v && v.value.set(c), P && (P.value = h), this._triggerRender();
|
|
9909
9906
|
};
|
|
9910
9907
|
this.signals.outlineChange.add(r);
|
|
9911
9908
|
}
|
|
@@ -9943,13 +9940,13 @@ class Ee extends Me {
|
|
|
9943
9940
|
this.visible = !1, this.handleHide = !0, be.needsUpdate = !0;
|
|
9944
9941
|
}
|
|
9945
9942
|
setMove(e, t, r, n) {
|
|
9946
|
-
return
|
|
9943
|
+
return It(this.position, Se(e), t, r, n);
|
|
9947
9944
|
}
|
|
9948
9945
|
setRotate(e, t, r, n) {
|
|
9949
|
-
return
|
|
9946
|
+
return It(this.rotation, ii(e), t, r, n);
|
|
9950
9947
|
}
|
|
9951
9948
|
setScale(e, t, r, n) {
|
|
9952
|
-
return
|
|
9949
|
+
return It(this.scale, Se(e), t, r, n);
|
|
9953
9950
|
}
|
|
9954
9951
|
getBoundingBox() {
|
|
9955
9952
|
return yr(this);
|
|
@@ -10261,16 +10258,16 @@ class mt extends Ee {
|
|
|
10261
10258
|
}
|
|
10262
10259
|
if (t)
|
|
10263
10260
|
for (let d = 0; d < h.graphs.length; d++) {
|
|
10264
|
-
const { linkInfo: f, targetNodeId: m, passable: y } = h.graphs[d], { id: w, name: x } = f, v = this.info.nodes.find((
|
|
10261
|
+
const { linkInfo: f, targetNodeId: m, passable: y } = h.graphs[d], { id: w, name: x } = f, v = this.info.nodes.find((P) => P.id === m);
|
|
10265
10262
|
if (!u.includes(w) && v) {
|
|
10266
10263
|
u.push(w);
|
|
10267
|
-
const
|
|
10264
|
+
const P = ws(n, y), C = this.createLink({
|
|
10268
10265
|
id: w,
|
|
10269
10266
|
name: x,
|
|
10270
10267
|
start: h.position,
|
|
10271
10268
|
end: v.position,
|
|
10272
10269
|
width: r,
|
|
10273
|
-
color:
|
|
10270
|
+
color: P,
|
|
10274
10271
|
imgUrl: l,
|
|
10275
10272
|
transparent: !!l,
|
|
10276
10273
|
passable: y,
|
|
@@ -10316,7 +10313,7 @@ class mt extends Ee {
|
|
|
10316
10313
|
const { imgUrl: t, animation: r } = e;
|
|
10317
10314
|
if (t && !this.linksImgAnimation) {
|
|
10318
10315
|
let n = null;
|
|
10319
|
-
Vn(r) && r ? n = { repeat: !0, duration: 500 } : Ge(r) && $e(r.duration) && r.duration > 0 && (n = { repeat: !0, ...r }), n &&
|
|
10316
|
+
Vn(r) && r ? n = { repeat: !0, duration: 500 } : Ge(r) && $e(r.duration) && r.duration > 0 && (n = { repeat: !0, ...r }), n && It(
|
|
10320
10317
|
new oe(0, 0),
|
|
10321
10318
|
new oe(0, -1),
|
|
10322
10319
|
n,
|
|
@@ -10398,12 +10395,12 @@ class mt extends Ee {
|
|
|
10398
10395
|
imgUrl: n,
|
|
10399
10396
|
transparent: !!n,
|
|
10400
10397
|
passable: d
|
|
10401
|
-
}, v = l.find((
|
|
10398
|
+
}, v = l.find((P) => P.sid === f);
|
|
10402
10399
|
if (v)
|
|
10403
10400
|
v.updateGeometry({ start: x.start, end: x.end }), w && v.material.color.set(w), v.passable = d;
|
|
10404
10401
|
else {
|
|
10405
|
-
const
|
|
10406
|
-
this.links.push(
|
|
10402
|
+
const P = this.createLink(x);
|
|
10403
|
+
this.links.push(P);
|
|
10407
10404
|
}
|
|
10408
10405
|
}
|
|
10409
10406
|
}
|
|
@@ -10587,7 +10584,7 @@ class Kl extends Ne {
|
|
|
10587
10584
|
super(e, t, r), this.stype = "Ground";
|
|
10588
10585
|
}
|
|
10589
10586
|
}
|
|
10590
|
-
var
|
|
10587
|
+
var If = Object.defineProperty, Pf = (i, e, t) => e in i ? If(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, se = (i, e, t) => (Pf(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
10591
10588
|
function Ef(i, e, t) {
|
|
10592
10589
|
const r = [i];
|
|
10593
10590
|
for (; r.length; ) {
|
|
@@ -10597,7 +10594,7 @@ function Ef(i, e, t) {
|
|
|
10597
10594
|
r.push(...n[e]);
|
|
10598
10595
|
}
|
|
10599
10596
|
}
|
|
10600
|
-
const Xs = [new oe(), new oe(), new oe(), new oe()],
|
|
10597
|
+
const Xs = [new oe(), new oe(), new oe(), new oe()], Pt = [new A(), new A(), new A(), new A()], Af = [new J(), new J(), new J(), new J()], Xl = [new ue(), new ue(), new ue(), new ue()];
|
|
10601
10598
|
function Df(i, e, t) {
|
|
10602
10599
|
return e.clone().sub(i).lengthSq() <= t ** 2;
|
|
10603
10600
|
}
|
|
@@ -10606,7 +10603,7 @@ function Of(i, e, t) {
|
|
|
10606
10603
|
return r <= t ** 2 * n;
|
|
10607
10604
|
}
|
|
10608
10605
|
function sn(i, e) {
|
|
10609
|
-
const { epsilon: t = 0, relativeEpsilon: r } = e || {}, n = t === 0 ? (c, u) => c.equals(u) : r ? Of : Df, s = i.length / 3, a = new Array(s), [o, l] =
|
|
10606
|
+
const { epsilon: t = 0, relativeEpsilon: r } = e || {}, n = t === 0 ? (c, u) => c.equals(u) : r ? Of : Df, s = i.length / 3, a = new Array(s), [o, l] = Pt;
|
|
10610
10607
|
for (let c = 0; c < s; c++) {
|
|
10611
10608
|
o.fromArray(i, c * 3), a[c] = c;
|
|
10612
10609
|
for (let u = 0; u < c; u++)
|
|
@@ -10656,10 +10653,10 @@ function Ql(i, e, t, r = !1) {
|
|
|
10656
10653
|
}), n;
|
|
10657
10654
|
}
|
|
10658
10655
|
function Lf(i, e = {}) {
|
|
10659
|
-
const { indexes: t, a: r, b: n, c: s, equalVertexIndexMap: a, faceIndex: o, onlyC: l, maxCount: c = l ? 2 : 3, positions: u, getParentMidpoint: h, isAncestor: p, getDepth: d } = i, f = t.length / 3, m = o ?? Math.trunc(f / 2), y = a ? (O) => a[O] : (O) => O, w = y(r), x = y(n), v = y(s),
|
|
10656
|
+
const { indexes: t, a: r, b: n, c: s, equalVertexIndexMap: a, faceIndex: o, onlyC: l, maxCount: c = l ? 2 : 3, positions: u, getParentMidpoint: h, isAncestor: p, getDepth: d } = i, f = t.length / 3, m = o ?? Math.trunc(f / 2), y = a ? (O) => a[O] : (O) => O, w = y(r), x = y(n), v = y(s), P = [];
|
|
10660
10657
|
let C = () => 0, E = 0;
|
|
10661
10658
|
o != null && d && (E = d(o) + 1, C = (O) => E - d(O));
|
|
10662
|
-
const [L, z, H] =
|
|
10659
|
+
const [L, z, H] = Pt;
|
|
10663
10660
|
let q = () => null;
|
|
10664
10661
|
u && (L.set(0, 0, 0), [r, n, s].forEach((O) => {
|
|
10665
10662
|
H.fromArray(u, O * 3), L.add(H);
|
|
@@ -10694,18 +10691,18 @@ function Lf(i, e = {}) {
|
|
|
10694
10691
|
const ie = [Y, Q];
|
|
10695
10692
|
ie.push(3 - ie[0] - ie[1]);
|
|
10696
10693
|
const ne = { a: U[ie[0]], b: U[ie[1]], c: U[ie[2]] };
|
|
10697
|
-
|
|
10694
|
+
P.push({ a: s, b: n, c: ne.c, d: r, order: ie, real: ne, faceIndex: O, consumed: $ });
|
|
10698
10695
|
break;
|
|
10699
10696
|
}
|
|
10700
10697
|
case de: {
|
|
10701
10698
|
const ie = [K, Y];
|
|
10702
10699
|
ie.push(3 - ie[0] - ie[1]);
|
|
10703
10700
|
const ne = { a: U[ie[0]], b: U[ie[1]], c: U[ie[2]] };
|
|
10704
|
-
|
|
10701
|
+
P.push({ a: r, b: s, c: ne.c, d: n, order: ie, real: ne, faceIndex: O, consumed: $ });
|
|
10705
10702
|
break;
|
|
10706
10703
|
}
|
|
10707
10704
|
}
|
|
10708
|
-
return
|
|
10705
|
+
return P.length === c;
|
|
10709
10706
|
} : function(O) {
|
|
10710
10707
|
const X = te(O);
|
|
10711
10708
|
if (!X)
|
|
@@ -10718,24 +10715,24 @@ function Lf(i, e = {}) {
|
|
|
10718
10715
|
const ne = [Q, K];
|
|
10719
10716
|
ne.push(3 - ne[0] - ne[1]);
|
|
10720
10717
|
const Te = { a: U[ne[0]], b: U[ne[1]], c: U[ne[2]] };
|
|
10721
|
-
|
|
10718
|
+
P.push({ a: s, b: n, c: Te.c, d: r, order: ne, real: Te, faceIndex: O, consumed: $ });
|
|
10722
10719
|
break;
|
|
10723
10720
|
}
|
|
10724
10721
|
case de: {
|
|
10725
10722
|
const ne = [Y, Q];
|
|
10726
10723
|
ne.push(3 - ne[0] - ne[1]);
|
|
10727
10724
|
const Te = { a: U[ne[0]], b: U[ne[1]], c: U[ne[2]] };
|
|
10728
|
-
|
|
10725
|
+
P.push({ a: r, b: s, c: Te.c, d: n, order: ne, real: Te, faceIndex: O, consumed: $ });
|
|
10729
10726
|
break;
|
|
10730
10727
|
}
|
|
10731
10728
|
default: {
|
|
10732
10729
|
const ne = [K, Y];
|
|
10733
10730
|
ne.push(3 - ne[0] - ne[1]);
|
|
10734
10731
|
const Te = { a: U[ne[0]], b: U[ne[1]], c: U[ne[2]] };
|
|
10735
|
-
|
|
10732
|
+
P.push({ a: n, b: r, c: Te.c, d: s, order: ne, real: Te, faceIndex: O, consumed: $ });
|
|
10736
10733
|
}
|
|
10737
10734
|
}
|
|
10738
|
-
return
|
|
10735
|
+
return P.length === c;
|
|
10739
10736
|
};
|
|
10740
10737
|
let D = m, R = m, Z = !0, W = !0;
|
|
10741
10738
|
for (; Z || W; ) {
|
|
@@ -10756,7 +10753,7 @@ function Lf(i, e = {}) {
|
|
|
10756
10753
|
break;
|
|
10757
10754
|
}
|
|
10758
10755
|
}
|
|
10759
|
-
return
|
|
10756
|
+
return P;
|
|
10760
10757
|
}
|
|
10761
10758
|
function Zl(i) {
|
|
10762
10759
|
const e = new Array(i);
|
|
@@ -10767,7 +10764,7 @@ function Zl(i) {
|
|
|
10767
10764
|
function Rf(i, e) {
|
|
10768
10765
|
const t = i.length, r = t / 3;
|
|
10769
10766
|
e || (e = Zl(r));
|
|
10770
|
-
const n = e.length, [s, a, o] =
|
|
10767
|
+
const n = e.length, [s, a, o] = Pt, l = new Array(r);
|
|
10771
10768
|
for (let u = 0; u < n; u += 3) {
|
|
10772
10769
|
const h = e[u], p = e[u + 1], d = e[u + 2];
|
|
10773
10770
|
s.fromArray(i, h * 3), a.fromArray(i, p * 3), o.fromArray(i, d * 3), s.sub(a), o.sub(a), o.cross(s).normalize();
|
|
@@ -10827,7 +10824,7 @@ class Rn extends Me {
|
|
|
10827
10824
|
* @returns
|
|
10828
10825
|
*/
|
|
10829
10826
|
getAdjacentFaces(e, t) {
|
|
10830
|
-
const { geometry: r, a: n, b: s, c: a, d: o, faceIndex: l, root: c, parent: u } = this, h =
|
|
10827
|
+
const { geometry: r, a: n, b: s, c: a, d: o, faceIndex: l, root: c, parent: u } = this, h = Pt[3], p = {
|
|
10831
10828
|
indexes: r.index.array,
|
|
10832
10829
|
a: n,
|
|
10833
10830
|
b: s,
|
|
@@ -11205,7 +11202,7 @@ class Fn extends Rn {
|
|
|
11205
11202
|
updateMatrix() {
|
|
11206
11203
|
const { triangle: e, parent: t, matrix: r, position: n, quaternion: s, scale: a, d: o } = this;
|
|
11207
11204
|
if (t && o != null) {
|
|
11208
|
-
const { triangle: l } = t, c = e.getNormal(
|
|
11205
|
+
const { triangle: l } = t, c = e.getNormal(Pt[0]), u = l.getNormal(Pt[1]);
|
|
11209
11206
|
s.setFromUnitVectors(c, u);
|
|
11210
11207
|
const { b: h } = e;
|
|
11211
11208
|
n.copy(h).negate(), n.applyQuaternion(s), n.add(h), r.compose(n, s, a);
|
|
@@ -11345,7 +11342,7 @@ class Fn extends Rn {
|
|
|
11345
11342
|
const { matrixWorld: E } = u;
|
|
11346
11343
|
h = E.clone().multiply(c);
|
|
11347
11344
|
}
|
|
11348
|
-
const [p, d] =
|
|
11345
|
+
const [p, d] = Pt, f = Xl[0];
|
|
11349
11346
|
h.decompose(p, f, d);
|
|
11350
11347
|
const m = [r, r + t], y = [];
|
|
11351
11348
|
a.toArray(y), p.toArray(y, y.length);
|
|
@@ -11353,8 +11350,8 @@ class Fn extends Rn {
|
|
|
11353
11350
|
o.toArray(w), f.toArray(w, w.length);
|
|
11354
11351
|
const x = [];
|
|
11355
11352
|
l.toArray(x), d.toArray(x, x.length);
|
|
11356
|
-
const v = new At(`${s}.position`, m, y),
|
|
11357
|
-
return [v,
|
|
11353
|
+
const v = new At(`${s}.position`, m, y), P = new Dt(`${s}.quaternion`, m, w), C = new At(`${s}.scale`, m, x);
|
|
11354
|
+
return [v, P, C];
|
|
11358
11355
|
}
|
|
11359
11356
|
/**
|
|
11360
11357
|
* 为当前的三角面创建一个Mesh
|
|
@@ -11422,25 +11419,25 @@ class Bi extends Fn {
|
|
|
11422
11419
|
const { geometry: y, matrixWorld: w } = u, x = new J();
|
|
11423
11420
|
h == null ? x.copy(w) : (u.getMatrixAt(h, x), x.premultiply(w));
|
|
11424
11421
|
const v = Af[0].copy(x).invert();
|
|
11425
|
-
let
|
|
11422
|
+
let P;
|
|
11426
11423
|
switch (a) {
|
|
11427
11424
|
case 1: {
|
|
11428
|
-
|
|
11425
|
+
P = d;
|
|
11429
11426
|
break;
|
|
11430
11427
|
}
|
|
11431
11428
|
case 2: {
|
|
11432
|
-
|
|
11429
|
+
P = n.clone().negate(), P.transformDirection(v);
|
|
11433
11430
|
break;
|
|
11434
11431
|
}
|
|
11435
11432
|
default:
|
|
11436
|
-
|
|
11433
|
+
P = m.normal;
|
|
11437
11434
|
}
|
|
11438
|
-
return p.applyMatrix4(v), new Bi({ ...o, geometry: y, origin: p, faceIndex: f, normal:
|
|
11435
|
+
return p.applyMatrix4(v), new Bi({ ...o, geometry: y, origin: p, faceIndex: f, normal: P, angle: s, meshMatrix: x });
|
|
11439
11436
|
}
|
|
11440
11437
|
updateMatrix() {
|
|
11441
11438
|
if (!this.xyPlane)
|
|
11442
11439
|
return super.updateMatrix();
|
|
11443
|
-
const { origin: e, normal: t, angle: r, xyPlaneMatrix: n } = this, [s, a] = Xl, o =
|
|
11440
|
+
const { origin: e, normal: t, angle: r, xyPlaneMatrix: n } = this, [s, a] = Xl, o = Pt[0];
|
|
11444
11441
|
o.set(0, 0, 1), s.setFromUnitVectors(o, t), a.setFromAxisAngle(o, r), s.multiply(a), n.makeRotationFromQuaternion(s), n.setPosition(e), this.matrix.copy(n).invert();
|
|
11445
11442
|
}
|
|
11446
11443
|
/**
|
|
@@ -11637,7 +11634,7 @@ function Ua(i, e, t, r, n) {
|
|
|
11637
11634
|
const p = c[0][t] - r, d = u[0][t] - r, f = h[0][t] - r;
|
|
11638
11635
|
let m = p > 0, y = d > 0, w = f > 0;
|
|
11639
11636
|
r < 0 && (m = !m, y = !y, w = !w);
|
|
11640
|
-
let x, v,
|
|
11637
|
+
let x, v, P, C;
|
|
11641
11638
|
switch (m + y + w) {
|
|
11642
11639
|
case 0: {
|
|
11643
11640
|
for (let E = 0; E < s; E++)
|
|
@@ -11645,15 +11642,15 @@ function Ua(i, e, t, r, n) {
|
|
|
11645
11642
|
break;
|
|
11646
11643
|
}
|
|
11647
11644
|
case 1: {
|
|
11648
|
-
m ? (x = u, v = h,
|
|
11645
|
+
m ? (x = u, v = h, P = Qe(h, c, t, r), C = Qe(u, c, t, r)) : y ? (x = h, v = c, P = Qe(c, u, t, r), C = Qe(h, u, t, r)) : (x = c, v = u, P = Qe(u, h, t, r), C = Qe(c, h, t, r));
|
|
11649
11646
|
for (let E = 0; E < s; E++)
|
|
11650
|
-
n[E].push(...x[E], ...v[E], ...
|
|
11647
|
+
n[E].push(...x[E], ...v[E], ...P[E]), n[E].push(...P[E], ...C[E], ...x[E]);
|
|
11651
11648
|
break;
|
|
11652
11649
|
}
|
|
11653
11650
|
case 2: {
|
|
11654
|
-
m ? y ? (x = h, v = Qe(c, h, t, r),
|
|
11651
|
+
m ? y ? (x = h, v = Qe(c, h, t, r), P = Qe(u, h, t, r)) : (x = u, v = Qe(h, u, t, r), P = Qe(c, u, t, r)) : (x = c, v = Qe(u, c, t, r), P = Qe(h, c, t, r));
|
|
11655
11652
|
for (let E = 0; E < s; E++)
|
|
11656
|
-
n[E].push(...x[E], ...v[E], ...
|
|
11653
|
+
n[E].push(...x[E], ...v[E], ...P[E]);
|
|
11657
11654
|
break;
|
|
11658
11655
|
}
|
|
11659
11656
|
}
|
|
@@ -11738,14 +11735,14 @@ class Xf extends Ae {
|
|
|
11738
11735
|
const x = Rf(e, (r = this.index) == null ? void 0 : r.array);
|
|
11739
11736
|
o.normal = l = new ye(x, 3);
|
|
11740
11737
|
}
|
|
11741
|
-
const { array: c, itemSize: u, count: h } = l, p = Ql(c, u, a, !0), [d, f, m, y] =
|
|
11738
|
+
const { array: c, itemSize: u, count: h } = l, p = Ql(c, u, a, !0), [d, f, m, y] = Pt;
|
|
11742
11739
|
t.boundingBox.getCenter(y);
|
|
11743
11740
|
const w = new Array(e.length);
|
|
11744
11741
|
for (let x = 0; x < h; x++) {
|
|
11745
11742
|
const v = x * u;
|
|
11746
11743
|
d.fromArray(p, v), f.fromArray(e, v);
|
|
11747
|
-
let
|
|
11748
|
-
s !== 0 && (m.subVectors(f, y),
|
|
11744
|
+
let P = n;
|
|
11745
|
+
s !== 0 && (m.subVectors(f, y), P += m.dot(d) * s), P !== 0 && (m.copy(d).multiplyScalar(P), f.add(m)), f.toArray(w, v);
|
|
11749
11746
|
}
|
|
11750
11747
|
return w;
|
|
11751
11748
|
}
|
|
@@ -12099,7 +12096,7 @@ class ec extends Ne {
|
|
|
12099
12096
|
class tc extends Ne {
|
|
12100
12097
|
image;
|
|
12101
12098
|
constructor(e, t) {
|
|
12102
|
-
const { points: r, image: n, color: s, needLight: a, id: o, name: l, userData: c, level: u, visible: h, cache: p, ...d } = e, f = r.map((
|
|
12099
|
+
const { points: r, image: n, color: s, needLight: a, id: o, name: l, userData: c, level: u, visible: h, cache: p, ...d } = e, f = r.map((P) => new A(P.x, P.y, P.z)), m = n ? {
|
|
12103
12100
|
transparent: !0,
|
|
12104
12101
|
...d,
|
|
12105
12102
|
map: Fi(n, p ?? !0, t)
|
|
@@ -12239,8 +12236,8 @@ class om extends no {
|
|
|
12239
12236
|
w,
|
|
12240
12237
|
x,
|
|
12241
12238
|
{ delay: p, duration: d, mode: f, repeat: m, yoyo: y },
|
|
12242
|
-
(v,
|
|
12243
|
-
this.target.position.set(v.x, v.y, v.z), this.target.rotation.set(v.rotationX, v.rotationY, v.rotationZ), this.target.scale.set(v.scaleX, v.scaleY, v.scaleZ), this.dispatchEvent({ type: "update", source: v, tween:
|
|
12239
|
+
(v, P) => {
|
|
12240
|
+
this.target.position.set(v.x, v.y, v.z), this.target.rotation.set(v.rotationX, v.rotationY, v.rotationZ), this.target.scale.set(v.scaleX, v.scaleY, v.scaleZ), this.dispatchEvent({ type: "update", source: v, tween: P });
|
|
12244
12241
|
},
|
|
12245
12242
|
(v) => {
|
|
12246
12243
|
this.tweenSet.add(v), this.dispatchEvent({ type: "start", tween: v });
|
|
@@ -12565,7 +12562,7 @@ class hm extends bt {
|
|
|
12565
12562
|
});
|
|
12566
12563
|
}
|
|
12567
12564
|
}
|
|
12568
|
-
let fe,
|
|
12565
|
+
let fe, Ie, je;
|
|
12569
12566
|
class um extends Tn {
|
|
12570
12567
|
constructor(e) {
|
|
12571
12568
|
super(e);
|
|
@@ -12600,7 +12597,7 @@ class dm {
|
|
|
12600
12597
|
this.textureLoader = e, this.manager = t;
|
|
12601
12598
|
}
|
|
12602
12599
|
parse() {
|
|
12603
|
-
|
|
12600
|
+
Ie = this.parseConnections();
|
|
12604
12601
|
const e = this.parseImages(), t = this.parseTextures(e), r = this.parseMaterials(t), n = this.parseDeformers(), s = new pm().parse(n);
|
|
12605
12602
|
return this.parseScene(n, s, r), je;
|
|
12606
12603
|
}
|
|
@@ -12711,7 +12708,7 @@ class dm {
|
|
|
12711
12708
|
// load a texture specified as a blob or data URI, or via an external URL using TextureLoader
|
|
12712
12709
|
loadTexture(e, t) {
|
|
12713
12710
|
let r;
|
|
12714
|
-
const n = this.textureLoader.path, s =
|
|
12711
|
+
const n = this.textureLoader.path, s = Ie.get(e.id).children;
|
|
12715
12712
|
s !== void 0 && s.length > 0 && t[s[0].ID] !== void 0 && (r = t[s[0].ID], (r.indexOf("blob:") === 0 || r.indexOf("data:") === 0) && this.textureLoader.setPath(void 0));
|
|
12716
12713
|
let a;
|
|
12717
12714
|
const o = e.FileName.slice(-3).toLowerCase();
|
|
@@ -12744,7 +12741,7 @@ class dm {
|
|
|
12744
12741
|
parseMaterial(e, t) {
|
|
12745
12742
|
const r = e.id, n = e.attrName;
|
|
12746
12743
|
let s = e.ShadingModel;
|
|
12747
|
-
if (typeof s == "object" && (s = s.value), !
|
|
12744
|
+
if (typeof s == "object" && (s = s.value), !Ie.has(r)) return null;
|
|
12748
12745
|
const a = this.parseParameters(e, t, r);
|
|
12749
12746
|
let o;
|
|
12750
12747
|
switch (s.toLowerCase()) {
|
|
@@ -12764,7 +12761,7 @@ class dm {
|
|
|
12764
12761
|
const n = {};
|
|
12765
12762
|
e.BumpFactor && (n.bumpScale = e.BumpFactor.value), e.Diffuse ? n.color = new ge().fromArray(e.Diffuse.value).convertSRGBToLinear() : e.DiffuseColor && (e.DiffuseColor.type === "Color" || e.DiffuseColor.type === "ColorRGB") && (n.color = new ge().fromArray(e.DiffuseColor.value).convertSRGBToLinear()), e.DisplacementFactor && (n.displacementScale = e.DisplacementFactor.value), e.Emissive ? n.emissive = new ge().fromArray(e.Emissive.value).convertSRGBToLinear() : e.EmissiveColor && (e.EmissiveColor.type === "Color" || e.EmissiveColor.type === "ColorRGB") && (n.emissive = new ge().fromArray(e.EmissiveColor.value).convertSRGBToLinear()), e.EmissiveFactor && (n.emissiveIntensity = parseFloat(e.EmissiveFactor.value)), e.Opacity && (n.opacity = parseFloat(e.Opacity.value)), n.opacity < 1 && (n.transparent = !0), e.ReflectionFactor, e.Shininess, e.Specular || e.SpecularColor && e.SpecularColor.type;
|
|
12766
12763
|
const s = this;
|
|
12767
|
-
return
|
|
12764
|
+
return Ie.get(r).children.forEach(function(a) {
|
|
12768
12765
|
const o = a.relationship;
|
|
12769
12766
|
switch (o) {
|
|
12770
12767
|
case "Bump":
|
|
@@ -12806,7 +12803,7 @@ class dm {
|
|
|
12806
12803
|
}
|
|
12807
12804
|
// get a texture from the textureMap for use by a material.
|
|
12808
12805
|
getTexture(e, t) {
|
|
12809
|
-
return "LayeredTexture" in fe.Objects && t in fe.Objects.LayeredTexture && (console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."), t =
|
|
12806
|
+
return "LayeredTexture" in fe.Objects && t in fe.Objects.LayeredTexture && (console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."), t = Ie.get(t).children[0].ID), e.get(t);
|
|
12810
12807
|
}
|
|
12811
12808
|
// Parse nodes in FBXTree.Objects.Deformer
|
|
12812
12809
|
// Deformer node can contain skinning or Vertex Cache animation data, however only skinning is supported here
|
|
@@ -12816,7 +12813,7 @@ class dm {
|
|
|
12816
12813
|
if ("Deformer" in fe.Objects) {
|
|
12817
12814
|
const r = fe.Objects.Deformer;
|
|
12818
12815
|
for (const n in r) {
|
|
12819
|
-
const s = r[n], a =
|
|
12816
|
+
const s = r[n], a = Ie.get(parseInt(n));
|
|
12820
12817
|
if (s.attrType === "Skin") {
|
|
12821
12818
|
const o = this.parseSkeleton(a, r);
|
|
12822
12819
|
o.ID = n, a.parents.length > 1 && console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."), o.geometryID = a.parents[0].ID, e[n] = o;
|
|
@@ -12866,7 +12863,7 @@ class dm {
|
|
|
12866
12863
|
fullWeights: a.FullWeights.a
|
|
12867
12864
|
};
|
|
12868
12865
|
if (a.attrType !== "BlendShapeChannel") return;
|
|
12869
|
-
o.geoID =
|
|
12866
|
+
o.geoID = Ie.get(parseInt(s.ID)).children.filter(function(l) {
|
|
12870
12867
|
return l.relationship === void 0;
|
|
12871
12868
|
})[0].ID, r.push(o);
|
|
12872
12869
|
}
|
|
@@ -12878,7 +12875,7 @@ class dm {
|
|
|
12878
12875
|
const n = this.parseModels(e.skeletons, t, r), s = fe.Objects.Model, a = this;
|
|
12879
12876
|
n.forEach(function(l) {
|
|
12880
12877
|
const c = s[l.ID];
|
|
12881
|
-
a.setLookAtProperties(l, c),
|
|
12878
|
+
a.setLookAtProperties(l, c), Ie.get(l.ID).parents.forEach(function(h) {
|
|
12882
12879
|
const p = n.get(h.ID);
|
|
12883
12880
|
p !== void 0 && p.add(l);
|
|
12884
12881
|
}), l.parent === null && je.add(l);
|
|
@@ -12896,7 +12893,7 @@ class dm {
|
|
|
12896
12893
|
parseModels(e, t, r) {
|
|
12897
12894
|
const n = /* @__PURE__ */ new Map(), s = fe.Objects.Model;
|
|
12898
12895
|
for (const a in s) {
|
|
12899
|
-
const o = parseInt(a), l = s[a], c =
|
|
12896
|
+
const o = parseInt(a), l = s[a], c = Ie.get(o);
|
|
12900
12897
|
let u = this.buildSkeleton(c, e, o, l.attrName);
|
|
12901
12898
|
if (!u) {
|
|
12902
12899
|
switch (l.attrType) {
|
|
@@ -13042,7 +13039,7 @@ class dm {
|
|
|
13042
13039
|
"InheritType" in t && (r.inheritType = parseInt(t.InheritType.value)), "RotationOrder" in t ? r.eulerOrder = ic(t.RotationOrder.value) : r.eulerOrder = "ZYX", "Lcl_Translation" in t && (r.translation = t.Lcl_Translation.value), "PreRotation" in t && (r.preRotation = t.PreRotation.value), "Lcl_Rotation" in t && (r.rotation = t.Lcl_Rotation.value), "PostRotation" in t && (r.postRotation = t.PostRotation.value), "Lcl_Scaling" in t && (r.scale = t.Lcl_Scaling.value), "ScalingOffset" in t && (r.scalingOffset = t.ScalingOffset.value), "ScalingPivot" in t && (r.scalingPivot = t.ScalingPivot.value), "RotationOffset" in t && (r.rotationOffset = t.RotationOffset.value), "RotationPivot" in t && (r.rotationPivot = t.RotationPivot.value), e.userData.transformData = r;
|
|
13043
13040
|
}
|
|
13044
13041
|
setLookAtProperties(e, t) {
|
|
13045
|
-
"LookAtProperty" in t &&
|
|
13042
|
+
"LookAtProperty" in t && Ie.get(e.ID).children.forEach(function(n) {
|
|
13046
13043
|
if (n.relationship === "LookAtProperty") {
|
|
13047
13044
|
const s = fe.Objects.Model[n.ID];
|
|
13048
13045
|
if ("Lcl_Translation" in s) {
|
|
@@ -13056,10 +13053,10 @@ class dm {
|
|
|
13056
13053
|
const n = this.parsePoseNodes();
|
|
13057
13054
|
for (const s in e) {
|
|
13058
13055
|
const a = e[s];
|
|
13059
|
-
|
|
13056
|
+
Ie.get(parseInt(a.ID)).parents.forEach(function(l) {
|
|
13060
13057
|
if (t.has(l.ID)) {
|
|
13061
13058
|
const c = l.ID;
|
|
13062
|
-
|
|
13059
|
+
Ie.get(c).parents.forEach(function(h) {
|
|
13063
13060
|
r.has(h.ID) && r.get(h.ID).bind(new ei(a.bones), n[h.ID]);
|
|
13064
13061
|
});
|
|
13065
13062
|
}
|
|
@@ -13101,7 +13098,7 @@ class pm {
|
|
|
13101
13098
|
if ("Geometry" in fe.Objects) {
|
|
13102
13099
|
const r = fe.Objects.Geometry;
|
|
13103
13100
|
for (const n in r) {
|
|
13104
|
-
const s =
|
|
13101
|
+
const s = Ie.get(parseInt(n)), a = this.parseGeometry(s, r[n], e);
|
|
13105
13102
|
t.set(parseInt(n), a);
|
|
13106
13103
|
}
|
|
13107
13104
|
}
|
|
@@ -13199,17 +13196,17 @@ class pm {
|
|
|
13199
13196
|
x.push(v.weight), w.push(v.id);
|
|
13200
13197
|
}), x.length > 4) {
|
|
13201
13198
|
s || (console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."), s = !0);
|
|
13202
|
-
const v = [0, 0, 0, 0],
|
|
13199
|
+
const v = [0, 0, 0, 0], P = [0, 0, 0, 0];
|
|
13203
13200
|
x.forEach(function(C, E) {
|
|
13204
13201
|
let L = C, z = w[E];
|
|
13205
|
-
|
|
13202
|
+
P.forEach(function(H, q, te) {
|
|
13206
13203
|
if (L > H) {
|
|
13207
13204
|
te[q] = L, L = H;
|
|
13208
13205
|
const F = v[q];
|
|
13209
13206
|
v[q] = z, z = F;
|
|
13210
13207
|
}
|
|
13211
13208
|
});
|
|
13212
|
-
}), w = v, x =
|
|
13209
|
+
}), w = v, x = P;
|
|
13213
13210
|
}
|
|
13214
13211
|
for (; x.length < 4; )
|
|
13215
13212
|
x.push(0), w.push(0);
|
|
@@ -13220,9 +13217,9 @@ class pm {
|
|
|
13220
13217
|
const v = mn(f, r, d, e.normal);
|
|
13221
13218
|
o.push(v[0], v[1], v[2]);
|
|
13222
13219
|
}
|
|
13223
|
-
e.material && e.material.mappingType !== "AllSame" && (m = mn(f, r, d, e.material)[0], m < 0 && (p.negativeMaterialIndices = !0, m = 0)), e.uv && e.uv.forEach(function(v,
|
|
13220
|
+
e.material && e.material.mappingType !== "AllSame" && (m = mn(f, r, d, e.material)[0], m < 0 && (p.negativeMaterialIndices = !0, m = 0)), e.uv && e.uv.forEach(function(v, P) {
|
|
13224
13221
|
const C = mn(f, r, d, v);
|
|
13225
|
-
c[
|
|
13222
|
+
c[P] === void 0 && (c[P] = []), c[P].push(C[0]), c[P].push(C[1]);
|
|
13226
13223
|
}), n++, y && (p.genFace(t, e, a, m, o, l, c, u, h, n), r++, n = 0, a = [], o = [], l = [], c = [], u = [], h = []);
|
|
13227
13224
|
}), t;
|
|
13228
13225
|
}
|
|
@@ -13425,7 +13422,7 @@ class fm {
|
|
|
13425
13422
|
id: t[r].id,
|
|
13426
13423
|
times: t[r].KeyTime.a.map(xm),
|
|
13427
13424
|
values: t[r].KeyValueFloat.a
|
|
13428
|
-
}, s =
|
|
13425
|
+
}, s = Ie.get(n.id);
|
|
13429
13426
|
if (s !== void 0) {
|
|
13430
13427
|
const a = s.parents[0].ID, o = s.parents[0].relationship;
|
|
13431
13428
|
o.match(/X/) ? e.get(a).curves.x = n : o.match(/Y/) ? e.get(a).curves.y = n : o.match(/Z/) ? e.get(a).curves.z = n : o.match(/DeformPercent/) && e.has(a) && (e.get(a).curves.morph = n);
|
|
@@ -13438,13 +13435,13 @@ class fm {
|
|
|
13438
13435
|
parseAnimationLayers(e) {
|
|
13439
13436
|
const t = fe.Objects.AnimationLayer, r = /* @__PURE__ */ new Map();
|
|
13440
13437
|
for (const n in t) {
|
|
13441
|
-
const s = [], a =
|
|
13438
|
+
const s = [], a = Ie.get(parseInt(n));
|
|
13442
13439
|
a !== void 0 && (a.children.forEach(function(l, c) {
|
|
13443
13440
|
if (e.has(l.ID)) {
|
|
13444
13441
|
const u = e.get(l.ID);
|
|
13445
13442
|
if (u.curves.x !== void 0 || u.curves.y !== void 0 || u.curves.z !== void 0) {
|
|
13446
13443
|
if (s[c] === void 0) {
|
|
13447
|
-
const h =
|
|
13444
|
+
const h = Ie.get(l.ID).parents.filter(function(p) {
|
|
13448
13445
|
return p.relationship !== void 0;
|
|
13449
13446
|
})[0].ID;
|
|
13450
13447
|
if (h !== void 0) {
|
|
@@ -13468,9 +13465,9 @@ class fm {
|
|
|
13468
13465
|
s[c] && (s[c][u.attr] = u);
|
|
13469
13466
|
} else if (u.curves.morph !== void 0) {
|
|
13470
13467
|
if (s[c] === void 0) {
|
|
13471
|
-
const h =
|
|
13468
|
+
const h = Ie.get(l.ID).parents.filter(function(w) {
|
|
13472
13469
|
return w.relationship !== void 0;
|
|
13473
|
-
})[0].ID, p =
|
|
13470
|
+
})[0].ID, p = Ie.get(h).parents[0].ID, d = Ie.get(p).parents[0].ID, f = Ie.get(d).parents[0].ID, m = fe.Objects.Model[f], y = {
|
|
13474
13471
|
modelName: m.attrName ? Cn.sanitizeNodeName(m.attrName) : "",
|
|
13475
13472
|
morphName: fe.Objects.Deformer[h].attrName
|
|
13476
13473
|
};
|
|
@@ -13488,7 +13485,7 @@ class fm {
|
|
|
13488
13485
|
parseAnimStacks(e) {
|
|
13489
13486
|
const t = fe.Objects.AnimationStack, r = {};
|
|
13490
13487
|
for (const n in t) {
|
|
13491
|
-
const s =
|
|
13488
|
+
const s = Ie.get(parseInt(n)).children;
|
|
13492
13489
|
s.length > 1 && console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");
|
|
13493
13490
|
const a = e.get(s[0].ID);
|
|
13494
13491
|
r[n] = {
|
|
@@ -13622,9 +13619,9 @@ class fm {
|
|
|
13622
13619
|
if (d[0] >= 180 || d[1] >= 180 || d[2] >= 180) {
|
|
13623
13620
|
const m = Math.max(...d) / 180, y = new me(...c, n), w = new me(...h, n), x = new ue().setFromEuler(y), v = new ue().setFromEuler(w);
|
|
13624
13621
|
x.dot(v) && v.set(-v.x, -v.y, -v.z, -v.w);
|
|
13625
|
-
const
|
|
13622
|
+
const P = e.times[o - 1], C = e.times[o] - P, E = new ue(), L = new me();
|
|
13626
13623
|
for (let z = 0; z < 1; z += 1 / m)
|
|
13627
|
-
E.copy(x.clone().slerp(v.clone(), z)), s.push(
|
|
13624
|
+
E.copy(x.clone().slerp(v.clone(), z)), s.push(P + z * C), L.setFromQuaternion(E, n), a.push(L.x), a.push(L.y), a.push(L.z);
|
|
13628
13625
|
} else
|
|
13629
13626
|
s.push(e.times[o]), a.push(Re.degToRad(e.values[o])), a.push(Re.degToRad(t.values[o])), a.push(Re.degToRad(r.values[o]));
|
|
13630
13627
|
}
|
|
@@ -13687,11 +13684,11 @@ class mm {
|
|
|
13687
13684
|
return p.trim().replace(/^"/, "");
|
|
13688
13685
|
}), n = "connections", s = [c, u], bm(s, h), a[n] === void 0 && (a[n] = []);
|
|
13689
13686
|
}
|
|
13690
|
-
n === "Node" && (a.id = s), n in a && Array.isArray(a[n]) ? a[n].push(s) : n !== "a" ? a[n] = s : a.a = s, this.setCurrentProp(a, n), n === "a" && s.slice(-1) !== "," && (a.a =
|
|
13687
|
+
n === "Node" && (a.id = s), n in a && Array.isArray(a[n]) ? a[n].push(s) : n !== "a" ? a[n] = s : a.a = s, this.setCurrentProp(a, n), n === "a" && s.slice(-1) !== "," && (a.a = Is(s));
|
|
13691
13688
|
}
|
|
13692
13689
|
parseNodePropertyContinued(e) {
|
|
13693
13690
|
const t = this.getCurrentNode();
|
|
13694
|
-
t.a += e, e.slice(-1) !== "," && (t.a =
|
|
13691
|
+
t.a += e, e.slice(-1) !== "," && (t.a = Is(t.a));
|
|
13695
13692
|
}
|
|
13696
13693
|
// parse "Property70"
|
|
13697
13694
|
parseNodeSpecialProperty(e, t, r) {
|
|
@@ -13715,7 +13712,7 @@ class mm {
|
|
|
13715
13712
|
case "Lcl_Translation":
|
|
13716
13713
|
case "Lcl_Rotation":
|
|
13717
13714
|
case "Lcl_Scaling":
|
|
13718
|
-
c =
|
|
13715
|
+
c = Is(c);
|
|
13719
13716
|
break;
|
|
13720
13717
|
}
|
|
13721
13718
|
this.getPrevNode()[s] = {
|
|
@@ -14023,19 +14020,19 @@ function sc(i) {
|
|
|
14023
14020
|
m.extractRotation(u);
|
|
14024
14021
|
const y = new J();
|
|
14025
14022
|
y.copyPosition(u);
|
|
14026
|
-
const w = y.clone().invert().multiply(u), x = m.clone().invert().multiply(w), v = s,
|
|
14023
|
+
const w = y.clone().invert().multiply(u), x = m.clone().invert().multiply(w), v = s, P = new J();
|
|
14027
14024
|
if (d === 0)
|
|
14028
|
-
|
|
14025
|
+
P.copy(m).multiply(f).multiply(x).multiply(v);
|
|
14029
14026
|
else if (d === 1)
|
|
14030
|
-
|
|
14027
|
+
P.copy(m).multiply(x).multiply(f).multiply(v);
|
|
14031
14028
|
else {
|
|
14032
14029
|
const te = new J().scale(new A().setFromMatrixScale(h)).clone().invert(), F = x.clone().multiply(te);
|
|
14033
|
-
|
|
14030
|
+
P.copy(m).multiply(f).multiply(F).multiply(v);
|
|
14034
14031
|
}
|
|
14035
14032
|
const C = c.clone().invert(), E = a.clone().invert();
|
|
14036
14033
|
let L = e.clone().multiply(l).multiply(c).multiply(t).multiply(r).multiply(n).multiply(C).multiply(o).multiply(a).multiply(s).multiply(E);
|
|
14037
14034
|
const z = new J().copyPosition(L), H = u.clone().multiply(z);
|
|
14038
|
-
return p.copyPosition(H), L = p.clone().multiply(
|
|
14035
|
+
return p.copyPosition(H), L = p.clone().multiply(P), L.premultiply(u.invert()), L;
|
|
14039
14036
|
}
|
|
14040
14037
|
function ic(i) {
|
|
14041
14038
|
i = i || 0;
|
|
@@ -14056,7 +14053,7 @@ function ic(i) {
|
|
|
14056
14053
|
];
|
|
14057
14054
|
return i === 6 ? (console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."), e[0]) : e[i];
|
|
14058
14055
|
}
|
|
14059
|
-
function
|
|
14056
|
+
function Is(i) {
|
|
14060
14057
|
return i.split(",").map(function(t) {
|
|
14061
14058
|
return parseFloat(t);
|
|
14062
14059
|
});
|
|
@@ -14073,8 +14070,8 @@ function Sm(i, e, t, r) {
|
|
|
14073
14070
|
i[s] = e[n];
|
|
14074
14071
|
return i;
|
|
14075
14072
|
}
|
|
14076
|
-
const Mm = /^[og]\s*(.+)?/, Tm = /^mtllib /, Cm = /^usemtl /,
|
|
14077
|
-
function
|
|
14073
|
+
const Mm = /^[og]\s*(.+)?/, Tm = /^mtllib /, Cm = /^usemtl /, Im = /^usemap /, Va = /\s+/, _a = new A(), Ps = new A(), Ha = new A(), qa = new A(), Ze = new A(), gn = new ge();
|
|
14074
|
+
function Pm() {
|
|
14078
14075
|
const i = {
|
|
14079
14076
|
objects: [],
|
|
14080
14077
|
object: {},
|
|
@@ -14183,7 +14180,7 @@ function Im() {
|
|
|
14183
14180
|
},
|
|
14184
14181
|
addFaceNormal: function(e, t, r) {
|
|
14185
14182
|
const n = this.vertices, s = this.object.geometry.normals;
|
|
14186
|
-
_a.fromArray(n, e),
|
|
14183
|
+
_a.fromArray(n, e), Ps.fromArray(n, t), Ha.fromArray(n, r), Ze.subVectors(Ha, Ps), qa.subVectors(_a, Ps), Ze.cross(qa), Ze.normalize(), s.push(Ze.x, Ze.y, Ze.z), s.push(Ze.x, Ze.y, Ze.z), s.push(Ze.x, Ze.y, Ze.z);
|
|
14187
14184
|
},
|
|
14188
14185
|
addColor: function(e, t, r) {
|
|
14189
14186
|
const n = this.colors, s = this.object.geometry.colors;
|
|
@@ -14252,7 +14249,7 @@ class Em extends Tn {
|
|
|
14252
14249
|
return this.materials = e, this;
|
|
14253
14250
|
}
|
|
14254
14251
|
parse(e) {
|
|
14255
|
-
const t = new
|
|
14252
|
+
const t = new Pm();
|
|
14256
14253
|
e.indexOf(`\r
|
|
14257
14254
|
`) !== -1 && (e = e.replace(/\r\n/g, `
|
|
14258
14255
|
`)), e.indexOf(`\\
|
|
@@ -14339,7 +14336,7 @@ class Em extends Tn {
|
|
|
14339
14336
|
t.object.startMaterial(c.substring(7).trim(), t.materialLibraries);
|
|
14340
14337
|
else if (Tm.test(c))
|
|
14341
14338
|
t.materialLibraries.push(c.substring(7).trim());
|
|
14342
|
-
else if (
|
|
14339
|
+
else if (Im.test(c))
|
|
14343
14340
|
console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
|
|
14344
14341
|
else if (u === "s") {
|
|
14345
14342
|
if (n = c.split(" "), n.length > 1) {
|
|
@@ -14365,10 +14362,10 @@ class Em extends Tn {
|
|
|
14365
14362
|
m.setAttribute("position", new ye(u.vertices, 3)), u.normals.length > 0 && m.setAttribute("normal", new ye(u.normals, 3)), u.colors.length > 0 && (f = !0, m.setAttribute("color", new ye(u.colors, 3))), u.hasUVIndices === !0 && m.setAttribute("uv", new ye(u.uvs, 2));
|
|
14366
14363
|
const y = [];
|
|
14367
14364
|
for (let x = 0, v = h.length; x < v; x++) {
|
|
14368
|
-
const
|
|
14365
|
+
const P = h[x], C = P.name + "_" + P.smooth + "_" + f;
|
|
14369
14366
|
let E = t.materials[C];
|
|
14370
14367
|
if (this.materials !== null) {
|
|
14371
|
-
if (E = this.materials.create(
|
|
14368
|
+
if (E = this.materials.create(P.name), p && E && !(E instanceof Yr)) {
|
|
14372
14369
|
const L = new Yr();
|
|
14373
14370
|
Zr.prototype.copy.call(L, E), L.color.copy(E.color), E = L;
|
|
14374
14371
|
} else if (d && E && !(E instanceof un)) {
|
|
@@ -14376,13 +14373,13 @@ class Em extends Tn {
|
|
|
14376
14373
|
Zr.prototype.copy.call(L, E), L.color.copy(E.color), L.map = E.map, E = L;
|
|
14377
14374
|
}
|
|
14378
14375
|
}
|
|
14379
|
-
E === void 0 && (p ? E = new Yr() : d ? E = new un({ size: 1, sizeAttenuation: !1 }) : E = new We(), E.name =
|
|
14376
|
+
E === void 0 && (p ? E = new Yr() : d ? E = new un({ size: 1, sizeAttenuation: !1 }) : E = new We(), E.name = P.name, E.flatShading = !P.smooth, E.vertexColors = f, t.materials[C] = E), y.push(E);
|
|
14380
14377
|
}
|
|
14381
14378
|
let w;
|
|
14382
14379
|
if (y.length > 1) {
|
|
14383
14380
|
for (let x = 0, v = h.length; x < v; x++) {
|
|
14384
|
-
const
|
|
14385
|
-
m.addGroup(
|
|
14381
|
+
const P = h[x];
|
|
14382
|
+
m.addGroup(P.groupStart, P.groupCount, x);
|
|
14386
14383
|
}
|
|
14387
14384
|
p ? w = new Ds(m, y) : d ? w = new Xt(m, y) : w = new le(m, y);
|
|
14388
14385
|
} else
|
|
@@ -14534,10 +14531,10 @@ class Wm {
|
|
|
14534
14531
|
t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4;
|
|
14535
14532
|
let v = e.getUint8(t);
|
|
14536
14533
|
t += 1, v === 0 ? v = Wi : v === 1 ? v = Vi : v === 2 && (v = st);
|
|
14537
|
-
const
|
|
14534
|
+
const P = e.getUint16(t, this.isLE);
|
|
14538
14535
|
t += 2;
|
|
14539
|
-
const C =
|
|
14540
|
-
if (t +=
|
|
14536
|
+
const C = P > 0 ? Ka(e, P, t) : "";
|
|
14537
|
+
if (t += P, !this.materials.has(f)) {
|
|
14541
14538
|
const E = [m, y, w, x, v], L = $s(f, E, Zs(C));
|
|
14542
14539
|
if (this.materials.set(f, L), u[f].materialInfo = E, C) {
|
|
14543
14540
|
const {
|
|
@@ -14557,9 +14554,9 @@ class Wm {
|
|
|
14557
14554
|
position: new ArrayBuffer(0),
|
|
14558
14555
|
uv: new ArrayBuffer(0)
|
|
14559
14556
|
};
|
|
14560
|
-
const y = [], w = [], x = [], v = [],
|
|
14561
|
-
if (t += 2,
|
|
14562
|
-
for (let R = 0; R <
|
|
14557
|
+
const y = [], w = [], x = [], v = [], P = e.getUint16(t, this.isLE);
|
|
14558
|
+
if (t += 2, P > 0)
|
|
14559
|
+
for (let R = 0; R < P; R++) {
|
|
14563
14560
|
const Z = new A();
|
|
14564
14561
|
Z.setX(e.getFloat32(t, this.isLE)), t += 4, Z.setY(e.getFloat32(t, this.isLE)), t += 4, Z.setZ(e.getFloat32(t, this.isLE)), t += 4, y.push(Z);
|
|
14565
14562
|
}
|
|
@@ -14645,10 +14642,10 @@ class Wm {
|
|
|
14645
14642
|
t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4;
|
|
14646
14643
|
let v = e.getUint8(t);
|
|
14647
14644
|
t += 1, v === 0 ? v = Wi : v === 1 ? v = Vi : v === 2 && (v = st);
|
|
14648
|
-
const
|
|
14645
|
+
const P = e.getUint16(t, this.isLE);
|
|
14649
14646
|
t += 2;
|
|
14650
|
-
const C =
|
|
14651
|
-
if (t +=
|
|
14647
|
+
const C = P > 0 ? Ka(e, P, t) : "";
|
|
14648
|
+
if (t += P, !this.materials.has(f)) {
|
|
14652
14649
|
const E = [m, y, w, x, v], L = $s(f, E, Zs(C));
|
|
14653
14650
|
if (this.materials.set(f, L), u[f].materialInfo = E, C) {
|
|
14654
14651
|
const {
|
|
@@ -14676,7 +14673,7 @@ class Wm {
|
|
|
14676
14673
|
position: new ArrayBuffer(0),
|
|
14677
14674
|
uv: new ArrayBuffer(0)
|
|
14678
14675
|
};
|
|
14679
|
-
const x = [], v = [],
|
|
14676
|
+
const x = [], v = [], P = [], C = [], E = e.getUint32(t, this.isLE);
|
|
14680
14677
|
if (t += 4, E > 0)
|
|
14681
14678
|
for (let W = 0; W < E; W++) {
|
|
14682
14679
|
const O = new A();
|
|
@@ -14704,15 +14701,15 @@ class Wm {
|
|
|
14704
14701
|
const U = e.getUint32(t, this.isLE);
|
|
14705
14702
|
t += 4;
|
|
14706
14703
|
const $ = [O, X, U];
|
|
14707
|
-
|
|
14704
|
+
P.push($), v.length > 0 && C.push([
|
|
14708
14705
|
v[$[0]],
|
|
14709
14706
|
v[$[1]],
|
|
14710
14707
|
v[$[2]]
|
|
14711
14708
|
]);
|
|
14712
14709
|
}
|
|
14713
14710
|
const q = [], te = [];
|
|
14714
|
-
for (let W = 0; W <
|
|
14715
|
-
const O =
|
|
14711
|
+
for (let W = 0; W < P.length; W++) {
|
|
14712
|
+
const O = P[W], X = x[O[0]], U = x[O[1]], $ = x[O[2]];
|
|
14716
14713
|
q.push(...X.toArray(), ...U.toArray(), ...$.toArray());
|
|
14717
14714
|
let G = new oe(), Y = new oe(), K = new oe();
|
|
14718
14715
|
const Q = C[W];
|
|
@@ -14821,7 +14818,7 @@ class qm extends bt {
|
|
|
14821
14818
|
storeName: "modelCache"
|
|
14822
14819
|
});
|
|
14823
14820
|
loadingManager = new $a();
|
|
14824
|
-
gltfLoader =
|
|
14821
|
+
gltfLoader = Io(new du(this.loadingManager));
|
|
14825
14822
|
fbxLoader = Je(new um(this.loadingManager));
|
|
14826
14823
|
objLoader = Je(new Em(this.loadingManager));
|
|
14827
14824
|
stlLoader = Je(new pu(this.loadingManager));
|
|
@@ -14834,7 +14831,7 @@ class qm extends bt {
|
|
|
14834
14831
|
this.gltfLoader.setDRACOLoader(t);
|
|
14835
14832
|
}
|
|
14836
14833
|
setKtx2DecoderPath(e) {
|
|
14837
|
-
const t =
|
|
14834
|
+
const t = Po(new gu()).setTranscoderPath(e).detectSupport(this.viewport.renderer).setWorkerLimit(2);
|
|
14838
14835
|
this.gltfLoader.setKTX2Loader(t);
|
|
14839
14836
|
}
|
|
14840
14837
|
/**
|
|
@@ -14900,7 +14897,7 @@ class qm extends bt {
|
|
|
14900
14897
|
userData: w,
|
|
14901
14898
|
extraIds: x
|
|
14902
14899
|
} = t, v = Ki.clone(e);
|
|
14903
|
-
v.animations = v.animations.map((
|
|
14900
|
+
v.animations = v.animations.map((P) => P.clone()), a && (v.sid = a), o && (v.name = o), l && (v.level = l), c === !1 ? v.hide() : c === !0 && v.show(), u && v.position.set(u.x, u.y, u.z), h && v.rotation.set(h.x, h.y, h.z), p && v.scale.set(p.x, p.y, p.z), d ? v.onClick = d.bind(v) : v.onClick = null, f ? v.onDblClick = f.bind(v) : v.onDblClick = null, m ? v.onRightClick = m.bind(v) : v.onRightClick = null, y ? v.onLoad = y.bind(v) : v.onLoad = null, v.onLoad?.(v), w && (v.userData = w), x && (v.extraIds = x), r !== null && this.viewport.scener.addObject(v, r || this.scene || e.parent), n(v);
|
|
14904
14901
|
});
|
|
14905
14902
|
}
|
|
14906
14903
|
async loadToGroup(e, t) {
|
|
@@ -15141,8 +15138,8 @@ class Km extends bt {
|
|
|
15141
15138
|
userData: x
|
|
15142
15139
|
} = t, v = e.clone();
|
|
15143
15140
|
if (s !== v.name && v.text) {
|
|
15144
|
-
const
|
|
15145
|
-
|
|
15141
|
+
const P = v.text.material.clone();
|
|
15142
|
+
P.map?.dispose(), P.map = this._createTextTexture(t), v.text.material = P;
|
|
15146
15143
|
}
|
|
15147
15144
|
return o && v.text?.position.set(o.x, o.y, o.z), l && v.text?.scale.set(l.x, l.y, l.z), c && v.icon?.scale.set(c.x, c.y, c.z), n && (v.sid = n), s && (v.name = s), a && (v.level = a), u && (v.scaleFixed = u), Vn(h) && (v.visible = h), p && v.position.set(p.x, p.y, p.z), d && v.rotation.set(d.x, d.y, d.z), f && v.scale.set(f.x, f.y, f.z), m ? v.onClick = m.bind(v) : v.onClick = null, y ? v.onDblClick = y.bind(v) : v.onDblClick = null, w ? v.onRightClick = w.bind(v) : v.onRightClick = null, x && (v.userData = x), r !== null && this.viewport.scener.addObject(v, r || this.scene || e.parent), v;
|
|
15148
15145
|
}
|
|
@@ -15350,18 +15347,18 @@ class $m extends bt {
|
|
|
15350
15347
|
graphs: []
|
|
15351
15348
|
}), c.set(y, m);
|
|
15352
15349
|
}), h.forEach((f) => {
|
|
15353
|
-
const m = f.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"], y = f.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"], w = f.Transition.topoEdge["gml:Edge"].passable["#text"], x = c.get(m), v = c.get(y),
|
|
15350
|
+
const m = f.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"], y = f.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"], w = f.Transition.topoEdge["gml:Edge"].passable["#text"], x = c.get(m), v = c.get(y), P = f.Transition._attributes["gml:id"], C = f.Transition.topoEdge["gml:Edge"].link_name["#text"];
|
|
15354
15351
|
x !== void 0 && v !== void 0 && (w !== "2" && w !== "3" && l[x].graphs.push({
|
|
15355
15352
|
targetNodeId: y,
|
|
15356
15353
|
linkInfo: {
|
|
15357
|
-
id:
|
|
15354
|
+
id: P,
|
|
15358
15355
|
name: C
|
|
15359
15356
|
},
|
|
15360
15357
|
passable: +w
|
|
15361
15358
|
}), w !== "1" && w !== "3" && l[v].graphs.push({
|
|
15362
15359
|
targetNodeId: m,
|
|
15363
15360
|
linkInfo: {
|
|
15364
|
-
id:
|
|
15361
|
+
id: P,
|
|
15365
15362
|
name: C
|
|
15366
15363
|
},
|
|
15367
15364
|
passable: +w
|
|
@@ -16036,8 +16033,8 @@ class Ug {
|
|
|
16036
16033
|
static utils = Zi;
|
|
16037
16034
|
utils = Zi;
|
|
16038
16035
|
//
|
|
16039
|
-
static animation =
|
|
16040
|
-
animation =
|
|
16036
|
+
static animation = It;
|
|
16037
|
+
animation = It;
|
|
16041
16038
|
//
|
|
16042
16039
|
static library = ja;
|
|
16043
16040
|
library = ja;
|
|
@@ -18204,14 +18201,14 @@ export {
|
|
|
18204
18201
|
xd as createCurveAnimationClipByCurve,
|
|
18205
18202
|
wd as createCurveAnimationClipByPolyline,
|
|
18206
18203
|
Yo as createCurveAnimationClipForBones,
|
|
18207
|
-
|
|
18204
|
+
Id as createCurveAnimationClipForBonesTarget,
|
|
18208
18205
|
md as createEqualChainBones,
|
|
18209
18206
|
em as createFindObjectsInBoxNearPosition,
|
|
18210
18207
|
tm as createFindObjectsInSphereNearPosition,
|
|
18211
18208
|
rm as createFindObjectsNearPath,
|
|
18212
18209
|
Fg as createGuiAnimationController,
|
|
18213
18210
|
Td as createKeyframeTracksForBones,
|
|
18214
|
-
|
|
18211
|
+
Pd as createKeyframeTracksForBonesTarget,
|
|
18215
18212
|
Xo as createKeyframeTracksOfCurveAnimation,
|
|
18216
18213
|
bd as createKeyframeTracksOfCurveAnimationByPolyline,
|
|
18217
18214
|
Zf as createPlaneMatrix,
|