@netless/appliance-plugin 1.1.43-beta.0 → 1.1.43-beta.2
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/READMA.zh-CN.md +1 -1
- package/README.md +5 -1
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/{bridge-DcVN05tP.mjs → bridge-DzcPAEgn.mjs} +1 -1
- package/dist/{bridge-D68E09T9.js → bridge-iTPNL78o.js} +1 -1
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/core/enum.d.ts +3 -1
- package/dist/core/mainEngine.d.ts +8 -2
- package/dist/core/mainThread/subLocalThread.d.ts +6 -1
- package/dist/core/tools/pencilEraserBitMap.d.ts +6 -2
- package/dist/core/types.d.ts +2 -0
- package/dist/core/worker/fullWorkerLocal.d.ts +4 -1
- package/dist/fullWorker.js +89 -89
- package/dist/{index-BNHPCii1.mjs → index-14J65ewZ.mjs} +271 -241
- package/dist/index-B6nsfvHS.js +570 -0
- package/dist/index-B9E9m3wQ.js +1 -0
- package/dist/{index-B_vZ9d3x.mjs → index-BARnlEAY.mjs} +7772 -7621
- package/dist/{index-CWDWQZBs.mjs → index-BGKGGHj6.mjs} +271 -241
- package/dist/index-Bgw8Yl5s.js +570 -0
- package/dist/{index-DiLPVPwQ.js → index-Bp0tojzJ.js} +1 -1
- package/dist/{index-GZUDLXJC.js → index-C-LIZHUj.js} +1 -1
- package/dist/{index-K_0NX6pD.mjs → index-D2r_A0b8.mjs} +1 -1
- package/dist/index-DVTWLAHF.js +1 -0
- package/dist/{index-CV8YaU3F.mjs → index-DWS4kyH2.mjs} +1 -1
- package/dist/{index-NG5kKK1W.mjs → index-DkMJ7xR-.mjs} +9004 -8853
- package/dist/plugin/bitmapEraserOptions.d.ts +0 -2
- package/dist/plugin/types.d.ts +0 -4
- package/dist/subWorker.js +85 -85
- package/package.json +1 -1
- package/dist/index-C2AHqjj8.js +0 -570
- package/dist/index-DChI1--R.js +0 -1
- package/dist/index-DFo0Gmfx.js +0 -570
- package/dist/index-GBYM7kT5.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ye = Object.defineProperty;
|
|
2
2
|
var we = (M, e, t) => e in M ? ye(M, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : M[e] = t;
|
|
3
3
|
var u = (M, e, t) => we(M, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { D as K, e as b, c as m, r as $, b as R, g as Z, t as V, a as h, f as de, M as ve, h as D, i as j, j as ke, C as H, k as z, l as Se, m as te, n as Ie, o as se, p as ge, q as Te, s as re, u as ie, v as Y, w as _, E as N, x as ee, y as Q, z as We, A as Re, B as Ee, F as be, G as Le, H as pe, I as ue, T as oe, J as ae, K as Ce, L as Ne, N as fe, P as me, Q as ne, R as
|
|
4
|
+
import { D as K, e as b, c as m, r as $, b as R, g as Z, t as V, a as h, f as de, M as ve, h as D, i as j, j as ke, C as H, k as z, l as Se, m as te, n as Ie, o as se, p as ge, q as Te, s as re, u as ie, v as Y, w as _, E as N, x as ee, y as Q, z as We, A as Re, B as Ee, F as be, G as Le, H as pe, I as ue, T as oe, J as ae, K as Ce, L as Ne, N as fe, P as me, Q as ne, R as Be, S as ce, U as q, W as Oe, V as he, X as De } from "./index-DkMJ7xR-.mjs";
|
|
5
5
|
import { cloneDeep as J, xor as Me, isNumber as G, isEqual as le } from "lodash";
|
|
6
6
|
import "clipper-lib";
|
|
7
7
|
import "lineclip";
|
|
@@ -297,9 +297,9 @@ class Ae {
|
|
|
297
297
|
})), c = /* @__PURE__ */ new Map();
|
|
298
298
|
let d;
|
|
299
299
|
n != null && n.selectIds && (d = Me(t.selectIds, n.selectIds), n.selectIds.forEach((w) => {
|
|
300
|
-
const
|
|
301
|
-
if (
|
|
302
|
-
const { toolsType: I, op: W, opt: g } =
|
|
300
|
+
const S = this.vNodes.get(w);
|
|
301
|
+
if (S) {
|
|
302
|
+
const { toolsType: I, op: W, opt: g } = S;
|
|
303
303
|
c.set(w, {
|
|
304
304
|
opt: g,
|
|
305
305
|
toolsType: I,
|
|
@@ -695,57 +695,82 @@ class Ae {
|
|
|
695
695
|
var t;
|
|
696
696
|
(t = this.getWorkShape(e)) == null || t.clearTmpPoints(), this.workShapes.delete(e);
|
|
697
697
|
}
|
|
698
|
+
/** Stop queued Bitmap Eraser work and restore Doing-time hidden nodes. */
|
|
699
|
+
abortBitmapEraser(e) {
|
|
700
|
+
const t = this.workShapes.get(e);
|
|
701
|
+
(t == null ? void 0 : t.toolsType) === m.BitMapEraser && (t.clearTmpPoints(), this.workShapes.delete(e), this.combineDrawActiveId === e && (this.combineDrawActiveId = void 0), this.drawWorkActiveId === e && (this.drawWorkActiveId = void 0), this.bitmapEraserRenderQueue = Promise.resolve());
|
|
702
|
+
}
|
|
703
|
+
publishBitmapEraserBeforeImages(e, t) {
|
|
704
|
+
t.size && this.thread.post({
|
|
705
|
+
sp: [
|
|
706
|
+
{
|
|
707
|
+
type: h.None,
|
|
708
|
+
viewId: this.thread.viewId,
|
|
709
|
+
eraseTxnId: e,
|
|
710
|
+
eraseTxnBeforeImages: new Map(t)
|
|
711
|
+
}
|
|
712
|
+
]
|
|
713
|
+
});
|
|
714
|
+
}
|
|
698
715
|
async drawBitMapEraserFull(e, t, s, r) {
|
|
699
|
-
const {
|
|
700
|
-
|
|
716
|
+
const {
|
|
717
|
+
willUpdateNodes: i,
|
|
718
|
+
willDeleteNodes: o,
|
|
719
|
+
eraseTxnRecoveryRequired: a,
|
|
720
|
+
eraseTxnBeforeImages: n
|
|
721
|
+
} = t, c = e.getWorkId(), d = [
|
|
722
|
+
...i ? Array.from(i.keys()).map((p) => String(p)) : [],
|
|
701
723
|
...o ? Array.from(o) : []
|
|
702
|
-
],
|
|
703
|
-
if (r &&
|
|
724
|
+
], l = [];
|
|
725
|
+
if (r && l.push({
|
|
704
726
|
type: h.None,
|
|
705
727
|
needUndoTicker: r,
|
|
706
|
-
undoScopeIds:
|
|
728
|
+
undoScopeIds: d,
|
|
707
729
|
undoScopePhase: "finalize",
|
|
708
|
-
eraseTxnId:
|
|
709
|
-
eraseTxnRecoveryRequired: a
|
|
710
|
-
|
|
730
|
+
eraseTxnId: c,
|
|
731
|
+
eraseTxnRecoveryRequired: a,
|
|
732
|
+
eraseTxnBeforeImages: n
|
|
733
|
+
}), l.push({
|
|
711
734
|
type: h.RemoveNode,
|
|
712
|
-
removeIds: [
|
|
713
|
-
eraseTxnId:
|
|
735
|
+
removeIds: [c],
|
|
736
|
+
eraseTxnId: c,
|
|
714
737
|
viewId: this.thread.viewId,
|
|
715
738
|
needUndoTicker: r,
|
|
716
|
-
eraseTxnRecoveryRequired: a
|
|
717
|
-
|
|
739
|
+
eraseTxnRecoveryRequired: a,
|
|
740
|
+
eraseTxnBeforeImages: n
|
|
741
|
+
}), s && l.push({
|
|
718
742
|
type: h.None,
|
|
719
743
|
isLockSentEventCursor: s
|
|
720
744
|
}), i != null && i.size || o != null && o.size) {
|
|
721
745
|
if (i != null && i.size)
|
|
722
|
-
for (const [
|
|
723
|
-
|
|
746
|
+
for (const [p, f] of i)
|
|
747
|
+
l.push({
|
|
724
748
|
type: h.UpdateNode,
|
|
725
749
|
dataType: R.Local,
|
|
726
|
-
opt:
|
|
727
|
-
workId:
|
|
750
|
+
opt: f.opt,
|
|
751
|
+
workId: p,
|
|
728
752
|
updateNodeOpt: {
|
|
729
753
|
useAnimation: !1
|
|
730
754
|
},
|
|
731
|
-
eraseTxnId:
|
|
755
|
+
eraseTxnId: c,
|
|
732
756
|
needUndoTicker: r
|
|
733
757
|
});
|
|
734
|
-
o != null && o.size &&
|
|
758
|
+
o != null && o.size && l.push({
|
|
735
759
|
type: h.RemoveNode,
|
|
736
760
|
removeIds: [...o],
|
|
737
|
-
eraseTxnId:
|
|
761
|
+
eraseTxnId: c,
|
|
738
762
|
viewId: this.thread.viewId,
|
|
739
763
|
needUndoTicker: r
|
|
740
764
|
});
|
|
741
765
|
}
|
|
742
|
-
|
|
766
|
+
l.push({
|
|
743
767
|
type: h.None,
|
|
744
768
|
viewId: this.thread.viewId,
|
|
745
|
-
eraseTxnId:
|
|
769
|
+
eraseTxnId: c,
|
|
746
770
|
eraseTxnPhase: t.eraseTxnCommitStatus === "failed" || a ? "failed" : "applied",
|
|
747
|
-
eraseTxnRecoveryRequired: a
|
|
748
|
-
|
|
771
|
+
eraseTxnRecoveryRequired: a,
|
|
772
|
+
eraseTxnBeforeImages: n
|
|
773
|
+
}), l.length && this.thread.post({ sp: l });
|
|
749
774
|
}
|
|
750
775
|
drawPencilEraserFull(e, t, s, r) {
|
|
751
776
|
const { willNewNodes: i, willDeleteNodes: o } = t, a = e.getWorkId(), n = [
|
|
@@ -951,14 +976,14 @@ class Ae {
|
|
|
951
976
|
if (i || r) {
|
|
952
977
|
const p = i == null ? void 0 : i.willDeleteNodes, f = i == null ? void 0 : i.willNewNodes, w = [
|
|
953
978
|
...p ? Array.from(p) : []
|
|
954
|
-
],
|
|
979
|
+
], S = {
|
|
955
980
|
render: [],
|
|
956
981
|
sp: [],
|
|
957
982
|
...r
|
|
958
983
|
};
|
|
959
984
|
if (i != null && i.rect) {
|
|
960
985
|
const I = Te(i.rect);
|
|
961
|
-
(a =
|
|
986
|
+
(a = S.render) == null || a.push(
|
|
962
987
|
{
|
|
963
988
|
rect: I,
|
|
964
989
|
isClear: !0,
|
|
@@ -974,12 +999,12 @@ class Ae {
|
|
|
974
999
|
}
|
|
975
1000
|
);
|
|
976
1001
|
}
|
|
977
|
-
if (s && w.length && ((n = this.getWorkShape(e)) == null ? void 0 : n.toolsType) === m.BitMapEraser && ((c =
|
|
1002
|
+
if (s && w.length && ((n = this.getWorkShape(e)) == null ? void 0 : n.toolsType) === m.BitMapEraser && ((c = S.sp) == null || c.push({
|
|
978
1003
|
type: h.None,
|
|
979
1004
|
collectUndoTicker: s,
|
|
980
1005
|
undoScopeIds: w,
|
|
981
1006
|
undoScopePhase: "collect"
|
|
982
|
-
})), p != null && p.size && ((d =
|
|
1007
|
+
})), p != null && p.size && ((d = S.sp) == null || d.push({
|
|
983
1008
|
type: h.RemoveNode,
|
|
984
1009
|
removeIds: [...p],
|
|
985
1010
|
viewId: this.thread.viewId,
|
|
@@ -987,7 +1012,7 @@ class Ae {
|
|
|
987
1012
|
collectUndoTicker: s
|
|
988
1013
|
})), f != null && f.size)
|
|
989
1014
|
for (const [I, W] of f)
|
|
990
|
-
(l =
|
|
1015
|
+
(l = S.sp) == null || l.push({
|
|
991
1016
|
type: h.FullWork,
|
|
992
1017
|
dataType: R.Local,
|
|
993
1018
|
toolsType: W.toolsType,
|
|
@@ -1000,7 +1025,7 @@ class Ae {
|
|
|
1000
1025
|
needUndoTicker: t,
|
|
1001
1026
|
collectUndoTicker: s
|
|
1002
1027
|
});
|
|
1003
|
-
i != null && i.rect && await this.thread.fullLayer.parent.prepareRender, this.thread.post(
|
|
1028
|
+
i != null && i.rect && await this.thread.fullLayer.parent.prepareRender, this.thread.post(S);
|
|
1004
1029
|
}
|
|
1005
1030
|
}
|
|
1006
1031
|
async consumeDrawAll(e, t) {
|
|
@@ -1018,23 +1043,23 @@ class Ae {
|
|
|
1018
1043
|
if (p === m.LaserPen)
|
|
1019
1044
|
return;
|
|
1020
1045
|
p === m.BitMapEraser && await this.bitmapEraserRenderQueue;
|
|
1021
|
-
const f = this.workShapes.get(H), w = (a = f == null ? void 0 : f.selectIds) == null ? void 0 : a[0],
|
|
1046
|
+
const f = this.workShapes.get(H), w = (a = f == null ? void 0 : f.selectIds) == null ? void 0 : a[0], S = await l.consumeAll({ data: e, workerEngine: this });
|
|
1022
1047
|
switch (p) {
|
|
1023
1048
|
case m.Selector:
|
|
1024
1049
|
{
|
|
1025
|
-
|
|
1050
|
+
S.selectIds && w && ((n = S.selectIds) != null && n.includes(w)) && f.cursorBlur();
|
|
1026
1051
|
const I = [];
|
|
1027
1052
|
i && I.push({
|
|
1028
1053
|
type: h.None,
|
|
1029
1054
|
isLockSentEventCursor: i,
|
|
1030
1055
|
scenePath: r
|
|
1031
|
-
}),
|
|
1056
|
+
}), S.type === h.Select && (S.selectIds && t.runReverseSelectWork(S.selectIds), I.push({ ...S, scenePath: r })), I.length && this.thread.post({ sp: I }), (c = l.selectIds) != null && c.length ? l.clearTmpPoints() : this.clearWorkShapeNodeCache(d);
|
|
1032
1057
|
}
|
|
1033
1058
|
break;
|
|
1034
1059
|
case m.PencilEraser:
|
|
1035
1060
|
await this.drawPencilEraserFull(
|
|
1036
1061
|
l,
|
|
1037
|
-
|
|
1062
|
+
S,
|
|
1038
1063
|
i,
|
|
1039
1064
|
o
|
|
1040
1065
|
), this.fullWorkerDrawCount = 0, this.clearWorkShapeNodeCache(d);
|
|
@@ -1042,14 +1067,14 @@ class Ae {
|
|
|
1042
1067
|
case m.BitMapEraser:
|
|
1043
1068
|
await this.drawBitMapEraserFull(
|
|
1044
1069
|
l,
|
|
1045
|
-
|
|
1070
|
+
S,
|
|
1046
1071
|
i,
|
|
1047
1072
|
o
|
|
1048
1073
|
), this.fullWorkerDrawCount = 0, this.clearWorkShapeNodeCache(d);
|
|
1049
1074
|
break;
|
|
1050
1075
|
case m.Eraser:
|
|
1051
1076
|
await this.drawEraser(
|
|
1052
|
-
{ ...
|
|
1077
|
+
{ ...S, scenePath: r },
|
|
1053
1078
|
i,
|
|
1054
1079
|
o,
|
|
1055
1080
|
e.collectUndoTicker
|
|
@@ -1068,17 +1093,17 @@ class Ae {
|
|
|
1068
1093
|
type: h.None,
|
|
1069
1094
|
isLockSentEventCursor: i,
|
|
1070
1095
|
scenePath: r
|
|
1071
|
-
}),
|
|
1072
|
-
const g = p === m.Pencil &&
|
|
1096
|
+
}), S) {
|
|
1097
|
+
const g = p === m.Pencil && S.type === h.RemoveNode;
|
|
1073
1098
|
g ? $(
|
|
1074
1099
|
this.thread.localLayer,
|
|
1075
1100
|
this.thread.localLayer.parent
|
|
1076
1101
|
) : I.push({
|
|
1077
|
-
...
|
|
1102
|
+
...S,
|
|
1078
1103
|
scenePath: r,
|
|
1079
1104
|
needUndoTicker: e.needUndoTicker,
|
|
1080
|
-
undoScopeIds:
|
|
1081
|
-
undoScopePhase:
|
|
1105
|
+
undoScopeIds: S.undoScopeIds || (S.workId !== void 0 ? [S.workId.toString()] : void 0),
|
|
1106
|
+
undoScopePhase: S.undoScopePhase || "finalize"
|
|
1082
1107
|
}), this.fullWorkerDrawCount = 0, e.needUndoTicker && I.push({
|
|
1083
1108
|
type: h.None,
|
|
1084
1109
|
needUndoTicker: e.needUndoTicker,
|
|
@@ -1250,45 +1275,45 @@ class Fe {
|
|
|
1250
1275
|
);
|
|
1251
1276
|
}
|
|
1252
1277
|
async animationDraw() {
|
|
1253
|
-
var r, i, o, a, n, c, d, l, p, f, w,
|
|
1278
|
+
var r, i, o, a, n, c, d, l, p, f, w, S, I, W, g, y, v, T, C, L, A;
|
|
1254
1279
|
let e = !1;
|
|
1255
1280
|
const t = /* @__PURE__ */ new Map(), s = [];
|
|
1256
|
-
for (const [E,
|
|
1257
|
-
switch (
|
|
1281
|
+
for (const [E, k] of this.workShapes.entries())
|
|
1282
|
+
switch (k.toolsType) {
|
|
1258
1283
|
case m.BackgroundSVG: {
|
|
1259
|
-
(r =
|
|
1284
|
+
(r = k.node) == null || r.consumeService({
|
|
1260
1285
|
isFullWork: !0,
|
|
1261
1286
|
replaceId: E
|
|
1262
|
-
}), this.selectorWorkShapes.forEach((
|
|
1287
|
+
}), this.selectorWorkShapes.forEach((B, O) => {
|
|
1263
1288
|
var P;
|
|
1264
|
-
(P =
|
|
1289
|
+
(P = B.selectIds) != null && P.includes(E) && (this.willRunEffectSelectorIds.add(O), this.runEffect());
|
|
1265
1290
|
}), this.workShapes.delete(E);
|
|
1266
1291
|
break;
|
|
1267
1292
|
}
|
|
1268
1293
|
case m.Image: {
|
|
1269
|
-
await ((i =
|
|
1294
|
+
await ((i = k.node) == null ? void 0 : i.consumeServiceAsync({
|
|
1270
1295
|
isFullWork: !0,
|
|
1271
1296
|
worker: this
|
|
1272
|
-
})), this.selectorWorkShapes.forEach((
|
|
1297
|
+
})), this.selectorWorkShapes.forEach((B, O) => {
|
|
1273
1298
|
var P;
|
|
1274
|
-
(P =
|
|
1299
|
+
(P = B.selectIds) != null && P.includes(E) && (this.willRunEffectSelectorIds.add(O), this.runEffect());
|
|
1275
1300
|
}), this.workShapes.delete(E);
|
|
1276
1301
|
break;
|
|
1277
1302
|
}
|
|
1278
1303
|
case m.Text: {
|
|
1279
|
-
|
|
1304
|
+
k.node && (await ((o = k.node) == null ? void 0 : o.consumeServiceAsync({
|
|
1280
1305
|
isFullWork: !0,
|
|
1281
1306
|
replaceId: E,
|
|
1282
1307
|
boxRect: this.thread.getSceneRect()
|
|
1283
|
-
})), this.selectorWorkShapes.forEach((
|
|
1308
|
+
})), this.selectorWorkShapes.forEach((B, O) => {
|
|
1284
1309
|
var P;
|
|
1285
|
-
(P =
|
|
1286
|
-
}),
|
|
1310
|
+
(P = B.selectIds) != null && P.includes(E) && (this.willRunEffectSelectorIds.add(O), this.runEffect());
|
|
1311
|
+
}), k.refreshTextRender && k.requestId && s.push({
|
|
1287
1312
|
type: h.RefreshTextRender,
|
|
1288
|
-
requestId:
|
|
1313
|
+
requestId: k.requestId,
|
|
1289
1314
|
workId: E,
|
|
1290
1315
|
viewId: this.thread.viewId
|
|
1291
|
-
}), (a =
|
|
1316
|
+
}), (a = k.node) == null || a.clearTmpPoints(), this.workShapes.delete(E));
|
|
1292
1317
|
break;
|
|
1293
1318
|
}
|
|
1294
1319
|
case m.Arrow:
|
|
@@ -1298,60 +1323,60 @@ class Fe {
|
|
|
1298
1323
|
case m.Star:
|
|
1299
1324
|
case m.Polygon:
|
|
1300
1325
|
case m.SpeechBalloon: {
|
|
1301
|
-
const
|
|
1302
|
-
if ((n =
|
|
1303
|
-
const
|
|
1304
|
-
(c =
|
|
1305
|
-
op:
|
|
1306
|
-
isFullWork:
|
|
1307
|
-
}),
|
|
1326
|
+
const B = !!k.ops;
|
|
1327
|
+
if ((n = k.animationWorkData) != null && n.length) {
|
|
1328
|
+
const O = k.oldRect;
|
|
1329
|
+
(c = k.node) == null || c.consumeService({
|
|
1330
|
+
op: k.animationWorkData,
|
|
1331
|
+
isFullWork: B
|
|
1332
|
+
}), B && (this.selectorWorkShapes.forEach((P, F) => {
|
|
1308
1333
|
var U;
|
|
1309
1334
|
(U = P.selectIds) != null && U.includes(E) && (this.willRunEffectSelectorIds.add(F), this.runEffect());
|
|
1310
|
-
}), (d =
|
|
1311
|
-
cursorTool: _(
|
|
1312
|
-
workState:
|
|
1313
|
-
op:
|
|
1314
|
-
}) :
|
|
1315
|
-
cursorTool: _(
|
|
1335
|
+
}), (d = k.node) == null || d.clearTmpPoints(), this.workShapes.delete(E)), k.isEnableCursor ? t.set(E, {
|
|
1336
|
+
cursorTool: _(k.toolsType),
|
|
1337
|
+
workState: O ? k.ops ? b.Done : b.Doing : b.Start,
|
|
1338
|
+
op: k.animationWorkData.slice(-3, -1)
|
|
1339
|
+
}) : B && !k.useAnimation && ((l = k.updateNodeOpt) != null && l.useAnimation) && t.set(E, {
|
|
1340
|
+
cursorTool: _(k.toolsType),
|
|
1316
1341
|
workState: b.Done,
|
|
1317
|
-
op:
|
|
1318
|
-
uid: (p =
|
|
1319
|
-
}),
|
|
1342
|
+
op: k.animationWorkData.slice(-3, -1),
|
|
1343
|
+
uid: (p = k.updateNodeOpt) == null ? void 0 : p.uid
|
|
1344
|
+
}), k.animationWorkData.length = 0;
|
|
1320
1345
|
}
|
|
1321
1346
|
break;
|
|
1322
1347
|
}
|
|
1323
1348
|
case m.Pencil: {
|
|
1324
|
-
if (
|
|
1325
|
-
if (
|
|
1326
|
-
if (
|
|
1327
|
-
(y =
|
|
1349
|
+
if (k.useAnimation) {
|
|
1350
|
+
if (k.useAnimation) {
|
|
1351
|
+
if (k.isDel) {
|
|
1352
|
+
(y = k.node) == null || y.clearTmpPoints(), this.workShapes.delete(E);
|
|
1328
1353
|
break;
|
|
1329
1354
|
}
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
O
|
|
1333
|
-
), P = v.isDiff ? 0 : Math.max(0, (v.animationIndex || 0) - O), F = (v.animationWorkData || []).slice(
|
|
1334
|
-
P,
|
|
1355
|
+
const B = 3, O = this.computNextAnimationIndex(
|
|
1356
|
+
k,
|
|
1335
1357
|
B
|
|
1336
|
-
),
|
|
1337
|
-
|
|
1338
|
-
|
|
1358
|
+
), P = k.isDiff ? 0 : Math.max(0, (k.animationIndex || 0) - B), F = (k.animationWorkData || []).slice(
|
|
1359
|
+
P,
|
|
1360
|
+
O
|
|
1361
|
+
), U = (T = (v = k.node) == null ? void 0 : v.getWorkId()) == null ? void 0 : T.toString();
|
|
1362
|
+
if ((k.animationIndex || 0) < O || k.isDiff) {
|
|
1363
|
+
if ((C = k.node) == null || C.consumeService({
|
|
1339
1364
|
op: F,
|
|
1340
1365
|
isFullWork: !1
|
|
1341
|
-
}),
|
|
1366
|
+
}), k.animationIndex = O, k.isDiff && (k.isDiff = !1), F.length && k.isEnableCursor) {
|
|
1342
1367
|
const X = F.slice(-3, -1);
|
|
1343
1368
|
t.set(E, {
|
|
1344
|
-
cursorTool: _(
|
|
1345
|
-
workState: P === 0 ? b.Start :
|
|
1369
|
+
cursorTool: _(k.toolsType),
|
|
1370
|
+
workState: P === 0 ? b.Start : O === ((L = k.animationWorkData) == null ? void 0 : L.length) ? b.Done : b.Doing,
|
|
1346
1371
|
op: X
|
|
1347
1372
|
});
|
|
1348
1373
|
}
|
|
1349
|
-
} else
|
|
1350
|
-
op:
|
|
1374
|
+
} else k.ops && ((A = k.node) == null || A.consumeService({
|
|
1375
|
+
op: k.animationWorkData || [],
|
|
1351
1376
|
isFullWork: !0,
|
|
1352
1377
|
replaceId: U
|
|
1353
|
-
}),
|
|
1354
|
-
cursorTool: _(
|
|
1378
|
+
}), k.isDel = !0, k.isEnableCursor && t.set(E, {
|
|
1379
|
+
cursorTool: _(k.toolsType),
|
|
1355
1380
|
workState: b.Done,
|
|
1356
1381
|
op: F.slice(-3, -1)
|
|
1357
1382
|
}));
|
|
@@ -1359,34 +1384,34 @@ class Fe {
|
|
|
1359
1384
|
break;
|
|
1360
1385
|
}
|
|
1361
1386
|
} else {
|
|
1362
|
-
const
|
|
1363
|
-
if ((f =
|
|
1364
|
-
op:
|
|
1365
|
-
isFullWork:
|
|
1387
|
+
const B = !!k.ops;
|
|
1388
|
+
if ((f = k.node) == null || f.consumeService({
|
|
1389
|
+
op: k.animationWorkData || [],
|
|
1390
|
+
isFullWork: B,
|
|
1366
1391
|
replaceId: E
|
|
1367
|
-
}), (w =
|
|
1368
|
-
if (!
|
|
1369
|
-
const
|
|
1392
|
+
}), (w = k.node) == null || w.updataOptService(k.updateNodeOpt), B) {
|
|
1393
|
+
if (!k.isEnableCursor && ((S = k.updateNodeOpt) != null && S.useAnimation) && ((I = k.animationWorkData) != null && I.length)) {
|
|
1394
|
+
const O = k.animationWorkData.slice(-3, -1);
|
|
1370
1395
|
t.set(E, {
|
|
1371
|
-
cursorTool: _(
|
|
1396
|
+
cursorTool: _(k.toolsType),
|
|
1372
1397
|
workState: b.Done,
|
|
1373
|
-
op:
|
|
1374
|
-
uid: (W =
|
|
1398
|
+
op: O,
|
|
1399
|
+
uid: (W = k.updateNodeOpt) == null ? void 0 : W.uid
|
|
1375
1400
|
});
|
|
1376
1401
|
}
|
|
1377
|
-
this.selectorWorkShapes.forEach((
|
|
1402
|
+
this.selectorWorkShapes.forEach((O, P) => {
|
|
1378
1403
|
var F;
|
|
1379
|
-
(F =
|
|
1380
|
-
}), (g =
|
|
1404
|
+
(F = O.selectIds) != null && F.includes(E) && (this.willRunEffectSelectorIds.add(P), this.runEffect());
|
|
1405
|
+
}), (g = k.node) == null || g.clearTmpPoints(), this.workShapes.delete(E);
|
|
1381
1406
|
}
|
|
1382
1407
|
}
|
|
1383
1408
|
break;
|
|
1384
1409
|
}
|
|
1385
1410
|
}
|
|
1386
|
-
e && this.runAnimation(), t.size && t.forEach((E,
|
|
1411
|
+
e && this.runAnimation(), t.size && t.forEach((E, k) => {
|
|
1387
1412
|
s.push({
|
|
1388
1413
|
type: h.Cursor,
|
|
1389
|
-
uid: E.uid ||
|
|
1414
|
+
uid: E.uid || k.split(de)[0],
|
|
1390
1415
|
op: E.op,
|
|
1391
1416
|
workState: E.workState,
|
|
1392
1417
|
cursorTool: E.cursorTool,
|
|
@@ -1421,7 +1446,7 @@ class Fe {
|
|
|
1421
1446
|
return !1;
|
|
1422
1447
|
}
|
|
1423
1448
|
activeWorkShape(e) {
|
|
1424
|
-
var W, g, y,
|
|
1449
|
+
var W, g, y, v;
|
|
1425
1450
|
const {
|
|
1426
1451
|
workId: t,
|
|
1427
1452
|
opt: s,
|
|
@@ -1438,7 +1463,7 @@ class Fe {
|
|
|
1438
1463
|
} = e;
|
|
1439
1464
|
if (!t)
|
|
1440
1465
|
return;
|
|
1441
|
-
const w = t.toString(),
|
|
1466
|
+
const w = t.toString(), S = (W = this.vNodes.get(w)) == null ? void 0 : W.rect;
|
|
1442
1467
|
if (!((g = this.workShapes) != null && g.has(w))) {
|
|
1443
1468
|
let T = {
|
|
1444
1469
|
toolsType: r,
|
|
@@ -1448,19 +1473,19 @@ class Fe {
|
|
|
1448
1473
|
updateNodeOpt: o,
|
|
1449
1474
|
ops: a,
|
|
1450
1475
|
useAnimation: typeof c < "u" ? c : typeof (o == null ? void 0 : o.useAnimation) < "u" ? o == null ? void 0 : o.useAnimation : !0,
|
|
1451
|
-
oldRect:
|
|
1476
|
+
oldRect: S,
|
|
1452
1477
|
isDiff: !1,
|
|
1453
1478
|
imageBitmap: d,
|
|
1454
1479
|
isEnableCursor: l
|
|
1455
1480
|
};
|
|
1456
1481
|
r && s && (T = this.setNodeKey(w, T, r, s)), (y = this.workShapes) == null || y.set(w, T);
|
|
1457
1482
|
}
|
|
1458
|
-
const I = (
|
|
1483
|
+
const I = (v = this.workShapes) == null ? void 0 : v.get(w);
|
|
1459
1484
|
I.isEnableCursor = l, I.requestId = p, I.refreshTextRender = !!f, i && (I.type = i), a && (I.animationWorkData = V(a), I.ops = a), o && (I.updateNodeOpt = o), n && (I.isDiff = this.hasDiffData(
|
|
1460
1485
|
I.animationWorkData || [],
|
|
1461
1486
|
n,
|
|
1462
1487
|
I.toolsType
|
|
1463
|
-
), I.toolsType, m.Pencil, I.animationWorkData = n), I.node && I.node.getWorkId() !== w && I.node.setWorkId(w),
|
|
1488
|
+
), I.toolsType, m.Pencil, I.animationWorkData = n), I.node && I.node.getWorkId() !== w && I.node.setWorkId(w), S && (I.oldRect = S), r && s && (s.syncUnitTime && (this.syncUnitTime = s.syncUnitTime), I.toolsType !== r && r && s && this.setNodeKey(w, I, r, s), I.node && I.node.setWorkOptions(s)), d && (I.imageBitmap = d);
|
|
1464
1489
|
}
|
|
1465
1490
|
removeNode(e, t) {
|
|
1466
1491
|
e.indexOf(D) > -1 && this.removeSelectWork(t), this.thread.fullLayer.getElementsByName(e).forEach((r) => {
|
|
@@ -1702,7 +1727,7 @@ class qe extends x {
|
|
|
1702
1727
|
updateSelectorOpt: l,
|
|
1703
1728
|
textUpdateForWoker: p,
|
|
1704
1729
|
needUndoTicker: f
|
|
1705
|
-
} = s, w = l.workState,
|
|
1730
|
+
} = s, w = l.workState, S = r.sp || [];
|
|
1706
1731
|
if (w === b.Start)
|
|
1707
1732
|
return {
|
|
1708
1733
|
sp: [
|
|
@@ -1717,7 +1742,7 @@ class qe extends x {
|
|
|
1717
1742
|
const I = a == null ? void 0 : a.selectRect;
|
|
1718
1743
|
if (c) {
|
|
1719
1744
|
const g = w === b.Done ? f : void 0;
|
|
1720
|
-
|
|
1745
|
+
S.push({
|
|
1721
1746
|
type: h.Select,
|
|
1722
1747
|
selectIds: o.selectIds,
|
|
1723
1748
|
selectRect: I,
|
|
@@ -1733,34 +1758,34 @@ class qe extends x {
|
|
|
1733
1758
|
useAnimation: l.useAnimation || !1
|
|
1734
1759
|
};
|
|
1735
1760
|
l.uid && (y.uid = l.uid);
|
|
1736
|
-
for (const [
|
|
1737
|
-
T.toolsType === m.BackgroundSVG &&
|
|
1761
|
+
for (const [v, T] of i.entries())
|
|
1762
|
+
T.toolsType === m.BackgroundSVG && S.push({
|
|
1738
1763
|
...T,
|
|
1739
|
-
workId:
|
|
1764
|
+
workId: v,
|
|
1740
1765
|
type: h.BackgroundSVGUpdate,
|
|
1741
1766
|
dataType: R.Local,
|
|
1742
1767
|
willSyncService: w === b.Done ? !0 : n,
|
|
1743
1768
|
updateNodeOpt: y,
|
|
1744
1769
|
needUndoTicker: g,
|
|
1745
1770
|
emitEventType: this.emitEventType
|
|
1746
|
-
}), p && T.toolsType === m.Text ?
|
|
1771
|
+
}), p && T.toolsType === m.Text ? S.push({
|
|
1747
1772
|
...T,
|
|
1748
|
-
workId:
|
|
1773
|
+
workId: v,
|
|
1749
1774
|
type: h.TextUpdate,
|
|
1750
1775
|
dataType: R.Local,
|
|
1751
1776
|
willSyncService: w === b.Done ? !0 : n,
|
|
1752
1777
|
updateNodeOpt: y,
|
|
1753
1778
|
needUndoTicker: g,
|
|
1754
1779
|
emitEventType: this.emitEventType
|
|
1755
|
-
}) : (n || w === b.Done) &&
|
|
1780
|
+
}) : (n || w === b.Done) && S.push({
|
|
1756
1781
|
...T,
|
|
1757
|
-
workId:
|
|
1782
|
+
workId: v,
|
|
1758
1783
|
type: h.UpdateNode,
|
|
1759
1784
|
updateNodeOpt: {
|
|
1760
1785
|
...y,
|
|
1761
1786
|
eraserGeometryDelta: ee(
|
|
1762
1787
|
(W = this.localWork) == null ? void 0 : W.vNodes,
|
|
1763
|
-
|
|
1788
|
+
v
|
|
1764
1789
|
)
|
|
1765
1790
|
},
|
|
1766
1791
|
isSync: d,
|
|
@@ -1768,15 +1793,15 @@ class qe extends x {
|
|
|
1768
1793
|
emitEventType: this.emitEventType
|
|
1769
1794
|
});
|
|
1770
1795
|
}
|
|
1771
|
-
return f &&
|
|
1796
|
+
return f && S.push({
|
|
1772
1797
|
type: h.None,
|
|
1773
1798
|
needUndoTicker: f
|
|
1774
|
-
}),
|
|
1799
|
+
}), S.push({
|
|
1775
1800
|
type: h.SelectorTransform,
|
|
1776
1801
|
emitEventType: this.emitEventType,
|
|
1777
1802
|
workState: w
|
|
1778
1803
|
}), {
|
|
1779
|
-
sp:
|
|
1804
|
+
sp: S
|
|
1780
1805
|
};
|
|
1781
1806
|
});
|
|
1782
1807
|
}
|
|
@@ -1818,7 +1843,7 @@ class ze extends x {
|
|
|
1818
1843
|
u(this, "emitEventType", N.ScaleNode);
|
|
1819
1844
|
u(this, "updateSelectorCallback", (t) => {
|
|
1820
1845
|
var I;
|
|
1821
|
-
const { param: s, postData: r, workShapeNode: i, res: o, newServiceStore: a, smoothSync: n } = t, { updateSelectorOpt: c, willSyncService: d, needUndoTicker: l } = s, p = c.workState, f = r.sp || [], w = o == null ? void 0 : o.selectRect,
|
|
1846
|
+
const { param: s, postData: r, workShapeNode: i, res: o, newServiceStore: a, smoothSync: n } = t, { updateSelectorOpt: c, willSyncService: d, needUndoTicker: l } = s, p = c.workState, f = r.sp || [], w = o == null ? void 0 : o.selectRect, S = p === b.Done ? l : void 0;
|
|
1822
1847
|
if (p === b.Start)
|
|
1823
1848
|
return {
|
|
1824
1849
|
sp: [
|
|
@@ -1852,7 +1877,7 @@ class ze extends x {
|
|
|
1852
1877
|
dataType: R.Local,
|
|
1853
1878
|
willSyncService: p === b.Done ? !0 : n,
|
|
1854
1879
|
updateNodeOpt: W,
|
|
1855
|
-
needUndoTicker:
|
|
1880
|
+
needUndoTicker: S,
|
|
1856
1881
|
emitEventType: this.emitEventType
|
|
1857
1882
|
}), y.toolsType === m.Text ? f.push({
|
|
1858
1883
|
...y,
|
|
@@ -1861,7 +1886,7 @@ class ze extends x {
|
|
|
1861
1886
|
dataType: R.Local,
|
|
1862
1887
|
willSyncService: p === b.Done ? !0 : n,
|
|
1863
1888
|
updateNodeOpt: W,
|
|
1864
|
-
needUndoTicker:
|
|
1889
|
+
needUndoTicker: S,
|
|
1865
1890
|
emitEventType: this.emitEventType
|
|
1866
1891
|
}) : (n || p === b.Done) && f.push({
|
|
1867
1892
|
...y,
|
|
@@ -1875,7 +1900,7 @@ class ze extends x {
|
|
|
1875
1900
|
)
|
|
1876
1901
|
},
|
|
1877
1902
|
isSync: !0,
|
|
1878
|
-
needUndoTicker:
|
|
1903
|
+
needUndoTicker: S,
|
|
1879
1904
|
emitEventType: this.emitEventType
|
|
1880
1905
|
});
|
|
1881
1906
|
}
|
|
@@ -1929,9 +1954,9 @@ class Ve extends x {
|
|
|
1929
1954
|
willSerializeData: l,
|
|
1930
1955
|
isSync: p,
|
|
1931
1956
|
needUndoTicker: f
|
|
1932
|
-
} = s, w = c.workState,
|
|
1957
|
+
} = s, w = c.workState, S = r.sp || [], I = o == null ? void 0 : o.selectRect, W = w === b.Done ? f : void 0;
|
|
1933
1958
|
if (d) {
|
|
1934
|
-
l && w === b.Done &&
|
|
1959
|
+
l && w === b.Done && S.push({
|
|
1935
1960
|
type: h.Select,
|
|
1936
1961
|
selectIds: i.selectIds,
|
|
1937
1962
|
selectRect: I,
|
|
@@ -1943,16 +1968,16 @@ class Ve extends x {
|
|
|
1943
1968
|
useAnimation: c.useAnimation || !1
|
|
1944
1969
|
};
|
|
1945
1970
|
if (c.uid && (y.uid = c.uid), n || w === b.Done)
|
|
1946
|
-
for (const [
|
|
1947
|
-
|
|
1971
|
+
for (const [v, T] of a.entries())
|
|
1972
|
+
S.push({
|
|
1948
1973
|
...T,
|
|
1949
|
-
workId:
|
|
1974
|
+
workId: v,
|
|
1950
1975
|
type: h.UpdateNode,
|
|
1951
1976
|
updateNodeOpt: {
|
|
1952
1977
|
...y,
|
|
1953
1978
|
eraserGeometryDelta: ee(
|
|
1954
1979
|
(g = this.localWork) == null ? void 0 : g.vNodes,
|
|
1955
|
-
|
|
1980
|
+
v
|
|
1956
1981
|
)
|
|
1957
1982
|
},
|
|
1958
1983
|
isSync: p,
|
|
@@ -1960,15 +1985,15 @@ class Ve extends x {
|
|
|
1960
1985
|
emitEventType: this.emitEventType
|
|
1961
1986
|
});
|
|
1962
1987
|
}
|
|
1963
|
-
return f &&
|
|
1988
|
+
return f && S.push({
|
|
1964
1989
|
type: h.None,
|
|
1965
1990
|
needUndoTicker: f
|
|
1966
|
-
}),
|
|
1991
|
+
}), S.push({
|
|
1967
1992
|
type: h.SelectorTransform,
|
|
1968
1993
|
emitEventType: this.emitEventType,
|
|
1969
1994
|
workState: w
|
|
1970
1995
|
}), {
|
|
1971
|
-
sp:
|
|
1996
|
+
sp: S
|
|
1972
1997
|
};
|
|
1973
1998
|
});
|
|
1974
1999
|
}
|
|
@@ -2042,12 +2067,12 @@ class $e extends x {
|
|
|
2042
2067
|
textUpdateForWoker: l,
|
|
2043
2068
|
requestId: p,
|
|
2044
2069
|
emitEventType: f
|
|
2045
|
-
} = s, w = r.sp || [],
|
|
2070
|
+
} = s, w = r.sp || [], S = a == null ? void 0 : a.selectRect;
|
|
2046
2071
|
if (n && w) {
|
|
2047
2072
|
d.fontSize && w.push({
|
|
2048
2073
|
type: h.Select,
|
|
2049
2074
|
selectIds: o.selectIds,
|
|
2050
|
-
selectRect:
|
|
2075
|
+
selectRect: S,
|
|
2051
2076
|
willSyncService: n,
|
|
2052
2077
|
isSync: c,
|
|
2053
2078
|
points: o.getChildrenPoints()
|
|
@@ -2187,7 +2212,7 @@ class He extends x {
|
|
|
2187
2212
|
needUndoTicker: l,
|
|
2188
2213
|
requestId: p,
|
|
2189
2214
|
emitEventType: f
|
|
2190
|
-
} = s, w = r.sp || [],
|
|
2215
|
+
} = s, w = r.sp || [], S = a == null ? void 0 : a.selectRect;
|
|
2191
2216
|
if (n && w) {
|
|
2192
2217
|
for (const [I, W] of i.entries())
|
|
2193
2218
|
w.push({
|
|
@@ -2208,7 +2233,7 @@ class He extends x {
|
|
|
2208
2233
|
canRotate: o.canRotate,
|
|
2209
2234
|
type: h.Select,
|
|
2210
2235
|
selectIds: o.selectIds,
|
|
2211
|
-
selectRect:
|
|
2236
|
+
selectRect: S,
|
|
2212
2237
|
willSyncService: n,
|
|
2213
2238
|
isSync: c
|
|
2214
2239
|
});
|
|
@@ -2550,7 +2575,7 @@ class je {
|
|
|
2550
2575
|
workState: p,
|
|
2551
2576
|
imageSrc: f,
|
|
2552
2577
|
imageBitmap: w,
|
|
2553
|
-
imageElement:
|
|
2578
|
+
imageElement: S,
|
|
2554
2579
|
workIds: I,
|
|
2555
2580
|
isLockSentEventCursor: W,
|
|
2556
2581
|
requestId: g
|
|
@@ -2560,19 +2585,24 @@ class je {
|
|
|
2560
2585
|
G(e.dpr) && this.updateDpr(e.dpr);
|
|
2561
2586
|
break;
|
|
2562
2587
|
case h.AuthClear: {
|
|
2563
|
-
const { clearUids:
|
|
2564
|
-
this.vNodes.setCanClearUids(
|
|
2588
|
+
const { clearUids: v, localUid: T } = e;
|
|
2589
|
+
this.vNodes.setCanClearUids(v), this.vNodes.setLocalUid(T);
|
|
2565
2590
|
break;
|
|
2566
2591
|
}
|
|
2567
2592
|
case h.Destroy:
|
|
2568
2593
|
this.destroy();
|
|
2569
2594
|
break;
|
|
2595
|
+
case h.CancelBitmapEraser: {
|
|
2596
|
+
const v = y;
|
|
2597
|
+
v && this.localWork.abortBitmapEraser(v);
|
|
2598
|
+
break;
|
|
2599
|
+
}
|
|
2570
2600
|
case h.Clear:
|
|
2571
2601
|
this.clearAll();
|
|
2572
2602
|
break;
|
|
2573
2603
|
case h.ServiceSyncCommit: {
|
|
2574
2604
|
if (this.destroyed) break;
|
|
2575
|
-
const
|
|
2605
|
+
const v = [
|
|
2576
2606
|
(s = this.fullLayer) == null ? void 0 : s.parent,
|
|
2577
2607
|
(r = this.topLayer) == null ? void 0 : r.parent,
|
|
2578
2608
|
(i = this.localLayer) == null ? void 0 : i.parent,
|
|
@@ -2583,7 +2613,7 @@ class je {
|
|
|
2583
2613
|
(async () => {
|
|
2584
2614
|
await Le(
|
|
2585
2615
|
this.serviceWork,
|
|
2586
|
-
|
|
2616
|
+
v
|
|
2587
2617
|
);
|
|
2588
2618
|
})(),
|
|
2589
2619
|
{
|
|
@@ -2617,26 +2647,26 @@ class je {
|
|
|
2617
2647
|
try {
|
|
2618
2648
|
await Ee(
|
|
2619
2649
|
e.cameraTaskId,
|
|
2620
|
-
async (
|
|
2621
|
-
this.activeCameraTaskContext =
|
|
2650
|
+
async (v) => {
|
|
2651
|
+
this.activeCameraTaskContext = v;
|
|
2622
2652
|
try {
|
|
2623
|
-
await this.updateCamera(e,
|
|
2653
|
+
await this.updateCamera(e, v);
|
|
2624
2654
|
} finally {
|
|
2625
|
-
this.activeCameraTaskContext ===
|
|
2655
|
+
this.activeCameraTaskContext === v && (this.activeCameraTaskContext = void 0);
|
|
2626
2656
|
}
|
|
2627
2657
|
}
|
|
2628
2658
|
);
|
|
2629
|
-
} catch (
|
|
2630
|
-
throw this.cameraOpt = void 0, this.cancelCameraSettledRender(),
|
|
2659
|
+
} catch (v) {
|
|
2660
|
+
throw this.cameraOpt = void 0, this.cancelCameraSettledRender(), v;
|
|
2631
2661
|
}
|
|
2632
2662
|
break;
|
|
2633
2663
|
case h.UpdateTools:
|
|
2634
2664
|
if (n && c) {
|
|
2635
|
-
const
|
|
2665
|
+
const v = {
|
|
2636
2666
|
toolsType: n,
|
|
2637
2667
|
toolsOpt: c
|
|
2638
2668
|
};
|
|
2639
|
-
this.topWork.canUseTopLayer(n) ? this.topWork.setToolsOpt(
|
|
2669
|
+
this.topWork.canUseTopLayer(n) ? this.topWork.setToolsOpt(v) : this.localWork.setToolsOpt(v);
|
|
2640
2670
|
}
|
|
2641
2671
|
break;
|
|
2642
2672
|
case h.CreateWork:
|
|
@@ -2688,31 +2718,31 @@ class je {
|
|
|
2688
2718
|
d === R.Local && this.localWork.checkTextActive(e);
|
|
2689
2719
|
break;
|
|
2690
2720
|
case h.GetImageBitMap:
|
|
2691
|
-
if (f && (w ||
|
|
2692
|
-
const
|
|
2693
|
-
if (!
|
|
2694
|
-
this.closeImageSource(w ||
|
|
2721
|
+
if (f && (w || S) && l) {
|
|
2722
|
+
const v = this.imageResolveMap.get(f);
|
|
2723
|
+
if (!v || v.requestId !== g) {
|
|
2724
|
+
this.closeImageSource(w || S);
|
|
2695
2725
|
break;
|
|
2696
2726
|
}
|
|
2697
2727
|
const T = l.toString();
|
|
2698
2728
|
this.deleteCachedImagesByWorkId(T), this.cacheImages.set(f, {
|
|
2699
|
-
imageSource: w ||
|
|
2729
|
+
imageSource: w || S,
|
|
2700
2730
|
workId: T
|
|
2701
2731
|
});
|
|
2702
|
-
const { resolve: C, timer: L } =
|
|
2732
|
+
const { resolve: C, timer: L } = v;
|
|
2703
2733
|
L && clearTimeout(L), C && C(f);
|
|
2704
2734
|
}
|
|
2705
2735
|
break;
|
|
2706
2736
|
case h.GetVNodeInfo:
|
|
2707
2737
|
if (l && I) {
|
|
2708
|
-
const
|
|
2738
|
+
const v = I.map((T) => this.vNodes.get(T));
|
|
2709
2739
|
this.post({
|
|
2710
2740
|
sp: [
|
|
2711
2741
|
{
|
|
2712
2742
|
type: h.GetVNodeInfo,
|
|
2713
2743
|
dataType: R.Local,
|
|
2714
2744
|
workId: l,
|
|
2715
|
-
vInfo:
|
|
2745
|
+
vInfo: v
|
|
2716
2746
|
}
|
|
2717
2747
|
]
|
|
2718
2748
|
});
|
|
@@ -2733,8 +2763,8 @@ class je {
|
|
|
2733
2763
|
return;
|
|
2734
2764
|
let p = a;
|
|
2735
2765
|
if (n === pe.Iconify) {
|
|
2736
|
-
const [y,
|
|
2737
|
-
p = ue(a, y,
|
|
2766
|
+
const [y, v] = this.getIconSize(c, d, this.opt.displayer.dpr);
|
|
2767
|
+
p = ue(a, y, v, l);
|
|
2738
2768
|
}
|
|
2739
2769
|
if (this.cacheImages.has(p)) {
|
|
2740
2770
|
const y = this.getCachedImages(p);
|
|
@@ -2744,18 +2774,18 @@ class je {
|
|
|
2744
2774
|
const w = this.imageResolveMap.get(p);
|
|
2745
2775
|
if (w)
|
|
2746
2776
|
return await w.promise, this.getCachedImages(p);
|
|
2747
|
-
let
|
|
2748
|
-
const W = new Promise((y,
|
|
2749
|
-
|
|
2777
|
+
let S, I;
|
|
2778
|
+
const W = new Promise((y, v) => {
|
|
2779
|
+
S = y, I = v;
|
|
2750
2780
|
}), g = {
|
|
2751
|
-
resolve:
|
|
2781
|
+
resolve: S,
|
|
2752
2782
|
reject: I,
|
|
2753
2783
|
timer: void 0,
|
|
2754
2784
|
requestId: i,
|
|
2755
2785
|
promise: W
|
|
2756
2786
|
};
|
|
2757
2787
|
return g.timer = setTimeout(() => {
|
|
2758
|
-
this.imageResolveMap.get(p) === g &&
|
|
2788
|
+
this.imageResolveMap.get(p) === g && S(p);
|
|
2759
2789
|
}, 5e3), this.imageResolveMap.set(p, g), this.opt.post({
|
|
2760
2790
|
sp: [
|
|
2761
2791
|
{
|
|
@@ -2930,29 +2960,29 @@ class je {
|
|
|
2930
2960
|
}
|
|
2931
2961
|
if (t != null && t.aborted) return;
|
|
2932
2962
|
const f = /* @__PURE__ */ new Map();
|
|
2933
|
-
for (const [y,
|
|
2934
|
-
const T =
|
|
2963
|
+
for (const [y, v] of this.vNodes.getNodesByType(m.Text).entries()) {
|
|
2964
|
+
const T = v.rect;
|
|
2935
2965
|
f.set(y, J(T));
|
|
2936
2966
|
}
|
|
2937
|
-
for (const [y,
|
|
2938
|
-
f.set(y, J(
|
|
2967
|
+
for (const [y, v] of this.vNodes.gethasEraserNodes().entries())
|
|
2968
|
+
f.set(y, J(v.rect));
|
|
2939
2969
|
const w = new Set(f.keys());
|
|
2940
|
-
let
|
|
2970
|
+
let S = !1;
|
|
2941
2971
|
if (this.localWork.hasSelector()) {
|
|
2942
2972
|
const y = (l = this.localWork.getSelector()) == null ? void 0 : l.selectIds;
|
|
2943
2973
|
if (y) {
|
|
2944
|
-
|
|
2945
|
-
for (const
|
|
2946
|
-
w.add(
|
|
2974
|
+
S = !0;
|
|
2975
|
+
for (const v of y)
|
|
2976
|
+
w.add(v);
|
|
2947
2977
|
}
|
|
2948
2978
|
}
|
|
2949
2979
|
let I = !1;
|
|
2950
2980
|
if (this.serviceWork.selectorWorkShapes.size)
|
|
2951
2981
|
for (const y of this.serviceWork.selectorWorkShapes.values()) {
|
|
2952
|
-
const
|
|
2953
|
-
if (
|
|
2982
|
+
const v = y.selectIds;
|
|
2983
|
+
if (v) {
|
|
2954
2984
|
I = !0;
|
|
2955
|
-
for (const T of
|
|
2985
|
+
for (const T of v)
|
|
2956
2986
|
w.add(T);
|
|
2957
2987
|
}
|
|
2958
2988
|
}
|
|
@@ -2961,14 +2991,14 @@ class je {
|
|
|
2961
2991
|
for (const [T, C] of f.entries()) {
|
|
2962
2992
|
const L = this.vNodes.get(T);
|
|
2963
2993
|
if (L) {
|
|
2964
|
-
const A = C, E = L.rect,
|
|
2994
|
+
const A = C, E = L.rect, k = this.getSceneRect(), B = ae(A, k), O = ae(E, k);
|
|
2965
2995
|
let P = c;
|
|
2966
|
-
(
|
|
2996
|
+
(B !== O || A.w !== E.w || A.h !== E.h || O === Ce.intersect) && (P = !0);
|
|
2967
2997
|
const { toolsType: F, opt: U } = L, X = U.eraserlines && U.eraserlines.length > 0 || !!U.eraserFaces;
|
|
2968
2998
|
(P || p && X) && (F === m.Text || X) && this.debounceUpdateCache.add(T);
|
|
2969
2999
|
}
|
|
2970
3000
|
}
|
|
2971
|
-
if (
|
|
3001
|
+
if (S && this.localWork.reRenderSelector(), I)
|
|
2972
3002
|
for (const [
|
|
2973
3003
|
T,
|
|
2974
3004
|
C
|
|
@@ -2983,36 +3013,36 @@ class je {
|
|
|
2983
3013
|
o = !0;
|
|
2984
3014
|
const y = { cancelled: !1, cameraTaskId: i, context: t };
|
|
2985
3015
|
this.activeCameraSettledRender = y;
|
|
2986
|
-
const
|
|
3016
|
+
const v = () => !this.destroyed && !y.cancelled && this.activeCameraSettledRender === y && !(t != null && t.aborted);
|
|
2987
3017
|
this.debounceUpdateCameraId = setTimeout(async () => {
|
|
2988
3018
|
var T;
|
|
2989
3019
|
this.debounceUpdateCameraId = void 0;
|
|
2990
3020
|
try {
|
|
2991
|
-
if (!
|
|
3021
|
+
if (!v()) return;
|
|
2992
3022
|
const C = [];
|
|
2993
3023
|
for (const E of this.debounceUpdateCache.values()) {
|
|
2994
|
-
const
|
|
2995
|
-
if (
|
|
2996
|
-
const { toolsType:
|
|
2997
|
-
if (
|
|
3024
|
+
const k = (T = this.fullLayer) == null ? void 0 : T.getElementsByName(E)[0], B = this.vNodes.get(E);
|
|
3025
|
+
if (B) {
|
|
3026
|
+
const { toolsType: O, opt: P } = B;
|
|
3027
|
+
if (k || O !== m.Text) {
|
|
2998
3028
|
const F = this.localWork.setFullWork({
|
|
2999
|
-
toolsType:
|
|
3029
|
+
toolsType: O,
|
|
3000
3030
|
opt: P,
|
|
3001
3031
|
workId: E
|
|
3002
3032
|
});
|
|
3003
3033
|
if (F) {
|
|
3004
|
-
if (
|
|
3034
|
+
if (O === m.Text)
|
|
3005
3035
|
C.push(
|
|
3006
3036
|
F.consumeServiceAsync({
|
|
3007
3037
|
isFullWork: !0,
|
|
3008
3038
|
replaceId: E,
|
|
3009
3039
|
boxRect: this.getSceneRect(),
|
|
3010
|
-
isActive:
|
|
3040
|
+
isActive: v
|
|
3011
3041
|
})
|
|
3012
3042
|
);
|
|
3013
3043
|
else if (P.eraserlines && P.eraserlines.length > 0 || P.eraserFaces) {
|
|
3014
3044
|
const U = F.consumeService({
|
|
3015
|
-
op:
|
|
3045
|
+
op: B.op,
|
|
3016
3046
|
isFullWork: !0,
|
|
3017
3047
|
replaceId: E,
|
|
3018
3048
|
workState: b.Done
|
|
@@ -3024,7 +3054,7 @@ class je {
|
|
|
3024
3054
|
}
|
|
3025
3055
|
this.debounceUpdateCache.delete(E);
|
|
3026
3056
|
}
|
|
3027
|
-
if (await Promise.all(C), !
|
|
3057
|
+
if (await Promise.all(C), !v()) return;
|
|
3028
3058
|
this.vNodes.updateLowLevelNodesRect(), this.vNodes.clearHighLevelIds();
|
|
3029
3059
|
const L = [
|
|
3030
3060
|
this.fullLayer.parent.prepareRender,
|
|
@@ -3037,7 +3067,7 @@ class je {
|
|
|
3037
3067
|
this.topLayer.parent,
|
|
3038
3068
|
this.localLayer.parent,
|
|
3039
3069
|
this.serviceLayer.parent
|
|
3040
|
-
], await Promise.all(L), y.renderLayers = void 0, !
|
|
3070
|
+
], await Promise.all(L), y.renderLayers = void 0, !v()) return;
|
|
3041
3071
|
const A = y.cameraTaskId;
|
|
3042
3072
|
G(A) && this.opt.post({
|
|
3043
3073
|
viewId: this.viewId,
|
|
@@ -3045,7 +3075,7 @@ class je {
|
|
|
3045
3075
|
cameraSettledTaskId: A
|
|
3046
3076
|
});
|
|
3047
3077
|
} catch (C) {
|
|
3048
|
-
if (!
|
|
3078
|
+
if (!v()) return;
|
|
3049
3079
|
const L = {
|
|
3050
3080
|
code: "RENDERER_BUSINESS_ERROR",
|
|
3051
3081
|
business: "updateCamera",
|
|
@@ -3087,8 +3117,8 @@ class je {
|
|
|
3087
3117
|
"prepare-render"
|
|
3088
3118
|
)) {
|
|
3089
3119
|
W.filter(
|
|
3090
|
-
(
|
|
3091
|
-
).forEach((
|
|
3120
|
+
(v) => v.cancelPendingRender()
|
|
3121
|
+
).forEach((v) => v.render()), g.catch(() => {
|
|
3092
3122
|
});
|
|
3093
3123
|
return;
|
|
3094
3124
|
}
|
|
@@ -3382,17 +3412,17 @@ class Je {
|
|
|
3382
3412
|
const w = this.imageResolveMap.get(p);
|
|
3383
3413
|
if (w)
|
|
3384
3414
|
return await w.promise, this.getCachedImages(p);
|
|
3385
|
-
let
|
|
3415
|
+
let S;
|
|
3386
3416
|
const I = new Promise((g) => {
|
|
3387
|
-
|
|
3417
|
+
S = g;
|
|
3388
3418
|
}), W = {
|
|
3389
|
-
resolve:
|
|
3419
|
+
resolve: S,
|
|
3390
3420
|
timer: void 0,
|
|
3391
3421
|
requestId: i,
|
|
3392
3422
|
promise: I
|
|
3393
3423
|
};
|
|
3394
3424
|
return W.timer = setTimeout(() => {
|
|
3395
|
-
this.imageResolveMap.get(p) === W &&
|
|
3425
|
+
this.imageResolveMap.get(p) === W && S(p);
|
|
3396
3426
|
}, 5e3), this.imageResolveMap.set(p, W), this.opt.post({
|
|
3397
3427
|
viewId: this.viewId,
|
|
3398
3428
|
viewGeneration: this.viewGeneration,
|
|
@@ -3586,7 +3616,7 @@ class Je {
|
|
|
3586
3616
|
for (const r of s.sp) {
|
|
3587
3617
|
let i = !1;
|
|
3588
3618
|
for (const o of e)
|
|
3589
|
-
if (
|
|
3619
|
+
if (Be(r, o)) {
|
|
3590
3620
|
i = !0;
|
|
3591
3621
|
break;
|
|
3592
3622
|
}
|
|
@@ -3739,7 +3769,7 @@ class lt {
|
|
|
3739
3769
|
consumeWorkId: p
|
|
3740
3770
|
} = e;
|
|
3741
3771
|
if (c && q(i)) {
|
|
3742
|
-
const f =
|
|
3772
|
+
const f = Oe(
|
|
3743
3773
|
o,
|
|
3744
3774
|
a,
|
|
3745
3775
|
"mainThread"
|
|
@@ -3894,17 +3924,17 @@ class lt {
|
|
|
3894
3924
|
if (o === h.Init) {
|
|
3895
3925
|
const g = i.viewGeneration ?? (this.viewGenerationById.get(a) || 0) + 1;
|
|
3896
3926
|
await this.enqueueViewTask(a, async () => {
|
|
3897
|
-
var E,
|
|
3927
|
+
var E, k, B;
|
|
3898
3928
|
const y = this.viewGenerationById.get(a);
|
|
3899
3929
|
if (y !== void 0 && g < y)
|
|
3900
3930
|
return;
|
|
3901
3931
|
this.viewGenerationById.set(a, g);
|
|
3902
|
-
const
|
|
3932
|
+
const v = i.viewOwner || `${a}:${g}:${++this.ownerSequence}`, T = (E = this.master.control.viewContainerManager.getView(a)) == null ? void 0 : E.displayer, C = T == null ? void 0 : T.canvasContainerRef.current;
|
|
3903
3933
|
if (!T || !C || !l || !p) {
|
|
3904
3934
|
this.viewOwnerById.delete(a);
|
|
3905
3935
|
return;
|
|
3906
3936
|
}
|
|
3907
|
-
this.viewOwnerById.set(a,
|
|
3937
|
+
this.viewOwnerById.set(a, v);
|
|
3908
3938
|
const L = this.mainThreadMap.get(a);
|
|
3909
3939
|
L == null || L.destroy();
|
|
3910
3940
|
const A = this.createMainThread(a, {
|
|
@@ -3913,14 +3943,14 @@ class lt {
|
|
|
3913
3943
|
layerOpt: l,
|
|
3914
3944
|
master: this.master,
|
|
3915
3945
|
canvasOpt: p,
|
|
3916
|
-
viewOwner:
|
|
3946
|
+
viewOwner: v,
|
|
3917
3947
|
viewGeneration: g,
|
|
3918
|
-
mainThreadRenderMode: ((
|
|
3919
|
-
post: (
|
|
3920
|
-
...
|
|
3921
|
-
viewId:
|
|
3922
|
-
viewGeneration:
|
|
3923
|
-
viewOwner:
|
|
3948
|
+
mainThreadRenderMode: ((B = (k = this.master.control) == null ? void 0 : k.renderingCompatibilityDecision) == null ? void 0 : B.mainThreadRenderMode) ?? "normal",
|
|
3949
|
+
post: (O) => this.post({
|
|
3950
|
+
...O,
|
|
3951
|
+
viewId: O.viewId || a,
|
|
3952
|
+
viewGeneration: O.viewGeneration ?? g,
|
|
3953
|
+
viewOwner: v
|
|
3924
3954
|
})
|
|
3925
3955
|
});
|
|
3926
3956
|
this.mainThreadMap.set(a, A), A && f && A.setCameraOpt(f), this.post({
|
|
@@ -3936,12 +3966,12 @@ class lt {
|
|
|
3936
3966
|
continue;
|
|
3937
3967
|
}
|
|
3938
3968
|
if (o === h.Snapshot || o === h.BoundingBox) {
|
|
3939
|
-
const g = (t = this.master.control.viewContainerManager.getView(a)) == null ? void 0 : t.displayer, y = (s = this.master.control.viewContainerManager.mainView) == null ? void 0 : s.displayer,
|
|
3940
|
-
if (g &&
|
|
3969
|
+
const g = (t = this.master.control.viewContainerManager.getView(a)) == null ? void 0 : t.displayer, y = (s = this.master.control.viewContainerManager.mainView) == null ? void 0 : s.displayer, v = (r = y == null ? void 0 : y.snapshotContainerRef) == null ? void 0 : r.current;
|
|
3970
|
+
if (g && v && f) {
|
|
3941
3971
|
const T = this.getSnapshotRequestKey(i), C = this.snapshotThreadsByRequest.get(T);
|
|
3942
3972
|
C && this.disposeSnapshotThread(T, C.thread, "replaced");
|
|
3943
3973
|
const L = document.createElement("div");
|
|
3944
|
-
L.style.width = `${f.width}px`, L.style.height = `${f.height}px`,
|
|
3974
|
+
L.style.width = `${f.width}px`, L.style.height = `${f.height}px`, v.append(L);
|
|
3945
3975
|
const A = {
|
|
3946
3976
|
...he.defaultLayerOpt,
|
|
3947
3977
|
offscreen: !1,
|
|
@@ -3951,7 +3981,7 @@ class lt {
|
|
|
3951
3981
|
...he.defaultScreenCanvasOpt,
|
|
3952
3982
|
width: f.width,
|
|
3953
3983
|
height: f.height
|
|
3954
|
-
},
|
|
3984
|
+
}, k = this.createSnapshotThread(a, {
|
|
3955
3985
|
displayer: g,
|
|
3956
3986
|
container: L,
|
|
3957
3987
|
layerOpt: A,
|
|
@@ -3962,14 +3992,14 @@ class lt {
|
|
|
3962
3992
|
viewGeneration: this.viewGenerationById.get(a)
|
|
3963
3993
|
});
|
|
3964
3994
|
this.snapshotThreadsByRequest.set(T, {
|
|
3965
|
-
thread:
|
|
3995
|
+
thread: k,
|
|
3966
3996
|
surface: L
|
|
3967
|
-
}),
|
|
3968
|
-
this.disposeSnapshotThread(T,
|
|
3969
|
-
}).catch((
|
|
3997
|
+
}), k.on(i).then(() => {
|
|
3998
|
+
this.disposeSnapshotThread(T, k);
|
|
3999
|
+
}).catch((B) => {
|
|
3970
4000
|
this.master.Logger.error(
|
|
3971
|
-
`[Appliance]: snapshot render failed; viewId=${a}; error=${
|
|
3972
|
-
), this.disposeSnapshotThread(T,
|
|
4001
|
+
`[Appliance]: snapshot render failed; viewId=${a}; error=${B instanceof Error ? B.message : String(B)}`
|
|
4002
|
+
), this.disposeSnapshotThread(T, k);
|
|
3973
4003
|
});
|
|
3974
4004
|
continue;
|
|
3975
4005
|
}
|
|
@@ -4000,8 +4030,8 @@ class lt {
|
|
|
4000
4030
|
continue;
|
|
4001
4031
|
}
|
|
4002
4032
|
if (o === h.GetImageBitMap) {
|
|
4003
|
-
const g = this.mainThreadMap.get(a), y = this.viewGenerationById.get(a),
|
|
4004
|
-
if (!g || i.viewGeneration !== void 0 && i.viewGeneration !== y || i.viewOwner !== void 0 && i.viewOwner !==
|
|
4033
|
+
const g = this.mainThreadMap.get(a), y = this.viewGenerationById.get(a), v = this.viewOwnerById.get(a);
|
|
4034
|
+
if (!g || i.viewGeneration !== void 0 && i.viewGeneration !== y || i.viewOwner !== void 0 && i.viewOwner !== v || this.mainThreadMap.get(a) !== g) {
|
|
4005
4035
|
this.releaseMessageBitmap(i);
|
|
4006
4036
|
continue;
|
|
4007
4037
|
}
|
|
@@ -4009,12 +4039,12 @@ class lt {
|
|
|
4009
4039
|
continue;
|
|
4010
4040
|
}
|
|
4011
4041
|
if (o === h.TasksQueue && (n != null && n.size)) {
|
|
4012
|
-
const g = n.get(a), y = this.mainThreadMap.get(a),
|
|
4042
|
+
const g = n.get(a), y = this.mainThreadMap.get(a), v = this.viewGenerationById.get(a), T = this.viewOwnerById.get(a);
|
|
4013
4043
|
let C;
|
|
4014
4044
|
if (g && y)
|
|
4015
4045
|
try {
|
|
4016
4046
|
await this.enqueueViewTask(a, async () => {
|
|
4017
|
-
this.viewGenerationById.get(a) !==
|
|
4047
|
+
this.viewGenerationById.get(a) !== v || this.viewOwnerById.get(a) !== T || this.mainThreadMap.get(a) !== y || await y.on(g);
|
|
4018
4048
|
});
|
|
4019
4049
|
} catch (L) {
|
|
4020
4050
|
if (g.msgType !== h.UpdateCamera) throw L;
|
|
@@ -4032,7 +4062,7 @@ class lt {
|
|
|
4032
4062
|
if (C && q(d)) {
|
|
4033
4063
|
this.post({
|
|
4034
4064
|
viewId: a,
|
|
4035
|
-
viewGeneration:
|
|
4065
|
+
viewGeneration: v,
|
|
4036
4066
|
viewOwner: T,
|
|
4037
4067
|
cameraTaskId: d,
|
|
4038
4068
|
cameraTaskStatus: C.code === "RENDERER_BUSINESS_TIMEOUT" ? "timeout" : "failed",
|
|
@@ -4044,26 +4074,26 @@ class lt {
|
|
|
4044
4074
|
workerTasksqueueCount: c,
|
|
4045
4075
|
cameraTaskId: d,
|
|
4046
4076
|
viewId: a,
|
|
4047
|
-
viewGeneration:
|
|
4077
|
+
viewGeneration: v,
|
|
4048
4078
|
viewOwner: T
|
|
4049
4079
|
});
|
|
4050
4080
|
continue;
|
|
4051
4081
|
}
|
|
4052
4082
|
if (a === ce) {
|
|
4053
4083
|
const g = [...this.mainThreadMap.entries()];
|
|
4054
|
-
for (const [y,
|
|
4084
|
+
for (const [y, v] of g) {
|
|
4055
4085
|
const T = this.enqueueViewTask(y, async () => {
|
|
4056
|
-
this.mainThreadMap.get(y) ===
|
|
4086
|
+
this.mainThreadMap.get(y) === v && (o === h.Destroy ? (v.destroy(), this.mainThreadMap.delete(y), this.viewOwnerById.delete(y), this.viewGenerationById.set(
|
|
4057
4087
|
y,
|
|
4058
4088
|
(this.viewGenerationById.get(y) || 0) + 1
|
|
4059
|
-
)) : await
|
|
4089
|
+
)) : await v.on(i));
|
|
4060
4090
|
});
|
|
4061
4091
|
await T, this.cameraRenderQueueByView.get(y) === T && this.cameraRenderQueueByView.delete(y);
|
|
4062
4092
|
}
|
|
4063
4093
|
continue;
|
|
4064
4094
|
}
|
|
4065
|
-
const
|
|
4066
|
-
if (o === h.Destroy && !
|
|
4095
|
+
const S = this.mainThreadMap.get(a);
|
|
4096
|
+
if (o === h.Destroy && !S) {
|
|
4067
4097
|
await this.enqueueViewTask(a, async () => {
|
|
4068
4098
|
this.viewGenerationById.set(
|
|
4069
4099
|
a,
|
|
@@ -4072,12 +4102,12 @@ class lt {
|
|
|
4072
4102
|
});
|
|
4073
4103
|
continue;
|
|
4074
4104
|
}
|
|
4075
|
-
if (!
|
|
4105
|
+
if (!S)
|
|
4076
4106
|
continue;
|
|
4077
4107
|
const I = this.viewGenerationById.get(a), W = this.enqueueViewTask(a, async () => {
|
|
4078
|
-
this.viewGenerationById.get(a) !== I || this.mainThreadMap.get(a) !==
|
|
4108
|
+
this.viewGenerationById.get(a) !== I || this.mainThreadMap.get(a) !== S || await S.on(i);
|
|
4079
4109
|
});
|
|
4080
|
-
o === h.Destroy && (await W, this.mainThreadMap.get(a) ===
|
|
4110
|
+
o === h.Destroy && (await W, this.mainThreadMap.get(a) === S && this.mainThreadMap.delete(a), this.viewOwnerById.delete(a), this.cameraRenderQueueByView.get(a) === W && this.cameraRenderQueueByView.delete(a), this.viewGenerationById.set(
|
|
4081
4111
|
a,
|
|
4082
4112
|
i.viewGeneration ?? (I || 0) + 1
|
|
4083
4113
|
));
|