mxcad 1.0.6 → 1.0.7
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/mxcad.es.js +630 -644
- package/dist/mxcad.umd.js +40 -40
- package/dist/mxdrawassembly_min.wasm +0 -0
- package/package.json +1 -1
package/dist/mxcad.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { MxFun as
|
|
2
|
-
async function
|
|
1
|
+
import { MxFun as I, MrxDbgUiPrPoint as ae, store as He, MxPaintBrush as U, MrxDbgUiPrBaseReturn as T, MxDbCircleShape as vt, MxDbLine as We, MxDbPolyline as zt, MxDbRegularPolygon as Gt, MxDbCircleArc as Fe, Mx3PointArc as Xt, MxDbEllipseShape as $t } from "mxdraw";
|
|
2
|
+
async function Yt(i, o) {
|
|
3
3
|
const f = await (await fetch(i)).arrayBuffer();
|
|
4
4
|
return await WebAssembly.instantiate(f, o);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function xt(i) {
|
|
7
7
|
return btoa(unescape(encodeURIComponent(i)));
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Mt(i) {
|
|
10
10
|
return decodeURIComponent(escape(atob(i)));
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Ct(i) {
|
|
13
13
|
let o = JSON.stringify(i);
|
|
14
|
-
|
|
14
|
+
I.callCommand("MxCAD_SetEntityData", o);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
b64Encode:
|
|
18
|
-
b64Decode:
|
|
19
|
-
setMcDbEntity:
|
|
16
|
+
const Ne = {
|
|
17
|
+
b64Encode: xt,
|
|
18
|
+
b64Decode: Mt,
|
|
19
|
+
setMcDbEntity: Ct
|
|
20
20
|
};
|
|
21
|
-
async function
|
|
22
|
-
const i = new
|
|
21
|
+
async function Zt() {
|
|
22
|
+
const i = new ae();
|
|
23
23
|
i.setMessage(`
|
|
24
24
|
\u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
|
|
25
25
|
let o = await i.go();
|
|
@@ -28,17 +28,17 @@ async function $t() {
|
|
|
28
28
|
let r = "\u6D4B\u8BD5";
|
|
29
29
|
if (r.length <= 0)
|
|
30
30
|
return;
|
|
31
|
-
let f =
|
|
32
|
-
r =
|
|
31
|
+
let f = I.screenCoordLong2Doc(50);
|
|
32
|
+
r = Ne.b64Encode(r);
|
|
33
33
|
const l = {
|
|
34
34
|
postx: o.x,
|
|
35
35
|
posty: o.y,
|
|
36
36
|
text: r,
|
|
37
37
|
height: f
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
I.call("Mx_Text", l);
|
|
40
40
|
}
|
|
41
|
-
class
|
|
41
|
+
class Jt extends vt {
|
|
42
42
|
getGripPoints() {
|
|
43
43
|
const { x: o, y: r, z: f } = this.center;
|
|
44
44
|
let l = new THREE.Vector3(o, r + this.radius, f), A = new THREE.Vector3(o, r - this.radius, f), p = new THREE.Vector3(o - this.radius, r, f), h = new THREE.Vector3(o + this.radius, r, f);
|
|
@@ -49,14 +49,14 @@ class Yt extends vt {
|
|
|
49
49
|
return o === 0 && (this.center = f.add(r)), o === 1 && (this.radius = l.add(r).distanceTo(this.center)), o === 2 && (this.radius = A.add(r).distanceTo(this.center)), o === 3 && (this.radius = p.add(r).distanceTo(this.center)), o === 4 && (this.radius = h.add(r).distanceTo(this.center)), !0;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
const [o, r, f] = i, { x: l, y: A, z: p } = o, { x: h, y: w, z: E } = r, { x, y: D, z:
|
|
54
|
-
return new THREE.Vector3(
|
|
52
|
+
const mt = (i) => {
|
|
53
|
+
const [o, r, f] = i, { x: l, y: A, z: p } = o, { x: h, y: w, z: E } = r, { x, y: D, z: W } = f, _ = A * E - w * p - A * W + D * p + w * W - D * E, M = -(l * E - h * p - l * W + x * p + h * W - x * E), R = l * w - h * A - l * D + x * A + h * D - x * w, P = -(l * w * W - l * D * E - h * A * W + h * D * p + x * A * E - x * w * p), v = 2 * (h - l), L = 2 * (w - A), j = 2 * (E - p), q = l * l + A * A + p * p - h * h - w * w - E * E, N = 2 * (x - l), z = 2 * (D - A), G = 2 * (W - p), V = l * l + A * A + p * p - x * x - D * D - W * W, ye = -(M * j * V - M * G * q - L * R * V + L * G * P + z * R * q - z * j * P) / (_ * L * G - _ * z * j - v * M * G + v * z * R + N * M * j - N * L * R), he = (_ * j * V - _ * G * q - v * R * V + v * G * P + N * R * q - N * j * P) / (_ * L * G - _ * z * j - v * M * G + v * z * R + N * M * j - N * L * R), K = -(_ * L * V - _ * z * q - v * M * V + v * z * P + N * M * q - N * L * P) / (_ * L * G - _ * z * j - v * M * G + v * z * R + N * M * j - N * L * R);
|
|
54
|
+
return new THREE.Vector3(ye, he, K);
|
|
55
55
|
};
|
|
56
|
-
function
|
|
57
|
-
const i = new
|
|
58
|
-
let o = new
|
|
59
|
-
|
|
56
|
+
function Bt() {
|
|
57
|
+
const i = new ae();
|
|
58
|
+
let o = new Jt();
|
|
59
|
+
U.use(o), o.closed = !1;
|
|
60
60
|
let r = 0, f = "default", l = !0;
|
|
61
61
|
const A = () => {
|
|
62
62
|
i.setUserDraw(
|
|
@@ -66,35 +66,35 @@ function Ct() {
|
|
|
66
66
|
);
|
|
67
67
|
}, p = (_) => {
|
|
68
68
|
if (f === "default") {
|
|
69
|
-
if (_ ===
|
|
69
|
+
if (_ === T.kOk) {
|
|
70
70
|
if (r === 0)
|
|
71
71
|
i.setMessage(`
|
|
72
72
|
\u6307\u5B9A\u5706\u7684\u534A\u5F84:`), i.setKeyWords("[\u76F4\u5F84(D)]"), o.center = i.value(), A();
|
|
73
73
|
else if (r === 1)
|
|
74
|
-
return
|
|
74
|
+
return I.getCurrentDraw().addMxEntity(o), !0;
|
|
75
75
|
r++;
|
|
76
76
|
}
|
|
77
|
-
_ ===
|
|
77
|
+
_ === T.kKeyWord && i.isKeyWordPicked("D") && (l = !1, A(), i.setMessage(`
|
|
78
78
|
\u6307\u5B9A\u5706\u7684\u76F4\u5F84:`), i.setKeyWords(""));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
let h = [];
|
|
82
82
|
const w = (_) => {
|
|
83
83
|
if (f === "3P" && (i.setMessage(`
|
|
84
|
-
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), _ ===
|
|
85
|
-
if (r === 0 && (h.push(i.value()), i.setUserDraw((M,
|
|
86
|
-
|
|
84
|
+
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), _ === T.kOk)) {
|
|
85
|
+
if (r === 0 && (h.push(i.value()), i.setUserDraw((M, R) => {
|
|
86
|
+
R.drawLine(h[0], M);
|
|
87
87
|
}), i.setMessage(`
|
|
88
|
-
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), r === 1 && (h.push(i.value()), i.setUserDraw((M,
|
|
89
|
-
const [
|
|
90
|
-
o.center =
|
|
91
|
-
v,
|
|
88
|
+
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), r === 1 && (h.push(i.value()), i.setUserDraw((M, R) => {
|
|
89
|
+
const [P, v] = h, L = M;
|
|
90
|
+
o.center = mt([
|
|
92
91
|
P,
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
v,
|
|
93
|
+
L
|
|
94
|
+
]), o.radius = o.center.distanceTo(P), R.drawCustomEntity(o);
|
|
95
95
|
}), i.setMessage(`
|
|
96
96
|
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9:`)), r === 2)
|
|
97
|
-
return h.push(i.value()), o.center =
|
|
97
|
+
return h.push(i.value()), o.center = mt(h), o.radius = o.center.distanceTo(h[0]), I.getCurrentDraw().addMxEntity(o), !0;
|
|
98
98
|
r++;
|
|
99
99
|
}
|
|
100
100
|
};
|
|
@@ -103,21 +103,21 @@ function Ct() {
|
|
|
103
103
|
new THREE.Line3(_, M).getCenter(o.center), o.radius = M.distanceTo(_) / 2;
|
|
104
104
|
}, D = (_) => {
|
|
105
105
|
if (f === "2P" && (i.setMessage(`
|
|
106
|
-
\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), _ ===
|
|
107
|
-
if (r === 0 && (E = i.value(), i.setUserDraw((M,
|
|
108
|
-
x(E, M),
|
|
106
|
+
\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), _ === T.kOk)) {
|
|
107
|
+
if (r === 0 && (E = i.value(), i.setUserDraw((M, R) => {
|
|
108
|
+
x(E, M), R.drawCustomEntity(o), R.drawLine(E, M);
|
|
109
109
|
}), i.setMessage(`
|
|
110
110
|
\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`)), r === 1)
|
|
111
|
-
return x(E, i.value()),
|
|
111
|
+
return x(E, i.value()), I.getCurrentDraw().addMxEntity(o), !0;
|
|
112
112
|
r++;
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, W = (_) => {
|
|
115
115
|
if (f === "T") {
|
|
116
116
|
if (i.setMessage(`
|
|
117
|
-
\u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), _ ===
|
|
117
|
+
\u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), _ === T.kOk) {
|
|
118
118
|
if (r === 0) {
|
|
119
119
|
const M = i.value();
|
|
120
|
-
console.log(M),
|
|
120
|
+
console.log(M), I.getCurrentDraw();
|
|
121
121
|
}
|
|
122
122
|
r++;
|
|
123
123
|
}
|
|
@@ -129,32 +129,32 @@ function Ct() {
|
|
|
129
129
|
\u6307\u5B9A\u5706\u7684\u5706\u5FC3\u6216[\u4E09\u70B9(3P)/\u4E24\u70B9(2P)/\u5207\u70B9\u3001\u5207\u70B9\u3001\u534A\u5F84(T)]:`
|
|
130
130
|
), i.setKeyWords("3P 2P T"), i.goWhile(
|
|
131
131
|
(_) => {
|
|
132
|
-
if (_ ===
|
|
132
|
+
if (_ === T.kKeyWord && (i.isKeyWordPicked("3P") ? f = "3P" : i.isKeyWordPicked("2P") ? f = "2P" : i.isKeyWordPicked("T") && (f = "T")), p(_))
|
|
133
133
|
return { exit: !0 };
|
|
134
134
|
if (w(_))
|
|
135
135
|
return { exit: !0 };
|
|
136
136
|
if (D(_))
|
|
137
137
|
return { exit: !0 };
|
|
138
|
-
if (
|
|
138
|
+
if (W(_))
|
|
139
139
|
return { exit: !0 };
|
|
140
140
|
},
|
|
141
141
|
(_) => {
|
|
142
|
-
_ ===
|
|
142
|
+
_ === T.kCancel && I.getCurrentDraw().addMxEntity(o);
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
He.events.on("MxDbEntityRegister", () => {
|
|
147
|
+
I.addCommand("Mx_Circle", Bt);
|
|
148
148
|
});
|
|
149
|
-
const
|
|
149
|
+
const Pt = () => He.state.MxFun.stopRunCommand();
|
|
150
150
|
function Oe(i, o, r, f) {
|
|
151
151
|
const l = i - r, A = o - f;
|
|
152
152
|
let p = 0;
|
|
153
153
|
return l == 0 ? p = Math.PI / 2 : p = Math.atan(Math.abs(A / l)), l < 0 && A >= 0 ? p = Math.PI - p : l < 0 && A < 0 ? p = Math.PI + p : l >= 0 && A < 0 && (p = Math.PI * 2 - p), p;
|
|
154
154
|
}
|
|
155
|
-
async function
|
|
156
|
-
const i = new
|
|
157
|
-
let o = new
|
|
155
|
+
async function Dt() {
|
|
156
|
+
const i = new ae();
|
|
157
|
+
let o = new We(), r = [];
|
|
158
158
|
i.setMessage(`
|
|
159
159
|
\u6307\u5B9A\u7B2C\u4E00\u70B9:`);
|
|
160
160
|
let f = await i.go();
|
|
@@ -169,28 +169,28 @@ async function Bt() {
|
|
|
169
169
|
};
|
|
170
170
|
l(), i.goWhile(
|
|
171
171
|
(A) => {
|
|
172
|
-
if (A ===
|
|
172
|
+
if (A === T.kOk && (o = new We(), U.use(o), o.pt1 = f, o.pt2 = i.value(), f = o.pt2.clone(), r.push(o), l()), A === T.kKeyWord) {
|
|
173
173
|
if (i.isKeyWordPicked("E"))
|
|
174
|
-
|
|
174
|
+
Pt();
|
|
175
175
|
else if (i.isKeyWordPicked("C")) {
|
|
176
|
-
const p = new
|
|
177
|
-
return p.pt1 = f.clone(), p.pt2 = r[0].pt1.clone(),
|
|
176
|
+
const p = new We();
|
|
177
|
+
return p.pt1 = f.clone(), p.pt2 = r[0].pt1.clone(), U.use(p), r.push(p), f = p.pt2.clone(), Pt(), { exit: !0 };
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
181
|
(A) => {
|
|
182
|
-
if (A ===
|
|
182
|
+
if (A === T.kCancel)
|
|
183
183
|
return r.forEach((p) => {
|
|
184
|
-
|
|
184
|
+
I.getCurrentDraw().addMxEntity(p);
|
|
185
185
|
}), { exit: !0 };
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
188
|
}
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
He.events.on("MxDbEntityRegister", () => {
|
|
190
|
+
I.addCommand("Mx_Line", Dt);
|
|
191
191
|
});
|
|
192
|
-
async function
|
|
193
|
-
const i = new
|
|
192
|
+
async function Qt() {
|
|
193
|
+
const i = new ae();
|
|
194
194
|
i.setMessage(`
|
|
195
195
|
\u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
|
|
196
196
|
let o = await i.go();
|
|
@@ -200,41 +200,41 @@ async function Zt() {
|
|
|
200
200
|
\u6D4B\u8BD5`;
|
|
201
201
|
if (r.length <= 0)
|
|
202
202
|
return;
|
|
203
|
-
let f =
|
|
204
|
-
r =
|
|
203
|
+
let f = I.screenCoordLong2Doc(50);
|
|
204
|
+
r = Ne.b64Encode(r);
|
|
205
205
|
const l = {
|
|
206
206
|
postx: o.x,
|
|
207
207
|
posty: o.y,
|
|
208
208
|
text: r,
|
|
209
209
|
height: f
|
|
210
210
|
};
|
|
211
|
-
|
|
211
|
+
I.call("Mx_MText", l);
|
|
212
212
|
}
|
|
213
|
-
async function
|
|
214
|
-
const i = new
|
|
215
|
-
|
|
213
|
+
async function Ut() {
|
|
214
|
+
const i = new ae(), o = new zt();
|
|
215
|
+
U.use(o), i.setMessage(`
|
|
216
216
|
\u6307\u5B9A\u8D77\u70B9:`);
|
|
217
217
|
let r;
|
|
218
218
|
i.setUserDraw((f, l) => {
|
|
219
219
|
l.drawCustomEntity(o), r && l.drawLine(r, f);
|
|
220
220
|
}), i.goWhile(
|
|
221
221
|
(f) => {
|
|
222
|
-
if (f ===
|
|
222
|
+
if (f === T.kOk) {
|
|
223
223
|
const l = i.value();
|
|
224
224
|
o.points.push(i.value()), r = l, i.setMessage(`
|
|
225
225
|
\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`), i.setKeyWords("[\u5706\u5F27(A)/\u5BBD\u5EA6(W)]");
|
|
226
226
|
} else
|
|
227
|
-
f ===
|
|
227
|
+
f === T.kKeyWord && (i.isKeyWordPicked("A"), i.isKeyWordPicked("W"));
|
|
228
228
|
},
|
|
229
229
|
(f) => {
|
|
230
|
-
f ===
|
|
230
|
+
f === T.kCancel && I.getCurrentDraw().addMxEntity(o);
|
|
231
231
|
}
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
async function
|
|
235
|
-
const i = new
|
|
236
|
-
let o = new
|
|
237
|
-
|
|
234
|
+
async function qt() {
|
|
235
|
+
const i = new ae();
|
|
236
|
+
let o = new Gt();
|
|
237
|
+
U.use(o), i.setMessage(`
|
|
238
238
|
\u8F93\u5165\u8FB9\u7684\u6570\u76EE<5>:`);
|
|
239
239
|
let r = 3, f = [r];
|
|
240
240
|
for (; r < 25; )
|
|
@@ -242,7 +242,7 @@ async function Qt() {
|
|
|
242
242
|
i.setKeyWords(f.join(" "));
|
|
243
243
|
let l = 0;
|
|
244
244
|
i.goWhile((A) => {
|
|
245
|
-
if (A ===
|
|
245
|
+
if (A === T.kOk)
|
|
246
246
|
if (l === 1)
|
|
247
247
|
o.centerPoint = i.value(), i.setMessage(`
|
|
248
248
|
[\u5185\u63A5\u4E8E\u5706(I)/\u5916\u5207\u4E8E\u5706(C)]<\u5916\u5207>:`), i.setKeyWords("I C");
|
|
@@ -254,11 +254,11 @@ async function Qt() {
|
|
|
254
254
|
return i.setMessage(`
|
|
255
255
|
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`), { exit: !0 };
|
|
256
256
|
if (l === 4)
|
|
257
|
-
return o.otherPoint = i.value(),
|
|
257
|
+
return o.otherPoint = i.value(), I.getCurrentDraw().addMxEntity(o), { exit: !0 };
|
|
258
258
|
l === 5 && i.setMessage(`
|
|
259
259
|
\u5916\u5207\u4E8E\u5706(C)\u65E0\u6CD5\u7ED8\u5236:`);
|
|
260
260
|
}
|
|
261
|
-
if (A ===
|
|
261
|
+
if (A === T.kKeyWord) {
|
|
262
262
|
const p = i.keyWordPicked(), h = Number(p);
|
|
263
263
|
!Number.isNaN(h) && l === 0 && (o.sidesNumber = h, i.setMessage(`
|
|
264
264
|
\u6307\u5B9A\u6B63\u591A\u8FB9\u5F62\u7684\u4E2D\u5FC3\u70B9\u6216 [\u8FB9(E)]:`), i.setKeyWords("E"), l++), l === 1 && (i.isKeyWordPicked("E") && (i.setMessage(`
|
|
@@ -270,21 +270,21 @@ async function Qt() {
|
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const f = i.x, l = o.x, A = r.x, p = i.y, h = o.y, w = r.y, E = f - l, x = p - h, D = f - A,
|
|
275
|
-
return new THREE.Vector3(
|
|
273
|
+
function en(i, o, r) {
|
|
274
|
+
const f = i.x, l = o.x, A = r.x, p = i.y, h = o.y, w = r.y, E = f - l, x = p - h, D = f - A, W = p - w, _ = (f * f - l * l + (p * p - h * h)) / 2, M = (f * f - A * A + (p * p - w * w)) / 2, R = x * D - E * W, P = -(W * _ - x * M) / R, v = -(E * M - D * _) / R;
|
|
275
|
+
return new THREE.Vector3(P, v, 0);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function tn(i, o) {
|
|
278
278
|
const r = i.x, f = i.y, l = o.x, A = o.y;
|
|
279
279
|
return Math.sqrt((r - l) * (r - l) + (f - A) * (f - A));
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function nn(i, o, r) {
|
|
282
282
|
let f;
|
|
283
283
|
i < r ? f = r - i : f = r - i + 360;
|
|
284
284
|
let l;
|
|
285
285
|
return i < o ? l = o - i : l = o - i + 360, l > f;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Ve(i, o, r) {
|
|
288
288
|
const f = i.x, l = o.x, A = i.y, p = o.y;
|
|
289
289
|
let h, w, E;
|
|
290
290
|
return h = (A - p) / r, w = (f - l) / r, w >= 0.99999 && (w = 0.99999), w <= -0.99999 && (w = -0.99999), E = Math.acos(w), E = E / Math.PI * 180, h < -0.05 && (E = 360 - E), {
|
|
@@ -296,13 +296,13 @@ function Ke(i, o, r) {
|
|
|
296
296
|
const Q = (i, o, r) => {
|
|
297
297
|
const f = () => {
|
|
298
298
|
i.go((l) => {
|
|
299
|
-
if (l ===
|
|
299
|
+
if (l === T.kKeyWord && r() && f(), l === T.kOk && o() && f(), l === T.kNone && f(), l === T.kCancel)
|
|
300
300
|
return { exit: !0 };
|
|
301
301
|
});
|
|
302
302
|
};
|
|
303
303
|
return f;
|
|
304
304
|
};
|
|
305
|
-
class
|
|
305
|
+
class ze extends vt {
|
|
306
306
|
constructor() {
|
|
307
307
|
super(), this._propertyDbKeys = [...this._propertyDbKeys, "bulge"];
|
|
308
308
|
}
|
|
@@ -310,7 +310,7 @@ class Ne extends vt {
|
|
|
310
310
|
return "MxDbCircle";
|
|
311
311
|
}
|
|
312
312
|
create() {
|
|
313
|
-
return new
|
|
313
|
+
return new ze();
|
|
314
314
|
}
|
|
315
315
|
getArcBulge(o, r, f) {
|
|
316
316
|
const l = o.distanceTo(r);
|
|
@@ -326,8 +326,8 @@ class Ne extends vt {
|
|
|
326
326
|
E.x = p.x + r * Math.cos(h), E.y = p.y + r * Math.sin(h), x.x = p.x + r * Math.cos(w), x.y = p.y + r * Math.sin(w);
|
|
327
327
|
const D = r;
|
|
328
328
|
(A ? f < l : f > l) && (w += Math.PI * 2);
|
|
329
|
-
const
|
|
330
|
-
return
|
|
329
|
+
const W = new THREE.Vector3();
|
|
330
|
+
return W.x = p.x + D * Math.cos((h + w) / 2), W.y = p.y + D * Math.sin((h + w) / 2), [E, W, x, this.center];
|
|
331
331
|
}
|
|
332
332
|
getGripPoints() {
|
|
333
333
|
return this.getArcMidPoint(
|
|
@@ -347,34 +347,34 @@ class Ne extends vt {
|
|
|
347
347
|
upDatePoints(o, r, f) {
|
|
348
348
|
o[r].add(f);
|
|
349
349
|
const [l, A, p] = o;
|
|
350
|
-
this.center =
|
|
351
|
-
const h =
|
|
352
|
-
this.clockwise =
|
|
350
|
+
this.center = en(l, p, A), this.radius = tn(A, this.center);
|
|
351
|
+
const h = Ve(l, this.center, this.radius), w = Ve(p, this.center, this.radius), E = Ve(A, this.center, this.radius);
|
|
352
|
+
this.clockwise = nn(
|
|
353
353
|
w.angle,
|
|
354
354
|
h.angle,
|
|
355
355
|
E.angle
|
|
356
356
|
), this.startAngle = THREE.MathUtils.degToRad(h.angle), this.endAngle = THREE.MathUtils.degToRad(w.angle);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
async function
|
|
360
|
-
const i = new
|
|
359
|
+
async function rn() {
|
|
360
|
+
const i = new ae();
|
|
361
361
|
i.setMessage(`
|
|
362
362
|
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), i.setKeyWords("[\u5706\u5FC3(C)]");
|
|
363
|
-
let o = new
|
|
364
|
-
o.closed = !1,
|
|
363
|
+
let o = new ze();
|
|
364
|
+
o.closed = !1, U.use(o);
|
|
365
365
|
let r, f, l;
|
|
366
366
|
const A = Q(
|
|
367
367
|
i,
|
|
368
368
|
() => {
|
|
369
369
|
r = i.value(), i.setMessage(`
|
|
370
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), i.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), i.setUserDraw((
|
|
371
|
-
|
|
370
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), i.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), i.setUserDraw((P, v) => {
|
|
371
|
+
v.drawLine(r, P);
|
|
372
372
|
}), M();
|
|
373
373
|
},
|
|
374
374
|
() => {
|
|
375
375
|
if (i.isKeyWordPicked("C")) {
|
|
376
|
-
const
|
|
377
|
-
o.center = i.value(),
|
|
376
|
+
const P = new Fe();
|
|
377
|
+
o.center = i.value(), P.center = i.value(), i.setMessage(`
|
|
378
378
|
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3:`), i.setKeyWords(""), h();
|
|
379
379
|
} else
|
|
380
380
|
return !0;
|
|
@@ -384,9 +384,9 @@ async function tn() {
|
|
|
384
384
|
const h = Q(
|
|
385
385
|
i,
|
|
386
386
|
() => {
|
|
387
|
-
p = i.value(), l = new
|
|
388
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), i.setUserDraw((
|
|
389
|
-
|
|
387
|
+
p = i.value(), l = new Fe(), l.closed = !1, U.use(l), l.center = p, o.center = p, i.setMessage(`
|
|
388
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), i.setUserDraw((P, v) => {
|
|
389
|
+
v.drawCustomEntity(l), v.drawLine(p, P);
|
|
390
390
|
}), x();
|
|
391
391
|
},
|
|
392
392
|
() => {
|
|
@@ -399,40 +399,40 @@ async function tn() {
|
|
|
399
399
|
w = i.value(), l.endPoint = w, i.setMessage(
|
|
400
400
|
`
|
|
401
401
|
\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u89D2\u5EA6(A)/\u5F26\u957F(L)/\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
402
|
-
), i.setKeyWords("A L R"), E = new
|
|
403
|
-
l.startPoint =
|
|
404
|
-
}),
|
|
402
|
+
), i.setKeyWords("A L R"), E = new We(), E.setDashLineDisplay(!0), E.setDashArray(0.05), E.setLineWidth(2), E.setColor("#ffd30d"), E.pt1 = l.center, i.setUserDraw((P, v) => {
|
|
403
|
+
l.startPoint = P, E.pt2 = P, v.drawCustomEntity(l), v.drawCustomEntity(E);
|
|
404
|
+
}), W();
|
|
405
405
|
},
|
|
406
406
|
() => {
|
|
407
407
|
}
|
|
408
408
|
);
|
|
409
409
|
let D;
|
|
410
|
-
const
|
|
410
|
+
const W = Q(
|
|
411
411
|
i,
|
|
412
412
|
() => {
|
|
413
|
-
D = i.value(), l.startPoint = D, l.endPoint = w,
|
|
413
|
+
D = i.value(), l.startPoint = D, l.endPoint = w, I.getCurrentDraw().addMxEntity(l);
|
|
414
414
|
},
|
|
415
415
|
() => {
|
|
416
416
|
if (i.isKeyWordPicked("A"))
|
|
417
417
|
return i.setMessage(
|
|
418
418
|
`
|
|
419
419
|
\u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
420
|
-
), i.setKeyWords("R"), i.setUserDraw((
|
|
421
|
-
l.startPoint =
|
|
420
|
+
), i.setKeyWords("R"), i.setUserDraw((P, v) => {
|
|
421
|
+
l.startPoint = P, v.drawCustomEntity(l), v.drawCustomEntity(E);
|
|
422
422
|
}), !0;
|
|
423
423
|
if (i.isKeyWordPicked("L"))
|
|
424
424
|
return i.setMessage(
|
|
425
425
|
`
|
|
426
426
|
\u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
427
|
-
), i.setKeyWords("R"), i.setUserDraw((
|
|
428
|
-
l.startPoint =
|
|
427
|
+
), i.setKeyWords("R"), i.setUserDraw((P, v) => {
|
|
428
|
+
l.startPoint = P, v.drawCustomEntity(l), v.drawCustomEntity(E);
|
|
429
429
|
}), !0;
|
|
430
430
|
if (i.isKeyWordPicked("R"))
|
|
431
431
|
i.setMessage(
|
|
432
432
|
`
|
|
433
433
|
\u6307\u5B9A\u5706\u5F27\u7684\u534A\u5F84${l.radius ? "<" + l.radius + ">" : ""}:`
|
|
434
|
-
), i.setKeyWords(""), i.setUserDraw((
|
|
435
|
-
|
|
434
|
+
), i.setKeyWords(""), i.setUserDraw((P, v) => {
|
|
435
|
+
v.drawLine(P, l.center), l.startPoint = P, v.drawCustomEntity(l);
|
|
436
436
|
}), x();
|
|
437
437
|
else
|
|
438
438
|
return !0;
|
|
@@ -443,28 +443,28 @@ async function tn() {
|
|
|
443
443
|
i,
|
|
444
444
|
() => {
|
|
445
445
|
_ = i.value(), i.setMessage(`
|
|
446
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), f = new
|
|
447
|
-
f.point2 =
|
|
448
|
-
}),
|
|
446
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), f = new Xt(), f.autoClockwise = !0, f.closed = !1, U.use(f), f.point1 = r, f.point3 = _, o.center, i.setUserDraw((P, v) => {
|
|
447
|
+
f.point2 = P, v.drawCustomEntity(o);
|
|
448
|
+
}), R();
|
|
449
449
|
},
|
|
450
450
|
() => {
|
|
451
451
|
if (i.isKeyWordPicked("C"))
|
|
452
|
-
l = new
|
|
453
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((
|
|
454
|
-
l.startPoint = r,
|
|
452
|
+
l = new Fe(), l.closed = !1, U.use(l), i.setMessage(`
|
|
453
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((P, v) => {
|
|
454
|
+
l.startPoint = r, v.drawLine(P, l.startPoint);
|
|
455
455
|
}), h();
|
|
456
456
|
else if (i.isKeyWordPicked("E"))
|
|
457
|
-
l = new
|
|
458
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((
|
|
459
|
-
l.startPoint = r,
|
|
457
|
+
l = new Fe(), l.closed = !1, U.use(l), i.setMessage(`
|
|
458
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((P, v) => {
|
|
459
|
+
l.startPoint = r, v.drawLine(P, l.startPoint);
|
|
460
460
|
}), h();
|
|
461
461
|
else
|
|
462
462
|
return !0;
|
|
463
463
|
}
|
|
464
|
-
),
|
|
464
|
+
), R = Q(
|
|
465
465
|
i,
|
|
466
466
|
() => {
|
|
467
|
-
f.point1 = r, f.point2 = i.value(), f.point3 = _,
|
|
467
|
+
f.point1 = r, f.point2 = i.value(), f.point3 = _, I.getCurrentDraw().addMxEntity(f);
|
|
468
468
|
},
|
|
469
469
|
() => {
|
|
470
470
|
if (i.isKeyWordPicked("C"))
|
|
@@ -477,9 +477,9 @@ async function tn() {
|
|
|
477
477
|
);
|
|
478
478
|
A();
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
const i = new
|
|
482
|
-
o.closed = !1,
|
|
480
|
+
function un() {
|
|
481
|
+
const i = new ae(), o = new $t();
|
|
482
|
+
o.closed = !1, U.use(o), i.setMessage(`
|
|
483
483
|
\u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9`), i.setKeyWords("[\u4E2D\u5FC3\u70B9(C)]");
|
|
484
484
|
let r, f = new THREE.Vector3();
|
|
485
485
|
Q(
|
|
@@ -527,13 +527,13 @@ function nn() {
|
|
|
527
527
|
), w = Q(
|
|
528
528
|
i,
|
|
529
529
|
() => {
|
|
530
|
-
|
|
530
|
+
I.getCurrentDraw().addMxEntity(o);
|
|
531
531
|
},
|
|
532
532
|
() => {
|
|
533
533
|
}
|
|
534
534
|
);
|
|
535
535
|
}
|
|
536
|
-
var
|
|
536
|
+
var Re = (() => {
|
|
537
537
|
var i = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
|
|
538
538
|
return typeof __filename < "u" && (i = i || __filename), function(o) {
|
|
539
539
|
o = o || {};
|
|
@@ -543,14 +543,14 @@ var Fe = (() => {
|
|
|
543
543
|
r.ready = new Promise(function(e, t) {
|
|
544
544
|
f = e, l = t;
|
|
545
545
|
});
|
|
546
|
-
var A = Object.assign({}, r), p = typeof window == "object", h = typeof importScripts == "function", w = "", E, x, D,
|
|
546
|
+
var A = Object.assign({}, r), p = typeof window == "object", h = typeof importScripts == "function", w = "", E, x, D, W, _, M;
|
|
547
547
|
typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" ? (w = h ? require("path").dirname(w) + "/" : __dirname + "/", M = () => {
|
|
548
|
-
_ || (
|
|
548
|
+
_ || (W = require("fs"), _ = require("path"));
|
|
549
549
|
}, E = function(e, t) {
|
|
550
|
-
return M(), e = _.normalize(e),
|
|
550
|
+
return M(), e = _.normalize(e), W.readFileSync(e, t ? void 0 : "utf8");
|
|
551
551
|
}, D = (e) => (e = E(e, !0), e.buffer || (e = new Uint8Array(e)), e), x = (e, t, n) => {
|
|
552
|
-
M(), e = _.normalize(e),
|
|
553
|
-
|
|
552
|
+
M(), e = _.normalize(e), W.readFile(e, function(u, s) {
|
|
553
|
+
u ? n(u) : t(s.buffer);
|
|
554
554
|
});
|
|
555
555
|
}, 1 < process.argv.length && process.argv[1].replace(/\\/g, "/"), process.argv.slice(2), process.on("uncaughtException", function(e) {
|
|
556
556
|
throw e;
|
|
@@ -565,48 +565,48 @@ var Fe = (() => {
|
|
|
565
565
|
var t = new XMLHttpRequest();
|
|
566
566
|
return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response);
|
|
567
567
|
}), x = (e, t, n) => {
|
|
568
|
-
var
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
},
|
|
568
|
+
var u = new XMLHttpRequest();
|
|
569
|
+
u.open("GET", e, !0), u.responseType = "arraybuffer", u.onload = () => {
|
|
570
|
+
u.status == 200 || u.status == 0 && u.response ? t(u.response) : n();
|
|
571
|
+
}, u.onerror = n, u.send(null);
|
|
572
572
|
});
|
|
573
|
-
var
|
|
573
|
+
var R = r.print || console.log.bind(console), P = r.printErr || console.warn.bind(console);
|
|
574
574
|
Object.assign(r, A), A = null;
|
|
575
|
-
function
|
|
576
|
-
|
|
575
|
+
function v(e) {
|
|
576
|
+
L || (L = {}), L[e] || (L[e] = 1, P(e));
|
|
577
577
|
}
|
|
578
|
-
var
|
|
579
|
-
r.wasmBinary && (
|
|
580
|
-
var
|
|
578
|
+
var L, j;
|
|
579
|
+
r.wasmBinary && (j = r.wasmBinary), r.noExitRuntime, typeof WebAssembly != "object" && ue("no native wasm support detected");
|
|
580
|
+
var q, N = !1, z = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
|
|
581
581
|
function G(e, t, n) {
|
|
582
|
-
var
|
|
583
|
-
for (n = t; e[n] && !(n >=
|
|
582
|
+
var u = t + n;
|
|
583
|
+
for (n = t; e[n] && !(n >= u); )
|
|
584
584
|
++n;
|
|
585
585
|
if (16 < n - t && e.buffer && z)
|
|
586
586
|
return z.decode(e.subarray(t, n));
|
|
587
|
-
for (
|
|
588
|
-
var
|
|
589
|
-
if (
|
|
587
|
+
for (u = ""; t < n; ) {
|
|
588
|
+
var s = e[t++];
|
|
589
|
+
if (s & 128) {
|
|
590
590
|
var a = e[t++] & 63;
|
|
591
|
-
if ((
|
|
592
|
-
|
|
591
|
+
if ((s & 224) == 192)
|
|
592
|
+
u += String.fromCharCode((s & 31) << 6 | a);
|
|
593
593
|
else {
|
|
594
594
|
var c = e[t++] & 63;
|
|
595
|
-
|
|
595
|
+
s = (s & 240) == 224 ? (s & 15) << 12 | a << 6 | c : (s & 7) << 18 | a << 12 | c << 6 | e[t++] & 63, 65536 > s ? u += String.fromCharCode(s) : (s -= 65536, u += String.fromCharCode(55296 | s >> 10, 56320 | s & 1023));
|
|
596
596
|
}
|
|
597
597
|
} else
|
|
598
|
-
|
|
598
|
+
u += String.fromCharCode(s);
|
|
599
599
|
}
|
|
600
|
-
return
|
|
600
|
+
return u;
|
|
601
601
|
}
|
|
602
602
|
function V(e, t) {
|
|
603
603
|
return e ? G(ee, e, t) : "";
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
if (!(0 <
|
|
605
|
+
function ye(e, t, n, u) {
|
|
606
|
+
if (!(0 < u))
|
|
607
607
|
return 0;
|
|
608
|
-
var
|
|
609
|
-
|
|
608
|
+
var s = n;
|
|
609
|
+
u = n + u - 1;
|
|
610
610
|
for (var a = 0; a < e.length; ++a) {
|
|
611
611
|
var c = e.charCodeAt(a);
|
|
612
612
|
if (55296 <= c && 57343 >= c) {
|
|
@@ -614,21 +614,21 @@ var Fe = (() => {
|
|
|
614
614
|
c = 65536 + ((c & 1023) << 10) | y & 1023;
|
|
615
615
|
}
|
|
616
616
|
if (127 >= c) {
|
|
617
|
-
if (n >=
|
|
617
|
+
if (n >= u)
|
|
618
618
|
break;
|
|
619
619
|
t[n++] = c;
|
|
620
620
|
} else {
|
|
621
621
|
if (2047 >= c) {
|
|
622
|
-
if (n + 1 >=
|
|
622
|
+
if (n + 1 >= u)
|
|
623
623
|
break;
|
|
624
624
|
t[n++] = 192 | c >> 6;
|
|
625
625
|
} else {
|
|
626
626
|
if (65535 >= c) {
|
|
627
|
-
if (n + 2 >=
|
|
627
|
+
if (n + 2 >= u)
|
|
628
628
|
break;
|
|
629
629
|
t[n++] = 224 | c >> 12;
|
|
630
630
|
} else {
|
|
631
|
-
if (n + 3 >=
|
|
631
|
+
if (n + 3 >= u)
|
|
632
632
|
break;
|
|
633
633
|
t[n++] = 240 | c >> 18, t[n++] = 128 | c >> 12 & 63;
|
|
634
634
|
}
|
|
@@ -637,52 +637,52 @@ var Fe = (() => {
|
|
|
637
637
|
t[n++] = 128 | c & 63;
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
return t[n] = 0, n -
|
|
640
|
+
return t[n] = 0, n - s;
|
|
641
641
|
}
|
|
642
|
-
var
|
|
643
|
-
function
|
|
644
|
-
var e =
|
|
645
|
-
|
|
642
|
+
var he, K, ee, C, Ee, Ae;
|
|
643
|
+
function Ge() {
|
|
644
|
+
var e = q.buffer;
|
|
645
|
+
he = e, r.HEAP8 = K = new Int8Array(e), r.HEAP16 = new Int16Array(e), r.HEAP32 = C = new Int32Array(e), r.HEAPU8 = ee = new Uint8Array(e), r.HEAPU16 = new Uint16Array(e), r.HEAPU32 = new Uint32Array(e), r.HEAPF32 = Ee = new Float32Array(e), r.HEAPF64 = Ae = new Float64Array(e);
|
|
646
646
|
}
|
|
647
|
-
var
|
|
648
|
-
function
|
|
647
|
+
var Xe, $e = [], Ye = [], Ze = [];
|
|
648
|
+
function kt() {
|
|
649
649
|
var e = r.preRun.shift();
|
|
650
|
-
|
|
650
|
+
$e.unshift(e);
|
|
651
651
|
}
|
|
652
|
-
var
|
|
652
|
+
var ce = 0, pe = null;
|
|
653
653
|
r.preloadedImages = {}, r.preloadedAudios = {};
|
|
654
|
-
function
|
|
655
|
-
throw r.onAbort && r.onAbort(e), e = "Aborted(" + e + ")",
|
|
654
|
+
function ue(e) {
|
|
655
|
+
throw r.onAbort && r.onAbort(e), e = "Aborted(" + e + ")", P(e), N = !0, e = new WebAssembly.RuntimeError(e + ". Build with -s ASSERTIONS=1 for more info."), l(e), e;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function Je() {
|
|
658
658
|
return $.startsWith("data:application/octet-stream;base64,");
|
|
659
659
|
}
|
|
660
660
|
var $;
|
|
661
|
-
if ($ = "mxdrawassembly_min.wasm", !
|
|
662
|
-
var
|
|
663
|
-
$ = r.locateFile ? r.locateFile(
|
|
661
|
+
if ($ = "mxdrawassembly_min.wasm", !Je()) {
|
|
662
|
+
var Qe = $;
|
|
663
|
+
$ = r.locateFile ? r.locateFile(Qe, w) : w + Qe;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Ue() {
|
|
666
666
|
var e = $;
|
|
667
667
|
try {
|
|
668
|
-
if (e == $ &&
|
|
669
|
-
return new Uint8Array(
|
|
668
|
+
if (e == $ && j)
|
|
669
|
+
return new Uint8Array(j);
|
|
670
670
|
if (D)
|
|
671
671
|
return D(e);
|
|
672
672
|
throw "both async and sync fetching of the wasm failed";
|
|
673
673
|
} catch (t) {
|
|
674
|
-
|
|
674
|
+
ue(t);
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
if (!
|
|
677
|
+
function Ft() {
|
|
678
|
+
if (!j && (p || h)) {
|
|
679
679
|
if (typeof fetch == "function" && !$.startsWith("file://"))
|
|
680
680
|
return fetch($, { credentials: "same-origin" }).then(function(e) {
|
|
681
681
|
if (!e.ok)
|
|
682
682
|
throw "failed to load wasm binary file at '" + $ + "'";
|
|
683
683
|
return e.arrayBuffer();
|
|
684
684
|
}).catch(function() {
|
|
685
|
-
return
|
|
685
|
+
return Ue();
|
|
686
686
|
});
|
|
687
687
|
if (x)
|
|
688
688
|
return new Promise(function(e, t) {
|
|
@@ -692,45 +692,45 @@ var Fe = (() => {
|
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
694
|
return Promise.resolve().then(function() {
|
|
695
|
-
return
|
|
695
|
+
return Ue();
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Te(e) {
|
|
699
699
|
for (; 0 < e.length; ) {
|
|
700
700
|
var t = e.shift();
|
|
701
701
|
if (typeof t == "function")
|
|
702
702
|
t(r);
|
|
703
703
|
else {
|
|
704
|
-
var n = t.
|
|
705
|
-
typeof n == "number" ? t.
|
|
704
|
+
var n = t.Ia;
|
|
705
|
+
typeof n == "number" ? t.ia === void 0 ? qe(n)() : qe(n)(t.ia) : n(t.ia === void 0 ? null : t.ia);
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
var
|
|
709
|
+
var ge = [];
|
|
710
710
|
function qe(e) {
|
|
711
|
-
var t =
|
|
712
|
-
return t || (e >=
|
|
711
|
+
var t = ge[e];
|
|
712
|
+
return t || (e >= ge.length && (ge.length = e + 1), ge[e] = t = Xe.get(e)), t;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function et(e, t) {
|
|
715
715
|
if (0 >= e)
|
|
716
716
|
return e;
|
|
717
717
|
var n = 32 >= t ? Math.abs(1 << t - 1) : Math.pow(2, t - 1);
|
|
718
718
|
return e >= n && (32 >= t || e > n) && (e = -2 * n + e), e;
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function tt(e, t) {
|
|
721
721
|
return 0 <= e ? e : 32 >= t ? 2 * Math.abs(1 << t - 1) + e : Math.pow(2, t) + e;
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function Wt(e, t) {
|
|
724
724
|
function n(Y) {
|
|
725
|
-
var je =
|
|
726
|
-
return (Y === "double" || Y === "i64") && je & 7 && (je += 4),
|
|
725
|
+
var je = u;
|
|
726
|
+
return (Y === "double" || Y === "i64") && je & 7 && (je += 4), u = je, Y === "double" ? (Y = Number(Ae[u >> 3]), u += 8) : Y == "i64" ? (Y = [C[u >> 2], C[u + 4 >> 2]], u += 8) : (Y = C[u >> 2], u += 4), Y;
|
|
727
727
|
}
|
|
728
|
-
for (var
|
|
728
|
+
for (var u = t, s = [], a, c; ; ) {
|
|
729
729
|
var y = e;
|
|
730
|
-
if (a =
|
|
730
|
+
if (a = K[e >> 0], a === 0)
|
|
731
731
|
break;
|
|
732
|
-
if (c =
|
|
733
|
-
var B = !1, m = t = !1, k = !1,
|
|
732
|
+
if (c = K[e + 1 >> 0], a == 37) {
|
|
733
|
+
var B = !1, m = t = !1, k = !1, ie = !1;
|
|
734
734
|
e:
|
|
735
735
|
for (; ; ) {
|
|
736
736
|
switch (c) {
|
|
@@ -749,38 +749,38 @@ var Fe = (() => {
|
|
|
749
749
|
k = !0;
|
|
750
750
|
break;
|
|
751
751
|
case 32:
|
|
752
|
-
|
|
752
|
+
ie = !0;
|
|
753
753
|
break;
|
|
754
754
|
default:
|
|
755
755
|
break e;
|
|
756
756
|
}
|
|
757
|
-
e++, c =
|
|
757
|
+
e++, c = K[e + 1 >> 0];
|
|
758
758
|
}
|
|
759
759
|
var H = 0;
|
|
760
760
|
if (c == 42)
|
|
761
|
-
H = n("i32"), e++, c =
|
|
761
|
+
H = n("i32"), e++, c = K[e + 1 >> 0];
|
|
762
762
|
else
|
|
763
763
|
for (; 48 <= c && 57 >= c; )
|
|
764
|
-
H = 10 * H + (c - 48), e++, c =
|
|
765
|
-
var
|
|
764
|
+
H = 10 * H + (c - 48), e++, c = K[e + 1 >> 0];
|
|
765
|
+
var O = !1, S = -1;
|
|
766
766
|
if (c == 46) {
|
|
767
|
-
if (
|
|
768
|
-
|
|
767
|
+
if (S = 0, O = !0, e++, c = K[e + 1 >> 0], c == 42)
|
|
768
|
+
S = n("i32"), e++;
|
|
769
769
|
else
|
|
770
|
-
for (; c =
|
|
771
|
-
|
|
772
|
-
c =
|
|
770
|
+
for (; c = K[e + 1 >> 0], !(48 > c || 57 < c); )
|
|
771
|
+
S = 10 * S + (c - 48), e++;
|
|
772
|
+
c = K[e + 1 >> 0];
|
|
773
773
|
}
|
|
774
|
-
switch (0 >
|
|
774
|
+
switch (0 > S && (S = 6, O = !1), String.fromCharCode(c)) {
|
|
775
775
|
case "h":
|
|
776
|
-
if (c =
|
|
776
|
+
if (c = K[e + 2 >> 0], c == 104) {
|
|
777
777
|
e++;
|
|
778
778
|
var F = 1;
|
|
779
779
|
} else
|
|
780
780
|
F = 2;
|
|
781
781
|
break;
|
|
782
782
|
case "l":
|
|
783
|
-
c =
|
|
783
|
+
c = K[e + 2 >> 0], c == 108 ? (e++, F = 8) : F = 4;
|
|
784
784
|
break;
|
|
785
785
|
case "L":
|
|
786
786
|
case "q":
|
|
@@ -795,7 +795,7 @@ var Fe = (() => {
|
|
|
795
795
|
default:
|
|
796
796
|
F = null;
|
|
797
797
|
}
|
|
798
|
-
switch (F && e++, c =
|
|
798
|
+
switch (F && e++, c = K[e + 1 >> 0], String.fromCharCode(c)) {
|
|
799
799
|
case "d":
|
|
800
800
|
case "i":
|
|
801
801
|
case "u":
|
|
@@ -803,12 +803,12 @@ var Fe = (() => {
|
|
|
803
803
|
case "x":
|
|
804
804
|
case "X":
|
|
805
805
|
case "p":
|
|
806
|
-
y = c == 100 || c == 105, F = F || 4, a = n("i" + 8 * F), F == 8 && (a = c == 117 ? (a[0] >>> 0) + 4294967296 * (a[1] >>> 0) : (a[0] >>> 0) + 4294967296 * a[1]), 4 >= F && (a = (y ?
|
|
806
|
+
y = c == 100 || c == 105, F = F || 4, a = n("i" + 8 * F), F == 8 && (a = c == 117 ? (a[0] >>> 0) + 4294967296 * (a[1] >>> 0) : (a[0] >>> 0) + 4294967296 * a[1]), 4 >= F && (a = (y ? et : tt)(a & Math.pow(256, F) - 1, 8 * F));
|
|
807
807
|
var oe = Math.abs(a);
|
|
808
808
|
if (y = "", c == 100 || c == 105)
|
|
809
|
-
var g =
|
|
809
|
+
var g = et(a, 8 * F).toString(10);
|
|
810
810
|
else if (c == 117)
|
|
811
|
-
g =
|
|
811
|
+
g = tt(a, 8 * F).toString(10), a = Math.abs(a);
|
|
812
812
|
else if (c == 111)
|
|
813
813
|
g = (m ? "0" : "") + oe.toString(8);
|
|
814
814
|
else if (c == 120 || c == 88) {
|
|
@@ -822,13 +822,13 @@ var Fe = (() => {
|
|
|
822
822
|
c == 88 && (y = y.toUpperCase(), g = g.toUpperCase());
|
|
823
823
|
} else
|
|
824
824
|
c == 112 && (oe === 0 ? g = "(nil)" : (y = "0x", g = oe.toString(16)));
|
|
825
|
-
if (
|
|
826
|
-
for (; g.length <
|
|
825
|
+
if (O)
|
|
826
|
+
for (; g.length < S; )
|
|
827
827
|
g = "0" + g;
|
|
828
|
-
for (0 <= a && (B ? y = "+" + y :
|
|
828
|
+
for (0 <= a && (B ? y = "+" + y : ie && (y = " " + y)), g.charAt(0) == "-" && (y = "-" + y, g = g.substr(1)); y.length + g.length < H; )
|
|
829
829
|
t ? g += " " : k ? g = "0" + g : y = " " + y;
|
|
830
830
|
g = y + g, g.split("").forEach(function(Y) {
|
|
831
|
-
|
|
831
|
+
s.push(Y.charCodeAt(0));
|
|
832
832
|
});
|
|
833
833
|
break;
|
|
834
834
|
case "f":
|
|
@@ -840,76 +840,76 @@ var Fe = (() => {
|
|
|
840
840
|
if (a = n("double"), isNaN(a))
|
|
841
841
|
g = "nan", k = !1;
|
|
842
842
|
else if (isFinite(a)) {
|
|
843
|
-
if (
|
|
843
|
+
if (O = !1, F = Math.min(S, 20), (c == 103 || c == 71) && (O = !0, S = S || 1, F = parseInt(a.toExponential(F).split("e")[1], 10), S > F && -4 <= F ? (c = (c == 103 ? "f" : "F").charCodeAt(0), S -= F + 1) : (c = (c == 103 ? "e" : "E").charCodeAt(0), S--), F = Math.min(S, 20)), c == 101 || c == 69 ? (g = a.toExponential(F), /[eE][-+]\d$/.test(g) && (g = g.slice(0, -1) + "0" + g.slice(-1))) : (c == 102 || c == 70) && (g = a.toFixed(F), a === 0 && (0 > a || a === 0 && 1 / a === -1 / 0) && (g = "-" + g)), y = g.split("e"), O && !m)
|
|
844
844
|
for (; 1 < y[0].length && y[0].includes(".") && (y[0].slice(-1) == "0" || y[0].slice(-1) == "."); )
|
|
845
845
|
y[0] = y[0].slice(0, -1);
|
|
846
846
|
else
|
|
847
|
-
for (m && g.indexOf(".") == -1 && (y[0] += ".");
|
|
847
|
+
for (m && g.indexOf(".") == -1 && (y[0] += "."); S > F++; )
|
|
848
848
|
y[0] += "0";
|
|
849
|
-
g = y[0] + (1 < y.length ? "e" + y[1] : ""), c == 69 && (g = g.toUpperCase()), 0 <= a && (B ? g = "+" + g :
|
|
849
|
+
g = y[0] + (1 < y.length ? "e" + y[1] : ""), c == 69 && (g = g.toUpperCase()), 0 <= a && (B ? g = "+" + g : ie && (g = " " + g));
|
|
850
850
|
} else
|
|
851
851
|
g = (0 > a ? "-" : "") + "inf", k = !1;
|
|
852
852
|
for (; g.length < H; )
|
|
853
853
|
g = t ? g + " " : !k || g[0] != "-" && g[0] != "+" ? (k ? "0" : " ") + g : g[0] + "0" + g.slice(1);
|
|
854
854
|
97 > c && (g = g.toUpperCase()), g.split("").forEach(function(Y) {
|
|
855
|
-
|
|
855
|
+
s.push(Y.charCodeAt(0));
|
|
856
856
|
});
|
|
857
857
|
break;
|
|
858
858
|
case "s":
|
|
859
|
-
if (k = (B = n("i8*")) ?
|
|
859
|
+
if (k = (B = n("i8*")) ? Et(B) : 6, O && (k = Math.min(k, S)), !t)
|
|
860
860
|
for (; k < H--; )
|
|
861
|
-
|
|
861
|
+
s.push(32);
|
|
862
862
|
if (B)
|
|
863
863
|
for (m = 0; m < k; m++)
|
|
864
|
-
|
|
864
|
+
s.push(ee[B++ >> 0]);
|
|
865
865
|
else
|
|
866
|
-
|
|
866
|
+
s = s.concat(at(
|
|
867
867
|
"(null)".substr(0, k),
|
|
868
868
|
!0
|
|
869
869
|
));
|
|
870
870
|
if (t)
|
|
871
871
|
for (; k < H--; )
|
|
872
|
-
|
|
872
|
+
s.push(32);
|
|
873
873
|
break;
|
|
874
874
|
case "c":
|
|
875
|
-
for (t &&
|
|
876
|
-
|
|
877
|
-
t ||
|
|
875
|
+
for (t && s.push(n("i8")); 0 < --H; )
|
|
876
|
+
s.push(32);
|
|
877
|
+
t || s.push(n("i8"));
|
|
878
878
|
break;
|
|
879
879
|
case "n":
|
|
880
|
-
t = n("i32*"), C[t >> 2] =
|
|
880
|
+
t = n("i32*"), C[t >> 2] = s.length;
|
|
881
881
|
break;
|
|
882
882
|
case "%":
|
|
883
|
-
|
|
883
|
+
s.push(a);
|
|
884
884
|
break;
|
|
885
885
|
default:
|
|
886
886
|
for (m = y; m < e + 2; m++)
|
|
887
|
-
|
|
887
|
+
s.push(K[m >> 0]);
|
|
888
888
|
}
|
|
889
889
|
e += 2;
|
|
890
890
|
} else
|
|
891
|
-
|
|
891
|
+
s.push(a), e += 1;
|
|
892
892
|
}
|
|
893
|
-
return
|
|
893
|
+
return s;
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Se(e) {
|
|
896
896
|
if (!e || !e.callee || !e.callee.name)
|
|
897
897
|
return [null, "", ""];
|
|
898
|
-
var t = e.callee.name, n = "(",
|
|
899
|
-
for (
|
|
900
|
-
var a = e[
|
|
901
|
-
|
|
898
|
+
var t = e.callee.name, n = "(", u = !0, s;
|
|
899
|
+
for (s in e) {
|
|
900
|
+
var a = e[s];
|
|
901
|
+
u || (n += ", "), u = !1, n = typeof a == "number" || typeof a == "string" ? n + a : n + ("(" + typeof a + ")");
|
|
902
902
|
}
|
|
903
|
-
return n += ")", e = (e = e.callee.caller) ? e.arguments : [],
|
|
903
|
+
return n += ")", e = (e = e.callee.caller) ? e.arguments : [], u && (n = ""), [e, t, n];
|
|
904
904
|
}
|
|
905
|
-
function
|
|
905
|
+
function Rt(e) {
|
|
906
906
|
e: {
|
|
907
907
|
var t = Error();
|
|
908
908
|
if (!t.stack) {
|
|
909
909
|
try {
|
|
910
910
|
throw Error();
|
|
911
|
-
} catch (
|
|
912
|
-
t =
|
|
911
|
+
} catch (S) {
|
|
912
|
+
t = S;
|
|
913
913
|
}
|
|
914
914
|
if (!t.stack) {
|
|
915
915
|
t = "(no stack trace available)";
|
|
@@ -919,23 +919,23 @@ var Fe = (() => {
|
|
|
919
919
|
t = t.stack.toString();
|
|
920
920
|
}
|
|
921
921
|
t = t.slice(t.indexOf(`
|
|
922
|
-
`, Math.max(t.lastIndexOf("_emscripten_log"), t.lastIndexOf("_emscripten_get_callstack"))) + 1), e & 32 &&
|
|
922
|
+
`, Math.max(t.lastIndexOf("_emscripten_log"), t.lastIndexOf("_emscripten_get_callstack"))) + 1), e & 32 && v("EM_LOG_DEMANGLE is deprecated; ignoring"), e & 8 && typeof emscripten_source_map > "u" && (v('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), e = e ^ 8 | 16);
|
|
923
923
|
var n = null;
|
|
924
924
|
if (e & 128)
|
|
925
|
-
for (n =
|
|
926
|
-
n =
|
|
927
|
-
var
|
|
925
|
+
for (n = Se(arguments); n[1].includes("_emscripten_"); )
|
|
926
|
+
n = Se(n[0]);
|
|
927
|
+
var u = t.split(`
|
|
928
928
|
`);
|
|
929
929
|
t = "";
|
|
930
|
-
var
|
|
931
|
-
for (y in
|
|
932
|
-
var B =
|
|
930
|
+
var s = RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"), a = RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"), c = RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)"), y;
|
|
931
|
+
for (y in u) {
|
|
932
|
+
var B = u[y], m;
|
|
933
933
|
if ((m = c.exec(B)) && m.length == 5) {
|
|
934
934
|
B = m[1];
|
|
935
|
-
var k = m[2],
|
|
935
|
+
var k = m[2], ie = m[3];
|
|
936
936
|
m = m[4];
|
|
937
|
-
} else if ((m =
|
|
938
|
-
B = m[1], k = m[2],
|
|
937
|
+
} else if ((m = s.exec(B)) || (m = a.exec(B)), m && 4 <= m.length)
|
|
938
|
+
B = m[1], k = m[2], ie = m[3], m = m[4] | 0;
|
|
939
939
|
else {
|
|
940
940
|
t += B + `
|
|
941
941
|
`;
|
|
@@ -943,30 +943,30 @@ var Fe = (() => {
|
|
|
943
943
|
}
|
|
944
944
|
var H = !1;
|
|
945
945
|
if (e & 8) {
|
|
946
|
-
var
|
|
947
|
-
line:
|
|
948
|
-
|
|
946
|
+
var O = emscripten_source_map.Na({
|
|
947
|
+
line: ie,
|
|
948
|
+
Aa: m
|
|
949
949
|
});
|
|
950
|
-
(H =
|
|
950
|
+
(H = O && O.source) && (e & 64 && (O.source = O.source.substring(O.source.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += " at " + B + " (" + O.source + ":" + O.line + ":" + O.Aa + `)
|
|
951
951
|
`);
|
|
952
952
|
}
|
|
953
|
-
(e & 16 || !H) && (e & 64 && (k = k.substring(k.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += (H ? " = " + B : " at " + B) + " (" + k + ":" +
|
|
953
|
+
(e & 16 || !H) && (e & 64 && (k = k.substring(k.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += (H ? " = " + B : " at " + B) + " (" + k + ":" + ie + ":" + m + `)
|
|
954
954
|
`), e & 128 && n[0] && (n[1] == B && 0 < n[2].length && (t = t.replace(/\s+$/, ""), t += " with values: " + n[1] + n[2] + `
|
|
955
|
-
`), n =
|
|
955
|
+
`), n = Se(n[0]));
|
|
956
956
|
}
|
|
957
957
|
return t = t.replace(/\s+$/, "");
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function bt(e) {
|
|
960
960
|
var t = e.getExtension("ANGLE_instanced_arrays");
|
|
961
|
-
t && (e.vertexAttribDivisor = function(n,
|
|
962
|
-
t.vertexAttribDivisorANGLE(n,
|
|
963
|
-
}, e.drawArraysInstanced = function(n,
|
|
964
|
-
t.drawArraysInstancedANGLE(n,
|
|
965
|
-
}, e.drawElementsInstanced = function(n,
|
|
966
|
-
t.drawElementsInstancedANGLE(n,
|
|
961
|
+
t && (e.vertexAttribDivisor = function(n, u) {
|
|
962
|
+
t.vertexAttribDivisorANGLE(n, u);
|
|
963
|
+
}, e.drawArraysInstanced = function(n, u, s, a) {
|
|
964
|
+
t.drawArraysInstancedANGLE(n, u, s, a);
|
|
965
|
+
}, e.drawElementsInstanced = function(n, u, s, a, c) {
|
|
966
|
+
t.drawElementsInstancedANGLE(n, u, s, a, c);
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function Tt(e) {
|
|
970
970
|
var t = e.getExtension("OES_vertex_array_object");
|
|
971
971
|
t && (e.createVertexArray = function() {
|
|
972
972
|
return t.createVertexArrayOES();
|
|
@@ -978,401 +978,387 @@ var Fe = (() => {
|
|
|
978
978
|
return t.isVertexArrayOES(n);
|
|
979
979
|
});
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function St(e) {
|
|
982
982
|
var t = e.getExtension("WEBGL_draw_buffers");
|
|
983
|
-
t && (e.drawBuffers = function(n,
|
|
984
|
-
t.drawBuffersWEBGL(n,
|
|
983
|
+
t && (e.drawBuffers = function(n, u) {
|
|
984
|
+
t.drawBuffersWEBGL(n, u);
|
|
985
985
|
});
|
|
986
986
|
}
|
|
987
|
-
var
|
|
988
|
-
function
|
|
989
|
-
|
|
987
|
+
var nt = 1, le = [], te = [], ne = [], rt = [], re = [], it = [1, 1, 2, 2, 4, 4, 4, 2, 3, 4, 8];
|
|
988
|
+
function fe(e) {
|
|
989
|
+
_e || (_e = e);
|
|
990
990
|
}
|
|
991
|
-
function
|
|
992
|
-
for (var t =
|
|
991
|
+
function we(e) {
|
|
992
|
+
for (var t = nt++, n = e.length; n < t; n++)
|
|
993
993
|
e[n] = null;
|
|
994
994
|
return t;
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Ie(e) {
|
|
997
997
|
return 32 - Math.clz32(e === 0 ? 0 : e - 1);
|
|
998
998
|
}
|
|
999
|
-
function
|
|
1000
|
-
e.
|
|
1001
|
-
return (
|
|
999
|
+
function It(e, t) {
|
|
1000
|
+
e.ka || (e.ka = e.getContext, e.getContext = function(u, s) {
|
|
1001
|
+
return (s = e.ka(u, s)) || (s = e.ka(u)), u == "webgl" == s instanceof WebGLRenderingContext ? s : null;
|
|
1002
1002
|
});
|
|
1003
|
-
var n = 1 < t.
|
|
1004
|
-
return n ?
|
|
1003
|
+
var n = 1 < t.sa ? e.getContext("webgl2", t) : e.getContext("webgl", t);
|
|
1004
|
+
return n ? Lt(n, t) : 0;
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1007
|
-
var n =
|
|
1008
|
-
for (e.canvas && (e.canvas.
|
|
1009
|
-
|
|
1010
|
-
for (e =
|
|
1011
|
-
|
|
1012
|
-
var
|
|
1013
|
-
|
|
1006
|
+
function Lt(e, t) {
|
|
1007
|
+
var n = we(re), u = { Ja: n, attributes: t, version: t.sa, V: e };
|
|
1008
|
+
for (e.canvas && (e.canvas.za = u), re[n] = u, (typeof t.ra > "u" || t.ra) && Kt(u), u.ta = u.V.getParameter(34921), u.aa = [], e = 0; e < u.ta; e++)
|
|
1009
|
+
u.aa[e] = { enabled: !1, ja: !1, size: 0, type: 0, ua: 0, la: 0, U: 0, ya: null };
|
|
1010
|
+
for (e = Ie(2097152), u.Y = [], u.va = [], u.Y.length = u.va.length = e + 1, u.ha = [], u.ma = [], u.ha.length = u.ma.length = e + 1, u.W = [], u.W.length = e + 1, t = 0; t <= e; ++t) {
|
|
1011
|
+
u.W[t] = null, u.Y[t] = u.va[t] = 0, u.ha[t] = [], u.ma[t] = [];
|
|
1012
|
+
var s = u.ha[t], a = u.ma[t];
|
|
1013
|
+
s.length = a.length = 64;
|
|
1014
1014
|
for (var c = 0; 64 > c; ++c)
|
|
1015
|
-
|
|
1015
|
+
s[c] = a[c] = null;
|
|
1016
1016
|
}
|
|
1017
1017
|
return n;
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1020
|
-
if (e || (e = b), !e.
|
|
1021
|
-
e.
|
|
1022
|
-
var t = e.
|
|
1023
|
-
|
|
1019
|
+
function Kt(e) {
|
|
1020
|
+
if (e || (e = b), !e.Da) {
|
|
1021
|
+
e.Da = !0;
|
|
1022
|
+
var t = e.V;
|
|
1023
|
+
bt(t), Tt(t), St(t), t.Fa = t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"), t.Ka = t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"), 2 <= e.version && (t.qa = t.getExtension("EXT_disjoint_timer_query_webgl2")), (2 > e.version || !t.qa) && (t.qa = t.getExtension("EXT_disjoint_timer_query")), t.Ma = t.getExtension("WEBGL_multi_draw"), (t.getSupportedExtensions() || []).forEach(function(n) {
|
|
1024
1024
|
n.includes("lose_context") || n.includes("debug") || t.getExtension(n);
|
|
1025
1025
|
});
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
|
-
var
|
|
1029
|
-
function
|
|
1028
|
+
var _e, b, Le, me = [], jt = {}, Ot = ["default", "low-power", "high-performance"], Vt = [0, typeof document < "u" ? document : 0, typeof window < "u" ? window : 0];
|
|
1029
|
+
function ut(e) {
|
|
1030
1030
|
return e.slice(-1) == "]" && e.lastIndexOf("[");
|
|
1031
1031
|
}
|
|
1032
1032
|
function st(e) {
|
|
1033
|
-
var t = d.
|
|
1033
|
+
var t = d.Ba;
|
|
1034
1034
|
if (t) {
|
|
1035
|
-
var n = t.
|
|
1036
|
-
return typeof n == "number" && (t.
|
|
1035
|
+
var n = t.Z[e];
|
|
1036
|
+
return typeof n == "number" && (t.Z[e] = n = d.getUniformLocation(t, t.wa[e] + (0 < n ? "[" + n + "]" : ""))), n;
|
|
1037
1037
|
}
|
|
1038
|
-
|
|
1038
|
+
fe(1282);
|
|
1039
1039
|
}
|
|
1040
|
-
for (var ot = [], d,
|
|
1041
|
-
ot[
|
|
1042
|
-
function
|
|
1043
|
-
for (var n = 0,
|
|
1044
|
-
var
|
|
1045
|
-
55296 <=
|
|
1040
|
+
for (var ot = [], d, Ht = new Float32Array(288), Pe = 0; 288 > Pe; ++Pe)
|
|
1041
|
+
ot[Pe] = Ht.subarray(0, Pe + 1);
|
|
1042
|
+
function at(e, t) {
|
|
1043
|
+
for (var n = 0, u = 0; u < e.length; ++u) {
|
|
1044
|
+
var s = e.charCodeAt(u);
|
|
1045
|
+
55296 <= s && 57343 >= s && (s = 65536 + ((s & 1023) << 10) | e.charCodeAt(++u) & 1023), 127 >= s ? ++n : n = 2047 >= s ? n + 2 : 65535 >= s ? n + 3 : n + 4;
|
|
1046
1046
|
}
|
|
1047
|
-
return n = Array(n + 1), e =
|
|
1047
|
+
return n = Array(n + 1), e = ye(e, n, 0, n.length), t && (n.length = e), n;
|
|
1048
1048
|
}
|
|
1049
|
-
var
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
ee.copyWithin(e, t, t + n);
|
|
1062
|
-
},
|
|
1063
|
-
p: function(e) {
|
|
1064
|
-
var t = ee.length;
|
|
1065
|
-
if (e >>>= 0, 2147483648 < e)
|
|
1066
|
-
return !1;
|
|
1067
|
-
for (var n = 1; 4 >= n; n *= 2) {
|
|
1068
|
-
var s = t * (1 + 0.2 / n);
|
|
1069
|
-
s = Math.min(s, e + 100663296);
|
|
1070
|
-
var u = Math;
|
|
1071
|
-
s = Math.max(e, s), u = u.min.call(u, 2147483648, s + (65536 - s % 65536) % 65536);
|
|
1072
|
-
e: {
|
|
1073
|
-
try {
|
|
1074
|
-
U.grow(u - ye.byteLength + 65535 >>> 16), ze();
|
|
1075
|
-
var a = 1;
|
|
1076
|
-
break e;
|
|
1077
|
-
} catch {
|
|
1078
|
-
}
|
|
1079
|
-
a = void 0;
|
|
1080
|
-
}
|
|
1081
|
-
if (a)
|
|
1082
|
-
return !0;
|
|
1083
|
-
}
|
|
1049
|
+
var Nt = { a: function(e, t, n, u) {
|
|
1050
|
+
ue("Assertion failed: " + V(e) + ", at: " + [t ? V(t) : "unknown filename", n, u ? V(u) : "unknown function"]);
|
|
1051
|
+
}, b: function() {
|
|
1052
|
+
ue("");
|
|
1053
|
+
}, c: function(e, t, n) {
|
|
1054
|
+
t = Wt(t, n), t = G(t, 0), e & 24 && (t = t.replace(/\s+$/, ""), t += (0 < t.length ? `
|
|
1055
|
+
` : "") + Rt(e)), e & 1 ? e & 4 ? console.error(t) : e & 2 ? console.warn(t) : e & 512 ? console.info(t) : e & 256 ? console.debug(t) : console.log(t) : e & 6 ? P(t) : R(t);
|
|
1056
|
+
}, q: function(e, t, n) {
|
|
1057
|
+
ee.copyWithin(e, t, t + n);
|
|
1058
|
+
}, p: function(e) {
|
|
1059
|
+
var t = ee.length;
|
|
1060
|
+
if (e >>>= 0, 2147483648 < e)
|
|
1084
1061
|
return !1;
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
d: function(e, t) {
|
|
1099
|
-
e == 34962 ? d.$ = t : e == 34963 && (d.aa = t), e == 35051 ? d.na = t : e == 35052 && (d.oa = t), d.bindBuffer(e, ce[t]);
|
|
1100
|
-
},
|
|
1101
|
-
g: function(e, t, n, s) {
|
|
1102
|
-
2 <= b.version ? n ? d.bufferData(e, ee, s, n, t) : d.bufferData(e, t, s) : d.bufferData(e, n ? ee.subarray(n, n + t) : t, s);
|
|
1103
|
-
},
|
|
1104
|
-
z: function(e) {
|
|
1105
|
-
d.clear(e);
|
|
1106
|
-
},
|
|
1107
|
-
A: function(e, t, n, s) {
|
|
1108
|
-
d.clearColor(e, t, n, s);
|
|
1109
|
-
},
|
|
1110
|
-
r: function(e) {
|
|
1111
|
-
d.compileShader(ne[e]);
|
|
1112
|
-
},
|
|
1113
|
-
l: function() {
|
|
1114
|
-
var e = ge(te), t = d.createProgram();
|
|
1115
|
-
return t.name = e, t.ea = t.ba = t.da = 0, t.ma = 1, te[e] = t, e;
|
|
1116
|
-
},
|
|
1117
|
-
F: function(e) {
|
|
1118
|
-
var t = ge(ne);
|
|
1119
|
-
return ne[t] = d.createShader(e), t;
|
|
1120
|
-
},
|
|
1121
|
-
f: function(e, t) {
|
|
1122
|
-
for (var n = 0; n < e; n++) {
|
|
1123
|
-
var s = C[t + 4 * n >> 2], u = ce[s];
|
|
1124
|
-
u && (d.deleteBuffer(u), u.name = 0, ce[s] = null, s == d.$ && (d.$ = 0), s == d.aa && (d.aa = 0), s == d.na && (d.na = 0), s == d.oa && (d.oa = 0));
|
|
1125
|
-
}
|
|
1126
|
-
},
|
|
1127
|
-
s: function(e, t) {
|
|
1128
|
-
for (var n = 0; n < e; n++) {
|
|
1129
|
-
var s = C[t + 4 * n >> 2];
|
|
1130
|
-
d.deleteVertexArray(nt[s]), nt[s] = null;
|
|
1131
|
-
}
|
|
1132
|
-
},
|
|
1133
|
-
u: function(e, t, n, s) {
|
|
1134
|
-
if (!d.aa) {
|
|
1135
|
-
var u = 1 * rt[n - 5120] * t, a = Le(u), c = b.U[a];
|
|
1136
|
-
c ? a = c : (c = d.getParameter(34965), b.U[a] = d.createBuffer(), d.bindBuffer(34963, b.U[a]), d.bufferData(34963, 1 << a, 35048), d.bindBuffer(34963, c), a = b.U[a]), d.bindBuffer(34963, a), d.bufferSubData(34963, 0, ee.subarray(s, s + u)), s = 0;
|
|
1062
|
+
for (var n = 1; 4 >= n; n *= 2) {
|
|
1063
|
+
var u = t * (1 + 0.2 / n);
|
|
1064
|
+
u = Math.min(u, e + 100663296);
|
|
1065
|
+
var s = Math;
|
|
1066
|
+
u = Math.max(e, u), s = s.min.call(s, 2147483648, u + (65536 - u % 65536) % 65536);
|
|
1067
|
+
e: {
|
|
1068
|
+
try {
|
|
1069
|
+
q.grow(s - he.byteLength + 65535 >>> 16), Ge();
|
|
1070
|
+
var a = 1;
|
|
1071
|
+
break e;
|
|
1072
|
+
} catch {
|
|
1073
|
+
}
|
|
1074
|
+
a = void 0;
|
|
1137
1075
|
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1076
|
+
if (a)
|
|
1077
|
+
return !0;
|
|
1078
|
+
}
|
|
1079
|
+
return !1;
|
|
1080
|
+
}, l: function(e, t) {
|
|
1081
|
+
return t >>= 2, t = { alpha: !!C[t + 0], depth: !!C[t + 1], stencil: !!C[t + 2], antialias: !!C[t + 3], premultipliedAlpha: !!C[t + 4], preserveDrawingBuffer: !!C[t + 5], powerPreference: Ot[C[t + 6]], failIfMajorPerformanceCaveat: !!C[t + 7], sa: C[t + 8], La: C[t + 9], ra: C[t + 10], Ca: C[t + 11], Oa: C[t + 12], Pa: C[t + 13] }, e = 2 < e ? V(e) : e, e = Vt[e] || (typeof document < "u" ? document.querySelector(e) : void 0), !e || t.Ca ? 0 : It(e, t);
|
|
1082
|
+
}, m: function(e) {
|
|
1083
|
+
if (b == e && (b = 0), b === re[e] && (b = null), typeof jt == "object") {
|
|
1084
|
+
for (var t = re[e].V.canvas, n = 0; n < me.length; ++n)
|
|
1085
|
+
if (me[n].target == t) {
|
|
1086
|
+
var u = n--, s = me[u];
|
|
1087
|
+
s.target.removeEventListener(s.Ha, s.Ga, s.Qa), me.splice(u, 1);
|
|
1145
1088
|
}
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1089
|
+
}
|
|
1090
|
+
re[e] && re[e].V.canvas && (re[e].V.canvas.za = void 0), re[e] = null;
|
|
1091
|
+
}, e: function(e) {
|
|
1092
|
+
return b = re[e], r.Ea = d = b && b.V, !e || d ? 0 : -5;
|
|
1093
|
+
}, k: function(e, t) {
|
|
1094
|
+
d.attachShader(te[e], ne[t]);
|
|
1095
|
+
}, E: function(e, t, n) {
|
|
1096
|
+
d.bindAttribLocation(
|
|
1097
|
+
te[e],
|
|
1098
|
+
t,
|
|
1099
|
+
V(n)
|
|
1100
|
+
);
|
|
1101
|
+
}, d: function(e, t) {
|
|
1102
|
+
e == 34962 ? d.ba = t : e == 34963 && (d.da = t), e == 35051 ? d.oa = t : e == 35052 && (d.pa = t), d.bindBuffer(e, le[t]);
|
|
1103
|
+
}, g: function(e, t, n, u) {
|
|
1104
|
+
2 <= b.version ? n ? d.bufferData(e, ee, u, n, t) : d.bufferData(e, t, u) : d.bufferData(e, n ? ee.subarray(n, n + t) : t, u);
|
|
1105
|
+
}, z: function(e) {
|
|
1106
|
+
d.clear(e);
|
|
1107
|
+
}, A: function(e, t, n, u) {
|
|
1108
|
+
d.clearColor(e, t, n, u);
|
|
1109
|
+
}, r: function(e) {
|
|
1110
|
+
d.compileShader(ne[e]);
|
|
1111
|
+
}, F: function() {
|
|
1112
|
+
var e = we(te), t = d.createProgram();
|
|
1113
|
+
return t.name = e, t.ga = t.ea = t.fa = 0, t.na = 1, te[e] = t, e;
|
|
1114
|
+
}, G: function(e) {
|
|
1115
|
+
var t = we(ne);
|
|
1116
|
+
return ne[t] = d.createShader(e), t;
|
|
1117
|
+
}, f: function(e, t) {
|
|
1118
|
+
for (var n = 0; n < e; n++) {
|
|
1119
|
+
var u = C[t + 4 * n >> 2], s = le[u];
|
|
1120
|
+
s && (d.deleteBuffer(s), s.name = 0, le[u] = null, u == d.ba && (d.ba = 0), u == d.da && (d.da = 0), u == d.oa && (d.oa = 0), u == d.pa && (d.pa = 0));
|
|
1121
|
+
}
|
|
1122
|
+
}, s: function(e, t) {
|
|
1123
|
+
for (var n = 0; n < e; n++) {
|
|
1124
|
+
var u = C[t + 4 * n >> 2];
|
|
1125
|
+
d.deleteVertexArray(rt[u]), rt[u] = null;
|
|
1126
|
+
}
|
|
1127
|
+
}, u: function(e, t, n, u) {
|
|
1128
|
+
if (!d.da) {
|
|
1129
|
+
var s = 1 * it[n - 5120] * t, a = Ie(s), c = b.W[a];
|
|
1130
|
+
c ? a = c : (c = d.getParameter(34965), b.W[a] = d.createBuffer(), d.bindBuffer(34963, b.W[a]), d.bufferData(34963, 1 << a, 35048), d.bindBuffer(34963, c), a = b.W[a]), d.bindBuffer(34963, a), d.bufferSubData(34963, 0, ee.subarray(u, u + s)), u = 0;
|
|
1131
|
+
}
|
|
1132
|
+
for (Le = !1, s = 0; s < b.ta; ++s)
|
|
1133
|
+
if (a = b.aa[s], a.ja && a.enabled) {
|
|
1134
|
+
Le = !0, c = a.la, c = 0 < c ? t * c : a.size * it[a.type - 5120] * t;
|
|
1135
|
+
var y = Ie(c), B = b.ha[y], m = b.Y[y];
|
|
1136
|
+
b.Y[y] = b.Y[y] + 1 & 63;
|
|
1137
|
+
var k = B[m];
|
|
1138
|
+
k ? y = k : (k = d.getParameter(34964), B[m] = d.createBuffer(), d.bindBuffer(34962, B[m]), d.bufferData(34962, 1 << y, 35048), d.bindBuffer(34962, k), y = B[m]), d.bindBuffer(34962, y), d.bufferSubData(34962, 0, ee.subarray(a.U, a.U + c)), a.ya.call(d, s, a.size, a.type, a.ua, a.la, 0);
|
|
1155
1139
|
}
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
e.
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
else
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
if (t = V(t), e = te[e]) {
|
|
1195
|
-
var n = e, s = n.X, u = n.wa, a;
|
|
1196
|
-
if (!s)
|
|
1197
|
-
for (n.X = s = {}, n.va = {}, a = 0; a < d.getProgramParameter(n, 35718); ++a) {
|
|
1198
|
-
var c = d.getActiveUniform(n, a), y = c.name;
|
|
1199
|
-
c = c.size;
|
|
1200
|
-
var B = it(y);
|
|
1201
|
-
B = 0 < B ? y.slice(0, B) : y;
|
|
1202
|
-
var m = n.ma;
|
|
1203
|
-
for (n.ma += c, u[B] = [c, m], y = 0; y < c; ++y)
|
|
1204
|
-
s[m] = y, n.va[m++] = B;
|
|
1205
|
-
}
|
|
1206
|
-
if (n = e.X, s = 0, u = t, a = it(t), 0 < a && (s = parseInt(t.slice(a + 1)) >>> 0, u = t.slice(0, a)), (u = e.wa[u]) && s < u[0] && (s += u[1], n[s] = n[s] || d.getUniformLocation(e, t)))
|
|
1207
|
-
return s;
|
|
1140
|
+
d.drawElements(e, t, n, u), Le && d.bindBuffer(
|
|
1141
|
+
34962,
|
|
1142
|
+
le[d.ba]
|
|
1143
|
+
), d.da || d.bindBuffer(34963, null);
|
|
1144
|
+
}, w: function(e) {
|
|
1145
|
+
b.aa[e].enabled = !0, d.enableVertexAttribArray(e);
|
|
1146
|
+
}, h: function(e, t) {
|
|
1147
|
+
for (var n = 0; n < e; n++) {
|
|
1148
|
+
var u = d.createBuffer(), s = u && we(le);
|
|
1149
|
+
u ? (u.name = s, le[s] = u) : fe(1282), C[t + 4 * n >> 2] = s;
|
|
1150
|
+
}
|
|
1151
|
+
}, t: function() {
|
|
1152
|
+
var e = d.getError() || _e;
|
|
1153
|
+
return _e = 0, e;
|
|
1154
|
+
}, B: function(e, t, n) {
|
|
1155
|
+
if (n)
|
|
1156
|
+
if (e >= nt)
|
|
1157
|
+
fe(1281);
|
|
1158
|
+
else if (e = te[e], t == 35716)
|
|
1159
|
+
e = d.getProgramInfoLog(e), e === null && (e = "(unknown error)"), C[n >> 2] = e.length + 1;
|
|
1160
|
+
else if (t == 35719) {
|
|
1161
|
+
if (!e.ga)
|
|
1162
|
+
for (t = 0; t < d.getProgramParameter(e, 35718); ++t)
|
|
1163
|
+
e.ga = Math.max(
|
|
1164
|
+
e.ga,
|
|
1165
|
+
d.getActiveUniform(e, t).name.length + 1
|
|
1166
|
+
);
|
|
1167
|
+
C[n >> 2] = e.ga;
|
|
1168
|
+
} else if (t == 35722) {
|
|
1169
|
+
if (!e.ea)
|
|
1170
|
+
for (t = 0; t < d.getProgramParameter(e, 35721); ++t)
|
|
1171
|
+
e.ea = Math.max(e.ea, d.getActiveAttrib(e, t).name.length + 1);
|
|
1172
|
+
C[n >> 2] = e.ea;
|
|
1173
|
+
} else if (t == 35381) {
|
|
1174
|
+
if (!e.fa)
|
|
1175
|
+
for (t = 0; t < d.getProgramParameter(e, 35382); ++t)
|
|
1176
|
+
e.fa = Math.max(e.fa, d.getActiveUniformBlockName(e, t).length + 1);
|
|
1177
|
+
C[n >> 2] = e.fa;
|
|
1208
1178
|
} else
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
},
|
|
1241
|
-
C: function(e) {
|
|
1242
|
-
d.validateProgram(te[e]);
|
|
1243
|
-
},
|
|
1244
|
-
v: function(e, t, n, s, u, a) {
|
|
1245
|
-
var c = b.Z[e];
|
|
1246
|
-
d.$ ? (c.ia = !1, d.vertexAttribPointer(e, t, n, !!s, u, a)) : (c.size = t, c.type = n, c.ta = s, c.ka = u, c.T = a, c.ia = !0, c.xa = function(y, B, m, k, re, H) {
|
|
1247
|
-
this.vertexAttribPointer(y, B, m, k, re, H);
|
|
1248
|
-
});
|
|
1179
|
+
C[n >> 2] = d.getProgramParameter(e, t);
|
|
1180
|
+
else
|
|
1181
|
+
fe(1281);
|
|
1182
|
+
}, n: function(e, t, n, u) {
|
|
1183
|
+
e = d.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), t = 0 < t && u ? ye(e, ee, u, t) : 0, n && (C[n >> 2] = t);
|
|
1184
|
+
}, o: function(e, t, n) {
|
|
1185
|
+
n ? t == 35716 ? (e = d.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), C[n >> 2] = e ? e.length + 1 : 0) : t == 35720 ? (e = d.getShaderSource(ne[e]), C[n >> 2] = e ? e.length + 1 : 0) : C[n >> 2] = d.getShaderParameter(ne[e], t) : fe(1281);
|
|
1186
|
+
}, j: function(e, t) {
|
|
1187
|
+
if (t = V(t), e = te[e]) {
|
|
1188
|
+
var n = e, u = n.Z, s = n.xa, a;
|
|
1189
|
+
if (!u)
|
|
1190
|
+
for (n.Z = u = {}, n.wa = {}, a = 0; a < d.getProgramParameter(n, 35718); ++a) {
|
|
1191
|
+
var c = d.getActiveUniform(n, a), y = c.name;
|
|
1192
|
+
c = c.size;
|
|
1193
|
+
var B = ut(y);
|
|
1194
|
+
B = 0 < B ? y.slice(0, B) : y;
|
|
1195
|
+
var m = n.na;
|
|
1196
|
+
for (n.na += c, s[B] = [c, m], y = 0; y < c; ++y)
|
|
1197
|
+
u[m] = y, n.wa[m++] = B;
|
|
1198
|
+
}
|
|
1199
|
+
if (n = e.Z, u = 0, s = t, a = ut(t), 0 < a && (u = parseInt(t.slice(a + 1)) >>> 0, s = t.slice(0, a)), (s = e.xa[s]) && u < s[0] && (u += s[1], n[u] = n[u] || d.getUniformLocation(e, t)))
|
|
1200
|
+
return u;
|
|
1201
|
+
} else
|
|
1202
|
+
fe(1281);
|
|
1203
|
+
return -1;
|
|
1204
|
+
}, D: function(e) {
|
|
1205
|
+
e = te[e], d.linkProgram(e), e.Z = 0, e.xa = {};
|
|
1206
|
+
}, x: function(e, t, n, u) {
|
|
1207
|
+
for (var s = "", a = 0; a < t; ++a) {
|
|
1208
|
+
var c = u ? C[u + 4 * a >> 2] : -1;
|
|
1209
|
+
s += V(C[n + 4 * a >> 2], 0 > c ? void 0 : c);
|
|
1249
1210
|
}
|
|
1250
|
-
|
|
1211
|
+
d.shaderSource(ne[e], s);
|
|
1212
|
+
}, i: function(e, t, n, u) {
|
|
1213
|
+
if (2 <= b.version)
|
|
1214
|
+
d.uniformMatrix4fv(st(e), !!n, Ee, u >> 2, 16 * t);
|
|
1215
|
+
else {
|
|
1216
|
+
if (18 >= t) {
|
|
1217
|
+
var s = ot[16 * t - 1], a = Ee;
|
|
1218
|
+
u >>= 2;
|
|
1219
|
+
for (var c = 0; c < 16 * t; c += 16) {
|
|
1220
|
+
var y = u + c;
|
|
1221
|
+
s[c] = a[y], s[c + 1] = a[y + 1], s[c + 2] = a[y + 2], s[c + 3] = a[y + 3], s[c + 4] = a[y + 4], s[c + 5] = a[y + 5], s[c + 6] = a[y + 6], s[c + 7] = a[y + 7], s[c + 8] = a[y + 8], s[c + 9] = a[y + 9], s[c + 10] = a[y + 10], s[c + 11] = a[y + 11], s[c + 12] = a[y + 12], s[c + 13] = a[y + 13], s[c + 14] = a[y + 14], s[c + 15] = a[y + 15];
|
|
1222
|
+
}
|
|
1223
|
+
} else
|
|
1224
|
+
s = Ee.subarray(u >> 2, u + 64 * t >> 2);
|
|
1225
|
+
d.uniformMatrix4fv(st(e), !!n, s);
|
|
1226
|
+
}
|
|
1227
|
+
}, y: function(e) {
|
|
1228
|
+
e = te[e], d.useProgram(e), d.Ba = e;
|
|
1229
|
+
}, C: function(e) {
|
|
1230
|
+
d.validateProgram(te[e]);
|
|
1231
|
+
}, v: function(e, t, n, u, s, a) {
|
|
1232
|
+
var c = b.aa[e];
|
|
1233
|
+
d.ba ? (c.ja = !1, d.vertexAttribPointer(e, t, n, !!u, s, a)) : (c.size = t, c.type = n, c.ua = u, c.la = s, c.U = a, c.ja = !0, c.ya = function(y, B, m, k, ie, H) {
|
|
1234
|
+
this.vertexAttribPointer(y, B, m, k, ie, H);
|
|
1235
|
+
});
|
|
1236
|
+
} };
|
|
1251
1237
|
(function() {
|
|
1252
|
-
function e(
|
|
1253
|
-
r.asm =
|
|
1238
|
+
function e(s) {
|
|
1239
|
+
r.asm = s.exports, q = r.asm.H, Ge(), Xe = r.asm.Q, Ye.unshift(r.asm.I), ce--, r.monitorRunDependencies && r.monitorRunDependencies(ce), ce == 0 && pe && (s = pe, pe = null, s());
|
|
1254
1240
|
}
|
|
1255
|
-
function t(
|
|
1256
|
-
e(
|
|
1241
|
+
function t(s) {
|
|
1242
|
+
e(s.instance);
|
|
1257
1243
|
}
|
|
1258
|
-
function n(
|
|
1259
|
-
return
|
|
1260
|
-
return WebAssembly.instantiate(a,
|
|
1244
|
+
function n(s) {
|
|
1245
|
+
return Ft().then(function(a) {
|
|
1246
|
+
return WebAssembly.instantiate(a, u);
|
|
1261
1247
|
}).then(function(a) {
|
|
1262
1248
|
return a;
|
|
1263
|
-
}).then(
|
|
1264
|
-
|
|
1249
|
+
}).then(s, function(a) {
|
|
1250
|
+
P("failed to asynchronously prepare wasm: " + a), ue(a);
|
|
1265
1251
|
});
|
|
1266
1252
|
}
|
|
1267
|
-
var
|
|
1268
|
-
if (
|
|
1253
|
+
var u = { a: Nt };
|
|
1254
|
+
if (ce++, r.monitorRunDependencies && r.monitorRunDependencies(ce), r.instantiateWasm)
|
|
1269
1255
|
try {
|
|
1270
1256
|
return r.instantiateWasm(
|
|
1271
|
-
|
|
1257
|
+
u,
|
|
1272
1258
|
e
|
|
1273
1259
|
);
|
|
1274
|
-
} catch (
|
|
1275
|
-
return
|
|
1260
|
+
} catch (s) {
|
|
1261
|
+
return P("Module.instantiateWasm callback failed with error: " + s), !1;
|
|
1276
1262
|
}
|
|
1277
1263
|
return function() {
|
|
1278
|
-
return
|
|
1279
|
-
return WebAssembly.instantiateStreaming(
|
|
1280
|
-
return
|
|
1264
|
+
return j || typeof WebAssembly.instantiateStreaming != "function" || Je() || $.startsWith("file://") || typeof fetch != "function" ? n(t) : fetch($, { credentials: "same-origin" }).then(function(s) {
|
|
1265
|
+
return WebAssembly.instantiateStreaming(s, u).then(t, function(a) {
|
|
1266
|
+
return P("wasm streaming compile failed: " + a), P("falling back to ArrayBuffer instantiation"), n(t);
|
|
1281
1267
|
});
|
|
1282
1268
|
});
|
|
1283
1269
|
}().catch(l), {};
|
|
1284
1270
|
})(), r.___wasm_call_ctors = function() {
|
|
1285
|
-
return (r.___wasm_call_ctors = r.asm.
|
|
1271
|
+
return (r.___wasm_call_ctors = r.asm.I).apply(null, arguments);
|
|
1286
1272
|
};
|
|
1287
|
-
var
|
|
1288
|
-
return (
|
|
1289
|
-
},
|
|
1290
|
-
return (
|
|
1291
|
-
},
|
|
1292
|
-
return (
|
|
1293
|
-
},
|
|
1294
|
-
return (
|
|
1295
|
-
},
|
|
1296
|
-
return (
|
|
1297
|
-
},
|
|
1298
|
-
return (
|
|
1299
|
-
},
|
|
1300
|
-
return (
|
|
1301
|
-
},
|
|
1302
|
-
return (
|
|
1273
|
+
var ct = r._emscripten_bind_VoidPtr___destroy___0 = function() {
|
|
1274
|
+
return (ct = r._emscripten_bind_VoidPtr___destroy___0 = r.asm.J).apply(null, arguments);
|
|
1275
|
+
}, lt = r._emscripten_bind_McObject_updateDisplay_2 = function() {
|
|
1276
|
+
return (lt = r._emscripten_bind_McObject_updateDisplay_2 = r.asm.K).apply(null, arguments);
|
|
1277
|
+
}, ft = r._emscripten_bind_McObject_test_0 = function() {
|
|
1278
|
+
return (ft = r._emscripten_bind_McObject_test_0 = r.asm.L).apply(null, arguments);
|
|
1279
|
+
}, dt = r._emscripten_bind_McApp_McApp_0 = function() {
|
|
1280
|
+
return (dt = r._emscripten_bind_McApp_McApp_0 = r.asm.M).apply(null, arguments);
|
|
1281
|
+
}, pt = r._emscripten_bind_McApp_Init_0 = function() {
|
|
1282
|
+
return (pt = r._emscripten_bind_McApp_Init_0 = r.asm.N).apply(null, arguments);
|
|
1283
|
+
}, yt = r._emscripten_bind_McApp_CreateMxDraw_3 = function() {
|
|
1284
|
+
return (yt = r._emscripten_bind_McApp_CreateMxDraw_3 = r.asm.O).apply(null, arguments);
|
|
1285
|
+
}, ht = r._emscripten_bind_McApp___destroy___0 = function() {
|
|
1286
|
+
return (ht = r._emscripten_bind_McApp___destroy___0 = r.asm.P).apply(null, arguments);
|
|
1287
|
+
}, Et = r._strlen = function() {
|
|
1288
|
+
return (Et = r._strlen = r.asm.R).apply(null, arguments);
|
|
1303
1289
|
};
|
|
1304
1290
|
r._free = function() {
|
|
1305
|
-
return (r._free = r.asm.
|
|
1291
|
+
return (r._free = r.asm.S).apply(null, arguments);
|
|
1306
1292
|
}, r._malloc = function() {
|
|
1307
|
-
return (r._malloc = r.asm.
|
|
1293
|
+
return (r._malloc = r.asm.T).apply(null, arguments);
|
|
1308
1294
|
};
|
|
1309
|
-
var
|
|
1310
|
-
|
|
1311
|
-
|
|
1295
|
+
var ve;
|
|
1296
|
+
pe = function e() {
|
|
1297
|
+
ve || Ke(), ve || (pe = e);
|
|
1312
1298
|
};
|
|
1313
|
-
function
|
|
1299
|
+
function Ke() {
|
|
1314
1300
|
function e() {
|
|
1315
|
-
if (!
|
|
1316
|
-
if (
|
|
1301
|
+
if (!ve && (ve = !0, r.calledRun = !0, !N)) {
|
|
1302
|
+
if (Te(Ye), f(r), r.onRuntimeInitialized && r.onRuntimeInitialized(), r.postRun)
|
|
1317
1303
|
for (typeof r.postRun == "function" && (r.postRun = [r.postRun]); r.postRun.length; ) {
|
|
1318
1304
|
var t = r.postRun.shift();
|
|
1319
|
-
|
|
1305
|
+
Ze.unshift(t);
|
|
1320
1306
|
}
|
|
1321
|
-
|
|
1307
|
+
Te(Ze);
|
|
1322
1308
|
}
|
|
1323
1309
|
}
|
|
1324
|
-
if (!(0 <
|
|
1310
|
+
if (!(0 < ce)) {
|
|
1325
1311
|
if (r.preRun)
|
|
1326
1312
|
for (typeof r.preRun == "function" && (r.preRun = [r.preRun]); r.preRun.length; )
|
|
1327
|
-
|
|
1328
|
-
|
|
1313
|
+
kt();
|
|
1314
|
+
Te($e), 0 < ce || (r.setStatus ? (r.setStatus("Running..."), setTimeout(function() {
|
|
1329
1315
|
setTimeout(function() {
|
|
1330
1316
|
r.setStatus("");
|
|
1331
1317
|
}, 1), e();
|
|
1332
1318
|
}, 1)) : e());
|
|
1333
1319
|
}
|
|
1334
1320
|
}
|
|
1335
|
-
if (r.run =
|
|
1321
|
+
if (r.run = Ke, r.preInit)
|
|
1336
1322
|
for (typeof r.preInit == "function" && (r.preInit = [r.preInit]); 0 < r.preInit.length; )
|
|
1337
1323
|
r.preInit.pop()();
|
|
1338
|
-
|
|
1324
|
+
Ke();
|
|
1339
1325
|
function X() {
|
|
1340
1326
|
}
|
|
1341
|
-
X.prototype = Object.create(X.prototype), X.prototype.constructor = X, X.prototype.
|
|
1342
|
-
function
|
|
1343
|
-
return (e || X)
|
|
1327
|
+
X.prototype = Object.create(X.prototype), X.prototype.constructor = X, X.prototype.X = X, X.$ = {}, r.WrapperObject = X;
|
|
1328
|
+
function xe(e) {
|
|
1329
|
+
return (e || X).$;
|
|
1344
1330
|
}
|
|
1345
|
-
r.getCache =
|
|
1346
|
-
function
|
|
1347
|
-
var n =
|
|
1348
|
-
return
|
|
1331
|
+
r.getCache = xe;
|
|
1332
|
+
function Me(e, t) {
|
|
1333
|
+
var n = xe(t), u = n[e];
|
|
1334
|
+
return u || (u = Object.create((t || X).prototype), u.U = e, n[e] = u);
|
|
1349
1335
|
}
|
|
1350
|
-
r.wrapPointer =
|
|
1351
|
-
return
|
|
1352
|
-
}, r.NULL =
|
|
1336
|
+
r.wrapPointer = Me, r.castObject = function(e, t) {
|
|
1337
|
+
return Me(e.U, t);
|
|
1338
|
+
}, r.NULL = Me(0), r.destroy = function(e) {
|
|
1353
1339
|
if (!e.__destroy__)
|
|
1354
1340
|
throw "Error: Cannot destroy object. (Did you create it yourself?)";
|
|
1355
|
-
e.__destroy__(), delete
|
|
1341
|
+
e.__destroy__(), delete xe(e.X)[e.U];
|
|
1356
1342
|
}, r.compare = function(e, t) {
|
|
1357
|
-
return e.
|
|
1343
|
+
return e.U === t.U;
|
|
1358
1344
|
}, r.getPointer = function(e) {
|
|
1359
|
-
return e.
|
|
1345
|
+
return e.U;
|
|
1360
1346
|
}, r.getClass = function(e) {
|
|
1361
|
-
return e.
|
|
1347
|
+
return e.X;
|
|
1362
1348
|
};
|
|
1363
|
-
var
|
|
1364
|
-
function
|
|
1365
|
-
if (
|
|
1366
|
-
for (var e = 0; e <
|
|
1367
|
-
r._free(
|
|
1368
|
-
|
|
1349
|
+
var de = 0, Ce = 0, Be = 0, De = [], ke = 0;
|
|
1350
|
+
function At() {
|
|
1351
|
+
if (ke) {
|
|
1352
|
+
for (var e = 0; e < De.length; e++)
|
|
1353
|
+
r._free(De[e]);
|
|
1354
|
+
De.length = 0, r._free(de), de = 0, Ce += ke, ke = 0;
|
|
1369
1355
|
}
|
|
1370
|
-
|
|
1356
|
+
de || (Ce += 128, (de = r._malloc(Ce)) || ue(void 0)), Be = 0;
|
|
1371
1357
|
}
|
|
1372
|
-
function
|
|
1373
|
-
return
|
|
1358
|
+
function gt(e, t) {
|
|
1359
|
+
return de || ue(void 0), e = e.length * t.BYTES_PER_ELEMENT, e = e + 7 & -8, Be + e >= Ce ? (0 < e || ue(void 0), ke += e, t = r._malloc(e), De.push(t)) : (t = de + Be, Be += e), t;
|
|
1374
1360
|
}
|
|
1375
|
-
function
|
|
1361
|
+
function wt(e, t, n) {
|
|
1376
1362
|
switch (n >>>= 0, t.BYTES_PER_ELEMENT) {
|
|
1377
1363
|
case 2:
|
|
1378
1364
|
n >>>= 1;
|
|
@@ -1383,99 +1369,99 @@ var Fe = (() => {
|
|
|
1383
1369
|
case 8:
|
|
1384
1370
|
n >>>= 3;
|
|
1385
1371
|
}
|
|
1386
|
-
for (var
|
|
1387
|
-
t[n +
|
|
1372
|
+
for (var u = 0; u < e.length; u++)
|
|
1373
|
+
t[n + u] = e[u];
|
|
1388
1374
|
}
|
|
1389
|
-
function
|
|
1375
|
+
function _t(e) {
|
|
1390
1376
|
if (typeof e == "object") {
|
|
1391
|
-
var t =
|
|
1392
|
-
return
|
|
1377
|
+
var t = gt(e, Ae);
|
|
1378
|
+
return wt(e, Ae, t), t;
|
|
1393
1379
|
}
|
|
1394
1380
|
return e;
|
|
1395
1381
|
}
|
|
1396
1382
|
function se() {
|
|
1397
1383
|
throw "cannot construct a VoidPtr, no constructor in IDL";
|
|
1398
1384
|
}
|
|
1399
|
-
se.prototype = Object.create(X.prototype), se.prototype.constructor = se, se.prototype.
|
|
1400
|
-
|
|
1385
|
+
se.prototype = Object.create(X.prototype), se.prototype.constructor = se, se.prototype.X = se, se.$ = {}, r.VoidPtr = se, se.prototype.__destroy__ = function() {
|
|
1386
|
+
ct(this.U);
|
|
1401
1387
|
};
|
|
1402
1388
|
function Z() {
|
|
1403
1389
|
throw "cannot construct a McObject, no constructor in IDL";
|
|
1404
1390
|
}
|
|
1405
|
-
Z.prototype = Object.create(X.prototype), Z.prototype.constructor = Z, Z.prototype.
|
|
1406
|
-
var n = this.
|
|
1407
|
-
return
|
|
1391
|
+
Z.prototype = Object.create(X.prototype), Z.prototype.constructor = Z, Z.prototype.X = Z, Z.$ = {}, r.McObject = Z, Z.prototype.updateDisplay = function(e, t) {
|
|
1392
|
+
var n = this.U;
|
|
1393
|
+
return At(), typeof e == "object" && (e = _t(e)), typeof t == "object" && (t = _t(t)), !!lt(n, e, t);
|
|
1408
1394
|
}, Z.prototype.test = Z.prototype.test = function() {
|
|
1409
|
-
|
|
1395
|
+
ft(this.U);
|
|
1410
1396
|
};
|
|
1411
1397
|
function J() {
|
|
1412
|
-
this.
|
|
1398
|
+
this.U = dt(), xe(J)[this.U] = this;
|
|
1413
1399
|
}
|
|
1414
|
-
return J.prototype = Object.create(X.prototype), J.prototype.constructor = J, J.prototype.
|
|
1415
|
-
|
|
1400
|
+
return J.prototype = Object.create(X.prototype), J.prototype.constructor = J, J.prototype.X = J, J.$ = {}, r.McApp = J, J.prototype.Init = function() {
|
|
1401
|
+
pt(this.U);
|
|
1416
1402
|
}, J.prototype.CreateMxDraw = function(e, t, n) {
|
|
1417
|
-
var
|
|
1418
|
-
if (
|
|
1419
|
-
n = n.
|
|
1403
|
+
var u = this.U;
|
|
1404
|
+
if (At(), e && typeof e == "object" && (e = e.U), t && typeof t == "object" && (t = t.U), n && typeof n == "object")
|
|
1405
|
+
n = n.U;
|
|
1420
1406
|
else if (typeof n == "string") {
|
|
1421
|
-
n =
|
|
1422
|
-
var
|
|
1423
|
-
|
|
1407
|
+
n = at(n);
|
|
1408
|
+
var s = gt(n, K);
|
|
1409
|
+
wt(n, K, s), n = s;
|
|
1424
1410
|
}
|
|
1425
|
-
return
|
|
1411
|
+
return Me(yt(u, e, t, n), Z);
|
|
1426
1412
|
}, J.prototype.__destroy__ = function() {
|
|
1427
|
-
|
|
1413
|
+
ht(this.U);
|
|
1428
1414
|
}, o.ready;
|
|
1429
1415
|
};
|
|
1430
1416
|
})();
|
|
1431
|
-
typeof exports == "object" && typeof module == "object" ? module.exports =
|
|
1432
|
-
return
|
|
1433
|
-
}) : typeof exports == "object" && (exports.mxdrawassembly =
|
|
1434
|
-
const
|
|
1435
|
-
let
|
|
1436
|
-
function
|
|
1437
|
-
|
|
1417
|
+
typeof exports == "object" && typeof module == "object" ? module.exports = Re : typeof define == "function" && define.amd ? define([], function() {
|
|
1418
|
+
return Re;
|
|
1419
|
+
}) : typeof exports == "object" && (exports.mxdrawassembly = Re);
|
|
1420
|
+
const sn = (i, o) => new URL(i, o || self.location.href).toString();
|
|
1421
|
+
let be;
|
|
1422
|
+
function on(i, o = sn) {
|
|
1423
|
+
Re({
|
|
1438
1424
|
locateFile: o
|
|
1439
1425
|
}).then((r) => {
|
|
1440
1426
|
let f = new r.McApp();
|
|
1441
|
-
f.Init(),
|
|
1427
|
+
f.Init(), be = r, be.McApp = f, i(be);
|
|
1442
1428
|
});
|
|
1443
1429
|
}
|
|
1444
|
-
const
|
|
1430
|
+
const cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1445
1431
|
__proto__: null,
|
|
1446
1432
|
get MxCpp() {
|
|
1447
|
-
return
|
|
1433
|
+
return be;
|
|
1448
1434
|
},
|
|
1449
|
-
loadMxdrawassembly:
|
|
1450
|
-
fetchAndInstantiate:
|
|
1451
|
-
b64Encode:
|
|
1452
|
-
b64Decode:
|
|
1453
|
-
setMcDbEntity:
|
|
1454
|
-
MxTools:
|
|
1455
|
-
drawText:
|
|
1456
|
-
drawCircle:
|
|
1457
|
-
drawLine:
|
|
1458
|
-
drawMText:
|
|
1459
|
-
drawPolyLine:
|
|
1460
|
-
drawPolygon:
|
|
1461
|
-
drawArc:
|
|
1462
|
-
drawEllipticalArc:
|
|
1435
|
+
loadMxdrawassembly: on,
|
|
1436
|
+
fetchAndInstantiate: Yt,
|
|
1437
|
+
b64Encode: xt,
|
|
1438
|
+
b64Decode: Mt,
|
|
1439
|
+
setMcDbEntity: Ct,
|
|
1440
|
+
MxTools: Ne,
|
|
1441
|
+
drawText: Zt,
|
|
1442
|
+
drawCircle: Bt,
|
|
1443
|
+
drawLine: Dt,
|
|
1444
|
+
drawMText: Qt,
|
|
1445
|
+
drawPolyLine: Ut,
|
|
1446
|
+
drawPolygon: qt,
|
|
1447
|
+
drawArc: rn,
|
|
1448
|
+
drawEllipticalArc: un
|
|
1463
1449
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1464
1450
|
export {
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1451
|
+
be as MxCpp,
|
|
1452
|
+
Ne as MxTools,
|
|
1453
|
+
Mt as b64Decode,
|
|
1454
|
+
xt as b64Encode,
|
|
1455
|
+
cn as default,
|
|
1456
|
+
rn as drawArc,
|
|
1457
|
+
Bt as drawCircle,
|
|
1458
|
+
un as drawEllipticalArc,
|
|
1459
|
+
Dt as drawLine,
|
|
1460
|
+
Qt as drawMText,
|
|
1461
|
+
Ut as drawPolyLine,
|
|
1462
|
+
qt as drawPolygon,
|
|
1463
|
+
Zt as drawText,
|
|
1464
|
+
Yt as fetchAndInstantiate,
|
|
1465
|
+
on as loadMxdrawassembly,
|
|
1466
|
+
Ct as setMcDbEntity
|
|
1481
1467
|
};
|