earthsdk3-ue 3.5.0-beta.15 → 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
|
-
const { defaults: e } =
|
|
59
|
+
function Ge(d) {
|
|
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
|
-
}, Js = async function(
|
|
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到指定目录下
|
|
@@ -2438,14 +2438,14 @@ const K = class K extends Ee {
|
|
|
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,
|
|
@@ -2521,6 +2521,8 @@ const K = class K extends Ee {
|
|
|
2521
2521
|
const { position: t, rotation: i } = this._statusInfo;
|
|
2522
2522
|
return { position: t, rotation: i };
|
|
2523
2523
|
}
|
|
2524
|
+
transformFlyParam(t, i) {
|
|
2525
|
+
}
|
|
2524
2526
|
/**
|
|
2525
2527
|
* @description 获取当前比例尺
|
|
2526
2528
|
* @returns 比例尺
|
|
@@ -2535,7 +2537,7 @@ const K = class K extends Ee {
|
|
|
2535
2537
|
*/
|
|
2536
2538
|
async changeToWalk(t, i = 4.2, r = 1.6) {
|
|
2537
2539
|
if (!this.viewer) return;
|
|
2538
|
-
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);
|
|
2539
2541
|
return s && !s.error && (this._navigationMode.value = n.mode), s;
|
|
2540
2542
|
}
|
|
2541
2543
|
/**
|
|
@@ -2544,7 +2546,7 @@ const K = class K extends Ee {
|
|
|
2544
2546
|
*/
|
|
2545
2547
|
async changeToMap() {
|
|
2546
2548
|
if (!this.viewer) return;
|
|
2547
|
-
const t = { mode: "Map" }, i = await
|
|
2549
|
+
const t = { mode: "Map" }, i = await H(this.viewer, t);
|
|
2548
2550
|
return i && !i.error && (this._navigationMode.value = t.mode), i;
|
|
2549
2551
|
}
|
|
2550
2552
|
/**
|
|
@@ -2556,7 +2558,7 @@ const K = class K extends Ee {
|
|
|
2556
2558
|
*/
|
|
2557
2559
|
async changeToRotateGlobe(t = 38, i = 1e7, r = 60) {
|
|
2558
2560
|
if (!this.viewer) return;
|
|
2559
|
-
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);
|
|
2560
2562
|
return s && !s.error && (this._navigationMode.value = n.mode), s;
|
|
2561
2563
|
}
|
|
2562
2564
|
/**
|
|
@@ -2571,7 +2573,7 @@ const K = class K extends Ee {
|
|
|
2571
2573
|
*/
|
|
2572
2574
|
async changeToLine(t, i = 10, r = 10, n = !0, s = 10, o = "auto") {
|
|
2573
2575
|
if (!this.viewer) return;
|
|
2574
|
-
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);
|
|
2575
2577
|
return a && !a.error && (this._navigationMode.value = h.mode), a;
|
|
2576
2578
|
}
|
|
2577
2579
|
/**
|
|
@@ -2581,7 +2583,7 @@ const K = class K extends Ee {
|
|
|
2581
2583
|
*/
|
|
2582
2584
|
async changeToUserDefined(t) {
|
|
2583
2585
|
if (!this.viewer) return;
|
|
2584
|
-
const i = { mode: "UserDefined", userDefinedPawn: t }, r = await
|
|
2586
|
+
const i = { mode: "UserDefined", userDefinedPawn: t }, r = await H(this.viewer, i);
|
|
2585
2587
|
return r && !r.error && (this._navigationMode.value = i.mode), r;
|
|
2586
2588
|
}
|
|
2587
2589
|
/**
|
|
@@ -2601,7 +2603,7 @@ const K = class K extends Ee {
|
|
|
2601
2603
|
orbitPeriod: r,
|
|
2602
2604
|
heading: n,
|
|
2603
2605
|
pitch: s
|
|
2604
|
-
}, h = await
|
|
2606
|
+
}, h = await H(this.viewer, o);
|
|
2605
2607
|
return h && !h.error && (this._navigationMode.value = o.mode), h;
|
|
2606
2608
|
}
|
|
2607
2609
|
/**
|
|
@@ -2613,56 +2615,56 @@ const K = class K extends Ee {
|
|
|
2613
2615
|
*/
|
|
2614
2616
|
async changeToFollow(t, i = 0, r = 0, n = -30, s = !0) {
|
|
2615
2617
|
if (!this.viewer) return;
|
|
2616
|
-
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);
|
|
2617
2619
|
return h && !h.error && (this._navigationMode.value = o.mode), h;
|
|
2618
2620
|
}
|
|
2619
2621
|
getFPS() {
|
|
2620
2622
|
return this._statusInfo.fps;
|
|
2621
2623
|
}
|
|
2622
2624
|
async getVersion() {
|
|
2623
|
-
const t =
|
|
2625
|
+
const t = globalThis.g_XE3CopyRights ?? {};
|
|
2624
2626
|
if (!this.viewer) return t;
|
|
2625
|
-
const i = await
|
|
2627
|
+
const i = await Is(this.viewer);
|
|
2626
2628
|
return t.esforue = i, t;
|
|
2627
2629
|
}
|
|
2628
2630
|
async getHeightByLonLat(t, i, r = "ECC_Visibility") {
|
|
2629
2631
|
if (!this.viewer) return null;
|
|
2630
|
-
const n = await
|
|
2632
|
+
const n = await fs(this.viewer, t, i, r);
|
|
2631
2633
|
return n && n.height !== void 0 ? n.height : null;
|
|
2632
2634
|
}
|
|
2633
2635
|
async getHeightsByLonLats(t, i = "ECC_Visibility") {
|
|
2634
|
-
return this.viewer ? await
|
|
2636
|
+
return this.viewer ? await gs(this.viewer, t, i) : void 0;
|
|
2635
2637
|
}
|
|
2636
2638
|
async capture(t = 64, i = 64) {
|
|
2637
|
-
return this.viewer ? await
|
|
2639
|
+
return this.viewer ? await ws(this.viewer, t, i) : void 0;
|
|
2638
2640
|
}
|
|
2639
2641
|
async partialCapture(t, i = [64, 64]) {
|
|
2640
2642
|
if (!this.viewer) {
|
|
2641
2643
|
console.warn("partialCapture:viewer is undefined");
|
|
2642
2644
|
return;
|
|
2643
2645
|
}
|
|
2644
|
-
return await
|
|
2646
|
+
return await ys(this.viewer, t, i);
|
|
2645
2647
|
}
|
|
2646
2648
|
async lonLatAltToScreenPosition(t) {
|
|
2647
2649
|
if (!this.viewer) return;
|
|
2648
|
-
const i = await
|
|
2650
|
+
const i = await ms(this.viewer, t);
|
|
2649
2651
|
return i && [i.X, i.Y];
|
|
2650
2652
|
}
|
|
2651
2653
|
//------------------------------抽象函数实现
|
|
2652
2654
|
async setGlobalProperty(t) {
|
|
2653
2655
|
if (this.viewer)
|
|
2654
|
-
return await
|
|
2656
|
+
return await us(this.viewer, t);
|
|
2655
2657
|
}
|
|
2656
2658
|
async startEditing(t, i, r) {
|
|
2657
2659
|
r = Object.assign({ useKeyToSwitch: !0, callSource: "outer" }, r);
|
|
2658
2660
|
const n = t.components.main ?? t;
|
|
2659
2661
|
if (!n || !this.viewer || i == null) return;
|
|
2660
2662
|
const s = Array.isArray(i) ? [...i] : [i];
|
|
2661
|
-
return n.editingID = `${r.callSource}_${_()}`, await
|
|
2663
|
+
return n.editingID = `${r.callSource}_${_()}`, await Xs(this.viewer, n.id, n.editingID, s, r.useKeyToSwitch);
|
|
2662
2664
|
}
|
|
2663
2665
|
async stopEditing() {
|
|
2664
2666
|
if (this.viewer)
|
|
2665
|
-
return await
|
|
2667
|
+
return await Ys(this.viewer);
|
|
2666
2668
|
}
|
|
2667
2669
|
async moveObjects(t) {
|
|
2668
2670
|
if (!this.viewer) return;
|
|
@@ -2672,20 +2674,20 @@ const K = class K extends Ee {
|
|
|
2672
2674
|
o.editingID = r, o && i.push(o.id);
|
|
2673
2675
|
}
|
|
2674
2676
|
if (i.length !== 0)
|
|
2675
|
-
return await
|
|
2677
|
+
return await Zs(this.viewer, i, r);
|
|
2676
2678
|
}
|
|
2677
2679
|
};
|
|
2678
|
-
v(K, "type", K.register("ESUeViewer", K)), v(K, "defaults", { ...
|
|
2679
|
-
let
|
|
2680
|
-
((
|
|
2681
|
-
|
|
2680
|
+
v(K, "type", K.register("ESUeViewer", K)), v(K, "defaults", { ...Vn });
|
|
2681
|
+
let J = K;
|
|
2682
|
+
((d) => {
|
|
2683
|
+
d.createDefaultProps = () => ({
|
|
2682
2684
|
...Ee.createDefaultProps(),
|
|
2683
2685
|
/**
|
|
2684
2686
|
* 新增UE属性步骤!!
|
|
2685
2687
|
* 1. createReactProps 中定义属性
|
|
2686
2688
|
* 2. reactPropDefaults 中定义默认值
|
|
2687
2689
|
*/
|
|
2688
|
-
...
|
|
2690
|
+
...Fr(),
|
|
2689
2691
|
//分辨率缩放比例
|
|
2690
2692
|
resolutionScale: 1,
|
|
2691
2693
|
autoReconnect: !1,
|
|
@@ -2695,8 +2697,8 @@ let b = K;
|
|
|
2695
2697
|
speechRecognitionListening: void 0,
|
|
2696
2698
|
customMessageListening: void 0
|
|
2697
2699
|
});
|
|
2698
|
-
})(
|
|
2699
|
-
|
|
2700
|
+
})(J || (J = {}));
|
|
2701
|
+
Ar(J.prototype, J.createDefaultProps);
|
|
2700
2702
|
class at extends G {
|
|
2701
2703
|
constructor(e, t) {
|
|
2702
2704
|
super(e, t);
|
|
@@ -2732,10 +2734,10 @@ class at extends G {
|
|
|
2732
2734
|
...a.val
|
|
2733
2735
|
}
|
|
2734
2736
|
}), a.val = {};
|
|
2735
|
-
},
|
|
2736
|
-
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()));
|
|
2737
2739
|
})), e.components.main || (this.d(() => {
|
|
2738
|
-
r.value &&
|
|
2740
|
+
r.value && Ir(i, e.id);
|
|
2739
2741
|
}), i.callUeFunc({
|
|
2740
2742
|
f: "create",
|
|
2741
2743
|
p: {
|
|
@@ -2766,7 +2768,7 @@ class M extends at {
|
|
|
2766
2768
|
var n, s;
|
|
2767
2769
|
Re(i, e.id, (n = e.flyInParam) == null ? void 0 : n.position, (s = e.flyInParam) == null ? void 0 : s.rotation, r ?? 1);
|
|
2768
2770
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
2769
|
-
|
|
2771
|
+
lt(i, e.id);
|
|
2770
2772
|
})), this.d(e.calcFlyInParamEvent.don(() => {
|
|
2771
2773
|
const r = t.getCurrentCameraInfo();
|
|
2772
2774
|
if (!r) return;
|
|
@@ -2807,8 +2809,8 @@ class I extends M {
|
|
|
2807
2809
|
Le(i, e.id, h, a, g);
|
|
2808
2810
|
})), this.d(e.smoothMoveOnGroundEvent.don((h, a, g, p) => {
|
|
2809
2811
|
Pe(i, e.id, h, a, p, g);
|
|
2810
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((h, a, g, p,
|
|
2811
|
-
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);
|
|
2812
2814
|
})), this.d(e.smoothMoveKeepPitchEvent.don(async (h, a) => {
|
|
2813
2815
|
const g = await i.callUeFunc({
|
|
2814
2816
|
f: "SmoothMoveKeepPitch",
|
|
@@ -2826,12 +2828,12 @@ class I extends M {
|
|
|
2826
2828
|
});
|
|
2827
2829
|
}));
|
|
2828
2830
|
const s = async (h, a, g, p) => {
|
|
2829
|
-
const { viewer:
|
|
2830
|
-
if (!
|
|
2831
|
+
const { viewer: l } = h;
|
|
2832
|
+
if (!l) {
|
|
2831
2833
|
console.error("SmoothMoveRelatively: ueViewer.viewer is undefined");
|
|
2832
2834
|
return;
|
|
2833
2835
|
}
|
|
2834
|
-
const u = await
|
|
2836
|
+
const u = await l.callUeFunc({
|
|
2835
2837
|
f: "SmoothMoveRelatively",
|
|
2836
2838
|
p: { id: a, RelativePosition: g, Time: p }
|
|
2837
2839
|
});
|
|
@@ -2840,7 +2842,7 @@ class I extends M {
|
|
|
2840
2842
|
this.d(e.smoothMoveRelativelyEvent.don((h, a) => {
|
|
2841
2843
|
s(t, e.id, h, a);
|
|
2842
2844
|
}));
|
|
2843
|
-
const o = async (h, a, g, p,
|
|
2845
|
+
const o = async (h, a, g, p, l) => {
|
|
2844
2846
|
const { viewer: u } = h;
|
|
2845
2847
|
if (!u) {
|
|
2846
2848
|
console.error("SmoothMoveRelativelyWithRotation: ueViewer.viewer is undefined");
|
|
@@ -2848,7 +2850,7 @@ class I extends M {
|
|
|
2848
2850
|
}
|
|
2849
2851
|
const c = await u.callUeFunc({
|
|
2850
2852
|
f: "SmoothMoveRelativelyWithRotation",
|
|
2851
|
-
p: { id: a, RelativePosition: g, NewRotation: p, Time:
|
|
2853
|
+
p: { id: a, RelativePosition: g, NewRotation: p, Time: l }
|
|
2852
2854
|
});
|
|
2853
2855
|
return c.error && console.error("SmoothMoveRelativelyWithRotation:", c.error), c;
|
|
2854
2856
|
};
|
|
@@ -2903,12 +2905,12 @@ class z extends I {
|
|
|
2903
2905
|
}));
|
|
2904
2906
|
}
|
|
2905
2907
|
}
|
|
2906
|
-
class
|
|
2908
|
+
class Tr extends I {
|
|
2907
2909
|
constructor(e, t) {
|
|
2908
2910
|
super(e, t), t.viewer;
|
|
2909
2911
|
}
|
|
2910
2912
|
}
|
|
2911
|
-
v(
|
|
2913
|
+
v(Tr, "propValFuncs", {
|
|
2912
2914
|
...I.propValFuncs,
|
|
2913
2915
|
pointStyle: (e) => ({
|
|
2914
2916
|
...e,
|
|
@@ -2923,13 +2925,13 @@ v(Sr, "propValFuncs", {
|
|
|
2923
2925
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
2924
2926
|
})
|
|
2925
2927
|
});
|
|
2926
|
-
class Ke extends
|
|
2928
|
+
class Ke extends Tr {
|
|
2927
2929
|
constructor(e, t) {
|
|
2928
2930
|
super(e, t), t.viewer;
|
|
2929
2931
|
}
|
|
2930
2932
|
}
|
|
2931
|
-
const qe = (
|
|
2932
|
-
switch (
|
|
2933
|
+
const qe = (d) => {
|
|
2934
|
+
switch (d) {
|
|
2933
2935
|
case 0:
|
|
2934
2936
|
return "成功绑定";
|
|
2935
2937
|
case 1:
|
|
@@ -3002,7 +3004,7 @@ const qe = (l) => {
|
|
|
3002
3004
|
const p = this.dv(P(
|
|
3003
3005
|
t.actorTagChanged,
|
|
3004
3006
|
t.urlChanged
|
|
3005
|
-
)),
|
|
3007
|
+
)), l = () => {
|
|
3006
3008
|
t.actorTag ? a.value = {
|
|
3007
3009
|
type: "ActorTag",
|
|
3008
3010
|
actorTag: t.actorTag
|
|
@@ -3011,35 +3013,35 @@ const qe = (l) => {
|
|
|
3011
3013
|
url: t.url
|
|
3012
3014
|
} : a.value = void 0, t.editing = !1;
|
|
3013
3015
|
};
|
|
3014
|
-
|
|
3016
|
+
l(), this.d(p.don(l));
|
|
3015
3017
|
}
|
|
3016
3018
|
const g = async () => {
|
|
3017
3019
|
const { id: p } = t;
|
|
3018
3020
|
if (n !== void 0) {
|
|
3019
3021
|
n = void 0;
|
|
3020
3022
|
try {
|
|
3021
|
-
const
|
|
3022
|
-
if (!
|
|
3023
|
-
if (
|
|
3024
|
-
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}`);
|
|
3025
3027
|
return;
|
|
3026
3028
|
}
|
|
3027
|
-
} catch (
|
|
3028
|
-
console.warn(`UeES3DTileset UnBind3DTilesetById: ${
|
|
3029
|
+
} catch (l) {
|
|
3030
|
+
console.warn(`UeES3DTileset UnBind3DTilesetById: ${l}`);
|
|
3029
3031
|
return;
|
|
3030
3032
|
}
|
|
3031
3033
|
}
|
|
3032
3034
|
if (s !== void 0) {
|
|
3033
3035
|
s = void 0;
|
|
3034
3036
|
try {
|
|
3035
|
-
const
|
|
3036
|
-
if (!
|
|
3037
|
-
if (
|
|
3038
|
-
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}`);
|
|
3039
3041
|
return;
|
|
3040
3042
|
}
|
|
3041
|
-
} catch (
|
|
3042
|
-
console.warn(`UeES3DTileset Destroy: ${
|
|
3043
|
+
} catch (l) {
|
|
3044
|
+
console.warn(`UeES3DTileset Destroy: ${l}`);
|
|
3043
3045
|
return;
|
|
3044
3046
|
}
|
|
3045
3047
|
}
|
|
@@ -3098,30 +3100,30 @@ const qe = (l) => {
|
|
|
3098
3100
|
}
|
|
3099
3101
|
}
|
|
3100
3102
|
await u.promise(o());
|
|
3101
|
-
})),
|
|
3103
|
+
})), l = async () => {
|
|
3102
3104
|
p.restart();
|
|
3103
3105
|
};
|
|
3104
|
-
|
|
3106
|
+
l(), this.d(a.changed.don(l));
|
|
3105
3107
|
}
|
|
3106
3108
|
this.d(t.refreshTilesetEvent.don(() => {
|
|
3107
|
-
|
|
3108
|
-
})), this.d(t.flyToEvent.don(async (p,
|
|
3109
|
+
On(r, t.id);
|
|
3110
|
+
})), this.d(t.flyToEvent.don(async (p, l) => {
|
|
3109
3111
|
if (!n && !s) return;
|
|
3110
3112
|
const u = await we(r, t.id, p);
|
|
3111
3113
|
let c = "over";
|
|
3112
|
-
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);
|
|
3113
3115
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
3114
|
-
!n && !s ||
|
|
3116
|
+
!n && !s || lt(r, t.id);
|
|
3115
3117
|
})), this.d(t.calcFlyInParamEvent.don(async () => {
|
|
3116
3118
|
if (!n && !s || !i.actived) return;
|
|
3117
3119
|
const p = await i.getCurrentCameraInfo();
|
|
3118
3120
|
if (!p) return;
|
|
3119
|
-
const { position:
|
|
3120
|
-
t.flyInParam = { position:
|
|
3121
|
+
const { position: l, rotation: u } = p;
|
|
3122
|
+
t.flyInParam = { position: l, rotation: u, flyDuration: 1 };
|
|
3121
3123
|
})), this.d(i.propChanged.don((p) => {
|
|
3122
|
-
!n && !s || p.objId === t.id && Object.keys(p.props).forEach((
|
|
3123
|
-
const u = p.props[
|
|
3124
|
-
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;
|
|
3125
3127
|
});
|
|
3126
3128
|
})), this.d(i.objectEvent.don((p) => {
|
|
3127
3129
|
!n && !s || p.id !== t.id || p.type !== "3DTilesetReady" || t.tilesetReady.emit(p.p);
|
|
@@ -3137,7 +3139,7 @@ const qe = (l) => {
|
|
|
3137
3139
|
console.warn(`UeES3DTileset SetFeatureColor: ${y.error}`);
|
|
3138
3140
|
return;
|
|
3139
3141
|
}
|
|
3140
|
-
},
|
|
3142
|
+
}, l = async (f, w) => {
|
|
3141
3143
|
if (!n && !s) return;
|
|
3142
3144
|
const y = await r.callUeFunc({
|
|
3143
3145
|
f: "SetFeatureVisable",
|
|
@@ -3173,7 +3175,7 @@ const qe = (l) => {
|
|
|
3173
3175
|
this.styleColor = [...y], p(f, y);
|
|
3174
3176
|
})), this.d(t.setFeatureVisableEvent.don((f, w) => {
|
|
3175
3177
|
const y = [...this.styleVisable, ...w];
|
|
3176
|
-
this.styleVisable = [...y],
|
|
3178
|
+
this.styleVisable = [...y], l(f, y);
|
|
3177
3179
|
})), this.d(t.resetFeatureStyleEvent.don(() => {
|
|
3178
3180
|
u(), this.styleColor = [], this.styleVisable = [];
|
|
3179
3181
|
})), this.d(t.setFeatureStyleEvent.don((f) => {
|
|
@@ -3187,13 +3189,13 @@ const qe = (l) => {
|
|
|
3187
3189
|
return;
|
|
3188
3190
|
}
|
|
3189
3191
|
try {
|
|
3190
|
-
const
|
|
3192
|
+
const l = await r.callUeFunc({
|
|
3191
3193
|
f: "GetFeatureTable",
|
|
3192
3194
|
p: { id: t.id }
|
|
3193
3195
|
});
|
|
3194
|
-
|
|
3195
|
-
} catch (
|
|
3196
|
-
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);
|
|
3197
3199
|
}
|
|
3198
3200
|
};
|
|
3199
3201
|
this.d(t.getFeatureTableEvent.don(() => {
|
|
@@ -3207,17 +3209,17 @@ const qe = (l) => {
|
|
|
3207
3209
|
return;
|
|
3208
3210
|
}
|
|
3209
3211
|
try {
|
|
3210
|
-
const
|
|
3212
|
+
const l = await r.callUeFunc({
|
|
3211
3213
|
f: "GetMaterialNameList",
|
|
3212
3214
|
p: { id: t.id }
|
|
3213
3215
|
});
|
|
3214
|
-
|
|
3215
|
-
} catch (
|
|
3216
|
-
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);
|
|
3217
3219
|
}
|
|
3218
3220
|
};
|
|
3219
|
-
this.ad(t.getMaterialNameListEvent.don((
|
|
3220
|
-
|
|
3221
|
+
this.ad(t.getMaterialNameListEvent.don((l) => {
|
|
3222
|
+
l == "start" && p();
|
|
3221
3223
|
}));
|
|
3222
3224
|
}
|
|
3223
3225
|
}
|
|
@@ -3236,8 +3238,8 @@ const qe = (l) => {
|
|
|
3236
3238
|
};
|
|
3237
3239
|
v(ct, "type", ct.register("ESUeViewer", me.type, ct));
|
|
3238
3240
|
let Ue = ct;
|
|
3239
|
-
const Qe = (
|
|
3240
|
-
switch (
|
|
3241
|
+
const Qe = (d) => {
|
|
3242
|
+
switch (d) {
|
|
3241
3243
|
case 0:
|
|
3242
3244
|
return "成功绑定";
|
|
3243
3245
|
case 1:
|
|
@@ -3260,14 +3262,14 @@ const Qe = (l) => {
|
|
|
3260
3262
|
return;
|
|
3261
3263
|
}
|
|
3262
3264
|
let r, n;
|
|
3263
|
-
const s = this.dv(W(void 0)), o = this.ad(
|
|
3265
|
+
const s = this.dv(W(void 0)), o = this.ad(He(""));
|
|
3264
3266
|
{
|
|
3265
3267
|
const p = () => {
|
|
3266
3268
|
if (typeof e.url == "string")
|
|
3267
3269
|
o.value = E.context.getStrFromEnv(e.url);
|
|
3268
3270
|
else {
|
|
3269
|
-
const
|
|
3270
|
-
|
|
3271
|
+
const l = e.url;
|
|
3272
|
+
l.url = E.context.getStrFromEnv(l.url), o.value = l;
|
|
3271
3273
|
}
|
|
3272
3274
|
};
|
|
3273
3275
|
p(), this.ad(e.urlChanged.don(p));
|
|
@@ -3276,8 +3278,8 @@ const Qe = (l) => {
|
|
|
3276
3278
|
if (!r && !n) return;
|
|
3277
3279
|
let p = e.targetID ?? U.defaults.targetID;
|
|
3278
3280
|
if (p && p != "") {
|
|
3279
|
-
const
|
|
3280
|
-
p =
|
|
3281
|
+
const l = E.getSceneObject(p);
|
|
3282
|
+
p = l ? (l.components.main ?? l).id : p;
|
|
3281
3283
|
}
|
|
3282
3284
|
await i.callUeFunc({
|
|
3283
3285
|
f: "update",
|
|
@@ -3321,28 +3323,28 @@ const Qe = (l) => {
|
|
|
3321
3323
|
if (r !== void 0) {
|
|
3322
3324
|
r = void 0;
|
|
3323
3325
|
try {
|
|
3324
|
-
const
|
|
3325
|
-
if (!
|
|
3326
|
-
if (
|
|
3327
|
-
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}`);
|
|
3328
3330
|
return;
|
|
3329
3331
|
}
|
|
3330
|
-
} catch (
|
|
3331
|
-
console.warn(`UeESImageryLayer UnImageryByID promise: ${
|
|
3332
|
+
} catch (l) {
|
|
3333
|
+
console.warn(`UeESImageryLayer UnImageryByID promise: ${l}`);
|
|
3332
3334
|
return;
|
|
3333
3335
|
}
|
|
3334
3336
|
}
|
|
3335
3337
|
if (n !== void 0) {
|
|
3336
3338
|
n = void 0;
|
|
3337
3339
|
try {
|
|
3338
|
-
const
|
|
3339
|
-
if (!
|
|
3340
|
-
if (
|
|
3341
|
-
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}`);
|
|
3342
3344
|
return;
|
|
3343
3345
|
}
|
|
3344
|
-
} catch (
|
|
3345
|
-
console.warn(`UeESImageryLayer Destroy promise: ${
|
|
3346
|
+
} catch (l) {
|
|
3347
|
+
console.warn(`UeESImageryLayer Destroy promise: ${l}`);
|
|
3346
3348
|
return;
|
|
3347
3349
|
}
|
|
3348
3350
|
}
|
|
@@ -3401,17 +3403,17 @@ const Qe = (l) => {
|
|
|
3401
3403
|
}
|
|
3402
3404
|
}
|
|
3403
3405
|
await u.promise(h());
|
|
3404
|
-
})),
|
|
3406
|
+
})), l = async () => {
|
|
3405
3407
|
p.restart();
|
|
3406
3408
|
};
|
|
3407
|
-
|
|
3409
|
+
l(), this.d(s.changed.don(l));
|
|
3408
3410
|
}
|
|
3409
3411
|
{
|
|
3410
3412
|
const p = this.dv(P(
|
|
3411
3413
|
e.actorTagChanged,
|
|
3412
3414
|
o.changed,
|
|
3413
3415
|
e.componentTagChanged
|
|
3414
|
-
)),
|
|
3416
|
+
)), l = () => {
|
|
3415
3417
|
e.actorTag && e.componentTag ? s.value = {
|
|
3416
3418
|
type: "ActorTag",
|
|
3417
3419
|
actorTag: e.actorTag,
|
|
@@ -3421,31 +3423,31 @@ const Qe = (l) => {
|
|
|
3421
3423
|
url: o.value
|
|
3422
3424
|
} : s.value = void 0;
|
|
3423
3425
|
};
|
|
3424
|
-
|
|
3426
|
+
l(), this.d(p.don(l));
|
|
3425
3427
|
}
|
|
3426
|
-
this.d(e.flyToEvent.don(async (p,
|
|
3428
|
+
this.d(e.flyToEvent.don(async (p, l) => {
|
|
3427
3429
|
if (!r && !n) return;
|
|
3428
3430
|
const u = await we(i, e.id, p);
|
|
3429
3431
|
let c = "over";
|
|
3430
|
-
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(
|
|
3431
|
-
})), 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) => {
|
|
3432
3434
|
var f, w;
|
|
3433
3435
|
if (!r && !n) return;
|
|
3434
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);
|
|
3435
3437
|
let c = "over";
|
|
3436
|
-
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);
|
|
3437
3439
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
3438
|
-
!r && !n ||
|
|
3440
|
+
!r && !n || lt(i, e.id);
|
|
3439
3441
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
3440
3442
|
if (!t.actived) return;
|
|
3441
3443
|
const p = await t.getCurrentCameraInfo();
|
|
3442
3444
|
if (!p) return;
|
|
3443
|
-
const { position:
|
|
3444
|
-
e.flyInParam = { position:
|
|
3445
|
+
const { position: l, rotation: u } = p;
|
|
3446
|
+
e.flyInParam = { position: l, rotation: u, flyDuration: 1 };
|
|
3445
3447
|
})), this.d(t.propChanged.don((p) => {
|
|
3446
|
-
!r && !n || p.objId === e.id && Object.keys(p.props).forEach((
|
|
3447
|
-
const u = p.props[
|
|
3448
|
-
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;
|
|
3449
3451
|
});
|
|
3450
3452
|
}));
|
|
3451
3453
|
}
|
|
@@ -3460,7 +3462,7 @@ const X = class X extends M {
|
|
|
3460
3462
|
}
|
|
3461
3463
|
}
|
|
3462
3464
|
};
|
|
3463
|
-
v(X, "type", X.register("ESUeViewer",
|
|
3465
|
+
v(X, "type", X.register("ESUeViewer", Ur.type, X)), v(X, "forceUeUpdateProps", [
|
|
3464
3466
|
...M.forceUeUpdateProps,
|
|
3465
3467
|
"url"
|
|
3466
3468
|
]), v(X, "propValFuncs", {
|
|
@@ -3478,7 +3480,7 @@ const ht = class ht extends I {
|
|
|
3478
3480
|
}
|
|
3479
3481
|
}
|
|
3480
3482
|
};
|
|
3481
|
-
v(ht, "type", ht.register("ESUeViewer",
|
|
3483
|
+
v(ht, "type", ht.register("ESUeViewer", Nr.type, ht));
|
|
3482
3484
|
let je = ht;
|
|
3483
3485
|
const pt = class pt extends I {
|
|
3484
3486
|
constructor(e, t) {
|
|
@@ -3488,7 +3490,7 @@ const pt = class pt extends I {
|
|
|
3488
3490
|
}
|
|
3489
3491
|
}
|
|
3490
3492
|
};
|
|
3491
|
-
v(pt, "type", pt.register("ESUeViewer",
|
|
3493
|
+
v(pt, "type", pt.register("ESUeViewer", zr.type, pt));
|
|
3492
3494
|
let ti = pt;
|
|
3493
3495
|
const vt = class vt extends D {
|
|
3494
3496
|
constructor(e, t) {
|
|
@@ -3498,7 +3500,7 @@ const vt = class vt extends D {
|
|
|
3498
3500
|
}
|
|
3499
3501
|
}
|
|
3500
3502
|
};
|
|
3501
|
-
v(vt, "type", vt.register("ESUeViewer",
|
|
3503
|
+
v(vt, "type", vt.register("ESUeViewer", br.type, vt));
|
|
3502
3504
|
let $ = vt;
|
|
3503
3505
|
const ft = class ft extends $ {
|
|
3504
3506
|
constructor(e, t) {
|
|
@@ -3574,7 +3576,7 @@ const wt = class wt extends I {
|
|
|
3574
3576
|
const { id: o, duration: h, position: a, rotation: g } = e;
|
|
3575
3577
|
Re(i, o, a, g, h ?? r, s);
|
|
3576
3578
|
})), this.dispose(e.resetWithCurrentCameraEvent.don(() => {
|
|
3577
|
-
|
|
3579
|
+
Er(i, e.id);
|
|
3578
3580
|
})), this.dispose(e.captureEvent.don((r, n) => {
|
|
3579
3581
|
t.capture(r, n).then((o) => {
|
|
3580
3582
|
o && (e.thumbnail = o);
|
|
@@ -3582,7 +3584,7 @@ const wt = class wt extends I {
|
|
|
3582
3584
|
}));
|
|
3583
3585
|
}
|
|
3584
3586
|
};
|
|
3585
|
-
v(wt, "type", wt.register("ESUeViewer",
|
|
3587
|
+
v(wt, "type", wt.register("ESUeViewer", Gr.type, wt));
|
|
3586
3588
|
let ni = wt;
|
|
3587
3589
|
const yt = class yt extends I {
|
|
3588
3590
|
constructor(e, t) {
|
|
@@ -3592,7 +3594,7 @@ const yt = class yt extends I {
|
|
|
3592
3594
|
}
|
|
3593
3595
|
}
|
|
3594
3596
|
};
|
|
3595
|
-
v(yt, "type", yt.register("ESUeViewer",
|
|
3597
|
+
v(yt, "type", yt.register("ESUeViewer", Kr.type, yt));
|
|
3596
3598
|
let si = yt;
|
|
3597
3599
|
const mt = class mt extends I {
|
|
3598
3600
|
constructor(e, t) {
|
|
@@ -3602,7 +3604,7 @@ const mt = class mt extends I {
|
|
|
3602
3604
|
}
|
|
3603
3605
|
}
|
|
3604
3606
|
};
|
|
3605
|
-
v(mt, "type", mt.register("ESUeViewer",
|
|
3607
|
+
v(mt, "type", mt.register("ESUeViewer", Xr.type, mt));
|
|
3606
3608
|
let oi = mt;
|
|
3607
3609
|
const Ct = class Ct extends D {
|
|
3608
3610
|
constructor(e, t) {
|
|
@@ -3613,17 +3615,17 @@ const Ct = class Ct extends D {
|
|
|
3613
3615
|
return;
|
|
3614
3616
|
}
|
|
3615
3617
|
const r = () => {
|
|
3616
|
-
let s =
|
|
3618
|
+
let s = dt.defaults.fillStyle;
|
|
3617
3619
|
try {
|
|
3618
|
-
s = { ...e.fillStyle ??
|
|
3620
|
+
s = { ...e.fillStyle ?? dt.defaults.fillStyle };
|
|
3619
3621
|
} catch (o) {
|
|
3620
|
-
console.error("ESClassification fillStyle 属性类型错误!", o), s = { ...
|
|
3622
|
+
console.error("ESClassification fillStyle 属性类型错误!", o), s = { ...dt.defaults.fillStyle };
|
|
3621
3623
|
}
|
|
3622
3624
|
s.materialParams = JSON.stringify(s.materialParams), i.callUeFunc({
|
|
3623
3625
|
f: "update",
|
|
3624
3626
|
p: {
|
|
3625
3627
|
id: e.id,
|
|
3626
|
-
filled: e.filled ??
|
|
3628
|
+
filled: e.filled ?? dt.defaults.filled,
|
|
3627
3629
|
fillStyle: s
|
|
3628
3630
|
}
|
|
3629
3631
|
});
|
|
@@ -3634,7 +3636,7 @@ const Ct = class Ct extends D {
|
|
|
3634
3636
|
this.d(n.don(r)), this.d(e.createdEvent.don(r));
|
|
3635
3637
|
}
|
|
3636
3638
|
};
|
|
3637
|
-
v(Ct, "type", Ct.register("ESUeViewer",
|
|
3639
|
+
v(Ct, "type", Ct.register("ESUeViewer", dt.type, Ct));
|
|
3638
3640
|
let ai = Ct;
|
|
3639
3641
|
const et = class et extends I {
|
|
3640
3642
|
constructor(e, t) {
|
|
@@ -3644,7 +3646,7 @@ const et = class et extends I {
|
|
|
3644
3646
|
}
|
|
3645
3647
|
}
|
|
3646
3648
|
};
|
|
3647
|
-
v(et, "type", et.register("ESUeViewer",
|
|
3649
|
+
v(et, "type", et.register("ESUeViewer", Yr.type, et)), // null 表示不设置,undefined表示不做任何转换
|
|
3648
3650
|
v(et, "propValFuncs", {
|
|
3649
3651
|
...I.propValFuncs,
|
|
3650
3652
|
targetID: (e) => {
|
|
@@ -3653,7 +3655,7 @@ v(et, "propValFuncs", {
|
|
|
3653
3655
|
return t ? (t.components.main ?? t).id : e;
|
|
3654
3656
|
}
|
|
3655
3657
|
});
|
|
3656
|
-
let
|
|
3658
|
+
let li = et;
|
|
3657
3659
|
const Ft = class Ft extends I {
|
|
3658
3660
|
constructor(e, t) {
|
|
3659
3661
|
super(e, t);
|
|
@@ -3662,28 +3664,28 @@ const Ft = class Ft extends I {
|
|
|
3662
3664
|
console.warn("viewer is undefined!");
|
|
3663
3665
|
return;
|
|
3664
3666
|
}
|
|
3665
|
-
const r = this.ad(
|
|
3667
|
+
const r = this.ad(He(""));
|
|
3666
3668
|
{
|
|
3667
3669
|
const o = () => {
|
|
3668
3670
|
if (typeof e.url == "string")
|
|
3669
|
-
r.value = E.context.getStrFromEnv(e.url ??
|
|
3671
|
+
r.value = E.context.getStrFromEnv(e.url ?? b.defaults.url);
|
|
3670
3672
|
else {
|
|
3671
3673
|
const h = e.url;
|
|
3672
|
-
h.url = E.context.getStrFromEnv(h.url ??
|
|
3674
|
+
h.url = E.context.getStrFromEnv(h.url ?? b.defaults.url), r.value = h;
|
|
3673
3675
|
}
|
|
3674
3676
|
};
|
|
3675
3677
|
o(), this.ad(e.urlChanged.don(o));
|
|
3676
3678
|
}
|
|
3677
3679
|
const n = () => {
|
|
3678
|
-
const o = e.colorStops ??
|
|
3680
|
+
const o = e.colorStops ?? b.defaults.colorStops;
|
|
3679
3681
|
i.callUeFunc({
|
|
3680
3682
|
f: "update",
|
|
3681
3683
|
p: {
|
|
3682
3684
|
id: e.id,
|
|
3683
|
-
url: r.value ??
|
|
3684
|
-
currentTime: e.currentTime ??
|
|
3685
|
-
minPropValue: e.minPropValue ??
|
|
3686
|
-
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,
|
|
3687
3689
|
colorStops: JSON.stringify(o)
|
|
3688
3690
|
}
|
|
3689
3691
|
});
|
|
@@ -3697,8 +3699,8 @@ const Ft = class Ft extends I {
|
|
|
3697
3699
|
this.d(s.don(n)), this.d(e.createdEvent.don(n));
|
|
3698
3700
|
}
|
|
3699
3701
|
};
|
|
3700
|
-
v(Ft, "type", Ft.register("ESUeViewer",
|
|
3701
|
-
let
|
|
3702
|
+
v(Ft, "type", Ft.register("ESUeViewer", b.type, Ft));
|
|
3703
|
+
let di = Ft;
|
|
3702
3704
|
const It = class It extends I {
|
|
3703
3705
|
constructor(e, t) {
|
|
3704
3706
|
if (super(e, t), !t.viewer) {
|
|
@@ -3707,7 +3709,7 @@ const It = class It extends I {
|
|
|
3707
3709
|
}
|
|
3708
3710
|
}
|
|
3709
3711
|
};
|
|
3710
|
-
v(It, "type", It.register("ESUeViewer",
|
|
3712
|
+
v(It, "type", It.register("ESUeViewer", Zr.type, It));
|
|
3711
3713
|
let ci = It;
|
|
3712
3714
|
const Et = class Et extends D {
|
|
3713
3715
|
constructor(e, t) {
|
|
@@ -3717,7 +3719,7 @@ const Et = class Et extends D {
|
|
|
3717
3719
|
}
|
|
3718
3720
|
}
|
|
3719
3721
|
};
|
|
3720
|
-
v(Et, "type", Et.register("ESUeViewer",
|
|
3722
|
+
v(Et, "type", Et.register("ESUeViewer", qr.type, Et));
|
|
3721
3723
|
let ui = Et;
|
|
3722
3724
|
const St = class St extends D {
|
|
3723
3725
|
constructor(e, t) {
|
|
@@ -3757,7 +3759,7 @@ const Tt = class Tt extends Ke {
|
|
|
3757
3759
|
}
|
|
3758
3760
|
}
|
|
3759
3761
|
};
|
|
3760
|
-
v(Tt, "type", Tt.register("ESUeViewer",
|
|
3762
|
+
v(Tt, "type", Tt.register("ESUeViewer", Qr.type, Tt));
|
|
3761
3763
|
let Ne = Tt;
|
|
3762
3764
|
const xt = class xt extends Ne {
|
|
3763
3765
|
constructor(e, t) {
|
|
@@ -3767,7 +3769,7 @@ const xt = class xt extends Ne {
|
|
|
3767
3769
|
}
|
|
3768
3770
|
}
|
|
3769
3771
|
};
|
|
3770
|
-
v(xt, "type", xt.register("ESUeViewer",
|
|
3772
|
+
v(xt, "type", xt.register("ESUeViewer", Vr.type, xt));
|
|
3771
3773
|
let pi = xt;
|
|
3772
3774
|
const Rt = class Rt extends M {
|
|
3773
3775
|
constructor(e, t) {
|
|
@@ -3782,7 +3784,7 @@ const Rt = class Rt extends M {
|
|
|
3782
3784
|
}));
|
|
3783
3785
|
}
|
|
3784
3786
|
};
|
|
3785
|
-
v(Rt, "type", Rt.register("ESUeViewer",
|
|
3787
|
+
v(Rt, "type", Rt.register("ESUeViewer", Or.type, Rt));
|
|
3786
3788
|
let vi = Rt;
|
|
3787
3789
|
const it = class it extends $ {
|
|
3788
3790
|
constructor(e, t) {
|
|
@@ -3792,7 +3794,7 @@ const it = class it extends $ {
|
|
|
3792
3794
|
}
|
|
3793
3795
|
}
|
|
3794
3796
|
};
|
|
3795
|
-
v(it, "type", it.register("ESUeViewer",
|
|
3797
|
+
v(it, "type", it.register("ESUeViewer", jr.type, it)), v(it, "propValFuncs", {
|
|
3796
3798
|
...$.propValFuncs,
|
|
3797
3799
|
targetID: (e) => {
|
|
3798
3800
|
if (!e) return "";
|
|
@@ -3809,7 +3811,7 @@ const Lt = class Lt extends I {
|
|
|
3809
3811
|
}
|
|
3810
3812
|
}
|
|
3811
3813
|
};
|
|
3812
|
-
v(Lt, "type", Lt.register("ESUeViewer",
|
|
3814
|
+
v(Lt, "type", Lt.register("ESUeViewer", tn.type, Lt));
|
|
3813
3815
|
let gi = Lt;
|
|
3814
3816
|
const Pt = class Pt extends M {
|
|
3815
3817
|
constructor(e, t) {
|
|
@@ -3819,7 +3821,7 @@ const Pt = class Pt extends M {
|
|
|
3819
3821
|
console.warn("viewer is undefined!");
|
|
3820
3822
|
return;
|
|
3821
3823
|
}
|
|
3822
|
-
const r = this.ad(
|
|
3824
|
+
const r = this.ad(He(""));
|
|
3823
3825
|
{
|
|
3824
3826
|
const o = () => {
|
|
3825
3827
|
if (typeof e.url == "string")
|
|
@@ -3863,23 +3865,23 @@ v(Pt, "type", Pt.register("ESUeViewer", N.type, Pt));
|
|
|
3863
3865
|
let wi = Pt;
|
|
3864
3866
|
const kt = class kt extends G {
|
|
3865
3867
|
constructor(e, t) {
|
|
3866
|
-
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)));
|
|
3867
3869
|
}
|
|
3868
3870
|
};
|
|
3869
3871
|
v(kt, "type", kt.register("ESUeViewer", Ce.type, kt));
|
|
3870
3872
|
let yi = kt;
|
|
3871
|
-
class
|
|
3873
|
+
class Co extends m {
|
|
3872
3874
|
constructor(t, i) {
|
|
3873
3875
|
super();
|
|
3874
|
-
v(this, "_screenPosition", this.disposeVar(
|
|
3876
|
+
v(this, "_screenPosition", this.disposeVar(pr(void 0)));
|
|
3875
3877
|
const r = i.viewer;
|
|
3876
3878
|
if (!r) {
|
|
3877
3879
|
console.warn("viewer is undefined!");
|
|
3878
3880
|
return;
|
|
3879
3881
|
}
|
|
3880
|
-
const n = this.disposeVar(new
|
|
3882
|
+
const n = this.disposeVar(new fr());
|
|
3881
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(() => {
|
|
3882
|
-
|
|
3884
|
+
lt(r, n.id);
|
|
3883
3885
|
})), this.dispose(t.calcFlyInParamEvent.disposableOn(async () => {
|
|
3884
3886
|
if (!i.actived) return;
|
|
3885
3887
|
const h = await i.getCurrentCameraInfo();
|
|
@@ -3892,17 +3894,17 @@ class mo extends m {
|
|
|
3892
3894
|
Le(r, n.id, h, a, g);
|
|
3893
3895
|
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((h, a, g, p) => {
|
|
3894
3896
|
Pe(r, n.id, h, a, p, g);
|
|
3895
|
-
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((h, a, g, p,
|
|
3896
|
-
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);
|
|
3897
3899
|
})), this.dispose(t.flyToEvent.disposableOn((h, a) => {
|
|
3898
3900
|
n.flyTo(h);
|
|
3899
3901
|
})), this.dispose(t.flyInEvent.don((h) => {
|
|
3900
3902
|
n.flyIn(h);
|
|
3901
3903
|
}));
|
|
3902
|
-
const s = this._screenPosition, o = this.disposeVar(new
|
|
3904
|
+
const s = this._screenPosition, o = this.disposeVar(new Je());
|
|
3903
3905
|
o.parentID = t.id, i.add(o), this.dispose(() => i.delete(o)), this.dispose(k([o, "allowPicking"], [t, "allowPicking"]));
|
|
3904
3906
|
{
|
|
3905
|
-
const h = this.disposeVar(
|
|
3907
|
+
const h = this.disposeVar(be()), a = () => {
|
|
3906
3908
|
t.show ? h.restart(void 0, async () => {
|
|
3907
3909
|
if (!t.position) return;
|
|
3908
3910
|
const g = await i.lonLatAltToScreenPosition(t.position);
|
|
@@ -3910,8 +3912,8 @@ class mo extends m {
|
|
|
3910
3912
|
if (!g)
|
|
3911
3913
|
this._screenPosition.value = void 0;
|
|
3912
3914
|
else {
|
|
3913
|
-
const [p,
|
|
3914
|
-
p === -1 &&
|
|
3915
|
+
const [p, l] = g;
|
|
3916
|
+
p === -1 && l === -1 ? this._screenPosition.value = void 0 : this._screenPosition.value = [p, l];
|
|
3915
3917
|
}
|
|
3916
3918
|
}) : h.cancel();
|
|
3917
3919
|
};
|
|
@@ -3919,11 +3921,11 @@ class mo extends m {
|
|
|
3919
3921
|
}
|
|
3920
3922
|
{
|
|
3921
3923
|
const h = () => class extends m {
|
|
3922
|
-
constructor(
|
|
3923
|
-
if (super(), this._subContainer =
|
|
3924
|
+
constructor(l, u, c) {
|
|
3925
|
+
if (super(), this._subContainer = l, !c) return;
|
|
3924
3926
|
if (!t.instanceClass)
|
|
3925
3927
|
throw new Error("!sceneObject.instanceClass");
|
|
3926
|
-
const f = new
|
|
3928
|
+
const f = new en(), w = f.element;
|
|
3927
3929
|
this._subContainer.appendChild(w), this.dispose(() => this._subContainer.removeChild(w)), w.onclick = (y) => {
|
|
3928
3930
|
(t.allowPicking ?? !1) && t.pickedEvent.emit(new Ae(
|
|
3929
3931
|
{ div: w, pointerEvent: y },
|
|
@@ -3996,12 +3998,12 @@ class mo extends m {
|
|
|
3996
3998
|
this._screenPosition.value = t;
|
|
3997
3999
|
}
|
|
3998
4000
|
}
|
|
3999
|
-
class
|
|
4001
|
+
class Fo extends m {
|
|
4000
4002
|
constructor(t, i) {
|
|
4001
4003
|
super();
|
|
4002
4004
|
v(this, "_imageLabel");
|
|
4003
4005
|
v(this, "_hasClassDivAndPos", {});
|
|
4004
|
-
this._imageLabel = this.dv(new
|
|
4006
|
+
this._imageLabel = this.dv(new gr()), this._imageLabel.isHoverZoom = !1, this._imageLabel.parentID = t.id;
|
|
4005
4007
|
const r = i.viewer;
|
|
4006
4008
|
if (!r) {
|
|
4007
4009
|
console.warn("viewer is undefined!");
|
|
@@ -4017,9 +4019,9 @@ class Co extends m {
|
|
|
4017
4019
|
const a = document.createElement("div"), g = this.dv(new t.instanceClass(a, t, i))._container;
|
|
4018
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)) {
|
|
4019
4021
|
document.body.appendChild(g);
|
|
4020
|
-
let
|
|
4021
|
-
for (let u = 0; u <
|
|
4022
|
-
const c =
|
|
4022
|
+
let l = g ? g.querySelectorAll("*[class]") : [];
|
|
4023
|
+
for (let u = 0; u < l.length; u++) {
|
|
4024
|
+
const c = l[u];
|
|
4023
4025
|
var p = c.getBoundingClientRect();
|
|
4024
4026
|
this._hasClassDivAndPos[c.className] = [
|
|
4025
4027
|
c.offsetLeft,
|
|
@@ -4029,15 +4031,15 @@ class Co extends m {
|
|
|
4029
4031
|
];
|
|
4030
4032
|
}
|
|
4031
4033
|
}
|
|
4032
|
-
|
|
4034
|
+
Qn(g, {
|
|
4033
4035
|
backgroundColor: null,
|
|
4034
4036
|
allowTaint: !0,
|
|
4035
4037
|
useCORS: !0,
|
|
4036
4038
|
width: g.offsetWidth,
|
|
4037
4039
|
height: g.offsetHeight,
|
|
4038
4040
|
scale: 1
|
|
4039
|
-
}).then((
|
|
4040
|
-
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;
|
|
4041
4043
|
}).catch(() => {
|
|
4042
4044
|
document.body.contains(g) && document.body.removeChild(g);
|
|
4043
4045
|
});
|
|
@@ -4069,15 +4071,15 @@ class Co extends m {
|
|
|
4069
4071
|
if (o === "leftClick" && h) {
|
|
4070
4072
|
const a = (h == null ? void 0 : h.classNames) ?? [], g = Object.keys(this._hasClassDivAndPos);
|
|
4071
4073
|
for (let p = 0; p < g.length; p++) {
|
|
4072
|
-
const
|
|
4073
|
-
let u = this._hasClassDivAndPos[
|
|
4074
|
-
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);
|
|
4075
4077
|
}
|
|
4076
4078
|
h.classNames = a;
|
|
4077
4079
|
}
|
|
4078
4080
|
t.widgetEvent.emit({ type: o, add: h });
|
|
4079
4081
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
4080
|
-
|
|
4082
|
+
lt(r, n.id);
|
|
4081
4083
|
})), this.d(t.calcFlyInParamEvent.don(() => {
|
|
4082
4084
|
const s = i.getCurrentCameraInfo();
|
|
4083
4085
|
if (!s) return;
|
|
@@ -4128,7 +4130,7 @@ const Dt = class Dt extends M {
|
|
|
4128
4130
|
}));
|
|
4129
4131
|
}
|
|
4130
4132
|
};
|
|
4131
|
-
v(Dt, "type", Dt.register("ESUeViewer",
|
|
4133
|
+
v(Dt, "type", Dt.register("ESUeViewer", rn.type, Dt));
|
|
4132
4134
|
let mi = Dt;
|
|
4133
4135
|
const Bt = class Bt extends D {
|
|
4134
4136
|
constructor(e, t) {
|
|
@@ -4138,7 +4140,7 @@ const Bt = class Bt extends D {
|
|
|
4138
4140
|
}
|
|
4139
4141
|
}
|
|
4140
4142
|
};
|
|
4141
|
-
v(Bt, "type", Bt.register("ESUeViewer",
|
|
4143
|
+
v(Bt, "type", Bt.register("ESUeViewer", nn.type, Bt));
|
|
4142
4144
|
let ze = Bt;
|
|
4143
4145
|
const _t = class _t extends D {
|
|
4144
4146
|
constructor(e, t) {
|
|
@@ -4148,7 +4150,7 @@ const _t = class _t extends D {
|
|
|
4148
4150
|
}
|
|
4149
4151
|
}
|
|
4150
4152
|
};
|
|
4151
|
-
v(_t, "type", _t.register("ESUeViewer",
|
|
4153
|
+
v(_t, "type", _t.register("ESUeViewer", sn.type, _t));
|
|
4152
4154
|
let Ci = _t;
|
|
4153
4155
|
const Mt = class Mt extends $ {
|
|
4154
4156
|
constructor(e, t) {
|
|
@@ -4158,7 +4160,7 @@ const Mt = class Mt extends $ {
|
|
|
4158
4160
|
}
|
|
4159
4161
|
}
|
|
4160
4162
|
};
|
|
4161
|
-
v(Mt, "type", Mt.register("ESUeViewer",
|
|
4163
|
+
v(Mt, "type", Mt.register("ESUeViewer", on.type, Mt));
|
|
4162
4164
|
let Fi = Mt;
|
|
4163
4165
|
const Y = class Y extends I {
|
|
4164
4166
|
constructor(e, t) {
|
|
@@ -4169,11 +4171,11 @@ const Y = class Y extends I {
|
|
|
4169
4171
|
return;
|
|
4170
4172
|
}
|
|
4171
4173
|
this.d(e.setNodePositionEvent.don((r, n) => {
|
|
4172
|
-
|
|
4174
|
+
ls(i, e.id, r, n);
|
|
4173
4175
|
})), this.d(e.setNodeRotationEvent.don((r, n) => {
|
|
4174
4176
|
ds(i, e.id, r, n);
|
|
4175
4177
|
})), this.d(e.setNodeScaleEvent.don((r, n) => {
|
|
4176
|
-
|
|
4178
|
+
cs(i, e.id, r, n);
|
|
4177
4179
|
}));
|
|
4178
4180
|
}
|
|
4179
4181
|
};
|
|
@@ -4187,7 +4189,7 @@ v(Y, "forceUeUpdateProps", [
|
|
|
4187
4189
|
czmMinimumPixelSize: null,
|
|
4188
4190
|
czmNativeScale: null,
|
|
4189
4191
|
czmColor: null
|
|
4190
|
-
}), v(Y, "type", Y.register("ESUeViewer",
|
|
4192
|
+
}), v(Y, "type", Y.register("ESUeViewer", an.type, Y));
|
|
4191
4193
|
let Ii = Y;
|
|
4192
4194
|
const $t = class $t extends D {
|
|
4193
4195
|
constructor(e, t) {
|
|
@@ -4197,7 +4199,7 @@ const $t = class $t extends D {
|
|
|
4197
4199
|
}
|
|
4198
4200
|
}
|
|
4199
4201
|
};
|
|
4200
|
-
v($t, "type", $t.register("ESUeViewer",
|
|
4202
|
+
v($t, "type", $t.register("ESUeViewer", ln.type, $t));
|
|
4201
4203
|
let Ei = $t;
|
|
4202
4204
|
const Wt = class Wt extends I {
|
|
4203
4205
|
constructor(e, t) {
|
|
@@ -4248,7 +4250,7 @@ const Z = class Z extends z {
|
|
|
4248
4250
|
e.anchor = [0.5, 1];
|
|
4249
4251
|
}
|
|
4250
4252
|
};
|
|
4251
|
-
v(Z, "type", Z.register("ESUeViewer",
|
|
4253
|
+
v(Z, "type", Z.register("ESUeViewer", gr.type, Z)), v(Z, "forceUeUpdateProps", [
|
|
4252
4254
|
...z.forceUeUpdateProps,
|
|
4253
4255
|
"url"
|
|
4254
4256
|
]), v(Z, "propValFuncs", {
|
|
@@ -4264,7 +4266,7 @@ const At = class At extends I {
|
|
|
4264
4266
|
}
|
|
4265
4267
|
}
|
|
4266
4268
|
};
|
|
4267
|
-
v(At, "type", At.register("ESUeViewer",
|
|
4269
|
+
v(At, "type", At.register("ESUeViewer", cn.type, At));
|
|
4268
4270
|
let xi = At;
|
|
4269
4271
|
const Ut = class Ut extends Ke {
|
|
4270
4272
|
constructor(e, t) {
|
|
@@ -4274,7 +4276,7 @@ const Ut = class Ut extends Ke {
|
|
|
4274
4276
|
}
|
|
4275
4277
|
}
|
|
4276
4278
|
};
|
|
4277
|
-
v(Ut, "type", Ut.register("ESUeViewer",
|
|
4279
|
+
v(Ut, "type", Ut.register("ESUeViewer", un.type, Ut));
|
|
4278
4280
|
let Ri = Ut;
|
|
4279
4281
|
const Nt = class Nt extends M {
|
|
4280
4282
|
constructor(e, t) {
|
|
@@ -4284,7 +4286,7 @@ const Nt = class Nt extends M {
|
|
|
4284
4286
|
}
|
|
4285
4287
|
}
|
|
4286
4288
|
};
|
|
4287
|
-
v(Nt, "type", Nt.register("ESUeViewer",
|
|
4289
|
+
v(Nt, "type", Nt.register("ESUeViewer", hn.type, Nt));
|
|
4288
4290
|
let Li = Nt;
|
|
4289
4291
|
const zt = class zt extends Ke {
|
|
4290
4292
|
constructor(e, t) {
|
|
@@ -4294,9 +4296,9 @@ const zt = class zt extends Ke {
|
|
|
4294
4296
|
}
|
|
4295
4297
|
}
|
|
4296
4298
|
};
|
|
4297
|
-
v(zt, "type", zt.register("ESUeViewer",
|
|
4299
|
+
v(zt, "type", zt.register("ESUeViewer", pn.type, zt));
|
|
4298
4300
|
let Pi = zt;
|
|
4299
|
-
const
|
|
4301
|
+
const bt = class bt extends I {
|
|
4300
4302
|
constructor(e, t) {
|
|
4301
4303
|
if (super(e, t), !t.viewer) {
|
|
4302
4304
|
console.warn("viewer is undefined!");
|
|
@@ -4304,9 +4306,9 @@ const Ht = class Ht extends I {
|
|
|
4304
4306
|
}
|
|
4305
4307
|
}
|
|
4306
4308
|
};
|
|
4307
|
-
v(
|
|
4308
|
-
let ki =
|
|
4309
|
-
const
|
|
4309
|
+
v(bt, "type", bt.register("ESUeViewer", vn.type, bt));
|
|
4310
|
+
let ki = bt;
|
|
4311
|
+
const Ht = class Ht extends I {
|
|
4310
4312
|
constructor(e, t) {
|
|
4311
4313
|
if (super(e, t), !t.viewer) {
|
|
4312
4314
|
console.warn("viewer is undefined!");
|
|
@@ -4314,9 +4316,9 @@ const Jt = class Jt extends I {
|
|
|
4314
4316
|
}
|
|
4315
4317
|
}
|
|
4316
4318
|
};
|
|
4317
|
-
v(
|
|
4318
|
-
let Di =
|
|
4319
|
-
const
|
|
4319
|
+
v(Ht, "type", Ht.register("ESUeViewer", fn.type, Ht));
|
|
4320
|
+
let Di = Ht;
|
|
4321
|
+
const Jt = class Jt extends D {
|
|
4320
4322
|
constructor(e, t) {
|
|
4321
4323
|
if (super(e, t), !t.viewer) {
|
|
4322
4324
|
console.warn("viewer is undefined!");
|
|
@@ -4324,8 +4326,8 @@ const bt = class bt extends D {
|
|
|
4324
4326
|
}
|
|
4325
4327
|
}
|
|
4326
4328
|
};
|
|
4327
|
-
v(
|
|
4328
|
-
let Bi =
|
|
4329
|
+
v(Jt, "type", Jt.register("ESUeViewer", gn.type, Jt));
|
|
4330
|
+
let Bi = Jt;
|
|
4329
4331
|
const Gt = class Gt extends ze {
|
|
4330
4332
|
constructor(e, t) {
|
|
4331
4333
|
if (super(e, t), !t.viewer) {
|
|
@@ -4334,7 +4336,7 @@ const Gt = class Gt extends ze {
|
|
|
4334
4336
|
}
|
|
4335
4337
|
}
|
|
4336
4338
|
};
|
|
4337
|
-
v(Gt, "type", Gt.register("ESUeViewer",
|
|
4339
|
+
v(Gt, "type", Gt.register("ESUeViewer", wn.type, Gt));
|
|
4338
4340
|
let _i = Gt;
|
|
4339
4341
|
const Kt = class Kt extends Ue {
|
|
4340
4342
|
constructor(e, t) {
|
|
@@ -4346,20 +4348,20 @@ const Kt = class Kt extends Ue {
|
|
|
4346
4348
|
}
|
|
4347
4349
|
this.d(e.highlightFeatureEvent.don((r) => {
|
|
4348
4350
|
const n = typeof r == "number" ? r.toString() : r;
|
|
4349
|
-
|
|
4351
|
+
ns(i, e.id, n);
|
|
4350
4352
|
})), this.d(e.highlightFeatureAndFlyToEvent.don((r, n, s, o) => {
|
|
4351
4353
|
const h = typeof r == "number" ? r.toString() : r;
|
|
4352
|
-
|
|
4354
|
+
ss(i, e.id, h, o ?? 1);
|
|
4353
4355
|
})), this.d(e.setLayerVisibleEvent.don((r, n) => {
|
|
4354
4356
|
let s = "";
|
|
4355
|
-
typeof n != "string" ? s = JSON.stringify(n) : s = n,
|
|
4357
|
+
typeof n != "string" ? s = JSON.stringify(n) : s = n, os(i, e.id, s);
|
|
4356
4358
|
})), this.d(e.setLayerColorEvent.don((r, n) => {
|
|
4357
4359
|
let s = "";
|
|
4358
|
-
typeof n != "string" ? s = JSON.stringify(n) : s = n,
|
|
4360
|
+
typeof n != "string" ? s = JSON.stringify(n) : s = n, as(i, e.id, s);
|
|
4359
4361
|
}));
|
|
4360
4362
|
}
|
|
4361
4363
|
};
|
|
4362
|
-
v(Kt, "type", Kt.register("ESUeViewer",
|
|
4364
|
+
v(Kt, "type", Kt.register("ESUeViewer", yn.type, Kt));
|
|
4363
4365
|
let Mi = Kt;
|
|
4364
4366
|
const Xt = class Xt extends $ {
|
|
4365
4367
|
constructor(e, t) {
|
|
@@ -4369,7 +4371,7 @@ const Xt = class Xt extends $ {
|
|
|
4369
4371
|
}
|
|
4370
4372
|
}
|
|
4371
4373
|
};
|
|
4372
|
-
v(Xt, "type", Xt.register("ESUeViewer",
|
|
4374
|
+
v(Xt, "type", Xt.register("ESUeViewer", mn.type, Xt));
|
|
4373
4375
|
let $i = Xt;
|
|
4374
4376
|
const Yt = class Yt extends z {
|
|
4375
4377
|
constructor(e, t) {
|
|
@@ -4392,7 +4394,7 @@ const Yt = class Yt extends z {
|
|
|
4392
4394
|
}));
|
|
4393
4395
|
}
|
|
4394
4396
|
};
|
|
4395
|
-
v(Yt, "type", Yt.register("ESUeViewer",
|
|
4397
|
+
v(Yt, "type", Yt.register("ESUeViewer", Cn.type, Yt));
|
|
4396
4398
|
let Wi = Yt;
|
|
4397
4399
|
const Zt = class Zt extends I {
|
|
4398
4400
|
constructor(e, t) {
|
|
@@ -4402,7 +4404,7 @@ const Zt = class Zt extends I {
|
|
|
4402
4404
|
}
|
|
4403
4405
|
}
|
|
4404
4406
|
};
|
|
4405
|
-
v(Zt, "type", Zt.register("ESUeViewer",
|
|
4407
|
+
v(Zt, "type", Zt.register("ESUeViewer", Fn.type, Zt));
|
|
4406
4408
|
let Ai = Zt;
|
|
4407
4409
|
const q = class q extends M {
|
|
4408
4410
|
constructor(e, t) {
|
|
@@ -4412,7 +4414,7 @@ const q = class q extends M {
|
|
|
4412
4414
|
}
|
|
4413
4415
|
}
|
|
4414
4416
|
};
|
|
4415
|
-
v(q, "type", q.register("ESUeViewer",
|
|
4417
|
+
v(q, "type", q.register("ESUeViewer", In.type, q)), v(q, "forceUeUpdateProps", [
|
|
4416
4418
|
...M.forceUeUpdateProps,
|
|
4417
4419
|
"url"
|
|
4418
4420
|
]), v(q, "propValFuncs", {
|
|
@@ -4428,7 +4430,7 @@ const qt = class qt extends D {
|
|
|
4428
4430
|
}
|
|
4429
4431
|
}
|
|
4430
4432
|
};
|
|
4431
|
-
v(qt, "type", qt.register("ESUeViewer",
|
|
4433
|
+
v(qt, "type", qt.register("ESUeViewer", En.type, qt));
|
|
4432
4434
|
let Ni = qt;
|
|
4433
4435
|
const rt = class rt extends $ {
|
|
4434
4436
|
constructor(e, t) {
|
|
@@ -4438,7 +4440,7 @@ const rt = class rt extends $ {
|
|
|
4438
4440
|
}
|
|
4439
4441
|
}
|
|
4440
4442
|
};
|
|
4441
|
-
v(rt, "type", rt.register("ESUeViewer",
|
|
4443
|
+
v(rt, "type", rt.register("ESUeViewer", Sn.type, rt)), // null 表示不设置,undefined表示不做任何转换
|
|
4442
4444
|
v(rt, "propValFuncs", {
|
|
4443
4445
|
...$.propValFuncs,
|
|
4444
4446
|
targetID: (e) => {
|
|
@@ -4456,8 +4458,8 @@ const Qt = class Qt extends $ {
|
|
|
4456
4458
|
}
|
|
4457
4459
|
}
|
|
4458
4460
|
};
|
|
4459
|
-
v(Qt, "type", Qt.register("ESUeViewer",
|
|
4460
|
-
let
|
|
4461
|
+
v(Qt, "type", Qt.register("ESUeViewer", Tn.type, Qt));
|
|
4462
|
+
let bi = Qt;
|
|
4461
4463
|
const Vt = class Vt extends at {
|
|
4462
4464
|
constructor(e, t) {
|
|
4463
4465
|
if (super(e, t), !t.viewer) {
|
|
@@ -4486,14 +4488,14 @@ const Vt = class Vt extends at {
|
|
|
4486
4488
|
} else if (o.startsWith("rgba")) {
|
|
4487
4489
|
let a = o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);
|
|
4488
4490
|
if (a) {
|
|
4489
|
-
let g = parseInt(a[1]), p = parseInt(a[2]),
|
|
4490
|
-
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];
|
|
4491
4493
|
}
|
|
4492
4494
|
} else if (o.startsWith("rgb")) {
|
|
4493
4495
|
let a = o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
|
4494
4496
|
if (a) {
|
|
4495
|
-
let g = parseInt(a[1]), p = parseInt(a[2]),
|
|
4496
|
-
h = [g, p,
|
|
4497
|
+
let g = parseInt(a[1]), p = parseInt(a[2]), l = parseInt(a[3]);
|
|
4498
|
+
h = [g, p, l, 1];
|
|
4497
4499
|
}
|
|
4498
4500
|
} else
|
|
4499
4501
|
console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");
|
|
@@ -4537,8 +4539,8 @@ const Vt = class Vt extends at {
|
|
|
4537
4539
|
}
|
|
4538
4540
|
}
|
|
4539
4541
|
};
|
|
4540
|
-
v(Vt, "type", Vt.register("ESUeViewer",
|
|
4541
|
-
let
|
|
4542
|
+
v(Vt, "type", Vt.register("ESUeViewer", xn.type, Vt));
|
|
4543
|
+
let Hi = Vt;
|
|
4542
4544
|
const Ot = class Ot extends M {
|
|
4543
4545
|
constructor(e, t) {
|
|
4544
4546
|
if (super(e, t), !t.viewer) {
|
|
@@ -4546,20 +4548,20 @@ const Ot = class Ot extends M {
|
|
|
4546
4548
|
return;
|
|
4547
4549
|
}
|
|
4548
4550
|
this.d(e.addTreesEvent.don((r) => {
|
|
4549
|
-
|
|
4551
|
+
Ln(t, e.id, r);
|
|
4550
4552
|
})), this.d(e.removeAllTreesEvent.don(() => {
|
|
4551
|
-
|
|
4553
|
+
Pn(t, e.id);
|
|
4552
4554
|
})), this.d(e.updateTreeParamsEvent.don((r) => {
|
|
4553
|
-
|
|
4555
|
+
kn(t, e.id, r);
|
|
4554
4556
|
})), this.d(e.cutDownTreesEvent.don((r, n) => {
|
|
4555
|
-
|
|
4557
|
+
Dn(t, e.id, r, n);
|
|
4556
4558
|
})), this.d(e.growthSimulationEvent.don((r, n, s) => {
|
|
4557
|
-
|
|
4559
|
+
Bn(t, e.id, r, n, s);
|
|
4558
4560
|
}));
|
|
4559
4561
|
}
|
|
4560
4562
|
};
|
|
4561
|
-
v(Ot, "type", Ot.register("ESUeViewer",
|
|
4562
|
-
let
|
|
4563
|
+
v(Ot, "type", Ot.register("ESUeViewer", Rn.type, Ot));
|
|
4564
|
+
let Ji = Ot;
|
|
4563
4565
|
const jt = class jt extends I {
|
|
4564
4566
|
constructor(e, t) {
|
|
4565
4567
|
if (super(e, t), !t.viewer) {
|
|
@@ -4568,7 +4570,7 @@ const jt = class jt extends I {
|
|
|
4568
4570
|
}
|
|
4569
4571
|
}
|
|
4570
4572
|
};
|
|
4571
|
-
v(jt, "type", jt.register("ESUeViewer",
|
|
4573
|
+
v(jt, "type", jt.register("ESUeViewer", _n.type, jt));
|
|
4572
4574
|
let Gi = jt;
|
|
4573
4575
|
const te = class te extends $ {
|
|
4574
4576
|
constructor(e, t) {
|
|
@@ -4595,7 +4597,7 @@ const te = class te extends $ {
|
|
|
4595
4597
|
}));
|
|
4596
4598
|
}
|
|
4597
4599
|
};
|
|
4598
|
-
v(te, "type", te.register("ESUeViewer",
|
|
4600
|
+
v(te, "type", te.register("ESUeViewer", Mn.type, te));
|
|
4599
4601
|
let Ki = te;
|
|
4600
4602
|
const ee = class ee extends $ {
|
|
4601
4603
|
constructor(e, t) {
|
|
@@ -4615,7 +4617,7 @@ const ee = class ee extends $ {
|
|
|
4615
4617
|
}));
|
|
4616
4618
|
}
|
|
4617
4619
|
};
|
|
4618
|
-
v(ee, "type", ee.register("ESUeViewer",
|
|
4620
|
+
v(ee, "type", ee.register("ESUeViewer", $n.type, ee));
|
|
4619
4621
|
let Xi = ee;
|
|
4620
4622
|
const ie = class ie extends z {
|
|
4621
4623
|
constructor(e, t) {
|
|
@@ -4625,7 +4627,7 @@ const ie = class ie extends z {
|
|
|
4625
4627
|
}
|
|
4626
4628
|
}
|
|
4627
4629
|
};
|
|
4628
|
-
v(ie, "type", ie.register("ESUeViewer",
|
|
4630
|
+
v(ie, "type", ie.register("ESUeViewer", fr.type, ie));
|
|
4629
4631
|
let Yi = ie;
|
|
4630
4632
|
const nt = class nt extends z {
|
|
4631
4633
|
constructor(e, t) {
|
|
@@ -4636,18 +4638,18 @@ const nt = class nt extends z {
|
|
|
4636
4638
|
return;
|
|
4637
4639
|
}
|
|
4638
4640
|
this.d(e.callFunctionEvent.don(async (r, n) => {
|
|
4639
|
-
const s = await
|
|
4641
|
+
const s = await Sr(i, e.id, r, n);
|
|
4640
4642
|
e.__callFunctionResultEvent.emit(s);
|
|
4641
4643
|
}));
|
|
4642
4644
|
}
|
|
4643
4645
|
};
|
|
4644
|
-
v(nt, "type", nt.register("ESUeViewer",
|
|
4646
|
+
v(nt, "type", nt.register("ESUeViewer", Wn.type, nt)), v(nt, "propValFuncs", {
|
|
4645
4647
|
...z.propValFuncs,
|
|
4646
4648
|
info: (e) => JSON.stringify(e ?? {})
|
|
4647
4649
|
});
|
|
4648
4650
|
let Zi = nt;
|
|
4649
|
-
const qi = (
|
|
4650
|
-
switch (
|
|
4651
|
+
const qi = (d) => {
|
|
4652
|
+
switch (d) {
|
|
4651
4653
|
case 0:
|
|
4652
4654
|
return "成功绑定";
|
|
4653
4655
|
case 1:
|
|
@@ -4661,8 +4663,8 @@ const qi = (l) => {
|
|
|
4661
4663
|
default:
|
|
4662
4664
|
return "未知错误";
|
|
4663
4665
|
}
|
|
4664
|
-
},
|
|
4665
|
-
switch (
|
|
4666
|
+
}, Io = (d) => {
|
|
4667
|
+
switch (d) {
|
|
4666
4668
|
case 0:
|
|
4667
4669
|
return "创建成功";
|
|
4668
4670
|
case 1:
|
|
@@ -4681,7 +4683,7 @@ const qi = (l) => {
|
|
|
4681
4683
|
return;
|
|
4682
4684
|
}
|
|
4683
4685
|
this.d(() => {
|
|
4684
|
-
|
|
4686
|
+
Ir(i, e.id);
|
|
4685
4687
|
});
|
|
4686
4688
|
const r = async () => {
|
|
4687
4689
|
a() || await i.callUeFunc({
|
|
@@ -4724,9 +4726,9 @@ const qi = (l) => {
|
|
|
4724
4726
|
}
|
|
4725
4727
|
}), (t.debug ?? !1) && console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`));
|
|
4726
4728
|
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1, g = async () => {
|
|
4727
|
-
const { id:
|
|
4729
|
+
const { id: l } = e, u = await t.unBindActorByID(l);
|
|
4728
4730
|
u && u.error !== "" && console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${u.error}`), s = void 0;
|
|
4729
|
-
const c = await i.callUeFunc({ f: "destroy", p: { id:
|
|
4731
|
+
const c = await i.callUeFunc({ f: "destroy", p: { id: l } });
|
|
4730
4732
|
if (c && c.error !== "") {
|
|
4731
4733
|
console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${c.error}`);
|
|
4732
4734
|
return;
|
|
@@ -4737,7 +4739,7 @@ const qi = (l) => {
|
|
|
4737
4739
|
actorClass: "default"
|
|
4738
4740
|
}));
|
|
4739
4741
|
{
|
|
4740
|
-
const
|
|
4742
|
+
const l = this.dv(P(
|
|
4741
4743
|
e.actorClassChanged,
|
|
4742
4744
|
e.actorTagChanged
|
|
4743
4745
|
// sceneObject.positionChanged,
|
|
@@ -4752,10 +4754,10 @@ const qi = (l) => {
|
|
|
4752
4754
|
// position: sceneObject.position,
|
|
4753
4755
|
};
|
|
4754
4756
|
};
|
|
4755
|
-
u(), this.d(
|
|
4757
|
+
u(), this.d(l.don(u)), this.d(e.flushEvent.don(() => l.flush()));
|
|
4756
4758
|
}
|
|
4757
4759
|
{
|
|
4758
|
-
const
|
|
4760
|
+
const l = this.dv(Te(async (c) => {
|
|
4759
4761
|
if (await c.promise(g()), e.lastActorStatus = "null", p.value.type === "ActorTag") {
|
|
4760
4762
|
const { actorTag: f } = p.value;
|
|
4761
4763
|
try {
|
|
@@ -4789,7 +4791,7 @@ const qi = (l) => {
|
|
|
4789
4791
|
if (w.re.type === 0)
|
|
4790
4792
|
f !== "default" && (e.lastActorStatus = "created"), o = f;
|
|
4791
4793
|
else {
|
|
4792
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${f},${
|
|
4794
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${f},${Io(w.re.type)}`);
|
|
4793
4795
|
return;
|
|
4794
4796
|
}
|
|
4795
4797
|
} catch (w) {
|
|
@@ -4799,47 +4801,47 @@ const qi = (l) => {
|
|
|
4799
4801
|
}
|
|
4800
4802
|
await c.promise(r()), await c.promise(h());
|
|
4801
4803
|
})), u = async () => {
|
|
4802
|
-
|
|
4804
|
+
l.restart();
|
|
4803
4805
|
};
|
|
4804
4806
|
u(), this.d(p.changed.don(u));
|
|
4805
4807
|
}
|
|
4806
|
-
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) => {
|
|
4807
4809
|
if (a()) {
|
|
4808
4810
|
e.__callFunctionResultEvent.emit(void 0);
|
|
4809
4811
|
return;
|
|
4810
4812
|
}
|
|
4811
|
-
const c = await
|
|
4813
|
+
const c = await Sr(i, e.id, l, u);
|
|
4812
4814
|
e.__callFunctionResultEvent.emit(c);
|
|
4813
|
-
})), this.d(e.smoothMoveEvent.don((
|
|
4814
|
-
a() || De(i, e.id,
|
|
4815
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((
|
|
4816
|
-
a() || Le(i, e.id,
|
|
4817
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((
|
|
4818
|
-
a() || Pe(i, e.id,
|
|
4819
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((
|
|
4820
|
-
a() || ke(i, e.id,
|
|
4821
|
-
})), 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) => {
|
|
4822
4824
|
if (a()) return;
|
|
4823
4825
|
const u = [e.position[0], e.position[1]];
|
|
4824
4826
|
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((c) => {
|
|
4825
|
-
c !== null && (e.position = [...u, c], e.collision =
|
|
4827
|
+
c !== null && (e.position = [...u, c], e.collision = l);
|
|
4826
4828
|
});
|
|
4827
|
-
})), this.d(e.flyToEvent.don(async (
|
|
4829
|
+
})), this.d(e.flyToEvent.don(async (l, u) => {
|
|
4828
4830
|
if (a()) return;
|
|
4829
|
-
const c = await we(i, e.id,
|
|
4831
|
+
const c = await we(i, e.id, l);
|
|
4830
4832
|
let f = "over";
|
|
4831
4833
|
c === void 0 ? f = "error" : c.endType === 0 ? f = "over" : c.endType === 1 && (f = "cancelled"), e.flyOverEvent.emit(u, f, t);
|
|
4832
4834
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
4833
|
-
a() ||
|
|
4835
|
+
a() || lt(i, e.id);
|
|
4834
4836
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
4835
4837
|
if (!t.actived) return;
|
|
4836
|
-
const
|
|
4837
|
-
if (!
|
|
4838
|
-
const { position: u, rotation: c } =
|
|
4838
|
+
const l = await t.getCurrentCameraInfo();
|
|
4839
|
+
if (!l) return;
|
|
4840
|
+
const { position: u, rotation: c } = l;
|
|
4839
4841
|
e.flyInParam = { position: u, rotation: c, flyDuration: 1 };
|
|
4840
|
-
})), this.d(t.propChanged.don((
|
|
4841
|
-
a() ||
|
|
4842
|
-
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];
|
|
4843
4845
|
e[u] = c;
|
|
4844
4846
|
});
|
|
4845
4847
|
}));
|
|
@@ -4855,7 +4857,7 @@ const ne = class ne extends I {
|
|
|
4855
4857
|
}
|
|
4856
4858
|
}
|
|
4857
4859
|
};
|
|
4858
|
-
v(ne, "type", ne.register("ESUeViewer",
|
|
4860
|
+
v(ne, "type", ne.register("ESUeViewer", An.type, ne));
|
|
4859
4861
|
let Vi = ne;
|
|
4860
4862
|
const se = class se extends I {
|
|
4861
4863
|
constructor(e, t) {
|
|
@@ -4865,7 +4867,7 @@ const se = class se extends I {
|
|
|
4865
4867
|
}
|
|
4866
4868
|
}
|
|
4867
4869
|
};
|
|
4868
|
-
v(se, "type", se.register("ESUeViewer",
|
|
4870
|
+
v(se, "type", se.register("ESUeViewer", Un.type, se));
|
|
4869
4871
|
let Oi = se;
|
|
4870
4872
|
const oe = class oe extends D {
|
|
4871
4873
|
constructor(e, t) {
|
|
@@ -4875,7 +4877,7 @@ const oe = class oe extends D {
|
|
|
4875
4877
|
}
|
|
4876
4878
|
}
|
|
4877
4879
|
};
|
|
4878
|
-
v(oe, "type", oe.register("ESUeViewer",
|
|
4880
|
+
v(oe, "type", oe.register("ESUeViewer", Nn.type, oe));
|
|
4879
4881
|
let ji = oe;
|
|
4880
4882
|
const ae = class ae extends $ {
|
|
4881
4883
|
constructor(e, t) {
|
|
@@ -4902,7 +4904,7 @@ const ae = class ae extends $ {
|
|
|
4902
4904
|
}));
|
|
4903
4905
|
}
|
|
4904
4906
|
};
|
|
4905
|
-
v(ae, "type", ae.register("ESUeViewer",
|
|
4907
|
+
v(ae, "type", ae.register("ESUeViewer", zn.type, ae));
|
|
4906
4908
|
let tr = ae;
|
|
4907
4909
|
const st = class st extends z {
|
|
4908
4910
|
constructor(e, t) {
|
|
@@ -4912,12 +4914,12 @@ const st = class st extends z {
|
|
|
4912
4914
|
}
|
|
4913
4915
|
}
|
|
4914
4916
|
};
|
|
4915
|
-
v(st, "type", st.register("ESUeViewer",
|
|
4917
|
+
v(st, "type", st.register("ESUeViewer", bn.type, st)), v(st, "propValFuncs", {
|
|
4916
4918
|
...z.propValFuncs,
|
|
4917
4919
|
info: (e) => JSON.stringify(e ?? {})
|
|
4918
4920
|
});
|
|
4919
4921
|
let er = st;
|
|
4920
|
-
const
|
|
4922
|
+
const le = class le extends G {
|
|
4921
4923
|
constructor(e, t) {
|
|
4922
4924
|
if (super(e, t), !t.viewer) {
|
|
4923
4925
|
console.warn("viewer is undefined!");
|
|
@@ -4930,16 +4932,16 @@ const de = class de extends G {
|
|
|
4930
4932
|
});
|
|
4931
4933
|
}
|
|
4932
4934
|
};
|
|
4933
|
-
v(
|
|
4934
|
-
let ir =
|
|
4935
|
+
v(le, "type", le.register("ESUeViewer", Hn.type, le));
|
|
4936
|
+
let ir = le;
|
|
4935
4937
|
E.context.getStrFromEnv(j.defaults.imgUrl);
|
|
4936
|
-
const
|
|
4938
|
+
const de = class de extends G {
|
|
4937
4939
|
constructor(e, t) {
|
|
4938
4940
|
if (super(e, t), !t.viewer) {
|
|
4939
4941
|
console.warn("viewer is undefined!");
|
|
4940
4942
|
return;
|
|
4941
4943
|
}
|
|
4942
|
-
const r = this.disposeVar(new
|
|
4944
|
+
const r = this.disposeVar(new Je());
|
|
4943
4945
|
t.add(r), this.dispose(() => t.delete(r)), this.dispose(F([r, "show"], [e, "show"])), r.instanceClass = class extends m {
|
|
4944
4946
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
4945
4947
|
// customDiv指向当前的CustomDiv场景对象
|
|
@@ -4949,24 +4951,24 @@ const le = class le extends G {
|
|
|
4949
4951
|
const a = document.createElement("div");
|
|
4950
4952
|
this._subContainer.appendChild(a), this.dispose(() => this._subContainer.removeChild(a));
|
|
4951
4953
|
{
|
|
4952
|
-
const
|
|
4954
|
+
const l = async () => {
|
|
4953
4955
|
const u = await t.getCurrentCameraInfo(), c = u == null ? void 0 : u.position, w = [...u == null ? void 0 : u.rotation];
|
|
4954
4956
|
w[0] = 360, t.flyIn(c, w);
|
|
4955
4957
|
};
|
|
4956
|
-
a.addEventListener("click",
|
|
4958
|
+
a.addEventListener("click", l), a.style.cursor = "pointer", this.dispose(() => a.removeEventListener("click", l));
|
|
4957
4959
|
}
|
|
4958
4960
|
{
|
|
4959
|
-
const
|
|
4961
|
+
const l = () => {
|
|
4960
4962
|
a.style.width = `${e.cssSize ? e.cssSize : j.defaults.cssSize}px`, a.style.height = `${e.cssSize ? e.cssSize : j.defaults.cssSize}px`;
|
|
4961
4963
|
};
|
|
4962
|
-
|
|
4964
|
+
l(), e.dispose(e.cssSizeChanged.disposableOn(l));
|
|
4963
4965
|
}
|
|
4964
4966
|
a.style.position = "fixed";
|
|
4965
4967
|
{
|
|
4966
|
-
const
|
|
4968
|
+
const l = () => {
|
|
4967
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`;
|
|
4968
4970
|
};
|
|
4969
|
-
|
|
4971
|
+
l(), e.dispose(e.cssPositionChanged.disposableOn(l));
|
|
4970
4972
|
}
|
|
4971
4973
|
a.style.transition = " right 0.4s linear", a.style.cursor = "pointer";
|
|
4972
4974
|
const g = document.createElement("div");
|
|
@@ -4974,18 +4976,18 @@ const le = class le extends G {
|
|
|
4974
4976
|
const p = document.createElement("img");
|
|
4975
4977
|
g.appendChild(p), this.dispose(() => g.removeChild(p)), p.style.width = "100%", p.style.height = "100%", p.style.border = "none";
|
|
4976
4978
|
{
|
|
4977
|
-
const
|
|
4978
|
-
|
|
4979
|
+
const l = () => p.src = e.imgUrl;
|
|
4980
|
+
l(), e.dispose(e.imgUrlChanged.disposableOn(l));
|
|
4979
4981
|
}
|
|
4980
4982
|
{
|
|
4981
|
-
const
|
|
4983
|
+
const l = () => {
|
|
4982
4984
|
const w = -t.getCurrentCameraInfo().rotation[0];
|
|
4983
4985
|
p.style.transform = `rotate(${w}deg)`;
|
|
4984
4986
|
};
|
|
4985
4987
|
let u;
|
|
4986
4988
|
const c = async () => {
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
+
l(), e.show ? (a.style.display = "block", u = setInterval(() => {
|
|
4990
|
+
l();
|
|
4989
4991
|
}, 1e3)) : (a.style.display = "none", clearInterval(u));
|
|
4990
4992
|
};
|
|
4991
4993
|
this.dispose(e.showChanged.disposableOn(c)), c(), this.dispose(() => clearInterval(u));
|
|
@@ -4995,8 +4997,8 @@ const le = class le extends G {
|
|
|
4995
4997
|
};
|
|
4996
4998
|
}
|
|
4997
4999
|
};
|
|
4998
|
-
v(
|
|
4999
|
-
let rr =
|
|
5000
|
+
v(de, "type", de.register("ESUeViewer", j.type, de));
|
|
5001
|
+
let rr = de;
|
|
5000
5002
|
const Q = class Q extends D {
|
|
5001
5003
|
constructor(e, t) {
|
|
5002
5004
|
super(e, t);
|
|
@@ -5025,8 +5027,8 @@ v(Q, "type", Q.register("ESUeViewer", Jn.type, Q)), v(Q, "forceUeUpdateProps", [
|
|
|
5025
5027
|
...D.propValFuncs
|
|
5026
5028
|
});
|
|
5027
5029
|
let nr = Q;
|
|
5028
|
-
async function
|
|
5029
|
-
navigator.clipboard.writeText(
|
|
5030
|
+
async function Eo(d) {
|
|
5031
|
+
navigator.clipboard.writeText(d).then(function() {
|
|
5030
5032
|
console.log("复制成功");
|
|
5031
5033
|
}, function(e) {
|
|
5032
5034
|
console.log("复制失败");
|
|
@@ -5038,21 +5040,21 @@ const ce = class ce extends G {
|
|
|
5038
5040
|
console.warn("viewer is undefined!");
|
|
5039
5041
|
return;
|
|
5040
5042
|
}
|
|
5041
|
-
const r = this.disposeVar(new
|
|
5043
|
+
const r = this.disposeVar(new Je());
|
|
5042
5044
|
t.add(r), this.dispose(() => t.delete(r)), r.instanceClass = class extends m {
|
|
5043
5045
|
constructor(s, o, h) {
|
|
5044
|
-
if (super(), this._subContainer = s, !h || !(h instanceof
|
|
5046
|
+
if (super(), this._subContainer = s, !h || !(h instanceof J)) return;
|
|
5045
5047
|
const a = document.createElement("div");
|
|
5046
5048
|
this._subContainer.appendChild(a), this.dispose(() => this._subContainer.removeChild(a)), a.style.width = "100%", a.style.position = "absolute", a.style.height = `${A.defaults.height}px`, a.style.left = "0", a.style.bottom = "0", a.style.color = "#fff", a.style.padding = "0 20px 0 0", a.style.boxSizing = "border-box", a.style.lineHeight = `${A.defaults.height}px`, a.style.zIndex = "100", a.style.alignContent = "center", a.style.justifyContent = "space-between";
|
|
5047
5049
|
const g = document.createElement("span");
|
|
5048
5050
|
a.appendChild(g), this.dispose(() => a.removeChild(g));
|
|
5049
5051
|
const p = document.createElement("span");
|
|
5050
5052
|
g.appendChild(p), this.dispose(() => g.removeChild(p));
|
|
5051
|
-
const
|
|
5052
|
-
g.appendChild(
|
|
5053
|
-
let c =
|
|
5054
|
-
c.startsWith("鼠标位置") && (c = c.slice(5)),
|
|
5055
|
-
}),
|
|
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));
|
|
5056
5058
|
const u = document.createElement("span");
|
|
5057
5059
|
a.appendChild(u), this.dispose(() => a.removeChild(u));
|
|
5058
5060
|
{
|
|
@@ -5091,7 +5093,7 @@ const ce = class ce extends G {
|
|
|
5091
5093
|
x += `鼠标位置:${B[0].toFixed(5)}° ${B[1].toFixed(5)}° ${B[2].toFixed(2)}m`;
|
|
5092
5094
|
} else
|
|
5093
5095
|
x += "暂时无法获取鼠标位置...";
|
|
5094
|
-
|
|
5096
|
+
l.innerText = x;
|
|
5095
5097
|
}
|
|
5096
5098
|
}).catch((R) => {
|
|
5097
5099
|
console.log(R);
|
|
@@ -5119,7 +5121,7 @@ const ue = class ue extends I {
|
|
|
5119
5121
|
}
|
|
5120
5122
|
}
|
|
5121
5123
|
};
|
|
5122
|
-
v(ue, "type", ue.register("ESUeViewer",
|
|
5124
|
+
v(ue, "type", ue.register("ESUeViewer", Gn.type, ue));
|
|
5123
5125
|
let or = ue;
|
|
5124
5126
|
const he = class he extends at {
|
|
5125
5127
|
constructor(t, i) {
|
|
@@ -5179,7 +5181,7 @@ const he = class he extends at {
|
|
|
5179
5181
|
return this._es3DTileset;
|
|
5180
5182
|
}
|
|
5181
5183
|
};
|
|
5182
|
-
v(he, "type", he.register("ESUeViewer",
|
|
5184
|
+
v(he, "type", he.register("ESUeViewer", Kn.type, he));
|
|
5183
5185
|
let ar = he;
|
|
5184
5186
|
const pe = class pe extends at {
|
|
5185
5187
|
constructor(e, t) {
|
|
@@ -5189,8 +5191,8 @@ const pe = class pe extends at {
|
|
|
5189
5191
|
}
|
|
5190
5192
|
}
|
|
5191
5193
|
};
|
|
5192
|
-
v(pe, "type", pe.register("ESUeViewer",
|
|
5193
|
-
let
|
|
5194
|
+
v(pe, "type", pe.register("ESUeViewer", Xn.type, pe));
|
|
5195
|
+
let lr = pe;
|
|
5194
5196
|
const ve = class ve extends $ {
|
|
5195
5197
|
constructor(e, t) {
|
|
5196
5198
|
super(e, t);
|
|
@@ -5218,7 +5220,7 @@ const ve = class ve extends $ {
|
|
|
5218
5220
|
}
|
|
5219
5221
|
};
|
|
5220
5222
|
v(ve, "type", ve.register("ESUeViewer", ye.type, ve));
|
|
5221
|
-
let
|
|
5223
|
+
let dr = ve;
|
|
5222
5224
|
const fe = class fe extends I {
|
|
5223
5225
|
constructor(e, t) {
|
|
5224
5226
|
if (super(e, t), !t.viewer) {
|
|
@@ -5227,7 +5229,7 @@ const fe = class fe extends I {
|
|
|
5227
5229
|
}
|
|
5228
5230
|
}
|
|
5229
5231
|
};
|
|
5230
|
-
v(fe, "type", fe.register("ESUeViewer",
|
|
5232
|
+
v(fe, "type", fe.register("ESUeViewer", Yn.type, fe));
|
|
5231
5233
|
let cr = fe;
|
|
5232
5234
|
const ge = class ge extends D {
|
|
5233
5235
|
constructor(e, t) {
|
|
@@ -5254,12 +5256,12 @@ const ge = class ge extends D {
|
|
|
5254
5256
|
}));
|
|
5255
5257
|
}
|
|
5256
5258
|
};
|
|
5257
|
-
v(ge, "type", ge.register("ESUeViewer",
|
|
5259
|
+
v(ge, "type", ge.register("ESUeViewer", Zn.type, ge));
|
|
5258
5260
|
let ur = ge, We;
|
|
5259
5261
|
try {
|
|
5260
|
-
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}个小时)
|
|
5261
5263
|
%c${r ? r + `
|
|
5262
|
-
` : ""}当前网站正在使用${
|
|
5264
|
+
` : ""}当前网站正在使用${d},此软件版权归${i}所有
|
|
5263
5265
|
`;
|
|
5264
5266
|
We = Object.freeze({
|
|
5265
5267
|
// @ts-ignore
|
|
@@ -5271,7 +5273,7 @@ try {
|
|
|
5271
5273
|
},
|
|
5272
5274
|
// @ts-ignore
|
|
5273
5275
|
get gituri() {
|
|
5274
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
5276
|
+
return GITURI_ && GITURI_.replace("${commitId}", "f6d4ad1b6c90e73a10773f1031f3f517c5694e3a");
|
|
5275
5277
|
},
|
|
5276
5278
|
// @ts-ignore
|
|
5277
5279
|
get info() {
|
|
@@ -5279,7 +5281,7 @@ try {
|
|
|
5279
5281
|
},
|
|
5280
5282
|
// @ts-ignore
|
|
5281
5283
|
get date() {
|
|
5282
|
-
return "2025-
|
|
5284
|
+
return "2025-11-04T01:23:15.000Z";
|
|
5283
5285
|
},
|
|
5284
5286
|
// @ts-ignore
|
|
5285
5287
|
get author() {
|
|
@@ -5287,7 +5289,7 @@ try {
|
|
|
5287
5289
|
},
|
|
5288
5290
|
// @ts-ignore
|
|
5289
5291
|
get version() {
|
|
5290
|
-
return "3.
|
|
5292
|
+
return "3.6.0-beta.1";
|
|
5291
5293
|
},
|
|
5292
5294
|
// @ts-ignore
|
|
5293
5295
|
get name() {
|
|
@@ -5295,10 +5297,10 @@ try {
|
|
|
5295
5297
|
},
|
|
5296
5298
|
// @ts-ignore
|
|
5297
5299
|
get commitId() {
|
|
5298
|
-
return "
|
|
5300
|
+
return "f6d4ad1b6c90e73a10773f1031f3f517c5694e3a";
|
|
5299
5301
|
},
|
|
5300
5302
|
print(a = !1) {
|
|
5301
|
-
!a &&
|
|
5303
|
+
!a && globalThis._xe2_no_copy_print || console.info(
|
|
5302
5304
|
this.info,
|
|
5303
5305
|
`
|
|
5304
5306
|
font-size: 18px;
|
|
@@ -5322,17 +5324,17 @@ try {
|
|
|
5322
5324
|
`
|
|
5323
5325
|
);
|
|
5324
5326
|
}
|
|
5325
|
-
}),
|
|
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();
|
|
5326
5328
|
} catch {
|
|
5327
5329
|
}
|
|
5328
5330
|
export {
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5331
|
+
J as ESUeViewer,
|
|
5332
|
+
Fo as GeoDivFromESImageLabel,
|
|
5333
|
+
Co as GeoDivFromESTextLabel,
|
|
5334
|
+
ss as HighlightFeatureAndFlyToCallFunc,
|
|
5335
|
+
ns as HighlightFeatureCallFunc,
|
|
5336
|
+
as as SetLayerColorCallFunc,
|
|
5337
|
+
os as SetLayerVisibleCallFunc,
|
|
5336
5338
|
Be as UeCloudViewerBase,
|
|
5337
5339
|
Ue as UeES3DTileset,
|
|
5338
5340
|
je as UeESAlarm,
|
|
@@ -5344,8 +5346,8 @@ export {
|
|
|
5344
5346
|
si as UeESCameraVisibleRange,
|
|
5345
5347
|
oi as UeESCar,
|
|
5346
5348
|
ai as UeESClassification,
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
+
li as UeESClippingPlane,
|
|
5350
|
+
di as UeESDataMesh,
|
|
5349
5351
|
ci as UeESDatasmithRuntimeModel,
|
|
5350
5352
|
ui as UeESDirectionMeasurement,
|
|
5351
5353
|
hi as UeESDistanceMeasurement,
|
|
@@ -5356,7 +5358,7 @@ export {
|
|
|
5356
5358
|
wi as UeESForestTileset,
|
|
5357
5359
|
or as UeESGaussianSplatting,
|
|
5358
5360
|
yi as UeESGeoDiv,
|
|
5359
|
-
|
|
5361
|
+
dr as UeESGeoExtrudedPolygon,
|
|
5360
5362
|
mi as UeESGeoJson,
|
|
5361
5363
|
ze as UeESGeoLineString,
|
|
5362
5364
|
$ as UeESGeoPolygon,
|
|
@@ -5376,10 +5378,10 @@ export {
|
|
|
5376
5378
|
Li as UeESLocalPolygonZ,
|
|
5377
5379
|
Pi as UeESLocalRectangle,
|
|
5378
5380
|
ki as UeESLocalSkyBox,
|
|
5379
|
-
|
|
5381
|
+
Tr as UeESLocalVector,
|
|
5380
5382
|
Ke as UeESLocalVector2D,
|
|
5381
5383
|
Di as UeESLocationMeasurement,
|
|
5382
|
-
|
|
5384
|
+
lr as UeESMsTileset,
|
|
5383
5385
|
rr as UeESNavigator,
|
|
5384
5386
|
I as UeESObjectWithLocation,
|
|
5385
5387
|
nr as UeESPath,
|
|
@@ -5392,11 +5394,11 @@ export {
|
|
|
5392
5394
|
Ui as UeESPoiTileset,
|
|
5393
5395
|
Ni as UeESPolygonFence,
|
|
5394
5396
|
zi as UeESPolygonFlattenedPlane,
|
|
5395
|
-
|
|
5397
|
+
bi as UeESPolygonWithHole,
|
|
5396
5398
|
ar as UeESRtsFeatureEditing,
|
|
5397
|
-
|
|
5399
|
+
Hi as UeESRtsTileset,
|
|
5398
5400
|
at as UeESSceneObject,
|
|
5399
|
-
|
|
5401
|
+
Ji as UeESSeparateFoliage,
|
|
5400
5402
|
ur as UeESSkylineAnalysis,
|
|
5401
5403
|
cr as UeESStaticMesh,
|
|
5402
5404
|
Gi as UeESSubmergingAnalysis,
|
|
@@ -5413,64 +5415,64 @@ export {
|
|
|
5413
5415
|
M as UeESVisualObject,
|
|
5414
5416
|
tr as UeESVolumeMeasurement,
|
|
5415
5417
|
er as UeESWidget,
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
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,
|
|
5423
5425
|
We as copyright,
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
+
_s as createActorByClassCallFunc,
|
|
5427
|
+
Ir as destroyCallFunc,
|
|
5426
5428
|
Re as flyInCallFunc,
|
|
5427
|
-
|
|
5429
|
+
jn as flyInDefaultCameraCallFunc,
|
|
5428
5430
|
we as flyToCallFunc,
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
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,
|
|
5445
5447
|
Js as highlightActorByTagCallFunc,
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
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,
|
|
5455
5457
|
Hs as saveStringToFileCallFunc,
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5458
|
+
Gs as sendCustomMessageCallFunc,
|
|
5459
|
+
us as setGlobalPropertyCallFunc,
|
|
5460
|
+
ls as setNodePositionCallFunc,
|
|
5459
5461
|
ds as setNodeRotationCallFunc,
|
|
5460
|
-
|
|
5462
|
+
cs as setNodeScaleCallFunc,
|
|
5461
5463
|
De as smoothMoveCallFunc,
|
|
5462
5464
|
Pe as smoothMoveOnGroundCallFunc,
|
|
5463
5465
|
Le as smoothMoveWithRotationCallFunc,
|
|
5464
5466
|
ke as smoothMoveWithRotationOnGroundCallFunc,
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
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
|
|
5476
5478
|
};
|