earthsdk3-ue 3.5.0 → 3.6.0-beta.1
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/earthsdk3-ue.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var v = (
|
|
4
|
-
import { ESViewer as Ee, reactArrayWithUndefined as
|
|
5
|
-
import { Logger as
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
var Br = Object.defineProperty;
|
|
2
|
+
var _r = (d, e, t) => e in d ? Br(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t;
|
|
3
|
+
var v = (d, e, t) => _r(d, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ESViewer as Ee, reactArrayWithUndefined as pr, ESSceneObject as E, ESJPickedResult as Ae, Destroyable as m, HasOwner as Mr, createGuid as _, Event as S, createAnimateFrame as be, createInterval as Se, react as W, createNextAnimateFrameEvent as P, ViewerCustomInteraction as vr, ObjResettingWithEvent as L, createProcessingFromAsyncFunc as Te, sleep as $r, getGeoBoundingSphereFromPositions as Wr, extendClassProps as Ar, EngineObject as G, ES3DTileset as me, ESImageryLayer as U, reactJson as He, ESTerrainLayer as Ur, ESAlarm as Nr, ESApertureEffect as zr, ESGeoPolygon as br, ESAreaMeasurement as O, ESBlastParticleSystem as Hr, ESBoxClipping as Jr, ESCameraView as Gr, ESCameraVisibleRange as Kr, ESCar as Xr, ESClassification as dt, ESClippingPlane as Yr, ESDataMesh as b, ESDatasmithRuntimeModel as Zr, ESDirectionMeasurement as qr, ESDistanceMeasurement as Me, ESLocalPolygon as Qr, ESDynamicWater as Vr, ESEntityCluster as Or, ESExcavate as jr, ESFireParticleSystem as tn, ESForestTileset as N, ESGeoDiv as Ce, ESTextLabel as fr, bind as k, ESCustomDiv as Je, ESImageLabel as gr, track as F, PosFloatDiv as en, ESGeoJson as rn, ESGeoLineString as nn, ESGeoRectangle as sn, ESGeoWater as on, rpToap as Fe, ESGltfModel as an, ESHeightMeasurement as ln, ESHuman as dn, ESLevelRuntimeModel as cn, ESLocalCircle as un, ESLocalPolygonZ as hn, ESLocalRectangle as pn, ESLocalSkyBox as vn, ESLocationMeasurement as fn, ESPipeFence as gn, ESPipeline as wn, ESPipeserTileset as yn, ESPit as mn, ESPoi2D as Cn, ESPoi3D as Fn, ESPoiTileset as In, ESPolygonFence as En, ESPolygonFlattenedPlane as Sn, ESPolygonWithHole as Tn, ESRtsTileset as xn, ESSeparateFoliage as Rn, addTreesCallFunc as Ln, removeAllTreesCallFunc as Pn, updateTreeParamsCallFunc as kn, cutDownTreesCallFunc as Dn, growthSimulationCallFunc as Bn, ESSubmergingAnalysis as _n, ESSunshineAnalysis as Mn, ESSurfaceAreaMeasurement as $n, ESUEWidget as Wn, ESUnrealActor as $e, ESVideoFusion as An, ESViewShed as Un, ESVisibilityAnalysis as Nn, ESVolumeMeasurement as zn, ESWidget as bn, ESHumanPoi as Hn, ESNavigator as j, ESPath as Jn, ESViewerStatusBar as A, ESGaussianSplatting as Gn, ESRtsFeatureEditing as Kn, ESMsTileset as Xn, ESGeoExtrudedPolygon as ye, ESStaticMesh as Yn, ESSkylineAnalysis as Zn } from "earthsdk3";
|
|
5
|
+
import { Logger as wr, Config as yr, TextParameters as qn, Flags as ot, NumericParameters as mr, PixelStreaming as Cr } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.2";
|
|
6
|
+
import Qn from "html2canvas";
|
|
7
|
+
var hr;
|
|
8
|
+
const Vn = {
|
|
8
9
|
...Ee.defaults,
|
|
9
10
|
geoReferenceOrigin: void 0,
|
|
10
11
|
keepWorldOriginNearCamera: !1,
|
|
@@ -15,17 +16,17 @@ const Qn = {
|
|
|
15
16
|
brightness: 0,
|
|
16
17
|
emissiveIntensity: 1,
|
|
17
18
|
statusUpdateInterval: 0.5,
|
|
18
|
-
baseUrl:
|
|
19
|
+
baseUrl: ((hr = globalThis == null ? void 0 : globalThis.location) == null ? void 0 : hr.href) ?? "",
|
|
19
20
|
screenPercentage: -1,
|
|
20
21
|
antiAliasingMethod: "default"
|
|
21
|
-
},
|
|
22
|
+
}, Fr = () => ({
|
|
22
23
|
...Ee.createCommonProps(),
|
|
23
24
|
//语音模式
|
|
24
25
|
apiKey: "",
|
|
25
26
|
apiUrl: "",
|
|
26
27
|
secretKey: "",
|
|
27
28
|
speechVoiceMode: "",
|
|
28
|
-
geoReferenceOrigin:
|
|
29
|
+
geoReferenceOrigin: pr(void 0),
|
|
29
30
|
//地理参考原点
|
|
30
31
|
keepWorldOriginNearCamera: void 0,
|
|
31
32
|
//地理参考的保持世界原点开关
|
|
@@ -50,19 +51,19 @@ const Qn = {
|
|
|
50
51
|
//抗锯齿方法
|
|
51
52
|
});
|
|
52
53
|
function xe() {
|
|
53
|
-
const
|
|
54
|
-
return Object.keys(
|
|
54
|
+
const d = Fr(), e = [];
|
|
55
|
+
return Object.keys(d).forEach((t) => {
|
|
55
56
|
e.push(t);
|
|
56
57
|
}), e;
|
|
57
58
|
}
|
|
58
|
-
function Ge(
|
|
59
|
+
function Ge(d) {
|
|
59
60
|
const { defaults: e } = J, t = xe(), i = {};
|
|
60
61
|
return t.forEach((r) => {
|
|
61
|
-
i[r] =
|
|
62
|
+
i[r] = d[r] ?? e[r];
|
|
62
63
|
}), i;
|
|
63
64
|
}
|
|
64
|
-
const we = async (
|
|
65
|
-
const s = await
|
|
65
|
+
const we = async (d, e, t, i, r, n = "default") => {
|
|
66
|
+
const s = await d.callUeFunc({
|
|
66
67
|
f: "flyTo",
|
|
67
68
|
p: { id: e, duration: t, flyToParam: i, position: r, flyMode: n }
|
|
68
69
|
});
|
|
@@ -71,11 +72,11 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
74
|
return s.re;
|
|
74
|
-
},
|
|
75
|
-
const t = await
|
|
75
|
+
}, Ir = async (d, e) => {
|
|
76
|
+
const t = await d.callUeFunc({ f: "destroy", p: { id: e } });
|
|
76
77
|
return t.error && console.error(t.error), t;
|
|
77
|
-
},
|
|
78
|
-
|
|
78
|
+
}, lt = (d, e) => {
|
|
79
|
+
d.callUeFunc({
|
|
79
80
|
f: "calcFlyToParam",
|
|
80
81
|
p: { id: e }
|
|
81
82
|
}).then((t) => {
|
|
@@ -83,8 +84,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
83
84
|
}).catch((t) => {
|
|
84
85
|
console.error("calcFlyToParam:", t);
|
|
85
86
|
});
|
|
86
|
-
},
|
|
87
|
-
|
|
87
|
+
}, On = (d, e) => {
|
|
88
|
+
d.callUeFunc({
|
|
88
89
|
f: "refreshTileset",
|
|
89
90
|
p: { id: e }
|
|
90
91
|
}).then((t) => {
|
|
@@ -92,8 +93,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
92
93
|
}).catch((t) => {
|
|
93
94
|
console.error("refreshTileset:", t);
|
|
94
95
|
});
|
|
95
|
-
}, Re = async (
|
|
96
|
-
const s = await
|
|
96
|
+
}, Re = async (d, e, t, i, r, n = "default") => {
|
|
97
|
+
const s = await d.callUeFunc({
|
|
97
98
|
f: "flyIn",
|
|
98
99
|
p: { id: e, position: t, rotation: i, duration: r, flyMode: n }
|
|
99
100
|
});
|
|
@@ -102,12 +103,12 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
102
103
|
return;
|
|
103
104
|
}
|
|
104
105
|
return s.re;
|
|
105
|
-
},
|
|
106
|
-
if (!
|
|
106
|
+
}, jn = async (d, e) => {
|
|
107
|
+
if (!d) {
|
|
107
108
|
console.warn("DefaultCameraFlyIn: viewer is undefined");
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
|
-
const t = await
|
|
111
|
+
const t = await d.callUeFunc({
|
|
111
112
|
f: "DefaultCameraFlyIn",
|
|
112
113
|
p: { Duration: e ?? 1 }
|
|
113
114
|
});
|
|
@@ -116,12 +117,12 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
116
117
|
return;
|
|
117
118
|
}
|
|
118
119
|
return t;
|
|
119
|
-
},
|
|
120
|
-
if (!
|
|
120
|
+
}, ts = async (d) => {
|
|
121
|
+
if (!d) {
|
|
121
122
|
console.warn("StartVoice:viewer is undefined");
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
|
-
const e = await
|
|
125
|
+
const e = await d.callUeFunc({
|
|
125
126
|
f: "StartVoice",
|
|
126
127
|
p: {}
|
|
127
128
|
});
|
|
@@ -130,12 +131,12 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
130
131
|
return;
|
|
131
132
|
}
|
|
132
133
|
return e;
|
|
133
|
-
},
|
|
134
|
-
if (!
|
|
134
|
+
}, es = async (d) => {
|
|
135
|
+
if (!d) {
|
|
135
136
|
console.warn("StopVoice:viewer is undefined");
|
|
136
137
|
return;
|
|
137
138
|
}
|
|
138
|
-
const e = await
|
|
139
|
+
const e = await d.callUeFunc({
|
|
139
140
|
f: "StopVoice",
|
|
140
141
|
p: {}
|
|
141
142
|
});
|
|
@@ -144,12 +145,12 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
144
145
|
return;
|
|
145
146
|
}
|
|
146
147
|
return e;
|
|
147
|
-
},
|
|
148
|
-
if (!
|
|
148
|
+
}, is = async (d, e) => {
|
|
149
|
+
if (!d) {
|
|
149
150
|
console.warn("mountPakFiles:viewer is undefined");
|
|
150
151
|
return;
|
|
151
152
|
}
|
|
152
|
-
const t = await
|
|
153
|
+
const t = await d.callUeFunc({
|
|
153
154
|
f: "MountPakFiles",
|
|
154
155
|
p: { json: e }
|
|
155
156
|
});
|
|
@@ -158,12 +159,12 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
158
159
|
return;
|
|
159
160
|
}
|
|
160
161
|
return t;
|
|
161
|
-
},
|
|
162
|
-
if (!
|
|
162
|
+
}, rs = async (d) => {
|
|
163
|
+
if (!d) {
|
|
163
164
|
console.warn("generateMemReport:viewer is undefined");
|
|
164
165
|
return;
|
|
165
166
|
}
|
|
166
|
-
const e = await
|
|
167
|
+
const e = await d.callUeFunc({
|
|
167
168
|
f: "GenerateMemReport",
|
|
168
169
|
p: {}
|
|
169
170
|
});
|
|
@@ -172,14 +173,14 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
172
173
|
return;
|
|
173
174
|
}
|
|
174
175
|
return e;
|
|
175
|
-
},
|
|
176
|
-
const t = await
|
|
176
|
+
}, Er = async (d, e) => {
|
|
177
|
+
const t = await d.callUeFunc({
|
|
177
178
|
f: "resetWithCurrentCamera",
|
|
178
179
|
p: { id: e }
|
|
179
180
|
});
|
|
180
181
|
return t.error && console.error("resetWithCurrentCamera:", t.error), t;
|
|
181
|
-
}, Le = (
|
|
182
|
-
|
|
182
|
+
}, Le = (d, e, t, i, r) => {
|
|
183
|
+
d.callUeFunc({
|
|
183
184
|
f: "smoothMoveWithRotation",
|
|
184
185
|
p: {
|
|
185
186
|
id: e,
|
|
@@ -192,8 +193,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
192
193
|
}).catch((n) => {
|
|
193
194
|
console.error("smoothMoveWithRotation:", n);
|
|
194
195
|
});
|
|
195
|
-
}, Pe = (
|
|
196
|
-
|
|
196
|
+
}, Pe = (d, e, t, i, r, n) => {
|
|
197
|
+
d.callUeFunc({
|
|
197
198
|
f: "smoothMoveOnGround",
|
|
198
199
|
p: { id: e, Lon: t, Lat: i, Ground: r, Time: n }
|
|
199
200
|
}).then((s) => {
|
|
@@ -201,8 +202,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
201
202
|
}).catch((s) => {
|
|
202
203
|
console.error("smoothMoveOnGround:", s);
|
|
203
204
|
});
|
|
204
|
-
}, ke = (
|
|
205
|
-
|
|
205
|
+
}, ke = (d, e, t, i, r, n, s) => {
|
|
206
|
+
d.callUeFunc({
|
|
206
207
|
f: "smoothMoveWithRotationOnGround",
|
|
207
208
|
p: {
|
|
208
209
|
id: e,
|
|
@@ -217,8 +218,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
217
218
|
}).catch((o) => {
|
|
218
219
|
console.error("smoothMoveWithRotationOnGround:", o);
|
|
219
220
|
});
|
|
220
|
-
},
|
|
221
|
-
|
|
221
|
+
}, ns = (d, e, t) => {
|
|
222
|
+
d.callUeFunc({
|
|
222
223
|
f: "HighlightFeature",
|
|
223
224
|
p: { id: e, HlId: t }
|
|
224
225
|
}).then((i) => {
|
|
@@ -226,8 +227,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
226
227
|
}).catch((i) => {
|
|
227
228
|
console.error("HighlightFeature:", i);
|
|
228
229
|
});
|
|
229
|
-
},
|
|
230
|
-
|
|
230
|
+
}, ss = (d, e, t, i) => {
|
|
231
|
+
d.callUeFunc({
|
|
231
232
|
f: "HighlightFeatureAndFlyTo",
|
|
232
233
|
p: { id: e, HlId: t, Duration: i }
|
|
233
234
|
}).then((r) => {
|
|
@@ -235,8 +236,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
235
236
|
}).catch((r) => {
|
|
236
237
|
console.error("HighlightFeatureAndFlyTo:", r);
|
|
237
238
|
});
|
|
238
|
-
},
|
|
239
|
-
|
|
239
|
+
}, os = (d, e, t) => {
|
|
240
|
+
d.callUeFunc({
|
|
240
241
|
f: "SetLayerVisible",
|
|
241
242
|
p: { id: e, LayerJson: t }
|
|
242
243
|
}).then((i) => {
|
|
@@ -244,8 +245,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
244
245
|
}).catch((i) => {
|
|
245
246
|
console.error("SetLayerVisible:", i);
|
|
246
247
|
});
|
|
247
|
-
},
|
|
248
|
-
|
|
248
|
+
}, as = (d, e, t) => {
|
|
249
|
+
d.callUeFunc({
|
|
249
250
|
f: "SetLayerColor",
|
|
250
251
|
p: { id: e, LayerJson: t }
|
|
251
252
|
}).then((i) => {
|
|
@@ -253,8 +254,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
253
254
|
}).catch((i) => {
|
|
254
255
|
console.error("SetLayerColor:", i);
|
|
255
256
|
});
|
|
256
|
-
}, De = (
|
|
257
|
-
|
|
257
|
+
}, De = (d, e, t, i) => {
|
|
258
|
+
d.callUeFunc({
|
|
258
259
|
f: "smoothMove",
|
|
259
260
|
p: {
|
|
260
261
|
id: e,
|
|
@@ -266,14 +267,14 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
266
267
|
}).catch((r) => {
|
|
267
268
|
console.error("smoothMove:", r);
|
|
268
269
|
});
|
|
269
|
-
},
|
|
270
|
-
const r = await
|
|
270
|
+
}, Sr = async (d, e, t, i) => {
|
|
271
|
+
const r = await d.callUeFunc({
|
|
271
272
|
f: "callFunction",
|
|
272
273
|
p: { id: e, fn: t, p: i }
|
|
273
274
|
});
|
|
274
275
|
return r.error && (console.error("callFunction:", r.error), console.error(`id: ${e} fn: ${t} param: ${i}`)), r.re ?? void 0;
|
|
275
|
-
},
|
|
276
|
-
|
|
276
|
+
}, ls = (d, e, t, i) => {
|
|
277
|
+
d.callUeFunc({
|
|
277
278
|
f: "SetNodePosition",
|
|
278
279
|
p: {
|
|
279
280
|
id: e,
|
|
@@ -285,8 +286,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
285
286
|
}).catch((r) => {
|
|
286
287
|
console.error("SetNodePosition:", r);
|
|
287
288
|
});
|
|
288
|
-
}, ds = (
|
|
289
|
-
|
|
289
|
+
}, ds = (d, e, t, i) => {
|
|
290
|
+
d.callUeFunc({
|
|
290
291
|
f: "SetNodeRotation",
|
|
291
292
|
p: {
|
|
292
293
|
id: e,
|
|
@@ -298,8 +299,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
298
299
|
}).catch((r) => {
|
|
299
300
|
console.error("SetNodeRotation:", r);
|
|
300
301
|
});
|
|
301
|
-
},
|
|
302
|
-
|
|
302
|
+
}, cs = (d, e, t, i) => {
|
|
303
|
+
d.callUeFunc({
|
|
303
304
|
f: "SetNodeScale",
|
|
304
305
|
p: {
|
|
305
306
|
id: e,
|
|
@@ -311,7 +312,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
311
312
|
}).catch((r) => {
|
|
312
313
|
console.error("SetNodeScale:", r);
|
|
313
314
|
});
|
|
314
|
-
},
|
|
315
|
+
}, H = async (d, e) => {
|
|
315
316
|
if (e.mode == "Follow") {
|
|
316
317
|
const i = E.getSceneObject(e.objectId);
|
|
317
318
|
e.objectId = i ? (i.components.main ?? i).id : e.objectId;
|
|
@@ -319,7 +320,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
319
320
|
const i = E.getSceneObject(e.geoLineStringId);
|
|
320
321
|
e.geoLineStringId = i ? (i.components.main ?? i).id : e.geoLineStringId;
|
|
321
322
|
}
|
|
322
|
-
const t = await
|
|
323
|
+
const t = await d.callUeFunc({
|
|
323
324
|
f: "ChangeNavigationMode",
|
|
324
325
|
p: e
|
|
325
326
|
});
|
|
@@ -328,8 +329,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
328
329
|
return;
|
|
329
330
|
}
|
|
330
331
|
return t;
|
|
331
|
-
},
|
|
332
|
-
const t = await
|
|
332
|
+
}, us = async (d, e) => {
|
|
333
|
+
const t = await d.callUeFunc({
|
|
333
334
|
f: "setGlobalProperty",
|
|
334
335
|
p: e
|
|
335
336
|
});
|
|
@@ -338,8 +339,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
338
339
|
return;
|
|
339
340
|
}
|
|
340
341
|
return t;
|
|
341
|
-
},
|
|
342
|
-
const e = await
|
|
342
|
+
}, hs = async (d) => {
|
|
343
|
+
const e = await d.callUeFunc({
|
|
343
344
|
f: "Quit",
|
|
344
345
|
p: void 0
|
|
345
346
|
});
|
|
@@ -348,9 +349,9 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
348
349
|
return;
|
|
349
350
|
}
|
|
350
351
|
return e;
|
|
351
|
-
},
|
|
352
|
+
}, ps = async (d, e, t, i) => {
|
|
352
353
|
console.log("pickCallFunc", e, t, i);
|
|
353
|
-
const r = await
|
|
354
|
+
const r = await d.callUeFunc({
|
|
354
355
|
f: "pick",
|
|
355
356
|
p: { screenPosition: e, parentInfo: i }
|
|
356
357
|
});
|
|
@@ -360,8 +361,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
360
361
|
}
|
|
361
362
|
let n = r.re.id, s, o = n ? E.getSceneObject(n) : void 0;
|
|
362
363
|
return o && o.parentID && (o = E.getSceneObject(o.parentID)), s = new Ae(r.re, o, r.re.features, r.re.add, t, e), o && Reflect.has(o, "allowPicking") && Reflect.has(o, "pickedEvent") && (o.allowPicking ?? !1) && o.pickedEvent.emit(s), o && Reflect.has(o, "allowPicking") && !o.allowPicking ? new Ae() : s;
|
|
363
|
-
},
|
|
364
|
-
const t = await
|
|
364
|
+
}, vs = async (d, e) => {
|
|
365
|
+
const t = await d.callUeFunc({
|
|
365
366
|
f: "pickPosition",
|
|
366
367
|
p: { screenPosition: e }
|
|
367
368
|
});
|
|
@@ -371,8 +372,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
371
372
|
}
|
|
372
373
|
const { position: i } = t.re;
|
|
373
374
|
return i;
|
|
374
|
-
},
|
|
375
|
-
const r = await
|
|
375
|
+
}, fs = async (d, e, t, i = "ECC_Visibility") => {
|
|
376
|
+
const r = await d.callUeFunc({
|
|
376
377
|
f: "GetHeightByLonLat",
|
|
377
378
|
p: { Lon: e, Lat: t, Channel: i }
|
|
378
379
|
});
|
|
@@ -381,8 +382,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
381
382
|
return;
|
|
382
383
|
}
|
|
383
384
|
return r.re;
|
|
384
|
-
},
|
|
385
|
-
const i = await
|
|
385
|
+
}, gs = async (d, e, t = "ECC_Visibility") => {
|
|
386
|
+
const i = await d.callUeFunc({
|
|
386
387
|
f: "GetHeightsByLonLats",
|
|
387
388
|
p: { LonLats: e, Channel: t }
|
|
388
389
|
});
|
|
@@ -396,8 +397,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
396
397
|
} catch {
|
|
397
398
|
return;
|
|
398
399
|
}
|
|
399
|
-
},
|
|
400
|
-
const i = await
|
|
400
|
+
}, ws = async (d, e = 64, t = 64) => {
|
|
401
|
+
const i = await d.callUeFunc({
|
|
401
402
|
f: "capture",
|
|
402
403
|
p: { resx: e, resy: t }
|
|
403
404
|
});
|
|
@@ -406,8 +407,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
406
407
|
return;
|
|
407
408
|
}
|
|
408
409
|
return i.re.image;
|
|
409
|
-
},
|
|
410
|
-
const i = await
|
|
410
|
+
}, ys = async (d, e, t = [64, 64]) => {
|
|
411
|
+
const i = await d.callUeFunc({
|
|
411
412
|
f: "partialCapture",
|
|
412
413
|
p: {
|
|
413
414
|
startPos: e,
|
|
@@ -419,14 +420,14 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
419
420
|
return;
|
|
420
421
|
}
|
|
421
422
|
return i.re.image;
|
|
422
|
-
},
|
|
423
|
-
const t = await
|
|
423
|
+
}, ms = async (d, e) => {
|
|
424
|
+
const t = await d.callUeFunc({
|
|
424
425
|
f: "LonLatAltToScreenPosition",
|
|
425
426
|
p: { LonLatAlt: e }
|
|
426
427
|
});
|
|
427
428
|
return t.error && console.warn(t.error), t.re;
|
|
428
|
-
},
|
|
429
|
-
const t = await
|
|
429
|
+
}, Cs = async (d, e) => {
|
|
430
|
+
const t = await d.callUeFunc({
|
|
430
431
|
f: "UEPositionToLonLatAlt",
|
|
431
432
|
p: { UEPosition: e }
|
|
432
433
|
});
|
|
@@ -435,8 +436,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
435
436
|
return;
|
|
436
437
|
}
|
|
437
438
|
return [...t.re.LonLatAlt];
|
|
438
|
-
},
|
|
439
|
-
const t = await
|
|
439
|
+
}, Fs = async (d, e) => {
|
|
440
|
+
const t = await d.callUeFunc({
|
|
440
441
|
f: "GetAllSocketNamesByActorTag",
|
|
441
442
|
p: { ActorTag: e }
|
|
442
443
|
});
|
|
@@ -445,8 +446,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
445
446
|
return;
|
|
446
447
|
}
|
|
447
448
|
return [...t.re.socketNames];
|
|
448
|
-
},
|
|
449
|
-
const e = await
|
|
449
|
+
}, Is = async (d) => {
|
|
450
|
+
const e = await d.callUeFunc({
|
|
450
451
|
f: "GetVersion",
|
|
451
452
|
p: void 0
|
|
452
453
|
});
|
|
@@ -455,8 +456,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
455
456
|
return;
|
|
456
457
|
}
|
|
457
458
|
return e.re.version;
|
|
458
|
-
},
|
|
459
|
-
const t = await
|
|
459
|
+
}, Es = async (d, e) => {
|
|
460
|
+
const t = await d.callUeFunc({
|
|
460
461
|
f: "GetBoundSphere",
|
|
461
462
|
p: { id: e }
|
|
462
463
|
});
|
|
@@ -465,8 +466,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
465
466
|
return;
|
|
466
467
|
}
|
|
467
468
|
return t.re;
|
|
468
|
-
},
|
|
469
|
-
const t = await
|
|
469
|
+
}, Ss = async (d, e) => {
|
|
470
|
+
const t = await d.callUeFunc({
|
|
470
471
|
f: "GetBoundSphereWithChildren",
|
|
471
472
|
p: { id: e }
|
|
472
473
|
});
|
|
@@ -475,8 +476,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
475
476
|
return;
|
|
476
477
|
}
|
|
477
478
|
return t.re;
|
|
478
|
-
},
|
|
479
|
-
const t = await
|
|
479
|
+
}, Ts = async (d, e) => {
|
|
480
|
+
const t = await d.callUeFunc({
|
|
480
481
|
f: "GetStrokeMaterialParamInfo",
|
|
481
482
|
p: { id: e }
|
|
482
483
|
});
|
|
@@ -485,8 +486,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
485
486
|
return;
|
|
486
487
|
}
|
|
487
488
|
return t.re;
|
|
488
|
-
},
|
|
489
|
-
const t = await
|
|
489
|
+
}, xs = async (d, e) => {
|
|
490
|
+
const t = await d.callUeFunc({
|
|
490
491
|
f: "GetFillMaterialParamInfo",
|
|
491
492
|
p: { id: e }
|
|
492
493
|
});
|
|
@@ -495,8 +496,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
495
496
|
return;
|
|
496
497
|
}
|
|
497
498
|
return t.re;
|
|
498
|
-
},
|
|
499
|
-
const t = await
|
|
499
|
+
}, Rs = async (d, e) => {
|
|
500
|
+
const t = await d.callUeFunc({
|
|
500
501
|
f: "getGlobalProperty",
|
|
501
502
|
p: { props: e }
|
|
502
503
|
});
|
|
@@ -505,8 +506,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
505
506
|
return;
|
|
506
507
|
}
|
|
507
508
|
return t.re;
|
|
508
|
-
},
|
|
509
|
-
const t = await
|
|
509
|
+
}, Ls = async (d, e) => {
|
|
510
|
+
const t = await d.callUeFunc({
|
|
510
511
|
f: "GetObjectByInfo",
|
|
511
512
|
p: { info: e }
|
|
512
513
|
});
|
|
@@ -515,63 +516,63 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
515
516
|
return;
|
|
516
517
|
}
|
|
517
518
|
return t.re;
|
|
518
|
-
},
|
|
519
|
+
}, Ps = async (d, e, t) => await d.callUeFunc({
|
|
519
520
|
f: "BindActorByTag",
|
|
520
521
|
p: { ID: e, ActorTag: t }
|
|
521
|
-
}),
|
|
522
|
+
}), ks = async (d) => await d.callUeFunc({
|
|
522
523
|
f: "RestoreOriginalScene",
|
|
523
524
|
p: void 0
|
|
524
|
-
}),
|
|
525
|
+
}), Ds = async (d, e) => await d.callUeFunc({
|
|
525
526
|
f: "UnBindActorByID",
|
|
526
527
|
p: { ID: e }
|
|
527
|
-
}),
|
|
528
|
+
}), Bs = async (d, e) => await d.callUeFunc({
|
|
528
529
|
f: "UnBindActorByTag",
|
|
529
530
|
p: { ActorTag: e }
|
|
530
|
-
}),
|
|
531
|
+
}), _s = async (d, e, t) => await d.callUeFunc({
|
|
531
532
|
f: "CreateActorByClass",
|
|
532
533
|
p: { ID: e, ActorClass: t }
|
|
533
|
-
}),
|
|
534
|
-
return await
|
|
534
|
+
}), Ms = async function(d, e, t) {
|
|
535
|
+
return await d.callUeFunc({
|
|
535
536
|
f: "Bind3DTilesetByTag",
|
|
536
537
|
p: { ID: e, ActorTag: t }
|
|
537
538
|
});
|
|
538
|
-
},
|
|
539
|
-
return await
|
|
539
|
+
}, $s = async function(d, e) {
|
|
540
|
+
return await d.callUeFunc({
|
|
540
541
|
f: "UnBind3DTilesetByTag",
|
|
541
542
|
p: { ActorTag: e }
|
|
542
543
|
});
|
|
543
|
-
},
|
|
544
|
-
return await
|
|
544
|
+
}, Ws = async function(d, e) {
|
|
545
|
+
return await d.callUeFunc({
|
|
545
546
|
f: "UnBind3DTilesetById",
|
|
546
547
|
p: { ID: e }
|
|
547
548
|
});
|
|
548
|
-
},
|
|
549
|
-
return await
|
|
549
|
+
}, As = async function(d, e, t, i) {
|
|
550
|
+
return await d.callUeFunc({
|
|
550
551
|
f: "BindImageryByTag",
|
|
551
552
|
p: { ID: e, ActorTag: t, ComponentTag: i }
|
|
552
553
|
});
|
|
553
|
-
},
|
|
554
|
-
return await
|
|
554
|
+
}, Us = async function(d, e, t) {
|
|
555
|
+
return await d.callUeFunc({
|
|
555
556
|
f: "UnBindImageryByTag",
|
|
556
557
|
p: { ActorTag: e, ComponentTag: t }
|
|
557
558
|
});
|
|
558
|
-
},
|
|
559
|
-
return await
|
|
559
|
+
}, Ns = async function(d, e) {
|
|
560
|
+
return await d.callUeFunc({
|
|
560
561
|
f: "UnBindImageryById",
|
|
561
562
|
p: { ID: e }
|
|
562
563
|
});
|
|
563
|
-
},
|
|
564
|
-
return await
|
|
564
|
+
}, zs = async function(d, e, t, i) {
|
|
565
|
+
return await d.callUeFunc({
|
|
565
566
|
f: "GetIdByComponentNameAndHitItem",
|
|
566
567
|
p: { id: e, ComponentName: t, HitItem: i }
|
|
567
568
|
});
|
|
568
|
-
},
|
|
569
|
-
return await
|
|
569
|
+
}, bs = async function(d, e = "ECC_Visibility") {
|
|
570
|
+
return await d.callUeFunc({
|
|
570
571
|
f: "GetCameraRelativeHeight",
|
|
571
572
|
p: { Channel: e }
|
|
572
573
|
});
|
|
573
|
-
}, Hs = async function(
|
|
574
|
-
const r = await
|
|
574
|
+
}, Hs = async function(d, e, t, i) {
|
|
575
|
+
const r = await d.callUeFunc({
|
|
575
576
|
f: "SaveStringToFile",
|
|
576
577
|
p: {
|
|
577
578
|
String: e,
|
|
@@ -580,8 +581,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
580
581
|
}
|
|
581
582
|
});
|
|
582
583
|
return r.error !== "" && console.warn("SaveStringToFile: ", r.error), r;
|
|
583
|
-
},
|
|
584
|
-
const i = await
|
|
584
|
+
}, Js = async function(d, e, t = !0) {
|
|
585
|
+
const i = await d.callUeFunc({
|
|
585
586
|
f: "HighlightActorByTag",
|
|
586
587
|
p: {
|
|
587
588
|
ActorTag: e,
|
|
@@ -589,14 +590,14 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
589
590
|
}
|
|
590
591
|
});
|
|
591
592
|
return i.error !== "" && console.warn("HighlightActorByTag: ", i.error), i;
|
|
592
|
-
},
|
|
593
|
-
const t = await
|
|
593
|
+
}, Gs = async function(d, e) {
|
|
594
|
+
const t = await d.callUeFunc({
|
|
594
595
|
f: "SendCustomMessage",
|
|
595
596
|
p: { Message: e }
|
|
596
597
|
});
|
|
597
598
|
return t.error !== "" && console.warn("SendCustomMessage: ", t.error), t;
|
|
598
|
-
},
|
|
599
|
-
const e = await
|
|
599
|
+
}, Ks = async function(d) {
|
|
600
|
+
const e = await d.callUeFunc({
|
|
600
601
|
f: "GetStatus",
|
|
601
602
|
p: void 0
|
|
602
603
|
});
|
|
@@ -605,8 +606,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
605
606
|
return;
|
|
606
607
|
}
|
|
607
608
|
return e.re;
|
|
608
|
-
},
|
|
609
|
-
const n = await
|
|
609
|
+
}, Xs = async (d, e, t, i, r = !0) => {
|
|
610
|
+
const n = await d.callUeFunc({
|
|
610
611
|
f: "startEditing",
|
|
611
612
|
p: {
|
|
612
613
|
sceneObjectID: e,
|
|
@@ -620,8 +621,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
620
621
|
return;
|
|
621
622
|
}
|
|
622
623
|
return n;
|
|
623
|
-
},
|
|
624
|
-
const e = await
|
|
624
|
+
}, Ys = async (d) => {
|
|
625
|
+
const e = await d.callUeFunc({
|
|
625
626
|
f: "stopEditing",
|
|
626
627
|
p: void 0
|
|
627
628
|
});
|
|
@@ -630,8 +631,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
630
631
|
return;
|
|
631
632
|
}
|
|
632
633
|
return e;
|
|
633
|
-
},
|
|
634
|
-
const i = await
|
|
634
|
+
}, Zs = async (d, e, t) => {
|
|
635
|
+
const i = await d.callUeFunc({
|
|
635
636
|
f: "moveObjects",
|
|
636
637
|
p: {
|
|
637
638
|
sceneObjectIDs: e,
|
|
@@ -643,8 +644,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
643
644
|
return;
|
|
644
645
|
}
|
|
645
646
|
return i;
|
|
646
|
-
},
|
|
647
|
-
const e = await
|
|
647
|
+
}, qs = async (d) => {
|
|
648
|
+
const e = await d.callUeFunc({
|
|
648
649
|
f: "GetTilesetMaterialIDList",
|
|
649
650
|
p: void 0
|
|
650
651
|
});
|
|
@@ -656,7 +657,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
656
657
|
};
|
|
657
658
|
class Be extends m {
|
|
658
659
|
}
|
|
659
|
-
const
|
|
660
|
+
const Qs = {
|
|
660
661
|
Response: 1
|
|
661
662
|
}, Ie = {
|
|
662
663
|
/*
|
|
@@ -666,7 +667,7 @@ const qs = {
|
|
|
666
667
|
UIInteraction: 50,
|
|
667
668
|
MouseWheel: 75
|
|
668
669
|
};
|
|
669
|
-
class
|
|
670
|
+
class Vs extends Mr {
|
|
670
671
|
constructor(t, i) {
|
|
671
672
|
super(t);
|
|
672
673
|
v(this, "_processResponseFn", (t) => this.esUeViewer.processResponse(t));
|
|
@@ -693,7 +694,7 @@ class Qs extends _r {
|
|
|
693
694
|
if (this.isDestroyed())
|
|
694
695
|
return;
|
|
695
696
|
let n = r.target.result, s = new Uint32Array(n), o = 0;
|
|
696
|
-
if (s[0] ===
|
|
697
|
+
if (s[0] === Qs.Response) {
|
|
697
698
|
o += 4;
|
|
698
699
|
let h = s[o / 4];
|
|
699
700
|
o += 4;
|
|
@@ -739,10 +740,10 @@ class Qs extends _r {
|
|
|
739
740
|
this._inner && this._inner.close();
|
|
740
741
|
}
|
|
741
742
|
}
|
|
742
|
-
|
|
743
|
-
let
|
|
744
|
-
|
|
745
|
-
class
|
|
743
|
+
globalThis.g_emitDescriptor_maxBytes = 3e4;
|
|
744
|
+
let Os = -1;
|
|
745
|
+
wr.SetLoggerVerbosity(1);
|
|
746
|
+
class js extends m {
|
|
746
747
|
constructor(t, i) {
|
|
747
748
|
super();
|
|
748
749
|
v(this, "_eventTarget", new EventTarget());
|
|
@@ -779,7 +780,7 @@ class Os extends m {
|
|
|
779
780
|
return this.eventTarget.dispatchEvent(t);
|
|
780
781
|
}
|
|
781
782
|
_initPixelStream(t, i) {
|
|
782
|
-
const r = new
|
|
783
|
+
const r = new yr({
|
|
783
784
|
initialSettings: {
|
|
784
785
|
AutoPlayVideo: !0,
|
|
785
786
|
AutoConnect: !0,
|
|
@@ -787,16 +788,16 @@ class Os extends m {
|
|
|
787
788
|
StartVideoMuted: !1,
|
|
788
789
|
// WaitForStreamer: true,
|
|
789
790
|
SuppressBrowserKeys: !1,
|
|
790
|
-
[
|
|
791
|
+
[qn.SignallingServerUrl]: i
|
|
791
792
|
}
|
|
792
793
|
});
|
|
793
|
-
return r.setFlagEnabled(ot.BrowserSendOffer, !1), r.setFlagEnabled(ot.HoveringMouseMode, !0), r.setFlagEnabled(ot.MatchViewportResolution, !0), r.setNumericSetting(
|
|
794
|
+
return r.setFlagEnabled(ot.BrowserSendOffer, !1), r.setFlagEnabled(ot.HoveringMouseMode, !0), r.setFlagEnabled(ot.MatchViewportResolution, !0), r.setNumericSetting(mr.MaxReconnectAttempts, 0), new Cr(r, { videoElementParent: t });
|
|
794
795
|
}
|
|
795
796
|
get pixelStream() {
|
|
796
797
|
return this._pixelStream;
|
|
797
798
|
}
|
|
798
799
|
_initEsMsgWsWrapper(t) {
|
|
799
|
-
return t ? this.dv(new
|
|
800
|
+
return t ? this.dv(new Vs(this, t)) : void 0;
|
|
800
801
|
}
|
|
801
802
|
get esMsgWsWrapper() {
|
|
802
803
|
return this._esMsgWsWrapper;
|
|
@@ -859,7 +860,7 @@ class Os extends m {
|
|
|
859
860
|
// 发送UI interface
|
|
860
861
|
emitUIInteractionForBigData(t, i) {
|
|
861
862
|
typeof i == "function" && (t.callid = _(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
862
|
-
const r = JSON.stringify(t), n =
|
|
863
|
+
const r = JSON.stringify(t), n = globalThis.g_emitDescriptor_maxBytes, s = r.length, o = ++Os;
|
|
863
864
|
if (this.esMsgWsWrapper) {
|
|
864
865
|
if (s < n) {
|
|
865
866
|
this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-0/1-` + r);
|
|
@@ -895,12 +896,12 @@ class Os extends m {
|
|
|
895
896
|
console.log(`resizeUEVideo emitCommand ${t} ${i} begin`), this.emitCommand(r);
|
|
896
897
|
}
|
|
897
898
|
}
|
|
898
|
-
class
|
|
899
|
+
class to extends m {
|
|
899
900
|
constructor(t, i, r) {
|
|
900
901
|
super();
|
|
901
902
|
v(this, "_instance");
|
|
902
903
|
v(this, "_event", this.dv(new S()));
|
|
903
|
-
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new
|
|
904
|
+
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new js(this._container, { url: this._wsuri, esmsgWsUri: this._esmsgWsUri })), this.instanceInit();
|
|
904
905
|
}
|
|
905
906
|
get webSocketReady() {
|
|
906
907
|
return this._instance.esWebSocketReady;
|
|
@@ -959,7 +960,7 @@ class js extends m {
|
|
|
959
960
|
this._instance.resizeUEVideo(t, i);
|
|
960
961
|
}
|
|
961
962
|
}
|
|
962
|
-
class
|
|
963
|
+
class eo extends Be {
|
|
963
964
|
constructor(t, i, r, n) {
|
|
964
965
|
super();
|
|
965
966
|
v(this, "_esueViewerWrapper");
|
|
@@ -977,7 +978,7 @@ class to extends Be {
|
|
|
977
978
|
v(this, "_webRtcConnected", this.dv(W(!1)));
|
|
978
979
|
this._ueViewer = n, console.log("CSTMPSViewer init ! 以官方像素流 + 独立通信的模式启动!");
|
|
979
980
|
const s = this._ueViewer;
|
|
980
|
-
this._esueViewerWrapper = this.dv(new
|
|
981
|
+
this._esueViewerWrapper = this.dv(new to(t, i, r));
|
|
981
982
|
const o = this._esueViewerWrapper;
|
|
982
983
|
{
|
|
983
984
|
const u = () => o.debug = s.debug ?? !1;
|
|
@@ -1016,7 +1017,7 @@ class to extends Be {
|
|
|
1016
1017
|
} else u === "webRtcConnected" ? this.webRtcConnected = !0 : u === "videoinited" ? this.videoinited = !0 : u === "esmsgwsopen" && (this.esmsgwsopen = !0);
|
|
1017
1018
|
}));
|
|
1018
1019
|
{
|
|
1019
|
-
const u = this.dv(
|
|
1020
|
+
const u = this.dv(be());
|
|
1020
1021
|
let c, f;
|
|
1021
1022
|
u.start(() => {
|
|
1022
1023
|
if (c !== t.offsetWidth || f !== t.offsetHeight) {
|
|
@@ -1058,7 +1059,7 @@ class to extends Be {
|
|
|
1058
1059
|
this._waitingUeFuncIdAndResultCallbacks.set(c.fid, f);
|
|
1059
1060
|
this._ueFuncWithIdAndResultCallbacks.length = 0;
|
|
1060
1061
|
{
|
|
1061
|
-
const c =
|
|
1062
|
+
const c = globalThis.g_emitDescriptor_maxBytes, f = u.map((R) => ({ f: R, s: JSON.stringify(R).length }));
|
|
1062
1063
|
let w = f.length, y = 0, x = 0, C = [];
|
|
1063
1064
|
do {
|
|
1064
1065
|
do {
|
|
@@ -1142,28 +1143,27 @@ class to extends Be {
|
|
|
1142
1143
|
};
|
|
1143
1144
|
}
|
|
1144
1145
|
}
|
|
1145
|
-
function
|
|
1146
|
+
function io(d) {
|
|
1146
1147
|
let e = "";
|
|
1147
|
-
const t = new Uint8Array(
|
|
1148
|
+
const t = new Uint8Array(d), i = t.length;
|
|
1148
1149
|
for (let r = 0; r < i; r++)
|
|
1149
1150
|
e += String.fromCharCode(t[r]);
|
|
1150
1151
|
return btoa(e);
|
|
1151
1152
|
}
|
|
1152
|
-
const
|
|
1153
|
+
const ro = (d) => {
|
|
1153
1154
|
const e = {
|
|
1154
1155
|
type: "input",
|
|
1155
|
-
inputdata:
|
|
1156
|
+
inputdata: io(d)
|
|
1156
1157
|
};
|
|
1157
1158
|
return JSON.stringify(e);
|
|
1158
1159
|
};
|
|
1159
|
-
function
|
|
1160
|
-
return typeof
|
|
1160
|
+
function no(d) {
|
|
1161
|
+
return typeof d == "string" ? document.getElementById(d) : d;
|
|
1161
1162
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
class so extends m {
|
|
1163
|
+
globalThis.g_emitDescriptor_maxBytes = 3e4;
|
|
1164
|
+
let so = -1;
|
|
1165
|
+
wr.SetLoggerVerbosity(1);
|
|
1166
|
+
class oo extends m {
|
|
1167
1167
|
constructor(t, i) {
|
|
1168
1168
|
super();
|
|
1169
1169
|
v(this, "debug", !1);
|
|
@@ -1174,7 +1174,7 @@ class so extends m {
|
|
|
1174
1174
|
//发送时记录消息,回调函数中对应消息后再删除
|
|
1175
1175
|
v(this, "uiInteractionCallbacks", /* @__PURE__ */ new Map());
|
|
1176
1176
|
this._container = t, this._option = i;
|
|
1177
|
-
const r = new
|
|
1177
|
+
const r = new yr({
|
|
1178
1178
|
initialSettings: {
|
|
1179
1179
|
HoveringMouse: !0,
|
|
1180
1180
|
AutoPlayVideo: !0,
|
|
@@ -1186,13 +1186,13 @@ class so extends m {
|
|
|
1186
1186
|
},
|
|
1187
1187
|
useUrlParams: !0
|
|
1188
1188
|
});
|
|
1189
|
-
r.setFlagEnabled(ot.BrowserSendOffer, !1), r.setFlagEnabled(ot.HoveringMouseMode, !0), r.setFlagEnabled(ot.MatchViewportResolution, !0), r.setNumericSetting(
|
|
1189
|
+
r.setFlagEnabled(ot.BrowserSendOffer, !1), r.setFlagEnabled(ot.HoveringMouseMode, !0), r.setFlagEnabled(ot.MatchViewportResolution, !0), r.setNumericSetting(mr.MaxReconnectAttempts, 0), this._pixelStream = new Cr(r, { videoElementParent: this.container }), this.d(() => {
|
|
1190
1190
|
this._pixelStream.disconnect();
|
|
1191
1191
|
});
|
|
1192
1192
|
{
|
|
1193
1193
|
const n = this.pixelStream.webSocketController.webSocket, s = this._pixelStream._webRtcController.sendMessageController.dataChannelSender.sendData;
|
|
1194
1194
|
this._pixelStream._webRtcController.sendMessageController.dataChannelSender.constructor.prototype.sendData = function(o) {
|
|
1195
|
-
n ? n.send(
|
|
1195
|
+
n ? n.send(ro(o)) : s.call(this, o);
|
|
1196
1196
|
};
|
|
1197
1197
|
}
|
|
1198
1198
|
{
|
|
@@ -1237,7 +1237,7 @@ class so extends m {
|
|
|
1237
1237
|
return this._ueevent;
|
|
1238
1238
|
}
|
|
1239
1239
|
get container() {
|
|
1240
|
-
return
|
|
1240
|
+
return no(this._container);
|
|
1241
1241
|
}
|
|
1242
1242
|
get pixelStream() {
|
|
1243
1243
|
return this._pixelStream;
|
|
@@ -1265,7 +1265,7 @@ class so extends m {
|
|
|
1265
1265
|
//大数据拆分
|
|
1266
1266
|
emitUIInteractionForBigData(t, i) {
|
|
1267
1267
|
typeof i == "function" && (t.callid = _(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
1268
|
-
const r = JSON.stringify(t), n =
|
|
1268
|
+
const r = JSON.stringify(t), n = globalThis.g_emitDescriptor_maxBytes ?? 3e4, s = r.length, o = ++so;
|
|
1269
1269
|
if (s < n) {
|
|
1270
1270
|
const g = {
|
|
1271
1271
|
type: "earthsdk",
|
|
@@ -1277,8 +1277,8 @@ class so extends m {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
const h = Math.ceil(s / n) | 0;
|
|
1279
1279
|
[...new Array(h).keys()].map((g) => r.slice(g * n, (g + 1) * n)).forEach((g, p) => {
|
|
1280
|
-
const
|
|
1281
|
-
this.sendData(JSON.stringify(
|
|
1280
|
+
const l = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${p}/${h}-` + g };
|
|
1281
|
+
this.sendData(JSON.stringify(l));
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
1284
1284
|
sendData(t) {
|
|
@@ -1318,12 +1318,12 @@ class so extends m {
|
|
|
1318
1318
|
console.log(`resizeUEVideo emitCommand ${t} ${i} begin`), this.emitCommand(r);
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
|
-
class
|
|
1321
|
+
class ao extends m {
|
|
1322
1322
|
constructor(t, i, r) {
|
|
1323
1323
|
super();
|
|
1324
1324
|
v(this, "_instance");
|
|
1325
1325
|
v(this, "_event", this.dv(new S()));
|
|
1326
|
-
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new
|
|
1326
|
+
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new oo(this._container, { ws: this._wsuri })), this.d(this._instance.connected.don((n) => {
|
|
1327
1327
|
this._event.emit(n, n), console.log(`%c[EarthSDK] ${n}`, "background: #a6ec99; color: black");
|
|
1328
1328
|
})), this.d(this._instance.error.don((n) => {
|
|
1329
1329
|
this._event.emit("errorEvent", n), console.log(`%c[EarthSDK] ${n}`, "background: red; color: black");
|
|
@@ -1362,7 +1362,7 @@ class oo extends m {
|
|
|
1362
1362
|
this._instance.resizeUEVideo(t, i);
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
|
-
class
|
|
1365
|
+
class lo extends Be {
|
|
1366
1366
|
constructor(t, i, r, n) {
|
|
1367
1367
|
super();
|
|
1368
1368
|
v(this, "_videoInitialized", this.dv(W(!1)));
|
|
@@ -1377,40 +1377,40 @@ class ao extends Be {
|
|
|
1377
1377
|
v(this, "_errorEvent", this.dv(new S()));
|
|
1378
1378
|
v(this, "_readyEvent", this.dv(new S()));
|
|
1379
1379
|
this._ueViewer = n, console.log("INNPSViewer init ! 以内置信令服务器模式启动!");
|
|
1380
|
-
const s = this._ueViewer, o = this.dv(new
|
|
1380
|
+
const s = this._ueViewer, o = this.dv(new ao(t, i, r));
|
|
1381
1381
|
this._ue5ViewerWrapper = o;
|
|
1382
1382
|
{
|
|
1383
|
-
const
|
|
1384
|
-
|
|
1383
|
+
const l = () => o.debug = s.debug ?? !1;
|
|
1384
|
+
l(), this.d(s.debugChanged.don(l));
|
|
1385
1385
|
}
|
|
1386
1386
|
{
|
|
1387
|
-
let
|
|
1387
|
+
let l = !1;
|
|
1388
1388
|
const u = this.dv(P(
|
|
1389
1389
|
this._videoInitialized.changed,
|
|
1390
1390
|
this._webRtcConnected.changed,
|
|
1391
1391
|
this._webSocketOpen.changed
|
|
1392
1392
|
));
|
|
1393
1393
|
this.d(u.don(() => {
|
|
1394
|
-
if (
|
|
1394
|
+
if (l) return;
|
|
1395
1395
|
const c = this._ue5ViewerWrapper.instance.webSocketReady;
|
|
1396
1396
|
if (this.videoInitialized && this.webRtcConnected && c) {
|
|
1397
|
-
this._ue5ViewerWrapper.instance.emitUIInteraction(), this._readyEvent.emit(),
|
|
1397
|
+
this._ue5ViewerWrapper.instance.emitUIInteraction(), this._readyEvent.emit(), l = !0, console.log("%c[EarthSDK videoInitialized && webRtcConnected && webSocketReady]", "background: #a6ec99; color: black");
|
|
1398
1398
|
const f = { eventType: "init", params: {} };
|
|
1399
1399
|
this._ue5ViewerWrapper.emitUIInteractionForBigData(f);
|
|
1400
1400
|
} else
|
|
1401
|
-
console.warn("webSocketReady", c),
|
|
1401
|
+
console.warn("webSocketReady", c), l = !1;
|
|
1402
1402
|
}));
|
|
1403
1403
|
}
|
|
1404
|
-
this.d(o.event.don((
|
|
1405
|
-
if (
|
|
1404
|
+
this.d(o.event.don((l, u) => {
|
|
1405
|
+
if (l === "errorEvent")
|
|
1406
1406
|
this._errorEvent.emit(u);
|
|
1407
|
-
else if (
|
|
1407
|
+
else if (l === "videoInitialized")
|
|
1408
1408
|
this._videoInitialized.value = !0;
|
|
1409
|
-
else if (
|
|
1409
|
+
else if (l === "webRtcConnected")
|
|
1410
1410
|
this._webRtcConnected.value = !0;
|
|
1411
|
-
else if (
|
|
1411
|
+
else if (l === "webSocketOpen")
|
|
1412
1412
|
this._webSocketOpen.value = !0;
|
|
1413
|
-
else if (
|
|
1413
|
+
else if (l === "ueevent") {
|
|
1414
1414
|
const c = JSON.parse(u);
|
|
1415
1415
|
if (c.t === "cr") {
|
|
1416
1416
|
const f = c;
|
|
@@ -1421,9 +1421,9 @@ class ao extends Be {
|
|
|
1421
1421
|
}
|
|
1422
1422
|
}));
|
|
1423
1423
|
{
|
|
1424
|
-
const
|
|
1424
|
+
const l = this.dv(be());
|
|
1425
1425
|
let u, c, f;
|
|
1426
|
-
|
|
1426
|
+
l.start(() => {
|
|
1427
1427
|
if (u !== t.offsetWidth || c !== t.offsetHeight || f !== s.resolutionScale) {
|
|
1428
1428
|
if (u = t.offsetWidth, c = t.offsetHeight, u === void 0 || c === void 0 || !Number.isFinite(u) || !Number.isFinite(c) || u < 0 || c < 0) {
|
|
1429
1429
|
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${u} ${c}`);
|
|
@@ -1433,19 +1433,19 @@ class ao extends Be {
|
|
|
1433
1433
|
}
|
|
1434
1434
|
});
|
|
1435
1435
|
}
|
|
1436
|
-
this.d(this._ueFuncResultWithIdsEvent.don((
|
|
1437
|
-
for (const u of
|
|
1436
|
+
this.d(this._ueFuncResultWithIdsEvent.don((l) => {
|
|
1437
|
+
for (const u of l) {
|
|
1438
1438
|
const c = this._waitingUeFuncIdAndResultCallbacks.get(u.fid);
|
|
1439
1439
|
c && (this._waitingUeFuncIdAndResultCallbacks.delete(u.fid), c.resultCallback(u.r));
|
|
1440
1440
|
}
|
|
1441
1441
|
}));
|
|
1442
1442
|
let h = 0;
|
|
1443
|
-
const a = (
|
|
1443
|
+
const a = (l) => {
|
|
1444
1444
|
const u = {
|
|
1445
1445
|
n: h++,
|
|
1446
1446
|
tt: Date.now(),
|
|
1447
1447
|
t: "c",
|
|
1448
|
-
fs:
|
|
1448
|
+
fs: l
|
|
1449
1449
|
};
|
|
1450
1450
|
this._waitingUeCalls.add(u), s.debug && (console.group(
|
|
1451
1451
|
"%cxe2 => ue",
|
|
@@ -1463,7 +1463,7 @@ class ao extends Be {
|
|
|
1463
1463
|
this._waitingUeFuncIdAndResultCallbacks.set(c.fid, f);
|
|
1464
1464
|
this._ueFuncWithIdAndResultCallbacks.length = 0;
|
|
1465
1465
|
{
|
|
1466
|
-
const c =
|
|
1466
|
+
const c = globalThis.g_emitDescriptor_maxBytes, f = u.map((R) => ({ f: R, s: JSON.stringify(R).length }));
|
|
1467
1467
|
let w = f.length, y = 0, x = 0, C = [];
|
|
1468
1468
|
do {
|
|
1469
1469
|
do {
|
|
@@ -1528,7 +1528,7 @@ class ao extends Be {
|
|
|
1528
1528
|
};
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
|
-
class
|
|
1531
|
+
class co extends m {
|
|
1532
1532
|
/**
|
|
1533
1533
|
* Creates an instance of DLViewer.
|
|
1534
1534
|
* @param {HTMLDivElement} container
|
|
@@ -1568,26 +1568,26 @@ class lo extends m {
|
|
|
1568
1568
|
return this._vIframe;
|
|
1569
1569
|
}
|
|
1570
1570
|
}
|
|
1571
|
-
const Ze = typeof TextDecoder < "u" ? new TextDecoder() : void 0,
|
|
1571
|
+
const Ze = typeof TextDecoder < "u" ? new TextDecoder() : void 0, uo = (d, e = 0, t = NaN) => {
|
|
1572
1572
|
const i = e + t;
|
|
1573
1573
|
let r = e;
|
|
1574
|
-
for (;
|
|
1575
|
-
if (r - e > 16 &&
|
|
1576
|
-
return Ze.decode(
|
|
1574
|
+
for (; d[r] && !(r >= i); ) ++r;
|
|
1575
|
+
if (r - e > 16 && d.buffer && Ze)
|
|
1576
|
+
return Ze.decode(d.subarray(e, r));
|
|
1577
1577
|
let n = "";
|
|
1578
1578
|
for (; e < r; ) {
|
|
1579
|
-
var s =
|
|
1579
|
+
var s = d[e++];
|
|
1580
1580
|
if (!(s & 128)) {
|
|
1581
1581
|
n += String.fromCharCode(s);
|
|
1582
1582
|
continue;
|
|
1583
1583
|
}
|
|
1584
|
-
var o =
|
|
1584
|
+
var o = d[e++] & 63;
|
|
1585
1585
|
if ((s & 224) == 192) {
|
|
1586
1586
|
n += String.fromCharCode((s & 31) << 6 | o);
|
|
1587
1587
|
continue;
|
|
1588
1588
|
}
|
|
1589
|
-
var h =
|
|
1590
|
-
if ((s & 240) == 224 ? s = (s & 15) << 12 | o << 6 | h : ((s & 248) != 240 && console.warn("Invalid UTF-8 leading byte encountered when deserializing a UTF-8 string in wasm memory to a JS string!"), s = (s & 7) << 18 | o << 12 | h << 6 |
|
|
1589
|
+
var h = d[e++] & 63;
|
|
1590
|
+
if ((s & 240) == 224 ? s = (s & 15) << 12 | o << 6 | h : ((s & 248) != 240 && console.warn("Invalid UTF-8 leading byte encountered when deserializing a UTF-8 string in wasm memory to a JS string!"), s = (s & 7) << 18 | o << 12 | h << 6 | d[e++] & 63), s < 65536)
|
|
1591
1591
|
n += String.fromCharCode(s);
|
|
1592
1592
|
else {
|
|
1593
1593
|
var a = s - 65536;
|
|
@@ -1596,7 +1596,7 @@ const Ze = typeof TextDecoder < "u" ? new TextDecoder() : void 0, co = (l, e = 0
|
|
|
1596
1596
|
}
|
|
1597
1597
|
return n;
|
|
1598
1598
|
};
|
|
1599
|
-
class
|
|
1599
|
+
class ho extends m {
|
|
1600
1600
|
constructor(e, t, i) {
|
|
1601
1601
|
super();
|
|
1602
1602
|
{
|
|
@@ -1623,7 +1623,7 @@ class uo extends m {
|
|
|
1623
1623
|
} catch (n) {
|
|
1624
1624
|
console.error("ueViewer propChanged:" + n);
|
|
1625
1625
|
}
|
|
1626
|
-
})), t.useCustomInteraction = !1, this.dv(new
|
|
1626
|
+
})), t.useCustomInteraction = !1, this.dv(new vr(t, e)), this.dv(new L(t.statusUpdateIntervalChanged, (r) => {
|
|
1627
1627
|
if ((t.statusUpdateInterval ?? 0.5) === 0) return;
|
|
1628
1628
|
const s = new m();
|
|
1629
1629
|
return s.d(i.disposableOnUeEvent("statusUpdate", (o) => {
|
|
@@ -1673,8 +1673,8 @@ class uo extends m {
|
|
|
1673
1673
|
}));
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
|
-
let
|
|
1677
|
-
class
|
|
1676
|
+
let po = -1;
|
|
1677
|
+
class vo extends Be {
|
|
1678
1678
|
/**
|
|
1679
1679
|
* Creates an instance of H5Viewer.
|
|
1680
1680
|
* @param {HTMLDivElement} container
|
|
@@ -1692,21 +1692,21 @@ class po extends Be {
|
|
|
1692
1692
|
v(this, "_waitingUeCalls", /* @__PURE__ */ new Map());
|
|
1693
1693
|
v(this, "_ueEvent", this.dv(new S()));
|
|
1694
1694
|
this._ueViewer = n;
|
|
1695
|
-
const s = this._ueViewer, o = this.dv(new
|
|
1695
|
+
const s = this._ueViewer, o = this.dv(new co(t, i, r, s));
|
|
1696
1696
|
let h = !1, a = null;
|
|
1697
1697
|
this.d(o.onRuntimeInitialized.don(() => {
|
|
1698
1698
|
var u;
|
|
1699
1699
|
if (h = !0, (u = o == null ? void 0 : o.vIframe) != null && u.contentWindow) {
|
|
1700
1700
|
a = o.vIframe.contentWindow;
|
|
1701
1701
|
const c = o.vIframe.contentWindow.document.getElementById("mainarea");
|
|
1702
|
-
c ? this.dv(new
|
|
1702
|
+
c ? this.dv(new ho(c, s, this)) : console.error("h5Container is null");
|
|
1703
1703
|
} else {
|
|
1704
1704
|
console.error("iframeWindow is null");
|
|
1705
1705
|
return;
|
|
1706
1706
|
}
|
|
1707
1707
|
a.UE_JSHTML5Communication ? a.UE_JSHTML5Communication.UESendMessageToJS = (c) => {
|
|
1708
1708
|
try {
|
|
1709
|
-
const f =
|
|
1709
|
+
const f = uo(a.HEAPU8, c), w = JSON.parse(f);
|
|
1710
1710
|
if (s.debug && (console.group(
|
|
1711
1711
|
"%cUE => JS",
|
|
1712
1712
|
" background-color:#006EFF;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
@@ -1743,7 +1743,7 @@ class po extends Be {
|
|
|
1743
1743
|
`%c${JSON.stringify(c, void 0, "")}`,
|
|
1744
1744
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1745
1745
|
), console.groupEnd());
|
|
1746
|
-
const f = JSON.stringify(c), w =
|
|
1746
|
+
const f = JSON.stringify(c), w = globalThis.g_emitDescriptor_maxBytes ?? 3e4, y = f.length, x = ++po;
|
|
1747
1747
|
if (y < w) {
|
|
1748
1748
|
const T = `${x}-0/1-` + f;
|
|
1749
1749
|
a.UE_JSHTML5Communication.JSSendMessageToUE(T);
|
|
@@ -1802,8 +1802,8 @@ class po extends Be {
|
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
let
|
|
1806
|
-
class
|
|
1805
|
+
let fo = -1;
|
|
1806
|
+
class go extends Be {
|
|
1807
1807
|
constructor(t, i) {
|
|
1808
1808
|
super();
|
|
1809
1809
|
v(this, "_ueFuncResultWithIdsEvent", this.dv(new S()));
|
|
@@ -1818,23 +1818,23 @@ class fo extends Be {
|
|
|
1818
1818
|
eventType: "init",
|
|
1819
1819
|
params: {}
|
|
1820
1820
|
};
|
|
1821
|
-
|
|
1821
|
+
globalThis.ue.es.oncommand(JSON.stringify(s)), n = !0, globalThis.calljs = (g, p) => {
|
|
1822
1822
|
if (r.debug && console.log(`calljs eventName:${g} eventDetailStr:${p}`), g === "ueevent" || g === "commanFinish")
|
|
1823
1823
|
try {
|
|
1824
|
-
const
|
|
1825
|
-
if (
|
|
1826
|
-
const u =
|
|
1824
|
+
const l = JSON.parse(p);
|
|
1825
|
+
if (l.t === "cr") {
|
|
1826
|
+
const u = l;
|
|
1827
1827
|
if (u.frs && this._ueFuncResultWithIdsEvent.emit(u.frs), u.ers)
|
|
1828
1828
|
for (let c of u.ers)
|
|
1829
1829
|
this._ueEvent.emit(c);
|
|
1830
1830
|
}
|
|
1831
|
-
} catch (
|
|
1832
|
-
console.error(
|
|
1831
|
+
} catch (l) {
|
|
1832
|
+
console.error(l);
|
|
1833
1833
|
}
|
|
1834
1834
|
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((g) => {
|
|
1835
1835
|
for (const p of g) {
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1836
|
+
const l = this._waitingUeFuncIdAndResultCallbacks.get(p.fid);
|
|
1837
|
+
l && (this._waitingUeFuncIdAndResultCallbacks.delete(p.fid), l(p.r));
|
|
1838
1838
|
}
|
|
1839
1839
|
}));
|
|
1840
1840
|
let o = 0;
|
|
@@ -1855,8 +1855,8 @@ class fo extends Be {
|
|
|
1855
1855
|
`%c${JSON.stringify(p, void 0, "")}`,
|
|
1856
1856
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1857
1857
|
), console.groupEnd());
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1858
|
+
const l = ++fo;
|
|
1859
|
+
globalThis.ue.es.oncommand(`${l}-0/1-` + JSON.stringify(p)).then(() => {
|
|
1860
1860
|
this._waitingUeCalls.delete(p);
|
|
1861
1861
|
});
|
|
1862
1862
|
};
|
|
@@ -1892,7 +1892,7 @@ class fo extends Be {
|
|
|
1892
1892
|
};
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
|
-
class
|
|
1895
|
+
class wo extends m {
|
|
1896
1896
|
constructor(e, t) {
|
|
1897
1897
|
super();
|
|
1898
1898
|
{
|
|
@@ -1969,7 +1969,7 @@ class go extends m {
|
|
|
1969
1969
|
}));
|
|
1970
1970
|
}
|
|
1971
1971
|
}
|
|
1972
|
-
class
|
|
1972
|
+
class yo extends m {
|
|
1973
1973
|
constructor(e, t, i) {
|
|
1974
1974
|
super();
|
|
1975
1975
|
{
|
|
@@ -2003,7 +2003,7 @@ class wo extends m {
|
|
|
2003
2003
|
});
|
|
2004
2004
|
{
|
|
2005
2005
|
const n = (a, g) => {
|
|
2006
|
-
|
|
2006
|
+
globalThis.ue.esinput.setinterceptevent(g), a.preventDefault();
|
|
2007
2007
|
}, s = (a) => {
|
|
2008
2008
|
n(a, !1);
|
|
2009
2009
|
}, o = (a) => {
|
|
@@ -2015,7 +2015,7 @@ class wo extends m {
|
|
|
2015
2015
|
r.removeEventListener("mouseenter", s), r.removeEventListener("mouseleave", o), r.removeEventListener("mousemove", h);
|
|
2016
2016
|
});
|
|
2017
2017
|
}
|
|
2018
|
-
t.useCustomInteraction = !1, this.dv(new
|
|
2018
|
+
t.useCustomInteraction = !1, this.dv(new vr(t, r)), this.dv(new L(t.statusUpdateIntervalChanged, (n) => {
|
|
2019
2019
|
if ((t.statusUpdateInterval ?? 0.5) === 0) return;
|
|
2020
2020
|
const o = new m();
|
|
2021
2021
|
return o.d(i.disposableOnUeEvent("statusUpdate", (h) => {
|
|
@@ -2065,28 +2065,28 @@ class wo extends m {
|
|
|
2065
2065
|
}));
|
|
2066
2066
|
}
|
|
2067
2067
|
}
|
|
2068
|
-
class
|
|
2068
|
+
class mo extends m {
|
|
2069
2069
|
constructor(t, i, r) {
|
|
2070
2070
|
super();
|
|
2071
2071
|
v(this, "_reconnectEvent", this.dv(new S()));
|
|
2072
|
-
const n = (p,
|
|
2072
|
+
const n = (p, l) => p.hasOwnProperty(l);
|
|
2073
2073
|
let s = 0, o;
|
|
2074
2074
|
this.d(() => {
|
|
2075
2075
|
o && clearTimeout(o);
|
|
2076
2076
|
});
|
|
2077
|
-
const a = new URLSearchParams(
|
|
2078
|
-
if (
|
|
2077
|
+
const a = new URLSearchParams(globalThis.location.search).get("eswebview") === "true", g = () => {
|
|
2078
|
+
if (globalThis.ue.esinput) {
|
|
2079
2079
|
r.setStatus("Creating"), console.log("存在(window.ue && window.ue.es && window.ue.esinput 需要适配新版ESWebView 鼠标穿透), 开始创建UeFalseCloudViewer..."), r.setStatusLog("开始创建本地视口...");
|
|
2080
|
-
const p = this.dv(new
|
|
2081
|
-
this.d(() => r.viewer = void 0), r.viewer = p, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new
|
|
2080
|
+
const p = this.dv(new go(t, r));
|
|
2081
|
+
this.d(() => r.viewer = void 0), r.viewer = p, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new yo(t, r, p));
|
|
2082
2082
|
} else
|
|
2083
2083
|
r.setStatus("Error"), r.setStatusLog("请升级 ESWebView !"), this.d(() => r.viewer = void 0), r.viewer = void 0;
|
|
2084
2084
|
};
|
|
2085
|
-
if (
|
|
2085
|
+
if (globalThis.ue && globalThis.ue.es)
|
|
2086
2086
|
g();
|
|
2087
2087
|
else if (a) {
|
|
2088
2088
|
const p = setInterval(() => {
|
|
2089
|
-
|
|
2089
|
+
globalThis.ue && globalThis.ue.es && (clearInterval(p), g());
|
|
2090
2090
|
}, 200);
|
|
2091
2091
|
} else if (n(i.options, "ws") || n(i.options, "uri") && n(i.options, "app")) {
|
|
2092
2092
|
r.setStatus("Creating"), r.setStatusLog("开始创建云渲染视口...");
|
|
@@ -2094,7 +2094,7 @@ class yo extends m {
|
|
|
2094
2094
|
this.d(() => {
|
|
2095
2095
|
r.setStatus("Raw"), r.setStatusLog(""), t && p && t.removeChild(p) && (p = void 0);
|
|
2096
2096
|
});
|
|
2097
|
-
const
|
|
2097
|
+
const l = this.dv(Te(async (u) => {
|
|
2098
2098
|
r.viewer && !r.viewer.isDestroyed() && r.viewer.destroy(), r.viewer = void 0, p && t.removeChild(p) && (p = void 0), p = document.createElement("div"), p.setAttribute("earthsdk3-ue", "earthsdk3-ue-videoContainer"), p.style.cssText = "position:relative; height: 100%;width:100%;", t.appendChild(p);
|
|
2099
2099
|
let c, f, w;
|
|
2100
2100
|
if (n(i.options, "ws")) {
|
|
@@ -2105,41 +2105,41 @@ class yo extends m {
|
|
|
2105
2105
|
const { offsetWidth: R, offsetHeight: T } = p;
|
|
2106
2106
|
let { uri: B, app: _e, token: Xe } = i.options;
|
|
2107
2107
|
B.endsWith("/") || (B += "/");
|
|
2108
|
-
const
|
|
2108
|
+
const xr = Xe ? `?essstoken=${Xe}` : "", Ye = `/${_e}/${R ?? 1920}/${T ?? 1080}` + xr;
|
|
2109
2109
|
console.log(`请求信令服务器: ${B}instance${Ye}`);
|
|
2110
|
-
const
|
|
2110
|
+
const Rr = await u.promise(fetch(`${B}instance${Ye}`, { method: "GET" })), V = await u.promise(Rr.json());
|
|
2111
2111
|
if (V && V.status !== "ok") {
|
|
2112
2112
|
r.setStatus("Error"), r.setStatusLog(`信令服务器请求失败 ${V.status}`), this._reconnectEvent.emit(void 0);
|
|
2113
2113
|
return;
|
|
2114
2114
|
} else {
|
|
2115
|
-
console.log(`信令服务器请求成功! ${JSON.stringify(V, void 0, " ")}`), await
|
|
2116
|
-
const { server:
|
|
2117
|
-
if (!
|
|
2115
|
+
console.log(`信令服务器请求成功! ${JSON.stringify(V, void 0, " ")}`), await $r(2e3);
|
|
2116
|
+
const { server: Lr, esmsg: Pr, instanceId: kr, useInternalSignallingServer: Dr } = V;
|
|
2117
|
+
if (!kr) {
|
|
2118
2118
|
r.setStatus("Error"), r.setStatusLog("检查信令服务器版本,返回数据错误! "), console.log("信令服务器返回数据错误!不包含instanceId!请升级到 ESSS V3.0+ 版本!"), this._reconnectEvent.emit(void 0);
|
|
2119
2119
|
return;
|
|
2120
2120
|
}
|
|
2121
|
-
c =
|
|
2121
|
+
c = Lr, f = Pr, w = Dr ?? !1, r.esssResponse = V;
|
|
2122
2122
|
}
|
|
2123
2123
|
}
|
|
2124
|
-
const y = this.dv(w ? new
|
|
2124
|
+
const y = this.dv(w ? new lo(p, c, f, r) : new eo(p, c, f, r));
|
|
2125
2125
|
this.d(() => r.viewer = void 0), this.d(y.errorEvent.don((R) => {
|
|
2126
2126
|
const T = `[${R}]:像素流连接错误!`;
|
|
2127
2127
|
r.setStatus("Error"), r.setStatusLog(T), this._reconnectEvent.emit(y);
|
|
2128
2128
|
})), await u.promise(new Promise((R) => this.d(y.readyEvent.donce(R)))), r.setStatus("Created"), r.setStatusLog("云渲染视口创建成功!"), s = 0, o && clearTimeout(o), o = void 0;
|
|
2129
2129
|
const { offsetWidth: x, offsetHeight: C } = p;
|
|
2130
|
-
y.resize(x *
|
|
2130
|
+
y.resize(x * globalThis.devicePixelRatio, C * globalThis.devicePixelRatio), r.viewer = y, this.d(() => r.viewer = void 0), this.dv(new wo(r, y));
|
|
2131
2131
|
}));
|
|
2132
|
-
|
|
2133
|
-
o === void 0 && (u && !u.isDestroyed() && u.destroy(), r.viewer && !r.viewer.isDestroyed() && r.viewer.destroy(), r.viewer = void 0, r.autoReconnect && (r.setStatus("Reconnecting"), r.setStatusLog("正在尝试重新连接..."), s = s + 5e3 > 3e4 ? 3e4 : s + 5e3, console.warn(`间隔:${s / 1e3}s,正在尝试重新连接...`), o =
|
|
2134
|
-
|
|
2132
|
+
l.start(), this.d(this._reconnectEvent.don((u) => {
|
|
2133
|
+
o === void 0 && (u && !u.isDestroyed() && u.destroy(), r.viewer && !r.viewer.isDestroyed() && r.viewer.destroy(), r.viewer = void 0, r.autoReconnect && (r.setStatus("Reconnecting"), r.setStatusLog("正在尝试重新连接..."), s = s + 5e3 > 3e4 ? 3e4 : s + 5e3, console.warn(`间隔:${s / 1e3}s,正在尝试重新连接...`), o = globalThis.setTimeout(() => {
|
|
2134
|
+
l.restart();
|
|
2135
2135
|
}, s)));
|
|
2136
|
-
})), this.d(
|
|
2136
|
+
})), this.d(l.errorEvent.don((u) => {
|
|
2137
2137
|
r.setStatus("Error"), r.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!", u), this._reconnectEvent.emit(void 0);
|
|
2138
2138
|
}));
|
|
2139
2139
|
} else if (n(i.options, "project")) {
|
|
2140
|
-
const p = i,
|
|
2140
|
+
const p = i, l = p.options.project, u = p.options.baseUrl;
|
|
2141
2141
|
r.setStatus("Creating"), r.setStatusLog("下载编译中...");
|
|
2142
|
-
const c = this.dv(new
|
|
2142
|
+
const c = this.dv(new vo(t, l, u, r));
|
|
2143
2143
|
r.viewer = c, this.d(() => r.viewer = void 0);
|
|
2144
2144
|
} else
|
|
2145
2145
|
r.setStatus("Error"), r.setStatusLog("视口创建失败!"), console.warn("视口创建失败: 参数错误!");
|
|
@@ -2167,7 +2167,7 @@ const K = class K extends Ee {
|
|
|
2167
2167
|
this.viewerChanged.emit(this.viewer);
|
|
2168
2168
|
})), this.dv(new L(this.subContainerChanged, () => {
|
|
2169
2169
|
if (this.setStatus("Raw"), this.setStatusLog(""), !!this.subContainer)
|
|
2170
|
-
return new
|
|
2170
|
+
return new mo(this.subContainer, i, this);
|
|
2171
2171
|
}));
|
|
2172
2172
|
}
|
|
2173
2173
|
get defaultProps() {
|
|
@@ -2210,14 +2210,14 @@ const K = class K extends Ee {
|
|
|
2210
2210
|
console.warn("UEPositionToLonLatAlt: viewer is undefined");
|
|
2211
2211
|
return;
|
|
2212
2212
|
}
|
|
2213
|
-
return await
|
|
2213
|
+
return await Cs(this.viewer, t);
|
|
2214
2214
|
}
|
|
2215
2215
|
async changeNavigationMode(t) {
|
|
2216
2216
|
if (!this.viewer) {
|
|
2217
2217
|
console.warn("ChangeNavigationMode: viewer is undefined");
|
|
2218
2218
|
return;
|
|
2219
2219
|
}
|
|
2220
|
-
const i = await
|
|
2220
|
+
const i = await H(this.viewer, t);
|
|
2221
2221
|
return i && !i.error && (this._navigationMode.value = t.mode), i;
|
|
2222
2222
|
}
|
|
2223
2223
|
async resetWithCurrentCamera(t) {
|
|
@@ -2225,182 +2225,182 @@ const K = class K extends Ee {
|
|
|
2225
2225
|
console.warn("resetWithCurrentCamera: viewer is undefined");
|
|
2226
2226
|
return;
|
|
2227
2227
|
}
|
|
2228
|
-
return await
|
|
2228
|
+
return await Er(this.viewer, t);
|
|
2229
2229
|
}
|
|
2230
2230
|
async getAllSocketNamesByActorTag(t) {
|
|
2231
2231
|
if (!this.viewer) {
|
|
2232
2232
|
console.warn("GetAllSocketNamesByActorTag: viewer is undefined");
|
|
2233
2233
|
return;
|
|
2234
2234
|
}
|
|
2235
|
-
return await
|
|
2235
|
+
return await Fs(this.viewer, t);
|
|
2236
2236
|
}
|
|
2237
2237
|
async getBoundSphere(t) {
|
|
2238
2238
|
if (!this.viewer) {
|
|
2239
2239
|
console.warn("getBoundSphere: viewer is undefined");
|
|
2240
2240
|
return;
|
|
2241
2241
|
}
|
|
2242
|
-
return await
|
|
2242
|
+
return await Es(this.viewer, t);
|
|
2243
2243
|
}
|
|
2244
2244
|
async getBoundSphereWithChildren(t) {
|
|
2245
2245
|
if (!this.viewer) {
|
|
2246
2246
|
console.warn("getBoundSphereWithChildren: viewer is undefined");
|
|
2247
2247
|
return;
|
|
2248
2248
|
}
|
|
2249
|
-
return await
|
|
2249
|
+
return await Ss(this.viewer, t);
|
|
2250
2250
|
}
|
|
2251
2251
|
async getStrokeMaterialParamInfo(t) {
|
|
2252
2252
|
if (!this.viewer) {
|
|
2253
2253
|
console.warn("GetStrokeMaterialParamInfo: viewer is undefined");
|
|
2254
2254
|
return;
|
|
2255
2255
|
}
|
|
2256
|
-
return await
|
|
2256
|
+
return await Ts(this.viewer, t);
|
|
2257
2257
|
}
|
|
2258
2258
|
async getFillMaterialParamInfo(t) {
|
|
2259
2259
|
if (!this.viewer) {
|
|
2260
2260
|
console.warn("getFillMaterialParamInfo: viewer is undefined");
|
|
2261
2261
|
return;
|
|
2262
2262
|
}
|
|
2263
|
-
return await
|
|
2263
|
+
return await xs(this.viewer, t);
|
|
2264
2264
|
}
|
|
2265
2265
|
async getGlobalProperty(t) {
|
|
2266
2266
|
if (!this.viewer) {
|
|
2267
2267
|
console.warn("getGlobalProperty: viewer is undefined");
|
|
2268
2268
|
return;
|
|
2269
2269
|
}
|
|
2270
|
-
return await
|
|
2270
|
+
return await Rs(this.viewer, t);
|
|
2271
2271
|
}
|
|
2272
2272
|
async getObjectByInfo(t) {
|
|
2273
2273
|
if (!this.viewer) {
|
|
2274
2274
|
console.warn("GetObjectByInfo: viewer is undefined");
|
|
2275
2275
|
return;
|
|
2276
2276
|
}
|
|
2277
|
-
return await
|
|
2277
|
+
return await Ls(this.viewer, t);
|
|
2278
2278
|
}
|
|
2279
2279
|
async defaultCameraFlyIn(t = 1) {
|
|
2280
2280
|
if (!this.viewer) {
|
|
2281
2281
|
console.warn("DefaultCameraFlyIn: viewer is undefined");
|
|
2282
2282
|
return;
|
|
2283
2283
|
}
|
|
2284
|
-
return await
|
|
2284
|
+
return await jn(this.viewer, t);
|
|
2285
2285
|
}
|
|
2286
2286
|
async startVoice() {
|
|
2287
2287
|
if (!this.viewer) {
|
|
2288
2288
|
console.warn("startVoice:viewer is undefined");
|
|
2289
2289
|
return;
|
|
2290
2290
|
}
|
|
2291
|
-
return await
|
|
2291
|
+
return await ts(this.viewer);
|
|
2292
2292
|
}
|
|
2293
2293
|
async stopVoice() {
|
|
2294
2294
|
if (!this.viewer) {
|
|
2295
2295
|
console.warn("startVoice:viewer is undefined");
|
|
2296
2296
|
return;
|
|
2297
2297
|
}
|
|
2298
|
-
return await
|
|
2298
|
+
return await es(this.viewer);
|
|
2299
2299
|
}
|
|
2300
2300
|
async mountPakFiles(t) {
|
|
2301
2301
|
if (!this.viewer) {
|
|
2302
2302
|
console.warn("mountPakFiles:viewer is undefined");
|
|
2303
2303
|
return;
|
|
2304
2304
|
}
|
|
2305
|
-
return await
|
|
2305
|
+
return await is(this.viewer, t);
|
|
2306
2306
|
}
|
|
2307
2307
|
async generateMemReport() {
|
|
2308
2308
|
if (!this.viewer) {
|
|
2309
2309
|
console.warn("generateMemReport:viewer is undefined");
|
|
2310
2310
|
return;
|
|
2311
2311
|
}
|
|
2312
|
-
return await
|
|
2312
|
+
return await rs(this.viewer);
|
|
2313
2313
|
}
|
|
2314
2314
|
async quit() {
|
|
2315
2315
|
if (!this.viewer) {
|
|
2316
2316
|
console.warn("Quit: viewer is undefined");
|
|
2317
2317
|
return;
|
|
2318
2318
|
}
|
|
2319
|
-
return await
|
|
2319
|
+
return await hs(this.viewer);
|
|
2320
2320
|
}
|
|
2321
2321
|
async bindActorByTag(t, i) {
|
|
2322
2322
|
if (!this.viewer) {
|
|
2323
2323
|
console.warn("BindActorByTag: viewer is undefined");
|
|
2324
2324
|
return;
|
|
2325
2325
|
}
|
|
2326
|
-
return await
|
|
2326
|
+
return await Ps(this.viewer, t, i);
|
|
2327
2327
|
}
|
|
2328
2328
|
async restoreOriginalScene() {
|
|
2329
2329
|
if (!this.viewer) {
|
|
2330
2330
|
console.warn("RestoreOriginalScene: viewer is undefined");
|
|
2331
2331
|
return;
|
|
2332
2332
|
}
|
|
2333
|
-
return await
|
|
2333
|
+
return await ks(this.viewer);
|
|
2334
2334
|
}
|
|
2335
2335
|
async unBindActorByID(t) {
|
|
2336
2336
|
if (!this.viewer) {
|
|
2337
2337
|
console.warn("UnBindActorByID: viewer is undefined");
|
|
2338
2338
|
return;
|
|
2339
2339
|
}
|
|
2340
|
-
return await
|
|
2340
|
+
return await Ds(this.viewer, t);
|
|
2341
2341
|
}
|
|
2342
2342
|
async unBindActorByTag(t) {
|
|
2343
2343
|
if (!this.viewer) {
|
|
2344
2344
|
console.warn("UnBindActorByTag: viewer is undefined");
|
|
2345
2345
|
return;
|
|
2346
2346
|
}
|
|
2347
|
-
return await
|
|
2347
|
+
return await Bs(this.viewer, t);
|
|
2348
2348
|
}
|
|
2349
2349
|
async createActorByClass(t, i) {
|
|
2350
2350
|
if (!this.viewer) {
|
|
2351
2351
|
console.warn("CreateActorByClass: viewer is undefined");
|
|
2352
2352
|
return;
|
|
2353
2353
|
}
|
|
2354
|
-
return await
|
|
2354
|
+
return await _s(this.viewer, t, i);
|
|
2355
2355
|
}
|
|
2356
2356
|
async bind3DTilesetByTag(t, i) {
|
|
2357
2357
|
if (!this.viewer) {
|
|
2358
2358
|
console.warn("Bind3DTilesetByTag: viewer is undefined");
|
|
2359
2359
|
return;
|
|
2360
2360
|
}
|
|
2361
|
-
return await
|
|
2361
|
+
return await Ms(this.viewer, t, i);
|
|
2362
2362
|
}
|
|
2363
2363
|
async unBind3DTilesetByTag(t) {
|
|
2364
2364
|
if (!this.viewer) {
|
|
2365
2365
|
console.warn("UnBind3DTilesetByTag: viewer is undefined");
|
|
2366
2366
|
return;
|
|
2367
2367
|
}
|
|
2368
|
-
return await
|
|
2368
|
+
return await $s(this.viewer, t);
|
|
2369
2369
|
}
|
|
2370
2370
|
async unBind3DTilesetById(t) {
|
|
2371
2371
|
if (!this.viewer) {
|
|
2372
2372
|
console.warn("UnBind3DTilesetById: viewer is undefined");
|
|
2373
2373
|
return;
|
|
2374
2374
|
}
|
|
2375
|
-
return await
|
|
2375
|
+
return await Ws(this.viewer, t);
|
|
2376
2376
|
}
|
|
2377
2377
|
async bindImageryByTag(t, i, r) {
|
|
2378
2378
|
if (!this.viewer) {
|
|
2379
2379
|
console.warn("BindImageryByTag: viewer is undefined");
|
|
2380
2380
|
return;
|
|
2381
2381
|
}
|
|
2382
|
-
return await
|
|
2382
|
+
return await As(this.viewer, t, i, r);
|
|
2383
2383
|
}
|
|
2384
2384
|
async unBindImageryByTag(t, i) {
|
|
2385
2385
|
if (!this.viewer) {
|
|
2386
2386
|
console.warn("UnBindImageryByTag: viewer is undefined");
|
|
2387
2387
|
return;
|
|
2388
2388
|
}
|
|
2389
|
-
return await
|
|
2389
|
+
return await Us(this.viewer, t, i);
|
|
2390
2390
|
}
|
|
2391
2391
|
async unBindImageryById(t) {
|
|
2392
2392
|
if (!this.viewer) {
|
|
2393
2393
|
console.warn("UnBindImageryById: viewer is undefined");
|
|
2394
2394
|
return;
|
|
2395
2395
|
}
|
|
2396
|
-
return await
|
|
2396
|
+
return await Ns(this.viewer, t);
|
|
2397
2397
|
}
|
|
2398
2398
|
async getIdByComponentNameAndHitItem(t, i, r) {
|
|
2399
2399
|
if (!this.viewer) {
|
|
2400
2400
|
console.warn("GetIdByComponentNameAndHitItem: viewer is undefined");
|
|
2401
2401
|
return;
|
|
2402
2402
|
}
|
|
2403
|
-
return await
|
|
2403
|
+
return await zs(this.viewer, t, i, r);
|
|
2404
2404
|
}
|
|
2405
2405
|
/**
|
|
2406
2406
|
* @returns Promise(高度)
|
|
@@ -2412,7 +2412,7 @@ const K = class K extends Ee {
|
|
|
2412
2412
|
console.warn("GetCameraRelativeHeight: viewer is undefined");
|
|
2413
2413
|
return;
|
|
2414
2414
|
}
|
|
2415
|
-
return await
|
|
2415
|
+
return await bs(this.viewer, t);
|
|
2416
2416
|
}
|
|
2417
2417
|
/**
|
|
2418
2418
|
* 保存str到指定目录下
|
|
@@ -2431,21 +2431,21 @@ const K = class K extends Ee {
|
|
|
2431
2431
|
console.warn("HighlightActorByTag: viewer is undefined");
|
|
2432
2432
|
return;
|
|
2433
2433
|
}
|
|
2434
|
-
return await
|
|
2434
|
+
return await Js(this.viewer, t, i);
|
|
2435
2435
|
}
|
|
2436
2436
|
async sendCustomMessage(t) {
|
|
2437
2437
|
if (!this.viewer) {
|
|
2438
2438
|
console.warn("SendCustomMessage: viewer is undefined");
|
|
2439
2439
|
return;
|
|
2440
2440
|
}
|
|
2441
|
-
return await
|
|
2441
|
+
return await Gs(this.viewer, t);
|
|
2442
2442
|
}
|
|
2443
2443
|
async getStatus() {
|
|
2444
2444
|
if (!this.viewer) {
|
|
2445
2445
|
console.warn("GetStatus:viewer is undefined");
|
|
2446
2446
|
return;
|
|
2447
2447
|
}
|
|
2448
|
-
return await
|
|
2448
|
+
return await Ks(this.viewer);
|
|
2449
2449
|
}
|
|
2450
2450
|
/**
|
|
2451
2451
|
* 获取场景中可替换的材质列表
|
|
@@ -2455,27 +2455,27 @@ const K = class K extends Ee {
|
|
|
2455
2455
|
console.warn("GetTilesetMaterialIDList:viewer is undefined");
|
|
2456
2456
|
return;
|
|
2457
2457
|
}
|
|
2458
|
-
return await
|
|
2458
|
+
return await qs(this.viewer);
|
|
2459
2459
|
}
|
|
2460
2460
|
//——————————————————————————————————————————
|
|
2461
2461
|
//抽象函数实现------------------------------
|
|
2462
2462
|
async pick(t, i, r) {
|
|
2463
2463
|
if (!this.viewer) return;
|
|
2464
2464
|
let n = t;
|
|
2465
|
-
if (t &&
|
|
2465
|
+
if (t && globalThis.ue && this.container) {
|
|
2466
2466
|
const [s, o] = t, { x: h, y: a } = this.container.getBoundingClientRect();
|
|
2467
2467
|
n = [h + s, a + o];
|
|
2468
2468
|
}
|
|
2469
|
-
return await
|
|
2469
|
+
return await ps(this.viewer, n, i, r);
|
|
2470
2470
|
}
|
|
2471
2471
|
async pickPosition(t) {
|
|
2472
2472
|
if (!this.viewer) return;
|
|
2473
2473
|
let i = t;
|
|
2474
|
-
if (t &&
|
|
2474
|
+
if (t && globalThis.ue && this.container) {
|
|
2475
2475
|
const [r, n] = t, { x: s, y: o } = this.container.getBoundingClientRect();
|
|
2476
2476
|
i = [s + r, o + n];
|
|
2477
2477
|
}
|
|
2478
|
-
return await
|
|
2478
|
+
return await vs(this.viewer, i);
|
|
2479
2479
|
}
|
|
2480
2480
|
async quickPickPosition(t) {
|
|
2481
2481
|
return await this.pickPosition(t);
|
|
@@ -2501,7 +2501,7 @@ const K = class K extends Ee {
|
|
|
2501
2501
|
[t[0], t[3], 0],
|
|
2502
2502
|
[t[2], t[3], 0],
|
|
2503
2503
|
[t[2], t[1], 0]
|
|
2504
|
-
], s =
|
|
2504
|
+
], s = Wr(n);
|
|
2505
2505
|
if (!s) return;
|
|
2506
2506
|
const { center: o, radius: h } = s, a = {
|
|
2507
2507
|
distance: i ?? h,
|
|
@@ -2537,7 +2537,7 @@ const K = class K extends Ee {
|
|
|
2537
2537
|
*/
|
|
2538
2538
|
async changeToWalk(t, i = 4.2, r = 1.6) {
|
|
2539
2539
|
if (!this.viewer) return;
|
|
2540
|
-
const n = { mode: "Walk", position: t, jumpZVelocity: i, eyeHeight: r }, s = await
|
|
2540
|
+
const n = { mode: "Walk", position: t, jumpZVelocity: i, eyeHeight: r }, s = await H(this.viewer, n);
|
|
2541
2541
|
return s && !s.error && (this._navigationMode.value = n.mode), s;
|
|
2542
2542
|
}
|
|
2543
2543
|
/**
|
|
@@ -2546,7 +2546,7 @@ const K = class K extends Ee {
|
|
|
2546
2546
|
*/
|
|
2547
2547
|
async changeToMap() {
|
|
2548
2548
|
if (!this.viewer) return;
|
|
2549
|
-
const t = { mode: "Map" }, i = await
|
|
2549
|
+
const t = { mode: "Map" }, i = await H(this.viewer, t);
|
|
2550
2550
|
return i && !i.error && (this._navigationMode.value = t.mode), i;
|
|
2551
2551
|
}
|
|
2552
2552
|
/**
|
|
@@ -2558,7 +2558,7 @@ const K = class K extends Ee {
|
|
|
2558
2558
|
*/
|
|
2559
2559
|
async changeToRotateGlobe(t = 38, i = 1e7, r = 60) {
|
|
2560
2560
|
if (!this.viewer) return;
|
|
2561
|
-
const n = { mode: "RotateGlobe", latitude: t, height: i, cycleTime: r }, s = await
|
|
2561
|
+
const n = { mode: "RotateGlobe", latitude: t, height: i, cycleTime: r }, s = await H(this.viewer, n);
|
|
2562
2562
|
return s && !s.error && (this._navigationMode.value = n.mode), s;
|
|
2563
2563
|
}
|
|
2564
2564
|
/**
|
|
@@ -2573,7 +2573,7 @@ const K = class K extends Ee {
|
|
|
2573
2573
|
*/
|
|
2574
2574
|
async changeToLine(t, i = 10, r = 10, n = !0, s = 10, o = "auto") {
|
|
2575
2575
|
if (!this.viewer) return;
|
|
2576
|
-
const h = { mode: "Line", geoLineStringId: t, speed: i, heightOffset: r, loop: n, turnRateDPS: s, lineMode: o }, a = await
|
|
2576
|
+
const h = { mode: "Line", geoLineStringId: t, speed: i, heightOffset: r, loop: n, turnRateDPS: s, lineMode: o }, a = await H(this.viewer, h);
|
|
2577
2577
|
return a && !a.error && (this._navigationMode.value = h.mode), a;
|
|
2578
2578
|
}
|
|
2579
2579
|
/**
|
|
@@ -2583,7 +2583,7 @@ const K = class K extends Ee {
|
|
|
2583
2583
|
*/
|
|
2584
2584
|
async changeToUserDefined(t) {
|
|
2585
2585
|
if (!this.viewer) return;
|
|
2586
|
-
const i = { mode: "UserDefined", userDefinedPawn: t }, r = await
|
|
2586
|
+
const i = { mode: "UserDefined", userDefinedPawn: t }, r = await H(this.viewer, i);
|
|
2587
2587
|
return r && !r.error && (this._navigationMode.value = i.mode), r;
|
|
2588
2588
|
}
|
|
2589
2589
|
/**
|
|
@@ -2603,7 +2603,7 @@ const K = class K extends Ee {
|
|
|
2603
2603
|
orbitPeriod: r,
|
|
2604
2604
|
heading: n,
|
|
2605
2605
|
pitch: s
|
|
2606
|
-
}, h = await
|
|
2606
|
+
}, h = await H(this.viewer, o);
|
|
2607
2607
|
return h && !h.error && (this._navigationMode.value = o.mode), h;
|
|
2608
2608
|
}
|
|
2609
2609
|
/**
|
|
@@ -2615,56 +2615,56 @@ const K = class K extends Ee {
|
|
|
2615
2615
|
*/
|
|
2616
2616
|
async changeToFollow(t, i = 0, r = 0, n = -30, s = !0) {
|
|
2617
2617
|
if (!this.viewer) return;
|
|
2618
|
-
const o = { mode: "Follow", objectId: t, distance: i, heading: r, pitch: n, relativeRotation: s }, h = await
|
|
2618
|
+
const o = { mode: "Follow", objectId: t, distance: i, heading: r, pitch: n, relativeRotation: s }, h = await H(this.viewer, o);
|
|
2619
2619
|
return h && !h.error && (this._navigationMode.value = o.mode), h;
|
|
2620
2620
|
}
|
|
2621
2621
|
getFPS() {
|
|
2622
2622
|
return this._statusInfo.fps;
|
|
2623
2623
|
}
|
|
2624
2624
|
async getVersion() {
|
|
2625
|
-
const t =
|
|
2625
|
+
const t = globalThis.g_XE3CopyRights ?? {};
|
|
2626
2626
|
if (!this.viewer) return t;
|
|
2627
|
-
const i = await
|
|
2627
|
+
const i = await Is(this.viewer);
|
|
2628
2628
|
return t.esforue = i, t;
|
|
2629
2629
|
}
|
|
2630
2630
|
async getHeightByLonLat(t, i, r = "ECC_Visibility") {
|
|
2631
2631
|
if (!this.viewer) return null;
|
|
2632
|
-
const n = await
|
|
2632
|
+
const n = await fs(this.viewer, t, i, r);
|
|
2633
2633
|
return n && n.height !== void 0 ? n.height : null;
|
|
2634
2634
|
}
|
|
2635
2635
|
async getHeightsByLonLats(t, i = "ECC_Visibility") {
|
|
2636
|
-
return this.viewer ? await
|
|
2636
|
+
return this.viewer ? await gs(this.viewer, t, i) : void 0;
|
|
2637
2637
|
}
|
|
2638
2638
|
async capture(t = 64, i = 64) {
|
|
2639
|
-
return this.viewer ? await
|
|
2639
|
+
return this.viewer ? await ws(this.viewer, t, i) : void 0;
|
|
2640
2640
|
}
|
|
2641
2641
|
async partialCapture(t, i = [64, 64]) {
|
|
2642
2642
|
if (!this.viewer) {
|
|
2643
2643
|
console.warn("partialCapture:viewer is undefined");
|
|
2644
2644
|
return;
|
|
2645
2645
|
}
|
|
2646
|
-
return await
|
|
2646
|
+
return await ys(this.viewer, t, i);
|
|
2647
2647
|
}
|
|
2648
2648
|
async lonLatAltToScreenPosition(t) {
|
|
2649
2649
|
if (!this.viewer) return;
|
|
2650
|
-
const i = await
|
|
2650
|
+
const i = await ms(this.viewer, t);
|
|
2651
2651
|
return i && [i.X, i.Y];
|
|
2652
2652
|
}
|
|
2653
2653
|
//------------------------------抽象函数实现
|
|
2654
2654
|
async setGlobalProperty(t) {
|
|
2655
2655
|
if (this.viewer)
|
|
2656
|
-
return await
|
|
2656
|
+
return await us(this.viewer, t);
|
|
2657
2657
|
}
|
|
2658
2658
|
async startEditing(t, i, r) {
|
|
2659
2659
|
r = Object.assign({ useKeyToSwitch: !0, callSource: "outer" }, r);
|
|
2660
2660
|
const n = t.components.main ?? t;
|
|
2661
2661
|
if (!n || !this.viewer || i == null) return;
|
|
2662
2662
|
const s = Array.isArray(i) ? [...i] : [i];
|
|
2663
|
-
return n.editingID = `${r.callSource}_${_()}`, await
|
|
2663
|
+
return n.editingID = `${r.callSource}_${_()}`, await Xs(this.viewer, n.id, n.editingID, s, r.useKeyToSwitch);
|
|
2664
2664
|
}
|
|
2665
2665
|
async stopEditing() {
|
|
2666
2666
|
if (this.viewer)
|
|
2667
|
-
return await
|
|
2667
|
+
return await Ys(this.viewer);
|
|
2668
2668
|
}
|
|
2669
2669
|
async moveObjects(t) {
|
|
2670
2670
|
if (!this.viewer) return;
|
|
@@ -2674,20 +2674,20 @@ const K = class K extends Ee {
|
|
|
2674
2674
|
o.editingID = r, o && i.push(o.id);
|
|
2675
2675
|
}
|
|
2676
2676
|
if (i.length !== 0)
|
|
2677
|
-
return await
|
|
2677
|
+
return await Zs(this.viewer, i, r);
|
|
2678
2678
|
}
|
|
2679
2679
|
};
|
|
2680
|
-
v(K, "type", K.register("ESUeViewer", K)), v(K, "defaults", { ...
|
|
2680
|
+
v(K, "type", K.register("ESUeViewer", K)), v(K, "defaults", { ...Vn });
|
|
2681
2681
|
let J = K;
|
|
2682
|
-
((
|
|
2683
|
-
|
|
2682
|
+
((d) => {
|
|
2683
|
+
d.createDefaultProps = () => ({
|
|
2684
2684
|
...Ee.createDefaultProps(),
|
|
2685
2685
|
/**
|
|
2686
2686
|
* 新增UE属性步骤!!
|
|
2687
2687
|
* 1. createReactProps 中定义属性
|
|
2688
2688
|
* 2. reactPropDefaults 中定义默认值
|
|
2689
2689
|
*/
|
|
2690
|
-
...
|
|
2690
|
+
...Fr(),
|
|
2691
2691
|
//分辨率缩放比例
|
|
2692
2692
|
resolutionScale: 1,
|
|
2693
2693
|
autoReconnect: !1,
|
|
@@ -2698,7 +2698,7 @@ let J = K;
|
|
|
2698
2698
|
customMessageListening: void 0
|
|
2699
2699
|
});
|
|
2700
2700
|
})(J || (J = {}));
|
|
2701
|
-
|
|
2701
|
+
Ar(J.prototype, J.createDefaultProps);
|
|
2702
2702
|
class at extends G {
|
|
2703
2703
|
constructor(e, t) {
|
|
2704
2704
|
super(e, t);
|
|
@@ -2734,10 +2734,10 @@ class at extends G {
|
|
|
2734
2734
|
...a.val
|
|
2735
2735
|
}
|
|
2736
2736
|
}), a.val = {};
|
|
2737
|
-
},
|
|
2738
|
-
this.d(
|
|
2737
|
+
}, l = this.dv(P(...g));
|
|
2738
|
+
this.d(l.don(p)), this.d(r.changed.don(p)), this.d(e.flushEvent.don(() => l.flush()));
|
|
2739
2739
|
})), e.components.main || (this.d(() => {
|
|
2740
|
-
r.value &&
|
|
2740
|
+
r.value && Ir(i, e.id);
|
|
2741
2741
|
}), i.callUeFunc({
|
|
2742
2742
|
f: "create",
|
|
2743
2743
|
p: {
|
|
@@ -2768,7 +2768,7 @@ class M extends at {
|
|
|
2768
2768
|
var n, s;
|
|
2769
2769
|
Re(i, e.id, (n = e.flyInParam) == null ? void 0 : n.position, (s = e.flyInParam) == null ? void 0 : s.rotation, r ?? 1);
|
|
2770
2770
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
2771
|
-
|
|
2771
|
+
lt(i, e.id);
|
|
2772
2772
|
})), this.d(e.calcFlyInParamEvent.don(() => {
|
|
2773
2773
|
const r = t.getCurrentCameraInfo();
|
|
2774
2774
|
if (!r) return;
|
|
@@ -2809,8 +2809,8 @@ class I extends M {
|
|
|
2809
2809
|
Le(i, e.id, h, a, g);
|
|
2810
2810
|
})), this.d(e.smoothMoveOnGroundEvent.don((h, a, g, p) => {
|
|
2811
2811
|
Pe(i, e.id, h, a, p, g);
|
|
2812
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((h, a, g, p,
|
|
2813
|
-
ke(i, e.id, h, a, g, p,
|
|
2812
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((h, a, g, p, l) => {
|
|
2813
|
+
ke(i, e.id, h, a, g, p, l);
|
|
2814
2814
|
})), this.d(e.smoothMoveKeepPitchEvent.don(async (h, a) => {
|
|
2815
2815
|
const g = await i.callUeFunc({
|
|
2816
2816
|
f: "SmoothMoveKeepPitch",
|
|
@@ -2828,12 +2828,12 @@ class I extends M {
|
|
|
2828
2828
|
});
|
|
2829
2829
|
}));
|
|
2830
2830
|
const s = async (h, a, g, p) => {
|
|
2831
|
-
const { viewer:
|
|
2832
|
-
if (!
|
|
2831
|
+
const { viewer: l } = h;
|
|
2832
|
+
if (!l) {
|
|
2833
2833
|
console.error("SmoothMoveRelatively: ueViewer.viewer is undefined");
|
|
2834
2834
|
return;
|
|
2835
2835
|
}
|
|
2836
|
-
const u = await
|
|
2836
|
+
const u = await l.callUeFunc({
|
|
2837
2837
|
f: "SmoothMoveRelatively",
|
|
2838
2838
|
p: { id: a, RelativePosition: g, Time: p }
|
|
2839
2839
|
});
|
|
@@ -2842,7 +2842,7 @@ class I extends M {
|
|
|
2842
2842
|
this.d(e.smoothMoveRelativelyEvent.don((h, a) => {
|
|
2843
2843
|
s(t, e.id, h, a);
|
|
2844
2844
|
}));
|
|
2845
|
-
const o = async (h, a, g, p,
|
|
2845
|
+
const o = async (h, a, g, p, l) => {
|
|
2846
2846
|
const { viewer: u } = h;
|
|
2847
2847
|
if (!u) {
|
|
2848
2848
|
console.error("SmoothMoveRelativelyWithRotation: ueViewer.viewer is undefined");
|
|
@@ -2850,7 +2850,7 @@ class I extends M {
|
|
|
2850
2850
|
}
|
|
2851
2851
|
const c = await u.callUeFunc({
|
|
2852
2852
|
f: "SmoothMoveRelativelyWithRotation",
|
|
2853
|
-
p: { id: a, RelativePosition: g, NewRotation: p, Time:
|
|
2853
|
+
p: { id: a, RelativePosition: g, NewRotation: p, Time: l }
|
|
2854
2854
|
});
|
|
2855
2855
|
return c.error && console.error("SmoothMoveRelativelyWithRotation:", c.error), c;
|
|
2856
2856
|
};
|
|
@@ -2905,12 +2905,12 @@ class z extends I {
|
|
|
2905
2905
|
}));
|
|
2906
2906
|
}
|
|
2907
2907
|
}
|
|
2908
|
-
class
|
|
2908
|
+
class Tr extends I {
|
|
2909
2909
|
constructor(e, t) {
|
|
2910
2910
|
super(e, t), t.viewer;
|
|
2911
2911
|
}
|
|
2912
2912
|
}
|
|
2913
|
-
v(
|
|
2913
|
+
v(Tr, "propValFuncs", {
|
|
2914
2914
|
...I.propValFuncs,
|
|
2915
2915
|
pointStyle: (e) => ({
|
|
2916
2916
|
...e,
|
|
@@ -2925,13 +2925,13 @@ v(Sr, "propValFuncs", {
|
|
|
2925
2925
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
2926
2926
|
})
|
|
2927
2927
|
});
|
|
2928
|
-
class Ke extends
|
|
2928
|
+
class Ke extends Tr {
|
|
2929
2929
|
constructor(e, t) {
|
|
2930
2930
|
super(e, t), t.viewer;
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
|
-
const qe = (
|
|
2934
|
-
switch (
|
|
2933
|
+
const qe = (d) => {
|
|
2934
|
+
switch (d) {
|
|
2935
2935
|
case 0:
|
|
2936
2936
|
return "成功绑定";
|
|
2937
2937
|
case 1:
|
|
@@ -3004,7 +3004,7 @@ const qe = (l) => {
|
|
|
3004
3004
|
const p = this.dv(P(
|
|
3005
3005
|
t.actorTagChanged,
|
|
3006
3006
|
t.urlChanged
|
|
3007
|
-
)),
|
|
3007
|
+
)), l = () => {
|
|
3008
3008
|
t.actorTag ? a.value = {
|
|
3009
3009
|
type: "ActorTag",
|
|
3010
3010
|
actorTag: t.actorTag
|
|
@@ -3013,35 +3013,35 @@ const qe = (l) => {
|
|
|
3013
3013
|
url: t.url
|
|
3014
3014
|
} : a.value = void 0, t.editing = !1;
|
|
3015
3015
|
};
|
|
3016
|
-
|
|
3016
|
+
l(), this.d(p.don(l));
|
|
3017
3017
|
}
|
|
3018
3018
|
const g = async () => {
|
|
3019
3019
|
const { id: p } = t;
|
|
3020
3020
|
if (n !== void 0) {
|
|
3021
3021
|
n = void 0;
|
|
3022
3022
|
try {
|
|
3023
|
-
const
|
|
3024
|
-
if (!
|
|
3025
|
-
if (
|
|
3026
|
-
console.warn(`UeES3DTileset UnBind3DTilesetById: ${
|
|
3023
|
+
const l = await i.unBind3DTilesetById(p);
|
|
3024
|
+
if (!l) return;
|
|
3025
|
+
if (l.error !== "") {
|
|
3026
|
+
console.warn(`UeES3DTileset UnBind3DTilesetById: ${l.error}`);
|
|
3027
3027
|
return;
|
|
3028
3028
|
}
|
|
3029
|
-
} catch (
|
|
3030
|
-
console.warn(`UeES3DTileset UnBind3DTilesetById: ${
|
|
3029
|
+
} catch (l) {
|
|
3030
|
+
console.warn(`UeES3DTileset UnBind3DTilesetById: ${l}`);
|
|
3031
3031
|
return;
|
|
3032
3032
|
}
|
|
3033
3033
|
}
|
|
3034
3034
|
if (s !== void 0) {
|
|
3035
3035
|
s = void 0;
|
|
3036
3036
|
try {
|
|
3037
|
-
const
|
|
3038
|
-
if (!
|
|
3039
|
-
if (
|
|
3040
|
-
console.warn(`UeES3DTileset Destroy: ${
|
|
3037
|
+
const l = await r.callUeFunc({ f: "destroy", p: { id: p } });
|
|
3038
|
+
if (!l) return;
|
|
3039
|
+
if (l.error !== "") {
|
|
3040
|
+
console.warn(`UeES3DTileset Destroy: ${l.error}`);
|
|
3041
3041
|
return;
|
|
3042
3042
|
}
|
|
3043
|
-
} catch (
|
|
3044
|
-
console.warn(`UeES3DTileset Destroy: ${
|
|
3043
|
+
} catch (l) {
|
|
3044
|
+
console.warn(`UeES3DTileset Destroy: ${l}`);
|
|
3045
3045
|
return;
|
|
3046
3046
|
}
|
|
3047
3047
|
}
|
|
@@ -3100,30 +3100,30 @@ const qe = (l) => {
|
|
|
3100
3100
|
}
|
|
3101
3101
|
}
|
|
3102
3102
|
await u.promise(o());
|
|
3103
|
-
})),
|
|
3103
|
+
})), l = async () => {
|
|
3104
3104
|
p.restart();
|
|
3105
3105
|
};
|
|
3106
|
-
|
|
3106
|
+
l(), this.d(a.changed.don(l));
|
|
3107
3107
|
}
|
|
3108
3108
|
this.d(t.refreshTilesetEvent.don(() => {
|
|
3109
|
-
|
|
3110
|
-
})), this.d(t.flyToEvent.don(async (p,
|
|
3109
|
+
On(r, t.id);
|
|
3110
|
+
})), this.d(t.flyToEvent.don(async (p, l) => {
|
|
3111
3111
|
if (!n && !s) return;
|
|
3112
3112
|
const u = await we(r, t.id, p);
|
|
3113
3113
|
let c = "over";
|
|
3114
|
-
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), t.flyOverEvent.emit(
|
|
3114
|
+
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), t.flyOverEvent.emit(l, c, i);
|
|
3115
3115
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
3116
|
-
!n && !s ||
|
|
3116
|
+
!n && !s || lt(r, t.id);
|
|
3117
3117
|
})), this.d(t.calcFlyInParamEvent.don(async () => {
|
|
3118
3118
|
if (!n && !s || !i.actived) return;
|
|
3119
3119
|
const p = await i.getCurrentCameraInfo();
|
|
3120
3120
|
if (!p) return;
|
|
3121
|
-
const { position:
|
|
3122
|
-
t.flyInParam = { position:
|
|
3121
|
+
const { position: l, rotation: u } = p;
|
|
3122
|
+
t.flyInParam = { position: l, rotation: u, flyDuration: 1 };
|
|
3123
3123
|
})), this.d(i.propChanged.don((p) => {
|
|
3124
|
-
!n && !s || p.objId === t.id && Object.keys(p.props).forEach((
|
|
3125
|
-
const u = p.props[
|
|
3126
|
-
t[
|
|
3124
|
+
!n && !s || p.objId === t.id && Object.keys(p.props).forEach((l) => {
|
|
3125
|
+
const u = p.props[l] === null ? void 0 : p.props[l];
|
|
3126
|
+
t[l] = u;
|
|
3127
3127
|
});
|
|
3128
3128
|
})), this.d(i.objectEvent.don((p) => {
|
|
3129
3129
|
!n && !s || p.id !== t.id || p.type !== "3DTilesetReady" || t.tilesetReady.emit(p.p);
|
|
@@ -3139,7 +3139,7 @@ const qe = (l) => {
|
|
|
3139
3139
|
console.warn(`UeES3DTileset SetFeatureColor: ${y.error}`);
|
|
3140
3140
|
return;
|
|
3141
3141
|
}
|
|
3142
|
-
},
|
|
3142
|
+
}, l = async (f, w) => {
|
|
3143
3143
|
if (!n && !s) return;
|
|
3144
3144
|
const y = await r.callUeFunc({
|
|
3145
3145
|
f: "SetFeatureVisable",
|
|
@@ -3175,7 +3175,7 @@ const qe = (l) => {
|
|
|
3175
3175
|
this.styleColor = [...y], p(f, y);
|
|
3176
3176
|
})), this.d(t.setFeatureVisableEvent.don((f, w) => {
|
|
3177
3177
|
const y = [...this.styleVisable, ...w];
|
|
3178
|
-
this.styleVisable = [...y],
|
|
3178
|
+
this.styleVisable = [...y], l(f, y);
|
|
3179
3179
|
})), this.d(t.resetFeatureStyleEvent.don(() => {
|
|
3180
3180
|
u(), this.styleColor = [], this.styleVisable = [];
|
|
3181
3181
|
})), this.d(t.setFeatureStyleEvent.don((f) => {
|
|
@@ -3189,13 +3189,13 @@ const qe = (l) => {
|
|
|
3189
3189
|
return;
|
|
3190
3190
|
}
|
|
3191
3191
|
try {
|
|
3192
|
-
const
|
|
3192
|
+
const l = await r.callUeFunc({
|
|
3193
3193
|
f: "GetFeatureTable",
|
|
3194
3194
|
p: { id: t.id }
|
|
3195
3195
|
});
|
|
3196
|
-
|
|
3197
|
-
} catch (
|
|
3198
|
-
console.warn(`UeES3DTileset GetFeatureTable: ${
|
|
3196
|
+
l.error !== "" && console.warn(`UeES3DTileset GetFeatureTable: ${l.error}`), t._featureTableResultEvent.emit(l.re.table);
|
|
3197
|
+
} catch (l) {
|
|
3198
|
+
console.warn(`UeES3DTileset GetFeatureTable: ${l}`), t._featureTableResultEvent.emit(void 0);
|
|
3199
3199
|
}
|
|
3200
3200
|
};
|
|
3201
3201
|
this.d(t.getFeatureTableEvent.don(() => {
|
|
@@ -3209,17 +3209,17 @@ const qe = (l) => {
|
|
|
3209
3209
|
return;
|
|
3210
3210
|
}
|
|
3211
3211
|
try {
|
|
3212
|
-
const
|
|
3212
|
+
const l = await r.callUeFunc({
|
|
3213
3213
|
f: "GetMaterialNameList",
|
|
3214
3214
|
p: { id: t.id }
|
|
3215
3215
|
});
|
|
3216
|
-
|
|
3217
|
-
} catch (
|
|
3218
|
-
console.warn(`UeES3DTileset GetMaterialNameList: ${
|
|
3216
|
+
l.error !== "" && console.warn(`UeES3DTileset GetMaterialNameList: ${l.error}`), t.getMaterialNameListEvent.emit(l.re.materialNameList);
|
|
3217
|
+
} catch (l) {
|
|
3218
|
+
console.warn(`UeES3DTileset GetMaterialNameList: ${l}`), t.getMaterialNameListEvent.emit(void 0);
|
|
3219
3219
|
}
|
|
3220
3220
|
};
|
|
3221
|
-
this.ad(t.getMaterialNameListEvent.don((
|
|
3222
|
-
|
|
3221
|
+
this.ad(t.getMaterialNameListEvent.don((l) => {
|
|
3222
|
+
l == "start" && p();
|
|
3223
3223
|
}));
|
|
3224
3224
|
}
|
|
3225
3225
|
}
|
|
@@ -3238,8 +3238,8 @@ const qe = (l) => {
|
|
|
3238
3238
|
};
|
|
3239
3239
|
v(ct, "type", ct.register("ESUeViewer", me.type, ct));
|
|
3240
3240
|
let Ue = ct;
|
|
3241
|
-
const Qe = (
|
|
3242
|
-
switch (
|
|
3241
|
+
const Qe = (d) => {
|
|
3242
|
+
switch (d) {
|
|
3243
3243
|
case 0:
|
|
3244
3244
|
return "成功绑定";
|
|
3245
3245
|
case 1:
|
|
@@ -3262,14 +3262,14 @@ const Qe = (l) => {
|
|
|
3262
3262
|
return;
|
|
3263
3263
|
}
|
|
3264
3264
|
let r, n;
|
|
3265
|
-
const s = this.dv(W(void 0)), o = this.ad(
|
|
3265
|
+
const s = this.dv(W(void 0)), o = this.ad(He(""));
|
|
3266
3266
|
{
|
|
3267
3267
|
const p = () => {
|
|
3268
3268
|
if (typeof e.url == "string")
|
|
3269
3269
|
o.value = E.context.getStrFromEnv(e.url);
|
|
3270
3270
|
else {
|
|
3271
|
-
const
|
|
3272
|
-
|
|
3271
|
+
const l = e.url;
|
|
3272
|
+
l.url = E.context.getStrFromEnv(l.url), o.value = l;
|
|
3273
3273
|
}
|
|
3274
3274
|
};
|
|
3275
3275
|
p(), this.ad(e.urlChanged.don(p));
|
|
@@ -3278,8 +3278,8 @@ const Qe = (l) => {
|
|
|
3278
3278
|
if (!r && !n) return;
|
|
3279
3279
|
let p = e.targetID ?? U.defaults.targetID;
|
|
3280
3280
|
if (p && p != "") {
|
|
3281
|
-
const
|
|
3282
|
-
p =
|
|
3281
|
+
const l = E.getSceneObject(p);
|
|
3282
|
+
p = l ? (l.components.main ?? l).id : p;
|
|
3283
3283
|
}
|
|
3284
3284
|
await i.callUeFunc({
|
|
3285
3285
|
f: "update",
|
|
@@ -3323,28 +3323,28 @@ const Qe = (l) => {
|
|
|
3323
3323
|
if (r !== void 0) {
|
|
3324
3324
|
r = void 0;
|
|
3325
3325
|
try {
|
|
3326
|
-
const
|
|
3327
|
-
if (!
|
|
3328
|
-
if (
|
|
3329
|
-
console.warn(`UeESImageryLayer UnImageryByID: ${
|
|
3326
|
+
const l = await t.unBindImageryById(p);
|
|
3327
|
+
if (!l) return;
|
|
3328
|
+
if (l.error !== "") {
|
|
3329
|
+
console.warn(`UeESImageryLayer UnImageryByID: ${l.error}`);
|
|
3330
3330
|
return;
|
|
3331
3331
|
}
|
|
3332
|
-
} catch (
|
|
3333
|
-
console.warn(`UeESImageryLayer UnImageryByID promise: ${
|
|
3332
|
+
} catch (l) {
|
|
3333
|
+
console.warn(`UeESImageryLayer UnImageryByID promise: ${l}`);
|
|
3334
3334
|
return;
|
|
3335
3335
|
}
|
|
3336
3336
|
}
|
|
3337
3337
|
if (n !== void 0) {
|
|
3338
3338
|
n = void 0;
|
|
3339
3339
|
try {
|
|
3340
|
-
const
|
|
3341
|
-
if (!
|
|
3342
|
-
if (
|
|
3343
|
-
console.warn(`UeESImageryLayer Destroy: ${
|
|
3340
|
+
const l = await i.callUeFunc({ f: "destroy", p: { id: p, test: "UeESImageryLayer" } });
|
|
3341
|
+
if (!l) return;
|
|
3342
|
+
if (l.error !== "") {
|
|
3343
|
+
console.warn(`UeESImageryLayer Destroy: ${l.error}`);
|
|
3344
3344
|
return;
|
|
3345
3345
|
}
|
|
3346
|
-
} catch (
|
|
3347
|
-
console.warn(`UeESImageryLayer Destroy promise: ${
|
|
3346
|
+
} catch (l) {
|
|
3347
|
+
console.warn(`UeESImageryLayer Destroy promise: ${l}`);
|
|
3348
3348
|
return;
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
@@ -3403,17 +3403,17 @@ const Qe = (l) => {
|
|
|
3403
3403
|
}
|
|
3404
3404
|
}
|
|
3405
3405
|
await u.promise(h());
|
|
3406
|
-
})),
|
|
3406
|
+
})), l = async () => {
|
|
3407
3407
|
p.restart();
|
|
3408
3408
|
};
|
|
3409
|
-
|
|
3409
|
+
l(), this.d(s.changed.don(l));
|
|
3410
3410
|
}
|
|
3411
3411
|
{
|
|
3412
3412
|
const p = this.dv(P(
|
|
3413
3413
|
e.actorTagChanged,
|
|
3414
3414
|
o.changed,
|
|
3415
3415
|
e.componentTagChanged
|
|
3416
|
-
)),
|
|
3416
|
+
)), l = () => {
|
|
3417
3417
|
e.actorTag && e.componentTag ? s.value = {
|
|
3418
3418
|
type: "ActorTag",
|
|
3419
3419
|
actorTag: e.actorTag,
|
|
@@ -3423,31 +3423,31 @@ const Qe = (l) => {
|
|
|
3423
3423
|
url: o.value
|
|
3424
3424
|
} : s.value = void 0;
|
|
3425
3425
|
};
|
|
3426
|
-
|
|
3426
|
+
l(), this.d(p.don(l));
|
|
3427
3427
|
}
|
|
3428
|
-
this.d(e.flyToEvent.don(async (p,
|
|
3428
|
+
this.d(e.flyToEvent.don(async (p, l) => {
|
|
3429
3429
|
if (!r && !n) return;
|
|
3430
3430
|
const u = await we(i, e.id, p);
|
|
3431
3431
|
let c = "over";
|
|
3432
|
-
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(
|
|
3433
|
-
})), this.d(e.flyInEvent.don(async (p,
|
|
3432
|
+
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(l, c, t);
|
|
3433
|
+
})), this.d(e.flyInEvent.don(async (p, l) => {
|
|
3434
3434
|
var f, w;
|
|
3435
3435
|
if (!r && !n) return;
|
|
3436
3436
|
const u = await Re(i, e.id, (f = e.flyInParam) == null ? void 0 : f.position, (w = e.flyInParam) == null ? void 0 : w.rotation, p ?? 1);
|
|
3437
3437
|
let c = "over";
|
|
3438
|
-
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(
|
|
3438
|
+
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(l, c, t);
|
|
3439
3439
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
3440
|
-
!r && !n ||
|
|
3440
|
+
!r && !n || lt(i, e.id);
|
|
3441
3441
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
3442
3442
|
if (!t.actived) return;
|
|
3443
3443
|
const p = await t.getCurrentCameraInfo();
|
|
3444
3444
|
if (!p) return;
|
|
3445
|
-
const { position:
|
|
3446
|
-
e.flyInParam = { position:
|
|
3445
|
+
const { position: l, rotation: u } = p;
|
|
3446
|
+
e.flyInParam = { position: l, rotation: u, flyDuration: 1 };
|
|
3447
3447
|
})), this.d(t.propChanged.don((p) => {
|
|
3448
|
-
!r && !n || p.objId === e.id && Object.keys(p.props).forEach((
|
|
3449
|
-
const u = p.props[
|
|
3450
|
-
e[
|
|
3448
|
+
!r && !n || p.objId === e.id && Object.keys(p.props).forEach((l) => {
|
|
3449
|
+
const u = p.props[l] === null ? void 0 : p.props[l];
|
|
3450
|
+
e[l] = u;
|
|
3451
3451
|
});
|
|
3452
3452
|
}));
|
|
3453
3453
|
}
|
|
@@ -3462,7 +3462,7 @@ const X = class X extends M {
|
|
|
3462
3462
|
}
|
|
3463
3463
|
}
|
|
3464
3464
|
};
|
|
3465
|
-
v(X, "type", X.register("ESUeViewer",
|
|
3465
|
+
v(X, "type", X.register("ESUeViewer", Ur.type, X)), v(X, "forceUeUpdateProps", [
|
|
3466
3466
|
...M.forceUeUpdateProps,
|
|
3467
3467
|
"url"
|
|
3468
3468
|
]), v(X, "propValFuncs", {
|
|
@@ -3480,7 +3480,7 @@ const ht = class ht extends I {
|
|
|
3480
3480
|
}
|
|
3481
3481
|
}
|
|
3482
3482
|
};
|
|
3483
|
-
v(ht, "type", ht.register("ESUeViewer",
|
|
3483
|
+
v(ht, "type", ht.register("ESUeViewer", Nr.type, ht));
|
|
3484
3484
|
let je = ht;
|
|
3485
3485
|
const pt = class pt extends I {
|
|
3486
3486
|
constructor(e, t) {
|
|
@@ -3490,7 +3490,7 @@ const pt = class pt extends I {
|
|
|
3490
3490
|
}
|
|
3491
3491
|
}
|
|
3492
3492
|
};
|
|
3493
|
-
v(pt, "type", pt.register("ESUeViewer",
|
|
3493
|
+
v(pt, "type", pt.register("ESUeViewer", zr.type, pt));
|
|
3494
3494
|
let ti = pt;
|
|
3495
3495
|
const vt = class vt extends D {
|
|
3496
3496
|
constructor(e, t) {
|
|
@@ -3500,7 +3500,7 @@ const vt = class vt extends D {
|
|
|
3500
3500
|
}
|
|
3501
3501
|
}
|
|
3502
3502
|
};
|
|
3503
|
-
v(vt, "type", vt.register("ESUeViewer",
|
|
3503
|
+
v(vt, "type", vt.register("ESUeViewer", br.type, vt));
|
|
3504
3504
|
let $ = vt;
|
|
3505
3505
|
const ft = class ft extends $ {
|
|
3506
3506
|
constructor(e, t) {
|
|
@@ -3554,7 +3554,7 @@ const tt = class tt extends I {
|
|
|
3554
3554
|
}
|
|
3555
3555
|
}
|
|
3556
3556
|
};
|
|
3557
|
-
v(tt, "type", tt.register("ESUeViewer",
|
|
3557
|
+
v(tt, "type", tt.register("ESUeViewer", Jr.type, tt)), // null 表示不设置,undefined表示不做任何转换
|
|
3558
3558
|
v(tt, "propValFuncs", {
|
|
3559
3559
|
...I.propValFuncs,
|
|
3560
3560
|
targetID: (e) => {
|
|
@@ -3576,7 +3576,7 @@ const wt = class wt extends I {
|
|
|
3576
3576
|
const { id: o, duration: h, position: a, rotation: g } = e;
|
|
3577
3577
|
Re(i, o, a, g, h ?? r, s);
|
|
3578
3578
|
})), this.dispose(e.resetWithCurrentCameraEvent.don(() => {
|
|
3579
|
-
|
|
3579
|
+
Er(i, e.id);
|
|
3580
3580
|
})), this.dispose(e.captureEvent.don((r, n) => {
|
|
3581
3581
|
t.capture(r, n).then((o) => {
|
|
3582
3582
|
o && (e.thumbnail = o);
|
|
@@ -3584,7 +3584,7 @@ const wt = class wt extends I {
|
|
|
3584
3584
|
}));
|
|
3585
3585
|
}
|
|
3586
3586
|
};
|
|
3587
|
-
v(wt, "type", wt.register("ESUeViewer",
|
|
3587
|
+
v(wt, "type", wt.register("ESUeViewer", Gr.type, wt));
|
|
3588
3588
|
let ni = wt;
|
|
3589
3589
|
const yt = class yt extends I {
|
|
3590
3590
|
constructor(e, t) {
|
|
@@ -3594,7 +3594,7 @@ const yt = class yt extends I {
|
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
3596
|
};
|
|
3597
|
-
v(yt, "type", yt.register("ESUeViewer",
|
|
3597
|
+
v(yt, "type", yt.register("ESUeViewer", Kr.type, yt));
|
|
3598
3598
|
let si = yt;
|
|
3599
3599
|
const mt = class mt extends I {
|
|
3600
3600
|
constructor(e, t) {
|
|
@@ -3604,7 +3604,7 @@ const mt = class mt extends I {
|
|
|
3604
3604
|
}
|
|
3605
3605
|
}
|
|
3606
3606
|
};
|
|
3607
|
-
v(mt, "type", mt.register("ESUeViewer",
|
|
3607
|
+
v(mt, "type", mt.register("ESUeViewer", Xr.type, mt));
|
|
3608
3608
|
let oi = mt;
|
|
3609
3609
|
const Ct = class Ct extends D {
|
|
3610
3610
|
constructor(e, t) {
|
|
@@ -3615,17 +3615,17 @@ const Ct = class Ct extends D {
|
|
|
3615
3615
|
return;
|
|
3616
3616
|
}
|
|
3617
3617
|
const r = () => {
|
|
3618
|
-
let s =
|
|
3618
|
+
let s = dt.defaults.fillStyle;
|
|
3619
3619
|
try {
|
|
3620
|
-
s = { ...e.fillStyle ??
|
|
3620
|
+
s = { ...e.fillStyle ?? dt.defaults.fillStyle };
|
|
3621
3621
|
} catch (o) {
|
|
3622
|
-
console.error("ESClassification fillStyle 属性类型错误!", o), s = { ...
|
|
3622
|
+
console.error("ESClassification fillStyle 属性类型错误!", o), s = { ...dt.defaults.fillStyle };
|
|
3623
3623
|
}
|
|
3624
3624
|
s.materialParams = JSON.stringify(s.materialParams), i.callUeFunc({
|
|
3625
3625
|
f: "update",
|
|
3626
3626
|
p: {
|
|
3627
3627
|
id: e.id,
|
|
3628
|
-
filled: e.filled ??
|
|
3628
|
+
filled: e.filled ?? dt.defaults.filled,
|
|
3629
3629
|
fillStyle: s
|
|
3630
3630
|
}
|
|
3631
3631
|
});
|
|
@@ -3636,7 +3636,7 @@ const Ct = class Ct extends D {
|
|
|
3636
3636
|
this.d(n.don(r)), this.d(e.createdEvent.don(r));
|
|
3637
3637
|
}
|
|
3638
3638
|
};
|
|
3639
|
-
v(Ct, "type", Ct.register("ESUeViewer",
|
|
3639
|
+
v(Ct, "type", Ct.register("ESUeViewer", dt.type, Ct));
|
|
3640
3640
|
let ai = Ct;
|
|
3641
3641
|
const et = class et extends I {
|
|
3642
3642
|
constructor(e, t) {
|
|
@@ -3646,7 +3646,7 @@ const et = class et extends I {
|
|
|
3646
3646
|
}
|
|
3647
3647
|
}
|
|
3648
3648
|
};
|
|
3649
|
-
v(et, "type", et.register("ESUeViewer",
|
|
3649
|
+
v(et, "type", et.register("ESUeViewer", Yr.type, et)), // null 表示不设置,undefined表示不做任何转换
|
|
3650
3650
|
v(et, "propValFuncs", {
|
|
3651
3651
|
...I.propValFuncs,
|
|
3652
3652
|
targetID: (e) => {
|
|
@@ -3655,7 +3655,7 @@ v(et, "propValFuncs", {
|
|
|
3655
3655
|
return t ? (t.components.main ?? t).id : e;
|
|
3656
3656
|
}
|
|
3657
3657
|
});
|
|
3658
|
-
let
|
|
3658
|
+
let li = et;
|
|
3659
3659
|
const Ft = class Ft extends I {
|
|
3660
3660
|
constructor(e, t) {
|
|
3661
3661
|
super(e, t);
|
|
@@ -3664,28 +3664,28 @@ const Ft = class Ft extends I {
|
|
|
3664
3664
|
console.warn("viewer is undefined!");
|
|
3665
3665
|
return;
|
|
3666
3666
|
}
|
|
3667
|
-
const r = this.ad(
|
|
3667
|
+
const r = this.ad(He(""));
|
|
3668
3668
|
{
|
|
3669
3669
|
const o = () => {
|
|
3670
3670
|
if (typeof e.url == "string")
|
|
3671
|
-
r.value = E.context.getStrFromEnv(e.url ??
|
|
3671
|
+
r.value = E.context.getStrFromEnv(e.url ?? b.defaults.url);
|
|
3672
3672
|
else {
|
|
3673
3673
|
const h = e.url;
|
|
3674
|
-
h.url = E.context.getStrFromEnv(h.url ??
|
|
3674
|
+
h.url = E.context.getStrFromEnv(h.url ?? b.defaults.url), r.value = h;
|
|
3675
3675
|
}
|
|
3676
3676
|
};
|
|
3677
3677
|
o(), this.ad(e.urlChanged.don(o));
|
|
3678
3678
|
}
|
|
3679
3679
|
const n = () => {
|
|
3680
|
-
const o = e.colorStops ??
|
|
3680
|
+
const o = e.colorStops ?? b.defaults.colorStops;
|
|
3681
3681
|
i.callUeFunc({
|
|
3682
3682
|
f: "update",
|
|
3683
3683
|
p: {
|
|
3684
3684
|
id: e.id,
|
|
3685
|
-
url: r.value ??
|
|
3686
|
-
currentTime: e.currentTime ??
|
|
3687
|
-
minPropValue: e.minPropValue ??
|
|
3688
|
-
maxPropValue: e.maxPropValue ??
|
|
3685
|
+
url: r.value ?? b.defaults.url,
|
|
3686
|
+
currentTime: e.currentTime ?? b.defaults.currentTime,
|
|
3687
|
+
minPropValue: e.minPropValue ?? b.defaults.minPropValue,
|
|
3688
|
+
maxPropValue: e.maxPropValue ?? b.defaults.maxPropValue,
|
|
3689
3689
|
colorStops: JSON.stringify(o)
|
|
3690
3690
|
}
|
|
3691
3691
|
});
|
|
@@ -3699,8 +3699,8 @@ const Ft = class Ft extends I {
|
|
|
3699
3699
|
this.d(s.don(n)), this.d(e.createdEvent.don(n));
|
|
3700
3700
|
}
|
|
3701
3701
|
};
|
|
3702
|
-
v(Ft, "type", Ft.register("ESUeViewer",
|
|
3703
|
-
let
|
|
3702
|
+
v(Ft, "type", Ft.register("ESUeViewer", b.type, Ft));
|
|
3703
|
+
let di = Ft;
|
|
3704
3704
|
const It = class It extends I {
|
|
3705
3705
|
constructor(e, t) {
|
|
3706
3706
|
if (super(e, t), !t.viewer) {
|
|
@@ -3709,7 +3709,7 @@ const It = class It extends I {
|
|
|
3709
3709
|
}
|
|
3710
3710
|
}
|
|
3711
3711
|
};
|
|
3712
|
-
v(It, "type", It.register("ESUeViewer",
|
|
3712
|
+
v(It, "type", It.register("ESUeViewer", Zr.type, It));
|
|
3713
3713
|
let ci = It;
|
|
3714
3714
|
const Et = class Et extends D {
|
|
3715
3715
|
constructor(e, t) {
|
|
@@ -3719,7 +3719,7 @@ const Et = class Et extends D {
|
|
|
3719
3719
|
}
|
|
3720
3720
|
}
|
|
3721
3721
|
};
|
|
3722
|
-
v(Et, "type", Et.register("ESUeViewer",
|
|
3722
|
+
v(Et, "type", Et.register("ESUeViewer", qr.type, Et));
|
|
3723
3723
|
let ui = Et;
|
|
3724
3724
|
const St = class St extends D {
|
|
3725
3725
|
constructor(e, t) {
|
|
@@ -3759,7 +3759,7 @@ const Tt = class Tt extends Ke {
|
|
|
3759
3759
|
}
|
|
3760
3760
|
}
|
|
3761
3761
|
};
|
|
3762
|
-
v(Tt, "type", Tt.register("ESUeViewer",
|
|
3762
|
+
v(Tt, "type", Tt.register("ESUeViewer", Qr.type, Tt));
|
|
3763
3763
|
let Ne = Tt;
|
|
3764
3764
|
const xt = class xt extends Ne {
|
|
3765
3765
|
constructor(e, t) {
|
|
@@ -3769,7 +3769,7 @@ const xt = class xt extends Ne {
|
|
|
3769
3769
|
}
|
|
3770
3770
|
}
|
|
3771
3771
|
};
|
|
3772
|
-
v(xt, "type", xt.register("ESUeViewer",
|
|
3772
|
+
v(xt, "type", xt.register("ESUeViewer", Vr.type, xt));
|
|
3773
3773
|
let pi = xt;
|
|
3774
3774
|
const Rt = class Rt extends M {
|
|
3775
3775
|
constructor(e, t) {
|
|
@@ -3784,7 +3784,7 @@ const Rt = class Rt extends M {
|
|
|
3784
3784
|
}));
|
|
3785
3785
|
}
|
|
3786
3786
|
};
|
|
3787
|
-
v(Rt, "type", Rt.register("ESUeViewer",
|
|
3787
|
+
v(Rt, "type", Rt.register("ESUeViewer", Or.type, Rt));
|
|
3788
3788
|
let vi = Rt;
|
|
3789
3789
|
const it = class it extends $ {
|
|
3790
3790
|
constructor(e, t) {
|
|
@@ -3794,7 +3794,7 @@ const it = class it extends $ {
|
|
|
3794
3794
|
}
|
|
3795
3795
|
}
|
|
3796
3796
|
};
|
|
3797
|
-
v(it, "type", it.register("ESUeViewer",
|
|
3797
|
+
v(it, "type", it.register("ESUeViewer", jr.type, it)), v(it, "propValFuncs", {
|
|
3798
3798
|
...$.propValFuncs,
|
|
3799
3799
|
targetID: (e) => {
|
|
3800
3800
|
if (!e) return "";
|
|
@@ -3811,7 +3811,7 @@ const Lt = class Lt extends I {
|
|
|
3811
3811
|
}
|
|
3812
3812
|
}
|
|
3813
3813
|
};
|
|
3814
|
-
v(Lt, "type", Lt.register("ESUeViewer",
|
|
3814
|
+
v(Lt, "type", Lt.register("ESUeViewer", tn.type, Lt));
|
|
3815
3815
|
let gi = Lt;
|
|
3816
3816
|
const Pt = class Pt extends M {
|
|
3817
3817
|
constructor(e, t) {
|
|
@@ -3821,7 +3821,7 @@ const Pt = class Pt extends M {
|
|
|
3821
3821
|
console.warn("viewer is undefined!");
|
|
3822
3822
|
return;
|
|
3823
3823
|
}
|
|
3824
|
-
const r = this.ad(
|
|
3824
|
+
const r = this.ad(He(""));
|
|
3825
3825
|
{
|
|
3826
3826
|
const o = () => {
|
|
3827
3827
|
if (typeof e.url == "string")
|
|
@@ -3865,23 +3865,23 @@ v(Pt, "type", Pt.register("ESUeViewer", N.type, Pt));
|
|
|
3865
3865
|
let wi = Pt;
|
|
3866
3866
|
const kt = class kt extends G {
|
|
3867
3867
|
constructor(e, t) {
|
|
3868
|
-
super(e, t), this.ad(new L(e.renderInUEChanged, () => e.renderInUE ? new
|
|
3868
|
+
super(e, t), this.ad(new L(e.renderInUEChanged, () => e.renderInUE ? new Fo(e, t) : new Co(e, t)));
|
|
3869
3869
|
}
|
|
3870
3870
|
};
|
|
3871
3871
|
v(kt, "type", kt.register("ESUeViewer", Ce.type, kt));
|
|
3872
3872
|
let yi = kt;
|
|
3873
|
-
class
|
|
3873
|
+
class Co extends m {
|
|
3874
3874
|
constructor(t, i) {
|
|
3875
3875
|
super();
|
|
3876
|
-
v(this, "_screenPosition", this.disposeVar(
|
|
3876
|
+
v(this, "_screenPosition", this.disposeVar(pr(void 0)));
|
|
3877
3877
|
const r = i.viewer;
|
|
3878
3878
|
if (!r) {
|
|
3879
3879
|
console.warn("viewer is undefined!");
|
|
3880
3880
|
return;
|
|
3881
3881
|
}
|
|
3882
|
-
const n = this.disposeVar(new
|
|
3882
|
+
const n = this.disposeVar(new fr());
|
|
3883
3883
|
n.parentID = t.id, t.components.disposableAdd(n, !0), n.show = !1, this.dispose(k([n, "position"], [t, "position"])), this.dispose(k([n, "rotation"], [t, "rotation"])), this.dispose(k([n, "flyToParam"], [t, "flyToParam"])), this.dispose(k([n, "flyInParam"], [t, "flyInParam"])), this.dispose(t.calcFlyToParamEvent.disposableOn(() => {
|
|
3884
|
-
|
|
3884
|
+
lt(r, n.id);
|
|
3885
3885
|
})), this.dispose(t.calcFlyInParamEvent.disposableOn(async () => {
|
|
3886
3886
|
if (!i.actived) return;
|
|
3887
3887
|
const h = await i.getCurrentCameraInfo();
|
|
@@ -3894,8 +3894,8 @@ class mo extends m {
|
|
|
3894
3894
|
Le(r, n.id, h, a, g);
|
|
3895
3895
|
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((h, a, g, p) => {
|
|
3896
3896
|
Pe(r, n.id, h, a, p, g);
|
|
3897
|
-
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((h, a, g, p,
|
|
3898
|
-
ke(r, n.id, h, a, g, p,
|
|
3897
|
+
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((h, a, g, p, l) => {
|
|
3898
|
+
ke(r, n.id, h, a, g, p, l);
|
|
3899
3899
|
})), this.dispose(t.flyToEvent.disposableOn((h, a) => {
|
|
3900
3900
|
n.flyTo(h);
|
|
3901
3901
|
})), this.dispose(t.flyInEvent.don((h) => {
|
|
@@ -3904,7 +3904,7 @@ class mo extends m {
|
|
|
3904
3904
|
const s = this._screenPosition, o = this.disposeVar(new Je());
|
|
3905
3905
|
o.parentID = t.id, i.add(o), this.dispose(() => i.delete(o)), this.dispose(k([o, "allowPicking"], [t, "allowPicking"]));
|
|
3906
3906
|
{
|
|
3907
|
-
const h = this.disposeVar(
|
|
3907
|
+
const h = this.disposeVar(be()), a = () => {
|
|
3908
3908
|
t.show ? h.restart(void 0, async () => {
|
|
3909
3909
|
if (!t.position) return;
|
|
3910
3910
|
const g = await i.lonLatAltToScreenPosition(t.position);
|
|
@@ -3912,8 +3912,8 @@ class mo extends m {
|
|
|
3912
3912
|
if (!g)
|
|
3913
3913
|
this._screenPosition.value = void 0;
|
|
3914
3914
|
else {
|
|
3915
|
-
const [p,
|
|
3916
|
-
p === -1 &&
|
|
3915
|
+
const [p, l] = g;
|
|
3916
|
+
p === -1 && l === -1 ? this._screenPosition.value = void 0 : this._screenPosition.value = [p, l];
|
|
3917
3917
|
}
|
|
3918
3918
|
}) : h.cancel();
|
|
3919
3919
|
};
|
|
@@ -3921,11 +3921,11 @@ class mo extends m {
|
|
|
3921
3921
|
}
|
|
3922
3922
|
{
|
|
3923
3923
|
const h = () => class extends m {
|
|
3924
|
-
constructor(
|
|
3925
|
-
if (super(), this._subContainer =
|
|
3924
|
+
constructor(l, u, c) {
|
|
3925
|
+
if (super(), this._subContainer = l, !c) return;
|
|
3926
3926
|
if (!t.instanceClass)
|
|
3927
3927
|
throw new Error("!sceneObject.instanceClass");
|
|
3928
|
-
const f = new
|
|
3928
|
+
const f = new en(), w = f.element;
|
|
3929
3929
|
this._subContainer.appendChild(w), this.dispose(() => this._subContainer.removeChild(w)), w.onclick = (y) => {
|
|
3930
3930
|
(t.allowPicking ?? !1) && t.pickedEvent.emit(new Ae(
|
|
3931
3931
|
{ div: w, pointerEvent: y },
|
|
@@ -3998,12 +3998,12 @@ class mo extends m {
|
|
|
3998
3998
|
this._screenPosition.value = t;
|
|
3999
3999
|
}
|
|
4000
4000
|
}
|
|
4001
|
-
class
|
|
4001
|
+
class Fo extends m {
|
|
4002
4002
|
constructor(t, i) {
|
|
4003
4003
|
super();
|
|
4004
4004
|
v(this, "_imageLabel");
|
|
4005
4005
|
v(this, "_hasClassDivAndPos", {});
|
|
4006
|
-
this._imageLabel = this.dv(new
|
|
4006
|
+
this._imageLabel = this.dv(new gr()), this._imageLabel.isHoverZoom = !1, this._imageLabel.parentID = t.id;
|
|
4007
4007
|
const r = i.viewer;
|
|
4008
4008
|
if (!r) {
|
|
4009
4009
|
console.warn("viewer is undefined!");
|
|
@@ -4019,9 +4019,9 @@ class Co extends m {
|
|
|
4019
4019
|
const a = document.createElement("div"), g = this.dv(new t.instanceClass(a, t, i))._container;
|
|
4020
4020
|
if (g.style.opacity = t.opacity.toString() ?? Ce.defaults.opacity, g.style.position = "fixed", g.style.zIndex = "-1", g.style.top = "0px", !document.body.contains(g)) {
|
|
4021
4021
|
document.body.appendChild(g);
|
|
4022
|
-
let
|
|
4023
|
-
for (let u = 0; u <
|
|
4024
|
-
const c =
|
|
4022
|
+
let l = g ? g.querySelectorAll("*[class]") : [];
|
|
4023
|
+
for (let u = 0; u < l.length; u++) {
|
|
4024
|
+
const c = l[u];
|
|
4025
4025
|
var p = c.getBoundingClientRect();
|
|
4026
4026
|
this._hasClassDivAndPos[c.className] = [
|
|
4027
4027
|
c.offsetLeft,
|
|
@@ -4031,15 +4031,15 @@ class Co extends m {
|
|
|
4031
4031
|
];
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
4034
|
-
|
|
4034
|
+
Qn(g, {
|
|
4035
4035
|
backgroundColor: null,
|
|
4036
4036
|
allowTaint: !0,
|
|
4037
4037
|
useCORS: !0,
|
|
4038
4038
|
width: g.offsetWidth,
|
|
4039
4039
|
height: g.offsetHeight,
|
|
4040
4040
|
scale: 1
|
|
4041
|
-
}).then((
|
|
4042
|
-
document.body.contains(g) && document.body.removeChild(g), n.url =
|
|
4041
|
+
}).then((l) => {
|
|
4042
|
+
document.body.contains(g) && document.body.removeChild(g), n.url = l.toDataURL(), n.show = t.show;
|
|
4043
4043
|
}).catch(() => {
|
|
4044
4044
|
document.body.contains(g) && document.body.removeChild(g);
|
|
4045
4045
|
});
|
|
@@ -4071,15 +4071,15 @@ class Co extends m {
|
|
|
4071
4071
|
if (o === "leftClick" && h) {
|
|
4072
4072
|
const a = (h == null ? void 0 : h.classNames) ?? [], g = Object.keys(this._hasClassDivAndPos);
|
|
4073
4073
|
for (let p = 0; p < g.length; p++) {
|
|
4074
|
-
const
|
|
4075
|
-
let u = this._hasClassDivAndPos[
|
|
4076
|
-
h && h.mouseRelativePos && h.mouseRelativePos[0] >= u[0] && h.mouseRelativePos[0] <= u[2] && h.mouseRelativePos[1] >= u[1] && h.mouseRelativePos[1] <= u[3] && a.push(
|
|
4074
|
+
const l = g[p];
|
|
4075
|
+
let u = this._hasClassDivAndPos[l];
|
|
4076
|
+
h && h.mouseRelativePos && h.mouseRelativePos[0] >= u[0] && h.mouseRelativePos[0] <= u[2] && h.mouseRelativePos[1] >= u[1] && h.mouseRelativePos[1] <= u[3] && a.push(l);
|
|
4077
4077
|
}
|
|
4078
4078
|
h.classNames = a;
|
|
4079
4079
|
}
|
|
4080
4080
|
t.widgetEvent.emit({ type: o, add: h });
|
|
4081
4081
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
4082
|
-
|
|
4082
|
+
lt(r, n.id);
|
|
4083
4083
|
})), this.d(t.calcFlyInParamEvent.don(() => {
|
|
4084
4084
|
const s = i.getCurrentCameraInfo();
|
|
4085
4085
|
if (!s) return;
|
|
@@ -4130,7 +4130,7 @@ const Dt = class Dt extends M {
|
|
|
4130
4130
|
}));
|
|
4131
4131
|
}
|
|
4132
4132
|
};
|
|
4133
|
-
v(Dt, "type", Dt.register("ESUeViewer",
|
|
4133
|
+
v(Dt, "type", Dt.register("ESUeViewer", rn.type, Dt));
|
|
4134
4134
|
let mi = Dt;
|
|
4135
4135
|
const Bt = class Bt extends D {
|
|
4136
4136
|
constructor(e, t) {
|
|
@@ -4140,7 +4140,7 @@ const Bt = class Bt extends D {
|
|
|
4140
4140
|
}
|
|
4141
4141
|
}
|
|
4142
4142
|
};
|
|
4143
|
-
v(Bt, "type", Bt.register("ESUeViewer",
|
|
4143
|
+
v(Bt, "type", Bt.register("ESUeViewer", nn.type, Bt));
|
|
4144
4144
|
let ze = Bt;
|
|
4145
4145
|
const _t = class _t extends D {
|
|
4146
4146
|
constructor(e, t) {
|
|
@@ -4150,7 +4150,7 @@ const _t = class _t extends D {
|
|
|
4150
4150
|
}
|
|
4151
4151
|
}
|
|
4152
4152
|
};
|
|
4153
|
-
v(_t, "type", _t.register("ESUeViewer",
|
|
4153
|
+
v(_t, "type", _t.register("ESUeViewer", sn.type, _t));
|
|
4154
4154
|
let Ci = _t;
|
|
4155
4155
|
const Mt = class Mt extends $ {
|
|
4156
4156
|
constructor(e, t) {
|
|
@@ -4160,7 +4160,7 @@ const Mt = class Mt extends $ {
|
|
|
4160
4160
|
}
|
|
4161
4161
|
}
|
|
4162
4162
|
};
|
|
4163
|
-
v(Mt, "type", Mt.register("ESUeViewer",
|
|
4163
|
+
v(Mt, "type", Mt.register("ESUeViewer", on.type, Mt));
|
|
4164
4164
|
let Fi = Mt;
|
|
4165
4165
|
const Y = class Y extends I {
|
|
4166
4166
|
constructor(e, t) {
|
|
@@ -4171,11 +4171,11 @@ const Y = class Y extends I {
|
|
|
4171
4171
|
return;
|
|
4172
4172
|
}
|
|
4173
4173
|
this.d(e.setNodePositionEvent.don((r, n) => {
|
|
4174
|
-
|
|
4174
|
+
ls(i, e.id, r, n);
|
|
4175
4175
|
})), this.d(e.setNodeRotationEvent.don((r, n) => {
|
|
4176
4176
|
ds(i, e.id, r, n);
|
|
4177
4177
|
})), this.d(e.setNodeScaleEvent.don((r, n) => {
|
|
4178
|
-
|
|
4178
|
+
cs(i, e.id, r, n);
|
|
4179
4179
|
}));
|
|
4180
4180
|
}
|
|
4181
4181
|
};
|
|
@@ -4189,7 +4189,7 @@ v(Y, "forceUeUpdateProps", [
|
|
|
4189
4189
|
czmMinimumPixelSize: null,
|
|
4190
4190
|
czmNativeScale: null,
|
|
4191
4191
|
czmColor: null
|
|
4192
|
-
}), v(Y, "type", Y.register("ESUeViewer",
|
|
4192
|
+
}), v(Y, "type", Y.register("ESUeViewer", an.type, Y));
|
|
4193
4193
|
let Ii = Y;
|
|
4194
4194
|
const $t = class $t extends D {
|
|
4195
4195
|
constructor(e, t) {
|
|
@@ -4199,7 +4199,7 @@ const $t = class $t extends D {
|
|
|
4199
4199
|
}
|
|
4200
4200
|
}
|
|
4201
4201
|
};
|
|
4202
|
-
v($t, "type", $t.register("ESUeViewer",
|
|
4202
|
+
v($t, "type", $t.register("ESUeViewer", ln.type, $t));
|
|
4203
4203
|
let Ei = $t;
|
|
4204
4204
|
const Wt = class Wt extends I {
|
|
4205
4205
|
constructor(e, t) {
|
|
@@ -4250,7 +4250,7 @@ const Z = class Z extends z {
|
|
|
4250
4250
|
e.anchor = [0.5, 1];
|
|
4251
4251
|
}
|
|
4252
4252
|
};
|
|
4253
|
-
v(Z, "type", Z.register("ESUeViewer",
|
|
4253
|
+
v(Z, "type", Z.register("ESUeViewer", gr.type, Z)), v(Z, "forceUeUpdateProps", [
|
|
4254
4254
|
...z.forceUeUpdateProps,
|
|
4255
4255
|
"url"
|
|
4256
4256
|
]), v(Z, "propValFuncs", {
|
|
@@ -4266,7 +4266,7 @@ const At = class At extends I {
|
|
|
4266
4266
|
}
|
|
4267
4267
|
}
|
|
4268
4268
|
};
|
|
4269
|
-
v(At, "type", At.register("ESUeViewer",
|
|
4269
|
+
v(At, "type", At.register("ESUeViewer", cn.type, At));
|
|
4270
4270
|
let xi = At;
|
|
4271
4271
|
const Ut = class Ut extends Ke {
|
|
4272
4272
|
constructor(e, t) {
|
|
@@ -4276,7 +4276,7 @@ const Ut = class Ut extends Ke {
|
|
|
4276
4276
|
}
|
|
4277
4277
|
}
|
|
4278
4278
|
};
|
|
4279
|
-
v(Ut, "type", Ut.register("ESUeViewer",
|
|
4279
|
+
v(Ut, "type", Ut.register("ESUeViewer", un.type, Ut));
|
|
4280
4280
|
let Ri = Ut;
|
|
4281
4281
|
const Nt = class Nt extends M {
|
|
4282
4282
|
constructor(e, t) {
|
|
@@ -4286,7 +4286,7 @@ const Nt = class Nt extends M {
|
|
|
4286
4286
|
}
|
|
4287
4287
|
}
|
|
4288
4288
|
};
|
|
4289
|
-
v(Nt, "type", Nt.register("ESUeViewer",
|
|
4289
|
+
v(Nt, "type", Nt.register("ESUeViewer", hn.type, Nt));
|
|
4290
4290
|
let Li = Nt;
|
|
4291
4291
|
const zt = class zt extends Ke {
|
|
4292
4292
|
constructor(e, t) {
|
|
@@ -4296,9 +4296,9 @@ const zt = class zt extends Ke {
|
|
|
4296
4296
|
}
|
|
4297
4297
|
}
|
|
4298
4298
|
};
|
|
4299
|
-
v(zt, "type", zt.register("ESUeViewer",
|
|
4299
|
+
v(zt, "type", zt.register("ESUeViewer", pn.type, zt));
|
|
4300
4300
|
let Pi = zt;
|
|
4301
|
-
const
|
|
4301
|
+
const bt = class bt extends I {
|
|
4302
4302
|
constructor(e, t) {
|
|
4303
4303
|
if (super(e, t), !t.viewer) {
|
|
4304
4304
|
console.warn("viewer is undefined!");
|
|
@@ -4306,9 +4306,9 @@ const Ht = class Ht extends I {
|
|
|
4306
4306
|
}
|
|
4307
4307
|
}
|
|
4308
4308
|
};
|
|
4309
|
-
v(
|
|
4310
|
-
let ki =
|
|
4311
|
-
const
|
|
4309
|
+
v(bt, "type", bt.register("ESUeViewer", vn.type, bt));
|
|
4310
|
+
let ki = bt;
|
|
4311
|
+
const Ht = class Ht extends I {
|
|
4312
4312
|
constructor(e, t) {
|
|
4313
4313
|
if (super(e, t), !t.viewer) {
|
|
4314
4314
|
console.warn("viewer is undefined!");
|
|
@@ -4316,8 +4316,8 @@ const bt = class bt extends I {
|
|
|
4316
4316
|
}
|
|
4317
4317
|
}
|
|
4318
4318
|
};
|
|
4319
|
-
v(
|
|
4320
|
-
let Di =
|
|
4319
|
+
v(Ht, "type", Ht.register("ESUeViewer", fn.type, Ht));
|
|
4320
|
+
let Di = Ht;
|
|
4321
4321
|
const Jt = class Jt extends D {
|
|
4322
4322
|
constructor(e, t) {
|
|
4323
4323
|
if (super(e, t), !t.viewer) {
|
|
@@ -4326,7 +4326,7 @@ const Jt = class Jt extends D {
|
|
|
4326
4326
|
}
|
|
4327
4327
|
}
|
|
4328
4328
|
};
|
|
4329
|
-
v(Jt, "type", Jt.register("ESUeViewer",
|
|
4329
|
+
v(Jt, "type", Jt.register("ESUeViewer", gn.type, Jt));
|
|
4330
4330
|
let Bi = Jt;
|
|
4331
4331
|
const Gt = class Gt extends ze {
|
|
4332
4332
|
constructor(e, t) {
|
|
@@ -4336,7 +4336,7 @@ const Gt = class Gt extends ze {
|
|
|
4336
4336
|
}
|
|
4337
4337
|
}
|
|
4338
4338
|
};
|
|
4339
|
-
v(Gt, "type", Gt.register("ESUeViewer",
|
|
4339
|
+
v(Gt, "type", Gt.register("ESUeViewer", wn.type, Gt));
|
|
4340
4340
|
let _i = Gt;
|
|
4341
4341
|
const Kt = class Kt extends Ue {
|
|
4342
4342
|
constructor(e, t) {
|
|
@@ -4348,20 +4348,20 @@ const Kt = class Kt extends Ue {
|
|
|
4348
4348
|
}
|
|
4349
4349
|
this.d(e.highlightFeatureEvent.don((r) => {
|
|
4350
4350
|
const n = typeof r == "number" ? r.toString() : r;
|
|
4351
|
-
|
|
4351
|
+
ns(i, e.id, n);
|
|
4352
4352
|
})), this.d(e.highlightFeatureAndFlyToEvent.don((r, n, s, o) => {
|
|
4353
4353
|
const h = typeof r == "number" ? r.toString() : r;
|
|
4354
|
-
|
|
4354
|
+
ss(i, e.id, h, o ?? 1);
|
|
4355
4355
|
})), this.d(e.setLayerVisibleEvent.don((r, n) => {
|
|
4356
4356
|
let s = "";
|
|
4357
|
-
typeof n != "string" ? s = JSON.stringify(n) : s = n,
|
|
4357
|
+
typeof n != "string" ? s = JSON.stringify(n) : s = n, os(i, e.id, s);
|
|
4358
4358
|
})), this.d(e.setLayerColorEvent.don((r, n) => {
|
|
4359
4359
|
let s = "";
|
|
4360
|
-
typeof n != "string" ? s = JSON.stringify(n) : s = n,
|
|
4360
|
+
typeof n != "string" ? s = JSON.stringify(n) : s = n, as(i, e.id, s);
|
|
4361
4361
|
}));
|
|
4362
4362
|
}
|
|
4363
4363
|
};
|
|
4364
|
-
v(Kt, "type", Kt.register("ESUeViewer",
|
|
4364
|
+
v(Kt, "type", Kt.register("ESUeViewer", yn.type, Kt));
|
|
4365
4365
|
let Mi = Kt;
|
|
4366
4366
|
const Xt = class Xt extends $ {
|
|
4367
4367
|
constructor(e, t) {
|
|
@@ -4371,7 +4371,7 @@ const Xt = class Xt extends $ {
|
|
|
4371
4371
|
}
|
|
4372
4372
|
}
|
|
4373
4373
|
};
|
|
4374
|
-
v(Xt, "type", Xt.register("ESUeViewer",
|
|
4374
|
+
v(Xt, "type", Xt.register("ESUeViewer", mn.type, Xt));
|
|
4375
4375
|
let $i = Xt;
|
|
4376
4376
|
const Yt = class Yt extends z {
|
|
4377
4377
|
constructor(e, t) {
|
|
@@ -4394,7 +4394,7 @@ const Yt = class Yt extends z {
|
|
|
4394
4394
|
}));
|
|
4395
4395
|
}
|
|
4396
4396
|
};
|
|
4397
|
-
v(Yt, "type", Yt.register("ESUeViewer",
|
|
4397
|
+
v(Yt, "type", Yt.register("ESUeViewer", Cn.type, Yt));
|
|
4398
4398
|
let Wi = Yt;
|
|
4399
4399
|
const Zt = class Zt extends I {
|
|
4400
4400
|
constructor(e, t) {
|
|
@@ -4404,7 +4404,7 @@ const Zt = class Zt extends I {
|
|
|
4404
4404
|
}
|
|
4405
4405
|
}
|
|
4406
4406
|
};
|
|
4407
|
-
v(Zt, "type", Zt.register("ESUeViewer",
|
|
4407
|
+
v(Zt, "type", Zt.register("ESUeViewer", Fn.type, Zt));
|
|
4408
4408
|
let Ai = Zt;
|
|
4409
4409
|
const q = class q extends M {
|
|
4410
4410
|
constructor(e, t) {
|
|
@@ -4414,7 +4414,7 @@ const q = class q extends M {
|
|
|
4414
4414
|
}
|
|
4415
4415
|
}
|
|
4416
4416
|
};
|
|
4417
|
-
v(q, "type", q.register("ESUeViewer",
|
|
4417
|
+
v(q, "type", q.register("ESUeViewer", In.type, q)), v(q, "forceUeUpdateProps", [
|
|
4418
4418
|
...M.forceUeUpdateProps,
|
|
4419
4419
|
"url"
|
|
4420
4420
|
]), v(q, "propValFuncs", {
|
|
@@ -4430,7 +4430,7 @@ const qt = class qt extends D {
|
|
|
4430
4430
|
}
|
|
4431
4431
|
}
|
|
4432
4432
|
};
|
|
4433
|
-
v(qt, "type", qt.register("ESUeViewer",
|
|
4433
|
+
v(qt, "type", qt.register("ESUeViewer", En.type, qt));
|
|
4434
4434
|
let Ni = qt;
|
|
4435
4435
|
const rt = class rt extends $ {
|
|
4436
4436
|
constructor(e, t) {
|
|
@@ -4440,7 +4440,7 @@ const rt = class rt extends $ {
|
|
|
4440
4440
|
}
|
|
4441
4441
|
}
|
|
4442
4442
|
};
|
|
4443
|
-
v(rt, "type", rt.register("ESUeViewer",
|
|
4443
|
+
v(rt, "type", rt.register("ESUeViewer", Sn.type, rt)), // null 表示不设置,undefined表示不做任何转换
|
|
4444
4444
|
v(rt, "propValFuncs", {
|
|
4445
4445
|
...$.propValFuncs,
|
|
4446
4446
|
targetID: (e) => {
|
|
@@ -4458,8 +4458,8 @@ const Qt = class Qt extends $ {
|
|
|
4458
4458
|
}
|
|
4459
4459
|
}
|
|
4460
4460
|
};
|
|
4461
|
-
v(Qt, "type", Qt.register("ESUeViewer",
|
|
4462
|
-
let
|
|
4461
|
+
v(Qt, "type", Qt.register("ESUeViewer", Tn.type, Qt));
|
|
4462
|
+
let bi = Qt;
|
|
4463
4463
|
const Vt = class Vt extends at {
|
|
4464
4464
|
constructor(e, t) {
|
|
4465
4465
|
if (super(e, t), !t.viewer) {
|
|
@@ -4488,14 +4488,14 @@ const Vt = class Vt extends at {
|
|
|
4488
4488
|
} else if (o.startsWith("rgba")) {
|
|
4489
4489
|
let a = o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);
|
|
4490
4490
|
if (a) {
|
|
4491
|
-
let g = parseInt(a[1]), p = parseInt(a[2]),
|
|
4492
|
-
h = [g, p,
|
|
4491
|
+
let g = parseInt(a[1]), p = parseInt(a[2]), l = parseInt(a[3]), u = parseFloat(a[4]);
|
|
4492
|
+
h = [g, p, l, u];
|
|
4493
4493
|
}
|
|
4494
4494
|
} else if (o.startsWith("rgb")) {
|
|
4495
4495
|
let a = o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
|
4496
4496
|
if (a) {
|
|
4497
|
-
let g = parseInt(a[1]), p = parseInt(a[2]),
|
|
4498
|
-
h = [g, p,
|
|
4497
|
+
let g = parseInt(a[1]), p = parseInt(a[2]), l = parseInt(a[3]);
|
|
4498
|
+
h = [g, p, l, 1];
|
|
4499
4499
|
}
|
|
4500
4500
|
} else
|
|
4501
4501
|
console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");
|
|
@@ -4539,8 +4539,8 @@ const Vt = class Vt extends at {
|
|
|
4539
4539
|
}
|
|
4540
4540
|
}
|
|
4541
4541
|
};
|
|
4542
|
-
v(Vt, "type", Vt.register("ESUeViewer",
|
|
4543
|
-
let
|
|
4542
|
+
v(Vt, "type", Vt.register("ESUeViewer", xn.type, Vt));
|
|
4543
|
+
let Hi = Vt;
|
|
4544
4544
|
const Ot = class Ot extends M {
|
|
4545
4545
|
constructor(e, t) {
|
|
4546
4546
|
if (super(e, t), !t.viewer) {
|
|
@@ -4548,19 +4548,19 @@ const Ot = class Ot extends M {
|
|
|
4548
4548
|
return;
|
|
4549
4549
|
}
|
|
4550
4550
|
this.d(e.addTreesEvent.don((r) => {
|
|
4551
|
-
|
|
4551
|
+
Ln(t, e.id, r);
|
|
4552
4552
|
})), this.d(e.removeAllTreesEvent.don(() => {
|
|
4553
|
-
|
|
4553
|
+
Pn(t, e.id);
|
|
4554
4554
|
})), this.d(e.updateTreeParamsEvent.don((r) => {
|
|
4555
|
-
|
|
4555
|
+
kn(t, e.id, r);
|
|
4556
4556
|
})), this.d(e.cutDownTreesEvent.don((r, n) => {
|
|
4557
|
-
|
|
4557
|
+
Dn(t, e.id, r, n);
|
|
4558
4558
|
})), this.d(e.growthSimulationEvent.don((r, n, s) => {
|
|
4559
|
-
|
|
4559
|
+
Bn(t, e.id, r, n, s);
|
|
4560
4560
|
}));
|
|
4561
4561
|
}
|
|
4562
4562
|
};
|
|
4563
|
-
v(Ot, "type", Ot.register("ESUeViewer",
|
|
4563
|
+
v(Ot, "type", Ot.register("ESUeViewer", Rn.type, Ot));
|
|
4564
4564
|
let Ji = Ot;
|
|
4565
4565
|
const jt = class jt extends I {
|
|
4566
4566
|
constructor(e, t) {
|
|
@@ -4570,7 +4570,7 @@ const jt = class jt extends I {
|
|
|
4570
4570
|
}
|
|
4571
4571
|
}
|
|
4572
4572
|
};
|
|
4573
|
-
v(jt, "type", jt.register("ESUeViewer",
|
|
4573
|
+
v(jt, "type", jt.register("ESUeViewer", _n.type, jt));
|
|
4574
4574
|
let Gi = jt;
|
|
4575
4575
|
const te = class te extends $ {
|
|
4576
4576
|
constructor(e, t) {
|
|
@@ -4597,7 +4597,7 @@ const te = class te extends $ {
|
|
|
4597
4597
|
}));
|
|
4598
4598
|
}
|
|
4599
4599
|
};
|
|
4600
|
-
v(te, "type", te.register("ESUeViewer",
|
|
4600
|
+
v(te, "type", te.register("ESUeViewer", Mn.type, te));
|
|
4601
4601
|
let Ki = te;
|
|
4602
4602
|
const ee = class ee extends $ {
|
|
4603
4603
|
constructor(e, t) {
|
|
@@ -4617,7 +4617,7 @@ const ee = class ee extends $ {
|
|
|
4617
4617
|
}));
|
|
4618
4618
|
}
|
|
4619
4619
|
};
|
|
4620
|
-
v(ee, "type", ee.register("ESUeViewer",
|
|
4620
|
+
v(ee, "type", ee.register("ESUeViewer", $n.type, ee));
|
|
4621
4621
|
let Xi = ee;
|
|
4622
4622
|
const ie = class ie extends z {
|
|
4623
4623
|
constructor(e, t) {
|
|
@@ -4627,7 +4627,7 @@ const ie = class ie extends z {
|
|
|
4627
4627
|
}
|
|
4628
4628
|
}
|
|
4629
4629
|
};
|
|
4630
|
-
v(ie, "type", ie.register("ESUeViewer",
|
|
4630
|
+
v(ie, "type", ie.register("ESUeViewer", fr.type, ie));
|
|
4631
4631
|
let Yi = ie;
|
|
4632
4632
|
const nt = class nt extends z {
|
|
4633
4633
|
constructor(e, t) {
|
|
@@ -4638,18 +4638,18 @@ const nt = class nt extends z {
|
|
|
4638
4638
|
return;
|
|
4639
4639
|
}
|
|
4640
4640
|
this.d(e.callFunctionEvent.don(async (r, n) => {
|
|
4641
|
-
const s = await
|
|
4641
|
+
const s = await Sr(i, e.id, r, n);
|
|
4642
4642
|
e.__callFunctionResultEvent.emit(s);
|
|
4643
4643
|
}));
|
|
4644
4644
|
}
|
|
4645
4645
|
};
|
|
4646
|
-
v(nt, "type", nt.register("ESUeViewer",
|
|
4646
|
+
v(nt, "type", nt.register("ESUeViewer", Wn.type, nt)), v(nt, "propValFuncs", {
|
|
4647
4647
|
...z.propValFuncs,
|
|
4648
4648
|
info: (e) => JSON.stringify(e ?? {})
|
|
4649
4649
|
});
|
|
4650
4650
|
let Zi = nt;
|
|
4651
|
-
const qi = (
|
|
4652
|
-
switch (
|
|
4651
|
+
const qi = (d) => {
|
|
4652
|
+
switch (d) {
|
|
4653
4653
|
case 0:
|
|
4654
4654
|
return "成功绑定";
|
|
4655
4655
|
case 1:
|
|
@@ -4663,8 +4663,8 @@ const qi = (l) => {
|
|
|
4663
4663
|
default:
|
|
4664
4664
|
return "未知错误";
|
|
4665
4665
|
}
|
|
4666
|
-
},
|
|
4667
|
-
switch (
|
|
4666
|
+
}, Io = (d) => {
|
|
4667
|
+
switch (d) {
|
|
4668
4668
|
case 0:
|
|
4669
4669
|
return "创建成功";
|
|
4670
4670
|
case 1:
|
|
@@ -4683,7 +4683,7 @@ const qi = (l) => {
|
|
|
4683
4683
|
return;
|
|
4684
4684
|
}
|
|
4685
4685
|
this.d(() => {
|
|
4686
|
-
|
|
4686
|
+
Ir(i, e.id);
|
|
4687
4687
|
});
|
|
4688
4688
|
const r = async () => {
|
|
4689
4689
|
a() || await i.callUeFunc({
|
|
@@ -4726,9 +4726,9 @@ const qi = (l) => {
|
|
|
4726
4726
|
}
|
|
4727
4727
|
}), (t.debug ?? !1) && console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`));
|
|
4728
4728
|
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1, g = async () => {
|
|
4729
|
-
const { id:
|
|
4729
|
+
const { id: l } = e, u = await t.unBindActorByID(l);
|
|
4730
4730
|
u && u.error !== "" && console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${u.error}`), s = void 0;
|
|
4731
|
-
const c = await i.callUeFunc({ f: "destroy", p: { id:
|
|
4731
|
+
const c = await i.callUeFunc({ f: "destroy", p: { id: l } });
|
|
4732
4732
|
if (c && c.error !== "") {
|
|
4733
4733
|
console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${c.error}`);
|
|
4734
4734
|
return;
|
|
@@ -4739,7 +4739,7 @@ const qi = (l) => {
|
|
|
4739
4739
|
actorClass: "default"
|
|
4740
4740
|
}));
|
|
4741
4741
|
{
|
|
4742
|
-
const
|
|
4742
|
+
const l = this.dv(P(
|
|
4743
4743
|
e.actorClassChanged,
|
|
4744
4744
|
e.actorTagChanged
|
|
4745
4745
|
// sceneObject.positionChanged,
|
|
@@ -4754,10 +4754,10 @@ const qi = (l) => {
|
|
|
4754
4754
|
// position: sceneObject.position,
|
|
4755
4755
|
};
|
|
4756
4756
|
};
|
|
4757
|
-
u(), this.d(
|
|
4757
|
+
u(), this.d(l.don(u)), this.d(e.flushEvent.don(() => l.flush()));
|
|
4758
4758
|
}
|
|
4759
4759
|
{
|
|
4760
|
-
const
|
|
4760
|
+
const l = this.dv(Te(async (c) => {
|
|
4761
4761
|
if (await c.promise(g()), e.lastActorStatus = "null", p.value.type === "ActorTag") {
|
|
4762
4762
|
const { actorTag: f } = p.value;
|
|
4763
4763
|
try {
|
|
@@ -4791,7 +4791,7 @@ const qi = (l) => {
|
|
|
4791
4791
|
if (w.re.type === 0)
|
|
4792
4792
|
f !== "default" && (e.lastActorStatus = "created"), o = f;
|
|
4793
4793
|
else {
|
|
4794
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${f},${
|
|
4794
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${f},${Io(w.re.type)}`);
|
|
4795
4795
|
return;
|
|
4796
4796
|
}
|
|
4797
4797
|
} catch (w) {
|
|
@@ -4801,47 +4801,47 @@ const qi = (l) => {
|
|
|
4801
4801
|
}
|
|
4802
4802
|
await c.promise(r()), await c.promise(h());
|
|
4803
4803
|
})), u = async () => {
|
|
4804
|
-
|
|
4804
|
+
l.restart();
|
|
4805
4805
|
};
|
|
4806
4806
|
u(), this.d(p.changed.don(u));
|
|
4807
4807
|
}
|
|
4808
|
-
this.d(e.positionChanged.don(h)), this.d(e.callFunctionEvent.don(async (
|
|
4808
|
+
this.d(e.positionChanged.don(h)), this.d(e.callFunctionEvent.don(async (l, u) => {
|
|
4809
4809
|
if (a()) {
|
|
4810
4810
|
e.__callFunctionResultEvent.emit(void 0);
|
|
4811
4811
|
return;
|
|
4812
4812
|
}
|
|
4813
|
-
const c = await
|
|
4813
|
+
const c = await Sr(i, e.id, l, u);
|
|
4814
4814
|
e.__callFunctionResultEvent.emit(c);
|
|
4815
|
-
})), this.d(e.smoothMoveEvent.don((
|
|
4816
|
-
a() || De(i, e.id,
|
|
4817
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((
|
|
4818
|
-
a() || Le(i, e.id,
|
|
4819
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((
|
|
4820
|
-
a() || Pe(i, e.id,
|
|
4821
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((
|
|
4822
|
-
a() || ke(i, e.id,
|
|
4823
|
-
})), this.d(e.automaticLandingEvent.don((
|
|
4815
|
+
})), this.d(e.smoothMoveEvent.don((l, u) => {
|
|
4816
|
+
a() || De(i, e.id, l, u);
|
|
4817
|
+
})), this.d(e.smoothMoveWithRotationEvent.don((l, u, c) => {
|
|
4818
|
+
a() || Le(i, e.id, l, u, c);
|
|
4819
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((l, u, c, f) => {
|
|
4820
|
+
a() || Pe(i, e.id, l, u, f, c);
|
|
4821
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((l, u, c, f, w) => {
|
|
4822
|
+
a() || ke(i, e.id, l, u, c, f, w);
|
|
4823
|
+
})), this.d(e.automaticLandingEvent.don((l) => {
|
|
4824
4824
|
if (a()) return;
|
|
4825
4825
|
const u = [e.position[0], e.position[1]];
|
|
4826
4826
|
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((c) => {
|
|
4827
|
-
c !== null && (e.position = [...u, c], e.collision =
|
|
4827
|
+
c !== null && (e.position = [...u, c], e.collision = l);
|
|
4828
4828
|
});
|
|
4829
|
-
})), this.d(e.flyToEvent.don(async (
|
|
4829
|
+
})), this.d(e.flyToEvent.don(async (l, u) => {
|
|
4830
4830
|
if (a()) return;
|
|
4831
|
-
const c = await we(i, e.id,
|
|
4831
|
+
const c = await we(i, e.id, l);
|
|
4832
4832
|
let f = "over";
|
|
4833
4833
|
c === void 0 ? f = "error" : c.endType === 0 ? f = "over" : c.endType === 1 && (f = "cancelled"), e.flyOverEvent.emit(u, f, t);
|
|
4834
4834
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
4835
|
-
a() ||
|
|
4835
|
+
a() || lt(i, e.id);
|
|
4836
4836
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
4837
4837
|
if (!t.actived) return;
|
|
4838
|
-
const
|
|
4839
|
-
if (!
|
|
4840
|
-
const { position: u, rotation: c } =
|
|
4838
|
+
const l = await t.getCurrentCameraInfo();
|
|
4839
|
+
if (!l) return;
|
|
4840
|
+
const { position: u, rotation: c } = l;
|
|
4841
4841
|
e.flyInParam = { position: u, rotation: c, flyDuration: 1 };
|
|
4842
|
-
})), this.d(t.propChanged.don((
|
|
4843
|
-
a() ||
|
|
4844
|
-
const c =
|
|
4842
|
+
})), this.d(t.propChanged.don((l) => {
|
|
4843
|
+
a() || l.objId === e.id && Object.keys(l.props).forEach((u) => {
|
|
4844
|
+
const c = l.props[u] === null ? void 0 : l.props[u];
|
|
4845
4845
|
e[u] = c;
|
|
4846
4846
|
});
|
|
4847
4847
|
}));
|
|
@@ -4857,7 +4857,7 @@ const ne = class ne extends I {
|
|
|
4857
4857
|
}
|
|
4858
4858
|
}
|
|
4859
4859
|
};
|
|
4860
|
-
v(ne, "type", ne.register("ESUeViewer",
|
|
4860
|
+
v(ne, "type", ne.register("ESUeViewer", An.type, ne));
|
|
4861
4861
|
let Vi = ne;
|
|
4862
4862
|
const se = class se extends I {
|
|
4863
4863
|
constructor(e, t) {
|
|
@@ -4867,7 +4867,7 @@ const se = class se extends I {
|
|
|
4867
4867
|
}
|
|
4868
4868
|
}
|
|
4869
4869
|
};
|
|
4870
|
-
v(se, "type", se.register("ESUeViewer",
|
|
4870
|
+
v(se, "type", se.register("ESUeViewer", Un.type, se));
|
|
4871
4871
|
let Oi = se;
|
|
4872
4872
|
const oe = class oe extends D {
|
|
4873
4873
|
constructor(e, t) {
|
|
@@ -4877,7 +4877,7 @@ const oe = class oe extends D {
|
|
|
4877
4877
|
}
|
|
4878
4878
|
}
|
|
4879
4879
|
};
|
|
4880
|
-
v(oe, "type", oe.register("ESUeViewer",
|
|
4880
|
+
v(oe, "type", oe.register("ESUeViewer", Nn.type, oe));
|
|
4881
4881
|
let ji = oe;
|
|
4882
4882
|
const ae = class ae extends $ {
|
|
4883
4883
|
constructor(e, t) {
|
|
@@ -4904,7 +4904,7 @@ const ae = class ae extends $ {
|
|
|
4904
4904
|
}));
|
|
4905
4905
|
}
|
|
4906
4906
|
};
|
|
4907
|
-
v(ae, "type", ae.register("ESUeViewer",
|
|
4907
|
+
v(ae, "type", ae.register("ESUeViewer", zn.type, ae));
|
|
4908
4908
|
let tr = ae;
|
|
4909
4909
|
const st = class st extends z {
|
|
4910
4910
|
constructor(e, t) {
|
|
@@ -4914,12 +4914,12 @@ const st = class st extends z {
|
|
|
4914
4914
|
}
|
|
4915
4915
|
}
|
|
4916
4916
|
};
|
|
4917
|
-
v(st, "type", st.register("ESUeViewer",
|
|
4917
|
+
v(st, "type", st.register("ESUeViewer", bn.type, st)), v(st, "propValFuncs", {
|
|
4918
4918
|
...z.propValFuncs,
|
|
4919
4919
|
info: (e) => JSON.stringify(e ?? {})
|
|
4920
4920
|
});
|
|
4921
4921
|
let er = st;
|
|
4922
|
-
const
|
|
4922
|
+
const le = class le extends G {
|
|
4923
4923
|
constructor(e, t) {
|
|
4924
4924
|
if (super(e, t), !t.viewer) {
|
|
4925
4925
|
console.warn("viewer is undefined!");
|
|
@@ -4932,10 +4932,10 @@ const de = class de extends G {
|
|
|
4932
4932
|
});
|
|
4933
4933
|
}
|
|
4934
4934
|
};
|
|
4935
|
-
v(
|
|
4936
|
-
let ir =
|
|
4935
|
+
v(le, "type", le.register("ESUeViewer", Hn.type, le));
|
|
4936
|
+
let ir = le;
|
|
4937
4937
|
E.context.getStrFromEnv(j.defaults.imgUrl);
|
|
4938
|
-
const
|
|
4938
|
+
const de = class de extends G {
|
|
4939
4939
|
constructor(e, t) {
|
|
4940
4940
|
if (super(e, t), !t.viewer) {
|
|
4941
4941
|
console.warn("viewer is undefined!");
|
|
@@ -4951,24 +4951,24 @@ const le = class le extends G {
|
|
|
4951
4951
|
const a = document.createElement("div");
|
|
4952
4952
|
this._subContainer.appendChild(a), this.dispose(() => this._subContainer.removeChild(a));
|
|
4953
4953
|
{
|
|
4954
|
-
const
|
|
4954
|
+
const l = async () => {
|
|
4955
4955
|
const u = await t.getCurrentCameraInfo(), c = u == null ? void 0 : u.position, w = [...u == null ? void 0 : u.rotation];
|
|
4956
4956
|
w[0] = 360, t.flyIn(c, w);
|
|
4957
4957
|
};
|
|
4958
|
-
a.addEventListener("click",
|
|
4958
|
+
a.addEventListener("click", l), a.style.cursor = "pointer", this.dispose(() => a.removeEventListener("click", l));
|
|
4959
4959
|
}
|
|
4960
4960
|
{
|
|
4961
|
-
const
|
|
4961
|
+
const l = () => {
|
|
4962
4962
|
a.style.width = `${e.cssSize ? e.cssSize : j.defaults.cssSize}px`, a.style.height = `${e.cssSize ? e.cssSize : j.defaults.cssSize}px`;
|
|
4963
4963
|
};
|
|
4964
|
-
|
|
4964
|
+
l(), e.dispose(e.cssSizeChanged.disposableOn(l));
|
|
4965
4965
|
}
|
|
4966
4966
|
a.style.position = "fixed";
|
|
4967
4967
|
{
|
|
4968
|
-
const
|
|
4968
|
+
const l = () => {
|
|
4969
4969
|
a.style.top = `${e.cssPosition ? e.cssPosition[0] : j.defaults.cssPosition[0]}px`, a.style.right = `${e.cssPosition ? e.cssPosition[1] : j.defaults.cssPosition[1]}px`;
|
|
4970
4970
|
};
|
|
4971
|
-
|
|
4971
|
+
l(), e.dispose(e.cssPositionChanged.disposableOn(l));
|
|
4972
4972
|
}
|
|
4973
4973
|
a.style.transition = " right 0.4s linear", a.style.cursor = "pointer";
|
|
4974
4974
|
const g = document.createElement("div");
|
|
@@ -4976,18 +4976,18 @@ const le = class le extends G {
|
|
|
4976
4976
|
const p = document.createElement("img");
|
|
4977
4977
|
g.appendChild(p), this.dispose(() => g.removeChild(p)), p.style.width = "100%", p.style.height = "100%", p.style.border = "none";
|
|
4978
4978
|
{
|
|
4979
|
-
const
|
|
4980
|
-
|
|
4979
|
+
const l = () => p.src = e.imgUrl;
|
|
4980
|
+
l(), e.dispose(e.imgUrlChanged.disposableOn(l));
|
|
4981
4981
|
}
|
|
4982
4982
|
{
|
|
4983
|
-
const
|
|
4983
|
+
const l = () => {
|
|
4984
4984
|
const w = -t.getCurrentCameraInfo().rotation[0];
|
|
4985
4985
|
p.style.transform = `rotate(${w}deg)`;
|
|
4986
4986
|
};
|
|
4987
4987
|
let u;
|
|
4988
4988
|
const c = async () => {
|
|
4989
|
-
|
|
4990
|
-
|
|
4989
|
+
l(), e.show ? (a.style.display = "block", u = setInterval(() => {
|
|
4990
|
+
l();
|
|
4991
4991
|
}, 1e3)) : (a.style.display = "none", clearInterval(u));
|
|
4992
4992
|
};
|
|
4993
4993
|
this.dispose(e.showChanged.disposableOn(c)), c(), this.dispose(() => clearInterval(u));
|
|
@@ -4997,8 +4997,8 @@ const le = class le extends G {
|
|
|
4997
4997
|
};
|
|
4998
4998
|
}
|
|
4999
4999
|
};
|
|
5000
|
-
v(
|
|
5001
|
-
let rr =
|
|
5000
|
+
v(de, "type", de.register("ESUeViewer", j.type, de));
|
|
5001
|
+
let rr = de;
|
|
5002
5002
|
const Q = class Q extends D {
|
|
5003
5003
|
constructor(e, t) {
|
|
5004
5004
|
super(e, t);
|
|
@@ -5021,14 +5021,14 @@ const Q = class Q extends D {
|
|
|
5021
5021
|
}
|
|
5022
5022
|
}
|
|
5023
5023
|
};
|
|
5024
|
-
v(Q, "type", Q.register("ESUeViewer",
|
|
5024
|
+
v(Q, "type", Q.register("ESUeViewer", Jn.type, Q)), v(Q, "forceUeUpdateProps", [
|
|
5025
5025
|
...D.forceUeUpdateProps
|
|
5026
5026
|
]), v(Q, "propValFuncs", {
|
|
5027
5027
|
...D.propValFuncs
|
|
5028
5028
|
});
|
|
5029
5029
|
let nr = Q;
|
|
5030
|
-
async function
|
|
5031
|
-
navigator.clipboard.writeText(
|
|
5030
|
+
async function Eo(d) {
|
|
5031
|
+
navigator.clipboard.writeText(d).then(function() {
|
|
5032
5032
|
console.log("复制成功");
|
|
5033
5033
|
}, function(e) {
|
|
5034
5034
|
console.log("复制失败");
|
|
@@ -5050,11 +5050,11 @@ const ce = class ce extends G {
|
|
|
5050
5050
|
a.appendChild(g), this.dispose(() => a.removeChild(g));
|
|
5051
5051
|
const p = document.createElement("span");
|
|
5052
5052
|
g.appendChild(p), this.dispose(() => g.removeChild(p));
|
|
5053
|
-
const
|
|
5054
|
-
g.appendChild(
|
|
5055
|
-
let c =
|
|
5056
|
-
c.startsWith("鼠标位置") && (c = c.slice(5)),
|
|
5057
|
-
}),
|
|
5053
|
+
const l = document.createElement("span");
|
|
5054
|
+
g.appendChild(l), l.addEventListener("dblclick", function() {
|
|
5055
|
+
let c = l.innerHTML;
|
|
5056
|
+
c.startsWith("鼠标位置") && (c = c.slice(5)), Eo(c);
|
|
5057
|
+
}), l.style.cursor = "pointer", this.dispose(() => g.removeChild(l));
|
|
5058
5058
|
const u = document.createElement("span");
|
|
5059
5059
|
a.appendChild(u), this.dispose(() => a.removeChild(u));
|
|
5060
5060
|
{
|
|
@@ -5093,7 +5093,7 @@ const ce = class ce extends G {
|
|
|
5093
5093
|
x += `鼠标位置:${B[0].toFixed(5)}° ${B[1].toFixed(5)}° ${B[2].toFixed(2)}m`;
|
|
5094
5094
|
} else
|
|
5095
5095
|
x += "暂时无法获取鼠标位置...";
|
|
5096
|
-
|
|
5096
|
+
l.innerText = x;
|
|
5097
5097
|
}
|
|
5098
5098
|
}).catch((R) => {
|
|
5099
5099
|
console.log(R);
|
|
@@ -5121,7 +5121,7 @@ const ue = class ue extends I {
|
|
|
5121
5121
|
}
|
|
5122
5122
|
}
|
|
5123
5123
|
};
|
|
5124
|
-
v(ue, "type", ue.register("ESUeViewer",
|
|
5124
|
+
v(ue, "type", ue.register("ESUeViewer", Gn.type, ue));
|
|
5125
5125
|
let or = ue;
|
|
5126
5126
|
const he = class he extends at {
|
|
5127
5127
|
constructor(t, i) {
|
|
@@ -5181,7 +5181,7 @@ const he = class he extends at {
|
|
|
5181
5181
|
return this._es3DTileset;
|
|
5182
5182
|
}
|
|
5183
5183
|
};
|
|
5184
|
-
v(he, "type", he.register("ESUeViewer",
|
|
5184
|
+
v(he, "type", he.register("ESUeViewer", Kn.type, he));
|
|
5185
5185
|
let ar = he;
|
|
5186
5186
|
const pe = class pe extends at {
|
|
5187
5187
|
constructor(e, t) {
|
|
@@ -5191,8 +5191,8 @@ const pe = class pe extends at {
|
|
|
5191
5191
|
}
|
|
5192
5192
|
}
|
|
5193
5193
|
};
|
|
5194
|
-
v(pe, "type", pe.register("ESUeViewer",
|
|
5195
|
-
let
|
|
5194
|
+
v(pe, "type", pe.register("ESUeViewer", Xn.type, pe));
|
|
5195
|
+
let lr = pe;
|
|
5196
5196
|
const ve = class ve extends $ {
|
|
5197
5197
|
constructor(e, t) {
|
|
5198
5198
|
super(e, t);
|
|
@@ -5220,7 +5220,7 @@ const ve = class ve extends $ {
|
|
|
5220
5220
|
}
|
|
5221
5221
|
};
|
|
5222
5222
|
v(ve, "type", ve.register("ESUeViewer", ye.type, ve));
|
|
5223
|
-
let
|
|
5223
|
+
let dr = ve;
|
|
5224
5224
|
const fe = class fe extends I {
|
|
5225
5225
|
constructor(e, t) {
|
|
5226
5226
|
if (super(e, t), !t.viewer) {
|
|
@@ -5229,7 +5229,7 @@ const fe = class fe extends I {
|
|
|
5229
5229
|
}
|
|
5230
5230
|
}
|
|
5231
5231
|
};
|
|
5232
|
-
v(fe, "type", fe.register("ESUeViewer",
|
|
5232
|
+
v(fe, "type", fe.register("ESUeViewer", Yn.type, fe));
|
|
5233
5233
|
let cr = fe;
|
|
5234
5234
|
const ge = class ge extends D {
|
|
5235
5235
|
constructor(e, t) {
|
|
@@ -5256,12 +5256,12 @@ const ge = class ge extends D {
|
|
|
5256
5256
|
}));
|
|
5257
5257
|
}
|
|
5258
5258
|
};
|
|
5259
|
-
v(ge, "type", ge.register("ESUeViewer",
|
|
5259
|
+
v(ge, "type", ge.register("ESUeViewer", Zn.type, ge));
|
|
5260
5260
|
let ur = ge, We;
|
|
5261
5261
|
try {
|
|
5262
|
-
const
|
|
5262
|
+
const d = "earthsdk3-ue", e = "3.6.0-beta.1", t = "2025-11-04T01:23:15.000Z", i = "北京西部世界科技有限公司", r = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "f6d4ad1b6c90e73a10773f1031f3f517c5694e3a", o = ((Date.now() - 1762219395e3) / 36e5).toFixed(1), h = `%c🌏 ${d}%c ${e}.${n.slice(0, 8)}.${t} (距今${o}个小时)
|
|
5263
5263
|
%c${r ? r + `
|
|
5264
|
-
` : ""}当前网站正在使用${
|
|
5264
|
+
` : ""}当前网站正在使用${d},此软件版权归${i}所有
|
|
5265
5265
|
`;
|
|
5266
5266
|
We = Object.freeze({
|
|
5267
5267
|
// @ts-ignore
|
|
@@ -5273,7 +5273,7 @@ try {
|
|
|
5273
5273
|
},
|
|
5274
5274
|
// @ts-ignore
|
|
5275
5275
|
get gituri() {
|
|
5276
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
5276
|
+
return GITURI_ && GITURI_.replace("${commitId}", "f6d4ad1b6c90e73a10773f1031f3f517c5694e3a");
|
|
5277
5277
|
},
|
|
5278
5278
|
// @ts-ignore
|
|
5279
5279
|
get info() {
|
|
@@ -5281,7 +5281,7 @@ try {
|
|
|
5281
5281
|
},
|
|
5282
5282
|
// @ts-ignore
|
|
5283
5283
|
get date() {
|
|
5284
|
-
return "2025-
|
|
5284
|
+
return "2025-11-04T01:23:15.000Z";
|
|
5285
5285
|
},
|
|
5286
5286
|
// @ts-ignore
|
|
5287
5287
|
get author() {
|
|
@@ -5289,7 +5289,7 @@ try {
|
|
|
5289
5289
|
},
|
|
5290
5290
|
// @ts-ignore
|
|
5291
5291
|
get version() {
|
|
5292
|
-
return "3.
|
|
5292
|
+
return "3.6.0-beta.1";
|
|
5293
5293
|
},
|
|
5294
5294
|
// @ts-ignore
|
|
5295
5295
|
get name() {
|
|
@@ -5297,10 +5297,10 @@ try {
|
|
|
5297
5297
|
},
|
|
5298
5298
|
// @ts-ignore
|
|
5299
5299
|
get commitId() {
|
|
5300
|
-
return "
|
|
5300
|
+
return "f6d4ad1b6c90e73a10773f1031f3f517c5694e3a";
|
|
5301
5301
|
},
|
|
5302
5302
|
print(a = !1) {
|
|
5303
|
-
!a &&
|
|
5303
|
+
!a && globalThis._xe2_no_copy_print || console.info(
|
|
5304
5304
|
this.info,
|
|
5305
5305
|
`
|
|
5306
5306
|
font-size: 18px;
|
|
@@ -5324,17 +5324,17 @@ try {
|
|
|
5324
5324
|
`
|
|
5325
5325
|
);
|
|
5326
5326
|
}
|
|
5327
|
-
}),
|
|
5327
|
+
}), globalThis.g_XE3CopyRights = globalThis.g_XE3CopyRights || {}, globalThis.g_XE3CopyRights[d] = We, globalThis.g_earthsdk_copyright_print = globalThis.g_earthsdk_copyright_print ?? !0, globalThis.g_earthsdk_copyright_print && We.print();
|
|
5328
5328
|
} catch {
|
|
5329
5329
|
}
|
|
5330
5330
|
export {
|
|
5331
5331
|
J as ESUeViewer,
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5332
|
+
Fo as GeoDivFromESImageLabel,
|
|
5333
|
+
Co as GeoDivFromESTextLabel,
|
|
5334
|
+
ss as HighlightFeatureAndFlyToCallFunc,
|
|
5335
|
+
ns as HighlightFeatureCallFunc,
|
|
5336
|
+
as as SetLayerColorCallFunc,
|
|
5337
|
+
os as SetLayerVisibleCallFunc,
|
|
5338
5338
|
Be as UeCloudViewerBase,
|
|
5339
5339
|
Ue as UeES3DTileset,
|
|
5340
5340
|
je as UeESAlarm,
|
|
@@ -5346,8 +5346,8 @@ export {
|
|
|
5346
5346
|
si as UeESCameraVisibleRange,
|
|
5347
5347
|
oi as UeESCar,
|
|
5348
5348
|
ai as UeESClassification,
|
|
5349
|
-
|
|
5350
|
-
|
|
5349
|
+
li as UeESClippingPlane,
|
|
5350
|
+
di as UeESDataMesh,
|
|
5351
5351
|
ci as UeESDatasmithRuntimeModel,
|
|
5352
5352
|
ui as UeESDirectionMeasurement,
|
|
5353
5353
|
hi as UeESDistanceMeasurement,
|
|
@@ -5358,7 +5358,7 @@ export {
|
|
|
5358
5358
|
wi as UeESForestTileset,
|
|
5359
5359
|
or as UeESGaussianSplatting,
|
|
5360
5360
|
yi as UeESGeoDiv,
|
|
5361
|
-
|
|
5361
|
+
dr as UeESGeoExtrudedPolygon,
|
|
5362
5362
|
mi as UeESGeoJson,
|
|
5363
5363
|
ze as UeESGeoLineString,
|
|
5364
5364
|
$ as UeESGeoPolygon,
|
|
@@ -5378,10 +5378,10 @@ export {
|
|
|
5378
5378
|
Li as UeESLocalPolygonZ,
|
|
5379
5379
|
Pi as UeESLocalRectangle,
|
|
5380
5380
|
ki as UeESLocalSkyBox,
|
|
5381
|
-
|
|
5381
|
+
Tr as UeESLocalVector,
|
|
5382
5382
|
Ke as UeESLocalVector2D,
|
|
5383
5383
|
Di as UeESLocationMeasurement,
|
|
5384
|
-
|
|
5384
|
+
lr as UeESMsTileset,
|
|
5385
5385
|
rr as UeESNavigator,
|
|
5386
5386
|
I as UeESObjectWithLocation,
|
|
5387
5387
|
nr as UeESPath,
|
|
@@ -5394,9 +5394,9 @@ export {
|
|
|
5394
5394
|
Ui as UeESPoiTileset,
|
|
5395
5395
|
Ni as UeESPolygonFence,
|
|
5396
5396
|
zi as UeESPolygonFlattenedPlane,
|
|
5397
|
-
|
|
5397
|
+
bi as UeESPolygonWithHole,
|
|
5398
5398
|
ar as UeESRtsFeatureEditing,
|
|
5399
|
-
|
|
5399
|
+
Hi as UeESRtsTileset,
|
|
5400
5400
|
at as UeESSceneObject,
|
|
5401
5401
|
Ji as UeESSeparateFoliage,
|
|
5402
5402
|
ur as UeESSkylineAnalysis,
|
|
@@ -5415,64 +5415,64 @@ export {
|
|
|
5415
5415
|
M as UeESVisualObject,
|
|
5416
5416
|
tr as UeESVolumeMeasurement,
|
|
5417
5417
|
er as UeESWidget,
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5418
|
+
Ms as bind3DTilesetByTagCallFunc,
|
|
5419
|
+
Ps as bindActorByTagCallFunc,
|
|
5420
|
+
As as bindImageryByTagCallFunc,
|
|
5421
|
+
lt as calcFlyToParamCallFunc,
|
|
5422
|
+
Sr as callFunctionCallFunc,
|
|
5423
|
+
ws as captureCallFunc,
|
|
5424
|
+
H as changeNavigationModeCallFunc,
|
|
5425
5425
|
We as copyright,
|
|
5426
|
-
|
|
5427
|
-
|
|
5426
|
+
_s as createActorByClassCallFunc,
|
|
5427
|
+
Ir as destroyCallFunc,
|
|
5428
5428
|
Re as flyInCallFunc,
|
|
5429
|
-
|
|
5429
|
+
jn as flyInDefaultCameraCallFunc,
|
|
5430
5430
|
we as flyToCallFunc,
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5431
|
+
rs as generateMemReportCallFunc,
|
|
5432
|
+
Fs as getAllSocketNamesByActorTagCallFunc,
|
|
5433
|
+
Es as getBoundSphereCallFunc,
|
|
5434
|
+
Ss as getBoundSphereWithChildrenCallFunc,
|
|
5435
|
+
bs as getCameraRelativeHeightCallFunc,
|
|
5436
|
+
xs as getFillMaterialParamInfoCallFunc,
|
|
5437
|
+
Rs as getGlobalPropertyCallFunc,
|
|
5438
|
+
fs as getHeightByLonLatCallFunc,
|
|
5439
|
+
gs as getHeightByLonLatsCallFunc,
|
|
5440
|
+
zs as getIdByComponentNameAndHitItemCallFunc,
|
|
5441
|
+
ms as getLonLatAltToScreenPositionCallFunc,
|
|
5442
|
+
Ls as getObjectByInfoCallFunc,
|
|
5443
|
+
Ks as getStatusCallFunc,
|
|
5444
|
+
Ts as getStrokeMaterialParamInfoCallFunc,
|
|
5445
|
+
qs as getTilesetMaterialIDListCallFunc,
|
|
5446
|
+
Is as getVersionCallFunc,
|
|
5447
|
+
Js as highlightActorByTagCallFunc,
|
|
5448
|
+
is as mountPakFiles,
|
|
5449
|
+
Zs as moveObjectsCallFunc,
|
|
5450
|
+
ys as partialCaptureCallFunc,
|
|
5451
|
+
ps as pickCallFunc,
|
|
5452
|
+
vs as pickPositionCallFunc,
|
|
5453
|
+
hs as quitCallFunc,
|
|
5454
|
+
On as refreshTilesetCallFunc,
|
|
5455
|
+
Er as resetWithCurrentCameraCallFunc,
|
|
5456
|
+
ks as restoreOriginalSceneCallFunc,
|
|
5457
5457
|
Hs as saveStringToFileCallFunc,
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5458
|
+
Gs as sendCustomMessageCallFunc,
|
|
5459
|
+
us as setGlobalPropertyCallFunc,
|
|
5460
|
+
ls as setNodePositionCallFunc,
|
|
5461
5461
|
ds as setNodeRotationCallFunc,
|
|
5462
|
-
|
|
5462
|
+
cs as setNodeScaleCallFunc,
|
|
5463
5463
|
De as smoothMoveCallFunc,
|
|
5464
5464
|
Pe as smoothMoveOnGroundCallFunc,
|
|
5465
5465
|
Le as smoothMoveWithRotationCallFunc,
|
|
5466
5466
|
ke as smoothMoveWithRotationOnGroundCallFunc,
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5467
|
+
Xs as startEditingCallFunc,
|
|
5468
|
+
ts as startVoiceCallFunc,
|
|
5469
|
+
Ys as stopEditingCallFunc,
|
|
5470
|
+
es as stopVoiceCallFunc,
|
|
5471
|
+
Cs as uePositionToLonLatAltCallFunc,
|
|
5472
|
+
Ws as unBind3DTilesetByIdCallFunc,
|
|
5473
|
+
$s as unBind3DTilesetByTagCallFunc,
|
|
5474
|
+
Ds as unBindActorByIDCallFunc,
|
|
5475
|
+
Bs as unBindActorByTagCallFunc,
|
|
5476
|
+
Ns as unBindImageryByIdCallFunc,
|
|
5477
|
+
Us as unBindImageryByTagCallFunc
|
|
5478
5478
|
};
|