soonspacejs 2.16.7 → 2.16.8
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 +618 -607
- package/package.json +1 -1
- package/types/Controls/index.d.ts +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as qn from "three";
|
|
2
|
-
import { Vector3 as D, Euler as me, MathUtils as
|
|
2
|
+
import { Vector3 as D, Euler as me, MathUtils as Re, Object3D as Me, Box3 as Pt, Scene as Ya, Quaternion as ue, CubeTextureLoader as Cc, HalfFloatType as hn, EquirectangularReflectionMapping as Ps, Color as ge, Texture as Ct, FileLoader as Zs, ImageLoader as Dc, TextureLoader as Xa, Vector2 as oe, Vector4 as Rr, CurvePath as Ac, LineCurve as Ec, LineCurve3 as Oc, Line3 as Qa, Matrix3 as Xt, Skeleton as Js, AnimationClip as yt, VectorKeyframeTrack as Dt, InterpolateLinear as Br, QuaternionKeyframeTrack as At, EventDispatcher as Za, LoopPingPong as Lc, InterpolateDiscrete as Rc, Bone as br, SkinnedMesh as Fr, Matrix4 as J, Uint16BufferAttribute as pn, Float32BufferAttribute as ye, StringKeyframeTrack as Bc, ColorKeyframeTrack as Fc, NumberKeyframeTrack as Ja, BooleanKeyframeTrack as kc, KeyframeTrack as zc, NormalAnimationBlendMode as Nc, FogExp2 as Uc, MeshStandardMaterial as Ve, MeshPhongMaterial as $s, MeshPhysicalMaterial as jc, Mesh as le, LineSegments as Cs, LineBasicMaterial as Kn, BufferGeometry as Ae, EdgesGeometry as Gc, OrthographicCamera as Qt, PerspectiveCamera as kr, WebGLRenderer as Vc, PCFShadowMap as Wc, Spherical as ze, Sphere as zr, BufferAttribute as Be, ShaderMaterial as ct, WebGLRenderTarget as kt, RGBAFormat as an, LinearFilter as ht, DataTexture as _c, NoColorSpace as Hc, RepeatWrapping as vt, NearestFilter as Ft, REVISION as $a, RedFormat as qc, FloatType as Kc, DepthTexture as Yc, UnsignedIntType as Xc, GLBufferAttribute as Qc, InterleavedBufferAttribute as Zc, Raycaster as sr, BoxGeometry as Jc, Sprite as tt, MeshBasicMaterial as fn, CanvasTexture as ei, SRGBColorSpace as mt, SpriteMaterial as Ds, BatchedMesh as gt, NormalBlending as $c, Material as Xn, CustomBlending as eh, Group as mn, InstancedMesh as Fe, LOD as ti, DynamicDrawUsage as th, DoubleSide as nt, Line as Qn, Points as qt, Light as eo, PMREMGenerator as nh, AnimationMixer as rh, Timer as sh, LinearSRGBColorSpace as ih, NeutralToneMapping as ah, AgXToneMapping as oh, ACESFilmicToneMapping as lh, CineonToneMapping as ch, ReinhardToneMapping as hh, NoToneMapping as uh, UVMapping as dh, CubeTexture as ph, SphereGeometry as Ni, CircleGeometry as fh, PlaneGeometry as gn, ExtrudeGeometry as mh, Shape as to, Box2 as As, Triangle as no, VideoTexture as gh, ShapeGeometry as yh, Plane as vh, AmbientLight as ro, DirectionalLight as so, HemisphereLight as xh, SpotLight as io, PointLight as Es, RectAreaLight as wh, Loader as Sr, LoaderUtils as bh, ClampToEdgeWrapping as Ui, PropertyBinding as Mr, ShapeUtils as Sh, PointsMaterial as cr, FrontSide as ji, BackSide as Gi, LoadingManager as Mh, GridHelper as Th, AxesHelper as Ih, Box3Helper as Ph, DirectionalLightHelper as Ch, HemisphereLightHelper as Dh, SpotLightHelper as Ah, PointLightHelper as Eh } from "three";
|
|
3
3
|
import * as Vi from "three/examples/jsm/libs/tween.module.js";
|
|
4
4
|
import Os, { Easing as ve, Tween as Oh } from "three/examples/jsm/libs/tween.module.js";
|
|
5
5
|
import Zn from "camera-controls";
|
|
6
6
|
import { HDRLoader as Lh } from "three/examples/jsm/loaders/HDRLoader.js";
|
|
7
|
-
import { GLTFExporter as
|
|
8
|
-
import { Pass as
|
|
7
|
+
import { GLTFExporter as Rh } from "three/examples/jsm/exporters/GLTFExporter.js";
|
|
8
|
+
import { Pass as Bh, EffectPass as Wi, EffectComposer as Fh, RenderPass as kh, NormalPass as zh, SMAAEffect as Nh, EdgeDetectionMode as Uh, SMAAPreset as jh, ToneMappingEffect as Gh, ToneMappingMode as cn, BloomEffect as Vh, BlendFunction as _i, OutlineEffect as Wh } from "postprocessing";
|
|
9
9
|
import { RoomEnvironment as _h } from "three/examples/jsm/environments/RoomEnvironment.js";
|
|
10
10
|
import Hh from "three/examples/jsm/libs/stats.module.js";
|
|
11
11
|
import { Sky as qh } from "three/examples/jsm/objects/Sky.js";
|
|
@@ -24,7 +24,7 @@ import * as Hi from "three/examples/jsm/utils/SkeletonUtils.js";
|
|
|
24
24
|
import * as iu from "three/examples/jsm/libs/fflate.module.js";
|
|
25
25
|
import { NURBSCurve as au } from "three/examples/jsm/curves/NURBSCurve.js";
|
|
26
26
|
import { RectAreaLightHelper as ou } from "three/examples/jsm/helpers/RectAreaLightHelper.js";
|
|
27
|
-
const lu = "soonspacejs", cu = "2.16.
|
|
27
|
+
const lu = "soonspacejs", cu = "2.16.8", qi = {
|
|
28
28
|
name: lu,
|
|
29
29
|
version: cu
|
|
30
30
|
}, lo = "[soonspacejs]: ";
|
|
@@ -46,8 +46,8 @@ function ri(i) {
|
|
|
46
46
|
}
|
|
47
47
|
function yn(i, e, t) {
|
|
48
48
|
if (t && !t.isEmpty()) return t.clone();
|
|
49
|
-
const n = new
|
|
50
|
-
return i instanceof Ya ? i.children.filter((r) => !("isTransformControls" in r)).reduce((r, s) => r.union(new
|
|
49
|
+
const n = new Pt();
|
|
50
|
+
return i instanceof Ya ? i.children.filter((r) => !("isTransformControls" in r)).reduce((r, s) => r.union(new Pt().setFromObject(s, e)), n) : n.setFromObject(i, e), n.isEmpty() && (i.getWorldPosition(n.min), n.max.copy(n.min)), n;
|
|
51
51
|
}
|
|
52
52
|
function yr(i, e, t) {
|
|
53
53
|
const n = t.clone();
|
|
@@ -114,7 +114,7 @@ function uo(i, e, t = 5) {
|
|
|
114
114
|
}
|
|
115
115
|
function po(i, e) {
|
|
116
116
|
const t = i - e;
|
|
117
|
-
return
|
|
117
|
+
return Re.euclideanModulo(t + Math.PI, Math.PI * 2) - Math.PI;
|
|
118
118
|
}
|
|
119
119
|
class fo {
|
|
120
120
|
min;
|
|
@@ -196,15 +196,15 @@ class fo {
|
|
|
196
196
|
}
|
|
197
197
|
async function un({ path: i = "", file: e }) {
|
|
198
198
|
if (Array.isArray(e))
|
|
199
|
-
return new
|
|
199
|
+
return new Cc().setPath(i).loadAsync(e);
|
|
200
200
|
{
|
|
201
201
|
const t = ci(e);
|
|
202
202
|
if (t === "hdr" || t === "pic") {
|
|
203
203
|
const n = await oi.setPath(i).setDataType(hn).loadAsync(e);
|
|
204
|
-
return n.mapping =
|
|
204
|
+
return n.mapping = Ps, n;
|
|
205
205
|
} else {
|
|
206
206
|
const n = await Jt.setPath(i).loadAsync(e);
|
|
207
|
-
return n.mapping =
|
|
207
|
+
return n.mapping = Ps, n;
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
}
|
|
@@ -217,7 +217,7 @@ function wn(i) {
|
|
|
217
217
|
for (let u = 0, h = l.length - 1; u <= h; u++)
|
|
218
218
|
a.addColorStop(t ? t[u] : u / h, l[u]);
|
|
219
219
|
s.fillStyle = a, s.fillRect(0, 0, 16, n);
|
|
220
|
-
const c = new
|
|
220
|
+
const c = new Ct(r);
|
|
221
221
|
return c.needsUpdate = !0, c;
|
|
222
222
|
}
|
|
223
223
|
const Ls = (i) => {
|
|
@@ -375,9 +375,9 @@ async function Tu(i, e) {
|
|
|
375
375
|
async function Iu(i) {
|
|
376
376
|
return Tu("code", i);
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Pu(i, e = {}) {
|
|
379
379
|
return new Promise((t, n) => {
|
|
380
|
-
new
|
|
380
|
+
new Rh().parse(
|
|
381
381
|
i,
|
|
382
382
|
(s) => t(s),
|
|
383
383
|
(s) => n(s),
|
|
@@ -385,7 +385,7 @@ function Cu(i, e = {}) {
|
|
|
385
385
|
);
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const Cu = Object.prototype.hasOwnProperty, Du = (i, e) => Cu.call(i, e), Ut = (i) => st(i) === "String", jr = (i) => st(i) === "Boolean", Je = (i) => st(i) === "Number", Au = (i) => st(i) === "Null", Eu = (i) => st(i) === "Undefined", Ou = (i) => st(i) === "Symbol", Lu = (i) => st(i) === "Date", Ne = Array.isArray, Ge = (i) => st(i) === "Object", Ir = (i) => st(i) === "Function", Ru = (i) => st(i) === "Promise", st = (i) => Object.prototype.toString.call(i).slice(8, -1), Bu = (i) => new Promise((e) => setTimeout(() => e(), i)), Rs = (i) => new TextDecoder().decode(new Uint8Array(i)), Ke = () => lo + Math.random().toString(36).substring(7).split("").join("_"), ci = (i) => {
|
|
389
389
|
const { href: e } = new URL(i, location.origin);
|
|
390
390
|
if (e.includes(".")) {
|
|
391
391
|
const t = e.split(".").pop();
|
|
@@ -431,9 +431,9 @@ const vn = (i, e) => Ne(i) ? i.map(e) : e(i), Ki = /* @__PURE__ */ Object.freeze
|
|
|
431
431
|
disposeMaterials: go,
|
|
432
432
|
error: ni,
|
|
433
433
|
euler2Deg: uu,
|
|
434
|
-
exportGltf:
|
|
434
|
+
exportGltf: Pu,
|
|
435
435
|
fetchFile: ai,
|
|
436
|
-
getAsciiString:
|
|
436
|
+
getAsciiString: Rs,
|
|
437
437
|
getBoundingBox: yn,
|
|
438
438
|
getExtension: ci,
|
|
439
439
|
getSpaceAttributeFromObject: si,
|
|
@@ -454,7 +454,7 @@ const vn = (i, e) => Ne(i) ? i.map(e) : e(i), Ki = /* @__PURE__ */ Object.freeze
|
|
|
454
454
|
isObjectBehindCamera: wu,
|
|
455
455
|
isObjectOccludeVisible: xo,
|
|
456
456
|
isObjectVisible: ir,
|
|
457
|
-
isPromise:
|
|
457
|
+
isPromise: Ru,
|
|
458
458
|
isString: Ut,
|
|
459
459
|
isSymbol: Ou,
|
|
460
460
|
isUndefined: Eu,
|
|
@@ -468,7 +468,7 @@ const vn = (i, e) => Ne(i) ? i.map(e) : e(i), Ki = /* @__PURE__ */ Object.freeze
|
|
|
468
468
|
rotationAFix: hu,
|
|
469
469
|
rotationAxisFix: yr,
|
|
470
470
|
runWithCode: Mu,
|
|
471
|
-
sleep:
|
|
471
|
+
sleep: Bu,
|
|
472
472
|
swapBytes: vr,
|
|
473
473
|
syncSpaceAttributeToObject: co,
|
|
474
474
|
textureLoader: Jt,
|
|
@@ -638,7 +638,7 @@ function To(i) {
|
|
|
638
638
|
function Nu(i) {
|
|
639
639
|
return i && typeof i[Symbol.iterator] == "function";
|
|
640
640
|
}
|
|
641
|
-
var
|
|
641
|
+
var Bs = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2] = "z", i))(Bs || {});
|
|
642
642
|
((i) => {
|
|
643
643
|
function e(r) {
|
|
644
644
|
return i[r];
|
|
@@ -653,7 +653,7 @@ var Rs = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2]
|
|
|
653
653
|
return [s, a];
|
|
654
654
|
}
|
|
655
655
|
i.getCrossAxiss = n;
|
|
656
|
-
})(
|
|
656
|
+
})(Bs || (Bs = {}));
|
|
657
657
|
var Fs = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2] = "z", i[i.w = 3] = "w", i))(Fs || {});
|
|
658
658
|
((i) => {
|
|
659
659
|
function e(r) {
|
|
@@ -672,7 +672,7 @@ var Fs = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2]
|
|
|
672
672
|
})(Fs || (Fs = {}));
|
|
673
673
|
var Uu = Object.defineProperty, ju = (i, e, t) => e in i ? Uu(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Wn = (i, e, t) => (ju(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
674
674
|
function Gu(i) {
|
|
675
|
-
return i.w != null ? new
|
|
675
|
+
return i.w != null ? new Rr().copy(i) : i.z != null ? new D().copy(i) : new oe().copy(i);
|
|
676
676
|
}
|
|
677
677
|
function dn(i, e, t) {
|
|
678
678
|
t = t ?? 0;
|
|
@@ -882,7 +882,7 @@ function ui(i) {
|
|
|
882
882
|
return e.arcLengthDivisions < n && (e.arcLengthDivisions = n, e.updateArcLengths(), t = e.getLength()), { length: t, division: n };
|
|
883
883
|
}
|
|
884
884
|
var di = /* @__PURE__ */ ((i) => (i.back = "back", i.front = "front", i))(di || {});
|
|
885
|
-
function
|
|
885
|
+
function Po(i) {
|
|
886
886
|
const { curve: e, distance: t, fromU: n = 0, side: r, tolerance: s = t * 0.1 } = i, a = i.length ?? e.getLength(), o = e.getPointAt(n);
|
|
887
887
|
let l = t / a;
|
|
888
888
|
const c = r === "front" ? -1 : 1;
|
|
@@ -929,11 +929,11 @@ function Xu(i, e) {
|
|
|
929
929
|
clampTs: []
|
|
930
930
|
};
|
|
931
931
|
return e.forEach((n, r) => {
|
|
932
|
-
const s = n.closestPointToPointParameter(i), a =
|
|
932
|
+
const s = n.closestPointToPointParameter(i), a = Re.clamp(s, 0, 1), o = n.at(a, new D()), l = i.distanceTo(o);
|
|
933
933
|
t.clampDists.push(l), t.clampPoints.push(o), t.distSortIndexs.push(r), t.ts.push(s), t.clampTs.push(a);
|
|
934
934
|
}), t.distSortIndexs.sort((n, r) => t.clampDists[n] - t.clampDists[r]), t;
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Co(i) {
|
|
937
937
|
const e = new Ac(), t = i[0].z == null ? Ec : Oc;
|
|
938
938
|
return i.reduce((n, r) => {
|
|
939
939
|
const s = new t(n, r);
|
|
@@ -942,7 +942,7 @@ function Po(i) {
|
|
|
942
942
|
}
|
|
943
943
|
new Xt();
|
|
944
944
|
var Qu = Object.defineProperty, Zu = (i, e, t) => e in i ? Qu(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, he = (i, e, t) => (Zu(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
945
|
-
const
|
|
945
|
+
const Pr = new D(), Do = new D(1, 1, 1);
|
|
946
946
|
new ue();
|
|
947
947
|
const nr = new J();
|
|
948
948
|
function Ao(i) {
|
|
@@ -1045,15 +1045,15 @@ function Lo(i) {
|
|
|
1045
1045
|
t = new Js(s), n = s[0];
|
|
1046
1046
|
}
|
|
1047
1047
|
e.add(n), e.updateWorldMatrix(!1, !0), t.calculateInverses(), n.removeFromParent();
|
|
1048
|
-
const r =
|
|
1048
|
+
const r = Ro({ ...i, target: e, skeleton: t });
|
|
1049
1049
|
return r.add(n), { model: r, skeleton: t, rootBone: n };
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Ro(i) {
|
|
1052
1052
|
const { target: e, skeleton: t, parent: n, posOnBone: r } = i, s = e.isMesh, a = s ? Oo({ ...i, skeleton: t }) : e.clone(!1);
|
|
1053
1053
|
n && n.add(a), a.updateMatrixWorld(!0), s && (a.bind(t, e.matrixWorld), r && (a.frustumCulled = !1));
|
|
1054
1054
|
const o = e.children;
|
|
1055
1055
|
for (const l of o)
|
|
1056
|
-
|
|
1056
|
+
Ro({ ...i, target: l, parent: a });
|
|
1057
1057
|
return a;
|
|
1058
1058
|
}
|
|
1059
1059
|
function mg(i) {
|
|
@@ -1075,11 +1075,11 @@ function nd(i) {
|
|
|
1075
1075
|
return i.curve ? rd(i) : sd(i);
|
|
1076
1076
|
}
|
|
1077
1077
|
function rd(i) {
|
|
1078
|
-
const { keyframeTracks: e, duration: t, ...n } =
|
|
1078
|
+
const { keyframeTracks: e, duration: t, ...n } = Bo(i), r = new yt(i.name, t, e);
|
|
1079
1079
|
return { ...n, clip: r };
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
const { curve: e, lookDistance: t } = i, n = i.targetPath ?? "", r = ui(i).division, s = Gr(i, e.getLength()), a =
|
|
1081
|
+
function Bo(i) {
|
|
1082
|
+
const { curve: e, lookDistance: t } = i, n = i.targetPath ?? "", r = ui(i).division, s = Gr(i, e.getLength()), a = Br, o = [], l = gi(r), c = { ...i, duration: s, division: r, ts: l, lookPoint: { distance: t } }, u = yi(c), { points: h, rotates: f, ...d } = mi(c);
|
|
1083
1083
|
if (h.length) {
|
|
1084
1084
|
const p = [];
|
|
1085
1085
|
h.forEach((y, b) => {
|
|
@@ -1115,28 +1115,28 @@ function mi(i) {
|
|
|
1115
1115
|
const { curve: n, target: r, lookPoint: s, enableUp: a, fixUp: o } = i, l = i.position ?? !0, c = i.rotate ?? !0, u = [], h = [], f = [];
|
|
1116
1116
|
if (!(l || c))
|
|
1117
1117
|
return { rotates: u, points: h, curveLength: void 0, lengths: void 0 };
|
|
1118
|
-
const d = (i.anchor ??
|
|
1118
|
+
const d = (i.anchor ?? Pr).clone(), p = i.ts ?? i.us, m = !i.ts;
|
|
1119
1119
|
if (!p)
|
|
1120
1120
|
throw "缺少参数:至少传递 ts 和 us 任意之一";
|
|
1121
1121
|
let y = nr.clone(), b = nr.clone(), x = Do.clone(), v = Me.DEFAULT_UP;
|
|
1122
1122
|
r && (r.updateWorldMatrix(!0, !1), y = r.matrix, b = r.matrixWorld, x = r.scale, v = r.up);
|
|
1123
|
-
const
|
|
1124
|
-
A.transformDirection(
|
|
1125
|
-
const L = ((e = i.front) == null ? void 0 : e.clone().normalize()) ?? A, G = ((t = i.up) == null ? void 0 : t.clone().normalize()) ?? v.clone().transformDirection(
|
|
1123
|
+
const C = y.clone().invert(), P = b.clone().multiply(C).clone().invert(), A = n.getTangent(0);
|
|
1124
|
+
A.transformDirection(P);
|
|
1125
|
+
const L = ((e = i.front) == null ? void 0 : e.clone().normalize()) ?? A, G = ((t = i.up) == null ? void 0 : t.clone().normalize()) ?? v.clone().transformDirection(P);
|
|
1126
1126
|
let H = y.clone().setPosition(0, 0, 0), q = (z) => n.getPoint(z), te = (z) => n.getTangent(z);
|
|
1127
1127
|
m && (q = (z) => n.getPointAt(z), te = (z) => n.getTangentAt(z));
|
|
1128
1128
|
const F = p.length, E = F - 1;
|
|
1129
|
-
let { distance:
|
|
1130
|
-
|
|
1129
|
+
let { distance: R, curveLength: Z, lengths: V } = s ?? {};
|
|
1130
|
+
R = R ?? 0;
|
|
1131
1131
|
let O = te;
|
|
1132
|
-
|
|
1132
|
+
R !== 0 && (V || (V = Hu(n, p, m).lengths), Z == null && (Z = V[E]), O = (z, $) => {
|
|
1133
1133
|
const j = q(z);
|
|
1134
|
-
let X = (V[$] +
|
|
1134
|
+
let X = (V[$] + R) / Z;
|
|
1135
1135
|
return X > 1 && (X = 1), n.getPointAt(X).sub(j).normalize();
|
|
1136
1136
|
});
|
|
1137
1137
|
let Y = (z) => {
|
|
1138
1138
|
const $ = p[z], j = O($, z);
|
|
1139
|
-
j.transformDirection(
|
|
1139
|
+
j.transformDirection(P), f.push(j);
|
|
1140
1140
|
const X = z - 1, K = X < 0, Q = K ? L : f[X], ne = new ue().setFromUnitVectors(Q, j);
|
|
1141
1141
|
if (!K) {
|
|
1142
1142
|
const de = u[X];
|
|
@@ -1148,7 +1148,7 @@ function mi(i) {
|
|
|
1148
1148
|
const z = new D(0, 1, 0);
|
|
1149
1149
|
Y = o ? function($) {
|
|
1150
1150
|
const j = p[$], X = O(j, $);
|
|
1151
|
-
X.transformDirection(
|
|
1151
|
+
X.transformDirection(P), f.push(X);
|
|
1152
1152
|
const K = $ - 1, Q = K < 0;
|
|
1153
1153
|
let ne;
|
|
1154
1154
|
if (Q)
|
|
@@ -1161,7 +1161,7 @@ function mi(i) {
|
|
|
1161
1161
|
return ne.premultiply(ie), ne.normalize();
|
|
1162
1162
|
} : function($) {
|
|
1163
1163
|
const j = p[$], X = O(j, $);
|
|
1164
|
-
X.transformDirection(
|
|
1164
|
+
X.transformDirection(P), f.push(X);
|
|
1165
1165
|
const K = $ - 1, Q = K < 0, ne = Q ? L : f[K], de = new ue().setFromUnitVectors(ne, X);
|
|
1166
1166
|
if (Q) {
|
|
1167
1167
|
const ie = G.clone().applyQuaternion(de);
|
|
@@ -1179,11 +1179,11 @@ function mi(i) {
|
|
|
1179
1179
|
const $ = p[z];
|
|
1180
1180
|
if (c) {
|
|
1181
1181
|
const j = Y(z);
|
|
1182
|
-
u.push(j), H = new J().compose(
|
|
1182
|
+
u.push(j), H = new J().compose(Pr, j, x);
|
|
1183
1183
|
}
|
|
1184
1184
|
if (l) {
|
|
1185
1185
|
const j = q($);
|
|
1186
|
-
j.applyMatrix4(
|
|
1186
|
+
j.applyMatrix4(P);
|
|
1187
1187
|
const X = d.clone().applyMatrix4(H);
|
|
1188
1188
|
j.sub(X), h.push(j);
|
|
1189
1189
|
}
|
|
@@ -1205,8 +1205,8 @@ function sd(i) {
|
|
|
1205
1205
|
if (e === !1)
|
|
1206
1206
|
var { keyframeTracks: n, duration: r, ...s } = id(i);
|
|
1207
1207
|
else {
|
|
1208
|
-
const o =
|
|
1209
|
-
var { keyframeTracks: n, duration: r, ...s } =
|
|
1208
|
+
const o = Co(t);
|
|
1209
|
+
var { keyframeTracks: n, duration: r, ...s } = Bo({ ...i, curve: o });
|
|
1210
1210
|
}
|
|
1211
1211
|
const a = new yt(i.name, r, n);
|
|
1212
1212
|
return { ...s, clip: a };
|
|
@@ -1218,7 +1218,7 @@ function id(i) {
|
|
|
1218
1218
|
c.forEach((m, y) => {
|
|
1219
1219
|
m.toArray(d, y * 3);
|
|
1220
1220
|
});
|
|
1221
|
-
const p = new Dt(`${e}.position`, u, d,
|
|
1221
|
+
const p = new Dt(`${e}.position`, u, d, Br);
|
|
1222
1222
|
o.push(p);
|
|
1223
1223
|
}
|
|
1224
1224
|
if (h.length) {
|
|
@@ -1226,7 +1226,7 @@ function id(i) {
|
|
|
1226
1226
|
h.forEach((m, y) => {
|
|
1227
1227
|
m.toArray(d, y * 4);
|
|
1228
1228
|
});
|
|
1229
|
-
const p = new At(`${e}.quaternion`, f, d,
|
|
1229
|
+
const p = new At(`${e}.quaternion`, f, d, Rc);
|
|
1230
1230
|
o.push(p);
|
|
1231
1231
|
}
|
|
1232
1232
|
return { keyframeTracks: o, duration: a, lengths: s, curveLength: r };
|
|
@@ -1238,13 +1238,13 @@ function ad(i, e) {
|
|
|
1238
1238
|
const d = [], p = a, m = [], y = [], b = [], x = { rotates: d, points: m, rotateTimes: p, pointTimes: y };
|
|
1239
1239
|
if (!(c || u))
|
|
1240
1240
|
return x;
|
|
1241
|
-
const v = (i.anchor ??
|
|
1242
|
-
let
|
|
1243
|
-
s && (s.updateWorldMatrix(!0, !1),
|
|
1244
|
-
const G =
|
|
1241
|
+
const v = (i.anchor ?? Pr).clone();
|
|
1242
|
+
let C = nr.clone(), P = nr.clone(), A = Do.clone(), L = Me.DEFAULT_UP;
|
|
1243
|
+
s && (s.updateWorldMatrix(!0, !1), C = s.matrix, P = s.matrixWorld, A = s.scale, L = s.up);
|
|
1244
|
+
const G = C.clone().invert(), H = P.clone().multiply(G).clone().invert(), q = e[0].delta(new D());
|
|
1245
1245
|
q.transformDirection(H);
|
|
1246
1246
|
const te = ((t = i.front) == null ? void 0 : t.clone().normalize()) ?? q, F = ((n = i.up) == null ? void 0 : n.clone().normalize()) ?? L.clone().transformDirection(H);
|
|
1247
|
-
let E =
|
|
1247
|
+
let E = C.clone().setPosition(0, 0, 0), R = E, Z = (V) => {
|
|
1248
1248
|
const O = e[V].delta(new D()).normalize();
|
|
1249
1249
|
O.transformDirection(H), b.push(O);
|
|
1250
1250
|
const Y = V - 1, z = Y < 0, $ = z ? te : b[Y], j = new ue().setFromUnitVectors($, O);
|
|
@@ -1289,19 +1289,19 @@ function ad(i, e) {
|
|
|
1289
1289
|
if (u)
|
|
1290
1290
|
if (V < f) {
|
|
1291
1291
|
const O = Z(V);
|
|
1292
|
-
d.push(O), E = new J().compose(
|
|
1292
|
+
d.push(O), E = new J().compose(Pr, O, A);
|
|
1293
1293
|
} else
|
|
1294
1294
|
d.push(d[V - 1].clone());
|
|
1295
1295
|
if (c) {
|
|
1296
1296
|
const O = a[V], Y = r[V].clone();
|
|
1297
1297
|
if (Y.applyMatrix4(H), V > 0) {
|
|
1298
|
-
const $ = v.clone().applyMatrix4(
|
|
1298
|
+
const $ = v.clone().applyMatrix4(R), j = Y.clone().sub($);
|
|
1299
1299
|
m.push(j), y.push(O);
|
|
1300
1300
|
}
|
|
1301
1301
|
const z = v.clone().applyMatrix4(E);
|
|
1302
1302
|
Y.sub(z), m.push(Y), y.push(O);
|
|
1303
1303
|
}
|
|
1304
|
-
|
|
1304
|
+
R = E;
|
|
1305
1305
|
}
|
|
1306
1306
|
return x;
|
|
1307
1307
|
}
|
|
@@ -1316,17 +1316,17 @@ function Fo(i) {
|
|
|
1316
1316
|
return { ...n, clip: s };
|
|
1317
1317
|
}
|
|
1318
1318
|
function ld(i) {
|
|
1319
|
-
const { skeleton: e, targetPath: t } = i, n = e.bones, { times: r, boneSampleDatas: s, duration: a, ...o } = cd(i), l = r.length, c =
|
|
1319
|
+
const { skeleton: e, targetPath: t } = i, n = e.bones, { times: r, boneSampleDatas: s, duration: a, ...o } = cd(i), l = r.length, c = Br, u = s.map((h, f) => {
|
|
1320
1320
|
const { points: d, rotates: p } = h, m = n[f], y = t ? `${t}.skeleton.bones[${f}]` : `${m.name || m.uuid}`, b = [], x = [];
|
|
1321
|
-
for (let
|
|
1322
|
-
d && d[
|
|
1321
|
+
for (let P = 0; P < l; P++)
|
|
1322
|
+
d && d[P].toArray(b, P * 3), p[P].toArray(x, P * 4);
|
|
1323
1323
|
const v = [];
|
|
1324
1324
|
if (d) {
|
|
1325
|
-
const
|
|
1326
|
-
v.push(
|
|
1325
|
+
const P = new Dt(`${y}.position`, r, b, c);
|
|
1326
|
+
v.push(P);
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
1329
|
-
return v.push(
|
|
1328
|
+
const C = new At(`${y}.quaternion`, r, x, c);
|
|
1329
|
+
return v.push(C), v;
|
|
1330
1330
|
});
|
|
1331
1331
|
return { ...o, boneTracks: u, duration: a };
|
|
1332
1332
|
}
|
|
@@ -1346,7 +1346,7 @@ function cd(i) {
|
|
|
1346
1346
|
}, d);
|
|
1347
1347
|
const y = m[0], b = new D(), x = new ue(), v = new D();
|
|
1348
1348
|
y.decompose(b, x, v);
|
|
1349
|
-
const
|
|
1349
|
+
const C = Gr(i, h), P = gi(u), A = yi({ curve: t, division: u, duration: C }), L = P.length, G = [], H = new D().setFromMatrixPosition(m[1]).negate(), q = a[0], te = (e = i.up) == null ? void 0 : e.clone().applyMatrix4(f).transformDirection(q), { points: F, rotates: E, ...R } = mi({ ...i, curve: t, ts: P, target: o, rotate: !0, front: H, up: te, anchor: null });
|
|
1350
1350
|
for (let j = 0; j < L; j++)
|
|
1351
1351
|
G.push(f.clone());
|
|
1352
1352
|
const Z = F.map((j, X) => {
|
|
@@ -1361,7 +1361,7 @@ function cd(i) {
|
|
|
1361
1361
|
point: Q < 0 ? null : t.getPointAt(Q)
|
|
1362
1362
|
};
|
|
1363
1363
|
} : function(j, X, K) {
|
|
1364
|
-
const Q = O[j].us[X], { u: ne, point: de, succeed: ie } =
|
|
1364
|
+
const Q = O[j].us[X], { u: ne, point: de, succeed: ie } = Po({
|
|
1365
1365
|
curve: t,
|
|
1366
1366
|
distance: K,
|
|
1367
1367
|
fromU: Q,
|
|
@@ -1395,36 +1395,36 @@ function cd(i) {
|
|
|
1395
1395
|
Ye.premultiply(Ot).normalize(), at.compose(ot, Ye, We), at.premultiply(Vt);
|
|
1396
1396
|
const Lt = at.clone().invert();
|
|
1397
1397
|
Oe.applyMatrix4(Lt);
|
|
1398
|
-
const
|
|
1399
|
-
Oe.copy(_e).multiplyScalar(
|
|
1398
|
+
const Rt = Oe.length();
|
|
1399
|
+
Oe.copy(_e).multiplyScalar(Rt / en), X.push(Oe);
|
|
1400
1400
|
const bt = new J().compose(Oe, $e, et);
|
|
1401
1401
|
if (j === $) {
|
|
1402
1402
|
const St = t.getTangentAt(it);
|
|
1403
1403
|
St.negate().transformDirection(Lt);
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1404
|
+
const Bt = new ue().setFromUnitVectors(Oe.clone().normalize(), St);
|
|
1405
|
+
Bt.premultiply($e).normalize(), K[Ee] = Bt, bt.compose(Oe, Bt, et);
|
|
1406
1406
|
}
|
|
1407
1407
|
bt.premultiply(at), ne.push(bt);
|
|
1408
1408
|
}
|
|
1409
1409
|
}
|
|
1410
|
-
return { ...
|
|
1410
|
+
return { ...R, times: A, boneSampleDatas: O, duration: C };
|
|
1411
1411
|
}
|
|
1412
1412
|
function hd(i) {
|
|
1413
1413
|
const { boneTracks: e, targetTracks: t, duration: n, ...r } = ud(i), s = t.concat(e.flat()), a = new yt(i.name, n, s);
|
|
1414
1414
|
return { ...r, clip: a };
|
|
1415
1415
|
}
|
|
1416
1416
|
function ud(i) {
|
|
1417
|
-
const { skeleton: e, targetPath: t } = i, { times: n, boneSampleDatas: r, duration: s, targetSampleDatas: a, ...o } = dd(i), l = n.length, c = e.bones, u =
|
|
1418
|
-
for (let
|
|
1419
|
-
d[
|
|
1420
|
-
const m = t ?? "", y = new Dt(`${m}.position`, n, h, u), b = new At(`${m}.quaternion`, n, f, u), x = [y, b], v = r.map((
|
|
1421
|
-
const { points: A, rotates: L } =
|
|
1422
|
-
for (let
|
|
1423
|
-
A && A[
|
|
1417
|
+
const { skeleton: e, targetPath: t } = i, { times: n, boneSampleDatas: r, duration: s, targetSampleDatas: a, ...o } = dd(i), l = n.length, c = e.bones, u = Br, h = [], f = [], { points: d, rotates: p } = a;
|
|
1418
|
+
for (let C = 0; C < l; C++)
|
|
1419
|
+
d[C].toArray(h, C * 3), p[C].toArray(f, C * 4);
|
|
1420
|
+
const m = t ?? "", y = new Dt(`${m}.position`, n, h, u), b = new At(`${m}.quaternion`, n, f, u), x = [y, b], v = r.map((C, P) => {
|
|
1421
|
+
const { points: A, rotates: L } = C, G = c[P], H = t ? `${t}.skeleton.bones[${P}]` : `${G.name || G.uuid}`, q = [], te = [];
|
|
1422
|
+
for (let R = 0; R < l; R++)
|
|
1423
|
+
A && A[R].toArray(q, R * 3), L[R].toArray(te, R * 4);
|
|
1424
1424
|
const F = [];
|
|
1425
1425
|
if (A) {
|
|
1426
|
-
const
|
|
1427
|
-
F.push(
|
|
1426
|
+
const R = new Dt(`${H}.position`, n, q, u);
|
|
1427
|
+
F.push(R);
|
|
1428
1428
|
}
|
|
1429
1429
|
const E = new At(`${H}.quaternion`, n, te, u);
|
|
1430
1430
|
return F.push(E), F;
|
|
@@ -1444,19 +1444,19 @@ function dd(i) {
|
|
|
1444
1444
|
const ie = Q.clone().multiply(de);
|
|
1445
1445
|
return b.push(ie), ne;
|
|
1446
1446
|
}, m);
|
|
1447
|
-
const x = b[0], v = new D(),
|
|
1448
|
-
x.decompose(v,
|
|
1449
|
-
const A = Gr(i, u), L = gi(c), G = y[0], H = new D().setFromMatrixPosition(b[1]).negate().transformDirection(G).transformDirection(m), { rotates: q, points: te, ...F } = mi({ ...i, curve: e, target: o, position: !0, rotate: !0, anchor: v, front: H, ts: L }), E = yi({ curve: e, division: c, duration: A }),
|
|
1447
|
+
const x = b[0], v = new D(), C = new ue(), P = new D();
|
|
1448
|
+
x.decompose(v, C, P);
|
|
1449
|
+
const A = Gr(i, u), L = gi(c), G = y[0], H = new D().setFromMatrixPosition(b[1]).negate().transformDirection(G).transformDirection(m), { rotates: q, points: te, ...F } = mi({ ...i, curve: e, target: o, position: !0, rotate: !0, anchor: v, front: H, ts: L }), E = yi({ curve: e, division: c, duration: A }), R = te.map((Q, ne) => {
|
|
1450
1450
|
const de = q[ne], ie = new J().compose(Q, de, d);
|
|
1451
1451
|
return ie.premultiply(p), ie;
|
|
1452
|
-
}), Z = { points: te, rotates: q, matrixs:
|
|
1452
|
+
}), Z = { points: te, rotates: q, matrixs: R }, V = [], O = R.map((Q) => (V.push(C.clone()), Q.clone().multiply(x))), Y = L.length, z = e.getLengths(c).map((Q) => Q / u), $ = [{ rotates: V, us: z, matrixs: O }], j = n ? function(Q, ne, de) {
|
|
1453
1453
|
const ie = $[Q].us[ne] - de / u;
|
|
1454
1454
|
return {
|
|
1455
1455
|
u: ie,
|
|
1456
1456
|
point: ie < 0 ? null : e.getPointAt(ie)
|
|
1457
1457
|
};
|
|
1458
1458
|
} : function(Q, ne, de) {
|
|
1459
|
-
const ie = $[Q].us[ne], { u: re, point: Te, succeed: jt } =
|
|
1459
|
+
const ie = $[Q].us[ne], { u: re, point: Te, succeed: jt } = Po({
|
|
1460
1460
|
curve: e,
|
|
1461
1461
|
distance: de,
|
|
1462
1462
|
fromU: ie,
|
|
@@ -1471,7 +1471,7 @@ function dd(i) {
|
|
|
1471
1471
|
$.push({ points: ne, rotates: de, us: ie, matrixs: re });
|
|
1472
1472
|
const Te = b[Q], jt = y[Q], wt = Q - 1, Sn = $[wt], Mn = b[wt], Tn = y[wt], { matrixs: We, points: Gt, rotates: $t } = Sn, _e = new D(), $e = new ue(), et = new D();
|
|
1473
1473
|
Mn.decompose(_e, $e, et);
|
|
1474
|
-
const Et = wt - 1, en = Et < 0 ?
|
|
1474
|
+
const Et = wt - 1, en = Et < 0 ? R : $[Et].matrixs, Ee = new D(), Oe = new ue(), it = new D();
|
|
1475
1475
|
Te.decompose(Ee, Oe, it);
|
|
1476
1476
|
const at = new D().setFromMatrixPosition(jt).sub(new D().setFromMatrixPosition(Tn)).length(), Vt = Ee.length();
|
|
1477
1477
|
for (let He = 0; He < Y; He++) {
|
|
@@ -1488,16 +1488,16 @@ function dd(i) {
|
|
|
1488
1488
|
let tn = Wt.clone().invert();
|
|
1489
1489
|
const Ot = ke.clone().applyMatrix4(tn), Lt = Gt?.[He] ?? _e;
|
|
1490
1490
|
Ot.sub(Lt).normalize();
|
|
1491
|
-
const
|
|
1492
|
-
|
|
1493
|
-
const
|
|
1494
|
-
ke.applyMatrix4(
|
|
1491
|
+
const Rt = $t[He], bt = new J().compose(Lt, Rt, et), St = Ee.clone().transformDirection(bt);
|
|
1492
|
+
Rt.setFromUnitVectors(St, Ot), Rt.premultiply($e).normalize(), Ye.compose(Lt, Rt, et), Ye.premultiply(Wt);
|
|
1493
|
+
const Bt = Ye.clone().invert();
|
|
1494
|
+
ke.applyMatrix4(Bt);
|
|
1495
1495
|
const lt = ke.length();
|
|
1496
1496
|
ke.copy(Ee).multiplyScalar(lt / Vt), ne.push(ke);
|
|
1497
1497
|
const In = new J().compose(ke, Oe, it);
|
|
1498
1498
|
if (Q === K) {
|
|
1499
1499
|
const nn = e.getTangentAt(ot);
|
|
1500
|
-
nn.negate().transformDirection(
|
|
1500
|
+
nn.negate().transformDirection(Bt);
|
|
1501
1501
|
const rn = new ue().setFromUnitVectors(ke.clone().normalize(), nn);
|
|
1502
1502
|
rn.premultiply(Oe).normalize(), de[He] = rn, In.compose(ke, rn, it);
|
|
1503
1503
|
}
|
|
@@ -1826,7 +1826,7 @@ class md extends pd {
|
|
|
1826
1826
|
return this._points;
|
|
1827
1827
|
}
|
|
1828
1828
|
set points(e) {
|
|
1829
|
-
e.length > 1 ? (this._points = e, this.polyline =
|
|
1829
|
+
e.length > 1 ? (this._points = e, this.polyline = Co(e)) : (this._points = [], this.polyline = null);
|
|
1830
1830
|
}
|
|
1831
1831
|
/**
|
|
1832
1832
|
* 折线
|
|
@@ -2144,7 +2144,7 @@ const wd = {
|
|
|
2144
2144
|
number: Ja,
|
|
2145
2145
|
color: Fc,
|
|
2146
2146
|
quaternion: At,
|
|
2147
|
-
string:
|
|
2147
|
+
string: Bc,
|
|
2148
2148
|
vector: Dt
|
|
2149
2149
|
}, bd = {
|
|
2150
2150
|
blendMode: Nc,
|
|
@@ -2749,80 +2749,80 @@ function Id() {
|
|
|
2749
2749
|
}
|
|
2750
2750
|
var o = {}, l = ["REJECTED"], c = ["FULFILLED"], u = ["PENDING"];
|
|
2751
2751
|
n.exports = h;
|
|
2752
|
-
function h(
|
|
2753
|
-
if (typeof
|
|
2752
|
+
function h(P) {
|
|
2753
|
+
if (typeof P != "function")
|
|
2754
2754
|
throw new TypeError("resolver must be a function");
|
|
2755
|
-
this.state = u, this.queue = [], this.outcome = void 0,
|
|
2755
|
+
this.state = u, this.queue = [], this.outcome = void 0, P !== a && m(this, P);
|
|
2756
2756
|
}
|
|
2757
|
-
h.prototype.catch = function(
|
|
2758
|
-
return this.then(null,
|
|
2759
|
-
}, h.prototype.then = function(
|
|
2760
|
-
if (typeof
|
|
2757
|
+
h.prototype.catch = function(P) {
|
|
2758
|
+
return this.then(null, P);
|
|
2759
|
+
}, h.prototype.then = function(P, A) {
|
|
2760
|
+
if (typeof P != "function" && this.state === c || typeof A != "function" && this.state === l)
|
|
2761
2761
|
return this;
|
|
2762
2762
|
var L = new this.constructor(a);
|
|
2763
2763
|
if (this.state !== u) {
|
|
2764
|
-
var G = this.state === c ?
|
|
2764
|
+
var G = this.state === c ? P : A;
|
|
2765
2765
|
d(L, G, this.outcome);
|
|
2766
2766
|
} else
|
|
2767
|
-
this.queue.push(new f(L,
|
|
2767
|
+
this.queue.push(new f(L, P, A));
|
|
2768
2768
|
return L;
|
|
2769
2769
|
};
|
|
2770
|
-
function f(
|
|
2771
|
-
this.promise =
|
|
2770
|
+
function f(P, A, L) {
|
|
2771
|
+
this.promise = P, typeof A == "function" && (this.onFulfilled = A, this.callFulfilled = this.otherCallFulfilled), typeof L == "function" && (this.onRejected = L, this.callRejected = this.otherCallRejected);
|
|
2772
2772
|
}
|
|
2773
|
-
f.prototype.callFulfilled = function(
|
|
2774
|
-
o.resolve(this.promise,
|
|
2775
|
-
}, f.prototype.otherCallFulfilled = function(
|
|
2776
|
-
d(this.promise, this.onFulfilled,
|
|
2777
|
-
}, f.prototype.callRejected = function(
|
|
2778
|
-
o.reject(this.promise,
|
|
2779
|
-
}, f.prototype.otherCallRejected = function(
|
|
2780
|
-
d(this.promise, this.onRejected,
|
|
2773
|
+
f.prototype.callFulfilled = function(P) {
|
|
2774
|
+
o.resolve(this.promise, P);
|
|
2775
|
+
}, f.prototype.otherCallFulfilled = function(P) {
|
|
2776
|
+
d(this.promise, this.onFulfilled, P);
|
|
2777
|
+
}, f.prototype.callRejected = function(P) {
|
|
2778
|
+
o.reject(this.promise, P);
|
|
2779
|
+
}, f.prototype.otherCallRejected = function(P) {
|
|
2780
|
+
d(this.promise, this.onRejected, P);
|
|
2781
2781
|
};
|
|
2782
|
-
function d(
|
|
2782
|
+
function d(P, A, L) {
|
|
2783
2783
|
s(function() {
|
|
2784
2784
|
var G;
|
|
2785
2785
|
try {
|
|
2786
2786
|
G = A(L);
|
|
2787
2787
|
} catch (H) {
|
|
2788
|
-
return o.reject(
|
|
2788
|
+
return o.reject(P, H);
|
|
2789
2789
|
}
|
|
2790
|
-
G ===
|
|
2790
|
+
G === P ? o.reject(P, new TypeError("Cannot resolve promise with itself")) : o.resolve(P, G);
|
|
2791
2791
|
});
|
|
2792
2792
|
}
|
|
2793
|
-
o.resolve = function(
|
|
2793
|
+
o.resolve = function(P, A) {
|
|
2794
2794
|
var L = y(p, A);
|
|
2795
2795
|
if (L.status === "error")
|
|
2796
|
-
return o.reject(
|
|
2796
|
+
return o.reject(P, L.value);
|
|
2797
2797
|
var G = L.value;
|
|
2798
2798
|
if (G)
|
|
2799
|
-
m(
|
|
2799
|
+
m(P, G);
|
|
2800
2800
|
else {
|
|
2801
|
-
|
|
2802
|
-
for (var H = -1, q =
|
|
2803
|
-
|
|
2801
|
+
P.state = c, P.outcome = A;
|
|
2802
|
+
for (var H = -1, q = P.queue.length; ++H < q; )
|
|
2803
|
+
P.queue[H].callFulfilled(A);
|
|
2804
2804
|
}
|
|
2805
|
-
return
|
|
2806
|
-
}, o.reject = function(
|
|
2807
|
-
|
|
2808
|
-
for (var L = -1, G =
|
|
2809
|
-
|
|
2810
|
-
return
|
|
2805
|
+
return P;
|
|
2806
|
+
}, o.reject = function(P, A) {
|
|
2807
|
+
P.state = l, P.outcome = A;
|
|
2808
|
+
for (var L = -1, G = P.queue.length; ++L < G; )
|
|
2809
|
+
P.queue[L].callRejected(A);
|
|
2810
|
+
return P;
|
|
2811
2811
|
};
|
|
2812
|
-
function p(
|
|
2813
|
-
var A =
|
|
2814
|
-
if (
|
|
2812
|
+
function p(P) {
|
|
2813
|
+
var A = P && P.then;
|
|
2814
|
+
if (P && (typeof P == "object" || typeof P == "function") && typeof A == "function")
|
|
2815
2815
|
return function() {
|
|
2816
|
-
A.apply(
|
|
2816
|
+
A.apply(P, arguments);
|
|
2817
2817
|
};
|
|
2818
2818
|
}
|
|
2819
|
-
function m(
|
|
2819
|
+
function m(P, A) {
|
|
2820
2820
|
var L = !1;
|
|
2821
2821
|
function G(F) {
|
|
2822
|
-
L || (L = !0, o.reject(
|
|
2822
|
+
L || (L = !0, o.reject(P, F));
|
|
2823
2823
|
}
|
|
2824
2824
|
function H(F) {
|
|
2825
|
-
L || (L = !0, o.resolve(
|
|
2825
|
+
L || (L = !0, o.resolve(P, F));
|
|
2826
2826
|
}
|
|
2827
2827
|
function q() {
|
|
2828
2828
|
A(H, G);
|
|
@@ -2830,37 +2830,37 @@ function Id() {
|
|
|
2830
2830
|
var te = y(q);
|
|
2831
2831
|
te.status === "error" && G(te.value);
|
|
2832
2832
|
}
|
|
2833
|
-
function y(
|
|
2833
|
+
function y(P, A) {
|
|
2834
2834
|
var L = {};
|
|
2835
2835
|
try {
|
|
2836
|
-
L.value =
|
|
2836
|
+
L.value = P(A), L.status = "success";
|
|
2837
2837
|
} catch (G) {
|
|
2838
2838
|
L.status = "error", L.value = G;
|
|
2839
2839
|
}
|
|
2840
2840
|
return L;
|
|
2841
2841
|
}
|
|
2842
2842
|
h.resolve = b;
|
|
2843
|
-
function b(
|
|
2844
|
-
return
|
|
2843
|
+
function b(P) {
|
|
2844
|
+
return P instanceof this ? P : o.resolve(new this(a), P);
|
|
2845
2845
|
}
|
|
2846
2846
|
h.reject = x;
|
|
2847
|
-
function x(
|
|
2847
|
+
function x(P) {
|
|
2848
2848
|
var A = new this(a);
|
|
2849
|
-
return o.reject(A,
|
|
2849
|
+
return o.reject(A, P);
|
|
2850
2850
|
}
|
|
2851
2851
|
h.all = v;
|
|
2852
|
-
function v(
|
|
2852
|
+
function v(P) {
|
|
2853
2853
|
var A = this;
|
|
2854
|
-
if (Object.prototype.toString.call(
|
|
2854
|
+
if (Object.prototype.toString.call(P) !== "[object Array]")
|
|
2855
2855
|
return this.reject(new TypeError("must be an array"));
|
|
2856
|
-
var L =
|
|
2856
|
+
var L = P.length, G = !1;
|
|
2857
2857
|
if (!L)
|
|
2858
2858
|
return this.resolve([]);
|
|
2859
2859
|
for (var H = new Array(L), q = 0, te = -1, F = new this(a); ++te < L; )
|
|
2860
|
-
E(
|
|
2860
|
+
E(P[te], te);
|
|
2861
2861
|
return F;
|
|
2862
|
-
function E(
|
|
2863
|
-
A.resolve(
|
|
2862
|
+
function E(R, Z) {
|
|
2863
|
+
A.resolve(R).then(V, function(O) {
|
|
2864
2864
|
G || (G = !0, o.reject(F, O));
|
|
2865
2865
|
});
|
|
2866
2866
|
function V(O) {
|
|
@@ -2868,16 +2868,16 @@ function Id() {
|
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
2870
|
}
|
|
2871
|
-
h.race =
|
|
2872
|
-
function P
|
|
2871
|
+
h.race = C;
|
|
2872
|
+
function C(P) {
|
|
2873
2873
|
var A = this;
|
|
2874
|
-
if (Object.prototype.toString.call(
|
|
2874
|
+
if (Object.prototype.toString.call(P) !== "[object Array]")
|
|
2875
2875
|
return this.reject(new TypeError("must be an array"));
|
|
2876
|
-
var L =
|
|
2876
|
+
var L = P.length, G = !1;
|
|
2877
2877
|
if (!L)
|
|
2878
2878
|
return this.resolve([]);
|
|
2879
2879
|
for (var H = -1, q = new this(a); ++H < L; )
|
|
2880
|
-
te(
|
|
2880
|
+
te(P[H]);
|
|
2881
2881
|
return q;
|
|
2882
2882
|
function te(F) {
|
|
2883
2883
|
A.resolve(F).then(function(E) {
|
|
@@ -2963,7 +2963,7 @@ function Id() {
|
|
|
2963
2963
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
2964
2964
|
return arguments[arguments.length - 1];
|
|
2965
2965
|
}
|
|
2966
|
-
var y = "local-forage-detect-blob-support", b = void 0, x = {}, v = Object.prototype.toString,
|
|
2966
|
+
var y = "local-forage-detect-blob-support", b = void 0, x = {}, v = Object.prototype.toString, C = "readonly", P = "readwrite";
|
|
2967
2967
|
function A(g) {
|
|
2968
2968
|
for (var S = g.length, w = new ArrayBuffer(S), T = new Uint8Array(w), I = 0; I < S; I++)
|
|
2969
2969
|
T[I] = g.charCodeAt(I);
|
|
@@ -2971,7 +2971,7 @@ function Id() {
|
|
|
2971
2971
|
}
|
|
2972
2972
|
function L(g) {
|
|
2973
2973
|
return new h(function(S) {
|
|
2974
|
-
var w = g.transaction(y,
|
|
2974
|
+
var w = g.transaction(y, P), T = u([""]);
|
|
2975
2975
|
w.objectStore(y).put(T, "key"), w.onabort = function(I) {
|
|
2976
2976
|
I.preventDefault(), I.stopPropagation(), S(!1);
|
|
2977
2977
|
}, w.oncomplete = function() {
|
|
@@ -3015,30 +3015,30 @@ function Id() {
|
|
|
3015
3015
|
var I = [g.name];
|
|
3016
3016
|
S && I.push(g.version);
|
|
3017
3017
|
var M = l.open.apply(l, I);
|
|
3018
|
-
S && (M.onupgradeneeded = function(
|
|
3018
|
+
S && (M.onupgradeneeded = function(B) {
|
|
3019
3019
|
var k = M.result;
|
|
3020
3020
|
try {
|
|
3021
|
-
k.createObjectStore(g.storeName),
|
|
3021
|
+
k.createObjectStore(g.storeName), B.oldVersion <= 1 && k.createObjectStore(y);
|
|
3022
3022
|
} catch (N) {
|
|
3023
3023
|
if (N.name === "ConstraintError")
|
|
3024
|
-
console.warn('The database "' + g.name + '" has been upgraded from version ' +
|
|
3024
|
+
console.warn('The database "' + g.name + '" has been upgraded from version ' + B.oldVersion + " to version " + B.newVersion + ', but the storage "' + g.storeName + '" already exists.');
|
|
3025
3025
|
else
|
|
3026
3026
|
throw N;
|
|
3027
3027
|
}
|
|
3028
|
-
}), M.onerror = function(
|
|
3029
|
-
|
|
3028
|
+
}), M.onerror = function(B) {
|
|
3029
|
+
B.preventDefault(), T(M.error);
|
|
3030
3030
|
}, M.onsuccess = function() {
|
|
3031
|
-
var
|
|
3032
|
-
|
|
3031
|
+
var B = M.result;
|
|
3032
|
+
B.onversionchange = function(k) {
|
|
3033
3033
|
k.target.close();
|
|
3034
|
-
}, w(
|
|
3034
|
+
}, w(B), q(g);
|
|
3035
3035
|
};
|
|
3036
3036
|
});
|
|
3037
3037
|
}
|
|
3038
3038
|
function E(g) {
|
|
3039
3039
|
return F(g, !1);
|
|
3040
3040
|
}
|
|
3041
|
-
function
|
|
3041
|
+
function R(g) {
|
|
3042
3042
|
return F(g, !0);
|
|
3043
3043
|
}
|
|
3044
3044
|
function Z(g, S) {
|
|
@@ -3089,11 +3089,11 @@ function Id() {
|
|
|
3089
3089
|
I._dbInfo.db && (I._dbInfo.db.close(), I._dbInfo.db = null);
|
|
3090
3090
|
}
|
|
3091
3091
|
return g.db = null, E(g).then(function(M) {
|
|
3092
|
-
return g.db = M, Z(g) ?
|
|
3092
|
+
return g.db = M, Z(g) ? R(g) : M;
|
|
3093
3093
|
}).then(function(M) {
|
|
3094
3094
|
g.db = S.db = M;
|
|
3095
|
-
for (var
|
|
3096
|
-
w[
|
|
3095
|
+
for (var B = 0; B < w.length; B++)
|
|
3096
|
+
w[B]._dbInfo.db = M;
|
|
3097
3097
|
}).catch(function(M) {
|
|
3098
3098
|
throw te(g, M), M;
|
|
3099
3099
|
});
|
|
@@ -3107,7 +3107,7 @@ function Id() {
|
|
|
3107
3107
|
if (T > 0 && (!g.db || M.name === "InvalidStateError" || M.name === "NotFoundError"))
|
|
3108
3108
|
return h.resolve().then(function() {
|
|
3109
3109
|
if (!g.db || M.name === "NotFoundError" && !g.db.objectStoreNames.contains(g.storeName) && g.version <= g.db.version)
|
|
3110
|
-
return g.db && (g.version = g.db.version + 1),
|
|
3110
|
+
return g.db && (g.version = g.db.version + 1), R(g);
|
|
3111
3111
|
}).then(function() {
|
|
3112
3112
|
return $(g).then(function() {
|
|
3113
3113
|
j(g, S, w, T - 1);
|
|
@@ -3138,18 +3138,18 @@ function Id() {
|
|
|
3138
3138
|
var I = x[w.name];
|
|
3139
3139
|
I || (I = X(), x[w.name] = I), I.forages.push(S), S._initReady || (S._initReady = S.ready, S.ready = z);
|
|
3140
3140
|
var M = [];
|
|
3141
|
-
function
|
|
3141
|
+
function B() {
|
|
3142
3142
|
return h.resolve();
|
|
3143
3143
|
}
|
|
3144
3144
|
for (var k = 0; k < I.forages.length; k++) {
|
|
3145
3145
|
var N = I.forages[k];
|
|
3146
|
-
N !== S && M.push(N._initReady().catch(
|
|
3146
|
+
N !== S && M.push(N._initReady().catch(B));
|
|
3147
3147
|
}
|
|
3148
3148
|
var U = I.forages.slice(0);
|
|
3149
3149
|
return h.all(M).then(function() {
|
|
3150
3150
|
return w.db = I.db, E(w);
|
|
3151
3151
|
}).then(function(_) {
|
|
3152
|
-
return w.db = _, Z(w, S._defaultConfig.version) ?
|
|
3152
|
+
return w.db = _, Z(w, S._defaultConfig.version) ? R(w) : _;
|
|
3153
3153
|
}).then(function(_) {
|
|
3154
3154
|
w.db = I.db = _, S._dbInfo = w;
|
|
3155
3155
|
for (var ee = 0; ee < U.length; ee++) {
|
|
@@ -3163,9 +3163,9 @@ function Id() {
|
|
|
3163
3163
|
g = p(g);
|
|
3164
3164
|
var T = new h(function(I, M) {
|
|
3165
3165
|
w.ready().then(function() {
|
|
3166
|
-
j(w._dbInfo,
|
|
3167
|
-
if (
|
|
3168
|
-
return M(
|
|
3166
|
+
j(w._dbInfo, C, function(B, k) {
|
|
3167
|
+
if (B)
|
|
3168
|
+
return M(B);
|
|
3169
3169
|
try {
|
|
3170
3170
|
var N = k.objectStore(w._dbInfo.storeName), U = N.get(g);
|
|
3171
3171
|
U.onsuccess = function() {
|
|
@@ -3185,9 +3185,9 @@ function Id() {
|
|
|
3185
3185
|
function ne(g, S) {
|
|
3186
3186
|
var w = this, T = new h(function(I, M) {
|
|
3187
3187
|
w.ready().then(function() {
|
|
3188
|
-
j(w._dbInfo,
|
|
3189
|
-
if (
|
|
3190
|
-
return M(
|
|
3188
|
+
j(w._dbInfo, C, function(B, k) {
|
|
3189
|
+
if (B)
|
|
3190
|
+
return M(B);
|
|
3191
3191
|
try {
|
|
3192
3192
|
var N = k.objectStore(w._dbInfo.storeName), U = N.openCursor(), _ = 1;
|
|
3193
3193
|
U.onsuccess = function() {
|
|
@@ -3213,16 +3213,16 @@ function Id() {
|
|
|
3213
3213
|
function de(g, S, w) {
|
|
3214
3214
|
var T = this;
|
|
3215
3215
|
g = p(g);
|
|
3216
|
-
var I = new h(function(M,
|
|
3216
|
+
var I = new h(function(M, B) {
|
|
3217
3217
|
var k;
|
|
3218
3218
|
T.ready().then(function() {
|
|
3219
3219
|
return k = T._dbInfo, v.call(S) === "[object Blob]" ? G(k.db).then(function(N) {
|
|
3220
3220
|
return N ? S : V(S);
|
|
3221
3221
|
}) : S;
|
|
3222
3222
|
}).then(function(N) {
|
|
3223
|
-
j(T._dbInfo,
|
|
3223
|
+
j(T._dbInfo, P, function(U, _) {
|
|
3224
3224
|
if (U)
|
|
3225
|
-
return
|
|
3225
|
+
return B(U);
|
|
3226
3226
|
try {
|
|
3227
3227
|
var ee = _.objectStore(T._dbInfo.storeName);
|
|
3228
3228
|
N === null && (N = void 0);
|
|
@@ -3231,13 +3231,13 @@ function Id() {
|
|
|
3231
3231
|
N === void 0 && (N = null), M(N);
|
|
3232
3232
|
}, _.onabort = _.onerror = function() {
|
|
3233
3233
|
var xe = pe.error ? pe.error : pe.transaction.error;
|
|
3234
|
-
|
|
3234
|
+
B(xe);
|
|
3235
3235
|
};
|
|
3236
3236
|
} catch (xe) {
|
|
3237
|
-
|
|
3237
|
+
B(xe);
|
|
3238
3238
|
}
|
|
3239
3239
|
});
|
|
3240
|
-
}).catch(
|
|
3240
|
+
}).catch(B);
|
|
3241
3241
|
});
|
|
3242
3242
|
return f(I, w), I;
|
|
3243
3243
|
}
|
|
@@ -3246,9 +3246,9 @@ function Id() {
|
|
|
3246
3246
|
g = p(g);
|
|
3247
3247
|
var T = new h(function(I, M) {
|
|
3248
3248
|
w.ready().then(function() {
|
|
3249
|
-
j(w._dbInfo,
|
|
3250
|
-
if (
|
|
3251
|
-
return M(
|
|
3249
|
+
j(w._dbInfo, P, function(B, k) {
|
|
3250
|
+
if (B)
|
|
3251
|
+
return M(B);
|
|
3252
3252
|
try {
|
|
3253
3253
|
var N = k.objectStore(w._dbInfo.storeName), U = N.delete(g);
|
|
3254
3254
|
k.oncomplete = function() {
|
|
@@ -3270,14 +3270,14 @@ function Id() {
|
|
|
3270
3270
|
function re(g) {
|
|
3271
3271
|
var S = this, w = new h(function(T, I) {
|
|
3272
3272
|
S.ready().then(function() {
|
|
3273
|
-
j(S._dbInfo,
|
|
3273
|
+
j(S._dbInfo, P, function(M, B) {
|
|
3274
3274
|
if (M)
|
|
3275
3275
|
return I(M);
|
|
3276
3276
|
try {
|
|
3277
|
-
var k =
|
|
3278
|
-
|
|
3277
|
+
var k = B.objectStore(S._dbInfo.storeName), N = k.clear();
|
|
3278
|
+
B.oncomplete = function() {
|
|
3279
3279
|
T();
|
|
3280
|
-
},
|
|
3280
|
+
}, B.onabort = B.onerror = function() {
|
|
3281
3281
|
var U = N.error ? N.error : N.transaction.error;
|
|
3282
3282
|
I(U);
|
|
3283
3283
|
};
|
|
@@ -3292,11 +3292,11 @@ function Id() {
|
|
|
3292
3292
|
function Te(g) {
|
|
3293
3293
|
var S = this, w = new h(function(T, I) {
|
|
3294
3294
|
S.ready().then(function() {
|
|
3295
|
-
j(S._dbInfo,
|
|
3295
|
+
j(S._dbInfo, C, function(M, B) {
|
|
3296
3296
|
if (M)
|
|
3297
3297
|
return I(M);
|
|
3298
3298
|
try {
|
|
3299
|
-
var k =
|
|
3299
|
+
var k = B.objectStore(S._dbInfo.storeName), N = k.count();
|
|
3300
3300
|
N.onsuccess = function() {
|
|
3301
3301
|
T(N.result);
|
|
3302
3302
|
}, N.onerror = function() {
|
|
@@ -3317,9 +3317,9 @@ function Id() {
|
|
|
3317
3317
|
return;
|
|
3318
3318
|
}
|
|
3319
3319
|
w.ready().then(function() {
|
|
3320
|
-
j(w._dbInfo,
|
|
3321
|
-
if (
|
|
3322
|
-
return M(
|
|
3320
|
+
j(w._dbInfo, C, function(B, k) {
|
|
3321
|
+
if (B)
|
|
3322
|
+
return M(B);
|
|
3323
3323
|
try {
|
|
3324
3324
|
var N = k.objectStore(w._dbInfo.storeName), U = !1, _ = N.openKeyCursor();
|
|
3325
3325
|
_.onsuccess = function() {
|
|
@@ -3343,11 +3343,11 @@ function Id() {
|
|
|
3343
3343
|
function wt(g) {
|
|
3344
3344
|
var S = this, w = new h(function(T, I) {
|
|
3345
3345
|
S.ready().then(function() {
|
|
3346
|
-
j(S._dbInfo,
|
|
3346
|
+
j(S._dbInfo, C, function(M, B) {
|
|
3347
3347
|
if (M)
|
|
3348
3348
|
return I(M);
|
|
3349
3349
|
try {
|
|
3350
|
-
var k =
|
|
3350
|
+
var k = B.objectStore(S._dbInfo.storeName), N = k.openKeyCursor(), U = [];
|
|
3351
3351
|
N.onsuccess = function() {
|
|
3352
3352
|
var _ = N.result;
|
|
3353
3353
|
if (!_) {
|
|
@@ -3374,14 +3374,14 @@ function Id() {
|
|
|
3374
3374
|
if (!g.name)
|
|
3375
3375
|
I = h.reject("Invalid arguments");
|
|
3376
3376
|
else {
|
|
3377
|
-
var M = g.name === w.name && T._dbInfo.db,
|
|
3377
|
+
var M = g.name === w.name && T._dbInfo.db, B = M ? h.resolve(T._dbInfo.db) : E(g).then(function(k) {
|
|
3378
3378
|
var N = x[g.name], U = N.forages;
|
|
3379
3379
|
N.db = k;
|
|
3380
3380
|
for (var _ = 0; _ < U.length; _++)
|
|
3381
3381
|
U[_]._dbInfo.db = k;
|
|
3382
3382
|
return k;
|
|
3383
3383
|
});
|
|
3384
|
-
g.storeName ? I =
|
|
3384
|
+
g.storeName ? I = B.then(function(k) {
|
|
3385
3385
|
if (k.objectStoreNames.contains(g.storeName)) {
|
|
3386
3386
|
var N = k.version + 1;
|
|
3387
3387
|
H(g);
|
|
@@ -3391,11 +3391,11 @@ function Id() {
|
|
|
3391
3391
|
var pe = _[ee];
|
|
3392
3392
|
pe._dbInfo.db = null, pe._dbInfo.version = N;
|
|
3393
3393
|
}
|
|
3394
|
-
var xe = new h(function(we,
|
|
3394
|
+
var xe = new h(function(we, Ce) {
|
|
3395
3395
|
var Ie = l.open(g.name, N);
|
|
3396
3396
|
Ie.onerror = function(Xe) {
|
|
3397
|
-
var
|
|
3398
|
-
|
|
3397
|
+
var Cn = Ie.result;
|
|
3398
|
+
Cn.close(), Ce(Xe);
|
|
3399
3399
|
}, Ie.onupgradeneeded = function() {
|
|
3400
3400
|
var Xe = Ie.result;
|
|
3401
3401
|
Xe.deleteObjectStore(g.storeName);
|
|
@@ -3406,8 +3406,8 @@ function Id() {
|
|
|
3406
3406
|
});
|
|
3407
3407
|
return xe.then(function(we) {
|
|
3408
3408
|
U.db = we;
|
|
3409
|
-
for (var
|
|
3410
|
-
var Ie = _[
|
|
3409
|
+
for (var Ce = 0; Ce < _.length; Ce++) {
|
|
3410
|
+
var Ie = _[Ce];
|
|
3411
3411
|
Ie._dbInfo.db = we, q(Ie._dbInfo);
|
|
3412
3412
|
}
|
|
3413
3413
|
}).catch(function(we) {
|
|
@@ -3415,7 +3415,7 @@ function Id() {
|
|
|
3415
3415
|
}), we;
|
|
3416
3416
|
});
|
|
3417
3417
|
}
|
|
3418
|
-
}) : I =
|
|
3418
|
+
}) : I = B.then(function(k) {
|
|
3419
3419
|
H(g);
|
|
3420
3420
|
var N = x[g.name], U = N.forages;
|
|
3421
3421
|
k.close();
|
|
@@ -3424,22 +3424,22 @@ function Id() {
|
|
|
3424
3424
|
ee._dbInfo.db = null;
|
|
3425
3425
|
}
|
|
3426
3426
|
var pe = new h(function(xe, we) {
|
|
3427
|
-
var
|
|
3428
|
-
|
|
3429
|
-
var Ie =
|
|
3430
|
-
Ie && Ie.close(), we(
|
|
3431
|
-
},
|
|
3427
|
+
var Ce = l.deleteDatabase(g.name);
|
|
3428
|
+
Ce.onerror = function() {
|
|
3429
|
+
var Ie = Ce.result;
|
|
3430
|
+
Ie && Ie.close(), we(Ce.error);
|
|
3431
|
+
}, Ce.onblocked = function() {
|
|
3432
3432
|
console.warn('dropInstance blocked for database "' + g.name + '" until all open connections are closed');
|
|
3433
|
-
},
|
|
3434
|
-
var Ie =
|
|
3433
|
+
}, Ce.onsuccess = function() {
|
|
3434
|
+
var Ie = Ce.result;
|
|
3435
3435
|
Ie && Ie.close(), xe(Ie);
|
|
3436
3436
|
};
|
|
3437
3437
|
});
|
|
3438
3438
|
return pe.then(function(xe) {
|
|
3439
3439
|
N.db = xe;
|
|
3440
3440
|
for (var we = 0; we < U.length; we++) {
|
|
3441
|
-
var
|
|
3442
|
-
q(
|
|
3441
|
+
var Ce = U[we];
|
|
3442
|
+
q(Ce._dbInfo);
|
|
3443
3443
|
}
|
|
3444
3444
|
}).catch(function(xe) {
|
|
3445
3445
|
throw (te(g, xe) || h.resolve()).catch(function() {
|
|
@@ -3468,11 +3468,11 @@ function Id() {
|
|
|
3468
3468
|
}
|
|
3469
3469
|
var We = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Gt = "~~local_forage_type~", $t = /^~~local_forage_type~([^~]+)~/, _e = "__lfsc__:", $e = _e.length, et = "arbf", Et = "blob", en = "si08", Ee = "ui08", Oe = "uic8", it = "si16", at = "si32", Vt = "ur16", He = "ui32", ke = "fl32", ot = "fl64", Ye = $e + et.length, Wt = Object.prototype.toString;
|
|
3470
3470
|
function tn(g) {
|
|
3471
|
-
var S = g.length * 0.75, w = g.length, T, I = 0, M,
|
|
3471
|
+
var S = g.length * 0.75, w = g.length, T, I = 0, M, B, k, N;
|
|
3472
3472
|
g[g.length - 1] === "=" && (S--, g[g.length - 2] === "=" && S--);
|
|
3473
3473
|
var U = new ArrayBuffer(S), _ = new Uint8Array(U);
|
|
3474
3474
|
for (T = 0; T < w; T += 4)
|
|
3475
|
-
M = We.indexOf(g[T]),
|
|
3475
|
+
M = We.indexOf(g[T]), B = We.indexOf(g[T + 1]), k = We.indexOf(g[T + 2]), N = We.indexOf(g[T + 3]), _[I++] = M << 2 | B >> 4, _[I++] = (B & 15) << 4 | k >> 2, _[I++] = (k & 3) << 6 | N & 63;
|
|
3476
3476
|
return U;
|
|
3477
3477
|
}
|
|
3478
3478
|
function Ot(g) {
|
|
@@ -3489,17 +3489,17 @@ function Id() {
|
|
|
3489
3489
|
} else if (w === "[object Blob]") {
|
|
3490
3490
|
var M = new FileReader();
|
|
3491
3491
|
M.onload = function() {
|
|
3492
|
-
var
|
|
3493
|
-
S(_e + Et +
|
|
3492
|
+
var B = Gt + g.type + "~" + Ot(this.result);
|
|
3493
|
+
S(_e + Et + B);
|
|
3494
3494
|
}, M.readAsArrayBuffer(g);
|
|
3495
3495
|
} else
|
|
3496
3496
|
try {
|
|
3497
3497
|
S(JSON.stringify(g));
|
|
3498
|
-
} catch (
|
|
3499
|
-
console.error("Couldn't convert value into a JSON string: ", g), S(null,
|
|
3498
|
+
} catch (B) {
|
|
3499
|
+
console.error("Couldn't convert value into a JSON string: ", g), S(null, B);
|
|
3500
3500
|
}
|
|
3501
3501
|
}
|
|
3502
|
-
function
|
|
3502
|
+
function Rt(g) {
|
|
3503
3503
|
if (g.substring(0, $e) !== _e)
|
|
3504
3504
|
return JSON.parse(g);
|
|
3505
3505
|
var S = g.substring(Ye), w = g.substring($e, Ye), T;
|
|
@@ -3537,43 +3537,43 @@ function Id() {
|
|
|
3537
3537
|
}
|
|
3538
3538
|
var bt = {
|
|
3539
3539
|
serialize: Lt,
|
|
3540
|
-
deserialize:
|
|
3540
|
+
deserialize: Rt,
|
|
3541
3541
|
stringToBuffer: tn,
|
|
3542
3542
|
bufferToString: Ot
|
|
3543
3543
|
};
|
|
3544
3544
|
function St(g, S, w, T) {
|
|
3545
3545
|
g.executeSql("CREATE TABLE IF NOT EXISTS " + S.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], w, T);
|
|
3546
3546
|
}
|
|
3547
|
-
function
|
|
3547
|
+
function Bt(g) {
|
|
3548
3548
|
var S = this, w = {
|
|
3549
3549
|
db: null
|
|
3550
3550
|
};
|
|
3551
3551
|
if (g)
|
|
3552
3552
|
for (var T in g)
|
|
3553
3553
|
w[T] = typeof g[T] != "string" ? g[T].toString() : g[T];
|
|
3554
|
-
var I = new h(function(M,
|
|
3554
|
+
var I = new h(function(M, B) {
|
|
3555
3555
|
try {
|
|
3556
3556
|
w.db = openDatabase(w.name, String(w.version), w.description, w.size);
|
|
3557
3557
|
} catch (k) {
|
|
3558
|
-
return
|
|
3558
|
+
return B(k);
|
|
3559
3559
|
}
|
|
3560
3560
|
w.db.transaction(function(k) {
|
|
3561
3561
|
St(k, w, function() {
|
|
3562
3562
|
S._dbInfo = w, M();
|
|
3563
3563
|
}, function(N, U) {
|
|
3564
|
-
|
|
3564
|
+
B(U);
|
|
3565
3565
|
});
|
|
3566
|
-
},
|
|
3566
|
+
}, B);
|
|
3567
3567
|
});
|
|
3568
3568
|
return w.serializer = bt, I;
|
|
3569
3569
|
}
|
|
3570
3570
|
function lt(g, S, w, T, I, M) {
|
|
3571
|
-
g.executeSql(w, T, I, function(
|
|
3572
|
-
k.code === k.SYNTAX_ERR ?
|
|
3571
|
+
g.executeSql(w, T, I, function(B, k) {
|
|
3572
|
+
k.code === k.SYNTAX_ERR ? B.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [S.storeName], function(N, U) {
|
|
3573
3573
|
U.rows.length ? M(N, k) : St(N, S, function() {
|
|
3574
3574
|
N.executeSql(w, T, I, M);
|
|
3575
3575
|
}, M);
|
|
3576
|
-
}, M) : M(
|
|
3576
|
+
}, M) : M(B, k);
|
|
3577
3577
|
}, M);
|
|
3578
3578
|
}
|
|
3579
3579
|
function In(g, S) {
|
|
@@ -3581,11 +3581,11 @@ function Id() {
|
|
|
3581
3581
|
g = p(g);
|
|
3582
3582
|
var T = new h(function(I, M) {
|
|
3583
3583
|
w.ready().then(function() {
|
|
3584
|
-
var
|
|
3585
|
-
|
|
3586
|
-
lt(k,
|
|
3584
|
+
var B = w._dbInfo;
|
|
3585
|
+
B.db.transaction(function(k) {
|
|
3586
|
+
lt(k, B, "SELECT * FROM " + B.storeName + " WHERE key = ? LIMIT 1", [g], function(N, U) {
|
|
3587
3587
|
var _ = U.rows.length ? U.rows.item(0).value : null;
|
|
3588
|
-
_ && (_ =
|
|
3588
|
+
_ && (_ = B.serializer.deserialize(_)), I(_);
|
|
3589
3589
|
}, function(N, U) {
|
|
3590
3590
|
M(U);
|
|
3591
3591
|
});
|
|
@@ -3597,12 +3597,12 @@ function Id() {
|
|
|
3597
3597
|
function nn(g, S) {
|
|
3598
3598
|
var w = this, T = new h(function(I, M) {
|
|
3599
3599
|
w.ready().then(function() {
|
|
3600
|
-
var
|
|
3601
|
-
|
|
3602
|
-
lt(k,
|
|
3600
|
+
var B = w._dbInfo;
|
|
3601
|
+
B.db.transaction(function(k) {
|
|
3602
|
+
lt(k, B, "SELECT * FROM " + B.storeName, [], function(N, U) {
|
|
3603
3603
|
for (var _ = U.rows, ee = _.length, pe = 0; pe < ee; pe++) {
|
|
3604
3604
|
var xe = _.item(pe), we = xe.value;
|
|
3605
|
-
if (we && (we =
|
|
3605
|
+
if (we && (we = B.serializer.deserialize(we)), we = g(we, xe.key, pe + 1), we !== void 0) {
|
|
3606
3606
|
I(we);
|
|
3607
3607
|
return;
|
|
3608
3608
|
}
|
|
@@ -3619,21 +3619,21 @@ function Id() {
|
|
|
3619
3619
|
function rn(g, S, w, T) {
|
|
3620
3620
|
var I = this;
|
|
3621
3621
|
g = p(g);
|
|
3622
|
-
var M = new h(function(
|
|
3622
|
+
var M = new h(function(B, k) {
|
|
3623
3623
|
I.ready().then(function() {
|
|
3624
3624
|
S === void 0 && (S = null);
|
|
3625
3625
|
var N = S, U = I._dbInfo;
|
|
3626
3626
|
U.serializer.serialize(S, function(_, ee) {
|
|
3627
3627
|
ee ? k(ee) : U.db.transaction(function(pe) {
|
|
3628
3628
|
lt(pe, U, "INSERT OR REPLACE INTO " + U.storeName + " (key, value) VALUES (?, ?)", [g, _], function() {
|
|
3629
|
-
|
|
3629
|
+
B(N);
|
|
3630
3630
|
}, function(xe, we) {
|
|
3631
3631
|
k(we);
|
|
3632
3632
|
});
|
|
3633
3633
|
}, function(pe) {
|
|
3634
3634
|
if (pe.code === pe.QUOTA_ERR) {
|
|
3635
3635
|
if (T > 0) {
|
|
3636
|
-
|
|
3636
|
+
B(rn.apply(I, [g, N, w, T - 1]));
|
|
3637
3637
|
return;
|
|
3638
3638
|
}
|
|
3639
3639
|
k(pe);
|
|
@@ -3652,9 +3652,9 @@ function Id() {
|
|
|
3652
3652
|
g = p(g);
|
|
3653
3653
|
var T = new h(function(I, M) {
|
|
3654
3654
|
w.ready().then(function() {
|
|
3655
|
-
var
|
|
3656
|
-
|
|
3657
|
-
lt(k,
|
|
3655
|
+
var B = w._dbInfo;
|
|
3656
|
+
B.db.transaction(function(k) {
|
|
3657
|
+
lt(k, B, "DELETE FROM " + B.storeName + " WHERE key = ?", [g], function() {
|
|
3658
3658
|
I();
|
|
3659
3659
|
}, function(N, U) {
|
|
3660
3660
|
M(U);
|
|
@@ -3668,8 +3668,8 @@ function Id() {
|
|
|
3668
3668
|
var S = this, w = new h(function(T, I) {
|
|
3669
3669
|
S.ready().then(function() {
|
|
3670
3670
|
var M = S._dbInfo;
|
|
3671
|
-
M.db.transaction(function(
|
|
3672
|
-
lt(
|
|
3671
|
+
M.db.transaction(function(B) {
|
|
3672
|
+
lt(B, M, "DELETE FROM " + M.storeName, [], function() {
|
|
3673
3673
|
T();
|
|
3674
3674
|
}, function(k, N) {
|
|
3675
3675
|
I(N);
|
|
@@ -3683,8 +3683,8 @@ function Id() {
|
|
|
3683
3683
|
var S = this, w = new h(function(T, I) {
|
|
3684
3684
|
S.ready().then(function() {
|
|
3685
3685
|
var M = S._dbInfo;
|
|
3686
|
-
M.db.transaction(function(
|
|
3687
|
-
lt(
|
|
3686
|
+
M.db.transaction(function(B) {
|
|
3687
|
+
lt(B, M, "SELECT COUNT(key) as c FROM " + M.storeName, [], function(k, N) {
|
|
3688
3688
|
var U = N.rows.item(0).c;
|
|
3689
3689
|
T(U);
|
|
3690
3690
|
}, function(k, N) {
|
|
@@ -3698,9 +3698,9 @@ function Id() {
|
|
|
3698
3698
|
function Jl(g, S) {
|
|
3699
3699
|
var w = this, T = new h(function(I, M) {
|
|
3700
3700
|
w.ready().then(function() {
|
|
3701
|
-
var
|
|
3702
|
-
|
|
3703
|
-
lt(k,
|
|
3701
|
+
var B = w._dbInfo;
|
|
3702
|
+
B.db.transaction(function(k) {
|
|
3703
|
+
lt(k, B, "SELECT key FROM " + B.storeName + " WHERE id = ? LIMIT 1", [g + 1], function(N, U) {
|
|
3704
3704
|
var _ = U.rows.length ? U.rows.item(0).key : null;
|
|
3705
3705
|
I(_);
|
|
3706
3706
|
}, function(N, U) {
|
|
@@ -3715,8 +3715,8 @@ function Id() {
|
|
|
3715
3715
|
var S = this, w = new h(function(T, I) {
|
|
3716
3716
|
S.ready().then(function() {
|
|
3717
3717
|
var M = S._dbInfo;
|
|
3718
|
-
M.db.transaction(function(
|
|
3719
|
-
lt(
|
|
3718
|
+
M.db.transaction(function(B) {
|
|
3719
|
+
lt(B, M, "SELECT key FROM " + M.storeName, [], function(k, N) {
|
|
3720
3720
|
for (var U = [], _ = 0; _ < N.rows.length; _++)
|
|
3721
3721
|
U.push(N.rows.item(_).key);
|
|
3722
3722
|
T(U);
|
|
@@ -3732,11 +3732,11 @@ function Id() {
|
|
|
3732
3732
|
return new h(function(S, w) {
|
|
3733
3733
|
g.transaction(function(T) {
|
|
3734
3734
|
T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(I, M) {
|
|
3735
|
-
for (var
|
|
3736
|
-
|
|
3735
|
+
for (var B = [], k = 0; k < M.rows.length; k++)
|
|
3736
|
+
B.push(M.rows.item(k).name);
|
|
3737
3737
|
S({
|
|
3738
3738
|
db: g,
|
|
3739
|
-
storeNames:
|
|
3739
|
+
storeNames: B
|
|
3740
3740
|
});
|
|
3741
3741
|
}, function(I, M) {
|
|
3742
3742
|
w(M);
|
|
@@ -3752,27 +3752,27 @@ function Id() {
|
|
|
3752
3752
|
g = typeof g != "function" && g || {}, g.name || (g.name = g.name || w.name, g.storeName = g.storeName || w.storeName);
|
|
3753
3753
|
var T = this, I;
|
|
3754
3754
|
return g.name ? I = new h(function(M) {
|
|
3755
|
-
var
|
|
3756
|
-
g.name === w.name ?
|
|
3757
|
-
db:
|
|
3755
|
+
var B;
|
|
3756
|
+
g.name === w.name ? B = T._dbInfo.db : B = openDatabase(g.name, "", "", 0), g.storeName ? M({
|
|
3757
|
+
db: B,
|
|
3758
3758
|
storeNames: [g.storeName]
|
|
3759
|
-
}) : M(ec(
|
|
3759
|
+
}) : M(ec(B));
|
|
3760
3760
|
}).then(function(M) {
|
|
3761
|
-
return new h(function(
|
|
3761
|
+
return new h(function(B, k) {
|
|
3762
3762
|
M.db.transaction(function(N) {
|
|
3763
3763
|
function U(xe) {
|
|
3764
|
-
return new h(function(we,
|
|
3764
|
+
return new h(function(we, Ce) {
|
|
3765
3765
|
N.executeSql("DROP TABLE IF EXISTS " + xe, [], function() {
|
|
3766
3766
|
we();
|
|
3767
3767
|
}, function(Ie, Xe) {
|
|
3768
|
-
|
|
3768
|
+
Ce(Xe);
|
|
3769
3769
|
});
|
|
3770
3770
|
});
|
|
3771
3771
|
}
|
|
3772
3772
|
for (var _ = [], ee = 0, pe = M.storeNames.length; ee < pe; ee++)
|
|
3773
3773
|
_.push(U(M.storeNames[ee]));
|
|
3774
3774
|
h.all(_).then(function() {
|
|
3775
|
-
|
|
3775
|
+
B();
|
|
3776
3776
|
}).catch(function(xe) {
|
|
3777
3777
|
k(xe);
|
|
3778
3778
|
});
|
|
@@ -3784,7 +3784,7 @@ function Id() {
|
|
|
3784
3784
|
}
|
|
3785
3785
|
var nc = {
|
|
3786
3786
|
_driver: "webSQLStorage",
|
|
3787
|
-
_initStorage:
|
|
3787
|
+
_initStorage: Bt,
|
|
3788
3788
|
_support: Tn(),
|
|
3789
3789
|
iterate: nn,
|
|
3790
3790
|
getItem: In,
|
|
@@ -3804,7 +3804,7 @@ function Id() {
|
|
|
3804
3804
|
return !1;
|
|
3805
3805
|
}
|
|
3806
3806
|
}
|
|
3807
|
-
function
|
|
3807
|
+
function Bi(g, S) {
|
|
3808
3808
|
var w = g.name + "/";
|
|
3809
3809
|
return g.storeName !== S.storeName && (w += g.storeName + "/"), w;
|
|
3810
3810
|
}
|
|
@@ -3824,7 +3824,7 @@ function Id() {
|
|
|
3824
3824
|
if (g)
|
|
3825
3825
|
for (var T in g)
|
|
3826
3826
|
w[T] = g[T];
|
|
3827
|
-
return w.keyPrefix =
|
|
3827
|
+
return w.keyPrefix = Bi(g, S._defaultConfig), ic() ? (S._dbInfo = w, w.serializer = bt, h.resolve()) : h.reject();
|
|
3828
3828
|
}
|
|
3829
3829
|
function oc(g) {
|
|
3830
3830
|
var S = this, w = S.ready().then(function() {
|
|
@@ -3846,11 +3846,11 @@ function Id() {
|
|
|
3846
3846
|
}
|
|
3847
3847
|
function cc(g, S) {
|
|
3848
3848
|
var w = this, T = w.ready().then(function() {
|
|
3849
|
-
for (var I = w._dbInfo, M = I.keyPrefix,
|
|
3849
|
+
for (var I = w._dbInfo, M = I.keyPrefix, B = M.length, k = localStorage.length, N = 1, U = 0; U < k; U++) {
|
|
3850
3850
|
var _ = localStorage.key(U);
|
|
3851
3851
|
if (_.indexOf(M) === 0) {
|
|
3852
3852
|
var ee = localStorage.getItem(_);
|
|
3853
|
-
if (ee && (ee = I.serializer.deserialize(ee)), ee = g(ee, _.substring(
|
|
3853
|
+
if (ee && (ee = I.serializer.deserialize(ee)), ee = g(ee, _.substring(B), N++), ee !== void 0)
|
|
3854
3854
|
return ee;
|
|
3855
3855
|
}
|
|
3856
3856
|
}
|
|
@@ -3871,8 +3871,8 @@ function Id() {
|
|
|
3871
3871
|
}
|
|
3872
3872
|
function uc(g) {
|
|
3873
3873
|
var S = this, w = S.ready().then(function() {
|
|
3874
|
-
for (var T = S._dbInfo, I = localStorage.length, M = [],
|
|
3875
|
-
var k = localStorage.key(
|
|
3874
|
+
for (var T = S._dbInfo, I = localStorage.length, M = [], B = 0; B < I; B++) {
|
|
3875
|
+
var k = localStorage.key(B);
|
|
3876
3876
|
k.indexOf(T.keyPrefix) === 0 && M.push(k.substring(T.keyPrefix.length));
|
|
3877
3877
|
}
|
|
3878
3878
|
return M;
|
|
@@ -3900,14 +3900,14 @@ function Id() {
|
|
|
3900
3900
|
var I = T.ready().then(function() {
|
|
3901
3901
|
S === void 0 && (S = null);
|
|
3902
3902
|
var M = S;
|
|
3903
|
-
return new h(function(
|
|
3903
|
+
return new h(function(B, k) {
|
|
3904
3904
|
var N = T._dbInfo;
|
|
3905
3905
|
N.serializer.serialize(S, function(U, _) {
|
|
3906
3906
|
if (_)
|
|
3907
3907
|
k(_);
|
|
3908
3908
|
else
|
|
3909
3909
|
try {
|
|
3910
|
-
localStorage.setItem(N.keyPrefix + g, U),
|
|
3910
|
+
localStorage.setItem(N.keyPrefix + g, U), B(M);
|
|
3911
3911
|
} catch (ee) {
|
|
3912
3912
|
(ee.name === "QuotaExceededError" || ee.name === "NS_ERROR_DOM_QUOTA_REACHED") && k(ee), k(ee);
|
|
3913
3913
|
}
|
|
@@ -3923,10 +3923,10 @@ function Id() {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
var T = this, I;
|
|
3925
3925
|
return g.name ? I = new h(function(M) {
|
|
3926
|
-
g.storeName ? M(
|
|
3926
|
+
g.storeName ? M(Bi(g, T._defaultConfig)) : M(g.name + "/");
|
|
3927
3927
|
}).then(function(M) {
|
|
3928
|
-
for (var
|
|
3929
|
-
var k = localStorage.key(
|
|
3928
|
+
for (var B = localStorage.length - 1; B >= 0; B--) {
|
|
3929
|
+
var k = localStorage.key(B);
|
|
3930
3930
|
k.indexOf(M) === 0 && localStorage.removeItem(k);
|
|
3931
3931
|
}
|
|
3932
3932
|
}) : I = h.reject("Invalid arguments"), f(I, S), I;
|
|
@@ -3955,7 +3955,7 @@ function Id() {
|
|
|
3955
3955
|
return !1;
|
|
3956
3956
|
}, Fi = Array.isArray || function(g) {
|
|
3957
3957
|
return Object.prototype.toString.call(g) === "[object Array]";
|
|
3958
|
-
},
|
|
3958
|
+
}, Pn = {}, ki = {}, sn = {
|
|
3959
3959
|
INDEXEDDB: Mn,
|
|
3960
3960
|
WEBSQL: nc,
|
|
3961
3961
|
LOCALSTORAGE: gc
|
|
@@ -3992,7 +3992,7 @@ function Id() {
|
|
|
3992
3992
|
for (var w in sn)
|
|
3993
3993
|
if (sn.hasOwnProperty(w)) {
|
|
3994
3994
|
var T = sn[w], I = T._driver;
|
|
3995
|
-
this[w] = I,
|
|
3995
|
+
this[w] = I, Pn[I] || this.defineDriver(T);
|
|
3996
3996
|
}
|
|
3997
3997
|
this._defaultConfig = Xr({}, wc), this._config = Xr({}, this._defaultConfig, S), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
|
|
3998
3998
|
});
|
|
@@ -4009,7 +4009,7 @@ function Id() {
|
|
|
4009
4009
|
return "driver" in w && w.driver ? this.setDriver(this._config.driver) : !0;
|
|
4010
4010
|
} else return typeof w == "string" ? this._config[w] : this._config;
|
|
4011
4011
|
}, g.prototype.defineDriver = function(w, T, I) {
|
|
4012
|
-
var M = new h(function(
|
|
4012
|
+
var M = new h(function(B, k) {
|
|
4013
4013
|
try {
|
|
4014
4014
|
var N = w._driver, U = new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");
|
|
4015
4015
|
if (!w._driver) {
|
|
@@ -4023,20 +4023,20 @@ function Id() {
|
|
|
4023
4023
|
return;
|
|
4024
4024
|
}
|
|
4025
4025
|
}
|
|
4026
|
-
var
|
|
4027
|
-
for (var
|
|
4026
|
+
var Ce = function() {
|
|
4027
|
+
for (var Cn = function(Ic) {
|
|
4028
4028
|
return function() {
|
|
4029
|
-
var
|
|
4029
|
+
var Pc = new Error("Method " + Ic + " is not implemented by the current driver"), zi = h.reject(Pc);
|
|
4030
4030
|
return f(zi, arguments[arguments.length - 1]), zi;
|
|
4031
4031
|
};
|
|
4032
4032
|
}, Qr = 0, Tc = lr.length; Qr < Tc; Qr++) {
|
|
4033
4033
|
var Zr = lr[Qr];
|
|
4034
|
-
w[Zr] || (w[Zr] =
|
|
4034
|
+
w[Zr] || (w[Zr] = Cn(Zr));
|
|
4035
4035
|
}
|
|
4036
4036
|
};
|
|
4037
|
-
|
|
4038
|
-
var Ie = function(
|
|
4039
|
-
|
|
4037
|
+
Ce();
|
|
4038
|
+
var Ie = function(Cn) {
|
|
4039
|
+
Pn[N] && console.info("Redefining LocalForage driver: " + N), Pn[N] = w, ki[N] = Cn, B();
|
|
4040
4040
|
};
|
|
4041
4041
|
"_support" in w ? w._support && typeof w._support == "function" ? w._support().then(Ie, k) : Ie(!!w._support) : Ie(!0);
|
|
4042
4042
|
} catch (Xe) {
|
|
@@ -4047,7 +4047,7 @@ function Id() {
|
|
|
4047
4047
|
}, g.prototype.driver = function() {
|
|
4048
4048
|
return this._driver || null;
|
|
4049
4049
|
}, g.prototype.getDriver = function(w, T, I) {
|
|
4050
|
-
var M =
|
|
4050
|
+
var M = Pn[w] ? h.resolve(Pn[w]) : h.reject(new Error("Driver not found."));
|
|
4051
4051
|
return d(M, T, I), M;
|
|
4052
4052
|
}, g.prototype.getSerializer = function(w) {
|
|
4053
4053
|
var T = h.resolve(bt);
|
|
@@ -4060,7 +4060,7 @@ function Id() {
|
|
|
4060
4060
|
}, g.prototype.setDriver = function(w, T, I) {
|
|
4061
4061
|
var M = this;
|
|
4062
4062
|
Fi(w) || (w = [w]);
|
|
4063
|
-
var
|
|
4063
|
+
var B = this._getSupportedDrivers(w);
|
|
4064
4064
|
function k() {
|
|
4065
4065
|
M._config.driver = M.driver();
|
|
4066
4066
|
}
|
|
@@ -4076,8 +4076,8 @@ function Id() {
|
|
|
4076
4076
|
return pe++, M._dbInfo = null, M._ready = null, M.getDriver(we).then(N).catch(xe);
|
|
4077
4077
|
}
|
|
4078
4078
|
k();
|
|
4079
|
-
var
|
|
4080
|
-
return M._driverSet = h.reject(
|
|
4079
|
+
var Ce = new Error("No available storage method found.");
|
|
4080
|
+
return M._driverSet = h.reject(Ce), M._driverSet;
|
|
4081
4081
|
}
|
|
4082
4082
|
return xe();
|
|
4083
4083
|
};
|
|
@@ -4086,9 +4086,9 @@ function Id() {
|
|
|
4086
4086
|
return h.resolve();
|
|
4087
4087
|
}) : h.resolve();
|
|
4088
4088
|
return this._driverSet = _.then(function() {
|
|
4089
|
-
var ee =
|
|
4089
|
+
var ee = B[0];
|
|
4090
4090
|
return M._dbInfo = null, M._ready = null, M.getDriver(ee).then(function(pe) {
|
|
4091
|
-
M._driver = pe._driver, k(), M._wrapLibraryMethodsWithReady(), M._initDriver = U(
|
|
4091
|
+
M._driver = pe._driver, k(), M._wrapLibraryMethodsWithReady(), M._initDriver = U(B);
|
|
4092
4092
|
});
|
|
4093
4093
|
}).catch(function() {
|
|
4094
4094
|
k();
|
|
@@ -4101,8 +4101,8 @@ function Id() {
|
|
|
4101
4101
|
Xr(this, w);
|
|
4102
4102
|
}, g.prototype._getSupportedDrivers = function(w) {
|
|
4103
4103
|
for (var T = [], I = 0, M = w.length; I < M; I++) {
|
|
4104
|
-
var
|
|
4105
|
-
this.supports(
|
|
4104
|
+
var B = w[I];
|
|
4105
|
+
this.supports(B) && T.push(B);
|
|
4106
4106
|
}
|
|
4107
4107
|
return T;
|
|
4108
4108
|
}, g.prototype._wrapLibraryMethodsWithReady = function() {
|
|
@@ -4117,10 +4117,10 @@ function Id() {
|
|
|
4117
4117
|
});
|
|
4118
4118
|
})(ns)), ns.exports;
|
|
4119
4119
|
}
|
|
4120
|
-
var
|
|
4121
|
-
const zs = /* @__PURE__ */ Md(
|
|
4120
|
+
var Pd = Id();
|
|
4121
|
+
const zs = /* @__PURE__ */ Md(Pd), jo = new Ya();
|
|
4122
4122
|
jo.name = "Scene";
|
|
4123
|
-
const
|
|
4123
|
+
const Cd = /* @__PURE__ */ new Set(["opacity", "highlight", "emissive"]);
|
|
4124
4124
|
class Dd {
|
|
4125
4125
|
constructor(e, t) {
|
|
4126
4126
|
this.signals = e, this.viewportState = t, this.scene = jo.clone(), this.selectedObjects = {
|
|
@@ -4226,7 +4226,7 @@ class Dd {
|
|
|
4226
4226
|
const f = new Zt({
|
|
4227
4227
|
id: `${h.sid ?? h.id}_stroke`,
|
|
4228
4228
|
name: `${h.name}_stroke`
|
|
4229
|
-
}), d = new
|
|
4229
|
+
}), d = new Cs(), p = new Kn({
|
|
4230
4230
|
color: a,
|
|
4231
4231
|
transparent: !0,
|
|
4232
4232
|
opacity: o
|
|
@@ -4242,8 +4242,8 @@ class Dd {
|
|
|
4242
4242
|
89
|
|
4243
4243
|
);
|
|
4244
4244
|
x.updateWorldMatrix(!0, !1);
|
|
4245
|
-
const
|
|
4246
|
-
v.applyMatrix4(
|
|
4245
|
+
const C = x.matrixWorld.clone().premultiply(h.matrixWorld.clone().invert());
|
|
4246
|
+
v.applyMatrix4(C), b.push(v);
|
|
4247
4247
|
}
|
|
4248
4248
|
}), b.length !== 0)
|
|
4249
4249
|
return ao(b);
|
|
@@ -4261,10 +4261,10 @@ class Dd {
|
|
|
4261
4261
|
const v = y();
|
|
4262
4262
|
if (v) {
|
|
4263
4263
|
m = v;
|
|
4264
|
-
const
|
|
4264
|
+
const C = v.getAttribute(
|
|
4265
4265
|
"position"
|
|
4266
4266
|
);
|
|
4267
|
-
|
|
4267
|
+
C.array instanceof Float32Array && this.strokeStore.setItem(b, C.array.buffer);
|
|
4268
4268
|
}
|
|
4269
4269
|
}
|
|
4270
4270
|
} else {
|
|
@@ -4381,7 +4381,7 @@ class Dd {
|
|
|
4381
4381
|
_runObjectMaterialEffectStack(e, t) {
|
|
4382
4382
|
const n = e.userData.materialEffectStack;
|
|
4383
4383
|
if (n && t === "material") {
|
|
4384
|
-
const r = n.filter((a) =>
|
|
4384
|
+
const r = n.filter((a) => Cd.has(a.type)).map((a) => a.option);
|
|
4385
4385
|
if (!r.length) {
|
|
4386
4386
|
e.userData.material && (go(e.material), e.material = e.userData.material, Reflect.deleteProperty(e.userData, "material"));
|
|
4387
4387
|
return;
|
|
@@ -4421,7 +4421,7 @@ class Ad {
|
|
|
4421
4421
|
};
|
|
4422
4422
|
}, this.render = function(u, h) {
|
|
4423
4423
|
h.parent === null && h.matrixWorldAutoUpdate === !0 && h.updateMatrixWorld(), Zi.copy(h.matrixWorldInverse), Ji.multiplyMatrices(h.projectionMatrix, Zi);
|
|
4424
|
-
const f = [...u].filter((d) =>
|
|
4424
|
+
const f = [...u].filter((d) => Ci(d.elementType)).map((d) => d.children[0]);
|
|
4425
4425
|
o(f, h), c(f);
|
|
4426
4426
|
}, this.setSize = (u, h) => {
|
|
4427
4427
|
t = u, n = h, r = t / 2, s = n / 2, this.domElement.style.width = u + "px", this.domElement.style.height = h + "px";
|
|
@@ -4507,8 +4507,8 @@ class Ld {
|
|
|
4507
4507
|
p.view && p.view.enabled ? (o.style.transform = `translate( ${-p.view.offsetX * (t / p.view.width)}px, ${-p.view.offsetY * (n / p.view.height)}px )`, o.style.transform += `scale( ${p.view.fullWidth / p.view.width}, ${p.view.fullHeight / p.view.height} )`) : o.style.transform = "", p.parent === null && p.matrixWorldAutoUpdate === !0 && p.updateMatrixWorld();
|
|
4508
4508
|
let y = 0, b = 0;
|
|
4509
4509
|
p instanceof Qt && (y = -(p.right + p.left) / 2, b = (p.top + p.bottom) / 2);
|
|
4510
|
-
const x = p.view && p.view.enabled ? p.view.height / p.view.fullHeight : 1, v = p instanceof Qt ? `scale( ${x} )scale(` + m + ")translate(" + c(y) + "px," + c(b) + "px)" + u(p.matrixWorldInverse) : `scale( ${x} )translateZ(` + m + "px)" + u(p.matrixWorldInverse),
|
|
4511
|
-
a.camera.style !==
|
|
4510
|
+
const x = p.view && p.view.enabled ? p.view.height / p.view.fullHeight : 1, v = p instanceof Qt ? `scale( ${x} )scale(` + m + ")translate(" + c(y) + "px," + c(b) + "px)" + u(p.matrixWorldInverse) : `scale( ${x} )translateZ(` + m + "px)" + u(p.matrixWorldInverse), P = (p instanceof kr ? "perspective(" + m + "px) " : "") + v + "translate(" + r + "px," + s + "px)";
|
|
4511
|
+
a.camera.style !== P && (l.style.transform = P, a.camera.style = P);
|
|
4512
4512
|
const A = [...d].filter((L) => Di(L.elementType) || Ai(L.elementType)).map((L) => L.children[0]);
|
|
4513
4513
|
f(A, p);
|
|
4514
4514
|
}, this.setSize = (d, p) => {
|
|
@@ -4533,11 +4533,11 @@ class Ld {
|
|
|
4533
4533
|
if (m.userData.prevVisible !== b && (y.onChange?.(b), y.elementAutoDisplay && (m.element.style.display = b === !0 ? "" : "none")), m.userData.prevVisible = b, b === !0 || y.elementAutoDisplay === !1) {
|
|
4534
4534
|
let x;
|
|
4535
4535
|
m instanceof Go ? (ut.copy(p.matrixWorldInverse), ut.transpose(), m.rotation2D !== 0 && ut.multiply(Od.makeRotationZ(m.rotation2D)), m.matrixWorld.decompose(ta, Ed, na), ut.setPosition(ta), ut.scale(na), ut.elements[3] = 0, ut.elements[7] = 0, ut.elements[11] = 0, ut.elements[15] = 1, x = h(ut)) : x = h(m.matrixWorld);
|
|
4536
|
-
const v = m.element,
|
|
4537
|
-
if (
|
|
4536
|
+
const v = m.element, C = a.objects.get(m);
|
|
4537
|
+
if (C === void 0 || C.style !== x) {
|
|
4538
4538
|
v.style.transform = x;
|
|
4539
|
-
const
|
|
4540
|
-
a.objects.set(m,
|
|
4539
|
+
const P = { style: x };
|
|
4540
|
+
a.objects.set(m, P);
|
|
4541
4541
|
}
|
|
4542
4542
|
v.parentNode !== l && l.appendChild(v);
|
|
4543
4543
|
}
|
|
@@ -4550,7 +4550,7 @@ class Ld {
|
|
|
4550
4550
|
render;
|
|
4551
4551
|
setSize;
|
|
4552
4552
|
}
|
|
4553
|
-
const
|
|
4553
|
+
const Rd = "ssp_view_2DPoi", Bd = "ssp_view_3DPoi";
|
|
4554
4554
|
class Fd {
|
|
4555
4555
|
constructor(e) {
|
|
4556
4556
|
this.viewport = e, this.internalOptions = {
|
|
@@ -4586,11 +4586,11 @@ class Fd {
|
|
|
4586
4586
|
}
|
|
4587
4587
|
_initRenderCSS2D() {
|
|
4588
4588
|
const e = new Ad(this.viewport);
|
|
4589
|
-
return e.domElement.id =
|
|
4589
|
+
return e.domElement.id = Rd, e.domElement.style.position = "absolute", e.domElement.style.top = "0", e.domElement.style.width = "100%", e.domElement.style.height = "100%", e.setSize(this.container.offsetWidth, this.container.offsetHeight), this.container.appendChild(e.domElement), e;
|
|
4590
4590
|
}
|
|
4591
4591
|
_initRenderCSS3D() {
|
|
4592
4592
|
const e = new Ld(this.viewport);
|
|
4593
|
-
return e.domElement.id =
|
|
4593
|
+
return e.domElement.id = Bd, e.domElement.style.position = "absolute", e.domElement.style.top = "0", e.domElement.style.width = "100%", e.domElement.style.height = "100%", e.setSize(this.container.offsetWidth, this.container.offsetHeight), this.container.appendChild(e.domElement), e;
|
|
4594
4594
|
}
|
|
4595
4595
|
_initInteractiveContainer() {
|
|
4596
4596
|
return this.rendererCSS3D.domElement;
|
|
@@ -4754,7 +4754,7 @@ class zd {
|
|
|
4754
4754
|
return this.surroundOnTarget(n, t);
|
|
4755
4755
|
}
|
|
4756
4756
|
getObjectLabelPos(e, t = "frontTop", n = {}) {
|
|
4757
|
-
if (e instanceof Me && (e = new
|
|
4757
|
+
if (e instanceof Me && (e = new Pt().setFromObject(e)), e.isEmpty())
|
|
4758
4758
|
return W("target box is empty"), new D();
|
|
4759
4759
|
const { extendScale: r = 1.6, mode: s = "scene" } = n;
|
|
4760
4760
|
if (s === "scene") {
|
|
@@ -4768,7 +4768,7 @@ class zd {
|
|
|
4768
4768
|
}
|
|
4769
4769
|
}
|
|
4770
4770
|
const or = new Ae();
|
|
4771
|
-
or.setAttribute("position", new
|
|
4771
|
+
or.setAttribute("position", new Be(new Float32Array([
|
|
4772
4772
|
-1,
|
|
4773
4773
|
-1,
|
|
4774
4774
|
3,
|
|
@@ -4776,7 +4776,7 @@ or.setAttribute("position", new Re(new Float32Array([
|
|
|
4776
4776
|
-1,
|
|
4777
4777
|
3
|
|
4778
4778
|
]), 2));
|
|
4779
|
-
or.setAttribute("uv", new
|
|
4779
|
+
or.setAttribute("uv", new Be(new Float32Array([
|
|
4780
4780
|
0,
|
|
4781
4781
|
0,
|
|
4782
4782
|
2,
|
|
@@ -5840,7 +5840,7 @@ function _o(i, e, t) {
|
|
|
5840
5840
|
_o(i, e, t);
|
|
5841
5841
|
}, 1);
|
|
5842
5842
|
}
|
|
5843
|
-
class qd extends
|
|
5843
|
+
class qd extends Bh {
|
|
5844
5844
|
/**
|
|
5845
5845
|
*
|
|
5846
5846
|
* @param {THREE.Scene} scene
|
|
@@ -6271,13 +6271,13 @@ class Kd {
|
|
|
6271
6271
|
},
|
|
6272
6272
|
t
|
|
6273
6273
|
);
|
|
6274
|
-
if (e.attributes.position instanceof Zc ? e.attributes.position.data.array = d : e.attributes.position instanceof
|
|
6274
|
+
if (e.attributes.position instanceof Zc ? e.attributes.position.data.array = d : e.attributes.position instanceof Be && (e.attributes.position.array = d), e.index)
|
|
6275
6275
|
e.index.array = f.index;
|
|
6276
6276
|
else {
|
|
6277
|
-
const y = new
|
|
6277
|
+
const y = new Be(f.index, 1, !1);
|
|
6278
6278
|
e.setIndex(y);
|
|
6279
6279
|
}
|
|
6280
|
-
m.setBoundingBox && (e.boundingBox = p.getBoundingBox(new
|
|
6280
|
+
m.setBoundingBox && (e.boundingBox = p.getBoundingBox(new Pt())), o(r, p);
|
|
6281
6281
|
} else t.onProgress && t.onProgress(h.progress);
|
|
6282
6282
|
};
|
|
6283
6283
|
if (e.attributes.position instanceof Qc) {
|
|
@@ -6435,6 +6435,17 @@ class Zd extends Zn {
|
|
|
6435
6435
|
setOptions(e) {
|
|
6436
6436
|
Object.assign(this, e);
|
|
6437
6437
|
}
|
|
6438
|
+
_createOnRestPromise(e) {
|
|
6439
|
+
if (e) return Promise.resolve();
|
|
6440
|
+
this._hasRested = !1;
|
|
6441
|
+
const t = new Promise((n) => {
|
|
6442
|
+
const r = () => {
|
|
6443
|
+
this.removeEventListener("rest", r), this.removeEventListener("sleep", r), n();
|
|
6444
|
+
};
|
|
6445
|
+
this.addEventListener("rest", r), this.addEventListener("sleep", r);
|
|
6446
|
+
});
|
|
6447
|
+
return this.dispatchEvent({ type: "transitionstart" }), t;
|
|
6448
|
+
}
|
|
6438
6449
|
}
|
|
6439
6450
|
var ds = {}, An = {}, Ns = function(i, e) {
|
|
6440
6451
|
return Ns = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
|
|
@@ -6452,14 +6463,14 @@ function Ho(i, e) {
|
|
|
6452
6463
|
}
|
|
6453
6464
|
i.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
6454
6465
|
}
|
|
6455
|
-
var
|
|
6456
|
-
return
|
|
6466
|
+
var Cr = function() {
|
|
6467
|
+
return Cr = Object.assign || function(e) {
|
|
6457
6468
|
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
6458
6469
|
t = arguments[n];
|
|
6459
6470
|
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
|
|
6460
6471
|
}
|
|
6461
6472
|
return e;
|
|
6462
|
-
},
|
|
6473
|
+
}, Cr.apply(this, arguments);
|
|
6463
6474
|
};
|
|
6464
6475
|
function qo(i, e) {
|
|
6465
6476
|
var t = {};
|
|
@@ -6827,7 +6838,7 @@ function yl(i, e) {
|
|
|
6827
6838
|
}
|
|
6828
6839
|
const ep = {
|
|
6829
6840
|
__extends: Ho,
|
|
6830
|
-
__assign:
|
|
6841
|
+
__assign: Cr,
|
|
6831
6842
|
__rest: qo,
|
|
6832
6843
|
__decorate: Ko,
|
|
6833
6844
|
__param: Yo,
|
|
@@ -6862,7 +6873,7 @@ const ep = {
|
|
|
6862
6873
|
__proto__: null,
|
|
6863
6874
|
__addDisposableResource: ml,
|
|
6864
6875
|
get __assign() {
|
|
6865
|
-
return
|
|
6876
|
+
return Cr;
|
|
6866
6877
|
},
|
|
6867
6878
|
__asyncDelegator: ol,
|
|
6868
6879
|
__asyncGenerator: al,
|
|
@@ -6896,10 +6907,10 @@ const ep = {
|
|
|
6896
6907
|
__values: Dr,
|
|
6897
6908
|
default: ep
|
|
6898
6909
|
}, Symbol.toStringTag, { value: "Module" })), Wr = /* @__PURE__ */ Td(tp);
|
|
6899
|
-
var En = {}, On = {}, Ln = {},
|
|
6910
|
+
var En = {}, On = {}, Ln = {}, Rn = {}, ra;
|
|
6900
6911
|
function _r() {
|
|
6901
|
-
if (ra) return
|
|
6902
|
-
ra = 1, Object.defineProperty(
|
|
6912
|
+
if (ra) return Rn;
|
|
6913
|
+
ra = 1, Object.defineProperty(Rn, "__esModule", { value: !0 }), Rn.Slot = void 0;
|
|
6903
6914
|
var i = (
|
|
6904
6915
|
/** @class */
|
|
6905
6916
|
(function() {
|
|
@@ -6999,12 +7010,12 @@ Did you want to set enabled to false instead?`);
|
|
|
6999
7010
|
}, e;
|
|
7000
7011
|
})()
|
|
7001
7012
|
);
|
|
7002
|
-
return
|
|
7013
|
+
return Rn.Slot = i, Rn;
|
|
7003
7014
|
}
|
|
7004
|
-
var
|
|
7015
|
+
var Bn = {}, sa;
|
|
7005
7016
|
function vl() {
|
|
7006
|
-
if (sa) return
|
|
7007
|
-
sa = 1, Object.defineProperty(
|
|
7017
|
+
if (sa) return Bn;
|
|
7018
|
+
sa = 1, Object.defineProperty(Bn, "__esModule", { value: !0 }), Bn.SlotList = void 0;
|
|
7008
7019
|
var i = (
|
|
7009
7020
|
/** @class */
|
|
7010
7021
|
(function() {
|
|
@@ -7093,7 +7104,7 @@ function vl() {
|
|
|
7093
7104
|
}, e.NIL = new e(null, null), e;
|
|
7094
7105
|
})()
|
|
7095
7106
|
);
|
|
7096
|
-
return
|
|
7107
|
+
return Bn.SlotList = i, Bn;
|
|
7097
7108
|
}
|
|
7098
7109
|
var ia;
|
|
7099
7110
|
function bi() {
|
|
@@ -7749,17 +7760,17 @@ class fp extends Me {
|
|
|
7749
7760
|
super(), this.camera = e, this.controls = n;
|
|
7750
7761
|
const r = new ge("#ff3653"), s = new ge("#8adb00"), a = new ge("#2c8fff"), o = new ge("#000000"), l = {}, c = [], u = new sr(), h = new oe(), f = new Qt(-2, 2, 2, -2, 0, 4);
|
|
7751
7762
|
f.position.set(0, 0, 2);
|
|
7752
|
-
const d = new Jc(0.8, 0.05, 0.05).translate(0.4, 0, 0), p = new le(d,
|
|
7763
|
+
const d = new Jc(0.8, 0.05, 0.05).translate(0.4, 0, 0), p = new le(d, R(r)), m = new le(d, R(s)), y = new le(d, R(a));
|
|
7753
7764
|
m.rotation.z = Math.PI / 2, y.rotation.y = -Math.PI / 2, this.add(p), this.add(y), this.add(m);
|
|
7754
|
-
const b = Z(r), x = Z(s), v = Z(a),
|
|
7755
|
-
|
|
7756
|
-
const te = new D(), F = new
|
|
7765
|
+
const b = Z(r), x = Z(s), v = Z(a), C = Z(o), P = new tt(b), A = new tt(x), L = new tt(v), G = new tt(C), H = new tt(C), q = new tt(C);
|
|
7766
|
+
P.userData.type = "right", A.userData.type = "top", L.userData.type = "front", G.userData.type = "left", H.userData.type = "bottom", q.userData.type = "back", P.position.x = 1, A.position.y = 1, L.position.z = 1, G.position.x = -1, G.scale.setScalar(0.8), H.position.y = -1, H.scale.setScalar(0.8), q.position.z = -1, q.scale.setScalar(0.8), this.add(P), this.add(A), this.add(L), this.add(G), this.add(H), this.add(q), c.push(P), c.push(A), c.push(L), c.push(G), c.push(H), c.push(q);
|
|
7767
|
+
const te = new D(), F = new Rr(), E = 128;
|
|
7757
7768
|
this.setLabels = function(O, Y, z) {
|
|
7758
7769
|
l.labelX = O, l.labelY = Y, l.labelZ = z, V();
|
|
7759
7770
|
}, this.setLabelStyle = function(O, Y, z) {
|
|
7760
7771
|
l.font = O, l.color = Y, l.radius = z, V();
|
|
7761
7772
|
}, this.render = function(O) {
|
|
7762
|
-
this.quaternion.copy(this.camera.quaternion).invert(), this.updateMatrixWorld(), te.set(0, 0, 1), te.applyQuaternion(this.camera.quaternion), te.x >= 0 ? (
|
|
7773
|
+
this.quaternion.copy(this.camera.quaternion).invert(), this.updateMatrixWorld(), te.set(0, 0, 1), te.applyQuaternion(this.camera.quaternion), te.x >= 0 ? (P.material.opacity = 1, G.material.opacity = 0.5) : (P.material.opacity = 0.5, G.material.opacity = 1), te.y >= 0 ? (A.material.opacity = 1, H.material.opacity = 0.5) : (A.material.opacity = 0.5, H.material.opacity = 1), te.z >= 0 ? (L.material.opacity = 1, q.material.opacity = 0.5) : (L.material.opacity = 0.5, q.material.opacity = 1);
|
|
7763
7774
|
const Y = t.offsetWidth - E;
|
|
7764
7775
|
O.clearDepth(), O.getViewport(F), O.setViewport(Y, 0, E, E), O.render(this, f), O.setViewport(F.x, F.y, F.z, F.w);
|
|
7765
7776
|
}, this.handleClick = async function(O) {
|
|
@@ -7773,9 +7784,9 @@ class fp extends Me {
|
|
|
7773
7784
|
} else
|
|
7774
7785
|
return !1;
|
|
7775
7786
|
}, this.dispose = function() {
|
|
7776
|
-
d.dispose(), p.material.dispose(), m.material.dispose(), y.material.dispose(),
|
|
7787
|
+
d.dispose(), p.material.dispose(), m.material.dispose(), y.material.dispose(), P.material.map?.dispose(), A.material.map?.dispose(), L.material.map?.dispose(), G.material.map?.dispose(), H.material.map?.dispose(), q.material.map?.dispose(), P.material.dispose(), A.material.dispose(), L.material.dispose(), G.material.dispose(), H.material.dispose(), q.material.dispose();
|
|
7777
7788
|
};
|
|
7778
|
-
function
|
|
7789
|
+
function R(O) {
|
|
7779
7790
|
return new fn({ color: O, toneMapped: !1 });
|
|
7780
7791
|
}
|
|
7781
7792
|
function Z(O, Y) {
|
|
@@ -7787,7 +7798,7 @@ class fp extends Me {
|
|
|
7787
7798
|
return Q.colorSpace = mt, new Ds({ map: Q, toneMapped: !1 });
|
|
7788
7799
|
}
|
|
7789
7800
|
function V() {
|
|
7790
|
-
|
|
7801
|
+
P.material.map?.dispose(), A.material.map?.dispose(), L.material.map?.dispose(), P.material.dispose(), A.material.dispose(), L.material.dispose(), P.material = Z(r, l.labelX), A.material = Z(s, l.labelY), L.material = Z(a, l.labelZ);
|
|
7791
7802
|
}
|
|
7792
7803
|
}
|
|
7793
7804
|
setLabels;
|
|
@@ -7937,7 +7948,7 @@ function wp(i) {
|
|
|
7937
7948
|
s,
|
|
7938
7949
|
a.itemSize,
|
|
7939
7950
|
a.normalized ? 1 : 0,
|
|
7940
|
-
a instanceof
|
|
7951
|
+
a instanceof Be ? a.gpuType : "",
|
|
7941
7952
|
va(a.array),
|
|
7942
7953
|
"isInterleavedBufferAttribute" in a ? 1 : 0
|
|
7943
7954
|
].join(":");
|
|
@@ -8066,7 +8077,7 @@ function Ip(i) {
|
|
|
8066
8077
|
] : null
|
|
8067
8078
|
};
|
|
8068
8079
|
}
|
|
8069
|
-
function
|
|
8080
|
+
function Pp(i, e) {
|
|
8070
8081
|
const t = e.values;
|
|
8071
8082
|
if (i.blending !== t[2] || i.side !== t[3] || i.vertexColors !== t[4] || i.opacity !== t[5] || i.transparent !== t[6] || i.alphaHash !== t[7] || i.blendSrc !== t[8] || i.blendDst !== t[9] || i.blendEquation !== t[10] || i.blendSrcAlpha !== t[11] || i.blendDstAlpha !== t[12] || i.blendEquationAlpha !== t[13] || i.blendAlpha !== t[14] || i.depthFunc !== t[15] || i.depthTest !== t[16] || i.depthWrite !== t[17] || i.stencilWriteMask !== t[18] || i.stencilFunc !== t[19] || i.stencilRef !== t[20] || i.stencilFuncMask !== t[21] || i.stencilFail !== t[22] || i.stencilZFail !== t[23] || i.stencilZPass !== t[24] || i.stencilWrite !== t[25] || i.clippingPlanes !== t[26] || i.clipIntersection !== t[27] || i.clipShadows !== t[28] || i.shadowSide !== t[29] || i.colorWrite !== t[30] || i.precision !== t[31] || i.polygonOffset !== t[32] || i.polygonOffsetFactor !== t[33] || i.polygonOffsetUnits !== t[34] || i.dithering !== t[35] || i.alphaToCoverage !== t[36] || i.premultipliedAlpha !== t[37] || i.forceSinglePass !== t[38] || i.allowOverride !== t[39] || i.visible !== t[40] || i.toneMapped !== t[41] || i.version !== t[42] || i._alphaTest !== t[43] || i.defines !== t[46] || i.map !== t[47] || i.lightMap !== t[48] || i.lightMapIntensity !== t[49] || i.aoMap !== t[50] || i.aoMapIntensity !== t[51] || i.specularMap !== t[52] || i.alphaMap !== t[53] || i.envMap !== t[54] || i.combine !== t[55] || i.reflectivity !== t[56] || i.refractionRatio !== t[57] || i.roughness !== t[58] || i.metalness !== t[59] || i.emissiveIntensity !== t[60] || i.emissiveMap !== t[61] || i.bumpMap !== t[62] || i.bumpScale !== t[63] || i.normalMap !== t[64] || i.normalMapType !== t[65] || i.displacementMap !== t[66] || i.displacementScale !== t[67] || i.displacementBias !== t[68] || i.roughnessMap !== t[69] || i.metalnessMap !== t[70] || i.envMapIntensity !== t[71] || i.wireframe !== t[72] || i.wireframeLinewidth !== t[73] || i.wireframeLinecap !== t[74] || i.wireframeLinejoin !== t[75] || i.flatShading !== t[76] || i.fog !== t[77] || e.blendColor !== null && (i.blendColor?.getHex?.() ?? null) !== e.blendColor || (i.emissive?.getHex?.() ?? null) !== e.emissive) return !0;
|
|
8072
8083
|
const n = i.envMapRotation;
|
|
@@ -8082,11 +8093,11 @@ function Cp(i, e) {
|
|
|
8082
8093
|
}
|
|
8083
8094
|
return !1;
|
|
8084
8095
|
}
|
|
8085
|
-
function
|
|
8096
|
+
function Cp(i) {
|
|
8086
8097
|
return Tp(i) ? Ip(i) : Sp(i);
|
|
8087
8098
|
}
|
|
8088
8099
|
function Dp(i, e) {
|
|
8089
|
-
return e.kind === "fast" ?
|
|
8100
|
+
return e.kind === "fast" ? Pp(i, e) : Mp(i, e);
|
|
8090
8101
|
}
|
|
8091
8102
|
function Ap(i) {
|
|
8092
8103
|
return i.onBeforeCompile !== Xn.prototype.onBeforeCompile || i.customProgramCacheKey !== Xn.prototype.customProgramCacheKey;
|
|
@@ -8107,7 +8118,7 @@ function Ep(i) {
|
|
|
8107
8118
|
]) ?? null, n.clipIntersection = i.clipIntersection, n.clipShadows = i.clipShadows, n.precision = i.precision, n.defines = i.defines ?? null;
|
|
8108
8119
|
const r = JSON.stringify(n);
|
|
8109
8120
|
return ya.set(i, {
|
|
8110
|
-
snapshot:
|
|
8121
|
+
snapshot: Cp(i),
|
|
8111
8122
|
signature: r
|
|
8112
8123
|
}), r;
|
|
8113
8124
|
} catch {
|
|
@@ -8149,11 +8160,11 @@ function Lp(i, e, t = Il) {
|
|
|
8149
8160
|
vertexByteLength: y
|
|
8150
8161
|
} = d, b = m * (p > 65535 ? 4 : 2);
|
|
8151
8162
|
if (p > bl || m > Sl || y + b + js > Ml) return;
|
|
8152
|
-
const x = a + (f ? p : 0), v = o + (f ? m : 0),
|
|
8163
|
+
const x = a + (f ? p : 0), v = o + (f ? m : 0), C = l + (f ? y : 0), P = v * (x > 65535 ? 4 : 2), A = C + P + (r.length + 1) * js;
|
|
8153
8164
|
(r.length >= e || x > t.maxVertices || v > t.maxIndices || A > t.maxBytes) && c(), s.has(h) || (s.add(h), a += p, o += m, l += y), r.push(u);
|
|
8154
8165
|
}), c(), n;
|
|
8155
8166
|
}
|
|
8156
|
-
function
|
|
8167
|
+
function Rp(i) {
|
|
8157
8168
|
const e = /* @__PURE__ */ new Set();
|
|
8158
8169
|
let t = 0, n = 0, r = 0;
|
|
8159
8170
|
i.forEach((a) => {
|
|
@@ -8170,7 +8181,7 @@ function Bp(i) {
|
|
|
8170
8181
|
const s = n * (t > 65535 ? 4 : 2);
|
|
8171
8182
|
return r + s + i.length * js;
|
|
8172
8183
|
}
|
|
8173
|
-
function
|
|
8184
|
+
function Bp(i) {
|
|
8174
8185
|
if (i instanceof gt || Array.isArray(i.material) || i.matrixWorld.determinant() <= 0) return null;
|
|
8175
8186
|
const e = i.material;
|
|
8176
8187
|
if (!Op(i, e)) return null;
|
|
@@ -8215,7 +8226,7 @@ function kp(i, e) {
|
|
|
8215
8226
|
const h = /* @__PURE__ */ new Map();
|
|
8216
8227
|
return t.forEach((f) => h.set(f, u.addGeometry(f))), Object.keys(s.geometry.attributes).forEach((f) => {
|
|
8217
8228
|
const d = s.geometry.getAttribute(f), p = u.geometry.getAttribute(f);
|
|
8218
|
-
d instanceof
|
|
8229
|
+
d instanceof Be && p instanceof Be && (p.gpuType = d.gpuType);
|
|
8219
8230
|
}), i.forEach((f) => {
|
|
8220
8231
|
const d = h.get(f.source.geometry), p = u.addInstance(d);
|
|
8221
8232
|
u.setMatrixAt(p, f.source.matrixWorld), o && u.setColorAt(
|
|
@@ -8236,7 +8247,7 @@ function zp(i, e) {
|
|
|
8236
8247
|
const t = /* @__PURE__ */ new Map(), n = [], r = /* @__PURE__ */ new Set();
|
|
8237
8248
|
let s = 0, a = 0;
|
|
8238
8249
|
return i.forEach((o) => {
|
|
8239
|
-
const l =
|
|
8250
|
+
const l = Bp(o.source);
|
|
8240
8251
|
if (l === null) return;
|
|
8241
8252
|
const c = t.get(l) ?? [];
|
|
8242
8253
|
c.push(o), t.set(l, c);
|
|
@@ -8248,7 +8259,7 @@ function zp(i, e) {
|
|
|
8248
8259
|
);
|
|
8249
8260
|
l.transparent && c.length > 1 || c.forEach((u) => {
|
|
8250
8261
|
if (u.length < e.minInstances) return;
|
|
8251
|
-
const h =
|
|
8262
|
+
const h = Rp(u);
|
|
8252
8263
|
if (s + h > Tl) return;
|
|
8253
8264
|
const f = kp(u, n.length);
|
|
8254
8265
|
if (!f) {
|
|
@@ -8274,7 +8285,7 @@ function jp(i) {
|
|
|
8274
8285
|
s,
|
|
8275
8286
|
a.itemSize,
|
|
8276
8287
|
a.normalized ? 1 : 0,
|
|
8277
|
-
a instanceof
|
|
8288
|
+
a instanceof Be ? a.gpuType : "",
|
|
8278
8289
|
wa(a.array),
|
|
8279
8290
|
"isInterleavedBufferAttribute" in a ? 1 : 0
|
|
8280
8291
|
].join(":");
|
|
@@ -8390,7 +8401,7 @@ const ms = {
|
|
|
8390
8401
|
minInstances: 2,
|
|
8391
8402
|
maxInstancesPerBatch: 512,
|
|
8392
8403
|
dynamicPromotionFrames: 2
|
|
8393
|
-
}, Yp = 64 * 1024 * 1024, ba = new J(), Xp = new D(0, 0, 0), Sa = new J(), Ma = new
|
|
8404
|
+
}, Yp = 64 * 1024 * 1024, ba = new J(), Xp = new D(0, 0, 0), Sa = new J(), Ma = new Pt();
|
|
8394
8405
|
function qr(i) {
|
|
8395
8406
|
const e = i.material;
|
|
8396
8407
|
return e ? Array.isArray(e) ? [...e] : [e] : [];
|
|
@@ -8421,7 +8432,7 @@ function Ia(i) {
|
|
|
8421
8432
|
i.userData = e;
|
|
8422
8433
|
}
|
|
8423
8434
|
}
|
|
8424
|
-
function
|
|
8435
|
+
function Pa(i, e) {
|
|
8425
8436
|
const t = e.userData;
|
|
8426
8437
|
e.userData = {};
|
|
8427
8438
|
try {
|
|
@@ -8430,24 +8441,24 @@ function Ca(i, e) {
|
|
|
8430
8441
|
e.userData = t;
|
|
8431
8442
|
}
|
|
8432
8443
|
}
|
|
8433
|
-
function
|
|
8434
|
-
if (i instanceof
|
|
8444
|
+
function Pl(i, e, t) {
|
|
8445
|
+
if (i instanceof Ct) {
|
|
8435
8446
|
e.add(i);
|
|
8436
8447
|
return;
|
|
8437
8448
|
}
|
|
8438
8449
|
if (i === null || typeof i != "object" || t.has(i)) return;
|
|
8439
8450
|
const n = Object.getPrototypeOf(i);
|
|
8440
|
-
!Array.isArray(i) && n !== Object.prototype && n !== null || (t.add(i), Object.values(i).forEach((r) =>
|
|
8451
|
+
!Array.isArray(i) && n !== Object.prototype && n !== null || (t.add(i), Object.values(i).forEach((r) => Pl(r, e, t)));
|
|
8441
8452
|
}
|
|
8442
|
-
function
|
|
8453
|
+
function Ca(i) {
|
|
8443
8454
|
const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new WeakSet();
|
|
8444
8455
|
for (const n of i)
|
|
8445
8456
|
Object.values(n).forEach((r) => {
|
|
8446
|
-
r instanceof
|
|
8447
|
-
}), "isShaderMaterial" in n && n.isShaderMaterial &&
|
|
8457
|
+
r instanceof Ct && e.add(r);
|
|
8458
|
+
}), "isShaderMaterial" in n && n.isShaderMaterial && Pl(n.uniforms, e, t);
|
|
8448
8459
|
return e;
|
|
8449
8460
|
}
|
|
8450
|
-
function
|
|
8461
|
+
function Pi(i) {
|
|
8451
8462
|
return i instanceof Fr || i instanceof gt || i instanceof ti || i instanceof eo || Yn(i) || qr(i).some((e) => e.onBeforeRender !== Xn.prototype.onBeforeRender) ? !1 : i instanceof le ? !(i.morphTargetInfluences || Object.keys(i.geometry.morphAttributes).length > 0) : i instanceof Qn || i instanceof qt || i instanceof tt;
|
|
8452
8463
|
}
|
|
8453
8464
|
function Da(i) {
|
|
@@ -8463,7 +8474,7 @@ function Aa(i) {
|
|
|
8463
8474
|
let e = Me.prototype.raycast;
|
|
8464
8475
|
return i instanceof Fe ? e = Fe.prototype.raycast : i instanceof gt ? e = gt.prototype.raycast : i instanceof le ? e = le.prototype.raycast : i instanceof Qn ? e = Qn.prototype.raycast : i instanceof qt ? e = qt.prototype.raycast : i instanceof tt && (e = tt.prototype.raycast), i.raycast !== e;
|
|
8465
8476
|
}
|
|
8466
|
-
function
|
|
8477
|
+
function Cl(i) {
|
|
8467
8478
|
if (!(i instanceof le) || i instanceof Fe || i instanceof gt || Yn(i) || xr(i) || i.matrixWorld.determinant() <= 0) return !1;
|
|
8468
8479
|
const e = i.material;
|
|
8469
8480
|
if (Array.isArray(e)) {
|
|
@@ -8493,15 +8504,15 @@ function Zp(i) {
|
|
|
8493
8504
|
instanceMatrix: t?.instanceMatrix ?? null,
|
|
8494
8505
|
instanceColor: t?.instanceColor ?? null,
|
|
8495
8506
|
instanceCount: t?.count ?? null,
|
|
8496
|
-
canInstance:
|
|
8507
|
+
canInstance: Cl(i),
|
|
8497
8508
|
positiveDeterminant: i.matrixWorld.determinant() > 0,
|
|
8498
|
-
supportedRenderable:
|
|
8509
|
+
supportedRenderable: Pi(i),
|
|
8499
8510
|
batchedMaterialKey: i instanceof le ? Mi(i) : null,
|
|
8500
8511
|
batchedMaterialColor: i instanceof le ? Ii(i) : null
|
|
8501
8512
|
};
|
|
8502
8513
|
}
|
|
8503
8514
|
function Jp(i) {
|
|
8504
|
-
return i instanceof
|
|
8515
|
+
return i instanceof Be ? i.version : i.data.version;
|
|
8505
8516
|
}
|
|
8506
8517
|
function Ea(i) {
|
|
8507
8518
|
const e = i.getIndex();
|
|
@@ -8514,7 +8525,7 @@ function Ea(i) {
|
|
|
8514
8525
|
name: t,
|
|
8515
8526
|
attribute: n,
|
|
8516
8527
|
version: Jp(n),
|
|
8517
|
-
interleaved: !(n instanceof
|
|
8528
|
+
interleaved: !(n instanceof Be)
|
|
8518
8529
|
};
|
|
8519
8530
|
}),
|
|
8520
8531
|
drawRangeStart: i.drawRange.start,
|
|
@@ -8532,7 +8543,7 @@ function $p(i, e) {
|
|
|
8532
8543
|
}
|
|
8533
8544
|
function ef(i, e) {
|
|
8534
8545
|
const t = i, n = i instanceof Fe ? i : null, r = t.material ?? null;
|
|
8535
|
-
if (e.geometry !== (t.geometry ?? null) || e.material !== r || 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 !== (n?.instanceMatrix ?? null) || e.instanceColor !== (n?.instanceColor ?? null) || e.instanceCount !== (n?.count ?? null) || e.canInstance !==
|
|
8546
|
+
if (e.geometry !== (t.geometry ?? null) || e.material !== r || 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 !== (n?.instanceMatrix ?? null) || e.instanceColor !== (n?.instanceColor ?? null) || e.instanceCount !== (n?.count ?? null) || e.canInstance !== Cl(i) || e.positiveDeterminant !== i.matrixWorld.determinant() > 0 || e.supportedRenderable !== Pi(i) || e.batchedMaterialKey !== (i instanceof le ? Mi(i) : null) || e.batchedMaterialColor !== (i instanceof le ? Ii(i) : null) || e.geometryContent && (!t.geometry || $p(t.geometry, e.geometryContent))) return !0;
|
|
8536
8547
|
if (Array.isArray(r)) {
|
|
8537
8548
|
if (!e.materials || e.materials.length !== r.length) return !0;
|
|
8538
8549
|
for (let s = 0; s < r.length; s++)
|
|
@@ -8717,7 +8728,7 @@ class sf {
|
|
|
8717
8728
|
t.dirty = !0;
|
|
8718
8729
|
continue;
|
|
8719
8730
|
}
|
|
8720
|
-
t.sourceSyncRequired = t.dynamicSourceCount > 0, (e || t.materialTexturesDirty) && (t.materialTextures =
|
|
8731
|
+
t.sourceSyncRequired = t.dynamicSourceCount > 0, (e || t.materialTexturesDirty) && (t.materialTextures = Ca(t.materials), t.materialTexturesDirty = !1), (e || t.materialSyncRequired) && (this._syncOwnedProxyMaterials(t), t.materialSyncRequired = !1), t.partial = this._requiresPartialRendering(t), t.proxyGroup.visible = !0, t.stats.active = !0, t.partial ? this._hideManagedSources(t) : (t.savedVisible = t.root.visible, t.savedUpdateMatrixWorld = t.root.updateMatrixWorld, t.root.visible = !1, t.root.updateMatrixWorld = () => {
|
|
8721
8732
|
});
|
|
8722
8733
|
}
|
|
8723
8734
|
if ([...this.roots.values()].some((t) => t.dirty)) {
|
|
@@ -8815,19 +8826,19 @@ class sf {
|
|
|
8815
8826
|
parentVisible: !0
|
|
8816
8827
|
}];
|
|
8817
8828
|
for (r.name = `__auto_instancing_${e.uuid}`, r.matrixAutoUpdate = !1, r.matrixWorldAutoUpdate = !1, r.matrix.identity(), r.matrixWorld.identity(); d.length > 0; ) {
|
|
8818
|
-
const F = d.pop(), { object: E, parentIndex:
|
|
8829
|
+
const F = d.pop(), { object: E, parentIndex: R, childIndex: Z, parentVisible: V } = F;
|
|
8819
8830
|
if (E !== e && E instanceof le && this.outlineSourceSet.has(E) && this.outlineIndependentSources.add(E), E !== e && (this.excludedSubtrees.has(E) || this.outlineIndependentSources.has(E))) {
|
|
8820
8831
|
c.push(E), u.add(E);
|
|
8821
|
-
let K =
|
|
8832
|
+
let K = R;
|
|
8822
8833
|
for (; K >= 0; ) {
|
|
8823
8834
|
const Q = s[K].renderBinding;
|
|
8824
8835
|
Q && f.add(Q), K = s[K].parentIndex;
|
|
8825
8836
|
}
|
|
8826
8837
|
continue;
|
|
8827
8838
|
}
|
|
8828
|
-
const O = s.length, Y = V && E.visible, z =
|
|
8839
|
+
const O = s.length, Y = V && E.visible, z = Pi(E), $ = Qp(E), j = Da(E) && !z || $, X = {
|
|
8829
8840
|
object: E,
|
|
8830
|
-
parentIndex:
|
|
8841
|
+
parentIndex: R,
|
|
8831
8842
|
childIndex: Z,
|
|
8832
8843
|
children: E.children.length > 0 ? [...E.children] : null,
|
|
8833
8844
|
transform: rf(E),
|
|
@@ -8841,7 +8852,7 @@ class sf {
|
|
|
8841
8852
|
};
|
|
8842
8853
|
if (s.push(X), a.set(E, O), u.add(E), j && l.push(O), $) {
|
|
8843
8854
|
c.push(E);
|
|
8844
|
-
let K =
|
|
8855
|
+
let K = R;
|
|
8845
8856
|
for (; K >= 0; ) {
|
|
8846
8857
|
const Q = s[K].renderBinding;
|
|
8847
8858
|
Q && f.add(Q), K = s[K].parentIndex;
|
|
@@ -8875,8 +8886,8 @@ class sf {
|
|
|
8875
8886
|
if (l.forEach((F) => {
|
|
8876
8887
|
let E = s[F].parentIndex;
|
|
8877
8888
|
for (; E >= 0; ) {
|
|
8878
|
-
const
|
|
8879
|
-
|
|
8889
|
+
const R = s[E].renderBinding;
|
|
8890
|
+
R && f.add(R), E = s[E].parentIndex;
|
|
8880
8891
|
}
|
|
8881
8892
|
}), f.size > 0)
|
|
8882
8893
|
for (let F = o.length - 1; F >= 0; F--) {
|
|
@@ -8888,9 +8899,9 @@ class sf {
|
|
|
8888
8899
|
}), o.length = 0);
|
|
8889
8900
|
const p = new Set(o), m = /* @__PURE__ */ new Set(), y = [], b = /* @__PURE__ */ new Map(), x = this._supportsMultiDraw();
|
|
8890
8901
|
h.forEach((F) => {
|
|
8891
|
-
const E = F.filter((
|
|
8892
|
-
for (let
|
|
8893
|
-
const Z = E.slice(
|
|
8902
|
+
const E = F.filter((R) => p.has(R));
|
|
8903
|
+
for (let R = 0; R < E.length; R += t.maxInstancesPerBatch) {
|
|
8904
|
+
const Z = E.slice(R, R + t.maxInstancesPerBatch);
|
|
8894
8905
|
if (Z.length < t.minInstances) continue;
|
|
8895
8906
|
const V = Z[0].source, O = new Fe(V.geometry, V.material, Z.length), Y = {
|
|
8896
8907
|
kind: "instanced",
|
|
@@ -8899,7 +8910,7 @@ class sf {
|
|
|
8899
8910
|
visibleCount: 0,
|
|
8900
8911
|
matrixNeedsUpdate: !0
|
|
8901
8912
|
};
|
|
8902
|
-
O.name = `__auto_instances_${V.geometry.uuid}_${
|
|
8913
|
+
O.name = `__auto_instances_${V.geometry.uuid}_${R}`, O.instanceMatrix.setUsage(th), gs(V, O), Z.forEach((z, $) => {
|
|
8903
8914
|
z.proxy = O, z.batch = Y, z.instanceId = $, m.add(z), this.sourceToProxy.set(z.source, O), this.sourceBindings.set(z.source, z);
|
|
8904
8915
|
}), this.proxyBindings.set(O, { proxy: O, sources: Z }), r.add(O), y.push(Y);
|
|
8905
8916
|
}
|
|
@@ -8920,9 +8931,9 @@ class sf {
|
|
|
8920
8931
|
visibleCount: 0,
|
|
8921
8932
|
faceEnds: F.faceEnds
|
|
8922
8933
|
};
|
|
8923
|
-
E.bindings.forEach((
|
|
8924
|
-
|
|
8925
|
-
|
|
8934
|
+
E.bindings.forEach((R, Z) => {
|
|
8935
|
+
R.proxy = E.proxy, R.batch = E, R.instanceId = Z, m.add(R), this.sourceToProxy.set(R.source, E.proxy), this.sourceBindings.set(R.source, R), R.renderState.geometryContent = Ea(
|
|
8936
|
+
R.source.geometry
|
|
8926
8937
|
);
|
|
8927
8938
|
}), this.proxyBindings.set(E.proxy, {
|
|
8928
8939
|
proxy: E.proxy,
|
|
@@ -8935,9 +8946,9 @@ class sf {
|
|
|
8935
8946
|
).map((E) => ({ source: E.source, value: E })),
|
|
8936
8947
|
t
|
|
8937
8948
|
).batches.forEach((E) => {
|
|
8938
|
-
let
|
|
8949
|
+
let R = E.ownedMaterial;
|
|
8939
8950
|
const Z = !!(t.transparentSinglePass && !Array.isArray(E.proxy.material) && E.proxy.material.transparent && E.proxy.material.side === nt);
|
|
8940
|
-
Z && (
|
|
8951
|
+
Z && (R || (R = Ia(E.proxy.material), E.proxy.material = R), R.forceSinglePass = !0);
|
|
8941
8952
|
const V = {
|
|
8942
8953
|
kind: "batched",
|
|
8943
8954
|
proxy: E.proxy,
|
|
@@ -8946,8 +8957,8 @@ class sf {
|
|
|
8946
8957
|
boundsNeedsUpdate: !1,
|
|
8947
8958
|
forceTransparentSinglePass: Z,
|
|
8948
8959
|
usesInstanceColor: E.usesInstanceColor,
|
|
8949
|
-
ownedMaterial:
|
|
8950
|
-
sourceMaterialVersion:
|
|
8960
|
+
ownedMaterial: R,
|
|
8961
|
+
sourceMaterialVersion: R ? E.values[0].source.material.version : void 0
|
|
8951
8962
|
};
|
|
8952
8963
|
V.bindings.forEach((O, Y) => {
|
|
8953
8964
|
O.proxy = V.proxy, O.batch = V, O.instanceId = Y, m.add(O), this.sourceToProxy.set(O.source, V.proxy), this.sourceBindings.set(O.source, O), O.renderState.geometryContent = Ea(
|
|
@@ -8956,8 +8967,8 @@ class sf {
|
|
|
8956
8967
|
}), this.proxyBindings.set(V.proxy, { proxy: V.proxy, sources: V.bindings }), r.add(V.proxy), y.push(V);
|
|
8957
8968
|
}), o.forEach((F) => {
|
|
8958
8969
|
if (m.has(F)) return;
|
|
8959
|
-
const E = F.source,
|
|
8960
|
-
if (
|
|
8970
|
+
const E = F.source, R = Ta(E);
|
|
8971
|
+
if (R.name = `__auto_proxy_${E.uuid}`, R.matrixAutoUpdate = !1, R.matrix.copy(E.matrixWorld), gs(E, R), t.transparentSinglePass && E instanceof le && R instanceof le && !xr(E) && !Array.isArray(E.material) && E.material.transparent && E.material.side === nt) {
|
|
8961
8972
|
const Z = E.material;
|
|
8962
8973
|
let V = b.get(Z);
|
|
8963
8974
|
if (!V) {
|
|
@@ -8968,23 +8979,23 @@ class sf {
|
|
|
8968
8979
|
sourceMaterialVersion: Z.version
|
|
8969
8980
|
}, b.set(Z, V);
|
|
8970
8981
|
}
|
|
8971
|
-
|
|
8982
|
+
R.material = V.proxyMaterial;
|
|
8972
8983
|
}
|
|
8973
|
-
E instanceof Fe &&
|
|
8984
|
+
E instanceof Fe && R instanceof Fe && (R.instanceMatrix = E.instanceMatrix, R.instanceColor = E.instanceColor, R.morphTexture = E.morphTexture), F.proxy = R, this.sourceToProxy.set(E, R), this.sourceBindings.set(E, F), this.proxyBindings.set(R, { proxy: R, sources: [F] }), r.add(R);
|
|
8974
8985
|
});
|
|
8975
|
-
const
|
|
8986
|
+
const C = y.filter(
|
|
8976
8987
|
(F) => F.kind === "instanced"
|
|
8977
|
-
),
|
|
8988
|
+
), P = y.filter(
|
|
8978
8989
|
(F) => F.kind === "merged"
|
|
8979
8990
|
), A = y.filter(
|
|
8980
8991
|
(F) => F.kind === "batched"
|
|
8981
|
-
), L =
|
|
8992
|
+
), L = C.reduce(
|
|
8982
8993
|
(F, E) => F + E.bindings.length,
|
|
8983
8994
|
0
|
|
8984
8995
|
), G = A.reduce(
|
|
8985
8996
|
(F, E) => F + E.bindings.length,
|
|
8986
8997
|
0
|
|
8987
|
-
), H =
|
|
8998
|
+
), H = P.reduce(
|
|
8988
8999
|
(F, E) => F + E.bindings.length,
|
|
8989
9000
|
0
|
|
8990
9001
|
), q = new Set(o.flatMap((F) => qr(F.source))), te = {
|
|
@@ -9000,9 +9011,9 @@ class sf {
|
|
|
9000
9011
|
sourceObjects: u,
|
|
9001
9012
|
materials: q,
|
|
9002
9013
|
ownedProxyMaterials: b,
|
|
9003
|
-
bounds: new
|
|
9014
|
+
bounds: new Pt(),
|
|
9004
9015
|
boundsDirty: !0,
|
|
9005
|
-
materialTextures:
|
|
9016
|
+
materialTextures: Ca(q),
|
|
9006
9017
|
outsideParentMatrix: e.parent?.matrixWorld.clone() ?? Sa.clone(),
|
|
9007
9018
|
outsideParentVisible: !0,
|
|
9008
9019
|
dirty: !1,
|
|
@@ -9022,9 +9033,9 @@ class sf {
|
|
|
9022
9033
|
active: !1,
|
|
9023
9034
|
sourceObjects: s.length,
|
|
9024
9035
|
sourceRenderables: o.length,
|
|
9025
|
-
instancedBatches:
|
|
9036
|
+
instancedBatches: C.length,
|
|
9026
9037
|
instancedObjects: L,
|
|
9027
|
-
mergedBatches:
|
|
9038
|
+
mergedBatches: P.length,
|
|
9028
9039
|
mergedObjects: H,
|
|
9029
9040
|
batchedBatches: A.length,
|
|
9030
9041
|
batchedObjects: G,
|
|
@@ -9049,26 +9060,26 @@ class sf {
|
|
|
9049
9060
|
if (!t && !o && !u && e.sourceSyncIndexes !== null) {
|
|
9050
9061
|
const y = /* @__PURE__ */ new Set([...e.sourceSyncIndexes, ...e.dynamicTrackedIndexes]), b = [...y];
|
|
9051
9062
|
for (let x = 0; x < b.length; x++)
|
|
9052
|
-
r[b[x]].object.children.forEach((
|
|
9053
|
-
const
|
|
9054
|
-
|
|
9063
|
+
r[b[x]].object.children.forEach((C) => {
|
|
9064
|
+
const P = e.trackedIndexes.get(C);
|
|
9065
|
+
P === void 0 || y.has(P) || (y.add(P), b.push(P));
|
|
9055
9066
|
});
|
|
9056
9067
|
p = [...y].sort((x, v) => x - v), d = p;
|
|
9057
9068
|
}
|
|
9058
9069
|
for (const y of d) {
|
|
9059
|
-
const b = r[y], { object: x, transform: v, parentIndex:
|
|
9060
|
-
if (
|
|
9061
|
-
const
|
|
9062
|
-
if (x.parent !==
|
|
9070
|
+
const b = r[y], { object: x, transform: v, parentIndex: C, childIndex: P } = b;
|
|
9071
|
+
if (C >= 0) {
|
|
9072
|
+
const R = r[C].object;
|
|
9073
|
+
if (x.parent !== R || R.children[P] !== x) return !0;
|
|
9063
9074
|
}
|
|
9064
9075
|
if (nf(x, b.children)) return !0;
|
|
9065
9076
|
let A = !1;
|
|
9066
9077
|
const L = v.matrixAutoUpdate !== x.matrixAutoUpdate;
|
|
9067
9078
|
x.matrixAutoUpdate ? (A = 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), A && x.updateMatrix(), v.manualMatrix = null) : (A = 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, A ? (b.localChangeFrames++, b.localChangeFrames >= e.options.dynamicPromotionFrames && this._promoteDynamicDescendants(e, y) && (h = !0)) : b.localChangeFrames = 0;
|
|
9068
|
-
const G =
|
|
9079
|
+
const G = C >= 0 ? r[C].worldChanged : o, H = C >= 0 ? r[C].object.matrixWorld : a, q = v.matrixWorldAutoUpdate !== x.matrixWorldAutoUpdate;
|
|
9069
9080
|
x.matrixWorldAutoUpdate ? (b.worldChanged = q || A || G, b.worldChanged && x.matrixWorld.multiplyMatrices(H, x.matrix), v.manualWorldMatrix = null) : (b.worldChanged = q || v.manualWorldMatrix === null || !v.manualWorldMatrix.equals(x.matrixWorld), v.manualWorldMatrix ? v.manualWorldMatrix.copy(x.matrixWorld) : v.manualWorldMatrix = x.matrixWorld.clone()), b.worldChanged && Da(x) && (f = !0), v.matrixWorldAutoUpdate = x.matrixWorldAutoUpdate, x.matrixWorldNeedsUpdate = !1;
|
|
9070
|
-
const F = (
|
|
9071
|
-
if (b.visibilityChanged = b.visible !== x.visible || b.worldVisible !== F ||
|
|
9081
|
+
const F = (C >= 0 ? r[C].worldVisible : l) && x.visible;
|
|
9082
|
+
if (b.visibilityChanged = b.visible !== x.visible || b.worldVisible !== F || C < 0 && u, b.visible = x.visible, b.worldVisible = F, b.renderBinding && ef(x, b.renderBinding.renderState)) return !0;
|
|
9072
9083
|
const E = b.worldChanged || b.visibilityChanged;
|
|
9073
9084
|
this.dynamicSources.has(x) ? (E ? b.stableFrames = 0 : b.stableFrames++, b.stableFrames >= e.options.dynamicPromotionFrames && (this.dynamicSources.delete(x), e.dynamicSourceCount--, e.dynamicTrackedIndexes.delete(y), b.stableFrames = 0, h = !0)) : b.stableFrames = 0, b.renderBinding?.batch?.kind === "merged" && E && !this.dynamicSources.has(x) && (this.dynamicSources.add(x), e.dynamicSourceCount++, e.dynamicTrackedIndexes.add(y), b.stableFrames = 0, h = !0);
|
|
9074
9085
|
}
|
|
@@ -9135,13 +9146,13 @@ class sf {
|
|
|
9135
9146
|
_syncOwnedProxyMaterials(e) {
|
|
9136
9147
|
e.ownedProxyMaterials.forEach((t) => {
|
|
9137
9148
|
const { sourceMaterial: n, proxyMaterial: r } = t, s = n.version, a = t.sourceMaterialVersion !== s;
|
|
9138
|
-
|
|
9149
|
+
Pa(r, n), r.userData = n.userData, r.onBeforeCompile = n.onBeforeCompile, r.customProgramCacheKey = n.customProgramCacheKey, r.forceSinglePass = !0, a && (r.needsUpdate = !0), t.sourceMaterialVersion = s;
|
|
9139
9150
|
}), e.batches.forEach((t) => {
|
|
9140
9151
|
if (t.kind !== "batched" || !t.ownedMaterial) return;
|
|
9141
9152
|
const n = t.bindings[0].source.material;
|
|
9142
9153
|
if (Array.isArray(n)) return;
|
|
9143
9154
|
const r = n.version, s = t.sourceMaterialVersion !== r;
|
|
9144
|
-
|
|
9155
|
+
Pa(t.ownedMaterial, n), t.usesInstanceColor && "color" in t.ownedMaterial && t.ownedMaterial.color.setHex(16777215), t.ownedMaterial.onBeforeCompile = n.onBeforeCompile, t.ownedMaterial.customProgramCacheKey = n.customProgramCacheKey, t.ownedMaterial.forceSinglePass = t.forceTransparentSinglePass ? !0 : n.forceSinglePass, s && (t.ownedMaterial.needsUpdate = !0), t.sourceMaterialVersion = r;
|
|
9145
9156
|
});
|
|
9146
9157
|
}
|
|
9147
9158
|
_ensureOutlineProxy(e) {
|
|
@@ -9340,7 +9351,7 @@ const be = {
|
|
|
9340
9351
|
};
|
|
9341
9352
|
let Oa = 0, La = 0;
|
|
9342
9353
|
const Vn = (i) => {
|
|
9343
|
-
i instanceof
|
|
9354
|
+
i instanceof Ct && i.dispose();
|
|
9344
9355
|
};
|
|
9345
9356
|
class af {
|
|
9346
9357
|
constructor(e, t, n) {
|
|
@@ -9719,13 +9730,13 @@ class af {
|
|
|
9719
9730
|
}, { effectManager: f } = this, d = f.effectsMap.get(qe.CONSTANTS.outlineEffect), p = a.length > 0;
|
|
9720
9731
|
d.enabled !== p && (d.enabled = p, f.effectsNeedsUpdate = !0);
|
|
9721
9732
|
const { effect: m } = d, { uniforms: y } = m, b = [];
|
|
9722
|
-
a.forEach((
|
|
9723
|
-
|
|
9733
|
+
a.forEach((P) => {
|
|
9734
|
+
P.traverse((A) => {
|
|
9724
9735
|
A instanceof le && b.push(A);
|
|
9725
9736
|
});
|
|
9726
9737
|
}), this.outlineSelection = b, m.selection.set(this.autoInstancingManager.setOutlineSelection(b)), m.blur = u > 0, m.blurPass.kernelSize = u;
|
|
9727
|
-
const x = y.get("visibleEdgeColor"), v = y.get("hiddenEdgeColor"),
|
|
9728
|
-
x && x.value.set(l), v && v.value.set(c),
|
|
9738
|
+
const x = y.get("visibleEdgeColor"), v = y.get("hiddenEdgeColor"), C = y.get("edgeStrength");
|
|
9739
|
+
x && x.value.set(l), v && v.value.set(c), C && (C.value = h), this._triggerRender();
|
|
9729
9740
|
};
|
|
9730
9741
|
this.signals.outlineChange.add(n);
|
|
9731
9742
|
}
|
|
@@ -9844,7 +9855,7 @@ class Dl extends De {
|
|
|
9844
9855
|
super(e), this.stype = "PluginObject";
|
|
9845
9856
|
}
|
|
9846
9857
|
}
|
|
9847
|
-
function
|
|
9858
|
+
function Ci(i) {
|
|
9848
9859
|
return i === "2d" || i === "2D";
|
|
9849
9860
|
}
|
|
9850
9861
|
function Di(i) {
|
|
@@ -9867,12 +9878,12 @@ class Yt extends De {
|
|
|
9867
9878
|
this.elementType = t, this.element = n, this.elementAutoDisplay = r, this.occlude = s, this.occludeThrottle = a, this.onChange = o, this.scaleFixed = l, this.create(t);
|
|
9868
9879
|
}
|
|
9869
9880
|
create(e) {
|
|
9870
|
-
|
|
9881
|
+
Ci(e) ? this._create2D() : Di(e) ? this._create2DHalf() : Ai(e) && this._create3D();
|
|
9871
9882
|
}
|
|
9872
9883
|
getBoundingBox(e = 50) {
|
|
9873
9884
|
e = e <= 0 ? 50 : e;
|
|
9874
9885
|
const t = this.getWorldPosition(new D()), n = new D(e, e, e);
|
|
9875
|
-
return new
|
|
9886
|
+
return new Pt(t.clone().sub(n), t.add(n));
|
|
9876
9887
|
}
|
|
9877
9888
|
_create2D() {
|
|
9878
9889
|
this.add(new vi(this.element));
|
|
@@ -9922,7 +9933,7 @@ class Kr extends De {
|
|
|
9922
9933
|
getBoundingBox(e = 50) {
|
|
9923
9934
|
e = e <= 0 ? 50 : e;
|
|
9924
9935
|
const t = this.getWorldPosition(new D()), n = new D(e, e, e);
|
|
9925
|
-
return new
|
|
9936
|
+
return new Pt(t.clone().sub(n), t.add(n));
|
|
9926
9937
|
}
|
|
9927
9938
|
copy(e, t = !1) {
|
|
9928
9939
|
return super.copy(e, t), this.icon = e.icon?.clone(), this.text = e.text?.clone(), this.clear(), this.icon && this.add(this.icon), this.text && this.add(this.text), this.iconType = e.iconType, this.scaleFixed = e.scaleFixed, this;
|
|
@@ -10081,16 +10092,16 @@ class pt extends De {
|
|
|
10081
10092
|
}
|
|
10082
10093
|
if (t)
|
|
10083
10094
|
for (let d = 0; d < h.graphs.length; d++) {
|
|
10084
|
-
const { linkInfo: p, targetNodeId: m, passable: y } = h.graphs[d], { id: b, name: x } = p, v = this.info.nodes.find((
|
|
10095
|
+
const { linkInfo: p, targetNodeId: m, passable: y } = h.graphs[d], { id: b, name: x } = p, v = this.info.nodes.find((C) => C.id === m);
|
|
10085
10096
|
if (!u.includes(b) && v) {
|
|
10086
10097
|
u.push(b);
|
|
10087
|
-
const
|
|
10098
|
+
const C = ys(r, y), P = this.createLink({
|
|
10088
10099
|
id: b,
|
|
10089
10100
|
name: x,
|
|
10090
10101
|
start: h.position,
|
|
10091
10102
|
end: v.position,
|
|
10092
10103
|
width: n,
|
|
10093
|
-
color:
|
|
10104
|
+
color: C,
|
|
10094
10105
|
imgUrl: l,
|
|
10095
10106
|
transparent: !!l,
|
|
10096
10107
|
passable: y,
|
|
@@ -10099,7 +10110,7 @@ class pt extends De {
|
|
|
10099
10110
|
endNodeId: v.id
|
|
10100
10111
|
}
|
|
10101
10112
|
});
|
|
10102
|
-
this.links.push(
|
|
10113
|
+
this.links.push(P);
|
|
10103
10114
|
}
|
|
10104
10115
|
}
|
|
10105
10116
|
}
|
|
@@ -10218,12 +10229,12 @@ class pt extends De {
|
|
|
10218
10229
|
imgUrl: r,
|
|
10219
10230
|
transparent: !!r,
|
|
10220
10231
|
passable: d
|
|
10221
|
-
}, v = l.find((
|
|
10232
|
+
}, v = l.find((C) => C.sid === p);
|
|
10222
10233
|
if (v)
|
|
10223
10234
|
v.updateGeometry({ start: x.start, end: x.end }), b && v.material.color.set(b), v.passable = d;
|
|
10224
10235
|
else {
|
|
10225
|
-
const
|
|
10226
|
-
this.links.push(
|
|
10236
|
+
const C = this.createLink(x);
|
|
10237
|
+
this.links.push(C);
|
|
10227
10238
|
}
|
|
10228
10239
|
}
|
|
10229
10240
|
}
|
|
@@ -10402,7 +10413,7 @@ class wr extends De {
|
|
|
10402
10413
|
return null;
|
|
10403
10414
|
}
|
|
10404
10415
|
}
|
|
10405
|
-
class
|
|
10416
|
+
class Rl extends Ue {
|
|
10406
10417
|
constructor(e, t, n) {
|
|
10407
10418
|
super(e, t, n), this.stype = "Ground";
|
|
10408
10419
|
}
|
|
@@ -10417,7 +10428,7 @@ function df(i, e, t) {
|
|
|
10417
10428
|
n.push(...r[e]);
|
|
10418
10429
|
}
|
|
10419
10430
|
}
|
|
10420
|
-
const Hs = [new oe(), new oe(), new oe(), new oe()], It = [new D(), new D(), new D(), new D()], pf = [new J(), new J(), new J(), new J()],
|
|
10431
|
+
const Hs = [new oe(), new oe(), new oe(), new oe()], It = [new D(), new D(), new D(), new D()], pf = [new J(), new J(), new J(), new J()], Bl = [new ue(), new ue(), new ue(), new ue()];
|
|
10421
10432
|
function ff(i, e, t) {
|
|
10422
10433
|
return e.clone().sub(i).lengthSq() <= t ** 2;
|
|
10423
10434
|
}
|
|
@@ -10476,9 +10487,9 @@ function kl(i, e, t, n = !1) {
|
|
|
10476
10487
|
}), r;
|
|
10477
10488
|
}
|
|
10478
10489
|
function gf(i, e = {}) {
|
|
10479
|
-
const { indexes: t, a: n, b: r, c: s, equalVertexIndexMap: a, faceIndex: o, onlyC: l, maxCount: c = l ? 2 : 3, positions: u, getParentMidpoint: h, isAncestor: f, getDepth: d } = i, p = t.length / 3, m = o ?? Math.trunc(p / 2), y = a ? (O) => a[O] : (O) => O, b = y(n), x = y(r), v = y(s),
|
|
10480
|
-
let
|
|
10481
|
-
o != null && d && (A = d(o) + 1,
|
|
10490
|
+
const { indexes: t, a: n, b: r, c: s, equalVertexIndexMap: a, faceIndex: o, onlyC: l, maxCount: c = l ? 2 : 3, positions: u, getParentMidpoint: h, isAncestor: f, getDepth: d } = i, p = t.length / 3, m = o ?? Math.trunc(p / 2), y = a ? (O) => a[O] : (O) => O, b = y(n), x = y(r), v = y(s), C = [];
|
|
10491
|
+
let P = () => 0, A = 0;
|
|
10492
|
+
o != null && d && (A = d(o) + 1, P = (O) => A - d(O));
|
|
10482
10493
|
const [L, G, H] = It;
|
|
10483
10494
|
let q = () => null;
|
|
10484
10495
|
u && (L.set(0, 0, 0), [n, r, s].forEach((O) => {
|
|
@@ -10494,7 +10505,7 @@ function gf(i, e = {}) {
|
|
|
10494
10505
|
function te(O) {
|
|
10495
10506
|
const Y = O * 3, z = t.slice(Y, Y + 3);
|
|
10496
10507
|
if (e[O]) {
|
|
10497
|
-
const $ =
|
|
10508
|
+
const $ = P(O);
|
|
10498
10509
|
return $ > 0 ? null : $ < 0 ? { posIndexes: z, consumed: !0 } : q(O, z);
|
|
10499
10510
|
}
|
|
10500
10511
|
return { posIndexes: z };
|
|
@@ -10514,18 +10525,18 @@ function gf(i, e = {}) {
|
|
|
10514
10525
|
const ie = [X, Q];
|
|
10515
10526
|
ie.push(3 - ie[0] - ie[1]);
|
|
10516
10527
|
const re = { a: z[ie[0]], b: z[ie[1]], c: z[ie[2]] };
|
|
10517
|
-
|
|
10528
|
+
C.push({ a: s, b: r, c: re.c, d: n, order: ie, real: re, faceIndex: O, consumed: $ });
|
|
10518
10529
|
break;
|
|
10519
10530
|
}
|
|
10520
10531
|
case de: {
|
|
10521
10532
|
const ie = [K, X];
|
|
10522
10533
|
ie.push(3 - ie[0] - ie[1]);
|
|
10523
10534
|
const re = { a: z[ie[0]], b: z[ie[1]], c: z[ie[2]] };
|
|
10524
|
-
|
|
10535
|
+
C.push({ a: n, b: s, c: re.c, d: r, order: ie, real: re, faceIndex: O, consumed: $ });
|
|
10525
10536
|
break;
|
|
10526
10537
|
}
|
|
10527
10538
|
}
|
|
10528
|
-
return
|
|
10539
|
+
return C.length === c;
|
|
10529
10540
|
} : function(O) {
|
|
10530
10541
|
const Y = te(O);
|
|
10531
10542
|
if (!Y)
|
|
@@ -10538,29 +10549,29 @@ function gf(i, e = {}) {
|
|
|
10538
10549
|
const re = [Q, K];
|
|
10539
10550
|
re.push(3 - re[0] - re[1]);
|
|
10540
10551
|
const Te = { a: z[re[0]], b: z[re[1]], c: z[re[2]] };
|
|
10541
|
-
|
|
10552
|
+
C.push({ a: s, b: r, c: Te.c, d: n, order: re, real: Te, faceIndex: O, consumed: $ });
|
|
10542
10553
|
break;
|
|
10543
10554
|
}
|
|
10544
10555
|
case de: {
|
|
10545
10556
|
const re = [X, Q];
|
|
10546
10557
|
re.push(3 - re[0] - re[1]);
|
|
10547
10558
|
const Te = { a: z[re[0]], b: z[re[1]], c: z[re[2]] };
|
|
10548
|
-
|
|
10559
|
+
C.push({ a: n, b: s, c: Te.c, d: r, order: re, real: Te, faceIndex: O, consumed: $ });
|
|
10549
10560
|
break;
|
|
10550
10561
|
}
|
|
10551
10562
|
default: {
|
|
10552
10563
|
const re = [K, X];
|
|
10553
10564
|
re.push(3 - re[0] - re[1]);
|
|
10554
10565
|
const Te = { a: z[re[0]], b: z[re[1]], c: z[re[2]] };
|
|
10555
|
-
|
|
10566
|
+
C.push({ a: r, b: n, c: Te.c, d: s, order: re, real: Te, faceIndex: O, consumed: $ });
|
|
10556
10567
|
}
|
|
10557
10568
|
}
|
|
10558
|
-
return
|
|
10569
|
+
return C.length === c;
|
|
10559
10570
|
};
|
|
10560
|
-
let E = m,
|
|
10571
|
+
let E = m, R = m, Z = !0, V = !0;
|
|
10561
10572
|
for (; Z || V; ) {
|
|
10562
10573
|
if (Z) {
|
|
10563
|
-
if (E--, E < 0 && (E += p), E ===
|
|
10574
|
+
if (E--, E < 0 && (E += p), E === R)
|
|
10564
10575
|
break;
|
|
10565
10576
|
if (E === m)
|
|
10566
10577
|
Z = !1;
|
|
@@ -10568,15 +10579,15 @@ function gf(i, e = {}) {
|
|
|
10568
10579
|
break;
|
|
10569
10580
|
}
|
|
10570
10581
|
if (V) {
|
|
10571
|
-
if (
|
|
10582
|
+
if (R++, R === p && (R = 0), E === R)
|
|
10572
10583
|
break;
|
|
10573
|
-
if (
|
|
10584
|
+
if (R === m)
|
|
10574
10585
|
V = !1;
|
|
10575
|
-
else if (!f(
|
|
10586
|
+
else if (!f(R) && F(R))
|
|
10576
10587
|
break;
|
|
10577
10588
|
}
|
|
10578
10589
|
}
|
|
10579
|
-
return
|
|
10590
|
+
return C;
|
|
10580
10591
|
}
|
|
10581
10592
|
function zl(i) {
|
|
10582
10593
|
const e = new Array(i);
|
|
@@ -10736,7 +10747,7 @@ class Er extends Me {
|
|
|
10736
10747
|
}
|
|
10737
10748
|
var vf = Object.defineProperty, xf = (i, e, t) => e in i ? vf(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, _n = (i, e, t) => (xf(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
10738
10749
|
function wf(i) {
|
|
10739
|
-
return i.w !== void 0 ? [
|
|
10750
|
+
return i.w !== void 0 ? [Rr, 4] : i.z !== void 0 ? [D, 3] : [oe, 2];
|
|
10740
10751
|
}
|
|
10741
10752
|
function Hn(i, e) {
|
|
10742
10753
|
const t = e.toArray(), n = t.findIndex((s) => s !== 0);
|
|
@@ -10745,7 +10756,7 @@ function Hn(i, e) {
|
|
|
10745
10756
|
const r = i.toArray()[n];
|
|
10746
10757
|
return r === 0 ? 1 / 0 : t[n] / r;
|
|
10747
10758
|
}
|
|
10748
|
-
function
|
|
10759
|
+
function Ra(i, e) {
|
|
10749
10760
|
const t = i.clone().cross(e);
|
|
10750
10761
|
return typeof t == "number" ? t === 0 : t.lengthSq() === 0;
|
|
10751
10762
|
}
|
|
@@ -10919,9 +10930,9 @@ new J(
|
|
|
10919
10930
|
var ce = /* @__PURE__ */ ((i) => (i[i.ThroughIntersect = 1] = "ThroughIntersect", i[i.JointIntersect = 2] = "JointIntersect", i[i.Intersect = 3] = "Intersect", i[i.Tangency = 4] = "Tangency", i[i.Contain = 8] = "Contain", i[i.Dissociation = 16] = "Dissociation", i))(ce || {});
|
|
10920
10931
|
function Tf(i, e) {
|
|
10921
10932
|
const [t, n] = i, r = n.clone().sub(t), [s, a] = e, o = a.clone().sub(s);
|
|
10922
|
-
if (
|
|
10933
|
+
if (Ra(o, r)) {
|
|
10923
10934
|
const l = s.clone().sub(t);
|
|
10924
|
-
return
|
|
10935
|
+
return Ra(l, r) ? ce.Tangency : ce.Dissociation;
|
|
10925
10936
|
}
|
|
10926
10937
|
return ce.Intersect;
|
|
10927
10938
|
}
|
|
@@ -10932,7 +10943,7 @@ function If(i, e) {
|
|
|
10932
10943
|
const h = s.clone().sub(t).cross(o), f = u === 2 ? h / l : Hn(l, h);
|
|
10933
10944
|
return r.clone().multiplyScalar(f).add(t);
|
|
10934
10945
|
}
|
|
10935
|
-
function
|
|
10946
|
+
function Pf(i, e) {
|
|
10936
10947
|
const [t, n] = i, [r, s] = e, a = n.clone().sub(t), o = Tf(i, e);
|
|
10937
10948
|
if (o === ce.Tangency) {
|
|
10938
10949
|
let f = 0, d = 0;
|
|
@@ -10972,14 +10983,14 @@ function Or(i, e) {
|
|
|
10972
10983
|
}
|
|
10973
10984
|
return r ? ce.Tangency : ce.Contain;
|
|
10974
10985
|
}
|
|
10975
|
-
function
|
|
10986
|
+
function Cf(i, e) {
|
|
10976
10987
|
const t = i.length;
|
|
10977
10988
|
let n = 0;
|
|
10978
10989
|
for (let o = 0; o < t; o++) {
|
|
10979
10990
|
const l = i[o];
|
|
10980
10991
|
let c = o + 1;
|
|
10981
10992
|
c === t && (c = 0);
|
|
10982
|
-
const u = i[c], h =
|
|
10993
|
+
const u = i[c], h = Pf([l, u], e);
|
|
10983
10994
|
if (h & (ce.ThroughIntersect | ce.Tangency | ce.Contain))
|
|
10984
10995
|
return h;
|
|
10985
10996
|
h === ce.JointIntersect && n++;
|
|
@@ -10997,7 +11008,7 @@ function Df(i, e) {
|
|
|
10997
11008
|
const o = i[a];
|
|
10998
11009
|
let l = a + 1;
|
|
10999
11010
|
l === t && (l = 0);
|
|
11000
|
-
const c = i[l], u =
|
|
11011
|
+
const c = i[l], u = Cf(e, [o, c]);
|
|
11001
11012
|
if (u === ce.ThroughIntersect)
|
|
11002
11013
|
return u;
|
|
11003
11014
|
u === ce.JointIntersect ? n++ : u === ce.Tangency && (r = !0);
|
|
@@ -11165,7 +11176,7 @@ class Lr extends Er {
|
|
|
11165
11176
|
const { matrixWorld: A } = u;
|
|
11166
11177
|
h = A.clone().multiply(c);
|
|
11167
11178
|
}
|
|
11168
|
-
const [f, d] = It, p =
|
|
11179
|
+
const [f, d] = It, p = Bl[0];
|
|
11169
11180
|
h.decompose(f, p, d);
|
|
11170
11181
|
const m = [n, n + t], y = [];
|
|
11171
11182
|
a.toArray(y), f.toArray(y, y.length);
|
|
@@ -11173,8 +11184,8 @@ class Lr extends Er {
|
|
|
11173
11184
|
o.toArray(b), p.toArray(b, b.length);
|
|
11174
11185
|
const x = [];
|
|
11175
11186
|
l.toArray(x), d.toArray(x, x.length);
|
|
11176
|
-
const v = new Dt(`${s}.position`, m, y),
|
|
11177
|
-
return [v,
|
|
11187
|
+
const v = new Dt(`${s}.position`, m, y), C = new At(`${s}.quaternion`, m, b), P = new Dt(`${s}.scale`, m, x);
|
|
11188
|
+
return [v, C, P];
|
|
11178
11189
|
}
|
|
11179
11190
|
/**
|
|
11180
11191
|
* 为当前的三角面创建一个Mesh
|
|
@@ -11242,25 +11253,25 @@ class Li extends Lr {
|
|
|
11242
11253
|
const { geometry: y, matrixWorld: b } = u, x = new J();
|
|
11243
11254
|
h == null ? x.copy(b) : (u.getMatrixAt(h, x), x.premultiply(b));
|
|
11244
11255
|
const v = pf[0].copy(x).invert();
|
|
11245
|
-
let
|
|
11256
|
+
let C;
|
|
11246
11257
|
switch (a) {
|
|
11247
11258
|
case 1: {
|
|
11248
|
-
|
|
11259
|
+
C = d;
|
|
11249
11260
|
break;
|
|
11250
11261
|
}
|
|
11251
11262
|
case 2: {
|
|
11252
|
-
|
|
11263
|
+
C = r.clone().negate(), C.transformDirection(v);
|
|
11253
11264
|
break;
|
|
11254
11265
|
}
|
|
11255
11266
|
default:
|
|
11256
|
-
|
|
11267
|
+
C = m.normal;
|
|
11257
11268
|
}
|
|
11258
|
-
return f.applyMatrix4(v), new Li({ ...o, geometry: y, origin: f, faceIndex: p, normal:
|
|
11269
|
+
return f.applyMatrix4(v), new Li({ ...o, geometry: y, origin: f, faceIndex: p, normal: C, angle: s, meshMatrix: x });
|
|
11259
11270
|
}
|
|
11260
11271
|
updateMatrix() {
|
|
11261
11272
|
if (!this.xyPlane)
|
|
11262
11273
|
return super.updateMatrix();
|
|
11263
|
-
const { origin: e, normal: t, angle: n, xyPlaneMatrix: r } = this, [s, a] =
|
|
11274
|
+
const { origin: e, normal: t, angle: n, xyPlaneMatrix: r } = this, [s, a] = Bl, o = It[0];
|
|
11264
11275
|
o.set(0, 0, 1), s.setFromUnitVectors(o, t), a.setFromAxisAngle(o, n), s.multiply(a), r.makeRotationFromQuaternion(s), r.setPosition(e), this.matrix.copy(r).invert();
|
|
11265
11276
|
}
|
|
11266
11277
|
/**
|
|
@@ -11435,11 +11446,11 @@ class Li extends Lr {
|
|
|
11435
11446
|
function Ef(i, e, t) {
|
|
11436
11447
|
for (let n = 0; n < t.length; n++) {
|
|
11437
11448
|
const r = t[n];
|
|
11438
|
-
i =
|
|
11449
|
+
i = Ba(i, e, n, r), i = Ba(i, e, n, -r);
|
|
11439
11450
|
}
|
|
11440
11451
|
return i;
|
|
11441
11452
|
}
|
|
11442
|
-
function
|
|
11453
|
+
function Ba(i, e, t, n, r) {
|
|
11443
11454
|
const s = i.length;
|
|
11444
11455
|
if (!r) {
|
|
11445
11456
|
r = [];
|
|
@@ -11457,7 +11468,7 @@ function Ra(i, e, t, n, r) {
|
|
|
11457
11468
|
const f = c[0][t] - n, d = u[0][t] - n, p = h[0][t] - n;
|
|
11458
11469
|
let m = f > 0, y = d > 0, b = p > 0;
|
|
11459
11470
|
n < 0 && (m = !m, y = !y, b = !b);
|
|
11460
|
-
let x, v,
|
|
11471
|
+
let x, v, C, P;
|
|
11461
11472
|
switch (m + y + b) {
|
|
11462
11473
|
case 0: {
|
|
11463
11474
|
for (let A = 0; A < s; A++)
|
|
@@ -11465,15 +11476,15 @@ function Ra(i, e, t, n, r) {
|
|
|
11465
11476
|
break;
|
|
11466
11477
|
}
|
|
11467
11478
|
case 1: {
|
|
11468
|
-
m ? (x = u, v = h,
|
|
11479
|
+
m ? (x = u, v = h, C = Qe(h, c, t, n), P = Qe(u, c, t, n)) : y ? (x = h, v = c, C = Qe(c, u, t, n), P = Qe(h, u, t, n)) : (x = c, v = u, C = Qe(u, h, t, n), P = Qe(c, h, t, n));
|
|
11469
11480
|
for (let A = 0; A < s; A++)
|
|
11470
|
-
r[A].push(...x[A], ...v[A], ...
|
|
11481
|
+
r[A].push(...x[A], ...v[A], ...C[A]), r[A].push(...C[A], ...P[A], ...x[A]);
|
|
11471
11482
|
break;
|
|
11472
11483
|
}
|
|
11473
11484
|
case 2: {
|
|
11474
|
-
m ? y ? (x = h, v = Qe(c, h, t, n),
|
|
11485
|
+
m ? y ? (x = h, v = Qe(c, h, t, n), C = Qe(u, h, t, n)) : (x = u, v = Qe(h, u, t, n), C = Qe(c, u, t, n)) : (x = c, v = Qe(u, c, t, n), C = Qe(h, c, t, n));
|
|
11475
11486
|
for (let A = 0; A < s; A++)
|
|
11476
|
-
r[A].push(...x[A], ...v[A], ...
|
|
11487
|
+
r[A].push(...x[A], ...v[A], ...C[A]);
|
|
11477
11488
|
break;
|
|
11478
11489
|
}
|
|
11479
11490
|
}
|
|
@@ -11564,8 +11575,8 @@ class Lf extends Ae {
|
|
|
11564
11575
|
for (let x = 0; x < h; x++) {
|
|
11565
11576
|
const v = x * u;
|
|
11566
11577
|
d.fromArray(f, v), p.fromArray(e, v);
|
|
11567
|
-
let
|
|
11568
|
-
s !== 0 && (m.subVectors(p, y),
|
|
11578
|
+
let C = r;
|
|
11579
|
+
s !== 0 && (m.subVectors(p, y), C += m.dot(d) * s), C !== 0 && (m.copy(d).multiplyScalar(C), p.add(m)), p.toArray(b, v);
|
|
11569
11580
|
}
|
|
11570
11581
|
return b;
|
|
11571
11582
|
}
|
|
@@ -11630,7 +11641,7 @@ class Lf extends Ae {
|
|
|
11630
11641
|
return u.applyMatrix3(c), u;
|
|
11631
11642
|
}
|
|
11632
11643
|
}
|
|
11633
|
-
class
|
|
11644
|
+
class Rf extends Lf {
|
|
11634
11645
|
constructor(e) {
|
|
11635
11646
|
super(), se(this, "isRigidDecalGeometry", !0), se(this, "object"), se(this, "origin", new D()), se(this, "direction", new D()), se(this, "angle", -0), se(this, "_size", new oe()), se(this, "cutPositions", []), se(this, "flatPositions", []), se(this, "averageFlatPositions"), se(this, "faceTree", null), se(this, "branchFace", !1), this.setOptions(e);
|
|
11636
11647
|
}
|
|
@@ -11783,7 +11794,7 @@ class Ks extends De {
|
|
|
11783
11794
|
if (n.map?.dispose(), t)
|
|
11784
11795
|
n.map = t;
|
|
11785
11796
|
else {
|
|
11786
|
-
const s = new
|
|
11797
|
+
const s = new Ct();
|
|
11787
11798
|
s.image = await Ur.loadAsync(e), s.colorSpace = mt, s.needsUpdate = !0, n.map = s, Fa.set(e, s);
|
|
11788
11799
|
}
|
|
11789
11800
|
n.needsUpdate = !0;
|
|
@@ -11798,7 +11809,7 @@ class Ks extends De {
|
|
|
11798
11809
|
r.color.set(t), r.opacity = n;
|
|
11799
11810
|
}
|
|
11800
11811
|
}
|
|
11801
|
-
function
|
|
11812
|
+
function Bf(i) {
|
|
11802
11813
|
const e = Ff(i), t = new J();
|
|
11803
11814
|
t.setFromMatrix3(e);
|
|
11804
11815
|
const n = i[0], r = t.clone();
|
|
@@ -11849,17 +11860,17 @@ function Ul(i, e) {
|
|
|
11849
11860
|
const t = yn(e);
|
|
11850
11861
|
return i.intersectsBox(t);
|
|
11851
11862
|
}
|
|
11852
|
-
function
|
|
11863
|
+
function Ri(i, e, t) {
|
|
11853
11864
|
if (typeof i == "string") {
|
|
11854
11865
|
let n = e ? t?.get(i) : null;
|
|
11855
11866
|
return n || (n = Jt.load(i, () => {
|
|
11856
11867
|
be.needsUpdate = !0;
|
|
11857
11868
|
}), t?.set(i, n)), n;
|
|
11858
11869
|
}
|
|
11859
|
-
return i instanceof HTMLImageElement ? new
|
|
11870
|
+
return i instanceof HTMLImageElement ? new Ct(i) : i instanceof HTMLCanvasElement ? new ei(i) : new gh(i);
|
|
11860
11871
|
}
|
|
11861
11872
|
function zf(i, e, t, n) {
|
|
11862
|
-
const r = i.map, s =
|
|
11873
|
+
const r = i.map, s = Ri(e, t, n);
|
|
11863
11874
|
if (r) {
|
|
11864
11875
|
const a = s.source;
|
|
11865
11876
|
s.copy(r), s.source = a;
|
|
@@ -11867,7 +11878,7 @@ function zf(i, e, t, n) {
|
|
|
11867
11878
|
return i.map = s, s;
|
|
11868
11879
|
}
|
|
11869
11880
|
function Nf(i, e) {
|
|
11870
|
-
const { top: t, left: n, bottom: r, right: s, front: a, back: o } = i, l = new D(s, t, a), c = new D(n, r, o), u = new
|
|
11881
|
+
const { top: t, left: n, bottom: r, right: s, front: a, back: o } = i, l = new D(s, t, a), c = new D(n, r, o), u = new Pt();
|
|
11871
11882
|
return function(f) {
|
|
11872
11883
|
return u.max.addVectors(f, l), u.min.subVectors(f, c), e.filter((d) => Ul(u, d));
|
|
11873
11884
|
};
|
|
@@ -11911,7 +11922,7 @@ class jl extends Ue {
|
|
|
11911
11922
|
const b = n ? {
|
|
11912
11923
|
transparent: !0,
|
|
11913
11924
|
...y,
|
|
11914
|
-
map:
|
|
11925
|
+
map: Ri(n, m, t)
|
|
11915
11926
|
} : y;
|
|
11916
11927
|
this.geometry = new gn(s, a), this.material = c ? new $s(b) : new fn(b), this.material.depthWrite = !this.material.transparent, this.image = n;
|
|
11917
11928
|
}
|
|
@@ -11919,11 +11930,11 @@ class jl extends Ue {
|
|
|
11919
11930
|
class Gl extends Ue {
|
|
11920
11931
|
image;
|
|
11921
11932
|
constructor(e, t) {
|
|
11922
|
-
const { points: n, image: r, color: s, needLight: a, id: o, name: l, userData: c, level: u, visible: h, cache: f, ...d } = e, p = n.map((
|
|
11933
|
+
const { points: n, image: r, color: s, needLight: a, id: o, name: l, userData: c, level: u, visible: h, cache: f, ...d } = e, p = n.map((C) => new D(C.x, C.y, C.z)), m = r ? {
|
|
11923
11934
|
transparent: !0,
|
|
11924
11935
|
...d,
|
|
11925
|
-
map:
|
|
11926
|
-
} : d, y = a ? new $s(m) : new fn(m), { geometry: b, position: x } =
|
|
11936
|
+
map: Ri(r, f ?? !0, t)
|
|
11937
|
+
} : d, y = a ? new $s(m) : new fn(m), { geometry: b, position: x } = Bf(p), v = { id: o, name: l, userData: c, level: u, visible: h };
|
|
11927
11938
|
super(v, b, y), this.position.copy(x), this.material = y, this.geometry = b, this.image = r;
|
|
11928
11939
|
}
|
|
11929
11940
|
}
|
|
@@ -11935,7 +11946,7 @@ const ka = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11935
11946
|
Circle: Oi,
|
|
11936
11947
|
Decal: Ks,
|
|
11937
11948
|
DecalUVMapType: zt,
|
|
11938
|
-
Ground:
|
|
11949
|
+
Ground: Rl,
|
|
11939
11950
|
Group: Zt,
|
|
11940
11951
|
Icon: _s,
|
|
11941
11952
|
Line: Ol,
|
|
@@ -11952,7 +11963,7 @@ const ka = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11952
11963
|
Topology: pt,
|
|
11953
11964
|
clearLinkTextureCache: cf,
|
|
11954
11965
|
isPoiNode25D: Di,
|
|
11955
|
-
isPoiNode2D:
|
|
11966
|
+
isPoiNode2D: Ci,
|
|
11956
11967
|
isPoiNode3D: Ai
|
|
11957
11968
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11958
11969
|
function Vl(i) {
|
|
@@ -12059,8 +12070,8 @@ class Hf extends Za {
|
|
|
12059
12070
|
b,
|
|
12060
12071
|
x,
|
|
12061
12072
|
{ delay: f, duration: d, mode: p, repeat: m, yoyo: y },
|
|
12062
|
-
(v,
|
|
12063
|
-
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:
|
|
12073
|
+
(v, C) => {
|
|
12074
|
+
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: C });
|
|
12064
12075
|
},
|
|
12065
12076
|
(v) => {
|
|
12066
12077
|
this.tweenSet.add(v), this.dispatchEvent({ type: "start", tween: v });
|
|
@@ -12385,7 +12396,7 @@ class Yf extends xt {
|
|
|
12385
12396
|
});
|
|
12386
12397
|
}
|
|
12387
12398
|
}
|
|
12388
|
-
let fe,
|
|
12399
|
+
let fe, Pe, je;
|
|
12389
12400
|
class Xf extends Sr {
|
|
12390
12401
|
constructor(e) {
|
|
12391
12402
|
super(e);
|
|
@@ -12420,7 +12431,7 @@ class Qf {
|
|
|
12420
12431
|
this.textureLoader = e, this.manager = t;
|
|
12421
12432
|
}
|
|
12422
12433
|
parse() {
|
|
12423
|
-
|
|
12434
|
+
Pe = this.parseConnections();
|
|
12424
12435
|
const e = this.parseImages(), t = this.parseTextures(e), n = this.parseMaterials(t), r = this.parseDeformers(), s = new Zf().parse(r);
|
|
12425
12436
|
return this.parseScene(r, s, n), je;
|
|
12426
12437
|
}
|
|
@@ -12531,14 +12542,14 @@ class Qf {
|
|
|
12531
12542
|
// load a texture specified as a blob or data URI, or via an external URL using TextureLoader
|
|
12532
12543
|
loadTexture(e, t) {
|
|
12533
12544
|
let n;
|
|
12534
|
-
const r = this.textureLoader.path, s =
|
|
12545
|
+
const r = this.textureLoader.path, s = Pe.get(e.id).children;
|
|
12535
12546
|
s !== void 0 && s.length > 0 && t[s[0].ID] !== void 0 && (n = t[s[0].ID], (n.indexOf("blob:") === 0 || n.indexOf("data:") === 0) && this.textureLoader.setPath(void 0));
|
|
12536
12547
|
let a;
|
|
12537
12548
|
const o = e.FileName.slice(-3).toLowerCase();
|
|
12538
12549
|
if (o === "tga") {
|
|
12539
12550
|
const l = this.manager.getHandler(".tga");
|
|
12540
|
-
l === null ? (console.warn("FBXLoader: TGA loader not found, creating placeholder texture for", e.RelativeFilename), a = new
|
|
12541
|
-
} else o === "psd" ? (console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for", e.RelativeFilename), a = new
|
|
12551
|
+
l === null ? (console.warn("FBXLoader: TGA loader not found, creating placeholder texture for", e.RelativeFilename), a = new Ct()) : (l.setPath(this.textureLoader.path), a = l.load(n));
|
|
12552
|
+
} else o === "psd" ? (console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for", e.RelativeFilename), a = new Ct()) : a = this.textureLoader.load(n);
|
|
12542
12553
|
return this.textureLoader.setPath(r), a;
|
|
12543
12554
|
}
|
|
12544
12555
|
// Parse nodes in FBXTree.Objects.Material
|
|
@@ -12559,7 +12570,7 @@ class Qf {
|
|
|
12559
12570
|
parseMaterial(e, t) {
|
|
12560
12571
|
const n = e.id, r = e.attrName;
|
|
12561
12572
|
let s = e.ShadingModel;
|
|
12562
|
-
if (typeof s == "object" && (s = s.value), !
|
|
12573
|
+
if (typeof s == "object" && (s = s.value), !Pe.has(n)) return null;
|
|
12563
12574
|
const a = this.parseParameters(e, t, n);
|
|
12564
12575
|
let o;
|
|
12565
12576
|
switch (s.toLowerCase()) {
|
|
@@ -12579,7 +12590,7 @@ class Qf {
|
|
|
12579
12590
|
const r = {};
|
|
12580
12591
|
e.BumpFactor && (r.bumpScale = e.BumpFactor.value), e.Diffuse ? r.color = new ge().fromArray(e.Diffuse.value).convertSRGBToLinear() : e.DiffuseColor && (e.DiffuseColor.type === "Color" || e.DiffuseColor.type === "ColorRGB") && (r.color = new ge().fromArray(e.DiffuseColor.value).convertSRGBToLinear()), e.DisplacementFactor && (r.displacementScale = e.DisplacementFactor.value), e.Emissive ? r.emissive = new ge().fromArray(e.Emissive.value).convertSRGBToLinear() : e.EmissiveColor && (e.EmissiveColor.type === "Color" || e.EmissiveColor.type === "ColorRGB") && (r.emissive = new ge().fromArray(e.EmissiveColor.value).convertSRGBToLinear()), e.EmissiveFactor && (r.emissiveIntensity = parseFloat(e.EmissiveFactor.value)), e.Opacity && (r.opacity = parseFloat(e.Opacity.value)), r.opacity < 1 && (r.transparent = !0), e.ReflectionFactor, e.Shininess, e.Specular || e.SpecularColor && e.SpecularColor.type;
|
|
12581
12592
|
const s = this;
|
|
12582
|
-
return
|
|
12593
|
+
return Pe.get(n).children.forEach(function(a) {
|
|
12583
12594
|
const o = a.relationship;
|
|
12584
12595
|
switch (o) {
|
|
12585
12596
|
case "Bump":
|
|
@@ -12603,7 +12614,7 @@ class Qf {
|
|
|
12603
12614
|
r.normalMap = s.getTexture(t, a.ID);
|
|
12604
12615
|
break;
|
|
12605
12616
|
case "ReflectionColor":
|
|
12606
|
-
r.envMap = s.getTexture(t, a.ID), r.envMap !== void 0 && (r.envMap.mapping =
|
|
12617
|
+
r.envMap = s.getTexture(t, a.ID), r.envMap !== void 0 && (r.envMap.mapping = Ps, r.envMap.colorSpace = mt);
|
|
12607
12618
|
break;
|
|
12608
12619
|
case "SpecularColor":
|
|
12609
12620
|
r.specularMap = s.getTexture(t, a.ID), r.specularMap !== void 0 && (r.specularMap.colorSpace = mt);
|
|
@@ -12621,7 +12632,7 @@ class Qf {
|
|
|
12621
12632
|
}
|
|
12622
12633
|
// get a texture from the textureMap for use by a material.
|
|
12623
12634
|
getTexture(e, t) {
|
|
12624
|
-
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 =
|
|
12635
|
+
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 = Pe.get(t).children[0].ID), e.get(t);
|
|
12625
12636
|
}
|
|
12626
12637
|
// Parse nodes in FBXTree.Objects.Deformer
|
|
12627
12638
|
// Deformer node can contain skinning or Vertex Cache animation data, however only skinning is supported here
|
|
@@ -12631,7 +12642,7 @@ class Qf {
|
|
|
12631
12642
|
if ("Deformer" in fe.Objects) {
|
|
12632
12643
|
const n = fe.Objects.Deformer;
|
|
12633
12644
|
for (const r in n) {
|
|
12634
|
-
const s = n[r], a =
|
|
12645
|
+
const s = n[r], a = Pe.get(parseInt(r));
|
|
12635
12646
|
if (s.attrType === "Skin") {
|
|
12636
12647
|
const o = this.parseSkeleton(a, n);
|
|
12637
12648
|
o.ID = r, 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[r] = o;
|
|
@@ -12681,7 +12692,7 @@ class Qf {
|
|
|
12681
12692
|
fullWeights: a.FullWeights.a
|
|
12682
12693
|
};
|
|
12683
12694
|
if (a.attrType !== "BlendShapeChannel") return;
|
|
12684
|
-
o.geoID =
|
|
12695
|
+
o.geoID = Pe.get(parseInt(s.ID)).children.filter(function(l) {
|
|
12685
12696
|
return l.relationship === void 0;
|
|
12686
12697
|
})[0].ID, n.push(o);
|
|
12687
12698
|
}
|
|
@@ -12693,7 +12704,7 @@ class Qf {
|
|
|
12693
12704
|
const r = this.parseModels(e.skeletons, t, n), s = fe.Objects.Model, a = this;
|
|
12694
12705
|
r.forEach(function(l) {
|
|
12695
12706
|
const c = s[l.ID];
|
|
12696
|
-
a.setLookAtProperties(l, c),
|
|
12707
|
+
a.setLookAtProperties(l, c), Pe.get(l.ID).parents.forEach(function(h) {
|
|
12697
12708
|
const f = r.get(h.ID);
|
|
12698
12709
|
f !== void 0 && f.add(l);
|
|
12699
12710
|
}), l.parent === null && je.add(l);
|
|
@@ -12711,7 +12722,7 @@ class Qf {
|
|
|
12711
12722
|
parseModels(e, t, n) {
|
|
12712
12723
|
const r = /* @__PURE__ */ new Map(), s = fe.Objects.Model;
|
|
12713
12724
|
for (const a in s) {
|
|
12714
|
-
const o = parseInt(a), l = s[a], c =
|
|
12725
|
+
const o = parseInt(a), l = s[a], c = Pe.get(o);
|
|
12715
12726
|
let u = this.buildSkeleton(c, e, o, l.attrName);
|
|
12716
12727
|
if (!u) {
|
|
12717
12728
|
switch (l.attrType) {
|
|
@@ -12817,9 +12828,9 @@ class Qf {
|
|
|
12817
12828
|
break;
|
|
12818
12829
|
case 2:
|
|
12819
12830
|
let c = Math.PI / 3;
|
|
12820
|
-
n.InnerAngle !== void 0 && (c =
|
|
12831
|
+
n.InnerAngle !== void 0 && (c = Re.degToRad(n.InnerAngle.value));
|
|
12821
12832
|
let u = 0;
|
|
12822
|
-
n.OuterAngle !== void 0 && (u =
|
|
12833
|
+
n.OuterAngle !== void 0 && (u = Re.degToRad(n.OuterAngle.value), u = Math.max(u, 1)), t = new io(s, a, o, c, u, l);
|
|
12823
12834
|
break;
|
|
12824
12835
|
default:
|
|
12825
12836
|
console.warn("THREE.FBXLoader: Unknown light type " + n.LightType.value + ", defaulting to a PointLight."), t = new Es(s, a);
|
|
@@ -12857,7 +12868,7 @@ class Qf {
|
|
|
12857
12868
|
"InheritType" in t && (n.inheritType = parseInt(t.InheritType.value)), "RotationOrder" in t ? n.eulerOrder = Hl(t.RotationOrder.value) : n.eulerOrder = "ZYX", "Lcl_Translation" in t && (n.translation = t.Lcl_Translation.value), "PreRotation" in t && (n.preRotation = t.PreRotation.value), "Lcl_Rotation" in t && (n.rotation = t.Lcl_Rotation.value), "PostRotation" in t && (n.postRotation = t.PostRotation.value), "Lcl_Scaling" in t && (n.scale = t.Lcl_Scaling.value), "ScalingOffset" in t && (n.scalingOffset = t.ScalingOffset.value), "ScalingPivot" in t && (n.scalingPivot = t.ScalingPivot.value), "RotationOffset" in t && (n.rotationOffset = t.RotationOffset.value), "RotationPivot" in t && (n.rotationPivot = t.RotationPivot.value), e.userData.transformData = n;
|
|
12858
12869
|
}
|
|
12859
12870
|
setLookAtProperties(e, t) {
|
|
12860
|
-
"LookAtProperty" in t &&
|
|
12871
|
+
"LookAtProperty" in t && Pe.get(e.ID).children.forEach(function(r) {
|
|
12861
12872
|
if (r.relationship === "LookAtProperty") {
|
|
12862
12873
|
const s = fe.Objects.Model[r.ID];
|
|
12863
12874
|
if ("Lcl_Translation" in s) {
|
|
@@ -12871,10 +12882,10 @@ class Qf {
|
|
|
12871
12882
|
const r = this.parsePoseNodes();
|
|
12872
12883
|
for (const s in e) {
|
|
12873
12884
|
const a = e[s];
|
|
12874
|
-
|
|
12885
|
+
Pe.get(parseInt(a.ID)).parents.forEach(function(l) {
|
|
12875
12886
|
if (t.has(l.ID)) {
|
|
12876
12887
|
const c = l.ID;
|
|
12877
|
-
|
|
12888
|
+
Pe.get(c).parents.forEach(function(h) {
|
|
12878
12889
|
n.has(h.ID) && n.get(h.ID).bind(new Js(a.bones), r[h.ID]);
|
|
12879
12890
|
});
|
|
12880
12891
|
}
|
|
@@ -12916,7 +12927,7 @@ class Zf {
|
|
|
12916
12927
|
if ("Geometry" in fe.Objects) {
|
|
12917
12928
|
const n = fe.Objects.Geometry;
|
|
12918
12929
|
for (const r in n) {
|
|
12919
|
-
const s =
|
|
12930
|
+
const s = Pe.get(parseInt(r)), a = this.parseGeometry(s, n[r], e);
|
|
12920
12931
|
t.set(parseInt(r), a);
|
|
12921
12932
|
}
|
|
12922
12933
|
}
|
|
@@ -13014,17 +13025,17 @@ class Zf {
|
|
|
13014
13025
|
x.push(v.weight), b.push(v.id);
|
|
13015
13026
|
}), x.length > 4) {
|
|
13016
13027
|
s || (console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."), s = !0);
|
|
13017
|
-
const v = [0, 0, 0, 0],
|
|
13018
|
-
x.forEach(function(
|
|
13019
|
-
let L =
|
|
13020
|
-
|
|
13028
|
+
const v = [0, 0, 0, 0], C = [0, 0, 0, 0];
|
|
13029
|
+
x.forEach(function(P, A) {
|
|
13030
|
+
let L = P, G = b[A];
|
|
13031
|
+
C.forEach(function(H, q, te) {
|
|
13021
13032
|
if (L > H) {
|
|
13022
13033
|
te[q] = L, L = H;
|
|
13023
13034
|
const F = v[q];
|
|
13024
13035
|
v[q] = G, G = F;
|
|
13025
13036
|
}
|
|
13026
13037
|
});
|
|
13027
|
-
}), b = v, x =
|
|
13038
|
+
}), b = v, x = C;
|
|
13028
13039
|
}
|
|
13029
13040
|
for (; x.length < 4; )
|
|
13030
13041
|
x.push(0), b.push(0);
|
|
@@ -13035,9 +13046,9 @@ class Zf {
|
|
|
13035
13046
|
const v = pr(p, n, d, e.normal);
|
|
13036
13047
|
o.push(v[0], v[1], v[2]);
|
|
13037
13048
|
}
|
|
13038
|
-
e.material && e.material.mappingType !== "AllSame" && (m = pr(p, n, d, e.material)[0], m < 0 && (f.negativeMaterialIndices = !0, m = 0)), e.uv && e.uv.forEach(function(v,
|
|
13039
|
-
const
|
|
13040
|
-
c[
|
|
13049
|
+
e.material && e.material.mappingType !== "AllSame" && (m = pr(p, n, d, e.material)[0], m < 0 && (f.negativeMaterialIndices = !0, m = 0)), e.uv && e.uv.forEach(function(v, C) {
|
|
13050
|
+
const P = pr(p, n, d, v);
|
|
13051
|
+
c[C] === void 0 && (c[C] = []), c[C].push(P[0]), c[C].push(P[1]);
|
|
13041
13052
|
}), r++, y && (f.genFace(t, e, a, m, o, l, c, u, h, r), n++, r = 0, a = [], o = [], l = [], c = [], u = [], h = []);
|
|
13042
13053
|
}), t;
|
|
13043
13054
|
}
|
|
@@ -13181,7 +13192,7 @@ class Zf {
|
|
|
13181
13192
|
return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s", e.Order, e.id), new Ae();
|
|
13182
13193
|
const n = t - 1, r = e.KnotVector.a, s = [], a = e.Points.a;
|
|
13183
13194
|
for (let h = 0, f = a.length; h < f; h += 4)
|
|
13184
|
-
s.push(new
|
|
13195
|
+
s.push(new Rr().fromArray(a, h));
|
|
13185
13196
|
let o, l;
|
|
13186
13197
|
if (e.Form === "Closed")
|
|
13187
13198
|
s.push(s[0]);
|
|
@@ -13240,7 +13251,7 @@ class Jf {
|
|
|
13240
13251
|
id: t[n].id,
|
|
13241
13252
|
times: t[n].KeyTime.a.map(rm),
|
|
13242
13253
|
values: t[n].KeyValueFloat.a
|
|
13243
|
-
}, s =
|
|
13254
|
+
}, s = Pe.get(r.id);
|
|
13244
13255
|
if (s !== void 0) {
|
|
13245
13256
|
const a = s.parents[0].ID, o = s.parents[0].relationship;
|
|
13246
13257
|
o.match(/X/) ? e.get(a).curves.x = r : o.match(/Y/) ? e.get(a).curves.y = r : o.match(/Z/) ? e.get(a).curves.z = r : o.match(/DeformPercent/) && e.has(a) && (e.get(a).curves.morph = r);
|
|
@@ -13253,13 +13264,13 @@ class Jf {
|
|
|
13253
13264
|
parseAnimationLayers(e) {
|
|
13254
13265
|
const t = fe.Objects.AnimationLayer, n = /* @__PURE__ */ new Map();
|
|
13255
13266
|
for (const r in t) {
|
|
13256
|
-
const s = [], a =
|
|
13267
|
+
const s = [], a = Pe.get(parseInt(r));
|
|
13257
13268
|
a !== void 0 && (a.children.forEach(function(l, c) {
|
|
13258
13269
|
if (e.has(l.ID)) {
|
|
13259
13270
|
const u = e.get(l.ID);
|
|
13260
13271
|
if (u.curves.x !== void 0 || u.curves.y !== void 0 || u.curves.z !== void 0) {
|
|
13261
13272
|
if (s[c] === void 0) {
|
|
13262
|
-
const h =
|
|
13273
|
+
const h = Pe.get(l.ID).parents.filter(function(f) {
|
|
13263
13274
|
return f.relationship !== void 0;
|
|
13264
13275
|
})[0].ID;
|
|
13265
13276
|
if (h !== void 0) {
|
|
@@ -13283,9 +13294,9 @@ class Jf {
|
|
|
13283
13294
|
s[c] && (s[c][u.attr] = u);
|
|
13284
13295
|
} else if (u.curves.morph !== void 0) {
|
|
13285
13296
|
if (s[c] === void 0) {
|
|
13286
|
-
const h =
|
|
13297
|
+
const h = Pe.get(l.ID).parents.filter(function(b) {
|
|
13287
13298
|
return b.relationship !== void 0;
|
|
13288
|
-
})[0].ID, f =
|
|
13299
|
+
})[0].ID, f = Pe.get(h).parents[0].ID, d = Pe.get(f).parents[0].ID, p = Pe.get(d).parents[0].ID, m = fe.Objects.Model[p], y = {
|
|
13289
13300
|
modelName: m.attrName ? Mr.sanitizeNodeName(m.attrName) : "",
|
|
13290
13301
|
morphName: fe.Objects.Deformer[h].attrName
|
|
13291
13302
|
};
|
|
@@ -13303,7 +13314,7 @@ class Jf {
|
|
|
13303
13314
|
parseAnimStacks(e) {
|
|
13304
13315
|
const t = fe.Objects.AnimationStack, n = {};
|
|
13305
13316
|
for (const r in t) {
|
|
13306
|
-
const s =
|
|
13317
|
+
const s = Pe.get(parseInt(r)).children;
|
|
13307
13318
|
s.length > 1 && console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");
|
|
13308
13319
|
const a = e.get(s[0].ID);
|
|
13309
13320
|
n[r] = {
|
|
@@ -13351,7 +13362,7 @@ class Jf {
|
|
|
13351
13362
|
const h = this.interpolateRotations(t.x, t.y, t.z, s);
|
|
13352
13363
|
a = h[0], o = h[1];
|
|
13353
13364
|
}
|
|
13354
|
-
n !== void 0 && (n = n.map(
|
|
13365
|
+
n !== void 0 && (n = n.map(Re.degToRad), n.push(s), n = new me().fromArray(n), n = new ue().setFromEuler(n)), r !== void 0 && (r = r.map(Re.degToRad), r.push(s), r = new me().fromArray(r), r = new ue().setFromEuler(r).invert());
|
|
13355
13366
|
const l = new ue(), c = new me(), u = [];
|
|
13356
13367
|
if (!o || !a) return new At(e + ".quaternion", [], []);
|
|
13357
13368
|
for (let h = 0; h < o.length; h += 3)
|
|
@@ -13409,7 +13420,7 @@ class Jf {
|
|
|
13409
13420
|
// PI, so we'll interpolate large rotations
|
|
13410
13421
|
interpolateRotations(e, t, n, r) {
|
|
13411
13422
|
const s = [], a = [];
|
|
13412
|
-
s.push(e.times[0]), a.push(
|
|
13423
|
+
s.push(e.times[0]), a.push(Re.degToRad(e.values[0])), a.push(Re.degToRad(t.values[0])), a.push(Re.degToRad(n.values[0]));
|
|
13413
13424
|
for (let o = 1; o < e.values.length; o++) {
|
|
13414
13425
|
const l = [
|
|
13415
13426
|
e.values[o - 1],
|
|
@@ -13418,14 +13429,14 @@ class Jf {
|
|
|
13418
13429
|
];
|
|
13419
13430
|
if (isNaN(l[0]) || isNaN(l[1]) || isNaN(l[2]))
|
|
13420
13431
|
continue;
|
|
13421
|
-
const c = l.map(
|
|
13432
|
+
const c = l.map(Re.degToRad), u = [
|
|
13422
13433
|
e.values[o],
|
|
13423
13434
|
t.values[o],
|
|
13424
13435
|
n.values[o]
|
|
13425
13436
|
];
|
|
13426
13437
|
if (isNaN(u[0]) || isNaN(u[1]) || isNaN(u[2]))
|
|
13427
13438
|
continue;
|
|
13428
|
-
const h = u.map(
|
|
13439
|
+
const h = u.map(Re.degToRad), f = [
|
|
13429
13440
|
u[0] - l[0],
|
|
13430
13441
|
u[1] - l[1],
|
|
13431
13442
|
u[2] - l[2]
|
|
@@ -13437,11 +13448,11 @@ class Jf {
|
|
|
13437
13448
|
if (d[0] >= 180 || d[1] >= 180 || d[2] >= 180) {
|
|
13438
13449
|
const m = Math.max(...d) / 180, y = new me(...c, r), b = new me(...h, r), x = new ue().setFromEuler(y), v = new ue().setFromEuler(b);
|
|
13439
13450
|
x.dot(v) && v.set(-v.x, -v.y, -v.z, -v.w);
|
|
13440
|
-
const
|
|
13451
|
+
const C = e.times[o - 1], P = e.times[o] - C, A = new ue(), L = new me();
|
|
13441
13452
|
for (let G = 0; G < 1; G += 1 / m)
|
|
13442
|
-
A.copy(x.clone().slerp(v.clone(), G)), s.push(
|
|
13453
|
+
A.copy(x.clone().slerp(v.clone(), G)), s.push(C + G * P), L.setFromQuaternion(A, r), a.push(L.x), a.push(L.y), a.push(L.z);
|
|
13443
13454
|
} else
|
|
13444
|
-
s.push(e.times[o]), a.push(
|
|
13455
|
+
s.push(e.times[o]), a.push(Re.degToRad(e.values[o])), a.push(Re.degToRad(t.values[o])), a.push(Re.degToRad(n.values[o]));
|
|
13445
13456
|
}
|
|
13446
13457
|
return [s, a];
|
|
13447
13458
|
}
|
|
@@ -13822,15 +13833,15 @@ const Ss = new me(), ln = new D();
|
|
|
13822
13833
|
function _l(i) {
|
|
13823
13834
|
const e = new J(), t = new J(), n = new J(), r = new J(), s = new J(), a = new J(), o = new J(), l = new J(), c = new J(), u = new J(), h = new J(), f = new J(), d = i.inheritType ? i.inheritType : 0;
|
|
13824
13835
|
if (i.translation && e.setPosition(ln.fromArray(i.translation)), i.preRotation) {
|
|
13825
|
-
const q = i.preRotation.map(
|
|
13836
|
+
const q = i.preRotation.map(Re.degToRad);
|
|
13826
13837
|
q.push(i.eulerOrder || me.DEFAULT_ORDER), t.makeRotationFromEuler(Ss.fromArray(q));
|
|
13827
13838
|
}
|
|
13828
13839
|
if (i.rotation) {
|
|
13829
|
-
const q = i.rotation.map(
|
|
13840
|
+
const q = i.rotation.map(Re.degToRad);
|
|
13830
13841
|
q.push(i.eulerOrder || me.DEFAULT_ORDER), n.makeRotationFromEuler(Ss.fromArray(q));
|
|
13831
13842
|
}
|
|
13832
13843
|
if (i.postRotation) {
|
|
13833
|
-
const q = i.postRotation.map(
|
|
13844
|
+
const q = i.postRotation.map(Re.degToRad);
|
|
13834
13845
|
q.push(i.eulerOrder || me.DEFAULT_ORDER), r.makeRotationFromEuler(Ss.fromArray(q)), r.invert();
|
|
13835
13846
|
}
|
|
13836
13847
|
i.scale && s.scale(ln.fromArray(i.scale)), i.scalingOffset && o.setPosition(ln.fromArray(i.scalingOffset)), i.scalingPivot && a.setPosition(ln.fromArray(i.scalingPivot)), i.rotationOffset && l.setPosition(ln.fromArray(i.rotationOffset)), i.rotationPivot && c.setPosition(ln.fromArray(i.rotationPivot)), i.parentMatrixWorld && (h.copy(i.parentMatrix), u.copy(i.parentMatrixWorld));
|
|
@@ -13838,19 +13849,19 @@ function _l(i) {
|
|
|
13838
13849
|
m.extractRotation(u);
|
|
13839
13850
|
const y = new J();
|
|
13840
13851
|
y.copyPosition(u);
|
|
13841
|
-
const b = y.clone().invert().multiply(u), x = m.clone().invert().multiply(b), v = s,
|
|
13852
|
+
const b = y.clone().invert().multiply(u), x = m.clone().invert().multiply(b), v = s, C = new J();
|
|
13842
13853
|
if (d === 0)
|
|
13843
|
-
|
|
13854
|
+
C.copy(m).multiply(p).multiply(x).multiply(v);
|
|
13844
13855
|
else if (d === 1)
|
|
13845
|
-
|
|
13856
|
+
C.copy(m).multiply(x).multiply(p).multiply(v);
|
|
13846
13857
|
else {
|
|
13847
13858
|
const te = new J().scale(new D().setFromMatrixScale(h)).clone().invert(), F = x.clone().multiply(te);
|
|
13848
|
-
|
|
13859
|
+
C.copy(m).multiply(p).multiply(F).multiply(v);
|
|
13849
13860
|
}
|
|
13850
|
-
const
|
|
13851
|
-
let L = e.clone().multiply(l).multiply(c).multiply(t).multiply(n).multiply(r).multiply(
|
|
13861
|
+
const P = c.clone().invert(), A = a.clone().invert();
|
|
13862
|
+
let L = e.clone().multiply(l).multiply(c).multiply(t).multiply(n).multiply(r).multiply(P).multiply(o).multiply(a).multiply(s).multiply(A);
|
|
13852
13863
|
const G = new J().copyPosition(L), H = u.clone().multiply(G);
|
|
13853
|
-
return f.copyPosition(H), L = f.clone().multiply(
|
|
13864
|
+
return f.copyPosition(H), L = f.clone().multiply(C), L.premultiply(u.invert()), L;
|
|
13854
13865
|
}
|
|
13855
13866
|
function Hl(i) {
|
|
13856
13867
|
i = i || 0;
|
|
@@ -14180,10 +14191,10 @@ class dm extends Sr {
|
|
|
14180
14191
|
m.setAttribute("position", new ye(u.vertices, 3)), u.normals.length > 0 && m.setAttribute("normal", new ye(u.normals, 3)), u.colors.length > 0 && (p = !0, m.setAttribute("color", new ye(u.colors, 3))), u.hasUVIndices === !0 && m.setAttribute("uv", new ye(u.uvs, 2));
|
|
14181
14192
|
const y = [];
|
|
14182
14193
|
for (let x = 0, v = h.length; x < v; x++) {
|
|
14183
|
-
const
|
|
14184
|
-
let A = t.materials[
|
|
14194
|
+
const C = h[x], P = C.name + "_" + C.smooth + "_" + p;
|
|
14195
|
+
let A = t.materials[P];
|
|
14185
14196
|
if (this.materials !== null) {
|
|
14186
|
-
if (A = this.materials.create(
|
|
14197
|
+
if (A = this.materials.create(C.name), f && A && !(A instanceof Kn)) {
|
|
14187
14198
|
const L = new Kn();
|
|
14188
14199
|
Xn.prototype.copy.call(L, A), L.color.copy(A.color), A = L;
|
|
14189
14200
|
} else if (d && A && !(A instanceof cr)) {
|
|
@@ -14191,17 +14202,17 @@ class dm extends Sr {
|
|
|
14191
14202
|
Xn.prototype.copy.call(L, A), L.color.copy(A.color), L.map = A.map, A = L;
|
|
14192
14203
|
}
|
|
14193
14204
|
}
|
|
14194
|
-
A === void 0 && (f ? A = new Kn() : d ? A = new cr({ size: 1, sizeAttenuation: !1 }) : A = new Ve(), A.name =
|
|
14205
|
+
A === void 0 && (f ? A = new Kn() : d ? A = new cr({ size: 1, sizeAttenuation: !1 }) : A = new Ve(), A.name = C.name, A.flatShading = !C.smooth, A.vertexColors = p, t.materials[P] = A), y.push(A);
|
|
14195
14206
|
}
|
|
14196
14207
|
let b;
|
|
14197
14208
|
if (y.length > 1) {
|
|
14198
14209
|
for (let x = 0, v = h.length; x < v; x++) {
|
|
14199
|
-
const
|
|
14200
|
-
m.addGroup(
|
|
14210
|
+
const C = h[x];
|
|
14211
|
+
m.addGroup(C.groupStart, C.groupCount, x);
|
|
14201
14212
|
}
|
|
14202
|
-
f ? b = new
|
|
14213
|
+
f ? b = new Cs(m, y) : d ? b = new qt(m, y) : b = new le(m, y);
|
|
14203
14214
|
} else
|
|
14204
|
-
f ? b = new
|
|
14215
|
+
f ? b = new Cs(m, y[0]) : d ? b = new qt(m, y[0]) : b = new le(m, y[0]);
|
|
14205
14216
|
b.name = c.name, s.add(b);
|
|
14206
14217
|
}
|
|
14207
14218
|
else if (t.vertices.length > 0) {
|
|
@@ -14252,7 +14263,7 @@ const _a = (i, e) => {
|
|
|
14252
14263
|
const n = Is.get(e);
|
|
14253
14264
|
i.map = n, i.needsUpdate = !0, be.needsUpdate = !0;
|
|
14254
14265
|
}
|
|
14255
|
-
const t = new
|
|
14266
|
+
const t = new Ct();
|
|
14256
14267
|
t.colorSpace = mt, t.wrapS = vt, t.wrapT = vt, t.flipY = !1, t.anisotropy = 16, t.mipmaps = [], t.generateMipmaps = !0, Ur.load(e, (n) => {
|
|
14257
14268
|
t.image = n, t.needsUpdate = !0, Is.set(e, t), i.map = t, i.needsUpdate = !0, be.needsUpdate = !0;
|
|
14258
14269
|
});
|
|
@@ -14293,7 +14304,7 @@ function Tm(i) {
|
|
|
14293
14304
|
return e.set(i.slice(0, 8), 0), e.set(i.slice(24, 32), 8), e.set(i.slice(40, 56), 16), e.set(i.slice(64, 88), 32), e.set(i.slice(96, 104), 56), e;
|
|
14294
14305
|
}
|
|
14295
14306
|
const Im = new TextDecoder();
|
|
14296
|
-
class
|
|
14307
|
+
class Pm {
|
|
14297
14308
|
materials;
|
|
14298
14309
|
sbmInfo;
|
|
14299
14310
|
isLE;
|
|
@@ -14349,15 +14360,15 @@ class Cm {
|
|
|
14349
14360
|
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;
|
|
14350
14361
|
let v = e.getUint8(t);
|
|
14351
14362
|
t += 1, v === 0 ? v = ji : v === 1 ? v = Gi : v === 2 && (v = nt);
|
|
14352
|
-
const
|
|
14363
|
+
const C = e.getUint16(t, this.isLE);
|
|
14353
14364
|
t += 2;
|
|
14354
|
-
const
|
|
14355
|
-
if (t +=
|
|
14356
|
-
const A = [m, y, b, x, v], L = Qs(p, A, Ys(
|
|
14357
|
-
if (this.materials.set(p, L), u[p].materialInfo = A,
|
|
14365
|
+
const P = C > 0 ? Wa(e, C, t) : "";
|
|
14366
|
+
if (t += C, !this.materials.has(p)) {
|
|
14367
|
+
const A = [m, y, b, x, v], L = Qs(p, A, Ys(P));
|
|
14368
|
+
if (this.materials.set(p, L), u[p].materialInfo = A, P) {
|
|
14358
14369
|
const {
|
|
14359
14370
|
url: G
|
|
14360
|
-
} = this.sbmInfo, H = _a(G,
|
|
14371
|
+
} = this.sbmInfo, H = _a(G, P);
|
|
14361
14372
|
u[p].textureUrl = H, Xs(L, H);
|
|
14362
14373
|
}
|
|
14363
14374
|
}
|
|
@@ -14372,25 +14383,25 @@ class Cm {
|
|
|
14372
14383
|
position: new ArrayBuffer(0),
|
|
14373
14384
|
uv: new ArrayBuffer(0)
|
|
14374
14385
|
};
|
|
14375
|
-
const y = [], b = [], x = [], v = [],
|
|
14376
|
-
if (t += 2,
|
|
14377
|
-
for (let
|
|
14386
|
+
const y = [], b = [], x = [], v = [], C = e.getUint16(t, this.isLE);
|
|
14387
|
+
if (t += 2, C > 0)
|
|
14388
|
+
for (let R = 0; R < C; R++) {
|
|
14378
14389
|
const Z = new D();
|
|
14379
14390
|
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);
|
|
14380
14391
|
}
|
|
14381
|
-
const
|
|
14382
|
-
if (t += 2,
|
|
14383
|
-
for (let
|
|
14392
|
+
const P = e.getUint16(t, this.isLE);
|
|
14393
|
+
if (t += 2, P > 0)
|
|
14394
|
+
for (let R = 0; R < P; R++)
|
|
14384
14395
|
t += 4, t += 4, t += 4;
|
|
14385
14396
|
const A = e.getUint16(t, this.isLE);
|
|
14386
14397
|
if (t += 2, A > 0)
|
|
14387
|
-
for (let
|
|
14398
|
+
for (let R = 0; R < A; R++) {
|
|
14388
14399
|
const Z = new oe();
|
|
14389
14400
|
Z.setX(e.getFloat32(t, this.isLE)), t += 4, Z.setY(e.getFloat32(t, this.isLE)), t += 4, b.push(Z);
|
|
14390
14401
|
}
|
|
14391
14402
|
const L = e.getUint16(t, this.isLE);
|
|
14392
14403
|
if (t += 2, L > 0)
|
|
14393
|
-
for (let
|
|
14404
|
+
for (let R = 0; R < L; R++) {
|
|
14394
14405
|
const Z = e.getUint16(t, this.isLE);
|
|
14395
14406
|
t += 2;
|
|
14396
14407
|
const V = e.getUint16(t, this.isLE);
|
|
@@ -14405,21 +14416,21 @@ class Cm {
|
|
|
14405
14416
|
]);
|
|
14406
14417
|
}
|
|
14407
14418
|
const G = [], H = [];
|
|
14408
|
-
for (let
|
|
14409
|
-
const Z = x[
|
|
14419
|
+
for (let R = 0; R < x.length; R++) {
|
|
14420
|
+
const Z = x[R], V = y[Z[0]], O = y[Z[1]], Y = y[Z[2]];
|
|
14410
14421
|
G.push(...V.toArray(), ...O.toArray(), ...Y.toArray());
|
|
14411
14422
|
let z = new oe(), $ = new oe(), j = new oe();
|
|
14412
|
-
const X = v[
|
|
14423
|
+
const X = v[R];
|
|
14413
14424
|
X !== void 0 && (z = X[0], $ = X[1], j = X[2]), H.push(...z.toArray(), ...$.toArray(), ...j.toArray());
|
|
14414
14425
|
}
|
|
14415
14426
|
const q = new Float32Array(G), te = new Float32Array(H);
|
|
14416
14427
|
h[p].position = q.buffer, h[p].uv = te.buffer;
|
|
14417
14428
|
const F = new Ae();
|
|
14418
|
-
q.length > 0 && F.setAttribute("position", new
|
|
14429
|
+
q.length > 0 && F.setAttribute("position", new Be(q, 3)), te.length > 0 && F.setAttribute("uv", new Be(te, 2)), F.computeVertexNormals();
|
|
14419
14430
|
const E = F.getAttribute("normal").array.buffer;
|
|
14420
14431
|
if (h[p].normal = E, this.materials.has(m)) {
|
|
14421
|
-
const
|
|
14422
|
-
|
|
14432
|
+
const R = new le(F, this.materials.get(m));
|
|
14433
|
+
R.name = p, R.castShadow = !0, R.receiveShadow = !0, o.add(R);
|
|
14423
14434
|
}
|
|
14424
14435
|
s.loaded++, s.timeStamp = performance.now() - r, n?.(s);
|
|
14425
14436
|
}
|
|
@@ -14460,15 +14471,15 @@ class Cm {
|
|
|
14460
14471
|
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;
|
|
14461
14472
|
let v = e.getUint8(t);
|
|
14462
14473
|
t += 1, v === 0 ? v = ji : v === 1 ? v = Gi : v === 2 && (v = nt);
|
|
14463
|
-
const
|
|
14474
|
+
const C = e.getUint16(t, this.isLE);
|
|
14464
14475
|
t += 2;
|
|
14465
|
-
const
|
|
14466
|
-
if (t +=
|
|
14467
|
-
const A = [m, y, b, x, v], L = Qs(p, A, Ys(
|
|
14468
|
-
if (this.materials.set(p, L), u[p].materialInfo = A,
|
|
14476
|
+
const P = C > 0 ? Wa(e, C, t) : "";
|
|
14477
|
+
if (t += C, !this.materials.has(p)) {
|
|
14478
|
+
const A = [m, y, b, x, v], L = Qs(p, A, Ys(P));
|
|
14479
|
+
if (this.materials.set(p, L), u[p].materialInfo = A, P) {
|
|
14469
14480
|
const {
|
|
14470
14481
|
url: G
|
|
14471
|
-
} = this.sbmInfo, H = _a(G,
|
|
14482
|
+
} = this.sbmInfo, H = _a(G, P);
|
|
14472
14483
|
u[p].textureUrl = H, Xs(L, H);
|
|
14473
14484
|
}
|
|
14474
14485
|
}
|
|
@@ -14491,7 +14502,7 @@ class Cm {
|
|
|
14491
14502
|
position: new ArrayBuffer(0),
|
|
14492
14503
|
uv: new ArrayBuffer(0)
|
|
14493
14504
|
};
|
|
14494
|
-
const x = [], v = [],
|
|
14505
|
+
const x = [], v = [], C = [], P = [], A = e.getUint32(t, this.isLE);
|
|
14495
14506
|
if (t += 4, A > 0)
|
|
14496
14507
|
for (let V = 0; V < A; V++) {
|
|
14497
14508
|
const O = new D();
|
|
@@ -14519,27 +14530,27 @@ class Cm {
|
|
|
14519
14530
|
const z = e.getUint32(t, this.isLE);
|
|
14520
14531
|
t += 4;
|
|
14521
14532
|
const $ = [O, Y, z];
|
|
14522
|
-
|
|
14533
|
+
C.push($), v.length > 0 && P.push([
|
|
14523
14534
|
v[$[0]],
|
|
14524
14535
|
v[$[1]],
|
|
14525
14536
|
v[$[2]]
|
|
14526
14537
|
]);
|
|
14527
14538
|
}
|
|
14528
14539
|
const q = [], te = [];
|
|
14529
|
-
for (let V = 0; V <
|
|
14530
|
-
const O =
|
|
14540
|
+
for (let V = 0; V < C.length; V++) {
|
|
14541
|
+
const O = C[V], Y = x[O[0]], z = x[O[1]], $ = x[O[2]];
|
|
14531
14542
|
q.push(...Y.toArray(), ...z.toArray(), ...$.toArray());
|
|
14532
14543
|
let j = new oe(), X = new oe(), K = new oe();
|
|
14533
|
-
const Q =
|
|
14544
|
+
const Q = P[V];
|
|
14534
14545
|
Q !== void 0 && (j = Q[0], X = Q[1], K = Q[2]), te.push(...j.toArray(), ...X.toArray(), ...K.toArray());
|
|
14535
14546
|
}
|
|
14536
14547
|
const F = new Float32Array(q), E = new Float32Array(te);
|
|
14537
14548
|
h[p].position = F.buffer, h[p].uv = E.buffer;
|
|
14538
|
-
const
|
|
14539
|
-
F.length > 0 &&
|
|
14540
|
-
const Z =
|
|
14549
|
+
const R = new Ae();
|
|
14550
|
+
F.length > 0 && R.setAttribute("position", new Be(F, 3)), E.length > 0 && R.setAttribute("uv", new Be(E, 2)), R.computeVertexNormals();
|
|
14551
|
+
const Z = R.getAttribute("normal").array.buffer;
|
|
14541
14552
|
if (h[p].normal = Z, this.materials.has(b)) {
|
|
14542
|
-
const V = new le(
|
|
14553
|
+
const V = new le(R, this.materials.get(b));
|
|
14543
14554
|
V.name = y || p, V.castShadow = !0, V.receiveShadow = !0, o.add(V);
|
|
14544
14555
|
}
|
|
14545
14556
|
s.loaded++, s.timeStamp = performance.now() - r, n?.(s);
|
|
@@ -14548,7 +14559,7 @@ class Cm {
|
|
|
14548
14559
|
return Promise.resolve({ model: a, caches: f });
|
|
14549
14560
|
}
|
|
14550
14561
|
}
|
|
14551
|
-
const
|
|
14562
|
+
const Cm = new TextDecoder();
|
|
14552
14563
|
class Dm {
|
|
14553
14564
|
/**
|
|
14554
14565
|
* @todo onProgress
|
|
@@ -14558,10 +14569,10 @@ class Dm {
|
|
|
14558
14569
|
* @param sbmInfo
|
|
14559
14570
|
*/
|
|
14560
14571
|
parseBuffer(e, t) {
|
|
14561
|
-
switch (
|
|
14572
|
+
switch (Cm.decode(e.slice(0, 8))) {
|
|
14562
14573
|
case "SBK-----":
|
|
14563
14574
|
case "SBM-----":
|
|
14564
|
-
return new
|
|
14575
|
+
return new Pm().parseBuffer(e, t);
|
|
14565
14576
|
default:
|
|
14566
14577
|
return Promise.reject(`In soonspacejs: sbm 资源模型(${t.url})格式或数据错误!`);
|
|
14567
14578
|
}
|
|
@@ -14602,7 +14613,7 @@ class Am {
|
|
|
14602
14613
|
const { meshName: c, materialId: u, position: h, uv: f, normal: d } = l, p = this.materials.get(u.toString());
|
|
14603
14614
|
if (p) {
|
|
14604
14615
|
const m = new Ae(), y = new Float32Array(h), b = new Float32Array(f), x = d && new Float32Array(d);
|
|
14605
|
-
y.length > 0 && m.setAttribute("position", new
|
|
14616
|
+
y.length > 0 && m.setAttribute("position", new Be(y, 3)), b.length > 0 && m.setAttribute("uv", new Be(b, 2)), x && x.length > 0 ? m.setAttribute("normal", new Be(x, 3)) : m.computeVertexNormals();
|
|
14606
14617
|
const v = new le(m, p);
|
|
14607
14618
|
v.name = c || o, v.castShadow = !0, v.receiveShadow = !0, r.add(v);
|
|
14608
14619
|
}
|
|
@@ -14715,7 +14726,7 @@ class Em extends xt {
|
|
|
14715
14726
|
userData: b,
|
|
14716
14727
|
extraIds: x
|
|
14717
14728
|
} = t, v = Hi.clone(e);
|
|
14718
|
-
v.animations = v.animations.map((
|
|
14729
|
+
v.animations = v.animations.map((C) => C.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), f && v.scale.set(f.x, f.y, f.z), d ? v.onClick = d.bind(v) : v.onClick = null, p ? v.onDblClick = p.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), b && (v.userData = b), x && (v.extraIds = x), n !== null && this.viewport.scener.addObject(v, n || this.scene || e.parent), r(v);
|
|
14719
14730
|
});
|
|
14720
14731
|
}
|
|
14721
14732
|
async loadToGroup(e, t) {
|
|
@@ -14782,7 +14793,7 @@ class Em extends xt {
|
|
|
14782
14793
|
*/
|
|
14783
14794
|
async _parseSbmx(e) {
|
|
14784
14795
|
const { url: t } = e, n = await this._getBuffer(t);
|
|
14785
|
-
if (
|
|
14796
|
+
if (Rs(n.slice(0, 8)) === "SBMG----") {
|
|
14786
14797
|
const s = vr(n.slice(8));
|
|
14787
14798
|
return this._parseGltf(e, s);
|
|
14788
14799
|
} else
|
|
@@ -14813,7 +14824,7 @@ class Em extends xt {
|
|
|
14813
14824
|
*/
|
|
14814
14825
|
async _parseFbx(e) {
|
|
14815
14826
|
const { url: t } = e, n = Ls(t), r = await this._getBuffer(t);
|
|
14816
|
-
if (
|
|
14827
|
+
if (Rs(vr(r.slice(0, 3))) === "ssp") {
|
|
14817
14828
|
const c = vr(r.slice(3));
|
|
14818
14829
|
return this._parseGltf(e, c);
|
|
14819
14830
|
}
|
|
@@ -14956,8 +14967,8 @@ class Om extends xt {
|
|
|
14956
14967
|
userData: x
|
|
14957
14968
|
} = t, v = e.clone();
|
|
14958
14969
|
if (s !== v.name && v.text) {
|
|
14959
|
-
const
|
|
14960
|
-
|
|
14970
|
+
const C = v.text.material.clone();
|
|
14971
|
+
C.map?.dispose(), C.map = this._createTextTexture(t), v.text.material = C;
|
|
14961
14972
|
}
|
|
14962
14973
|
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), r && (v.sid = r), s && (v.name = s), a && (v.level = a), u && (v.scaleFixed = u), jr(h) && (v.visible = h), f && v.position.set(f.x, f.y, f.z), d && v.rotation.set(d.x, d.y, d.z), p && v.scale.set(p.x, p.y, p.z), m ? v.onClick = m.bind(v) : v.onClick = null, y ? v.onDblClick = y.bind(v) : v.onDblClick = null, b ? v.onRightClick = b.bind(v) : v.onRightClick = null, x && (v.userData = x), n !== null && this.viewport.scener.addObject(v, n || this.scene || e.parent), v;
|
|
14963
14974
|
}
|
|
@@ -15017,7 +15028,7 @@ class Lm extends xt {
|
|
|
15017
15028
|
}
|
|
15018
15029
|
}
|
|
15019
15030
|
}
|
|
15020
|
-
class
|
|
15031
|
+
class Rm extends xt {
|
|
15021
15032
|
constructor(e, t) {
|
|
15022
15033
|
super(rt.Canvas3D, e, t.classified.Canvas3D), this.viewport = e, this.cache = t;
|
|
15023
15034
|
}
|
|
@@ -15039,7 +15050,7 @@ class Bm extends xt {
|
|
|
15039
15050
|
}), e;
|
|
15040
15051
|
}
|
|
15041
15052
|
}
|
|
15042
|
-
class
|
|
15053
|
+
class Bm {
|
|
15043
15054
|
graph;
|
|
15044
15055
|
queue;
|
|
15045
15056
|
previous;
|
|
@@ -15141,7 +15152,7 @@ class zm extends xt {
|
|
|
15141
15152
|
constructor(e, t) {
|
|
15142
15153
|
super(rt.Topology, e, t.classified.Topology), this.viewport = e, this.cache = t;
|
|
15143
15154
|
}
|
|
15144
|
-
dijkstra = new
|
|
15155
|
+
dijkstra = new Bm();
|
|
15145
15156
|
dijkstraWorker = new km(this.dijkstra);
|
|
15146
15157
|
async createFromGml(e) {
|
|
15147
15158
|
const { url: t, linkWidth: n = 20, linkColor: r = 65280, renderNode: s = !0, nodeColor: a = 255 } = e;
|
|
@@ -15165,19 +15176,19 @@ class zm extends xt {
|
|
|
15165
15176
|
graphs: []
|
|
15166
15177
|
}), c.set(y, m);
|
|
15167
15178
|
}), h.forEach((p) => {
|
|
15168
|
-
const m = p.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"], y = p.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"], b = p.Transition.topoEdge["gml:Edge"].passable["#text"], x = c.get(m), v = c.get(y),
|
|
15179
|
+
const m = p.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"], y = p.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"], b = p.Transition.topoEdge["gml:Edge"].passable["#text"], x = c.get(m), v = c.get(y), C = p.Transition._attributes["gml:id"], P = p.Transition.topoEdge["gml:Edge"].link_name["#text"];
|
|
15169
15180
|
x !== void 0 && v !== void 0 && (b !== "2" && b !== "3" && l[x].graphs.push({
|
|
15170
15181
|
targetNodeId: y,
|
|
15171
15182
|
linkInfo: {
|
|
15172
|
-
id:
|
|
15173
|
-
name:
|
|
15183
|
+
id: C,
|
|
15184
|
+
name: P
|
|
15174
15185
|
},
|
|
15175
15186
|
passable: +b
|
|
15176
15187
|
}), b !== "1" && b !== "3" && l[v].graphs.push({
|
|
15177
15188
|
targetNodeId: m,
|
|
15178
15189
|
linkInfo: {
|
|
15179
|
-
id:
|
|
15180
|
-
name:
|
|
15190
|
+
id: C,
|
|
15191
|
+
name: P
|
|
15181
15192
|
},
|
|
15182
15193
|
passable: +b
|
|
15183
15194
|
}));
|
|
@@ -15527,7 +15538,7 @@ class Nm extends xt {
|
|
|
15527
15538
|
id: t,
|
|
15528
15539
|
box: n,
|
|
15529
15540
|
color: r = "#00ff00"
|
|
15530
|
-
} = e, s = new
|
|
15541
|
+
} = e, s = new Ph(n, new ge(r));
|
|
15531
15542
|
return s.userData.sid = t, s.userData.stype = "Helper", this.viewport.scener.addObject(s, this.scene), s;
|
|
15532
15543
|
}
|
|
15533
15544
|
addPlaneHelper(e) {
|
|
@@ -15579,11 +15590,11 @@ class Nm extends xt {
|
|
|
15579
15590
|
roughness: 0.8
|
|
15580
15591
|
});
|
|
15581
15592
|
d.map && (d.map.repeat.set(u.x, u.x), d.map.wrapS = vt, d.map.wrapT = vt, d.map.version++), l.x -= Math.PI / 2, d.needsUpdate = !0;
|
|
15582
|
-
const p = new
|
|
15593
|
+
const p = new Rl({ id: n, position: o, rotation: l, scale: c }, f, d);
|
|
15583
15594
|
return p.userData.sid = n, p.userData.stype = "Helper", this.viewport.scener.addObject(p, this.scene), p;
|
|
15584
15595
|
}
|
|
15585
15596
|
addDirectionalLightHelper(e) {
|
|
15586
|
-
const { id: t, light: n, color: r, size: s = 50 } = e, a = new
|
|
15597
|
+
const { id: t, light: n, color: r, size: s = 50 } = e, a = new Ch(n, s, r);
|
|
15587
15598
|
return a.userData.sid = t, a.userData.stype = "Helper", this.viewport.scener.addObject(a, this.scene), a;
|
|
15588
15599
|
}
|
|
15589
15600
|
addHemisphereLightHelper(e) {
|
|
@@ -15657,7 +15668,7 @@ class Gm extends xt {
|
|
|
15657
15668
|
l.matrixWorld.decompose(p.position, p.quaternion, p.scale), p.scale.multiply(e.textureAspect), l.getWorldPosition(h), f.set(-d[8], -d[9], -d[10]).normalize(), gr.set(h, f), gr.near = 0, gr.far = s;
|
|
15658
15669
|
const [m] = gr.intersectObjects(a).filter(({ object: y }) => !(y instanceof Ks));
|
|
15659
15670
|
if (m) {
|
|
15660
|
-
const { object: y } = m, b = new me().setFromRotationMatrix(l.matrixWorld, "XYZ"), x = new
|
|
15671
|
+
const { object: y } = m, b = new me().setFromRotationMatrix(l.matrixWorld, "XYZ"), x = new Rf({
|
|
15661
15672
|
offsetUnits: o,
|
|
15662
15673
|
...t,
|
|
15663
15674
|
object: y,
|
|
@@ -15685,7 +15696,7 @@ class Vm {
|
|
|
15685
15696
|
modelManager: new Em(this.viewport, this.cache),
|
|
15686
15697
|
poiManager: new Om(this.viewport, this.cache),
|
|
15687
15698
|
poiNodeManager: new Lm(this.viewport, this.cache),
|
|
15688
|
-
canvas3DManager: new
|
|
15699
|
+
canvas3DManager: new Rm(this.viewport, this.cache),
|
|
15689
15700
|
topologyManager: new zm(this.viewport, this.cache),
|
|
15690
15701
|
helperManager: new Nm(this.viewport, this.cache),
|
|
15691
15702
|
decalManager: new Gm(this.viewport, this.cache),
|
|
@@ -17980,7 +17991,7 @@ export {
|
|
|
17980
17991
|
Ks as Decal,
|
|
17981
17992
|
zt as DecalUVMapType,
|
|
17982
17993
|
ii as FileRequestHeaders,
|
|
17983
|
-
|
|
17994
|
+
Rl as Ground,
|
|
17984
17995
|
Zt as Group,
|
|
17985
17996
|
No as GuiAnimationActionController,
|
|
17986
17997
|
lo as INNER_ID,
|
|
@@ -18026,10 +18037,10 @@ export {
|
|
|
18026
18037
|
vg as createGuiAnimationController,
|
|
18027
18038
|
ld as createKeyframeTracksForBones,
|
|
18028
18039
|
ud as createKeyframeTracksForBonesTarget,
|
|
18029
|
-
|
|
18040
|
+
Bo as createKeyframeTracksOfCurveAnimation,
|
|
18030
18041
|
id as createKeyframeTracksOfCurveAnimationByPolyline,
|
|
18031
18042
|
Ff as createPlaneMatrix,
|
|
18032
|
-
|
|
18043
|
+
Ri as createTexture,
|
|
18033
18044
|
kf as createUVMatrix,
|
|
18034
18045
|
bg as default,
|
|
18035
18046
|
mg as getAllRootBones,
|
|
@@ -18039,14 +18050,14 @@ export {
|
|
|
18039
18050
|
td as getFirstRootBone,
|
|
18040
18051
|
mi as getKeyframeTransformDatas,
|
|
18041
18052
|
ad as getKeyframeTransformDatasByPolyline,
|
|
18042
|
-
|
|
18053
|
+
Bf as getPolygonGeometryInfo,
|
|
18043
18054
|
gg as getRootBone,
|
|
18044
18055
|
cd as getSampleDataForBones,
|
|
18045
18056
|
dd as getSampleDataForBonesTarget,
|
|
18046
18057
|
gi as getTS,
|
|
18047
18058
|
yi as getTimes,
|
|
18048
18059
|
Di as isPoiNode25D,
|
|
18049
|
-
|
|
18060
|
+
Ci as isPoiNode2D,
|
|
18050
18061
|
Ai as isPoiNode3D,
|
|
18051
18062
|
ts as renderLoop,
|
|
18052
18063
|
zf as setTexture
|