iflow-engine-base 3.10.7 → 3.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bim-engine-sdk.es.js +5 -5
- package/dist/bim-engine-sdk.umd.js +721 -721
- package/dist/chunks/{engine-2d-DsaDpJPQ.js → engine-2d-B8rWZz5y.js} +138 -113
- package/dist/chunks/{engine-3d-XJ7zBlLL.js → engine-3d-RuQU2JFm.js} +625 -590
- package/dist/chunks/{engine-720-CZj_sSsS.js → engine-720-QtnZH4Dk.js} +132 -113
- package/dist/chunks/{engine-gaussian-CX0k_s78.js → engine-gaussian-Bavllo9e.js} +617 -579
- package/dist/chunks/{engine-gis-N6XH8qUs.js → engine-gis-D4z6WKlH.js} +10645 -10542
- package/dist/chunks/{sdk-runtime-DTY-QKTD.js → sdk-runtime-CkKNeQgI.js} +1557 -1513
- package/dist/iflow-engine-base.css +1 -1
- package/dist/index.d.ts +38 -2
- package/dist2d/dwg-preview.es.js +1561 -1504
- package/dist2d/dwg-preview.umd.js +42 -42
- package/distGaussian/gaussian.es.js +9345 -6986
- package/distGaussian/gaussian.umd.js +23 -22
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as fm, G as xi, t as vl, O as sn, a as Qe, V as S, u as Mw, v as io, b as ft, Q as Kn, q as sv, R as yi, E as pm, w as rv, r as Lt, x as ov, y as Sw, M as ht, j as lt, I as St, f as qd, z as Kd, H as av, J as lv, K as Nh, U as ww, X as Cw, Y as Tw, Z as i0, _ as n0, $ as Ew, a0 as Aw, C as Or, i as mm, d as cv, a1 as hv, a2 as gm, D as Ri, a3 as Pw, a4 as uv, B as rn, a5 as Dw, a6 as Rw, m as _l, a7 as Iw, a8 as Lw, a9 as Ow, aa as
|
|
2
|
-
import { W as ti, C as nC,
|
|
1
|
+
import { n as fm, G as xi, t as vl, O as sn, a as Qe, V as S, u as Mw, v as io, b as ft, Q as Kn, q as sv, R as yi, E as pm, w as rv, r as Lt, x as ov, y as Sw, M as ht, j as lt, I as St, f as qd, z as Kd, H as av, J as lv, K as Nh, U as ww, X as Cw, Y as Tw, Z as i0, _ as n0, $ as Ew, a0 as Aw, C as Or, i as mm, d as cv, a1 as hv, a2 as gm, D as Ri, a3 as Pw, a4 as uv, B as rn, a5 as Dw, a6 as Rw, m as _l, a7 as Iw, a8 as Lw, a9 as Ow, aa as zs, ab as zh, ac as dv, ad as wt, h as Pi, ae as Fw, af as ga, W as fv, T as bl, ag as kw, ah as Uh, ai as Vh, L as Gs, o as Xl, aj as Bw, ak as pv, k as ap, al as Hh, am as Nw, an as ko, ao as zw, ap as Uw, aq as mv, ar as gv, as as xv, F as Gh, g as lp, at as Vw, au as s0, av as cp, aw as hp, s as Ml, ax as Hw, ay as Gw, az as r0, aA as Ww, aB as o0, aC as Xw, aD as jw, aE as Yw, aF as $w, c as qw, aG as Kw, aH as Zw, l as Jw, p as Qw, aI as eC, aJ as tC, aK as iC, aL as a0 } from "./three-vendor-CAbFcmaK.js";
|
|
2
|
+
import { W as ti, C as nC, b as Wh, B as l0, g as Pn, L as sC, r as rC } from "./sdk-runtime-CkKNeQgI.js";
|
|
3
3
|
import { r as Tt, g as oC } from "./sdk-assets-1SXx8Tbf.js";
|
|
4
|
-
import { J as up, L as aC, E as lC, S as cC } from "./engine-2d-
|
|
4
|
+
import { J as up, L as aC, E as lC, S as cC } from "./engine-2d-B8rWZz5y.js";
|
|
5
5
|
class hC {
|
|
6
6
|
engine;
|
|
7
7
|
scene;
|
|
@@ -286,7 +286,7 @@ class uC {
|
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
const Wu = "181", dC = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, fC = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, yv = 0, dp = 1, vv = 2, pC = 3, mC = 0, xm = 1, ym = 2, Hn = 3, ps = 0, Ii = 1, Gn = 2, $n = 0, Fr = 1, fp = 2, pp = 3, mp = 4, _v = 5, Bs = 100, bv = 101, Mv = 102, Sv = 103, wv = 104, Cv = 200, Tv = 201, Ev = 202, Av = 203, Xh = 204, jh = 205, Pv = 206, Dv = 207, Rv = 208, Iv = 209, Lv = 210, Ov = 211, Fv = 212, kv = 213, Bv = 214, Yh = 0, $h = 1, qh = 2,
|
|
289
|
+
const Wu = "181", dC = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, fC = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, yv = 0, dp = 1, vv = 2, pC = 3, mC = 0, xm = 1, ym = 2, Hn = 3, ps = 0, Ii = 1, Gn = 2, $n = 0, Fr = 1, fp = 2, pp = 3, mp = 4, _v = 5, Bs = 100, bv = 101, Mv = 102, Sv = 103, wv = 104, Cv = 200, Tv = 201, Ev = 202, Av = 203, Xh = 204, jh = 205, Pv = 206, Dv = 207, Rv = 208, Iv = 209, Lv = 210, Ov = 211, Fv = 212, kv = 213, Bv = 214, Yh = 0, $h = 1, qh = 2, Ur = 3, Kh = 4, Zh = 5, Jh = 6, Qh = 7, jl = 0, Nv = 1, zv = 2, ds = 0, Uv = 1, Vv = 2, Hv = 3, Gv = 4, Wv = 5, Xv = 6, vm = 7, gp = "attached", jv = "detached", Xu = 300, ms = 301, Ws = 302, Sl = 303, wl = 304, ia = 306, Cl = 1e3, Ui = 1001, Tl = 1002, oi = 1003, _m = 1004, gC = 1004, Ro = 1005, xC = 1005, jt = 1006, nl = 1007, yC = 1007, Xn = 1008, vC = 1008, Dn = 1009, bm = 1010, Mm = 1011, zo = 1012, ju = 1013, gs = 1014, Vi = 1015, $r = 1016, Yu = 1017, $u = 1018, Uo = 1020, Sm = 35902, wm = 35899, Cm = 1021, Tm = 1022, Di = 1023, Vo = 1026, Ho = 1027, qu = 1028, Yl = 1029, Ku = 1030, Zu = 1031, _C = 1032, Ju = 1033, sl = 33776, rl = 33777, ol = 33778, al = 33779, eu = 35840, tu = 35841, iu = 35842, nu = 35843, su = 36196, ru = 37492, ou = 37496, au = 37808, lu = 37809, cu = 37810, hu = 37811, uu = 37812, du = 37813, fu = 37814, pu = 37815, mu = 37816, gu = 37817, xu = 37818, yu = 37819, vu = 37820, _u = 37821, bu = 36492, Mu = 36494, Su = 36495, wu = 36283, Cu = 36284, Tu = 36285, Eu = 36286, Yv = 2200, $v = 2201, qv = 2202, El = 2300, Au = 2301, Ch = 2302, Er = 2400, Ar = 2401, Al = 2402, Qu = 2500, Em = 2501, bC = 0, MC = 1, SC = 2, Kv = 3200, Zv = 3201, wC = 3202, CC = 3203, qs = 0, Jv = 1, hs = "", Ci = "srgb", Vr = "srgb-linear", Pl = "linear", Ct = "srgb", TC = 0, _r = 7680, EC = 7681, AC = 7682, PC = 7683, DC = 34055, RC = 34056, IC = 5386, LC = 512, OC = 513, FC = 514, kC = 515, BC = 516, NC = 517, zC = 518, xp = 519, Qv = 512, e_ = 513, t_ = 514, Am = 515, i_ = 516, n_ = 517, s_ = 518, r_ = 519, Dl = 35044, UC = 35048, VC = 35040, HC = 35045, GC = 35049, WC = 35041, XC = 35046, jC = 35050, YC = 35042, $C = "100", yp = "300 es", en = 2e3, Go = 2001, qC = {
|
|
290
290
|
COMPUTE: "compute",
|
|
291
291
|
RENDER: "render"
|
|
292
292
|
}, KC = {
|
|
@@ -3078,7 +3078,7 @@ class l_ {
|
|
|
3078
3078
|
}
|
|
3079
3079
|
}
|
|
3080
3080
|
let _1 = 0;
|
|
3081
|
-
class
|
|
3081
|
+
class Us {
|
|
3082
3082
|
/**
|
|
3083
3083
|
* Constructs a new video texture.
|
|
3084
3084
|
*
|
|
@@ -3162,8 +3162,8 @@ class Gt extends es {
|
|
|
3162
3162
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
3163
3163
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
3164
3164
|
*/
|
|
3165
|
-
constructor(e = Gt.DEFAULT_IMAGE, t = Gt.DEFAULT_MAPPING, i =
|
|
3166
|
-
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: b1++ }), this.uuid = nn(), this.name = "", this.source = new
|
|
3165
|
+
constructor(e = Gt.DEFAULT_IMAGE, t = Gt.DEFAULT_MAPPING, i = Ui, n = Ui, r = jt, o = Xn, a = Di, l = Dn, c = Gt.DEFAULT_ANISOTROPY, h = hs) {
|
|
3166
|
+
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: b1++ }), this.uuid = nn(), this.name = "", this.source = new Us(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = o, this.anisotropy = c, this.format = a, this.internalFormat = null, this.type = l, this.offset = new ce(0, 0), this.repeat = new ce(1, 1), this.center = new ce(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new it(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
|
|
3167
3167
|
}
|
|
3168
3168
|
/**
|
|
3169
3169
|
* The width of the texture in pixels.
|
|
@@ -3315,7 +3315,7 @@ class Gt extends es {
|
|
|
3315
3315
|
case Cl:
|
|
3316
3316
|
e.x = e.x - Math.floor(e.x);
|
|
3317
3317
|
break;
|
|
3318
|
-
case
|
|
3318
|
+
case Ui:
|
|
3319
3319
|
e.x = e.x < 0 ? 0 : 1;
|
|
3320
3320
|
break;
|
|
3321
3321
|
case Tl:
|
|
@@ -3327,7 +3327,7 @@ class Gt extends es {
|
|
|
3327
3327
|
case Cl:
|
|
3328
3328
|
e.y = e.y - Math.floor(e.y);
|
|
3329
3329
|
break;
|
|
3330
|
-
case
|
|
3330
|
+
case Ui:
|
|
3331
3331
|
e.y = e.y < 0 ? 0 : 1;
|
|
3332
3332
|
break;
|
|
3333
3333
|
case Tl:
|
|
@@ -4035,7 +4035,7 @@ class Dm extends es {
|
|
|
4035
4035
|
for (let t = 0, i = e.textures.length; t < i; t++) {
|
|
4036
4036
|
this.textures[t] = e.textures[t].clone(), this.textures[t].isRenderTargetTexture = !0, this.textures[t].renderTarget = this;
|
|
4037
4037
|
const n = Object.assign({}, e.textures[t].image);
|
|
4038
|
-
this.textures[t].source = new
|
|
4038
|
+
this.textures[t].source = new Us(n);
|
|
4039
4039
|
}
|
|
4040
4040
|
return this.depthBuffer = e.depthBuffer, this.stencilBuffer = e.stencilBuffer, this.resolveDepthBuffer = e.resolveDepthBuffer, this.resolveStencilBuffer = e.resolveStencilBuffer, e.depthTexture !== null && (this.depthTexture = e.depthTexture.clone()), this.samples = e.samples, this;
|
|
4041
4041
|
}
|
|
@@ -4071,7 +4071,7 @@ class ed extends Gt {
|
|
|
4071
4071
|
* @param {number} [depth=1] - The depth of the texture.
|
|
4072
4072
|
*/
|
|
4073
4073
|
constructor(e = null, t = 1, i = 1, n = 1) {
|
|
4074
|
-
super(null), this.isDataArrayTexture = !0, this.image = { data: e, width: t, height: i, depth: n }, this.magFilter = oi, this.minFilter = oi, this.wrapR =
|
|
4074
|
+
super(null), this.isDataArrayTexture = !0, this.image = { data: e, width: t, height: i, depth: n }, this.magFilter = oi, this.minFilter = oi, this.wrapR = Ui, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.layerUpdates = /* @__PURE__ */ new Set();
|
|
4075
4075
|
}
|
|
4076
4076
|
/**
|
|
4077
4077
|
* Describes that a specific layer of the texture needs to be updated.
|
|
@@ -4115,7 +4115,7 @@ class td extends Gt {
|
|
|
4115
4115
|
* @param {number} [depth=1] - The depth of the texture.
|
|
4116
4116
|
*/
|
|
4117
4117
|
constructor(e = null, t = 1, i = 1, n = 1) {
|
|
4118
|
-
super(null), this.isData3DTexture = !0, this.image = { data: e, width: t, height: i, depth: n }, this.magFilter = oi, this.minFilter = oi, this.wrapR =
|
|
4118
|
+
super(null), this.isData3DTexture = !0, this.image = { data: e, width: t, height: i, depth: n }, this.magFilter = oi, this.minFilter = oi, this.wrapR = Ui, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
4119
4119
|
}
|
|
4120
4120
|
}
|
|
4121
4121
|
class S1 extends Zn {
|
|
@@ -6669,7 +6669,7 @@ yt.DEFAULT_UP = /* @__PURE__ */ new O(0, 1, 0);
|
|
|
6669
6669
|
yt.DEFAULT_MATRIX_AUTO_UPDATE = !0;
|
|
6670
6670
|
yt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
|
|
6671
6671
|
const _n = /* @__PURE__ */ new O(), rs = /* @__PURE__ */ new O(), lf = /* @__PURE__ */ new O(), os = /* @__PURE__ */ new O(), ho = /* @__PURE__ */ new O(), uo = /* @__PURE__ */ new O(), b0 = /* @__PURE__ */ new O(), cf = /* @__PURE__ */ new O(), hf = /* @__PURE__ */ new O(), uf = /* @__PURE__ */ new O(), df = /* @__PURE__ */ new xt(), ff = /* @__PURE__ */ new xt(), pf = /* @__PURE__ */ new xt();
|
|
6672
|
-
class
|
|
6672
|
+
class zi {
|
|
6673
6673
|
/**
|
|
6674
6674
|
* Constructs a new triangle.
|
|
6675
6675
|
*
|
|
@@ -6846,7 +6846,7 @@ class Ui {
|
|
|
6846
6846
|
* @return {Vector3} The triangle's normal.
|
|
6847
6847
|
*/
|
|
6848
6848
|
getNormal(e) {
|
|
6849
|
-
return
|
|
6849
|
+
return zi.getNormal(this.a, this.b, this.c, e);
|
|
6850
6850
|
}
|
|
6851
6851
|
/**
|
|
6852
6852
|
* Computes a plane the triangle lies within.
|
|
@@ -6866,7 +6866,7 @@ class Ui {
|
|
|
6866
6866
|
* @return {?Vector3} The barycentric coordinates for the given point
|
|
6867
6867
|
*/
|
|
6868
6868
|
getBarycoord(e, t) {
|
|
6869
|
-
return
|
|
6869
|
+
return zi.getBarycoord(e, this.a, this.b, this.c, t);
|
|
6870
6870
|
}
|
|
6871
6871
|
/**
|
|
6872
6872
|
* Computes the value barycentrically interpolated for the given point on the
|
|
@@ -6880,7 +6880,7 @@ class Ui {
|
|
|
6880
6880
|
* @return {?Vector3} The interpolated value.
|
|
6881
6881
|
*/
|
|
6882
6882
|
getInterpolation(e, t, i, n, r) {
|
|
6883
|
-
return
|
|
6883
|
+
return zi.getInterpolation(e, this.a, this.b, this.c, t, i, n, r);
|
|
6884
6884
|
}
|
|
6885
6885
|
/**
|
|
6886
6886
|
* Returns `true` if the given point, when projected onto the plane of the
|
|
@@ -6891,7 +6891,7 @@ class Ui {
|
|
|
6891
6891
|
* triangle, lies within the triangle or not.
|
|
6892
6892
|
*/
|
|
6893
6893
|
containsPoint(e) {
|
|
6894
|
-
return
|
|
6894
|
+
return zi.containsPoint(e, this.a, this.b, this.c);
|
|
6895
6895
|
}
|
|
6896
6896
|
/**
|
|
6897
6897
|
* Returns `true` if the triangle is oriented towards the given direction.
|
|
@@ -6900,7 +6900,7 @@ class Ui {
|
|
|
6900
6900
|
* @return {boolean} Whether the triangle is oriented towards the given direction or not.
|
|
6901
6901
|
*/
|
|
6902
6902
|
isFrontFacing(e) {
|
|
6903
|
-
return
|
|
6903
|
+
return zi.isFrontFacing(this.a, this.b, this.c, e);
|
|
6904
6904
|
}
|
|
6905
6905
|
/**
|
|
6906
6906
|
* Returns `true` if this triangle intersects with the given box.
|
|
@@ -7584,7 +7584,7 @@ class vi extends es {
|
|
|
7584
7584
|
* Constructs a new material.
|
|
7585
7585
|
*/
|
|
7586
7586
|
constructor() {
|
|
7587
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: R1++ }), this.uuid = nn(), this.name = "", this.type = "Material", this.blending = Fr, this.side = ps, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = Xh, this.blendDst = jh, this.blendEquation = Bs, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ae(0, 0, 0), this.blendAlpha = 0, this.depthFunc =
|
|
7587
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: R1++ }), this.uuid = nn(), this.name = "", this.type = "Material", this.blending = Fr, this.side = ps, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = Xh, this.blendDst = jh, this.blendEquation = Bs, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ae(0, 0, 0), this.blendAlpha = 0, this.depthFunc = Ur, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = xp, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = _r, this.stencilZFail = _r, this.stencilZPass = _r, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
7588
7588
|
}
|
|
7589
7589
|
/**
|
|
7590
7590
|
* Sets the alpha value to be used when running an alpha test. The material
|
|
@@ -7683,7 +7683,7 @@ class vi extends es {
|
|
|
7683
7683
|
generator: "Material.toJSON"
|
|
7684
7684
|
}
|
|
7685
7685
|
};
|
|
7686
|
-
i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (i.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (i.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (i.dispersion = this.dispersion), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== Fr && (i.blending = this.blending), this.side !== ps && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== Xh && (i.blendSrc = this.blendSrc), this.blendDst !== jh && (i.blendDst = this.blendDst), this.blendEquation !== Bs && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !==
|
|
7686
|
+
i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (i.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (i.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (i.dispersion = this.dispersion), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== Fr && (i.blending = this.blending), this.side !== ps && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== Xh && (i.blendSrc = this.blendSrc), this.blendDst !== jh && (i.blendDst = this.blendDst), this.blendEquation !== Bs && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !== Ur && (i.depthFunc = this.depthFunc), this.depthTest === !1 && (i.depthTest = this.depthTest), this.depthWrite === !1 && (i.depthWrite = this.depthWrite), this.colorWrite === !1 && (i.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (i.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== xp && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== _r && (i.stencilFail = this.stencilFail), this.stencilZFail !== _r && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== _r && (i.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (i.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === !0 && (i.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === !0 && (i.dithering = !0), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaHash === !0 && (i.alphaHash = !0), this.alphaToCoverage === !0 && (i.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (i.premultipliedAlpha = !0), this.forceSinglePass === !0 && (i.forceSinglePass = !0), this.wireframe === !0 && (i.wireframe = !0), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (i.flatShading = !0), this.visible === !1 && (i.visible = !1), this.toneMapped === !1 && (i.toneMapped = !1), this.fog === !1 && (i.fog = !1), Object.keys(this.userData).length > 0 && (i.userData = this.userData);
|
|
7687
7687
|
function n(r) {
|
|
7688
7688
|
const o = [];
|
|
7689
7689
|
for (const a in r) {
|
|
@@ -8211,7 +8211,7 @@ class Rm extends At {
|
|
|
8211
8211
|
super(new Uint16Array(e), t, i);
|
|
8212
8212
|
}
|
|
8213
8213
|
}
|
|
8214
|
-
class
|
|
8214
|
+
class z1 extends At {
|
|
8215
8215
|
/**
|
|
8216
8216
|
* Constructs a new buffer attribute.
|
|
8217
8217
|
*
|
|
@@ -8235,7 +8235,7 @@ class Im extends At {
|
|
|
8235
8235
|
super(new Uint32Array(e), t, i);
|
|
8236
8236
|
}
|
|
8237
8237
|
}
|
|
8238
|
-
class
|
|
8238
|
+
class U1 extends At {
|
|
8239
8239
|
/**
|
|
8240
8240
|
* Constructs a new buffer attribute.
|
|
8241
8241
|
*
|
|
@@ -8943,7 +8943,7 @@ function Dc(s, e, t, i, n, r, o, a, l, c) {
|
|
|
8943
8943
|
const h = H1(s, e, t, i, Cc, Tc, Ec, w0);
|
|
8944
8944
|
if (h) {
|
|
8945
8945
|
const u = new O();
|
|
8946
|
-
|
|
8946
|
+
zi.getBarycoord(w0, Cc, Tc, Ec, u), n && (h.uv = zi.getInterpolatedAttribute(n, a, l, c, u, new ce())), r && (h.uv1 = zi.getInterpolatedAttribute(r, a, l, c, u, new ce())), o && (h.normal = zi.getInterpolatedAttribute(o, a, l, c, u, new O()), h.normal.dot(i.direction) > 0 && h.normal.multiplyScalar(-1));
|
|
8947
8947
|
const d = {
|
|
8948
8948
|
a,
|
|
8949
8949
|
b: l,
|
|
@@ -8951,7 +8951,7 @@ function Dc(s, e, t, i, n, r, o, a, l, c) {
|
|
|
8951
8951
|
normal: new O(),
|
|
8952
8952
|
materialIndex: 0
|
|
8953
8953
|
};
|
|
8954
|
-
|
|
8954
|
+
zi.getNormal(Cc, Tc, Ec, d.normal), h.face = d, h.barycoord = u;
|
|
8955
8955
|
}
|
|
8956
8956
|
return h;
|
|
8957
8957
|
}
|
|
@@ -10172,7 +10172,7 @@ class g_ extends yt {
|
|
|
10172
10172
|
l < e.near || l > e.far || t.push({
|
|
10173
10173
|
distance: l,
|
|
10174
10174
|
point: ba.clone(),
|
|
10175
|
-
uv:
|
|
10175
|
+
uv: zi.getInterpolation(ba, Rc, Sa, Ic, E0, yf, A0, new ce()),
|
|
10176
10176
|
face: null,
|
|
10177
10177
|
object: this
|
|
10178
10178
|
});
|
|
@@ -11100,7 +11100,7 @@ class sa {
|
|
|
11100
11100
|
return new this.constructor().copy(this);
|
|
11101
11101
|
}
|
|
11102
11102
|
}
|
|
11103
|
-
const Nn = /* @__PURE__ */ new Ke(),
|
|
11103
|
+
const Nn = /* @__PURE__ */ new Ke(), zn = /* @__PURE__ */ new sa();
|
|
11104
11104
|
class ld {
|
|
11105
11105
|
/**
|
|
11106
11106
|
* Constructs a new frustum array.
|
|
@@ -11125,11 +11125,11 @@ class ld {
|
|
|
11125
11125
|
if (Nn.multiplyMatrices(
|
|
11126
11126
|
n.projectionMatrix,
|
|
11127
11127
|
n.matrixWorldInverse
|
|
11128
|
-
),
|
|
11128
|
+
), zn.setFromProjectionMatrix(
|
|
11129
11129
|
Nn,
|
|
11130
11130
|
n.coordinateSystem,
|
|
11131
11131
|
n.reversedDepth
|
|
11132
|
-
),
|
|
11132
|
+
), zn.intersectsObject(e))
|
|
11133
11133
|
return !0;
|
|
11134
11134
|
}
|
|
11135
11135
|
return !1;
|
|
@@ -11150,11 +11150,11 @@ class ld {
|
|
|
11150
11150
|
if (Nn.multiplyMatrices(
|
|
11151
11151
|
n.projectionMatrix,
|
|
11152
11152
|
n.matrixWorldInverse
|
|
11153
|
-
),
|
|
11153
|
+
), zn.setFromProjectionMatrix(
|
|
11154
11154
|
Nn,
|
|
11155
11155
|
n.coordinateSystem,
|
|
11156
11156
|
n.reversedDepth
|
|
11157
|
-
),
|
|
11157
|
+
), zn.intersectsSprite(e))
|
|
11158
11158
|
return !0;
|
|
11159
11159
|
}
|
|
11160
11160
|
return !1;
|
|
@@ -11175,11 +11175,11 @@ class ld {
|
|
|
11175
11175
|
if (Nn.multiplyMatrices(
|
|
11176
11176
|
n.projectionMatrix,
|
|
11177
11177
|
n.matrixWorldInverse
|
|
11178
|
-
),
|
|
11178
|
+
), zn.setFromProjectionMatrix(
|
|
11179
11179
|
Nn,
|
|
11180
11180
|
n.coordinateSystem,
|
|
11181
11181
|
n.reversedDepth
|
|
11182
|
-
),
|
|
11182
|
+
), zn.intersectsSphere(e))
|
|
11183
11183
|
return !0;
|
|
11184
11184
|
}
|
|
11185
11185
|
return !1;
|
|
@@ -11200,11 +11200,11 @@ class ld {
|
|
|
11200
11200
|
if (Nn.multiplyMatrices(
|
|
11201
11201
|
n.projectionMatrix,
|
|
11202
11202
|
n.matrixWorldInverse
|
|
11203
|
-
),
|
|
11203
|
+
), zn.setFromProjectionMatrix(
|
|
11204
11204
|
Nn,
|
|
11205
11205
|
n.coordinateSystem,
|
|
11206
11206
|
n.reversedDepth
|
|
11207
|
-
),
|
|
11207
|
+
), zn.intersectsBox(e))
|
|
11208
11208
|
return !0;
|
|
11209
11209
|
}
|
|
11210
11210
|
return !1;
|
|
@@ -11225,11 +11225,11 @@ class ld {
|
|
|
11225
11225
|
if (Nn.multiplyMatrices(
|
|
11226
11226
|
n.projectionMatrix,
|
|
11227
11227
|
n.matrixWorldInverse
|
|
11228
|
-
),
|
|
11228
|
+
), zn.setFromProjectionMatrix(
|
|
11229
11229
|
Nn,
|
|
11230
11230
|
n.coordinateSystem,
|
|
11231
11231
|
n.reversedDepth
|
|
11232
|
-
),
|
|
11232
|
+
), zn.containsPoint(e))
|
|
11233
11233
|
return !0;
|
|
11234
11234
|
}
|
|
11235
11235
|
return !1;
|
|
@@ -11271,7 +11271,7 @@ class tT {
|
|
|
11271
11271
|
this.list.length = 0, this.index = 0;
|
|
11272
11272
|
}
|
|
11273
11273
|
}
|
|
11274
|
-
const Bi = /* @__PURE__ */ new Ke(), iT = /* @__PURE__ */ new Ae(1, 1, 1), N0 = /* @__PURE__ */ new sa(), nT = /* @__PURE__ */ new ld(), Nc = /* @__PURE__ */ new mi(), hr = /* @__PURE__ */ new ai(), Ta = /* @__PURE__ */ new O(),
|
|
11274
|
+
const Bi = /* @__PURE__ */ new Ke(), iT = /* @__PURE__ */ new Ae(1, 1, 1), N0 = /* @__PURE__ */ new sa(), nT = /* @__PURE__ */ new ld(), Nc = /* @__PURE__ */ new mi(), hr = /* @__PURE__ */ new ai(), Ta = /* @__PURE__ */ new O(), z0 = /* @__PURE__ */ new O(), sT = /* @__PURE__ */ new O(), Sf = /* @__PURE__ */ new tT(), hi = /* @__PURE__ */ new Kt(), zc = [];
|
|
11275
11275
|
function rT(s, e, t = 0) {
|
|
11276
11276
|
const i = e.itemSize;
|
|
11277
11277
|
if (s.isInterleavedBufferAttribute || s.array.constructor !== e.array.constructor) {
|
|
@@ -11797,12 +11797,12 @@ class __ extends Kt {
|
|
|
11797
11797
|
if (!i[a].visible || !i[a].active)
|
|
11798
11798
|
continue;
|
|
11799
11799
|
const c = i[a].geometryIndex, h = n[c];
|
|
11800
|
-
hi.geometry.setDrawRange(h.start, h.count), this.getMatrixAt(a, hi.matrixWorld).premultiply(r), this.getBoundingBoxAt(c, hi.geometry.boundingBox), this.getBoundingSphereAt(c, hi.geometry.boundingSphere), hi.raycast(e,
|
|
11801
|
-
for (let u = 0, d =
|
|
11802
|
-
const f =
|
|
11800
|
+
hi.geometry.setDrawRange(h.start, h.count), this.getMatrixAt(a, hi.matrixWorld).premultiply(r), this.getBoundingBoxAt(c, hi.geometry.boundingBox), this.getBoundingSphereAt(c, hi.geometry.boundingSphere), hi.raycast(e, zc);
|
|
11801
|
+
for (let u = 0, d = zc.length; u < d; u++) {
|
|
11802
|
+
const f = zc[u];
|
|
11803
11803
|
f.object = this, f.batchId = a, t.push(f);
|
|
11804
11804
|
}
|
|
11805
|
-
|
|
11805
|
+
zc.length = 0;
|
|
11806
11806
|
}
|
|
11807
11807
|
hi.material = null, hi.geometry.index = null, hi.geometry.attributes = {}, hi.geometry.setDrawRange(0, 1 / 0);
|
|
11808
11808
|
}
|
|
@@ -11831,14 +11831,14 @@ class __ extends Kt {
|
|
|
11831
11831
|
));
|
|
11832
11832
|
let x = 0;
|
|
11833
11833
|
if (this.sortObjects) {
|
|
11834
|
-
Bi.copy(this.matrixWorld).invert(), Ta.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Bi),
|
|
11834
|
+
Bi.copy(this.matrixWorld).invert(), Ta.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Bi), z0.set(0, 0, -1).transformDirection(i.matrixWorld).transformDirection(Bi);
|
|
11835
11835
|
for (let y = 0, _ = l.length; y < _; y++)
|
|
11836
11836
|
if (l[y].visible && l[y].active) {
|
|
11837
11837
|
const w = l[y].geometryIndex;
|
|
11838
11838
|
this.getMatrixAt(y, Bi), this.getBoundingSphereAt(w, hr).applyMatrix4(Bi);
|
|
11839
11839
|
let b = !1;
|
|
11840
11840
|
if (d && (b = !g.intersectsSphere(hr, i)), !b) {
|
|
11841
|
-
const A = u[w], L = sT.subVectors(hr.center, Ta).dot(
|
|
11841
|
+
const A = u[w], L = sT.subVectors(hr.center, Ta).dot(z0);
|
|
11842
11842
|
Sf.push(A.start, A.count, L, y);
|
|
11843
11843
|
}
|
|
11844
11844
|
}
|
|
@@ -11882,7 +11882,7 @@ class Oi extends vi {
|
|
|
11882
11882
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this.fog = e.fog, this;
|
|
11883
11883
|
}
|
|
11884
11884
|
}
|
|
11885
|
-
const Pu = /* @__PURE__ */ new O(), Du = /* @__PURE__ */ new O(),
|
|
11885
|
+
const Pu = /* @__PURE__ */ new O(), Du = /* @__PURE__ */ new O(), U0 = /* @__PURE__ */ new Ke(), Ea = /* @__PURE__ */ new na(), Uc = /* @__PURE__ */ new ai(), wf = /* @__PURE__ */ new O(), V0 = /* @__PURE__ */ new O();
|
|
11886
11886
|
class js extends yt {
|
|
11887
11887
|
/**
|
|
11888
11888
|
* Constructs a new line.
|
|
@@ -11922,8 +11922,8 @@ class js extends yt {
|
|
|
11922
11922
|
*/
|
|
11923
11923
|
raycast(e, t) {
|
|
11924
11924
|
const i = this.geometry, n = this.matrixWorld, r = e.params.Line.threshold, o = i.drawRange;
|
|
11925
|
-
if (i.boundingSphere === null && i.computeBoundingSphere(),
|
|
11926
|
-
|
|
11925
|
+
if (i.boundingSphere === null && i.computeBoundingSphere(), Uc.copy(i.boundingSphere), Uc.applyMatrix4(n), Uc.radius += r, e.ray.intersectsSphere(Uc) === !1) return;
|
|
11926
|
+
U0.copy(n).invert(), Ea.copy(e.ray).applyMatrix4(U0);
|
|
11927
11927
|
const a = r / ((this.scale.x + this.scale.y + this.scale.z) / 3), l = a * a, c = this.isLineSegments ? 2 : 1, h = i.index, d = i.attributes.position;
|
|
11928
11928
|
if (h !== null) {
|
|
11929
11929
|
const f = Math.max(0, o.start), p = Math.min(h.count, o.start + o.count);
|
|
@@ -12228,7 +12228,7 @@ class lT extends cd {
|
|
|
12228
12228
|
* @param {number} [type=UnsignedByteType] - The min filter value.
|
|
12229
12229
|
*/
|
|
12230
12230
|
constructor(e, t, i, n, r, o) {
|
|
12231
|
-
super(e, t, i, r, o), this.isCompressedArrayTexture = !0, this.image.depth = n, this.wrapR =
|
|
12231
|
+
super(e, t, i, r, o), this.isCompressedArrayTexture = !0, this.image.depth = n, this.wrapR = Ui, this.layerUpdates = /* @__PURE__ */ new Set();
|
|
12232
12232
|
}
|
|
12233
12233
|
/**
|
|
12234
12234
|
* Describes that a specific layer of the texture needs to be updated.
|
|
@@ -12302,7 +12302,7 @@ class km extends Gt {
|
|
|
12302
12302
|
super(d, n, r, o, a, l, h, i, c), this.isDepthTexture = !0, this.flipY = !1, this.generateMipmaps = !1, this.compareFunction = null;
|
|
12303
12303
|
}
|
|
12304
12304
|
copy(e) {
|
|
12305
|
-
return super.copy(e), this.source = new
|
|
12305
|
+
return super.copy(e), this.source = new Us(Object.assign({}, e.image)), this.compareFunction = e.compareFunction, this;
|
|
12306
12306
|
}
|
|
12307
12307
|
toJSON(e) {
|
|
12308
12308
|
const t = super.toJSON(e);
|
|
@@ -12842,7 +12842,7 @@ class dd extends Zs {
|
|
|
12842
12842
|
return new dd(e.radius, e.detail);
|
|
12843
12843
|
}
|
|
12844
12844
|
}
|
|
12845
|
-
const Wc = /* @__PURE__ */ new O(), Xc = /* @__PURE__ */ new O(), Cf = /* @__PURE__ */ new O(), jc = /* @__PURE__ */ new
|
|
12845
|
+
const Wc = /* @__PURE__ */ new O(), Xc = /* @__PURE__ */ new O(), Cf = /* @__PURE__ */ new O(), jc = /* @__PURE__ */ new zi();
|
|
12846
12846
|
class w_ extends nt {
|
|
12847
12847
|
/**
|
|
12848
12848
|
* Constructs a new edges geometry.
|
|
@@ -13297,7 +13297,7 @@ function xT(s, e) {
|
|
|
13297
13297
|
function hl(s, e, t, i, n) {
|
|
13298
13298
|
return pT(s, e) + mT(s, t) + gT(s, i) + xT(s, n);
|
|
13299
13299
|
}
|
|
13300
|
-
class
|
|
13300
|
+
class zm extends Fn {
|
|
13301
13301
|
/**
|
|
13302
13302
|
* Constructs a new Cubic Bezier curve.
|
|
13303
13303
|
*
|
|
@@ -13372,7 +13372,7 @@ class E_ extends Fn {
|
|
|
13372
13372
|
return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this.v3.fromArray(e.v3), this;
|
|
13373
13373
|
}
|
|
13374
13374
|
}
|
|
13375
|
-
class
|
|
13375
|
+
class Um extends Fn {
|
|
13376
13376
|
/**
|
|
13377
13377
|
* Constructs a new line curve.
|
|
13378
13378
|
*
|
|
@@ -13582,10 +13582,10 @@ var Ru = /* @__PURE__ */ Object.freeze({
|
|
|
13582
13582
|
__proto__: null,
|
|
13583
13583
|
ArcCurve: C_,
|
|
13584
13584
|
CatmullRomCurve3: T_,
|
|
13585
|
-
CubicBezierCurve:
|
|
13585
|
+
CubicBezierCurve: zm,
|
|
13586
13586
|
CubicBezierCurve3: E_,
|
|
13587
13587
|
EllipseCurve: fd,
|
|
13588
|
-
LineCurve:
|
|
13588
|
+
LineCurve: Um,
|
|
13589
13589
|
LineCurve3: A_,
|
|
13590
13590
|
QuadraticBezierCurve: Vm,
|
|
13591
13591
|
QuadraticBezierCurve3: Hm,
|
|
@@ -13745,7 +13745,7 @@ class Iu extends P_ {
|
|
|
13745
13745
|
* @return {Path} A reference to this path.
|
|
13746
13746
|
*/
|
|
13747
13747
|
lineTo(e, t) {
|
|
13748
|
-
const i = new
|
|
13748
|
+
const i = new Um(this.currentPoint.clone(), new ce(e, t));
|
|
13749
13749
|
return this.curves.push(i), this.currentPoint.set(e, t), this;
|
|
13750
13750
|
}
|
|
13751
13751
|
/**
|
|
@@ -13779,7 +13779,7 @@ class Iu extends P_ {
|
|
|
13779
13779
|
* @return {Path} A reference to this path.
|
|
13780
13780
|
*/
|
|
13781
13781
|
bezierCurveTo(e, t, i, n, r, o) {
|
|
13782
|
-
const a = new
|
|
13782
|
+
const a = new zm(
|
|
13783
13783
|
this.currentPoint.clone(),
|
|
13784
13784
|
new ce(e, t),
|
|
13785
13785
|
new ce(i, n),
|
|
@@ -14362,7 +14362,7 @@ class pd extends nt {
|
|
|
14362
14362
|
let de, ye, Be;
|
|
14363
14363
|
const Ie = ie.x - re.x, et = ie.y - re.y, Je = oe.x - ie.x, M = oe.y - ie.y, D = Ie * Ie + et * et, G = Ie * M - et * Je;
|
|
14364
14364
|
if (Math.abs(G) > Number.EPSILON) {
|
|
14365
|
-
const Q = Math.sqrt(D), J = Math.sqrt(Je * Je + M * M), ee = re.x - et / Q, fe = re.y + Ie / Q, ue = oe.x - M / J,
|
|
14365
|
+
const Q = Math.sqrt(D), J = Math.sqrt(Je * Je + M * M), ee = re.x - et / Q, fe = re.y + Ie / Q, ue = oe.x - M / J, Ue = oe.y + Je / J, He = ((ue - ee) * M - (Ue - fe) * Je) / (Ie * M - et * Je);
|
|
14366
14366
|
de = ee + Ie * He - ie.x, ye = fe + et * He - ie.y;
|
|
14367
14367
|
const pe = de * de + ye * ye;
|
|
14368
14368
|
if (pe <= 2)
|
|
@@ -15515,7 +15515,7 @@ class N_ extends vi {
|
|
|
15515
15515
|
return super.copy(e), this.color.copy(e.color), this.specular.copy(e.specular), this.shininess = e.shininess, this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
|
|
15516
15516
|
}
|
|
15517
15517
|
}
|
|
15518
|
-
class
|
|
15518
|
+
class z_ extends vi {
|
|
15519
15519
|
/**
|
|
15520
15520
|
* Constructs a new mesh toon material.
|
|
15521
15521
|
*
|
|
@@ -15532,7 +15532,7 @@ class U_ extends vi {
|
|
|
15532
15532
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.gradientMap = e.gradientMap, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.alphaMap = e.alphaMap, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
|
|
15533
15533
|
}
|
|
15534
15534
|
}
|
|
15535
|
-
class
|
|
15535
|
+
class U_ extends vi {
|
|
15536
15536
|
/**
|
|
15537
15537
|
* Constructs a new mesh normal material.
|
|
15538
15538
|
*
|
|
@@ -15677,7 +15677,7 @@ function Ym(s, e, t, i) {
|
|
|
15677
15677
|
o = r[i], o !== void 0 && (e.push(r.time), t.push(o)), r = s[n++];
|
|
15678
15678
|
while (r !== void 0);
|
|
15679
15679
|
}
|
|
15680
|
-
function
|
|
15680
|
+
function zT(s, e, t, i, n = 30) {
|
|
15681
15681
|
const r = s.clone();
|
|
15682
15682
|
r.name = e;
|
|
15683
15683
|
const o = [];
|
|
@@ -15701,7 +15701,7 @@ function UT(s, e, t, i, n = 30) {
|
|
|
15701
15701
|
r.tracks[l].shift(-1 * a);
|
|
15702
15702
|
return r.resetDuration(), r;
|
|
15703
15703
|
}
|
|
15704
|
-
function
|
|
15704
|
+
function UT(s, e = 0, t = s, i = 30) {
|
|
15705
15705
|
i <= 0 && (i = 30);
|
|
15706
15706
|
const n = t.tracks.length, r = e / i;
|
|
15707
15707
|
for (let o = 0; o < n; ++o) {
|
|
@@ -15819,7 +15819,7 @@ class VT {
|
|
|
15819
15819
|
* @return {AnimationClip} The new sub clip.
|
|
15820
15820
|
*/
|
|
15821
15821
|
static subclip(e, t, i, n, r = 30) {
|
|
15822
|
-
return
|
|
15822
|
+
return zT(e, t, i, n, r);
|
|
15823
15823
|
}
|
|
15824
15824
|
/**
|
|
15825
15825
|
* Converts the keyframes of the given animation clip to an additive format.
|
|
@@ -15832,7 +15832,7 @@ class VT {
|
|
|
15832
15832
|
* @return {AnimationClip} The updated clip which is now additive.
|
|
15833
15833
|
*/
|
|
15834
15834
|
static makeClipAdditive(e, t = 0, i = e, n = 30) {
|
|
15835
|
-
return
|
|
15835
|
+
return UT(e, t, i, n);
|
|
15836
15836
|
}
|
|
15837
15837
|
}
|
|
15838
15838
|
class Ql {
|
|
@@ -17180,7 +17180,7 @@ class jT extends ji {
|
|
|
17180
17180
|
}
|
|
17181
17181
|
}
|
|
17182
17182
|
const bo = /* @__PURE__ */ new WeakMap();
|
|
17183
|
-
class
|
|
17183
|
+
class zl extends ji {
|
|
17184
17184
|
/**
|
|
17185
17185
|
* Constructs a new image loader.
|
|
17186
17186
|
*
|
|
@@ -17266,7 +17266,7 @@ class YT extends ji {
|
|
|
17266
17266
|
load(e, t, i, n) {
|
|
17267
17267
|
const r = new $l();
|
|
17268
17268
|
r.colorSpace = Ci;
|
|
17269
|
-
const o = new
|
|
17269
|
+
const o = new zl(this.manager);
|
|
17270
17270
|
o.setCrossOrigin(this.crossOrigin), o.setPath(this.path);
|
|
17271
17271
|
let a = 0;
|
|
17272
17272
|
function l(c) {
|
|
@@ -17314,7 +17314,7 @@ class $T extends ji {
|
|
|
17314
17314
|
return;
|
|
17315
17315
|
}
|
|
17316
17316
|
}
|
|
17317
|
-
c.image !== void 0 ? o.image = c.image : c.data !== void 0 && (o.image.width = c.width, o.image.height = c.height, o.image.data = c.data), o.wrapS = c.wrapS !== void 0 ? c.wrapS :
|
|
17317
|
+
c.image !== void 0 ? o.image = c.image : c.data !== void 0 && (o.image.width = c.width, o.image.height = c.height, o.image.data = c.data), o.wrapS = c.wrapS !== void 0 ? c.wrapS : Ui, o.wrapT = c.wrapT !== void 0 ? c.wrapT : Ui, o.magFilter = c.magFilter !== void 0 ? c.magFilter : jt, o.minFilter = c.minFilter !== void 0 ? c.minFilter : jt, o.anisotropy = c.anisotropy !== void 0 ? c.anisotropy : 1, c.colorSpace !== void 0 && (o.colorSpace = c.colorSpace), c.flipY !== void 0 && (o.flipY = c.flipY), c.format !== void 0 && (o.format = c.format), c.type !== void 0 && (o.type = c.type), c.mipmaps !== void 0 && (o.mipmaps = c.mipmaps, o.minFilter = Xn), c.mipmapCount === 1 && (o.minFilter = jt), c.generateMipmaps !== void 0 && (o.generateMipmaps = c.generateMipmaps), o.needsUpdate = !0, t && t(o, c);
|
|
17318
17318
|
}, i, n), o;
|
|
17319
17319
|
}
|
|
17320
17320
|
}
|
|
@@ -17340,7 +17340,7 @@ class qT extends ji {
|
|
|
17340
17340
|
* @return {Texture} The texture.
|
|
17341
17341
|
*/
|
|
17342
17342
|
load(e, t, i, n) {
|
|
17343
|
-
const r = new Gt(), o = new
|
|
17343
|
+
const r = new Gt(), o = new zl(this.manager);
|
|
17344
17344
|
return o.setCrossOrigin(this.crossOrigin), o.setPath(this.path), o.load(e, function(a) {
|
|
17345
17345
|
r.image = a, r.needsUpdate = !0, t !== void 0 && t(r);
|
|
17346
17346
|
}, i, n), r;
|
|
@@ -18087,8 +18087,8 @@ class wd extends ji {
|
|
|
18087
18087
|
MeshPhysicalMaterial: B_,
|
|
18088
18088
|
MeshStandardMaterial: Wm,
|
|
18089
18089
|
MeshPhongMaterial: N_,
|
|
18090
|
-
MeshToonMaterial:
|
|
18091
|
-
MeshNormalMaterial:
|
|
18090
|
+
MeshToonMaterial: z_,
|
|
18091
|
+
MeshNormalMaterial: U_,
|
|
18092
18092
|
MeshLambertMaterial: V_,
|
|
18093
18093
|
MeshDepthMaterial: Xm,
|
|
18094
18094
|
MeshDistanceMaterial: jm,
|
|
@@ -18405,7 +18405,7 @@ class QT extends ji {
|
|
|
18405
18405
|
}
|
|
18406
18406
|
if (e !== void 0 && e.length > 0) {
|
|
18407
18407
|
const l = new Km(t);
|
|
18408
|
-
r = new
|
|
18408
|
+
r = new zl(l), r.setCrossOrigin(this.crossOrigin);
|
|
18409
18409
|
for (let c = 0, h = e.length; c < h; c++) {
|
|
18410
18410
|
const u = e[c], d = u.url;
|
|
18411
18411
|
if (Array.isArray(d)) {
|
|
@@ -18414,10 +18414,10 @@ class QT extends ji {
|
|
|
18414
18414
|
const x = d[p], m = a(x);
|
|
18415
18415
|
m !== null && (m instanceof HTMLImageElement ? f.push(m) : f.push(new Tn(m.data, m.width, m.height)));
|
|
18416
18416
|
}
|
|
18417
|
-
n[u.uuid] = new
|
|
18417
|
+
n[u.uuid] = new Us(f);
|
|
18418
18418
|
} else {
|
|
18419
18419
|
const f = a(u.url);
|
|
18420
|
-
n[u.uuid] = new
|
|
18420
|
+
n[u.uuid] = new Us(f);
|
|
18421
18421
|
}
|
|
18422
18422
|
}
|
|
18423
18423
|
}
|
|
@@ -18438,7 +18438,7 @@ class QT extends ji {
|
|
|
18438
18438
|
} : null;
|
|
18439
18439
|
}
|
|
18440
18440
|
if (e !== void 0 && e.length > 0) {
|
|
18441
|
-
n = new
|
|
18441
|
+
n = new zl(this.manager), n.setCrossOrigin(this.crossOrigin);
|
|
18442
18442
|
for (let o = 0, a = e.length; o < a; o++) {
|
|
18443
18443
|
const l = e[o], c = l.url;
|
|
18444
18444
|
if (Array.isArray(c)) {
|
|
@@ -18447,10 +18447,10 @@ class QT extends ji {
|
|
|
18447
18447
|
const f = c[u], p = await r(f);
|
|
18448
18448
|
p !== null && (p instanceof HTMLImageElement ? h.push(p) : h.push(new Tn(p.data, p.width, p.height)));
|
|
18449
18449
|
}
|
|
18450
|
-
i[l.uuid] = new
|
|
18450
|
+
i[l.uuid] = new Us(h);
|
|
18451
18451
|
} else {
|
|
18452
18452
|
const h = await r(l.url);
|
|
18453
|
-
i[l.uuid] = new
|
|
18453
|
+
i[l.uuid] = new Us(h);
|
|
18454
18454
|
}
|
|
18455
18455
|
}
|
|
18456
18456
|
}
|
|
@@ -18621,7 +18621,7 @@ const eE = {
|
|
|
18621
18621
|
CubeUVReflectionMapping: ia
|
|
18622
18622
|
}, tx = {
|
|
18623
18623
|
RepeatWrapping: Cl,
|
|
18624
|
-
ClampToEdgeWrapping:
|
|
18624
|
+
ClampToEdgeWrapping: Ui,
|
|
18625
18625
|
MirroredRepeatWrapping: Tl
|
|
18626
18626
|
}, ix = {
|
|
18627
18627
|
NearestFilter: oi,
|
|
@@ -21795,7 +21795,7 @@ class BE extends Kt {
|
|
|
21795
21795
|
}
|
|
21796
21796
|
}
|
|
21797
21797
|
const NE = /* @__PURE__ */ new O(), ux = /* @__PURE__ */ new Ae(), dx = /* @__PURE__ */ new Ae();
|
|
21798
|
-
class
|
|
21798
|
+
class zE extends yt {
|
|
21799
21799
|
/**
|
|
21800
21800
|
* Constructs a new hemisphere light helper.
|
|
21801
21801
|
*
|
|
@@ -21838,7 +21838,7 @@ class UE extends yt {
|
|
|
21838
21838
|
this.light.updateWorldMatrix(!0, !1), e.lookAt(NE.setFromMatrixPosition(this.light.matrixWorld).negate());
|
|
21839
21839
|
}
|
|
21840
21840
|
}
|
|
21841
|
-
class
|
|
21841
|
+
class UE extends ts {
|
|
21842
21842
|
/**
|
|
21843
21843
|
* Constructs a new grid helper.
|
|
21844
21844
|
*
|
|
@@ -21957,7 +21957,7 @@ class HE extends yt {
|
|
|
21957
21957
|
this.light.updateWorldMatrix(!0, !1), this.light.target.updateWorldMatrix(!0, !1), fx.setFromMatrixPosition(this.light.matrixWorld), Qc.setFromMatrixPosition(this.light.target.matrixWorld), px.subVectors(Qc, fx), this.lightPlane.lookAt(Qc), this.color !== void 0 ? (this.lightPlane.material.color.set(this.color), this.targetLine.material.color.set(this.color)) : (this.lightPlane.material.color.copy(this.light.color), this.targetLine.material.color.copy(this.light.color)), this.targetLine.lookAt(Qc), this.targetLine.scale.z = px.length();
|
|
21958
21958
|
}
|
|
21959
21959
|
}
|
|
21960
|
-
const eh = /* @__PURE__ */ new O(),
|
|
21960
|
+
const eh = /* @__PURE__ */ new O(), Ut = /* @__PURE__ */ new nd();
|
|
21961
21961
|
class GE extends ts {
|
|
21962
21962
|
/**
|
|
21963
21963
|
* Constructs a new arrow helper.
|
|
@@ -21997,7 +21997,7 @@ class GE extends ts {
|
|
|
21997
21997
|
update() {
|
|
21998
21998
|
const e = this.geometry, t = this.pointMap, i = 1, n = 1;
|
|
21999
21999
|
let r, o;
|
|
22000
|
-
if (
|
|
22000
|
+
if (Ut.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.camera.reversedDepth === !0)
|
|
22001
22001
|
r = 1, o = 0;
|
|
22002
22002
|
else if (this.camera.coordinateSystem === en)
|
|
22003
22003
|
r = -1, o = 1;
|
|
@@ -22005,7 +22005,7 @@ class GE extends ts {
|
|
|
22005
22005
|
r = 0, o = 1;
|
|
22006
22006
|
else
|
|
22007
22007
|
throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: " + this.camera.coordinateSystem);
|
|
22008
|
-
Xt("c", t, e,
|
|
22008
|
+
Xt("c", t, e, Ut, 0, 0, r), Xt("t", t, e, Ut, 0, 0, o), Xt("n1", t, e, Ut, -i, -n, r), Xt("n2", t, e, Ut, i, -n, r), Xt("n3", t, e, Ut, -i, n, r), Xt("n4", t, e, Ut, i, n, r), Xt("f1", t, e, Ut, -i, -n, o), Xt("f2", t, e, Ut, i, -n, o), Xt("f3", t, e, Ut, -i, n, o), Xt("f4", t, e, Ut, i, n, o), Xt("u1", t, e, Ut, i * 0.7, n * 1.1, r), Xt("u2", t, e, Ut, -i * 0.7, n * 1.1, r), Xt("u3", t, e, Ut, 0, n * 2, r), Xt("cf1", t, e, Ut, -i, 0, o), Xt("cf2", t, e, Ut, i, 0, o), Xt("cf3", t, e, Ut, 0, -n, o), Xt("cf4", t, e, Ut, 0, n, o), Xt("cn1", t, e, Ut, -i, 0, r), Xt("cn2", t, e, Ut, i, 0, r), Xt("cn3", t, e, Ut, 0, -n, r), Xt("cn4", t, e, Ut, 0, n, r), e.getAttribute("position").needsUpdate = !0;
|
|
22009
22009
|
}
|
|
22010
22010
|
/**
|
|
22011
22011
|
* Frees the GPU-related resources allocated by this instance. Call this
|
|
@@ -22532,7 +22532,7 @@ function eA(s) {
|
|
|
22532
22532
|
case Dn:
|
|
22533
22533
|
case bm:
|
|
22534
22534
|
return { byteLength: 1, components: 1 };
|
|
22535
|
-
case
|
|
22535
|
+
case zo:
|
|
22536
22536
|
case Mm:
|
|
22537
22537
|
case $r:
|
|
22538
22538
|
return { byteLength: 2, components: 1 };
|
|
@@ -23273,7 +23273,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
|
|
|
23273
23273
|
varying vec3 vReflect;
|
|
23274
23274
|
uniform float refractionRatio;
|
|
23275
23275
|
#endif
|
|
23276
|
-
#endif`,
|
|
23276
|
+
#endif`, zA = `#ifdef USE_ENVMAP
|
|
23277
23277
|
#ifdef ENV_WORLDPOS
|
|
23278
23278
|
vWorldPosition = worldPosition.xyz;
|
|
23279
23279
|
#else
|
|
@@ -23290,7 +23290,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
|
|
|
23290
23290
|
vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
|
|
23291
23291
|
#endif
|
|
23292
23292
|
#endif
|
|
23293
|
-
#endif`,
|
|
23293
|
+
#endif`, UA = `#ifdef USE_FOG
|
|
23294
23294
|
vFogDepth = - mvPosition.z;
|
|
23295
23295
|
#endif`, VA = `#ifdef USE_FOG
|
|
23296
23296
|
varying float vFogDepth;
|
|
@@ -24565,7 +24565,7 @@ gl_Position = projectionMatrix * mvPosition;`, OP = `#ifdef DITHERING
|
|
|
24565
24565
|
}
|
|
24566
24566
|
return mix( 1.0, shadow, shadowIntensity );
|
|
24567
24567
|
}
|
|
24568
|
-
#endif`,
|
|
24568
|
+
#endif`, zP = `#if NUM_SPOT_LIGHT_COORDS > 0
|
|
24569
24569
|
uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
|
|
24570
24570
|
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
|
|
24571
24571
|
#endif
|
|
@@ -24606,7 +24606,7 @@ gl_Position = projectionMatrix * mvPosition;`, OP = `#ifdef DITHERING
|
|
|
24606
24606
|
};
|
|
24607
24607
|
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
|
|
24608
24608
|
#endif
|
|
24609
|
-
#endif`,
|
|
24609
|
+
#endif`, UP = `#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
|
|
24610
24610
|
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
|
|
24611
24611
|
vec4 shadowWorldPosition;
|
|
24612
24612
|
#endif
|
|
@@ -26302,8 +26302,8 @@ void main() {
|
|
|
26302
26302
|
envmap_pars_fragment: BA,
|
|
26303
26303
|
envmap_pars_vertex: NA,
|
|
26304
26304
|
envmap_physical_pars_fragment: qA,
|
|
26305
|
-
envmap_vertex:
|
|
26306
|
-
fog_vertex:
|
|
26305
|
+
envmap_vertex: zA,
|
|
26306
|
+
fog_vertex: UA,
|
|
26307
26307
|
fog_pars_vertex: VA,
|
|
26308
26308
|
fog_fragment: HA,
|
|
26309
26309
|
fog_pars_fragment: GA,
|
|
@@ -26355,8 +26355,8 @@ void main() {
|
|
|
26355
26355
|
roughnessmap_fragment: kP,
|
|
26356
26356
|
roughnessmap_pars_fragment: BP,
|
|
26357
26357
|
shadowmap_pars_fragment: NP,
|
|
26358
|
-
shadowmap_pars_vertex:
|
|
26359
|
-
shadowmap_vertex:
|
|
26358
|
+
shadowmap_pars_vertex: zP,
|
|
26359
|
+
shadowmap_vertex: UP,
|
|
26360
26360
|
shadowmask_pars_fragment: VP,
|
|
26361
26361
|
skinbase_vertex: HP,
|
|
26362
26362
|
skinning_pars_vertex: GP,
|
|
@@ -27138,7 +27138,7 @@ function N2(s, e) {
|
|
|
27138
27138
|
disableUnusedAttributes: v
|
|
27139
27139
|
};
|
|
27140
27140
|
}
|
|
27141
|
-
function
|
|
27141
|
+
function z2(s, e, t) {
|
|
27142
27142
|
let i;
|
|
27143
27143
|
function n(c) {
|
|
27144
27144
|
i = c;
|
|
@@ -27173,7 +27173,7 @@ function U2(s, e, t) {
|
|
|
27173
27173
|
}
|
|
27174
27174
|
this.setMode = n, this.render = r, this.renderInstances = o, this.renderMultiDraw = a, this.renderMultiDrawInstances = l;
|
|
27175
27175
|
}
|
|
27176
|
-
function
|
|
27176
|
+
function U2(s, e, t, i) {
|
|
27177
27177
|
let n;
|
|
27178
27178
|
function r() {
|
|
27179
27179
|
if (n !== void 0) return n;
|
|
@@ -27310,7 +27310,7 @@ function H2(s) {
|
|
|
27310
27310
|
};
|
|
27311
27311
|
}
|
|
27312
27312
|
const Vs = 4, gx = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], Sr = 20, G2 = 256, Pa = /* @__PURE__ */ new Sd(), xx = /* @__PURE__ */ new Ae();
|
|
27313
|
-
let kf = null, Bf = 0, Nf = 0,
|
|
27313
|
+
let kf = null, Bf = 0, Nf = 0, zf = !1;
|
|
27314
27314
|
const W2 = /* @__PURE__ */ new O();
|
|
27315
27315
|
class Tp {
|
|
27316
27316
|
/**
|
|
@@ -27341,7 +27341,7 @@ class Tp {
|
|
|
27341
27341
|
size: o = 256,
|
|
27342
27342
|
position: a = W2
|
|
27343
27343
|
} = r;
|
|
27344
|
-
kf = this._renderer.getRenderTarget(), Bf = this._renderer.getActiveCubeFace(), Nf = this._renderer.getActiveMipmapLevel(),
|
|
27344
|
+
kf = this._renderer.getRenderTarget(), Bf = this._renderer.getActiveCubeFace(), Nf = this._renderer.getActiveMipmapLevel(), zf = this._renderer.xr.enabled, this._renderer.xr.enabled = !1, this._setSize(o);
|
|
27345
27345
|
const l = this._allocateTargets();
|
|
27346
27346
|
return l.depthBuffer = !0, this._sceneToCubeUV(e, i, n, l, a), t > 0 && this._blur(l, 0, 0, t), this._applyPMREM(l), this._cleanup(l), l;
|
|
27347
27347
|
}
|
|
@@ -27401,10 +27401,10 @@ class Tp {
|
|
|
27401
27401
|
this._lodMeshes[e].geometry.dispose();
|
|
27402
27402
|
}
|
|
27403
27403
|
_cleanup(e) {
|
|
27404
|
-
this._renderer.setRenderTarget(kf, Bf, Nf), this._renderer.xr.enabled =
|
|
27404
|
+
this._renderer.setRenderTarget(kf, Bf, Nf), this._renderer.xr.enabled = zf, e.scissorTest = !1, wo(e, 0, 0, e.width, e.height);
|
|
27405
27405
|
}
|
|
27406
27406
|
_fromTexture(e, t) {
|
|
27407
|
-
e.mapping === ms || e.mapping === Ws ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), kf = this._renderer.getRenderTarget(), Bf = this._renderer.getActiveCubeFace(), Nf = this._renderer.getActiveMipmapLevel(),
|
|
27407
|
+
e.mapping === ms || e.mapping === Ws ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), kf = this._renderer.getRenderTarget(), Bf = this._renderer.getActiveCubeFace(), Nf = this._renderer.getActiveMipmapLevel(), zf = this._renderer.xr.enabled, this._renderer.xr.enabled = !1;
|
|
27408
27408
|
const i = t || this._allocateTargets();
|
|
27409
27409
|
return this._textureToCubeUV(e, i), this._applyPMREM(i), this._cleanup(i), i;
|
|
27410
27410
|
}
|
|
@@ -28543,13 +28543,13 @@ function N3(s, e, t) {
|
|
|
28543
28543
|
for (let o = 0; o !== n; ++o)
|
|
28544
28544
|
t.setTextureCube(e[o] || gb, r[o]);
|
|
28545
28545
|
}
|
|
28546
|
-
function
|
|
28546
|
+
function z3(s, e, t) {
|
|
28547
28547
|
const i = this.cache, n = e.length, r = Td(t, n);
|
|
28548
28548
|
Zt(i, r) || (s.uniform1iv(this.addr, r), Jt(i, r));
|
|
28549
28549
|
for (let o = 0; o !== n; ++o)
|
|
28550
28550
|
t.setTexture2DArray(e[o] || pb, r[o]);
|
|
28551
28551
|
}
|
|
28552
|
-
function
|
|
28552
|
+
function U3(s) {
|
|
28553
28553
|
switch (s) {
|
|
28554
28554
|
case 5126:
|
|
28555
28555
|
return b3;
|
|
@@ -28631,7 +28631,7 @@ function z3(s) {
|
|
|
28631
28631
|
case 36311:
|
|
28632
28632
|
// UNSIGNED_INT_SAMPLER_2D_ARRAY
|
|
28633
28633
|
case 36292:
|
|
28634
|
-
return
|
|
28634
|
+
return z3;
|
|
28635
28635
|
}
|
|
28636
28636
|
}
|
|
28637
28637
|
class V3 {
|
|
@@ -28641,7 +28641,7 @@ class V3 {
|
|
|
28641
28641
|
}
|
|
28642
28642
|
class H3 {
|
|
28643
28643
|
constructor(e, t, i) {
|
|
28644
|
-
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.size = t.size, this.setValue =
|
|
28644
|
+
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.size = t.size, this.setValue = U3(t.type);
|
|
28645
28645
|
}
|
|
28646
28646
|
}
|
|
28647
28647
|
class G3 {
|
|
@@ -28656,14 +28656,14 @@ class G3 {
|
|
|
28656
28656
|
}
|
|
28657
28657
|
}
|
|
28658
28658
|
}
|
|
28659
|
-
const
|
|
28659
|
+
const Uf = /(\w+)(\])?(\[|\.)?/g;
|
|
28660
28660
|
function Ex(s, e) {
|
|
28661
28661
|
s.seq.push(e), s.map[e.id] = e;
|
|
28662
28662
|
}
|
|
28663
28663
|
function W3(s, e, t) {
|
|
28664
28664
|
const i = s.name, n = i.length;
|
|
28665
|
-
for (
|
|
28666
|
-
const r =
|
|
28665
|
+
for (Uf.lastIndex = 0; ; ) {
|
|
28666
|
+
const r = Uf.exec(i), o = Uf.lastIndex;
|
|
28667
28667
|
let a = r[1];
|
|
28668
28668
|
const l = r[2] === "]", c = r[3];
|
|
28669
28669
|
if (l && (a = a | 0), c === void 0 || c === "[" && o + 2 === n) {
|
|
@@ -28762,7 +28762,7 @@ function q3(s, e) {
|
|
|
28762
28762
|
function K3(s, e) {
|
|
28763
28763
|
let t;
|
|
28764
28764
|
switch (e) {
|
|
28765
|
-
case
|
|
28765
|
+
case Uv:
|
|
28766
28766
|
t = "Linear";
|
|
28767
28767
|
break;
|
|
28768
28768
|
case Vv:
|
|
@@ -28927,7 +28927,7 @@ function cD(s) {
|
|
|
28927
28927
|
case Nv:
|
|
28928
28928
|
e = "ENVMAP_BLENDING_MIX";
|
|
28929
28929
|
break;
|
|
28930
|
-
case
|
|
28930
|
+
case zv:
|
|
28931
28931
|
e = "ENVMAP_BLENDING_ADD";
|
|
28932
28932
|
break;
|
|
28933
28933
|
}
|
|
@@ -29327,7 +29327,7 @@ function mD(s, e, t, i, n, r, o) {
|
|
|
29327
29327
|
_e = Mt.vertexShader, Ve = Mt.fragmentShader;
|
|
29328
29328
|
} else
|
|
29329
29329
|
_e = E.vertexShader, Ve = E.fragmentShader, l.update(E), tt = l.getVertexShaderID(E), te = l.getFragmentShaderID(E);
|
|
29330
|
-
const se = s.getRenderTarget(), F = s.state.buffers.depth.getReversed(), Z = P.isInstancedMesh === !0, le = P.isBatchedMesh === !0, be = !!E.map, ke = !!E.matcap, Le = !!X, ie = !!E.aoMap, re = !!E.lightMap, oe = !!E.bumpMap, de = !!E.normalMap, ye = !!E.displacementMap, Be = !!E.emissiveMap, Ie = !!E.metalnessMap, et = !!E.roughnessMap, Je = E.anisotropy > 0, M = E.clearcoat > 0, D = E.dispersion > 0, G = E.iridescence > 0, Q = E.sheen > 0, J = E.transmission > 0, ee = Je && !!E.anisotropyMap, fe = M && !!E.clearcoatMap, ue = M && !!E.clearcoatNormalMap,
|
|
29330
|
+
const se = s.getRenderTarget(), F = s.state.buffers.depth.getReversed(), Z = P.isInstancedMesh === !0, le = P.isBatchedMesh === !0, be = !!E.map, ke = !!E.matcap, Le = !!X, ie = !!E.aoMap, re = !!E.lightMap, oe = !!E.bumpMap, de = !!E.normalMap, ye = !!E.displacementMap, Be = !!E.emissiveMap, Ie = !!E.metalnessMap, et = !!E.roughnessMap, Je = E.anisotropy > 0, M = E.clearcoat > 0, D = E.dispersion > 0, G = E.iridescence > 0, Q = E.sheen > 0, J = E.transmission > 0, ee = Je && !!E.anisotropyMap, fe = M && !!E.clearcoatMap, ue = M && !!E.clearcoatNormalMap, Ue = M && !!E.clearcoatRoughnessMap, He = G && !!E.iridescenceMap, pe = G && !!E.iridescenceThicknessMap, Te = Q && !!E.sheenColorMap, Ge = Q && !!E.sheenRoughnessMap, ze = !!E.specularMap, Ee = !!E.specularColorMap, ot = !!E.specularIntensityMap, z = J && !!E.transmissionMap, xe = J && !!E.thicknessMap, ge = !!E.gradientMap, Ce = !!E.alphaMap, me = E.alphaTest > 0, ae = !!E.alphaHash, Ne = !!E.extensions;
|
|
29331
29331
|
let Xe = ds;
|
|
29332
29332
|
E.toneMapped && (se === null || se.isXRRenderTarget === !0) && (Xe = s.toneMapping);
|
|
29333
29333
|
const bt = {
|
|
@@ -29370,7 +29370,7 @@ function mD(s, e, t, i, n, r, o) {
|
|
|
29370
29370
|
clearcoat: M,
|
|
29371
29371
|
clearcoatMap: fe,
|
|
29372
29372
|
clearcoatNormalMap: ue,
|
|
29373
|
-
clearcoatRoughnessMap:
|
|
29373
|
+
clearcoatRoughnessMap: Ue,
|
|
29374
29374
|
dispersion: D,
|
|
29375
29375
|
iridescence: G,
|
|
29376
29376
|
iridescenceMap: He,
|
|
@@ -29378,11 +29378,11 @@ function mD(s, e, t, i, n, r, o) {
|
|
|
29378
29378
|
sheen: Q,
|
|
29379
29379
|
sheenColorMap: Te,
|
|
29380
29380
|
sheenRoughnessMap: Ge,
|
|
29381
|
-
specularMap:
|
|
29381
|
+
specularMap: ze,
|
|
29382
29382
|
specularColorMap: Ee,
|
|
29383
29383
|
specularIntensityMap: ot,
|
|
29384
29384
|
transmission: J,
|
|
29385
|
-
transmissionMap:
|
|
29385
|
+
transmissionMap: z,
|
|
29386
29386
|
thicknessMap: xe,
|
|
29387
29387
|
gradientMap: ge,
|
|
29388
29388
|
opaque: E.transparent === !1 && E.blending === Fr && E.alphaToCoverage === !1,
|
|
@@ -29403,15 +29403,15 @@ function mD(s, e, t, i, n, r, o) {
|
|
|
29403
29403
|
anisotropyMapUv: ee && g(E.anisotropyMap.channel),
|
|
29404
29404
|
clearcoatMapUv: fe && g(E.clearcoatMap.channel),
|
|
29405
29405
|
clearcoatNormalMapUv: ue && g(E.clearcoatNormalMap.channel),
|
|
29406
|
-
clearcoatRoughnessMapUv:
|
|
29406
|
+
clearcoatRoughnessMapUv: Ue && g(E.clearcoatRoughnessMap.channel),
|
|
29407
29407
|
iridescenceMapUv: He && g(E.iridescenceMap.channel),
|
|
29408
29408
|
iridescenceThicknessMapUv: pe && g(E.iridescenceThicknessMap.channel),
|
|
29409
29409
|
sheenColorMapUv: Te && g(E.sheenColorMap.channel),
|
|
29410
29410
|
sheenRoughnessMapUv: Ge && g(E.sheenRoughnessMap.channel),
|
|
29411
|
-
specularMapUv:
|
|
29411
|
+
specularMapUv: ze && g(E.specularMap.channel),
|
|
29412
29412
|
specularColorMapUv: Ee && g(E.specularColorMap.channel),
|
|
29413
29413
|
specularIntensityMapUv: ot && g(E.specularIntensityMap.channel),
|
|
29414
|
-
transmissionMapUv:
|
|
29414
|
+
transmissionMapUv: z && g(E.transmissionMap.channel),
|
|
29415
29415
|
thicknessMapUv: xe && g(E.thicknessMap.channel),
|
|
29416
29416
|
alphaMapUv: Ce && g(E.alphaMap.channel),
|
|
29417
29417
|
//
|
|
@@ -30026,35 +30026,35 @@ const AD = {
|
|
|
30026
30026
|
[Yh]: $h,
|
|
30027
30027
|
[qh]: Jh,
|
|
30028
30028
|
[Kh]: Qh,
|
|
30029
|
-
[
|
|
30029
|
+
[Ur]: Zh,
|
|
30030
30030
|
[$h]: Yh,
|
|
30031
30031
|
[Jh]: qh,
|
|
30032
30032
|
[Qh]: Kh,
|
|
30033
|
-
[Zh]:
|
|
30033
|
+
[Zh]: Ur
|
|
30034
30034
|
};
|
|
30035
30035
|
function PD(s, e) {
|
|
30036
30036
|
function t() {
|
|
30037
|
-
let
|
|
30037
|
+
let z = !1;
|
|
30038
30038
|
const xe = new xt();
|
|
30039
30039
|
let ge = null;
|
|
30040
30040
|
const Ce = new xt(0, 0, 0, 0);
|
|
30041
30041
|
return {
|
|
30042
30042
|
setMask: function(me) {
|
|
30043
|
-
ge !== me && !
|
|
30043
|
+
ge !== me && !z && (s.colorMask(me, me, me, me), ge = me);
|
|
30044
30044
|
},
|
|
30045
30045
|
setLocked: function(me) {
|
|
30046
|
-
|
|
30046
|
+
z = me;
|
|
30047
30047
|
},
|
|
30048
30048
|
setClear: function(me, ae, Ne, Xe, bt) {
|
|
30049
30049
|
bt === !0 && (me *= Xe, ae *= Xe, Ne *= Xe), xe.set(me, ae, Ne, Xe), Ce.equals(xe) === !1 && (s.clearColor(me, ae, Ne, Xe), Ce.copy(xe));
|
|
30050
30050
|
},
|
|
30051
30051
|
reset: function() {
|
|
30052
|
-
|
|
30052
|
+
z = !1, ge = null, Ce.set(-1, 0, 0, 0);
|
|
30053
30053
|
}
|
|
30054
30054
|
};
|
|
30055
30055
|
}
|
|
30056
30056
|
function i() {
|
|
30057
|
-
let
|
|
30057
|
+
let z = !1, xe = !1, ge = null, Ce = null, me = null;
|
|
30058
30058
|
return {
|
|
30059
30059
|
setReversed: function(ae) {
|
|
30060
30060
|
if (xe !== ae) {
|
|
@@ -30071,7 +30071,7 @@ function PD(s, e) {
|
|
|
30071
30071
|
ae ? se(s.DEPTH_TEST) : F(s.DEPTH_TEST);
|
|
30072
30072
|
},
|
|
30073
30073
|
setMask: function(ae) {
|
|
30074
|
-
ge !== ae && !
|
|
30074
|
+
ge !== ae && !z && (s.depthMask(ae), ge = ae);
|
|
30075
30075
|
},
|
|
30076
30076
|
setFunc: function(ae) {
|
|
30077
30077
|
if (xe && (ae = AD[ae]), Ce !== ae) {
|
|
@@ -30085,7 +30085,7 @@ function PD(s, e) {
|
|
|
30085
30085
|
case qh:
|
|
30086
30086
|
s.depthFunc(s.LESS);
|
|
30087
30087
|
break;
|
|
30088
|
-
case
|
|
30088
|
+
case Ur:
|
|
30089
30089
|
s.depthFunc(s.LEQUAL);
|
|
30090
30090
|
break;
|
|
30091
30091
|
case Kh:
|
|
@@ -30107,24 +30107,24 @@ function PD(s, e) {
|
|
|
30107
30107
|
}
|
|
30108
30108
|
},
|
|
30109
30109
|
setLocked: function(ae) {
|
|
30110
|
-
|
|
30110
|
+
z = ae;
|
|
30111
30111
|
},
|
|
30112
30112
|
setClear: function(ae) {
|
|
30113
30113
|
me !== ae && (xe && (ae = 1 - ae), s.clearDepth(ae), me = ae);
|
|
30114
30114
|
},
|
|
30115
30115
|
reset: function() {
|
|
30116
|
-
|
|
30116
|
+
z = !1, ge = null, Ce = null, me = null, xe = !1;
|
|
30117
30117
|
}
|
|
30118
30118
|
};
|
|
30119
30119
|
}
|
|
30120
30120
|
function n() {
|
|
30121
|
-
let
|
|
30121
|
+
let z = !1, xe = null, ge = null, Ce = null, me = null, ae = null, Ne = null, Xe = null, bt = null;
|
|
30122
30122
|
return {
|
|
30123
30123
|
setTest: function(Mt) {
|
|
30124
|
-
|
|
30124
|
+
z || (Mt ? se(s.STENCIL_TEST) : F(s.STENCIL_TEST));
|
|
30125
30125
|
},
|
|
30126
30126
|
setMask: function(Mt) {
|
|
30127
|
-
xe !== Mt && !
|
|
30127
|
+
xe !== Mt && !z && (s.stencilMask(Mt), xe = Mt);
|
|
30128
30128
|
},
|
|
30129
30129
|
setFunc: function(Mt, Bn, It) {
|
|
30130
30130
|
(ge !== Mt || Ce !== Bn || me !== It) && (s.stencilFunc(Mt, Bn, It), ge = Mt, Ce = Bn, me = It);
|
|
@@ -30133,13 +30133,13 @@ function PD(s, e) {
|
|
|
30133
30133
|
(ae !== Mt || Ne !== Bn || Xe !== It) && (s.stencilOp(Mt, Bn, It), ae = Mt, Ne = Bn, Xe = It);
|
|
30134
30134
|
},
|
|
30135
30135
|
setLocked: function(Mt) {
|
|
30136
|
-
|
|
30136
|
+
z = Mt;
|
|
30137
30137
|
},
|
|
30138
30138
|
setClear: function(Mt) {
|
|
30139
30139
|
bt !== Mt && (s.clearStencil(Mt), bt = Mt);
|
|
30140
30140
|
},
|
|
30141
30141
|
reset: function() {
|
|
30142
|
-
|
|
30142
|
+
z = !1, xe = null, ge = null, Ce = null, me = null, ae = null, Ne = null, Xe = null, bt = null;
|
|
30143
30143
|
}
|
|
30144
30144
|
};
|
|
30145
30145
|
}
|
|
@@ -30151,29 +30151,29 @@ function PD(s, e) {
|
|
|
30151
30151
|
V.indexOf("WebGL") !== -1 ? (X = parseFloat(/^WebGL (\d)/.exec(V)[1]), N = X >= 1) : V.indexOf("OpenGL ES") !== -1 && (X = parseFloat(/^OpenGL ES (\d)/.exec(V)[1]), N = X >= 2);
|
|
30152
30152
|
let j = null, ne = {};
|
|
30153
30153
|
const he = s.getParameter(s.SCISSOR_BOX), Pe = s.getParameter(s.VIEWPORT), _e = new xt().fromArray(he), Ve = new xt().fromArray(Pe);
|
|
30154
|
-
function tt(
|
|
30154
|
+
function tt(z, xe, ge, Ce) {
|
|
30155
30155
|
const me = new Uint8Array(4), ae = s.createTexture();
|
|
30156
|
-
s.bindTexture(
|
|
30156
|
+
s.bindTexture(z, ae), s.texParameteri(z, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(z, s.TEXTURE_MAG_FILTER, s.NEAREST);
|
|
30157
30157
|
for (let Ne = 0; Ne < ge; Ne++)
|
|
30158
|
-
|
|
30158
|
+
z === s.TEXTURE_3D || z === s.TEXTURE_2D_ARRAY ? s.texImage3D(xe, 0, s.RGBA, 1, 1, Ce, 0, s.RGBA, s.UNSIGNED_BYTE, me) : s.texImage2D(xe + Ne, 0, s.RGBA, 1, 1, 0, s.RGBA, s.UNSIGNED_BYTE, me);
|
|
30159
30159
|
return ae;
|
|
30160
30160
|
}
|
|
30161
30161
|
const te = {};
|
|
30162
|
-
te[s.TEXTURE_2D] = tt(s.TEXTURE_2D, s.TEXTURE_2D, 1), te[s.TEXTURE_CUBE_MAP] = tt(s.TEXTURE_CUBE_MAP, s.TEXTURE_CUBE_MAP_POSITIVE_X, 6), te[s.TEXTURE_2D_ARRAY] = tt(s.TEXTURE_2D_ARRAY, s.TEXTURE_2D_ARRAY, 1, 1), te[s.TEXTURE_3D] = tt(s.TEXTURE_3D, s.TEXTURE_3D, 1, 1), r.setClear(0, 0, 0, 1), o.setClear(1), a.setClear(0), se(s.DEPTH_TEST), o.setFunc(
|
|
30163
|
-
function se(
|
|
30164
|
-
h[
|
|
30162
|
+
te[s.TEXTURE_2D] = tt(s.TEXTURE_2D, s.TEXTURE_2D, 1), te[s.TEXTURE_CUBE_MAP] = tt(s.TEXTURE_CUBE_MAP, s.TEXTURE_CUBE_MAP_POSITIVE_X, 6), te[s.TEXTURE_2D_ARRAY] = tt(s.TEXTURE_2D_ARRAY, s.TEXTURE_2D_ARRAY, 1, 1), te[s.TEXTURE_3D] = tt(s.TEXTURE_3D, s.TEXTURE_3D, 1, 1), r.setClear(0, 0, 0, 1), o.setClear(1), a.setClear(0), se(s.DEPTH_TEST), o.setFunc(Ur), oe(!1), de(dp), se(s.CULL_FACE), ie($n);
|
|
30163
|
+
function se(z) {
|
|
30164
|
+
h[z] !== !0 && (s.enable(z), h[z] = !0);
|
|
30165
30165
|
}
|
|
30166
|
-
function F(
|
|
30167
|
-
h[
|
|
30166
|
+
function F(z) {
|
|
30167
|
+
h[z] !== !1 && (s.disable(z), h[z] = !1);
|
|
30168
30168
|
}
|
|
30169
|
-
function Z(
|
|
30170
|
-
return u[
|
|
30169
|
+
function Z(z, xe) {
|
|
30170
|
+
return u[z] !== xe ? (s.bindFramebuffer(z, xe), u[z] = xe, z === s.DRAW_FRAMEBUFFER && (u[s.FRAMEBUFFER] = xe), z === s.FRAMEBUFFER && (u[s.DRAW_FRAMEBUFFER] = xe), !0) : !1;
|
|
30171
30171
|
}
|
|
30172
|
-
function le(
|
|
30172
|
+
function le(z, xe) {
|
|
30173
30173
|
let ge = f, Ce = !1;
|
|
30174
|
-
if (
|
|
30174
|
+
if (z) {
|
|
30175
30175
|
ge = d.get(xe), ge === void 0 && (ge = [], d.set(xe, ge));
|
|
30176
|
-
const me =
|
|
30176
|
+
const me = z.textures;
|
|
30177
30177
|
if (ge.length !== me.length || ge[0] !== s.COLOR_ATTACHMENT0) {
|
|
30178
30178
|
for (let ae = 0, Ne = me.length; ae < Ne; ae++)
|
|
30179
30179
|
ge[ae] = s.COLOR_ATTACHMENT0 + ae;
|
|
@@ -30183,8 +30183,8 @@ function PD(s, e) {
|
|
|
30183
30183
|
ge[0] !== s.BACK && (ge[0] = s.BACK, Ce = !0);
|
|
30184
30184
|
Ce && s.drawBuffers(ge);
|
|
30185
30185
|
}
|
|
30186
|
-
function be(
|
|
30187
|
-
return p !==
|
|
30186
|
+
function be(z) {
|
|
30187
|
+
return p !== z ? (s.useProgram(z), p = z, !0) : !1;
|
|
30188
30188
|
}
|
|
30189
30189
|
const ke = {
|
|
30190
30190
|
[Bs]: s.FUNC_ADD,
|
|
@@ -30209,15 +30209,15 @@ function PD(s, e) {
|
|
|
30209
30209
|
[kv]: s.CONSTANT_ALPHA,
|
|
30210
30210
|
[Bv]: s.ONE_MINUS_CONSTANT_ALPHA
|
|
30211
30211
|
};
|
|
30212
|
-
function ie(
|
|
30213
|
-
if (
|
|
30212
|
+
function ie(z, xe, ge, Ce, me, ae, Ne, Xe, bt, Mt) {
|
|
30213
|
+
if (z === $n) {
|
|
30214
30214
|
g === !0 && (F(s.BLEND), g = !1);
|
|
30215
30215
|
return;
|
|
30216
30216
|
}
|
|
30217
|
-
if (g === !1 && (se(s.BLEND), g = !0),
|
|
30218
|
-
if (
|
|
30217
|
+
if (g === !1 && (se(s.BLEND), g = !0), z !== _v) {
|
|
30218
|
+
if (z !== x || Mt !== E) {
|
|
30219
30219
|
if ((m !== Bs || _ !== Bs) && (s.blendEquation(s.FUNC_ADD), m = Bs, _ = Bs), Mt)
|
|
30220
|
-
switch (
|
|
30220
|
+
switch (z) {
|
|
30221
30221
|
case Fr:
|
|
30222
30222
|
s.blendFuncSeparate(s.ONE, s.ONE_MINUS_SRC_ALPHA, s.ONE, s.ONE_MINUS_SRC_ALPHA);
|
|
30223
30223
|
break;
|
|
@@ -30231,11 +30231,11 @@ function PD(s, e) {
|
|
|
30231
30231
|
s.blendFuncSeparate(s.DST_COLOR, s.ONE_MINUS_SRC_ALPHA, s.ZERO, s.ONE);
|
|
30232
30232
|
break;
|
|
30233
30233
|
default:
|
|
30234
|
-
Ze("WebGLState: Invalid blending: ",
|
|
30234
|
+
Ze("WebGLState: Invalid blending: ", z);
|
|
30235
30235
|
break;
|
|
30236
30236
|
}
|
|
30237
30237
|
else
|
|
30238
|
-
switch (
|
|
30238
|
+
switch (z) {
|
|
30239
30239
|
case Fr:
|
|
30240
30240
|
s.blendFuncSeparate(s.SRC_ALPHA, s.ONE_MINUS_SRC_ALPHA, s.ONE, s.ONE_MINUS_SRC_ALPHA);
|
|
30241
30241
|
break;
|
|
@@ -30249,134 +30249,134 @@ function PD(s, e) {
|
|
|
30249
30249
|
Ze("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");
|
|
30250
30250
|
break;
|
|
30251
30251
|
default:
|
|
30252
|
-
Ze("WebGLState: Invalid blending: ",
|
|
30252
|
+
Ze("WebGLState: Invalid blending: ", z);
|
|
30253
30253
|
break;
|
|
30254
30254
|
}
|
|
30255
|
-
v = null, y = null, w = null, b = null, A.set(0, 0, 0), L = 0, x =
|
|
30255
|
+
v = null, y = null, w = null, b = null, A.set(0, 0, 0), L = 0, x = z, E = Mt;
|
|
30256
30256
|
}
|
|
30257
30257
|
return;
|
|
30258
30258
|
}
|
|
30259
|
-
me = me || xe, ae = ae || ge, Ne = Ne || Ce, (xe !== m || me !== _) && (s.blendEquationSeparate(ke[xe], ke[me]), m = xe, _ = me), (ge !== v || Ce !== y || ae !== w || Ne !== b) && (s.blendFuncSeparate(Le[ge], Le[Ce], Le[ae], Le[Ne]), v = ge, y = Ce, w = ae, b = Ne), (Xe.equals(A) === !1 || bt !== L) && (s.blendColor(Xe.r, Xe.g, Xe.b, bt), A.copy(Xe), L = bt), x =
|
|
30259
|
+
me = me || xe, ae = ae || ge, Ne = Ne || Ce, (xe !== m || me !== _) && (s.blendEquationSeparate(ke[xe], ke[me]), m = xe, _ = me), (ge !== v || Ce !== y || ae !== w || Ne !== b) && (s.blendFuncSeparate(Le[ge], Le[Ce], Le[ae], Le[Ne]), v = ge, y = Ce, w = ae, b = Ne), (Xe.equals(A) === !1 || bt !== L) && (s.blendColor(Xe.r, Xe.g, Xe.b, bt), A.copy(Xe), L = bt), x = z, E = !1;
|
|
30260
30260
|
}
|
|
30261
|
-
function re(
|
|
30262
|
-
|
|
30263
|
-
let ge =
|
|
30264
|
-
xe && (ge = !ge), oe(ge),
|
|
30265
|
-
const Ce =
|
|
30266
|
-
a.setTest(Ce), Ce && (a.setMask(
|
|
30261
|
+
function re(z, xe) {
|
|
30262
|
+
z.side === Gn ? F(s.CULL_FACE) : se(s.CULL_FACE);
|
|
30263
|
+
let ge = z.side === Ii;
|
|
30264
|
+
xe && (ge = !ge), oe(ge), z.blending === Fr && z.transparent === !1 ? ie($n) : ie(z.blending, z.blendEquation, z.blendSrc, z.blendDst, z.blendEquationAlpha, z.blendSrcAlpha, z.blendDstAlpha, z.blendColor, z.blendAlpha, z.premultipliedAlpha), o.setFunc(z.depthFunc), o.setTest(z.depthTest), o.setMask(z.depthWrite), r.setMask(z.colorWrite);
|
|
30265
|
+
const Ce = z.stencilWrite;
|
|
30266
|
+
a.setTest(Ce), Ce && (a.setMask(z.stencilWriteMask), a.setFunc(z.stencilFunc, z.stencilRef, z.stencilFuncMask), a.setOp(z.stencilFail, z.stencilZFail, z.stencilZPass)), Be(z.polygonOffset, z.polygonOffsetFactor, z.polygonOffsetUnits), z.alphaToCoverage === !0 ? se(s.SAMPLE_ALPHA_TO_COVERAGE) : F(s.SAMPLE_ALPHA_TO_COVERAGE);
|
|
30267
30267
|
}
|
|
30268
|
-
function oe(
|
|
30269
|
-
C !==
|
|
30268
|
+
function oe(z) {
|
|
30269
|
+
C !== z && (z ? s.frontFace(s.CW) : s.frontFace(s.CCW), C = z);
|
|
30270
30270
|
}
|
|
30271
|
-
function de(
|
|
30272
|
-
|
|
30271
|
+
function de(z) {
|
|
30272
|
+
z !== yv ? (se(s.CULL_FACE), z !== R && (z === dp ? s.cullFace(s.BACK) : z === vv ? s.cullFace(s.FRONT) : s.cullFace(s.FRONT_AND_BACK))) : F(s.CULL_FACE), R = z;
|
|
30273
30273
|
}
|
|
30274
|
-
function ye(
|
|
30275
|
-
|
|
30274
|
+
function ye(z) {
|
|
30275
|
+
z !== T && (N && s.lineWidth(z), T = z);
|
|
30276
30276
|
}
|
|
30277
|
-
function Be(
|
|
30278
|
-
|
|
30277
|
+
function Be(z, xe, ge) {
|
|
30278
|
+
z ? (se(s.POLYGON_OFFSET_FILL), (P !== xe || k !== ge) && (s.polygonOffset(xe, ge), P = xe, k = ge)) : F(s.POLYGON_OFFSET_FILL);
|
|
30279
30279
|
}
|
|
30280
|
-
function Ie(
|
|
30281
|
-
|
|
30280
|
+
function Ie(z) {
|
|
30281
|
+
z ? se(s.SCISSOR_TEST) : F(s.SCISSOR_TEST);
|
|
30282
30282
|
}
|
|
30283
|
-
function et(
|
|
30284
|
-
|
|
30283
|
+
function et(z) {
|
|
30284
|
+
z === void 0 && (z = s.TEXTURE0 + B - 1), j !== z && (s.activeTexture(z), j = z);
|
|
30285
30285
|
}
|
|
30286
|
-
function Je(
|
|
30286
|
+
function Je(z, xe, ge) {
|
|
30287
30287
|
ge === void 0 && (j === null ? ge = s.TEXTURE0 + B - 1 : ge = j);
|
|
30288
30288
|
let Ce = ne[ge];
|
|
30289
|
-
Ce === void 0 && (Ce = { type: void 0, texture: void 0 }, ne[ge] = Ce), (Ce.type !==
|
|
30289
|
+
Ce === void 0 && (Ce = { type: void 0, texture: void 0 }, ne[ge] = Ce), (Ce.type !== z || Ce.texture !== xe) && (j !== ge && (s.activeTexture(ge), j = ge), s.bindTexture(z, xe || te[z]), Ce.type = z, Ce.texture = xe);
|
|
30290
30290
|
}
|
|
30291
30291
|
function M() {
|
|
30292
|
-
const
|
|
30293
|
-
|
|
30292
|
+
const z = ne[j];
|
|
30293
|
+
z !== void 0 && z.type !== void 0 && (s.bindTexture(z.type, null), z.type = void 0, z.texture = void 0);
|
|
30294
30294
|
}
|
|
30295
30295
|
function D() {
|
|
30296
30296
|
try {
|
|
30297
30297
|
s.compressedTexImage2D(...arguments);
|
|
30298
|
-
} catch (
|
|
30299
|
-
|
|
30298
|
+
} catch (z) {
|
|
30299
|
+
z("WebGLState:", z);
|
|
30300
30300
|
}
|
|
30301
30301
|
}
|
|
30302
30302
|
function G() {
|
|
30303
30303
|
try {
|
|
30304
30304
|
s.compressedTexImage3D(...arguments);
|
|
30305
|
-
} catch (
|
|
30306
|
-
|
|
30305
|
+
} catch (z) {
|
|
30306
|
+
z("WebGLState:", z);
|
|
30307
30307
|
}
|
|
30308
30308
|
}
|
|
30309
30309
|
function Q() {
|
|
30310
30310
|
try {
|
|
30311
30311
|
s.texSubImage2D(...arguments);
|
|
30312
|
-
} catch (
|
|
30313
|
-
|
|
30312
|
+
} catch (z) {
|
|
30313
|
+
z("WebGLState:", z);
|
|
30314
30314
|
}
|
|
30315
30315
|
}
|
|
30316
30316
|
function J() {
|
|
30317
30317
|
try {
|
|
30318
30318
|
s.texSubImage3D(...arguments);
|
|
30319
|
-
} catch (
|
|
30320
|
-
|
|
30319
|
+
} catch (z) {
|
|
30320
|
+
z("WebGLState:", z);
|
|
30321
30321
|
}
|
|
30322
30322
|
}
|
|
30323
30323
|
function ee() {
|
|
30324
30324
|
try {
|
|
30325
30325
|
s.compressedTexSubImage2D(...arguments);
|
|
30326
|
-
} catch (
|
|
30327
|
-
|
|
30326
|
+
} catch (z) {
|
|
30327
|
+
z("WebGLState:", z);
|
|
30328
30328
|
}
|
|
30329
30329
|
}
|
|
30330
30330
|
function fe() {
|
|
30331
30331
|
try {
|
|
30332
30332
|
s.compressedTexSubImage3D(...arguments);
|
|
30333
|
-
} catch (
|
|
30334
|
-
|
|
30333
|
+
} catch (z) {
|
|
30334
|
+
z("WebGLState:", z);
|
|
30335
30335
|
}
|
|
30336
30336
|
}
|
|
30337
30337
|
function ue() {
|
|
30338
30338
|
try {
|
|
30339
30339
|
s.texStorage2D(...arguments);
|
|
30340
|
-
} catch (
|
|
30341
|
-
|
|
30340
|
+
} catch (z) {
|
|
30341
|
+
z("WebGLState:", z);
|
|
30342
30342
|
}
|
|
30343
30343
|
}
|
|
30344
|
-
function
|
|
30344
|
+
function Ue() {
|
|
30345
30345
|
try {
|
|
30346
30346
|
s.texStorage3D(...arguments);
|
|
30347
|
-
} catch (
|
|
30348
|
-
|
|
30347
|
+
} catch (z) {
|
|
30348
|
+
z("WebGLState:", z);
|
|
30349
30349
|
}
|
|
30350
30350
|
}
|
|
30351
30351
|
function He() {
|
|
30352
30352
|
try {
|
|
30353
30353
|
s.texImage2D(...arguments);
|
|
30354
|
-
} catch (
|
|
30355
|
-
|
|
30354
|
+
} catch (z) {
|
|
30355
|
+
z("WebGLState:", z);
|
|
30356
30356
|
}
|
|
30357
30357
|
}
|
|
30358
30358
|
function pe() {
|
|
30359
30359
|
try {
|
|
30360
30360
|
s.texImage3D(...arguments);
|
|
30361
|
-
} catch (
|
|
30362
|
-
|
|
30361
|
+
} catch (z) {
|
|
30362
|
+
z("WebGLState:", z);
|
|
30363
30363
|
}
|
|
30364
30364
|
}
|
|
30365
|
-
function Te(
|
|
30366
|
-
_e.equals(
|
|
30365
|
+
function Te(z) {
|
|
30366
|
+
_e.equals(z) === !1 && (s.scissor(z.x, z.y, z.z, z.w), _e.copy(z));
|
|
30367
30367
|
}
|
|
30368
|
-
function Ge(
|
|
30369
|
-
Ve.equals(
|
|
30368
|
+
function Ge(z) {
|
|
30369
|
+
Ve.equals(z) === !1 && (s.viewport(z.x, z.y, z.z, z.w), Ve.copy(z));
|
|
30370
30370
|
}
|
|
30371
|
-
function
|
|
30371
|
+
function ze(z, xe) {
|
|
30372
30372
|
let ge = c.get(xe);
|
|
30373
30373
|
ge === void 0 && (ge = /* @__PURE__ */ new WeakMap(), c.set(xe, ge));
|
|
30374
|
-
let Ce = ge.get(
|
|
30375
|
-
Ce === void 0 && (Ce = s.getUniformBlockIndex(xe,
|
|
30374
|
+
let Ce = ge.get(z);
|
|
30375
|
+
Ce === void 0 && (Ce = s.getUniformBlockIndex(xe, z.name), ge.set(z, Ce));
|
|
30376
30376
|
}
|
|
30377
|
-
function Ee(
|
|
30378
|
-
const Ce = c.get(xe).get(
|
|
30379
|
-
l.get(xe) !== Ce && (s.uniformBlockBinding(xe, Ce,
|
|
30377
|
+
function Ee(z, xe) {
|
|
30378
|
+
const Ce = c.get(xe).get(z);
|
|
30379
|
+
l.get(xe) !== Ce && (s.uniformBlockBinding(xe, Ce, z.__bindingPointIndex), l.set(xe, Ce));
|
|
30380
30380
|
}
|
|
30381
30381
|
function ot() {
|
|
30382
30382
|
s.disable(s.BLEND), s.disable(s.CULL_FACE), s.disable(s.DEPTH_TEST), s.disable(s.POLYGON_OFFSET_FILL), s.disable(s.SCISSOR_TEST), s.disable(s.STENCIL_TEST), s.disable(s.SAMPLE_ALPHA_TO_COVERAGE), s.blendEquation(s.FUNC_ADD), s.blendFunc(s.ONE, s.ZERO), s.blendFuncSeparate(s.ONE, s.ZERO, s.ONE, s.ZERO), s.blendColor(0, 0, 0, 0), s.colorMask(!0, !0, !0, !0), s.clearColor(0, 0, 0, 0), s.depthMask(!0), s.depthFunc(s.LESS), o.setReversed(!1), s.clearDepth(1), s.stencilMask(4294967295), s.stencilFunc(s.ALWAYS, 0, 4294967295), s.stencilOp(s.KEEP, s.KEEP, s.KEEP), s.clearStencil(0), s.cullFace(s.BACK), s.frontFace(s.CCW), s.polygonOffset(0, 0), s.activeTexture(s.TEXTURE0), s.bindFramebuffer(s.FRAMEBUFFER, null), s.bindFramebuffer(s.DRAW_FRAMEBUFFER, null), s.bindFramebuffer(s.READ_FRAMEBUFFER, null), s.useProgram(null), s.lineWidth(1), s.scissor(0, 0, s.canvas.width, s.canvas.height), s.viewport(0, 0, s.canvas.width, s.canvas.height), h = {}, j = null, ne = {}, u = {}, d = /* @__PURE__ */ new WeakMap(), f = [], p = null, g = !1, x = null, m = null, v = null, y = null, _ = null, w = null, b = null, A = new Ae(0, 0, 0), L = 0, E = !1, C = null, R = null, T = null, P = null, k = null, _e.set(0, 0, s.canvas.width, s.canvas.height), Ve.set(0, 0, s.canvas.width, s.canvas.height), r.reset(), o.reset(), a.reset();
|
|
@@ -30406,10 +30406,10 @@ function PD(s, e) {
|
|
|
30406
30406
|
compressedTexImage3D: G,
|
|
30407
30407
|
texImage2D: He,
|
|
30408
30408
|
texImage3D: pe,
|
|
30409
|
-
updateUBOMapping:
|
|
30409
|
+
updateUBOMapping: ze,
|
|
30410
30410
|
uniformBlockBinding: Ee,
|
|
30411
30411
|
texStorage2D: ue,
|
|
30412
|
-
texStorage3D:
|
|
30412
|
+
texStorage3D: Ue,
|
|
30413
30413
|
texSubImage2D: Q,
|
|
30414
30414
|
texSubImage3D: J,
|
|
30415
30415
|
compressedTexSubImage2D: ee,
|
|
@@ -30470,7 +30470,7 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30470
30470
|
}
|
|
30471
30471
|
function _(M, D) {
|
|
30472
30472
|
let G;
|
|
30473
|
-
return M ? D === null || D === gs || D ===
|
|
30473
|
+
return M ? D === null || D === gs || D === Uo ? G = s.DEPTH24_STENCIL8 : D === Vi ? G = s.DEPTH32F_STENCIL8 : D === zo && (G = s.DEPTH24_STENCIL8, we("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : D === null || D === gs || D === Uo ? G = s.DEPTH_COMPONENT24 : D === Vi ? G = s.DEPTH_COMPONENT32F : D === zo && (G = s.DEPTH_COMPONENT16), G;
|
|
30474
30474
|
}
|
|
30475
30475
|
function w(M, D) {
|
|
30476
30476
|
return x(M) === !0 || M.isFramebufferTexture && M.minFilter !== oi && M.minFilter !== jt ? Math.log2(Math.max(D.width, D.height)) + 1 : M.mipmaps !== void 0 && M.mipmaps.length > 0 ? M.mipmaps.length : M.isCompressedTexture && Array.isArray(M.image) ? D.mipmaps.length : 1;
|
|
@@ -30579,7 +30579,7 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30579
30579
|
}
|
|
30580
30580
|
const j = {
|
|
30581
30581
|
[Cl]: s.REPEAT,
|
|
30582
|
-
[
|
|
30582
|
+
[Ui]: s.CLAMP_TO_EDGE,
|
|
30583
30583
|
[Tl]: s.MIRRORED_REPEAT
|
|
30584
30584
|
}, ne = {
|
|
30585
30585
|
[oi]: s.NEAREST,
|
|
@@ -30635,20 +30635,20 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30635
30635
|
ee.sort((pe, Te) => pe.start - Te.start);
|
|
30636
30636
|
let fe = 0;
|
|
30637
30637
|
for (let pe = 1; pe < ee.length; pe++) {
|
|
30638
|
-
const Te = ee[fe], Ge = ee[pe],
|
|
30639
|
-
Ge.start <=
|
|
30638
|
+
const Te = ee[fe], Ge = ee[pe], ze = Te.start + Te.count, Ee = Ve(Ge.start, D.width, 4), ot = Ve(Te.start, D.width, 4);
|
|
30639
|
+
Ge.start <= ze + 1 && Ee === ot && Ve(Ge.start + Ge.count - 1, D.width, 4) === Ee ? Te.count = Math.max(
|
|
30640
30640
|
Te.count,
|
|
30641
30641
|
Ge.start + Ge.count - Te.start
|
|
30642
30642
|
) : (++fe, ee[fe] = Ge);
|
|
30643
30643
|
}
|
|
30644
30644
|
ee.length = fe + 1;
|
|
30645
|
-
const ue = s.getParameter(s.UNPACK_ROW_LENGTH),
|
|
30645
|
+
const ue = s.getParameter(s.UNPACK_ROW_LENGTH), Ue = s.getParameter(s.UNPACK_SKIP_PIXELS), He = s.getParameter(s.UNPACK_SKIP_ROWS);
|
|
30646
30646
|
s.pixelStorei(s.UNPACK_ROW_LENGTH, D.width);
|
|
30647
30647
|
for (let pe = 0, Te = ee.length; pe < Te; pe++) {
|
|
30648
|
-
const Ge = ee[pe],
|
|
30649
|
-
s.pixelStorei(s.UNPACK_SKIP_PIXELS, ot), s.pixelStorei(s.UNPACK_SKIP_ROWS,
|
|
30648
|
+
const Ge = ee[pe], ze = Math.floor(Ge.start / 4), Ee = Math.ceil(Ge.count / 4), ot = ze % D.width, z = Math.floor(ze / D.width), xe = Ee, ge = 1;
|
|
30649
|
+
s.pixelStorei(s.UNPACK_SKIP_PIXELS, ot), s.pixelStorei(s.UNPACK_SKIP_ROWS, z), t.texSubImage2D(s.TEXTURE_2D, 0, ot, z, xe, ge, G, Q, D.data);
|
|
30650
30650
|
}
|
|
30651
|
-
M.clearUpdateRanges(), s.pixelStorei(s.UNPACK_ROW_LENGTH, ue), s.pixelStorei(s.UNPACK_SKIP_PIXELS,
|
|
30651
|
+
M.clearUpdateRanges(), s.pixelStorei(s.UNPACK_ROW_LENGTH, ue), s.pixelStorei(s.UNPACK_SKIP_PIXELS, Ue), s.pixelStorei(s.UNPACK_SKIP_ROWS, He);
|
|
30652
30652
|
}
|
|
30653
30653
|
}
|
|
30654
30654
|
function te(M, D, G) {
|
|
@@ -30659,32 +30659,32 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30659
30659
|
const fe = i.get(ee);
|
|
30660
30660
|
if (ee.version !== fe.__version || J === !0) {
|
|
30661
30661
|
t.activeTexture(s.TEXTURE0 + G);
|
|
30662
|
-
const ue = dt.getPrimaries(dt.workingColorSpace),
|
|
30662
|
+
const ue = dt.getPrimaries(dt.workingColorSpace), Ue = D.colorSpace === hs ? null : dt.getPrimaries(D.colorSpace), He = D.colorSpace === hs || ue === Ue ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
|
|
30663
30663
|
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, D.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, D.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, D.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, He);
|
|
30664
30664
|
let pe = g(D.image, !1, n.maxTextureSize);
|
|
30665
30665
|
pe = et(D, pe);
|
|
30666
30666
|
const Te = r.convert(D.format, D.colorSpace), Ge = r.convert(D.type);
|
|
30667
|
-
let
|
|
30667
|
+
let ze = y(D.internalFormat, Te, Ge, D.colorSpace, D.isVideoTexture);
|
|
30668
30668
|
Pe(Q, D);
|
|
30669
30669
|
let Ee;
|
|
30670
|
-
const ot = D.mipmaps,
|
|
30670
|
+
const ot = D.mipmaps, z = D.isVideoTexture !== !0, xe = fe.__version === void 0 || J === !0, ge = ee.dataReady, Ce = w(D, pe);
|
|
30671
30671
|
if (D.isDepthTexture)
|
|
30672
|
-
|
|
30672
|
+
ze = _(D.format === Ho, D.type), xe && (z ? t.texStorage2D(s.TEXTURE_2D, 1, ze, pe.width, pe.height) : t.texImage2D(s.TEXTURE_2D, 0, ze, pe.width, pe.height, 0, Te, Ge, null));
|
|
30673
30673
|
else if (D.isDataTexture)
|
|
30674
30674
|
if (ot.length > 0) {
|
|
30675
|
-
|
|
30675
|
+
z && xe && t.texStorage2D(s.TEXTURE_2D, Ce, ze, ot[0].width, ot[0].height);
|
|
30676
30676
|
for (let me = 0, ae = ot.length; me < ae; me++)
|
|
30677
|
-
Ee = ot[me],
|
|
30677
|
+
Ee = ot[me], z ? ge && t.texSubImage2D(s.TEXTURE_2D, me, 0, 0, Ee.width, Ee.height, Te, Ge, Ee.data) : t.texImage2D(s.TEXTURE_2D, me, ze, Ee.width, Ee.height, 0, Te, Ge, Ee.data);
|
|
30678
30678
|
D.generateMipmaps = !1;
|
|
30679
30679
|
} else
|
|
30680
|
-
|
|
30680
|
+
z ? (xe && t.texStorage2D(s.TEXTURE_2D, Ce, ze, pe.width, pe.height), ge && tt(D, pe, Te, Ge)) : t.texImage2D(s.TEXTURE_2D, 0, ze, pe.width, pe.height, 0, Te, Ge, pe.data);
|
|
30681
30681
|
else if (D.isCompressedTexture)
|
|
30682
30682
|
if (D.isCompressedArrayTexture) {
|
|
30683
|
-
|
|
30683
|
+
z && xe && t.texStorage3D(s.TEXTURE_2D_ARRAY, Ce, ze, ot[0].width, ot[0].height, pe.depth);
|
|
30684
30684
|
for (let me = 0, ae = ot.length; me < ae; me++)
|
|
30685
30685
|
if (Ee = ot[me], D.format !== Di)
|
|
30686
30686
|
if (Te !== null)
|
|
30687
|
-
if (
|
|
30687
|
+
if (z) {
|
|
30688
30688
|
if (ge)
|
|
30689
30689
|
if (D.layerUpdates.size > 0) {
|
|
30690
30690
|
const Ne = Cp(Ee.width, Ee.height, D.format, D.type);
|
|
@@ -30699,19 +30699,19 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30699
30699
|
} else
|
|
30700
30700
|
t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY, me, 0, 0, 0, Ee.width, Ee.height, pe.depth, Te, Ee.data);
|
|
30701
30701
|
} else
|
|
30702
|
-
t.compressedTexImage3D(s.TEXTURE_2D_ARRAY, me,
|
|
30702
|
+
t.compressedTexImage3D(s.TEXTURE_2D_ARRAY, me, ze, Ee.width, Ee.height, pe.depth, 0, Ee.data, 0, 0);
|
|
30703
30703
|
else
|
|
30704
30704
|
we("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
|
|
30705
30705
|
else
|
|
30706
|
-
|
|
30706
|
+
z ? ge && t.texSubImage3D(s.TEXTURE_2D_ARRAY, me, 0, 0, 0, Ee.width, Ee.height, pe.depth, Te, Ge, Ee.data) : t.texImage3D(s.TEXTURE_2D_ARRAY, me, ze, Ee.width, Ee.height, pe.depth, 0, Te, Ge, Ee.data);
|
|
30707
30707
|
} else {
|
|
30708
|
-
|
|
30708
|
+
z && xe && t.texStorage2D(s.TEXTURE_2D, Ce, ze, ot[0].width, ot[0].height);
|
|
30709
30709
|
for (let me = 0, ae = ot.length; me < ae; me++)
|
|
30710
|
-
Ee = ot[me], D.format !== Di ? Te !== null ?
|
|
30710
|
+
Ee = ot[me], D.format !== Di ? Te !== null ? z ? ge && t.compressedTexSubImage2D(s.TEXTURE_2D, me, 0, 0, Ee.width, Ee.height, Te, Ee.data) : t.compressedTexImage2D(s.TEXTURE_2D, me, ze, Ee.width, Ee.height, 0, Ee.data) : we("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : z ? ge && t.texSubImage2D(s.TEXTURE_2D, me, 0, 0, Ee.width, Ee.height, Te, Ge, Ee.data) : t.texImage2D(s.TEXTURE_2D, me, ze, Ee.width, Ee.height, 0, Te, Ge, Ee.data);
|
|
30711
30711
|
}
|
|
30712
30712
|
else if (D.isDataArrayTexture)
|
|
30713
|
-
if (
|
|
30714
|
-
if (xe && t.texStorage3D(s.TEXTURE_2D_ARRAY, Ce,
|
|
30713
|
+
if (z) {
|
|
30714
|
+
if (xe && t.texStorage3D(s.TEXTURE_2D_ARRAY, Ce, ze, pe.width, pe.height, pe.depth), ge)
|
|
30715
30715
|
if (D.layerUpdates.size > 0) {
|
|
30716
30716
|
const me = Cp(pe.width, pe.height, D.format, D.type);
|
|
30717
30717
|
for (const ae of D.layerUpdates) {
|
|
@@ -30725,34 +30725,34 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30725
30725
|
} else
|
|
30726
30726
|
t.texSubImage3D(s.TEXTURE_2D_ARRAY, 0, 0, 0, 0, pe.width, pe.height, pe.depth, Te, Ge, pe.data);
|
|
30727
30727
|
} else
|
|
30728
|
-
t.texImage3D(s.TEXTURE_2D_ARRAY, 0,
|
|
30728
|
+
t.texImage3D(s.TEXTURE_2D_ARRAY, 0, ze, pe.width, pe.height, pe.depth, 0, Te, Ge, pe.data);
|
|
30729
30729
|
else if (D.isData3DTexture)
|
|
30730
|
-
|
|
30730
|
+
z ? (xe && t.texStorage3D(s.TEXTURE_3D, Ce, ze, pe.width, pe.height, pe.depth), ge && t.texSubImage3D(s.TEXTURE_3D, 0, 0, 0, 0, pe.width, pe.height, pe.depth, Te, Ge, pe.data)) : t.texImage3D(s.TEXTURE_3D, 0, ze, pe.width, pe.height, pe.depth, 0, Te, Ge, pe.data);
|
|
30731
30731
|
else if (D.isFramebufferTexture) {
|
|
30732
30732
|
if (xe)
|
|
30733
|
-
if (
|
|
30734
|
-
t.texStorage2D(s.TEXTURE_2D, Ce,
|
|
30733
|
+
if (z)
|
|
30734
|
+
t.texStorage2D(s.TEXTURE_2D, Ce, ze, pe.width, pe.height);
|
|
30735
30735
|
else {
|
|
30736
30736
|
let me = pe.width, ae = pe.height;
|
|
30737
30737
|
for (let Ne = 0; Ne < Ce; Ne++)
|
|
30738
|
-
t.texImage2D(s.TEXTURE_2D, Ne,
|
|
30738
|
+
t.texImage2D(s.TEXTURE_2D, Ne, ze, me, ae, 0, Te, Ge, null), me >>= 1, ae >>= 1;
|
|
30739
30739
|
}
|
|
30740
30740
|
} else if (ot.length > 0) {
|
|
30741
|
-
if (
|
|
30741
|
+
if (z && xe) {
|
|
30742
30742
|
const me = Je(ot[0]);
|
|
30743
|
-
t.texStorage2D(s.TEXTURE_2D, Ce,
|
|
30743
|
+
t.texStorage2D(s.TEXTURE_2D, Ce, ze, me.width, me.height);
|
|
30744
30744
|
}
|
|
30745
30745
|
for (let me = 0, ae = ot.length; me < ae; me++)
|
|
30746
|
-
Ee = ot[me],
|
|
30746
|
+
Ee = ot[me], z ? ge && t.texSubImage2D(s.TEXTURE_2D, me, 0, 0, Te, Ge, Ee) : t.texImage2D(s.TEXTURE_2D, me, ze, Te, Ge, Ee);
|
|
30747
30747
|
D.generateMipmaps = !1;
|
|
30748
|
-
} else if (
|
|
30748
|
+
} else if (z) {
|
|
30749
30749
|
if (xe) {
|
|
30750
30750
|
const me = Je(pe);
|
|
30751
|
-
t.texStorage2D(s.TEXTURE_2D, Ce,
|
|
30751
|
+
t.texStorage2D(s.TEXTURE_2D, Ce, ze, me.width, me.height);
|
|
30752
30752
|
}
|
|
30753
30753
|
ge && t.texSubImage2D(s.TEXTURE_2D, 0, 0, 0, Te, Ge, pe);
|
|
30754
30754
|
} else
|
|
30755
|
-
t.texImage2D(s.TEXTURE_2D, 0,
|
|
30755
|
+
t.texImage2D(s.TEXTURE_2D, 0, ze, Te, Ge, pe);
|
|
30756
30756
|
x(D) && m(Q), fe.__version = ee.version, D.onUpdate && D.onUpdate(D);
|
|
30757
30757
|
}
|
|
30758
30758
|
M.__version = D.version;
|
|
@@ -30764,42 +30764,42 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30764
30764
|
const ee = i.get(J);
|
|
30765
30765
|
if (J.version !== ee.__version || Q === !0) {
|
|
30766
30766
|
t.activeTexture(s.TEXTURE0 + G);
|
|
30767
|
-
const fe = dt.getPrimaries(dt.workingColorSpace), ue = D.colorSpace === hs ? null : dt.getPrimaries(D.colorSpace),
|
|
30768
|
-
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, D.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, D.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, D.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,
|
|
30767
|
+
const fe = dt.getPrimaries(dt.workingColorSpace), ue = D.colorSpace === hs ? null : dt.getPrimaries(D.colorSpace), Ue = D.colorSpace === hs || fe === ue ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
|
|
30768
|
+
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, D.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, D.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, D.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, Ue);
|
|
30769
30769
|
const He = D.isCompressedTexture || D.image[0].isCompressedTexture, pe = D.image[0] && D.image[0].isDataTexture, Te = [];
|
|
30770
30770
|
for (let ae = 0; ae < 6; ae++)
|
|
30771
30771
|
!He && !pe ? Te[ae] = g(D.image[ae], !0, n.maxCubemapSize) : Te[ae] = pe ? D.image[ae].image : D.image[ae], Te[ae] = et(D, Te[ae]);
|
|
30772
|
-
const Ge = Te[0],
|
|
30772
|
+
const Ge = Te[0], ze = r.convert(D.format, D.colorSpace), Ee = r.convert(D.type), ot = y(D.internalFormat, ze, Ee, D.colorSpace), z = D.isVideoTexture !== !0, xe = ee.__version === void 0 || Q === !0, ge = J.dataReady;
|
|
30773
30773
|
let Ce = w(D, Ge);
|
|
30774
30774
|
Pe(s.TEXTURE_CUBE_MAP, D);
|
|
30775
30775
|
let me;
|
|
30776
30776
|
if (He) {
|
|
30777
|
-
|
|
30777
|
+
z && xe && t.texStorage2D(s.TEXTURE_CUBE_MAP, Ce, ot, Ge.width, Ge.height);
|
|
30778
30778
|
for (let ae = 0; ae < 6; ae++) {
|
|
30779
30779
|
me = Te[ae].mipmaps;
|
|
30780
30780
|
for (let Ne = 0; Ne < me.length; Ne++) {
|
|
30781
30781
|
const Xe = me[Ne];
|
|
30782
|
-
D.format !== Di ?
|
|
30782
|
+
D.format !== Di ? ze !== null ? z ? ge && t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, Ne, 0, 0, Xe.width, Xe.height, ze, Xe.data) : t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, Ne, ot, Xe.width, Xe.height, 0, Xe.data) : we("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : z ? ge && t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, Ne, 0, 0, Xe.width, Xe.height, ze, Ee, Xe.data) : t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, Ne, ot, Xe.width, Xe.height, 0, ze, Ee, Xe.data);
|
|
30783
30783
|
}
|
|
30784
30784
|
}
|
|
30785
30785
|
} else {
|
|
30786
|
-
if (me = D.mipmaps,
|
|
30786
|
+
if (me = D.mipmaps, z && xe) {
|
|
30787
30787
|
me.length > 0 && Ce++;
|
|
30788
30788
|
const ae = Je(Te[0]);
|
|
30789
30789
|
t.texStorage2D(s.TEXTURE_CUBE_MAP, Ce, ot, ae.width, ae.height);
|
|
30790
30790
|
}
|
|
30791
30791
|
for (let ae = 0; ae < 6; ae++)
|
|
30792
30792
|
if (pe) {
|
|
30793
|
-
|
|
30793
|
+
z ? ge && t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, 0, 0, 0, Te[ae].width, Te[ae].height, ze, Ee, Te[ae].data) : t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, 0, ot, Te[ae].width, Te[ae].height, 0, ze, Ee, Te[ae].data);
|
|
30794
30794
|
for (let Ne = 0; Ne < me.length; Ne++) {
|
|
30795
30795
|
const bt = me[Ne].image[ae].image;
|
|
30796
|
-
|
|
30796
|
+
z ? ge && t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, Ne + 1, 0, 0, bt.width, bt.height, ze, Ee, bt.data) : t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, Ne + 1, ot, bt.width, bt.height, 0, ze, Ee, bt.data);
|
|
30797
30797
|
}
|
|
30798
30798
|
} else {
|
|
30799
|
-
|
|
30799
|
+
z ? ge && t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, 0, 0, 0, ze, Ee, Te[ae]) : t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, 0, ot, ze, Ee, Te[ae]);
|
|
30800
30800
|
for (let Ne = 0; Ne < me.length; Ne++) {
|
|
30801
30801
|
const Xe = me[Ne];
|
|
30802
|
-
|
|
30802
|
+
z ? ge && t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, Ne + 1, 0, 0, ze, Ee, Xe.image[ae]) : t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + ae, Ne + 1, ot, ze, Ee, Xe.image[ae]);
|
|
30803
30803
|
}
|
|
30804
30804
|
}
|
|
30805
30805
|
}
|
|
@@ -30808,10 +30808,10 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30808
30808
|
M.__version = D.version;
|
|
30809
30809
|
}
|
|
30810
30810
|
function F(M, D, G, Q, J, ee) {
|
|
30811
|
-
const fe = r.convert(G.format, G.colorSpace), ue = r.convert(G.type),
|
|
30811
|
+
const fe = r.convert(G.format, G.colorSpace), ue = r.convert(G.type), Ue = y(G.internalFormat, fe, ue, G.colorSpace), He = i.get(D), pe = i.get(G);
|
|
30812
30812
|
if (pe.__renderTarget = D, !He.__hasExternalTextures) {
|
|
30813
30813
|
const Te = Math.max(1, D.width >> ee), Ge = Math.max(1, D.height >> ee);
|
|
30814
|
-
J === s.TEXTURE_3D || J === s.TEXTURE_2D_ARRAY ? t.texImage3D(J, ee,
|
|
30814
|
+
J === s.TEXTURE_3D || J === s.TEXTURE_2D_ARRAY ? t.texImage3D(J, ee, Ue, Te, Ge, D.depth, 0, fe, ue, null) : t.texImage2D(J, ee, Ue, Te, Ge, 0, fe, ue, null);
|
|
30815
30815
|
}
|
|
30816
30816
|
t.bindFramebuffer(s.FRAMEBUFFER, M), Be(D) ? a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, Q, J, pe.__webglTexture, 0, ye(D)) : (J === s.TEXTURE_2D || J >= s.TEXTURE_CUBE_MAP_POSITIVE_X && J <= s.TEXTURE_CUBE_MAP_NEGATIVE_Z) && s.framebufferTexture2D(s.FRAMEBUFFER, Q, J, pe.__webglTexture, ee), t.bindFramebuffer(s.FRAMEBUFFER, null);
|
|
30817
30817
|
}
|
|
@@ -30822,8 +30822,8 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30822
30822
|
} else {
|
|
30823
30823
|
const Q = D.textures;
|
|
30824
30824
|
for (let J = 0; J < Q.length; J++) {
|
|
30825
|
-
const ee = Q[J], fe = r.convert(ee.format, ee.colorSpace), ue = r.convert(ee.type),
|
|
30826
|
-
G && Be(D) === !1 ? s.renderbufferStorageMultisample(s.RENDERBUFFER, He,
|
|
30825
|
+
const ee = Q[J], fe = r.convert(ee.format, ee.colorSpace), ue = r.convert(ee.type), Ue = y(ee.internalFormat, fe, ue, ee.colorSpace), He = ye(D);
|
|
30826
|
+
G && Be(D) === !1 ? s.renderbufferStorageMultisample(s.RENDERBUFFER, He, Ue, D.width, D.height) : Be(D) ? a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, He, Ue, D.width, D.height) : s.renderbufferStorage(s.RENDERBUFFER, Ue, D.width, D.height);
|
|
30827
30827
|
}
|
|
30828
30828
|
}
|
|
30829
30829
|
s.bindRenderbuffer(s.RENDERBUFFER, null);
|
|
@@ -30891,8 +30891,8 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30891
30891
|
for (let ue = 0; ue < 6; ue++)
|
|
30892
30892
|
if (D.mipmaps && D.mipmaps.length > 0) {
|
|
30893
30893
|
G.__webglFramebuffer[ue] = [];
|
|
30894
|
-
for (let
|
|
30895
|
-
G.__webglFramebuffer[ue][
|
|
30894
|
+
for (let Ue = 0; Ue < D.mipmaps.length; Ue++)
|
|
30895
|
+
G.__webglFramebuffer[ue][Ue] = s.createFramebuffer();
|
|
30896
30896
|
} else
|
|
30897
30897
|
G.__webglFramebuffer[ue] = s.createFramebuffer();
|
|
30898
30898
|
} else {
|
|
@@ -30903,16 +30903,16 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30903
30903
|
} else
|
|
30904
30904
|
G.__webglFramebuffer = s.createFramebuffer();
|
|
30905
30905
|
if (fe)
|
|
30906
|
-
for (let ue = 0,
|
|
30906
|
+
for (let ue = 0, Ue = J.length; ue < Ue; ue++) {
|
|
30907
30907
|
const He = i.get(J[ue]);
|
|
30908
30908
|
He.__webglTexture === void 0 && (He.__webglTexture = s.createTexture(), o.memory.textures++);
|
|
30909
30909
|
}
|
|
30910
30910
|
if (M.samples > 0 && Be(M) === !1) {
|
|
30911
30911
|
G.__webglMultisampledFramebuffer = s.createFramebuffer(), G.__webglColorRenderbuffer = [], t.bindFramebuffer(s.FRAMEBUFFER, G.__webglMultisampledFramebuffer);
|
|
30912
30912
|
for (let ue = 0; ue < J.length; ue++) {
|
|
30913
|
-
const
|
|
30913
|
+
const Ue = J[ue];
|
|
30914
30914
|
G.__webglColorRenderbuffer[ue] = s.createRenderbuffer(), s.bindRenderbuffer(s.RENDERBUFFER, G.__webglColorRenderbuffer[ue]);
|
|
30915
|
-
const He = r.convert(
|
|
30915
|
+
const He = r.convert(Ue.format, Ue.colorSpace), pe = r.convert(Ue.type), Te = y(Ue.internalFormat, He, pe, Ue.colorSpace, M.isXRRenderTarget === !0), Ge = ye(M);
|
|
30916
30916
|
s.renderbufferStorageMultisample(s.RENDERBUFFER, Ge, Te, M.width, M.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + ue, s.RENDERBUFFER, G.__webglColorRenderbuffer[ue]);
|
|
30917
30917
|
}
|
|
30918
30918
|
s.bindRenderbuffer(s.RENDERBUFFER, null), M.depthBuffer && (G.__webglDepthRenderbuffer = s.createRenderbuffer(), Z(G.__webglDepthRenderbuffer, M, !0)), t.bindFramebuffer(s.FRAMEBUFFER, null);
|
|
@@ -30922,13 +30922,13 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30922
30922
|
t.bindTexture(s.TEXTURE_CUBE_MAP, Q.__webglTexture), Pe(s.TEXTURE_CUBE_MAP, D);
|
|
30923
30923
|
for (let ue = 0; ue < 6; ue++)
|
|
30924
30924
|
if (D.mipmaps && D.mipmaps.length > 0)
|
|
30925
|
-
for (let
|
|
30926
|
-
F(G.__webglFramebuffer[ue][
|
|
30925
|
+
for (let Ue = 0; Ue < D.mipmaps.length; Ue++)
|
|
30926
|
+
F(G.__webglFramebuffer[ue][Ue], M, D, s.COLOR_ATTACHMENT0, s.TEXTURE_CUBE_MAP_POSITIVE_X + ue, Ue);
|
|
30927
30927
|
else
|
|
30928
30928
|
F(G.__webglFramebuffer[ue], M, D, s.COLOR_ATTACHMENT0, s.TEXTURE_CUBE_MAP_POSITIVE_X + ue, 0);
|
|
30929
30929
|
x(D) && m(s.TEXTURE_CUBE_MAP), t.unbindTexture();
|
|
30930
30930
|
} else if (fe) {
|
|
30931
|
-
for (let ue = 0,
|
|
30931
|
+
for (let ue = 0, Ue = J.length; ue < Ue; ue++) {
|
|
30932
30932
|
const He = J[ue], pe = i.get(He);
|
|
30933
30933
|
let Te = s.TEXTURE_2D;
|
|
30934
30934
|
(M.isWebGL3DRenderTarget || M.isWebGLArrayRenderTarget) && (Te = M.isWebGL3DRenderTarget ? s.TEXTURE_3D : s.TEXTURE_2D_ARRAY), t.bindTexture(Te, pe.__webglTexture), Pe(Te, He), F(G.__webglFramebuffer, M, He, s.COLOR_ATTACHMENT0 + ue, Te, 0), x(He) && m(Te);
|
|
@@ -30937,8 +30937,8 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30937
30937
|
} else {
|
|
30938
30938
|
let ue = s.TEXTURE_2D;
|
|
30939
30939
|
if ((M.isWebGL3DRenderTarget || M.isWebGLArrayRenderTarget) && (ue = M.isWebGL3DRenderTarget ? s.TEXTURE_3D : s.TEXTURE_2D_ARRAY), t.bindTexture(ue, Q.__webglTexture), Pe(ue, D), D.mipmaps && D.mipmaps.length > 0)
|
|
30940
|
-
for (let
|
|
30941
|
-
F(G.__webglFramebuffer[
|
|
30940
|
+
for (let Ue = 0; Ue < D.mipmaps.length; Ue++)
|
|
30941
|
+
F(G.__webglFramebuffer[Ue], M, D, s.COLOR_ATTACHMENT0, ue, Ue);
|
|
30942
30942
|
else
|
|
30943
30943
|
F(G.__webglFramebuffer, M, D, s.COLOR_ATTACHMENT0, ue, 0);
|
|
30944
30944
|
x(D) && m(ue), t.unbindTexture();
|
|
@@ -30966,8 +30966,8 @@ function DD(s, e, t, i, n, r, o) {
|
|
|
30966
30966
|
for (let He = 0; He < D.length; He++)
|
|
30967
30967
|
t.bindFramebuffer(s.FRAMEBUFFER, fe.__webglMultisampledFramebuffer), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + He, s.RENDERBUFFER, null), t.bindFramebuffer(s.FRAMEBUFFER, fe.__webglFramebuffer), s.framebufferTexture2D(s.DRAW_FRAMEBUFFER, s.COLOR_ATTACHMENT0 + He, s.TEXTURE_2D, null, 0);
|
|
30968
30968
|
t.bindFramebuffer(s.READ_FRAMEBUFFER, fe.__webglMultisampledFramebuffer);
|
|
30969
|
-
const
|
|
30970
|
-
|
|
30969
|
+
const Ue = M.texture.mipmaps;
|
|
30970
|
+
Ue && Ue.length > 0 ? t.bindFramebuffer(s.DRAW_FRAMEBUFFER, fe.__webglFramebuffer[0]) : t.bindFramebuffer(s.DRAW_FRAMEBUFFER, fe.__webglFramebuffer);
|
|
30971
30971
|
for (let He = 0; He < D.length; He++) {
|
|
30972
30972
|
if (M.resolveDepthBuffer && (M.depthBuffer && (J |= s.DEPTH_BUFFER_BIT), M.stencilBuffer && M.resolveStencilBuffer && (J |= s.STENCIL_BUFFER_BIT)), ue) {
|
|
30973
30973
|
s.framebufferRenderbuffer(s.READ_FRAMEBUFFER, s.COLOR_ATTACHMENT0, s.RENDERBUFFER, fe.__webglColorRenderbuffer[He]);
|
|
@@ -31020,7 +31020,7 @@ function xb(s, e) {
|
|
|
31020
31020
|
if (i === wm) return s.UNSIGNED_INT_10F_11F_11F_REV;
|
|
31021
31021
|
if (i === bm) return s.BYTE;
|
|
31022
31022
|
if (i === Mm) return s.SHORT;
|
|
31023
|
-
if (i ===
|
|
31023
|
+
if (i === zo) return s.UNSIGNED_SHORT;
|
|
31024
31024
|
if (i === ju) return s.INT;
|
|
31025
31025
|
if (i === gs) return s.UNSIGNED_INT;
|
|
31026
31026
|
if (i === Vi) return s.FLOAT;
|
|
@@ -31098,7 +31098,7 @@ function xb(s, e) {
|
|
|
31098
31098
|
if (i === Eu) return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
|
|
31099
31099
|
} else
|
|
31100
31100
|
return null;
|
|
31101
|
-
return i ===
|
|
31101
|
+
return i === Uo ? s.UNSIGNED_INT_24_8 : s[i] !== void 0 ? s[i] : null;
|
|
31102
31102
|
}
|
|
31103
31103
|
return { convert: t };
|
|
31104
31104
|
}
|
|
@@ -31251,7 +31251,7 @@ class OD extends es {
|
|
|
31251
31251
|
if (n = te, n !== null) {
|
|
31252
31252
|
if (y = e.getRenderTarget(), n.addEventListener("select", B), n.addEventListener("selectstart", B), n.addEventListener("selectend", B), n.addEventListener("squeeze", B), n.addEventListener("squeezestart", B), n.addEventListener("squeezeend", B), n.addEventListener("end", N), n.addEventListener("inputsourceschange", X), v.xrCompatible !== !0 && await t.makeXRCompatible(), L = e.getPixelRatio(), e.getSize(A), g && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
31253
31253
|
let F = null, Z = null, le = null;
|
|
31254
|
-
v.depth && (le = v.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, F = v.stencil ? Ho : Vo, Z = v.stencil ?
|
|
31254
|
+
v.depth && (le = v.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, F = v.stencil ? Ho : Vo, Z = v.stencil ? Uo : gs);
|
|
31255
31255
|
const be = {
|
|
31256
31256
|
colorFormat: t.RGBA8,
|
|
31257
31257
|
depthFormat: le,
|
|
@@ -33629,8 +33629,8 @@ const ND = new Uint16Array([
|
|
|
33629
33629
|
839
|
|
33630
33630
|
]);
|
|
33631
33631
|
let ls = null;
|
|
33632
|
-
function
|
|
33633
|
-
return ls === null && (ls = new Tn(ND, 32, 32, Ku, $r), ls.minFilter = jt, ls.magFilter = jt, ls.wrapS =
|
|
33632
|
+
function zD() {
|
|
33633
|
+
return ls === null && (ls = new Tn(ND, 32, 32, Ku, $r), ls.minFilter = jt, ls.magFilter = jt, ls.wrapS = Ui, ls.wrapT = Ui, ls.generateMipmaps = !1, ls.needsUpdate = !0), ls;
|
|
33634
33634
|
}
|
|
33635
33635
|
class yb {
|
|
33636
33636
|
/**
|
|
@@ -33667,8 +33667,8 @@ class yb {
|
|
|
33667
33667
|
]), g = /* @__PURE__ */ new Set([
|
|
33668
33668
|
Dn,
|
|
33669
33669
|
gs,
|
|
33670
|
-
Uo,
|
|
33671
33670
|
zo,
|
|
33671
|
+
Uo,
|
|
33672
33672
|
Yu,
|
|
33673
33673
|
$u
|
|
33674
33674
|
]), x = new Uint32Array(4), m = new Int32Array(4);
|
|
@@ -33762,9 +33762,9 @@ class yb {
|
|
|
33762
33762
|
} catch (I) {
|
|
33763
33763
|
throw I("WebGLRenderer: " + I.message), I;
|
|
33764
33764
|
}
|
|
33765
|
-
let G, Q, J, ee, fe, ue,
|
|
33765
|
+
let G, Q, J, ee, fe, ue, Ue, He, pe, Te, Ge, ze, Ee, ot, z, xe, ge, Ce, me, ae, Ne, Xe, bt, Mt;
|
|
33766
33766
|
function Bn() {
|
|
33767
|
-
G = new q2(M), G.init(), Xe = new xb(M, G), Q = new
|
|
33767
|
+
G = new q2(M), G.init(), Xe = new xb(M, G), Q = new U2(M, G, e, Xe), J = new PD(M, G), Q.reversedDepthBuffer && d && J.buffers.depth.setReversed(!0), ee = new J2(M), fe = new gD(), ue = new DD(M, G, J, fe, Q, Xe, ee), Ue = new H2(b), He = new $2(b), pe = new iA(M), bt = new N2(M, pe), Te = new K2(M, pe, ee, bt), Ge = new e3(M, Te, pe, ee), me = new Q2(M, Q, ue), xe = new V2(fe), ze = new mD(b, Ue, He, G, Q, bt, xe), Ee = new kD(b, fe), ot = new yD(), z = new wD(G), Ce = new B2(b, Ue, He, J, Ge, f, l), ge = new ED(b, Ge, Q), Mt = new BD(M, ee, Q, J), ae = new z2(M, G, ee), Ne = new Z2(M, G, ee), ee.programs = ze.programs, b.capabilities = Q, b.extensions = G, b.properties = fe, b.renderLists = ot, b.shadowMap = ge, b.state = J, b.info = ee;
|
|
33768
33768
|
}
|
|
33769
33769
|
Bn();
|
|
33770
33770
|
const It = new OD(b, M);
|
|
@@ -33842,7 +33842,7 @@ class yb {
|
|
|
33842
33842
|
}, this.clearStencil = function() {
|
|
33843
33843
|
this.clear(!1, !1, !0);
|
|
33844
33844
|
}, this.dispose = function() {
|
|
33845
|
-
t.removeEventListener("webglcontextlost", Wg, !1), t.removeEventListener("webglcontextrestored", Xg, !1), t.removeEventListener("webglcontextcreationerror", jg, !1), Ce.dispose(), ot.dispose(),
|
|
33845
|
+
t.removeEventListener("webglcontextlost", Wg, !1), t.removeEventListener("webglcontextrestored", Xg, !1), t.removeEventListener("webglcontextcreationerror", jg, !1), Ce.dispose(), ot.dispose(), z.dispose(), fe.dispose(), Ue.dispose(), He.dispose(), Ge.dispose(), bt.dispose(), Mt.dispose(), ze.dispose(), It.dispose(), It.removeEventListener("sessionstart", qg), It.removeEventListener("sessionend", Kg), sr.stop();
|
|
33846
33846
|
};
|
|
33847
33847
|
function Wg(I) {
|
|
33848
33848
|
I.preventDefault(), Il("WebGLRenderer: Context Lost."), A = !0;
|
|
@@ -33865,8 +33865,8 @@ class yb {
|
|
|
33865
33865
|
function pw(I) {
|
|
33866
33866
|
const H = fe.get(I).programs;
|
|
33867
33867
|
H !== void 0 && (H.forEach(function(Y) {
|
|
33868
|
-
|
|
33869
|
-
}), I.isShaderMaterial &&
|
|
33868
|
+
ze.releaseProgram(Y);
|
|
33869
|
+
}), I.isShaderMaterial && ze.releaseShaderCache(I));
|
|
33870
33870
|
}
|
|
33871
33871
|
this.renderBufferDirect = function(I, H, Y, K, W, ve) {
|
|
33872
33872
|
H === null && (H = ke);
|
|
@@ -33883,8 +33883,8 @@ class yb {
|
|
|
33883
33883
|
const Nt = pt - ut;
|
|
33884
33884
|
if (Nt < 0 || Nt === 1 / 0) return;
|
|
33885
33885
|
bt.setup(W, K, De, Y, Me);
|
|
33886
|
-
let
|
|
33887
|
-
if (Me !== null && (
|
|
33886
|
+
let zt, Pt = ae;
|
|
33887
|
+
if (Me !== null && (zt = pe.get(Me), Pt = Ne, Pt.setIndex(zt)), W.isMesh)
|
|
33888
33888
|
K.wireframe === !0 ? (J.setLineWidth(K.wireframeLinewidth * Je()), Pt.setMode(M.LINES)) : Pt.setMode(M.TRIANGLES);
|
|
33889
33889
|
else if (W.isLine) {
|
|
33890
33890
|
let je = K.linewidth;
|
|
@@ -33912,7 +33912,7 @@ class yb {
|
|
|
33912
33912
|
I.transparent === !0 && I.side === Gn && I.forceSinglePass === !1 ? (I.side = Ii, I.needsUpdate = !0, pc(I, H, Y), I.side = ps, I.needsUpdate = !0, pc(I, H, Y), I.side = Gn) : pc(I, H, Y);
|
|
33913
33913
|
}
|
|
33914
33914
|
this.compile = function(I, H, Y = null) {
|
|
33915
|
-
Y === null && (Y = I), y =
|
|
33915
|
+
Y === null && (Y = I), y = z.get(Y), y.init(H), w.push(y), Y.traverseVisible(function(W) {
|
|
33916
33916
|
W.isLight && W.layers.test(H.layers) && (y.pushLight(W), W.castShadow && y.pushShadow(W));
|
|
33917
33917
|
}), I !== Y && I.traverseVisible(function(W) {
|
|
33918
33918
|
W.isLight && W.layers.test(H.layers) && (y.pushLight(W), W.castShadow && y.pushShadow(W));
|
|
@@ -33965,7 +33965,7 @@ class yb {
|
|
|
33965
33965
|
return;
|
|
33966
33966
|
}
|
|
33967
33967
|
if (A !== !0) {
|
|
33968
|
-
I.matrixWorldAutoUpdate === !0 && I.updateMatrixWorld(), H.parent === null && H.matrixWorldAutoUpdate === !0 && H.updateMatrixWorld(), It.enabled === !0 && It.isPresenting === !0 && (It.cameraAutoUpdate === !0 && It.updateCamera(H), H = It.getCamera()), I.isScene === !0 && I.onBeforeRender(b, I, H, C), y =
|
|
33968
|
+
I.matrixWorldAutoUpdate === !0 && I.updateMatrixWorld(), H.parent === null && H.matrixWorldAutoUpdate === !0 && H.updateMatrixWorld(), It.enabled === !0 && It.isPresenting === !0 && (It.cameraAutoUpdate === !0 && It.updateCamera(H), H = It.getCamera()), I.isScene === !0 && I.onBeforeRender(b, I, H, C), y = z.get(I, w.length), y.init(H), w.push(y), Z.multiplyMatrices(H.projectionMatrix, H.matrixWorldInverse), te.setFromProjectionMatrix(Z, en, H.reversedDepth), F = this.localClippingEnabled, se = xe.init(this.clippingPlanes, F), v = ot.get(I, _.length), v.init(), _.push(v), oe(I);
|
|
33969
33969
|
try {
|
|
33970
33970
|
if (It.enabled === !0 && It.isPresenting === !0) {
|
|
33971
33971
|
const ve = b.xr.getDepthSensingMesh();
|
|
@@ -34059,7 +34059,7 @@ class yb {
|
|
|
34059
34059
|
if (K.viewport !== void 0 && (K.viewport = void 0), y.setupLightsView(K), se === !0 && xe.setGlobalState(b.clippingPlanes, K), fc(I, Y, K), ue.updateMultisampleRenderTarget(ve), ue.updateRenderTargetMipmap(ve), G.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
34060
34060
|
let ut = !1;
|
|
34061
34061
|
for (let pt = 0, Nt = H.length; pt < Nt; pt++) {
|
|
34062
|
-
const
|
|
34062
|
+
const zt = H[pt], { object: Pt, geometry: je, material: Ot, group: vt } = zt;
|
|
34063
34063
|
if (Ot.side === Gn && Pt.layers.test(K.layers)) {
|
|
34064
34064
|
const Yi = Ot.side;
|
|
34065
34065
|
Ot.side = Ii, Ot.needsUpdate = !0, Qg(Pt, Y, K, je, Ot, vt), Ot.side = Yi, Ot.needsUpdate = !0, ut = !0;
|
|
@@ -34084,15 +34084,15 @@ class yb {
|
|
|
34084
34084
|
}
|
|
34085
34085
|
function pc(I, H, Y) {
|
|
34086
34086
|
H.isScene !== !0 && (H = ke);
|
|
34087
|
-
const K = fe.get(I), W = y?.state.lights, ve = y?.state.shadowsArray, Fe = W.state.version, De =
|
|
34087
|
+
const K = fe.get(I), W = y?.state.lights, ve = y?.state.shadowsArray, Fe = W.state.version, De = ze.getParameters(I, W.state, ve, H, Y), Me = ze.getProgramCacheKey(De);
|
|
34088
34088
|
let Ye = K.programs;
|
|
34089
|
-
K.environment = I.isMeshStandardMaterial ? H.environment : null, K.fog = H.fog, K.envMap = (I.isMeshStandardMaterial ? He :
|
|
34089
|
+
K.environment = I.isMeshStandardMaterial ? H.environment : null, K.fog = H.fog, K.envMap = (I.isMeshStandardMaterial ? He : Ue).get(I.envMap || K.environment), K.envMapRotation = K.environment !== null && I.envMap === null ? H.environmentRotation : I.envMapRotation, Ye === void 0 && (I.addEventListener("dispose", Yg), Ye = /* @__PURE__ */ new Map(), K.programs = Ye);
|
|
34090
34090
|
let $e = Ye.get(Me);
|
|
34091
34091
|
if ($e !== void 0) {
|
|
34092
34092
|
if (K.currentProgram === $e && K.lightsStateVersion === Fe)
|
|
34093
34093
|
return t0(I, De), $e;
|
|
34094
34094
|
} else
|
|
34095
|
-
De.uniforms =
|
|
34095
|
+
De.uniforms = ze.getUniforms(I), I.onBeforeCompile(De, b), $e = ze.acquireProgram(De, Me), Ye.set(Me, $e), K.uniforms = De.uniforms;
|
|
34096
34096
|
const We = K.uniforms;
|
|
34097
34097
|
return (!I.isShaderMaterial && !I.isRawShaderMaterial || I.clipping === !0) && (We.clippingPlanes = xe.uniform), t0(I, De), K.needsLights = yw(I), K.lightsStateVersion = Fe, K.needsLights && (We.ambientLightColor.value = W.state.ambient, We.lightProbe.value = W.state.probe, We.directionalLights.value = W.state.directional, We.directionalLightShadows.value = W.state.directionalShadow, We.spotLights.value = W.state.spot, We.spotLightShadows.value = W.state.spotShadow, We.rectAreaLights.value = W.state.rectArea, We.ltc_1.value = W.state.rectAreaLTC1, We.ltc_2.value = W.state.rectAreaLTC2, We.pointLights.value = W.state.point, We.pointLightShadows.value = W.state.pointShadow, We.hemisphereLights.value = W.state.hemi, We.directionalShadowMap.value = W.state.directionalShadowMap, We.directionalShadowMatrix.value = W.state.directionalShadowMatrix, We.spotShadowMap.value = W.state.spotShadowMap, We.spotLightMatrix.value = W.state.spotLightMatrix, We.spotLightMap.value = W.state.spotLightMap, We.pointShadowMap.value = W.state.pointShadowMap, We.pointShadowMatrix.value = W.state.pointShadowMatrix), K.currentProgram = $e, K.uniformsList = null, $e;
|
|
34098
34098
|
}
|
|
@@ -34109,10 +34109,10 @@ class yb {
|
|
|
34109
34109
|
}
|
|
34110
34110
|
function gw(I, H, Y, K, W) {
|
|
34111
34111
|
H.isScene !== !0 && (H = ke), ue.resetTextureUnits();
|
|
34112
|
-
const ve = H.fog, Fe = K.isMeshStandardMaterial ? H.environment : null, De = C === null ? b.outputColorSpace : C.isXRRenderTarget === !0 ? C.texture.colorSpace : Vr, Me = (K.isMeshStandardMaterial ? He :
|
|
34112
|
+
const ve = H.fog, Fe = K.isMeshStandardMaterial ? H.environment : null, De = C === null ? b.outputColorSpace : C.isXRRenderTarget === !0 ? C.texture.colorSpace : Vr, Me = (K.isMeshStandardMaterial ? He : Ue).get(K.envMap || Fe), Ye = K.vertexColors === !0 && !!Y.attributes.color && Y.attributes.color.itemSize === 4, $e = !!Y.attributes.tangent && (!!K.normalMap || K.anisotropy > 0), We = !!Y.morphAttributes.position, ut = !!Y.morphAttributes.normal, pt = !!Y.morphAttributes.color;
|
|
34113
34113
|
let Nt = ds;
|
|
34114
34114
|
K.toneMapped && (C === null || C.isXRRenderTarget === !0) && (Nt = b.toneMapping);
|
|
34115
|
-
const
|
|
34115
|
+
const zt = Y.morphAttributes.position || Y.morphAttributes.normal || Y.morphAttributes.color, Pt = zt !== void 0 ? zt.length : 0, je = fe.get(K), Ot = y?.state.lights;
|
|
34116
34116
|
if (se === !0 && (F === !0 || I !== T)) {
|
|
34117
34117
|
const _i = I === T && K.id === R;
|
|
34118
34118
|
xe.setState(K, I, _i);
|
|
@@ -34139,7 +34139,7 @@ class yb {
|
|
|
34139
34139
|
}
|
|
34140
34140
|
W.isBatchedMesh && (Ft.setOptional(M, W, "batchingTexture"), Ft.setValue(M, "batchingTexture", W._matricesTexture, ue), Ft.setOptional(M, W, "batchingIdTexture"), Ft.setValue(M, "batchingIdTexture", W._indirectTexture, ue), Ft.setOptional(M, W, "batchingColorTexture"), W._colorsTexture !== null && Ft.setValue(M, "batchingColorTexture", W._colorsTexture, ue));
|
|
34141
34141
|
const ln = Y.morphAttributes;
|
|
34142
|
-
if ((ln.position !== void 0 || ln.normal !== void 0 || ln.color !== void 0) && me.update(W, Y, Yi), ($i || je.receiveShadow !== W.receiveShadow) && (je.receiveShadow = W.receiveShadow, Ft.setValue(M, "receiveShadow", W.receiveShadow)), K.isMeshGouraudMaterial && K.envMap !== null && (Fi.envMap.value = Me, Fi.flipEnvMap.value = Me.isCubeTexture && Me.isRenderTargetTexture === !1 ? -1 : 1), K.isMeshStandardMaterial && K.envMap === null && H.environment !== null && (Fi.envMapIntensity.value = H.environmentIntensity), Fi.dfgLUT !== void 0 && (Fi.dfgLUT.value =
|
|
34142
|
+
if ((ln.position !== void 0 || ln.normal !== void 0 || ln.color !== void 0) && me.update(W, Y, Yi), ($i || je.receiveShadow !== W.receiveShadow) && (je.receiveShadow = W.receiveShadow, Ft.setValue(M, "receiveShadow", W.receiveShadow)), K.isMeshGouraudMaterial && K.envMap !== null && (Fi.envMap.value = Me, Fi.flipEnvMap.value = Me.isCubeTexture && Me.isRenderTargetTexture === !1 ? -1 : 1), K.isMeshStandardMaterial && K.envMap === null && H.environment !== null && (Fi.envMapIntensity.value = H.environmentIntensity), Fi.dfgLUT !== void 0 && (Fi.dfgLUT.value = zD()), $i && (Ft.setValue(M, "toneMappingExposure", b.toneMappingExposure), je.needsLights && xw(Fi, ma), ve && K.fog === !0 && Ee.refreshFogUniforms(Fi, ve), Ee.refreshMaterialUniforms(Fi, K, ne, j, y.state.transmissionRenderTarget[I.id]), Eh.upload(M, e0(je), Fi, ue)), K.isShaderMaterial && K.uniformsNeedUpdate === !0 && (Eh.upload(M, e0(je), Fi, ue), K.uniformsNeedUpdate = !1), K.isSpriteMaterial && Ft.setValue(M, "center", W.center), Ft.setValue(M, "modelViewMatrix", W.modelViewMatrix), Ft.setValue(M, "normalMatrix", W.normalMatrix), Ft.setValue(M, "modelMatrix", W.matrixWorld), K.isShaderMaterial || K.isRawShaderMaterial) {
|
|
34143
34143
|
const _i = K.uniformsGroups;
|
|
34144
34144
|
for (let ki = 0, $d = _i.length; ki < $d; ki++) {
|
|
34145
34145
|
const rr = _i[ki];
|
|
@@ -34259,19 +34259,19 @@ class yb {
|
|
|
34259
34259
|
this.copyTextureToTexture = function(I, H, Y = null, K = null, W = 0, ve = null) {
|
|
34260
34260
|
ve === null && (W !== 0 ? (Wo("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."), ve = W, W = 0) : ve = 0);
|
|
34261
34261
|
let Fe, De, Me, Ye, $e, We, ut, pt, Nt;
|
|
34262
|
-
const
|
|
34262
|
+
const zt = I.isCompressedTexture ? I.mipmaps[ve] : I.image;
|
|
34263
34263
|
if (Y !== null)
|
|
34264
34264
|
Fe = Y.max.x - Y.min.x, De = Y.max.y - Y.min.y, Me = Y.isBox3 ? Y.max.z - Y.min.z : 1, Ye = Y.min.x, $e = Y.min.y, We = Y.isBox3 ? Y.min.z : 0;
|
|
34265
34265
|
else {
|
|
34266
34266
|
const ln = Math.pow(2, -W);
|
|
34267
|
-
Fe = Math.floor(
|
|
34267
|
+
Fe = Math.floor(zt.width * ln), De = Math.floor(zt.height * ln), I.isDataArrayTexture ? Me = zt.depth : I.isData3DTexture ? Me = Math.floor(zt.depth * ln) : Me = 1, Ye = 0, $e = 0, We = 0;
|
|
34268
34268
|
}
|
|
34269
34269
|
K !== null ? (ut = K.x, pt = K.y, Nt = K.z) : (ut = 0, pt = 0, Nt = 0);
|
|
34270
34270
|
const Pt = Xe.convert(H.format), je = Xe.convert(H.type);
|
|
34271
34271
|
let Ot;
|
|
34272
34272
|
H.isData3DTexture ? (ue.setTexture3D(H, 0), Ot = M.TEXTURE_3D) : H.isDataArrayTexture || H.isCompressedArrayTexture ? (ue.setTexture2DArray(H, 0), Ot = M.TEXTURE_2D_ARRAY) : (ue.setTexture2D(H, 0), Ot = M.TEXTURE_2D), M.pixelStorei(M.UNPACK_FLIP_Y_WEBGL, H.flipY), M.pixelStorei(M.UNPACK_PREMULTIPLY_ALPHA_WEBGL, H.premultiplyAlpha), M.pixelStorei(M.UNPACK_ALIGNMENT, H.unpackAlignment);
|
|
34273
34273
|
const vt = M.getParameter(M.UNPACK_ROW_LENGTH), Yi = M.getParameter(M.UNPACK_IMAGE_HEIGHT), to = M.getParameter(M.UNPACK_SKIP_PIXELS), $i = M.getParameter(M.UNPACK_SKIP_ROWS), ma = M.getParameter(M.UNPACK_SKIP_IMAGES);
|
|
34274
|
-
M.pixelStorei(M.UNPACK_ROW_LENGTH,
|
|
34274
|
+
M.pixelStorei(M.UNPACK_ROW_LENGTH, zt.width), M.pixelStorei(M.UNPACK_IMAGE_HEIGHT, zt.height), M.pixelStorei(M.UNPACK_SKIP_PIXELS, Ye), M.pixelStorei(M.UNPACK_SKIP_ROWS, $e), M.pixelStorei(M.UNPACK_SKIP_IMAGES, We);
|
|
34275
34275
|
const Ft = I.isDataArrayTexture || I.isData3DTexture, Fi = H.isDataArrayTexture || H.isData3DTexture;
|
|
34276
34276
|
if (I.isDepthTexture) {
|
|
34277
34277
|
const ln = fe.get(I), _i = fe.get(H), ki = fe.get(ln.__renderTarget), $d = fe.get(_i.__renderTarget);
|
|
@@ -34286,7 +34286,7 @@ class yb {
|
|
|
34286
34286
|
Ft ? M.framebufferTextureLayer(M.READ_FRAMEBUFFER, M.COLOR_ATTACHMENT0, ln.__webglTexture, W, We + ki) : M.framebufferTexture2D(M.READ_FRAMEBUFFER, M.COLOR_ATTACHMENT0, M.TEXTURE_2D, ln.__webglTexture, W), Fi ? M.framebufferTextureLayer(M.DRAW_FRAMEBUFFER, M.COLOR_ATTACHMENT0, _i.__webglTexture, ve, Nt + ki) : M.framebufferTexture2D(M.DRAW_FRAMEBUFFER, M.COLOR_ATTACHMENT0, M.TEXTURE_2D, _i.__webglTexture, ve), W !== 0 ? M.blitFramebuffer(Ye, $e, Fe, De, ut, pt, Fe, De, M.COLOR_BUFFER_BIT, M.NEAREST) : Fi ? M.copyTexSubImage3D(Ot, ve, ut, pt, Nt + ki, Ye, $e, Fe, De) : M.copyTexSubImage2D(Ot, ve, ut, pt, Ye, $e, Fe, De);
|
|
34287
34287
|
J.bindFramebuffer(M.READ_FRAMEBUFFER, null), J.bindFramebuffer(M.DRAW_FRAMEBUFFER, null);
|
|
34288
34288
|
} else
|
|
34289
|
-
Fi ? I.isDataTexture || I.isData3DTexture ? M.texSubImage3D(Ot, ve, ut, pt, Nt, Fe, De, Me, Pt, je,
|
|
34289
|
+
Fi ? I.isDataTexture || I.isData3DTexture ? M.texSubImage3D(Ot, ve, ut, pt, Nt, Fe, De, Me, Pt, je, zt.data) : H.isCompressedArrayTexture ? M.compressedTexSubImage3D(Ot, ve, ut, pt, Nt, Fe, De, Me, Pt, zt.data) : M.texSubImage3D(Ot, ve, ut, pt, Nt, Fe, De, Me, Pt, je, zt) : I.isDataTexture ? M.texSubImage2D(M.TEXTURE_2D, ve, ut, pt, Fe, De, Pt, je, zt.data) : I.isCompressedTexture ? M.compressedTexSubImage2D(M.TEXTURE_2D, ve, ut, pt, zt.width, zt.height, Pt, zt.data) : M.texSubImage2D(M.TEXTURE_2D, ve, ut, pt, Fe, De, Pt, je, zt);
|
|
34290
34290
|
M.pixelStorei(M.UNPACK_ROW_LENGTH, vt), M.pixelStorei(M.UNPACK_IMAGE_HEIGHT, Yi), M.pixelStorei(M.UNPACK_SKIP_PIXELS, to), M.pixelStorei(M.UNPACK_SKIP_ROWS, $i), M.pixelStorei(M.UNPACK_SKIP_IMAGES, ma), ve === 0 && H.generateMipmaps && M.generateMipmap(Ot), J.unbindTexture();
|
|
34291
34291
|
}, this.initRenderTarget = function(I) {
|
|
34292
34292
|
fe.get(I).__webglFramebuffer === void 0 && ue.setupRenderTarget(I);
|
|
@@ -34323,11 +34323,11 @@ class yb {
|
|
|
34323
34323
|
t.drawingBufferColorSpace = dt._getDrawingBufferColorSpace(e), t.unpackColorSpace = dt._getUnpackColorSpace();
|
|
34324
34324
|
}
|
|
34325
34325
|
}
|
|
34326
|
-
const
|
|
34326
|
+
const UD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
34327
34327
|
__proto__: null,
|
|
34328
34328
|
ACESFilmicToneMapping: Gv,
|
|
34329
34329
|
AddEquation: Bs,
|
|
34330
|
-
AddOperation:
|
|
34330
|
+
AddOperation: zv,
|
|
34331
34331
|
AdditiveAnimationBlendMode: Em,
|
|
34332
34332
|
AdditiveBlending: fp,
|
|
34333
34333
|
AgXToneMapping: Xv,
|
|
@@ -34375,7 +34375,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34375
34375
|
CatmullRomCurve3: T_,
|
|
34376
34376
|
CineonToneMapping: Hv,
|
|
34377
34377
|
CircleGeometry: ud,
|
|
34378
|
-
ClampToEdgeWrapping:
|
|
34378
|
+
ClampToEdgeWrapping: Ui,
|
|
34379
34379
|
Clock: ab,
|
|
34380
34380
|
Color: Ae,
|
|
34381
34381
|
ColorKeyframeTrack: qm,
|
|
@@ -34394,7 +34394,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34394
34394
|
CubeTexture: $l,
|
|
34395
34395
|
CubeTextureLoader: YT,
|
|
34396
34396
|
CubeUVReflectionMapping: ia,
|
|
34397
|
-
CubicBezierCurve:
|
|
34397
|
+
CubicBezierCurve: zm,
|
|
34398
34398
|
CubicBezierCurve3: E_,
|
|
34399
34399
|
CubicInterpolant: j_,
|
|
34400
34400
|
CullFaceBack: dp,
|
|
@@ -34427,7 +34427,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34427
34427
|
DstAlphaFactor: Pv,
|
|
34428
34428
|
DstColorFactor: Rv,
|
|
34429
34429
|
DynamicCopyUsage: jC,
|
|
34430
|
-
DynamicDrawUsage:
|
|
34430
|
+
DynamicDrawUsage: UC,
|
|
34431
34431
|
DynamicReadUsage: GC,
|
|
34432
34432
|
EdgesGeometry: w_,
|
|
34433
34433
|
EllipseCurve: fd,
|
|
@@ -34441,7 +34441,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34441
34441
|
ExternalTexture: Bm,
|
|
34442
34442
|
ExtrudeGeometry: pd,
|
|
34443
34443
|
FileLoader: xs,
|
|
34444
|
-
Float16BufferAttribute:
|
|
34444
|
+
Float16BufferAttribute: U1,
|
|
34445
34445
|
Float32BufferAttribute: Oe,
|
|
34446
34446
|
FloatType: Vi,
|
|
34447
34447
|
Fog: rd,
|
|
@@ -34457,16 +34457,16 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34457
34457
|
GreaterDepth: Jh,
|
|
34458
34458
|
GreaterEqualCompare: s_,
|
|
34459
34459
|
GreaterEqualDepth: Zh,
|
|
34460
|
-
GreaterEqualStencilFunc:
|
|
34460
|
+
GreaterEqualStencilFunc: zC,
|
|
34461
34461
|
GreaterStencilFunc: BC,
|
|
34462
|
-
GridHelper:
|
|
34462
|
+
GridHelper: UE,
|
|
34463
34463
|
Group: Lo,
|
|
34464
34464
|
HalfFloatType: $r,
|
|
34465
34465
|
HemisphereLight: K_,
|
|
34466
|
-
HemisphereLightHelper:
|
|
34466
|
+
HemisphereLightHelper: zE,
|
|
34467
34467
|
IcosahedronGeometry: md,
|
|
34468
34468
|
ImageBitmapLoader: tE,
|
|
34469
|
-
ImageLoader:
|
|
34469
|
+
ImageLoader: zl,
|
|
34470
34470
|
ImageUtils: l_,
|
|
34471
34471
|
IncrementStencilOp: AC,
|
|
34472
34472
|
IncrementWrapStencilOp: DC,
|
|
@@ -34475,7 +34475,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34475
34475
|
InstancedInterleavedBuffer: wE,
|
|
34476
34476
|
InstancedMesh: v_,
|
|
34477
34477
|
Int16BufferAttribute: N1,
|
|
34478
|
-
Int32BufferAttribute:
|
|
34478
|
+
Int32BufferAttribute: z1,
|
|
34479
34479
|
Int8BufferAttribute: F1,
|
|
34480
34480
|
IntType: ju,
|
|
34481
34481
|
InterleavedBuffer: od,
|
|
@@ -34495,7 +34495,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34495
34495
|
LessCompare: e_,
|
|
34496
34496
|
LessDepth: qh,
|
|
34497
34497
|
LessEqualCompare: Am,
|
|
34498
|
-
LessEqualDepth:
|
|
34498
|
+
LessEqualDepth: Ur,
|
|
34499
34499
|
LessEqualStencilFunc: kC,
|
|
34500
34500
|
LessStencilFunc: OC,
|
|
34501
34501
|
Light: Js,
|
|
@@ -34503,7 +34503,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34503
34503
|
Line: js,
|
|
34504
34504
|
Line3: OE,
|
|
34505
34505
|
LineBasicMaterial: Oi,
|
|
34506
|
-
LineCurve:
|
|
34506
|
+
LineCurve: Um,
|
|
34507
34507
|
LineCurve3: A_,
|
|
34508
34508
|
LineDashedMaterial: G_,
|
|
34509
34509
|
LineLoop: b_,
|
|
@@ -34515,7 +34515,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34515
34515
|
LinearMipmapLinearFilter: Xn,
|
|
34516
34516
|
LinearMipmapNearestFilter: nl,
|
|
34517
34517
|
LinearSRGBColorSpace: Vr,
|
|
34518
|
-
LinearToneMapping:
|
|
34518
|
+
LinearToneMapping: Uv,
|
|
34519
34519
|
LinearTransfer: Pl,
|
|
34520
34520
|
Loader: ji,
|
|
34521
34521
|
LoaderUtils: Sp,
|
|
@@ -34537,11 +34537,11 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34537
34537
|
MeshDistanceMaterial: jm,
|
|
34538
34538
|
MeshLambertMaterial: V_,
|
|
34539
34539
|
MeshMatcapMaterial: H_,
|
|
34540
|
-
MeshNormalMaterial:
|
|
34540
|
+
MeshNormalMaterial: U_,
|
|
34541
34541
|
MeshPhongMaterial: N_,
|
|
34542
34542
|
MeshPhysicalMaterial: B_,
|
|
34543
34543
|
MeshStandardMaterial: Wm,
|
|
34544
|
-
MeshToonMaterial:
|
|
34544
|
+
MeshToonMaterial: z_,
|
|
34545
34545
|
MinEquation: Sv,
|
|
34546
34546
|
MirroredRepeatWrapping: Tl,
|
|
34547
34547
|
MixOperation: Nv,
|
|
@@ -34669,7 +34669,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34669
34669
|
Skeleton: ad,
|
|
34670
34670
|
SkeletonHelper: kE,
|
|
34671
34671
|
SkinnedMesh: y_,
|
|
34672
|
-
Source:
|
|
34672
|
+
Source: Us,
|
|
34673
34673
|
Sphere: ai,
|
|
34674
34674
|
SphereGeometry: Jl,
|
|
34675
34675
|
Spherical: PE,
|
|
@@ -34702,7 +34702,7 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34702
34702
|
TimestampQuery: qC,
|
|
34703
34703
|
TorusGeometry: _d,
|
|
34704
34704
|
TorusKnotGeometry: bd,
|
|
34705
|
-
Triangle:
|
|
34705
|
+
Triangle: zi,
|
|
34706
34706
|
TriangleFanDrawMode: SC,
|
|
34707
34707
|
TriangleStripDrawMode: MC,
|
|
34708
34708
|
TrianglesDrawMode: bC,
|
|
@@ -34718,12 +34718,12 @@ const zD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
34718
34718
|
UniformsUtils: u_,
|
|
34719
34719
|
UnsignedByteType: Dn,
|
|
34720
34720
|
UnsignedInt101111Type: wm,
|
|
34721
|
-
UnsignedInt248Type:
|
|
34721
|
+
UnsignedInt248Type: Uo,
|
|
34722
34722
|
UnsignedInt5999Type: Sm,
|
|
34723
34723
|
UnsignedIntType: gs,
|
|
34724
34724
|
UnsignedShort4444Type: Yu,
|
|
34725
34725
|
UnsignedShort5551Type: $u,
|
|
34726
|
-
UnsignedShortType:
|
|
34726
|
+
UnsignedShortType: zo,
|
|
34727
34727
|
VSMShadowMap: Hn,
|
|
34728
34728
|
Vector2: ce,
|
|
34729
34729
|
Vector3: O,
|
|
@@ -34759,7 +34759,7 @@ class VD {
|
|
|
34759
34759
|
renderer;
|
|
34760
34760
|
watermark;
|
|
34761
34761
|
constructor(e) {
|
|
34762
|
-
this.engine = e, this.renderer = null, this.watermark = new nC(
|
|
34762
|
+
this.engine = e, this.renderer = null, this.watermark = new nC(UD);
|
|
34763
34763
|
}
|
|
34764
34764
|
createRenderer() {
|
|
34765
34765
|
const { width: e, height: t } = this.engine.deviceModule.getContainerSize();
|
|
@@ -34783,14 +34783,14 @@ class VD {
|
|
|
34783
34783
|
this.renderer && this.watermark.render(this.renderer);
|
|
34784
34784
|
}
|
|
34785
34785
|
}
|
|
34786
|
-
const HD = { type: "change" }, Nx = { type: "start" },
|
|
34786
|
+
const HD = { type: "change" }, Nx = { type: "start" }, zx = { type: "end" }, _t = 1e-6, Vf = Math.PI * 2, qt = {
|
|
34787
34787
|
NONE: -1,
|
|
34788
34788
|
ROTATE: 0,
|
|
34789
34789
|
PAN: 1,
|
|
34790
34790
|
DOLLY: 2,
|
|
34791
34791
|
TOUCH_ROTATE: 3,
|
|
34792
34792
|
TOUCH_DOLLY_PAN: 4
|
|
34793
|
-
}, Hf = new S(1, 0, 0), GD = new S(0, 1, 0), WD = new S(0, 0, 1), Co = new S(), rh = new S(), Mi = new S(), mt = new S(), hn = new S(), ei = new S(), un = new S(), XD = new S(), oh = new Kn(), Gf = new Kn(),
|
|
34793
|
+
}, Hf = new S(1, 0, 0), GD = new S(0, 1, 0), WD = new S(0, 0, 1), Co = new S(), rh = new S(), Mi = new S(), mt = new S(), hn = new S(), ei = new S(), un = new S(), XD = new S(), oh = new Kn(), Gf = new Kn(), Ux = /* @__PURE__ */ new Set([
|
|
34794
34794
|
"KeyW",
|
|
34795
34795
|
"KeyA",
|
|
34796
34796
|
"KeyS",
|
|
@@ -34971,7 +34971,7 @@ class vb extends Mw {
|
|
|
34971
34971
|
this._isInteracting || (this.dispatchEvent(Nx), this._isInteracting = !0), this.state = e;
|
|
34972
34972
|
}
|
|
34973
34973
|
_endInteraction() {
|
|
34974
|
-
this._isInteracting && (this._isInteracting = !1, this.state = qt.NONE, this.dispatchEvent(
|
|
34974
|
+
this._isInteracting && (this._isInteracting = !1, this.state = qt.NONE, this.dispatchEvent(zx));
|
|
34975
34975
|
}
|
|
34976
34976
|
_handleContextMenu(e) {
|
|
34977
34977
|
e.preventDefault();
|
|
@@ -35014,13 +35014,13 @@ class vb extends Mw {
|
|
|
35014
35014
|
}
|
|
35015
35015
|
}
|
|
35016
35016
|
_handleWheel(e) {
|
|
35017
|
-
!this.enabled || !this.enableZoom || (e.preventDefault(), this.dispatchEvent(Nx), this._queueZoom(Math.sign(e.deltaY)), this.update(), this.dispatchEvent(
|
|
35017
|
+
!this.enabled || !this.enableZoom || (e.preventDefault(), this.dispatchEvent(Nx), this._queueZoom(Math.sign(e.deltaY)), this.update(), this.dispatchEvent(zx));
|
|
35018
35018
|
}
|
|
35019
35019
|
_handleKeyDown(e) {
|
|
35020
35020
|
if (!this.enabled)
|
|
35021
35021
|
return;
|
|
35022
35022
|
const t = e.code || e.key;
|
|
35023
|
-
if (this.object?.isPerspectiveCamera &&
|
|
35023
|
+
if (this.object?.isPerspectiveCamera && Ux.has(t)) {
|
|
35024
35024
|
Hx(e.target) || (this._pressedKeys.add(t), this._startKeyboardMoveLoop(), e.preventDefault());
|
|
35025
35025
|
return;
|
|
35026
35026
|
}
|
|
@@ -35043,7 +35043,7 @@ class vb extends Mw {
|
|
|
35043
35043
|
}
|
|
35044
35044
|
_handleKeyUp(e) {
|
|
35045
35045
|
const t = e.code || e.key;
|
|
35046
|
-
|
|
35046
|
+
Ux.has(t) && (this._pressedKeys.delete(t), this._pressedKeys.size === 0 && this._stopKeyboardMoveLoop(), this.object?.isPerspectiveCamera && !Hx(e.target) && e.preventDefault());
|
|
35047
35047
|
}
|
|
35048
35048
|
_handleTouchStart() {
|
|
35049
35049
|
const e = Array.from(this._pointers.values());
|
|
@@ -35144,12 +35144,15 @@ class Gx extends sv {
|
|
|
35144
35144
|
detail: ""
|
|
35145
35145
|
})), this.dispatchEvent({ type: "change" });
|
|
35146
35146
|
}
|
|
35147
|
+
isPcDevice() {
|
|
35148
|
+
const e = this._Engine?.deviceModule?.getDeviceType?.() ?? this._Engine?.deviceType ?? this._Engine?.DeviceType;
|
|
35149
|
+
return e === "PC" || !e;
|
|
35150
|
+
}
|
|
35147
35151
|
addEvents() {
|
|
35148
|
-
|
|
35149
|
-
console.log("[FirstPersonCameraControl] addEvents - DeviceType:", e, "isPC:", t), t ? (console.log("[FirstPersonCameraControl] add mouse listeners - mousedown, mouseup"), this.domElement.addEventListener("mousedown", this.bindmousedown, !1), this.domElement.addEventListener("mouseup", this.bindmouseup, !1)) : (console.log("[FirstPersonCameraControl] add touch listeners"), this.domElement.addEventListener("touchstart", this.bindmousedown, !1), this.domElement.addEventListener("touchend", this.bindmouseup, !1)), this.domElement.addEventListener("mouseenter", this.bindMouseEnter, !1), this.domElement.addEventListener("mouseleave", this.bindMouseLeave, !1), window.addEventListener("keydown", this.bindonKeyDown, !1), window.addEventListener("keyup", this.bindonKeyUp, !1), window.addEventListener("blur", this.bindWindowBlur, !1), document.addEventListener("visibilitychange", this.bindVisibilityChange, !1), this.needMousewheel && (document.addEventListener && document.addEventListener("DOMMouseScroll", this.bindMousewheel, !1), window.addEventListener("mousewheel", this.bindMousewheel, !1));
|
|
35152
|
+
this.isPcDevice() ? (this.domElement.addEventListener("mousedown", this.bindmousedown, !1), this.domElement.addEventListener("mouseup", this.bindmouseup, !1)) : (this.domElement.addEventListener("touchstart", this.bindmousedown, !1), this.domElement.addEventListener("touchend", this.bindmouseup, !1)), this.domElement.addEventListener("mouseenter", this.bindMouseEnter, !1), this.domElement.addEventListener("mouseleave", this.bindMouseLeave, !1), window.addEventListener("keydown", this.bindonKeyDown, !1), window.addEventListener("keyup", this.bindonKeyUp, !1), window.addEventListener("blur", this.bindWindowBlur, !1), document.addEventListener("visibilitychange", this.bindVisibilityChange, !1), this.needMousewheel && (document.addEventListener && document.addEventListener("DOMMouseScroll", this.bindMousewheel, !1), window.addEventListener("mousewheel", this.bindMousewheel, !1));
|
|
35150
35153
|
}
|
|
35151
35154
|
removeEvents() {
|
|
35152
|
-
this.
|
|
35155
|
+
this.isPcDevice() ? (this.domElement.removeEventListener("mousedown", this.bindmousedown), this.domElement.removeEventListener("mouseup", this.bindmouseup), this.domElement.removeEventListener("mousemove", this.bindmousemove)) : (this.domElement.removeEventListener("touchstart", this.bindmousedown), this.domElement.removeEventListener("touchend", this.bindmouseup), this.domElement.removeEventListener("touchmove", this.bindmousemove)), this.domElement.removeEventListener("mouseenter", this.bindMouseEnter), this.domElement.removeEventListener("mouseleave", this.bindMouseLeave), window.removeEventListener("keydown", this.bindonKeyDown), window.removeEventListener("keyup", this.bindonKeyUp), window.removeEventListener("blur", this.bindWindowBlur), document.removeEventListener("visibilitychange", this.bindVisibilityChange), this.needMousewheel && (document.addEventListener && document.removeEventListener("DOMMouseScroll", this.bindMousewheel), window.removeEventListener("mousewheel", this.bindMousewheel));
|
|
35153
35156
|
}
|
|
35154
35157
|
onMouseEnter(e) {
|
|
35155
35158
|
this._isMouseInElement = !0;
|
|
@@ -35200,7 +35203,7 @@ class Gx extends sv {
|
|
|
35200
35203
|
onTouchMove(e) {
|
|
35201
35204
|
if (this._isEnabled == !1)
|
|
35202
35205
|
return;
|
|
35203
|
-
let t = this._prevMouseX ? e.targetTouches[0].clientX
|
|
35206
|
+
let t = this._prevMouseX ? this._prevMouseX - e.targetTouches[0].clientX : 0, i = this._prevMouseY ? this._prevMouseY - e.targetTouches[0].clientY : 0, n = this._euler.x - i * this.lookflag * this.lookSpeed;
|
|
35204
35207
|
n >= 0 ? n < this.maxRotateX ? this._euler.x = n : this._euler.x = this.maxRotateX : n > -this.maxRotateX ? this._euler.x = n : this._euler.x = -this.maxRotateX, this._euler.y -= t * this.lookSpeed, this.camera.quaternion.setFromEuler(this._euler), this.syncSharedTargetFromCamera(), this._prevMouseX = e.targetTouches[0].clientX, this._prevMouseY = e.targetTouches[0].clientY;
|
|
35205
35208
|
let r = this.GetEngine();
|
|
35206
35209
|
r.movefirst = !0, this.dispatchCameraChange();
|
|
@@ -35948,7 +35951,7 @@ function Wr(s, e) {
|
|
|
35948
35951
|
const r = s?.scene?.children?.find?.((o) => o instanceof xi ? sg(o, e) ? !0 : o.name === e && o.url === e : !1);
|
|
35949
35952
|
return r != null ? (Pp(r, e), t.set(e, r), n != null && (n.group = r), r) : null;
|
|
35950
35953
|
}
|
|
35951
|
-
function
|
|
35954
|
+
function Ul(s, e) {
|
|
35952
35955
|
const t = Wr(s, e);
|
|
35953
35956
|
return t == null ? new ht() : (t.updateWorldMatrix(!0, !1), t.matrixWorld.clone());
|
|
35954
35957
|
}
|
|
@@ -36059,7 +36062,7 @@ class QD {
|
|
|
36059
36062
|
const n = this.engine, r = e.object.url, o = e.object.name;
|
|
36060
36063
|
let a = n.modelEdge.getModelEdge(r, o);
|
|
36061
36064
|
a || (a = [0, 0, []]);
|
|
36062
|
-
const l =
|
|
36065
|
+
const l = Ul(n, r), c = this.getModelSnapCache(r, o, a);
|
|
36063
36066
|
n.camera.updateMatrixWorld(!0);
|
|
36064
36067
|
const h = new ht().multiplyMatrices(n.camera.projectionMatrix, n.camera.matrixWorldInverse), u = n.renderer.domElement.clientWidth, d = n.renderer.domElement.clientHeight, f = new ft(t.offsetX, t.offsetY), p = new qd(), g = new S(), x = new S(), m = new ft(), v = new ft(), y = new S();
|
|
36065
36068
|
let _ = "face", w = null, b = null, A = 100;
|
|
@@ -36758,17 +36761,19 @@ class eR {
|
|
|
36758
36761
|
this.mobileMoveIntensity = 0, this.updateMobileMoveKeys([]), this.restoreMobileMoveSpeed();
|
|
36759
36762
|
}
|
|
36760
36763
|
bindVirtualButton(e, t) {
|
|
36761
|
-
let i = !1;
|
|
36762
|
-
const
|
|
36763
|
-
|
|
36764
|
-
},
|
|
36765
|
-
|
|
36764
|
+
let i = !1, n = null;
|
|
36765
|
+
const r = () => {
|
|
36766
|
+
i && (i = !1, n = null, e.classList.remove("is-active"), this.setVirtualKey(t, !1));
|
|
36767
|
+
}, o = (l) => {
|
|
36768
|
+
l.preventDefault(), l.stopPropagation(), !i && (i = !0, n = l.pointerId, e.classList.add("is-active"), e.setPointerCapture?.(l.pointerId), this.setVirtualKey(t, !0));
|
|
36769
|
+
}, a = (l) => {
|
|
36770
|
+
l.preventDefault(), l.stopPropagation(), !(!i || n !== l.pointerId) && (e.releasePointerCapture?.(l.pointerId), r());
|
|
36766
36771
|
};
|
|
36767
|
-
e.addEventListener("pointerdown",
|
|
36772
|
+
e.addEventListener("pointerdown", o), e.addEventListener("pointerup", a), e.addEventListener("pointercancel", a), e.addEventListener("lostpointercapture", r);
|
|
36768
36773
|
}
|
|
36769
36774
|
createMobileRoamButton(e, t, i = "") {
|
|
36770
36775
|
const n = document.createElement("button");
|
|
36771
|
-
return n.type = "button", n.className = `bim-mobile-roam-button ${i}`.trim(), n.
|
|
36776
|
+
return n.type = "button", n.className = `bim-mobile-roam-button ${i}`.trim(), n.innerHTML = e, n.setAttribute("aria-label", t === "q" ? "Move up" : t === "e" ? "Move down" : e), this.bindVirtualButton(n, t), n;
|
|
36772
36777
|
}
|
|
36773
36778
|
bindMovePad(e) {
|
|
36774
36779
|
const t = e.querySelector(".bim-mobile-roam-move-knob"), i = (r) => {
|
|
@@ -36787,23 +36792,6 @@ class eR {
|
|
|
36787
36792
|
};
|
|
36788
36793
|
e.addEventListener("pointerup", n), e.addEventListener("pointercancel", n);
|
|
36789
36794
|
}
|
|
36790
|
-
bindLookPad(e) {
|
|
36791
|
-
const t = e.querySelector(".bim-mobile-roam-look-knob"), i = (r) => {
|
|
36792
|
-
const o = e.getBoundingClientRect(), a = Math.min(o.width, o.height) * 0.5, l = a * 0.48, c = a * 0.14, h = r.clientX - o.left - a, u = r.clientY - o.top - a, d = Math.hypot(h, u), f = Math.min(d, l), p = d > l ? l / d : 1, g = h * p, x = u * p;
|
|
36793
|
-
t && (t.style.transform = `translate(${g}px, ${x}px)`);
|
|
36794
|
-
const m = d < c ? 0 : Math.max(0, Math.min(1, (f - c) / (l - c)));
|
|
36795
|
-
this.mobileLookOffset = m === 0 ? { x: 0, y: 0 } : { x: g / l * m, y: x / l * m };
|
|
36796
|
-
};
|
|
36797
|
-
e.addEventListener("pointerdown", (r) => {
|
|
36798
|
-
r.preventDefault(), r.stopPropagation(), this.mobileLookPointerId = r.pointerId, this.getActiveRoamControl()?.setExternalLookActive?.(!0), e.classList.add("is-active"), e.setPointerCapture?.(r.pointerId), i(r);
|
|
36799
|
-
}), e.addEventListener("pointermove", (r) => {
|
|
36800
|
-
this.mobileLookPointerId === r.pointerId && (r.preventDefault(), r.stopPropagation(), i(r));
|
|
36801
|
-
});
|
|
36802
|
-
const n = (r) => {
|
|
36803
|
-
this.mobileLookPointerId === r.pointerId && (r.preventDefault(), r.stopPropagation(), e.classList.remove("is-active"), e.releasePointerCapture?.(r.pointerId), this.mobileLookPointerId = null, this.mobileLookOffset = { x: 0, y: 0 }, this.getActiveRoamControl()?.setExternalLookActive?.(!1), t && (t.style.transform = ""));
|
|
36804
|
-
};
|
|
36805
|
-
e.addEventListener("pointerup", n), e.addEventListener("pointercancel", n);
|
|
36806
|
-
}
|
|
36807
36795
|
rotateActiveRoamView(e, t) {
|
|
36808
36796
|
const i = this.getActiveRoamControl();
|
|
36809
36797
|
i && (typeof i.rotateByPointerDelta == "function" ? i.rotateByPointerDelta(e, t) : (i.rotateX?.(e), i.rotateY?.(t * 2), i.dispatchEvent?.({ type: "change" }), window.dispatchEvent(new CustomEvent("bimengine:camerachange", { detail: "" }))));
|
|
@@ -36823,23 +36811,17 @@ class eR {
|
|
|
36823
36811
|
return;
|
|
36824
36812
|
}
|
|
36825
36813
|
if (this.mobileRoamControlsEl) {
|
|
36826
|
-
this.mobileMovePointerId = null, this.releaseMobileMoveKeys(), this.mobileLookPointerId = null, this.mobileLookOffset = { x: 0, y: 0 }, this.getActiveRoamControl()?.setExternalLookActive?.(!1), this.mobileRoamControlsEl.querySelectorAll(".is-active").forEach((
|
|
36814
|
+
this.mobileMovePointerId = null, this.releaseMobileMoveKeys(), this.mobileLookPointerId = null, this.mobileLookOffset = { x: 0, y: 0 }, this.getActiveRoamControl()?.setExternalLookActive?.(!1), this.mobileRoamControlsEl.querySelectorAll(".is-active").forEach((r) => r.classList.remove("is-active")), this.mobileRoamControlsEl.querySelectorAll(".bim-mobile-roam-look-knob, .bim-mobile-roam-move-knob").forEach((r) => r.style.transform = ""), this.firstPersonControls?.resetMovementState?.(), this.thirdPersonControls?.resetMovementState?.(), this.mobileRoamControlsEl.style.display = "flex";
|
|
36827
36815
|
return;
|
|
36828
36816
|
}
|
|
36829
36817
|
const e = document.createElement("div");
|
|
36830
|
-
e.className = "bim-mobile-roam-controls", e.addEventListener("contextmenu", (
|
|
36818
|
+
e.className = "bim-mobile-roam-controls", e.addEventListener("contextmenu", (r) => r.preventDefault());
|
|
36831
36819
|
const t = document.createElement("div");
|
|
36832
36820
|
t.className = "bim-mobile-roam-pad bim-mobile-roam-move-pad";
|
|
36833
36821
|
const i = document.createElement("span");
|
|
36834
36822
|
i.className = "bim-mobile-roam-move-knob", t.appendChild(i), this.bindMovePad(t);
|
|
36835
36823
|
const n = document.createElement("div");
|
|
36836
|
-
n.className = "bim-mobile-roam-
|
|
36837
|
-
const r = document.createElement("div");
|
|
36838
|
-
r.className = "bim-mobile-roam-vertical-pad", r.appendChild(this.createMobileRoamButton("Q", "q")), r.appendChild(this.createMobileRoamButton("E", "e"));
|
|
36839
|
-
const o = document.createElement("div");
|
|
36840
|
-
o.className = "bim-mobile-roam-look-pad";
|
|
36841
|
-
const a = document.createElement("span");
|
|
36842
|
-
a.className = "bim-mobile-roam-look-knob", o.appendChild(a), this.bindLookPad(o), n.appendChild(r), n.appendChild(o), e.appendChild(t), e.appendChild(n), this.engine.container.appendChild(e), this.mobileRoamControlsEl = e;
|
|
36824
|
+
n.className = "bim-mobile-roam-vertical-pad", n.appendChild(this.createMobileRoamButton("↑", "q", "is-round")), n.appendChild(this.createMobileRoamButton("↓", "e", "is-round")), e.appendChild(t), e.appendChild(n), this.engine.container.appendChild(e), this.mobileRoamControlsEl = e;
|
|
36843
36825
|
}
|
|
36844
36826
|
removeMobileRoamControls() {
|
|
36845
36827
|
this.mobileMovePointerId = null, this.releaseMobileMoveKeys(), this.mobileLookPointerId = null, this.mobileLookOffset = { x: 0, y: 0 }, this.getActiveRoamControl()?.setExternalLookActive?.(!1), this.mobileRoamControlsEl && (this.mobileRoamControlsEl.remove(), this.mobileRoamControlsEl = null), this.firstPersonControls?.resetMovementState?.(), this.thirdPersonControls?.resetMovementState?.();
|
|
@@ -37132,14 +37114,14 @@ const BR = (s) => {
|
|
|
37132
37114
|
return i;
|
|
37133
37115
|
};
|
|
37134
37116
|
return t(s, 0);
|
|
37135
|
-
}, NR = kn("AsyncFunction"),
|
|
37117
|
+
}, NR = kn("AsyncFunction"), zR = (s) => s && (ic(s) || Gi(s)) && Gi(s.then) && Gi(s.catch), Ob = ((s, e) => s ? setImmediate : e ? ((t, i) => (Dr.addEventListener("message", ({ source: n, data: r }) => {
|
|
37136
37118
|
n === Dr && r === t && i.length && i.shift()();
|
|
37137
37119
|
}, !1), (n) => {
|
|
37138
37120
|
i.push(n), Dr.postMessage(t, "*");
|
|
37139
37121
|
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
|
|
37140
37122
|
typeof setImmediate == "function",
|
|
37141
37123
|
Gi(Dr.postMessage)
|
|
37142
|
-
),
|
|
37124
|
+
), UR = typeof queueMicrotask < "u" ? queueMicrotask.bind(Dr) : typeof process < "u" && process.nextTick || Ob, VR = (s) => s != null && Gi(s[Ad]), $ = {
|
|
37143
37125
|
isArray: la,
|
|
37144
37126
|
isArrayBuffer: Pb,
|
|
37145
37127
|
isBuffer: tc,
|
|
@@ -37194,9 +37176,9 @@ const BR = (s) => {
|
|
|
37194
37176
|
isSpecCompliantForm: kR,
|
|
37195
37177
|
toJSONObject: BR,
|
|
37196
37178
|
isAsyncFn: NR,
|
|
37197
|
-
isThenable:
|
|
37179
|
+
isThenable: zR,
|
|
37198
37180
|
setImmediate: Ob,
|
|
37199
|
-
asap:
|
|
37181
|
+
asap: UR,
|
|
37200
37182
|
isIterable: VR
|
|
37201
37183
|
};
|
|
37202
37184
|
function rt(s, e, t, i, n) {
|
|
@@ -37364,7 +37346,7 @@ Nb.toString = function(e) {
|
|
|
37364
37346
|
function XR(s) {
|
|
37365
37347
|
return encodeURIComponent(s).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
37366
37348
|
}
|
|
37367
|
-
function
|
|
37349
|
+
function zb(s, e, t) {
|
|
37368
37350
|
if (!e)
|
|
37369
37351
|
return s;
|
|
37370
37352
|
const i = t && t.encode || XR;
|
|
@@ -37433,7 +37415,7 @@ class qx {
|
|
|
37433
37415
|
});
|
|
37434
37416
|
}
|
|
37435
37417
|
}
|
|
37436
|
-
const
|
|
37418
|
+
const Ub = {
|
|
37437
37419
|
silentJSONParsing: !0,
|
|
37438
37420
|
forcedJSONParsing: !0,
|
|
37439
37421
|
clarifyTimeoutError: !1
|
|
@@ -37503,7 +37485,7 @@ function nI(s, e, t) {
|
|
|
37503
37485
|
return (t || JSON.stringify)(s);
|
|
37504
37486
|
}
|
|
37505
37487
|
const sc = {
|
|
37506
|
-
transitional:
|
|
37488
|
+
transitional: Ub,
|
|
37507
37489
|
adapter: ["xhr", "http", "fetch"],
|
|
37508
37490
|
transformRequest: [function(e, t) {
|
|
37509
37491
|
const i = t.getContentType() || "", n = i.indexOf("application/json") > -1, r = $.isObject(e);
|
|
@@ -37966,7 +37948,7 @@ function Xr(s, e) {
|
|
|
37966
37948
|
const Xb = (s) => {
|
|
37967
37949
|
const e = Xr({}, s);
|
|
37968
37950
|
let { data: t, withXSRFToken: i, xsrfHeaderName: n, xsrfCookieName: r, headers: o, auth: a } = e;
|
|
37969
|
-
if (e.headers = o = Wi.from(o), e.url =
|
|
37951
|
+
if (e.headers = o = Wi.from(o), e.url = zb(Wb(e.baseURL, e.url, e.allowAbsoluteUrls), s.params, s.paramsSerializer), a && o.set(
|
|
37970
37952
|
"Authorization",
|
|
37971
37953
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
37972
37954
|
), $.isFormData(t)) {
|
|
@@ -38023,7 +38005,7 @@ const Xb = (s) => {
|
|
|
38023
38005
|
b.event = _ || null, i(b), x = null;
|
|
38024
38006
|
}, x.ontimeout = function() {
|
|
38025
38007
|
let _ = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
|
|
38026
|
-
const w = n.transitional ||
|
|
38008
|
+
const w = n.transitional || Ub;
|
|
38027
38009
|
n.timeoutErrorMessage && (_ = n.timeoutErrorMessage), i(new rt(
|
|
38028
38010
|
_,
|
|
38029
38011
|
w.clarifyTimeoutError ? rt.ETIMEDOUT : rt.ECONNABORTED,
|
|
@@ -38406,7 +38388,7 @@ function AI(s, e, t) {
|
|
|
38406
38388
|
const Dh = {
|
|
38407
38389
|
assertOptions: AI,
|
|
38408
38390
|
validators: Id
|
|
38409
|
-
},
|
|
38391
|
+
}, Un = Dh.validators;
|
|
38410
38392
|
let Nr = class {
|
|
38411
38393
|
constructor(e) {
|
|
38412
38394
|
this.defaults = e || {}, this.interceptors = {
|
|
@@ -38443,17 +38425,17 @@ let Nr = class {
|
|
|
38443
38425
|
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = Xr(this.defaults, t);
|
|
38444
38426
|
const { transitional: i, paramsSerializer: n, headers: r } = t;
|
|
38445
38427
|
i !== void 0 && Dh.assertOptions(i, {
|
|
38446
|
-
silentJSONParsing:
|
|
38447
|
-
forcedJSONParsing:
|
|
38448
|
-
clarifyTimeoutError:
|
|
38428
|
+
silentJSONParsing: Un.transitional(Un.boolean),
|
|
38429
|
+
forcedJSONParsing: Un.transitional(Un.boolean),
|
|
38430
|
+
clarifyTimeoutError: Un.transitional(Un.boolean)
|
|
38449
38431
|
}, !1), n != null && ($.isFunction(n) ? t.paramsSerializer = {
|
|
38450
38432
|
serialize: n
|
|
38451
38433
|
} : Dh.assertOptions(n, {
|
|
38452
|
-
encode:
|
|
38453
|
-
serialize:
|
|
38434
|
+
encode: Un.function,
|
|
38435
|
+
serialize: Un.function
|
|
38454
38436
|
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), Dh.assertOptions(t, {
|
|
38455
|
-
baseUrl:
|
|
38456
|
-
withXsrfToken:
|
|
38437
|
+
baseUrl: Un.spelling("baseURL"),
|
|
38438
|
+
withXsrfToken: Un.spelling("withXSRFToken")
|
|
38457
38439
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
38458
38440
|
let o = r && $.merge(
|
|
38459
38441
|
r.common,
|
|
@@ -38504,7 +38486,7 @@ let Nr = class {
|
|
|
38504
38486
|
getUri(e) {
|
|
38505
38487
|
e = Xr(this.defaults, e);
|
|
38506
38488
|
const t = Wb(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
38507
|
-
return
|
|
38489
|
+
return zb(t, e.params, e.paramsSerializer);
|
|
38508
38490
|
}
|
|
38509
38491
|
};
|
|
38510
38492
|
$.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -38724,8 +38706,8 @@ const {
|
|
|
38724
38706
|
isAxiosError: kN,
|
|
38725
38707
|
spread: BN,
|
|
38726
38708
|
toFormData: NN,
|
|
38727
|
-
AxiosHeaders:
|
|
38728
|
-
HttpStatusCode:
|
|
38709
|
+
AxiosHeaders: zN,
|
|
38710
|
+
HttpStatusCode: UN,
|
|
38729
38711
|
formToJSON: VN,
|
|
38730
38712
|
getAdapter: HN,
|
|
38731
38713
|
mergeConfig: GN
|
|
@@ -38860,10 +38842,10 @@ function BI() {
|
|
|
38860
38842
|
function NI(s) {
|
|
38861
38843
|
s.firstHitOnly = !0;
|
|
38862
38844
|
}
|
|
38863
|
-
function
|
|
38845
|
+
function zI(s) {
|
|
38864
38846
|
delete s.firstHitOnly;
|
|
38865
38847
|
}
|
|
38866
|
-
function
|
|
38848
|
+
function UI(s, e = Jb) {
|
|
38867
38849
|
if (s == null)
|
|
38868
38850
|
return !1;
|
|
38869
38851
|
const t = s;
|
|
@@ -38882,7 +38864,7 @@ function HI(s, e = {}) {
|
|
|
38882
38864
|
if (s == null)
|
|
38883
38865
|
return;
|
|
38884
38866
|
const t = e.triangleThreshold ?? Jb;
|
|
38885
|
-
if (!
|
|
38867
|
+
if (!UI(s, t)) {
|
|
38886
38868
|
e.setBoundingBox === !0 && s.boundingBox == null && s.computeBoundingBox(), e.setBoundingSphere === !0 && s.boundingSphere == null && s.computeBoundingSphere();
|
|
38887
38869
|
return;
|
|
38888
38870
|
}
|
|
@@ -38896,7 +38878,7 @@ function HI(s, e = {}) {
|
|
|
38896
38878
|
}
|
|
38897
38879
|
}
|
|
38898
38880
|
let Ra = null, Ia = null, cy = null;
|
|
38899
|
-
const GI = 8, Qb = 24, WI = 24, XI = 64, jI =
|
|
38881
|
+
const GI = 8, Qb = 24, WI = 24, XI = 64, jI = 200, YI = 10;
|
|
38900
38882
|
function eM() {
|
|
38901
38883
|
return Tt("draco/", import.meta.url);
|
|
38902
38884
|
}
|
|
@@ -39676,7 +39658,7 @@ class LL {
|
|
|
39676
39658
|
});
|
|
39677
39659
|
}
|
|
39678
39660
|
}
|
|
39679
|
-
const ul = 1, qf = 20, OL = 1800, my = 1024, FL = 1.35, kL = 3, BL = 1200, Kf = 0.5, NL = 10,
|
|
39661
|
+
const ul = 1, qf = 20, OL = 1800, my = 1024, FL = 1.35, kL = 3, BL = 1200, Kf = 0.5, NL = 10, zL = 0.08, Zf = 500, gy = 5e4, xy = 120, UL = 5e4, yy = 0.12, VL = 8, HL = 0.75, vy = 5e-5, GL = 15e-4, WL = 2.5, XL = 2.4, jL = 4.5, YL = 0.94, $L = 0.995, qL = 80, KL = 0.06, ZL = 8, JL = new S(-1, 4, 2).normalize();
|
|
39680
39662
|
class QL {
|
|
39681
39663
|
// 引擎实例,要求至少提供 scene、controls、octreeBox 等运行时对象。
|
|
39682
39664
|
engine;
|
|
@@ -39707,13 +39689,13 @@ class QL {
|
|
|
39707
39689
|
* 初始化场景基础光照,并把投影灯引用挂到 scene 上供后续更新使用。
|
|
39708
39690
|
*/
|
|
39709
39691
|
init() {
|
|
39710
|
-
const e = new
|
|
39692
|
+
const e = new zs(16774630, 5);
|
|
39711
39693
|
e.name = "directionalShadowLight", e.castShadow = !0, e.shadow.mapSize.width = my, e.shadow.mapSize.height = my, e.shadow.camera.near = Kf, e.shadow.camera.far = Zf, e.shadow.bias = -vy, e.shadow.normalBias = yy;
|
|
39712
39694
|
const t = qf;
|
|
39713
39695
|
e.shadow.camera.left = -t, e.shadow.camera.right = t, e.shadow.camera.top = t, e.shadow.camera.bottom = -t, e.shadow.radius = 2, e.shadow.intensity = ul, e.target.name = "directionalShadowLightTarget";
|
|
39714
|
-
const i = new
|
|
39696
|
+
const i = new zs(16777215, 0.5);
|
|
39715
39697
|
i.name = "directionalFillLight", this.engine.scene.add(e), this.engine.scene.add(e.target), this.engine.scene.add(i), this.engine.scene.dirLight = i, this.engine.scene.dirLightShadow = e, this.engine.scene.dirLightShodow = e;
|
|
39716
|
-
const n = new
|
|
39698
|
+
const n = new zh(16777215, 1);
|
|
39717
39699
|
this.engine.scene.add(n);
|
|
39718
39700
|
}
|
|
39719
39701
|
/**
|
|
@@ -39749,7 +39731,7 @@ class QL {
|
|
|
39749
39731
|
), d = Qe.clamp(
|
|
39750
39732
|
Math.max(u * 2.5, o * 0.75, xy),
|
|
39751
39733
|
xy,
|
|
39752
|
-
|
|
39734
|
+
UL
|
|
39753
39735
|
), f = this.getLightOffsetDirection(), p = this.snapShadowTargetToTexel(
|
|
39754
39736
|
l,
|
|
39755
39737
|
f,
|
|
@@ -39825,7 +39807,7 @@ class QL {
|
|
|
39825
39807
|
}
|
|
39826
39808
|
if (Number.isFinite(c) && Number.isFinite(h)) {
|
|
39827
39809
|
const u = Math.max(
|
|
39828
|
-
(h - c) *
|
|
39810
|
+
(h - c) * zL,
|
|
39829
39811
|
NL
|
|
39830
39812
|
), d = Math.max(Kf, c - u), f = Qe.clamp(
|
|
39831
39813
|
Math.max(d + 1, h + u),
|
|
@@ -39869,8 +39851,8 @@ class QL {
|
|
|
39869
39851
|
if (!e)
|
|
39870
39852
|
return null;
|
|
39871
39853
|
const t = e.dirLightShadow ?? e.dirLightShodow;
|
|
39872
|
-
return t instanceof
|
|
39873
|
-
(i) => i instanceof
|
|
39854
|
+
return t instanceof zs && t.castShadow ? t : e.children.find(
|
|
39855
|
+
(i) => i instanceof zs && i.castShadow
|
|
39874
39856
|
) ?? null;
|
|
39875
39857
|
}
|
|
39876
39858
|
/**
|
|
@@ -40370,7 +40352,7 @@ class eO {
|
|
|
40370
40352
|
}
|
|
40371
40353
|
getNodeWorldBox(e, t) {
|
|
40372
40354
|
if (Array.isArray(t?.infos) && t.infos.length > 0) {
|
|
40373
|
-
const i =
|
|
40355
|
+
const i = Ul(this.engine, e.url), n = t.infos.map((r) => r?.box).filter((r) => r instanceof Lt).map((r) => r.clone().applyMatrix4(i));
|
|
40374
40356
|
return this.getMergedBox(n);
|
|
40375
40357
|
}
|
|
40376
40358
|
if (Array.isArray(t?.indexes) && t.indexes.length > 0) {
|
|
@@ -41232,7 +41214,7 @@ class rO {
|
|
|
41232
41214
|
setShadows(e) {
|
|
41233
41215
|
this.engine.renderer && (this.engine.renderer.shadowMap.enabled = e);
|
|
41234
41216
|
const t = this.engine.scene?.children.find(
|
|
41235
|
-
(i) => i instanceof
|
|
41217
|
+
(i) => i instanceof zs
|
|
41236
41218
|
);
|
|
41237
41219
|
t && (t.castShadow = e), this.engine.scene?.traverse((i) => {
|
|
41238
41220
|
i.material && (i.castShadow !== void 0 && (i.castShadow = e), i.receiveShadow !== void 0 && (i.receiveShadow = e));
|
|
@@ -41299,7 +41281,7 @@ class rO {
|
|
|
41299
41281
|
*/
|
|
41300
41282
|
setShadowQuality(e) {
|
|
41301
41283
|
const t = this.engine.scene?.children.find(
|
|
41302
|
-
(r) => r instanceof
|
|
41284
|
+
(r) => r instanceof zs
|
|
41303
41285
|
), n = {
|
|
41304
41286
|
low: 1024,
|
|
41305
41287
|
medium: 2048,
|
|
@@ -41727,7 +41709,7 @@ function lO(s, e, t) {
|
|
|
41727
41709
|
alpha: !0
|
|
41728
41710
|
});
|
|
41729
41711
|
N.setSize(k, B), N.setClearAlpha(0), i.sceneOrtho.renderer = N;
|
|
41730
|
-
let X = new
|
|
41712
|
+
let X = new zh(16777215, 0.8);
|
|
41731
41713
|
i.sceneOrtho.add(X), aO(o, N), i.orbitControls = new vb(s, i.camera, o), i.orbitControls.enableZoom = !1, i.orbitControls.enablePan = !1, i.orbitControls.enableDamping = !0, i.orbitControls.dampingFactor = 0.1, i.orbitControls.rotateSpeed = 0.5, i.orbitControls.addEventListener("start", b), i.orbitControls.addEventListener("change", A), i.orbitControls.addEventListener("end", L);
|
|
41732
41714
|
}
|
|
41733
41715
|
let w = !1;
|
|
@@ -41785,7 +41767,7 @@ function lO(s, e, t) {
|
|
|
41785
41767
|
new kw({
|
|
41786
41768
|
color: 255
|
|
41787
41769
|
});
|
|
41788
|
-
var B = new lt(new
|
|
41770
|
+
var B = new lt(new Uh(110, 110, 110), k);
|
|
41789
41771
|
i.sceneOrtho.add(B), C(122);
|
|
41790
41772
|
let N = { x: 0, y: 0 };
|
|
41791
41773
|
o.addEventListener("mousedown", (X) => {
|
|
@@ -42005,7 +41987,7 @@ function lO(s, e, t) {
|
|
|
42005
41987
|
l.push(R(N[X]));
|
|
42006
41988
|
}
|
|
42007
41989
|
function R(T) {
|
|
42008
|
-
const P = new
|
|
41990
|
+
const P = new Uh(T.a, T.b, T.c), k = new Pi({
|
|
42009
41991
|
color: "blue",
|
|
42010
41992
|
transparent: !0,
|
|
42011
41993
|
opacity: 0.01
|
|
@@ -42162,7 +42144,7 @@ function hO(s) {
|
|
|
42162
42144
|
const T = u.get(R.url);
|
|
42163
42145
|
if (T == null)
|
|
42164
42146
|
return;
|
|
42165
|
-
const P =
|
|
42147
|
+
const P = Ul(s, R.url);
|
|
42166
42148
|
(R.lods ?? []).forEach((k) => {
|
|
42167
42149
|
let B = k.octreeBox;
|
|
42168
42150
|
x(t, B, R, T, P);
|
|
@@ -42171,7 +42153,7 @@ function hO(s) {
|
|
|
42171
42153
|
const p = o.map((R) => _(R)).filter((R) => R instanceof lt);
|
|
42172
42154
|
NI(t);
|
|
42173
42155
|
const g = t.intersectObjects(p, !1).map(A);
|
|
42174
|
-
return
|
|
42156
|
+
return zI(t), g;
|
|
42175
42157
|
function x(R, T, P, k, B) {
|
|
42176
42158
|
if (T == null)
|
|
42177
42159
|
return;
|
|
@@ -42990,10 +42972,10 @@ class xO {
|
|
|
42990
42972
|
_loadHdr(e) {
|
|
42991
42973
|
const t = Tt(e, import.meta.url);
|
|
42992
42974
|
return new Promise((i, n) => {
|
|
42993
|
-
new
|
|
42975
|
+
new zw().load(
|
|
42994
42976
|
t,
|
|
42995
42977
|
(r) => {
|
|
42996
|
-
r.mapping =
|
|
42978
|
+
r.mapping = Uw, i(r);
|
|
42997
42979
|
},
|
|
42998
42980
|
void 0,
|
|
42999
42981
|
(r) => n(r)
|
|
@@ -43035,12 +43017,12 @@ class xO {
|
|
|
43035
43017
|
}
|
|
43036
43018
|
_getAmbientLightIntensity() {
|
|
43037
43019
|
return this.engine.scene?.children.find(
|
|
43038
|
-
(t) => t instanceof
|
|
43020
|
+
(t) => t instanceof zh
|
|
43039
43021
|
)?.intensity ?? 1;
|
|
43040
43022
|
}
|
|
43041
43023
|
_setAmbientLightIntensity(e) {
|
|
43042
43024
|
const t = this.engine.scene?.children.find(
|
|
43043
|
-
(i) => i instanceof
|
|
43025
|
+
(i) => i instanceof zh
|
|
43044
43026
|
);
|
|
43045
43027
|
t && (t.intensity = e);
|
|
43046
43028
|
}
|
|
@@ -43320,6 +43302,7 @@ class DO {
|
|
|
43320
43302
|
modelEdgeLoaded = !1;
|
|
43321
43303
|
modelEdgeLoadingPromise = null;
|
|
43322
43304
|
indexes = /* @__PURE__ */ new Map();
|
|
43305
|
+
highlightIndexes = /* @__PURE__ */ new Map();
|
|
43323
43306
|
highlightEdgeSyncVersion = 0;
|
|
43324
43307
|
getModelEntry(e) {
|
|
43325
43308
|
return this.engine?.models?.find((t) => t?.url === e) ?? null;
|
|
@@ -43347,6 +43330,21 @@ class DO {
|
|
|
43347
43330
|
const i = this.getModelEntry(e), n = Array.isArray(i?.modelEdge) ? i.modelEdge[t] : null;
|
|
43348
43331
|
return Array.isArray(n?.points) ? n.points : null;
|
|
43349
43332
|
}
|
|
43333
|
+
getLineByUrl(e) {
|
|
43334
|
+
return this.groupEdge.children.find((t) => t.url == e) ?? null;
|
|
43335
|
+
}
|
|
43336
|
+
getHighlightIndex(e) {
|
|
43337
|
+
const t = this.highlightIndexes.get(e);
|
|
43338
|
+
if (t)
|
|
43339
|
+
return t;
|
|
43340
|
+
const i = this.getModelEntry(e), n = Array.isArray(i?.modelEdge) ? i.modelEdge : null;
|
|
43341
|
+
if (!n)
|
|
43342
|
+
return null;
|
|
43343
|
+
const r = /* @__PURE__ */ new Map();
|
|
43344
|
+
return n.forEach((o, a) => {
|
|
43345
|
+
r.set(Number(o?.id), a);
|
|
43346
|
+
}), this.highlightIndexes.set(e, r), r;
|
|
43347
|
+
}
|
|
43350
43348
|
constructor(e) {
|
|
43351
43349
|
this.engine = e, this.groupEdge = this.engine.scene.getObjectByName("groupEdge"), this.highlightEdgeGroup = new xi(), this.highlightEdgeGroup.name = "highlightModelEdgeGroup", this.highlightEdgeGroup.renderOrder = 999, this.engine.scene.add(this.highlightEdgeGroup), this.material = new Gs({
|
|
43352
43350
|
color: 0,
|
|
@@ -43453,22 +43451,22 @@ class DO {
|
|
|
43453
43451
|
const i = t?.url;
|
|
43454
43452
|
if (typeof i != "string" || i.length === 0)
|
|
43455
43453
|
return;
|
|
43456
|
-
const n = this.groupEdge.children.find((
|
|
43454
|
+
const n = this.groupEdge.children.find((h) => h.url == i);
|
|
43457
43455
|
if (n) {
|
|
43458
43456
|
n.visible = !0;
|
|
43459
43457
|
return;
|
|
43460
43458
|
}
|
|
43461
|
-
const r = [];
|
|
43462
|
-
if ((Array.isArray(t?.modelEdge) ? t.modelEdge : []).forEach((
|
|
43463
|
-
(Array.isArray(
|
|
43464
|
-
|
|
43459
|
+
const r = [], o = /* @__PURE__ */ new Map();
|
|
43460
|
+
if ((Array.isArray(t?.modelEdge) ? t.modelEdge : []).forEach((h, u) => {
|
|
43461
|
+
o.set(Number(h?.id), u), (Array.isArray(h?.points) ? h.points : []).forEach((f) => {
|
|
43462
|
+
f?.length === 2 && (r.push(f[0].X), r.push(f[0].Z), r.push(-f[0].Y), r.push(f[1].X), r.push(f[1].Z), r.push(-f[1].Y));
|
|
43465
43463
|
});
|
|
43466
43464
|
}), r.length === 0)
|
|
43467
43465
|
return;
|
|
43468
|
-
const
|
|
43469
|
-
|
|
43470
|
-
const
|
|
43471
|
-
|
|
43466
|
+
const l = new rn();
|
|
43467
|
+
l.setAttribute("position", new Gh(r, 3));
|
|
43468
|
+
const c = new lp(l, this.material);
|
|
43469
|
+
c.url = i, this.setLineTransform(c, Ul(this.engine, i)), this.groupEdge.add(c), this.highlightIndexes.set(i, o), this.releaseIndexes(i);
|
|
43472
43470
|
});
|
|
43473
43471
|
}
|
|
43474
43472
|
/**
|
|
@@ -43500,12 +43498,12 @@ class DO {
|
|
|
43500
43498
|
}
|
|
43501
43499
|
async syncHighlightModelEdgesAsync(e, t) {
|
|
43502
43500
|
await this.loadModelEdge(), t === this.highlightEdgeSyncVersion && (this.disposeHighlightEdges(), e.forEach((i) => {
|
|
43503
|
-
const n = this.
|
|
43501
|
+
const n = this.getHighlightIndex(i.url);
|
|
43504
43502
|
if (!n || !Array.isArray(i.ids))
|
|
43505
43503
|
return;
|
|
43506
43504
|
const r = [];
|
|
43507
43505
|
if (i.ids.forEach((l) => {
|
|
43508
|
-
const c = n
|
|
43506
|
+
const c = n?.get(Number(l)), h = typeof c == "number" ? this.getEdgePointsByIndex(i.url, c) : null;
|
|
43509
43507
|
if (Array.isArray(h)) {
|
|
43510
43508
|
if (h.length > bO)
|
|
43511
43509
|
return;
|
|
@@ -43516,7 +43514,7 @@ class DO {
|
|
|
43516
43514
|
const o = new rn();
|
|
43517
43515
|
o.setAttribute("position", new Gh(r, 3));
|
|
43518
43516
|
const a = new lp(o, this.highlightEdgeMaterial);
|
|
43519
|
-
a.name = "highlightModelEdge", a.url = i.url, this.setLineTransform(a,
|
|
43517
|
+
a.name = "highlightModelEdge", a.url = i.url, this.setLineTransform(a, Ul(this.engine, i.url)), this.highlightEdgeGroup.add(a);
|
|
43520
43518
|
}));
|
|
43521
43519
|
}
|
|
43522
43520
|
appendEdgePositions(e, t) {
|
|
@@ -43543,21 +43541,22 @@ class DO {
|
|
|
43543
43541
|
}
|
|
43544
43542
|
// 隐藏边线
|
|
43545
43543
|
hideModelEdge(e, t) {
|
|
43546
|
-
const i = this.getOrCreateItemIndex(e);
|
|
43547
|
-
if (!
|
|
43544
|
+
const i = this.getLineByUrl(e), n = this.getOrCreateItemIndex(e);
|
|
43545
|
+
if (!n) {
|
|
43548
43546
|
this.loadModelEdge();
|
|
43549
43547
|
return;
|
|
43550
43548
|
}
|
|
43551
|
-
const
|
|
43552
|
-
if (
|
|
43553
|
-
|
|
43554
|
-
|
|
43555
|
-
|
|
43556
|
-
|
|
43557
|
-
|
|
43558
|
-
|
|
43559
|
-
|
|
43549
|
+
const r = n.get(Number(t));
|
|
43550
|
+
if (!r)
|
|
43551
|
+
return;
|
|
43552
|
+
const [o, a] = r;
|
|
43553
|
+
if (i) {
|
|
43554
|
+
const l = i.geometry.attributes.position.array;
|
|
43555
|
+
for (let c = o; c < a; c++)
|
|
43556
|
+
l[c] = NaN;
|
|
43557
|
+
i.geometry.attributes.position.needsUpdate = !0;
|
|
43560
43558
|
}
|
|
43559
|
+
this.releaseIndexes(e);
|
|
43561
43560
|
}
|
|
43562
43561
|
// 设置边线材质透明度
|
|
43563
43562
|
setOpacity(e) {
|
|
@@ -43565,28 +43564,29 @@ class DO {
|
|
|
43565
43564
|
}
|
|
43566
43565
|
// 显示边线
|
|
43567
43566
|
showModelEdge(e, t) {
|
|
43568
|
-
const i = this.getOrCreateItemIndex(e);
|
|
43569
|
-
if (!
|
|
43567
|
+
const i = this.getLineByUrl(e), n = this.getOrCreateItemIndex(e);
|
|
43568
|
+
if (!n) {
|
|
43570
43569
|
this.loadModelEdge();
|
|
43571
43570
|
return;
|
|
43572
43571
|
}
|
|
43573
|
-
const
|
|
43574
|
-
if (
|
|
43575
|
-
|
|
43576
|
-
|
|
43577
|
-
|
|
43578
|
-
|
|
43579
|
-
|
|
43580
|
-
|
|
43581
|
-
|
|
43582
|
-
|
|
43583
|
-
|
|
43584
|
-
|
|
43585
|
-
u += 3;
|
|
43572
|
+
const r = n.get(Number(t));
|
|
43573
|
+
if (!r)
|
|
43574
|
+
return;
|
|
43575
|
+
const [o, a, l] = r, c = typeof l == "number" ? this.getEdgePointsByIndex(e, l) : null;
|
|
43576
|
+
if (i && Array.isArray(c)) {
|
|
43577
|
+
const h = i.geometry.attributes.position.array;
|
|
43578
|
+
let u = 0;
|
|
43579
|
+
for (let d = o; d < a; d += 3) {
|
|
43580
|
+
const f = Math.floor(u / 6), p = u % 6 >= 3;
|
|
43581
|
+
if (c[f] && c[f].length === 2) {
|
|
43582
|
+
const g = p ? c[f][1] : c[f][0];
|
|
43583
|
+
h[d] = g.X, h[d + 1] = g.Z, h[d + 2] = -g.Y;
|
|
43586
43584
|
}
|
|
43587
|
-
|
|
43585
|
+
u += 3;
|
|
43588
43586
|
}
|
|
43587
|
+
i.geometry.attributes.position.needsUpdate = !0;
|
|
43589
43588
|
}
|
|
43589
|
+
this.releaseIndexes(e);
|
|
43590
43590
|
}
|
|
43591
43591
|
}
|
|
43592
43592
|
const Sy = {
|
|
@@ -43602,7 +43602,7 @@ const Sy = {
|
|
|
43602
43602
|
cloudDensity: 0.4,
|
|
43603
43603
|
cloudElevation: 0.5,
|
|
43604
43604
|
showSunDisc: !0
|
|
43605
|
-
}, Np = "sunrise_clear", yM = 0.2,
|
|
43605
|
+
}, Np = "sunrise_clear", yM = 0.2, zp = [
|
|
43606
43606
|
{
|
|
43607
43607
|
id: "sunrise_clear",
|
|
43608
43608
|
names: ["晴朗日出", "晴朗日出", "Clear Sunrise"],
|
|
@@ -43773,7 +43773,7 @@ const Sy = {
|
|
|
43773
43773
|
showSunDisc: !1
|
|
43774
43774
|
}
|
|
43775
43775
|
}
|
|
43776
|
-
], wy =
|
|
43776
|
+
], wy = zp.reduce(
|
|
43777
43777
|
(s, e) => (s[e.id] = e, s),
|
|
43778
43778
|
{}
|
|
43779
43779
|
), Cy = 2e6;
|
|
@@ -43827,10 +43827,10 @@ class RO {
|
|
|
43827
43827
|
return this.currentPreset;
|
|
43828
43828
|
}
|
|
43829
43829
|
getPresetNames() {
|
|
43830
|
-
return
|
|
43830
|
+
return zp.map((e) => e.id);
|
|
43831
43831
|
}
|
|
43832
43832
|
getPresetList() {
|
|
43833
|
-
return
|
|
43833
|
+
return zp.map((e) => ({
|
|
43834
43834
|
id: e.id,
|
|
43835
43835
|
names: [...e.names],
|
|
43836
43836
|
params: { ...e.params }
|
|
@@ -44112,7 +44112,7 @@ class IO {
|
|
|
44112
44112
|
}
|
|
44113
44113
|
_getDirectionalLightShadowIntensity() {
|
|
44114
44114
|
const e = this.engine.scene?.children?.filter(
|
|
44115
|
-
(i) => i instanceof
|
|
44115
|
+
(i) => i instanceof zs
|
|
44116
44116
|
);
|
|
44117
44117
|
return !e || e.length === 0 ? ul : (e.find((i) => i.castShadow) ?? e[0]).shadow?.intensity ?? ul;
|
|
44118
44118
|
}
|
|
@@ -44147,7 +44147,7 @@ class IO {
|
|
|
44147
44147
|
}
|
|
44148
44148
|
_updateDirectionalLight(e) {
|
|
44149
44149
|
const t = this.engine.scene?.children.find(
|
|
44150
|
-
(i) => i instanceof
|
|
44150
|
+
(i) => i instanceof zs
|
|
44151
44151
|
);
|
|
44152
44152
|
t && e(t);
|
|
44153
44153
|
}
|
|
@@ -44813,7 +44813,7 @@ class NO {
|
|
|
44813
44813
|
}
|
|
44814
44814
|
}
|
|
44815
44815
|
}
|
|
44816
|
-
class
|
|
44816
|
+
class zO {
|
|
44817
44817
|
engine;
|
|
44818
44818
|
tools;
|
|
44819
44819
|
points = [];
|
|
@@ -45040,7 +45040,7 @@ class dl {
|
|
|
45040
45040
|
}
|
|
45041
45041
|
}
|
|
45042
45042
|
}
|
|
45043
|
-
class
|
|
45043
|
+
class UO {
|
|
45044
45044
|
engine;
|
|
45045
45045
|
isActive = !1;
|
|
45046
45046
|
points = [];
|
|
@@ -45147,7 +45147,7 @@ class VO {
|
|
|
45147
45147
|
volumeAnnotation: []
|
|
45148
45148
|
};
|
|
45149
45149
|
constructor(e) {
|
|
45150
|
-
this.engine = e, this.clearHeightMeasure = new LO(e), this.distanceMeasure = new OO(e), this.clearDistanceMeasure = new FO(e), this.elevationMeasure = new kO(e), this.pointMeasure = new BO(e), this.angleMeasure = new NO(e), this.areaMeasure = new
|
|
45150
|
+
this.engine = e, this.clearHeightMeasure = new LO(e), this.distanceMeasure = new OO(e), this.clearDistanceMeasure = new FO(e), this.elevationMeasure = new kO(e), this.pointMeasure = new BO(e), this.angleMeasure = new NO(e), this.areaMeasure = new zO(e), this.slopeMeasure = new dl(e), this.faceDistanceMeasure = new UO(e), this.tools = new Ms(e), this.annotationContainer = document.createElement("div"), this.annotationContainer.className = "annotation-container", e.container.appendChild(this.annotationContainer);
|
|
45151
45151
|
}
|
|
45152
45152
|
setContextMenuDisabled(e) {
|
|
45153
45153
|
this.engine?.engineStatus != null && (this.engine.engineStatus.isDisableContextMenu = e);
|
|
@@ -46523,7 +46523,7 @@ class XO {
|
|
|
46523
46523
|
* - 平移到 plane 上
|
|
46524
46524
|
*/
|
|
46525
46525
|
createPlaneBrush(e, t, i) {
|
|
46526
|
-
const n = new
|
|
46526
|
+
const n = new Uh(t, t, i), r = e.coplanarPoint(new S()), o = new Kn().setFromUnitVectors(
|
|
46527
46527
|
new S(0, 0, 1),
|
|
46528
46528
|
e.normal.clone().normalize()
|
|
46529
46529
|
), a = new ht().compose(r, o, new S(1, 1, 1));
|
|
@@ -47421,8 +47421,32 @@ class JO {
|
|
|
47421
47421
|
getstate() {
|
|
47422
47422
|
return this.isVisible;
|
|
47423
47423
|
}
|
|
47424
|
+
isMobileDevice() {
|
|
47425
|
+
return this.engine?.deviceModule?.isMobile?.() === !0 || this.engine?.deviceType === "mobile";
|
|
47426
|
+
}
|
|
47427
|
+
applyContainerPosition() {
|
|
47428
|
+
if (this.miniMapContainer) {
|
|
47429
|
+
if (this.isMobileDevice()) {
|
|
47430
|
+
this.miniMapContainer.style.top = "20px", this.miniMapContainer.style.right = "20px", this.miniMapContainer.style.bottom = "", this.miniMapContainer.style.left = "", this.miniMapContainer.style.zIndex = "9999";
|
|
47431
|
+
return;
|
|
47432
|
+
}
|
|
47433
|
+
this.miniMapContainer.style.top = "", this.miniMapContainer.style.right = "", this.miniMapContainer.style.bottom = "20px", this.miniMapContainer.style.left = "20px", this.miniMapContainer.style.zIndex = "200";
|
|
47434
|
+
}
|
|
47435
|
+
}
|
|
47436
|
+
applySizeToggleButtonPosition() {
|
|
47437
|
+
this.sizeToggleButton && (this.sizeToggleButton.style.left = "", this.sizeToggleButton.style.top = "", this.sizeToggleButton.style.right = "6px", this.sizeToggleButton.style.bottom = "6px");
|
|
47438
|
+
}
|
|
47439
|
+
applyResizeHandlePosition() {
|
|
47440
|
+
if (this.resizeHandle) {
|
|
47441
|
+
if (this.isMobileDevice()) {
|
|
47442
|
+
this.resizeHandle.style.left = "0", this.resizeHandle.style.bottom = "0", this.resizeHandle.style.right = "", this.resizeHandle.style.top = "", this.resizeHandle.style.cursor = "nesw-resize", this.resizeHandle.style.alignItems = "flex-end", this.resizeHandle.style.justifyContent = "flex-start", this.resizeHandle.style.transform = "rotate(180deg)";
|
|
47443
|
+
return;
|
|
47444
|
+
}
|
|
47445
|
+
this.resizeHandle.style.left = "", this.resizeHandle.style.bottom = "", this.resizeHandle.style.right = "0", this.resizeHandle.style.top = "0", this.resizeHandle.style.cursor = "nesw-resize", this.resizeHandle.style.alignItems = "flex-start", this.resizeHandle.style.justifyContent = "flex-end", this.resizeHandle.style.transform = "";
|
|
47446
|
+
}
|
|
47447
|
+
}
|
|
47424
47448
|
init() {
|
|
47425
|
-
this.miniMapContainer = document.createElement("div"), this.miniMapContainer.style.position = "absolute", this.
|
|
47449
|
+
this.miniMapContainer = document.createElement("div"), this.miniMapContainer.style.position = "absolute", this.applyContainerPosition(), this.miniMapContainer.style.width = `${this.currentMapSize}px`, this.miniMapContainer.style.height = `${this.currentMapSize}px`, this.miniMapContainer.style.border = "2px solid rgba(255, 255, 255, 0.4)", this.miniMapContainer.style.borderRadius = "4px", this.miniMapContainer.style.overflow = "hidden", this.miniMapContainer.style.display = "none", this.miniMapContainer.style.pointerEvents = "auto", this.miniMapContainer.style.cursor = "crosshair", this.engine.container.appendChild(this.miniMapContainer), this.miniMapRenderer = new fv({ alpha: !0, antialias: !1 }), this.miniMapRenderer.setSize(this.currentMapSize, this.currentMapSize), this.miniMapRenderer.setPixelRatio(window.devicePixelRatio), this.miniMapRenderer.setClearColor(1710638, 0.85), this.miniMapContainer.appendChild(this.miniMapRenderer.domElement);
|
|
47426
47450
|
const e = window.devicePixelRatio || 1;
|
|
47427
47451
|
this.overlayCanvas = document.createElement("canvas"), this.overlayCanvas.width = this.currentMapSize * e, this.overlayCanvas.height = this.currentMapSize * e, this.overlayCanvas.style.position = "absolute", this.overlayCanvas.style.top = "0", this.overlayCanvas.style.left = "0", this.overlayCanvas.style.width = `${this.currentMapSize}px`, this.overlayCanvas.style.height = `${this.currentMapSize}px`, this.overlayCanvas.style.pointerEvents = "none", this.miniMapContainer.appendChild(this.overlayCanvas), this.overlayCtx = this.overlayCanvas.getContext("2d"), this.overlayCtx && this.overlayCtx.scale(e, e), this.initLevelSelectors(), this.initResizeHandle(), this.initSizeToggleButton(), this.miniMapCamera = new sn(
|
|
47428
47452
|
-this.currentHalfSize,
|
|
@@ -47443,7 +47467,7 @@ class JO {
|
|
|
47443
47467
|
initSizeToggleButton() {
|
|
47444
47468
|
if (!this.miniMapContainer) return;
|
|
47445
47469
|
const e = document.createElement("button");
|
|
47446
|
-
e.type = "button", e.innerHTML = this.getSizeToggleIcon(!1), e.title = "放大/还原小地图", e.setAttribute("aria-label", "放大小地图"), e.style.position = "absolute", e.style.
|
|
47470
|
+
e.type = "button", e.innerHTML = this.getSizeToggleIcon(!1), e.title = "放大/还原小地图", e.setAttribute("aria-label", "放大小地图"), e.style.position = "absolute", e.style.width = "28px", e.style.height = "24px", e.style.borderRadius = "3px", e.style.border = "1px solid rgba(255, 255, 255, 0.35)", e.style.background = "rgba(26, 26, 46, 0.85)", e.style.color = "#ffffff", e.style.fontSize = "12px", e.style.lineHeight = "20px", e.style.padding = "0", e.style.display = "flex", e.style.alignItems = "center", e.style.justifyContent = "center", e.style.cursor = "pointer", e.style.zIndex = "4", e.style.pointerEvents = "auto", e.addEventListener("click", this.onSizeToggleClick), this.bindControlEventBlock(e), this.miniMapContainer.appendChild(e), this.sizeToggleButton = e, this.applySizeToggleButtonPosition();
|
|
47447
47471
|
}
|
|
47448
47472
|
initResizeHandle() {
|
|
47449
47473
|
if (!this.miniMapContainer) return;
|
|
@@ -47452,7 +47476,7 @@ class JO {
|
|
|
47452
47476
|
'<svg width="18" height="18" viewBox="0 0 18 18" aria-hidden="true" focusable="false">',
|
|
47453
47477
|
'<path d="M1 1L17 17M7 1L17 11M13 1L17 5" stroke="rgba(255,255,255,0.82)" stroke-width="2" stroke-linecap="round"/>',
|
|
47454
47478
|
"</svg>"
|
|
47455
|
-
].join(""), e.addEventListener("mousedown", this.onResizeHandleMouseDown), this.bindControlEventBlock(e), this.miniMapContainer.appendChild(e), this.resizeHandle = e;
|
|
47479
|
+
].join(""), e.addEventListener("mousedown", this.onResizeHandleMouseDown), this.bindControlEventBlock(e), this.miniMapContainer.appendChild(e), this.resizeHandle = e, this.applyResizeHandlePosition();
|
|
47456
47480
|
}
|
|
47457
47481
|
getSizeToggleIcon(e) {
|
|
47458
47482
|
return `<svg width="15" height="15" viewBox="0 0 24 24" aria-hidden="true" focusable="false" fill="currentColor"><path d="${e ? "M9 3H3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3Zm6 0v2h2.59l-3.3 3.29 1.42 1.42 3.29-3.3V9h2V3h-6ZM5 17.59V15H3v6h6v-2H6.41l3.3-3.29-1.42-1.42L5 17.59ZM19 17.59l-3.29-3.3-1.42 1.42 3.3 3.29H15v2h6v-6h-2v2.59Z" : "M3 3h7v2H6.41l4.3 4.29-1.42 1.42L5 6.41V10H3V3Zm11 0h7v7h-2V6.41l-4.29 4.3-1.42-1.42L17.59 5H14V3ZM9.29 13.29l1.42 1.42L6.41 19H10v2H3v-7h2v3.59l4.29-4.3Zm5.42 0 4.29 4.3V14h2v7h-7v-2h3.59l-4.3-4.29 1.42-1.42Z"}"/></svg>`;
|
|
@@ -47681,15 +47705,15 @@ class JO {
|
|
|
47681
47705
|
this.isMouseInsideMiniMap = !1, !this.dragMode && this.miniMapContainer && (this.miniMapContainer.style.cursor = "crosshair");
|
|
47682
47706
|
};
|
|
47683
47707
|
onWindowResize = () => {
|
|
47684
|
-
if (this.isExpanded) {
|
|
47708
|
+
if (this.applyContainerPosition(), this.applySizeToggleButtonPosition(), this.applyResizeHandlePosition(), this.isExpanded) {
|
|
47685
47709
|
this.setExpanded(!0);
|
|
47686
47710
|
return;
|
|
47687
47711
|
}
|
|
47688
47712
|
this.resizeMap(this.currentMapSize);
|
|
47689
47713
|
};
|
|
47690
47714
|
handleResizeMapByDrag(e, t) {
|
|
47691
|
-
const i = e - this.resizeStartMouseX,
|
|
47692
|
-
this.isExpanded = !1, this.resizeMap(this.resizeStartSize +
|
|
47715
|
+
const i = this.isMobileDevice(), n = i ? this.resizeStartMouseX - e : e - this.resizeStartMouseX, r = i ? t - this.resizeStartMouseY : this.resizeStartMouseY - t, o = Math.max(n, r);
|
|
47716
|
+
this.isExpanded = !1, this.resizeMap(this.resizeStartSize + o), this.sizeToggleButton && (this.sizeToggleButton.innerHTML = this.getSizeToggleIcon(!1), this.sizeToggleButton.title = "放大小地图", this.sizeToggleButton.setAttribute("aria-label", "放大小地图"));
|
|
47693
47717
|
}
|
|
47694
47718
|
handleMoveControlByDrag(e, t) {
|
|
47695
47719
|
const i = this.engine.camera, n = this.engine.controls;
|
|
@@ -48580,12 +48604,12 @@ function oF(s) {
|
|
|
48580
48604
|
})(s, "string");
|
|
48581
48605
|
return fl(e) == "symbol" ? e : e + "";
|
|
48582
48606
|
}
|
|
48583
|
-
function
|
|
48607
|
+
function U(s, e, t) {
|
|
48584
48608
|
return (e = oF(e)) in s ? Object.defineProperty(s, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : s[e] = t, s;
|
|
48585
48609
|
}
|
|
48586
48610
|
var Ey = class {
|
|
48587
48611
|
constructor() {
|
|
48588
|
-
|
|
48612
|
+
U(this, "browserShadowBlurConstant", 1), U(this, "DPI", 96), U(this, "devicePixelRatio", typeof window < "u" ? window.devicePixelRatio : 1), U(this, "perfLimitSizeTotal", 2097152), U(this, "maxCacheSideLimit", 4096), U(this, "minCacheSideLimit", 256), U(this, "disableStyleCopyPaste", !1), U(this, "enableGLFiltering", !0), U(this, "textureSize", 4096), U(this, "forceGLPutImageData", !1), U(this, "cachesBoundsOfCurve", !1), U(this, "fontPaths", {}), U(this, "NUM_FRACTION_DIGITS", 4);
|
|
48589
48613
|
}
|
|
48590
48614
|
};
|
|
48591
48615
|
const Et = new class extends Ey {
|
|
@@ -48642,7 +48666,7 @@ const Jn = () => Ay || (Ay = { document, window, isTouchSupported: "ontouchstart
|
|
|
48642
48666
|
return Math.max((s = Et.devicePixelRatio) == null ? Ko().devicePixelRatio : s, 1);
|
|
48643
48667
|
}, pl = new class {
|
|
48644
48668
|
constructor() {
|
|
48645
|
-
|
|
48669
|
+
U(this, "boundsOfCurveCache", {}), this.charWidthsCache = /* @__PURE__ */ new Map();
|
|
48646
48670
|
}
|
|
48647
48671
|
getFontCache({ fontFamily: s, fontStyle: e, fontWeight: t }) {
|
|
48648
48672
|
s = s.toLowerCase();
|
|
@@ -48658,7 +48682,7 @@ const Jn = () => Ay || (Ay = { document, window, isTouchSupported: "ontouchstart
|
|
|
48658
48682
|
let { perfLimitSizeTotal: e } = Et, t = Math.sqrt(e * s);
|
|
48659
48683
|
return [Math.floor(t), Math.floor(e / t)];
|
|
48660
48684
|
}
|
|
48661
|
-
}(),
|
|
48685
|
+
}(), Up = "7.3.1";
|
|
48662
48686
|
function Rh() {
|
|
48663
48687
|
}
|
|
48664
48688
|
const Qs = Math.PI / 2, uF = Math.PI / 4, Rn = 2 * Math.PI, gg = Math.PI / 180, Li = Object.freeze([1, 0, 0, 1, 0, 0]), Rt = "center", ii = "left", _M = "bottom", En = "right", Ld = "none", xg = /\r?\n/, bM = "moving", Od = "scaling", MM = "rotating", SM = "rotate", wM = "skewing", Vl = "resizing", CM = "modifyPoly", Bu = "changed", TM = "scale", er = "scaleX", tr = "scaleY", da = "skewX", fa = "skewY", Xi = "fill", vs = "stroke", EM = "modified", Py = "normal", Ao = "json", Re = new class {
|
|
@@ -48707,7 +48731,7 @@ const Qs = Math.PI / 2, uF = Math.PI / 4, Rn = 2 * Math.PI, gg = Math.PI / 180,
|
|
|
48707
48731
|
}();
|
|
48708
48732
|
var dF = class {
|
|
48709
48733
|
constructor() {
|
|
48710
|
-
|
|
48734
|
+
U(this, "__eventListeners", {});
|
|
48711
48735
|
}
|
|
48712
48736
|
on(s, e) {
|
|
48713
48737
|
if (this.__eventListeners || (this.__eventListeners = {}), typeof s == "object") return Object.entries(s).forEach(([t, i]) => {
|
|
@@ -48890,7 +48914,7 @@ const yg = new q(0, 0), Ih = (s) => !!s && Array.isArray(s._objects);
|
|
|
48890
48914
|
function AM(s) {
|
|
48891
48915
|
class e extends s {
|
|
48892
48916
|
constructor(...i) {
|
|
48893
|
-
super(...i),
|
|
48917
|
+
super(...i), U(this, "_objects", []);
|
|
48894
48918
|
}
|
|
48895
48919
|
_onObjectAdded(i) {
|
|
48896
48920
|
}
|
|
@@ -49110,9 +49134,9 @@ const wn = (s) => s.ownerDocument || null, BM = (s) => {
|
|
|
49110
49134
|
function Iy(s) {
|
|
49111
49135
|
return s.onselectstart !== void 0 && (s.onselectstart = () => !1), s.style.userSelect = Ld, s;
|
|
49112
49136
|
}
|
|
49113
|
-
var
|
|
49137
|
+
var zM = class {
|
|
49114
49138
|
constructor(s) {
|
|
49115
|
-
|
|
49139
|
+
U(this, "_originalCanvasStyle", void 0), U(this, "lower", void 0);
|
|
49116
49140
|
let e = this.createLowerCanvas(s);
|
|
49117
49141
|
this.lower = { el: e, ctx: e.getContext("2d") };
|
|
49118
49142
|
}
|
|
@@ -49179,7 +49203,7 @@ const Bd = (s) => {
|
|
|
49179
49203
|
if (55296 > i || i > 56319) throw "Low surrogate without preceding high surrogate";
|
|
49180
49204
|
return !1;
|
|
49181
49205
|
};
|
|
49182
|
-
var wg = class
|
|
49206
|
+
var wg = class UM extends AM(PM) {
|
|
49183
49207
|
get lowerCanvasEl() {
|
|
49184
49208
|
var e;
|
|
49185
49209
|
return (e = this.elements.lower) == null ? void 0 : e.el;
|
|
@@ -49189,13 +49213,13 @@ var wg = class zM extends AM(PM) {
|
|
|
49189
49213
|
return (e = this.elements.lower) == null ? void 0 : e.ctx;
|
|
49190
49214
|
}
|
|
49191
49215
|
static getDefaults() {
|
|
49192
|
-
return
|
|
49216
|
+
return UM.ownDefaults;
|
|
49193
49217
|
}
|
|
49194
49218
|
constructor(e, t = {}) {
|
|
49195
49219
|
super(), Object.assign(this, this.constructor.getDefaults()), this.set(t), this.initElements(e), this._setDimensionsImpl({ width: this.width || this.elements.lower.el.width || 0, height: this.height || this.elements.lower.el.height || 0 }), this.skipControlsDrawing = !1, this.viewportTransform = [...this.viewportTransform], this.calcViewportBoundaries();
|
|
49196
49220
|
}
|
|
49197
49221
|
initElements(e) {
|
|
49198
|
-
this.elements = new
|
|
49222
|
+
this.elements = new zM(e);
|
|
49199
49223
|
}
|
|
49200
49224
|
add(...e) {
|
|
49201
49225
|
let t = super.add(...e);
|
|
@@ -49370,7 +49394,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
|
|
|
49370
49394
|
}
|
|
49371
49395
|
_toObjectMethod(e, t) {
|
|
49372
49396
|
let i = this.clipPath, n = i && !i.excludeFromExport ? this._toObject(i, e, t) : null;
|
|
49373
|
-
return { version:
|
|
49397
|
+
return { version: Up, ...Qr(this, t), objects: this._objects.filter((r) => !r.excludeFromExport).map((r) => this._toObject(r, e, t)), ...this.__serializeBgOverlay(e, t), ...n ? { clipPath: n } : null };
|
|
49374
49398
|
}
|
|
49375
49399
|
_toObject(e, t, i) {
|
|
49376
49400
|
let n;
|
|
@@ -49403,7 +49427,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
|
|
|
49403
49427
|
a = `viewBox="${Dt(-l[4] / l[0], r)} ${Dt(-l[5] / l[3], r)} ${Dt(this.width / l[0], r)} ${Dt(this.height / l[3], r)}" `;
|
|
49404
49428
|
} else a = `viewBox="0 0 ${this.width} ${this.height}" `;
|
|
49405
49429
|
e.push("<svg ", 'xmlns="http://www.w3.org/2000/svg" ', 'xmlns:xlink="http://www.w3.org/1999/xlink" ', 'version="1.1" ', 'width="', i, '" ', 'height="', n, '" ', a, `xml:space="preserve">
|
|
49406
|
-
`, "<desc>Created with Fabric.js ",
|
|
49430
|
+
`, "<desc>Created with Fabric.js ", Up, `</desc>
|
|
49407
49431
|
`, `<defs>
|
|
49408
49432
|
`, this.createSVGFontFacesMarkup(), this.createSVGRefElementsMarkup(), this.createSVGClipPathMarkup(t), `</defs>
|
|
49409
49433
|
`);
|
|
@@ -49507,14 +49531,14 @@ ${n}]]></style>
|
|
|
49507
49531
|
return `#<Canvas (${this.complexity()}): { objects: ${this._objects.length} }>`;
|
|
49508
49532
|
}
|
|
49509
49533
|
};
|
|
49510
|
-
|
|
49534
|
+
U(wg, "ownDefaults", mF);
|
|
49511
49535
|
const _F = ["touchstart", "touchmove", "touchend"], VM = (s) => {
|
|
49512
49536
|
let e = kM(s.target), t = (function(i) {
|
|
49513
49537
|
let n = i.changedTouches;
|
|
49514
49538
|
return n && n[0] ? n[0] : i;
|
|
49515
49539
|
})(s);
|
|
49516
49540
|
return new q(t.clientX + e.left, t.clientY + e.top);
|
|
49517
|
-
},
|
|
49541
|
+
}, zu = (s) => _F.includes(s.type) || s.pointerType === "touch", Ly = (s) => {
|
|
49518
49542
|
s.preventDefault(), s.stopPropagation();
|
|
49519
49543
|
}, qn = (s) => {
|
|
49520
49544
|
let e = 0, t = 0, i = 0, n = 0;
|
|
@@ -49536,7 +49560,7 @@ const _F = ["touchstart", "touchmove", "touchend"], VM = (s) => {
|
|
|
49536
49560
|
}, uc = (s = Li, e = Li) => Ht(tn(e), s), bs = (s, e = Li, t = Li) => s.transform(uc(e, t)), WM = (s, e = Li, t = Li) => s.transform(uc(e, t), !0), Tg = (s, e, t) => {
|
|
49537
49561
|
let i = uc(e, t);
|
|
49538
49562
|
return ea(s, Ht(i, s.calcOwnMatrix())), i;
|
|
49539
|
-
}, MF = { left: -0.5, top: -0.5, center: 0, bottom: 0.5, right: 0.5 }, Ti = (s) => typeof s == "string" ? MF[s] : s - 0.5, SF = new q(1, 0), XM = new q(), Eg = (s, e) => s.rotate(e), Hl = (s, e) => new q(e).subtract(s),
|
|
49563
|
+
}, MF = { left: -0.5, top: -0.5, center: 0, bottom: 0.5, right: 0.5 }, Ti = (s) => typeof s == "string" ? MF[s] : s - 0.5, SF = new q(1, 0), XM = new q(), Eg = (s, e) => s.rotate(e), Hl = (s, e) => new q(e).subtract(s), Uu = (s) => s.distanceFrom(XM), Vu = (s, e) => Math.atan2(No(s, e), jM(s, e)), Ag = (s) => Vu(SF, s), zd = (s) => s.eq(XM) ? s : s.scalarDivide(Uu(s)), Pg = (s, e = !0) => zd(new q(-s.y, s.x).scalarMultiply(e ? 1 : -1)), No = (s, e) => s.x * e.y - s.y * e.x, jM = (s, e) => s.x * e.x + s.y * e.y, Hp = (s, e, t) => {
|
|
49540
49564
|
if (s.eq(e) || s.eq(t)) return !0;
|
|
49541
49565
|
let i = No(e, t), n = No(e, s), r = No(t, s);
|
|
49542
49566
|
return i >= 0 ? n >= 0 && r <= 0 : !(n <= 0 && r >= 0);
|
|
@@ -49552,7 +49576,7 @@ function $M(s, e, t) {
|
|
|
49552
49576
|
let i = t, n = Ag(Hl(bs(s.getCenterPoint(), s.canvas.viewportTransform, void 0), i)) + Rn;
|
|
49553
49577
|
return Math.round(n % Rn / uF);
|
|
49554
49578
|
}
|
|
49555
|
-
function
|
|
49579
|
+
function Ud({ target: s, corner: e }, t, i, n, r) {
|
|
49556
49580
|
var o;
|
|
49557
49581
|
let a = s.controls[e], l = ((o = s.canvas) == null ? void 0 : o.getZoom()) || 1, c = s.padding / l, h = (function(u, d, f, p) {
|
|
49558
49582
|
let g = u.getRelativeCenterPoint(), x = f !== void 0 && p !== void 0 ? u.translateToGivenOrigin(g, Rt, Rt, f, p) : new q(u.left, u.top);
|
|
@@ -49585,7 +49609,7 @@ const Hu = (s) => s.replace(/\s+/g, " "), Fy = { aliceblue: "#F0F8FF", antiquewh
|
|
|
49585
49609
|
};
|
|
49586
49610
|
var On = class ui {
|
|
49587
49611
|
constructor(e) {
|
|
49588
|
-
if (
|
|
49612
|
+
if (U(this, "isUnrecognised", !1), e) if (e instanceof ui) this.setSource([...e._source]);
|
|
49589
49613
|
else if (Array.isArray(e)) {
|
|
49590
49614
|
let [t, i, n, r = 1] = e;
|
|
49591
49615
|
this.setSource([t, i, n, r]);
|
|
@@ -49701,7 +49725,7 @@ const wF = (s) => {
|
|
|
49701
49725
|
return e.concat(["offset", "stop-color", "stop-opacity"]);
|
|
49702
49726
|
}
|
|
49703
49727
|
return e;
|
|
49704
|
-
},
|
|
49728
|
+
}, zr = (s, e = 16) => {
|
|
49705
49729
|
let t = /\D{0,2}$/.exec(s), i = parseFloat(s), n = Et.DPI;
|
|
49706
49730
|
switch (t?.[0]) {
|
|
49707
49731
|
case "mm":
|
|
@@ -49777,7 +49801,7 @@ ${a.toClipPathSVG(t)}</clipPath>
|
|
|
49777
49801
|
function Vd(s) {
|
|
49778
49802
|
return RegExp("^(" + s.join("|") + ")\\b", "i");
|
|
49779
49803
|
}
|
|
49780
|
-
const ta = "textDecorationThickness", Hd = "textDecorationColor", ZM = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], JM = ["underline", "overline", "linethrough"], QM = [...ZM, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], eS = [...QM, ...JM, "textBackgroundColor", "direction", ta, Hd], CF = [...ZM, ...JM, vs, "strokeWidth", Xi, "deltaY", "textBackgroundColor", ta, Hd], TF = { _reNewline: xg, _reSpacesAndTabs: /[ \t\r]/g, _reSpaceAndTab: /[ \t\r]/, _reWords: /\S+/g, fontSize: 40, fontWeight: Py, fontFamily: "Times New Roman", underline: !1, overline: !1, linethrough: !1, textAlign: ii, fontStyle: Py, lineHeight: 1.16, textBackgroundColor: "", stroke: null, shadow: null, path: void 0, pathStartOffset: 0, pathSide: ii, pathAlign: "baseline", charSpacing: 0, deltaY: 0, direction: "ltr", CACHE_FONT_SIZE: 400, MIN_TEXT_WIDTH: 2, superscript: { size: 0.6, baseline: -0.35 }, subscript: { size: 0.6, baseline: 0.11 }, _fontSizeFraction: 0.222, offsets: { underline: 0.1, linethrough: -0.28167, overline: -0.81333 }, _fontSizeMult: 1.13, [ta]: 66.667 }, Ig = "justify", jr = String.raw`[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?`, EF = RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + jr + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + jr + "))?\\s+(.*)"), AF = { cx: ii, x: ii, r: "radius", cy: "top", y: "top", display: "visible", visibility: "visible", transform: "transformMatrix", "fill-opacity": "fillOpacity", "fill-rule": "fillRule", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "letter-spacing": "charSpacing", "paint-order": "paintFirst", "stroke-dasharray": "strokeDashArray", "stroke-dashoffset": "strokeDashOffset", "stroke-linecap": "strokeLineCap", "stroke-linejoin": "strokeLineJoin", "stroke-miterlimit": "strokeMiterLimit", "stroke-opacity": "strokeOpacity", "stroke-width": "strokeWidth", "text-decoration": "textDecoration", "text-anchor": "textAnchor", opacity: "opacity", "clip-path": "clipPath", "clip-rule": "clipRule", "vector-effect": "strokeUniform", "image-rendering": "imageSmoothing", "text-decoration-thickness": ta, "text-decoration-color": Hd },
|
|
49804
|
+
const ta = "textDecorationThickness", Hd = "textDecorationColor", ZM = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], JM = ["underline", "overline", "linethrough"], QM = [...ZM, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], eS = [...QM, ...JM, "textBackgroundColor", "direction", ta, Hd], CF = [...ZM, ...JM, vs, "strokeWidth", Xi, "deltaY", "textBackgroundColor", ta, Hd], TF = { _reNewline: xg, _reSpacesAndTabs: /[ \t\r]/g, _reSpaceAndTab: /[ \t\r]/, _reWords: /\S+/g, fontSize: 40, fontWeight: Py, fontFamily: "Times New Roman", underline: !1, overline: !1, linethrough: !1, textAlign: ii, fontStyle: Py, lineHeight: 1.16, textBackgroundColor: "", stroke: null, shadow: null, path: void 0, pathStartOffset: 0, pathSide: ii, pathAlign: "baseline", charSpacing: 0, deltaY: 0, direction: "ltr", CACHE_FONT_SIZE: 400, MIN_TEXT_WIDTH: 2, superscript: { size: 0.6, baseline: -0.35 }, subscript: { size: 0.6, baseline: 0.11 }, _fontSizeFraction: 0.222, offsets: { underline: 0.1, linethrough: -0.28167, overline: -0.81333 }, _fontSizeMult: 1.13, [ta]: 66.667 }, Ig = "justify", jr = String.raw`[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?`, EF = RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + jr + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + jr + "))?\\s+(.*)"), AF = { cx: ii, x: ii, r: "radius", cy: "top", y: "top", display: "visible", visibility: "visible", transform: "transformMatrix", "fill-opacity": "fillOpacity", "fill-rule": "fillRule", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "letter-spacing": "charSpacing", "paint-order": "paintFirst", "stroke-dasharray": "strokeDashArray", "stroke-dashoffset": "strokeDashOffset", "stroke-linecap": "strokeLineCap", "stroke-linejoin": "strokeLineJoin", "stroke-miterlimit": "strokeMiterLimit", "stroke-opacity": "strokeOpacity", "stroke-width": "strokeWidth", "text-decoration": "textDecoration", "text-anchor": "textAnchor", opacity: "opacity", "clip-path": "clipPath", "clip-rule": "clipRule", "vector-effect": "strokeUniform", "image-rendering": "imageSmoothing", "text-decoration-thickness": ta, "text-decoration-color": Hd }, zy = "font-size", Uy = "clip-path";
|
|
49781
49805
|
Vd(["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"]);
|
|
49782
49806
|
Vd(["symbol", "image", "marker", "pattern", "view", "svg"]);
|
|
49783
49807
|
const Vy = Vd(["symbol", "g", "a", "svg", "clipPath", "defs"]), Hy = "(-?\\d+(?:\\.\\d*)?(?:px)?(?:\\s?|$))?", Gy = RegExp("(?:\\s|^)" + Hy + Hy + "(" + jr + "?(?:px)?)?(?:\\s?|$)(?:$|\\s)");
|
|
@@ -49815,10 +49839,10 @@ var xl = class Lh {
|
|
|
49815
49839
|
return new this(e);
|
|
49816
49840
|
}
|
|
49817
49841
|
};
|
|
49818
|
-
|
|
49842
|
+
U(xl, "ownDefaults", { color: "rgb(0,0,0)", blur: 0, offsetX: 0, offsetY: 0, affectStroke: !1, includeDefaultValues: !0, nonScaling: !1 }), U(xl, "type", "shadow"), Re.setClass(xl, "shadow");
|
|
49819
49843
|
const Yr = (s, e, t) => Math.max(s, Math.min(e, t)), PF = ["top", ii, er, tr, "flipX", "flipY", "originX", "originY", "angle", "opacity", "globalCompositeOperation", "shadow", "visible", da, fa], Ss = [Xi, vs, "strokeWidth", "strokeDashArray", "width", "height", "paintFirst", "strokeUniform", "strokeLineCap", "strokeDashOffset", "strokeLineJoin", "strokeMiterLimit", "backgroundColor", "clipPath"], DF = { top: 0, left: 0, width: 0, height: 0, angle: 0, flipX: !1, flipY: !1, scaleX: 1, scaleY: 1, minScaleLimit: 0, skewX: 0, skewY: 0, originX: Rt, originY: Rt, strokeWidth: 1, strokeUniform: !1, padding: 0, opacity: 1, paintFirst: Xi, fill: "rgb(0,0,0)", fillRule: "nonzero", stroke: null, strokeDashArray: null, strokeDashOffset: 0, strokeLineCap: "butt", strokeLineJoin: "miter", strokeMiterLimit: 4, globalCompositeOperation: "source-over", backgroundColor: "", shadow: null, visible: !0, includeDefaultValues: !0, excludeFromExport: !1, objectCaching: !0, clipPath: void 0, inverted: !1, absolutePositioned: !1, centeredRotation: !0, centeredScaling: !1, dirty: !0 };
|
|
49820
|
-
var RF = lc({ defaultEasing: () => iS, easeInBack: () => QF, easeInBounce: () => nS, easeInCirc: () => YF, easeInCubic: () => IF, easeInElastic: () => KF, easeInExpo: () => WF, easeInOutBack: () => tk, easeInOutBounce: () => ik, easeInOutCirc: () => qF, easeInOutCubic: () => OF, easeInOutElastic: () => JF, easeInOutExpo: () => jF, easeInOutQuad: () => rk, easeInOutQuart: () => BF, easeInOutQuint: () =>
|
|
49821
|
-
const Lg = (s, e, t, i) => (s < Math.abs(e) ? (s = e, i = t / 4) : i = e === 0 && s === 0 ? t / Rn * Math.asin(1) : t / Rn * Math.asin(e / s), { a: s, c: e, p: t, s: i }), tS = (s, e, t, i, n) => s * 2 ** (10 * --i) * Math.sin((i * n - e) * Rn / t), iS = (s, e, t, i) => -t * Math.cos(s / i * Qs) + t + e, IF = (s, e, t, i) => t * (s / i) ** 3 + e, LF = (s, e, t, i) => t * ((s / i - 1) ** 3 + 1) + e, OF = (s, e, t, i) => (s /= i / 2) < 1 ? t / 2 * s ** 3 + e : t / 2 * ((s - 2) ** 3 + 2) + e, FF = (s, e, t, i) => t * (s /= i) * s ** 3 + e, kF = (s, e, t, i) => -t * ((s = s / i - 1) * s ** 3 - 1) + e, BF = (s, e, t, i) => (s /= i / 2) < 1 ? t / 2 * s ** 4 + e : -t / 2 * ((s -= 2) * s ** 3 - 2) + e, NF = (s, e, t, i) => t * (s / i) ** 5 + e,
|
|
49844
|
+
var RF = lc({ defaultEasing: () => iS, easeInBack: () => QF, easeInBounce: () => nS, easeInCirc: () => YF, easeInCubic: () => IF, easeInElastic: () => KF, easeInExpo: () => WF, easeInOutBack: () => tk, easeInOutBounce: () => ik, easeInOutCirc: () => qF, easeInOutCubic: () => OF, easeInOutElastic: () => JF, easeInOutExpo: () => jF, easeInOutQuad: () => rk, easeInOutQuart: () => BF, easeInOutQuint: () => UF, easeInOutSine: () => GF, easeInQuad: () => nk, easeInQuart: () => FF, easeInQuint: () => NF, easeInSine: () => VF, easeOutBack: () => ek, easeOutBounce: () => Og, easeOutCirc: () => $F, easeOutCubic: () => LF, easeOutElastic: () => ZF, easeOutExpo: () => XF, easeOutQuad: () => sk, easeOutQuart: () => kF, easeOutQuint: () => zF, easeOutSine: () => HF });
|
|
49845
|
+
const Lg = (s, e, t, i) => (s < Math.abs(e) ? (s = e, i = t / 4) : i = e === 0 && s === 0 ? t / Rn * Math.asin(1) : t / Rn * Math.asin(e / s), { a: s, c: e, p: t, s: i }), tS = (s, e, t, i, n) => s * 2 ** (10 * --i) * Math.sin((i * n - e) * Rn / t), iS = (s, e, t, i) => -t * Math.cos(s / i * Qs) + t + e, IF = (s, e, t, i) => t * (s / i) ** 3 + e, LF = (s, e, t, i) => t * ((s / i - 1) ** 3 + 1) + e, OF = (s, e, t, i) => (s /= i / 2) < 1 ? t / 2 * s ** 3 + e : t / 2 * ((s - 2) ** 3 + 2) + e, FF = (s, e, t, i) => t * (s /= i) * s ** 3 + e, kF = (s, e, t, i) => -t * ((s = s / i - 1) * s ** 3 - 1) + e, BF = (s, e, t, i) => (s /= i / 2) < 1 ? t / 2 * s ** 4 + e : -t / 2 * ((s -= 2) * s ** 3 - 2) + e, NF = (s, e, t, i) => t * (s / i) ** 5 + e, zF = (s, e, t, i) => t * ((s / i - 1) ** 5 + 1) + e, UF = (s, e, t, i) => (s /= i / 2) < 1 ? t / 2 * s ** 5 + e : t / 2 * ((s - 2) ** 5 + 2) + e, VF = (s, e, t, i) => -t * Math.cos(s / i * Qs) + t + e, HF = (s, e, t, i) => t * Math.sin(s / i * Qs) + e, GF = (s, e, t, i) => -t / 2 * (Math.cos(Math.PI * s / i) - 1) + e, WF = (s, e, t, i) => s === 0 ? e : t * 2 ** (10 * (s / i - 1)) + e, XF = (s, e, t, i) => s === i ? e + t : t * -(2 ** (-10 * s / i) + 1) + e, jF = (s, e, t, i) => s === 0 ? e : s === i ? e + t : (s /= i / 2) < 1 ? t / 2 * 2 ** (10 * (s - 1)) + e : t / 2 * -(2 ** (-10 * --s) + 2) + e, YF = (s, e, t, i) => -t * (Math.sqrt(1 - (s /= i) * s) - 1) + e, $F = (s, e, t, i) => t * Math.sqrt(1 - (s = s / i - 1) * s) + e, qF = (s, e, t, i) => (s /= i / 2) < 1 ? -t / 2 * (Math.sqrt(1 - s ** 2) - 1) + e : t / 2 * (Math.sqrt(1 - (s -= 2) * s) + 1) + e, KF = (s, e, t, i) => {
|
|
49822
49846
|
let n = t, r = 0;
|
|
49823
49847
|
if (s === 0) return e;
|
|
49824
49848
|
if ((s /= i) === 1) return e + t;
|
|
@@ -49842,7 +49866,7 @@ const Lg = (s, e, t, i) => (s < Math.abs(e) ? (s = e, i = t / 4) : i = e === 0 &
|
|
|
49842
49866
|
}, QF = (s, e, t, i, n = 1.70158) => t * (s /= i) * s * ((n + 1) * s - n) + e, ek = (s, e, t, i, n = 1.70158) => t * ((s = s / i - 1) * s * ((n + 1) * s + n) + 1) + e, tk = (s, e, t, i, n = 1.70158) => (s /= i / 2) < 1 ? t / 2 * (s * s * ((1 + (n *= 1.525)) * s - n)) + e : t / 2 * ((s -= 2) * s * ((1 + (n *= 1.525)) * s + n) + 2) + e, Og = (s, e, t, i) => (s /= i) < 1 / 2.75 ? t * (7.5625 * s * s) + e : s < 2 / 2.75 ? t * (7.5625 * (s -= 1.5 / 2.75) * s + 0.75) + e : s < 2.5 / 2.75 ? t * (7.5625 * (s -= 2.25 / 2.75) * s + 0.9375) + e : t * (7.5625 * (s -= 2.625 / 2.75) * s + 0.984375) + e, nS = (s, e, t, i) => t - Og(i - s, 0, t, i) + e, ik = (s, e, t, i) => s < i / 2 ? 0.5 * nS(2 * s, 0, t, i) + e : 0.5 * Og(2 * s - i, 0, t, i) + 0.5 * t + e, nk = (s, e, t, i) => t * (s /= i) * s + e, sk = (s, e, t, i) => -t * (s /= i) * (s - 2) + e, rk = (s, e, t, i) => (s /= i / 2) < 1 ? t / 2 * s ** 2 + e : -t / 2 * (--s * (s - 2) - 1) + e, ok = () => !1;
|
|
49843
49867
|
var Fg = class {
|
|
49844
49868
|
constructor({ startValue: s, byValue: e, duration: t = 500, delay: i = 0, easing: n = iS, onStart: r = Rh, onChange: o = Rh, onComplete: a = Rh, abort: l = ok, target: c }) {
|
|
49845
|
-
|
|
49869
|
+
U(this, "_state", "pending"), U(this, "durationProgress", 0), U(this, "valueProgress", 0), this.tick = this.tick.bind(this), this.duration = t, this.delay = i, this.easing = n, this._onStart = r, this._onChange = o, this._onComplete = a, this._abort = l, this.target = c, this.startValue = s, this.byValue = e, this.value = this.startValue, this.endValue = Object.freeze(this.calculate(this.duration).value);
|
|
49846
49870
|
}
|
|
49847
49871
|
get state() {
|
|
49848
49872
|
return this._state;
|
|
@@ -50169,7 +50193,7 @@ var yl = class si {
|
|
|
50169
50193
|
Ys("warn", "Setting type has no effect", e);
|
|
50170
50194
|
}
|
|
50171
50195
|
constructor(e) {
|
|
50172
|
-
super(),
|
|
50196
|
+
super(), U(this, "_cacheContext", null), Object.assign(this, Oh.ownDefaults), this.setOptions(e);
|
|
50173
50197
|
}
|
|
50174
50198
|
_createCacheCanvas() {
|
|
50175
50199
|
this._cacheCanvas = Qn(), this._cacheContext = this._cacheCanvas.getContext("2d"), this._updateCacheCanvas(), this.dirty = !0;
|
|
@@ -50459,7 +50483,7 @@ var yl = class si {
|
|
|
50459
50483
|
toObject(e = []) {
|
|
50460
50484
|
let t = e.concat(Oh.customProperties, this.constructor.customProperties || []), i, n = Et.NUM_FRACTION_DIGITS, { clipPath: r, fill: o, stroke: a, shadow: l, strokeDashArray: c, left: h, top: u, originX: d, originY: f, width: p, height: g, strokeWidth: x, strokeLineCap: m, strokeDashOffset: v, strokeLineJoin: y, strokeUniform: _, strokeMiterLimit: w, scaleX: b, scaleY: A, angle: L, flipX: E, flipY: C, opacity: R, visible: T, backgroundColor: P, fillRule: k, paintFirst: B, globalCompositeOperation: N, skewX: X, skewY: V } = this;
|
|
50461
50485
|
r && !r.excludeFromExport && (i = r.toObject(t.concat("inverted", "absolutePositioned")));
|
|
50462
|
-
let j = (he) => Dt(he, n), ne = { ...Qr(this, t), type: this.constructor.type, version:
|
|
50486
|
+
let j = (he) => Dt(he, n), ne = { ...Qr(this, t), type: this.constructor.type, version: Up, originX: d, originY: f, left: j(h), top: j(u), width: j(p), height: j(g), fill: Dy(o) ? o.toObject() : o, stroke: Dy(a) ? a.toObject() : a, strokeWidth: j(x), strokeDashArray: c && c.concat(), strokeLineCap: m, strokeDashOffset: v, strokeLineJoin: y, strokeUniform: _, strokeMiterLimit: j(w), scaleX: j(b), scaleY: j(A), angle: j(L), flipX: E, flipY: C, opacity: j(R), shadow: l && l.toObject(), visible: T, backgroundColor: P, fillRule: k, paintFirst: B, globalCompositeOperation: N, skewX: j(X), skewY: j(V), ...i ? { clipPath: i } : null };
|
|
50463
50487
|
return this.includeDefaultValues ? ne : this._removeDefaultValues(ne);
|
|
50464
50488
|
}
|
|
50465
50489
|
toDatalessObject(e) {
|
|
@@ -50483,7 +50507,7 @@ var yl = class si {
|
|
|
50483
50507
|
return this._fromObject(e, t);
|
|
50484
50508
|
}
|
|
50485
50509
|
};
|
|
50486
|
-
|
|
50510
|
+
U(cs, "stateProperties", PF), U(cs, "cacheProperties", Ss), U(cs, "ownDefaults", DF), U(cs, "type", "FabricObject"), U(cs, "colorProperties", [Xi, vs, "backgroundColor"]), U(cs, "customProperties", []), Re.setClass(cs), Re.setClass(cs, "object");
|
|
50487
50511
|
const Bg = (s, e) => {
|
|
50488
50512
|
var t;
|
|
50489
50513
|
let { transform: { target: i } } = e;
|
|
@@ -50499,7 +50523,7 @@ function ir(s) {
|
|
|
50499
50523
|
};
|
|
50500
50524
|
}
|
|
50501
50525
|
const rS = (s, e, t, i) => (n, r, o, a) => {
|
|
50502
|
-
let l =
|
|
50526
|
+
let l = Ud(r, r.originX, r.originY, o, a)[t], c = Ti(r[e]);
|
|
50503
50527
|
if (c === 0 || c > 0 && l < 0 || c < 0 && l > 0) {
|
|
50504
50528
|
let { target: h } = r, u = h.strokeWidth / (h.strokeUniform ? h[i] : 1), d = YM(r) ? 2 : 1, f = h[s], p = Math.abs(l * d / h[i]) - u;
|
|
50505
50529
|
return h.set(s, Math.max(p, 1)), f !== h[s];
|
|
@@ -50518,7 +50542,7 @@ function cS(s, e, t, i, n) {
|
|
|
50518
50542
|
}
|
|
50519
50543
|
var Ji = class {
|
|
50520
50544
|
constructor(s) {
|
|
50521
|
-
|
|
50545
|
+
U(this, "visible", !0), U(this, "actionName", TM), U(this, "angle", 0), U(this, "x", 0), U(this, "y", 0), U(this, "offsetX", 0), U(this, "offsetY", 0), U(this, "sizeX", 0), U(this, "sizeY", 0), U(this, "touchSizeX", 0), U(this, "touchSizeY", 0), U(this, "cursorStyle", "crosshair"), U(this, "withConnection", !1), Object.assign(this, s);
|
|
50522
50546
|
}
|
|
50523
50547
|
getTransformAnchorPoint() {
|
|
50524
50548
|
var s;
|
|
@@ -50596,7 +50620,7 @@ function Ng(s, e, t, i, n = {}) {
|
|
|
50596
50620
|
if (fS(r, o, a)) return !1;
|
|
50597
50621
|
if (e.gestureScale) c = e.scaleX * e.gestureScale, h = e.scaleY * e.gestureScale;
|
|
50598
50622
|
else {
|
|
50599
|
-
if (l =
|
|
50623
|
+
if (l = Ud(e, e.originX, e.originY, t, i), d = o === "y" ? 1 : Math.sign(l.x || e.signX || 1), f = o === "x" ? 1 : Math.sign(l.y || e.signY || 1), e.signX || (e.signX = d), e.signY || (e.signY = f), An(r, "lockScalingFlip") && (e.signX !== d || e.signY !== f)) return !1;
|
|
50600
50624
|
if (u = r._getTransformedDimensions(), a && !o) {
|
|
50601
50625
|
let x = Math.abs(l.x) + Math.abs(l.y), { original: m } = e, v = x / (Math.abs(u.x * m.scaleX / r.scaleX) + Math.abs(u.y * m.scaleY / r.scaleY));
|
|
50602
50626
|
c = m.scaleX * v, h = m.scaleY * v;
|
|
@@ -50606,11 +50630,11 @@ function Ng(s, e, t, i, n = {}) {
|
|
|
50606
50630
|
let p = r.scaleX, g = r.scaleY;
|
|
50607
50631
|
return o ? (o === "x" && r.set("scaleX", c), o === "y" && r.set("scaleY", h)) : (!An(r, "lockScalingX") && r.set("scaleX", c), !An(r, "lockScalingY") && r.set("scaleY", h)), p !== r.scaleX || g !== r.scaleY;
|
|
50608
50632
|
}
|
|
50609
|
-
const
|
|
50633
|
+
const za = ws(Od, ir((s, e, t, i) => Ng(s, e, t, i))), pS = ws(Od, ir((s, e, t, i) => Ng(s, e, t, i, { by: "x" }))), mS = ws(Od, ir((s, e, t, i) => Ng(s, e, t, i, { by: "y" }))), ep = { x: { counterAxis: "y", scale: er, skew: da, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: tr, skew: fa, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, pk = ["ns", "nesw", "ew", "nwse"], gS = (s, e, t, i) => e.x !== 0 && An(t, "lockSkewingY") || e.y !== 0 && An(t, "lockSkewingX") ? Dg : `${pk[$M(t, 0, i) % 4]}-resize`;
|
|
50610
50634
|
function xS(s, e, t, i, n) {
|
|
50611
50635
|
let { target: r } = t, { counterAxis: o, origin: a, lockSkewing: l, skew: c, flip: h } = ep[s];
|
|
50612
50636
|
if (An(r, l)) return !1;
|
|
50613
|
-
let { origin: u, flip: d } = ep[o], f = Ti(t[u]) * (r[d] ? -1 : 1), p = -Math.sign(f) * (r[h] ? -1 : 1), g = -(r[c] === 0 &&
|
|
50637
|
+
let { origin: u, flip: d } = ep[o], f = Ti(t[u]) * (r[d] ? -1 : 1), p = -Math.sign(f) * (r[h] ? -1 : 1), g = -(r[c] === 0 && Ud(t, "center", "center", i, n)[s] > 0 || r[c] > 0 ? 1 : -1) * p * 0.5 + 0.5;
|
|
50614
50638
|
return ws(wM, ir((x, m, v, y) => (function(_, { target: w, ex: b, ey: A, skewingSide: L, ...E }, C) {
|
|
50615
50639
|
let { skew: R } = ep[_], T = C.subtract(new q(b, A)).divide(new q(w.scaleX, w.scaleY))[_], P = w[R], k = E[R], B = Math.tan(Vt(k)), N = _ === "y" ? w._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : w._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, X = 2 * T * L / Math.max(N, 1) + B, V = _s(Math.atan(X));
|
|
50616
50640
|
w.set(R, V);
|
|
@@ -50626,10 +50650,10 @@ const yS = (s, e, t, i) => xS("x", s, e, t, i), vS = (s, e, t, i) => xS("y", s,
|
|
|
50626
50650
|
function Gd(s, e) {
|
|
50627
50651
|
return s[e.canvas.altActionKey];
|
|
50628
50652
|
}
|
|
50629
|
-
const
|
|
50653
|
+
const Ua = (s, e, t) => {
|
|
50630
50654
|
let i = Gd(s, t);
|
|
50631
50655
|
return e.x === 0 ? i ? da : tr : e.y === 0 ? i ? fa : er : "";
|
|
50632
|
-
}, Rr = (s, e, t, i) => Gd(s, t) ? gS(0, e, t, i) : Oo(s, e, t, i), Wp = (s, e, t, i) => Gd(s, e.target) ? vS(s, e, t, i) : pS(s, e, t, i), Xp = (s, e, t, i) => Gd(s, e.target) ? yS(s, e, t, i) : mS(s, e, t, i),
|
|
50656
|
+
}, Rr = (s, e, t, i) => Gd(s, t) ? gS(0, e, t, i) : Oo(s, e, t, i), Wp = (s, e, t, i) => Gd(s, e.target) ? vS(s, e, t, i) : pS(s, e, t, i), Xp = (s, e, t, i) => Gd(s, e.target) ? yS(s, e, t, i) : mS(s, e, t, i), zg = () => ({ ml: new Ji({ x: -0.5, y: 0, cursorStyleHandler: Rr, actionHandler: Wp, getActionName: Ua }), mr: new Ji({ x: 0.5, y: 0, cursorStyleHandler: Rr, actionHandler: Wp, getActionName: Ua }), mb: new Ji({ x: 0, y: 0.5, cursorStyleHandler: Rr, actionHandler: Xp, getActionName: Ua }), mt: new Ji({ x: 0, y: -0.5, cursorStyleHandler: Rr, actionHandler: Xp, getActionName: Ua }), tl: new Ji({ x: -0.5, y: -0.5, cursorStyleHandler: Oo, actionHandler: za }), tr: new Ji({ x: 0.5, y: -0.5, cursorStyleHandler: Oo, actionHandler: za }), bl: new Ji({ x: -0.5, y: 0.5, cursorStyleHandler: Oo, actionHandler: za }), br: new Ji({ x: 0.5, y: 0.5, cursorStyleHandler: Oo, actionHandler: za }), mtr: new Ji({ x: 0, y: -0.5, actionHandler: uS, cursorStyleHandler: hS, offsetY: -40, withConnection: !0, actionName: SM }) }), _S = () => ({ mr: new Ji({ x: 0.5, y: 0, actionHandler: Gp, cursorStyleHandler: Rr, actionName: Vl }), ml: new Ji({ x: -0.5, y: 0, actionHandler: Gp, cursorStyleHandler: Rr, actionName: Vl }) }), bS = () => ({ ...zg(), ..._S() });
|
|
50633
50657
|
var MS = class jp extends cs {
|
|
50634
50658
|
static getDefaults() {
|
|
50635
50659
|
return { ...super.getDefaults(), ...jp.ownDefaults };
|
|
@@ -50638,7 +50662,7 @@ var MS = class jp extends cs {
|
|
|
50638
50662
|
super(), Object.assign(this, this.constructor.createControls(), jp.ownDefaults), this.setOptions(e);
|
|
50639
50663
|
}
|
|
50640
50664
|
static createControls() {
|
|
50641
|
-
return { controls:
|
|
50665
|
+
return { controls: zg() };
|
|
50642
50666
|
}
|
|
50643
50667
|
_updateCacheCanvas() {
|
|
50644
50668
|
let e = this.canvas;
|
|
@@ -50766,7 +50790,7 @@ function SS(s, e) {
|
|
|
50766
50790
|
});
|
|
50767
50791
|
}), s;
|
|
50768
50792
|
}
|
|
50769
|
-
|
|
50793
|
+
U(MS, "ownDefaults", { noScaleCache: !0, lockMovementX: !1, lockMovementY: !1, lockRotation: !1, lockScalingX: !1, lockScalingY: !1, lockSkewingX: !1, lockSkewingY: !1, lockScalingFlip: !1, cornerSize: 13, touchCornerSize: 24, transparentCorners: !0, cornerColor: "rgb(178,204,255)", cornerStrokeColor: "", cornerStyle: "rect", cornerDashArray: null, hasControls: !0, borderColor: "rgb(178,204,255)", borderDashArray: null, borderOpacityWhenMoving: 0.4, borderScaleFactor: 1, hasBorders: !0, selectionBackgroundColor: "", selectable: !0, evented: !0, perPixelTargetFind: !1, activeOn: "down", hoverCursor: null, moveCursor: null });
|
|
50770
50794
|
var gi = class extends MS {
|
|
50771
50795
|
};
|
|
50772
50796
|
SS(gi, [KM]), Re.setClass(gi), Re.setClass(gi, "object");
|
|
@@ -50804,7 +50828,7 @@ var TS = class Fh extends CS {
|
|
|
50804
50828
|
return Math.abs(i) < Qs ? -1 : 1;
|
|
50805
50829
|
}
|
|
50806
50830
|
constructor(e, t, i, n) {
|
|
50807
|
-
super(n),
|
|
50831
|
+
super(n), U(this, "AB", void 0), U(this, "AC", void 0), U(this, "alpha", void 0), U(this, "bisector", void 0), this.A = new q(e), this.B = new q(t), this.C = new q(i), this.AB = this.createSideVector(this.A, this.B), this.AC = this.createSideVector(this.A, this.C), this.alpha = Vu(this.AB, this.AC), this.bisector = zd(Eg(this.AB.eq(mk) ? this.AC : this.AB, this.alpha / 2));
|
|
50808
50832
|
}
|
|
50809
50833
|
calcOrthogonalProjection(e, t, i = this.strokeProjectionMagnitude) {
|
|
50810
50834
|
let n = Pg(this.createSideVector(e, t)), r = Fh.getOrthogonalRotationFactor(n, this.bisector);
|
|
@@ -50817,8 +50841,8 @@ var TS = class Fh extends CS {
|
|
|
50817
50841
|
}), e;
|
|
50818
50842
|
}
|
|
50819
50843
|
projectMiter() {
|
|
50820
|
-
let e = [], t = Math.abs(this.alpha), i = 1 / Math.sin(t / 2), n = this.scaleUnitVector(this.bisector, -this.strokeProjectionMagnitude * i), r = this.options.strokeUniform ?
|
|
50821
|
-
return
|
|
50844
|
+
let e = [], t = Math.abs(this.alpha), i = 1 / Math.sin(t / 2), n = this.scaleUnitVector(this.bisector, -this.strokeProjectionMagnitude * i), r = this.options.strokeUniform ? Uu(this.scaleUnitVector(this.bisector, this.options.strokeMiterLimit)) : this.options.strokeMiterLimit;
|
|
50845
|
+
return Uu(n) / this.strokeProjectionMagnitude <= r && e.push(this.applySkew(this.A.add(n))), e.push(...this.projectBevel()), e;
|
|
50822
50846
|
}
|
|
50823
50847
|
projectRoundNoSkew(e, t) {
|
|
50824
50848
|
let i = [], n = new q(Fh.getOrthogonalRotationFactor(this.bisector), Fh.getOrthogonalRotationFactor(new q(this.bisector.y, this.bisector.x)));
|
|
@@ -50876,7 +50900,7 @@ var TS = class Fh extends CS {
|
|
|
50876
50900
|
let e = new q(1, 1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar);
|
|
50877
50901
|
s.push(this.A.add(e), this.A.subtract(e));
|
|
50878
50902
|
} else {
|
|
50879
|
-
let e = this.calcOrthogonalProjection(this.A, this.T, this.strokeProjectionMagnitude), t = this.scaleUnitVector(
|
|
50903
|
+
let e = this.calcOrthogonalProjection(this.A, this.T, this.strokeProjectionMagnitude), t = this.scaleUnitVector(zd(this.createSideVector(this.A, this.T)), -this.strokeProjectionMagnitude), i = this.A.add(t);
|
|
50880
50904
|
s.push(i.add(e), i.subtract(e));
|
|
50881
50905
|
}
|
|
50882
50906
|
return s.map((e) => this.applySkew(e));
|
|
@@ -50911,7 +50935,7 @@ const ES = (s, e, t = !1) => {
|
|
|
50911
50935
|
let l, c;
|
|
50912
50936
|
o === 0 ? (c = a[1], l = t ? r : a[a.length - 1]) : o === a.length - 1 ? (l = a[o - 1], c = t ? r : a[0]) : (l = a[o - 1], c = a[o + 1]), t && a.length === 1 ? i.push(...new Wy(r, r, e).project()) : !t || o !== 0 && o !== a.length - 1 ? i.push(...new TS(r, l, c, e).project()) : i.push(...new Wy(r, o === 0 ? c : l, e).project());
|
|
50913
50937
|
}), i;
|
|
50914
|
-
},
|
|
50938
|
+
}, Ug = (s) => {
|
|
50915
50939
|
let e = {};
|
|
50916
50940
|
return Object.keys(s).forEach((t) => {
|
|
50917
50941
|
e[t] = {}, Object.keys(s[t]).forEach((i) => {
|
|
@@ -50921,7 +50945,7 @@ const ES = (s, e, t = !1) => {
|
|
|
50921
50945
|
}, Wd = (s, e, t = !1) => s.fill !== e.fill || s.stroke !== e.stroke || s.strokeWidth !== e.strokeWidth || s.fontSize !== e.fontSize || s.fontFamily !== e.fontFamily || s.fontWeight !== e.fontWeight || s.fontStyle !== e.fontStyle || s.textDecorationThickness !== e.textDecorationThickness || s.textDecorationColor !== e.textDecorationColor || s.textBackgroundColor !== e.textBackgroundColor || s.deltaY !== e.deltaY || t && (s.overline !== e.overline || s.underline !== e.underline || s.linethrough !== e.linethrough), AS = (s, e) => {
|
|
50922
50946
|
let t = e.split(`
|
|
50923
50947
|
`), i = [], n = -1, r = {};
|
|
50924
|
-
s =
|
|
50948
|
+
s = Ug(s);
|
|
50925
50949
|
for (let o = 0; o < t.length; o++) {
|
|
50926
50950
|
let a = Bd(t[o]);
|
|
50927
50951
|
if (s[o]) for (let l = 0; l < a.length; l++) {
|
|
@@ -50933,7 +50957,7 @@ const ES = (s, e, t = !1) => {
|
|
|
50933
50957
|
}
|
|
50934
50958
|
return i;
|
|
50935
50959
|
}, PS = (s, e) => {
|
|
50936
|
-
if (!Array.isArray(s)) return
|
|
50960
|
+
if (!Array.isArray(s)) return Ug(s);
|
|
50937
50961
|
let t = e.split(xg), i = {}, n = -1, r = 0;
|
|
50938
50962
|
for (let o = 0; o < t.length; o++) {
|
|
50939
50963
|
let a = Bd(t[o]);
|
|
@@ -51005,14 +51029,14 @@ function Dk(s, e, t, i) {
|
|
|
51005
51029
|
else if (s === "visible") o = e !== "none" && e !== "hidden", t && t.visible === !1 && (o = !1);
|
|
51006
51030
|
else if (s === "opacity") o = parseFloat(e), t && t.opacity !== void 0 && (o *= t.opacity);
|
|
51007
51031
|
else if (s === "textAnchor") o = e === "start" ? ii : e === "end" ? En : Rt;
|
|
51008
|
-
else if (s === "charSpacing" || s === "textDecorationThickness") r =
|
|
51032
|
+
else if (s === "charSpacing" || s === "textDecorationThickness") r = zr(e, i) / i * 1e3;
|
|
51009
51033
|
else if (s === "paintFirst") {
|
|
51010
51034
|
let a = e.indexOf(Xi), l = e.indexOf(vs);
|
|
51011
51035
|
o = Xi, (a > -1 && l > -1 && l < a || a === -1 && l > -1) && (o = vs);
|
|
51012
51036
|
} else {
|
|
51013
51037
|
if (s === "href" || s === "xlink:href" || s === "font" || s === "id") return e;
|
|
51014
51038
|
if (s === "imageSmoothing") return e === "optimizeQuality";
|
|
51015
|
-
r = n ? e.map(
|
|
51039
|
+
r = n ? e.map(zr) : zr(e, i);
|
|
51016
51040
|
}
|
|
51017
51041
|
} else o = "";
|
|
51018
51042
|
return !n && isNaN(r) ? o : r;
|
|
@@ -51036,12 +51060,12 @@ const Lk = { stroke: "strokeOpacity", fill: "fillOpacity" };
|
|
|
51036
51060
|
function Cs(s, e, t) {
|
|
51037
51061
|
if (!s) return {};
|
|
51038
51062
|
let i, n = {}, r = 16;
|
|
51039
|
-
s.parentNode && Vy.test(s.parentNode.nodeName) && (n = Cs(s.parentElement, e, t), n.fontSize && (i = r =
|
|
51063
|
+
s.parentNode && Vy.test(s.parentNode.nodeName) && (n = Cs(s.parentElement, e, t), n.fontSize && (i = r = zr(n.fontSize)));
|
|
51040
51064
|
let o = { ...e.reduce((c, h) => {
|
|
51041
51065
|
let u = s.getAttribute(h);
|
|
51042
51066
|
return u && (c[h] = u), c;
|
|
51043
51067
|
}, {}), ...xk(s, t), ...Ik(s) };
|
|
51044
|
-
o["clip-path"] && s.setAttribute(
|
|
51068
|
+
o["clip-path"] && s.setAttribute(Uy, o[Uy]), o["font-size"] && (i = zr(o[zy], r), o[zy] = `${i}`);
|
|
51045
51069
|
let a = {};
|
|
51046
51070
|
for (let c in o) {
|
|
51047
51071
|
let h = yk(c);
|
|
@@ -51051,7 +51075,7 @@ function Cs(s, e, t) {
|
|
|
51051
51075
|
let u = c.match(EF);
|
|
51052
51076
|
if (!u) return;
|
|
51053
51077
|
let d = u[1], f = u[3], p = u[4], g = u[5], x = u[6];
|
|
51054
|
-
d && (h.fontStyle = d), f && (h.fontWeight = isNaN(parseFloat(f)) ? f : parseFloat(f)), p && (h.fontSize =
|
|
51078
|
+
d && (h.fontStyle = d), f && (h.fontWeight = isNaN(parseFloat(f)) ? f : parseFloat(f)), p && (h.fontSize = zr(p)), x && (h.fontFamily = x), g && (h.lineHeight = g === "normal" ? 1 : g);
|
|
51055
51079
|
})(a.font, a);
|
|
51056
51080
|
let l = { ...n, ...a };
|
|
51057
51081
|
return Vy.test(s.nodeName) ? l : (function(c) {
|
|
@@ -51097,7 +51121,7 @@ var ks = class $p extends gi {
|
|
|
51097
51121
|
return new this({ ...t, ...c, left: n, top: r, width: o, height: a, visible: !!(l && o && a) });
|
|
51098
51122
|
}
|
|
51099
51123
|
};
|
|
51100
|
-
|
|
51124
|
+
U(ks, "type", "Rect"), U(ks, "cacheProperties", [...Ss, ...DS]), U(ks, "ownDefaults", { rx: 0, ry: 0 }), U(ks, "ATTRIBUTE_NAMES", [...nr, "x", "y", "rx", "ry", "width", "height"]), Re.setClass(ks), Re.setSVGClass(ks);
|
|
51101
51125
|
const jy = "initialization", qp = "added", RS = (s, e) => {
|
|
51102
51126
|
let { strokeUniform: t, strokeWidth: i, width: n, height: r, group: o } = e, a = o && o !== s ? uc(o.calcTransformMatrix(), s.calcTransformMatrix()) : null, l = a ? e.getRelativeCenterPoint().transform(a) : e.getRelativeCenterPoint(), c = !e.isStrokeAccountedForInDimensions(), h = t && c ? WM(new q(i, i), void 0, s.calcTransformMatrix()) : yg, u = !t && c ? i : 0, d = Nd(n + u, r + u, Fd([a, e.calcOwnMatrix()], !0)).add(h).scalarDivide(2);
|
|
51103
51127
|
return [l.subtract(d), l.add(d)];
|
|
@@ -51127,17 +51151,17 @@ var Xd = class {
|
|
|
51127
51151
|
return { center: c.transform(i.calcOwnMatrix()), size: l };
|
|
51128
51152
|
}
|
|
51129
51153
|
};
|
|
51130
|
-
|
|
51154
|
+
U(Xd, "type", "strategy");
|
|
51131
51155
|
var Kp = class extends Xd {
|
|
51132
51156
|
shouldPerformLayout(s) {
|
|
51133
51157
|
return !0;
|
|
51134
51158
|
}
|
|
51135
51159
|
};
|
|
51136
|
-
|
|
51160
|
+
U(Kp, "type", "fit-content"), Re.setClass(Kp);
|
|
51137
51161
|
const IS = "layoutManager";
|
|
51138
51162
|
var Wl = class {
|
|
51139
51163
|
constructor(s = new Kp()) {
|
|
51140
|
-
|
|
51164
|
+
U(this, "strategy", void 0), this.strategy = s, this._subscriptions = /* @__PURE__ */ new Map();
|
|
51141
51165
|
}
|
|
51142
51166
|
performLayout(s) {
|
|
51143
51167
|
let e = { bubbles: !0, strategy: this.strategy, ...s, prevStrategy: this._prevLayoutStrategy, stopPropagation() {
|
|
@@ -51218,7 +51242,7 @@ var Ok = class extends Wl {
|
|
|
51218
51242
|
return { ...super.getDefaults(), ...Zp.ownDefaults };
|
|
51219
51243
|
}
|
|
51220
51244
|
constructor(e = [], t = {}) {
|
|
51221
|
-
super(),
|
|
51245
|
+
super(), U(this, "_activeObjects", []), U(this, "__objectSelectionTracker", void 0), U(this, "__objectSelectionDisposer", void 0), Object.assign(this, Zp.ownDefaults), this.setOptions(t), this.groupInit(e, t);
|
|
51222
51246
|
}
|
|
51223
51247
|
groupInit(e, t) {
|
|
51224
51248
|
var i;
|
|
@@ -51383,7 +51407,7 @@ var Ok = class extends Wl {
|
|
|
51383
51407
|
});
|
|
51384
51408
|
}
|
|
51385
51409
|
};
|
|
51386
|
-
|
|
51410
|
+
U(Hs, "type", "Group"), U(Hs, "ownDefaults", { strokeWidth: 0, subTargetCheck: !1, interactive: !1 }), Re.setClass(Hs);
|
|
51387
51411
|
const Fk = (s, e) => s && s.length === 1 ? s[0] : new Hs(s, e), LS = (s, e) => Math.min(e.width / s.width, e.height / s.height), OS = (s, e) => Math.max(e.width / s.width, e.height / s.height), Jp = "\\s*,?\\s*", Oa = `${Jp}(${jr})`, kk = `${Oa}${Oa}${Oa}${Jp}([01])${Jp}([01])${Oa}${Oa}`, Bk = { m: "l", M: "L" }, Nk = (s, e, t, i, n, r, o, a, l, c, h) => {
|
|
51388
51412
|
let u = In(s), d = Ln(s), f = In(e), p = Ln(e), g = t * n * f - i * r * p + o, x = i * n * f + t * r * p + a;
|
|
51389
51413
|
return ["C", c + l * (-t * n * d - i * r * u), h + l * (-i * n * d + t * r * u), g + l * (t * n * p + i * r * f), x + l * (i * n * p - t * r * f), g, x];
|
|
@@ -51418,7 +51442,7 @@ function Qp(s, e, t, i, n, r, o, a) {
|
|
|
51418
51442
|
let y = [new q(Math.min(...d[0]), Math.min(...d[1])), new q(Math.max(...d[0]), Math.max(...d[1]))];
|
|
51419
51443
|
return Et.cachesBoundsOfCurve && (pl.boundsOfCurveCache[l] = y), y;
|
|
51420
51444
|
}
|
|
51421
|
-
const
|
|
51445
|
+
const zk = (s, e, [t, i, n, r, o, a, l, c]) => {
|
|
51422
51446
|
let h = ((u, d, f, p, g, x, m) => {
|
|
51423
51447
|
if (f === 0 || p === 0) return [];
|
|
51424
51448
|
let v = 0, y = 0, _ = 0, w = Math.PI, b = m * gg, A = Ln(b), L = In(b), E = 0.5 * (-L * u - A * d), C = 0.5 * (-L * d + A * u), R = f ** 2, T = p ** 2, P = C ** 2, k = E ** 2, B = R * T - R * P - T * k, N = Math.abs(f), X = Math.abs(p);
|
|
@@ -51482,7 +51506,7 @@ const Uk = (s, e, [t, i, n, r, o, a, l, c]) => {
|
|
|
51482
51506
|
case "a":
|
|
51483
51507
|
h[6] += e, h[7] += t;
|
|
51484
51508
|
case "A":
|
|
51485
|
-
|
|
51509
|
+
zk(e, t, h).forEach((d) => r.push(d)), e = h[6], t = h[7];
|
|
51486
51510
|
break;
|
|
51487
51511
|
case "z":
|
|
51488
51512
|
case "Z":
|
|
@@ -51494,11 +51518,11 @@ const Uk = (s, e, [t, i, n, r, o, a, l, c]) => {
|
|
|
51494
51518
|
}, Gu = (s, e, t, i) => Math.sqrt((t - s) ** 2 + (i - e) ** 2), kS = (s, e, t, i, n, r, o, a) => (l) => {
|
|
51495
51519
|
let c = l ** 3, h = ((f) => 3 * f ** 2 * (1 - f))(l), u = ((f) => 3 * f * (1 - f) ** 2)(l), d = ((f) => (1 - f) ** 3)(l);
|
|
51496
51520
|
return new q(o * c + n * h + t * u + s * d, a * c + r * h + i * u + e * d);
|
|
51497
|
-
}, BS = (s) => s ** 2, NS = (s) => 2 * s * (1 - s),
|
|
51498
|
-
let c = BS(l), h = NS(l), u =
|
|
51521
|
+
}, BS = (s) => s ** 2, NS = (s) => 2 * s * (1 - s), zS = (s) => (1 - s) ** 2, Uk = (s, e, t, i, n, r, o, a) => (l) => {
|
|
51522
|
+
let c = BS(l), h = NS(l), u = zS(l), d = 3 * (u * (t - s) + h * (n - t) + c * (o - n)), f = 3 * (u * (i - e) + h * (r - i) + c * (a - r));
|
|
51499
51523
|
return Math.atan2(f, d);
|
|
51500
51524
|
}, Vk = (s, e, t, i, n, r) => (o) => {
|
|
51501
|
-
let a = BS(o), l = NS(o), c =
|
|
51525
|
+
let a = BS(o), l = NS(o), c = zS(o);
|
|
51502
51526
|
return new q(n * a + t * l + s * c, r * a + i * l + e * c);
|
|
51503
51527
|
}, Hk = (s, e, t, i, n, r) => (o) => {
|
|
51504
51528
|
let a = 1 - o, l = 2 * (a * (t - s) + o * (n - t)), c = 2 * (a * (i - e) + o * (r - i));
|
|
@@ -51526,7 +51550,7 @@ const Uk = (s, e, [t, i, n, r, o, a, l, c]) => {
|
|
|
51526
51550
|
t = h, t.length = Gu(n, r, c[1], c[2]), n = c[1], r = c[2];
|
|
51527
51551
|
break;
|
|
51528
51552
|
case "C":
|
|
51529
|
-
e = kS(n, r, c[1], c[2], c[3], c[4], c[5], c[6]), t = h, t.iterator = e, t.angleFinder =
|
|
51553
|
+
e = kS(n, r, c[1], c[2], c[3], c[4], c[5], c[6]), t = h, t.iterator = e, t.angleFinder = Uk(n, r, c[1], c[2], c[3], c[4], c[5], c[6]), t.length = $y(e, n, r), n = c[5], r = c[6];
|
|
51530
51554
|
break;
|
|
51531
51555
|
case "Q":
|
|
51532
51556
|
e = Vk(n, r, c[1], c[2], c[3], c[4]), t = h, t.iterator = e, t.angleFinder = Hk(n, r, c[1], c[2], c[3], c[4]), t.length = $y(e, n, r), n = c[3], r = c[4];
|
|
@@ -51537,7 +51561,7 @@ const Uk = (s, e, [t, i, n, r, o, a, l, c]) => {
|
|
|
51537
51561
|
i += t.length, l.push(t);
|
|
51538
51562
|
}
|
|
51539
51563
|
return l.push({ length: i, x: n, y: r }), l;
|
|
51540
|
-
},
|
|
51564
|
+
}, US = (s, e, t = Hg(s)) => {
|
|
51541
51565
|
let i = 0;
|
|
51542
51566
|
for (; e - t[i].length > 0 && i < t.length - 2; ) e -= t[i].length, i++;
|
|
51543
51567
|
let n = t[i], r = e / n.length, o = s[i];
|
|
@@ -51615,14 +51639,14 @@ const Uk = (s, e, [t, i, n, r, o, a, l, c]) => {
|
|
|
51615
51639
|
}
|
|
51616
51640
|
})(s), t = t.transform(s.transformMatrix)), delete s.transformMatrix, e && (s.scaleX *= e.scaleX, s.scaleY *= e.scaleY, s.cropX = e.cropX, s.cropY = e.cropY, t.x += e.offsetLeft, t.y += e.offsetTop, s.width = e.width, s.height = e.height), s.setPositionByOrigin(t, Rt, Rt);
|
|
51617
51641
|
};
|
|
51618
|
-
lc({ addTransformToObject: () => HM, animate: () => kg, animateColor: () => sS, applyTransformToObject: () => ea, calcAngleBetweenVectors: () => Vu, calcDimensionsMatrix: () => cc, calcPlaneChangeMatrix: () => uc, calcVectorRotation: () => Ag, cancelAnimFrame: () => DM, capValue: () => Yr, composeMatrix: () => FM, copyCanvasElement: () => pF, cos: () => In, createCanvasElement: () => Qn, createImage: () => RM, createRotateMatrix: () => Jr, createScaleMatrix: () => kd, createSkewXMatrix: () => bg, createSkewYMatrix: () => Mg, createTranslateMatrix: () => pa, createVector: () => Hl, crossProduct: () => No, degreesToRadians: () => Vt, dotProduct: () => jM, ease: () => RF, enlivenObjectEnlivables: () => hc, enlivenObjects: () => Jo, findScaleToCover: () => OS, findScaleToFit: () => LS, getBoundsOfCurve: () => Qp, getOrthonormalVector: () => Pg, getPathSegmentsInfo: () => Hg, getPointOnPath: () =>
|
|
51642
|
+
lc({ addTransformToObject: () => HM, animate: () => kg, animateColor: () => sS, applyTransformToObject: () => ea, calcAngleBetweenVectors: () => Vu, calcDimensionsMatrix: () => cc, calcPlaneChangeMatrix: () => uc, calcVectorRotation: () => Ag, cancelAnimFrame: () => DM, capValue: () => Yr, composeMatrix: () => FM, copyCanvasElement: () => pF, cos: () => In, createCanvasElement: () => Qn, createImage: () => RM, createRotateMatrix: () => Jr, createScaleMatrix: () => kd, createSkewXMatrix: () => bg, createSkewYMatrix: () => Mg, createTranslateMatrix: () => pa, createVector: () => Hl, crossProduct: () => No, degreesToRadians: () => Vt, dotProduct: () => jM, ease: () => RF, enlivenObjectEnlivables: () => hc, enlivenObjects: () => Jo, findScaleToCover: () => OS, findScaleToFit: () => LS, getBoundsOfCurve: () => Qp, getOrthonormalVector: () => Pg, getPathSegmentsInfo: () => Hg, getPointOnPath: () => US, getPointer: () => VM, getRandomInt: () => Zk, getRegularPolygonPath: () => qk, getSmoothPathFromPoints: () => Yk, getSvgAttributes: () => wF, getUnitVector: () => zd, groupSVGElements: () => Fk, hasStyleChanged: () => Wd, invertTransform: () => tn, isBetweenVectors: () => Hp, isIdentityMatrix: () => IM, isTouchEvent: () => zu, isTransparent: () => wS, joinPath: () => HS, loadImage: () => gl, magnitude: () => Uu, makeBoundingBoxFromPoints: () => qn, makePathSimpler: () => FS, matrixToSVG: () => Qo, mergeClipPaths: () => Kk, multiplyTransformMatrices: () => Ht, multiplyTransformMatrixArray: () => Fd, parsePath: () => VS, parsePreserveAspectRatioAttribute: () => qM, parseUnit: () => zr, pick: () => Qr, projectStrokeOnPoints: () => ES, qrDecompose: () => Zo, radiansToDegrees: () => _s, removeFromArray: () => wr, removeTransformFromObject: () => bF, removeTransformMatrixForSvgParsing: () => Jk, requestAnimFrame: () => ml, resetObjectTransform: () => GM, rotateVector: () => Eg, saveObjectTransform: () => Cg, sendObjectToPlane: () => Tg, sendPointToPlane: () => bs, sendVectorToPlane: () => WM, sin: () => Ln, sizeAfterTransform: () => Nd, string: () => gF, stylesFromArray: () => PS, stylesToArray: () => AS, toBlob: () => _g, toDataURL: () => vg, toFixed: () => Dt, transformPath: () => $k, transformPoint: () => fi });
|
|
51619
51643
|
function em(s, e) {
|
|
51620
51644
|
let t = s.style;
|
|
51621
51645
|
t && Object.entries(e).forEach(([i, n]) => t.setProperty(i, n));
|
|
51622
51646
|
}
|
|
51623
|
-
var Qk = class extends
|
|
51647
|
+
var Qk = class extends zM {
|
|
51624
51648
|
constructor(s, { allowTouchScrolling: e = !1, containerClass: t = "" } = {}) {
|
|
51625
|
-
super(s),
|
|
51649
|
+
super(s), U(this, "upper", void 0), U(this, "container", void 0);
|
|
51626
51650
|
let { el: i } = this.lower, n = this.createUpperCanvas();
|
|
51627
51651
|
this.upper = { el: n, ctx: n.getContext("2d") }, this.applyCanvasStyle(i, { allowTouchScrolling: e }), this.applyCanvasStyle(n, { allowTouchScrolling: e, styles: { position: "absolute", left: "0", top: "0" } });
|
|
51628
51652
|
let r = this.createContainerElement();
|
|
@@ -51729,10 +51753,10 @@ function sB(s, e = {}) {
|
|
|
51729
51753
|
i = o;
|
|
51730
51754
|
}), t;
|
|
51731
51755
|
}
|
|
51732
|
-
lc({ changeHeight: () => dk, changeObjectHeight: () => aS, changeObjectWidth: () => oS, changeWidth: () => Gp, createObjectDefaultControls: () =>
|
|
51756
|
+
lc({ changeHeight: () => dk, changeObjectHeight: () => aS, changeObjectWidth: () => oS, changeWidth: () => Gp, createObjectDefaultControls: () => zg, createPathControls: () => sB, createPolyActionHandler: () => $S, createPolyControls: () => eB, createPolyPositionHandler: () => XS, createResizeControls: () => _S, createTextboxDefaultControls: () => bS, dragHandler: () => GS, factoryPolyActionHandler: () => YS, getLocalPoint: () => Ud, polyActionHandler: () => jS, renderCircleControl: () => lS, renderSquareControl: () => cS, rotationStyleHandler: () => hS, rotationWithSnapping: () => uS, scaleCursorStyleHandler: () => Oo, scaleOrSkewActionName: () => Ua, scaleSkewCursorStyleHandler: () => Rr, scalingEqually: () => za, scalingX: () => pS, scalingXOrSkewingY: () => Wp, scalingY: () => mS, scalingYOrSkewingX: () => Xp, skewCursorStyleHandler: () => gS, skewHandlerX: () => yS, skewHandlerY: () => vS, wrapWithFireEvent: () => ws, wrapWithFixedAnchor: () => ir });
|
|
51733
51757
|
var KS = class ZS extends wg {
|
|
51734
51758
|
constructor(...e) {
|
|
51735
|
-
super(...e),
|
|
51759
|
+
super(...e), U(this, "_hoveredTargets", []), U(this, "_currentTransform", null), U(this, "_groupSelector", null), U(this, "contextTopDirty", !1);
|
|
51736
51760
|
}
|
|
51737
51761
|
static getDefaults() {
|
|
51738
51762
|
return { ...super.getDefaults(), ...ZS.ownDefaults };
|
|
@@ -51826,7 +51850,7 @@ var KS = class ZS extends wg {
|
|
|
51826
51850
|
let t = this.getScenePoint(e), i = this._activeObject, n = this.getActiveObjects(), r = this.searchPossibleTargets(this._objects, t), { subTargets: o, container: a, target: l } = r, c = { ...r, currentSubTargets: o, currentContainer: a, currentTarget: l };
|
|
51827
51851
|
if (!i) return c;
|
|
51828
51852
|
let h = { ...this.searchPossibleTargets([i], t), currentSubTargets: o, currentContainer: a, currentTarget: l };
|
|
51829
|
-
return i.findControl(this.getViewportPoint(e),
|
|
51853
|
+
return i.findControl(this.getViewportPoint(e), zu(e)) ? { ...h, target: i } : h.target && (n.length > 1 || !this.preserveObjectStacking || this.preserveObjectStacking && e[this.altSelectionKey]) ? h : c;
|
|
51830
51854
|
}
|
|
51831
51855
|
_pointIsInObjectSelectionArea(e, t) {
|
|
51832
51856
|
let i = e.getCoords(), n = this.getZoom(), r = e.padding / n;
|
|
@@ -51976,10 +52000,10 @@ var KS = class ZS extends wg {
|
|
|
51976
52000
|
super._setSVGObject(e, t, i), t.set(n);
|
|
51977
52001
|
}
|
|
51978
52002
|
};
|
|
51979
|
-
|
|
52003
|
+
U(KS, "ownDefaults", { uniformScaling: !0, uniScaleKey: "shiftKey", centeredScaling: !1, centeredRotation: !1, centeredKey: "altKey", altActionKey: "shiftKey", selection: !0, selectionKey: "shiftKey", selectionColor: "rgba(100, 100, 255, 0.3)", selectionDashArray: [], selectionBorderColor: "rgba(255, 255, 255, 0.3)", selectionLineWidth: 1, selectionFullyContained: !1, hoverCursor: "move", moveCursor: "move", defaultCursor: "default", freeDrawingCursor: "crosshair", notAllowedCursor: "not-allowed", perPixelTargetFind: !1, targetFindTolerance: 0, skipTargetFind: !1, stopContextMenu: !0, fireRightClick: !0, fireMiddleClick: !0, enablePointerEvents: !1, containerClass: "canvas-container", preserveObjectStacking: !0 });
|
|
51980
52004
|
var rB = class {
|
|
51981
52005
|
constructor(s) {
|
|
51982
|
-
|
|
52006
|
+
U(this, "targets", []), U(this, "__disposer", void 0);
|
|
51983
52007
|
let e = () => {
|
|
51984
52008
|
let { hiddenTextarea: i } = s.getActiveObject() || {};
|
|
51985
52009
|
i && i.focus();
|
|
@@ -52017,7 +52041,7 @@ var rB = class {
|
|
|
52017
52041
|
const Zi = { passive: !1 }, Po = (s, e) => ({ viewportPoint: s.getViewportPoint(e), scenePoint: s.getScenePoint(e) }), Ls = (s, ...e) => s.addEventListener(...e), dn = (s, ...e) => s.removeEventListener(...e), oB = { mouse: { in: "over", out: "out", targetIn: "mouseover", targetOut: "mouseout", canvasIn: "mouse:over", canvasOut: "mouse:out" }, drag: { in: "enter", out: "leave", targetIn: "dragenter", targetOut: "dragleave", canvasIn: "drag:enter", canvasOut: "drag:leave" } };
|
|
52018
52042
|
var im = class extends KS {
|
|
52019
52043
|
constructor(s, e = {}) {
|
|
52020
|
-
super(s, e),
|
|
52044
|
+
super(s, e), U(this, "_isClick", void 0), U(this, "textEditingManager", new rB(this)), ["_onMouseDown", "_onTouchStart", "_onMouseMove", "_onMouseUp", "_onTouchEnd", "_onResize", "_onMouseWheel", "_onMouseOut", "_onMouseEnter", "_onContextMenu", "_onClick", "_onDragStart", "_onDragEnd", "_onDragProgress", "_onDragOver", "_onDragEnter", "_onDragLeave", "_onDrop"].forEach((t) => {
|
|
52021
52045
|
this[t] = this[t].bind(this);
|
|
52022
52046
|
}), this.addOrRemove(Ls);
|
|
52023
52047
|
}
|
|
@@ -52172,7 +52196,7 @@ var im = class extends KS {
|
|
|
52172
52196
|
this.handleSelection(s), l || (l = this._shouldRender(n) || !c && n === this._activeObject);
|
|
52173
52197
|
}
|
|
52174
52198
|
if (n) {
|
|
52175
|
-
let { key: c, control: h } = n.findControl(this.getViewportPoint(s),
|
|
52199
|
+
let { key: c, control: h } = n.findControl(this.getViewportPoint(s), zu(s)) || {};
|
|
52176
52200
|
if (a = c, n.selectable && n !== this._activeObject && n.activeOn === "up") this.setActiveObject(n, s), l = !0;
|
|
52177
52201
|
else if (h) {
|
|
52178
52202
|
let u = h.getMouseUpHandler(s, n, h);
|
|
@@ -52226,7 +52250,7 @@ var im = class extends KS {
|
|
|
52226
52250
|
}
|
|
52227
52251
|
if (t = !!e && e === this._activeObject, e) {
|
|
52228
52252
|
e.selectable && e.activeOn === "down" && this.setActiveObject(e, s);
|
|
52229
|
-
let o = e.findControl(this.getViewportPoint(s),
|
|
52253
|
+
let o = e.findControl(this.getViewportPoint(s), zu(s));
|
|
52230
52254
|
if (e === this._activeObject && (o || !r)) {
|
|
52231
52255
|
this._setupCurrentTransform(s, e, t);
|
|
52232
52256
|
let a = o ? o.control : void 0, l = this.getScenePoint(s), c = a && a.getMouseDownHandler(s, e, a);
|
|
@@ -52449,7 +52473,7 @@ var dh = class {
|
|
|
52449
52473
|
return new this({ id: s.getAttribute("id") || void 0, type: tw(s), coords: dB(s, { width: t.viewBoxWidth || t.width, height: t.viewBoxHeight || t.height }), colorStops: uB(s, t.opacity), gradientUnits: i, gradientTransform: Yp(s.getAttribute("gradientTransform") || ""), ...i === "pixels" ? { offsetX: e.width / 2 - n.x, offsetY: e.height / 2 - n.y } : { offsetX: 0, offsetY: 0 } });
|
|
52450
52474
|
}
|
|
52451
52475
|
};
|
|
52452
|
-
|
|
52476
|
+
U(dh, "type", "Gradient"), Re.setClass(dh, "gradient"), Re.setClass(dh, "linear"), Re.setClass(dh, "radial");
|
|
52453
52477
|
var tp = class {
|
|
52454
52478
|
get type() {
|
|
52455
52479
|
return "pattern";
|
|
@@ -52458,7 +52482,7 @@ var tp = class {
|
|
|
52458
52482
|
Ys("warn", "Setting type has no effect", s);
|
|
52459
52483
|
}
|
|
52460
52484
|
constructor(s) {
|
|
52461
|
-
|
|
52485
|
+
U(this, "repeat", "repeat"), U(this, "offsetX", 0), U(this, "offsetY", 0), U(this, "crossOrigin", ""), this.id = $s(), Object.assign(this, s);
|
|
52462
52486
|
}
|
|
52463
52487
|
isImageSource() {
|
|
52464
52488
|
return !!this.source && typeof this.source.src == "string";
|
|
@@ -52486,7 +52510,7 @@ var tp = class {
|
|
|
52486
52510
|
return new this({ ...i, patternTransform: t && t.slice(0), source: r });
|
|
52487
52511
|
}
|
|
52488
52512
|
};
|
|
52489
|
-
|
|
52513
|
+
U(tp, "type", "Pattern"), Re.setClass(tp), Re.setClass(tp, "pattern");
|
|
52490
52514
|
var Tr = class nw extends gi {
|
|
52491
52515
|
constructor(e, { path: t, left: i, top: n, ...r } = {}) {
|
|
52492
52516
|
super(), Object.assign(this, nw.ownDefaults), this.setOptions(r), this._setPath(e || [], !0), typeof i == "number" && this.set("left", i), typeof n == "number" && this.set("top", n);
|
|
@@ -52589,7 +52613,7 @@ var Tr = class nw extends gi {
|
|
|
52589
52613
|
return new this(n, { ...r, ...t, left: void 0, top: void 0 });
|
|
52590
52614
|
}
|
|
52591
52615
|
};
|
|
52592
|
-
|
|
52616
|
+
U(Tr, "type", "Path"), U(Tr, "cacheProperties", [...Ss, "path", "fillRule"]), U(Tr, "ATTRIBUTE_NAMES", [...nr, "d"]), Re.setClass(Tr), Re.setSVGClass(Tr);
|
|
52593
52617
|
const sw = ["radius", "startAngle", "endAngle", "counterClockwise"];
|
|
52594
52618
|
var br = class nm extends gi {
|
|
52595
52619
|
static getDefaults() {
|
|
@@ -52634,7 +52658,7 @@ var br = class nm extends gi {
|
|
|
52634
52658
|
return super._fromObject(e);
|
|
52635
52659
|
}
|
|
52636
52660
|
};
|
|
52637
|
-
|
|
52661
|
+
U(br, "type", "Circle"), U(br, "cacheProperties", [...Ss, ...sw]), U(br, "ownDefaults", { radius: 0, startAngle: 0, endAngle: 360, counterClockwise: !1 }), U(br, "ATTRIBUTE_NAMES", ["cx", "cy", "r", ...nr]), Re.setClass(br), Re.setSVGClass(br);
|
|
52638
52662
|
const sm = ["x1", "x2", "y1", "y2"];
|
|
52639
52663
|
var Ns = class rw extends gi {
|
|
52640
52664
|
constructor([e, t, i, n] = [0, 0, 0, 0], r = {}) {
|
|
@@ -52686,7 +52710,7 @@ var Ns = class rw extends gi {
|
|
|
52686
52710
|
return this._fromObject({ ...r, points: [e, t, i, n] }, { extraParam: "points" });
|
|
52687
52711
|
}
|
|
52688
52712
|
};
|
|
52689
|
-
|
|
52713
|
+
U(Ns, "type", "Line"), U(Ns, "cacheProperties", [...Ss, ...sm]), U(Ns, "ATTRIBUTE_NAMES", nr.concat(sm)), Re.setClass(Ns), Re.setSVGClass(Ns);
|
|
52690
52714
|
var fh = class rm extends gi {
|
|
52691
52715
|
static getDefaults() {
|
|
52692
52716
|
return { ...super.getDefaults(), ...rm.ownDefaults };
|
|
@@ -52703,7 +52727,7 @@ var fh = class rm extends gi {
|
|
|
52703
52727
|
return ["<polygon ", "COMMON_PARTS", 'points="', `${-e} ${t},0 ${-t},${e} ${t}`, '" />'];
|
|
52704
52728
|
}
|
|
52705
52729
|
};
|
|
52706
|
-
|
|
52730
|
+
U(fh, "type", "Triangle"), U(fh, "ownDefaults", { width: 100, height: 100 }), Re.setClass(fh), Re.setSVGClass(fh);
|
|
52707
52731
|
const ow = ["rx", "ry"];
|
|
52708
52732
|
var Do = class om extends gi {
|
|
52709
52733
|
static getDefaults() {
|
|
@@ -52743,14 +52767,14 @@ var Do = class om extends gi {
|
|
|
52743
52767
|
return n.left = (n.left || 0) - n.rx, n.top = (n.top || 0) - n.ry, new this(n);
|
|
52744
52768
|
}
|
|
52745
52769
|
};
|
|
52746
|
-
|
|
52770
|
+
U(Do, "type", "Ellipse"), U(Do, "cacheProperties", [...Ss, ...ow]), U(Do, "ownDefaults", { rx: 0, ry: 0 }), U(Do, "ATTRIBUTE_NAMES", [...nr, "cx", "cy", "rx", "ry"]), Re.setClass(Do), Re.setSVGClass(Do);
|
|
52747
52771
|
const aw = { exactBoundingBox: !1 };
|
|
52748
52772
|
var Os = class am extends gi {
|
|
52749
52773
|
static getDefaults() {
|
|
52750
52774
|
return { ...super.getDefaults(), ...am.ownDefaults };
|
|
52751
52775
|
}
|
|
52752
52776
|
constructor(e = [], t = {}) {
|
|
52753
|
-
super(),
|
|
52777
|
+
super(), U(this, "strokeDiff", void 0), Object.assign(this, am.ownDefaults), this.setOptions(t), this.points = e;
|
|
52754
52778
|
let { left: i, top: n } = t;
|
|
52755
52779
|
this.initialized = !0, this.setBoundingBox(!0), typeof i == "number" && this.set("left", i), typeof n == "number" && this.set("top", n);
|
|
52756
52780
|
}
|
|
@@ -52838,13 +52862,13 @@ var Os = class am extends gi {
|
|
|
52838
52862
|
return this._fromObject(e, { extraParam: "points" });
|
|
52839
52863
|
}
|
|
52840
52864
|
};
|
|
52841
|
-
|
|
52865
|
+
U(Os, "ownDefaults", aw), U(Os, "type", "Polyline"), U(Os, "layoutProperties", [da, fa, "strokeLineCap", "strokeLineJoin", "strokeMiterLimit", "strokeWidth", "strokeUniform", "points"]), U(Os, "cacheProperties", [...Ss, "points"]), U(Os, "ATTRIBUTE_NAMES", [...nr]), Re.setClass(Os), Re.setSVGClass(Os);
|
|
52842
52866
|
var ph = class extends Os {
|
|
52843
52867
|
isOpen() {
|
|
52844
52868
|
return !1;
|
|
52845
52869
|
}
|
|
52846
52870
|
};
|
|
52847
|
-
|
|
52871
|
+
U(ph, "ownDefaults", aw), U(ph, "type", "Polygon"), Re.setClass(ph), Re.setSVGClass(ph);
|
|
52848
52872
|
var lw = class extends gi {
|
|
52849
52873
|
isEmptyStyles(s) {
|
|
52850
52874
|
if (!this.styles || s !== void 0 && !this.styles[s]) return !0;
|
|
@@ -52923,7 +52947,7 @@ var lw = class extends gi {
|
|
|
52923
52947
|
delete this.styles[s];
|
|
52924
52948
|
}
|
|
52925
52949
|
};
|
|
52926
|
-
|
|
52950
|
+
U(lw, "_styleProperties", CF);
|
|
52927
52951
|
const fB = / +/g, pB = /"/g;
|
|
52928
52952
|
function ip(s, e, t, i, n) {
|
|
52929
52953
|
return ` ${((r, { left: o, top: a, width: l, height: c }, h = Et.NUM_FRACTION_DIGITS) => {
|
|
@@ -52938,7 +52962,7 @@ var Vn = class Va extends lw {
|
|
|
52938
52962
|
return { ...super.getDefaults(), ...Va.ownDefaults };
|
|
52939
52963
|
}
|
|
52940
52964
|
constructor(e, t) {
|
|
52941
|
-
super(),
|
|
52965
|
+
super(), U(this, "__charBounds", []), Object.assign(this, Va.ownDefaults), this.setOptions(t), this.styles || (this.styles = {}), this.text = e, this.initialized = !0, this.path && this.setPathInfo(), this.initDimensions(), this.setCoords();
|
|
52942
52966
|
}
|
|
52943
52967
|
setPathInfo() {
|
|
52944
52968
|
let e = this.path;
|
|
@@ -53068,7 +53092,7 @@ var Vn = class Va extends lw {
|
|
|
53068
53092
|
return { width: n, numOfSpaces: 0 };
|
|
53069
53093
|
}
|
|
53070
53094
|
_setGraphemeOnPath(e, t) {
|
|
53071
|
-
let i = e + t.kernedWidth / 2, n = this.path, r =
|
|
53095
|
+
let i = e + t.kernedWidth / 2, n = this.path, r = US(n.path, i, n.segmentsInfo);
|
|
53072
53096
|
t.renderLeft = r.x - n.pathOffset.x, t.renderTop = r.y - n.pathOffset.y, t.angle = r.angle + (this.pathSide === "right" ? Math.PI : 0);
|
|
53073
53097
|
}
|
|
53074
53098
|
_getGraphemeBox(e, t, i, n, r) {
|
|
@@ -53244,7 +53268,7 @@ var Vn = class Va extends lw {
|
|
|
53244
53268
|
return this._fromObject({ ...e, styles: PS(e.styles || {}, e.text) }, { extraParam: "text" });
|
|
53245
53269
|
}
|
|
53246
53270
|
};
|
|
53247
|
-
|
|
53271
|
+
U(Vn, "textLayoutProperties", QM), U(Vn, "cacheProperties", [...Ss, ...eS]), U(Vn, "ownDefaults", TF), U(Vn, "type", "Text"), U(Vn, "genericFonts", ["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui", "ui-serif", "ui-sans-serif", "ui-monospace", "ui-rounded", "math", "emoji", "fangsong"]), U(Vn, "ATTRIBUTE_NAMES", nr.concat("x", "y", "dx", "dy", "font-family", "font-style", "font-weight", "font-size", "letter-spacing", "text-decoration", "text-decoration-thickness", "text-decoration-color", "text-anchor")), SS(Vn, [class extends KM {
|
|
53248
53272
|
_toSVG() {
|
|
53249
53273
|
let s = this._getSVGLeftTopOffsets(), e = this._getSVGTextAndBg(s.textTop, s.textLeft);
|
|
53250
53274
|
return this._wrapSVGTextAndBg(e);
|
|
@@ -53306,7 +53330,7 @@ z(Vn, "textLayoutProperties", QM), z(Vn, "cacheProperties", [...Ss, ...eS]), z(V
|
|
|
53306
53330
|
}]), Re.setClass(Vn), Re.setSVGClass(Vn);
|
|
53307
53331
|
var mB = class {
|
|
53308
53332
|
constructor(s) {
|
|
53309
|
-
|
|
53333
|
+
U(this, "target", void 0), U(this, "__mouseDownInPlace", !1), U(this, "__dragStartFired", !1), U(this, "__isDraggingOver", !1), U(this, "__dragStartSelection", void 0), U(this, "__dragImageDisposer", void 0), U(this, "_dispose", void 0), this.target = s;
|
|
53310
53334
|
let e = [this.target.on("dragenter", this.dragEnterHandler.bind(this)), this.target.on("dragover", this.dragOverHandler.bind(this)), this.target.on("dragleave", this.dragLeaveHandler.bind(this)), this.target.on("dragend", this.dragEndHandler.bind(this)), this.target.on("drop", this.dropHandler.bind(this))];
|
|
53311
53335
|
this._dispose = () => {
|
|
53312
53336
|
e.forEach((t) => t()), this._dispose = void 0;
|
|
@@ -53331,7 +53355,7 @@ var mB = class {
|
|
|
53331
53355
|
}
|
|
53332
53356
|
setDragImage(s, { selectionStart: e, selectionEnd: t }) {
|
|
53333
53357
|
var i;
|
|
53334
|
-
let n = this.target, r = n.canvas, o = new q(n.flipX ? -1 : 1, n.flipY ? -1 : 1), a = n._getCursorBoundaries(e), l = new q(a.left + a.leftOffset, a.top + a.topOffset).multiply(o).transform(n.calcTransformMatrix()), c = r.getScenePoint(s).subtract(l), h = n.getCanvasRetinaScaling(), u = n.getBoundingRect(), d = l.subtract(new q(u.left, u.top)), f = r.viewportTransform, p = d.add(c).transform(f, !0), g = n.backgroundColor, x =
|
|
53358
|
+
let n = this.target, r = n.canvas, o = new q(n.flipX ? -1 : 1, n.flipY ? -1 : 1), a = n._getCursorBoundaries(e), l = new q(a.left + a.leftOffset, a.top + a.topOffset).multiply(o).transform(n.calcTransformMatrix()), c = r.getScenePoint(s).subtract(l), h = n.getCanvasRetinaScaling(), u = n.getBoundingRect(), d = l.subtract(new q(u.left, u.top)), f = r.viewportTransform, p = d.add(c).transform(f, !0), g = n.backgroundColor, x = Ug(n.styles);
|
|
53335
53359
|
n.backgroundColor = "";
|
|
53336
53360
|
let m = { stroke: "transparent", fill: "transparent", textBackgroundColor: "transparent" };
|
|
53337
53361
|
n.setSelectionStyles(m, 0, e), n.setSelectionStyles(m, t, n.text.length), n.dirty = !0;
|
|
@@ -53402,7 +53426,7 @@ var mB = class {
|
|
|
53402
53426
|
const Ky = /[ \n\.,;!\?\-]/;
|
|
53403
53427
|
var gB = class extends Vn {
|
|
53404
53428
|
constructor(...s) {
|
|
53405
|
-
super(...s),
|
|
53429
|
+
super(...s), U(this, "_currentCursorOpacity", 1);
|
|
53406
53430
|
}
|
|
53407
53431
|
initBehavior() {
|
|
53408
53432
|
this._tick = this._tick.bind(this), this._onTickComplete = this._onTickComplete.bind(this), this.updateSelectionOnMouseMove = this.updateSelectionOnMouseMove.bind(this);
|
|
@@ -53774,7 +53798,7 @@ var gB = class extends Vn {
|
|
|
53774
53798
|
const Zy = (s) => !!s.button;
|
|
53775
53799
|
var yB = class extends xB {
|
|
53776
53800
|
constructor(...s) {
|
|
53777
|
-
super(...s),
|
|
53801
|
+
super(...s), U(this, "draggableTextDelegate", void 0);
|
|
53778
53802
|
}
|
|
53779
53803
|
initBehavior() {
|
|
53780
53804
|
this.on("mousedown", this._mouseDownHandler), this.on("mouseup", this.mouseUpHandler), this.on("mousedblclick", this.doubleClickHandler), this.on("mousetripleclick", this.tripleClickHandler), this.draggableTextDelegate = new mB(this), super.initBehavior();
|
|
@@ -53975,7 +53999,7 @@ var Ir = class lm extends yB {
|
|
|
53975
53999
|
this.exitEditingImpl(), this.draggableTextDelegate.dispose(), super.dispose();
|
|
53976
54000
|
}
|
|
53977
54001
|
};
|
|
53978
|
-
|
|
54002
|
+
U(Ir, "ownDefaults", vB), U(Ir, "type", "IText"), Re.setClass(Ir), Re.setClass(Ir, "i-text");
|
|
53979
54003
|
var _h = class cm extends Ir {
|
|
53980
54004
|
static getDefaults() {
|
|
53981
54005
|
return { ...super.getDefaults(), ...cm.ownDefaults };
|
|
@@ -54100,7 +54124,7 @@ var _h = class cm extends Ir {
|
|
|
54100
54124
|
return super.toObject(["minWidth", "splitByGrapheme", ...e]);
|
|
54101
54125
|
}
|
|
54102
54126
|
};
|
|
54103
|
-
|
|
54127
|
+
U(_h, "type", "Textbox"), U(_h, "textLayoutProperties", [...Ir.textLayoutProperties, "width"]), U(_h, "ownDefaults", { minWidth: 20, dynamicMinWidth: 2, lockScalingFlip: !0, noScaleCache: !1, _wordJoiners: /[ \t\r]/, splitByGrapheme: !1 }), Re.setClass(_h);
|
|
54104
54128
|
var Qy = class extends Xd {
|
|
54105
54129
|
shouldPerformLayout(s) {
|
|
54106
54130
|
return !!s.target.clipPath && super.shouldPerformLayout(s);
|
|
@@ -54123,13 +54147,13 @@ var Qy = class extends Xd {
|
|
|
54123
54147
|
}
|
|
54124
54148
|
}
|
|
54125
54149
|
};
|
|
54126
|
-
|
|
54150
|
+
U(Qy, "type", "clip-path"), Re.setClass(Qy);
|
|
54127
54151
|
var ev = class extends Xd {
|
|
54128
54152
|
getInitialSize({ target: s }, { size: e }) {
|
|
54129
54153
|
return new q(s.width || e.x, s.height || e.y);
|
|
54130
54154
|
}
|
|
54131
54155
|
};
|
|
54132
|
-
|
|
54156
|
+
U(ev, "type", "fixed"), Re.setClass(ev);
|
|
54133
54157
|
var _B = class extends Wl {
|
|
54134
54158
|
subscribeTargets(s) {
|
|
54135
54159
|
let e = s.target;
|
|
@@ -54203,10 +54227,10 @@ var _B = class extends Wl {
|
|
|
54203
54227
|
super._renderControls(e, t), e.restore();
|
|
54204
54228
|
}
|
|
54205
54229
|
};
|
|
54206
|
-
|
|
54230
|
+
U(bh, "type", "ActiveSelection"), U(bh, "ownDefaults", { multiSelectionStacking: "canvas-stacking" }), Re.setClass(bh), Re.setClass(bh, "activeSelection");
|
|
54207
54231
|
var bB = class {
|
|
54208
54232
|
constructor() {
|
|
54209
|
-
|
|
54233
|
+
U(this, "resources", {});
|
|
54210
54234
|
}
|
|
54211
54235
|
applyFilters(s, e, t, i, n) {
|
|
54212
54236
|
let r = n.getContext("2d", { willReadFrequently: !0, desynchronized: !0 });
|
|
@@ -54221,7 +54245,7 @@ var bB = class {
|
|
|
54221
54245
|
}
|
|
54222
54246
|
}, cw = class {
|
|
54223
54247
|
constructor({ tileSize: s = Et.textureSize } = {}) {
|
|
54224
|
-
|
|
54248
|
+
U(this, "aPosition", new Float32Array([0, 0, 0, 1, 1, 0, 1, 1])), U(this, "resources", {}), this.tileSize = s, this.setupGLContext(s, s), this.captureGPUInfo();
|
|
54225
54249
|
}
|
|
54226
54250
|
setupGLContext(s, e) {
|
|
54227
54251
|
this.dispose(), this.createWebGLCanvas(s, e);
|
|
@@ -54305,7 +54329,7 @@ var Mr = class um extends gi {
|
|
|
54305
54329
|
return { ...super.getDefaults(), ...um.ownDefaults };
|
|
54306
54330
|
}
|
|
54307
54331
|
constructor(e, t) {
|
|
54308
|
-
super(),
|
|
54332
|
+
super(), U(this, "_lastScaleX", 1), U(this, "_lastScaleY", 1), U(this, "_filterScalingX", 1), U(this, "_filterScalingY", 1), this.filters = [], Object.assign(this, um.ownDefaults), this.setOptions(t), this.cacheKey = `texture${$s()}`, this.setElement(typeof e == "string" ? (this.canvas && wn(this.canvas.getElement()) || ua()).getElementById(e) : e, t);
|
|
54309
54333
|
}
|
|
54310
54334
|
getElement() {
|
|
54311
54335
|
return this._element;
|
|
@@ -54433,7 +54457,7 @@ var Mr = class um extends gi {
|
|
|
54433
54457
|
return this.fromURL(n["xlink:href"] || n.href, t, n).catch((r) => (Ys("log", "Unable to parse Image", r), null));
|
|
54434
54458
|
}
|
|
54435
54459
|
};
|
|
54436
|
-
|
|
54460
|
+
U(Mr, "type", "Image"), U(Mr, "cacheProperties", [...Ss, ...hw]), U(Mr, "ownDefaults", { strokeWidth: 0, srcFromAttribute: !1, minimumScaleTrigger: 0.5, cropX: 0, cropY: 0, imageSmoothing: !0 }), U(Mr, "ATTRIBUTE_NAMES", [...nr, "x", "y", "width", "height", "preserveAspectRatio", "xlink:href", "href", "crossOrigin", "image-rendering"]), Re.setClass(Mr), Re.setSVGClass(Mr);
|
|
54437
54461
|
Vd(["pattern", "defs", "symbol", "metadata", "clipPath", "mask", "desc"]);
|
|
54438
54462
|
const jd = (s) => s.webgl !== void 0, Gg = "precision highp float", SB = `
|
|
54439
54463
|
${Gg};
|
|
@@ -54540,7 +54564,7 @@ var $t = class {
|
|
|
54540
54564
|
return new this(e);
|
|
54541
54565
|
}
|
|
54542
54566
|
};
|
|
54543
|
-
|
|
54567
|
+
U($t, "type", "BaseFilter"), U($t, "uniformLocations", []);
|
|
54544
54568
|
const CB = { multiply: `gl_FragColor.rgb *= uColor.rgb;
|
|
54545
54569
|
`, screen: `gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);
|
|
54546
54570
|
`, add: `gl_FragColor.rgb += uColor.rgb;
|
|
@@ -54631,7 +54655,7 @@ var Ha = class extends $t {
|
|
|
54631
54655
|
t[0] = this.alpha * t[0] / 255, t[1] = this.alpha * t[1] / 255, t[2] = this.alpha * t[2] / 255, t[3] = this.alpha, s.uniform4fv(e.uColor, t);
|
|
54632
54656
|
}
|
|
54633
54657
|
};
|
|
54634
|
-
|
|
54658
|
+
U(Ha, "defaults", { color: "#F95C63", mode: "multiply", alpha: 1 }), U(Ha, "type", "BlendColor"), U(Ha, "uniformLocations", ["uColor"]), Re.setClass(Ha);
|
|
54635
54659
|
const TB = { multiply: `
|
|
54636
54660
|
precision highp float;
|
|
54637
54661
|
uniform sampler2D uTexture;
|
|
@@ -54718,7 +54742,7 @@ var Ga = class extends $t {
|
|
|
54718
54742
|
return Mr.fromObject(e, i).then((n) => new this({ ...t, image: n }));
|
|
54719
54743
|
}
|
|
54720
54744
|
};
|
|
54721
|
-
|
|
54745
|
+
U(Ga, "type", "BlendImage"), U(Ga, "defaults", { mode: "multiply", alpha: 1 }), U(Ga, "uniformLocations", ["uTransformMatrix", "uImage"]), Re.setClass(Ga);
|
|
54722
54746
|
var Wa = class extends $t {
|
|
54723
54747
|
getFragmentSource() {
|
|
54724
54748
|
return `
|
|
@@ -54796,7 +54820,7 @@ var Wa = class extends $t {
|
|
|
54796
54820
|
return this.horizontal ? [s, 0] : [0, s];
|
|
54797
54821
|
}
|
|
54798
54822
|
};
|
|
54799
|
-
|
|
54823
|
+
U(Wa, "type", "Blur"), U(Wa, "defaults", { blur: 0 }), U(Wa, "uniformLocations", ["uDelta"]), Re.setClass(Wa);
|
|
54800
54824
|
var Xa = class extends $t {
|
|
54801
54825
|
getFragmentSource() {
|
|
54802
54826
|
return `
|
|
@@ -54822,7 +54846,7 @@ var Xa = class extends $t {
|
|
|
54822
54846
|
s.uniform1f(e.uBrightness, this.brightness);
|
|
54823
54847
|
}
|
|
54824
54848
|
};
|
|
54825
|
-
|
|
54849
|
+
U(Xa, "type", "Brightness"), U(Xa, "defaults", { brightness: 0 }), U(Xa, "uniformLocations", ["uBrightness"]), Re.setClass(Xa);
|
|
54826
54850
|
const uw = { matrix: [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], colorsOnly: !0 };
|
|
54827
54851
|
var Lr = class extends $t {
|
|
54828
54852
|
getFragmentSource() {
|
|
@@ -54859,14 +54883,14 @@ var Lr = class extends $t {
|
|
|
54859
54883
|
};
|
|
54860
54884
|
function eo(s, e) {
|
|
54861
54885
|
var t;
|
|
54862
|
-
let i = (
|
|
54886
|
+
let i = (U(t = class extends Lr {
|
|
54863
54887
|
toObject() {
|
|
54864
54888
|
return { type: this.type, colorsOnly: this.colorsOnly };
|
|
54865
54889
|
}
|
|
54866
|
-
}, "type", s),
|
|
54890
|
+
}, "type", s), U(t, "defaults", { colorsOnly: !1, matrix: e }), t);
|
|
54867
54891
|
return Re.setClass(i, s), i;
|
|
54868
54892
|
}
|
|
54869
|
-
|
|
54893
|
+
U(Lr, "type", "ColorMatrix"), U(Lr, "defaults", uw), U(Lr, "uniformLocations", ["uColorMatrix", "uConstants"]), Re.setClass(Lr);
|
|
54870
54894
|
const EB = eo("Brownie", [0.5997, 0.34553, -0.27082, 0, 0.186, -0.0377, 0.86095, 0.15059, 0, -0.1449, 0.24113, -0.07441, 0.44972, 0, -0.02965, 0, 0, 0, 1, 0]), AB = eo("Vintage", [0.62793, 0.32021, -0.03965, 0, 0.03784, 0.02578, 0.64411, 0.03259, 0, 0.02926, 0.0466, -0.08512, 0.52416, 0, 0.02023, 0, 0, 0, 1, 0]), PB = eo("Kodachrome", [1.12855, -0.39673, -0.03992, 0, 0.24991, -0.16404, 1.08352, -0.05498, 0, 0.09698, -0.16786, -0.56034, 1.60148, 0, 0.13972, 0, 0, 0, 1, 0]), DB = eo("Technicolor", [1.91252, -0.85453, -0.09155, 0, 0.04624, -0.30878, 1.76589, -0.10601, 0, -0.27589, -0.2311, -0.75018, 1.84759, 0, 0.12137, 0, 0, 0, 1, 0]), RB = eo("Polaroid", [1.438, -0.062, -0.062, 0, 0, -0.122, 1.378, -0.122, 0, 0, -0.016, -0.016, 1.483, 0, 0, 0, 0, 0, 1, 0]), IB = eo("Sepia", [0.393, 0.769, 0.189, 0, 0, 0.349, 0.686, 0.168, 0, 0, 0.272, 0.534, 0.131, 0, 0, 0, 0, 0, 1, 0]), LB = eo("BlackWhite", [1.5, 1.5, 1.5, 0, -1, 1.5, 1.5, 1.5, 0, -1, 1.5, 1.5, 1.5, 0, -1, 0, 0, 0, 1, 0]);
|
|
54871
54895
|
var dm = class extends $t {
|
|
54872
54896
|
constructor(s = {}) {
|
|
@@ -54887,7 +54911,7 @@ var dm = class extends $t {
|
|
|
54887
54911
|
return Promise.all((s.subFilters || []).map((t) => Re.getClass(t.type).fromObject(t, e))).then((t) => new this({ subFilters: t }));
|
|
54888
54912
|
}
|
|
54889
54913
|
};
|
|
54890
|
-
|
|
54914
|
+
U(dm, "type", "Composed"), Re.setClass(dm);
|
|
54891
54915
|
var ja = class extends $t {
|
|
54892
54916
|
getFragmentSource() {
|
|
54893
54917
|
return `
|
|
@@ -54913,7 +54937,7 @@ var ja = class extends $t {
|
|
|
54913
54937
|
s.uniform1f(e.uContrast, this.contrast);
|
|
54914
54938
|
}
|
|
54915
54939
|
};
|
|
54916
|
-
|
|
54940
|
+
U(ja, "type", "Contrast"), U(ja, "defaults", { contrast: 0 }), U(ja, "uniformLocations", ["uContrast"]), Re.setClass(ja);
|
|
54917
54941
|
const OB = { Convolute_3_1: `
|
|
54918
54942
|
precision highp float;
|
|
54919
54943
|
uniform sampler2D uTexture;
|
|
@@ -55081,7 +55105,7 @@ var Ya = class extends $t {
|
|
|
55081
55105
|
return { ...super.toObject(), opaque: this.opaque, matrix: [...this.matrix] };
|
|
55082
55106
|
}
|
|
55083
55107
|
};
|
|
55084
|
-
|
|
55108
|
+
U(Ya, "type", "Convolute"), U(Ya, "defaults", { opaque: !1, matrix: [0, 0, 0, 0, 1, 0, 0, 0, 0] }), U(Ya, "uniformLocations", ["uMatrix", "uOpaque", "uHalfSize", "uSize"]), Re.setClass(Ya);
|
|
55085
55109
|
const dw = "Gamma";
|
|
55086
55110
|
var $a = class extends $t {
|
|
55087
55111
|
getFragmentSource() {
|
|
@@ -55122,7 +55146,7 @@ var $a = class extends $t {
|
|
|
55122
55146
|
return { type: dw, gamma: this.gamma.concat() };
|
|
55123
55147
|
}
|
|
55124
55148
|
};
|
|
55125
|
-
|
|
55149
|
+
U($a, "type", dw), U($a, "defaults", { gamma: [1, 1, 1] }), U($a, "uniformLocations", ["uGamma"]), Re.setClass($a);
|
|
55126
55150
|
const FB = { average: `
|
|
55127
55151
|
precision highp float;
|
|
55128
55152
|
uniform sampler2D uTexture;
|
|
@@ -55183,7 +55207,7 @@ var qa = class extends $t {
|
|
|
55183
55207
|
return !1;
|
|
55184
55208
|
}
|
|
55185
55209
|
};
|
|
55186
|
-
|
|
55210
|
+
U(qa, "type", "Grayscale"), U(qa, "defaults", { mode: "average" }), U(qa, "uniformLocations", ["uMode"]), Re.setClass(qa);
|
|
55187
55211
|
const kB = { ...uw, rotation: 0 };
|
|
55188
55212
|
var kh = class extends Lr {
|
|
55189
55213
|
calculateMatrix() {
|
|
@@ -55200,7 +55224,7 @@ var kh = class extends Lr {
|
|
|
55200
55224
|
return { type: this.type, rotation: this.rotation };
|
|
55201
55225
|
}
|
|
55202
55226
|
};
|
|
55203
|
-
|
|
55227
|
+
U(kh, "type", "HueRotation"), U(kh, "defaults", kB), Re.setClass(kh);
|
|
55204
55228
|
var Ka = class extends $t {
|
|
55205
55229
|
applyTo2d({ imageData: { data: s } }) {
|
|
55206
55230
|
for (let e = 0; e < s.length; e += 4) s[e] = 255 - s[e], s[e + 1] = 255 - s[e + 1], s[e + 2] = 255 - s[e + 2], this.alpha && (s[e + 3] = 255 - s[e + 3]);
|
|
@@ -55233,7 +55257,7 @@ var Ka = class extends $t {
|
|
|
55233
55257
|
s.uniform1i(e.uInvert, Number(this.invert)), s.uniform1i(e.uAlpha, Number(this.alpha));
|
|
55234
55258
|
}
|
|
55235
55259
|
};
|
|
55236
|
-
|
|
55260
|
+
U(Ka, "type", "Invert"), U(Ka, "defaults", { alpha: !1, invert: !0 }), U(Ka, "uniformLocations", ["uInvert", "uAlpha"]), Re.setClass(Ka);
|
|
55237
55261
|
var Za = class extends $t {
|
|
55238
55262
|
getFragmentSource() {
|
|
55239
55263
|
return `
|
|
@@ -55267,7 +55291,7 @@ var Za = class extends $t {
|
|
|
55267
55291
|
return this.noise === 0;
|
|
55268
55292
|
}
|
|
55269
55293
|
};
|
|
55270
|
-
|
|
55294
|
+
U(Za, "type", "Noise"), U(Za, "defaults", { noise: 0 }), U(Za, "uniformLocations", ["uNoise", "uSeed"]), Re.setClass(Za);
|
|
55271
55295
|
var Ja = class extends $t {
|
|
55272
55296
|
applyTo2d({ imageData: { data: s, width: e, height: t } }) {
|
|
55273
55297
|
for (let i = 0; i < t; i += this.blocksize) for (let n = 0; n < e; n += this.blocksize) {
|
|
@@ -55306,7 +55330,7 @@ var Ja = class extends $t {
|
|
|
55306
55330
|
s.uniform1f(e.uBlocksize, this.blocksize);
|
|
55307
55331
|
}
|
|
55308
55332
|
};
|
|
55309
|
-
|
|
55333
|
+
U(Ja, "type", "Pixelate"), U(Ja, "defaults", { blocksize: 4 }), U(Ja, "uniformLocations", ["uBlocksize"]), Re.setClass(Ja);
|
|
55310
55334
|
var Qa = class extends $t {
|
|
55311
55335
|
getFragmentSource() {
|
|
55312
55336
|
return `
|
|
@@ -55335,7 +55359,7 @@ void main() {
|
|
|
55335
55359
|
s.uniform4fv(e.uLow, n), s.uniform4fv(e.uHigh, r);
|
|
55336
55360
|
}
|
|
55337
55361
|
};
|
|
55338
|
-
|
|
55362
|
+
U(Qa, "type", "RemoveColor"), U(Qa, "defaults", { color: "#FFFFFF", distance: 0.02, useAlpha: !1 }), U(Qa, "uniformLocations", ["uLow", "uHigh"]), Re.setClass(Qa);
|
|
55339
55363
|
var el = class extends $t {
|
|
55340
55364
|
sendUniformData(s, e) {
|
|
55341
55365
|
s.uniform2fv(e.uDelta, this.horizontal ? [1 / this.width, 0] : [0, 1 / this.height]), s.uniform1fv(e.uTaps, this.taps);
|
|
@@ -55445,7 +55469,7 @@ var el = class extends $t {
|
|
|
55445
55469
|
return h;
|
|
55446
55470
|
}
|
|
55447
55471
|
};
|
|
55448
|
-
|
|
55472
|
+
U(el, "type", "Resize"), U(el, "defaults", { resizeType: "hermite", scaleX: 1, scaleY: 1, lanczosLobes: 3 }), U(el, "uniformLocations", ["uDelta", "uTaps"]), Re.setClass(el);
|
|
55449
55473
|
var tl = class extends $t {
|
|
55450
55474
|
getFragmentSource() {
|
|
55451
55475
|
return `
|
|
@@ -55478,7 +55502,7 @@ var tl = class extends $t {
|
|
|
55478
55502
|
return this.saturation === 0;
|
|
55479
55503
|
}
|
|
55480
55504
|
};
|
|
55481
|
-
|
|
55505
|
+
U(tl, "type", "Saturation"), U(tl, "defaults", { saturation: 0 }), U(tl, "uniformLocations", ["uSaturation"]), Re.setClass(tl);
|
|
55482
55506
|
var il = class extends $t {
|
|
55483
55507
|
getFragmentSource() {
|
|
55484
55508
|
return `
|
|
@@ -55512,7 +55536,7 @@ var il = class extends $t {
|
|
|
55512
55536
|
return this.vibrance === 0;
|
|
55513
55537
|
}
|
|
55514
55538
|
};
|
|
55515
|
-
|
|
55539
|
+
U(il, "type", "Vibrance"), U(il, "defaults", { vibrance: 0 }), U(il, "uniformLocations", ["uVibrance"]), Re.setClass(il);
|
|
55516
55540
|
lc({ BaseFilter: () => $t, BlackWhite: () => LB, BlendColor: () => Ha, BlendImage: () => Ga, Blur: () => Wa, Brightness: () => Xa, Brownie: () => EB, ColorMatrix: () => Lr, Composed: () => dm, Contrast: () => ja, Convolute: () => Ya, Gamma: () => $a, Grayscale: () => qa, HueRotation: () => kh, Invert: () => Ka, Kodachrome: () => PB, Noise: () => Za, Pixelate: () => Ja, Polaroid: () => RB, RemoveColor: () => Qa, Resize: () => el, Saturation: () => tl, Sepia: () => IB, Technicolor: () => DB, Vibrance: () => il, Vintage: () => AB });
|
|
55517
55541
|
function BB(s, e, t = "bim-snapshot.png") {
|
|
55518
55542
|
const i = s?.renderer, n = i?.domElement;
|
|
@@ -55522,8 +55546,8 @@ function BB(s, e, t = "bim-snapshot.png") {
|
|
|
55522
55546
|
if (r <= 0 || o <= 0)
|
|
55523
55547
|
return null;
|
|
55524
55548
|
let a = NB(n, r, o);
|
|
55525
|
-
if (!
|
|
55526
|
-
const d =
|
|
55549
|
+
if (!zB(a)) {
|
|
55550
|
+
const d = UB(s, r, o);
|
|
55527
55551
|
d && (a = d);
|
|
55528
55552
|
}
|
|
55529
55553
|
const l = document.createElement("canvas");
|
|
@@ -55541,7 +55565,7 @@ function NB(s, e, t) {
|
|
|
55541
55565
|
const n = i.getContext("2d");
|
|
55542
55566
|
return n && n.drawImage(s, 0, 0, e, t), i;
|
|
55543
55567
|
}
|
|
55544
|
-
function
|
|
55568
|
+
function zB(s) {
|
|
55545
55569
|
const e = s.getContext("2d");
|
|
55546
55570
|
if (!e || s.width <= 0 || s.height <= 0)
|
|
55547
55571
|
return !1;
|
|
@@ -55554,7 +55578,7 @@ function UB(s) {
|
|
|
55554
55578
|
}
|
|
55555
55579
|
return !1;
|
|
55556
55580
|
}
|
|
55557
|
-
function
|
|
55581
|
+
function UB(s, e, t) {
|
|
55558
55582
|
const i = s?.renderer, n = s?.scene, r = s?.camera;
|
|
55559
55583
|
if (!i || !n || !r)
|
|
55560
55584
|
return null;
|
|
@@ -56527,14 +56551,16 @@ class QB {
|
|
|
56527
56551
|
onPickPoint: () => {
|
|
56528
56552
|
this.pickCapturePoint();
|
|
56529
56553
|
},
|
|
56530
|
-
onConfirm: (
|
|
56531
|
-
const
|
|
56532
|
-
|
|
56554
|
+
onConfirm: (n) => {
|
|
56555
|
+
const r = this.get();
|
|
56556
|
+
r.annotationData = this.serializeSnapshotValue(n), this.updateCaptureLabelState(r), e?.(r), this.clearAnnotation();
|
|
56533
56557
|
},
|
|
56534
56558
|
onCancel: () => {
|
|
56535
56559
|
this.clearAnnotation();
|
|
56536
56560
|
}
|
|
56537
|
-
})
|
|
56561
|
+
});
|
|
56562
|
+
const i = !this.isMobileDevice();
|
|
56563
|
+
t.show?.(), t.active?.("edit"), t.setDrawType?.("none"), t.setToolbarVisible?.(i);
|
|
56538
56564
|
}
|
|
56539
56565
|
/**
|
|
56540
56566
|
* 根据图钉数据中的捕捉点在模型中显示标签;未捕捉点的图钉会被自动忽略。
|
|
@@ -56798,7 +56824,16 @@ class QB {
|
|
|
56798
56824
|
*/
|
|
56799
56825
|
applyAnnotationMode(e, t = !0) {
|
|
56800
56826
|
const i = this.engine.fabricDraw;
|
|
56801
|
-
|
|
56827
|
+
if (!i)
|
|
56828
|
+
return;
|
|
56829
|
+
const n = t && !this.isMobileDevice();
|
|
56830
|
+
i.setActionHandlers?.({}), i.show?.(), i.active?.(e), i.setDrawType?.("none"), i.setToolbarVisible?.(n);
|
|
56831
|
+
}
|
|
56832
|
+
/**
|
|
56833
|
+
* 图钉流程沿用引擎统一的设备识别,避免移动端误拉起桌面工具栏。
|
|
56834
|
+
*/
|
|
56835
|
+
isMobileDevice() {
|
|
56836
|
+
return this.engine?.deviceModule?.isMobile?.() === !0 || this.engine?.deviceType === "mobile";
|
|
56802
56837
|
}
|
|
56803
56838
|
/**
|
|
56804
56839
|
* 深度序列化:保留 Vector3,移除 DOM/函数
|
|
@@ -57452,7 +57487,7 @@ class lN {
|
|
|
57452
57487
|
buildBox(e) {
|
|
57453
57488
|
if (e.instance.points.length < 2)
|
|
57454
57489
|
return;
|
|
57455
|
-
const t = Qi(e.instance.points[0]), i = Qi(e.instance.points[1]), n = t.clone().min(i), r = t.clone().max(i), o = r.clone().sub(n), a = n.clone().add(r).multiplyScalar(0.5), l = new
|
|
57490
|
+
const t = Qi(e.instance.points[0]), i = Qi(e.instance.points[1]), n = t.clone().min(i), r = t.clone().max(i), o = r.clone().sub(n), a = n.clone().add(r).multiplyScalar(0.5), l = new Uh(o.x || 0.1, o.y || 0.1, o.z || 0.1);
|
|
57456
57491
|
l.computeBoundingBox();
|
|
57457
57492
|
const c = l.boundingBox ?? new Lt(
|
|
57458
57493
|
new S(-0.5, -0.5, -0.5),
|
|
@@ -58731,7 +58766,7 @@ class bN {
|
|
|
58731
58766
|
this.controlModule?.firstPersonControls?.syncRotationStateFromCamera?.(), this.controlModule?.firstPersonControls?.syncSharedTargetFromCamera?.(), this.controlModule?.thirdPersonControls?.syncRotationStateFromCamera?.(), this.controlModule?.thirdPersonControls?.syncSharedTargetFromAvatar?.(), this.events && this.events.trigger(pn.ViewportResize, { width: e, height: t });
|
|
58732
58767
|
}
|
|
58733
58768
|
/**
|
|
58734
|
-
*
|
|
58769
|
+
* 销毁引擎,释放资源,
|
|
58735
58770
|
*/
|
|
58736
58771
|
dispose() {
|
|
58737
58772
|
if (this.isDisposed)
|