archgine 1.0.66 → 1.0.68
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/lib/environment.worker.js +1 -1
- package/lib/extras/interfaces.d.ts +2 -1
- package/lib/extras/svg-app.d.ts +2 -1
- package/lib/extras/svg-chef.d.ts +2 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +91 -75
- package/lib/index.umd.js +18 -18
- package/lib/renderer.worker.js +1 -1
- package/lib/scenes/svg-scene.d.ts +2 -1
- package/package.json +1 -1
|
@@ -4010,7 +4010,7 @@ Fu.__DOMHandler = Eu;
|
|
|
4010
4010
|
Fu.normalizeLineEndings = Le;
|
|
4011
4011
|
Fu.DOMParser = Ie;
|
|
4012
4012
|
var gr = Fu.DOMParser;
|
|
4013
|
-
const Er = "1.0.
|
|
4013
|
+
const Er = "1.0.68";
|
|
4014
4014
|
function vr() {
|
|
4015
4015
|
return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
|
|
4016
4016
|
}
|
|
@@ -14,7 +14,8 @@ export interface IApp {
|
|
|
14
14
|
getLayers(lv?: number): any[] | undefined;
|
|
15
15
|
getAssetIdsByType(assetType: string): string[] | undefined;
|
|
16
16
|
setAssetType(assetType: string, showLayers?: string[]): void;
|
|
17
|
-
|
|
17
|
+
getLayerVisible(id: string): boolean | undefined;
|
|
18
|
+
updateLayersVisibility(ids: string[], visible?: boolean, strict?: boolean): void;
|
|
18
19
|
selectByIds(ids: string | string[]): void;
|
|
19
20
|
clearSelectedByIds(ids: string | string[]): void;
|
|
20
21
|
getSelectedIds(): string[] | undefined;
|
package/lib/extras/svg-app.d.ts
CHANGED
|
@@ -51,7 +51,8 @@ export declare class SvgApp<Config extends ISvgAppConfig> extends EventDispatche
|
|
|
51
51
|
loadByString(str: string, layers?: string[], lv?: number): ITree[];
|
|
52
52
|
setSkeletons(skeletons: string[]): void;
|
|
53
53
|
getLayers(lv?: number): ITree[] | undefined;
|
|
54
|
-
|
|
54
|
+
getLayerVisible(id: string): boolean | undefined;
|
|
55
|
+
updateLayersVisibility(ids: string[], visible?: boolean, strict?: boolean): void;
|
|
55
56
|
selectByIds(ids: string | string[]): void;
|
|
56
57
|
clearSelectedByIds(ids: string | string[]): void;
|
|
57
58
|
clearSelected(): void;
|
package/lib/extras/svg-chef.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export declare class SvgChef {
|
|
|
20
20
|
_getSvgLayer(el: HTMLElement, lv?: number, lvi?: number, out?: ITree[]): ITree[];
|
|
21
21
|
getElementsMap(el: Element, out?: Record<string, Element>): Record<string, Element>;
|
|
22
22
|
computeBoundingBoxMap(): Record<string, Box2>;
|
|
23
|
-
|
|
23
|
+
getLayerVisible(id: string): boolean | undefined;
|
|
24
|
+
updateLayersVisibility(ids: string[], visible?: boolean, strict?: boolean): void;
|
|
24
25
|
_updateAllLayersVisibility(visible?: boolean): void;
|
|
25
26
|
_updateLayersVisibility(o: HTMLElement, visible?: boolean, up?: boolean, uc?: boolean): void;
|
|
26
27
|
updateVisibilityByAssetType(assetType: string, visible?: boolean, conflictLayers?: string[]): void;
|
package/lib/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * as Vector2 from './math/vector2';
|
|
|
7
7
|
export * as Box2 from './math/box2';
|
|
8
8
|
export { Monitor } from './core/monitor';
|
|
9
9
|
export { AssetTypeEnum, LayerTypeEnum } from './env/enums';
|
|
10
|
+
export { getAssetLayerByType, getAssetLabelByType, assetTypeConflicts } from './env/constants';
|
|
10
11
|
export type { ITree } from './interfaces';
|
|
11
12
|
export type { IApp, IDummyVo, IDummy } from './extras/interfaces';
|
|
12
13
|
export { AppEnum, SvgApp } from './extras/svg-app';
|
package/lib/index.mjs
CHANGED
|
@@ -4010,7 +4010,7 @@ ou.__DOMHandler = Ra;
|
|
|
4010
4010
|
ou.normalizeLineEndings = Cd;
|
|
4011
4011
|
ou.DOMParser = Dd;
|
|
4012
4012
|
var Yx = ou.DOMParser;
|
|
4013
|
-
const Xx = "1.0.
|
|
4013
|
+
const Xx = "1.0.68";
|
|
4014
4014
|
function Zx() {
|
|
4015
4015
|
return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
|
|
4016
4016
|
}
|
|
@@ -8895,6 +8895,19 @@ function fE(r = 20) {
|
|
|
8895
8895
|
return t += "┘", t;
|
|
8896
8896
|
}
|
|
8897
8897
|
var dr = /* @__PURE__ */ ((r) => (r.GROS = "gros", r.RM = "rm", r.WS = "ws", r.SU = "su", r.EQ = "eq", r.FN = "fn", r.GL = "gl", r.IP = "ip", r))(dr || {}), hu = /* @__PURE__ */ ((r) => (r.BACKGROUND = "background", r.ASSETS = "assets", r.ANNOTATIONS = "annotations", r.TEXT = "text", r.ASSET_LABELS = "asset-labels", r.LABELS = "labels", r))(hu || {});
|
|
8898
|
+
const Os = "ae", Sd = "-", Jl = "rm-assets", pE = "rm-labels", ap = "ws-assets", op = "ws-labels";
|
|
8899
|
+
function xa(r) {
|
|
8900
|
+
return r + Sd + hu.ASSETS;
|
|
8901
|
+
}
|
|
8902
|
+
function Yo(r) {
|
|
8903
|
+
return r + Sd + hu.LABELS;
|
|
8904
|
+
}
|
|
8905
|
+
const dE = {
|
|
8906
|
+
rm: ["su-assets", "su-labels", "eq-assets", "eq-labels", "fn-assets", "fn-labels"],
|
|
8907
|
+
ws: ["su-assets", "su-labels", "eq-assets", "eq-labels", "fn-assets", "fn-labels"],
|
|
8908
|
+
su: [Jl, pE, ap, op, "eq-assets", "eq-labels", "fn-assets", "fn-labels"],
|
|
8909
|
+
eq: [ap, op, "su-assets", "su-labels", "fn-assets", "fn-labels"]
|
|
8910
|
+
};
|
|
8898
8911
|
class rr {
|
|
8899
8912
|
_listeners = /* @__PURE__ */ new Map();
|
|
8900
8913
|
destroy() {
|
|
@@ -8949,18 +8962,18 @@ function Ml(r, t = "http://www.w3.org/2000/svg") {
|
|
|
8949
8962
|
async function Bl(r = 2e3) {
|
|
8950
8963
|
return new Promise((t) => setTimeout(t, (Math.random() + 0.5) * r));
|
|
8951
8964
|
}
|
|
8952
|
-
function
|
|
8965
|
+
function Od(r, t = []) {
|
|
8953
8966
|
var e, i;
|
|
8954
|
-
return !r || !r.value || (t.push(r.value), (e = r.children) != null && e.length && ((i = r.children) == null || i.forEach((a) =>
|
|
8967
|
+
return !r || !r.value || (t.push(r.value), (e = r.children) != null && e.length && ((i = r.children) == null || i.forEach((a) => Od(a, t)))), t;
|
|
8955
8968
|
}
|
|
8956
|
-
function
|
|
8969
|
+
function Ld(r) {
|
|
8957
8970
|
if (!r) return "inches";
|
|
8958
8971
|
let t = r.querySelector("#defaultView"), e = t == null ? void 0 : t.getAttribute("units");
|
|
8959
8972
|
return e || "inches";
|
|
8960
8973
|
}
|
|
8961
|
-
function
|
|
8974
|
+
function gE(r) {
|
|
8962
8975
|
if (!r) return 1;
|
|
8963
|
-
let t =
|
|
8976
|
+
let t = Ld(r), e = 1;
|
|
8964
8977
|
switch (t) {
|
|
8965
8978
|
case "mm":
|
|
8966
8979
|
e = 500 / 39.3701;
|
|
@@ -8979,17 +8992,17 @@ function pE(r) {
|
|
|
8979
8992
|
}
|
|
8980
8993
|
return e;
|
|
8981
8994
|
}
|
|
8982
|
-
function
|
|
8995
|
+
function yE(r, t = new Dt()) {
|
|
8983
8996
|
if (!r) return t;
|
|
8984
8997
|
let e = r.split(" "), i = Nt.map(e, (a) => parseFloat(a));
|
|
8985
8998
|
return (i == null ? void 0 : i.length) !== 4 || (t.min.set(i[0], i[1]), t.max.set(i[0] + i[2], i[1] + i[3])), t;
|
|
8986
8999
|
}
|
|
8987
|
-
function
|
|
9000
|
+
function mE(r = new Dt()) {
|
|
8988
9001
|
let t = "";
|
|
8989
9002
|
const e = [];
|
|
8990
9003
|
return e.push(r.min.x), e.push(r.min.y), e.push(Math.abs(r.max.x - r.min.x)), e.push(Math.abs(r.max.y - r.min.y)), t = e.join(" "), t;
|
|
8991
9004
|
}
|
|
8992
|
-
function
|
|
9005
|
+
function Nd(r) {
|
|
8993
9006
|
var t;
|
|
8994
9007
|
if ((t = r == null ? void 0 : r.children) != null && t.length) {
|
|
8995
9008
|
for (let e = 0, i = r.children.length; e < i; e++)
|
|
@@ -8997,8 +9010,8 @@ function Ld(r) {
|
|
|
8997
9010
|
return r.children[e];
|
|
8998
9011
|
}
|
|
8999
9012
|
}
|
|
9000
|
-
const
|
|
9001
|
-
class
|
|
9013
|
+
const vE = new Ht().start();
|
|
9014
|
+
class xE extends rr {
|
|
9002
9015
|
isSvgRenderer = !0;
|
|
9003
9016
|
id;
|
|
9004
9017
|
params;
|
|
@@ -9056,9 +9069,9 @@ class mE extends rr {
|
|
|
9056
9069
|
async render(t, e) {
|
|
9057
9070
|
var a;
|
|
9058
9071
|
if (!t || !e || this.cameraVersion === (e == null ? void 0 : e.version)) return;
|
|
9059
|
-
e.updateMatrixWorld(),
|
|
9060
|
-
let i =
|
|
9061
|
-
(a = t.svg) == null || a.setAttribute("viewBox", i), this.cameraVersion = e.version || -1,
|
|
9072
|
+
e.updateMatrixWorld(), lp.set(0, 0).unproject(e), hp.set(this.params.width, this.params.height).unproject(e), up.setFromPoints([lp, hp]);
|
|
9073
|
+
let i = mE(up);
|
|
9074
|
+
(a = t.svg) == null || a.setAttribute("viewBox", i), this.cameraVersion = e.version || -1, vE.addTimer("render cycle");
|
|
9062
9075
|
}
|
|
9063
9076
|
// @ts-ignore
|
|
9064
9077
|
autoClear;
|
|
@@ -9071,7 +9084,7 @@ class mE extends rr {
|
|
|
9071
9084
|
renderTexture(t, e) {
|
|
9072
9085
|
}
|
|
9073
9086
|
}
|
|
9074
|
-
const
|
|
9087
|
+
const up = new Dt(), lp = new F(), hp = new F();
|
|
9075
9088
|
class he {
|
|
9076
9089
|
isMatrix3 = !0;
|
|
9077
9090
|
elements = [
|
|
@@ -9172,7 +9185,7 @@ class he {
|
|
|
9172
9185
|
let o = Ne.length();
|
|
9173
9186
|
Ne.normalize();
|
|
9174
9187
|
let l = Ne.dot(Te);
|
|
9175
|
-
|
|
9188
|
+
cp.copy(Ne).multiplyScalar(-l), Te.add(cp);
|
|
9176
9189
|
const c = Te.length() || 0;
|
|
9177
9190
|
Te.normalize(), Ne.x * Te.y < Te.x * Ne.y && (Ne.x = -Ne.x, Ne.y = -Ne.y, o = -o, l = -l);
|
|
9178
9191
|
const f = o ? Math.atan2(Ne.y, Ne.x) : Math.atan2(-Ne.x, Te.y);
|
|
@@ -9233,7 +9246,7 @@ class he {
|
|
|
9233
9246
|
}
|
|
9234
9247
|
hasChange() {
|
|
9235
9248
|
for (let t = 0, e = this.elements.length; t < e; t++)
|
|
9236
|
-
if (Math.abs(this.elements[t] -
|
|
9249
|
+
if (Math.abs(this.elements[t] - EE[t]) > Number.EPSILON) return !0;
|
|
9237
9250
|
return !1;
|
|
9238
9251
|
}
|
|
9239
9252
|
invert() {
|
|
@@ -9278,7 +9291,7 @@ class he {
|
|
|
9278
9291
|
), this;
|
|
9279
9292
|
}
|
|
9280
9293
|
makeRotationFromQuaternion(t) {
|
|
9281
|
-
return this.compose(
|
|
9294
|
+
return this.compose(AE, t, wE);
|
|
9282
9295
|
}
|
|
9283
9296
|
makeScale(t, e) {
|
|
9284
9297
|
return this.set(
|
|
@@ -9380,7 +9393,7 @@ class he {
|
|
|
9380
9393
|
return t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = e[1], t[4] = e[4], t[5] = e[7], t[6] = e[2], t[7] = e[5], t[8] = e[8], this;
|
|
9381
9394
|
}
|
|
9382
9395
|
}
|
|
9383
|
-
const
|
|
9396
|
+
const EE = [
|
|
9384
9397
|
1,
|
|
9385
9398
|
0,
|
|
9386
9399
|
0,
|
|
@@ -9390,14 +9403,14 @@ const vE = [
|
|
|
9390
9403
|
0,
|
|
9391
9404
|
0,
|
|
9392
9405
|
1
|
|
9393
|
-
], Ne = /* @__PURE__ */ new F(), Te = /* @__PURE__ */ new F(),
|
|
9406
|
+
], Ne = /* @__PURE__ */ new F(), Te = /* @__PURE__ */ new F(), cp = /* @__PURE__ */ new F(), Ur = /* @__PURE__ */ new he(), Fo = /* @__PURE__ */ new he(), ha = /* @__PURE__ */ new he(), Fn = /* @__PURE__ */ new he(), Il = /* @__PURE__ */ new he(), AE = /* @__PURE__ */ new F(0, 0, 0), wE = /* @__PURE__ */ new F(1, 1, 1), Me = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"], Md = () => {
|
|
9394
9407
|
const r = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, i = Math.random() * 4294967295 | 0;
|
|
9395
9408
|
return (Me[r & 255] + Me[r >> 8 & 255] + Me[r >> 16 & 255] + Me[r >> 24 & 255] + "-" + Me[t & 255] + Me[t >> 8 & 255] + "-" + Me[t >> 16 & 15 | 64] + Me[t >> 24 & 255] + "-" + Me[e & 63 | 128] + Me[e >> 8 & 255] + "-" + Me[e >> 16 & 255] + Me[e >> 24 & 255] + Me[i & 255] + Me[i >> 8 & 255] + Me[i >> 16 & 255] + Me[i >> 24 & 255]).toLowerCase();
|
|
9396
9409
|
};
|
|
9397
|
-
class
|
|
9410
|
+
class Bd extends rr {
|
|
9398
9411
|
isObject2 = !0;
|
|
9399
|
-
id =
|
|
9400
|
-
uuid =
|
|
9412
|
+
id = bE++;
|
|
9413
|
+
uuid = Md();
|
|
9401
9414
|
name;
|
|
9402
9415
|
type = "Object2";
|
|
9403
9416
|
featureKey = "Object2_" + this.id;
|
|
@@ -9480,7 +9493,7 @@ class Md extends rr {
|
|
|
9480
9493
|
return this.updateWorldMatrix(!0, !1), t.applyMatrix3(ii.copy(this.matrixWorld).invert());
|
|
9481
9494
|
}
|
|
9482
9495
|
lookAt(t) {
|
|
9483
|
-
|
|
9496
|
+
fp.copy(t), this.updateWorldMatrix(!0, !1), this.matrixWorld.getTransition(fa), ii.lookAt(fa, fp, TE), ii.getRotation(kn), this.rotation.set(kn.x, kn.x), this.parent && (this.parent.matrixWorld.getRotation(kn), this.rotate(kn.x));
|
|
9484
9497
|
}
|
|
9485
9498
|
applyMatrix3(t) {
|
|
9486
9499
|
this.matrixAutoUpdate && this.updateMatrix(), this.matrix.premultiply(t), this.matrix.decompose(this.position, this.rotation, this.scaled);
|
|
@@ -9532,7 +9545,7 @@ class Md extends rr {
|
|
|
9532
9545
|
return this;
|
|
9533
9546
|
}
|
|
9534
9547
|
add(t) {
|
|
9535
|
-
return !t || !t.isObject2 || t === this ? this : (t.parent && t.parent.remove(t), t.parent = this, this.children.push(t), t.isInComposeNode = this.composeNode || this.isInComposeNode, t.selectable && t.parent.setSelectable(t.selectable), this._autoSort && this.children.sort((e, i) => e.renderOrder - i.renderOrder), t.dispatchEvent(
|
|
9548
|
+
return !t || !t.isObject2 || t === this ? this : (t.parent && t.parent.remove(t), t.parent = this, this.children.push(t), t.isInComposeNode = this.composeNode || this.isInComposeNode, t.selectable && t.parent.setSelectable(t.selectable), this._autoSort && this.children.sort((e, i) => e.renderOrder - i.renderOrder), t.dispatchEvent(_E), this.matrixAutoUpdate || (this.matrixWorldNeedsUpdate = !0), this);
|
|
9536
9549
|
}
|
|
9537
9550
|
adds(t) {
|
|
9538
9551
|
if (!t || !t.length) return this;
|
|
@@ -9647,9 +9660,9 @@ class Md extends rr {
|
|
|
9647
9660
|
return this;
|
|
9648
9661
|
}
|
|
9649
9662
|
}
|
|
9650
|
-
let
|
|
9651
|
-
const Rl = new F(), ii = new he(),
|
|
9652
|
-
class
|
|
9663
|
+
let bE = 0;
|
|
9664
|
+
const Rl = new F(), ii = new he(), fp = new F(), ca = new Dt(), fa = new F(), Pl = new F(), kn = new F(), TE = new F(0, 1), _E = { type: "added" }, Fl = { type: "removed" };
|
|
9665
|
+
class CE extends Bd {
|
|
9653
9666
|
name = "Scene";
|
|
9654
9667
|
type = "Scene";
|
|
9655
9668
|
isScene = !0;
|
|
@@ -9695,7 +9708,7 @@ class TE extends Md {
|
|
|
9695
9708
|
throw new Error("must be implemented in derived");
|
|
9696
9709
|
}
|
|
9697
9710
|
}
|
|
9698
|
-
class
|
|
9711
|
+
class DE {
|
|
9699
9712
|
isLoading = !1;
|
|
9700
9713
|
itemsLoaded = 0;
|
|
9701
9714
|
itemsTotal = 0;
|
|
@@ -9739,7 +9752,7 @@ class _E {
|
|
|
9739
9752
|
return null;
|
|
9740
9753
|
}
|
|
9741
9754
|
}
|
|
9742
|
-
const
|
|
9755
|
+
const pp = {
|
|
9743
9756
|
enabled: !1,
|
|
9744
9757
|
files: {},
|
|
9745
9758
|
add: function(r, t) {
|
|
@@ -9755,15 +9768,15 @@ const cp = {
|
|
|
9755
9768
|
clear: function() {
|
|
9756
9769
|
this.files = {};
|
|
9757
9770
|
}
|
|
9758
|
-
},
|
|
9759
|
-
class
|
|
9771
|
+
}, SE = new DE();
|
|
9772
|
+
class Id {
|
|
9760
9773
|
manager;
|
|
9761
9774
|
crossOrigin = "anonymous";
|
|
9762
9775
|
withCredentials = !1;
|
|
9763
9776
|
path = "";
|
|
9764
9777
|
resourcePath = "";
|
|
9765
9778
|
requestHeader = {};
|
|
9766
|
-
constructor(t =
|
|
9779
|
+
constructor(t = SE) {
|
|
9767
9780
|
this.manager = t;
|
|
9768
9781
|
}
|
|
9769
9782
|
loadAsync(t, e) {
|
|
@@ -9790,13 +9803,13 @@ class Bd {
|
|
|
9790
9803
|
}
|
|
9791
9804
|
}
|
|
9792
9805
|
const Oi = {};
|
|
9793
|
-
class
|
|
9806
|
+
class OE extends Error {
|
|
9794
9807
|
response;
|
|
9795
9808
|
constructor(t, e) {
|
|
9796
9809
|
super(t), this.response = e;
|
|
9797
9810
|
}
|
|
9798
9811
|
}
|
|
9799
|
-
class
|
|
9812
|
+
class LE extends Id {
|
|
9800
9813
|
mimeType;
|
|
9801
9814
|
responseType;
|
|
9802
9815
|
constructor(t) {
|
|
@@ -9804,7 +9817,7 @@ class SE extends Bd {
|
|
|
9804
9817
|
}
|
|
9805
9818
|
load(t, e, i, a) {
|
|
9806
9819
|
t === void 0 && (t = ""), this.path !== void 0 && (t = this.path + t), t = this.manager.resolveURL(t);
|
|
9807
|
-
const o =
|
|
9820
|
+
const o = pp.get(t);
|
|
9808
9821
|
if (o !== void 0)
|
|
9809
9822
|
return this.manager.itemStart(t), setTimeout(() => {
|
|
9810
9823
|
e && e(o), this.manager.itemEnd(t);
|
|
@@ -9846,7 +9859,7 @@ class SE extends Bd {
|
|
|
9846
9859
|
});
|
|
9847
9860
|
return new Response(N);
|
|
9848
9861
|
} else
|
|
9849
|
-
throw new
|
|
9862
|
+
throw new OE(`fetch for "${d.url}" responded with ${d.status}: ${d.statusText}`, d);
|
|
9850
9863
|
}).then((d) => {
|
|
9851
9864
|
switch (f) {
|
|
9852
9865
|
case "arraybuffer":
|
|
@@ -9866,7 +9879,7 @@ class SE extends Bd {
|
|
|
9866
9879
|
}
|
|
9867
9880
|
}
|
|
9868
9881
|
}).then((d) => {
|
|
9869
|
-
|
|
9882
|
+
pp.add(t, d);
|
|
9870
9883
|
const g = Oi[t];
|
|
9871
9884
|
delete Oi[t];
|
|
9872
9885
|
for (let E = 0, _ = g.length; E < _; E++) {
|
|
@@ -9894,12 +9907,12 @@ class SE extends Bd {
|
|
|
9894
9907
|
return this.responseType = t, this;
|
|
9895
9908
|
}
|
|
9896
9909
|
}
|
|
9897
|
-
class
|
|
9910
|
+
class Rd extends Id {
|
|
9898
9911
|
constructor(t) {
|
|
9899
9912
|
super(t);
|
|
9900
9913
|
}
|
|
9901
9914
|
load(t, e, i, a) {
|
|
9902
|
-
const o = this, l = new
|
|
9915
|
+
const o = this, l = new LE(o.manager);
|
|
9903
9916
|
l.setPath(o.path), l.setRequestHeader(o.requestHeader), l.setWithCredentials(o.withCredentials), l.load(t, function(c) {
|
|
9904
9917
|
try {
|
|
9905
9918
|
e && e(c);
|
|
@@ -9909,19 +9922,6 @@ class Id extends Bd {
|
|
|
9909
9922
|
}, i, a);
|
|
9910
9923
|
}
|
|
9911
9924
|
}
|
|
9912
|
-
const Os = "ae", Rd = "-", Jl = "rm-assets", OE = "rm-labels", fp = "ws-assets", pp = "ws-labels";
|
|
9913
|
-
function xa(r) {
|
|
9914
|
-
return r + Rd + hu.ASSETS;
|
|
9915
|
-
}
|
|
9916
|
-
function Yo(r) {
|
|
9917
|
-
return r + Rd + hu.LABELS;
|
|
9918
|
-
}
|
|
9919
|
-
const LE = {
|
|
9920
|
-
rm: ["su-assets", "su-labels", "eq-assets", "eq-labels", "fn-assets", "fn-labels"],
|
|
9921
|
-
ws: ["su-assets", "su-labels", "eq-assets", "eq-labels", "fn-assets", "fn-labels"],
|
|
9922
|
-
su: [Jl, OE, fp, pp, "eq-assets", "eq-labels", "fn-assets", "fn-labels"],
|
|
9923
|
-
eq: [fp, pp, "su-assets", "su-labels", "fn-assets", "fn-labels"]
|
|
9924
|
-
};
|
|
9925
9925
|
function ko(r, t, e) {
|
|
9926
9926
|
if (!r) return e;
|
|
9927
9927
|
let i = e;
|
|
@@ -11622,7 +11622,7 @@ class wA {
|
|
|
11622
11622
|
_lvi = 0;
|
|
11623
11623
|
// ================================= svg
|
|
11624
11624
|
bindSvg(t) {
|
|
11625
|
-
return this.svg = t, this.svgRoot =
|
|
11625
|
+
return this.svg = t, this.svgRoot = Nd(this.svg), this.layers = this.getLayers(2), this.getElementsMap(this.svg, this.elementsMap), this;
|
|
11626
11626
|
}
|
|
11627
11627
|
getLayers(t) {
|
|
11628
11628
|
var e;
|
|
@@ -11685,12 +11685,18 @@ class wA {
|
|
|
11685
11685
|
this.boundingBoxMap[i.id] = o.round(), this.boundingBox.expandByBox(o);
|
|
11686
11686
|
}), this.boundingBoxMap;
|
|
11687
11687
|
}
|
|
11688
|
-
|
|
11688
|
+
getLayerVisible(t) {
|
|
11689
|
+
var i;
|
|
11690
|
+
const e = this.getElementById(t);
|
|
11691
|
+
if (e)
|
|
11692
|
+
return ((i = e.style) == null ? void 0 : i.display) !== "none";
|
|
11693
|
+
}
|
|
11694
|
+
updateLayersVisibility(t, e = !1, i = !0) {
|
|
11689
11695
|
if (!this.elementsMap) throw new Error("please bind svg first");
|
|
11690
|
-
this._updateAllLayersVisibility(!e), t != null && t.length || (t = ["background"]);
|
|
11691
|
-
for (let
|
|
11692
|
-
const
|
|
11693
|
-
|
|
11696
|
+
i && this._updateAllLayersVisibility(!e), t != null && t.length || (t = ["background"]);
|
|
11697
|
+
for (let a = 0, o = t.length; a < o; a++) {
|
|
11698
|
+
const l = this.getElementById(t[a]);
|
|
11699
|
+
l && this._updateLayersVisibility(l, e, !0, !0);
|
|
11694
11700
|
}
|
|
11695
11701
|
}
|
|
11696
11702
|
_updateAllLayersVisibility(t = !1) {
|
|
@@ -11712,7 +11718,7 @@ class wA {
|
|
|
11712
11718
|
}
|
|
11713
11719
|
}
|
|
11714
11720
|
updateVisibilityByAssetType(t, e = !1, i) {
|
|
11715
|
-
i || (i =
|
|
11721
|
+
i || (i = dE[t]), this.updateLayersVisibility(i, !e);
|
|
11716
11722
|
}
|
|
11717
11723
|
updateVisibilityByAssetTypes(t, e = !1, i) {
|
|
11718
11724
|
if (Array.isArray(t) || (t = [t]), !!(t != null && t.length))
|
|
@@ -12000,7 +12006,7 @@ class bA {
|
|
|
12000
12006
|
drawSocialDistanceCircles(t, e = "http://www.w3.org/2000/svg") {
|
|
12001
12007
|
var C, R, L;
|
|
12002
12008
|
if (!t) return;
|
|
12003
|
-
const i =
|
|
12009
|
+
const i = gE(t), a = Ld(t), o = 2 * i, l = (R = (C = this.params.socialDistance) == null ? void 0 : C.colors) != null && R.length ? (L = this.params.socialDistance) == null ? void 0 : L.colors : [Kt.green, Kt.red], c = this.getRadius(a), f = t.querySelector(`#${Jl}`), d = f == null ? void 0 : f.querySelectorAll("path");
|
|
12004
12010
|
if (!f || !(d != null && d.length)) return;
|
|
12005
12011
|
let g, E;
|
|
12006
12012
|
const _ = new Array();
|
|
@@ -12069,7 +12075,7 @@ function Da(r, t) {
|
|
|
12069
12075
|
}
|
|
12070
12076
|
r.classList || (r.className = TA(i));
|
|
12071
12077
|
}
|
|
12072
|
-
class Ah extends
|
|
12078
|
+
class Ah extends CE {
|
|
12073
12079
|
isSvgScene = !0;
|
|
12074
12080
|
name = "SvgScene";
|
|
12075
12081
|
dynamically = !0;
|
|
@@ -12140,12 +12146,12 @@ class Ah extends TE {
|
|
|
12140
12146
|
// // this.params.camera.bottom = this.params.height * -0.5;
|
|
12141
12147
|
// }
|
|
12142
12148
|
async load(t) {
|
|
12143
|
-
return new
|
|
12149
|
+
return new Rd().loadAsync(t);
|
|
12144
12150
|
}
|
|
12145
12151
|
bind(t) {
|
|
12146
12152
|
if (this.svgStr = t, this.svg = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, !this.svg) throw new Error("svg load failed");
|
|
12147
12153
|
let e = this.svg.getAttribute("viewBox");
|
|
12148
|
-
return e ? (
|
|
12154
|
+
return e ? (yE(e, this.viewBox), this.chef.bindSvg(this.svg), this.svgRoot = Nd(this.svg), this.svg.setAttribute("viewBox", `0 0 ${this.params.width} ${this.params.height}`), this.svg.setAttribute("style", "transform: translateZ(0);"), this.appendStyles(), console.log(this.name, "viewBox -> ", e, this.viewBox.toString()), this.setAssetsMap(this.assetType, this.assetsMap), !0) : !1;
|
|
12149
12155
|
}
|
|
12150
12156
|
appendStyles() {
|
|
12151
12157
|
var e;
|
|
@@ -12167,8 +12173,11 @@ class Ah extends TE {
|
|
|
12167
12173
|
showDefaultLayers(t, e = !1) {
|
|
12168
12174
|
this.setDefaultLayers(t), this.chef.updateLayersVisibility(t, e);
|
|
12169
12175
|
}
|
|
12170
|
-
|
|
12171
|
-
this.chef.
|
|
12176
|
+
getLayerVisible(t) {
|
|
12177
|
+
return this.chef.getLayerVisible(t);
|
|
12178
|
+
}
|
|
12179
|
+
updateLayersVisibility(t, e = !1, i = !0) {
|
|
12180
|
+
this.chef.updateLayersVisibility(t, e, i);
|
|
12172
12181
|
}
|
|
12173
12182
|
/**
|
|
12174
12183
|
* Some layers overlap with each other, has to be configured the conflict layers. Dio Zhu 2024.9.13
|
|
@@ -12465,7 +12474,7 @@ class Ah extends TE {
|
|
|
12465
12474
|
const o = this.assetsMap[i];
|
|
12466
12475
|
o && (this._lastLinkedIds.forEach((l) => {
|
|
12467
12476
|
o[l] && (o[l].style.display = "none");
|
|
12468
|
-
}), this._lastLinkedIds =
|
|
12477
|
+
}), this._lastLinkedIds = Od(t), this._lastLinkedIds.forEach((l) => {
|
|
12469
12478
|
o[l] && (o[l].style.display = "block");
|
|
12470
12479
|
}));
|
|
12471
12480
|
}
|
|
@@ -13911,7 +13920,7 @@ class Yd extends rr {
|
|
|
13911
13920
|
}
|
|
13912
13921
|
var ut = /* @__PURE__ */ ((r) => (r.CONTEXTMENU = "contextmenu", r.LOSTPOINTERCAPTURE = "lostpointercapture", r.MOUSEOVER = "mouseover", r.MOUSEOUT = "mouseout", r.MOUSELEAVE = "mouseleave", r.MOUSEENTER = "mouseenter", r.MOUSEMOVE = "mousemove", r.MOUSEDOWN = "mousedown", r.MOUSEUP = "mouseup", r.POINTERMOVE = "pointermove", r.POINTERDOWN = "pointerdown", r.POINTERUP = "pointerup", r.POINTERCANCEL = "pointercancel", r.POINTEROUT = "pointerout", r.POINTERLEAVE = "pointerleave", r.POINTEROVER = "pointerover", r.POINTERENTER = "pointerenter", r.TOUCHSTART = "touchstart", r.TOUCHEND = "touchend", r.TOUCHMOVE = "touchmove", r.TOUCHCANCEL = "touchcancel", r.WHEEL = "wheel", r.WHEEL_START = "wheelstart", r.WHEEL_END = "wheelend", r.MOUSEWHEEL = "mousewheel", r.CLICK = "click", r.DBLCLICK = "dblclick", r.CONTEXT_LOST = "contextlost", r.CONTEXT_RESTORED = "contextrestored", r.CONTROLS_CHANGED = "controlschanged", r.TAP = "tap", r.SINGLE_TAP = "singletap", r.DOUBLE_TAP = "doubletap", r.PRESS = "press", r.PAN = "pan", r.PAN_START = "panstart", r.PAN_MOVE = "panmove", r.PAN_END = "panend", r.ROTATE = "rotate", r.ROTATE_START = "rotatestart", r.ROTATE_MOVE = "rotatemove", r.ROTATE_END = "rotateend", r.PINCH = "pinch", r.PINCH_START = "pinchstart", r.PINCH_MOVE = "pinchmove", r.PINCH_END = "pinchend", r.PINCH_IN = "pinchin", r.PINCH_OUT = "pinchout", r.SWIPE = "swipe", r.CHANGE_START = "change_start", r.CHANGE_END = "change_end", r.CAMERA_CHANGED = "cameraChanged", r))(ut || {});
|
|
13913
13922
|
const pa = new F();
|
|
13914
|
-
class Xd extends
|
|
13923
|
+
class Xd extends Bd {
|
|
13915
13924
|
isCamera = !0;
|
|
13916
13925
|
type = "Camera2";
|
|
13917
13926
|
name = "Camera2";
|
|
@@ -17465,7 +17474,7 @@ class $b extends rr {
|
|
|
17465
17474
|
multiSelectorSelectedHandler = this.handleMultiSelectorSelected.bind(this);
|
|
17466
17475
|
dragEndHandler = this.handleDragEnd.bind(this);
|
|
17467
17476
|
constructor(t = {}) {
|
|
17468
|
-
super(), this.params = t, this.params.zoomToSelectEnable && (this.zoomToSelectEnable = !0), this.params.selectEnable && (this.selectEnable = !0), this.params.multiSelectEnable && (this.multiSelectEnable = !0), this.params.defaultFill || (this.params.defaultFill = Gt.getMoreTransparent(Kt.white, 0.3)), this.params.defaultStroke || (this.params.defaultStroke = Gt.getMoreTransparent(Kt.darkWhite, 0.8)), this.params.infoFill || (this.params.infoFill = Gt.getMoreTransparent(Kt.gray, 0.3)), this.params.infoStroke || (this.params.infoStroke = Gt.getMoreTransparent(Kt.darkGray, 0.8)), this.params.primaryFill || (this.params.primaryFill = Gt.getMoreTransparent(Kt.blue, 0.3)), this.params.primaryStroke || (this.params.primaryStroke = Gt.getMoreTransparent(Kt.darkBlue, 0.8)), this.params.successFill || (this.params.successFill = Gt.getMoreTransparent(Kt.green, 0.3)), this.params.successStroke || (this.params.successStroke = Gt.getMoreTransparent(Kt.darkGreen, 0.8)), this.params.warningFill || (this.params.warningFill = Gt.getMoreTransparent(Kt.yellow, 0.3)), this.params.warningStroke || (this.params.warningStroke = Gt.getMoreTransparent(Kt.darkYellow, 0.8)), this.params.dangerFill || (this.params.dangerFill = Gt.getMoreTransparent(Kt.red, 0.3)), this.params.dangerStroke || (this.params.dangerStroke = Gt.getMoreTransparent(Kt.darkRed, 0.8)), this.params.activeFill || (this.params.activeFill = Gt.getMoreTransparent(Kt.brown, 0.3)), this.params.activeStroke || (this.params.activeStroke = Gt.getMoreTransparent(Kt.darkBrown, 0.8)), this.renderer = new
|
|
17477
|
+
super(), this.params = t, this.params.zoomToSelectEnable && (this.zoomToSelectEnable = !0), this.params.selectEnable && (this.selectEnable = !0), this.params.multiSelectEnable && (this.multiSelectEnable = !0), this.params.defaultFill || (this.params.defaultFill = Gt.getMoreTransparent(Kt.white, 0.3)), this.params.defaultStroke || (this.params.defaultStroke = Gt.getMoreTransparent(Kt.darkWhite, 0.8)), this.params.infoFill || (this.params.infoFill = Gt.getMoreTransparent(Kt.gray, 0.3)), this.params.infoStroke || (this.params.infoStroke = Gt.getMoreTransparent(Kt.darkGray, 0.8)), this.params.primaryFill || (this.params.primaryFill = Gt.getMoreTransparent(Kt.blue, 0.3)), this.params.primaryStroke || (this.params.primaryStroke = Gt.getMoreTransparent(Kt.darkBlue, 0.8)), this.params.successFill || (this.params.successFill = Gt.getMoreTransparent(Kt.green, 0.3)), this.params.successStroke || (this.params.successStroke = Gt.getMoreTransparent(Kt.darkGreen, 0.8)), this.params.warningFill || (this.params.warningFill = Gt.getMoreTransparent(Kt.yellow, 0.3)), this.params.warningStroke || (this.params.warningStroke = Gt.getMoreTransparent(Kt.darkYellow, 0.8)), this.params.dangerFill || (this.params.dangerFill = Gt.getMoreTransparent(Kt.red, 0.3)), this.params.dangerStroke || (this.params.dangerStroke = Gt.getMoreTransparent(Kt.darkRed, 0.8)), this.params.activeFill || (this.params.activeFill = Gt.getMoreTransparent(Kt.brown, 0.3)), this.params.activeStroke || (this.params.activeStroke = Gt.getMoreTransparent(Kt.darkBrown, 0.8)), this.renderer = new xE(t), this.view = new _b(t), this.trans2LoadingScene();
|
|
17469
17478
|
}
|
|
17470
17479
|
get isLoadingScene() {
|
|
17471
17480
|
var t;
|
|
@@ -17517,7 +17526,7 @@ class $b extends rr {
|
|
|
17517
17526
|
// @ts-ignore
|
|
17518
17527
|
async load(t, e, i = 2, a) {
|
|
17519
17528
|
this.isLoadingScene || this.trans2LoadingScene(), await Bl(this.params.syncDelay);
|
|
17520
|
-
const o = await new
|
|
17529
|
+
const o = await new Rd().setRequestHeader(this.requestHeader).loadAsync(t).catch(() => {
|
|
17521
17530
|
this.trans2EmptyScene();
|
|
17522
17531
|
});
|
|
17523
17532
|
return this.loadByString(o, e, i);
|
|
@@ -17537,9 +17546,13 @@ class $b extends rr {
|
|
|
17537
17546
|
var e;
|
|
17538
17547
|
return (e = this.scene) == null ? void 0 : e.getLayers(t);
|
|
17539
17548
|
}
|
|
17540
|
-
|
|
17541
|
-
var
|
|
17542
|
-
(
|
|
17549
|
+
getLayerVisible(t) {
|
|
17550
|
+
var e;
|
|
17551
|
+
return (e = this.scene) == null ? void 0 : e.getLayerVisible(t);
|
|
17552
|
+
}
|
|
17553
|
+
updateLayersVisibility(t, e = !1, i = !0) {
|
|
17554
|
+
var a;
|
|
17555
|
+
(a = this.scene) == null || a.updateLayersVisibility(t, e, i);
|
|
17543
17556
|
}
|
|
17544
17557
|
selectByIds(t) {
|
|
17545
17558
|
var e;
|
|
@@ -17890,7 +17903,7 @@ class Bb extends Mb {
|
|
|
17890
17903
|
isRenderTargetTexture = !1;
|
|
17891
17904
|
type = "Texture";
|
|
17892
17905
|
name = "Texture";
|
|
17893
|
-
uuid =
|
|
17906
|
+
uuid = Md();
|
|
17894
17907
|
originSize = new F();
|
|
17895
17908
|
originCenter = new F();
|
|
17896
17909
|
size = new F();
|
|
@@ -18319,5 +18332,8 @@ export {
|
|
|
18319
18332
|
Xb as RendererWorker,
|
|
18320
18333
|
$b as SvgApp,
|
|
18321
18334
|
qb as Vector2,
|
|
18322
|
-
|
|
18335
|
+
dE as assetTypeConflicts,
|
|
18336
|
+
px as defaultConfig,
|
|
18337
|
+
Yo as getAssetLabelByType,
|
|
18338
|
+
xa as getAssetLayerByType
|
|
18323
18339
|
};
|