@reall3d/reall3dviewer 2.4.3 → 2.4.4
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/pkg.d.ts +8 -0
- package/dist/pkg.js +610 -598
- package/dist/pkg.umd.cjs +17 -17
- package/package.json +1 -1
package/dist/pkg.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var uw = Object.defineProperty;
|
|
2
2
|
var Ow = (C, A, I) => A in C ? uw(C, A, { enumerable: !0, configurable: !0, writable: !0, value: I }) : C[A] = I;
|
|
3
3
|
var QB = (C, A, I) => Ow(C, typeof A != "symbol" ? A + "" : A, I);
|
|
4
|
-
import { Matrix4 as EI, AudioLoader as Ks, Audio as cs, AudioListener as Ms, Frustum as mw, Vector3 as R, ShaderChunk as bw, Plane as Di, Vector4 as VI, InstancedBufferGeometry as
|
|
4
|
+
import { Matrix4 as EI, AudioLoader as Ks, Audio as cs, AudioListener as Ms, Frustum as mw, Vector3 as R, ShaderChunk as bw, Plane as Di, Vector4 as VI, InstancedBufferGeometry as wE, BufferAttribute as GI, InstancedBufferAttribute as Us, DynamicDrawUsage as Zw, ShaderMaterial as Js, DoubleSide as MI, NormalBlending as xw, DataTexture as ig, RGBAIntegerFormat as og, UnsignedIntType as Rg, UnsignedByteType as Ti, Mesh as mA, Vector2 as WA, Loader as si, FileLoader as fC, Color as dI, SRGBColorSpace as wg, Group as tg, BufferGeometry as BC, Float32BufferAttribute as sg, LineBasicMaterial as _g, Material as RC, PointsMaterial as MC, MeshPhongMaterial as jw, LineSegments as TC, Points as yB, WebGLRenderer as Ns, PerspectiveCamera as ai, Object3D as aC, PlaneGeometry as ns, MeshBasicMaterial as wI, CylinderGeometry as ui, Quaternion as vI, Controls as Ww, MOUSE as Sg, TOUCH as Ng, Spherical as Oi, Ray as Pw, MathUtils as cI, TrianglesDrawMode as Xw, TriangleFanDrawMode as tE, TriangleStripDrawMode as rs, InstancedInterleavedBuffer as SE, InterleavedBufferAttribute as Lg, WireframeGeometry as Vw, Box3 as vB, Sphere as wi, ShaderLib as KB, UniformsUtils as Fs, UniformsLib as cB, Line3 as vw, LinearSRGBColorSpace as zI, ColorManagement as eE, LoaderUtils as YC, MeshPhysicalMaterial as Ag, SpotLight as zw, PointLight as _w, DirectionalLight as ls, InstancedMesh as $w, TextureLoader as At, ImageBitmapLoader as It, InterleavedBuffer as gt, LinearMipmapLinearFilter as Rs, NearestMipmapLinearFilter as Ct, LinearMipmapNearestFilter as Bt, NearestMipmapNearestFilter as Qt, LinearFilter as hE, NearestFilter as Ys, RepeatWrapping as kE, MirroredRepeatWrapping as Et, ClampToEdgeWrapping as it, MeshStandardMaterial as zB, PropertyBinding as ot, SkinnedMesh as Dt, Line as st, LineLoop as at, OrthographicCamera as wt, Skeleton as tt, AnimationClip as St, Bone as et, InterpolateDiscrete as ht, InterpolateLinear as qs, Texture as mi, VectorKeyframeTrack as bi, NumberKeyframeTrack as Zi, QuaternionKeyframeTrack as xi, FrontSide as kt, Interpolant as Gt, CircleGeometry as pg, Raycaster as ps, CatmullRomCurve3 as ji, RingGeometry as Wi, Clock as ti, AnimationMixer as yt, Scene as Ls, AmbientLight as ds, FogExp2 as Pi, EventDispatcher as Kt } from "three";
|
|
5
5
|
import * as Xi from "@gotoeasy/three-tile";
|
|
6
6
|
let M = 1;
|
|
7
|
-
const
|
|
7
|
+
const rg = M++, Hs = M++, ag = M++, fs = M++, GE = M++, yE = M++, Ts = M++, KQ = M++, us = M++, wC = M++, $A = M++, KA = M++, Os = M++, KE = M++, PI = M++, QC = M++, oI = M++, _C = M++, ms = M++, bs = M++, Zs = M++, cE = M++, xs = M++, js = M++;
|
|
8
8
|
M++;
|
|
9
9
|
const ct = M++, Mt = M++, Vi = M++, QI = M++;
|
|
10
10
|
M++;
|
|
11
|
-
const LA = M++,
|
|
11
|
+
const LA = M++, dg = M++, $g = M++, vi = M++, zi = M++, _i = M++, Ws = M++, Ut = M++, $i = M++, EB = M++, iB = M++, Ao = M++, Io = M++, go = M++, ng = M++, Co = M++, uC = M++, Ps = M++, SC = M++, eC = M++, MB = M++, Xs = M++, ME = M++, Jt = M++, OC = M++, cQ = M++, MQ = M++, qB = M++, pB = M++, _B = M++, LB = M++, Vs = M++, Si = M++, x = M++, LI = M++, EC = M++, hA = M++, $B = M++, ei = M++, Nt = M++, aI = M++, UE = M++, yI = M++, vs = M++, zs = M++, _s = M++, $s = M++, dB = M++, Aa = M++, Hg = M++, hi = M++, ki = M++, qC = M++, nt = M++, Ia = M++, ga = M++;
|
|
12
12
|
M++;
|
|
13
|
-
const
|
|
13
|
+
const AQ = M++, UQ = M++, Bo = M++, Qo = M++, UB = M++, HB = M++, JE = M++, Pg = M++, UI = M++, Gi = M++;
|
|
14
14
|
M++;
|
|
15
|
-
const Ca = M++, Ba = M++, oB = M++,
|
|
15
|
+
const Ca = M++, Ba = M++, oB = M++, JQ = M++, NE = M++, rt = M++, JB = M++, fB = M++, yi = M++, AC = M++, ug = M++, TB = M++, DB = M++, Qa = M++, JA = M++, AI = M++, Ft = M++, Eo = M++, uB = M++, OB = M++, lt = M++, Ki = M++, Fg = M++, pC = M++, tC = M++, Rt = M++, Ea = M++, Yt = M++;
|
|
16
16
|
M++;
|
|
17
17
|
M++;
|
|
18
18
|
M++;
|
|
19
19
|
M++;
|
|
20
20
|
M++;
|
|
21
|
-
const
|
|
21
|
+
const lg = M++, mC = M++, NB = M++, nB = M++, ia = M++, oa = M++, nE = M++, hg = M++, UC = M++, Da = M++, ci = M++, io = M++, qt = M++, pt = M++, $C = M++, iC = M++, AB = M++, IQ = M++, gQ = M++, XI = M++, sa = M++, oo = M++, rE = M++, eI = M++, aa = M++, rB = M++, wa = M++, JC = M++, ta = M++, Sa = M++, Mi = M++, ea = M++, ha = M++, Do = M++, ka = M++, bC = M++, Lt = M++, dt = M++, Ga = M++, FE = M++, Ht = M++, ya = M++, mB = M++, IC = M++, bB = M++, NQ = M++, nQ = M++, rQ = M++, lE = M++, FQ = M++, Ui = M++, so = M++, Ka = M++;
|
|
22
22
|
M++;
|
|
23
23
|
M++;
|
|
24
24
|
M++;
|
|
@@ -28,8 +28,8 @@ M++;
|
|
|
28
28
|
const ra = M++, Fa = M++, PA = M++, qE = M++, pE = M++, LE = M++, ut = M++, la = M++, Ot = M++, mt = M++, bt = M++, Zt = M++, xt = M++, Ra = M++, Ya = M++;
|
|
29
29
|
M++;
|
|
30
30
|
M++;
|
|
31
|
-
const
|
|
32
|
-
class
|
|
31
|
+
const lQ = M++, Ji = M++, dE = M++, HE = M++, RQ = M++, fE = M++, CQ = M++, qa = M++, pa = M++, La = M++, uA = M++, YQ = M++, sB = M++, da = M++, Ig = M++, TE = M++, uE = M++, jt = M++, Wt = M++, Ha = M++, Pt = M++, Xt = M++, Vt = M++, OE = M++, fa = M++, mE = M++, Ta = M++, bE = M++, eo = M++, ua = M++, Oa = M++, ma = M++, ZC = M++, vt = M++;
|
|
32
|
+
class BQ {
|
|
33
33
|
constructor() {
|
|
34
34
|
this.map = /* @__PURE__ */ new Map();
|
|
35
35
|
}
|
|
@@ -78,7 +78,7 @@ class ZE {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
var _ = /* @__PURE__ */ ((C) => (C[C.FetchReady = 0] = "FetchReady", C[C.Fetching = 1] = "Fetching", C[C.FetchDone = 2] = "FetchDone", C[C.FetchAborted = 3] = "FetchAborted", C[C.FetchFailed = 4] = "FetchFailed", C[C.Invalid = 5] = "Invalid", C))(_ || {});
|
|
81
|
-
const
|
|
81
|
+
const QQ = "v2.4.4", qA = !navigator.userAgent.includes("cloudphone") && navigator.userAgent.includes("Mobi"), _t = "QWERTYUIOPLKJHGFDSAZXCVBNM1234567890qwertyuioplkjhgfdsazxcvbnm`~!@#$%^&*()-_=+\\|]}[{'\";::,<.>//? ", $t = qA ? 600 : 300, ho = qA ? 1e3 : 500, Zg = 128, FB = 32, wA = 32, AS = 20, IS = 16, ba = 64 * 1024, gS = 1024 * 1e4, CS = 10240 * 1e4, bI = 0.28209479177387814, BS = 0, QS = 220, ES = 230, iS = 8, oS = 9, DS = 20, sS = 190, aS = 10190, xC = 1, eg = 2, oC = 3, wS = 4, tS = 3141592653;
|
|
82
82
|
var SI = /* @__PURE__ */ ((C) => (C[C.L1 = 1] = "L1", C[C.L2 = 2] = "L2", C[C.L3 = 3] = "L3", C[C.L4 = 4] = "L4", C[C.Default5 = 5] = "Default5", C[C.L6 = 6] = "L6", C[C.L7 = 7] = "L7", C[C.L8 = 8] = "L8", C[C.L9 = 9] = "L9", C))(SI || {}), DC = /* @__PURE__ */ ((C) => (C[C.Default1 = 1] = "Default1", C[C.ZdepthFrontNearest2010 = 2010] = "ZdepthFrontNearest2010", C[C.ZdepthFront2011 = 2011] = "ZdepthFront2011", C[C.ZdepthFrontNearFar2012 = 2012] = "ZdepthFrontNearFar2012", C[C.ZdepthFullNearFar2112 = 2112] = "ZdepthFullNearFar2112", C))(DC || {});
|
|
83
83
|
function SS(C) {
|
|
84
84
|
if (Object.prototype.hasOwnProperty.call(C, "__esModule")) return C;
|
|
@@ -381,14 +381,14 @@ for (var YA = 280; YA < 288; ++YA)
|
|
|
381
381
|
var Xa = new KI(32);
|
|
382
382
|
for (var YA = 0; YA < 32; ++YA)
|
|
383
383
|
Xa[YA] = 5;
|
|
384
|
-
var nS = /* @__PURE__ */ dC(IB, 9, 1), rS = /* @__PURE__ */ dC(Xa, 5, 1),
|
|
384
|
+
var nS = /* @__PURE__ */ dC(IB, 9, 1), rS = /* @__PURE__ */ dC(Xa, 5, 1), qQ = function(C) {
|
|
385
385
|
for (var A = C[0], I = 1; I < C.length; ++I)
|
|
386
386
|
C[I] > A && (A = C[I]);
|
|
387
387
|
return A;
|
|
388
388
|
}, RI = function(C, A, I) {
|
|
389
389
|
var g = A / 8 | 0;
|
|
390
390
|
return (C[g] | C[g + 1] << 8) >> (A & 7) & I;
|
|
391
|
-
},
|
|
391
|
+
}, pQ = function(C, A) {
|
|
392
392
|
var I = A / 8 | 0;
|
|
393
393
|
return (C[I] | C[I + 1] << 8 | C[I + 2] << 16) >> (A & 7);
|
|
394
394
|
}, FS = function(C) {
|
|
@@ -442,7 +442,7 @@ var nS = /* @__PURE__ */ dC(IB, 9, 1), rS = /* @__PURE__ */ dC(Xa, 5, 1), YQ = f
|
|
|
442
442
|
for (var f = new KI(F), T = new KI(19), q = 0; q < r; ++q)
|
|
443
443
|
T[MS[q]] = RI(C, s + q * 3, 7);
|
|
444
444
|
s += r * 3;
|
|
445
|
-
for (var X =
|
|
445
|
+
for (var X = qQ(T), v = (1 << X) - 1, AA = dC(T, X, 1), q = 0; q < F; ) {
|
|
446
446
|
var V = AA[RI(C, s, v)];
|
|
447
447
|
s += V & 15;
|
|
448
448
|
var L = V >> 4;
|
|
@@ -455,7 +455,7 @@ var nS = /* @__PURE__ */ dC(IB, 9, 1), rS = /* @__PURE__ */ dC(Xa, 5, 1), YQ = f
|
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
var n = f.subarray(0, J), c = f.subarray(J);
|
|
458
|
-
y =
|
|
458
|
+
y = qQ(n), e = qQ(c), S = dC(n, y, 1), h = dC(c, e, 1);
|
|
459
459
|
} else
|
|
460
460
|
rI(1);
|
|
461
461
|
else {
|
|
@@ -474,7 +474,7 @@ var nS = /* @__PURE__ */ dC(IB, 9, 1), rS = /* @__PURE__ */ dC(Xa, 5, 1), YQ = f
|
|
|
474
474
|
}
|
|
475
475
|
i && D(t + 131072);
|
|
476
476
|
for (var d = (1 << y) - 1, p = (1 << e) - 1, u = s; ; u = s) {
|
|
477
|
-
var QA = S[
|
|
477
|
+
var QA = S[pQ(C, s) & d], b = QA >> 4;
|
|
478
478
|
if (s += QA & 15, s > G) {
|
|
479
479
|
o && rI(0);
|
|
480
480
|
break;
|
|
@@ -490,12 +490,12 @@ var nS = /* @__PURE__ */ dC(IB, 9, 1), rS = /* @__PURE__ */ dC(Xa, 5, 1), YQ = f
|
|
|
490
490
|
var q = b - 257, Z = Za[q];
|
|
491
491
|
W = RI(C, s, (1 << Z) - 1) + Pa[q], s += Z;
|
|
492
492
|
}
|
|
493
|
-
var j = h[
|
|
493
|
+
var j = h[pQ(C, s) & p], m = j >> 4;
|
|
494
494
|
j || rI(3), s += j & 15;
|
|
495
495
|
var c = NS[m];
|
|
496
496
|
if (m > 3) {
|
|
497
497
|
var Z = xa[m];
|
|
498
|
-
c +=
|
|
498
|
+
c += pQ(C, s) & (1 << Z) - 1, s += Z;
|
|
499
499
|
}
|
|
500
500
|
if (s > G) {
|
|
501
501
|
o && rI(0);
|
|
@@ -519,7 +519,7 @@ var nS = /* @__PURE__ */ dC(IB, 9, 1), rS = /* @__PURE__ */ dC(Xa, 5, 1), YQ = f
|
|
|
519
519
|
return C[A] | C[A + 1] << 8;
|
|
520
520
|
}, pI = function(C, A) {
|
|
521
521
|
return (C[A] | C[A + 1] << 8 | C[A + 2] << 16 | C[A + 3] << 24) >>> 0;
|
|
522
|
-
},
|
|
522
|
+
}, LQ = function(C, A) {
|
|
523
523
|
return pI(C, A) + pI(C, A + 4) * 4294967296;
|
|
524
524
|
};
|
|
525
525
|
function qS(C, A) {
|
|
@@ -558,7 +558,7 @@ var HS = function(C, A) {
|
|
|
558
558
|
}, TS = function(C, A) {
|
|
559
559
|
for (; jI(C, A) != 1; A += 4 + jI(C, A + 2))
|
|
560
560
|
;
|
|
561
|
-
return [
|
|
561
|
+
return [LQ(C, A + 12), LQ(C, A + 4), LQ(C, A + 20)];
|
|
562
562
|
};
|
|
563
563
|
function uS(C, A) {
|
|
564
564
|
for (var I = {}, g = C.length - 22; pI(C, g) != 101010256; --g)
|
|
@@ -599,7 +599,7 @@ async function mI(C, A) {
|
|
|
599
599
|
return null;
|
|
600
600
|
}
|
|
601
601
|
const Og = (() => {
|
|
602
|
-
const C = new
|
|
602
|
+
const C = new BQ();
|
|
603
603
|
let A = !1, I = 0, g = 0;
|
|
604
604
|
C.on(ua, async (Q = "", E = !1, i = 0.5) => {
|
|
605
605
|
I = performance.now();
|
|
@@ -665,7 +665,7 @@ function ni(C) {
|
|
|
665
665
|
let B = 0;
|
|
666
666
|
(function S() {
|
|
667
667
|
B++, !A && requestAnimationFrame(S);
|
|
668
|
-
})(), I(
|
|
668
|
+
})(), I(rg, (S, h = null, y = 0) => {
|
|
669
669
|
const e = () => {
|
|
670
670
|
A || (y > 0 ? !(B % y) && S(B) : S(B), h && h() && requestAnimationFrame(e));
|
|
671
671
|
};
|
|
@@ -746,7 +746,7 @@ function ni(C) {
|
|
|
746
746
|
shDegree: V
|
|
747
747
|
} = {}) => {
|
|
748
748
|
if (!g(yI)) return;
|
|
749
|
-
V !== void 0 && t("shDegree", `${V}`), S !== void 0 && t("renderSplatCount", `${S}`), h !== void 0 && t("visibleSplatCount", `${h}`), y !== void 0 && t("modelSplatCount", `${y}`), e !== void 0 && t("fps", e), G !== void 0 && t("realFps", `raw ${G}`), k !== void 0 && t("sort", `${k} ms (L ${g(x).qualityLevel || SI.Default5}, ${L || ""} B, T ${K || ""})`), AA !== void 0 && (v !== void 0 ? t("cuts", AA === "" ? "" : `${v}(${AA} cuts)`) : t("cuts", AA === "" ? "" : `(${AA} cuts)`)), T && t("worker", `${T}`), q && t("scene", q), J && t("fov", J), r && t("position", r), F && t("lookUp", F), f && t("lookAt", f), f && t("viewer-version",
|
|
749
|
+
V !== void 0 && t("shDegree", `${V}`), S !== void 0 && t("renderSplatCount", `${S}`), h !== void 0 && t("visibleSplatCount", `${h}`), y !== void 0 && t("modelSplatCount", `${y}`), e !== void 0 && t("fps", e), G !== void 0 && t("realFps", `raw ${G}`), k !== void 0 && t("sort", `${k} ms (L ${g(x).qualityLevel || SI.Default5}, ${L || ""} B, T ${K || ""})`), AA !== void 0 && (v !== void 0 ? t("cuts", AA === "" ? "" : `${v}(${AA} cuts)`) : t("cuts", AA === "" ? "" : `(${AA} cuts)`)), T && t("worker", `${T}`), q && t("scene", q), J && t("fov", J), r && t("position", r), F && t("lookUp", F), f && t("lookAt", f), f && t("viewer-version", QQ);
|
|
750
750
|
let QA = performance.memory || { usedJSHeapSize: 0, totalJSHeapSize: 0, jsHeapSizeLimit: 0 }, O = "", n = QA.usedJSHeapSize / 1024 / 1024;
|
|
751
751
|
n > 1e3 ? O += (n / 1024).toFixed(2) + " G" : O += n.toFixed(0) + " M", O += " / ";
|
|
752
752
|
let c = QA.totalJSHeapSize / 1024 / 1024;
|
|
@@ -765,14 +765,14 @@ function OS(C = 0) {
|
|
|
765
765
|
const A = /* @__PURE__ */ new Date();
|
|
766
766
|
return A.setDate(A.getDate() - 7), C >= A.getFullYear() * 1e4 + (A.getMonth() + 1) * 100 + A.getDate();
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function eA(C) {
|
|
769
769
|
return C < 0 ? 0 : C > 255 ? 255 : C | 0;
|
|
770
770
|
}
|
|
771
771
|
function aB(C) {
|
|
772
|
-
const A =
|
|
773
|
-
return
|
|
772
|
+
const A = eA(Math.round(C * 128) + 128);
|
|
773
|
+
return eA(Math.floor((A + 4) / 8) * 8);
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function ZB(C, A) {
|
|
776
776
|
return ((1500 + C * 248) / A).toFixed(2) + "x";
|
|
777
777
|
}
|
|
778
778
|
async function Va(C) {
|
|
@@ -1012,7 +1012,7 @@ async function Ie(C) {
|
|
|
1012
1012
|
B += String.fromCharCode(C[t]);
|
|
1013
1013
|
if (g.Comment = B.trim(), g.HashCheck = !0, g.Fixed !== "spx")
|
|
1014
1014
|
return null;
|
|
1015
|
-
const Q = g.ExclusiveId ? za : ri, E = WebAssembly.compile(Uint8Array.from(atob(Q), (t) => t.charCodeAt(0)).buffer), i = new WebAssembly.Memory({ initial: 1, maximum: 1 }), D = (await WebAssembly.instantiate(await E, { env: { memory: i, expf:
|
|
1015
|
+
const Q = g.ExclusiveId ? za : ri, E = WebAssembly.compile(Uint8Array.from(atob(Q), (t) => t.charCodeAt(0)).buffer), i = new WebAssembly.Memory({ initial: 1, maximum: 1 }), D = (await WebAssembly.instantiate(await E, { env: { memory: i, expf: EQ } })).exports.H;
|
|
1016
1016
|
return new Uint8Array(i.buffer).set(C, 0), D(0) && (g.HashCheck = !1), g;
|
|
1017
1017
|
}
|
|
1018
1018
|
async function lI(C, A = null) {
|
|
@@ -1041,20 +1041,20 @@ async function lI(C, A = null) {
|
|
|
1041
1041
|
return E ? C = await xS(C) : B == sS ? C = await bS(C) : B == aS && (C = await ZS(C)), kC(g, B, C, A?.Version || 1, i);
|
|
1042
1042
|
}
|
|
1043
1043
|
async function kC(C, A, I, g, B) {
|
|
1044
|
-
const Q = xC == A, E = eg == A, i = oC == A, o = Q || E || i, D = !o, a = [ri, Ae, va, za], s = A < 65536 ? 0 : g, t = C * (o ? IS :
|
|
1044
|
+
const Q = xC == A, E = eg == A, i = oC == A, o = Q || E || i, D = !o, a = [ri, Ae, va, za], s = A < 65536 ? 0 : g, t = C * (o ? IS : wA), S = WebAssembly.compile(Uint8Array.from(atob(a[s]), (K) => K.charCodeAt(0)).buffer), h = Math.ceil((t + I.byteLength) / ba) + 1, y = new WebAssembly.Memory({ initial: h, maximum: h }), G = (await WebAssembly.instantiate(await S, { env: { memory: y, expf: EQ } })).exports.D, k = new Uint8Array(y.buffer);
|
|
1045
1045
|
return k.set(I, t), G(0, t, B) ? { splatCount: C, blockFormat: A, success: !1 } : { splatCount: C, blockFormat: A, success: !0, datas: k.slice(0, t), isSplat: D, isSh: o, isSh1: Q, isSh2: E, isSh3: i };
|
|
1046
1046
|
}
|
|
1047
1047
|
async function jC(C, A) {
|
|
1048
|
-
const I = WebAssembly.compile(Uint8Array.from(atob(ri), (D) => D.charCodeAt(0)).buffer), g = Math.ceil(A *
|
|
1049
|
-
i.set(C.subarray(0, A *
|
|
1048
|
+
const I = WebAssembly.compile(Uint8Array.from(atob(ri), (D) => D.charCodeAt(0)).buffer), g = Math.ceil(A * wA / ba) + 1, B = new WebAssembly.Memory({ initial: g, maximum: g }), E = (await WebAssembly.instantiate(await I, { env: { memory: B, expf: EQ } })).exports.s, i = new Uint8Array(B.buffer);
|
|
1049
|
+
i.set(C.subarray(0, A * wA), 0);
|
|
1050
1050
|
const o = E(0, A);
|
|
1051
|
-
return o ? (console.error("splat data parser failed:", o), new Uint8Array(0)) : i.slice(0, A *
|
|
1051
|
+
return o ? (console.error("splat data parser failed:", o), new Uint8Array(0)) : i.slice(0, A * wA);
|
|
1052
1052
|
}
|
|
1053
1053
|
async function ge(C, A, I = !0, g = !0) {
|
|
1054
|
-
const B = WebAssembly.compile(Uint8Array.from(atob(va), (s) => s.charCodeAt(0)).buffer), Q = new WebAssembly.Memory({ initial: 1, maximum: 1 }), i = (await WebAssembly.instantiate(await B, { env: { memory: Q, expf:
|
|
1055
|
-
return D[0] = C, I ? D[1] = a * A : D[2] = a * A, i(0, I ? 1 : 0), o.slice(0,
|
|
1054
|
+
const B = WebAssembly.compile(Uint8Array.from(atob(va), (s) => s.charCodeAt(0)).buffer), Q = new WebAssembly.Memory({ initial: 1, maximum: 1 }), i = (await WebAssembly.instantiate(await B, { env: { memory: Q, expf: EQ } })).exports.w, o = new Uint8Array(Q.buffer), D = new Float32Array(o.buffer), a = g ? -1 : 1;
|
|
1055
|
+
return D[0] = C, I ? D[1] = a * A : D[2] = a * A, i(0, I ? 1 : 0), o.slice(0, wA);
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function EQ(C) {
|
|
1058
1058
|
return Math.exp(C);
|
|
1059
1059
|
}
|
|
1060
1060
|
const GC = qA ? 20480 : 512e3;
|
|
@@ -1110,7 +1110,7 @@ async function Ce(C) {
|
|
|
1110
1110
|
async function I(B, Q, E) {
|
|
1111
1111
|
const i = new Uint8Array(E * FB), o = new Float32Array(Q.buffer), D = new Float32Array(i.buffer);
|
|
1112
1112
|
for (let a = 0; a < E; a++)
|
|
1113
|
-
D[a * 8 + 0] = o[(a * C.rowLength + B.offsets.x) / 4], D[a * 8 + 1] = o[(a * C.rowLength + B.offsets.y) / 4], D[a * 8 + 2] = o[(a * C.rowLength + B.offsets.z) / 4], D[a * 8 + 3] = Math.exp(o[(a * C.rowLength + B.offsets.scale_0) / 4]), D[a * 8 + 4] = Math.exp(o[(a * C.rowLength + B.offsets.scale_1) / 4]), D[a * 8 + 5] = Math.exp(o[(a * C.rowLength + B.offsets.scale_2) / 4]), i[a * 32 + 24] =
|
|
1113
|
+
D[a * 8 + 0] = o[(a * C.rowLength + B.offsets.x) / 4], D[a * 8 + 1] = o[(a * C.rowLength + B.offsets.y) / 4], D[a * 8 + 2] = o[(a * C.rowLength + B.offsets.z) / 4], D[a * 8 + 3] = Math.exp(o[(a * C.rowLength + B.offsets.scale_0) / 4]), D[a * 8 + 4] = Math.exp(o[(a * C.rowLength + B.offsets.scale_1) / 4]), D[a * 8 + 5] = Math.exp(o[(a * C.rowLength + B.offsets.scale_2) / 4]), i[a * 32 + 24] = eA((0.5 + bI * o[(a * C.rowLength + B.offsets.f_dc_0) / 4]) * 255), i[a * 32 + 25] = eA((0.5 + bI * o[(a * C.rowLength + B.offsets.f_dc_1) / 4]) * 255), i[a * 32 + 26] = eA((0.5 + bI * o[(a * C.rowLength + B.offsets.f_dc_2) / 4]) * 255), i[a * 32 + 27] = eA(1 / (1 + Math.exp(-o[(a * C.rowLength + B.offsets.opacity) / 4])) * 255), i[a * 32 + 28] = eA(o[(a * C.rowLength + B.offsets.rot_0) / 4] * 128 + 128), i[a * 32 + 29] = eA(o[(a * C.rowLength + B.offsets.rot_1) / 4] * 128 + 128), i[a * 32 + 30] = eA(o[(a * C.rowLength + B.offsets.rot_2) / 4] * 128 + 128), i[a * 32 + 31] = eA(o[(a * C.rowLength + B.offsets.rot_3) / 4] * 128 + 128);
|
|
1114
1114
|
if (B.shDegree == 3) {
|
|
1115
1115
|
const s = new Uint8Array(E * 24 + 8), t = new Uint8Array(E * 21 + 8), S = new Uint32Array(2);
|
|
1116
1116
|
S[0] = E, S[1] = eg, s.set(new Uint8Array(S.buffer), 0);
|
|
@@ -1187,9 +1187,9 @@ async function Ce(C) {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
1189
|
function No(C, A) {
|
|
1190
|
-
let I = A.byteLength /
|
|
1190
|
+
let I = A.byteLength / wA;
|
|
1191
1191
|
const g = Math.min(C.fetchLimit, C.modelSplatCount);
|
|
1192
|
-
C.dataSplatCount + I > g ? (I = g - C.dataSplatCount, C.splatData.set(A.subarray(0, I *
|
|
1192
|
+
C.dataSplatCount + I > g ? (I = g - C.dataSplatCount, C.splatData.set(A.subarray(0, I * wA), C.dataSplatCount * wA)) : C.splatData.set(A, C.dataSplatCount * wA);
|
|
1193
1193
|
const B = new Float32Array(A.buffer);
|
|
1194
1194
|
for (let E = 0, i = 0, o = 0, D = 0; E < I; E++)
|
|
1195
1195
|
i = B[E * 8], o = B[E * 8 + 1], D = B[E * 8 + 2], C.minX = Math.min(C.minX, i), C.maxX = Math.max(C.maxX, i), C.minY = Math.min(C.minY, o), C.maxY = Math.max(C.maxY, o), C.minZ = Math.min(C.minZ, D), C.maxZ = Math.max(C.maxZ, D);
|
|
@@ -1244,9 +1244,9 @@ async function Be(C) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
1246
|
function no(C, A) {
|
|
1247
|
-
let I = A.byteLength /
|
|
1247
|
+
let I = A.byteLength / wA;
|
|
1248
1248
|
const g = Math.min(C.fetchLimit, C.modelSplatCount);
|
|
1249
|
-
C.dataSplatCount + I > g ? (I = g - C.dataSplatCount, C.splatData.set(A.subarray(0, I *
|
|
1249
|
+
C.dataSplatCount + I > g ? (I = g - C.dataSplatCount, C.splatData.set(A.subarray(0, I * wA), C.dataSplatCount * wA)) : C.splatData.set(A, C.dataSplatCount * wA);
|
|
1250
1250
|
const B = new Float32Array(A.buffer);
|
|
1251
1251
|
for (let E = 0, i = 0, o = 0, D = 0; E < I; E++)
|
|
1252
1252
|
i = B[E * 8], o = B[E * 8 + 1], D = B[E * 8 + 2], C.minX = Math.min(C.minX, i), C.maxX = Math.max(C.maxX, i), C.minY = Math.min(C.minY, o), C.maxY = Math.max(C.maxY, o), C.minZ = Math.min(C.minZ, D), C.maxZ = Math.max(C.maxZ, D);
|
|
@@ -1269,7 +1269,7 @@ async function _a(C) {
|
|
|
1269
1269
|
return;
|
|
1270
1270
|
}
|
|
1271
1271
|
C.fileSize = Q;
|
|
1272
|
-
let i = [], o = new Uint8Array(Zg), D = new Uint8Array(
|
|
1272
|
+
let i = [], o = new Uint8Array(Zg), D = new Uint8Array(wA), a = 0, s = !1, t = 0, S = 0, h, y = !1, e = 0;
|
|
1273
1273
|
for (; ; ) {
|
|
1274
1274
|
let { done: G, value: k } = await B.read();
|
|
1275
1275
|
if (G) break;
|
|
@@ -1292,7 +1292,7 @@ async function _a(C) {
|
|
|
1292
1292
|
C.abortController.abort(), C.status === _.Fetching && (C.status = _.Invalid), console.error("invalid LOD format");
|
|
1293
1293
|
continue;
|
|
1294
1294
|
}
|
|
1295
|
-
if (C.header = r, C.CompressionRatio =
|
|
1295
|
+
if (C.header = r, C.CompressionRatio = ZB(r.SplatCount, Q), C.modelSplatCount = r.SplatCount, C.dataShDegree = r.ShDegree, C.aabbCenter = new R((r.MinX + r.MaxX) / 2, (r.MinY + r.MaxY) / 2, (r.MinZ + r.MaxZ) / 2), C.maxRadius = 0.5 * Math.sqrt(Math.pow(r.MaxX - r.MinX, 2) + Math.pow(r.MaxY - r.MinY, 2) + Math.pow(r.MaxZ - r.MinZ, 2)), C.metaMatrix && C.aabbCenter.applyMatrix4(C.metaMatrix), i = null, o = null, !Qe.includes(r.ExclusiveId)) {
|
|
1296
1296
|
C.abortController.abort(), C.status = _.Invalid, console.error("Unrecognized format, creater id =", r.CreaterId, ", exclusive id =", r.ExclusiveId, r.Comment);
|
|
1297
1297
|
continue;
|
|
1298
1298
|
}
|
|
@@ -1373,31 +1373,31 @@ function Ee(C, A) {
|
|
|
1373
1373
|
const g = 4096;
|
|
1374
1374
|
if (!C.meta.isLargeScene) {
|
|
1375
1375
|
const i = Math.min(C.fetchLimit, C.modelSplatCount);
|
|
1376
|
-
if (!C.splatData && (C.splatData = new Uint8Array(i *
|
|
1376
|
+
if (!C.splatData && (C.splatData = new Uint8Array(i * wA)), !C.watermarkData && (C.watermarkData = new Uint8Array(0)), C.dataSplatCount + I > i && (I = i - C.dataSplatCount, !I))
|
|
1377
1377
|
return;
|
|
1378
1378
|
const o = new Float32Array(A.buffer), D = new Uint32Array(A.buffer);
|
|
1379
1379
|
for (let s = 0, t = 0, S = 0, h = 0; s < I; s++)
|
|
1380
1380
|
if (t = o[s * 8], S = o[s * 8 + 1], h = o[s * 8 + 2], C.minX = Math.min(C.minX, t), C.maxX = Math.max(C.maxX, t), C.minY = Math.min(C.minY, S), C.maxY = Math.max(C.maxY, S), C.minZ = Math.min(C.minZ, h), C.maxZ = Math.max(C.maxZ, h), D[s * 8 + 3] & 65536) {
|
|
1381
|
-
if (C.watermarkCount *
|
|
1382
|
-
const y = new Uint8Array((C.watermarkCount + g) *
|
|
1381
|
+
if (C.watermarkCount * wA === C.watermarkData.byteLength) {
|
|
1382
|
+
const y = new Uint8Array((C.watermarkCount + g) * wA);
|
|
1383
1383
|
y.set(C.watermarkData, 0), C.watermarkData = y;
|
|
1384
1384
|
}
|
|
1385
|
-
C.watermarkData.set(A.subarray(s * 32, s * 32 + 32), C.watermarkCount++ *
|
|
1385
|
+
C.watermarkData.set(A.subarray(s * 32, s * 32 + 32), C.watermarkCount++ * wA);
|
|
1386
1386
|
} else
|
|
1387
|
-
C.splatData.set(A.subarray(s * 32, s * 32 + 32), C.dataSplatCount++ *
|
|
1387
|
+
C.splatData.set(A.subarray(s * 32, s * 32 + 32), C.dataSplatCount++ * wA);
|
|
1388
1388
|
const a = C.header.MinTopY || 0;
|
|
1389
1389
|
C.currentRadius = Math.sqrt(C.maxX * C.maxX + a * a + C.maxZ * C.maxZ);
|
|
1390
1390
|
return;
|
|
1391
1391
|
}
|
|
1392
1392
|
!C.watermarkData && (C.watermarkData = new Uint8Array(0));
|
|
1393
1393
|
const B = new Float32Array(A.buffer), Q = new Uint32Array(A.buffer), E = C.meta.cutSize || 5 * (C.meta.meterScale || 1);
|
|
1394
|
-
for (let i = 0, o = Math.floor(A.byteLength /
|
|
1394
|
+
for (let i = 0, o = Math.floor(A.byteLength / wA), D = 0, a = 0, s = 0, t = ""; i < o; i++) {
|
|
1395
1395
|
if (Q[i * 8 + 3] & 65536) {
|
|
1396
|
-
if (C.watermarkCount *
|
|
1397
|
-
const G = new Uint8Array((C.watermarkCount + g) *
|
|
1396
|
+
if (C.watermarkCount * wA === C.watermarkData.byteLength) {
|
|
1397
|
+
const G = new Uint8Array((C.watermarkCount + g) * wA);
|
|
1398
1398
|
G.set(C.watermarkData, 0), C.watermarkData = G;
|
|
1399
1399
|
}
|
|
1400
|
-
C.watermarkData.set(A.slice(i * 32, i * 32 + 32), C.watermarkCount++ *
|
|
1400
|
+
C.watermarkData.set(A.slice(i * 32, i * 32 + 32), C.watermarkCount++ * wA);
|
|
1401
1401
|
continue;
|
|
1402
1402
|
}
|
|
1403
1403
|
D = B[i * 8], a = B[i * 8 + 1], s = B[i * 8 + 2];
|
|
@@ -1405,20 +1405,20 @@ function Ee(C, A) {
|
|
|
1405
1405
|
t = `${S}-${h}-${y}`;
|
|
1406
1406
|
let e = C.map.get(t);
|
|
1407
1407
|
if (!e)
|
|
1408
|
-
e = {}, e.minX = D, e.maxX = D, e.minY = a, e.maxY = a, e.minZ = s, e.maxZ = s, e.center = new R(D, a, s), C.metaMatrix && e.center.applyMatrix4(C.metaMatrix), e.radius = 0, e.splatData = new Uint8Array(g *
|
|
1408
|
+
e = {}, e.minX = D, e.maxX = D, e.minY = a, e.maxY = a, e.minZ = s, e.maxZ = s, e.center = new R(D, a, s), C.metaMatrix && e.center.applyMatrix4(C.metaMatrix), e.radius = 0, e.splatData = new Uint8Array(g * wA), e.splatData.set(A.slice(i * wA, i * wA + wA), 0), e.splatCount = 1, C.map.set(t, e);
|
|
1409
1409
|
else {
|
|
1410
|
-
if (e.splatData.byteLength /
|
|
1411
|
-
const K = new Uint8Array(e.splatData.byteLength + g *
|
|
1410
|
+
if (e.splatData.byteLength / wA == e.splatCount) {
|
|
1411
|
+
const K = new Uint8Array(e.splatData.byteLength + g * wA);
|
|
1412
1412
|
K.set(e.splatData, 0), e.splatData = K;
|
|
1413
1413
|
}
|
|
1414
1414
|
e.minX = Math.min(e.minX, D), e.maxX = Math.max(e.maxX, D), e.minY = Math.min(e.minY, a), e.maxY = Math.max(e.maxY, a), e.minZ = Math.min(e.minZ, s), e.maxZ = Math.max(e.maxZ, s), e.center = new R((e.maxX + e.minX) / 2, (e.maxY + e.minY) / 2, (e.maxZ + e.minZ) / 2), C.metaMatrix && e.center.applyMatrix4(C.metaMatrix);
|
|
1415
1415
|
const G = e.maxX - e.minX, k = e.maxY - e.minY, L = e.maxZ - e.minZ;
|
|
1416
|
-
e.radius = Math.sqrt(G * G + k * k + L * L) / 2, C.metaMatrix && (e.radius *= C.metaMatrix.getMaxScaleOnAxis()), e.splatData.set(A.slice(i *
|
|
1416
|
+
e.radius = Math.sqrt(G * G + k * k + L * L) / 2, C.metaMatrix && (e.radius *= C.metaMatrix.getMaxScaleOnAxis()), e.splatData.set(A.slice(i * wA, i * wA + wA), e.splatCount++ * wA);
|
|
1417
1417
|
}
|
|
1418
1418
|
C.dataSplatCount++;
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
|
-
const MA = qA ? 20480 : 512e3,
|
|
1421
|
+
const MA = qA ? 20480 : 512e3, dQ = 16, ro = 511;
|
|
1422
1422
|
async function $a(C) {
|
|
1423
1423
|
try {
|
|
1424
1424
|
C.status = _.Fetching;
|
|
@@ -1441,14 +1441,14 @@ async function $a(C) {
|
|
|
1441
1441
|
return;
|
|
1442
1442
|
}
|
|
1443
1443
|
const s = g(a);
|
|
1444
|
-
C.CompressionRatio =
|
|
1444
|
+
C.CompressionRatio = ZB(s.numPoints, o), C.spzVersion = s.version, C.modelSplatCount = s.numPoints, C.dataShDegree = s.shDegree, C.splatData = new Uint8Array(Math.min(C.modelSplatCount, C.fetchLimit) * 32), await A(s, C, a);
|
|
1445
1445
|
} catch (B) {
|
|
1446
1446
|
B.name === "AbortError" ? (C.opts.url, C.status === _.Fetching && (C.status = _.FetchAborted)) : (console.error(B), C.status === _.Fetching && (C.status = _.FetchFailed));
|
|
1447
1447
|
} finally {
|
|
1448
1448
|
C.status === _.Fetching && (C.status = _.FetchDone);
|
|
1449
1449
|
}
|
|
1450
1450
|
async function A(B, Q, E) {
|
|
1451
|
-
const i = B.numPoints * 9, o = B.numPoints, D = B.numPoints * 3, a = B.numPoints * 3, s = B.numPoints * (B.version == 2 ? 3 : 4), t =
|
|
1451
|
+
const i = B.numPoints * 9, o = B.numPoints, D = B.numPoints * 3, a = B.numPoints * 3, s = B.numPoints * (B.version == 2 ? 3 : 4), t = dQ, S = t + i, h = S + o, y = h + D, e = y + a, G = e + s, k = Math.min(B.numPoints, Q.fetchLimit), L = Math.ceil(k / MA);
|
|
1452
1452
|
for (let K = 0; K < L; K++) {
|
|
1453
1453
|
let U = K < L - 1 ? MA : k - K * MA;
|
|
1454
1454
|
Q.dataSplatCount + U > Q.fetchLimit && (U = Q.fetchLimit - Q.dataSplatCount);
|
|
@@ -1468,11 +1468,11 @@ async function $a(C) {
|
|
|
1468
1468
|
for (let q = 0; q < U; q++)
|
|
1469
1469
|
J[F++] = E[y + (K * MA + q) * 3 + 2];
|
|
1470
1470
|
for (let q = 0; q < U; q++)
|
|
1471
|
-
J[F++] =
|
|
1471
|
+
J[F++] = HQ(E[h + (K * MA + q) * 3]);
|
|
1472
1472
|
for (let q = 0; q < U; q++)
|
|
1473
|
-
J[F++] =
|
|
1473
|
+
J[F++] = HQ(E[h + (K * MA + q) * 3 + 1]);
|
|
1474
1474
|
for (let q = 0; q < U; q++)
|
|
1475
|
-
J[F++] =
|
|
1475
|
+
J[F++] = HQ(E[h + (K * MA + q) * 3 + 2]);
|
|
1476
1476
|
const f = [];
|
|
1477
1477
|
if (B.version == 2)
|
|
1478
1478
|
for (let q = 0, X = 0, v = 0, AA = 0; q < U; q++)
|
|
@@ -1489,7 +1489,7 @@ async function $a(C) {
|
|
|
1489
1489
|
}
|
|
1490
1490
|
d[O] = Math.sqrt(Math.max(1 - c, 0));
|
|
1491
1491
|
for (let p = 0; p < 4; p++)
|
|
1492
|
-
d[p] =
|
|
1492
|
+
d[p] = eA(d[p] * 128 + 128);
|
|
1493
1493
|
f.push(d);
|
|
1494
1494
|
}
|
|
1495
1495
|
for (let q = 0; q < U; q++)
|
|
@@ -1534,9 +1534,9 @@ async function $a(C) {
|
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
function I(B, Q, E) {
|
|
1537
|
-
let i = E.byteLength /
|
|
1537
|
+
let i = E.byteLength / wA;
|
|
1538
1538
|
const o = Math.min(Q.fetchLimit, B.numPoints);
|
|
1539
|
-
Q.dataSplatCount + i > o ? (i = o - Q.dataSplatCount, Q.splatData.set(E.subarray(0, i *
|
|
1539
|
+
Q.dataSplatCount + i > o ? (i = o - Q.dataSplatCount, Q.splatData.set(E.subarray(0, i * wA), Q.dataSplatCount * wA)) : Q.splatData.set(E, Q.dataSplatCount * wA);
|
|
1540
1540
|
const D = new Float32Array(E.buffer);
|
|
1541
1541
|
for (let s = 0, t = 0, S = 0, h = 0; s < i; s++)
|
|
1542
1542
|
t = D[s * 8], S = D[s * 8 + 1], h = D[s * 8 + 2], Q.minX = Math.min(Q.minX, t), Q.maxX = Math.max(Q.maxX, t), Q.minY = Math.min(Q.minY, S), Q.maxY = Math.max(Q.maxY, S), Q.minZ = Math.min(Q.minZ, h), Q.maxZ = Math.max(Q.maxZ, h);
|
|
@@ -1545,24 +1545,24 @@ async function $a(C) {
|
|
|
1545
1545
|
Q.currentRadius = Math.sqrt(Q.maxX * Q.maxX + a * a + Q.maxZ * Q.maxZ), Q.aabbCenter = new R((Q.minX + Q.maxX) / 2, (Q.minY + Q.maxY) / 2, (Q.minZ + Q.maxZ) / 2), Q.maxRadius = 0.5 * Math.sqrt(Math.pow(Q.maxX - Q.minX, 2) + Math.pow(Q.maxY - Q.minY, 2) + Math.pow(Q.maxZ - Q.minZ, 2)), Q.metaMatrix && Q.aabbCenter.applyMatrix4(Q.metaMatrix);
|
|
1546
1546
|
}
|
|
1547
1547
|
function g(B) {
|
|
1548
|
-
const Q = B.slice(0,
|
|
1548
|
+
const Q = B.slice(0, dQ), E = new Uint32Array(Q.buffer), i = {};
|
|
1549
1549
|
if (i.magic = E[0], i.version = E[1], i.numPoints = E[2], i.shDegree = Q[12], i.fractionalBits = Q[13], i.flags = Q[14], i.reserved = Q[15], i.magic !== 1347635022) throw new Error("[SPZ ERROR] header not found");
|
|
1550
1550
|
if (i.version < 2 || i.version > 3) throw new Error("[SPZ ERROR] version not supported:" + i.version);
|
|
1551
1551
|
if (i.shDegree > 3) throw new Error("[SPZ ERROR] unsupported SH degree:" + i.shDegree);
|
|
1552
1552
|
if (i.fractionalBits !== 12) throw new Error("[SPZ ERROR] unsupported FractionalBits:" + i.fractionalBits);
|
|
1553
1553
|
const o = i.version == 2 ? 19 : 20;
|
|
1554
1554
|
let D = 0;
|
|
1555
|
-
if (i.shDegree === 1 ? D = 9 : i.shDegree === 2 ? D = 24 : i.shDegree === 3 && (D = 45), B.length !==
|
|
1555
|
+
if (i.shDegree === 1 ? D = 9 : i.shDegree === 2 ? D = 24 : i.shDegree === 3 && (D = 45), B.length !== dQ + i.numPoints * (o + D)) throw new Error("[SPZ ERROR] invalid spz data");
|
|
1556
1556
|
return i;
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function HQ(C) {
|
|
1560
1560
|
const A = (C - 127.5) / 38.25;
|
|
1561
|
-
return
|
|
1561
|
+
return eA((0.5 + bI * A) * 255);
|
|
1562
1562
|
}
|
|
1563
1563
|
function ie(C, A, I) {
|
|
1564
1564
|
const g = C / 127.5 - 1, B = A / 127.5 - 1, Q = I / 127.5 - 1, E = Math.sqrt(Math.max(0, 1 - (g * g + B * B + Q * Q)));
|
|
1565
|
-
return [
|
|
1565
|
+
return [eA(E * 128 + 128), eA(g * 128 + 128), eA(B * 128 + 128), eA(Q * 128 + 128)];
|
|
1566
1566
|
}
|
|
1567
1567
|
const Fo = qA ? 20480 : 512e3, jg = Math.sqrt(2);
|
|
1568
1568
|
async function Aw(C) {
|
|
@@ -1583,7 +1583,7 @@ async function Aw(C) {
|
|
|
1583
1583
|
E.set(s, C.downloadSize), C.downloadSize += s.length;
|
|
1584
1584
|
}
|
|
1585
1585
|
const i = PS(E), o = JSON.parse(XS(i.get("meta.json"))), D = o.count || o.means.shape[0];
|
|
1586
|
-
C.modelSplatCount = D, C.CompressionRatio =
|
|
1586
|
+
C.modelSplatCount = D, C.CompressionRatio = ZB(D, Q), C.sogVersion = o.version ? o.version : 1, await lo(C, i, o);
|
|
1587
1587
|
} else {
|
|
1588
1588
|
const A = await fetch(C.opts.url, { mode: "cors", credentials: "omit", cache: "reload" });
|
|
1589
1589
|
if (A.status != 200) return console.error(`fetch error: ${A.status}`);
|
|
@@ -1614,7 +1614,7 @@ async function Aw(C) {
|
|
|
1614
1614
|
]);
|
|
1615
1615
|
B.set(E, K), B.set(o, U), B.set(a, J), B.set(t, r), B.set(h, F), B.set(e, f), B.set(k, T);
|
|
1616
1616
|
const q = JSON.stringify(I).length + K.length + U.length + J.length + r.length + F.length + f.length + T.length;
|
|
1617
|
-
C.fileSize = q, C.downloadSize = q, C.watermarkData = new Uint8Array(0), C.CompressionRatio =
|
|
1617
|
+
C.fileSize = q, C.downloadSize = q, C.watermarkData = new Uint8Array(0), C.CompressionRatio = ZB(Q, q), C.sogVersion = I.version ? I.version : 1, await lo(C, B, I);
|
|
1618
1618
|
}
|
|
1619
1619
|
} catch (A) {
|
|
1620
1620
|
A.name === "AbortError" ? (C.opts.url, C.status === _.Fetching && (C.status = _.FetchAborted)) : (console.error(A), C.status === _.Fetching && (C.status = _.FetchFailed));
|
|
@@ -1630,7 +1630,7 @@ async function lo(C, A, I) {
|
|
|
1630
1630
|
if (h == 960) {
|
|
1631
1631
|
const K = new Uint8Array(S.length);
|
|
1632
1632
|
for (let U = 0; U < S.length; U++)
|
|
1633
|
-
U % 4 < 3 && (K[U] =
|
|
1633
|
+
U % 4 < 3 && (K[U] = eA(Math.round(I.shN.codebook[S[U]] * 128) + 128));
|
|
1634
1634
|
C.palettes = K;
|
|
1635
1635
|
} else {
|
|
1636
1636
|
const K = h == 96 ? 3 : 8, U = I.shN.count || S.length / 4 / K;
|
|
@@ -1640,14 +1640,14 @@ async function lo(C, A, I) {
|
|
|
1640
1640
|
for (let r = 0, F = 0; r < U; r++) {
|
|
1641
1641
|
const f = r * K;
|
|
1642
1642
|
for (let T = 0; T < K; T++)
|
|
1643
|
-
J[F * 4 + 0] =
|
|
1643
|
+
J[F * 4 + 0] = eA(Math.round(I.shN.codebook[S[(f + T) * 4 + 0]] * 128) + 128), J[F * 4 + 1] = eA(Math.round(I.shN.codebook[S[(f + T) * 4 + 1]] * 128) + 128), J[F * 4 + 2] = eA(Math.round(I.shN.codebook[S[(f + T) * 4 + 2]] * 128) + 128), F++;
|
|
1644
1644
|
F += 15 - K;
|
|
1645
1645
|
}
|
|
1646
1646
|
C.palettes = J;
|
|
1647
1647
|
}
|
|
1648
1648
|
for (; Q > C.dataSplatCount; ) {
|
|
1649
1649
|
const K = g ? await L(C.dataSplatCount) : await e(C.dataSplatCount);
|
|
1650
|
-
C.splatData.set(K.subarray(0), C.dataSplatCount *
|
|
1650
|
+
C.splatData.set(K.subarray(0), C.dataSplatCount * wA), G(C, K), C.dataSplatCount += K.byteLength / wA, C.downloadSplatCount = C.dataSplatCount;
|
|
1651
1651
|
}
|
|
1652
1652
|
async function e(K) {
|
|
1653
1653
|
const U = Math.min(K + Fo, Q), J = U - K, r = new Uint8Array(J * FB), F = new Float32Array(r.buffer);
|
|
@@ -1657,7 +1657,7 @@ async function lo(C, A, I) {
|
|
|
1657
1657
|
let n = Math.exp(I.scales.codebook[a[T * 4 + 0]]), c = Math.exp(I.scales.codebook[a[T * 4 + 1]]), d = Math.exp(I.scales.codebook[a[T * 4 + 2]]);
|
|
1658
1658
|
const { rw: p, rx: u, ry: b, rz: W } = k(s[T * 4], s[T * 4 + 1], s[T * 4 + 2], s[T * 4 + 3]);
|
|
1659
1659
|
let Z = I.sh0.codebook[t[T * 4 + 0]], j = I.sh0.codebook[t[T * 4 + 1]], m = I.sh0.codebook[t[T * 4 + 2]], H = t[T * 4 + 3];
|
|
1660
|
-
F[q * 8 + 0] = V, F[q * 8 + 1] = QA, F[q * 8 + 2] = O, F[q * 8 + 3] = n, F[q * 8 + 4] = c, F[q * 8 + 5] = d, r[q * 32 + 24] =
|
|
1660
|
+
F[q * 8 + 0] = V, F[q * 8 + 1] = QA, F[q * 8 + 2] = O, F[q * 8 + 3] = n, F[q * 8 + 4] = c, F[q * 8 + 5] = d, r[q * 32 + 24] = eA((0.5 + bI * Z) * 255), r[q * 32 + 25] = eA((0.5 + bI * j) * 255), r[q * 32 + 26] = eA((0.5 + bI * m) * 255), r[q * 32 + 27] = H, r[q * 32 + 28] = eA(p * 128 + 128), r[q * 32 + 29] = eA(u * 128 + 128), r[q * 32 + 30] = eA(b * 128 + 128), r[q * 32 + 31] = eA(W * 128 + 128), q++;
|
|
1661
1661
|
}
|
|
1662
1662
|
const f = await jC(r, J);
|
|
1663
1663
|
if (E > 0 && y?.byteLength)
|
|
@@ -1666,7 +1666,7 @@ async function lo(C, A, I) {
|
|
|
1666
1666
|
return f;
|
|
1667
1667
|
}
|
|
1668
1668
|
function G(K, U) {
|
|
1669
|
-
const J = U.byteLength /
|
|
1669
|
+
const J = U.byteLength / wA, r = new Float32Array(U.buffer);
|
|
1670
1670
|
for (let f = 0, T = 0, q = 0, X = 0; f < J; f++)
|
|
1671
1671
|
T = r[f * 8], q = r[f * 8 + 1], X = r[f * 8 + 2], K.minX = Math.min(K.minX, T), K.maxX = Math.max(K.maxX, T), K.minY = Math.min(K.minY, q), K.maxY = Math.max(K.maxY, q), K.minZ = Math.min(K.minZ, X), K.maxZ = Math.max(K.maxZ, X);
|
|
1672
1672
|
const F = 0;
|
|
@@ -1686,7 +1686,7 @@ async function lo(C, A, I) {
|
|
|
1686
1686
|
let d = (s[f * 4 + 0] / 255 - 0.5) * jg, p = (s[f * 4 + 1] / 255 - 0.5) * jg, u = (s[f * 4 + 2] / 255 - 0.5) * jg, b = Math.sqrt(Math.max(0, 1 - d * d - p * p - u * u)), W = s[f * 4 + 3] - 252, Z, j, m, H;
|
|
1687
1687
|
W == 0 ? (Z = b, j = d, m = p, H = u) : W == 1 ? (Z = d, j = b, m = p, H = u) : W == 2 ? (Z = d, j = p, m = b, H = u) : (Z = d, j = p, m = u, H = b);
|
|
1688
1688
|
let P = I.sh0.mins[0] + (I.sh0.maxs[0] - I.sh0.mins[0]) * (t[f * 4 + 0] / 255), gA = I.sh0.mins[1] + (I.sh0.maxs[1] - I.sh0.mins[1]) * (t[f * 4 + 1] / 255), IA = I.sh0.mins[2] + (I.sh0.maxs[2] - I.sh0.mins[2]) * (t[f * 4 + 2] / 255), z = I.sh0.mins[3] + (I.sh0.maxs[3] - I.sh0.mins[3]) * (t[f * 4 + 3] / 255);
|
|
1689
|
-
F[T * 8 + 0] = AA, F[T * 8 + 1] = V, F[T * 8 + 2] = QA, F[T * 8 + 3] = O, F[T * 8 + 4] = n, F[T * 8 + 5] = c, r[T * 32 + 24] =
|
|
1689
|
+
F[T * 8 + 0] = AA, F[T * 8 + 1] = V, F[T * 8 + 2] = QA, F[T * 8 + 3] = O, F[T * 8 + 4] = n, F[T * 8 + 5] = c, r[T * 32 + 24] = eA((0.5 + bI * P) * 255), r[T * 32 + 25] = eA((0.5 + bI * gA) * 255), r[T * 32 + 26] = eA((0.5 + bI * IA) * 255), r[T * 32 + 27] = eA(1 / (1 + Math.exp(-z)) * 255), r[T * 32 + 28] = eA(Z * 128 + 128), r[T * 32 + 29] = eA(j * 128 + 128), r[T * 32 + 30] = eA(m * 128 + 128), r[T * 32 + 31] = eA(H * 128 + 128), T++;
|
|
1690
1690
|
}
|
|
1691
1691
|
if (E > 0) {
|
|
1692
1692
|
const f = new Uint32Array(2);
|
|
@@ -1702,11 +1702,11 @@ async function lo(C, A, I) {
|
|
|
1702
1702
|
let W;
|
|
1703
1703
|
for (let Z = 0; Z < 3; Z++) {
|
|
1704
1704
|
for (let j = 0; j < 3; j++)
|
|
1705
|
-
W = (I.shN.maxs - I.shN.mins) * S[(d + j) * 4 + Z] / 255 + I.shN.mins, p[j * 3 + Z] =
|
|
1705
|
+
W = (I.shN.maxs - I.shN.mins) * S[(d + j) * 4 + Z] / 255 + I.shN.mins, p[j * 3 + Z] = eA(Math.round(W * 128) + 128);
|
|
1706
1706
|
for (let j = 0; j < 5; j++)
|
|
1707
|
-
W = (I.shN.maxs - I.shN.mins) * S[(d + 3 + j) * 4 + Z] / 255 + I.shN.mins, u[j * 3 + Z] =
|
|
1707
|
+
W = (I.shN.maxs - I.shN.mins) * S[(d + 3 + j) * 4 + Z] / 255 + I.shN.mins, u[j * 3 + Z] = eA(Math.round(W * 128) + 128);
|
|
1708
1708
|
for (let j = 0; j < 7; j++)
|
|
1709
|
-
W = (I.shN.maxs - I.shN.mins) * S[(d + 8 + j) * 4 + Z] / 255 + I.shN.mins, b[j * 3 + Z] =
|
|
1709
|
+
W = (I.shN.maxs - I.shN.mins) * S[(d + 8 + j) * 4 + Z] / 255 + I.shN.mins, b[j * 3 + Z] = eA(Math.round(W * 128) + 128);
|
|
1710
1710
|
}
|
|
1711
1711
|
T.set(p, 8 + QA * 24), T.set(u, 8 + QA * 24 + 9), X.set(b, 8 + QA * 21), QA++;
|
|
1712
1712
|
}
|
|
@@ -1727,7 +1727,7 @@ function Vg(C, A) {
|
|
|
1727
1727
|
Vg(g, A);
|
|
1728
1728
|
}
|
|
1729
1729
|
}
|
|
1730
|
-
const
|
|
1730
|
+
const fQ = 7, RB = /* @__PURE__ */ new Set();
|
|
1731
1731
|
function De(C) {
|
|
1732
1732
|
C && !C.status && RB.add(C);
|
|
1733
1733
|
}
|
|
@@ -1735,7 +1735,7 @@ function se(C) {
|
|
|
1735
1735
|
const A = (o, D, a) => C.on(o, D, a), I = (o, ...D) => C.fire(o, ...D);
|
|
1736
1736
|
let g;
|
|
1737
1737
|
I(
|
|
1738
|
-
|
|
1738
|
+
rg,
|
|
1739
1739
|
() => Q(),
|
|
1740
1740
|
() => !0,
|
|
1741
1741
|
30
|
|
@@ -1772,7 +1772,7 @@ function se(C) {
|
|
|
1772
1772
|
const y = g.files[h];
|
|
1773
1773
|
y.url = FI(y.url, a);
|
|
1774
1774
|
}
|
|
1775
|
-
I(x)
|
|
1775
|
+
I(x)?.enableEnvironment && g.environment && (g.environment = { fileKey: "environment", url: FI(g.environment, a) });
|
|
1776
1776
|
return;
|
|
1777
1777
|
}
|
|
1778
1778
|
try {
|
|
@@ -1809,13 +1809,13 @@ function se(C) {
|
|
|
1809
1809
|
let o = 0, D = 0, a = [];
|
|
1810
1810
|
g?.environment?.url && !g.environment.status && a.push(g.environment);
|
|
1811
1811
|
for (let S of Object.values(g.files))
|
|
1812
|
-
S.status ? S.status < kI.FetchDone && o++ : (D++, S.lod === g.lodLevels - 1 && a.length <
|
|
1813
|
-
if (!D || o >=
|
|
1812
|
+
S.status ? S.status < kI.FetchDone && o++ : (D++, S.lod === g.lodLevels - 1 && a.length < fQ && a.push(S));
|
|
1813
|
+
if (!D || o >= fQ) return;
|
|
1814
1814
|
for (let S of a)
|
|
1815
1815
|
S.downloadCount = 0, S.lastTime = Date.now(), S.status = kI.WaitFetch, I(YE, g, S);
|
|
1816
1816
|
if (a.length) return;
|
|
1817
1817
|
let s = [...RB], t = s.filter((S) => S.status >= kI.FetchDone);
|
|
1818
|
-
s = s.filter((S) => !S.status), s.sort((S, h) => S.currentDistance - h.currentDistance), s = s.slice(0, Math.min(
|
|
1818
|
+
s = s.filter((S) => !S.status), s.sort((S, h) => S.currentDistance - h.currentDistance), s = s.slice(0, Math.min(fQ - o, s.length));
|
|
1819
1819
|
for (let S of s)
|
|
1820
1820
|
S.downloadCount = 0, S.lastTime = Date.now(), S.status = kI.WaitFetch, I(YE, g, S), RB.delete(S);
|
|
1821
1821
|
for (let S of t)
|
|
@@ -1880,7 +1880,7 @@ function Se(C) {
|
|
|
1880
1880
|
A(ha, () => D?.aabbCenter || new R());
|
|
1881
1881
|
let L;
|
|
1882
1882
|
const K = new Promise((O) => L = O);
|
|
1883
|
-
A(
|
|
1883
|
+
A(dg, async () => {
|
|
1884
1884
|
const O = I(x);
|
|
1885
1885
|
let n = qA ? O.maxRenderCountOfMobile : O.maxRenderCountOfPc;
|
|
1886
1886
|
if (!O.bigSceneMode) {
|
|
@@ -1945,7 +1945,7 @@ function Se(C) {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
async function J(O) {
|
|
1947
1947
|
if (g) return;
|
|
1948
|
-
const n = a, c = await I(
|
|
1948
|
+
const n = a, c = await I(dg), d = o;
|
|
1949
1949
|
let p = D.dataSplatCount, u = O ? D.watermarkCount : 0, b = D.meta.showWatermark && O ? (d?.byteLength || 0) / 32 : 0;
|
|
1950
1950
|
if (D.renderSplatCount = p + u + b, D.renderSplatCount >= c && (D.renderSplatCount = c, u = 0, b = 0, p > c && (p = c)), I(LA, { visibleSplatCount: D.renderSplatCount, modelSplatCount: D.modelSplatCount + b }), Date.now() - n.textureReadyTime < $t || D.smallSceneUploadDone && D.lastTextWatermarkVersion == D.textWatermarkVersion) return;
|
|
1951
1951
|
if (!n.version) {
|
|
@@ -1962,12 +1962,12 @@ function Se(C) {
|
|
|
1962
1962
|
for (let IA = 0, z = 0; IA < D.renderSplatCount; IA++)
|
|
1963
1963
|
P[IA * 3] = m[IA * 8], P[IA * 3 + 1] = m[IA * 8 + 1], P[IA * 3 + 2] = m[IA * 8 + 2];
|
|
1964
1964
|
const gA = Date.now();
|
|
1965
|
-
if (n.version = gA, n.txdata = j, n.xyz = P, n.renderSplatCount = D.renderSplatCount, n.visibleSplatCount = D.downloadSplatCount + b, n.modelSplatCount = D.downloadSplatCount + b, n.watermarkCount = u + b, n.minX = D.minX, n.maxX = D.maxX, n.minY = D.minY, n.maxY = D.maxY, n.minZ = D.minZ, n.maxZ = D.maxZ, D.meta.particleMode && !y && (y = performance.now(), I(
|
|
1965
|
+
if (n.version = gA, n.txdata = j, n.xyz = P, n.renderSplatCount = D.renderSplatCount, n.visibleSplatCount = D.downloadSplatCount + b, n.modelSplatCount = D.downloadSplatCount + b, n.watermarkCount = u + b, n.minX = D.minX, n.maxX = D.maxX, n.minY = D.minY, n.maxY = D.maxY, n.minZ = D.minZ, n.maxZ = D.maxZ, D.meta.particleMode && !y && (y = performance.now(), I(mB, y), I(ng, !1), I(bB, 1)), D.maxRadius && I(ya, D.maxRadius), I(rB, n, D.currentRadius, D.currentRadius), B = gA, O && !D.smallSceneUploadDone) {
|
|
1966
1966
|
D.smallSceneUploadDone = !0, I(ta, D.sh12Data), I(Sa, D.sh3Data), D.sh12Data = null, D.sh3Data = null;
|
|
1967
1967
|
const IA = I(x);
|
|
1968
1968
|
I(OC, IA.shDegree === void 0 ? 3 : IA.shDegree), I(UB), D.meta.particleMode && setTimeout(
|
|
1969
1969
|
() => {
|
|
1970
|
-
I(
|
|
1970
|
+
I(mB, performance.now() + 5e3), I(bB, 2), setTimeout(() => I(IC, !0), 5e3);
|
|
1971
1971
|
},
|
|
1972
1972
|
Math.max(5e3 + y - performance.now(), 0)
|
|
1973
1973
|
// 先5秒加载过程
|
|
@@ -1978,7 +1978,7 @@ function Se(C) {
|
|
|
1978
1978
|
async function r(O) {
|
|
1979
1979
|
if (g) return;
|
|
1980
1980
|
O && !G && (G = !0, I(x).viewerEvents?.fire(XI, !0), I(Ma, D.header.Lod > 0));
|
|
1981
|
-
const n = await I(
|
|
1981
|
+
const n = await I(dg), { texwidth: c, texheight: d } = I(LC, n), p = o, u = 0, b = (p?.byteLength || 0) / 32, W = n - u - b;
|
|
1982
1982
|
I(LA, { modelSplatCount: D.downloadSplatCount + b });
|
|
1983
1983
|
let Z = a.version <= s.version ? a : s;
|
|
1984
1984
|
if (a.version && (!Z.index && !s.active || Z.index && !a.active) || Date.now() - Z.activeTime < ho) return;
|
|
@@ -1995,7 +1995,7 @@ function Se(C) {
|
|
|
1995
1995
|
const j = Date.now();
|
|
1996
1996
|
Z.version = j, Z.active = !1;
|
|
1997
1997
|
let m = 0;
|
|
1998
|
-
const H = [], P = I(
|
|
1998
|
+
const H = [], P = I(cE), gA = I(oI), IA = I(PI);
|
|
1999
1999
|
for (const $ of D.map.values())
|
|
2000
2000
|
q(P, gA, IA, $) && (H.push($), $.currentRenderCnt = $.splatCount, m += $.splatCount);
|
|
2001
2001
|
I(LA, { cuts: `${H.length} / ${D.map.size}` });
|
|
@@ -2041,40 +2041,40 @@ function Se(C) {
|
|
|
2041
2041
|
}
|
|
2042
2042
|
async function F() {
|
|
2043
2043
|
if (g) return;
|
|
2044
|
-
const O = I(x).enableEnvironment, n = await I(
|
|
2044
|
+
const O = I(x).enableEnvironment, n = await I(dg), { texwidth: c, texheight: d } = I(LC, n), p = o, u = D.watermarkCount, b = (p?.byteLength || 0) / 32, W = O && D.splatTiles.environment?.downloadCount || 0, Z = n - u - b - W;
|
|
2045
2045
|
I(Ja, D.splatTiles.fetchSet.size), I(LA, { modelSplatCount: D.downloadSplatCount + b });
|
|
2046
2046
|
let j = a.version <= s.version ? a : s;
|
|
2047
2047
|
if (a.version && (!j.index && !s.active || j.index && !a.active) || Date.now() - Math.max(a.activeTime, s.activeTime) < ho) return;
|
|
2048
2048
|
const m = new R(), H = D.splatTiles, P = H.lodLevels - 1;
|
|
2049
2049
|
if (!H.topLodReady) return;
|
|
2050
|
-
const gA = I(
|
|
2050
|
+
const gA = I(cE), IA = I(oI);
|
|
2051
2051
|
zS(gA, k);
|
|
2052
|
-
const z = (CA, oA,
|
|
2052
|
+
const z = (CA, oA, sA = !1) => {
|
|
2053
2053
|
if (!H.lodTargets.includes(oA))
|
|
2054
2054
|
return oA < H.lodLevels ? z(CA, oA + 1, !0) : CA.currentRenderLod = H.lodLevels, CA.currentRenderLod;
|
|
2055
|
-
!
|
|
2056
|
-
const
|
|
2057
|
-
return
|
|
2055
|
+
!sA && De(H.files[CA.lods[oA]?.fileKey]);
|
|
2056
|
+
const aA = CA.lods[oA];
|
|
2057
|
+
return aA && H.files[aA.fileKey]?.downloadCount ? CA.currentRenderLod = oA : oA < H.lodLevels ? z(CA, oA + 1, !0) : CA.currentRenderLod = P, CA.currentRenderLod;
|
|
2058
2058
|
}, BA = (CA) => {
|
|
2059
|
-
const oA = m.fromArray(CA.center),
|
|
2060
|
-
for (let
|
|
2061
|
-
const iI = k[
|
|
2059
|
+
const oA = m.fromArray(CA.center), sA = [];
|
|
2060
|
+
for (let aA = 0; aA < 5; aA++) {
|
|
2061
|
+
const iI = k[aA].distanceToPoint(oA);
|
|
2062
2062
|
if (iI < -CA.radius)
|
|
2063
2063
|
return CA.currentVisible = !1, 0;
|
|
2064
|
-
aA
|
|
2064
|
+
sA[aA] = iI;
|
|
2065
2065
|
}
|
|
2066
2066
|
if (CA.currentVisible = !0, CA.lods)
|
|
2067
2067
|
return CA.currentDistance = Jo(IA, CA), 1;
|
|
2068
|
-
CA.currentDistance =
|
|
2069
|
-
for (let
|
|
2070
|
-
if (
|
|
2068
|
+
CA.currentDistance = sA[0] >= 0 ? Math.max(0, sA[0] - CA.radius) : Math.min(0, sA[0] + CA.radius);
|
|
2069
|
+
for (let aA of sA)
|
|
2070
|
+
if (aA < 0 || aA < CA.radius) return -1;
|
|
2071
2071
|
return 1;
|
|
2072
2072
|
}, ZA = (CA) => {
|
|
2073
2073
|
let oA = H.lodLevels;
|
|
2074
|
-
const
|
|
2075
|
-
for (let
|
|
2076
|
-
if (CA.lods[H.lodTargets[
|
|
2077
|
-
oA = H.lodTargets[
|
|
2074
|
+
const sA = Jo(IA, CA);
|
|
2075
|
+
for (let aA = H.lodDistances.length - 1; aA >= 0; aA--)
|
|
2076
|
+
if (CA.lods[H.lodTargets[aA]] && sA >= H.lodDistances[aA]) {
|
|
2077
|
+
oA = H.lodTargets[aA];
|
|
2078
2078
|
break;
|
|
2079
2079
|
}
|
|
2080
2080
|
return oA;
|
|
@@ -2082,11 +2082,11 @@ function Se(C) {
|
|
|
2082
2082
|
Vg(H.tree, (CA) => {
|
|
2083
2083
|
const oA = BA(CA);
|
|
2084
2084
|
if (oA == 0)
|
|
2085
|
-
return Vg(CA, (
|
|
2086
|
-
|
|
2085
|
+
return Vg(CA, (sA) => {
|
|
2086
|
+
sA.lods && (sA.currentVisible = !1, sA.currentRenderLod = P);
|
|
2087
2087
|
}), !1;
|
|
2088
|
-
oA > 0 && Vg(CA, (
|
|
2089
|
-
|
|
2088
|
+
oA > 0 && Vg(CA, (sA) => {
|
|
2089
|
+
sA.lods && (sA.currentVisible = !0, z(sA, ZA(sA)));
|
|
2090
2090
|
});
|
|
2091
2091
|
});
|
|
2092
2092
|
let cA = 0, dA = [], HI = dA, vA = [], $ = 0;
|
|
@@ -2096,20 +2096,20 @@ function Se(C) {
|
|
|
2096
2096
|
let DA = $ > 0 ? cA : 0, fA = !1;
|
|
2097
2097
|
if (cA > Z) {
|
|
2098
2098
|
const CA = (oA) => {
|
|
2099
|
-
for (let
|
|
2100
|
-
const
|
|
2101
|
-
if (
|
|
2102
|
-
const iI = z(
|
|
2099
|
+
for (let sA = 0; sA < vA.length; sA++) {
|
|
2100
|
+
const aA = vA[sA];
|
|
2101
|
+
if (aA.currentRenderLod != oA) continue;
|
|
2102
|
+
const iI = z(aA, oA + 1);
|
|
2103
2103
|
if (iI < H.lodLevels) {
|
|
2104
|
-
if (cA +=
|
|
2104
|
+
if (cA += aA.lods[iI].count - aA.lods[oA].count, cA <= Z) break;
|
|
2105
2105
|
} else
|
|
2106
|
-
cA -=
|
|
2106
|
+
cA -= aA.lods[oA].count;
|
|
2107
2107
|
}
|
|
2108
2108
|
};
|
|
2109
|
-
for (vA.sort((oA,
|
|
2109
|
+
for (vA.sort((oA, sA) => sA.currentDistance - oA.currentDistance); cA > Z; ) {
|
|
2110
2110
|
let oA = H.lodLevels;
|
|
2111
|
-
for (const
|
|
2112
|
-
oA = Math.min(oA,
|
|
2111
|
+
for (const sA of vA)
|
|
2112
|
+
oA = Math.min(oA, sA.currentRenderLod);
|
|
2113
2113
|
if (oA >= P) {
|
|
2114
2114
|
console.warn("Top LOD data is too large"), fA = !0;
|
|
2115
2115
|
break;
|
|
@@ -2118,25 +2118,25 @@ function Se(C) {
|
|
|
2118
2118
|
}
|
|
2119
2119
|
}
|
|
2120
2120
|
if (fA) {
|
|
2121
|
-
dA.sort((
|
|
2121
|
+
dA.sort((sA, aA) => sA.currentVisible !== aA.currentVisible ? sA.currentVisible ? -1 : 1 : sA.currentDistance - aA.currentDistance);
|
|
2122
2122
|
let CA = 0, oA = W + u + b;
|
|
2123
|
-
for (let
|
|
2124
|
-
if (oA +=
|
|
2123
|
+
for (let sA of dA) {
|
|
2124
|
+
if (oA += sA.lods[P]?.count || 0, oA > Z)
|
|
2125
2125
|
break;
|
|
2126
2126
|
CA++;
|
|
2127
2127
|
}
|
|
2128
2128
|
HI = dA.slice(0, CA), i = Ro(Date.now() + "");
|
|
2129
2129
|
} else {
|
|
2130
|
-
const CA = vA.filter((
|
|
2131
|
-
CA.sort((
|
|
2130
|
+
const CA = vA.filter((aA) => aA.currentRenderLod < P);
|
|
2131
|
+
CA.sort((aA, iI) => aA.lods[aA.currentRenderLod].fileKey === iI.lods[iI.currentRenderLod].fileKey ? aA.lods[aA.currentRenderLod].offset - iI.lods[iI.currentRenderLod].offset : aA.lods[aA.currentRenderLod].fileKey < iI.lods[iI.currentRenderLod].fileKey ? -1 : 1);
|
|
2132
2132
|
let oA = "";
|
|
2133
|
-
for (let
|
|
2134
|
-
let iI =
|
|
2133
|
+
for (let aA of CA) {
|
|
2134
|
+
let iI = aA.lods[aA.currentRenderLod];
|
|
2135
2135
|
oA += `${iI.fileKey},${iI.offset};`;
|
|
2136
2136
|
}
|
|
2137
|
-
const
|
|
2138
|
-
if (I(UB) && i ===
|
|
2139
|
-
i =
|
|
2137
|
+
const sA = Ro(oA);
|
|
2138
|
+
if (I(UB) && i === sA) return;
|
|
2139
|
+
i = sA;
|
|
2140
2140
|
}
|
|
2141
2141
|
const xA = Date.now();
|
|
2142
2142
|
j.version = xA, j.active = !1;
|
|
@@ -2146,14 +2146,14 @@ function Se(C) {
|
|
|
2146
2146
|
for (let CA of HI) {
|
|
2147
2147
|
const oA = CA.lods[CA.currentRenderLod];
|
|
2148
2148
|
if (!oA) continue;
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2149
|
+
const sA = H.files[oA.fileKey];
|
|
2150
|
+
sA.downloadData && (sA.lastTime = Date.now(), CB.set(sA.downloadData.subarray(oA.offset * 32, (oA.offset + oA.count) * 32), Bg * 32), Bg += oA.count);
|
|
2151
2151
|
}
|
|
2152
2152
|
W && (CB.set(H.environment.downloadData.subarray(0, W * 32), Bg * 32), Bg += W), u && (CB.set(D.watermarkData.subarray(0, u * 32), Bg * 32), Bg += u), b && (CB.set(p.subarray(0, b * 32), (Bg + u) * 32), Bg += b);
|
|
2153
|
-
const
|
|
2154
|
-
for (let CA = 0, oA = 0,
|
|
2155
|
-
oA = Cg[CA * 8],
|
|
2156
|
-
j.txdata = gg, j.xyz = BB, j.renderSplatCount =
|
|
2153
|
+
const yQ = Bg, BB = new Float32Array(yQ * 3), Qg = [Cg[0], Cg[1], Cg[2]], Eg = [Cg[0], Cg[1], Cg[2]];
|
|
2154
|
+
for (let CA = 0, oA = 0, sA = 0, aA = 0; CA < yQ; CA++)
|
|
2155
|
+
oA = Cg[CA * 8], sA = Cg[CA * 8 + 1], aA = Cg[CA * 8 + 2], BB[CA * 3] = oA, BB[CA * 3 + 1] = sA, BB[CA * 3 + 2] = aA, Qg[0] = Math.min(Qg[0], oA), Qg[1] = Math.min(Qg[1], sA), Qg[2] = Math.min(Qg[2], aA), Eg[0] = Math.max(Eg[0], oA), Eg[1] = Math.max(Eg[1], sA), Eg[2] = Math.max(Eg[2], aA);
|
|
2156
|
+
j.txdata = gg, j.xyz = BB, j.renderSplatCount = yQ, j.visibleSplatCount = DA + D.watermarkCount + b + W, j.modelSplatCount = D.downloadSplatCount + b, j.watermarkCount = u + b, j.minX = Qg[0], j.maxX = Eg[0], j.minY = Qg[1], j.maxY = Eg[1], j.minZ = Qg[2], j.maxZ = Eg[2], I(rB, j), B = xA;
|
|
2157
2157
|
const fw = `${$}/${dA.length}`, Tw = H.totalCount;
|
|
2158
2158
|
if (I(LA, { scene: "large", lodTotalCount: Tw, cuts: fw, visibleSplatCount: j.visibleSplatCount, modelSplatCount: j.modelSplatCount }), !E) {
|
|
2159
2159
|
E = !0;
|
|
@@ -2263,14 +2263,14 @@ function Se(C) {
|
|
|
2263
2263
|
g || !O || !n || (!D && (D = new ZE({ url: "fake.spx" })), !D.splatTiles && (D.splatTiles = O), L(O.totalCount), te(D, O, n));
|
|
2264
2264
|
}
|
|
2265
2265
|
A(vs, (O, n) => V(O, n)), A(YE, (O, n) => QA(O, n)), A(zs, (O = 1e4) => Date.now() - B < O), A(_s, () => v()), I(
|
|
2266
|
-
|
|
2266
|
+
rg,
|
|
2267
2267
|
async () => await U(S),
|
|
2268
2268
|
() => !g,
|
|
2269
2269
|
qA ? 10 : 6
|
|
2270
2270
|
), se(C);
|
|
2271
2271
|
}
|
|
2272
|
-
var
|
|
2273
|
-
const Yo = "currentVisibleRadius", qo = "currentLightRadius", ee = "splatTextureWidth", po = "transitionEffect",
|
|
2272
|
+
var iQ = /* @__PURE__ */ ((C) => (C[C.ModelCenterCirccle = 1] = "ModelCenterCirccle", C[C.ScreenCenterCircle = 2] = "ScreenCenterCircle", C[C.ScreenMiddleToLeftRight = 3] = "ScreenMiddleToLeftRight", C[C.ScreenMiddleToTopBottom = 4] = "ScreenMiddleToTopBottom", C))(iQ || {});
|
|
2273
|
+
const Yo = "currentVisibleRadius", qo = "currentLightRadius", ee = "splatTextureWidth", po = "transitionEffect", TQ = "splatShTexture12", Lo = "maxPixelDiameter", Ho = "minPixelDiameter", uQ = "activeFlagValue", OQ = "splatShTexture3", fo = "shPalettesReady", To = "performanceNow", wB = "performanceAct", he = "waterMarkColor", uo = "showWaterMark", Oo = "useSimilarExp", mQ = "splatTexture0", bQ = "splatTexture1", mo = "particleMode", bo = "bigSceneMode", Zo = "lightFactor", xo = "debugEffect", jo = "usingIndex", ke = "splatIndex", ZQ = "shPalettes", Wo = "maxRadius", Po = "flagValue", Xo = "pointMode", Vo = "markPoint", vo = "shDegree", zo = "viewport", _o = "minAlpha", $o = "useLod", AD = "focal", ID = "topY";
|
|
2274
2274
|
let kA = 0;
|
|
2275
2275
|
kA++;
|
|
2276
2276
|
const gD = `$${kA++}`, Ge = `$${kA++}`;
|
|
@@ -2706,17 +2706,17 @@ function We(C) {
|
|
|
2706
2706
|
let i = 0, o = 0;
|
|
2707
2707
|
const D = 960;
|
|
2708
2708
|
let a = 0;
|
|
2709
|
-
I(ea, () => a), I(
|
|
2710
|
-
}, !0), I(
|
|
2709
|
+
I(ea, () => a), I(cQ, () => {
|
|
2710
|
+
}, !0), I(MQ, () => {
|
|
2711
2711
|
}, !0), I(EB, () => {
|
|
2712
2712
|
}, !0), I(iB, () => {
|
|
2713
2713
|
}, !0), I(zi, async () => {
|
|
2714
|
-
const y = new
|
|
2714
|
+
const y = new wE();
|
|
2715
2715
|
y.setIndex([0, 1, 2, 0, 2, 3]);
|
|
2716
2716
|
const e = new Float32Array(12), G = new GI(e, 3);
|
|
2717
2717
|
y.setAttribute("position", G), G.setXYZ(0, -2, -2, 0), G.setXYZ(1, -2, 2, 0), G.setXYZ(2, 2, 2, 0), G.setXYZ(3, 2, -2, 0), G.needsUpdate = !0;
|
|
2718
|
-
let k = new
|
|
2719
|
-
const L = await g(
|
|
2718
|
+
let k = new wE().copy(y);
|
|
2719
|
+
const L = await g(dg);
|
|
2720
2720
|
if (A) return;
|
|
2721
2721
|
const K = new Uint32Array(L), U = new Us(K, 1, !1);
|
|
2722
2722
|
return U.setUsage(Zw), U.needsUpdate = !0, k.setAttribute(ke, U), k.instanceCount = 0, I(Ao, (J, r, F, f, T) => {
|
|
@@ -2724,7 +2724,7 @@ function We(C) {
|
|
|
2724
2724
|
g(wa, r), g(LA, { renderSplatCount: T });
|
|
2725
2725
|
}), k.instanceCount = T, g(JA), g(LA, { sortTime: `${F} / ${Date.now() - f}`, bucketBits: i, sortType: o });
|
|
2726
2726
|
}), I(Ut, () => k), I(
|
|
2727
|
-
|
|
2727
|
+
cQ,
|
|
2728
2728
|
() => {
|
|
2729
2729
|
U.array = null, k.dispose();
|
|
2730
2730
|
},
|
|
@@ -2735,7 +2735,7 @@ function We(C) {
|
|
|
2735
2735
|
return g(x).bigSceneMode && (y.BigSceneMode = ""), y;
|
|
2736
2736
|
}), I(_i, async () => {
|
|
2737
2737
|
if (A) return;
|
|
2738
|
-
const y = g(x), { texwidth: e, texheight: G } = g(LC, await g(
|
|
2738
|
+
const y = g(x), { texwidth: e, texheight: G } = g(LC, await g(dg)), k = new Js({
|
|
2739
2739
|
uniforms: g(vi, e),
|
|
2740
2740
|
vertexShader: s(me),
|
|
2741
2741
|
fragmentShader: s(be),
|
|
@@ -2749,21 +2749,21 @@ function We(C) {
|
|
|
2749
2749
|
side: MI,
|
|
2750
2750
|
defines: g(So)
|
|
2751
2751
|
}), L = new Uint32Array(e * G * 4);
|
|
2752
|
-
let K = new ig(L, e, G, og,
|
|
2753
|
-
K.internalFormat = "RGBA32UI", K.needsUpdate = !0, k.uniforms[
|
|
2752
|
+
let K = new ig(L, e, G, og, Rg);
|
|
2753
|
+
K.internalFormat = "RGBA32UI", K.needsUpdate = !0, k.uniforms[mQ].value = K;
|
|
2754
2754
|
const U = g(aI) ? G : 1, J = new Uint32Array(e * U * 4);
|
|
2755
|
-
let r = new ig(J, e, U, og,
|
|
2756
|
-
r.internalFormat = "RGBA32UI", r.needsUpdate = !0, k.uniforms[
|
|
2755
|
+
let r = new ig(J, e, U, og, Rg);
|
|
2756
|
+
r.internalFormat = "RGBA32UI", r.needsUpdate = !0, k.uniforms[bQ].value = r;
|
|
2757
2757
|
const F = await g(JC, 1, e), f = new Uint32Array(e * F * 4);
|
|
2758
|
-
let T = new ig(f, e, F, og,
|
|
2759
|
-
T.internalFormat = "RGBA32UI", T.needsUpdate = !0, k.uniforms[
|
|
2758
|
+
let T = new ig(f, e, F, og, Rg);
|
|
2759
|
+
T.internalFormat = "RGBA32UI", T.needsUpdate = !0, k.uniforms[TQ].value = T;
|
|
2760
2760
|
const q = await g(JC, 3, e), X = new Uint32Array(e * q * 4);
|
|
2761
|
-
let v = new ig(X, e, q, og,
|
|
2762
|
-
v.internalFormat = "RGBA32UI", v.needsUpdate = !0, k.uniforms[
|
|
2761
|
+
let v = new ig(X, e, q, og, Rg);
|
|
2762
|
+
v.internalFormat = "RGBA32UI", v.needsUpdate = !0, k.uniforms[OQ].value = v;
|
|
2763
2763
|
const AA = new Uint8Array(D * 4);
|
|
2764
2764
|
AA.fill(128);
|
|
2765
2765
|
let V = new ig(AA, D, 1, og, Ti);
|
|
2766
|
-
V.internalFormat = "RGBA8UI", V.needsUpdate = !0, k.uniforms[
|
|
2766
|
+
V.internalFormat = "RGBA8UI", V.needsUpdate = !0, k.uniforms[ZQ].value = V, k.needsUpdate = !0;
|
|
2767
2767
|
let QA = !1;
|
|
2768
2768
|
I(Io, (n) => {
|
|
2769
2769
|
if (!g(aI)) {
|
|
@@ -2772,30 +2772,30 @@ function We(C) {
|
|
|
2772
2772
|
}
|
|
2773
2773
|
const c = n.txdata;
|
|
2774
2774
|
n.txdata = null;
|
|
2775
|
-
const d = new ig(c, e, G, og,
|
|
2775
|
+
const d = new ig(c, e, G, og, Rg);
|
|
2776
2776
|
d.onUpdate = () => {
|
|
2777
2777
|
n.textureReady = !0, n.textureReadyTime = Date.now(), h(n), g(Ia, n.renderSplatCount);
|
|
2778
|
-
}, d.internalFormat = "RGBA32UI", d.needsUpdate = !0, n.index ? (k.uniforms[
|
|
2778
|
+
}, d.internalFormat = "RGBA32UI", d.needsUpdate = !0, n.index ? (k.uniforms[bQ].value = d, r?.dispose(), r = d) : (k.uniforms[mQ].value = d, K?.dispose(), K = d), k.needsUpdate = !0, g(JA);
|
|
2779
2779
|
}), I(ta, async (n) => {
|
|
2780
2780
|
if (g(aI) || !n || !n.length) return;
|
|
2781
2781
|
const c = new Uint32Array(e * await g(JC, 1, e) * 4), d = new Uint8Array(c.buffer);
|
|
2782
2782
|
for (let u = 0, b = 0; u < n.length; u++)
|
|
2783
2783
|
d.set(n[u], b), b += n[u].byteLength;
|
|
2784
|
-
const p = new ig(c, e, F, og,
|
|
2785
|
-
p.internalFormat = "RGBA32UI", p.needsUpdate = !0, k.uniforms[
|
|
2784
|
+
const p = new ig(c, e, F, og, Rg);
|
|
2785
|
+
p.internalFormat = "RGBA32UI", p.needsUpdate = !0, k.uniforms[TQ].value = p, k.needsUpdate = !0, T?.dispose(), T = p, g(JA);
|
|
2786
2786
|
}), I(Sa, async (n) => {
|
|
2787
2787
|
if (g(aI) || !n || !n.length) return;
|
|
2788
2788
|
const c = new Uint32Array(e * await g(JC, 3, e) * 4), d = new Uint8Array(c.buffer);
|
|
2789
2789
|
for (let u = 0, b = 0; u < n.length; u++)
|
|
2790
2790
|
d.set(n[u], b), b += n[u].byteLength;
|
|
2791
|
-
const p = new ig(c, e, F, og,
|
|
2792
|
-
p.internalFormat = "RGBA32UI", p.needsUpdate = !0, k.uniforms[
|
|
2791
|
+
const p = new ig(c, e, F, og, Rg);
|
|
2792
|
+
p.internalFormat = "RGBA32UI", p.needsUpdate = !0, k.uniforms[OQ].value = p, k.needsUpdate = !0, v?.dispose(), v = p, g(JA);
|
|
2793
2793
|
}), I(RE, async (n) => {
|
|
2794
2794
|
if (!n || !n.length) return;
|
|
2795
2795
|
const c = 1024, d = new Uint8Array(D * c * 4);
|
|
2796
2796
|
d.fill(128), d.set(n);
|
|
2797
2797
|
const p = new ig(d, D, c, og, Ti);
|
|
2798
|
-
V.internalFormat = "RGBA8UI", p.onUpdate = () => g(to), p.needsUpdate = !0, k.uniforms[
|
|
2798
|
+
V.internalFormat = "RGBA8UI", p.onUpdate = () => g(to), p.needsUpdate = !0, k.uniforms[ZQ].value = p, k.needsUpdate = !0, V?.dispose(), V = p, g(JA);
|
|
2799
2799
|
}), I($i, () => k), I(
|
|
2800
2800
|
EB,
|
|
2801
2801
|
() => {
|
|
@@ -2814,7 +2814,7 @@ function We(C) {
|
|
|
2814
2814
|
k.uniforms[jo].value = n, k.uniformsNeedUpdate = !0, g(JA);
|
|
2815
2815
|
}), I(so, (n) => {
|
|
2816
2816
|
k.uniforms[po].value = n, k.uniformsNeedUpdate = !0, g(JA);
|
|
2817
|
-
}), I(
|
|
2817
|
+
}), I(ng, (n) => {
|
|
2818
2818
|
const c = g(x);
|
|
2819
2819
|
n === void 0 && (n = !c.pointcloudMode), k.uniforms[Xo].value = n, k.uniformsNeedUpdate = !0, c.pointcloudMode = n, g(JA), c.viewerEvents && (c.viewerEvents.fire(x).pointcloudMode = n);
|
|
2820
2820
|
}), I(Co, (n) => {
|
|
@@ -2839,21 +2839,21 @@ function We(C) {
|
|
|
2839
2839
|
k.uniforms[Wo].value = n, k.uniformsNeedUpdate = !0, g(JA);
|
|
2840
2840
|
}), I(MB, (n, c, d, p) => {
|
|
2841
2841
|
k.uniforms[Vo].value = [n, c, d, p ? 1 : -1], k.uniformsNeedUpdate = !0, g(JA);
|
|
2842
|
-
}), I(
|
|
2842
|
+
}), I(ME, (n = !0) => {
|
|
2843
2843
|
k.uniforms[uo].value = n, k.uniformsNeedUpdate = !0, g(JA);
|
|
2844
2844
|
}), I(to, (n = !0) => {
|
|
2845
2845
|
k.uniforms[fo].value = n, k.uniformsNeedUpdate = !0, g(JA);
|
|
2846
2846
|
}), I(Xs, (n) => {
|
|
2847
2847
|
k.uniforms[To].value = n, k.uniformsNeedUpdate = !0;
|
|
2848
|
-
}), I(
|
|
2848
|
+
}), I(mB, (n) => {
|
|
2849
2849
|
k.uniforms[wB].value = n, k.uniformsNeedUpdate = !0, g(JA);
|
|
2850
|
-
}), I(
|
|
2850
|
+
}), I(NQ, (n, c) => {
|
|
2851
2851
|
k.uniforms[Ho].value = n, k.uniforms[Lo].value = c, k.uniformsNeedUpdate = !0, g(JA);
|
|
2852
|
-
}), I(
|
|
2852
|
+
}), I(nQ, (n) => {
|
|
2853
2853
|
k.uniforms[_o].value = Math.min(Math.max(0, n), 255) / 255, k.uniformsNeedUpdate = !0, g(JA);
|
|
2854
|
-
}), I(
|
|
2854
|
+
}), I(rQ, (n = !1) => {
|
|
2855
2855
|
k.uniforms[Oo].value = n, k.uniformsNeedUpdate = !0, g(JA);
|
|
2856
|
-
}), I(
|
|
2856
|
+
}), I(bB, (n) => {
|
|
2857
2857
|
k.uniforms[mo].value = n, k.uniformsNeedUpdate = !0, g(JA);
|
|
2858
2858
|
}), I(Jt, (n) => {
|
|
2859
2859
|
k.uniforms[xo].value = n, k.uniformsNeedUpdate = !0;
|
|
@@ -2863,10 +2863,10 @@ function We(C) {
|
|
|
2863
2863
|
}), I(Lt, (n = 0, c = 0) => {
|
|
2864
2864
|
k.uniforms[Po].value = n << 16 | c, k.uniforms[wB].value = performance.now(), k.uniformsNeedUpdate = !0, g(JA);
|
|
2865
2865
|
}), I(dt, (n = -1) => {
|
|
2866
|
-
if (n < 0) return k.uniforms[
|
|
2867
|
-
k.uniforms[
|
|
2866
|
+
if (n < 0) return k.uniforms[uQ].value;
|
|
2867
|
+
k.uniforms[uQ].value = n, k.uniforms[wB].value = performance.now(), k.uniformsNeedUpdate = !0, g(JA);
|
|
2868
2868
|
}), I(
|
|
2869
|
-
|
|
2869
|
+
MQ,
|
|
2870
2870
|
() => {
|
|
2871
2871
|
k.dispose(), K && K.dispose(), r && r.dispose(), T && T.dispose(), v && v.dispose(), V?.dispose();
|
|
2872
2872
|
},
|
|
@@ -2881,22 +2881,22 @@ function We(C) {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
I(Ws, async () => {
|
|
2883
2883
|
const y = new mA(await g(zi), await g(_i));
|
|
2884
|
-
return g(EB), g(iB), g(Co, g(aI)), g(
|
|
2884
|
+
return g(EB), g(iB), g(Co, g(aI)), g(ng, g(UE)), y;
|
|
2885
2885
|
});
|
|
2886
2886
|
function t() {
|
|
2887
2887
|
g(EB), g(iB);
|
|
2888
2888
|
}
|
|
2889
2889
|
window.addEventListener("resize", t), I($s, () => {
|
|
2890
|
-
A = !0, window.removeEventListener("resize", t), g(
|
|
2890
|
+
A = !0, window.removeEventListener("resize", t), g(cQ), g(MQ);
|
|
2891
2891
|
}), I(lE, () => {
|
|
2892
2892
|
if (!g(Ka)) return;
|
|
2893
2893
|
const y = g(x), e = g(eI)?.meta || {}, G = y.qualityLevel || SI.Default5;
|
|
2894
2894
|
if (g(OC, [0, 1, 2, 3, 3, 3, 3, 3, 3][G - 1]), qA) {
|
|
2895
2895
|
const L = [4, 3, 3, 2, 1, 1, 1, 1, 1], K = [128, 128, 128, 256, 256, 256, 512, 512, 512], U = [7, 6, 5, 4, 4, 3, 2, 2, 2], J = e.minPixelDiameter || L[G - 1], r = e.maxPixelDiameter || K[G - 1];
|
|
2896
|
-
g(
|
|
2896
|
+
g(NQ, J, r), g(nQ, e.minAlpha || U[G - 1]), g(rQ, G < SI.L4);
|
|
2897
2897
|
} else {
|
|
2898
2898
|
const L = [2, 2, 2, 1, 1, 1, 1, 1, 1], K = [128, 256, 256, 512, 512, 1024, 1024, 1024, 1024], U = [5, 4, 3, 2, 2, 1, 1, 1, 1], J = e.minPixelDiameter || L[G - 1], r = e.maxPixelDiameter || K[G - 1];
|
|
2899
|
-
g(
|
|
2899
|
+
g(NQ, J, r), g(nQ, e.minAlpha || U[G - 1]), g(rQ, G < SI.L2);
|
|
2900
2900
|
}
|
|
2901
2901
|
g(Ui);
|
|
2902
2902
|
}), I(Aa, async () => {
|
|
@@ -2904,49 +2904,49 @@ function We(C) {
|
|
|
2904
2904
|
if (g(x).disableTransitionEffectOnLoad) return g(SC, 0);
|
|
2905
2905
|
let e = 0.01, G = 0.01, k = !1, L = 0;
|
|
2906
2906
|
g(SC, G), g(
|
|
2907
|
-
|
|
2907
|
+
rg,
|
|
2908
2908
|
() => {
|
|
2909
2909
|
if (A) return;
|
|
2910
2910
|
G += (Q - G) * e, g(SC, G);
|
|
2911
2911
|
let K = g(ga);
|
|
2912
2912
|
K && !L && (L = Date.now());
|
|
2913
2913
|
let U = G / B;
|
|
2914
|
-
K && (U > 0.9 || Date.now() - L > 2500) ? (g(
|
|
2914
|
+
K && (U > 0.9 || Date.now() - L > 2500) ? (g(UE) && g(dB, !0), g(SC, 0), k = !0) : K && U > 0.7 ? e = Math.min(e * 1.2, 0.3) : K && U > 0.5 ? e = Math.min(e * 1.2, 0.2) : U > 0.4 && (e = Math.min(e * 1.05, 0.1));
|
|
2915
2915
|
},
|
|
2916
2916
|
() => !A && !k,
|
|
2917
2917
|
3
|
|
2918
2918
|
);
|
|
2919
|
-
}), I(
|
|
2919
|
+
}), I(dB, (y = !1) => {
|
|
2920
2920
|
if (g(aI)) return;
|
|
2921
2921
|
const e = g(x);
|
|
2922
|
-
if (g(so, e.transitionEffect), e.transitionEffect ===
|
|
2922
|
+
if (g(so, e.transitionEffect), e.transitionEffect === iQ.ModelCenterCirccle) {
|
|
2923
2923
|
for (; E.length; ) E.pop().stop = !0;
|
|
2924
2924
|
const G = B * 1e-3;
|
|
2925
2925
|
let k = { currentPointMode: e.pointcloudMode, stepRate: 15e-4, currentLightRadius: G, stop: !1 };
|
|
2926
2926
|
E.push(k), g(
|
|
2927
|
-
|
|
2927
|
+
rg,
|
|
2928
2928
|
() => {
|
|
2929
|
-
A || (k.currentLightRadius += B * k.stepRate, g(eC, k.currentLightRadius), k.currentLightRadius > B ? (g(
|
|
2929
|
+
A || (k.currentLightRadius += B * k.stepRate, g(eC, k.currentLightRadius), k.currentLightRadius > B ? (g(ng, !k.currentPointMode), g(eC, 0), k.stop = !0, E.length === 1 && E[0] === k && E.pop(), g(IC, y)) : k.currentLightRadius / B < 0.4 ? k.stepRate = Math.min(k.stepRate * 1.02, 0.03) : k.stepRate *= 1.04);
|
|
2930
2930
|
},
|
|
2931
2931
|
() => !A && !k.stop
|
|
2932
2932
|
);
|
|
2933
2933
|
} else
|
|
2934
|
-
g(
|
|
2935
|
-
g(
|
|
2934
|
+
g(mB, performance.now()), g(eC, 0.1), setTimeout(() => {
|
|
2935
|
+
g(ng), g(eC, 0), g(IC, y);
|
|
2936
2936
|
}, 500);
|
|
2937
2937
|
}), I(
|
|
2938
2938
|
IC,
|
|
2939
2939
|
(y = !1) => {
|
|
2940
|
-
g(aI) || (g(
|
|
2940
|
+
g(aI) || (g(bB, 0), y && g(x).viewerEvents?.fire(mC), g(x).viewerEvents?.fire(sa));
|
|
2941
2941
|
},
|
|
2942
2942
|
!0
|
|
2943
2943
|
), I(vi, (y) => ({
|
|
2944
2944
|
[ee]: { type: "int", value: y },
|
|
2945
|
-
[OQ]: { type: "t", value: null },
|
|
2946
2945
|
[mQ]: { type: "t", value: null },
|
|
2947
|
-
[fQ]: { type: "t", value: null },
|
|
2948
|
-
[uQ]: { type: "t", value: null },
|
|
2949
2946
|
[bQ]: { type: "t", value: null },
|
|
2947
|
+
[TQ]: { type: "t", value: null },
|
|
2948
|
+
[OQ]: { type: "t", value: null },
|
|
2949
|
+
[ZQ]: { type: "t", value: null },
|
|
2950
2950
|
[fo]: { type: "bool", value: !1 },
|
|
2951
2951
|
[AD]: { type: "v2", value: new WA() },
|
|
2952
2952
|
[zo]: { type: "v2", value: new WA() },
|
|
@@ -2973,7 +2973,7 @@ function We(C) {
|
|
|
2973
2973
|
[uo]: { type: "bool", value: !1 },
|
|
2974
2974
|
[Oo]: { type: "bool", value: !0 },
|
|
2975
2975
|
[Po]: { type: "uint", value: 1 },
|
|
2976
|
-
[
|
|
2976
|
+
[uQ]: { type: "uint", value: 0 }
|
|
2977
2977
|
}));
|
|
2978
2978
|
const S = g(us);
|
|
2979
2979
|
S.onmessage = (y) => {
|
|
@@ -3038,11 +3038,11 @@ function Pe(C) {
|
|
|
3038
3038
|
let G = 0;
|
|
3039
3039
|
for (let K of a)
|
|
3040
3040
|
G += K.length;
|
|
3041
|
-
const k = new Uint8Array(G *
|
|
3041
|
+
const k = new Uint8Array(G * wA);
|
|
3042
3042
|
let L = 0;
|
|
3043
3043
|
for (let K of a)
|
|
3044
3044
|
for (let U of K)
|
|
3045
|
-
k.set(await ge(U[0], U[1], Q, E),
|
|
3045
|
+
k.set(await ge(U[0], U[1], Q, E), wA * L++);
|
|
3046
3046
|
return k;
|
|
3047
3047
|
});
|
|
3048
3048
|
}
|
|
@@ -3056,12 +3056,12 @@ function Fi(C) {
|
|
|
3056
3056
|
console.info(B);
|
|
3057
3057
|
}), A(fs, (I = "", g = "") => {
|
|
3058
3058
|
const B = "https://reall3d.com/gsfont/api/getGaussianText", Q = new FormData();
|
|
3059
|
-
return Q.append("text", I.substring(0, 100)), Q.append("fmt", g), Q.append("ver",
|
|
3059
|
+
return Q.append("text", I.substring(0, 100)), Q.append("fmt", g), Q.append("ver", QQ), Q.append("tk", sessionStorage.getItem("tk-gstext") || ""), new Promise((E) => {
|
|
3060
3060
|
fetch(B, { method: "POST", body: Q }).then((i) => i.ok ? i.json() : {}).then((i) => i.success ? E(JSON.parse(i.data)) : E([])).catch((i) => E([]));
|
|
3061
3061
|
});
|
|
3062
3062
|
});
|
|
3063
3063
|
}
|
|
3064
|
-
const Xe = /^[og]\s*(.+)?/, Ve = /^mtllib /, ve = /^usemtl /, ze = /^usemap /, oD = /\s+/, DD = new R(),
|
|
3064
|
+
const Xe = /^[og]\s*(.+)?/, Ve = /^mtllib /, ve = /^usemtl /, ze = /^usemap /, oD = /\s+/, DD = new R(), xQ = new R(), sD = new R(), aD = new R(), JI = new R(), tB = new dI();
|
|
3065
3065
|
function _e() {
|
|
3066
3066
|
const C = {
|
|
3067
3067
|
objects: [],
|
|
@@ -3171,7 +3171,7 @@ function _e() {
|
|
|
3171
3171
|
},
|
|
3172
3172
|
addFaceNormal: function(A, I, g) {
|
|
3173
3173
|
const B = this.vertices, Q = this.object.geometry.normals;
|
|
3174
|
-
DD.fromArray(B, A),
|
|
3174
|
+
DD.fromArray(B, A), xQ.fromArray(B, I), sD.fromArray(B, g), JI.subVectors(sD, xQ), aD.subVectors(DD, xQ), JI.cross(aD), JI.normalize(), Q.push(JI.x, JI.y, JI.z), Q.push(JI.x, JI.y, JI.z), Q.push(JI.x, JI.y, JI.z);
|
|
3175
3175
|
},
|
|
3176
3176
|
addColor: function(A, I, g) {
|
|
3177
3177
|
const B = this.colors, Q = this.object.geometry.colors;
|
|
@@ -3392,7 +3392,7 @@ function Ah(C) {
|
|
|
3392
3392
|
const I = (i, o, D) => C.on(i, o, D), g = (i, ...o) => C.fire(i, ...o);
|
|
3393
3393
|
I(Vs, () => A = !0);
|
|
3394
3394
|
const B = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map();
|
|
3395
|
-
I(qB, () => g(yI) && B.set(Date.now(), 1)), I(pB, () => g(yI) && g($g, B)), I(
|
|
3395
|
+
I(qB, () => g(yI) && B.set(Date.now(), 1)), I(pB, () => g(yI) && g($g, B)), I(_B, () => g(yI) && Q.set(Date.now(), 1)), I(LB, () => g(yI) && g($g, Q));
|
|
3396
3396
|
let E = 0;
|
|
3397
3397
|
I(
|
|
3398
3398
|
AC,
|
|
@@ -3412,12 +3412,12 @@ function Ah(C) {
|
|
|
3412
3412
|
for (const s of i.keys())
|
|
3413
3413
|
D - s <= 1e3 ? a++ : o.push(s);
|
|
3414
3414
|
return o.forEach((s) => i.delete(s)), Math.min(a, 60);
|
|
3415
|
-
}), window.addEventListener("beforeunload", () => g(
|
|
3415
|
+
}), window.addEventListener("beforeunload", () => g($B)), I(ka, async (i) => {
|
|
3416
3416
|
g(LA, { scene: "small (obj)" });
|
|
3417
3417
|
const o = await mI(i, C);
|
|
3418
3418
|
if (o) {
|
|
3419
3419
|
const D = URL.createObjectURL(new Blob([o], { type: "application/octet-stream" }));
|
|
3420
|
-
new $e().load(D, (a) => g(
|
|
3420
|
+
new $e().load(D, (a) => g(hA).add(a)), g(AI, !0), g(XI, !0);
|
|
3421
3421
|
}
|
|
3422
3422
|
g(qC, 0);
|
|
3423
3423
|
});
|
|
@@ -3428,7 +3428,7 @@ function Ih(C) {
|
|
|
3428
3428
|
}
|
|
3429
3429
|
function wD(C) {
|
|
3430
3430
|
const A = { ...C };
|
|
3431
|
-
return A.position = A.position ? [...A.position] : [0, -5, 15], A.lookAt = A.lookAt ? [...A.lookAt] : [0, 0, 0], A.lookUp = A.lookUp ? [...A.lookUp] : [0, -1, 0], A.fov ?? (A.fov = 45), A.near ?? (A.near = 0.1), A.far ?? (A.far = 1e3), A.enableDamping ?? (A.enableDamping = !0), A.autoRotate ?? (A.autoRotate = !0), A.enableZoom ?? (A.enableZoom = !0), A.enableRotate ?? (A.enableRotate = !0), A.enablePan ?? (A.enablePan = !0), A.enableKeyboard ?? (A.enableKeyboard = !0), A.bigSceneMode ?? (A.bigSceneMode = !1), A.pointcloudMode ?? (A.pointcloudMode = !A.bigSceneMode), A.lightFactor ?? (A.lightFactor = 1.1), A.debugMode ?? (A.debugMode = location.protocol === "http:" || /^test\./.test(location.host)), A.markMode ?? (A.markMode = !1), A.markVisible ?? (A.markVisible = !0), A.meterScale ?? (A.meterScale = 1), A.background ?? (A.background = "#000000"), A.minDistance ?? (A.minDistance = 0.1), A.maxDistance ?? (A.maxDistance = 5e3), A.qualityLevel ?? (A.qualityLevel = SI.Default5), A.sortType ?? (A.sortType = DC.Default1), A.transitionEffect ?? (A.transitionEffect =
|
|
3431
|
+
return A.position = A.position ? [...A.position] : [0, -5, 15], A.lookAt = A.lookAt ? [...A.lookAt] : [0, 0, 0], A.lookUp = A.lookUp ? [...A.lookUp] : [0, -1, 0], A.fov ?? (A.fov = 45), A.near ?? (A.near = 0.1), A.far ?? (A.far = 1e3), A.enableDamping ?? (A.enableDamping = !0), A.autoRotate ?? (A.autoRotate = !0), A.enableZoom ?? (A.enableZoom = !0), A.enableRotate ?? (A.enableRotate = !0), A.enablePan ?? (A.enablePan = !0), A.enableKeyboard ?? (A.enableKeyboard = !0), A.bigSceneMode ?? (A.bigSceneMode = !1), A.pointcloudMode ?? (A.pointcloudMode = !A.bigSceneMode), A.lightFactor ?? (A.lightFactor = 1.1), A.debugMode ?? (A.debugMode = location.protocol === "http:" || /^test\./.test(location.host)), A.markMode ?? (A.markMode = !1), A.markVisible ?? (A.markVisible = !0), A.meterScale ?? (A.meterScale = 1), A.background ?? (A.background = "#000000"), A.minDistance ?? (A.minDistance = 0.1), A.maxDistance ?? (A.maxDistance = 5e3), A.qualityLevel ?? (A.qualityLevel = SI.Default5), A.sortType ?? (A.sortType = DC.Default1), A.transitionEffect ?? (A.transitionEffect = iQ.ModelCenterCirccle), A.disableRightClickFocus ?? (A.disableRightClickFocus = !1), A;
|
|
3432
3432
|
}
|
|
3433
3433
|
function gh(C) {
|
|
3434
3434
|
let A;
|
|
@@ -3453,7 +3453,7 @@ function Ch(C) {
|
|
|
3453
3453
|
}
|
|
3454
3454
|
function Bh(C) {
|
|
3455
3455
|
const { renderer: A, scene: I } = C, g = { renderer: A, scene: I };
|
|
3456
|
-
return g.viewerEvents = C.viewerEvents, g.debugMode = C.debugMode, g.renderer = C.renderer, g.scene = C.scene, g.controls = C.controls, g.bigSceneMode = C.bigSceneMode, g.pointcloudMode = C.pointcloudMode, g.maxRenderCountOfMobile = C.maxRenderCountOfMobile, g.maxRenderCountOfPc = C.maxRenderCountOfPc, g.lightFactor = C.lightFactor, g.shDegree = C.shDegree, g.qualityLevel = C.qualityLevel, g.sortType = C.sortType, g.disableTransitionEffectOnLoad = !!C.disableTransitionEffectOnLoad, g.transitionEffect = C.transitionEffect ||
|
|
3456
|
+
return g.viewerEvents = C.viewerEvents, g.debugMode = C.debugMode, g.renderer = C.renderer, g.scene = C.scene, g.controls = C.controls, g.bigSceneMode = C.bigSceneMode, g.pointcloudMode = C.pointcloudMode, g.maxRenderCountOfMobile = C.maxRenderCountOfMobile, g.maxRenderCountOfPc = C.maxRenderCountOfPc, g.lightFactor = C.lightFactor, g.shDegree = C.shDegree, g.qualityLevel = C.qualityLevel, g.sortType = C.sortType, g.disableTransitionEffectOnLoad = !!C.disableTransitionEffectOnLoad, g.transitionEffect = C.transitionEffect || iQ.ModelCenterCirccle, g.enableEnvironment = !!C.enableEnvironment, g.viewMode = C.viewMode, g;
|
|
3457
3457
|
}
|
|
3458
3458
|
function Qh(C) {
|
|
3459
3459
|
const A = (E, i, o) => C.on(E, i, o), I = (E, ...i) => C.fire(E, ...i), g = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBkPTA7ZCsrO2NvbnN0IHR0PWAkJHtkKyt9YCxldD1gJCR7ZCsrfWA7ZCsrLGQrKyxkKys7Y29uc3Qgdj1gJCR7ZCsrfWAsTD1gJCR7ZCsrfWAsVT1gJCR7ZCsrfWAsTz1gJCR7ZCsrfWAsaj1gJCR7ZCsrfWAsbnQ9YCQke2QrK31gLGF0PWAkJHtkKyt9YCwkdD1gJCR7ZCsrfWA7ZCsrO2NvbnN0IHh0PWAkJHtkKyt9YCxrdD1gJCR7ZCsrfWA7ZCsrO2NvbnN0IG90PWAkJHtkKyt9YDtkKys7Y29uc3QgTXQ9YCQke2QrK31gO2QrKztjb25zdCBEdD1gJCR7ZCsrfWAsQ3Q9YCQke2QrK31gLEl0PWAkJHtkKyt9YCxidD1gJCR7ZCsrfWAsV3Q9YCQke2QrK31gLHd0PWAkJHtkKyt9YCxndD1gJCR7ZCsrfWAsWnQ9YCQke2QrK31gLE50PWAkJHtkKyt9YCxGdD1gJCR7ZCsrfWAscnQ9YCQke2QrK31gLEJ0PWAkJHtkKyt9YCxTdD1gJCR7ZCsrfWAscT1gJCR7ZCsrfWAsaXQ9YCQke2QrK31gLHN0PWAkJHtkKyt9YCxjdD0hbmF2aWdhdG9yLnVzZXJBZ2VudC5pbmNsdWRlcygiY2xvdWRwaG9uZSIpJiZuYXZpZ2F0b3IudXNlckFnZW50LmluY2x1ZGVzKCJNb2JpIik7dmFyIEY9KHQ9Pih0W3QuTDE9MV09IkwxIix0W3QuTDI9Ml09IkwyIix0W3QuTDM9M109IkwzIix0W3QuTDQ9NF09Ikw0Iix0W3QuRGVmYXVsdDU9NV09IkRlZmF1bHQ1Iix0W3QuTDY9Nl09Ikw2Iix0W3QuTDc9N109Ikw3Iix0W3QuTDg9OF09Ikw4Iix0W3QuTDk9OV09Ikw5Iix0KSkoRnx8e30pLFA9KHQ9Pih0W3QuRGVmYXVsdDE9MV09IkRlZmF1bHQxIix0W3QuWmRlcHRoRnJvbnROZWFyZXN0MjAxMD0yMDEwXT0iWmRlcHRoRnJvbnROZWFyZXN0MjAxMCIsdFt0LlpkZXB0aEZyb250MjAxMT0yMDExXT0iWmRlcHRoRnJvbnQyMDExIix0W3QuWmRlcHRoRnJvbnROZWFyRmFyMjAxMj0yMDEyXT0iWmRlcHRoRnJvbnROZWFyRmFyMjAxMiIsdFt0LlpkZXB0aEZ1bGxOZWFyRmFyMjExMj0yMTEyXT0iWmRlcHRoRnVsbE5lYXJGYXIyMTEyIix0KSkoUHx8e30pO2NvbnN0IEU9c2VsZjtsZXQgRz17aW5kZXg6MCx2ZXJzaW9uOjB9LEg9e2luZGV4OjEsdmVyc2lvbjowfSxkdD0hMSxBPUYuRGVmYXVsdDUsdz1QLkRlZmF1bHQxLEM9MCxKLHl0PWN0Py41Oi4yLEssVD1bXSxSPW5ldyBJbnQzMkFycmF5KDApLFY9bmV3IEZsb2F0MzJBcnJheSgwKSxnPW5ldyBJbnQzMkFycmF5KDApLFk9bmV3IEludDMyQXJyYXkoMCksQj1uZXcgSW50MzJBcnJheSgwKSxsdD1bXSxodCx1dCxmdD0wLG10LFg9LjQsej0wO2Z1bmN0aW9uIFB0KHQsbixhKXtpZighZHQpcmV0dXJuO2xldCBzPUcudmVyc2lvbj5ILnZlcnNpb24/RzpIO2lmKCFzLnZlcnNpb24pcmV0dXJuO2NvbnN0e3h5ejpvLHJlbmRlclNwbGF0Q291bnQ6aCx2aXNpYmxlU3BsYXRDb3VudDokLG1vZGVsU3BsYXRDb3VudDpELHdhdGVybWFya0NvdW50OngsaW5kZXg6SSx2ZXJzaW9uOld9PXM7aWYoZnQ9PT1XJiZNYXRoLmFicyhUWzJdLXRbMl0pK01hdGguYWJzKFRbNl0tdFs2XSkrTWF0aC5hYnMoVFsxMF0tdFsxMF0pK01hdGguYWJzKFRbMTRdLXRbMTRdKTx5dClyZXR1cm47VD10LGZ0PVc7bGV0IGs9RGF0ZS5ub3coKSxNO2lmKCFoKXtjb25zdCBlPW5ldyBVaW50MzJBcnJheSgwKTtFLnBvc3RNZXNzYWdlKHtbdHRdOmUsW1VdOjAsW09dOiQsW2pdOkQsW3ZdOkksW0xdOlcsW2F0XTowLFtudF06a30sW2UuYnVmZmVyXSk7cmV0dXJufWxldCBwPTAsdT0wLGM9THQoKTtjb25zdCBsPWgteCxtPXc9PT0xP1R0OkF0LFo9dz09PTE/dDpuLGI9blswXSphWzBdK25bMV0qYVsxXStuWzJdKmFbMl07bGV0e21heERlcHRoOmksbWluRGVwdGg6cn09dnQocyxaLG0sYik7aWYoaS1yPD0xZS01KXtmb3IobGV0IGU9MDtlPGw7KytlKWNbZV09ZTtNPWwreH1lbHNle2xldCBlPVMoQykuYnVja2V0Q250O0IubGVuZ3RoPGU/Qj1uZXcgSW50MzJBcnJheShlKTpCLmZpbGwoMCksUi5sZW5ndGg8QyYmKFI9bmV3IEludDMyQXJyYXkoQykpLHchPT1QLkRlZmF1bHQxJiZWLmxlbmd0aDxDJiYoVj1uZXcgRmxvYXQzMkFycmF5KEMpKSx3PT09UC5aZGVwdGhGcm9udE5lYXJlc3QyMDEwPyhnLmxlbmd0aDxDJiYoZz1uZXcgSW50MzJBcnJheShDKSkse3JlbmRlckNvdW50Ok0sYnVja2V0Qml0czp1fT1SdCh7ZGVwdGhJbmRleDpjLGRlcHRoczpWLGRpc3RhbmNlczpSLGNvdW50ZXJzOkIsaW50MzJUbXAxOmcseHl6Om8sZGF0YUNvdW50Omwsd2F0ZXJtYXJrQ291bnQ6eCxtYXhEZXB0aDppLG1pbkRlcHRoOnIsZG90UG9zOmIsc29ydENhbWVyYURpcjpuLGRlcHRoTmVhclJhdGU6WCxkZXB0aE5lYXJWYWx1ZTp6fSkpOnc9PT1QLlpkZXB0aEZyb250MjAxMT8oZy5sZW5ndGg8QyYmKGc9bmV3IEludDMyQXJyYXkoQykpLHtyZW5kZXJDb3VudDpNLGJ1Y2tldEJpdHM6dX09WHQoe2RlcHRoSW5kZXg6YyxkZXB0aHM6VixkaXN0YW5jZXM6Uixjb3VudGVyczpCLGludDMyVG1wMTpnLHh5ejpvLGRhdGFDb3VudDpsLHdhdGVybWFya0NvdW50OngsbWF4RGVwdGg6aSxtaW5EZXB0aDpyLGRvdFBvczpiLHNvcnRDYW1lcmFEaXI6bn0pKTp3PT09UC5aZGVwdGhGcm9udE5lYXJGYXIyMDEyPyhnLmxlbmd0aDxDJiYoZz1uZXcgSW50MzJBcnJheShDKSksWS5sZW5ndGg8QyYmKFk9bmV3IEludDMyQXJyYXkoQykpLHtyZW5kZXJDb3VudDpNLGJ1Y2tldEJpdHM6dX09enQoe2RlcHRoSW5kZXg6YyxkZXB0aHM6VixkaXN0YW5jZXM6Uixjb3VudGVyczpCLGludDMyVG1wMTpnLGludDMyVG1wMjpZLHh5ejpvLGRhdGFDb3VudDpsLHdhdGVybWFya0NvdW50OngsbWF4RGVwdGg6aSxtaW5EZXB0aDpyLGRvdFBvczpiLHNvcnRDYW1lcmFEaXI6bixkZXB0aE5lYXJSYXRlOlgsZGVwdGhOZWFyVmFsdWU6en0pKTp3PT09UC5aZGVwdGhGdWxsTmVhckZhcjIxMTI/KGcubGVuZ3RoPEMmJihnPW5ldyBJbnQzMkFycmF5KEMpKSxZLmxlbmd0aDxDJiYoWT1uZXcgSW50MzJBcnJheShDKSkse3JlbmRlckNvdW50Ok0sYnVja2V0Qml0czp1fT1WdCh7ZGVwdGhJbmRleDpjLGRlcHRoczpWLGRpc3RhbmNlczpSLGNvdW50ZXJzOkIsaW50MzJUbXAxOmcsaW50MzJUbXAyOlkseHl6Om8sZGF0YUNvdW50Omwsd2F0ZXJtYXJrQ291bnQ6eCxtYXhEZXB0aDppLG1pbkRlcHRoOnIsZG90UG9zOmIsc29ydENhbWVyYURpcjpuLGRlcHRoTmVhclJhdGU6WCxkZXB0aE5lYXJWYWx1ZTp6fSkpOntyZW5kZXJDb3VudDpNLGJ1Y2tldEJpdHM6dX09WXQoe2RlcHRoSW5kZXg6YyxkaXN0YW5jZXM6Uixjb3VudGVyczpCLHh5ejpvLGRhdGFDb3VudDpsLHdhdGVybWFya0NvdW50OngsbWF4RGVwdGg6aSxtaW5EZXB0aDpyLHNvcnRWaWV3UHJvajp0fSl9Zm9yKGxldCBlPTA7ZTx4OysrZSljW2wrZV09bCtlO3A9RGF0ZS5ub3coKS1rLEUucG9zdE1lc3NhZ2Uoe1t0dF06YyxbVV06TSxbT106JCxbal06RCxbdl06SSxbTF06VyxbbnRdOmssW2F0XTpwLFtTdF06dXx8MTYsW3FdOnd8fDF9LFtjLmJ1ZmZlcl0pfWZ1bmN0aW9uIFJ0KHQpe2NvbnN0e2RlcHRoSW5kZXg6bixkZXB0aHM6YSxkaXN0YW5jZXM6cyxjb3VudGVyczpvLGludDMyVG1wMTpoLHh5ejokLGRhdGFDb3VudDpELHdhdGVybWFya0NvdW50OngsbWluRGVwdGg6SSxkb3RQb3M6Vyxzb3J0Q2FtZXJhRGlyOmt9PXQsTT1NYXRoLm1pbih0Lm1heERlcHRoLDApLHA9dC5kZXB0aE5lYXJWYWx1ZT9NLU1hdGguYWJzKHQuZGVwdGhOZWFyVmFsdWUpOk0tKE0tSSkqdC5kZXB0aE5lYXJSYXRlO2xldCB1PTA7Y29uc3QgYz0tcCxsPVctcDtmb3IobGV0IHI9MCxlPTAsZj1rWzBdLE49a1sxXSx5PWtbMl07cjxEOysrcillPXIqMyxhW3JdPWwtZiokW2VdLU4qJFtlKzFdLXkqJFtlKzJdLGhbdV09cix1Kz0oYVtyXTw9YyYmYVtyXT49MCl8MDtjb25zdCBtPXUreCx7YnVja2V0Qml0czpaLGJ1Y2tldENudDpifT1TKHUpLGk9KGItMSkvKE0tcCk7Zm9yKGxldCByPTAsZT0wO3I8dTsrK3IpZT1hW2hbcl1dKml8MCxvW3Nbcl09ZV0rKztmb3IobGV0IHI9MTtyPGI7KytyKW9bcl0rPW9bci0xXTtmb3IobGV0IHI9MDtyPHU7KytyKW5bLS1vW3Nbcl1dXT1oW3JdO3JldHVybntyZW5kZXJDb3VudDptLGJ1Y2tldEJpdHM6Wn19ZnVuY3Rpb24gWHQodCl7Y29uc3R7ZGVwdGhJbmRleDpuLGRlcHRoczphLGRpc3RhbmNlczpzLGNvdW50ZXJzOm8saW50MzJUbXAxOmgseHl6OiQsZGF0YUNvdW50OkQsd2F0ZXJtYXJrQ291bnQ6eCxtaW5EZXB0aDpJLGRvdFBvczpXLHNvcnRDYW1lcmFEaXI6a309dCxNPU1hdGgubWluKHQubWF4RGVwdGgsMCk7bGV0IHA9MDtjb25zdCB1PS1JLGM9Vy1JO2ZvcihsZXQgaT0wLHI9MCxlPWtbMF0sZj1rWzFdLE49a1syXTtpPEQ7KytpKXI9aSozLGFbaV09Yy1lKiRbcl0tZiokW3IrMV0tTiokW3IrMl0saFtwXT1pLHArPWFbaV08PXV8MDtjb25zdCBsPXAreCx7YnVja2V0Qml0czptLGJ1Y2tldENudDpafT1TKHApLGI9KFotMSkvKE0tSSk7Zm9yKGxldCBpPTAscj0wO2k8cDsrK2kpcj1hW2hbaV1dKmJ8MCxvW3NbaV09cl0rKztmb3IobGV0IGk9MTtpPFo7KytpKW9baV0rPW9baS0xXTtmb3IobGV0IGk9MDtpPHA7KytpKW5bLS1vW3NbaV1dXT1oW2ldO3JldHVybntyZW5kZXJDb3VudDpsLGJ1Y2tldEJpdHM6bX19ZnVuY3Rpb24genQodCl7Y29uc3R7ZGVwdGhJbmRleDpuLGRlcHRoczphLGRpc3RhbmNlczpzLGNvdW50ZXJzOm8saW50MzJUbXAxOmgsaW50MzJUbXAyOiQseHl6OkQsZGF0YUNvdW50Ongsd2F0ZXJtYXJrQ291bnQ6SSxtYXhEZXB0aDpXLG1pbkRlcHRoOmssZG90UG9zOk0sc29ydENhbWVyYURpcjpwfT10LHU9TWF0aC5taW4oVywwKSxjPXQuZGVwdGhOZWFyVmFsdWU/dS1NYXRoLmFicyh0LmRlcHRoTmVhclZhbHVlKTp1LSh1LWspKnQuZGVwdGhOZWFyUmF0ZTtsZXQgbD0wLG09MDtmb3IobGV0IGU9MCxmPTAsTj0wLHk9MCxfPXBbMF0sUT1wWzFdLE90PXBbMl07ZTx4OysrZSl5PWUqMyxhW2VdPU0tXypEW3ldLVEqRFt5KzFdLU90KkRbeSsyXSxoW2xdPWUsJFttXT1lLGY9KGFbZV08PTAmJmFbZV0+PWMpfDAsTj1hW2VdPGN8MCxsKz1mLG0rPU47Y29uc3QgWj1sK20rSTtsZXR7YnVja2V0Qml0czpiLGJ1Y2tldENudDppfT1TKG0pLHI9KGktMSkvKGMtayk7Zm9yKGxldCBlPTAsZj0wO2U8bTsrK2UpZj0oYVskW2VdXS1rKSpyfDAsb1tzW2VdPWZdKys7Zm9yKGxldCBlPTE7ZTxpOysrZSlvW2VdKz1vW2UtMV07Zm9yKGxldCBlPTA7ZTxtOysrZSluWy0tb1tzW2VdXV09JFtlXTtvLmZpbGwoMCksaT1TKGwpLmJ1Y2tldENudCxyPShpLTEpLyh1LWMpO2ZvcihsZXQgZT0wLGY9MDtlPGw7KytlKWY9KGFbaFtlXV0tYykqcnwwLG9bc1tlXT1mXSsrO2ZvcihsZXQgZT0xO2U8aTsrK2Upb1tlXSs9b1tlLTFdO2ZvcihsZXQgZT0wO2U8bDsrK2UpblstLW9bc1tlXV0rbV09aFtlXTtyZXR1cm57cmVuZGVyQ291bnQ6WixidWNrZXRCaXRzOmJ9fWZ1bmN0aW9uIFZ0KHQpe2NvbnN0e2RlcHRoSW5kZXg6bixkZXB0aHM6YSxkaXN0YW5jZXM6cyxjb3VudGVyczpvLGludDMyVG1wMTpoLGludDMyVG1wMjokLHh5ejpELGRhdGFDb3VudDp4LHdhdGVybWFya0NvdW50OkksbWF4RGVwdGg6VyxtaW5EZXB0aDprLGRvdFBvczpNLHNvcnRDYW1lcmFEaXI6cH09dCx1PU1hdGgubWluKFcsMCksYz10LmRlcHRoTmVhclZhbHVlP3UtTWF0aC5hYnModC5kZXB0aE5lYXJWYWx1ZSk6dS0odS1rKSp0LmRlcHRoTmVhclJhdGU7bGV0IGw9MCxtPTA7Zm9yKGxldCBlPTAsZj0wLE49MCx5PXBbMF0sXz1wWzFdLFE9cFsyXTtlPHg7KytlKU49ZSozLGFbZV09TS15KkRbTl0tXypEW04rMV0tUSpEW04rMl0saFtsXT1lLCRbbV09ZSxmPShhW2VdPD0wJiZhW2VdPj1jKXwwLGwrPWYsbSs9Zl4xO2NvbnN0IFo9bCttK0k7bGV0e2J1Y2tldEJpdHM6YixidWNrZXRDbnQ6aX09UyhtKSxyPShpLTEpLyhjLWspO2ZvcihsZXQgZT0wLGY9MDtlPG07KytlKWY9KGFbJFtlXV0taykqcnwwLG9bc1tlXT1mXSsrO2ZvcihsZXQgZT0xO2U8aTsrK2Upb1tlXSs9b1tlLTFdO2ZvcihsZXQgZT0wO2U8bTsrK2UpblstLW9bc1tlXV1dPSRbZV07by5maWxsKDApLGk9UyhsKS5idWNrZXRDbnQscj0oaS0xKS8odS1jKTtmb3IobGV0IGU9MCxmPTA7ZTxsOysrZSlmPShhW2hbZV1dLWMpKnJ8MCxvW3NbZV09Zl0rKztmb3IobGV0IGU9MTtlPGk7KytlKW9bZV0rPW9bZS0xXTtmb3IobGV0IGU9MDtlPGw7KytlKW5bLS1vW3NbZV1dK21dPWhbZV07cmV0dXJue3JlbmRlckNvdW50OlosYnVja2V0Qml0czpifX1mdW5jdGlvbiBZdCh0KXtjb25zdHtkZXB0aEluZGV4Om4sZGlzdGFuY2VzOmEsY291bnRlcnM6cyx4eXo6byxkYXRhQ291bnQ6aCx3YXRlcm1hcmtDb3VudDokLG1heERlcHRoOkQsbWluRGVwdGg6eCxzb3J0Vmlld1Byb2o6SX09dCxXPWgrJDtsZXR7YnVja2V0Qml0czprLGJ1Y2tldENudDpNfT1TKGgpLHA9KE0tMSkvKEQteCk7Y29uc3QgdT0teC1JWzE0XTtmb3IobGV0IGM9MCxsPTAsbT0wLFo9SVsyXSxiPUlbNl0saT1JWzEwXTtjPGg7KytjKW09MypjLGw9KHUtWipvW21dLWIqb1ttKzFdLWkqb1ttKzJdKSpwfDAsc1thW2NdPWxdKys7Zm9yKGxldCBjPTE7YzxNOysrYylzW2NdKz1zW2MtMV07Zm9yKGxldCBjPTA7YzxoOysrYyluWy0tc1thW2NdXV09YztyZXR1cm57cmVuZGVyQ291bnQ6VyxidWNrZXRCaXRzOmt9fWZ1bmN0aW9uIFR0KHQsbixhLHMpe3JldHVybi0odFsyXSpuK3RbNl0qYSt0WzEwXSpzK3RbMTRdKX1mdW5jdGlvbiBBdCh0LG4sYSxzLG8pe3JldHVybiBvLXRbMF0qbi10WzFdKmEtdFsyXSpzfWZ1bmN0aW9uIHZ0KHQsbixhLHMpe2xldCBvPS0xLzAsaD0xLzA7Y29uc3QgJD1bW3QubWluWCx0Lm1pblksdC5taW5aXSxbdC5taW5YLHQubWluWSx0Lm1heFpdLFt0Lm1pblgsdC5tYXhZLHQubWluWl0sW3QubWluWCx0Lm1heFksdC5tYXhaXSxbdC5tYXhYLHQubWluWSx0Lm1pblpdLFt0Lm1heFgsdC5taW5ZLHQubWF4Wl0sW3QubWF4WCx0Lm1heFksdC5taW5aXSxbdC5tYXhYLHQubWF4WSx0Lm1heFpdXTtmb3IoY29uc3QgRCBvZiAkKXtjb25zdCB4PWEobixEWzBdLERbMV0sRFsyXSxzKTtvPU1hdGgubWF4KG8seCksaD1NYXRoLm1pbihoLHgpfXJldHVybnttYXhEZXB0aDpvLG1pbkRlcHRoOmh9fWNvbnN0IHB0PSgpPT57aWYoIUope0o9ITA7Y29uc3QgdD1LO1B0KHQsaHQsdXQpLHNldFRpbWVvdXQoKCk9PiEoSj0hMSkmJnQhPT1LJiZwdCgpKX19O2Z1bmN0aW9uIFModCxuPTApe2lmKCF0KXJldHVybntidWNrZXRCaXRzOjEsYnVja2V0Q250OjF9O2xldCBhPW4/TWF0aC5taW4obixBKTpBLHM9MTErKGN0P01hdGgubWF4KGEtMSwxKTphKTtyZXR1cm4gYTwzP3M9TWF0aC5tYXgoTWF0aC5taW4ocyxNYXRoLnJvdW5kKE1hdGgubG9nMih0LzMyKSkpLDgpOmE8ND9zPU1hdGgubWF4KE1hdGgubWluKHMsTWF0aC5yb3VuZChNYXRoLmxvZzIodC8xNikpKSw4KTphPDUmJihzPU1hdGgubWF4KE1hdGgubWluKHMsTWF0aC5yb3VuZChNYXRoLmxvZzIodC84KSkpLDgpKSxhPj01JiYocz1NYXRoLm1pbihzLE1hdGgucm91bmQoTWF0aC5sb2cyKHQvNCkpKSkse2J1Y2tldEJpdHM6cyxidWNrZXRDbnQ6Mioqc319ZnVuY3Rpb24gTHQoKXtyZXR1cm4gbHQucG9wKCl8fG5ldyBVaW50MzJBcnJheShDKX1mdW5jdGlvbiBVdCh0KXt0LmZpbGwoMCkmJmx0LnB1c2godCl9RS5vbm1lc3NhZ2U9dD0+e2NvbnN0IG49dC5kYXRhO2lmKG5bJHRdKXtsZXQgYT0hbXR8fG5bdl09PT0wP0c6SDthLm1pblg9bltEdF0sYS5tYXhYPW5bQ3RdLGEubWluWT1uW0l0XSxhLm1heFk9bltidF0sYS5taW5aPW5bV3RdLGEubWF4Wj1uW3d0XSxhLnh5ej1uZXcgRmxvYXQzMkFycmF5KG5bTXRdLmJ1ZmZlciksYS53YXRlcm1hcmtDb3VudD1uW1p0XSxhLnZlcnNpb249bltMXSxhLnJlbmRlclNwbGF0Q291bnQ9bltVXSxhLnZpc2libGVTcGxhdENvdW50PW5bT10sYS5tb2RlbFNwbGF0Q291bnQ9bltqXSxhLnRleHR1cmVSZWFkeT0hMCxhLnRleHR1cmVSZWFkeVRpbWU9RGF0ZS5ub3coKX1lbHNlIG5bb3RdPyhLPW5bb3RdLGh0PW5bTnRdLHV0PW5bRnRdLHB0KCkpOm5bQnRdPyhBPU1hdGgubWF4KEYuTDEsTWF0aC5taW4obltydF18fEYuRGVmYXVsdDUsRi5MOSkpLHc9bltxXXx8dyxYPW5baXRdfHxYLHo9bltzdF18fHopOm5bZXRdP1V0KG5bZXRdKTpuW2d0XSYmKG10PW5beHRdLEM9bltrdF0sQT1NYXRoLm1heChGLkwxLE1hdGgubWluKG5bcnRdfHxGLkRlZmF1bHQ1LEYuTDkpKSx3PW5bcV18fHcsWD1uW2l0XXx8WCx6PW5bc3RdfHx6LGR0PSEwKX19KSgpOwo=", B = URL.createObjectURL(new Blob([atob(g)], { type: "text/javascript" })), Q = new Worker(new URL(B, import.meta.url), { type: "module" });
|
|
@@ -3475,7 +3475,7 @@ function Qh(C) {
|
|
|
3475
3475
|
})
|
|
3476
3476
|
), (async () => Q.postMessage({
|
|
3477
3477
|
[de]: !0,
|
|
3478
|
-
[ne]: await I(
|
|
3478
|
+
[ne]: await I(dg),
|
|
3479
3479
|
[Ne]: I(aI),
|
|
3480
3480
|
[QD]: I(dE),
|
|
3481
3481
|
[WE]: I(HE),
|
|
@@ -3562,10 +3562,10 @@ class ZI extends mA {
|
|
|
3562
3562
|
*/
|
|
3563
3563
|
constructor(A) {
|
|
3564
3564
|
super(), this.isSplatMesh = !0, this.disposed = !1;
|
|
3565
|
-
const I = this, g = new
|
|
3565
|
+
const I = this, g = new BQ(), B = (s, t, S) => g.on(s, t, S), Q = (s, ...t) => g.fire(s, ...t);
|
|
3566
3566
|
let E = !1;
|
|
3567
3567
|
const i = Ih(A), o = i.camera || i.controls?.object;
|
|
3568
|
-
B(x, () => i), B(wC, () => i.renderer.domElement), B($A, () => o), B(_C, () => o.fov), B(oI, (s = !1) => s ? o.position.clone() : o.position), B(PI, (s = !1) => i.controls ? s ? i.controls.target.clone() : i.controls.target : new R()), B(Zs, () => o.projectionMatrix.clone().multiply(o.matrixWorldInverse).multiply(I.matrix).toArray()), B(
|
|
3568
|
+
B(x, () => i), B(wC, () => i.renderer.domElement), B($A, () => o), B(_C, () => o.fov), B(oI, (s = !1) => s ? o.position.clone() : o.position), B(PI, (s = !1) => i.controls ? s ? i.controls.target.clone() : i.controls.target : new R()), B(Zs, () => o.projectionMatrix.clone().multiply(o.matrixWorldInverse).multiply(I.matrix).toArray()), B(cE, () => o.projectionMatrix.clone().multiply(o.matrixWorldInverse)), B(Ba, () => o.getWorldDirection(new R()).toArray()), B(EC, () => i.renderer), B(hA, () => i.scene), B(aI, () => i.bigSceneMode), B(UE, () => i.pointcloudMode), B(eI, () => I), B(dE, () => i.qualityLevel || SI.Default5), B(HE, () => i.sortType || DC.Default1), B(Ka, () => E), B(ao, (s, t = 1) => Math.abs(o.position.distanceTo(s)) < t && VS(o, s)), B(JA, () => i.viewerEvents?.fire(AI));
|
|
3569
3569
|
let D = !1;
|
|
3570
3570
|
B(wo, () => D), B(IC, () => D = !0, !0), B(IC, () => setTimeout(() => I.audioText?.opts.autoPlay && !I.audioText?.opts.position && I.audioText?.play(), 5e3), !0), ni(g), Fi(g), Se(g), Qh(g), We(g), Pe(g), I.name = `${i.name || I.id}`, I.events = g, I.opts = i, (async () => (I.copy(await g.fire(Ws)), I.meta.transform && I.applyMatrix4(new EI().fromArray(I.meta.transform)), I.frustumCulled = !1, I.onBeforeRender = () => {
|
|
3571
3571
|
Q(xs), Q(Xs, performance.now()), I.audioText.opts.position && Q(wo) && Q(ao, new R().fromArray(I.audioText.opts.position), I.audioText.opts.distance) && I.audioText.play();
|
|
@@ -3586,7 +3586,7 @@ class ZI extends mA {
|
|
|
3586
3586
|
const I = this;
|
|
3587
3587
|
if (I.disposed) return;
|
|
3588
3588
|
const g = (Q, ...E) => I.events.fire(Q, ...E), B = I.opts;
|
|
3589
|
-
return A && (A.pointcloudMode !== void 0 && g(
|
|
3589
|
+
return A && (A.pointcloudMode !== void 0 && g(ng, A.pointcloudMode), A.lightFactor !== void 0 && g(uC, A.lightFactor), A.maxRenderCountOfMobile !== void 0 && (B.maxRenderCountOfMobile = A.maxRenderCountOfMobile), A.maxRenderCountOfPc !== void 0 && (B.maxRenderCountOfPc = A.maxRenderCountOfPc), A.qualityLevel !== void 0 && (B.qualityLevel = A.qualityLevel) && g(lE), !B.mapMode && A.sortType !== void 0 && (B.sortType = A.sortType) && g(Ui), g(JA)), { ...B };
|
|
3590
3590
|
}
|
|
3591
3591
|
/**
|
|
3592
3592
|
* 添加渲染指定高斯模型
|
|
@@ -3605,6 +3605,18 @@ class ZI extends mA {
|
|
|
3605
3605
|
if (!g.disposed)
|
|
3606
3606
|
return g.events.fire(A, ...I);
|
|
3607
3607
|
}
|
|
3608
|
+
/**
|
|
3609
|
+
* 设定点云或正常显示模式
|
|
3610
|
+
*/
|
|
3611
|
+
setPointMode(A) {
|
|
3612
|
+
this.events.fire(ng, A);
|
|
3613
|
+
}
|
|
3614
|
+
/**
|
|
3615
|
+
* 光圈过渡效果切换点云或正常显示模式
|
|
3616
|
+
*/
|
|
3617
|
+
switchDisplayMode() {
|
|
3618
|
+
this.events.fire(dB);
|
|
3619
|
+
}
|
|
3608
3620
|
/**
|
|
3609
3621
|
* 销毁
|
|
3610
3622
|
*/
|
|
@@ -3613,20 +3625,39 @@ class ZI extends mA {
|
|
|
3613
3625
|
if (A.disposed) return;
|
|
3614
3626
|
A.disposed = !0;
|
|
3615
3627
|
const I = (g, ...B) => A.events.fire(g, ...B);
|
|
3616
|
-
I(hg, A), I(hg, A.boundBox),
|
|
3628
|
+
I(hg, A), I(hg, A.boundBox), A.removeFromParent(), A.boundBox.removeFromParent(), A.audioText?.dispose(), I(Si), I(_s), I(js), I($s), A.events.clear(), A.events = null, A.opts = null, A.onAfterRender = null, A.boundBox = null, A.audioText = null;
|
|
3617
3629
|
}
|
|
3618
3630
|
}
|
|
3619
|
-
|
|
3631
|
+
function oh(C) {
|
|
3632
|
+
const A = (y, e, G) => C.on(y, e, G), I = (y, ...e) => C.fire(y, ...e), g = new ns(1, 1);
|
|
3633
|
+
g.rotateX(-Math.PI / 2);
|
|
3634
|
+
const B = new wI({ color: 16777215 });
|
|
3635
|
+
B.transparent = !0, B.opacity = 0.6, B.depthTest = !1, B.depthWrite = !1, B.side = MI;
|
|
3636
|
+
const Q = new mA(g, B);
|
|
3637
|
+
Q.ignoreIntersect = !0;
|
|
3638
|
+
const E = new R(0, -1, 0);
|
|
3639
|
+
E.normalize();
|
|
3640
|
+
const i = new R(0, 0, 0), o = 0.5, D = 0.01, a = 16777062, s = 0.1, t = 0.03, S = new Dh(E, i, o, D, a, s, t), h = new aC();
|
|
3641
|
+
h.add(Q), h.add(S), h.renderOrder = 99999, Q.renderOrder = 99999, h.visible = !1, I(hA).add(h), A(rt, () => h), A(JB, (y) => {
|
|
3642
|
+
I(fB, !0), h.visible = y === void 0 ? !h.visible : y, I(AI);
|
|
3643
|
+
}), A(yi, () => h.visible), A(fB, (y = !1) => {
|
|
3644
|
+
if (y || h.visible) {
|
|
3645
|
+
const e = new vI(), G = new R(0, -1, 0);
|
|
3646
|
+
e.setFromUnitVectors(G, I(QC)), h.position.copy(I(PI)), h.quaternion.copy(e);
|
|
3647
|
+
}
|
|
3648
|
+
});
|
|
3649
|
+
}
|
|
3650
|
+
class Dh extends aC {
|
|
3620
3651
|
constructor(A = new R(0, 0, 1), I = new R(0, 0, 0), g = 1, B = 0.1, Q = 16776960, E = g * 0.2, i = E * 0.2) {
|
|
3621
3652
|
super(), this._axis = new R(), this.type = "ArrowHelper";
|
|
3622
3653
|
const o = new ui(B, B, g, 32);
|
|
3623
3654
|
o.translate(0, g / 2, 0);
|
|
3624
3655
|
const D = new ui(0, i, E, 32);
|
|
3625
3656
|
D.translate(0, g, 0), this.position.copy(I);
|
|
3626
|
-
const a = new wI({ color: Q, toneMapped: !1 });
|
|
3627
|
-
a.side = MI, this.line = new mA(o, a), this.line.matrixAutoUpdate = !1, this.line.ignoreIntersect = !0, this.add(this.line);
|
|
3628
|
-
const s = new wI({ color: Q, toneMapped: !1 });
|
|
3629
|
-
s.side = MI, this.cone = new mA(D, s), this.cone.matrixAutoUpdate = !1, this.cone.ignoreIntersect = !0, this.add(this.cone), this.setDirection(A), this.renderOrder =
|
|
3657
|
+
const a = new wI({ color: Q, toneMapped: !1, opacity: 0.9, transparent: !0, depthTest: !0, depthWrite: !1 });
|
|
3658
|
+
a.side = MI, this.line = new mA(o, a), this.line.matrixAutoUpdate = !1, this.line.renderOrder = 9999999, this.line.ignoreIntersect = !0, this.add(this.line);
|
|
3659
|
+
const s = new wI({ color: Q, toneMapped: !1, opacity: 0.9, transparent: !0, depthTest: !0, depthWrite: !1 });
|
|
3660
|
+
s.side = MI, this.cone = new mA(D, s), this.cone.matrixAutoUpdate = !1, this.cone.renderOrder = 9999999, this.cone.ignoreIntersect = !0, this.add(this.cone), this.setDirection(A), this.renderOrder = 9999999;
|
|
3630
3661
|
}
|
|
3631
3662
|
setDirection(A) {
|
|
3632
3663
|
if (A.y > 0.99999)
|
|
@@ -3649,25 +3680,6 @@ class oh extends aC {
|
|
|
3649
3680
|
this.line.geometry.dispose(), this.line.material.dispose(), this.cone.geometry.dispose(), this.cone.material.dispose();
|
|
3650
3681
|
}
|
|
3651
3682
|
}
|
|
3652
|
-
function Dh(C) {
|
|
3653
|
-
const A = (y, e, G) => C.on(y, e, G), I = (y, ...e) => C.fire(y, ...e), g = new ns(1, 1);
|
|
3654
|
-
g.rotateX(-Math.PI / 2);
|
|
3655
|
-
const B = new wI({ color: 16777215 });
|
|
3656
|
-
B.transparent = !0, B.opacity = 0.6, B.depthTest = !1, B.depthWrite = !1, B.side = MI;
|
|
3657
|
-
const Q = new mA(g, B);
|
|
3658
|
-
Q.ignoreIntersect = !0;
|
|
3659
|
-
const E = new R(0, -1, 0);
|
|
3660
|
-
E.normalize();
|
|
3661
|
-
const i = new R(0, 0, 0), o = 0.5, D = 0.01, a = 16777062, s = 0.1, t = 0.03, S = new oh(E, i, o, D, a, s, t), h = new aC();
|
|
3662
|
-
h.add(Q), h.add(S), h.renderOrder = 99999, Q.renderOrder = 99999, h.visible = !1, I(sA).add(h), A(rt, () => h), A(JB, (y) => {
|
|
3663
|
-
I(HB, !0), h.visible = y === void 0 ? !h.visible : y, I(AI);
|
|
3664
|
-
}), A(yi, () => h.visible), A(HB, (y = !1) => {
|
|
3665
|
-
if (y || h.visible) {
|
|
3666
|
-
const e = new vI(), G = new R(0, -1, 0);
|
|
3667
|
-
e.setFromUnitVectors(G, I(QC)), h.position.copy(I(PI)), h.quaternion.copy(e);
|
|
3668
|
-
}
|
|
3669
|
-
});
|
|
3670
|
-
}
|
|
3671
3683
|
const tD = { type: "change" }, li = { type: "start" }, Iw = { type: "end" }, SB = new Pw(), SD = new Di(), sh = Math.cos(70 * cI.DEG2RAD), jA = new R(), tI = 2 * Math.PI, FA = {
|
|
3672
3684
|
NONE: -1,
|
|
3673
3685
|
ROTATE: 0,
|
|
@@ -3677,7 +3689,7 @@ const tD = { type: "change" }, li = { type: "start" }, Iw = { type: "end" }, SB
|
|
|
3677
3689
|
TOUCH_PAN: 4,
|
|
3678
3690
|
TOUCH_DOLLY_PAN: 5,
|
|
3679
3691
|
TOUCH_DOLLY_ROTATE: 6
|
|
3680
|
-
},
|
|
3692
|
+
}, jQ = 1e-6;
|
|
3681
3693
|
class gw extends Ww {
|
|
3682
3694
|
constructor(A, I = null) {
|
|
3683
3695
|
super(A, I), this.state = FA.NONE, this.enabled = !0, this.target = new R(), this.cursor = new R(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Sg.ROTATE, MIDDLE: Sg.DOLLY, RIGHT: Sg.PAN }, this.touches = { ONE: Ng.ROTATE, TWO: Ng.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new R(), this._lastQuaternion = new vI(), this._lastTargetPosition = new R(), this._quat = new vI().setFromUnitVectors(A.up, new R(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Oi(), this._sphericalDelta = new Oi(), this._scale = 1, this._panOffset = new R(), this._rotateStart = new WA(), this._rotateEnd = new WA(), this._rotateDelta = new WA(), this._panStart = new WA(), this._panEnd = new WA(), this._panDelta = new WA(), this._dollyStart = new WA(), this._dollyEnd = new WA(), this._dollyDelta = new WA(), this._dollyDirection = new R(), this._mouse = new WA(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = wh.bind(this), this._onPointerDown = ah.bind(this), this._onPointerUp = th.bind(this), this._onContextMenu = Kh.bind(this), this._onMouseWheel = hh.bind(this), this._onKeyDown = kh.bind(this), this._onTouchStart = Gh.bind(this), this._onTouchMove = yh.bind(this), this._onMouseDown = Sh.bind(this), this._onMouseMove = eh.bind(this), this._interceptControlDown = ch.bind(this), this._interceptControlUp = Mh.bind(this), this.domElement !== null && this.connect(), this.update();
|
|
@@ -3745,7 +3757,7 @@ class gw extends Ww {
|
|
|
3745
3757
|
const E = this.object.zoom;
|
|
3746
3758
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), E !== this.object.zoom && (this.object.updateProjectionMatrix(), Q = !0);
|
|
3747
3759
|
}
|
|
3748
|
-
return this._scale = 1, this._performCursorZoom = !1, Q || this._lastPosition.distanceToSquared(this.object.position) >
|
|
3760
|
+
return this._scale = 1, this._performCursorZoom = !1, Q || this._lastPosition.distanceToSquared(this.object.position) > jQ || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > jQ || this._lastTargetPosition.distanceToSquared(this.target) > jQ ? (this.dispatchEvent(tD), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
3749
3761
|
}
|
|
3750
3762
|
_getAutoRotationAngle(A) {
|
|
3751
3763
|
return A !== null ? tI / 60 * this.autoRotateSpeed * A : tI / 60 / 60 * this.autoRotateSpeed;
|
|
@@ -4112,7 +4124,7 @@ class Jh extends gw {
|
|
|
4112
4124
|
function eD(C, A) {
|
|
4113
4125
|
if (A === Xw)
|
|
4114
4126
|
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), C;
|
|
4115
|
-
if (A ===
|
|
4127
|
+
if (A === tE || A === rs) {
|
|
4116
4128
|
let I = C.getIndex();
|
|
4117
4129
|
if (I === null) {
|
|
4118
4130
|
const E = [], i = C.getAttribute("position");
|
|
@@ -4124,7 +4136,7 @@ function eD(C, A) {
|
|
|
4124
4136
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), C;
|
|
4125
4137
|
}
|
|
4126
4138
|
const g = I.count - 2, B = [];
|
|
4127
|
-
if (A ===
|
|
4139
|
+
if (A === tE)
|
|
4128
4140
|
for (let E = 1; E <= g; E++)
|
|
4129
4141
|
B.push(I.getX(0)), B.push(I.getX(E)), B.push(I.getX(E + 1));
|
|
4130
4142
|
else
|
|
@@ -4136,8 +4148,8 @@ function eD(C, A) {
|
|
|
4136
4148
|
} else
|
|
4137
4149
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", A), C;
|
|
4138
4150
|
}
|
|
4139
|
-
const hD = new
|
|
4140
|
-
class Cw extends
|
|
4151
|
+
const hD = new vB(), eB = new R();
|
|
4152
|
+
class Cw extends wE {
|
|
4141
4153
|
constructor() {
|
|
4142
4154
|
super(), this.isLineSegmentsGeometry = !0, this.type = "LineSegmentsGeometry";
|
|
4143
4155
|
const A = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], I = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], g = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
|
|
@@ -4150,14 +4162,14 @@ class Cw extends aE {
|
|
|
4150
4162
|
setPositions(A) {
|
|
4151
4163
|
let I;
|
|
4152
4164
|
A instanceof Float32Array ? I = A : Array.isArray(A) && (I = new Float32Array(A));
|
|
4153
|
-
const g = new
|
|
4154
|
-
return this.setAttribute("instanceStart", new
|
|
4165
|
+
const g = new SE(I, 6, 1);
|
|
4166
|
+
return this.setAttribute("instanceStart", new Lg(g, 3, 0)), this.setAttribute("instanceEnd", new Lg(g, 3, 3)), this.instanceCount = this.attributes.instanceStart.count, this.computeBoundingBox(), this.computeBoundingSphere(), this;
|
|
4155
4167
|
}
|
|
4156
4168
|
setColors(A) {
|
|
4157
4169
|
let I;
|
|
4158
4170
|
A instanceof Float32Array ? I = A : Array.isArray(A) && (I = new Float32Array(A));
|
|
4159
|
-
const g = new
|
|
4160
|
-
return this.setAttribute("instanceColorStart", new
|
|
4171
|
+
const g = new SE(I, 6, 1);
|
|
4172
|
+
return this.setAttribute("instanceColorStart", new Lg(g, 3, 0)), this.setAttribute("instanceColorEnd", new Lg(g, 3, 3)), this;
|
|
4161
4173
|
}
|
|
4162
4174
|
fromWireframeGeometry(A) {
|
|
4163
4175
|
return this.setPositions(A.attributes.position.array), this;
|
|
@@ -4173,7 +4185,7 @@ class Cw extends aE {
|
|
|
4173
4185
|
return this.setPositions(I.attributes.position.array), this;
|
|
4174
4186
|
}
|
|
4175
4187
|
computeBoundingBox() {
|
|
4176
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
4188
|
+
this.boundingBox === null && (this.boundingBox = new vB());
|
|
4177
4189
|
const A = this.attributes.instanceStart, I = this.attributes.instanceEnd;
|
|
4178
4190
|
A !== void 0 && I !== void 0 && (this.boundingBox.setFromBufferAttribute(A), hD.setFromBufferAttribute(I), this.boundingBox.union(hD));
|
|
4179
4191
|
}
|
|
@@ -4668,7 +4680,7 @@ class sC extends Js {
|
|
|
4668
4680
|
this.defines && (A === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), A === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
|
|
4669
4681
|
}
|
|
4670
4682
|
}
|
|
4671
|
-
const
|
|
4683
|
+
const WQ = new VI(), kD = new R(), GD = new R(), gI = new VI(), CI = new VI(), fI = new VI(), PQ = new R(), XQ = new EI(), BI = new vw(), yD = new R(), hB = new vB(), kB = new wi(), TI = new VI();
|
|
4672
4684
|
let WI, fg;
|
|
4673
4685
|
function KD(C, A, I) {
|
|
4674
4686
|
return TI.set(0, 0, -A, 1).applyMatrix4(C.projectionMatrix), TI.multiplyScalar(1 / TI.w), TI.x = fg / I.width, TI.y = fg / I.height, TI.applyMatrix4(C.projectionMatrixInverse), TI.multiplyScalar(1 / TI.w), Math.abs(Math.max(TI.x, TI.y));
|
|
@@ -4692,9 +4704,9 @@ function Nh(C, A) {
|
|
|
4692
4704
|
}
|
|
4693
4705
|
function nh(C, A, I) {
|
|
4694
4706
|
const g = A.projectionMatrix, Q = C.material.resolution, E = C.matrixWorld, i = C.geometry, o = i.attributes.instanceStart, D = i.attributes.instanceEnd, a = Math.min(i.instanceCount, o.count), s = -A.near;
|
|
4695
|
-
WI.at(1, fI), fI.w = 1, fI.applyMatrix4(A.matrixWorldInverse), fI.applyMatrix4(g), fI.multiplyScalar(1 / fI.w), fI.x *= Q.x / 2, fI.y *= Q.y / 2, fI.z = 0,
|
|
4707
|
+
WI.at(1, fI), fI.w = 1, fI.applyMatrix4(A.matrixWorldInverse), fI.applyMatrix4(g), fI.multiplyScalar(1 / fI.w), fI.x *= Q.x / 2, fI.y *= Q.y / 2, fI.z = 0, PQ.copy(fI), XQ.multiplyMatrices(A.matrixWorldInverse, E);
|
|
4696
4708
|
for (let t = 0, S = a; t < S; t++) {
|
|
4697
|
-
if (gI.fromBufferAttribute(o, t), CI.fromBufferAttribute(D, t), gI.w = 1, CI.w = 1, gI.applyMatrix4(
|
|
4709
|
+
if (gI.fromBufferAttribute(o, t), CI.fromBufferAttribute(D, t), gI.w = 1, CI.w = 1, gI.applyMatrix4(XQ), CI.applyMatrix4(XQ), gI.z > s && CI.z > s)
|
|
4698
4710
|
continue;
|
|
4699
4711
|
if (gI.z > s) {
|
|
4700
4712
|
const L = gI.z - CI.z, K = (gI.z - s) / L;
|
|
@@ -4704,9 +4716,9 @@ function nh(C, A, I) {
|
|
|
4704
4716
|
CI.lerp(gI, K);
|
|
4705
4717
|
}
|
|
4706
4718
|
gI.applyMatrix4(g), CI.applyMatrix4(g), gI.multiplyScalar(1 / gI.w), CI.multiplyScalar(1 / CI.w), gI.x *= Q.x / 2, gI.y *= Q.y / 2, CI.x *= Q.x / 2, CI.y *= Q.y / 2, BI.start.copy(gI), BI.start.z = 0, BI.end.copy(CI), BI.end.z = 0;
|
|
4707
|
-
const y = BI.closestPointToPointParameter(
|
|
4719
|
+
const y = BI.closestPointToPointParameter(PQ, !0);
|
|
4708
4720
|
BI.at(y, yD);
|
|
4709
|
-
const e = cI.lerp(gI.z, CI.z, y), G = e >= -1 && e <= 1, k =
|
|
4721
|
+
const e = cI.lerp(gI.z, CI.z, y), G = e >= -1 && e <= 1, k = PQ.distanceTo(yD) < fg * 0.5;
|
|
4710
4722
|
if (G && k) {
|
|
4711
4723
|
BI.start.fromBufferAttribute(o, t), BI.end.fromBufferAttribute(D, t), BI.start.applyMatrix4(E), BI.end.applyMatrix4(E);
|
|
4712
4724
|
const L = new R(), K = new R();
|
|
@@ -4732,8 +4744,8 @@ class rh extends mA {
|
|
|
4732
4744
|
const A = this.geometry, I = A.attributes.instanceStart, g = A.attributes.instanceEnd, B = new Float32Array(2 * I.count);
|
|
4733
4745
|
for (let E = 0, i = 0, o = I.count; E < o; E++, i += 2)
|
|
4734
4746
|
kD.fromBufferAttribute(I, E), GD.fromBufferAttribute(g, E), B[i] = i === 0 ? 0 : B[i - 1], B[i + 1] = B[i] + kD.distanceTo(GD);
|
|
4735
|
-
const Q = new
|
|
4736
|
-
return A.setAttribute("instanceDistanceStart", new
|
|
4747
|
+
const Q = new SE(B, 2, 1);
|
|
4748
|
+
return A.setAttribute("instanceDistanceStart", new Lg(Q, 1, 0)), A.setAttribute("instanceDistanceEnd", new Lg(Q, 1, 1)), this;
|
|
4737
4749
|
}
|
|
4738
4750
|
raycast(A, I) {
|
|
4739
4751
|
const g = this.material.worldUnits, B = A.camera;
|
|
@@ -4763,7 +4775,7 @@ class rh extends mA {
|
|
|
4763
4775
|
}
|
|
4764
4776
|
onBeforeRender(A) {
|
|
4765
4777
|
const I = this.material.uniforms;
|
|
4766
|
-
I && I.resolution && (A.getViewport(
|
|
4778
|
+
I && I.resolution && (A.getViewport(WQ), this.material.uniforms.resolution.value.set(WQ.z, WQ.w));
|
|
4767
4779
|
}
|
|
4768
4780
|
}
|
|
4769
4781
|
class WC extends Cw {
|
|
@@ -4798,7 +4810,7 @@ class Tg extends rh {
|
|
|
4798
4810
|
super(A, I), this.isLine2 = !0, this.type = "Line2";
|
|
4799
4811
|
}
|
|
4800
4812
|
}
|
|
4801
|
-
const
|
|
4813
|
+
const VQ = /* @__PURE__ */ new WeakMap();
|
|
4802
4814
|
class Bw extends si {
|
|
4803
4815
|
constructor(A) {
|
|
4804
4816
|
super(A), this.decoderPath = "", this.decoderConfig = {}, this.decoderBinary = null, this.decoderPending = null, this.workerLimit = 4, this.workerPool = [], this.workerNextTaskID = 1, this.workerSourceURL = "", this.defaultAttributeIDs = {
|
|
@@ -4844,8 +4856,8 @@ class Bw extends si {
|
|
|
4844
4856
|
}
|
|
4845
4857
|
decodeGeometry(A, I) {
|
|
4846
4858
|
const g = JSON.stringify(I);
|
|
4847
|
-
if (
|
|
4848
|
-
const o =
|
|
4859
|
+
if (VQ.has(A)) {
|
|
4860
|
+
const o = VQ.get(A);
|
|
4849
4861
|
if (o.key === g)
|
|
4850
4862
|
return o.promise;
|
|
4851
4863
|
if (A.byteLength === 0)
|
|
@@ -4859,7 +4871,7 @@ class Bw extends si {
|
|
|
4859
4871
|
}))).then((o) => this._createGeometry(o.geometry));
|
|
4860
4872
|
return i.catch(() => !0).then(() => {
|
|
4861
4873
|
B && Q && this._releaseTask(B, Q);
|
|
4862
|
-
}),
|
|
4874
|
+
}), VQ.set(A, {
|
|
4863
4875
|
key: g,
|
|
4864
4876
|
promise: i
|
|
4865
4877
|
}), i;
|
|
@@ -4877,7 +4889,7 @@ class Bw extends si {
|
|
|
4877
4889
|
if (I !== wg) return;
|
|
4878
4890
|
const g = new dI();
|
|
4879
4891
|
for (let B = 0, Q = A.count; B < Q; B++)
|
|
4880
|
-
g.fromBufferAttribute(A, B),
|
|
4892
|
+
g.fromBufferAttribute(A, B), eE.toWorkingColorSpace(g, wg), A.setXYZ(B, g.r, g.g, g.b);
|
|
4881
4893
|
}
|
|
4882
4894
|
_loadLibrary(A, I) {
|
|
4883
4895
|
const g = new fC(this.manager);
|
|
@@ -5722,7 +5734,7 @@ const nI = {
|
|
|
5722
5734
|
5126: Float32Array
|
|
5723
5735
|
}, MD = {
|
|
5724
5736
|
9728: Ys,
|
|
5725
|
-
9729:
|
|
5737
|
+
9729: hE,
|
|
5726
5738
|
9984: Qt,
|
|
5727
5739
|
9985: Bt,
|
|
5728
5740
|
9986: Ct,
|
|
@@ -5730,8 +5742,8 @@ const nI = {
|
|
|
5730
5742
|
}, UD = {
|
|
5731
5743
|
33071: it,
|
|
5732
5744
|
33648: Et,
|
|
5733
|
-
10497:
|
|
5734
|
-
},
|
|
5745
|
+
10497: kE
|
|
5746
|
+
}, vQ = {
|
|
5735
5747
|
SCALAR: 1,
|
|
5736
5748
|
VEC2: 2,
|
|
5737
5749
|
VEC3: 3,
|
|
@@ -5761,13 +5773,13 @@ const nI = {
|
|
|
5761
5773
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
5762
5774
|
LINEAR: qs,
|
|
5763
5775
|
STEP: ht
|
|
5764
|
-
},
|
|
5776
|
+
}, zQ = {
|
|
5765
5777
|
OPAQUE: "OPAQUE",
|
|
5766
5778
|
MASK: "MASK",
|
|
5767
5779
|
BLEND: "BLEND"
|
|
5768
5780
|
};
|
|
5769
5781
|
function Ik(C) {
|
|
5770
|
-
return C.DefaultMaterial === void 0 && (C.DefaultMaterial = new
|
|
5782
|
+
return C.DefaultMaterial === void 0 && (C.DefaultMaterial = new zB({
|
|
5771
5783
|
color: 16777215,
|
|
5772
5784
|
emissive: 0,
|
|
5773
5785
|
metalness: 1,
|
|
@@ -5777,7 +5789,7 @@ function Ik(C) {
|
|
|
5777
5789
|
side: kt
|
|
5778
5790
|
})), C.DefaultMaterial;
|
|
5779
5791
|
}
|
|
5780
|
-
function
|
|
5792
|
+
function Yg(C, A, I) {
|
|
5781
5793
|
for (const g in I.extensions)
|
|
5782
5794
|
C[g] === void 0 && (A.userData.gltfExtensions = A.userData.gltfExtensions || {}, A.userData.gltfExtensions[g] = I.extensions[g]);
|
|
5783
5795
|
}
|
|
@@ -5833,12 +5845,12 @@ function Ck(C, A) {
|
|
|
5833
5845
|
function Bk(C) {
|
|
5834
5846
|
let A;
|
|
5835
5847
|
const I = C.extensions && C.extensions[GA.KHR_DRACO_MESH_COMPRESSION];
|
|
5836
|
-
if (I ? A = "draco:" + I.bufferView + ":" + I.indices + ":" +
|
|
5848
|
+
if (I ? A = "draco:" + I.bufferView + ":" + I.indices + ":" + _Q(I.attributes) : A = C.indices + ":" + _Q(C.attributes) + ":" + C.mode, C.targets !== void 0)
|
|
5837
5849
|
for (let g = 0, B = C.targets.length; g < B; g++)
|
|
5838
|
-
A += ":" +
|
|
5850
|
+
A += ":" + _Q(C.targets[g]);
|
|
5839
5851
|
return A;
|
|
5840
5852
|
}
|
|
5841
|
-
function
|
|
5853
|
+
function _Q(C) {
|
|
5842
5854
|
let A = "";
|
|
5843
5855
|
const I = Object.keys(C).sort();
|
|
5844
5856
|
for (let g = 0, B = I.length; g < B; g++)
|
|
@@ -5903,7 +5915,7 @@ class ik {
|
|
|
5903
5915
|
parser: g,
|
|
5904
5916
|
userData: {}
|
|
5905
5917
|
};
|
|
5906
|
-
return
|
|
5918
|
+
return Yg(Q, i, B), Dg(i, B), Promise.all(g._invokeAll(function(o) {
|
|
5907
5919
|
return o.afterRoot && o.afterRoot(i);
|
|
5908
5920
|
})).then(function() {
|
|
5909
5921
|
for (const o of i.scenes)
|
|
@@ -6089,21 +6101,21 @@ class ik {
|
|
|
6089
6101
|
loadAccessor(A) {
|
|
6090
6102
|
const I = this, g = this.json, B = this.json.accessors[A];
|
|
6091
6103
|
if (B.bufferView === void 0 && B.sparse === void 0) {
|
|
6092
|
-
const E =
|
|
6104
|
+
const E = vQ[B.type], i = gC[B.componentType], o = B.normalized === !0, D = new i(B.count * E);
|
|
6093
6105
|
return Promise.resolve(new GI(D, E, o));
|
|
6094
6106
|
}
|
|
6095
6107
|
const Q = [];
|
|
6096
6108
|
return B.bufferView !== void 0 ? Q.push(this.getDependency("bufferView", B.bufferView)) : Q.push(null), B.sparse !== void 0 && (Q.push(this.getDependency("bufferView", B.sparse.indices.bufferView)), Q.push(this.getDependency("bufferView", B.sparse.values.bufferView))), Promise.all(Q).then(function(E) {
|
|
6097
|
-
const i = E[0], o =
|
|
6109
|
+
const i = E[0], o = vQ[B.type], D = gC[B.componentType], a = D.BYTES_PER_ELEMENT, s = a * o, t = B.byteOffset || 0, S = B.bufferView !== void 0 ? g.bufferViews[B.bufferView].byteStride : void 0, h = B.normalized === !0;
|
|
6098
6110
|
let y, e;
|
|
6099
6111
|
if (S && S !== s) {
|
|
6100
6112
|
const G = Math.floor(t / S), k = "InterleavedBuffer:" + B.bufferView + ":" + B.componentType + ":" + G + ":" + B.count;
|
|
6101
6113
|
let L = I.cache.get(k);
|
|
6102
|
-
L || (y = new D(i, G * S, B.count * S / a), L = new gt(y, S / a), I.cache.add(k, L)), e = new
|
|
6114
|
+
L || (y = new D(i, G * S, B.count * S / a), L = new gt(y, S / a), I.cache.add(k, L)), e = new Lg(L, o, t % S / a, h);
|
|
6103
6115
|
} else
|
|
6104
6116
|
i === null ? y = new D(B.count * o) : y = new D(i, t, B.count * o), e = new GI(y, o, h);
|
|
6105
6117
|
if (B.sparse !== void 0) {
|
|
6106
|
-
const G =
|
|
6118
|
+
const G = vQ.SCALAR, k = gC[B.sparse.indices.componentType], L = B.sparse.indices.byteOffset || 0, K = B.sparse.values.byteOffset || 0, U = new k(E[1], L, B.sparse.count * G), J = new D(E[2], K, B.sparse.count * o);
|
|
6107
6119
|
i !== null && (e = new GI(e.array.slice(), e.itemSize, e.normalized)), e.normalized = !1;
|
|
6108
6120
|
for (let r = 0, F = U.length; r < F; r++) {
|
|
6109
6121
|
const f = U[r];
|
|
@@ -6135,7 +6147,7 @@ class ik {
|
|
|
6135
6147
|
const D = this.loadImageSource(I, g).then(function(a) {
|
|
6136
6148
|
a.flipY = !1, a.name = E.name || i.name || "", a.name === "" && typeof i.uri == "string" && i.uri.startsWith("data:image/") === !1 && (a.name = i.uri);
|
|
6137
6149
|
const t = (Q.samplers || {})[E.sampler] || {};
|
|
6138
|
-
return a.magFilter = MD[t.magFilter] ||
|
|
6150
|
+
return a.magFilter = MD[t.magFilter] || hE, a.minFilter = MD[t.minFilter] || Rs, a.wrapS = UD[t.wrapS] || kE, a.wrapT = UD[t.wrapT] || kE, a.generateMipmaps = !a.isCompressedTexture && a.minFilter !== Ys && a.minFilter !== hE, B.associations.set(a, { textures: A }), a;
|
|
6139
6151
|
}).catch(function() {
|
|
6140
6152
|
return null;
|
|
6141
6153
|
});
|
|
@@ -6221,7 +6233,7 @@ class ik {
|
|
|
6221
6233
|
A.material = g;
|
|
6222
6234
|
}
|
|
6223
6235
|
getMaterialType() {
|
|
6224
|
-
return
|
|
6236
|
+
return zB;
|
|
6225
6237
|
}
|
|
6226
6238
|
/**
|
|
6227
6239
|
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
|
|
@@ -6248,8 +6260,8 @@ class ik {
|
|
|
6248
6260
|
})));
|
|
6249
6261
|
}
|
|
6250
6262
|
Q.doubleSided === !0 && (i.side = MI);
|
|
6251
|
-
const a = Q.alphaMode ||
|
|
6252
|
-
if (a ===
|
|
6263
|
+
const a = Q.alphaMode || zQ.OPAQUE;
|
|
6264
|
+
if (a === zQ.BLEND ? (i.transparent = !0, i.depthWrite = !1) : (i.transparent = !1, a === zQ.MASK && (i.alphaTest = Q.alphaCutoff !== void 0 ? Q.alphaCutoff : 0.5)), Q.normalTexture !== void 0 && E !== wI && (D.push(I.assignTexture(i, "normalMap", Q.normalTexture)), i.normalScale = new WA(1, 1), Q.normalTexture.scale !== void 0)) {
|
|
6253
6265
|
const s = Q.normalTexture.scale;
|
|
6254
6266
|
i.normalScale.set(s, s);
|
|
6255
6267
|
}
|
|
@@ -6259,7 +6271,7 @@ class ik {
|
|
|
6259
6271
|
}
|
|
6260
6272
|
return Q.emissiveTexture !== void 0 && E !== wI && D.push(I.assignTexture(i, "emissiveMap", Q.emissiveTexture, wg)), Promise.all(D).then(function() {
|
|
6261
6273
|
const s = new E(i);
|
|
6262
|
-
return Q.name && (s.name = Q.name), Dg(s, Q), I.associations.set(s, { materials: A }), Q.extensions &&
|
|
6274
|
+
return Q.name && (s.name = Q.name), Dg(s, Q), I.associations.set(s, { materials: A }), Q.extensions && Yg(B, s, Q), s;
|
|
6263
6275
|
});
|
|
6264
6276
|
}
|
|
6265
6277
|
/** When Object3D instances are targeted by animation, they need unique names. */
|
|
@@ -6312,7 +6324,7 @@ class ik {
|
|
|
6312
6324
|
let G;
|
|
6313
6325
|
const k = D[S];
|
|
6314
6326
|
if (e.mode === nI.TRIANGLES || e.mode === nI.TRIANGLE_STRIP || e.mode === nI.TRIANGLE_FAN || e.mode === void 0)
|
|
6315
|
-
G = Q.isSkinnedMesh === !0 ? new Dt(y, k) : new mA(y, k), G.isSkinnedMesh === !0 && G.normalizeSkinWeights(), e.mode === nI.TRIANGLE_STRIP ? G.geometry = eD(G.geometry, rs) : e.mode === nI.TRIANGLE_FAN && (G.geometry = eD(G.geometry,
|
|
6327
|
+
G = Q.isSkinnedMesh === !0 ? new Dt(y, k) : new mA(y, k), G.isSkinnedMesh === !0 && G.normalizeSkinWeights(), e.mode === nI.TRIANGLE_STRIP ? G.geometry = eD(G.geometry, rs) : e.mode === nI.TRIANGLE_FAN && (G.geometry = eD(G.geometry, tE));
|
|
6316
6328
|
else if (e.mode === nI.LINES)
|
|
6317
6329
|
G = new TC(y, k);
|
|
6318
6330
|
else if (e.mode === nI.LINE_STRIP)
|
|
@@ -6323,7 +6335,7 @@ class ik {
|
|
|
6323
6335
|
G = new yB(y, k);
|
|
6324
6336
|
else
|
|
6325
6337
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + e.mode);
|
|
6326
|
-
Object.keys(G.geometry.morphAttributes).length > 0 && Ck(G, Q), G.name = I.createUniqueName(Q.name || "mesh_" + A), Dg(G, Q), e.extensions &&
|
|
6338
|
+
Object.keys(G.geometry.morphAttributes).length > 0 && Ck(G, Q), G.name = I.createUniqueName(Q.name || "mesh_" + A), Dg(G, Q), e.extensions && Yg(B, G, e), I.assignFinalMaterial(G), s.push(G);
|
|
6327
6339
|
}
|
|
6328
6340
|
for (let S = 0, h = s.length; S < h; S++)
|
|
6329
6341
|
I.associations.set(s[S], {
|
|
@@ -6331,9 +6343,9 @@ class ik {
|
|
|
6331
6343
|
primitives: S
|
|
6332
6344
|
});
|
|
6333
6345
|
if (s.length === 1)
|
|
6334
|
-
return Q.extensions &&
|
|
6346
|
+
return Q.extensions && Yg(B, s[0], Q), s[0];
|
|
6335
6347
|
const t = new tg();
|
|
6336
|
-
Q.extensions &&
|
|
6348
|
+
Q.extensions && Yg(B, t, Q), I.associations.set(t, { meshes: A });
|
|
6337
6349
|
for (let S = 0, h = s.length; S < h; S++)
|
|
6338
6350
|
t.add(s[S]);
|
|
6339
6351
|
return t;
|
|
@@ -6462,7 +6474,7 @@ class ik {
|
|
|
6462
6474
|
if (Q.isBone === !0 ? a = new et() : D.length > 1 ? a = new tg() : D.length === 1 ? a = D[0] : a = new aC(), a !== D[0])
|
|
6463
6475
|
for (let s = 0, t = D.length; s < t; s++)
|
|
6464
6476
|
a.add(D[s]);
|
|
6465
|
-
if (Q.name && (a.userData.name = Q.name, a.name = E), Dg(a, Q), Q.extensions &&
|
|
6477
|
+
if (Q.name && (a.userData.name = Q.name, a.name = E), Dg(a, Q), Q.extensions && Yg(g, a, Q), Q.matrix !== void 0) {
|
|
6466
6478
|
const s = new EI();
|
|
6467
6479
|
s.fromArray(Q.matrix), a.applyMatrix4(s);
|
|
6468
6480
|
} else
|
|
@@ -6477,7 +6489,7 @@ class ik {
|
|
|
6477
6489
|
*/
|
|
6478
6490
|
loadScene(A) {
|
|
6479
6491
|
const I = this.extensions, g = this.json.scenes[A], B = this, Q = new tg();
|
|
6480
|
-
g.name && (Q.name = B.createUniqueName(g.name)), Dg(Q, g), g.extensions &&
|
|
6492
|
+
g.name && (Q.name = B.createUniqueName(g.name)), Dg(Q, g), g.extensions && Yg(I, Q, g);
|
|
6481
6493
|
const E = g.nodes || [], i = [];
|
|
6482
6494
|
for (let o = 0, D = E.length; o < D; o++)
|
|
6483
6495
|
i.push(B.getDependency("node", E[o]));
|
|
@@ -6556,7 +6568,7 @@ class ik {
|
|
|
6556
6568
|
}
|
|
6557
6569
|
}
|
|
6558
6570
|
function ok(C, A, I) {
|
|
6559
|
-
const g = A.attributes, B = new
|
|
6571
|
+
const g = A.attributes, B = new vB();
|
|
6560
6572
|
if (g.POSITION !== void 0) {
|
|
6561
6573
|
const i = I.json.accessors[g.POSITION], o = i.min, D = i.max;
|
|
6562
6574
|
if (o !== void 0 && D !== void 0) {
|
|
@@ -6613,7 +6625,7 @@ function JD(C, A, I) {
|
|
|
6613
6625
|
});
|
|
6614
6626
|
B.push(E);
|
|
6615
6627
|
}
|
|
6616
|
-
return
|
|
6628
|
+
return eE.workingColorSpace !== zI && "COLOR_0" in g && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${eE.workingColorSpace}" not supported.`), Dg(C, A), ok(C, A, I), Promise.all(B).then(function() {
|
|
6617
6629
|
return A.targets !== void 0 ? gk(C, A.targets, I) : C;
|
|
6618
6630
|
});
|
|
6619
6631
|
}
|
|
@@ -6736,7 +6748,7 @@ class VE extends Tg {
|
|
|
6736
6748
|
E.setPositions([...Q.startPoint, ...Q.endPoint]);
|
|
6737
6749
|
const i = new sC({ color: Q.lineColor, linewidth: Q.lineWidth });
|
|
6738
6750
|
i.resolution.set(innerWidth, innerHeight), g.copy(new Tg(E, i));
|
|
6739
|
-
const o = new
|
|
6751
|
+
const o = new pg(0.05, 32), D = new wI({ color: 16777215, side: MI });
|
|
6740
6752
|
D.transparent = !0, D.opacity = 0.6;
|
|
6741
6753
|
const a = new mA(o, D);
|
|
6742
6754
|
a.position.copy(A), a.isMark = !0;
|
|
@@ -6755,7 +6767,7 @@ class VE extends Tg {
|
|
|
6755
6767
|
const h = document.createElement("div");
|
|
6756
6768
|
h.innerHTML = `<span class="${I}-distance-tag ${I}-distance-tag0" style="color:${Q.distanceTagColor};background:${Q.distanceTagBackground};opacity:${Q.distanceTagOpacity};padding: 1px 5px;border-radius: 4px;margin-bottom: 5px;user-select: none;font-size: 12px;pointer-events: none;"></span>`, h.classList.add("mark-wrap-line", `${I}`, "distance-warp"), h.style.position = "absolute", h.style.borderRadius = "4px", h.style.pointerEvents = "none";
|
|
6757
6769
|
const y = new DI(h);
|
|
6758
|
-
y.position.set(A.x, A.y, A.z), y.element.style.pointerEvents = "none", y.scale.set(8e-3, 8e-3, 8e-3), y.visible = !1, g.add(a, s, S, y), g.data = Q, g.circleStart = a, g.circleEnd = s, g.css3dTag = y, g.css3dMainTag = S, g.events.fire(
|
|
6770
|
+
y.position.set(A.x, A.y, A.z), y.element.style.pointerEvents = "none", y.scale.set(8e-3, 8e-3, 8e-3), y.visible = !1, g.add(a, s, S, y), g.data = Q, g.circleStart = a, g.circleEnd = s, g.css3dTag = y, g.css3dMainTag = S, g.events.fire(Fg, g);
|
|
6759
6771
|
}
|
|
6760
6772
|
/**
|
|
6761
6773
|
* 绘制更新
|
|
@@ -6799,7 +6811,7 @@ class VE extends Tg {
|
|
|
6799
6811
|
const i = g.distanceTo(B);
|
|
6800
6812
|
I.css3dTag.visible = !0;
|
|
6801
6813
|
const o = (i * I.events.fire(x).meterScale).toFixed(2) + " m";
|
|
6802
|
-
I.css3dTag.element.childNodes[0].innerText = o, I.events.fire(
|
|
6814
|
+
I.css3dTag.element.childNodes[0].innerText = o, I.events.fire(lg);
|
|
6803
6815
|
const D = parent?.onActiveMark, a = I.getMarkData(!0);
|
|
6804
6816
|
a.isNew = !0, a.meterScale = I.events.fire(x).meterScale, D?.(a);
|
|
6805
6817
|
}
|
|
@@ -6828,7 +6840,7 @@ class VE extends Tg {
|
|
|
6828
6840
|
i.setPositions([...g.startPoint, ...g.endPoint]);
|
|
6829
6841
|
const o = new sC({ color: g.lineColor, linewidth: g.lineWidth });
|
|
6830
6842
|
o.resolution.set(innerWidth, innerHeight), I.copy(new Tg(i, o));
|
|
6831
|
-
const D = new
|
|
6843
|
+
const D = new pg(0.05, 32), a = new wI({ color: 16777215, side: MI });
|
|
6832
6844
|
a.transparent = !0, a.opacity = 0.6;
|
|
6833
6845
|
const s = new mA(D, a);
|
|
6834
6846
|
s.position.copy(B), s.isMark = !0;
|
|
@@ -6849,7 +6861,7 @@ class VE extends Tg {
|
|
|
6849
6861
|
const k = (B.distanceTo(Q) * I.events.fire(x).meterScale).toFixed(2) + " m", L = document.createElement("div");
|
|
6850
6862
|
L.innerHTML = `<span class="${h}-distance-tag ${h}-distance-tag0" style="color:${g.distanceTagColor};background:${g.distanceTagBackground};opacity:${g.distanceTagOpacity};padding: 1px 5px;border-radius: 4px;margin-bottom: 5px;user-select: none;font-size: 12px;pointer-events: none;">${k}</span>`, L.classList.add("mark-wrap-line", `${h}`, "distance-warp"), L.style.position = "absolute", L.style.borderRadius = "4px", L.style.pointerEvents = "none";
|
|
6851
6863
|
const K = new DI(L);
|
|
6852
|
-
K.position.copy(E), K.element.style.pointerEvents = "none", K.scale.set(8e-3, 8e-3, 8e-3), K.visible = g.distanceTagVisible, I.add(s, t, e, K), I.data = g, I.circleStart = s, I.circleEnd = t, I.css3dTag = K, I.css3dMainTag = e, I.events.fire(
|
|
6864
|
+
K.position.copy(E), K.element.style.pointerEvents = "none", K.scale.set(8e-3, 8e-3, 8e-3), K.visible = g.distanceTagVisible, I.add(s, t, e, K), I.data = g, I.circleStart = s, I.circleEnd = t, I.css3dTag = K, I.css3dMainTag = e, I.events.fire(Fg, I);
|
|
6853
6865
|
}
|
|
6854
6866
|
getMarkData(A = !1) {
|
|
6855
6867
|
const I = { ...this.data };
|
|
@@ -6858,7 +6870,7 @@ class VE extends Tg {
|
|
|
6858
6870
|
dispose() {
|
|
6859
6871
|
if (this.disposed) return;
|
|
6860
6872
|
const A = this;
|
|
6861
|
-
A.disposed = !0, A.events.fire(hg, A), A.
|
|
6873
|
+
A.disposed = !0, A.events.fire(hg, A), A.removeFromParent(), A.events.fire(tC, A), document.querySelectorAll(`.${A.data.name}`).forEach((g) => g.parentElement?.removeChild(g)), A.events = null, A.data = null, A.circleStart = null, A.circleEnd = null, A.css3dTag = null, A.css3dMainTag = null;
|
|
6862
6874
|
}
|
|
6863
6875
|
}
|
|
6864
6876
|
class vE extends Tg {
|
|
@@ -6924,13 +6936,13 @@ class vE extends Tg {
|
|
|
6924
6936
|
drawFinish(A) {
|
|
6925
6937
|
if (this.disposed) return;
|
|
6926
6938
|
const I = this, g = I.data.points.length, B = new R().fromArray(I.data.points.slice(g - 6, g - 3)), Q = new R().fromArray(I.data.points.slice(g - 3));
|
|
6927
|
-
if ((!A || B.distanceTo(Q) < 1e-3) && (I.data.points.pop(), I.data.points.pop(), I.data.points.pop(), I.draw(I.data)), I.events.fire(
|
|
6939
|
+
if ((!A || B.distanceTo(Q) < 1e-3) && (I.data.points.pop(), I.data.points.pop(), I.data.points.pop(), I.draw(I.data)), I.events.fire(lg), I.data.points.length < 6) {
|
|
6928
6940
|
I.dispose();
|
|
6929
6941
|
return;
|
|
6930
6942
|
} else {
|
|
6931
6943
|
for (; I.css3dTags.length > I.data.points.length / 3 - 1; ) {
|
|
6932
6944
|
const o = I.css3dTags.pop();
|
|
6933
|
-
|
|
6945
|
+
o.removeFromParent(), o.element.parentElement?.removeChild(o.element);
|
|
6934
6946
|
}
|
|
6935
6947
|
I.css3dTags[I.css3dTags.length - 1].visible = !0;
|
|
6936
6948
|
}
|
|
@@ -6983,7 +6995,7 @@ class vE extends Tg {
|
|
|
6983
6995
|
const k = new DI(G);
|
|
6984
6996
|
k.position.copy(h), k.element.style.pointerEvents = "none", k.scale.set(8e-3, 8e-3, 8e-3), k.visible = B.distanceTagVisible, g.css3dTags.push(k), g.group.add(k);
|
|
6985
6997
|
}
|
|
6986
|
-
I || (g.css3dTags[g.css3dTags.length - 1].visible = !1), g.data = B, g.events.fire(
|
|
6998
|
+
I || (g.css3dTags[g.css3dTags.length - 1].visible = !1), g.data = B, g.events.fire(Fg, g);
|
|
6987
6999
|
}
|
|
6988
7000
|
getMarkData(A = !1) {
|
|
6989
7001
|
const I = { ...this.data };
|
|
@@ -6992,7 +7004,7 @@ class vE extends Tg {
|
|
|
6992
7004
|
dispose() {
|
|
6993
7005
|
if (this.disposed) return;
|
|
6994
7006
|
const A = this;
|
|
6995
|
-
A.disposed = !0, A.events.fire(hg, A), A.
|
|
7007
|
+
A.disposed = !0, A.events.fire(hg, A), A.removeFromParent(), A.events.fire(tC, A), A.geometry.dispose(), A.material.dispose(), document.querySelectorAll(`.${A.data.name}`).forEach((g) => g.parentElement?.removeChild(g)), A.events = null, A.data = null, A.css3dTags = null, A.group = null;
|
|
6996
7008
|
}
|
|
6997
7009
|
}
|
|
6998
7010
|
class ow extends tg {
|
|
@@ -7039,7 +7051,7 @@ class ow extends tg {
|
|
|
7039
7051
|
o?.(B.getMarkData(!0)), B.events.fire(QI);
|
|
7040
7052
|
}, E.oncontextmenu = (o) => o.preventDefault();
|
|
7041
7053
|
const i = new DI(E);
|
|
7042
|
-
i.position.set(Q.point[0], Q.point[1], Q.point[2]), i.element.style.pointerEvents = "none", i.scale.set(0.01, 0.01, 0.01), B.data = Q, B.css3dTag = i, B.add(i), A.fire(
|
|
7054
|
+
i.position.set(Q.point[0], Q.point[1], Q.point[2]), i.element.style.pointerEvents = "none", i.scale.set(0.01, 0.01, 0.01), B.data = Q, B.css3dTag = i, B.add(i), A.fire(Fg, B);
|
|
7043
7055
|
}
|
|
7044
7056
|
/**
|
|
7045
7057
|
* 绘制更新
|
|
@@ -7073,7 +7085,7 @@ class ow extends tg {
|
|
|
7073
7085
|
drawFinish() {
|
|
7074
7086
|
if (this.disposed) return;
|
|
7075
7087
|
const A = this;
|
|
7076
|
-
A.events.fire(
|
|
7088
|
+
A.events.fire(lg);
|
|
7077
7089
|
const I = parent?.onActiveMark, g = A.getMarkData(!0);
|
|
7078
7090
|
g.isNew = !0, g.meterScale = A.events.fire(x).meterScale, I?.(g);
|
|
7079
7091
|
}
|
|
@@ -7084,7 +7096,7 @@ class ow extends tg {
|
|
|
7084
7096
|
dispose() {
|
|
7085
7097
|
if (this.disposed) return;
|
|
7086
7098
|
const A = this;
|
|
7087
|
-
A.disposed = !0, A.events.fire(hg, A), A.
|
|
7099
|
+
A.disposed = !0, A.events.fire(hg, A), A.removeFromParent(), A.events.fire(tC, A);
|
|
7088
7100
|
const I = document.querySelector(`.mark-wrap-${A.data.name}`);
|
|
7089
7101
|
I?.parentElement?.removeChild?.(I), A.events = null, A.data = null, A.css3dTag = null;
|
|
7090
7102
|
}
|
|
@@ -7134,9 +7146,9 @@ class zE extends Tg {
|
|
|
7134
7146
|
Q.data.points[E - 3] = g.x, Q.data.points[E - 2] = g.y, Q.data.points[E - 1] = g.z;
|
|
7135
7147
|
const i = Q.css3dTags.length - 1, o = new R().fromArray(Q.data.points.slice(E - 6, E - 3)), D = new R().fromArray(Q.data.points.slice(E - 3)), a = new R((o.x + D.x) / 2, (o.y + D.y) / 2, (o.z + D.z) / 2), s = o.distanceTo(D), t = (s * Q.events.fire(x).meterScale).toFixed(2) + " m";
|
|
7136
7148
|
Q.css3dTags[i].element.innerText = t, Q.geometry.setPositions([...Q.data.points]), Q.css3dTags[i].position.set(a.x, a.y, a.z), Q.css3dTags[i].visible = B ? !0 : s > 0.5, Q.meshPlans.geometry.setAttribute("position", new GI(new Float32Array(Q.data.points), 3)), Q.meshPlans.geometry.attributes.position.needsUpdate = !0;
|
|
7137
|
-
const S = Q.events.fire(
|
|
7149
|
+
const S = Q.events.fire(GE, Q.data.points);
|
|
7138
7150
|
Q.css3dAreaTag.position.copy(S);
|
|
7139
|
-
const h = Q.events.fire(
|
|
7151
|
+
const h = Q.events.fire(yE, Q.data.points);
|
|
7140
7152
|
Q.css3dAreaTag.element.childNodes[0].innerText = h.toFixed(2) + " m²";
|
|
7141
7153
|
}
|
|
7142
7154
|
if (A?.lineColor && (I && (Q.data.lineColor = A.lineColor), Q.material.color.set(A.lineColor), Q.meshPlans.material.color.set(A.lineColor)), A?.lineWidth && (I && (Q.data.lineWidth = A.lineWidth), Q.material.linewidth = A.lineWidth), A?.mainTagColor && (I && (Q.data.mainTagColor = A.mainTagColor), document.querySelector(`.${Q.data.name}-main-tag`).style.color = A.mainTagColor), A?.mainTagBackground && (I && (Q.data.mainTagBackground = A.mainTagBackground), document.querySelector(`.${Q.data.name}-main-tag`).style.background = A.mainTagBackground), A?.mainTagOpacity && (I && (Q.data.mainTagOpacity = A.mainTagOpacity), document.querySelector(`.${Q.data.name}-main-tag`).style.opacity = A.mainTagOpacity.toString()), A?.mainTagVisible !== void 0 && (I && (Q.data.mainTagVisible = A.mainTagVisible), Q.css3dMainTag.visible = A.mainTagVisible), A?.areaTagVisible !== void 0 && (I && (Q.data.areaTagVisible = A.areaTagVisible), Q.css3dAreaTag.visible = A.areaTagVisible), A?.areaTagColor) {
|
|
@@ -7175,13 +7187,13 @@ class zE extends Tg {
|
|
|
7175
7187
|
drawFinish(A) {
|
|
7176
7188
|
if (this.disposed) return;
|
|
7177
7189
|
const I = this, g = I.data.points.length, B = new R().fromArray(I.data.points.slice(g - 6, g - 3)), Q = new R().fromArray(I.data.points.slice(g - 3));
|
|
7178
|
-
if ((!A || B.distanceTo(Q) < 1e-4) && (I.data.points.pop(), I.data.points.pop(), I.data.points.pop()), I.events.fire(
|
|
7190
|
+
if ((!A || B.distanceTo(Q) < 1e-4) && (I.data.points.pop(), I.data.points.pop(), I.data.points.pop()), I.events.fire(lg), I.data.points.length < 9) {
|
|
7179
7191
|
I.dispose();
|
|
7180
7192
|
return;
|
|
7181
7193
|
}
|
|
7182
7194
|
for (; I.css3dTags.length > I.data.points.length / 3 - 1; ) {
|
|
7183
7195
|
const o = I.css3dTags.pop();
|
|
7184
|
-
|
|
7196
|
+
o.removeFromParent(), o.element.parentElement?.removeChild(o.element);
|
|
7185
7197
|
}
|
|
7186
7198
|
I.data.points.push(I.data.points[0], I.data.points[1], I.data.points[2]), I.draw(I.data, !0), I.css3dTags[I.css3dTags.length - 1].visible = !0;
|
|
7187
7199
|
const E = parent?.onActiveMark, i = I.getMarkData(!0);
|
|
@@ -7229,7 +7241,7 @@ class zE extends Tg {
|
|
|
7229
7241
|
const h = new DI(S);
|
|
7230
7242
|
h.position.set(B.points[0], B.points[1], B.points[2]), h.element.style.pointerEvents = "none", h.scale.set(0.01, 0.01, 0.01), h.visible = B.mainTagVisible, g.group.add(h), g.css3dMainTag = h;
|
|
7231
7243
|
}
|
|
7232
|
-
const s = g.events.fire(
|
|
7244
|
+
const s = g.events.fire(yE, B.points).toFixed(2) + " m²", t = g.events.fire(GE, B.points);
|
|
7233
7245
|
if (g.css3dAreaTag)
|
|
7234
7246
|
g.css3dAreaTag.position.copy(t), g.css3dAreaTag.element.childNodes[0].innerText = s;
|
|
7235
7247
|
else {
|
|
@@ -7245,7 +7257,7 @@ class zE extends Tg {
|
|
|
7245
7257
|
const K = new DI(L);
|
|
7246
7258
|
K.position.copy(e), K.element.style.pointerEvents = "none", K.scale.set(8e-3, 8e-3, 8e-3), K.visible = B.distanceTagVisible, g.css3dTags.push(K), g.group.add(K);
|
|
7247
7259
|
}
|
|
7248
|
-
g.drawPlans(B), I || (g.css3dTags[g.css3dTags.length - 1].visible = !1), g.data = B, g.events.fire(
|
|
7260
|
+
g.drawPlans(B), I || (g.css3dTags[g.css3dTags.length - 1].visible = !1), g.data = B, g.events.fire(Fg, g);
|
|
7249
7261
|
}
|
|
7250
7262
|
drawPlans(A) {
|
|
7251
7263
|
const I = this;
|
|
@@ -7260,7 +7272,7 @@ class zE extends Tg {
|
|
|
7260
7272
|
opacity: A.planOpacity,
|
|
7261
7273
|
side: MI
|
|
7262
7274
|
});
|
|
7263
|
-
I.meshPlans = new mA(g, Q), I.meshPlans.renderOrder = 1, I.meshPlans.isMark = !0, I.group.add(I.meshPlans);
|
|
7275
|
+
Q.depthWrite = !1, Q.depthTest = !0, I.meshPlans = new mA(g, Q), I.meshPlans.renderOrder = 1, I.meshPlans.isMark = !0, I.group.add(I.meshPlans);
|
|
7264
7276
|
}
|
|
7265
7277
|
if (A.points.length > 6) {
|
|
7266
7278
|
I.meshPlans.geometry.setAttribute("position", new GI(new Float32Array(A.points), 3)), I.meshPlans.geometry.attributes.position.needsUpdate = !0;
|
|
@@ -7270,7 +7282,7 @@ class zE extends Tg {
|
|
|
7270
7282
|
const E = new Uint16Array(g * 3);
|
|
7271
7283
|
for (let i = 0; i < g; i++)
|
|
7272
7284
|
E[i * 3] = 0, E[i * 3 + 1] = i + 1, E[i * 3 + 2] = i + 2;
|
|
7273
|
-
I.meshPlans.geometry.setIndex(new GI(E, 1));
|
|
7285
|
+
I.meshPlans.geometry.setIndex(new GI(E, 1)), I.meshPlans.geometry.computeBoundingSphere();
|
|
7274
7286
|
}
|
|
7275
7287
|
}
|
|
7276
7288
|
getMarkData(A = !1) {
|
|
@@ -7280,7 +7292,7 @@ class zE extends Tg {
|
|
|
7280
7292
|
dispose() {
|
|
7281
7293
|
if (this.disposed) return;
|
|
7282
7294
|
const A = this;
|
|
7283
|
-
A.disposed = !0, A.events.fire(hg, A), A.
|
|
7295
|
+
A.disposed = !0, A.events.fire(hg, A), A.removeFromParent(), A.events.fire(tC, A), A.geometry.dispose(), A.material.dispose(), document.querySelectorAll(`.${A.data.name}`).forEach((g) => g.parentElement?.removeChild(g)), A.events = null, A.data = null, A.css3dTags = null, A.group = null, A.meshPlans = null, A.css3dMainTag = null, A.css3dAreaTag = null;
|
|
7284
7296
|
}
|
|
7285
7297
|
}
|
|
7286
7298
|
class Dw extends tg {
|
|
@@ -7308,7 +7320,7 @@ class Dw extends tg {
|
|
|
7308
7320
|
circleTagOpacity: 0.9,
|
|
7309
7321
|
circleTagVisible: !0,
|
|
7310
7322
|
title: "标记圆面" + B
|
|
7311
|
-
}, E = new
|
|
7323
|
+
}, E = new pg(Q.radius, 32), i = new wI({ color: Q.circleColor, side: MI, transparent: !0 });
|
|
7312
7324
|
i.opacity = Q.circleOpacity;
|
|
7313
7325
|
const o = new mA(E, i);
|
|
7314
7326
|
o.position.copy(A), o.isMark = !0, o.renderOrder = 1;
|
|
@@ -7327,7 +7339,7 @@ class Dw extends tg {
|
|
|
7327
7339
|
const t = document.createElement("div");
|
|
7328
7340
|
t.innerHTML = `<span class="${I}-circle-tag" style="color:${Q.circleTagColor};background:${Q.circleTagBackground};opacity:${Q.circleTagOpacity};padding: 1px 5px;border-radius: 4px;margin-bottom: 5px;user-select: none;font-size: 12px;pointer-events: none;"></span>`, t.classList.add("mark-wrap-circle", `${I}`, "circle-warp"), t.style.position = "absolute", t.style.borderRadius = "4px", t.style.pointerEvents = "none";
|
|
7329
7341
|
const S = new DI(t);
|
|
7330
|
-
S.position.set(A.x + Math.min(Q.radius / 2, 0.5), A.y, A.z), S.element.style.pointerEvents = "none", S.scale.set(8e-3, 8e-3, 8e-3), S.visible = !1, g.add(o, s, S), g.data = Q, g.circleMesh = o, g.css3dTag = S, g.css3dMainTag = s, g.events.fire(
|
|
7342
|
+
S.position.set(A.x + Math.min(Q.radius / 2, 0.5), A.y, A.z), S.element.style.pointerEvents = "none", S.scale.set(8e-3, 8e-3, 8e-3), S.visible = !1, g.add(o, s, S), g.data = Q, g.circleMesh = o, g.css3dTag = S, g.css3dMainTag = s, g.events.fire(Fg, g);
|
|
7331
7343
|
}
|
|
7332
7344
|
/**
|
|
7333
7345
|
* 绘制更新
|
|
@@ -7337,13 +7349,13 @@ class Dw extends tg {
|
|
|
7337
7349
|
const B = this;
|
|
7338
7350
|
if (g) {
|
|
7339
7351
|
const Q = new R().fromArray(B.data.startPoint), E = Q.distanceTo(new R(g.x, Q.y, g.z));
|
|
7340
|
-
I && (B.data.radius = E), B.circleMesh.geometry.copy(new
|
|
7352
|
+
I && (B.data.radius = E), B.circleMesh.geometry.copy(new pg(E, 128)), B.css3dTag.visible = E > 0.3;
|
|
7341
7353
|
const i = E * B.events.fire(x).meterScale, o = (Math.PI * i * i).toFixed(2) + " m²";
|
|
7342
7354
|
B.css3dTag.element.childNodes[0].innerText = o, B.css3dTag.position.set(Q.x + Math.min(B.data.radius / 2, 0.5), Q.y, Q.z);
|
|
7343
7355
|
}
|
|
7344
7356
|
if (A?.radius) {
|
|
7345
7357
|
const Q = new R().fromArray(B.data.startPoint), E = A?.radius;
|
|
7346
|
-
I && (B.data.radius = E), B.circleMesh.geometry.copy(new
|
|
7358
|
+
I && (B.data.radius = E), B.circleMesh.geometry.copy(new pg(E, 128)), B.css3dTag.visible = E > 0.3;
|
|
7347
7359
|
const i = E * B.events.fire(x).meterScale, o = (Math.PI * i * i).toFixed(2) + " m²";
|
|
7348
7360
|
B.css3dTag.element.childNodes[0].innerText = o, B.css3dTag.position.set(Q.x + Math.min(E / 2, 0.5), Q.y, Q.z);
|
|
7349
7361
|
}
|
|
@@ -7362,9 +7374,9 @@ class Dw extends tg {
|
|
|
7362
7374
|
drawFinish(A) {
|
|
7363
7375
|
if (this.disposed) return;
|
|
7364
7376
|
const I = this, g = new R().fromArray(I.data.startPoint), B = g.distanceTo(new R(A.x, g.y, A.z));
|
|
7365
|
-
I.data.radius = B, I.circleMesh.geometry.copy(new
|
|
7377
|
+
I.data.radius = B, I.circleMesh.geometry.copy(new pg(B, 128));
|
|
7366
7378
|
const Q = I.data.radius * I.events.fire(x).meterScale, E = (Math.PI * Q * Q).toFixed(2) + " m²";
|
|
7367
|
-
I.css3dTag.element.childNodes[0].innerText = E, I.events.fire(
|
|
7379
|
+
I.css3dTag.element.childNodes[0].innerText = E, I.events.fire(lg);
|
|
7368
7380
|
const i = parent?.onActiveMark, o = I.getMarkData(!0);
|
|
7369
7381
|
o.isNew = !0, o.meterScale = I.events.fire(x).meterScale, i?.(o);
|
|
7370
7382
|
}
|
|
@@ -7389,7 +7401,7 @@ class Dw extends tg {
|
|
|
7389
7401
|
circleTagOpacity: A.circleTagOpacity || 0.9,
|
|
7390
7402
|
circleTagVisible: A.circleTagVisible === void 0 ? !0 : A.circleTagVisible,
|
|
7391
7403
|
title: A.title || "标记圆面"
|
|
7392
|
-
}, B = new
|
|
7404
|
+
}, B = new pg(g.radius, 128), Q = new wI({ color: g.circleColor, side: MI, transparent: !0 });
|
|
7393
7405
|
Q.opacity = g.circleOpacity;
|
|
7394
7406
|
const E = new mA(B, Q);
|
|
7395
7407
|
E.position.fromArray(g.startPoint), E.isMark = !0, E.renderOrder = 1;
|
|
@@ -7408,7 +7420,7 @@ class Dw extends tg {
|
|
|
7408
7420
|
const h = document.createElement("div");
|
|
7409
7421
|
h.innerHTML = `<span class="${o}-distance-tag ${o}-circle-tag" style="color:${g.circleTagColor};background:${g.circleTagBackground};opacity:${g.circleTagOpacity};padding: 1px 5px;border-radius: 4px;margin-bottom: 5px;user-select: none;font-size: 12px;pointer-events: none;">${t}</span>`, h.classList.add("mark-wrap-circle", `${o}`, "circle-warp"), h.style.position = "absolute", h.style.borderRadius = "4px", h.style.pointerEvents = "none";
|
|
7410
7422
|
const y = new DI(h);
|
|
7411
|
-
y.position.set(a.x + Math.min(g.radius / 2, 0.5), a.y, a.z), y.element.style.pointerEvents = "none", y.scale.set(8e-3, 8e-3, 8e-3), y.visible = g.circleTagVisible, I.add(E, S, y), I.data = g, I.circleMesh = E, I.css3dTag = y, I.css3dMainTag = S, I.events.fire(
|
|
7423
|
+
y.position.set(a.x + Math.min(g.radius / 2, 0.5), a.y, a.z), y.element.style.pointerEvents = "none", y.scale.set(8e-3, 8e-3, 8e-3), y.visible = g.circleTagVisible, I.add(E, S, y), I.data = g, I.circleMesh = E, I.css3dTag = y, I.css3dMainTag = S, I.events.fire(Fg, I);
|
|
7412
7424
|
}
|
|
7413
7425
|
getMarkData(A = !1) {
|
|
7414
7426
|
const I = { ...this.data };
|
|
@@ -7417,7 +7429,7 @@ class Dw extends tg {
|
|
|
7417
7429
|
dispose() {
|
|
7418
7430
|
if (this.disposed) return;
|
|
7419
7431
|
const A = this;
|
|
7420
|
-
A.disposed = !0, A.events.fire(hg, A), A.
|
|
7432
|
+
A.disposed = !0, A.events.fire(hg, A), A.removeFromParent(), A.events.fire(tC, A), document.querySelectorAll(`.${A.data.name}`).forEach((g) => g.parentElement?.removeChild(g)), A.events = null, A.data = null, A.circleMesh = null, A.css3dTag = null, A.css3dMainTag = null;
|
|
7421
7433
|
}
|
|
7422
7434
|
}
|
|
7423
7435
|
let tk = class {
|
|
@@ -7432,26 +7444,26 @@ function Sk(C) {
|
|
|
7432
7444
|
I(KA).autoRotate = I(x).autoRotate = !0;
|
|
7433
7445
|
}), A(QI, (c = !0) => {
|
|
7434
7446
|
I(KA).autoRotate = I(x).autoRotate = !1, c && I(ca);
|
|
7435
|
-
}), A(
|
|
7447
|
+
}), A(UQ, (c = !0) => {
|
|
7436
7448
|
if (Q) return;
|
|
7437
7449
|
const d = I(KA), p = c ? Math.PI / 128 : -(Math.PI / 128), u = new EI().makeRotationAxis(new R(0, 0, -1).transformDirection(d.object.matrixWorld), p);
|
|
7438
7450
|
d.object.up.transformDirection(u), I(AI);
|
|
7439
7451
|
}), A(Bo, () => {
|
|
7440
|
-
Q || C.fire(
|
|
7452
|
+
Q || C.fire(UQ, !0);
|
|
7441
7453
|
}), A(Qo, () => {
|
|
7442
|
-
Q || C.fire(
|
|
7443
|
-
}), A(
|
|
7454
|
+
Q || C.fire(UQ, !1);
|
|
7455
|
+
}), A(uB, (c) => {
|
|
7444
7456
|
const d = I(x);
|
|
7445
|
-
c ?? (c = !d.pointcloudMode), d.pointcloudMode = c, I(
|
|
7446
|
-
}), A(
|
|
7447
|
-
I(
|
|
7457
|
+
c ?? (c = !d.pointcloudMode), d.pointcloudMode = c, I(hA).traverse((u) => u instanceof ZI && u.fire(ng, c));
|
|
7458
|
+
}), A(OB, () => {
|
|
7459
|
+
I(hA).traverse((d) => d instanceof ZI && d.fire(dB));
|
|
7448
7460
|
}), A(uC, (c) => {
|
|
7449
|
-
I(
|
|
7461
|
+
I(hA).traverse((p) => p instanceof ZI && p.fire(uC, c));
|
|
7450
7462
|
}), A(Do, () => {
|
|
7451
|
-
const c = I(
|
|
7463
|
+
const c = I(hA);
|
|
7452
7464
|
let d;
|
|
7453
|
-
c.traverse((p) => p instanceof ZI && (d = p)), d && I(
|
|
7454
|
-
}), A(
|
|
7465
|
+
c.traverse((p) => p instanceof ZI && (d = p)), d && I(KE, d.fire(ha));
|
|
7466
|
+
}), A(AQ, () => {
|
|
7455
7467
|
if (!B.size) return;
|
|
7456
7468
|
const c = I(x);
|
|
7457
7469
|
if (!c.enableKeyboard) return B.clear();
|
|
@@ -7461,21 +7473,21 @@ function Sk(C) {
|
|
|
7461
7473
|
}
|
|
7462
7474
|
if (I(uA)) {
|
|
7463
7475
|
const d = B.has("KeyW") || B.has("ArrowUp"), p = B.has("KeyS") || B.has("ArrowDown"), u = B.has("KeyA") || B.has("ArrowLeft"), b = B.has("KeyD") || B.has("ArrowRight"), W = B.has("ShiftLeft") || B.has("ShiftRight");
|
|
7464
|
-
I(qa, d, p, u, b, W), B.has("KeyY") ? (I(iC, !1), I(nB), I(
|
|
7476
|
+
I(qa, d, p, u, b, W), B.has("KeyY") ? (I(iC, !1), I(nB), I(CQ)?.position, B.clear()) : B.has("Escape") && (Og.fire(ZC), B.clear());
|
|
7465
7477
|
return;
|
|
7466
7478
|
}
|
|
7467
|
-
B.has("Space") ? (c.bigSceneMode ? I(
|
|
7479
|
+
B.has("Space") ? (c.bigSceneMode ? I(uB) : I(OB), B.clear()) : B.has("Escape") ? (Og.fire(ZC), B.clear()) : B.has("KeyR") ? (c.autoRotate ? I(QI) : I(Vi), B.clear()) : B.has("KeyM") ? (I(mC, !c.markVisible), B.clear()) : B.has("ArrowLeft") ? (I(Bo), I(JB, !0), B.clear()) : B.has("ArrowRight") ? (I(Qo), I(JB, !0), B.clear()) : B.has("KeyP") ? (I(XI, !0), B.clear()) : B.has("Equal") ? (I($C), B.clear()) : B.has("Minus") ? (I(AB), B.clear()) : B.has("KeyY") ? (I(iC, !1), I(nB), B.clear()) : B.has("KeyI") ? (I(aa), B.clear()) : B.has("KeyF") ? (I(Do), B.clear()) : B.has("F2") ? (!c.bigSceneMode && window.open("/editor/index.html?url=" + encodeURIComponent(I(eI).meta.url)), B.clear()) : B.has("KeyW") ? (q(I(KA), 0.15), B.clear()) : B.has("KeyS") ? (X(I(KA), 0.15), B.clear()) : B.has("KeyA") ? (f(I(KA), 0.15), B.clear()) : B.has("KeyD") ? (T(I(KA), 0.15), B.clear()) : B.has("KeyQ") ? (AA(I(KA)), B.clear()) : B.has("KeyE") ? (V(I(KA)), B.clear()) : B.has("KeyC") ? (O(I(KA)), B.clear()) : B.has("KeyZ") && (n(I(KA)), B.clear());
|
|
7468
7480
|
}), A(Pg, async (c, d) => {
|
|
7469
7481
|
if (E.move || I(x).disableRightClickFocus) return;
|
|
7470
|
-
const u = await I(
|
|
7471
|
-
u.length && (I(uA) ? I(La, u[0]) : I(
|
|
7482
|
+
const u = await I(HB, c, d);
|
|
7483
|
+
u.length && (I(uA) ? I(La, u[0]) : I(KE, u[0], !0, !1));
|
|
7472
7484
|
}), A(UI, async (c, d) => {
|
|
7473
|
-
const p = I(
|
|
7485
|
+
const p = I(hA), u = [];
|
|
7474
7486
|
p.traverse((W) => W instanceof ZI && u.push(W));
|
|
7475
|
-
const b = await I(
|
|
7487
|
+
const b = await I(HB, c, d);
|
|
7476
7488
|
return b.length ? (u.length && u[0].fire(MB, b[0].x, b[0].y, b[0].z, !0), new R(b[0].x, b[0].y, b[0].z)) : (u.length && u[0].fire(MB, 0, 0, 0, !1), null);
|
|
7477
7489
|
}), A(Gi, async () => {
|
|
7478
|
-
const c = I(
|
|
7490
|
+
const c = I(hA), d = [];
|
|
7479
7491
|
c.traverse((p) => p instanceof ZI && d.push(p));
|
|
7480
7492
|
for (let p = 0; p < d.length; p++)
|
|
7481
7493
|
d[p].fire(MB, 0, 0, 0, !1);
|
|
@@ -7513,7 +7525,7 @@ function Sk(C) {
|
|
|
7513
7525
|
};
|
|
7514
7526
|
let S, h, y, e;
|
|
7515
7527
|
A(UC, () => {
|
|
7516
|
-
S?.dispose(), h?.dispose(), y?.dispose(), e?.dispose(), S = null, h = null, y = null, e = null, E.lastMovePoint = null, I(
|
|
7528
|
+
S?.dispose(), h?.dispose(), y?.dispose(), e?.dispose(), S = null, h = null, y = null, e = null, E.lastMovePoint = null, I(lg);
|
|
7517
7529
|
});
|
|
7518
7530
|
const G = async (c) => {
|
|
7519
7531
|
parent && setTimeout(() => window.focus()), c.preventDefault(), !Q && (I(QI), E.down = c.button === 2 ? 2 : 1, E.move = !1, E.isDbClick = Date.now() - E.downTime < 300, i = Date.now(), E.downTime = Date.now());
|
|
@@ -7532,7 +7544,7 @@ function Sk(C) {
|
|
|
7532
7544
|
if (d.markType === "point") {
|
|
7533
7545
|
if (await I(UI, c.clientX, c.clientY)) {
|
|
7534
7546
|
const u = new ow(C, await I(UI, c.clientX, c.clientY));
|
|
7535
|
-
I(
|
|
7547
|
+
I(hA).add(u), u.drawFinish();
|
|
7536
7548
|
}
|
|
7537
7549
|
} else if (d.markType === "distance")
|
|
7538
7550
|
if (S) {
|
|
@@ -7540,7 +7552,7 @@ function Sk(C) {
|
|
|
7540
7552
|
p ? (S.drawFinish(p), S = null) : E.isDbClick && I(UC);
|
|
7541
7553
|
} else {
|
|
7542
7554
|
const p = await I(UI, c.clientX, c.clientY);
|
|
7543
|
-
p && (S = new VE(C), S.drawStart(p), I(
|
|
7555
|
+
p && (S = new VE(C), S.drawStart(p), I(hA).add(S));
|
|
7544
7556
|
}
|
|
7545
7557
|
else if (d.markType === "lines")
|
|
7546
7558
|
if (h)
|
|
@@ -7552,7 +7564,7 @@ function Sk(C) {
|
|
|
7552
7564
|
}
|
|
7553
7565
|
else {
|
|
7554
7566
|
const p = await I(UI, c.clientX, c.clientY);
|
|
7555
|
-
p && (h = new vE(C), h.drawStart(p), I(
|
|
7567
|
+
p && (h = new vE(C), h.drawStart(p), I(hA).add(h));
|
|
7556
7568
|
}
|
|
7557
7569
|
else if (d.markType === "plans")
|
|
7558
7570
|
if (y)
|
|
@@ -7564,7 +7576,7 @@ function Sk(C) {
|
|
|
7564
7576
|
}
|
|
7565
7577
|
else {
|
|
7566
7578
|
const p = await I(UI, c.clientX, c.clientY);
|
|
7567
|
-
p && (y = new zE(C), y.drawStart(p), I(
|
|
7579
|
+
p && (y = new zE(C), y.drawStart(p), I(hA).add(y));
|
|
7568
7580
|
}
|
|
7569
7581
|
else if (d.markType === "circle")
|
|
7570
7582
|
if (e) {
|
|
@@ -7572,7 +7584,7 @@ function Sk(C) {
|
|
|
7572
7584
|
p ? (e.drawFinish(p), e = null) : E.isDbClick && I(UC);
|
|
7573
7585
|
} else {
|
|
7574
7586
|
const p = await I(UI, c.clientX, c.clientY);
|
|
7575
|
-
p && (e = new Dw(C), e.drawStart(p), I(
|
|
7587
|
+
p && (e = new Dw(C), e.drawStart(p), I(hA).add(e));
|
|
7576
7588
|
}
|
|
7577
7589
|
E.lastClickX = c.clientX, E.lastClickY = c.clientY;
|
|
7578
7590
|
}
|
|
@@ -7656,18 +7668,18 @@ function Sk(C) {
|
|
|
7656
7668
|
}
|
|
7657
7669
|
function sw(C) {
|
|
7658
7670
|
const A = new ps(), I = 5, g = (Q, E, i) => C.on(Q, E, i), B = (Q, ...E) => C.fire(Q, ...E);
|
|
7659
|
-
g(
|
|
7671
|
+
g(HB, async (Q, E) => {
|
|
7660
7672
|
const { width: i, height: o, left: D, top: a } = B(LI), s = new WA();
|
|
7661
7673
|
s.x = (Q - D) / i * 2 - 1, s.y = (a - E) / o * 2 + 1;
|
|
7662
7674
|
const t = (s.x + 1) / 2 * i, S = (1 - s.y) / 2 * o, h = B($A);
|
|
7663
7675
|
A.setFromCamera(s, h);
|
|
7664
|
-
const y = [], e = B(
|
|
7676
|
+
const y = [], e = B(hA), G = [], k = [];
|
|
7665
7677
|
B(uA) ? G.push(...B(bE)) : e.traverse(function(U) {
|
|
7666
7678
|
U instanceof ZI ? k.push(U) : U.isMesh && !U.ignoreIntersect && !U.isMark && G.push(U);
|
|
7667
7679
|
});
|
|
7668
7680
|
const L = A.intersectObjects(G, !0);
|
|
7669
7681
|
if (B(uA)) {
|
|
7670
|
-
const U = B(
|
|
7682
|
+
const U = B(CQ).position;
|
|
7671
7683
|
for (let J = 0; J < L.length; J++)
|
|
7672
7684
|
y.push({ point: L[J].point, d: U.distanceTo(L[J].point), p: 1 });
|
|
7673
7685
|
} else
|
|
@@ -7729,11 +7741,11 @@ function ek(C) {
|
|
|
7729
7741
|
});
|
|
7730
7742
|
let Q;
|
|
7731
7743
|
const E = [];
|
|
7732
|
-
A(
|
|
7744
|
+
A(KE, (s, t = !1, S) => {
|
|
7733
7745
|
if (B = !1, g.panSpeed = g.target.distanceTo(g.object.position) > g.minDistance ? 1 : 50, I(Ca, s), !t) {
|
|
7734
7746
|
g.target.copy(s);
|
|
7735
7747
|
const L = new R().subVectors(s, g.object.position);
|
|
7736
|
-
L.length() < 1 && g.object.position.copy(s).sub(L.setLength(1)), L.length() > 50 && g.object.position.copy(s).sub(L.setLength(50)), I(
|
|
7748
|
+
L.length() < 1 && g.object.position.copy(s).sub(L.setLength(1)), L.length() > 50 && g.object.position.copy(s).sub(L.setLength(50)), I(fB), I(NE);
|
|
7737
7749
|
return;
|
|
7738
7750
|
}
|
|
7739
7751
|
for (; E.length; ) E.pop().stop = !0;
|
|
@@ -7741,9 +7753,9 @@ function ek(C) {
|
|
|
7741
7753
|
E.push(h), Q = Q || { enablePan: g.enablePan, enableRotate: g.enableRotate }, g.enablePan = !1, g.enableRotate = !1;
|
|
7742
7754
|
const y = I(PI, !0), e = I(oI, !0), G = y.clone().sub(e).normalize(), k = s.clone().sub(G.multiplyScalar(s.clone().sub(e).dot(G)));
|
|
7743
7755
|
I(
|
|
7744
|
-
|
|
7756
|
+
rg,
|
|
7745
7757
|
() => {
|
|
7746
|
-
h.alpha = (Date.now() - h.time) / 600, I(KA).target.copy(y.clone().lerp(s, h.alpha)), !S && I(KA).object.position.copy(e.clone().lerp(k, h.alpha)), I(
|
|
7758
|
+
h.alpha = (Date.now() - h.time) / 600, I(KA).target.copy(y.clone().lerp(s, h.alpha)), !S && I(KA).object.position.copy(e.clone().lerp(k, h.alpha)), I(fB), h.alpha >= 0.9 && (g.enablePan = Q.enablePan, g.enableRotate = Q.enableRotate), h.alpha >= 1 && (h.stop = !0, I(NE));
|
|
7747
7759
|
},
|
|
7748
7760
|
() => !h.stop
|
|
7749
7761
|
);
|
|
@@ -7762,11 +7774,11 @@ function hk(C) {
|
|
|
7762
7774
|
const A = (E, i, o) => C.on(E, i, o), I = (E, ...i) => C.fire(E, ...i);
|
|
7763
7775
|
let g = Q();
|
|
7764
7776
|
const B = [];
|
|
7765
|
-
A(
|
|
7777
|
+
A(JQ, () => {
|
|
7766
7778
|
const { height: E } = I(LI), i = I(oI).distanceTo(g.position) * 3.2 / E;
|
|
7767
7779
|
g.scale.set(i, i, i);
|
|
7768
7780
|
}), A(oB, (E) => {
|
|
7769
|
-
I(
|
|
7781
|
+
I(JQ), g.visible = E > 0.1, g.element.style.opacity = E + "", I(AI);
|
|
7770
7782
|
}), A(Ca, (E) => {
|
|
7771
7783
|
for (g.position.copy(E); B.length; ) B.pop().stop = !0;
|
|
7772
7784
|
I(oB, 1), I(AI);
|
|
@@ -7774,7 +7786,7 @@ function hk(C) {
|
|
|
7774
7786
|
for (; B.length; ) B.pop().stop = !0;
|
|
7775
7787
|
let E = { opacity: 1, time: Date.now(), stop: !1 };
|
|
7776
7788
|
B.push(E), I(
|
|
7777
|
-
|
|
7789
|
+
rg,
|
|
7778
7790
|
() => {
|
|
7779
7791
|
E = B[0], !E && I(oB, 1), E && (E.opacity = 1 - Math.min((Date.now() - E.time) / 1500, 1), E.opacity < 0.2 && (E.opacity = 0, E.stop = !0), I(oB, E.opacity));
|
|
7780
7792
|
},
|
|
@@ -7785,14 +7797,14 @@ function hk(C) {
|
|
|
7785
7797
|
const E = document.createElement("div");
|
|
7786
7798
|
E.innerHTML = '<svg height="16" width="16" style="fill:white;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M108.8 469.333333C128 279.466667 279.466667 128 469.333333 108.8V64c0-23.466667 19.2-42.666667 42.666667-42.666667s42.666667 19.2 42.666667 42.666667v44.8c189.866667 19.2 341.333333 170.666667 360.533333 360.533333H960c23.466667 0 42.666667 19.2 42.666667 42.666667s-19.2 42.666667-42.666667 42.666667h-44.8c-19.2 189.866667-170.666667 341.333333-360.533333 360.533333V960c0 23.466667-19.2 42.666667-42.666667 42.666667s-42.666667-19.2-42.666667-42.666667v-44.8C279.466667 896 128 744.533333 108.8 554.666667H64c-23.466667 0-42.666667-19.2-42.666667-42.666667s19.2-42.666667 42.666667-42.666667h44.8zM469.333333 194.133333C326.4 213.333333 215.466667 326.4 196.266667 469.333333H234.666667c23.466667 0 42.666667 19.2 42.666666 42.666667s-19.2 42.666667-42.666666 42.666667H196.266667c19.2 142.933333 132.266667 256 275.2 273.066666V789.333333c0-23.466667 19.2-42.666667 42.666666-42.666666s42.666667 19.2 42.666667 42.666666v38.4C697.6 810.666667 810.666667 697.6 829.866667 554.666667H789.333333c-23.466667 0-42.666667-19.2-42.666666-42.666667s19.2-42.666667 42.666666-42.666667h40.533334C810.666667 326.4 697.6 213.333333 554.666667 194.133333V234.666667c0 23.466667-19.2 42.666667-42.666667 42.666666s-42.666667-19.2-42.666667-42.666666V194.133333z"></path></svg>', E.classList.add("css3d-focus-marker"), E.style.position = "absolute";
|
|
7787
7799
|
const i = new DI(E);
|
|
7788
|
-
return i.element.style.pointerEvents = "none", i.element.style.opacity = "1", i.visible = !1, I(
|
|
7800
|
+
return i.element.style.pointerEvents = "none", i.element.style.opacity = "1", i.visible = !1, I(hA).add(i), i.onBeforeRender = () => I(JQ), i;
|
|
7789
7801
|
}
|
|
7790
7802
|
}
|
|
7791
7803
|
function aw(C) {
|
|
7792
7804
|
const A = (E, i, o) => C.on(E, i, o), I = (E, ...i) => C.fire(E, ...i), g = /* @__PURE__ */ new Map(), B = document.createElement("div");
|
|
7793
7805
|
B.classList.add("mark-warp"), document.body.appendChild(B);
|
|
7794
7806
|
const Q = new wk();
|
|
7795
|
-
Q.setSize(innerWidth, innerHeight), Q.domElement.style.position = "absolute", Q.domElement.style.top = "0px", Q.domElement.style.pointerEvents = "none", B.appendChild(Q.domElement), A(lt, () => B), A(Ki, () => Q), A(ug, () => Q.render(I(
|
|
7807
|
+
Q.setSize(innerWidth, innerHeight), Q.domElement.style.position = "absolute", Q.domElement.style.top = "0px", Q.domElement.style.pointerEvents = "none", B.appendChild(Q.domElement), A(lt, () => B), A(Ki, () => Q), A(ug, () => Q.render(I(hA), I($A)), !0), A(Ig, () => document.body.removeChild(B), !0), A(Fg, (E) => {
|
|
7796
7808
|
const i = E?.getMarkData?.()?.name || E?.name;
|
|
7797
7809
|
i && g.set(i, new WeakRef(E));
|
|
7798
7810
|
}), A(tC, (E) => {
|
|
@@ -7805,10 +7817,10 @@ function aw(C) {
|
|
|
7805
7817
|
const i = I(pC, E);
|
|
7806
7818
|
return i ? i.getMarkData?.() : {};
|
|
7807
7819
|
}), A(mC, (E) => {
|
|
7808
|
-
E !== void 0 && (I(x).markVisible = E), I(
|
|
7820
|
+
E !== void 0 && (I(x).markVisible = E), I(hA).traverse((i) => i.isMark && (i.visible = I(x).markVisible)), I(AI);
|
|
7809
7821
|
}), A(nB, async () => {
|
|
7810
7822
|
const E = [];
|
|
7811
|
-
I(
|
|
7823
|
+
I(hA).traverse((o) => {
|
|
7812
7824
|
if (o.isMark) {
|
|
7813
7825
|
const D = o.getMarkData?.();
|
|
7814
7826
|
D && E.push(D);
|
|
@@ -7818,7 +7830,7 @@ function aw(C) {
|
|
|
7818
7830
|
return E.length ? i.marks = E : delete i.marks, i.cameraInfo = I(Os), await I(ag, i);
|
|
7819
7831
|
}), A(NB, async () => {
|
|
7820
7832
|
const E = [];
|
|
7821
|
-
I(
|
|
7833
|
+
I(hA).traverse((o) => {
|
|
7822
7834
|
if (o.isMark) {
|
|
7823
7835
|
const D = o.getMarkData?.();
|
|
7824
7836
|
D && E.push(D);
|
|
@@ -7832,7 +7844,7 @@ function aw(C) {
|
|
|
7832
7844
|
const i = await I(ag, E), o = [];
|
|
7833
7845
|
return g.forEach((D) => o.push(D)), o.forEach((D) => D.deref()?.dispose?.()), I(AI), i;
|
|
7834
7846
|
}), A(oa, async () => {
|
|
7835
|
-
I(
|
|
7847
|
+
I(hA).traverse((i) => {
|
|
7836
7848
|
i.isMark && i.getMarkData?.();
|
|
7837
7849
|
});
|
|
7838
7850
|
const E = I(eI).meta || {};
|
|
@@ -7841,22 +7853,22 @@ function aw(C) {
|
|
|
7841
7853
|
E.meterScale && (I(x).meterScale = E.meterScale, I(LA, { scale: `1 : ${I(x).meterScale} m` })), I(KA).updateByOptions({ ...E, ...E.cameraInfo || {} }), (E.marks || []).forEach((o) => {
|
|
7842
7854
|
if (o.type === "MarkSinglePoint") {
|
|
7843
7855
|
const D = new ow(C, o);
|
|
7844
|
-
D.visible = !1, I(
|
|
7856
|
+
D.visible = !1, I(hA).add(D);
|
|
7845
7857
|
} else if (o.type === "MarkDistanceLine") {
|
|
7846
7858
|
const D = new VE(C);
|
|
7847
|
-
D.draw(o), D.visible = !1, I(
|
|
7859
|
+
D.draw(o), D.visible = !1, I(hA).add(D);
|
|
7848
7860
|
} else if (o.type === "MarkMultiLines") {
|
|
7849
7861
|
const D = new vE(C);
|
|
7850
|
-
D.draw(o, !0), D.visible = !1, I(
|
|
7862
|
+
D.draw(o, !0), D.visible = !1, I(hA).add(D);
|
|
7851
7863
|
} else if (o.type === "MarkMultiPlans") {
|
|
7852
7864
|
const D = new zE(C);
|
|
7853
|
-
D.draw(o, !0), D.visible = !1, I(
|
|
7865
|
+
D.draw(o, !0), D.visible = !1, I(hA).add(D);
|
|
7854
7866
|
} else if (o.type === "MarkCirclePlan") {
|
|
7855
7867
|
const D = new Dw(C);
|
|
7856
|
-
D.draw(o), D.visible = !1, I(
|
|
7868
|
+
D.draw(o), D.visible = !1, I(hA).add(D);
|
|
7857
7869
|
}
|
|
7858
|
-
}), I(
|
|
7859
|
-
}), A(
|
|
7870
|
+
}), I(IQ, E.flyPositions || []), I(gQ, E.flyTargets || []);
|
|
7871
|
+
}), A(lg, () => {
|
|
7860
7872
|
const E = I(x);
|
|
7861
7873
|
E.markMode = !1, I(Gi), I(AI);
|
|
7862
7874
|
}), A(Ea, (E, i = !0) => {
|
|
@@ -7872,12 +7884,12 @@ function aw(C) {
|
|
|
7872
7884
|
a && (a instanceof VE || a instanceof vE || a instanceof zE) && a.updateByMeterScale(o);
|
|
7873
7885
|
}
|
|
7874
7886
|
}
|
|
7875
|
-
}), A(
|
|
7887
|
+
}), A(GE, (E) => {
|
|
7876
7888
|
const i = new R().fromArray(E.slice(0, 3)), o = new R().fromArray(E.slice(-6, -3)), D = new R().fromArray(E.slice(-3)), a = i.distanceTo(D) < 1e-4, s = o.distanceTo(D) < 1e-4, t = new R(), S = a || s ? E.length / 3 - 1 : E.length / 3;
|
|
7877
7889
|
for (let h = 0; h < S; h++)
|
|
7878
7890
|
t.add(new R(E[h * 3], E[h * 3 + 1], E[h * 3 + 2]));
|
|
7879
7891
|
return t.divideScalar(S), t;
|
|
7880
|
-
}), A(
|
|
7892
|
+
}), A(yE, (E) => {
|
|
7881
7893
|
const i = [];
|
|
7882
7894
|
for (let s = 0, t = E.length / 3; s < t; s++)
|
|
7883
7895
|
i.push(new R(E[s * 3], E[s * 3 + 1], E[s * 3 + 2]));
|
|
@@ -7885,14 +7897,14 @@ function aw(C) {
|
|
|
7885
7897
|
if ((o || D) && i.pop(), i.length < 3) return 0;
|
|
7886
7898
|
let a = 0;
|
|
7887
7899
|
for (let s = 0, t = i.length - 2; s < t; s++)
|
|
7888
|
-
a += I(
|
|
7900
|
+
a += I(KQ, i[0], i[s + 1], i[s + 2], I(x).meterScale);
|
|
7889
7901
|
return a;
|
|
7890
7902
|
}), A(Ts, (E, i) => {
|
|
7891
7903
|
let o = 0;
|
|
7892
7904
|
for (let D = 0, a = E.length - 2; D < a; D++)
|
|
7893
|
-
o += I(
|
|
7905
|
+
o += I(KQ, E[0], E[D + 1], E[D + 2], i);
|
|
7894
7906
|
return o;
|
|
7895
|
-
}), A(
|
|
7907
|
+
}), A(KQ, (E, i, o, D) => {
|
|
7896
7908
|
const a = E.distanceTo(i) * D, s = i.distanceTo(o) * D, t = o.distanceTo(E) * D, S = (a + s + t) / 2;
|
|
7897
7909
|
return Math.sqrt(S * (S - a) * (S - s) * (S - t));
|
|
7898
7910
|
});
|
|
@@ -7906,9 +7918,9 @@ const YB = (C, A) => {
|
|
|
7906
7918
|
}, Gk = (C, A, I) => {
|
|
7907
7919
|
const g = { x: 0, y: 0 };
|
|
7908
7920
|
return I = _E(I), g.x = C.x - A * Math.cos(I), g.y = C.y - A * Math.sin(I), g;
|
|
7909
|
-
}, _E = (C) => C * (Math.PI / 180), yk = (C) => C * (180 / Math.PI), Kk = (C) => isNaN(C.buttons) ? C.pressure !== 0 : C.buttons !== 0,
|
|
7910
|
-
|
|
7911
|
-
},
|
|
7921
|
+
}, _E = (C) => C * (Math.PI / 180), yk = (C) => C * (180 / Math.PI), Kk = (C) => isNaN(C.buttons) ? C.pressure !== 0 : C.buttons !== 0, $Q = /* @__PURE__ */ new Map(), rD = (C) => {
|
|
7922
|
+
$Q.has(C) && clearTimeout($Q.get(C)), $Q.set(C, setTimeout(C, 100));
|
|
7923
|
+
}, xB = (C, A, I) => {
|
|
7912
7924
|
const g = A.split(/[ ,]+/g);
|
|
7913
7925
|
let B;
|
|
7914
7926
|
for (let Q = 0; Q < g.length; Q += 1)
|
|
@@ -7949,7 +7961,7 @@ const YB = (C, A) => {
|
|
|
7949
7961
|
return A[C] = "", ["webkit", "Moz", "o"].forEach(function(g) {
|
|
7950
7962
|
A[g + C.charAt(0).toUpperCase() + C.slice(1)] = "";
|
|
7951
7963
|
}), A;
|
|
7952
|
-
},
|
|
7964
|
+
}, AE = (C, A) => {
|
|
7953
7965
|
for (let I in A)
|
|
7954
7966
|
A.hasOwnProperty(I) && (C[I] = A[I]);
|
|
7955
7967
|
return C;
|
|
@@ -8025,7 +8037,7 @@ cg.prototype.bindEvt = function(C, A) {
|
|
|
8025
8037
|
var I = this;
|
|
8026
8038
|
return I._domHandlers_ = I._domHandlers_ || {}, I._domHandlers_[A] = function() {
|
|
8027
8039
|
typeof I["on" + A] == "function" ? I["on" + A].apply(I, arguments) : console.warn('[WARNING] : Missing "on' + A + '" handler.');
|
|
8028
|
-
},
|
|
8040
|
+
}, xB(C, vg[A], I._domHandlers_[A]), PC[A] && xB(C, PC[A], I._domHandlers_[A]), I;
|
|
8029
8041
|
};
|
|
8030
8042
|
cg.prototype.unbindEvt = function(C, A) {
|
|
8031
8043
|
var I = this;
|
|
@@ -8102,7 +8114,7 @@ XA.prototype.stylize = function() {
|
|
|
8102
8114
|
background: this.options.color,
|
|
8103
8115
|
opacity: ".5",
|
|
8104
8116
|
transform: "translate(0px, 0px)"
|
|
8105
|
-
},
|
|
8117
|
+
}, AE(g.el, I), this.options.shape === "circle" && AE(g.back, A), AE(g.front, A), this.applyStyles(g), this;
|
|
8106
8118
|
};
|
|
8107
8119
|
XA.prototype.applyStyles = function(C) {
|
|
8108
8120
|
for (var A in this.ui)
|
|
@@ -8444,13 +8456,13 @@ function II(C) {
|
|
|
8444
8456
|
});
|
|
8445
8457
|
});
|
|
8446
8458
|
};
|
|
8447
|
-
|
|
8459
|
+
xB(window, "resize", function() {
|
|
8448
8460
|
rD(I);
|
|
8449
8461
|
});
|
|
8450
8462
|
var g = function() {
|
|
8451
8463
|
A.scroll = lD();
|
|
8452
8464
|
};
|
|
8453
|
-
return
|
|
8465
|
+
return xB(window, "scroll", function() {
|
|
8454
8466
|
rD(g);
|
|
8455
8467
|
}), A.collections;
|
|
8456
8468
|
}
|
|
@@ -8552,10 +8564,10 @@ function Sw(C) {
|
|
|
8552
8564
|
for (let J = 0, r = B.length; J < r; J++)
|
|
8553
8565
|
U.push(...B[J].toArray());
|
|
8554
8566
|
return U;
|
|
8555
|
-
}), I(
|
|
8567
|
+
}), I(IQ, (U) => {
|
|
8556
8568
|
for (let J = 0, r = U.length / 3 | 0; J < r; J++)
|
|
8557
8569
|
g[J] = new R(U[J * 3 + 0], U[J * 3 + 1], U[J * 3 + 2]);
|
|
8558
|
-
}), I(
|
|
8570
|
+
}), I(gQ, (U) => {
|
|
8559
8571
|
for (let J = 0, r = U.length / 3 | 0; J < r; J++)
|
|
8560
8572
|
B[J] = new R(U[J * 3 + 0], U[J * 3 + 1], U[J * 3 + 2]);
|
|
8561
8573
|
}), I(Ji, (U = 125 * 1e3) => {
|
|
@@ -8611,11 +8623,11 @@ function Sw(C) {
|
|
|
8611
8623
|
y = new ji(r), y.closed = !1, e = new ji(F), e.closed = !1, A(oo), A(QI, !1);
|
|
8612
8624
|
}), I(ca, () => {
|
|
8613
8625
|
s = s || Date.now();
|
|
8614
|
-
}), I(
|
|
8626
|
+
}), I(lQ, (U, J, r = !1, F = !1) => {
|
|
8615
8627
|
if (!(!G && !r))
|
|
8616
8628
|
return U = Math.max(-4, Math.min(4, U)), F ? h = U : (J && (S = J * i), s ? (t = Date.now(), s = 0, h = U = U < 0 ? -1 : 1) : h != U && (h += U > h ? 1 : -1), Q || (A(XI, !0), h = 1), h);
|
|
8617
8629
|
}), I(
|
|
8618
|
-
|
|
8630
|
+
TB,
|
|
8619
8631
|
() => {
|
|
8620
8632
|
const U = A(KA);
|
|
8621
8633
|
if (s || (S += h * (Date.now() - t), t = Date.now(), (S < 0 || S > D) && A(rE), !Q || !y || !e)) return;
|
|
@@ -8657,7 +8669,7 @@ function Sw(C) {
|
|
|
8657
8669
|
};
|
|
8658
8670
|
let J = 0, r = !0;
|
|
8659
8671
|
A(
|
|
8660
|
-
|
|
8672
|
+
rg,
|
|
8661
8673
|
() => {
|
|
8662
8674
|
!r && A(pa, J);
|
|
8663
8675
|
},
|
|
@@ -8673,20 +8685,20 @@ function Sw(C) {
|
|
|
8673
8685
|
}
|
|
8674
8686
|
const q = T.distance * Math.sin(T.angle.radian), X = U.size / 2;
|
|
8675
8687
|
let v = q / X, AA = 1e-5;
|
|
8676
|
-
v > 0 ? AA = v < 0.01 ? 1 : 1 + 4 * v : v < 0 && (v > -0.2 ? AA = 1 + v * 5 : AA = -1 + v * 4), A(
|
|
8688
|
+
v > 0 ? AA = v < 0.01 ? 1 : 1 + 4 * v : v < 0 && (v > -0.2 ? AA = 1 + v * 5 : AA = -1 + v * 4), A(lQ, AA), F = performance.now();
|
|
8677
8689
|
}), k.on("end", (f, T) => {
|
|
8678
8690
|
if (A(uA)) {
|
|
8679
8691
|
r = !0;
|
|
8680
8692
|
return;
|
|
8681
8693
|
}
|
|
8682
|
-
A(
|
|
8694
|
+
A(lQ, 1, 0, !1, !0);
|
|
8683
8695
|
});
|
|
8684
8696
|
}
|
|
8685
8697
|
}
|
|
8686
8698
|
function Fk(C) {
|
|
8687
8699
|
const A = (i, o, D) => C.on(i, o, D), I = (i, ...o) => C.fire(i, ...o);
|
|
8688
8700
|
let g = null, B = null, Q = null;
|
|
8689
|
-
A(TE, () => Q?.position.copy(I(
|
|
8701
|
+
A(TE, () => Q?.position.copy(I(CQ).position)), A(uE, (i, o = !1) => {
|
|
8690
8702
|
if (B)
|
|
8691
8703
|
if (o)
|
|
8692
8704
|
B.visible = !1;
|
|
@@ -8702,7 +8714,7 @@ function Fk(C) {
|
|
|
8702
8714
|
return o && i.push(o), i;
|
|
8703
8715
|
}), E();
|
|
8704
8716
|
function E() {
|
|
8705
|
-
const i = I(
|
|
8717
|
+
const i = I(hA), o = new ns(300, 300), D = new zB({ color: 65280, side: MI });
|
|
8706
8718
|
Q = new mA(o, D), Q.rotation.x = -Math.PI / 2, Q.receiveShadow = !0, Q.visible = !1, i.add(Q);
|
|
8707
8719
|
const a = new Wi(0, 6, 16), s = new wI({ color: 16777215, transparent: !0, opacity: 0.5, side: MI });
|
|
8708
8720
|
g = new mA(a, s), g.rotation.x = -Math.PI / 2, g.visible = !1, g.renderOrder = 99999, g.onBeforeRender = () => {
|
|
@@ -8770,9 +8782,9 @@ function qD(C, A) {
|
|
|
8770
8782
|
function iA(C) {
|
|
8771
8783
|
return C == null;
|
|
8772
8784
|
}
|
|
8773
|
-
let
|
|
8785
|
+
let qg = null;
|
|
8774
8786
|
function _A() {
|
|
8775
|
-
return (
|
|
8787
|
+
return (qg === null || qg.buffer.detached === !0 || qg.buffer.detached === void 0 && qg.buffer !== w.memory.buffer) && (qg = new DataView(w.memory.buffer)), qg;
|
|
8776
8788
|
}
|
|
8777
8789
|
function XC(C) {
|
|
8778
8790
|
const A = yA(C);
|
|
@@ -8812,18 +8824,18 @@ function Jg(C, A) {
|
|
|
8812
8824
|
const I = A(4 * C.length, 4) >>> 0;
|
|
8813
8825
|
return hw().set(C, I / 4), sI = C.length, I;
|
|
8814
8826
|
}
|
|
8815
|
-
const
|
|
8827
|
+
const oQ = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", LinZ: 2, 2: "LinZ", AngX: 3, 3: "AngX", AngY: 4, 4: "AngY", AngZ: 5, 5: "AngZ" }), qI = Object.freeze({ Revolute: 0, 0: "Revolute", Fixed: 1, 1: "Fixed", Prismatic: 2, 2: "Prismatic", Rope: 3, 3: "Rope", Spring: 4, 4: "Spring", Spherical: 5, 5: "Spherical", Generic: 6, 6: "Generic" }), zA = Object.freeze({ Ball: 0, 0: "Ball", Cuboid: 1, 1: "Cuboid", Capsule: 2, 2: "Capsule", Segment: 3, 3: "Segment", Polyline: 4, 4: "Polyline", Triangle: 5, 5: "Triangle", TriMesh: 6, 6: "TriMesh", HeightField: 7, 7: "HeightField", Compound: 8, 8: "Compound", ConvexPolyhedron: 9, 9: "ConvexPolyhedron", Cylinder: 10, 10: "Cylinder", Cone: 11, 11: "Cone", RoundCuboid: 12, 12: "RoundCuboid", RoundTriangle: 13, 13: "RoundTriangle", RoundCylinder: 14, 14: "RoundCylinder", RoundCone: 15, 15: "RoundCone", RoundConvexPolyhedron: 16, 16: "RoundConvexPolyhedron", HalfSpace: 17, 17: "HalfSpace", Voxels: 18, 18: "Voxels" }), IE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
8816
8828
|
}, unregister: () => {
|
|
8817
8829
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawbroadphase_free(C >>> 0, 1)));
|
|
8818
8830
|
class kg {
|
|
8819
8831
|
static __wrap(A) {
|
|
8820
8832
|
A >>>= 0;
|
|
8821
8833
|
const I = Object.create(kg.prototype);
|
|
8822
|
-
return I.__wbg_ptr = A,
|
|
8834
|
+
return I.__wbg_ptr = A, IE.register(I, I.__wbg_ptr, I), I;
|
|
8823
8835
|
}
|
|
8824
8836
|
__destroy_into_raw() {
|
|
8825
8837
|
const A = this.__wbg_ptr;
|
|
8826
|
-
return this.__wbg_ptr = 0,
|
|
8838
|
+
return this.__wbg_ptr = 0, IE.unregister(this), A;
|
|
8827
8839
|
}
|
|
8828
8840
|
free() {
|
|
8829
8841
|
const A = this.__destroy_into_raw();
|
|
@@ -8831,7 +8843,7 @@ class kg {
|
|
|
8831
8843
|
}
|
|
8832
8844
|
constructor() {
|
|
8833
8845
|
const A = w.rawbroadphase_new();
|
|
8834
|
-
return this.__wbg_ptr = A >>> 0,
|
|
8846
|
+
return this.__wbg_ptr = A >>> 0, IE.register(this, this.__wbg_ptr, this), this;
|
|
8835
8847
|
}
|
|
8836
8848
|
castRay(A, I, g, B, Q, E, i, o, D, a, s, t) {
|
|
8837
8849
|
try {
|
|
@@ -8846,7 +8858,7 @@ class kg {
|
|
|
8846
8858
|
try {
|
|
8847
8859
|
N(A, TA), N(I, lA), N(g, pA), N(B, l), N(Q, l);
|
|
8848
8860
|
const S = w.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr, E, i, o, iA(D) ? 4294967297 : D >>> 0, !iA(a), iA(a) ? 0 : a, !iA(s), iA(s) ? 0 : s, RA(t));
|
|
8849
|
-
return S === 0 ? void 0 :
|
|
8861
|
+
return S === 0 ? void 0 : aQ.__wrap(S);
|
|
8850
8862
|
} finally {
|
|
8851
8863
|
UA[rA++] = void 0;
|
|
8852
8864
|
}
|
|
@@ -8861,7 +8873,7 @@ class kg {
|
|
|
8861
8873
|
intersectionWithShape(A, I, g, B, Q, E, i, o, D, a, s) {
|
|
8862
8874
|
try {
|
|
8863
8875
|
const h = w.__wbindgen_add_to_stack_pointer(-16);
|
|
8864
|
-
N(A, TA), N(I, lA), N(g, pA), N(B, l), N(Q,
|
|
8876
|
+
N(A, TA), N(I, lA), N(g, pA), N(B, l), N(Q, tA), N(E, EA), w.rawbroadphase_intersectionWithShape(h, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, iA(o) ? 4294967297 : o >>> 0, !iA(D), iA(D) ? 0 : D, !iA(a), iA(a) ? 0 : a, RA(s));
|
|
8865
8877
|
var t = _A().getInt32(h + 0, !0), S = _A().getFloat64(h + 8, !0);
|
|
8866
8878
|
return t === 0 ? void 0 : S;
|
|
8867
8879
|
} finally {
|
|
@@ -8872,7 +8884,7 @@ class kg {
|
|
|
8872
8884
|
try {
|
|
8873
8885
|
N(A, TA), N(I, lA), N(g, pA), N(B, l);
|
|
8874
8886
|
const s = w.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q, E, iA(i) ? 4294967297 : i >>> 0, !iA(o), iA(o) ? 0 : o, !iA(D), iA(D) ? 0 : D, RA(a));
|
|
8875
|
-
return s === 0 ? void 0 :
|
|
8887
|
+
return s === 0 ? void 0 : jB.__wrap(s);
|
|
8876
8888
|
} finally {
|
|
8877
8889
|
UA[rA++] = void 0;
|
|
8878
8890
|
}
|
|
@@ -8881,7 +8893,7 @@ class kg {
|
|
|
8881
8893
|
try {
|
|
8882
8894
|
N(A, TA), N(I, lA), N(g, pA), N(B, l);
|
|
8883
8895
|
const a = w.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q, iA(E) ? 4294967297 : E >>> 0, !iA(i), iA(i) ? 0 : i, !iA(o), iA(o) ? 0 : o, RA(D));
|
|
8884
|
-
return a === 0 ? void 0 :
|
|
8896
|
+
return a === 0 ? void 0 : jB.__wrap(a);
|
|
8885
8897
|
} finally {
|
|
8886
8898
|
UA[rA++] = void 0;
|
|
8887
8899
|
}
|
|
@@ -8895,16 +8907,16 @@ class kg {
|
|
|
8895
8907
|
}
|
|
8896
8908
|
castShape(A, I, g, B, Q, E, i, o, D, a, s, t, S, h, y) {
|
|
8897
8909
|
try {
|
|
8898
|
-
N(A, TA), N(I, lA), N(g, pA), N(B, l), N(Q,
|
|
8910
|
+
N(A, TA), N(I, lA), N(g, pA), N(B, l), N(Q, tA), N(E, l), N(i, EA);
|
|
8899
8911
|
const e = w.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, o, D, a, s, iA(t) ? 4294967297 : t >>> 0, !iA(S), iA(S) ? 0 : S, !iA(h), iA(h) ? 0 : h, RA(y));
|
|
8900
|
-
return e === 0 ? void 0 :
|
|
8912
|
+
return e === 0 ? void 0 : DQ.__wrap(e);
|
|
8901
8913
|
} finally {
|
|
8902
8914
|
UA[rA++] = void 0;
|
|
8903
8915
|
}
|
|
8904
8916
|
}
|
|
8905
8917
|
intersectionsWithShape(A, I, g, B, Q, E, i, o, D, a, s, t) {
|
|
8906
8918
|
try {
|
|
8907
|
-
N(A, TA), N(I, lA), N(g, pA), N(B, l), N(Q,
|
|
8919
|
+
N(A, TA), N(I, lA), N(g, pA), N(B, l), N(Q, tA), N(E, EA), w.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, RA(i), o, iA(D) ? 4294967297 : D >>> 0, !iA(a), iA(a) ? 0 : a, !iA(s), iA(s) ? 0 : s, RA(t));
|
|
8908
8920
|
} finally {
|
|
8909
8921
|
UA[rA++] = void 0, UA[rA++] = void 0;
|
|
8910
8922
|
}
|
|
@@ -8981,18 +8993,18 @@ class Gw {
|
|
|
8981
8993
|
return l.__wrap(A);
|
|
8982
8994
|
}
|
|
8983
8995
|
}
|
|
8984
|
-
const
|
|
8996
|
+
const gE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
8985
8997
|
}, unregister: () => {
|
|
8986
8998
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawcolliderset_free(C >>> 0, 1)));
|
|
8987
8999
|
class pA {
|
|
8988
9000
|
static __wrap(A) {
|
|
8989
9001
|
A >>>= 0;
|
|
8990
9002
|
const I = Object.create(pA.prototype);
|
|
8991
|
-
return I.__wbg_ptr = A,
|
|
9003
|
+
return I.__wbg_ptr = A, gE.register(I, I.__wbg_ptr, I), I;
|
|
8992
9004
|
}
|
|
8993
9005
|
__destroy_into_raw() {
|
|
8994
9006
|
const A = this.__wbg_ptr;
|
|
8995
|
-
return this.__wbg_ptr = 0,
|
|
9007
|
+
return this.__wbg_ptr = 0, gE.unregister(this), A;
|
|
8996
9008
|
}
|
|
8997
9009
|
free() {
|
|
8998
9010
|
const A = this.__destroy_into_raw();
|
|
@@ -9004,7 +9016,7 @@ class pA {
|
|
|
9004
9016
|
}
|
|
9005
9017
|
coRotation(A) {
|
|
9006
9018
|
const I = w.rawcolliderset_coRotation(this.__wbg_ptr, A);
|
|
9007
|
-
return
|
|
9019
|
+
return tA.__wrap(I);
|
|
9008
9020
|
}
|
|
9009
9021
|
coTranslationWrtParent(A) {
|
|
9010
9022
|
const I = w.rawcolliderset_coTranslationWrtParent(this.__wbg_ptr, A);
|
|
@@ -9012,7 +9024,7 @@ class pA {
|
|
|
9012
9024
|
}
|
|
9013
9025
|
coRotationWrtParent(A) {
|
|
9014
9026
|
const I = w.rawcolliderset_coRotationWrtParent(this.__wbg_ptr, A);
|
|
9015
|
-
return I === 0 ? void 0 :
|
|
9027
|
+
return I === 0 ? void 0 : tA.__wrap(I);
|
|
9016
9028
|
}
|
|
9017
9029
|
coSetTranslation(A, I, g, B) {
|
|
9018
9030
|
w.rawcolliderset_coSetTranslation(this.__wbg_ptr, A, I, g, B);
|
|
@@ -9202,20 +9214,20 @@ class pA {
|
|
|
9202
9214
|
return N(I, l), w.rawcolliderset_coContainsPoint(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
|
|
9203
9215
|
}
|
|
9204
9216
|
coCastShape(A, I, g, B, Q, E, i, o, D) {
|
|
9205
|
-
N(I, l), N(g, EA), N(B, l), N(Q,
|
|
9217
|
+
N(I, l), N(g, EA), N(B, l), N(Q, tA), N(E, l);
|
|
9206
9218
|
const a = w.rawcolliderset_coCastShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, o, D);
|
|
9207
|
-
return a === 0 ? void 0 :
|
|
9219
|
+
return a === 0 ? void 0 : tQ.__wrap(a);
|
|
9208
9220
|
}
|
|
9209
9221
|
coCastCollider(A, I, g, B, Q, E, i) {
|
|
9210
9222
|
N(I, l), N(B, l);
|
|
9211
9223
|
const o = w.rawcolliderset_coCastCollider(this.__wbg_ptr, A, I.__wbg_ptr, g, B.__wbg_ptr, Q, E, i);
|
|
9212
|
-
return o === 0 ? void 0 :
|
|
9224
|
+
return o === 0 ? void 0 : DQ.__wrap(o);
|
|
9213
9225
|
}
|
|
9214
9226
|
coIntersectsShape(A, I, g, B) {
|
|
9215
|
-
return N(I, EA), N(g, l), N(B,
|
|
9227
|
+
return N(I, EA), N(g, l), N(B, tA), w.rawcolliderset_coIntersectsShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr) !== 0;
|
|
9216
9228
|
}
|
|
9217
9229
|
coContactShape(A, I, g, B, Q) {
|
|
9218
|
-
N(I, EA), N(g, l), N(B,
|
|
9230
|
+
N(I, EA), N(g, l), N(B, tA);
|
|
9219
9231
|
const E = w.rawcolliderset_coContactShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q);
|
|
9220
9232
|
return E === 0 ? void 0 : VC.__wrap(E);
|
|
9221
9233
|
}
|
|
@@ -9226,7 +9238,7 @@ class pA {
|
|
|
9226
9238
|
coProjectPoint(A, I, g) {
|
|
9227
9239
|
N(I, l);
|
|
9228
9240
|
const B = w.rawcolliderset_coProjectPoint(this.__wbg_ptr, A, I.__wbg_ptr, g);
|
|
9229
|
-
return
|
|
9241
|
+
return sQ.__wrap(B);
|
|
9230
9242
|
}
|
|
9231
9243
|
coIntersectsRay(A, I, g, B) {
|
|
9232
9244
|
return N(I, l), N(g, l), w.rawcolliderset_coIntersectsRay(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, B) !== 0;
|
|
@@ -9237,7 +9249,7 @@ class pA {
|
|
|
9237
9249
|
coCastRayAndGetNormal(A, I, g, B, Q) {
|
|
9238
9250
|
N(I, l), N(g, l);
|
|
9239
9251
|
const E = w.rawcolliderset_coCastRayAndGetNormal(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, B, Q);
|
|
9240
|
-
return E === 0 ? void 0 :
|
|
9252
|
+
return E === 0 ? void 0 : wQ.__wrap(E);
|
|
9241
9253
|
}
|
|
9242
9254
|
coSetSensor(A, I) {
|
|
9243
9255
|
w.rawcolliderset_coSetSensor(this.__wbg_ptr, A, I);
|
|
@@ -9288,11 +9300,11 @@ class pA {
|
|
|
9288
9300
|
w.rawcolliderset_coSetMass(this.__wbg_ptr, A, I);
|
|
9289
9301
|
}
|
|
9290
9302
|
coSetMassProperties(A, I, g, B, Q) {
|
|
9291
|
-
N(g, l), N(B, l), N(Q,
|
|
9303
|
+
N(g, l), N(B, l), N(Q, tA), w.rawcolliderset_coSetMassProperties(this.__wbg_ptr, A, I, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr);
|
|
9292
9304
|
}
|
|
9293
9305
|
constructor() {
|
|
9294
9306
|
const A = w.rawcolliderset_new();
|
|
9295
|
-
return this.__wbg_ptr = A >>> 0,
|
|
9307
|
+
return this.__wbg_ptr = A >>> 0, gE.register(this, this.__wbg_ptr, this), this;
|
|
9296
9308
|
}
|
|
9297
9309
|
len() {
|
|
9298
9310
|
return w.rawcolliderset_len(this.__wbg_ptr) >>> 0;
|
|
@@ -9303,7 +9315,7 @@ class pA {
|
|
|
9303
9315
|
createCollider(A, I, g, B, Q, E, i, o, D, a, s, t, S, h, y, e, G, k, L, K, U, J, r, F, f) {
|
|
9304
9316
|
try {
|
|
9305
9317
|
const X = w.__wbindgen_add_to_stack_pointer(-16);
|
|
9306
|
-
N(I, EA), N(g, l), N(B,
|
|
9318
|
+
N(I, EA), N(g, l), N(B, tA), N(i, l), N(o, l), N(D, tA), N(f, lA), w.rawcolliderset_createCollider(X, this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q, E, i.__wbg_ptr, o.__wbg_ptr, D.__wbg_ptr, a, s, t, S, h, y, e, G, k, L, K, U, J, r, F, f.__wbg_ptr);
|
|
9307
9319
|
var T = _A().getInt32(X + 0, !0), q = _A().getFloat64(X + 8, !0);
|
|
9308
9320
|
return T === 0 ? void 0 : q;
|
|
9309
9321
|
} finally {
|
|
@@ -9327,10 +9339,10 @@ class pA {
|
|
|
9327
9339
|
const HD = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
9328
9340
|
}, unregister: () => {
|
|
9329
9341
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawcollidershapecasthit_free(C >>> 0, 1)));
|
|
9330
|
-
class
|
|
9342
|
+
class DQ {
|
|
9331
9343
|
static __wrap(A) {
|
|
9332
9344
|
A >>>= 0;
|
|
9333
|
-
const I = Object.create(
|
|
9345
|
+
const I = Object.create(DQ.prototype);
|
|
9334
9346
|
return I.__wbg_ptr = A, HD.register(I, I.__wbg_ptr, I), I;
|
|
9335
9347
|
}
|
|
9336
9348
|
__destroy_into_raw() {
|
|
@@ -9877,7 +9889,7 @@ class YI {
|
|
|
9877
9889
|
return i === 0 ? void 0 : YI.__wrap(i);
|
|
9878
9890
|
}
|
|
9879
9891
|
static fixed(A, I, g, B) {
|
|
9880
|
-
N(A, l), N(I,
|
|
9892
|
+
N(A, l), N(I, tA), N(g, l), N(B, tA);
|
|
9881
9893
|
const Q = w.rawgenericjoint_fixed(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr);
|
|
9882
9894
|
return YI.__wrap(Q);
|
|
9883
9895
|
}
|
|
@@ -9887,18 +9899,18 @@ class YI {
|
|
|
9887
9899
|
return B === 0 ? void 0 : YI.__wrap(B);
|
|
9888
9900
|
}
|
|
9889
9901
|
}
|
|
9890
|
-
const
|
|
9902
|
+
const CE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
9891
9903
|
}, unregister: () => {
|
|
9892
9904
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawimpulsejointset_free(C >>> 0, 1)));
|
|
9893
9905
|
class Gg {
|
|
9894
9906
|
static __wrap(A) {
|
|
9895
9907
|
A >>>= 0;
|
|
9896
9908
|
const I = Object.create(Gg.prototype);
|
|
9897
|
-
return I.__wbg_ptr = A,
|
|
9909
|
+
return I.__wbg_ptr = A, CE.register(I, I.__wbg_ptr, I), I;
|
|
9898
9910
|
}
|
|
9899
9911
|
__destroy_into_raw() {
|
|
9900
9912
|
const A = this.__wbg_ptr;
|
|
9901
|
-
return this.__wbg_ptr = 0,
|
|
9913
|
+
return this.__wbg_ptr = 0, CE.unregister(this), A;
|
|
9902
9914
|
}
|
|
9903
9915
|
free() {
|
|
9904
9916
|
const A = this.__destroy_into_raw();
|
|
@@ -9915,11 +9927,11 @@ class Gg {
|
|
|
9915
9927
|
}
|
|
9916
9928
|
jointFrameX1(A) {
|
|
9917
9929
|
const I = w.rawimpulsejointset_jointFrameX1(this.__wbg_ptr, A);
|
|
9918
|
-
return
|
|
9930
|
+
return tA.__wrap(I);
|
|
9919
9931
|
}
|
|
9920
9932
|
jointFrameX2(A) {
|
|
9921
9933
|
const I = w.rawimpulsejointset_jointFrameX2(this.__wbg_ptr, A);
|
|
9922
|
-
return
|
|
9934
|
+
return tA.__wrap(I);
|
|
9923
9935
|
}
|
|
9924
9936
|
jointAnchor1(A) {
|
|
9925
9937
|
const I = w.rawimpulsejointset_jointAnchor1(this.__wbg_ptr, A);
|
|
@@ -9967,7 +9979,7 @@ class Gg {
|
|
|
9967
9979
|
}
|
|
9968
9980
|
constructor() {
|
|
9969
9981
|
const A = w.rawimpulsejointset_new();
|
|
9970
|
-
return this.__wbg_ptr = A >>> 0,
|
|
9982
|
+
return this.__wbg_ptr = A >>> 0, CE.register(this, this.__wbg_ptr, this), this;
|
|
9971
9983
|
}
|
|
9972
9984
|
createJoint(A, I, g, B) {
|
|
9973
9985
|
return N(A, YI), w.rawimpulsejointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, g, B);
|
|
@@ -9996,18 +10008,18 @@ class Gg {
|
|
|
9996
10008
|
}
|
|
9997
10009
|
}
|
|
9998
10010
|
}
|
|
9999
|
-
const
|
|
10011
|
+
const BE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10000
10012
|
}, unregister: () => {
|
|
10001
10013
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawintegrationparameters_free(C >>> 0, 1)));
|
|
10002
10014
|
class mg {
|
|
10003
10015
|
static __wrap(A) {
|
|
10004
10016
|
A >>>= 0;
|
|
10005
10017
|
const I = Object.create(mg.prototype);
|
|
10006
|
-
return I.__wbg_ptr = A,
|
|
10018
|
+
return I.__wbg_ptr = A, BE.register(I, I.__wbg_ptr, I), I;
|
|
10007
10019
|
}
|
|
10008
10020
|
__destroy_into_raw() {
|
|
10009
10021
|
const A = this.__wbg_ptr;
|
|
10010
|
-
return this.__wbg_ptr = 0,
|
|
10022
|
+
return this.__wbg_ptr = 0, BE.unregister(this), A;
|
|
10011
10023
|
}
|
|
10012
10024
|
free() {
|
|
10013
10025
|
const A = this.__destroy_into_raw();
|
|
@@ -10015,7 +10027,7 @@ class mg {
|
|
|
10015
10027
|
}
|
|
10016
10028
|
constructor() {
|
|
10017
10029
|
const A = w.rawintegrationparameters_new();
|
|
10018
|
-
return this.__wbg_ptr = A >>> 0,
|
|
10030
|
+
return this.__wbg_ptr = A >>> 0, BE.register(this, this.__wbg_ptr, this), this;
|
|
10019
10031
|
}
|
|
10020
10032
|
get dt() {
|
|
10021
10033
|
return w.rawintegrationparameters_dt(this.__wbg_ptr);
|
|
@@ -10072,18 +10084,18 @@ class mg {
|
|
|
10072
10084
|
w.rawintegrationparameters_set_lengthUnit(this.__wbg_ptr, A);
|
|
10073
10085
|
}
|
|
10074
10086
|
}
|
|
10075
|
-
const
|
|
10087
|
+
const QE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10076
10088
|
}, unregister: () => {
|
|
10077
10089
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawislandmanager_free(C >>> 0, 1)));
|
|
10078
10090
|
class yg {
|
|
10079
10091
|
static __wrap(A) {
|
|
10080
10092
|
A >>>= 0;
|
|
10081
10093
|
const I = Object.create(yg.prototype);
|
|
10082
|
-
return I.__wbg_ptr = A,
|
|
10094
|
+
return I.__wbg_ptr = A, QE.register(I, I.__wbg_ptr, I), I;
|
|
10083
10095
|
}
|
|
10084
10096
|
__destroy_into_raw() {
|
|
10085
10097
|
const A = this.__wbg_ptr;
|
|
10086
|
-
return this.__wbg_ptr = 0,
|
|
10098
|
+
return this.__wbg_ptr = 0, QE.unregister(this), A;
|
|
10087
10099
|
}
|
|
10088
10100
|
free() {
|
|
10089
10101
|
const A = this.__destroy_into_raw();
|
|
@@ -10091,7 +10103,7 @@ class yg {
|
|
|
10091
10103
|
}
|
|
10092
10104
|
constructor() {
|
|
10093
10105
|
const A = w.rawislandmanager_new();
|
|
10094
|
-
return this.__wbg_ptr = A >>> 0,
|
|
10106
|
+
return this.__wbg_ptr = A >>> 0, QE.register(this, this.__wbg_ptr, this), this;
|
|
10095
10107
|
}
|
|
10096
10108
|
forEachActiveRigidBodyHandle(A) {
|
|
10097
10109
|
try {
|
|
@@ -10209,18 +10221,18 @@ class pk {
|
|
|
10209
10221
|
return N(I, Gw), w.rawkinematiccharactercontroller_computedCollision(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
|
|
10210
10222
|
}
|
|
10211
10223
|
}
|
|
10212
|
-
const
|
|
10224
|
+
const EE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10213
10225
|
}, unregister: () => {
|
|
10214
10226
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawmultibodyjointset_free(C >>> 0, 1)));
|
|
10215
10227
|
class Kg {
|
|
10216
10228
|
static __wrap(A) {
|
|
10217
10229
|
A >>>= 0;
|
|
10218
10230
|
const I = Object.create(Kg.prototype);
|
|
10219
|
-
return I.__wbg_ptr = A,
|
|
10231
|
+
return I.__wbg_ptr = A, EE.register(I, I.__wbg_ptr, I), I;
|
|
10220
10232
|
}
|
|
10221
10233
|
__destroy_into_raw() {
|
|
10222
10234
|
const A = this.__wbg_ptr;
|
|
10223
|
-
return this.__wbg_ptr = 0,
|
|
10235
|
+
return this.__wbg_ptr = 0, EE.unregister(this), A;
|
|
10224
10236
|
}
|
|
10225
10237
|
free() {
|
|
10226
10238
|
const A = this.__destroy_into_raw();
|
|
@@ -10231,11 +10243,11 @@ class Kg {
|
|
|
10231
10243
|
}
|
|
10232
10244
|
jointFrameX1(A) {
|
|
10233
10245
|
const I = w.rawmultibodyjointset_jointFrameX1(this.__wbg_ptr, A);
|
|
10234
|
-
return
|
|
10246
|
+
return tA.__wrap(I);
|
|
10235
10247
|
}
|
|
10236
10248
|
jointFrameX2(A) {
|
|
10237
10249
|
const I = w.rawmultibodyjointset_jointFrameX2(this.__wbg_ptr, A);
|
|
10238
|
-
return
|
|
10250
|
+
return tA.__wrap(I);
|
|
10239
10251
|
}
|
|
10240
10252
|
jointAnchor1(A) {
|
|
10241
10253
|
const I = w.rawmultibodyjointset_jointAnchor1(this.__wbg_ptr, A);
|
|
@@ -10262,7 +10274,7 @@ class Kg {
|
|
|
10262
10274
|
}
|
|
10263
10275
|
constructor() {
|
|
10264
10276
|
const A = w.rawmultibodyjointset_new();
|
|
10265
|
-
return this.__wbg_ptr = A >>> 0,
|
|
10277
|
+
return this.__wbg_ptr = A >>> 0, EE.register(this, this.__wbg_ptr, this), this;
|
|
10266
10278
|
}
|
|
10267
10279
|
createJoint(A, I, g, B) {
|
|
10268
10280
|
return N(A, YI), w.rawmultibodyjointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, g, B);
|
|
@@ -10288,18 +10300,18 @@ class Kg {
|
|
|
10288
10300
|
}
|
|
10289
10301
|
}
|
|
10290
10302
|
}
|
|
10291
|
-
const
|
|
10303
|
+
const iE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10292
10304
|
}, unregister: () => {
|
|
10293
10305
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawnarrowphase_free(C >>> 0, 1)));
|
|
10294
10306
|
class TA {
|
|
10295
10307
|
static __wrap(A) {
|
|
10296
10308
|
A >>>= 0;
|
|
10297
10309
|
const I = Object.create(TA.prototype);
|
|
10298
|
-
return I.__wbg_ptr = A,
|
|
10310
|
+
return I.__wbg_ptr = A, iE.register(I, I.__wbg_ptr, I), I;
|
|
10299
10311
|
}
|
|
10300
10312
|
__destroy_into_raw() {
|
|
10301
10313
|
const A = this.__wbg_ptr;
|
|
10302
|
-
return this.__wbg_ptr = 0,
|
|
10314
|
+
return this.__wbg_ptr = 0, iE.unregister(this), A;
|
|
10303
10315
|
}
|
|
10304
10316
|
free() {
|
|
10305
10317
|
const A = this.__destroy_into_raw();
|
|
@@ -10307,7 +10319,7 @@ class TA {
|
|
|
10307
10319
|
}
|
|
10308
10320
|
constructor() {
|
|
10309
10321
|
const A = w.rawnarrowphase_new();
|
|
10310
|
-
return this.__wbg_ptr = A >>> 0,
|
|
10322
|
+
return this.__wbg_ptr = A >>> 0, iE.register(this, this.__wbg_ptr, this), this;
|
|
10311
10323
|
}
|
|
10312
10324
|
contact_pairs_with(A, I) {
|
|
10313
10325
|
w.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A, NA(I));
|
|
@@ -10435,7 +10447,7 @@ class dk {
|
|
|
10435
10447
|
N(I, lA), N(B, l), N(Q, l), w.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, B.__wbg_ptr, Q.__wbg_ptr);
|
|
10436
10448
|
}
|
|
10437
10449
|
apply_angular_correction(A, I, g, B, Q) {
|
|
10438
|
-
N(I, lA), N(B,
|
|
10450
|
+
N(I, lA), N(B, tA), N(Q, l), w.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, B.__wbg_ptr, Q.__wbg_ptr);
|
|
10439
10451
|
}
|
|
10440
10452
|
linear_correction(A, I, g, B, Q) {
|
|
10441
10453
|
N(I, lA), N(B, l), N(Q, l);
|
|
@@ -10443,7 +10455,7 @@ class dk {
|
|
|
10443
10455
|
return l.__wrap(E);
|
|
10444
10456
|
}
|
|
10445
10457
|
angular_correction(A, I, g, B, Q) {
|
|
10446
|
-
N(I, lA), N(B,
|
|
10458
|
+
N(I, lA), N(B, tA), N(Q, l);
|
|
10447
10459
|
const E = w.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, B.__wbg_ptr, Q.__wbg_ptr);
|
|
10448
10460
|
return l.__wrap(E);
|
|
10449
10461
|
}
|
|
@@ -10451,10 +10463,10 @@ class dk {
|
|
|
10451
10463
|
const XD = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10452
10464
|
}, unregister: () => {
|
|
10453
10465
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawpointcolliderprojection_free(C >>> 0, 1)));
|
|
10454
|
-
class
|
|
10466
|
+
class jB {
|
|
10455
10467
|
static __wrap(A) {
|
|
10456
10468
|
A >>>= 0;
|
|
10457
|
-
const I = Object.create(
|
|
10469
|
+
const I = Object.create(jB.prototype);
|
|
10458
10470
|
return I.__wbg_ptr = A, XD.register(I, I.__wbg_ptr, I), I;
|
|
10459
10471
|
}
|
|
10460
10472
|
__destroy_into_raw() {
|
|
@@ -10486,10 +10498,10 @@ class xB {
|
|
|
10486
10498
|
const VD = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10487
10499
|
}, unregister: () => {
|
|
10488
10500
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawpointprojection_free(C >>> 0, 1)));
|
|
10489
|
-
class
|
|
10501
|
+
class sQ {
|
|
10490
10502
|
static __wrap(A) {
|
|
10491
10503
|
A >>>= 0;
|
|
10492
|
-
const I = Object.create(
|
|
10504
|
+
const I = Object.create(sQ.prototype);
|
|
10493
10505
|
return I.__wbg_ptr = A, VD.register(I, I.__wbg_ptr, I), I;
|
|
10494
10506
|
}
|
|
10495
10507
|
__destroy_into_raw() {
|
|
@@ -10535,10 +10547,10 @@ class di {
|
|
|
10535
10547
|
const zD = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10536
10548
|
}, unregister: () => {
|
|
10537
10549
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawraycolliderintersection_free(C >>> 0, 1)));
|
|
10538
|
-
class
|
|
10550
|
+
class aQ {
|
|
10539
10551
|
static __wrap(A) {
|
|
10540
10552
|
A >>>= 0;
|
|
10541
|
-
const I = Object.create(
|
|
10553
|
+
const I = Object.create(aQ.prototype);
|
|
10542
10554
|
return I.__wbg_ptr = A, zD.register(I, I.__wbg_ptr, I), I;
|
|
10543
10555
|
}
|
|
10544
10556
|
__destroy_into_raw() {
|
|
@@ -10570,10 +10582,10 @@ class sQ {
|
|
|
10570
10582
|
const _D = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10571
10583
|
}, unregister: () => {
|
|
10572
10584
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawrayintersection_free(C >>> 0, 1)));
|
|
10573
|
-
class
|
|
10585
|
+
class wQ {
|
|
10574
10586
|
static __wrap(A) {
|
|
10575
10587
|
A >>>= 0;
|
|
10576
|
-
const I = Object.create(
|
|
10588
|
+
const I = Object.create(wQ.prototype);
|
|
10577
10589
|
return I.__wbg_ptr = A, _D.register(I, I.__wbg_ptr, I), I;
|
|
10578
10590
|
}
|
|
10579
10591
|
__destroy_into_raw() {
|
|
@@ -10599,18 +10611,18 @@ class aQ {
|
|
|
10599
10611
|
return A === 4294967297 ? void 0 : A;
|
|
10600
10612
|
}
|
|
10601
10613
|
}
|
|
10602
|
-
const
|
|
10614
|
+
const oE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10603
10615
|
}, unregister: () => {
|
|
10604
10616
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawrigidbodyset_free(C >>> 0, 1)));
|
|
10605
10617
|
class lA {
|
|
10606
10618
|
static __wrap(A) {
|
|
10607
10619
|
A >>>= 0;
|
|
10608
10620
|
const I = Object.create(lA.prototype);
|
|
10609
|
-
return I.__wbg_ptr = A,
|
|
10621
|
+
return I.__wbg_ptr = A, oE.register(I, I.__wbg_ptr, I), I;
|
|
10610
10622
|
}
|
|
10611
10623
|
__destroy_into_raw() {
|
|
10612
10624
|
const A = this.__wbg_ptr;
|
|
10613
|
-
return this.__wbg_ptr = 0,
|
|
10625
|
+
return this.__wbg_ptr = 0, oE.unregister(this), A;
|
|
10614
10626
|
}
|
|
10615
10627
|
free() {
|
|
10616
10628
|
const A = this.__destroy_into_raw();
|
|
@@ -10622,7 +10634,7 @@ class lA {
|
|
|
10622
10634
|
}
|
|
10623
10635
|
rbRotation(A) {
|
|
10624
10636
|
const I = w.rawrigidbodyset_rbRotation(this.__wbg_ptr, A);
|
|
10625
|
-
return
|
|
10637
|
+
return tA.__wrap(I);
|
|
10626
10638
|
}
|
|
10627
10639
|
rbSleep(A) {
|
|
10628
10640
|
w.rawrigidbodyset_rbSleep(this.__wbg_ptr, A);
|
|
@@ -10639,7 +10651,7 @@ class lA {
|
|
|
10639
10651
|
}
|
|
10640
10652
|
rbNextRotation(A) {
|
|
10641
10653
|
const I = w.rawrigidbodyset_rbNextRotation(this.__wbg_ptr, A);
|
|
10642
|
-
return
|
|
10654
|
+
return tA.__wrap(I);
|
|
10643
10655
|
}
|
|
10644
10656
|
rbSetTranslation(A, I, g, B, Q) {
|
|
10645
10657
|
w.rawrigidbodyset_rbSetTranslation(this.__wbg_ptr, A, I, g, B, Q);
|
|
@@ -10666,7 +10678,7 @@ class lA {
|
|
|
10666
10678
|
w.rawrigidbodyset_rbSetAdditionalMass(this.__wbg_ptr, A, I, g);
|
|
10667
10679
|
}
|
|
10668
10680
|
rbSetAdditionalMassProperties(A, I, g, B, Q, E) {
|
|
10669
|
-
N(g, l), N(B, l), N(Q,
|
|
10681
|
+
N(g, l), N(B, l), N(Q, tA), w.rawrigidbodyset_rbSetAdditionalMassProperties(this.__wbg_ptr, A, I, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr, E);
|
|
10670
10682
|
}
|
|
10671
10683
|
rbLinvel(A) {
|
|
10672
10684
|
const I = w.rawrigidbodyset_rbLinvel(this.__wbg_ptr, A);
|
|
@@ -10729,7 +10741,7 @@ class lA {
|
|
|
10729
10741
|
}
|
|
10730
10742
|
rbPrincipalInertiaLocalFrame(A) {
|
|
10731
10743
|
const I = w.rawrigidbodyset_rbPrincipalInertiaLocalFrame(this.__wbg_ptr, A);
|
|
10732
|
-
return
|
|
10744
|
+
return tA.__wrap(I);
|
|
10733
10745
|
}
|
|
10734
10746
|
rbPrincipalInertia(A) {
|
|
10735
10747
|
const I = w.rawrigidbodyset_rbPrincipalInertia(this.__wbg_ptr, A);
|
|
@@ -10737,11 +10749,11 @@ class lA {
|
|
|
10737
10749
|
}
|
|
10738
10750
|
rbEffectiveWorldInvInertia(A) {
|
|
10739
10751
|
const I = w.rawrigidbodyset_rbEffectiveWorldInvInertia(this.__wbg_ptr, A);
|
|
10740
|
-
return
|
|
10752
|
+
return WB.__wrap(I);
|
|
10741
10753
|
}
|
|
10742
10754
|
rbEffectiveAngularInertia(A) {
|
|
10743
10755
|
const I = w.rawrigidbodyset_rbEffectiveAngularInertia(this.__wbg_ptr, A);
|
|
10744
|
-
return
|
|
10756
|
+
return WB.__wrap(I);
|
|
10745
10757
|
}
|
|
10746
10758
|
rbWakeUp(A) {
|
|
10747
10759
|
w.rawrigidbodyset_rbWakeUp(this.__wbg_ptr, A);
|
|
@@ -10843,10 +10855,10 @@ class lA {
|
|
|
10843
10855
|
}
|
|
10844
10856
|
constructor() {
|
|
10845
10857
|
const A = w.rawrigidbodyset_new();
|
|
10846
|
-
return this.__wbg_ptr = A >>> 0,
|
|
10858
|
+
return this.__wbg_ptr = A >>> 0, oE.register(this, this.__wbg_ptr, this), this;
|
|
10847
10859
|
}
|
|
10848
10860
|
createRigidBody(A, I, g, B, Q, E, i, o, D, a, s, t, S, h, y, e, G, k, L, K, U, J, r, F, f, T) {
|
|
10849
|
-
return N(I, l), N(g,
|
|
10861
|
+
return N(I, l), N(g, tA), N(i, l), N(o, l), N(D, l), N(a, l), N(s, tA), w.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, B, Q, E, i.__wbg_ptr, o.__wbg_ptr, D.__wbg_ptr, a.__wbg_ptr, s.__wbg_ptr, t, S, h, y, e, G, k, L, K, U, J, r, F, f, T);
|
|
10850
10862
|
}
|
|
10851
10863
|
remove(A, I, g, B, Q) {
|
|
10852
10864
|
N(I, yg), N(g, pA), N(B, Gg), N(Q, Kg), w.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr);
|
|
@@ -10868,18 +10880,18 @@ class lA {
|
|
|
10868
10880
|
N(A, pA), w.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, A.__wbg_ptr);
|
|
10869
10881
|
}
|
|
10870
10882
|
}
|
|
10871
|
-
const
|
|
10883
|
+
const DE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10872
10884
|
}, unregister: () => {
|
|
10873
10885
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawrotation_free(C >>> 0, 1)));
|
|
10874
|
-
class
|
|
10886
|
+
class tA {
|
|
10875
10887
|
static __wrap(A) {
|
|
10876
10888
|
A >>>= 0;
|
|
10877
|
-
const I = Object.create(
|
|
10878
|
-
return I.__wbg_ptr = A,
|
|
10889
|
+
const I = Object.create(tA.prototype);
|
|
10890
|
+
return I.__wbg_ptr = A, DE.register(I, I.__wbg_ptr, I), I;
|
|
10879
10891
|
}
|
|
10880
10892
|
__destroy_into_raw() {
|
|
10881
10893
|
const A = this.__wbg_ptr;
|
|
10882
|
-
return this.__wbg_ptr = 0,
|
|
10894
|
+
return this.__wbg_ptr = 0, DE.unregister(this), A;
|
|
10883
10895
|
}
|
|
10884
10896
|
free() {
|
|
10885
10897
|
const A = this.__destroy_into_raw();
|
|
@@ -10887,11 +10899,11 @@ class SA {
|
|
|
10887
10899
|
}
|
|
10888
10900
|
constructor(A, I, g, B) {
|
|
10889
10901
|
const Q = w.rawrotation_new(A, I, g, B);
|
|
10890
|
-
return this.__wbg_ptr = Q >>> 0,
|
|
10902
|
+
return this.__wbg_ptr = Q >>> 0, DE.register(this, this.__wbg_ptr, this), this;
|
|
10891
10903
|
}
|
|
10892
10904
|
static identity() {
|
|
10893
10905
|
const A = w.rawrotation_identity();
|
|
10894
|
-
return
|
|
10906
|
+
return tA.__wrap(A);
|
|
10895
10907
|
}
|
|
10896
10908
|
get x() {
|
|
10897
10909
|
return w.rawintegrationparameters_dt(this.__wbg_ptr);
|
|
@@ -10909,10 +10921,10 @@ class SA {
|
|
|
10909
10921
|
const $D = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
10910
10922
|
}, unregister: () => {
|
|
10911
10923
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawsdpmatrix3_free(C >>> 0, 1)));
|
|
10912
|
-
class
|
|
10924
|
+
class WB {
|
|
10913
10925
|
static __wrap(A) {
|
|
10914
10926
|
A >>>= 0;
|
|
10915
|
-
const I = Object.create(
|
|
10927
|
+
const I = Object.create(WB.prototype);
|
|
10916
10928
|
return I.__wbg_ptr = A, $D.register(I, I.__wbg_ptr, I), I;
|
|
10917
10929
|
}
|
|
10918
10930
|
__destroy_into_raw() {
|
|
@@ -11061,45 +11073,45 @@ class EA {
|
|
|
11061
11073
|
return o === 0 ? void 0 : EA.__wrap(o);
|
|
11062
11074
|
}
|
|
11063
11075
|
castShape(A, I, g, B, Q, E, i, o, D, a) {
|
|
11064
|
-
N(A, l), N(I,
|
|
11076
|
+
N(A, l), N(I, tA), N(g, l), N(B, EA), N(Q, l), N(E, tA), N(i, l);
|
|
11065
11077
|
const s = w.rawshape_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, o, D, a);
|
|
11066
|
-
return s === 0 ? void 0 :
|
|
11078
|
+
return s === 0 ? void 0 : tQ.__wrap(s);
|
|
11067
11079
|
}
|
|
11068
11080
|
intersectsShape(A, I, g, B, Q) {
|
|
11069
|
-
return N(A, l), N(I,
|
|
11081
|
+
return N(A, l), N(I, tA), N(g, EA), N(B, l), N(Q, tA), w.rawshape_intersectsShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr) !== 0;
|
|
11070
11082
|
}
|
|
11071
11083
|
contactShape(A, I, g, B, Q, E) {
|
|
11072
|
-
N(A, l), N(I,
|
|
11084
|
+
N(A, l), N(I, tA), N(g, EA), N(B, l), N(Q, tA);
|
|
11073
11085
|
const i = w.rawshape_contactShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q.__wbg_ptr, E);
|
|
11074
11086
|
return i === 0 ? void 0 : VC.__wrap(i);
|
|
11075
11087
|
}
|
|
11076
11088
|
containsPoint(A, I, g) {
|
|
11077
|
-
return N(A, l), N(I,
|
|
11089
|
+
return N(A, l), N(I, tA), N(g, l), w.rawshape_containsPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr) !== 0;
|
|
11078
11090
|
}
|
|
11079
11091
|
projectPoint(A, I, g, B) {
|
|
11080
|
-
N(A, l), N(I,
|
|
11092
|
+
N(A, l), N(I, tA), N(g, l);
|
|
11081
11093
|
const Q = w.rawshape_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B);
|
|
11082
|
-
return
|
|
11094
|
+
return sQ.__wrap(Q);
|
|
11083
11095
|
}
|
|
11084
11096
|
intersectsRay(A, I, g, B, Q) {
|
|
11085
|
-
return N(A, l), N(I,
|
|
11097
|
+
return N(A, l), N(I, tA), N(g, l), N(B, l), w.rawshape_intersectsRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q) !== 0;
|
|
11086
11098
|
}
|
|
11087
11099
|
castRay(A, I, g, B, Q, E) {
|
|
11088
|
-
return N(A, l), N(I,
|
|
11100
|
+
return N(A, l), N(I, tA), N(g, l), N(B, l), w.rawshape_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q, E);
|
|
11089
11101
|
}
|
|
11090
11102
|
castRayAndGetNormal(A, I, g, B, Q, E) {
|
|
11091
|
-
N(A, l), N(I,
|
|
11103
|
+
N(A, l), N(I, tA), N(g, l), N(B, l);
|
|
11092
11104
|
const i = w.rawshape_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, B.__wbg_ptr, Q, E);
|
|
11093
|
-
return i === 0 ? void 0 :
|
|
11105
|
+
return i === 0 ? void 0 : wQ.__wrap(i);
|
|
11094
11106
|
}
|
|
11095
11107
|
}
|
|
11096
11108
|
const gs = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
11097
11109
|
}, unregister: () => {
|
|
11098
11110
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawshapecasthit_free(C >>> 0, 1)));
|
|
11099
|
-
class
|
|
11111
|
+
class tQ {
|
|
11100
11112
|
static __wrap(A) {
|
|
11101
11113
|
A >>>= 0;
|
|
11102
|
-
const I = Object.create(
|
|
11114
|
+
const I = Object.create(tQ.prototype);
|
|
11103
11115
|
return I.__wbg_ptr = A, gs.register(I, I.__wbg_ptr, I), I;
|
|
11104
11116
|
}
|
|
11105
11117
|
__destroy_into_raw() {
|
|
@@ -11167,18 +11179,18 @@ class VC {
|
|
|
11167
11179
|
return l.__wrap(A);
|
|
11168
11180
|
}
|
|
11169
11181
|
}
|
|
11170
|
-
const
|
|
11182
|
+
const sE = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
11171
11183
|
}, unregister: () => {
|
|
11172
11184
|
} } : new FinalizationRegistry(((C) => w.__wbg_rawvector_free(C >>> 0, 1)));
|
|
11173
11185
|
class l {
|
|
11174
11186
|
static __wrap(A) {
|
|
11175
11187
|
A >>>= 0;
|
|
11176
11188
|
const I = Object.create(l.prototype);
|
|
11177
|
-
return I.__wbg_ptr = A,
|
|
11189
|
+
return I.__wbg_ptr = A, sE.register(I, I.__wbg_ptr, I), I;
|
|
11178
11190
|
}
|
|
11179
11191
|
__destroy_into_raw() {
|
|
11180
11192
|
const A = this.__wbg_ptr;
|
|
11181
|
-
return this.__wbg_ptr = 0,
|
|
11193
|
+
return this.__wbg_ptr = 0, sE.unregister(this), A;
|
|
11182
11194
|
}
|
|
11183
11195
|
free() {
|
|
11184
11196
|
const A = this.__destroy_into_raw();
|
|
@@ -11190,7 +11202,7 @@ class l {
|
|
|
11190
11202
|
}
|
|
11191
11203
|
constructor(A, I, g) {
|
|
11192
11204
|
const B = w.rawvector_new(A, I, g);
|
|
11193
|
-
return this.__wbg_ptr = B >>> 0,
|
|
11205
|
+
return this.__wbg_ptr = B >>> 0, sE.register(this, this.__wbg_ptr, this), this;
|
|
11194
11206
|
}
|
|
11195
11207
|
get x() {
|
|
11196
11208
|
return w.rawintegrationparameters_dt(this.__wbg_ptr);
|
|
@@ -11281,7 +11293,7 @@ async function yw(C) {
|
|
|
11281
11293
|
}, B.wbg.__wbg_rawcontactforceevent_new = function(Q) {
|
|
11282
11294
|
return NA(Yi.__wrap(Q));
|
|
11283
11295
|
}, B.wbg.__wbg_rawraycolliderintersection_new = function(Q) {
|
|
11284
|
-
return NA(
|
|
11296
|
+
return NA(aQ.__wrap(Q));
|
|
11285
11297
|
}, B.wbg.__wbg_set_10bad9bee0e9c58b = function(Q, E, i) {
|
|
11286
11298
|
yA(Q).set(yA(E), i >>> 0);
|
|
11287
11299
|
}, B.wbg.__wbg_set_65595bdd868b3009 = function(Q, E, i) {
|
|
@@ -11338,7 +11350,7 @@ async function yw(C) {
|
|
|
11338
11350
|
}
|
|
11339
11351
|
})(await C, A);
|
|
11340
11352
|
return (function(B, Q) {
|
|
11341
|
-
return w = B.exports, yw.__wbindgen_wasm_module = Q,
|
|
11353
|
+
return w = B.exports, yw.__wbindgen_wasm_module = Q, qg = null, rC = null, nC = null, FC = null, NC = null, w;
|
|
11342
11354
|
})(I, g);
|
|
11343
11355
|
}
|
|
11344
11356
|
class Ii {
|
|
@@ -11370,7 +11382,7 @@ class Bs {
|
|
|
11370
11382
|
this.x = A, this.y = I, this.z = g, this.w = B;
|
|
11371
11383
|
}
|
|
11372
11384
|
}
|
|
11373
|
-
class
|
|
11385
|
+
class SA {
|
|
11374
11386
|
static identity() {
|
|
11375
11387
|
return new Bs(0, 0, 0, 1);
|
|
11376
11388
|
}
|
|
@@ -11380,7 +11392,7 @@ class eA {
|
|
|
11380
11392
|
return A.free(), I;
|
|
11381
11393
|
}
|
|
11382
11394
|
static intoRaw(A) {
|
|
11383
|
-
return new
|
|
11395
|
+
return new tA(A.x, A.y, A.z, A.w);
|
|
11384
11396
|
}
|
|
11385
11397
|
static copy(A, I) {
|
|
11386
11398
|
A.x = I.x, A.y = I.y, A.z = I.z, A.w = I.w;
|
|
@@ -11424,7 +11436,7 @@ class Qs {
|
|
|
11424
11436
|
return A.free(), I;
|
|
11425
11437
|
}
|
|
11426
11438
|
}
|
|
11427
|
-
var OI, Es, is, os,
|
|
11439
|
+
var OI, Es, is, os, PB, vC, bA, Ds, ss, as, gi, Ci, ws, ts, Bi, zg;
|
|
11428
11440
|
(function(C) {
|
|
11429
11441
|
C[C.Dynamic = 0] = "Dynamic", C[C.Fixed = 1] = "Fixed", C[C.KinematicPositionBased = 2] = "KinematicPositionBased", C[C.KinematicVelocityBased = 3] = "KinematicVelocityBased";
|
|
11430
11442
|
})(OI || (OI = {}));
|
|
@@ -11483,7 +11495,7 @@ class Ss {
|
|
|
11483
11495
|
}
|
|
11484
11496
|
rotation() {
|
|
11485
11497
|
let A = this.rawSet.rbRotation(this.handle);
|
|
11486
|
-
return
|
|
11498
|
+
return SA.fromRaw(A);
|
|
11487
11499
|
}
|
|
11488
11500
|
nextTranslation() {
|
|
11489
11501
|
let A = this.rawSet.rbNextTranslation(this.handle);
|
|
@@ -11491,7 +11503,7 @@ class Ss {
|
|
|
11491
11503
|
}
|
|
11492
11504
|
nextRotation() {
|
|
11493
11505
|
let A = this.rawSet.rbNextRotation(this.handle);
|
|
11494
|
-
return
|
|
11506
|
+
return SA.fromRaw(A);
|
|
11495
11507
|
}
|
|
11496
11508
|
setTranslation(A, I) {
|
|
11497
11509
|
this.rawSet.rbSetTranslation(this.handle, A.x, A.y, A.z, I);
|
|
@@ -11552,7 +11564,7 @@ class Ss {
|
|
|
11552
11564
|
return Y.fromRaw(this.rawSet.rbPrincipalInertia(this.handle));
|
|
11553
11565
|
}
|
|
11554
11566
|
principalInertiaLocalFrame() {
|
|
11555
|
-
return
|
|
11567
|
+
return SA.fromRaw(this.rawSet.rbPrincipalInertiaLocalFrame(this.handle));
|
|
11556
11568
|
}
|
|
11557
11569
|
effectiveWorldInvInertia() {
|
|
11558
11570
|
return Qs.fromRaw(this.rawSet.rbEffectiveWorldInvInertia(this.handle));
|
|
@@ -11618,7 +11630,7 @@ class Ss {
|
|
|
11618
11630
|
this.rawSet.rbSetAdditionalMass(this.handle, A, I);
|
|
11619
11631
|
}
|
|
11620
11632
|
setAdditionalMassProperties(A, I, g, B, Q) {
|
|
11621
|
-
let E = Y.intoRaw(I), i = Y.intoRaw(g), o =
|
|
11633
|
+
let E = Y.intoRaw(I), i = Y.intoRaw(g), o = SA.intoRaw(B);
|
|
11622
11634
|
this.rawSet.rbSetAdditionalMassProperties(this.handle, A, E, i, o, Q), E.free(), i.free(), o.free();
|
|
11623
11635
|
}
|
|
11624
11636
|
setAngularDamping(A) {
|
|
@@ -11663,7 +11675,7 @@ class Ss {
|
|
|
11663
11675
|
}
|
|
11664
11676
|
class hI {
|
|
11665
11677
|
constructor(A) {
|
|
11666
|
-
this.enabled = !0, this.status = A, this.translation = Y.zeros(), this.rotation =
|
|
11678
|
+
this.enabled = !0, this.status = A, this.translation = Y.zeros(), this.rotation = SA.identity(), this.gravityScale = 1, this.linvel = Y.zeros(), this.mass = 0, this.massOnly = !1, this.centerOfMass = Y.zeros(), this.translationsEnabledX = !0, this.translationsEnabledY = !0, this.angvel = Y.zeros(), this.principalAngularInertia = Y.zeros(), this.angularInertiaLocalFrame = SA.identity(), this.translationsEnabledZ = !0, this.rotationsEnabledX = !0, this.rotationsEnabledY = !0, this.rotationsEnabledZ = !0, this.linearDamping = 0, this.angularDamping = 0, this.canSleep = !0, this.sleeping = !1, this.ccdEnabled = !1, this.softCcdPrediction = 0, this.dominanceGroup = 0, this.additionalSolverIterations = 0;
|
|
11667
11679
|
}
|
|
11668
11680
|
static dynamic() {
|
|
11669
11681
|
return new hI(OI.Dynamic);
|
|
@@ -11703,7 +11715,7 @@ class hI {
|
|
|
11703
11715
|
return this.translation = { x: A, y: I, z: g }, this;
|
|
11704
11716
|
}
|
|
11705
11717
|
setRotation(A) {
|
|
11706
|
-
return
|
|
11718
|
+
return SA.copy(this.rotation, A), this;
|
|
11707
11719
|
}
|
|
11708
11720
|
setGravityScale(A) {
|
|
11709
11721
|
return this.gravityScale = A, this;
|
|
@@ -11719,7 +11731,7 @@ class hI {
|
|
|
11719
11731
|
return Y.copy(this.angvel, A), this;
|
|
11720
11732
|
}
|
|
11721
11733
|
setAdditionalMassProperties(A, I, g, B) {
|
|
11722
|
-
return this.mass = A, Y.copy(this.centerOfMass, I), Y.copy(this.principalAngularInertia, g),
|
|
11734
|
+
return this.mass = A, Y.copy(this.centerOfMass, I), Y.copy(this.principalAngularInertia, g), SA.copy(this.angularInertiaLocalFrame, B), this.massOnly = !1, this;
|
|
11723
11735
|
}
|
|
11724
11736
|
enabledTranslations(A, I, g) {
|
|
11725
11737
|
return this.translationsEnabledX = A, this.translationsEnabledY = I, this.translationsEnabledZ = g, this;
|
|
@@ -11761,7 +11773,7 @@ class hI {
|
|
|
11761
11773
|
return this.userData = A, this;
|
|
11762
11774
|
}
|
|
11763
11775
|
}
|
|
11764
|
-
class
|
|
11776
|
+
class SQ {
|
|
11765
11777
|
constructor() {
|
|
11766
11778
|
this.fconv = new Float64Array(1), this.uconv = new Uint32Array(this.fconv.buffer), this.data = new Array(), this.size = 0;
|
|
11767
11779
|
}
|
|
@@ -11796,7 +11808,7 @@ class tQ {
|
|
|
11796
11808
|
}
|
|
11797
11809
|
class Tk {
|
|
11798
11810
|
constructor(A) {
|
|
11799
|
-
this.raw = A || new lA(), this.map = new
|
|
11811
|
+
this.raw = A || new lA(), this.map = new SQ(), A && A.forEachRigidBodyHandle(((I) => {
|
|
11800
11812
|
this.map.set(I, new Ss(A, null, I));
|
|
11801
11813
|
}));
|
|
11802
11814
|
}
|
|
@@ -11807,7 +11819,7 @@ class Tk {
|
|
|
11807
11819
|
this.map.forEach(((I) => I.finalizeDeserialization(A)));
|
|
11808
11820
|
}
|
|
11809
11821
|
createRigidBody(A, I) {
|
|
11810
|
-
let g = Y.intoRaw(I.translation), B =
|
|
11822
|
+
let g = Y.intoRaw(I.translation), B = SA.intoRaw(I.rotation), Q = Y.intoRaw(I.linvel), E = Y.intoRaw(I.centerOfMass), i = Y.intoRaw(I.angvel), o = Y.intoRaw(I.principalAngularInertia), D = SA.intoRaw(I.angularInertiaLocalFrame), a = this.raw.createRigidBody(I.enabled, g, B, I.gravityScale, I.mass, I.massOnly, E, Q, i, o, D, I.translationsEnabledX, I.translationsEnabledY, I.translationsEnabledZ, I.rotationsEnabledX, I.rotationsEnabledY, I.rotationsEnabledZ, I.linearDamping, I.angularDamping, I.status, I.canSleep, I.sleeping, I.softCcdPrediction, I.ccdEnabled, I.dominanceGroup, I.additionalSolverIterations);
|
|
11811
11823
|
g.free(), B.free(), Q.free(), E.free(), i.free(), o.free(), D.free();
|
|
11812
11824
|
const s = new Ss(this.raw, A, a);
|
|
11813
11825
|
return s.userData = I.userData, this.map.set(a, s), s;
|
|
@@ -11946,10 +11958,10 @@ class _I {
|
|
|
11946
11958
|
return this.rawSet.jointType(this.handle);
|
|
11947
11959
|
}
|
|
11948
11960
|
frameX1() {
|
|
11949
|
-
return
|
|
11961
|
+
return SA.fromRaw(this.rawSet.jointFrameX1(this.handle));
|
|
11950
11962
|
}
|
|
11951
11963
|
frameX2() {
|
|
11952
|
-
return
|
|
11964
|
+
return SA.fromRaw(this.rawSet.jointFrameX2(this.handle));
|
|
11953
11965
|
}
|
|
11954
11966
|
anchor1() {
|
|
11955
11967
|
return Y.fromRaw(this.rawSet.jointAnchor1(this.handle));
|
|
@@ -12006,12 +12018,12 @@ class bk extends _I {
|
|
|
12006
12018
|
}
|
|
12007
12019
|
class Zk extends Kw {
|
|
12008
12020
|
rawAxis() {
|
|
12009
|
-
return
|
|
12021
|
+
return oQ.LinX;
|
|
12010
12022
|
}
|
|
12011
12023
|
}
|
|
12012
12024
|
class xk extends Kw {
|
|
12013
12025
|
rawAxis() {
|
|
12014
|
-
return
|
|
12026
|
+
return oQ.AngX;
|
|
12015
12027
|
}
|
|
12016
12028
|
}
|
|
12017
12029
|
class jk extends _I {
|
|
@@ -12020,7 +12032,7 @@ class Wk extends _I {
|
|
|
12020
12032
|
}
|
|
12021
12033
|
class Pk {
|
|
12022
12034
|
constructor(A) {
|
|
12023
|
-
this.raw = A || new Gg(), this.map = new
|
|
12035
|
+
this.raw = A || new Gg(), this.map = new SQ(), A && A.forEachJointHandle(((I) => {
|
|
12024
12036
|
this.map.set(I, _I.newTyped(A, null, I));
|
|
12025
12037
|
}));
|
|
12026
12038
|
}
|
|
@@ -12095,19 +12107,19 @@ class Xk extends bg {
|
|
|
12095
12107
|
}
|
|
12096
12108
|
class Vk extends cw {
|
|
12097
12109
|
rawAxis() {
|
|
12098
|
-
return
|
|
12110
|
+
return oQ.LinX;
|
|
12099
12111
|
}
|
|
12100
12112
|
}
|
|
12101
12113
|
class vk extends cw {
|
|
12102
12114
|
rawAxis() {
|
|
12103
|
-
return
|
|
12115
|
+
return oQ.AngX;
|
|
12104
12116
|
}
|
|
12105
12117
|
}
|
|
12106
12118
|
class zk extends bg {
|
|
12107
12119
|
}
|
|
12108
12120
|
class _k {
|
|
12109
12121
|
constructor(A) {
|
|
12110
|
-
this.raw = A || new Kg(), this.map = new
|
|
12122
|
+
this.raw = A || new Kg(), this.map = new SQ(), A && A.forEachJointHandle(((I) => {
|
|
12111
12123
|
this.map.set(I, bg.newTyped(this.raw, I));
|
|
12112
12124
|
}));
|
|
12113
12125
|
}
|
|
@@ -12147,7 +12159,7 @@ class _k {
|
|
|
12147
12159
|
}
|
|
12148
12160
|
(function(C) {
|
|
12149
12161
|
C[C.Average = 0] = "Average", C[C.Min = 1] = "Min", C[C.Multiply = 2] = "Multiply", C[C.Max = 3] = "Max";
|
|
12150
|
-
})(
|
|
12162
|
+
})(PB || (PB = {}));
|
|
12151
12163
|
class $k {
|
|
12152
12164
|
constructor(A) {
|
|
12153
12165
|
this.raw = A || new Ai();
|
|
@@ -12170,23 +12182,23 @@ class AG {
|
|
|
12170
12182
|
(function(C) {
|
|
12171
12183
|
C[C.Vertex = 0] = "Vertex", C[C.Edge = 1] = "Edge", C[C.Face = 2] = "Face", C[C.Unknown = 3] = "Unknown";
|
|
12172
12184
|
})(vC || (vC = {}));
|
|
12173
|
-
class
|
|
12185
|
+
class eQ {
|
|
12174
12186
|
constructor(A, I, g, B) {
|
|
12175
12187
|
this.featureType = vC.Unknown, this.featureId = void 0, this.timeOfImpact = A, this.normal = I, B !== void 0 && (this.featureId = B), g !== void 0 && (this.featureType = g);
|
|
12176
12188
|
}
|
|
12177
12189
|
static fromRaw(A) {
|
|
12178
12190
|
if (!A) return null;
|
|
12179
|
-
const I = new
|
|
12191
|
+
const I = new eQ(A.time_of_impact(), Y.fromRaw(A.normal()), A.featureType(), A.featureId());
|
|
12180
12192
|
return A.free(), I;
|
|
12181
12193
|
}
|
|
12182
12194
|
}
|
|
12183
|
-
class
|
|
12195
|
+
class XB {
|
|
12184
12196
|
constructor(A, I, g, B, Q) {
|
|
12185
12197
|
this.featureType = vC.Unknown, this.featureId = void 0, this.collider = A, this.timeOfImpact = I, this.normal = g, Q !== void 0 && (this.featureId = Q), B !== void 0 && (this.featureType = B);
|
|
12186
12198
|
}
|
|
12187
12199
|
static fromRaw(A, I) {
|
|
12188
12200
|
if (!I) return null;
|
|
12189
|
-
const g = new
|
|
12201
|
+
const g = new XB(A.get(I.colliderHandle()), I.time_of_impact(), Y.fromRaw(I.normal()), I.featureType(), I.featureId());
|
|
12190
12202
|
return I.free(), g;
|
|
12191
12203
|
}
|
|
12192
12204
|
}
|
|
@@ -12200,23 +12212,23 @@ class Hi {
|
|
|
12200
12212
|
return I.free(), g;
|
|
12201
12213
|
}
|
|
12202
12214
|
}
|
|
12203
|
-
class
|
|
12215
|
+
class hQ {
|
|
12204
12216
|
constructor(A, I) {
|
|
12205
12217
|
this.point = A, this.isInside = I;
|
|
12206
12218
|
}
|
|
12207
12219
|
static fromRaw(A) {
|
|
12208
12220
|
if (!A) return null;
|
|
12209
|
-
const I = new
|
|
12221
|
+
const I = new hQ(Y.fromRaw(A.point()), A.isInside());
|
|
12210
12222
|
return A.free(), I;
|
|
12211
12223
|
}
|
|
12212
12224
|
}
|
|
12213
|
-
class
|
|
12225
|
+
class VB {
|
|
12214
12226
|
constructor(A, I, g, B, Q) {
|
|
12215
12227
|
this.featureType = vC.Unknown, this.featureId = void 0, this.collider = A, this.point = I, this.isInside = g, Q !== void 0 && (this.featureId = Q), B !== void 0 && (this.featureType = B);
|
|
12216
12228
|
}
|
|
12217
12229
|
static fromRaw(A, I) {
|
|
12218
12230
|
if (!I) return null;
|
|
12219
|
-
const g = new
|
|
12231
|
+
const g = new VB(A.get(I.colliderHandle()), Y.fromRaw(I.point()), I.isInside(), I.featureType(), I.featureId());
|
|
12220
12232
|
return I.free(), g;
|
|
12221
12233
|
}
|
|
12222
12234
|
}
|
|
@@ -12230,13 +12242,13 @@ class gB {
|
|
|
12230
12242
|
return I.free(), g;
|
|
12231
12243
|
}
|
|
12232
12244
|
}
|
|
12233
|
-
class
|
|
12245
|
+
class kQ extends gB {
|
|
12234
12246
|
constructor(A, I, g, B, Q, E) {
|
|
12235
12247
|
super(I, g, B, Q, E), this.collider = A;
|
|
12236
12248
|
}
|
|
12237
12249
|
static fromRaw(A, I) {
|
|
12238
12250
|
if (!I) return null;
|
|
12239
|
-
const g = new
|
|
12251
|
+
const g = new kQ(A.get(I.colliderHandle()), I.time_of_impact(), Y.fromRaw(I.witness1()), Y.fromRaw(I.witness2()), Y.fromRaw(I.normal1()), Y.fromRaw(I.normal2()));
|
|
12240
12252
|
return I.free(), g;
|
|
12241
12253
|
}
|
|
12242
12254
|
}
|
|
@@ -12252,23 +12264,23 @@ class IG {
|
|
|
12252
12264
|
return t.free(), S.free(), h;
|
|
12253
12265
|
}
|
|
12254
12266
|
castRayAndGetNormal(A, I, g, B, Q, E, i, o, D, a, s) {
|
|
12255
|
-
let t = Y.intoRaw(B.origin), S = Y.intoRaw(B.dir), h =
|
|
12267
|
+
let t = Y.intoRaw(B.origin), S = Y.intoRaw(B.dir), h = XB.fromRaw(g, this.raw.castRayAndGetNormal(A.raw, I.raw, g.raw, t, S, Q, E, i, o, D, a, s));
|
|
12256
12268
|
return t.free(), S.free(), h;
|
|
12257
12269
|
}
|
|
12258
12270
|
intersectionsWithRay(A, I, g, B, Q, E, i, o, D, a, s, t) {
|
|
12259
12271
|
let S = Y.intoRaw(B.origin), h = Y.intoRaw(B.dir);
|
|
12260
|
-
this.raw.intersectionsWithRay(A.raw, I.raw, g.raw, S, h, Q, E, ((y) => i(
|
|
12272
|
+
this.raw.intersectionsWithRay(A.raw, I.raw, g.raw, S, h, Q, E, ((y) => i(XB.fromRaw(g, y))), o, D, a, s, t), S.free(), h.free();
|
|
12261
12273
|
}
|
|
12262
12274
|
intersectionWithShape(A, I, g, B, Q, E, i, o, D, a, s) {
|
|
12263
|
-
let t = Y.intoRaw(B), S =
|
|
12275
|
+
let t = Y.intoRaw(B), S = SA.intoRaw(Q), h = E.intoRaw(), y = this.raw.intersectionWithShape(A.raw, I.raw, g.raw, t, S, h, i, o, D, a, s);
|
|
12264
12276
|
return t.free(), S.free(), h.free(), y;
|
|
12265
12277
|
}
|
|
12266
12278
|
projectPoint(A, I, g, B, Q, E, i, o, D, a) {
|
|
12267
|
-
let s = Y.intoRaw(B), t =
|
|
12279
|
+
let s = Y.intoRaw(B), t = VB.fromRaw(g, this.raw.projectPoint(A.raw, I.raw, g.raw, s, Q, E, i, o, D, a));
|
|
12268
12280
|
return s.free(), t;
|
|
12269
12281
|
}
|
|
12270
12282
|
projectPointAndGetFeature(A, I, g, B, Q, E, i, o, D) {
|
|
12271
|
-
let a = Y.intoRaw(B), s =
|
|
12283
|
+
let a = Y.intoRaw(B), s = VB.fromRaw(g, this.raw.projectPointAndGetFeature(A.raw, I.raw, g.raw, a, Q, E, i, o, D));
|
|
12272
12284
|
return a.free(), s;
|
|
12273
12285
|
}
|
|
12274
12286
|
intersectionsWithPoint(A, I, g, B, Q, E, i, o, D, a) {
|
|
@@ -12276,11 +12288,11 @@ class IG {
|
|
|
12276
12288
|
this.raw.intersectionsWithPoint(A.raw, I.raw, g.raw, s, Q, E, i, o, D, a), s.free();
|
|
12277
12289
|
}
|
|
12278
12290
|
castShape(A, I, g, B, Q, E, i, o, D, a, s, t, S, h, y) {
|
|
12279
|
-
let e = Y.intoRaw(B), G =
|
|
12291
|
+
let e = Y.intoRaw(B), G = SA.intoRaw(Q), k = Y.intoRaw(E), L = i.intoRaw(), K = kQ.fromRaw(g, this.raw.castShape(A.raw, I.raw, g.raw, e, G, k, L, o, D, a, s, t, S, h, y));
|
|
12280
12292
|
return e.free(), G.free(), k.free(), L.free(), K;
|
|
12281
12293
|
}
|
|
12282
12294
|
intersectionsWithShape(A, I, g, B, Q, E, i, o, D, a, s, t) {
|
|
12283
|
-
let S = Y.intoRaw(B), h =
|
|
12295
|
+
let S = Y.intoRaw(B), h = SA.intoRaw(Q), y = E.intoRaw();
|
|
12284
12296
|
this.raw.intersectionsWithShape(A.raw, I.raw, g.raw, S, h, y, i, o, D, a, s, t), S.free(), h.free(), y.free();
|
|
12285
12297
|
}
|
|
12286
12298
|
collidersWithAabbIntersectingAabb(A, I, g, B, Q, E) {
|
|
@@ -12442,35 +12454,35 @@ class VA {
|
|
|
12442
12454
|
}
|
|
12443
12455
|
}
|
|
12444
12456
|
castShape(A, I, g, B, Q, E, i, o, D, a) {
|
|
12445
|
-
let s = Y.intoRaw(A), t =
|
|
12457
|
+
let s = Y.intoRaw(A), t = SA.intoRaw(I), S = Y.intoRaw(g), h = Y.intoRaw(Q), y = SA.intoRaw(E), e = Y.intoRaw(i), G = this.intoRaw(), k = B.intoRaw(), L = gB.fromRaw(null, G.castShape(s, t, S, k, h, y, e, o, D, a));
|
|
12446
12458
|
return s.free(), t.free(), S.free(), h.free(), y.free(), e.free(), G.free(), k.free(), L;
|
|
12447
12459
|
}
|
|
12448
12460
|
intersectsShape(A, I, g, B, Q) {
|
|
12449
|
-
let E = Y.intoRaw(A), i =
|
|
12461
|
+
let E = Y.intoRaw(A), i = SA.intoRaw(I), o = Y.intoRaw(B), D = SA.intoRaw(Q), a = this.intoRaw(), s = g.intoRaw(), t = a.intersectsShape(E, i, s, o, D);
|
|
12450
12462
|
return E.free(), i.free(), o.free(), D.free(), a.free(), s.free(), t;
|
|
12451
12463
|
}
|
|
12452
12464
|
contactShape(A, I, g, B, Q, E) {
|
|
12453
|
-
let i = Y.intoRaw(A), o =
|
|
12465
|
+
let i = Y.intoRaw(A), o = SA.intoRaw(I), D = Y.intoRaw(B), a = SA.intoRaw(Q), s = this.intoRaw(), t = g.intoRaw(), S = zC.fromRaw(s.contactShape(i, o, t, D, a, E));
|
|
12454
12466
|
return i.free(), o.free(), D.free(), a.free(), s.free(), t.free(), S;
|
|
12455
12467
|
}
|
|
12456
12468
|
containsPoint(A, I, g) {
|
|
12457
|
-
let B = Y.intoRaw(A), Q =
|
|
12469
|
+
let B = Y.intoRaw(A), Q = SA.intoRaw(I), E = Y.intoRaw(g), i = this.intoRaw(), o = i.containsPoint(B, Q, E);
|
|
12458
12470
|
return B.free(), Q.free(), E.free(), i.free(), o;
|
|
12459
12471
|
}
|
|
12460
12472
|
projectPoint(A, I, g, B) {
|
|
12461
|
-
let Q = Y.intoRaw(A), E =
|
|
12473
|
+
let Q = Y.intoRaw(A), E = SA.intoRaw(I), i = Y.intoRaw(g), o = this.intoRaw(), D = hQ.fromRaw(o.projectPoint(Q, E, i, B));
|
|
12462
12474
|
return Q.free(), E.free(), i.free(), o.free(), D;
|
|
12463
12475
|
}
|
|
12464
12476
|
intersectsRay(A, I, g, B) {
|
|
12465
|
-
let Q = Y.intoRaw(I), E =
|
|
12477
|
+
let Q = Y.intoRaw(I), E = SA.intoRaw(g), i = Y.intoRaw(A.origin), o = Y.intoRaw(A.dir), D = this.intoRaw(), a = D.intersectsRay(Q, E, i, o, B);
|
|
12466
12478
|
return Q.free(), E.free(), i.free(), o.free(), D.free(), a;
|
|
12467
12479
|
}
|
|
12468
12480
|
castRay(A, I, g, B, Q) {
|
|
12469
|
-
let E = Y.intoRaw(I), i =
|
|
12481
|
+
let E = Y.intoRaw(I), i = SA.intoRaw(g), o = Y.intoRaw(A.origin), D = Y.intoRaw(A.dir), a = this.intoRaw(), s = a.castRay(E, i, o, D, B, Q);
|
|
12470
12482
|
return E.free(), i.free(), o.free(), D.free(), a.free(), s;
|
|
12471
12483
|
}
|
|
12472
12484
|
castRayAndGetNormal(A, I, g, B, Q) {
|
|
12473
|
-
let E = Y.intoRaw(I), i =
|
|
12485
|
+
let E = Y.intoRaw(I), i = SA.intoRaw(g), o = Y.intoRaw(A.origin), D = Y.intoRaw(A.dir), a = this.intoRaw(), s = eQ.fromRaw(a.castRayAndGetNormal(E, i, o, D, B, Q));
|
|
12474
12486
|
return E.free(), i.free(), o.free(), D.free(), a.free(), s;
|
|
12475
12487
|
}
|
|
12476
12488
|
}
|
|
@@ -12656,7 +12668,7 @@ class es {
|
|
|
12656
12668
|
return a.free(), s;
|
|
12657
12669
|
}
|
|
12658
12670
|
deserializeAll(A) {
|
|
12659
|
-
return
|
|
12671
|
+
return GQ.fromRaw(this.raw.deserializeAll(A));
|
|
12660
12672
|
}
|
|
12661
12673
|
}
|
|
12662
12674
|
class EG {
|
|
@@ -12814,7 +12826,7 @@ class sG {
|
|
|
12814
12826
|
this.raw.apply_linear_correction(this.params.dt, this.bodies.raw, A.handle, B, Q), B.free(), Q.free();
|
|
12815
12827
|
}
|
|
12816
12828
|
applyAngularCorrection(A, I, g) {
|
|
12817
|
-
let B =
|
|
12829
|
+
let B = SA.intoRaw(I), Q = Y.intoRaw(g);
|
|
12818
12830
|
this.raw.apply_angular_correction(this.params.dt, this.bodies.raw, A.handle, B, Q), B.free(), Q.free();
|
|
12819
12831
|
}
|
|
12820
12832
|
linearCorrection(A, I, g) {
|
|
@@ -12822,7 +12834,7 @@ class sG {
|
|
|
12822
12834
|
return B.free(), Q.free(), Y.fromRaw(E);
|
|
12823
12835
|
}
|
|
12824
12836
|
angularCorrection(A, I, g) {
|
|
12825
|
-
let B =
|
|
12837
|
+
let B = SA.intoRaw(I), Q = Y.intoRaw(g), E = this.raw.angular_correction(this.params.dt, this.bodies.raw, A.handle, B, Q);
|
|
12826
12838
|
return B.free(), Q.free(), Y.fromRaw(E);
|
|
12827
12839
|
}
|
|
12828
12840
|
}
|
|
@@ -12985,7 +12997,7 @@ class aG {
|
|
|
12985
12997
|
return this.colliders.get(this.raw.wheel_ground_object(A));
|
|
12986
12998
|
}
|
|
12987
12999
|
}
|
|
12988
|
-
class
|
|
13000
|
+
class GQ {
|
|
12989
13001
|
constructor(A, I, g, B, Q, E, i, o, D, a, s, t, S) {
|
|
12990
13002
|
this.gravity = A, this.integrationParameters = new uk(I), this.islands = new AG(g), this.broadPhase = new IG(B), this.narrowPhase = new gG(Q), this.bodies = new Tk(E), this.colliders = new wG(i), this.impulseJoints = new Pk(o), this.multibodyJoints = new _k(D), this.ccdSolver = new $k(a), this.physicsPipeline = new QG(s), this.serializationPipeline = new es(t), this.debugRenderPipeline = new iG(S), this.characterControllers = /* @__PURE__ */ new Set(), this.pidControllers = /* @__PURE__ */ new Set(), this.vehicleControllers = /* @__PURE__ */ new Set(), this.impulseJoints.finalizeDeserialization(this.bodies), this.bodies.finalizeDeserialization(this.colliders), this.colliders.finalizeDeserialization(this.bodies);
|
|
12991
13003
|
}
|
|
@@ -12993,7 +13005,7 @@ class kQ {
|
|
|
12993
13005
|
this.integrationParameters.free(), this.islands.free(), this.broadPhase.free(), this.narrowPhase.free(), this.bodies.free(), this.colliders.free(), this.impulseJoints.free(), this.multibodyJoints.free(), this.ccdSolver.free(), this.physicsPipeline.free(), this.serializationPipeline.free(), this.debugRenderPipeline.free(), this.characterControllers.forEach(((A) => A.free())), this.pidControllers.forEach(((A) => A.free())), this.vehicleControllers.forEach(((A) => A.free())), this.integrationParameters = void 0, this.islands = void 0, this.broadPhase = void 0, this.narrowPhase = void 0, this.bodies = void 0, this.colliders = void 0, this.ccdSolver = void 0, this.impulseJoints = void 0, this.multibodyJoints = void 0, this.physicsPipeline = void 0, this.serializationPipeline = void 0, this.debugRenderPipeline = void 0, this.characterControllers = void 0, this.pidControllers = void 0, this.vehicleControllers = void 0;
|
|
12994
13006
|
}
|
|
12995
13007
|
static fromRaw(A) {
|
|
12996
|
-
return A ? new
|
|
13008
|
+
return A ? new GQ(Y.fromRaw(A.takeGravity()), A.takeIntegrationParameters(), A.takeIslandManager(), A.takeBroadPhase(), A.takeNarrowPhase(), A.takeBodies(), A.takeColliders(), A.takeImpulseJoints(), A.takeMultibodyJoints()) : null;
|
|
12997
13009
|
}
|
|
12998
13010
|
takeSnapshot() {
|
|
12999
13011
|
return this.serializationPipeline.serializeAll(this.gravity, this.integrationParameters, this.islands, this.broadPhase, this.narrowPhase, this.bodies, this.colliders, this.impulseJoints, this.multibodyJoints);
|
|
@@ -13243,10 +13255,10 @@ class hs {
|
|
|
13243
13255
|
return Y.fromRaw(this.colliderSet.raw.coTranslationWrtParent(this.handle));
|
|
13244
13256
|
}
|
|
13245
13257
|
rotation() {
|
|
13246
|
-
return
|
|
13258
|
+
return SA.fromRaw(this.colliderSet.raw.coRotation(this.handle));
|
|
13247
13259
|
}
|
|
13248
13260
|
rotationWrtParent() {
|
|
13249
|
-
return
|
|
13261
|
+
return SA.fromRaw(this.colliderSet.raw.coRotationWrtParent(this.handle));
|
|
13250
13262
|
}
|
|
13251
13263
|
isSensor() {
|
|
13252
13264
|
return this.colliderSet.raw.coIsSensor(this.handle);
|
|
@@ -13325,7 +13337,7 @@ class hs {
|
|
|
13325
13337
|
this.colliderSet.raw.coSetMass(this.handle, A);
|
|
13326
13338
|
}
|
|
13327
13339
|
setMassProperties(A, I, g, B) {
|
|
13328
|
-
let Q = Y.intoRaw(I), E = Y.intoRaw(g), i =
|
|
13340
|
+
let Q = Y.intoRaw(I), E = Y.intoRaw(g), i = SA.intoRaw(B);
|
|
13329
13341
|
this.colliderSet.raw.coSetMassProperties(this.handle, A, Q, E, i), Q.free(), E.free(), i.free();
|
|
13330
13342
|
}
|
|
13331
13343
|
setTranslation(A) {
|
|
@@ -13425,7 +13437,7 @@ class hs {
|
|
|
13425
13437
|
return I.free(), g;
|
|
13426
13438
|
}
|
|
13427
13439
|
projectPoint(A, I) {
|
|
13428
|
-
let g = Y.intoRaw(A), B =
|
|
13440
|
+
let g = Y.intoRaw(A), B = hQ.fromRaw(this.colliderSet.raw.coProjectPoint(this.handle, g, I));
|
|
13429
13441
|
return g.free(), B;
|
|
13430
13442
|
}
|
|
13431
13443
|
intersectsRay(A, I) {
|
|
@@ -13433,19 +13445,19 @@ class hs {
|
|
|
13433
13445
|
return g.free(), B.free(), Q;
|
|
13434
13446
|
}
|
|
13435
13447
|
castShape(A, I, g, B, Q, E, i, o) {
|
|
13436
|
-
let D = Y.intoRaw(A), a = Y.intoRaw(g), s =
|
|
13448
|
+
let D = Y.intoRaw(A), a = Y.intoRaw(g), s = SA.intoRaw(B), t = Y.intoRaw(Q), S = I.intoRaw(), h = gB.fromRaw(this.colliderSet, this.colliderSet.raw.coCastShape(this.handle, D, S, a, s, t, E, i, o));
|
|
13437
13449
|
return D.free(), a.free(), s.free(), t.free(), S.free(), h;
|
|
13438
13450
|
}
|
|
13439
13451
|
castCollider(A, I, g, B, Q, E) {
|
|
13440
|
-
let i = Y.intoRaw(A), o = Y.intoRaw(g), D =
|
|
13452
|
+
let i = Y.intoRaw(A), o = Y.intoRaw(g), D = kQ.fromRaw(this.colliderSet, this.colliderSet.raw.coCastCollider(this.handle, i, I.handle, o, B, Q, E));
|
|
13441
13453
|
return i.free(), o.free(), D;
|
|
13442
13454
|
}
|
|
13443
13455
|
intersectsShape(A, I, g) {
|
|
13444
|
-
let B = Y.intoRaw(I), Q =
|
|
13456
|
+
let B = Y.intoRaw(I), Q = SA.intoRaw(g), E = A.intoRaw(), i = this.colliderSet.raw.coIntersectsShape(this.handle, E, B, Q);
|
|
13445
13457
|
return B.free(), Q.free(), E.free(), i;
|
|
13446
13458
|
}
|
|
13447
13459
|
contactShape(A, I, g, B) {
|
|
13448
|
-
let Q = Y.intoRaw(I), E =
|
|
13460
|
+
let Q = Y.intoRaw(I), E = SA.intoRaw(g), i = A.intoRaw(), o = zC.fromRaw(this.colliderSet.raw.coContactShape(this.handle, i, Q, E, B));
|
|
13449
13461
|
return Q.free(), E.free(), i.free(), o;
|
|
13450
13462
|
}
|
|
13451
13463
|
contactCollider(A, I) {
|
|
@@ -13456,7 +13468,7 @@ class hs {
|
|
|
13456
13468
|
return B.free(), Q.free(), E;
|
|
13457
13469
|
}
|
|
13458
13470
|
castRayAndGetNormal(A, I, g) {
|
|
13459
|
-
let B = Y.intoRaw(A.origin), Q = Y.intoRaw(A.dir), E =
|
|
13471
|
+
let B = Y.intoRaw(A.origin), Q = Y.intoRaw(A.dir), E = eQ.fromRaw(this.colliderSet.raw.coCastRayAndGetNormal(this.handle, B, Q, I, g));
|
|
13460
13472
|
return B.free(), Q.free(), E;
|
|
13461
13473
|
}
|
|
13462
13474
|
}
|
|
@@ -13465,7 +13477,7 @@ class hs {
|
|
|
13465
13477
|
})(zg || (zg = {}));
|
|
13466
13478
|
class nA {
|
|
13467
13479
|
constructor(A) {
|
|
13468
|
-
this.enabled = !0, this.shape = A, this.massPropsMode = zg.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation =
|
|
13480
|
+
this.enabled = !0, this.shape = A, this.massPropsMode = zg.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation = SA.identity(), this.translation = Y.zeros(), this.isSensor = !1, this.collisionGroups = 4294967295, this.solverGroups = 4294967295, this.frictionCombineRule = PB.Average, this.restitutionCombineRule = PB.Average, this.activeCollisionTypes = Bi.DEFAULT, this.activeEvents = gi.NONE, this.activeHooks = Ci.NONE, this.mass = 0, this.centerOfMass = Y.zeros(), this.contactForceEventThreshold = 0, this.contactSkin = 0, this.principalAngularInertia = Y.zeros(), this.angularInertiaLocalFrame = SA.identity();
|
|
13469
13481
|
}
|
|
13470
13482
|
static ball(A) {
|
|
13471
13483
|
const I = new fi(A);
|
|
@@ -13548,7 +13560,7 @@ class nA {
|
|
|
13548
13560
|
return this.translation = { x: A, y: I, z: g }, this;
|
|
13549
13561
|
}
|
|
13550
13562
|
setRotation(A) {
|
|
13551
|
-
return
|
|
13563
|
+
return SA.copy(this.rotation, A), this;
|
|
13552
13564
|
}
|
|
13553
13565
|
setSensor(A) {
|
|
13554
13566
|
return this.isSensor = A, this;
|
|
@@ -13566,7 +13578,7 @@ class nA {
|
|
|
13566
13578
|
return this.massPropsMode = zg.Mass, this.mass = A, this;
|
|
13567
13579
|
}
|
|
13568
13580
|
setMassProperties(A, I, g, B) {
|
|
13569
|
-
return this.massPropsMode = zg.MassProps, this.mass = A, Y.copy(this.centerOfMass, I), Y.copy(this.principalAngularInertia, g),
|
|
13581
|
+
return this.massPropsMode = zg.MassProps, this.mass = A, Y.copy(this.centerOfMass, I), Y.copy(this.principalAngularInertia, g), SA.copy(this.angularInertiaLocalFrame, B), this;
|
|
13570
13582
|
}
|
|
13571
13583
|
setRestitution(A) {
|
|
13572
13584
|
return this.restitution = A, this;
|
|
@@ -13601,7 +13613,7 @@ class nA {
|
|
|
13601
13613
|
}
|
|
13602
13614
|
class wG {
|
|
13603
13615
|
constructor(A) {
|
|
13604
|
-
this.raw = A || new pA(), this.map = new
|
|
13616
|
+
this.raw = A || new pA(), this.map = new SQ(), A && A.forEachColliderHandle(((I) => {
|
|
13605
13617
|
this.map.set(I, new hs(this, I, null));
|
|
13606
13618
|
}));
|
|
13607
13619
|
}
|
|
@@ -13617,7 +13629,7 @@ class wG {
|
|
|
13617
13629
|
createCollider(A, I, g) {
|
|
13618
13630
|
let B = g != null && g != null;
|
|
13619
13631
|
if (B && isNaN(g)) throw Error("Cannot create a collider with a parent rigid-body handle that is not a number.");
|
|
13620
|
-
let Q = I.shape.intoRaw(), E = Y.intoRaw(I.translation), i =
|
|
13632
|
+
let Q = I.shape.intoRaw(), E = Y.intoRaw(I.translation), i = SA.intoRaw(I.rotation), o = Y.intoRaw(I.centerOfMass), D = Y.intoRaw(I.principalAngularInertia), a = SA.intoRaw(I.angularInertiaLocalFrame), s = this.raw.createCollider(I.enabled, Q, E, i, I.massPropsMode, I.mass, o, D, a, I.density, I.friction, I.restitution, I.frictionCombineRule, I.restitutionCombineRule, I.isSensor, I.collisionGroups, I.solverGroups, I.activeCollisionTypes, I.activeHooks, I.activeEvents, I.contactForceEventThreshold, I.contactSkin, B, B ? g : 0, A.raw);
|
|
13621
13633
|
Q.free(), E.free(), i.free(), o.free(), D.free(), a.free();
|
|
13622
13634
|
let t = B ? A.get(g) : null, S = new hs(this, s, t, I.shape);
|
|
13623
13635
|
return this.map.set(s, S), S;
|
|
@@ -13681,7 +13693,7 @@ for (var SG = { byteLength: function(C) {
|
|
|
13681
13693
|
}, fromByteArray: function(C) {
|
|
13682
13694
|
for (var A, I = C.length, g = I % 3, B = [], Q = 16383, E = 0, i = I - g; E < i; E += Q) B.push(kG(C, E, E + Q > i ? i : E + Q));
|
|
13683
13695
|
return g === 1 ? (A = C[I - 1], B.push(xI[A >> 2] + xI[A << 4 & 63] + "==")) : g === 2 && (A = (C[I - 2] << 8) + C[I - 1], B.push(xI[A >> 10] + xI[A >> 4 & 63] + xI[A << 2 & 63] + "=")), B.join("");
|
|
13684
|
-
} }, xI = [], NI = [], eG = typeof Uint8Array < "u" ? Uint8Array : Array,
|
|
13696
|
+
} }, xI = [], NI = [], eG = typeof Uint8Array < "u" ? Uint8Array : Array, aE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Wg = 0, hG = aE.length; Wg < hG; ++Wg) xI[Wg] = aE[Wg], NI[aE.charCodeAt(Wg)] = Wg;
|
|
13685
13697
|
function ks(C) {
|
|
13686
13698
|
var A = C.length;
|
|
13687
13699
|
if (A % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -13718,7 +13730,7 @@ function yG(C) {
|
|
|
13718
13730
|
const IA = gA.scene;
|
|
13719
13731
|
IA.traverse((z) => {
|
|
13720
13732
|
z.isMesh && O(z, { mass: 0, friction: 0 });
|
|
13721
|
-
}), IA.visible = !1, g(
|
|
13733
|
+
}), IA.visible = !1, g(hA).add(IA), L = IA;
|
|
13722
13734
|
},
|
|
13723
13735
|
() => {
|
|
13724
13736
|
},
|
|
@@ -13787,9 +13799,9 @@ function yG(C) {
|
|
|
13787
13799
|
);
|
|
13788
13800
|
function V() {
|
|
13789
13801
|
return E || (E = new Promise(async (m) => {
|
|
13790
|
-
await GG(), Q = new
|
|
13791
|
-
const H = g(
|
|
13792
|
-
a = new j(), H
|
|
13802
|
+
await GG(), Q = new GQ(new R(0, -9.81, 0));
|
|
13803
|
+
const H = g(hA);
|
|
13804
|
+
a = new j(), H?.add(a), H || (E = null), H?.add(a), m(!0);
|
|
13793
13805
|
}));
|
|
13794
13806
|
}
|
|
13795
13807
|
function QA(m) {
|
|
@@ -13909,8 +13921,8 @@ function yG(C) {
|
|
|
13909
13921
|
function Gs(C) {
|
|
13910
13922
|
let A = !1;
|
|
13911
13923
|
const I = (u, b, W) => C.on(u, b, W), g = (u, ...b) => C.fire(u, ...b), B = g(x), Q = g(bC);
|
|
13912
|
-
I(
|
|
13913
|
-
const E = g(
|
|
13924
|
+
I(YQ, () => B.viewMode === 1 || Q.viewMode === 1), I(sB, () => B.viewMode === 3 || Q.viewMode === 3), I(uA, () => g(YQ) || g(sB)), !Q.player && g(uA) && console.warn("missing player data in meta"), g(uA) && Fk(C), yG(C), g(uA) && g(Ha, Q.collisionUrl);
|
|
13925
|
+
const E = g(hA), i = g(KA), o = g($A);
|
|
13914
13926
|
let D = !1, a = !1, s, t = null, S = new ti(), h = null, y = null, e = null, G = !1, k = null;
|
|
13915
13927
|
const L = 0.1, K = 3, U = new R();
|
|
13916
13928
|
let J = 0;
|
|
@@ -13938,7 +13950,7 @@ function Gs(C) {
|
|
|
13938
13950
|
moveIntensity: 0
|
|
13939
13951
|
// 摇杆移动力度(0~1,0=无移动,1=最大速度)
|
|
13940
13952
|
};
|
|
13941
|
-
U.copy(n.position), g(uA) && g(OE, n.position.clone().setY(0)), I(
|
|
13953
|
+
U.copy(n.position), g(uA) && g(OE, n.position.clone().setY(0)), I(CQ, () => s), I(qa, (u, b, W, Z, j) => {
|
|
13942
13954
|
g(uA) && (c(), y && (clearTimeout(y), y = null), n.moveAngle = null, n.moveIntensity = 0, n.key[0] = u ? -1 : b ? 1 : 0, n.key[1] = Z ? 1 : W ? -1 : 0, n.key[2] = j ? 1 : 0, y = setTimeout(() => n.key = [0, 0, 0], 500));
|
|
13943
13955
|
}), I(pa, (u = 0, b = 1) => {
|
|
13944
13956
|
if (!g(uA)) return;
|
|
@@ -13971,7 +13983,7 @@ function Gs(C) {
|
|
|
13971
13983
|
ug,
|
|
13972
13984
|
() => {
|
|
13973
13985
|
if (!A) {
|
|
13974
|
-
if (g(
|
|
13986
|
+
if (g(YQ))
|
|
13975
13987
|
i.maxDistance = i.minDistance, s?.visible && (s.visible = !1);
|
|
13976
13988
|
else if (g(sB))
|
|
13977
13989
|
i.maxDistance = 20;
|
|
@@ -13998,7 +14010,7 @@ function Gs(C) {
|
|
|
13998
14010
|
Z.scale.set(f, f, f), Z.rotation.set(0, 0, 0), Z.rotateX(cI.degToRad(T[0])), Z.rotateY(cI.degToRad(T[1])), Z.rotateZ(cI.degToRad(T[2])), s.add(Z), Z.traverse((z) => {
|
|
13999
14011
|
if (z.isMesh) {
|
|
14000
14012
|
const BA = z;
|
|
14001
|
-
BA.castShadow = !0, BA.receiveShadow = !0, BA.material instanceof
|
|
14013
|
+
BA.castShadow = !0, BA.receiveShadow = !0, BA.material instanceof zB && (BA.material.metalness = 0.5, BA.material.roughness = 0.2, BA.material.color.set(1, 1, 1), BA.material.map && (BA.material.metalnessMap = BA.material.map), BA.material.transparent = !1, BA.material.depthWrite = !0, BA.material.depthTest = !0);
|
|
14002
14014
|
}
|
|
14003
14015
|
}), t = new yt(Z);
|
|
14004
14016
|
const j = W.animations;
|
|
@@ -14075,7 +14087,7 @@ function Gs(C) {
|
|
|
14075
14087
|
}
|
|
14076
14088
|
class YG {
|
|
14077
14089
|
constructor(A = {}) {
|
|
14078
|
-
this.disposed = !1, this.needUpdate = !0, console.info("Reall3dViewer",
|
|
14090
|
+
this.disposed = !1, this.needUpdate = !0, console.info("Reall3dViewer", QQ), this.init(wD(A)), !A.disableDropLocalFile && this.enableDropLocalFile();
|
|
14079
14091
|
}
|
|
14080
14092
|
init(A) {
|
|
14081
14093
|
const I = this;
|
|
@@ -14084,10 +14096,10 @@ class YG {
|
|
|
14084
14096
|
B.background = new dI(A.background), Ch(A);
|
|
14085
14097
|
const Q = A.controls = new Uh(A);
|
|
14086
14098
|
Q.updateByOptions(A);
|
|
14087
|
-
const E = Q.object, i = new
|
|
14099
|
+
const E = Q.object, i = new BQ();
|
|
14088
14100
|
A.viewerEvents = i, I.events = i;
|
|
14089
14101
|
const o = (h, y, e) => i.on(h, y, e), D = (h, ...y) => i.fire(h, ...y);
|
|
14090
|
-
o(Ga, () => I.metaMatrix), o(x, () => A), o(wC, () => g.domElement), o(EC, () => g), o(
|
|
14102
|
+
o(Ga, () => I.metaMatrix), o(x, () => A), o(wC, () => g.domElement), o(EC, () => g), o(hA, () => B), o(KA, () => Q), o($A, () => E), o(aI, () => A.bigSceneMode), o(Ft, (h) => A.pointcloudMode = h);
|
|
14091
14103
|
const a = [];
|
|
14092
14104
|
o(AI, () => {
|
|
14093
14105
|
for (I.needUpdate = !0; a.length; ) a.pop().stop = !0;
|
|
@@ -14102,13 +14114,13 @@ class YG {
|
|
|
14102
14114
|
);
|
|
14103
14115
|
}), ni(i), Ah(i), Fi(i), ek(i), aw(i), Sk(i), sw(i), hk(i), Sw(i);
|
|
14104
14116
|
const s = new ZI(Bh(A));
|
|
14105
|
-
I.splatMesh = s, o(eI, () => s), B.add(s),
|
|
14117
|
+
I.splatMesh = s, o(eI, () => s), B.add(s), oh(i), o(FQ, (h) => {
|
|
14106
14118
|
A.qualityLevel = h, s.options({ qualityLevel: h, renderer: void 0, scene: void 0 });
|
|
14107
|
-
}), o(
|
|
14119
|
+
}), o(RQ, (h) => {
|
|
14108
14120
|
A.sortType = h, s.options({ sortType: h, renderer: void 0, scene: void 0 });
|
|
14109
14121
|
}), B.add(new ds("#ffffff", 2)), g.setAnimationLoop(I.update.bind(I)), o(Eo, () => {
|
|
14110
14122
|
Q.update(), !I.needUpdate && D(ei) && D(AI);
|
|
14111
|
-
}), o(AC, () => D(
|
|
14123
|
+
}), o(AC, () => D(AQ), !0), o(AC, () => D(Eo), !0);
|
|
14112
14124
|
let t = performance.now();
|
|
14113
14125
|
o(
|
|
14114
14126
|
ug,
|
|
@@ -14116,13 +14128,13 @@ class YG {
|
|
|
14116
14128
|
try {
|
|
14117
14129
|
const h = performance.now();
|
|
14118
14130
|
if (!I.needUpdate || h - t < (qA ? 25 : A.qualityLevel > 5 ? 1 : 18)) return;
|
|
14119
|
-
I.needUpdate = !1, t = h, g.render(B, E), D(yI) && D(
|
|
14131
|
+
I.needUpdate = !1, t = h, g.render(B, E), D(yI) && D(_B);
|
|
14120
14132
|
} catch (h) {
|
|
14121
14133
|
console.warn(h.message);
|
|
14122
14134
|
}
|
|
14123
14135
|
},
|
|
14124
14136
|
!0
|
|
14125
|
-
), o(
|
|
14137
|
+
), o($B, () => I.dispose()), o(aa, () => console.info(JSON.stringify(D(eI).meta || {}, null, 2)));
|
|
14126
14138
|
let S = "";
|
|
14127
14139
|
o(DB, (h = "") => {
|
|
14128
14140
|
S = h, I.splatMesh.fire(ci, S, !0);
|
|
@@ -14167,28 +14179,28 @@ class YG {
|
|
|
14167
14179
|
const A = this;
|
|
14168
14180
|
if (A.disposed) return;
|
|
14169
14181
|
const I = (g, ...B) => A.events.fire(g, ...B);
|
|
14170
|
-
I(AC), I(ug), I(
|
|
14182
|
+
I(AC), I(ug), I(TB);
|
|
14171
14183
|
}
|
|
14172
14184
|
// 开发调试用临时接口
|
|
14173
14185
|
fire(A, I, g) {
|
|
14174
14186
|
const B = this;
|
|
14175
|
-
if (A === 1 && B.splatMesh.fire(
|
|
14187
|
+
if (A === 1 && B.splatMesh.fire(ME, I), A === 2 && B.events.fire($C), A === 3 && B.events.fire(XI, !0), A === 4 && B.events.fire(AB), A === 5 && B.events.fire(iC), A === 6 && B.events.fire(NB), A === 7 && B.events.fire(ia), A === 8 && (async () => {
|
|
14176
14188
|
let Q = await B.splatMesh.fire(Mi);
|
|
14177
14189
|
I && (Q = B.splatMesh.fire(ea) + I), B.splatMesh.fire(OC, Q);
|
|
14178
14190
|
})(), A === 9)
|
|
14179
14191
|
if (!I)
|
|
14180
|
-
B.events.fire(
|
|
14192
|
+
B.events.fire(FQ, SI.Default5);
|
|
14181
14193
|
else {
|
|
14182
14194
|
const Q = B.events.fire(x).qualityLevel;
|
|
14183
|
-
B.events.fire(
|
|
14195
|
+
B.events.fire(FQ, Math.max(SI.L1, Math.min(Q + I, SI.L9)));
|
|
14184
14196
|
}
|
|
14185
14197
|
if (A === 10)
|
|
14186
14198
|
if (!I)
|
|
14187
|
-
B.events.fire(
|
|
14199
|
+
B.events.fire(RQ, DC.Default1);
|
|
14188
14200
|
else {
|
|
14189
14201
|
const Q = [1, 2010, 2011, 2012, 2112], E = B.events.fire(x).sortType;
|
|
14190
14202
|
let i = Q.indexOf(E) + I;
|
|
14191
|
-
i = Math.max(0, Math.min(i, Q.length - 1)), B.events.fire(
|
|
14203
|
+
i = Math.max(0, Math.min(i, Q.length - 1)), B.events.fire(RQ, Q[i]);
|
|
14192
14204
|
}
|
|
14193
14205
|
}
|
|
14194
14206
|
/**
|
|
@@ -14201,9 +14213,9 @@ class YG {
|
|
|
14201
14213
|
if (I.disposed) return {};
|
|
14202
14214
|
const g = (i, ...o) => I.events.fire(i, ...o);
|
|
14203
14215
|
let B;
|
|
14204
|
-
if (g(
|
|
14216
|
+
if (g(hA).traverse((i) => !B && i instanceof ZI && (B = i.options())), A) {
|
|
14205
14217
|
const i = g(x);
|
|
14206
|
-
A.autoRotate !== void 0 && (i.autoRotate = A.autoRotate, g(KA).autoRotate = A.autoRotate), A.pointcloudMode !== void 0 && g(
|
|
14218
|
+
A.autoRotate !== void 0 && (i.autoRotate = A.autoRotate, g(KA).autoRotate = A.autoRotate), A.pointcloudMode !== void 0 && g(uB, A.pointcloudMode), A.lightFactor !== void 0 && g(uC, A.lightFactor), A.maxRenderCountOfMobile && (i.maxRenderCountOfMobile = A.maxRenderCountOfMobile), A.maxRenderCountOfPc && (i.maxRenderCountOfPc = A.maxRenderCountOfPc), A.debugMode !== void 0 && (i.debugMode = A.debugMode), A.qualityLevel !== void 0 && (i.qualityLevel = A.qualityLevel) && this.splatMesh.options({ qualityLevel: A.qualityLevel }), A.sortType !== void 0 && (i.sortType = A.sortType) && this.splatMesh.options({ sortType: A.sortType }), A.markType !== void 0 && (i.markType = A.markType), A.markVisible !== void 0 && g(mC, A.markVisible), A.meterScale !== void 0 && (i.meterScale = A.meterScale), A.markMode !== void 0 && (i.markMode = A.markMode, !A.markMode && g(Gi), g(KA).autoRotate = g(x).autoRotate = !1), A.disableRightClickFocus !== void 0 && (i.disableRightClickFocus = A.disableRightClickFocus);
|
|
14207
14219
|
}
|
|
14208
14220
|
return g(KA).updateByOptions(A), g(LA, { scale: `1 : ${g(x).meterScale} m` }), Object.assign({ ...g(x) }, B);
|
|
14209
14221
|
}
|
|
@@ -14220,7 +14232,7 @@ class YG {
|
|
|
14220
14232
|
*/
|
|
14221
14233
|
switchDeiplayMode() {
|
|
14222
14234
|
const A = this;
|
|
14223
|
-
A.disposed || A.events.fire(
|
|
14235
|
+
A.disposed || A.events.fire(OB);
|
|
14224
14236
|
}
|
|
14225
14237
|
/**
|
|
14226
14238
|
* 添加大场景
|
|
@@ -14243,7 +14255,7 @@ class YG {
|
|
|
14243
14255
|
if (!Q.url) return console.error("missing model file url");
|
|
14244
14256
|
if (!Q.url.endsWith(".spx") && !Q.url.endsWith(".json")) return console.error("The format is unsupported in the large scene mode", Q.url);
|
|
14245
14257
|
const i = { root: B(x).root, ...Q, ...Q.cameraInfo || {} };
|
|
14246
|
-
i.bigSceneMode = Q.url.endsWith(".json") || !!Q.isLargeScene, i.enableEnvironment = Q.enableEnvironment === void 0 ? B(x).enableEnvironment : !!Q.enableEnvironment, i.enableEnvironment && !Q.qualityLevel && (i.qualityLevel = SI.L9), i.viewMode = Q.viewMode, I.reset({ ...i }), Q.player?.url && (Q.player.url = FI(Q.player.url, FI(A, location.href))), Q.player?.trigerRunMp3 && (Q.player.trigerRunMp3 = FI(Q.player.trigerRunMp3, FI(A, location.href))), Q.collisionUrl && (Q.collisionUrl = FI(Q.collisionUrl, FI(A, location.href))), g(bC, () => Q), Gs(I.events), I.metaMatrix = Q.transform ? new EI().fromArray(Q.transform) : null, I.splatMesh.meta = Q, qA && (Q.cameraInfo?.position || Q.cameraInfo?.lookAt) && I.events.fire(KA)._dollyOut(0.7), i.bigSceneMode ? (B(
|
|
14258
|
+
i.bigSceneMode = Q.url.endsWith(".json") || !!Q.isLargeScene, i.enableEnvironment = Q.enableEnvironment === void 0 ? B(x).enableEnvironment : !!Q.enableEnvironment, i.enableEnvironment && !Q.qualityLevel && (i.qualityLevel = SI.L9), i.viewMode = Q.viewMode, I.reset({ ...i }), Q.player?.url && (Q.player.url = FI(Q.player.url, FI(A, location.href))), Q.player?.trigerRunMp3 && (Q.player.trigerRunMp3 = FI(Q.player.trigerRunMp3, FI(A, location.href))), Q.collisionUrl && (Q.collisionUrl = FI(Q.collisionUrl, FI(A, location.href))), g(bC, () => Q), Gs(I.events), I.metaMatrix = Q.transform ? new EI().fromArray(Q.transform) : null, I.splatMesh.meta = Q, qA && (Q.cameraInfo?.position || Q.cameraInfo?.lookAt) && I.events.fire(KA)._dollyOut(0.7), i.bigSceneMode ? (B(IQ, Q.flyPositions || []), B(gQ, Q.flyTargets || []), B(Ji, Q.flyDuration)) : B(nE, Q), I.splatMesh.addModel({ url: Q.url, baseUrl: FI(A, location.href) }, Q), await B(DB, Q.watermark || Q.name), B(KA).updateRotateAxis(), (qA && Q.mobileEnableJoystick || !qA && Q.pcEnableJoystick) && B(fE);
|
|
14247
14259
|
}
|
|
14248
14260
|
/**
|
|
14249
14261
|
* 添加要渲染的高斯模型(小场景模式)
|
|
@@ -14294,7 +14306,7 @@ class YG {
|
|
|
14294
14306
|
}, g = (a = !0) => {
|
|
14295
14307
|
setTimeout(() => window.focus()), a = !!a;
|
|
14296
14308
|
const s = A(x);
|
|
14297
|
-
s.pointcloudMode !== a && (s.bigSceneMode ? A(
|
|
14309
|
+
s.pointcloudMode !== a && (s.bigSceneMode ? A(uB, a) : A(OB));
|
|
14298
14310
|
}, B = (a = !0) => {
|
|
14299
14311
|
setTimeout(() => window.focus()), A(mC, !!a);
|
|
14300
14312
|
}, Q = (a) => {
|
|
@@ -14313,7 +14325,7 @@ class YG {
|
|
|
14313
14325
|
return !1;
|
|
14314
14326
|
return s.markMode = !0, A(QI), !0;
|
|
14315
14327
|
}, E = async (a) => (setTimeout(() => window.focus()), a ? (A(pC, a)?.dispose(), A(AI), await A(NB)) : !1), i = async (a, s = !0) => (A(Ea, a, s), A(pC, a?.name)?.drawUpdate?.(a, s), A(AI), s ? (setTimeout(() => window.focus()), await A(NB)) : !0), o = (a = !0) => {
|
|
14316
|
-
setTimeout(() => window.focus()), A(
|
|
14328
|
+
setTimeout(() => window.focus()), A(ME, !!a);
|
|
14317
14329
|
}, D = (a, s = !0) => {
|
|
14318
14330
|
A(DB, a), s && A(oa, a);
|
|
14319
14331
|
};
|
|
@@ -14327,18 +14339,18 @@ class YG {
|
|
|
14327
14339
|
if (A.disposed) return;
|
|
14328
14340
|
A.disposed = !0;
|
|
14329
14341
|
const I = (Q, ...E) => A.events.fire(Q, ...E), g = I(EC), B = g.domElement;
|
|
14330
|
-
I(Ig), I(Si), I(Vs), I(KA).dispose(), I(hg, I(
|
|
14342
|
+
I(Ig), I(Si), I(Vs), I(KA).dispose(), I(hg, I(hA)), g.clear(), g.dispose(), B.parentElement.removeChild(B), A.splatMesh = null, A.events.clear(), A.events = null;
|
|
14331
14343
|
}
|
|
14332
14344
|
}
|
|
14333
14345
|
function KG(C) {
|
|
14334
14346
|
const A = (E, i, o) => C.on(E, i, o), I = (E, ...i) => C.fire(E, ...i), g = qA ? 2 : 20, B = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map();
|
|
14335
|
-
A(qB, () => I(yI) && B.set(Date.now(), 1)), A(pB, () => I(yI) && I($g, B)), A(
|
|
14347
|
+
A(qB, () => I(yI) && B.set(Date.now(), 1)), A(pB, () => I(yI) && I($g, B)), A(_B, () => I(yI) && Q.set(Date.now(), 1)), A(LB, () => I(yI) && I($g, Q)), A($g, (E) => {
|
|
14336
14348
|
let i = [], o = Date.now(), D = 0;
|
|
14337
14349
|
for (const a of E.keys())
|
|
14338
14350
|
o - a <= 1e3 ? D++ : i.push(a);
|
|
14339
14351
|
return i.forEach((a) => E.delete(a)), Math.min(D, 60);
|
|
14340
14352
|
}), A(PA, () => {
|
|
14341
|
-
const E = I(
|
|
14353
|
+
const E = I(hA), i = I($A), o = [];
|
|
14342
14354
|
E?.traverse(function(D) {
|
|
14343
14355
|
D.isWarpSplatMesh && D.splatMesh?.visible && o.push(D);
|
|
14344
14356
|
}), o.sort((D, a) => i.position.distanceTo(D.position) - i.position.distanceTo(a.position));
|
|
@@ -14346,14 +14358,14 @@ function KG(C) {
|
|
|
14346
14358
|
o[D].splatMesh.boundBox.visible = D < 1;
|
|
14347
14359
|
return window.splat = o[0]?.splatMesh, o[0]?.splatMesh;
|
|
14348
14360
|
}), A(Ra, () => {
|
|
14349
|
-
const E = I(
|
|
14361
|
+
const E = I(hA), i = I($A), o = [];
|
|
14350
14362
|
E?.traverse(function(D) {
|
|
14351
14363
|
D.isWarpSplatMesh && o.push(D);
|
|
14352
14364
|
}), o.sort((D, a) => i.position.distanceTo(D.position) - i.position.distanceTo(a.position));
|
|
14353
14365
|
for (let D = 0; D < o.length; D++)
|
|
14354
14366
|
o[D].active = D < g, o[D].splatMesh && (o[D].splatMesh.renderOrder = 1e3 - D);
|
|
14355
14367
|
}), A(Ya, () => {
|
|
14356
|
-
const E = I(
|
|
14368
|
+
const E = I(hA), i = [];
|
|
14357
14369
|
E?.traverse((o) => i.push(o)), i.forEach((o) => {
|
|
14358
14370
|
o.dispose ? o.dispose() : (o.geometry?.dispose?.(), o.material && o.material instanceof Array ? o.material.forEach((D) => D?.dispose?.()) : o.material?.dispose?.());
|
|
14359
14371
|
}), E?.clear();
|
|
@@ -14401,9 +14413,9 @@ function KG(C) {
|
|
|
14401
14413
|
return i.setSize(E.clientWidth, E.clientHeight), i.setPixelRatio(1), A(EC, () => i), A(wC, () => i.domElement), i;
|
|
14402
14414
|
}), A(na, () => {
|
|
14403
14415
|
const E = I(x), i = new Ls(), o = E.background || "#dbf0ff";
|
|
14404
|
-
return i.background = new dI(o), i.fog = new Pi(o, 0), A(
|
|
14416
|
+
return i.background = new dI(o), i.fog = new Pi(o, 0), A(hA, () => i), i;
|
|
14405
14417
|
}), A(ra, () => {
|
|
14406
|
-
const i = I($A), o = I(
|
|
14418
|
+
const i = I($A), o = I(hA), D = I(x), a = new Jh(I($A), D.root);
|
|
14407
14419
|
a.screenSpacePanning = !1, a.minDistance = 0.1, a.maxDistance = 6e4, a.maxPolarAngle = 1.2, a.enableDamping = !0, a.dampingFactor = 0.07, a.zoomToCursor = !0;
|
|
14408
14420
|
const s = new R().fromArray(D.minPan || [-2e4, 0.1, -6e4]), t = new R().fromArray(D.maxPan || [5e4, 1e4, 0]), S = new R();
|
|
14409
14421
|
return a.addEventListener("change", () => {
|
|
@@ -14413,7 +14425,7 @@ function KG(C) {
|
|
|
14413
14425
|
}), A(Fa, () => {
|
|
14414
14426
|
const E = new ls(16777215, 1);
|
|
14415
14427
|
return E.position.set(0, 2e3, 1e3), E;
|
|
14416
|
-
}), window.addEventListener("beforeunload", () => I(
|
|
14428
|
+
}), window.addEventListener("beforeunload", () => I($B));
|
|
14417
14429
|
}
|
|
14418
14430
|
function cG(C) {
|
|
14419
14431
|
let { root: A = "#map", debugMode: I } = C;
|
|
@@ -14433,7 +14445,7 @@ class UG {
|
|
|
14433
14445
|
function JG(C) {
|
|
14434
14446
|
const A = (J, r, F) => C.on(J, r, F), I = (J, ...r) => C.fire(J, ...r), g = I(wC);
|
|
14435
14447
|
let B = /* @__PURE__ */ new Set(), Q, E = new UG();
|
|
14436
|
-
A(
|
|
14448
|
+
A(AQ, () => {
|
|
14437
14449
|
if (!B.size) return;
|
|
14438
14450
|
const J = I(x);
|
|
14439
14451
|
if (!J.enableKeyboard) return B.clear();
|
|
@@ -14508,7 +14520,7 @@ function JG(C) {
|
|
|
14508
14520
|
};
|
|
14509
14521
|
let t, S, h, y;
|
|
14510
14522
|
A(UC, () => {
|
|
14511
|
-
t?.dispose(), S?.dispose(), h?.dispose(), y?.dispose(), t = null, S = null, h = null, y = null, E.lastMovePoint = null, I(
|
|
14523
|
+
t?.dispose(), S?.dispose(), h?.dispose(), y?.dispose(), t = null, S = null, h = null, y = null, E.lastMovePoint = null, I(lg);
|
|
14512
14524
|
});
|
|
14513
14525
|
const e = async (J) => {
|
|
14514
14526
|
parent && setTimeout(() => window.focus()), J.preventDefault(), !Q && (E.down = J.button === 2 ? 2 : 1, E.move = !1, E.isDbClick = Date.now() - E.downTime < 300, E.downTime = Date.now());
|
|
@@ -14532,7 +14544,7 @@ function JG(C) {
|
|
|
14532
14544
|
Q = !0, window.removeEventListener("keydown", i), window.removeEventListener("keyup", o), window.removeEventListener("blur", D), window.removeEventListener("wheel", a), g.removeEventListener("contextmenu", s), g.removeEventListener("mousedown", e), g.removeEventListener("mousemove", G), g.removeEventListener("mouseup", k), g.removeEventListener("touchstart", L), g.removeEventListener("touchmove", K), g.removeEventListener("touchend", U);
|
|
14533
14545
|
},
|
|
14534
14546
|
!0
|
|
14535
|
-
), A(Pg, async (J, r) => await I(
|
|
14547
|
+
), A(Pg, async (J, r) => await I(HB, J, r));
|
|
14536
14548
|
}
|
|
14537
14549
|
var CC = Object.freeze({
|
|
14538
14550
|
Linear: Object.freeze({
|
|
@@ -15001,21 +15013,21 @@ class rG extends mA {
|
|
|
15001
15013
|
*/
|
|
15002
15014
|
dispose() {
|
|
15003
15015
|
const A = this;
|
|
15004
|
-
A.disposed || (A.disposed = !0, A.
|
|
15016
|
+
A.disposed || (A.disposed = !0, A.css3dTag.removeFromParent(), A.splatMesh?.dispose(), A.meta = null, A.splatMesh = null, A.opts = null, A.css3dTag = null, A.mapViewer = null, A.metaMatrix = null);
|
|
15005
15017
|
}
|
|
15006
15018
|
}
|
|
15007
15019
|
class qG extends Kt {
|
|
15008
15020
|
constructor(A = {}) {
|
|
15009
|
-
console.info("Reall3dMapViewer",
|
|
15010
|
-
const I = this, g = new
|
|
15021
|
+
console.info("Reall3dMapViewer", QQ), super(), this.clock = new ti(), this.updateTime = 0, this.disposed = !1;
|
|
15022
|
+
const I = this, g = new BQ();
|
|
15011
15023
|
I.events = g;
|
|
15012
15024
|
const B = (i, o, D) => g.on(i, o, D), Q = (i, ...o) => g.fire(i, ...o);
|
|
15013
15025
|
I.tileMap = MG();
|
|
15014
15026
|
const E = cG(A);
|
|
15015
|
-
B(x, () => E), ni(g), Fi(g), KG(g), sw(g), Sw(g), I.camera = new ai(60, 1, 0.01, 100), B($A, () => I.camera), I.container = E.root, I.renderer = Q(Na), I.scene = Q(na), I.controls = Q(ra), I.ambLight = new ds(16777215, 1), I.scene.add(I.ambLight), I.dirLight = Q(Fa), I.scene.add(I.dirLight), I.scene.add(I.tileMap), I.container.appendChild(I.renderer.domElement), aw(g), JG(g), window.addEventListener("resize", I.resize.bind(I)), I.resize(), I.renderer.setAnimationLoop(I.animate.bind(I)), qA && I.controls._dollyOut?.(0.7), B(
|
|
15027
|
+
B(x, () => E), ni(g), Fi(g), KG(g), sw(g), Sw(g), I.camera = new ai(60, 1, 0.01, 100), B($A, () => I.camera), I.container = E.root, I.renderer = Q(Na), I.scene = Q(na), I.controls = Q(ra), I.ambLight = new ds(16777215, 1), I.scene.add(I.ambLight), I.dirLight = Q(Fa), I.scene.add(I.dirLight), I.scene.add(I.tileMap), I.container.appendChild(I.renderer.domElement), aw(g), JG(g), window.addEventListener("resize", I.resize.bind(I)), I.resize(), I.renderer.setAnimationLoop(I.animate.bind(I)), qA && I.controls._dollyOut?.(0.7), B($B, () => I.dispose()), B(
|
|
15016
15028
|
AC,
|
|
15017
15029
|
() => {
|
|
15018
|
-
Q(
|
|
15030
|
+
Q(_B), I.controls.update(), Q(Ra), Q(AQ);
|
|
15019
15031
|
},
|
|
15020
15032
|
!0
|
|
15021
15033
|
), B(
|
|
@@ -15030,7 +15042,7 @@ class qG extends Kt {
|
|
|
15030
15042
|
},
|
|
15031
15043
|
!0
|
|
15032
15044
|
), B(
|
|
15033
|
-
|
|
15045
|
+
TB,
|
|
15034
15046
|
() => {
|
|
15035
15047
|
I.dispatchEvent({ type: "update", delta: I.clock.getDelta() }), I.updateTime = Date.now(), Q(yI) && Q(LA, {
|
|
15036
15048
|
fps: Q(pB),
|
|
@@ -15052,7 +15064,7 @@ class qG extends Kt {
|
|
|
15052
15064
|
const I = (Q, E, i) => this.events.on(Q, E, i), g = (Q, ...E) => this.events.fire(Q, ...E), B = this;
|
|
15053
15065
|
fetch(A, { mode: "cors", credentials: "omit", cache: "reload" }).then((Q) => Q.ok ? Q.json() : {}).then((Q) => {
|
|
15054
15066
|
const E = new R().fromArray(Q.position || [17e3, 3e4, -35e3]), i = new R().fromArray(Q.lookAt || [17e3, 0, -35e3]);
|
|
15055
|
-
B.controls.object.position.copy(E), B.controls.target.copy(i), B.dirLight.target.position.copy(i), I(bC, () => Q), g(
|
|
15067
|
+
B.controls.object.position.copy(E), B.controls.target.copy(i), B.dirLight.target.position.copy(i), I(bC, () => Q), g(IQ, Q.flyPositions || []), g(gQ, Q.flyTargets || []), g(Ji, Q.flyDuration);
|
|
15056
15068
|
const o = /* @__PURE__ */ new Set();
|
|
15057
15069
|
for (let D of Q.scenes)
|
|
15058
15070
|
o.has(D) || (new rG(D, B), o.add(D));
|
|
@@ -15075,7 +15087,7 @@ class qG extends Kt {
|
|
|
15075
15087
|
}
|
|
15076
15088
|
animate() {
|
|
15077
15089
|
const A = this, I = (g, ...B) => A.events.fire(g, ...B);
|
|
15078
|
-
I(qB), Date.now() - A.updateTime > 17 && (I(AC), I(ug), I(
|
|
15090
|
+
I(qB), Date.now() - A.updateTime > 17 && (I(AC), I(ug), I(TB));
|
|
15079
15091
|
}
|
|
15080
15092
|
/**
|
|
15081
15093
|
* 销毁
|