earthsdk3-ue 3.4.0-beta.8 → 3.4.0
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.iife.js +13 -13
- package/dist/earthsdk3-ue.js +683 -672
- package/dist/earthsdk3-ue.umd.cjs +3 -3
- package/dist/types/UeObjects/base/UeESSceneObject/index.d.ts.map +1 -1
- package/dist/types/UeObjects/general/UeES3DTileset/index.d.ts.map +1 -1
- package/dist/types/UeObjects/general/UeESImageryLayer/index.d.ts.map +1 -1
- package/dist/types/UeObjects/general/UeESPath/index.d.ts +0 -1
- package/dist/types/UeObjects/general/UeESPath/index.d.ts.map +1 -1
- package/dist/types/UeObjects/general/UeESUnrealActor/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/earthsdk3-ue.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Dr = Object.defineProperty;
|
|
2
2
|
var Br = (l, e, t) => e in l ? Dr(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
|
|
3
3
|
var v = (l, e, t) => Br(l, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { ESViewer as
|
|
5
|
-
import { reactArrayWithUndefined as
|
|
6
|
-
import { Logger as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
...
|
|
4
|
+
import { ESViewer as Ee, ESSceneObject as E, ESJPickedResult as Ae, ViewerCustomInteraction as hr, getGeoBoundingSphereFromPositions as _r, EngineObject as G, ES3DTileset as me, ESImageryLayer as U, ESTerrainLayer as Mr, ESAlarm as $r, ESApertureEffect as Wr, ESGeoPolygon as Ar, ESAreaMeasurement as O, ESBlastParticleSystem as Ur, ESBoxClipping as Nr, ESCameraView as zr, ESCameraVisibleRange as Hr, ESCar as br, ESClassification as lt, ESClippingPlane as Jr, ESDataMesh as H, ESDatasmithRuntimeModel as Gr, ESDirectionMeasurement as Kr, ESDistanceMeasurement as Me, ESLocalPolygon as Xr, ESDynamicWater as Yr, ESEntityCluster as Zr, ESExcavate as qr, ESFireParticleSystem as Qr, ESForestTileset as N, ESGeoDiv as Ce, ESTextLabel as pr, ESCustomDiv as He, ESImageLabel as vr, ESGeoJson as Vr, ESGeoLineString as Or, ESGeoRectangle as jr, ESGeoWater as tn, rpToap as Fe, ESGltfModel as en, ESHeightMeasurement as rn, ESHuman as nn, ESLevelRuntimeModel as sn, ESLocalCircle as on, ESLocalPolygonZ as an, ESLocalRectangle as dn, ESLocalSkyBox as ln, ESLocationMeasurement as cn, ESPipeFence as un, ESPipeline as hn, ESPipeserTileset as pn, ESPit as vn, ESPoi2D as fn, ESPoi3D as gn, ESPoiTileset as wn, ESPolygonFence as yn, ESPolygonFlattenedPlane as mn, ESPolygonWithHole as Cn, ESRtsTileset as Fn, ESSeparateFoliage as In, addTreesCallFunc as En, removeAllTreesCallFunc as Sn, updateTreeParamsCallFunc as Tn, cutDownTreesCallFunc as xn, growthSimulationCallFunc as Rn, ESSubmergingAnalysis as Ln, ESSunshineAnalysis as Pn, ESSurfaceAreaMeasurement as kn, ESUEWidget as Dn, ESUnrealActor as $e, ESVideoFusion as Bn, ESViewShed as _n, ESVisibilityAnalysis as Mn, ESVolumeMeasurement as $n, ESWidget as Wn, ESHumanPoi as An, ESNavigator as j, ESPath as Un, ESViewerStatusBar as A, ESGaussianSplatting as Nn, ESRtsFeatureEditing as zn, ESMsTileset as Hn, ESGeoExtrudedPolygon as ye, ESStaticMesh as bn, ESSkylineAnalysis as Jn } from "earthsdk3";
|
|
5
|
+
import { reactArrayWithUndefined as fr, Destroyable as m, HasOwner as Gn, createGuid as _, Event as S, createAnimateFrame as be, createInterval as Se, react as W, createNextAnimateFrameEvent as P, ObjResettingWithEvent as L, createProcessingFromAsyncFunc as Te, sleep as Kn, extendClassProps as Xn, reactJson as Je, bind as k, track as F, PosFloatDiv as Yn } from "xbsj-base";
|
|
6
|
+
import { Logger as gr, Config as wr, TextParameters as Zn, Flags as ot, NumericParameters as yr, PixelStreaming as mr } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.2";
|
|
7
|
+
import qn from "html2canvas";
|
|
8
|
+
const Qn = {
|
|
9
|
+
...Ee.defaults,
|
|
10
10
|
geoReferenceOrigin: void 0,
|
|
11
11
|
keepWorldOriginNearCamera: !1,
|
|
12
12
|
useCache: !0,
|
|
@@ -19,14 +19,14 @@ const Vn = {
|
|
|
19
19
|
baseUrl: window.location.href ?? "",
|
|
20
20
|
screenPercentage: -1,
|
|
21
21
|
antiAliasingMethod: "default"
|
|
22
|
-
},
|
|
23
|
-
...
|
|
22
|
+
}, Cr = () => ({
|
|
23
|
+
...Ee.createCommonProps(),
|
|
24
24
|
//语音模式
|
|
25
25
|
apiKey: "",
|
|
26
26
|
apiUrl: "",
|
|
27
27
|
secretKey: "",
|
|
28
28
|
speechVoiceMode: "",
|
|
29
|
-
geoReferenceOrigin:
|
|
29
|
+
geoReferenceOrigin: fr(void 0),
|
|
30
30
|
//地理参考原点
|
|
31
31
|
keepWorldOriginNearCamera: void 0,
|
|
32
32
|
//地理参考的保持世界原点开关
|
|
@@ -50,14 +50,14 @@ const Vn = {
|
|
|
50
50
|
antiAliasingMethod: void 0
|
|
51
51
|
//抗锯齿方法
|
|
52
52
|
});
|
|
53
|
-
function
|
|
54
|
-
const l =
|
|
53
|
+
function xe() {
|
|
54
|
+
const l = Cr(), e = [];
|
|
55
55
|
return Object.keys(l).forEach((t) => {
|
|
56
56
|
e.push(t);
|
|
57
57
|
}), e;
|
|
58
58
|
}
|
|
59
59
|
function Ge(l) {
|
|
60
|
-
const { defaults: e } =
|
|
60
|
+
const { defaults: e } = J, t = xe(), i = {};
|
|
61
61
|
return t.forEach((r) => {
|
|
62
62
|
i[r] = l[r] ?? e[r];
|
|
63
63
|
}), i;
|
|
@@ -72,7 +72,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
return s.re;
|
|
75
|
-
},
|
|
75
|
+
}, Fr = async (l, e) => {
|
|
76
76
|
const t = await l.callUeFunc({ f: "destroy", p: { id: e } });
|
|
77
77
|
return t.error && console.error(t.error), t;
|
|
78
78
|
}, dt = (l, e) => {
|
|
@@ -84,7 +84,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
84
84
|
}).catch((t) => {
|
|
85
85
|
console.error("calcFlyToParam:", t);
|
|
86
86
|
});
|
|
87
|
-
},
|
|
87
|
+
}, Vn = (l, e) => {
|
|
88
88
|
l.callUeFunc({
|
|
89
89
|
f: "refreshTileset",
|
|
90
90
|
p: { id: e }
|
|
@@ -93,7 +93,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
93
93
|
}).catch((t) => {
|
|
94
94
|
console.error("refreshTileset:", t);
|
|
95
95
|
});
|
|
96
|
-
},
|
|
96
|
+
}, Re = async (l, e, t, i, r, n = "default") => {
|
|
97
97
|
const s = await l.callUeFunc({
|
|
98
98
|
f: "flyIn",
|
|
99
99
|
p: { id: e, position: t, rotation: i, duration: r, flyMode: n }
|
|
@@ -103,7 +103,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
return s.re;
|
|
106
|
-
},
|
|
106
|
+
}, On = async (l, e) => {
|
|
107
107
|
if (!l) {
|
|
108
108
|
console.warn("DefaultCameraFlyIn: viewer is undefined");
|
|
109
109
|
return;
|
|
@@ -117,7 +117,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
return t;
|
|
120
|
-
},
|
|
120
|
+
}, jn = async (l) => {
|
|
121
121
|
if (!l) {
|
|
122
122
|
console.warn("StartVoice:viewer is undefined");
|
|
123
123
|
return;
|
|
@@ -131,7 +131,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
133
|
return e;
|
|
134
|
-
},
|
|
134
|
+
}, ts = async (l) => {
|
|
135
135
|
if (!l) {
|
|
136
136
|
console.warn("StopVoice:viewer is undefined");
|
|
137
137
|
return;
|
|
@@ -145,7 +145,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
147
|
return e;
|
|
148
|
-
},
|
|
148
|
+
}, es = async (l, e) => {
|
|
149
149
|
if (!l) {
|
|
150
150
|
console.warn("mountPakFiles:viewer is undefined");
|
|
151
151
|
return;
|
|
@@ -159,7 +159,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
return t;
|
|
162
|
-
},
|
|
162
|
+
}, is = async (l) => {
|
|
163
163
|
if (!l) {
|
|
164
164
|
console.warn("generateMemReport:viewer is undefined");
|
|
165
165
|
return;
|
|
@@ -179,7 +179,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
179
179
|
p: { id: e }
|
|
180
180
|
});
|
|
181
181
|
return t.error && console.error("resetWithCurrentCamera:", t.error), t;
|
|
182
|
-
},
|
|
182
|
+
}, Le = (l, e, t, i, r) => {
|
|
183
183
|
l.callUeFunc({
|
|
184
184
|
f: "smoothMoveWithRotation",
|
|
185
185
|
p: {
|
|
@@ -193,7 +193,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
193
193
|
}).catch((n) => {
|
|
194
194
|
console.error("smoothMoveWithRotation:", n);
|
|
195
195
|
});
|
|
196
|
-
},
|
|
196
|
+
}, Pe = (l, e, t, i, r, n) => {
|
|
197
197
|
l.callUeFunc({
|
|
198
198
|
f: "smoothMoveOnGround",
|
|
199
199
|
p: { id: e, Lon: t, Lat: i, Ground: r, Time: n }
|
|
@@ -202,7 +202,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
202
202
|
}).catch((s) => {
|
|
203
203
|
console.error("smoothMoveOnGround:", s);
|
|
204
204
|
});
|
|
205
|
-
},
|
|
205
|
+
}, ke = (l, e, t, i, r, n, s) => {
|
|
206
206
|
l.callUeFunc({
|
|
207
207
|
f: "smoothMoveWithRotationOnGround",
|
|
208
208
|
p: {
|
|
@@ -218,7 +218,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
218
218
|
}).catch((o) => {
|
|
219
219
|
console.error("smoothMoveWithRotationOnGround:", o);
|
|
220
220
|
});
|
|
221
|
-
},
|
|
221
|
+
}, rs = (l, e, t) => {
|
|
222
222
|
l.callUeFunc({
|
|
223
223
|
f: "HighlightFeature",
|
|
224
224
|
p: { id: e, HlId: t }
|
|
@@ -227,7 +227,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
227
227
|
}).catch((i) => {
|
|
228
228
|
console.error("HighlightFeature:", i);
|
|
229
229
|
});
|
|
230
|
-
},
|
|
230
|
+
}, ns = (l, e, t, i) => {
|
|
231
231
|
l.callUeFunc({
|
|
232
232
|
f: "HighlightFeatureAndFlyTo",
|
|
233
233
|
p: { id: e, HlId: t, Duration: i }
|
|
@@ -236,7 +236,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
236
236
|
}).catch((r) => {
|
|
237
237
|
console.error("HighlightFeatureAndFlyTo:", r);
|
|
238
238
|
});
|
|
239
|
-
},
|
|
239
|
+
}, ss = (l, e, t) => {
|
|
240
240
|
l.callUeFunc({
|
|
241
241
|
f: "SetLayerVisible",
|
|
242
242
|
p: { id: e, LayerJson: t }
|
|
@@ -245,7 +245,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
245
245
|
}).catch((i) => {
|
|
246
246
|
console.error("SetLayerVisible:", i);
|
|
247
247
|
});
|
|
248
|
-
},
|
|
248
|
+
}, os = (l, e, t) => {
|
|
249
249
|
l.callUeFunc({
|
|
250
250
|
f: "SetLayerColor",
|
|
251
251
|
p: { id: e, LayerJson: t }
|
|
@@ -254,7 +254,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
254
254
|
}).catch((i) => {
|
|
255
255
|
console.error("SetLayerColor:", i);
|
|
256
256
|
});
|
|
257
|
-
},
|
|
257
|
+
}, De = (l, e, t, i) => {
|
|
258
258
|
l.callUeFunc({
|
|
259
259
|
f: "smoothMove",
|
|
260
260
|
p: {
|
|
@@ -273,7 +273,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
273
273
|
p: { id: e, fn: t, p: i }
|
|
274
274
|
});
|
|
275
275
|
return r.error && (console.error("callFunction:", r.error), console.error(`id: ${e} fn: ${t} param: ${i}`)), r.re ?? void 0;
|
|
276
|
-
},
|
|
276
|
+
}, as = (l, e, t, i) => {
|
|
277
277
|
l.callUeFunc({
|
|
278
278
|
f: "SetNodePosition",
|
|
279
279
|
p: {
|
|
@@ -286,7 +286,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
286
286
|
}).catch((r) => {
|
|
287
287
|
console.error("SetNodePosition:", r);
|
|
288
288
|
});
|
|
289
|
-
},
|
|
289
|
+
}, ds = (l, e, t, i) => {
|
|
290
290
|
l.callUeFunc({
|
|
291
291
|
f: "SetNodeRotation",
|
|
292
292
|
p: {
|
|
@@ -299,7 +299,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
299
299
|
}).catch((r) => {
|
|
300
300
|
console.error("SetNodeRotation:", r);
|
|
301
301
|
});
|
|
302
|
-
},
|
|
302
|
+
}, ls = (l, e, t, i) => {
|
|
303
303
|
l.callUeFunc({
|
|
304
304
|
f: "SetNodeScale",
|
|
305
305
|
p: {
|
|
@@ -312,7 +312,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
312
312
|
}).catch((r) => {
|
|
313
313
|
console.error("SetNodeScale:", r);
|
|
314
314
|
});
|
|
315
|
-
},
|
|
315
|
+
}, b = async (l, e) => {
|
|
316
316
|
if (e.mode == "Follow") {
|
|
317
317
|
const i = E.getSceneObject(e.objectId);
|
|
318
318
|
e.objectId = i ? (i.components.main ?? i).id : e.objectId;
|
|
@@ -329,7 +329,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
return t;
|
|
332
|
-
},
|
|
332
|
+
}, cs = async (l, e) => {
|
|
333
333
|
const t = await l.callUeFunc({
|
|
334
334
|
f: "setGlobalProperty",
|
|
335
335
|
p: e
|
|
@@ -339,7 +339,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
341
|
return t;
|
|
342
|
-
},
|
|
342
|
+
}, us = async (l) => {
|
|
343
343
|
const e = await l.callUeFunc({
|
|
344
344
|
f: "Quit",
|
|
345
345
|
p: void 0
|
|
@@ -349,7 +349,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
349
349
|
return;
|
|
350
350
|
}
|
|
351
351
|
return e;
|
|
352
|
-
},
|
|
352
|
+
}, hs = async (l, e, t, i) => {
|
|
353
353
|
console.log("pickCallFunc", e, t, i);
|
|
354
354
|
const r = await l.callUeFunc({
|
|
355
355
|
f: "pick",
|
|
@@ -360,8 +360,8 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
362
362
|
let n = r.re.id, s, o = n ? E.getSceneObject(n) : void 0;
|
|
363
|
-
return o && o.parentID && (o = E.getSceneObject(o.parentID)), s = new
|
|
364
|
-
},
|
|
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;
|
|
364
|
+
}, ps = async (l, e) => {
|
|
365
365
|
const t = await l.callUeFunc({
|
|
366
366
|
f: "pickPosition",
|
|
367
367
|
p: { screenPosition: e }
|
|
@@ -372,7 +372,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
372
372
|
}
|
|
373
373
|
const { position: i } = t.re;
|
|
374
374
|
return i;
|
|
375
|
-
},
|
|
375
|
+
}, vs = async (l, e, t, i = "ECC_Visibility") => {
|
|
376
376
|
const r = await l.callUeFunc({
|
|
377
377
|
f: "GetHeightByLonLat",
|
|
378
378
|
p: { Lon: e, Lat: t, Channel: i }
|
|
@@ -382,7 +382,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
382
382
|
return;
|
|
383
383
|
}
|
|
384
384
|
return r.re;
|
|
385
|
-
},
|
|
385
|
+
}, fs = async (l, e, t = "ECC_Visibility") => {
|
|
386
386
|
const i = await l.callUeFunc({
|
|
387
387
|
f: "GetHeightsByLonLats",
|
|
388
388
|
p: { LonLats: e, Channel: t }
|
|
@@ -397,7 +397,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
397
397
|
} catch {
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
|
-
},
|
|
400
|
+
}, gs = async (l, e = 64, t = 64) => {
|
|
401
401
|
const i = await l.callUeFunc({
|
|
402
402
|
f: "capture",
|
|
403
403
|
p: { resx: e, resy: t }
|
|
@@ -407,7 +407,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
409
|
return i.re.image;
|
|
410
|
-
},
|
|
410
|
+
}, ws = async (l, e, t = [64, 64]) => {
|
|
411
411
|
const i = await l.callUeFunc({
|
|
412
412
|
f: "partialCapture",
|
|
413
413
|
p: {
|
|
@@ -420,13 +420,13 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
422
422
|
return i.re.image;
|
|
423
|
-
},
|
|
423
|
+
}, ys = async (l, e) => {
|
|
424
424
|
const t = await l.callUeFunc({
|
|
425
425
|
f: "LonLatAltToScreenPosition",
|
|
426
426
|
p: { LonLatAlt: e }
|
|
427
427
|
});
|
|
428
428
|
return t.error && console.warn(t.error), t.re;
|
|
429
|
-
},
|
|
429
|
+
}, ms = async (l, e) => {
|
|
430
430
|
const t = await l.callUeFunc({
|
|
431
431
|
f: "UEPositionToLonLatAlt",
|
|
432
432
|
p: { UEPosition: e }
|
|
@@ -436,7 +436,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
438
|
return [...t.re.LonLatAlt];
|
|
439
|
-
},
|
|
439
|
+
}, Cs = async (l, e) => {
|
|
440
440
|
const t = await l.callUeFunc({
|
|
441
441
|
f: "GetAllSocketNamesByActorTag",
|
|
442
442
|
p: { ActorTag: e }
|
|
@@ -446,7 +446,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
448
|
return [...t.re.socketNames];
|
|
449
|
-
},
|
|
449
|
+
}, Fs = async (l) => {
|
|
450
450
|
const e = await l.callUeFunc({
|
|
451
451
|
f: "GetVersion",
|
|
452
452
|
p: void 0
|
|
@@ -456,7 +456,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
return e.re.version;
|
|
459
|
-
},
|
|
459
|
+
}, Is = async (l, e) => {
|
|
460
460
|
const t = await l.callUeFunc({
|
|
461
461
|
f: "GetBoundSphere",
|
|
462
462
|
p: { id: e }
|
|
@@ -466,7 +466,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
468
|
return t.re;
|
|
469
|
-
},
|
|
469
|
+
}, Es = async (l, e) => {
|
|
470
470
|
const t = await l.callUeFunc({
|
|
471
471
|
f: "GetBoundSphereWithChildren",
|
|
472
472
|
p: { id: e }
|
|
@@ -476,7 +476,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
478
|
return t.re;
|
|
479
|
-
},
|
|
479
|
+
}, Ss = async (l, e) => {
|
|
480
480
|
const t = await l.callUeFunc({
|
|
481
481
|
f: "GetStrokeMaterialParamInfo",
|
|
482
482
|
p: { id: e }
|
|
@@ -486,7 +486,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
return t.re;
|
|
489
|
-
},
|
|
489
|
+
}, Ts = async (l, e) => {
|
|
490
490
|
const t = await l.callUeFunc({
|
|
491
491
|
f: "GetFillMaterialParamInfo",
|
|
492
492
|
p: { id: e }
|
|
@@ -496,7 +496,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
496
496
|
return;
|
|
497
497
|
}
|
|
498
498
|
return t.re;
|
|
499
|
-
},
|
|
499
|
+
}, xs = async (l, e) => {
|
|
500
500
|
const t = await l.callUeFunc({
|
|
501
501
|
f: "getGlobalProperty",
|
|
502
502
|
p: { props: e }
|
|
@@ -506,7 +506,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
506
506
|
return;
|
|
507
507
|
}
|
|
508
508
|
return t.re;
|
|
509
|
-
},
|
|
509
|
+
}, Rs = async (l, e) => {
|
|
510
510
|
const t = await l.callUeFunc({
|
|
511
511
|
f: "GetObjectByInfo",
|
|
512
512
|
p: { info: e }
|
|
@@ -516,62 +516,62 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
518
|
return t.re;
|
|
519
|
-
},
|
|
519
|
+
}, Ls = async (l, e, t) => await l.callUeFunc({
|
|
520
520
|
f: "BindActorByTag",
|
|
521
521
|
p: { ID: e, ActorTag: t }
|
|
522
|
-
}),
|
|
522
|
+
}), Ps = async (l) => await l.callUeFunc({
|
|
523
523
|
f: "RestoreOriginalScene",
|
|
524
524
|
p: void 0
|
|
525
|
-
}),
|
|
525
|
+
}), ks = async (l, e) => await l.callUeFunc({
|
|
526
526
|
f: "UnBindActorByID",
|
|
527
527
|
p: { ID: e }
|
|
528
|
-
}),
|
|
528
|
+
}), Ds = async (l, e) => await l.callUeFunc({
|
|
529
529
|
f: "UnBindActorByTag",
|
|
530
530
|
p: { ActorTag: e }
|
|
531
|
-
}),
|
|
531
|
+
}), Bs = async (l, e, t) => await l.callUeFunc({
|
|
532
532
|
f: "CreateActorByClass",
|
|
533
533
|
p: { ID: e, ActorClass: t }
|
|
534
|
-
}),
|
|
534
|
+
}), _s = async function(l, e, t) {
|
|
535
535
|
return await l.callUeFunc({
|
|
536
536
|
f: "Bind3DTilesetByTag",
|
|
537
537
|
p: { ID: e, ActorTag: t }
|
|
538
538
|
});
|
|
539
|
-
},
|
|
539
|
+
}, Ms = async function(l, e) {
|
|
540
540
|
return await l.callUeFunc({
|
|
541
541
|
f: "UnBind3DTilesetByTag",
|
|
542
542
|
p: { ActorTag: e }
|
|
543
543
|
});
|
|
544
|
-
},
|
|
544
|
+
}, $s = async function(l, e) {
|
|
545
545
|
return await l.callUeFunc({
|
|
546
546
|
f: "UnBind3DTilesetById",
|
|
547
547
|
p: { ID: e }
|
|
548
548
|
});
|
|
549
|
-
},
|
|
549
|
+
}, Ws = async function(l, e, t, i) {
|
|
550
550
|
return await l.callUeFunc({
|
|
551
551
|
f: "BindImageryByTag",
|
|
552
552
|
p: { ID: e, ActorTag: t, ComponentTag: i }
|
|
553
553
|
});
|
|
554
|
-
},
|
|
554
|
+
}, As = async function(l, e, t) {
|
|
555
555
|
return await l.callUeFunc({
|
|
556
556
|
f: "UnBindImageryByTag",
|
|
557
557
|
p: { ActorTag: e, ComponentTag: t }
|
|
558
558
|
});
|
|
559
|
-
},
|
|
559
|
+
}, Us = async function(l, e) {
|
|
560
560
|
return await l.callUeFunc({
|
|
561
561
|
f: "UnBindImageryById",
|
|
562
562
|
p: { ID: e }
|
|
563
563
|
});
|
|
564
|
-
},
|
|
564
|
+
}, Ns = async function(l, e, t, i) {
|
|
565
565
|
return await l.callUeFunc({
|
|
566
566
|
f: "GetIdByComponentNameAndHitItem",
|
|
567
567
|
p: { id: e, ComponentName: t, HitItem: i }
|
|
568
568
|
});
|
|
569
|
-
},
|
|
569
|
+
}, zs = async function(l, e = "ECC_Visibility") {
|
|
570
570
|
return await l.callUeFunc({
|
|
571
571
|
f: "GetCameraRelativeHeight",
|
|
572
572
|
p: { Channel: e }
|
|
573
573
|
});
|
|
574
|
-
},
|
|
574
|
+
}, Hs = async function(l, e, t, i) {
|
|
575
575
|
const r = await l.callUeFunc({
|
|
576
576
|
f: "SaveStringToFile",
|
|
577
577
|
p: {
|
|
@@ -581,7 +581,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
581
581
|
}
|
|
582
582
|
});
|
|
583
583
|
return r.error !== "" && console.warn("SaveStringToFile: ", r.error), r;
|
|
584
|
-
},
|
|
584
|
+
}, bs = async function(l, e, t = !0) {
|
|
585
585
|
const i = await l.callUeFunc({
|
|
586
586
|
f: "HighlightActorByTag",
|
|
587
587
|
p: {
|
|
@@ -590,13 +590,13 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
590
590
|
}
|
|
591
591
|
});
|
|
592
592
|
return i.error !== "" && console.warn("HighlightActorByTag: ", i.error), i;
|
|
593
|
-
},
|
|
593
|
+
}, Js = async function(l, e) {
|
|
594
594
|
const t = await l.callUeFunc({
|
|
595
595
|
f: "SendCustomMessage",
|
|
596
596
|
p: { Message: e }
|
|
597
597
|
});
|
|
598
598
|
return t.error !== "" && console.warn("SendCustomMessage: ", t.error), t;
|
|
599
|
-
},
|
|
599
|
+
}, Gs = async function(l) {
|
|
600
600
|
const e = await l.callUeFunc({
|
|
601
601
|
f: "GetStatus",
|
|
602
602
|
p: void 0
|
|
@@ -606,7 +606,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
606
606
|
return;
|
|
607
607
|
}
|
|
608
608
|
return e.re;
|
|
609
|
-
},
|
|
609
|
+
}, Ks = async (l, e, t, i, r = !0) => {
|
|
610
610
|
const n = await l.callUeFunc({
|
|
611
611
|
f: "startEditing",
|
|
612
612
|
p: {
|
|
@@ -621,7 +621,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
621
621
|
return;
|
|
622
622
|
}
|
|
623
623
|
return n;
|
|
624
|
-
},
|
|
624
|
+
}, Xs = async (l) => {
|
|
625
625
|
const e = await l.callUeFunc({
|
|
626
626
|
f: "stopEditing",
|
|
627
627
|
p: void 0
|
|
@@ -631,7 +631,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
631
631
|
return;
|
|
632
632
|
}
|
|
633
633
|
return e;
|
|
634
|
-
},
|
|
634
|
+
}, Ys = async (l, e, t) => {
|
|
635
635
|
const i = await l.callUeFunc({
|
|
636
636
|
f: "moveObjects",
|
|
637
637
|
p: {
|
|
@@ -644,7 +644,7 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
644
644
|
return;
|
|
645
645
|
}
|
|
646
646
|
return i;
|
|
647
|
-
},
|
|
647
|
+
}, Zs = async (l) => {
|
|
648
648
|
const e = await l.callUeFunc({
|
|
649
649
|
f: "GetTilesetMaterialIDList",
|
|
650
650
|
p: void 0
|
|
@@ -655,11 +655,11 @@ const we = async (l, e, t, i, r, n = "default") => {
|
|
|
655
655
|
}
|
|
656
656
|
return e.re.materialIDList;
|
|
657
657
|
};
|
|
658
|
-
class
|
|
658
|
+
class Be extends m {
|
|
659
659
|
}
|
|
660
|
-
const
|
|
660
|
+
const qs = {
|
|
661
661
|
Response: 1
|
|
662
|
-
},
|
|
662
|
+
}, Ie = {
|
|
663
663
|
/*
|
|
664
664
|
* Input Messages. Range = 50..89.
|
|
665
665
|
*/
|
|
@@ -667,7 +667,7 @@ const Vs = {
|
|
|
667
667
|
UIInteraction: 50,
|
|
668
668
|
MouseWheel: 75
|
|
669
669
|
};
|
|
670
|
-
class
|
|
670
|
+
class Qs extends Gn {
|
|
671
671
|
constructor(t, i) {
|
|
672
672
|
super(t);
|
|
673
673
|
v(this, "_processResponseFn", (t) => this.esUeViewer.processResponse(t));
|
|
@@ -694,11 +694,11 @@ class Os extends Kn {
|
|
|
694
694
|
if (this.isDestroyed())
|
|
695
695
|
return;
|
|
696
696
|
let n = r.target.result, s = new Uint32Array(n), o = 0;
|
|
697
|
-
if (s[0] ===
|
|
697
|
+
if (s[0] === qs.Response) {
|
|
698
698
|
o += 4;
|
|
699
|
-
let
|
|
699
|
+
let h = s[o / 4];
|
|
700
700
|
o += 4;
|
|
701
|
-
for (let a = 0; a <
|
|
701
|
+
for (let a = 0; a < h; a++) {
|
|
702
702
|
let g = s[o / 4];
|
|
703
703
|
o += 4;
|
|
704
704
|
let p = new TextDecoder("utf-8").decode(n.slice(o, o + g));
|
|
@@ -718,7 +718,7 @@ class Os extends Kn {
|
|
|
718
718
|
const i = this.inner;
|
|
719
719
|
if (i.readyState !== WebSocket.OPEN) return;
|
|
720
720
|
const n = new Uint8Array(t)[0];
|
|
721
|
-
if (n >=
|
|
721
|
+
if (n >= Ie.UIInteraction && n <= Ie.MouseWheel) {
|
|
722
722
|
const s = new ArrayBuffer(t.byteLength + 4);
|
|
723
723
|
return new DataView(s).setUint32(0, t.byteLength, !0), new Uint8Array(s, 4).set(new Uint8Array(t)), i.send(new DataView(s)), !0;
|
|
724
724
|
} else
|
|
@@ -741,9 +741,9 @@ class Os extends Kn {
|
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
window.g_emitDescriptor_maxBytes = 3e4;
|
|
744
|
-
let
|
|
745
|
-
|
|
746
|
-
class
|
|
744
|
+
let Vs = -1;
|
|
745
|
+
gr.SetLoggerVerbosity(1);
|
|
746
|
+
class Os extends m {
|
|
747
747
|
constructor(t, i) {
|
|
748
748
|
super();
|
|
749
749
|
v(this, "_eventTarget", new EventTarget());
|
|
@@ -761,9 +761,9 @@ class to extends m {
|
|
|
761
761
|
}), this._handerPixelStreamEvent(), this._esMsgWsWrapper = this._initEsMsgWsWrapper(s);
|
|
762
762
|
const o = this;
|
|
763
763
|
if (o.esMsgWsWrapper) {
|
|
764
|
-
const
|
|
764
|
+
const h = o.webRtcController.sendMessageController.dataChannelSender.sendData;
|
|
765
765
|
o.webRtcController.sendMessageController.dataChannelSender.constructor.prototype.sendData = function(a) {
|
|
766
|
-
o.esMsgWsWrapper ? o.esMsgWsWrapper.sendInputData(a) :
|
|
766
|
+
o.esMsgWsWrapper ? o.esMsgWsWrapper.sendInputData(a) : h.call(this, a);
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
769
|
}
|
|
@@ -780,7 +780,7 @@ class to extends m {
|
|
|
780
780
|
return this.eventTarget.dispatchEvent(t);
|
|
781
781
|
}
|
|
782
782
|
_initPixelStream(t, i) {
|
|
783
|
-
const r = new
|
|
783
|
+
const r = new wr({
|
|
784
784
|
initialSettings: {
|
|
785
785
|
AutoPlayVideo: !0,
|
|
786
786
|
AutoConnect: !0,
|
|
@@ -788,16 +788,16 @@ class to extends m {
|
|
|
788
788
|
StartVideoMuted: !1,
|
|
789
789
|
// WaitForStreamer: true,
|
|
790
790
|
SuppressBrowserKeys: !1,
|
|
791
|
-
[
|
|
791
|
+
[Zn.SignallingServerUrl]: i
|
|
792
792
|
}
|
|
793
793
|
});
|
|
794
|
-
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(yr.MaxReconnectAttempts, 0), new mr(r, { videoElementParent: t });
|
|
795
795
|
}
|
|
796
796
|
get pixelStream() {
|
|
797
797
|
return this._pixelStream;
|
|
798
798
|
}
|
|
799
799
|
_initEsMsgWsWrapper(t) {
|
|
800
|
-
return t ? this.dv(new
|
|
800
|
+
return t ? this.dv(new Qs(this, t)) : void 0;
|
|
801
801
|
}
|
|
802
802
|
get esMsgWsWrapper() {
|
|
803
803
|
return this._esMsgWsWrapper;
|
|
@@ -860,15 +860,15 @@ class to extends m {
|
|
|
860
860
|
// 发送UI interface
|
|
861
861
|
emitUIInteractionForBigData(t, i) {
|
|
862
862
|
typeof i == "function" && (t.callid = _(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
863
|
-
const r = JSON.stringify(t), n = window.g_emitDescriptor_maxBytes, s = r.length, o = ++
|
|
863
|
+
const r = JSON.stringify(t), n = window.g_emitDescriptor_maxBytes, s = r.length, o = ++Vs;
|
|
864
864
|
if (this.esMsgWsWrapper) {
|
|
865
865
|
if (s < n) {
|
|
866
|
-
this.esMsgWsWrapper.emitDescriptorWithString(
|
|
866
|
+
this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-0/1-` + r);
|
|
867
867
|
return;
|
|
868
868
|
}
|
|
869
|
-
const
|
|
870
|
-
[...new Array(
|
|
871
|
-
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(
|
|
869
|
+
const h = Math.ceil(s / n) | 0;
|
|
870
|
+
[...new Array(h).keys()].map((g) => r.slice(g * n, (g + 1) * n)).forEach((g, p) => {
|
|
871
|
+
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-${p}/${h}-` + g);
|
|
872
872
|
});
|
|
873
873
|
}
|
|
874
874
|
}
|
|
@@ -896,12 +896,12 @@ class to extends m {
|
|
|
896
896
|
console.log(`resizeUEVideo emitCommand ${t} ${i} begin`), this.emitCommand(r);
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
class
|
|
899
|
+
class js extends m {
|
|
900
900
|
constructor(t, i, r) {
|
|
901
901
|
super();
|
|
902
902
|
v(this, "_instance");
|
|
903
903
|
v(this, "_event", this.dv(new S()));
|
|
904
|
-
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 Os(this._container, { url: this._wsuri, esmsgWsUri: this._esmsgWsUri })), this.instanceInit();
|
|
905
905
|
}
|
|
906
906
|
get webSocketReady() {
|
|
907
907
|
return this._instance.esWebSocketReady;
|
|
@@ -960,7 +960,7 @@ class eo extends m {
|
|
|
960
960
|
this._instance.resizeUEVideo(t, i);
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
|
-
class
|
|
963
|
+
class to extends Be {
|
|
964
964
|
constructor(t, i, r, n) {
|
|
965
965
|
super();
|
|
966
966
|
v(this, "_esueViewerWrapper");
|
|
@@ -978,35 +978,35 @@ class io extends De {
|
|
|
978
978
|
v(this, "_webRtcConnected", this.dv(W(!1)));
|
|
979
979
|
this._ueViewer = n, console.log("CSTMPSViewer init ! 以官方像素流 + 独立通信的模式启动!");
|
|
980
980
|
const s = this._ueViewer;
|
|
981
|
-
this._esueViewerWrapper = this.dv(new
|
|
981
|
+
this._esueViewerWrapper = this.dv(new js(t, i, r));
|
|
982
982
|
const o = this._esueViewerWrapper;
|
|
983
983
|
{
|
|
984
|
-
const
|
|
985
|
-
|
|
984
|
+
const u = () => o.debug = s.debug ?? !1;
|
|
985
|
+
u(), this.d(s.debugChanged.don(u));
|
|
986
986
|
}
|
|
987
|
-
let
|
|
987
|
+
let h = !1;
|
|
988
988
|
{
|
|
989
|
-
const
|
|
990
|
-
if (
|
|
989
|
+
const u = () => {
|
|
990
|
+
if (h) return;
|
|
991
991
|
const c = o.webSocketReady;
|
|
992
992
|
if (this.videoinited && this.webRtcConnected && c) {
|
|
993
993
|
console.log("%c[EarthSDK: esmsgWebSocket && videoinited && webRtcConnected]", "background: #a6ec99; color: black");
|
|
994
994
|
const f = { eventType: "init", params: {} };
|
|
995
|
-
o.emitUIInteractionForBigData(f), this._readyEvent.emit(),
|
|
995
|
+
o.emitUIInteractionForBigData(f), this._readyEvent.emit(), h = !0;
|
|
996
996
|
}
|
|
997
997
|
};
|
|
998
998
|
this.d(this.videoinitedChanged.don(() => {
|
|
999
|
-
|
|
999
|
+
u();
|
|
1000
1000
|
})), this.d(this.webRtcConnectedChanged.don(() => {
|
|
1001
|
-
|
|
1001
|
+
u();
|
|
1002
1002
|
})), this.d(this.esmsgwsopenChanged.don(() => {
|
|
1003
|
-
|
|
1003
|
+
u();
|
|
1004
1004
|
}));
|
|
1005
1005
|
}
|
|
1006
|
-
this.d(o.event.don((
|
|
1007
|
-
if (
|
|
1006
|
+
this.d(o.event.don((u, c) => {
|
|
1007
|
+
if (u === "error")
|
|
1008
1008
|
this._errorEvent.emit(c);
|
|
1009
|
-
else if (
|
|
1009
|
+
else if (u === "ueevent") {
|
|
1010
1010
|
const f = JSON.parse(c);
|
|
1011
1011
|
if (f.t === "cr") {
|
|
1012
1012
|
const w = f;
|
|
@@ -1014,12 +1014,12 @@ class io extends De {
|
|
|
1014
1014
|
for (let y of w.ers)
|
|
1015
1015
|
this._ueEvent.emit(y);
|
|
1016
1016
|
}
|
|
1017
|
-
} else
|
|
1017
|
+
} else u === "webRtcConnected" ? this.webRtcConnected = !0 : u === "videoinited" ? this.videoinited = !0 : u === "esmsgwsopen" && (this.esmsgwsopen = !0);
|
|
1018
1018
|
}));
|
|
1019
1019
|
{
|
|
1020
|
-
const
|
|
1020
|
+
const u = this.dv(be());
|
|
1021
1021
|
let c, f;
|
|
1022
|
-
|
|
1022
|
+
u.start(() => {
|
|
1023
1023
|
if (c !== t.offsetWidth || f !== t.offsetHeight) {
|
|
1024
1024
|
if (c = t.offsetWidth, f = t.offsetHeight, c === void 0 || f === void 0 || !Number.isFinite(c) || !Number.isFinite(f) || c < 0 || f < 0) {
|
|
1025
1025
|
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${c} ${f}`);
|
|
@@ -1029,19 +1029,19 @@ class io extends De {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
});
|
|
1031
1031
|
}
|
|
1032
|
-
this.d(this._ueFuncResultWithIdsEvent.don((
|
|
1033
|
-
for (const c of
|
|
1032
|
+
this.d(this._ueFuncResultWithIdsEvent.don((u) => {
|
|
1033
|
+
for (const c of u) {
|
|
1034
1034
|
const f = this._waitingUeFuncIdAndResultCallbacks.get(c.fid);
|
|
1035
1035
|
f && (this._waitingUeFuncIdAndResultCallbacks.delete(c.fid), f.resultCallback(c.r));
|
|
1036
1036
|
}
|
|
1037
1037
|
}));
|
|
1038
1038
|
let a = 0;
|
|
1039
|
-
const g = (
|
|
1039
|
+
const g = (u) => {
|
|
1040
1040
|
const c = {
|
|
1041
1041
|
n: a++,
|
|
1042
1042
|
tt: Date.now(),
|
|
1043
1043
|
t: "c",
|
|
1044
|
-
fs:
|
|
1044
|
+
fs: u
|
|
1045
1045
|
};
|
|
1046
1046
|
this._waitingUeCalls.add(c), s.debug && (console.group(
|
|
1047
1047
|
"%cxe2 => ue",
|
|
@@ -1053,13 +1053,13 @@ class io extends De {
|
|
|
1053
1053
|
this._waitingUeCalls.delete(c);
|
|
1054
1054
|
});
|
|
1055
1055
|
}, p = () => {
|
|
1056
|
-
if (!
|
|
1057
|
-
const
|
|
1056
|
+
if (!h || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1057
|
+
const u = this._ueFuncWithIdAndResultCallbacks.map(([c]) => c);
|
|
1058
1058
|
for (const [c, f] of this._ueFuncWithIdAndResultCallbacks)
|
|
1059
1059
|
this._waitingUeFuncIdAndResultCallbacks.set(c.fid, f);
|
|
1060
1060
|
this._ueFuncWithIdAndResultCallbacks.length = 0;
|
|
1061
1061
|
{
|
|
1062
|
-
const c = window.g_emitDescriptor_maxBytes, f =
|
|
1062
|
+
const c = window.g_emitDescriptor_maxBytes, f = u.map((R) => ({ f: R, s: JSON.stringify(R).length }));
|
|
1063
1063
|
let w = f.length, y = 0, x = 0, C = [];
|
|
1064
1064
|
do {
|
|
1065
1065
|
do {
|
|
@@ -1071,7 +1071,7 @@ class io extends De {
|
|
|
1071
1071
|
} while (y < w);
|
|
1072
1072
|
}
|
|
1073
1073
|
};
|
|
1074
|
-
this.dv(
|
|
1074
|
+
this.dv(Se()).start(p, 50), this.d(() => console.log("UeCloudViewer正在销毁..."));
|
|
1075
1075
|
}
|
|
1076
1076
|
get esueViewerWrapper() {
|
|
1077
1077
|
return this._esueViewerWrapper;
|
|
@@ -1143,28 +1143,28 @@ class io extends De {
|
|
|
1143
1143
|
};
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function eo(l) {
|
|
1147
1147
|
let e = "";
|
|
1148
1148
|
const t = new Uint8Array(l), i = t.length;
|
|
1149
1149
|
for (let r = 0; r < i; r++)
|
|
1150
1150
|
e += String.fromCharCode(t[r]);
|
|
1151
1151
|
return btoa(e);
|
|
1152
1152
|
}
|
|
1153
|
-
const
|
|
1153
|
+
const io = (l) => {
|
|
1154
1154
|
const e = {
|
|
1155
1155
|
type: "input",
|
|
1156
|
-
inputdata:
|
|
1156
|
+
inputdata: eo(l)
|
|
1157
1157
|
};
|
|
1158
1158
|
return JSON.stringify(e);
|
|
1159
1159
|
};
|
|
1160
|
-
function
|
|
1160
|
+
function ro(l) {
|
|
1161
1161
|
return typeof l == "string" ? document.getElementById(l) : l;
|
|
1162
1162
|
}
|
|
1163
1163
|
window.g_emitDescriptor_maxBytes = 3e4;
|
|
1164
1164
|
console.log("全局可设置消息体最大字节, window.g_emitDescriptor_maxBytes 默认 30000 。");
|
|
1165
|
-
let
|
|
1166
|
-
|
|
1167
|
-
class
|
|
1165
|
+
let no = -1;
|
|
1166
|
+
gr.SetLoggerVerbosity(1);
|
|
1167
|
+
class so extends m {
|
|
1168
1168
|
constructor(t, i) {
|
|
1169
1169
|
super();
|
|
1170
1170
|
v(this, "debug", !1);
|
|
@@ -1175,7 +1175,7 @@ class ao extends m {
|
|
|
1175
1175
|
//发送时记录消息,回调函数中对应消息后再删除
|
|
1176
1176
|
v(this, "uiInteractionCallbacks", /* @__PURE__ */ new Map());
|
|
1177
1177
|
this._container = t, this._option = i;
|
|
1178
|
-
const r = new
|
|
1178
|
+
const r = new wr({
|
|
1179
1179
|
initialSettings: {
|
|
1180
1180
|
HoveringMouse: !0,
|
|
1181
1181
|
AutoPlayVideo: !0,
|
|
@@ -1187,21 +1187,21 @@ class ao extends m {
|
|
|
1187
1187
|
},
|
|
1188
1188
|
useUrlParams: !0
|
|
1189
1189
|
});
|
|
1190
|
-
r.setFlagEnabled(ot.BrowserSendOffer, !1), r.setFlagEnabled(ot.HoveringMouseMode, !0), r.setFlagEnabled(ot.MatchViewportResolution, !0), r.setNumericSetting(
|
|
1190
|
+
r.setFlagEnabled(ot.BrowserSendOffer, !1), r.setFlagEnabled(ot.HoveringMouseMode, !0), r.setFlagEnabled(ot.MatchViewportResolution, !0), r.setNumericSetting(yr.MaxReconnectAttempts, 0), this._pixelStream = new mr(r, { videoElementParent: this.container }), this.d(() => {
|
|
1191
1191
|
this._pixelStream.disconnect();
|
|
1192
1192
|
});
|
|
1193
1193
|
{
|
|
1194
1194
|
const n = this.pixelStream.webSocketController.webSocket, s = this._pixelStream._webRtcController.sendMessageController.dataChannelSender.sendData;
|
|
1195
1195
|
this._pixelStream._webRtcController.sendMessageController.dataChannelSender.constructor.prototype.sendData = function(o) {
|
|
1196
|
-
n ? n.send(
|
|
1196
|
+
n ? n.send(io(o)) : s.call(this, o);
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
1199
|
{
|
|
1200
1200
|
const n = (s) => {
|
|
1201
1201
|
const o = this._pixelStream._webRtcController.mouseController;
|
|
1202
1202
|
setTimeout(() => {
|
|
1203
|
-
const
|
|
1204
|
-
g && g([s.button,
|
|
1203
|
+
const h = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY), g = o.toStreamerMessagesProvider.toStreamerHandlers.get("MouseUp");
|
|
1204
|
+
g && g([s.button, h.x, h.y]), s.preventDefault();
|
|
1205
1205
|
});
|
|
1206
1206
|
};
|
|
1207
1207
|
this.container.addEventListener("dblclick", n), this.d(() => {
|
|
@@ -1238,7 +1238,7 @@ class ao extends m {
|
|
|
1238
1238
|
return this._ueevent;
|
|
1239
1239
|
}
|
|
1240
1240
|
get container() {
|
|
1241
|
-
return
|
|
1241
|
+
return ro(this._container);
|
|
1242
1242
|
}
|
|
1243
1243
|
get pixelStream() {
|
|
1244
1244
|
return this._pixelStream;
|
|
@@ -1266,7 +1266,7 @@ class ao extends m {
|
|
|
1266
1266
|
//大数据拆分
|
|
1267
1267
|
emitUIInteractionForBigData(t, i) {
|
|
1268
1268
|
typeof i == "function" && (t.callid = _(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
1269
|
-
const r = JSON.stringify(t), n = window.g_emitDescriptor_maxBytes ?? 3e4, s = r.length, o = ++
|
|
1269
|
+
const r = JSON.stringify(t), n = window.g_emitDescriptor_maxBytes ?? 3e4, s = r.length, o = ++no;
|
|
1270
1270
|
if (s < n) {
|
|
1271
1271
|
const g = {
|
|
1272
1272
|
type: "earthsdk",
|
|
@@ -1276,9 +1276,9 @@ class ao extends m {
|
|
|
1276
1276
|
this.sendData(JSON.stringify(g));
|
|
1277
1277
|
return;
|
|
1278
1278
|
}
|
|
1279
|
-
const
|
|
1280
|
-
[...new Array(
|
|
1281
|
-
const d = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${p}/${
|
|
1279
|
+
const h = Math.ceil(s / n) | 0;
|
|
1280
|
+
[...new Array(h).keys()].map((g) => r.slice(g * n, (g + 1) * n)).forEach((g, p) => {
|
|
1281
|
+
const d = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${p}/${h}-` + g };
|
|
1282
1282
|
this.sendData(JSON.stringify(d));
|
|
1283
1283
|
});
|
|
1284
1284
|
}
|
|
@@ -1319,12 +1319,12 @@ class ao extends m {
|
|
|
1319
1319
|
console.log(`resizeUEVideo emitCommand ${t} ${i} begin`), this.emitCommand(r);
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
|
-
class
|
|
1322
|
+
class oo extends m {
|
|
1323
1323
|
constructor(t, i, r) {
|
|
1324
1324
|
super();
|
|
1325
1325
|
v(this, "_instance");
|
|
1326
1326
|
v(this, "_event", this.dv(new S()));
|
|
1327
|
-
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new
|
|
1327
|
+
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new so(this._container, { ws: this._wsuri })), this.d(this._instance.connected.don((n) => {
|
|
1328
1328
|
this._event.emit(n, n), console.log(`%c[EarthSDK] ${n}`, "background: #a6ec99; color: black");
|
|
1329
1329
|
})), this.d(this._instance.error.don((n) => {
|
|
1330
1330
|
this._event.emit("errorEvent", n), console.log(`%c[EarthSDK] ${n}`, "background: red; color: black");
|
|
@@ -1363,7 +1363,7 @@ class lo extends m {
|
|
|
1363
1363
|
this._instance.resizeUEVideo(t, i);
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
class
|
|
1366
|
+
class ao extends Be {
|
|
1367
1367
|
constructor(t, i, r, n) {
|
|
1368
1368
|
super();
|
|
1369
1369
|
v(this, "_videoInitialized", this.dv(W(!1)));
|
|
@@ -1378,7 +1378,7 @@ class co extends De {
|
|
|
1378
1378
|
v(this, "_errorEvent", this.dv(new S()));
|
|
1379
1379
|
v(this, "_readyEvent", this.dv(new S()));
|
|
1380
1380
|
this._ueViewer = n, console.log("INNPSViewer init ! 以内置信令服务器模式启动!");
|
|
1381
|
-
const s = this._ueViewer, o = this.dv(new
|
|
1381
|
+
const s = this._ueViewer, o = this.dv(new oo(t, i, r));
|
|
1382
1382
|
this._ue5ViewerWrapper = o;
|
|
1383
1383
|
{
|
|
1384
1384
|
const d = () => o.debug = s.debug ?? !1;
|
|
@@ -1386,12 +1386,12 @@ class co extends De {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
{
|
|
1388
1388
|
let d = !1;
|
|
1389
|
-
const
|
|
1389
|
+
const u = this.dv(P(
|
|
1390
1390
|
this._videoInitialized.changed,
|
|
1391
1391
|
this._webRtcConnected.changed,
|
|
1392
1392
|
this._webSocketOpen.changed
|
|
1393
1393
|
));
|
|
1394
|
-
this.d(
|
|
1394
|
+
this.d(u.don(() => {
|
|
1395
1395
|
if (d) return;
|
|
1396
1396
|
const c = this._ue5ViewerWrapper.instance.webSocketReady;
|
|
1397
1397
|
if (this.videoInitialized && this.webRtcConnected && c) {
|
|
@@ -1402,9 +1402,9 @@ class co extends De {
|
|
|
1402
1402
|
console.warn("webSocketReady", c), d = !1;
|
|
1403
1403
|
}));
|
|
1404
1404
|
}
|
|
1405
|
-
this.d(o.event.don((d,
|
|
1405
|
+
this.d(o.event.don((d, u) => {
|
|
1406
1406
|
if (d === "errorEvent")
|
|
1407
|
-
this._errorEvent.emit(
|
|
1407
|
+
this._errorEvent.emit(u);
|
|
1408
1408
|
else if (d === "videoInitialized")
|
|
1409
1409
|
this._videoInitialized.value = !0;
|
|
1410
1410
|
else if (d === "webRtcConnected")
|
|
@@ -1412,7 +1412,7 @@ class co extends De {
|
|
|
1412
1412
|
else if (d === "webSocketOpen")
|
|
1413
1413
|
this._webSocketOpen.value = !0;
|
|
1414
1414
|
else if (d === "ueevent") {
|
|
1415
|
-
const c = JSON.parse(
|
|
1415
|
+
const c = JSON.parse(u);
|
|
1416
1416
|
if (c.t === "cr") {
|
|
1417
1417
|
const f = c;
|
|
1418
1418
|
if (f.frs && this._ueFuncResultWithIdsEvent.emit(f.frs), f.ers)
|
|
@@ -1423,48 +1423,48 @@ class co extends De {
|
|
|
1423
1423
|
}));
|
|
1424
1424
|
{
|
|
1425
1425
|
const d = this.dv(be());
|
|
1426
|
-
let
|
|
1426
|
+
let u, c, f;
|
|
1427
1427
|
d.start(() => {
|
|
1428
|
-
if (
|
|
1429
|
-
if (
|
|
1430
|
-
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${
|
|
1428
|
+
if (u !== t.offsetWidth || c !== t.offsetHeight || f !== s.resolutionScale) {
|
|
1429
|
+
if (u = t.offsetWidth, c = t.offsetHeight, u === void 0 || c === void 0 || !Number.isFinite(u) || !Number.isFinite(c) || u < 0 || c < 0) {
|
|
1430
|
+
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${u} ${c}`);
|
|
1431
1431
|
return;
|
|
1432
1432
|
}
|
|
1433
|
-
f = s.resolutionScale, o.resize(
|
|
1433
|
+
f = s.resolutionScale, o.resize(u / f, c / f);
|
|
1434
1434
|
}
|
|
1435
1435
|
});
|
|
1436
1436
|
}
|
|
1437
1437
|
this.d(this._ueFuncResultWithIdsEvent.don((d) => {
|
|
1438
|
-
for (const
|
|
1439
|
-
const c = this._waitingUeFuncIdAndResultCallbacks.get(
|
|
1440
|
-
c && (this._waitingUeFuncIdAndResultCallbacks.delete(
|
|
1438
|
+
for (const u of d) {
|
|
1439
|
+
const c = this._waitingUeFuncIdAndResultCallbacks.get(u.fid);
|
|
1440
|
+
c && (this._waitingUeFuncIdAndResultCallbacks.delete(u.fid), c.resultCallback(u.r));
|
|
1441
1441
|
}
|
|
1442
1442
|
}));
|
|
1443
|
-
let
|
|
1443
|
+
let h = 0;
|
|
1444
1444
|
const a = (d) => {
|
|
1445
|
-
const
|
|
1446
|
-
n:
|
|
1445
|
+
const u = {
|
|
1446
|
+
n: h++,
|
|
1447
1447
|
tt: Date.now(),
|
|
1448
1448
|
t: "c",
|
|
1449
1449
|
fs: d
|
|
1450
1450
|
};
|
|
1451
|
-
this._waitingUeCalls.add(
|
|
1451
|
+
this._waitingUeCalls.add(u), s.debug && (console.group(
|
|
1452
1452
|
"%cxe2 => ue",
|
|
1453
1453
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
1454
1454
|
), console.log(
|
|
1455
|
-
`%c${JSON.stringify(
|
|
1455
|
+
`%c${JSON.stringify(u, void 0, "")}`,
|
|
1456
1456
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1457
|
-
), console.groupEnd()), this._ue5ViewerWrapper.emitUIInteractionForBigData(
|
|
1458
|
-
this._waitingUeCalls.delete(
|
|
1457
|
+
), console.groupEnd()), this._ue5ViewerWrapper.emitUIInteractionForBigData(u, () => {
|
|
1458
|
+
this._waitingUeCalls.delete(u);
|
|
1459
1459
|
});
|
|
1460
1460
|
}, g = () => {
|
|
1461
1461
|
if (!this._ue5ViewerWrapper.instance.webSocketReady || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1462
|
-
const
|
|
1462
|
+
const u = this._ueFuncWithIdAndResultCallbacks.map(([c]) => c);
|
|
1463
1463
|
for (const [c, f] of this._ueFuncWithIdAndResultCallbacks)
|
|
1464
1464
|
this._waitingUeFuncIdAndResultCallbacks.set(c.fid, f);
|
|
1465
1465
|
this._ueFuncWithIdAndResultCallbacks.length = 0;
|
|
1466
1466
|
{
|
|
1467
|
-
const c = window.g_emitDescriptor_maxBytes, f =
|
|
1467
|
+
const c = window.g_emitDescriptor_maxBytes, f = u.map((R) => ({ f: R, s: JSON.stringify(R).length }));
|
|
1468
1468
|
let w = f.length, y = 0, x = 0, C = [];
|
|
1469
1469
|
do {
|
|
1470
1470
|
do {
|
|
@@ -1476,7 +1476,7 @@ class co extends De {
|
|
|
1476
1476
|
} while (y < w);
|
|
1477
1477
|
}
|
|
1478
1478
|
};
|
|
1479
|
-
this.dv(
|
|
1479
|
+
this.dv(Se()).start(g, 50), this.d(() => console.log("UeCloudViewer正在销毁..."));
|
|
1480
1480
|
}
|
|
1481
1481
|
get videoInitialized() {
|
|
1482
1482
|
return this._videoInitialized.value;
|
|
@@ -1529,7 +1529,7 @@ class co extends De {
|
|
|
1529
1529
|
};
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
|
-
class
|
|
1532
|
+
class lo extends m {
|
|
1533
1533
|
/**
|
|
1534
1534
|
* Creates an instance of DLViewer.
|
|
1535
1535
|
* @param {HTMLDivElement} container
|
|
@@ -1549,8 +1549,8 @@ class uo extends m {
|
|
|
1549
1549
|
this._vIframe = o, o.style.cssText = "width: 100%; height: 100%; margin: 0; padding: 0; border: none; outline: none;", t.appendChild(o), this.d(() => {
|
|
1550
1550
|
o && t.removeChild(o);
|
|
1551
1551
|
});
|
|
1552
|
-
const
|
|
1553
|
-
o.src =
|
|
1552
|
+
const h = E.getStrFromEnv(r + `/web/${i}.html`);
|
|
1553
|
+
o.src = h, o.onload = () => {
|
|
1554
1554
|
const a = o.contentWindow;
|
|
1555
1555
|
if (!a) {
|
|
1556
1556
|
console.error("iframeWindow is null");
|
|
@@ -1569,7 +1569,7 @@ class uo extends m {
|
|
|
1569
1569
|
return this._vIframe;
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
|
-
const Ze = typeof TextDecoder < "u" ? new TextDecoder() : void 0,
|
|
1572
|
+
const Ze = typeof TextDecoder < "u" ? new TextDecoder() : void 0, co = (l, e = 0, t = NaN) => {
|
|
1573
1573
|
const i = e + t;
|
|
1574
1574
|
let r = e;
|
|
1575
1575
|
for (; l[r] && !(r >= i); ) ++r;
|
|
@@ -1587,8 +1587,8 @@ const Ze = typeof TextDecoder < "u" ? new TextDecoder() : void 0, ho = (l, e = 0
|
|
|
1587
1587
|
n += String.fromCharCode((s & 31) << 6 | o);
|
|
1588
1588
|
continue;
|
|
1589
1589
|
}
|
|
1590
|
-
var
|
|
1591
|
-
if ((s & 240) == 224 ? s = (s & 15) << 12 | o << 6 |
|
|
1590
|
+
var h = l[e++] & 63;
|
|
1591
|
+
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 | l[e++] & 63), s < 65536)
|
|
1592
1592
|
n += String.fromCharCode(s);
|
|
1593
1593
|
else {
|
|
1594
1594
|
var a = s - 65536;
|
|
@@ -1597,18 +1597,18 @@ const Ze = typeof TextDecoder < "u" ? new TextDecoder() : void 0, ho = (l, e = 0
|
|
|
1597
1597
|
}
|
|
1598
1598
|
return n;
|
|
1599
1599
|
};
|
|
1600
|
-
class
|
|
1600
|
+
class uo extends m {
|
|
1601
1601
|
constructor(e, t, i) {
|
|
1602
1602
|
super();
|
|
1603
1603
|
{
|
|
1604
1604
|
const r = () => {
|
|
1605
|
-
const
|
|
1606
|
-
t.setGlobalProperty(
|
|
1605
|
+
const h = Ge(t);
|
|
1606
|
+
t.setGlobalProperty(h);
|
|
1607
1607
|
};
|
|
1608
1608
|
r();
|
|
1609
|
-
const n =
|
|
1610
|
-
n.forEach((
|
|
1611
|
-
const a = t[
|
|
1609
|
+
const n = xe(), s = [];
|
|
1610
|
+
n.forEach((h) => {
|
|
1611
|
+
const a = t[h + "Changed"];
|
|
1612
1612
|
s.push(a);
|
|
1613
1613
|
});
|
|
1614
1614
|
const o = this.dv(P(...s));
|
|
@@ -1665,8 +1665,8 @@ class po extends m {
|
|
|
1665
1665
|
const n = new m();
|
|
1666
1666
|
return n.d(i.disposableOnUeEvent("editingEvent", (s) => {
|
|
1667
1667
|
s.objectIDs = s.objectIDs.map((o) => {
|
|
1668
|
-
var
|
|
1669
|
-
return ((
|
|
1668
|
+
var h;
|
|
1669
|
+
return ((h = E.getSceneObjById(o)) == null ? void 0 : h.parentID) ?? o;
|
|
1670
1670
|
}), t.editingEvent.emit(s);
|
|
1671
1671
|
})), n;
|
|
1672
1672
|
})), this.ad(i.disposableOnUeEvent("cameraChanged", () => {
|
|
@@ -1674,8 +1674,8 @@ class po extends m {
|
|
|
1674
1674
|
}));
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
|
-
let
|
|
1678
|
-
class
|
|
1677
|
+
let ho = -1;
|
|
1678
|
+
class po extends Be {
|
|
1679
1679
|
/**
|
|
1680
1680
|
* Creates an instance of H5Viewer.
|
|
1681
1681
|
* @param {HTMLDivElement} container
|
|
@@ -1693,21 +1693,21 @@ class fo extends De {
|
|
|
1693
1693
|
v(this, "_waitingUeCalls", /* @__PURE__ */ new Map());
|
|
1694
1694
|
v(this, "_ueEvent", this.dv(new S()));
|
|
1695
1695
|
this._ueViewer = n;
|
|
1696
|
-
const s = this._ueViewer, o = this.dv(new
|
|
1697
|
-
let
|
|
1696
|
+
const s = this._ueViewer, o = this.dv(new lo(t, i, r, s));
|
|
1697
|
+
let h = !1, a = null;
|
|
1698
1698
|
this.d(o.onRuntimeInitialized.don(() => {
|
|
1699
|
-
var
|
|
1700
|
-
if (
|
|
1699
|
+
var u;
|
|
1700
|
+
if (h = !0, (u = o == null ? void 0 : o.vIframe) != null && u.contentWindow) {
|
|
1701
1701
|
a = o.vIframe.contentWindow;
|
|
1702
1702
|
const c = o.vIframe.contentWindow.document.getElementById("mainarea");
|
|
1703
|
-
c ? this.dv(new
|
|
1703
|
+
c ? this.dv(new uo(c, s, this)) : console.error("h5Container is null");
|
|
1704
1704
|
} else {
|
|
1705
1705
|
console.error("iframeWindow is null");
|
|
1706
1706
|
return;
|
|
1707
1707
|
}
|
|
1708
1708
|
a.UE_JSHTML5Communication ? a.UE_JSHTML5Communication.UESendMessageToJS = (c) => {
|
|
1709
1709
|
try {
|
|
1710
|
-
const f =
|
|
1710
|
+
const f = co(a.HEAPU8, c), w = JSON.parse(f);
|
|
1711
1711
|
if (s.debug && (console.group(
|
|
1712
1712
|
"%cUE => JS",
|
|
1713
1713
|
" background-color:#006EFF;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
@@ -1725,16 +1725,16 @@ class fo extends De {
|
|
|
1725
1725
|
console.error("UE_JSHTML5Communication.UESendMessageToJS error:", f);
|
|
1726
1726
|
}
|
|
1727
1727
|
} : console.error("UE_JSHTML5Communication UESendMessageToJS not found");
|
|
1728
|
-
})), this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((
|
|
1729
|
-
for (const c of
|
|
1728
|
+
})), this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((u) => {
|
|
1729
|
+
for (const c of u) {
|
|
1730
1730
|
const f = this._waitingUeFuncIdAndResultCallbacks.get(c.fid);
|
|
1731
1731
|
f && (this._waitingUeFuncIdAndResultCallbacks.delete(c.fid), f(c.r));
|
|
1732
1732
|
}
|
|
1733
1733
|
}));
|
|
1734
1734
|
let g = 0;
|
|
1735
1735
|
const p = () => {
|
|
1736
|
-
if (!
|
|
1737
|
-
const
|
|
1736
|
+
if (!h || !a || !a.UE_JSHTML5Communication || !a.UE_JSHTML5Communication.JSSendMessageToUE || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1737
|
+
const u = this._ueFuncWithIdAndResultCallbacks.map(([T]) => T), c = { n: g++, tt: Date.now(), t: "c", fs: u, callid: _() };
|
|
1738
1738
|
for (const [T, B] of this._ueFuncWithIdAndResultCallbacks)
|
|
1739
1739
|
this._waitingUeFuncIdAndResultCallbacks.set(T.fid, B);
|
|
1740
1740
|
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.set(c.callid, c), s.debug && (console.group(
|
|
@@ -1744,7 +1744,7 @@ class fo extends De {
|
|
|
1744
1744
|
`%c${JSON.stringify(c, void 0, "")}`,
|
|
1745
1745
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1746
1746
|
), console.groupEnd());
|
|
1747
|
-
const f = JSON.stringify(c), w = window.g_emitDescriptor_maxBytes ?? 3e4, y = f.length, x = ++
|
|
1747
|
+
const f = JSON.stringify(c), w = window.g_emitDescriptor_maxBytes ?? 3e4, y = f.length, x = ++ho;
|
|
1748
1748
|
if (y < w) {
|
|
1749
1749
|
const T = `${x}-0/1-` + f;
|
|
1750
1750
|
a.UE_JSHTML5Communication.JSSendMessageToUE(T);
|
|
@@ -1752,11 +1752,11 @@ class fo extends De {
|
|
|
1752
1752
|
}
|
|
1753
1753
|
const C = Math.ceil(y / w) | 0;
|
|
1754
1754
|
[...new Array(C).keys()].map((T) => f.slice(T * w, (T + 1) * w)).forEach((T, B) => {
|
|
1755
|
-
const
|
|
1756
|
-
a.UE_JSHTML5Communication.JSSendMessageToUE(
|
|
1755
|
+
const _e = `${x}-${B}/${C}-` + T;
|
|
1756
|
+
a.UE_JSHTML5Communication.JSSendMessageToUE(_e);
|
|
1757
1757
|
});
|
|
1758
1758
|
};
|
|
1759
|
-
this.dv(
|
|
1759
|
+
this.dv(Se()).start(p, 50);
|
|
1760
1760
|
}
|
|
1761
1761
|
processResponse(t) {
|
|
1762
1762
|
if (this._ueViewer.debug ?? !1)
|
|
@@ -1803,8 +1803,8 @@ class fo extends De {
|
|
|
1803
1803
|
};
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
|
-
let
|
|
1807
|
-
class
|
|
1806
|
+
let vo = -1;
|
|
1807
|
+
class fo extends Be {
|
|
1808
1808
|
constructor(t, i) {
|
|
1809
1809
|
super();
|
|
1810
1810
|
v(this, "_ueFuncResultWithIdsEvent", this.dv(new S()));
|
|
@@ -1824,9 +1824,9 @@ class wo extends De {
|
|
|
1824
1824
|
try {
|
|
1825
1825
|
const d = JSON.parse(p);
|
|
1826
1826
|
if (d.t === "cr") {
|
|
1827
|
-
const
|
|
1828
|
-
if (
|
|
1829
|
-
for (let c of
|
|
1827
|
+
const u = d;
|
|
1828
|
+
if (u.frs && this._ueFuncResultWithIdsEvent.emit(u.frs), u.ers)
|
|
1829
|
+
for (let c of u.ers)
|
|
1830
1830
|
this._ueEvent.emit(c);
|
|
1831
1831
|
}
|
|
1832
1832
|
} catch (d) {
|
|
@@ -1839,16 +1839,16 @@ class wo extends De {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
}));
|
|
1841
1841
|
let o = 0;
|
|
1842
|
-
const
|
|
1842
|
+
const h = () => {
|
|
1843
1843
|
if (!n || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1844
|
-
const g = this._ueFuncWithIdAndResultCallbacks.map(([
|
|
1844
|
+
const g = this._ueFuncWithIdAndResultCallbacks.map(([u]) => u), p = {
|
|
1845
1845
|
n: o++,
|
|
1846
1846
|
tt: Date.now(),
|
|
1847
1847
|
t: "c",
|
|
1848
1848
|
fs: g
|
|
1849
1849
|
};
|
|
1850
|
-
for (const [
|
|
1851
|
-
this._waitingUeFuncIdAndResultCallbacks.set(
|
|
1850
|
+
for (const [u, c] of this._ueFuncWithIdAndResultCallbacks)
|
|
1851
|
+
this._waitingUeFuncIdAndResultCallbacks.set(u.fid, c);
|
|
1852
1852
|
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.add(p), r.debug && (console.group(
|
|
1853
1853
|
"%cxe2 => ue",
|
|
1854
1854
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
@@ -1856,12 +1856,12 @@ class wo extends De {
|
|
|
1856
1856
|
`%c${JSON.stringify(p, void 0, "")}`,
|
|
1857
1857
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1858
1858
|
), console.groupEnd());
|
|
1859
|
-
const d = ++
|
|
1859
|
+
const d = ++vo;
|
|
1860
1860
|
window.ue.es.oncommand(`${d}-0/1-` + JSON.stringify(p)).then(() => {
|
|
1861
1861
|
this._waitingUeCalls.delete(p);
|
|
1862
1862
|
});
|
|
1863
1863
|
};
|
|
1864
|
-
this.dv(
|
|
1864
|
+
this.dv(Se()).start(h, 50);
|
|
1865
1865
|
}
|
|
1866
1866
|
callUeFunc(t) {
|
|
1867
1867
|
return new Promise((i) => {
|
|
@@ -1893,7 +1893,7 @@ class wo extends De {
|
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
1895
1895
|
}
|
|
1896
|
-
class
|
|
1896
|
+
class go extends m {
|
|
1897
1897
|
constructor(e, t) {
|
|
1898
1898
|
super();
|
|
1899
1899
|
{
|
|
@@ -1902,10 +1902,10 @@ class yo extends m {
|
|
|
1902
1902
|
e.setGlobalProperty(o);
|
|
1903
1903
|
};
|
|
1904
1904
|
i();
|
|
1905
|
-
const r =
|
|
1905
|
+
const r = xe(), n = [];
|
|
1906
1906
|
r.forEach((o) => {
|
|
1907
|
-
const
|
|
1908
|
-
n.push(
|
|
1907
|
+
const h = e[o + "Changed"];
|
|
1908
|
+
n.push(h);
|
|
1909
1909
|
});
|
|
1910
1910
|
const s = this.dv(P(...n));
|
|
1911
1911
|
this.d(s.don(i));
|
|
@@ -1970,7 +1970,7 @@ class yo extends m {
|
|
|
1970
1970
|
}));
|
|
1971
1971
|
}
|
|
1972
1972
|
}
|
|
1973
|
-
class
|
|
1973
|
+
class wo extends m {
|
|
1974
1974
|
constructor(e, t, i) {
|
|
1975
1975
|
super();
|
|
1976
1976
|
{
|
|
@@ -1979,13 +1979,13 @@ class mo extends m {
|
|
|
1979
1979
|
t.setGlobalProperty(a);
|
|
1980
1980
|
};
|
|
1981
1981
|
n();
|
|
1982
|
-
const s =
|
|
1982
|
+
const s = xe(), o = [];
|
|
1983
1983
|
s.forEach((a) => {
|
|
1984
1984
|
const g = t[a + "Changed"];
|
|
1985
1985
|
o.push(g);
|
|
1986
1986
|
});
|
|
1987
|
-
const
|
|
1988
|
-
this.d(
|
|
1987
|
+
const h = this.dv(P(...o));
|
|
1988
|
+
this.d(h.don(n));
|
|
1989
1989
|
}
|
|
1990
1990
|
this.d(t.propChanged.don((n) => {
|
|
1991
1991
|
if (n.objId === "")
|
|
@@ -2009,18 +2009,18 @@ class mo extends m {
|
|
|
2009
2009
|
n(a, !1);
|
|
2010
2010
|
}, o = (a) => {
|
|
2011
2011
|
n(a, !0);
|
|
2012
|
-
},
|
|
2012
|
+
}, h = (a) => {
|
|
2013
2013
|
n(a, !1);
|
|
2014
2014
|
};
|
|
2015
|
-
r.addEventListener("mouseenter", s), r.addEventListener("mouseleave", o), r.addEventListener("mousemove",
|
|
2016
|
-
r.removeEventListener("mouseenter", s), r.removeEventListener("mouseleave", o), r.removeEventListener("mousemove",
|
|
2015
|
+
r.addEventListener("mouseenter", s), r.addEventListener("mouseleave", o), r.addEventListener("mousemove", h), this.d(() => {
|
|
2016
|
+
r.removeEventListener("mouseenter", s), r.removeEventListener("mouseleave", o), r.removeEventListener("mousemove", h);
|
|
2017
2017
|
});
|
|
2018
2018
|
}
|
|
2019
2019
|
t.useCustomInteraction = !1, this.dv(new hr(t, r)), this.dv(new L(t.statusUpdateIntervalChanged, (n) => {
|
|
2020
2020
|
if ((t.statusUpdateInterval ?? 0.5) === 0) return;
|
|
2021
2021
|
const o = new m();
|
|
2022
|
-
return o.d(i.disposableOnUeEvent("statusUpdate", (
|
|
2023
|
-
t.statusUpdateEvent.emit(
|
|
2022
|
+
return o.d(i.disposableOnUeEvent("statusUpdate", (h) => {
|
|
2023
|
+
t.statusUpdateEvent.emit(h);
|
|
2024
2024
|
})), o;
|
|
2025
2025
|
})), this.dv(new L(t.propChangedListeningChanged, () => {
|
|
2026
2026
|
if (!(t.propChangedListening ?? !0)) return;
|
|
@@ -2056,9 +2056,9 @@ class mo extends m {
|
|
|
2056
2056
|
if (!(t.editingEventListening ?? !0)) return;
|
|
2057
2057
|
const s = new m();
|
|
2058
2058
|
return s.d(i.disposableOnUeEvent("editingEvent", (o) => {
|
|
2059
|
-
o.objectIDs = o.objectIDs.map((
|
|
2059
|
+
o.objectIDs = o.objectIDs.map((h) => {
|
|
2060
2060
|
var a;
|
|
2061
|
-
return ((a = E.getSceneObjById(
|
|
2061
|
+
return ((a = E.getSceneObjById(h)) == null ? void 0 : a.parentID) ?? h;
|
|
2062
2062
|
}), t.editingEvent.emit(o);
|
|
2063
2063
|
})), s;
|
|
2064
2064
|
})), this.ad(i.disposableOnUeEvent("cameraChanged", () => {
|
|
@@ -2066,7 +2066,7 @@ class mo extends m {
|
|
|
2066
2066
|
}));
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
|
-
class
|
|
2069
|
+
class yo extends m {
|
|
2070
2070
|
constructor(t, i, r) {
|
|
2071
2071
|
super();
|
|
2072
2072
|
v(this, "_reconnectEvent", this.dv(new S()));
|
|
@@ -2078,8 +2078,8 @@ class Co extends m {
|
|
|
2078
2078
|
const a = new URLSearchParams(window.location.search).get("eswebview") === "true", g = () => {
|
|
2079
2079
|
if (window.ue.esinput) {
|
|
2080
2080
|
r.setStatus("Creating"), console.log("存在(window.ue && window.ue.es && window.ue.esinput 需要适配新版ESWebView 鼠标穿透), 开始创建UeFalseCloudViewer..."), r.setStatusLog("开始创建本地视口...");
|
|
2081
|
-
const p = this.dv(new
|
|
2082
|
-
this.d(() => r.viewer = void 0), r.viewer = p, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new
|
|
2081
|
+
const p = this.dv(new fo(t, r));
|
|
2082
|
+
this.d(() => r.viewer = void 0), r.viewer = p, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new wo(t, r, p));
|
|
2083
2083
|
} else
|
|
2084
2084
|
r.setStatus("Error"), r.setStatusLog("请升级 ESWebView !"), this.d(() => r.viewer = void 0), r.viewer = void 0;
|
|
2085
2085
|
};
|
|
@@ -2095,7 +2095,7 @@ class Co extends m {
|
|
|
2095
2095
|
this.d(() => {
|
|
2096
2096
|
r.setStatus("Raw"), r.setStatusLog(""), t && p && t.removeChild(p) && (p = void 0);
|
|
2097
2097
|
});
|
|
2098
|
-
const d = this.dv(
|
|
2098
|
+
const d = this.dv(Te(async (u) => {
|
|
2099
2099
|
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);
|
|
2100
2100
|
let c, f, w;
|
|
2101
2101
|
if (n(i.options, "ws")) {
|
|
@@ -2104,16 +2104,16 @@ class Co extends m {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
if (n(i.options, "uri") && n(i.options, "app")) {
|
|
2106
2106
|
const { offsetWidth: R, offsetHeight: T } = p;
|
|
2107
|
-
let { uri: B, app:
|
|
2107
|
+
let { uri: B, app: _e, token: Xe } = i.options;
|
|
2108
2108
|
B.endsWith("/") || (B += "/");
|
|
2109
|
-
const Tr = Xe ? `?essstoken=${Xe}` : "", Ye = `/${
|
|
2109
|
+
const Tr = Xe ? `?essstoken=${Xe}` : "", Ye = `/${_e}/${R ?? 1920}/${T ?? 1080}` + Tr;
|
|
2110
2110
|
console.log(`请求信令服务器: ${B}instance${Ye}`);
|
|
2111
|
-
const xr = await
|
|
2111
|
+
const xr = await u.promise(fetch(`${B}instance${Ye}`, { method: "GET" })), V = await u.promise(xr.json());
|
|
2112
2112
|
if (V && V.status !== "ok") {
|
|
2113
2113
|
r.setStatus("Error"), r.setStatusLog(`信令服务器请求失败 ${V.status}`), this._reconnectEvent.emit(void 0);
|
|
2114
2114
|
return;
|
|
2115
2115
|
} else {
|
|
2116
|
-
console.log(`信令服务器请求成功! ${JSON.stringify(V, void 0, " ")}`), await
|
|
2116
|
+
console.log(`信令服务器请求成功! ${JSON.stringify(V, void 0, " ")}`), await Kn(2e3);
|
|
2117
2117
|
const { server: Rr, esmsg: Lr, instanceId: Pr, useInternalSignallingServer: kr } = V;
|
|
2118
2118
|
if (!Pr) {
|
|
2119
2119
|
r.setStatus("Error"), r.setStatusLog("检查信令服务器版本,返回数据错误! "), console.log("信令服务器返回数据错误!不包含instanceId!请升级到 ESSS V3.0+ 版本!"), this._reconnectEvent.emit(void 0);
|
|
@@ -2122,31 +2122,31 @@ class Co extends m {
|
|
|
2122
2122
|
c = Rr, f = Lr, w = kr ?? !1, r.esssResponse = V;
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
|
-
const y = this.dv(w ? new
|
|
2125
|
+
const y = this.dv(w ? new ao(p, c, f, r) : new to(p, c, f, r));
|
|
2126
2126
|
this.d(() => r.viewer = void 0), this.d(y.errorEvent.don((R) => {
|
|
2127
2127
|
const T = `[${R}]:像素流连接错误!`;
|
|
2128
2128
|
r.setStatus("Error"), r.setStatusLog(T), this._reconnectEvent.emit(y);
|
|
2129
|
-
})), await
|
|
2129
|
+
})), 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;
|
|
2130
2130
|
const { offsetWidth: x, offsetHeight: C } = p;
|
|
2131
|
-
y.resize(x * window.devicePixelRatio, C * window.devicePixelRatio), r.viewer = y, this.d(() => r.viewer = void 0), this.dv(new
|
|
2131
|
+
y.resize(x * window.devicePixelRatio, C * window.devicePixelRatio), r.viewer = y, this.d(() => r.viewer = void 0), this.dv(new go(r, y));
|
|
2132
2132
|
}));
|
|
2133
|
-
d.start(), this.d(this._reconnectEvent.don((
|
|
2134
|
-
o === void 0 && (
|
|
2133
|
+
d.start(), this.d(this._reconnectEvent.don((u) => {
|
|
2134
|
+
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 = window.setTimeout(() => {
|
|
2135
2135
|
d.restart();
|
|
2136
2136
|
}, s)));
|
|
2137
|
-
})), this.d(d.errorEvent.don((
|
|
2138
|
-
r.setStatus("Error"), r.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!",
|
|
2137
|
+
})), this.d(d.errorEvent.don((u) => {
|
|
2138
|
+
r.setStatus("Error"), r.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!", u), this._reconnectEvent.emit(void 0);
|
|
2139
2139
|
}));
|
|
2140
2140
|
} else if (n(i.options, "project")) {
|
|
2141
|
-
const p = i, d = p.options.project,
|
|
2141
|
+
const p = i, d = p.options.project, u = p.options.baseUrl;
|
|
2142
2142
|
r.setStatus("Creating"), r.setStatusLog("下载编译中...");
|
|
2143
|
-
const c = this.dv(new
|
|
2143
|
+
const c = this.dv(new po(t, d, u, r));
|
|
2144
2144
|
r.viewer = c, this.d(() => r.viewer = void 0);
|
|
2145
2145
|
} else
|
|
2146
2146
|
r.setStatus("Error"), r.setStatusLog("视口创建失败!"), console.warn("视口创建失败: 参数错误!");
|
|
2147
2147
|
}
|
|
2148
2148
|
}
|
|
2149
|
-
const K = class K extends
|
|
2149
|
+
const K = class K extends Ee {
|
|
2150
2150
|
constructor(t) {
|
|
2151
2151
|
super(t);
|
|
2152
2152
|
v(this, "_viewer", this.dv(W(void 0)));
|
|
@@ -2168,7 +2168,7 @@ const K = class K extends Ie {
|
|
|
2168
2168
|
this.viewerChanged.emit(this.viewer);
|
|
2169
2169
|
})), this.dv(new L(this.subContainerChanged, () => {
|
|
2170
2170
|
if (this.setStatus("Raw"), this.setStatusLog(""), !!this.subContainer)
|
|
2171
|
-
return new
|
|
2171
|
+
return new yo(this.subContainer, i, this);
|
|
2172
2172
|
}));
|
|
2173
2173
|
}
|
|
2174
2174
|
get defaultProps() {
|
|
@@ -2211,14 +2211,14 @@ const K = class K extends Ie {
|
|
|
2211
2211
|
console.warn("UEPositionToLonLatAlt: viewer is undefined");
|
|
2212
2212
|
return;
|
|
2213
2213
|
}
|
|
2214
|
-
return await
|
|
2214
|
+
return await ms(this.viewer, t);
|
|
2215
2215
|
}
|
|
2216
2216
|
async changeNavigationMode(t) {
|
|
2217
2217
|
if (!this.viewer) {
|
|
2218
2218
|
console.warn("ChangeNavigationMode: viewer is undefined");
|
|
2219
2219
|
return;
|
|
2220
2220
|
}
|
|
2221
|
-
const i = await
|
|
2221
|
+
const i = await b(this.viewer, t);
|
|
2222
2222
|
return i && !i.error && (this._navigationMode.value = t.mode), i;
|
|
2223
2223
|
}
|
|
2224
2224
|
async resetWithCurrentCamera(t) {
|
|
@@ -2233,175 +2233,175 @@ const K = class K extends Ie {
|
|
|
2233
2233
|
console.warn("GetAllSocketNamesByActorTag: viewer is undefined");
|
|
2234
2234
|
return;
|
|
2235
2235
|
}
|
|
2236
|
-
return await
|
|
2236
|
+
return await Cs(this.viewer, t);
|
|
2237
2237
|
}
|
|
2238
2238
|
async getBoundSphere(t) {
|
|
2239
2239
|
if (!this.viewer) {
|
|
2240
2240
|
console.warn("getBoundSphere: viewer is undefined");
|
|
2241
2241
|
return;
|
|
2242
2242
|
}
|
|
2243
|
-
return await
|
|
2243
|
+
return await Is(this.viewer, t);
|
|
2244
2244
|
}
|
|
2245
2245
|
async getBoundSphereWithChildren(t) {
|
|
2246
2246
|
if (!this.viewer) {
|
|
2247
2247
|
console.warn("getBoundSphereWithChildren: viewer is undefined");
|
|
2248
2248
|
return;
|
|
2249
2249
|
}
|
|
2250
|
-
return await
|
|
2250
|
+
return await Es(this.viewer, t);
|
|
2251
2251
|
}
|
|
2252
2252
|
async getStrokeMaterialParamInfo(t) {
|
|
2253
2253
|
if (!this.viewer) {
|
|
2254
2254
|
console.warn("GetStrokeMaterialParamInfo: viewer is undefined");
|
|
2255
2255
|
return;
|
|
2256
2256
|
}
|
|
2257
|
-
return await
|
|
2257
|
+
return await Ss(this.viewer, t);
|
|
2258
2258
|
}
|
|
2259
2259
|
async getFillMaterialParamInfo(t) {
|
|
2260
2260
|
if (!this.viewer) {
|
|
2261
2261
|
console.warn("getFillMaterialParamInfo: viewer is undefined");
|
|
2262
2262
|
return;
|
|
2263
2263
|
}
|
|
2264
|
-
return await
|
|
2264
|
+
return await Ts(this.viewer, t);
|
|
2265
2265
|
}
|
|
2266
2266
|
async getGlobalProperty(t) {
|
|
2267
2267
|
if (!this.viewer) {
|
|
2268
2268
|
console.warn("getGlobalProperty: viewer is undefined");
|
|
2269
2269
|
return;
|
|
2270
2270
|
}
|
|
2271
|
-
return await
|
|
2271
|
+
return await xs(this.viewer, t);
|
|
2272
2272
|
}
|
|
2273
2273
|
async getObjectByInfo(t) {
|
|
2274
2274
|
if (!this.viewer) {
|
|
2275
2275
|
console.warn("GetObjectByInfo: viewer is undefined");
|
|
2276
2276
|
return;
|
|
2277
2277
|
}
|
|
2278
|
-
return await
|
|
2278
|
+
return await Rs(this.viewer, t);
|
|
2279
2279
|
}
|
|
2280
2280
|
async defaultCameraFlyIn(t = 1) {
|
|
2281
2281
|
if (!this.viewer) {
|
|
2282
2282
|
console.warn("DefaultCameraFlyIn: viewer is undefined");
|
|
2283
2283
|
return;
|
|
2284
2284
|
}
|
|
2285
|
-
return await
|
|
2285
|
+
return await On(this.viewer, t);
|
|
2286
2286
|
}
|
|
2287
2287
|
async startVoice() {
|
|
2288
2288
|
if (!this.viewer) {
|
|
2289
2289
|
console.warn("startVoice:viewer is undefined");
|
|
2290
2290
|
return;
|
|
2291
2291
|
}
|
|
2292
|
-
return await
|
|
2292
|
+
return await jn(this.viewer);
|
|
2293
2293
|
}
|
|
2294
2294
|
async stopVoice() {
|
|
2295
2295
|
if (!this.viewer) {
|
|
2296
2296
|
console.warn("startVoice:viewer is undefined");
|
|
2297
2297
|
return;
|
|
2298
2298
|
}
|
|
2299
|
-
return await
|
|
2299
|
+
return await ts(this.viewer);
|
|
2300
2300
|
}
|
|
2301
2301
|
async mountPakFiles(t) {
|
|
2302
2302
|
if (!this.viewer) {
|
|
2303
2303
|
console.warn("mountPakFiles:viewer is undefined");
|
|
2304
2304
|
return;
|
|
2305
2305
|
}
|
|
2306
|
-
return await
|
|
2306
|
+
return await es(this.viewer, t);
|
|
2307
2307
|
}
|
|
2308
2308
|
async generateMemReport() {
|
|
2309
2309
|
if (!this.viewer) {
|
|
2310
2310
|
console.warn("generateMemReport:viewer is undefined");
|
|
2311
2311
|
return;
|
|
2312
2312
|
}
|
|
2313
|
-
return await
|
|
2313
|
+
return await is(this.viewer);
|
|
2314
2314
|
}
|
|
2315
2315
|
async quit() {
|
|
2316
2316
|
if (!this.viewer) {
|
|
2317
2317
|
console.warn("Quit: viewer is undefined");
|
|
2318
2318
|
return;
|
|
2319
2319
|
}
|
|
2320
|
-
return await
|
|
2320
|
+
return await us(this.viewer);
|
|
2321
2321
|
}
|
|
2322
2322
|
async bindActorByTag(t, i) {
|
|
2323
2323
|
if (!this.viewer) {
|
|
2324
2324
|
console.warn("BindActorByTag: viewer is undefined");
|
|
2325
2325
|
return;
|
|
2326
2326
|
}
|
|
2327
|
-
return await
|
|
2327
|
+
return await Ls(this.viewer, t, i);
|
|
2328
2328
|
}
|
|
2329
2329
|
async restoreOriginalScene() {
|
|
2330
2330
|
if (!this.viewer) {
|
|
2331
2331
|
console.warn("RestoreOriginalScene: viewer is undefined");
|
|
2332
2332
|
return;
|
|
2333
2333
|
}
|
|
2334
|
-
return await
|
|
2334
|
+
return await Ps(this.viewer);
|
|
2335
2335
|
}
|
|
2336
2336
|
async unBindActorByID(t) {
|
|
2337
2337
|
if (!this.viewer) {
|
|
2338
2338
|
console.warn("UnBindActorByID: viewer is undefined");
|
|
2339
2339
|
return;
|
|
2340
2340
|
}
|
|
2341
|
-
return await
|
|
2341
|
+
return await ks(this.viewer, t);
|
|
2342
2342
|
}
|
|
2343
2343
|
async unBindActorByTag(t) {
|
|
2344
2344
|
if (!this.viewer) {
|
|
2345
2345
|
console.warn("UnBindActorByTag: viewer is undefined");
|
|
2346
2346
|
return;
|
|
2347
2347
|
}
|
|
2348
|
-
return await
|
|
2348
|
+
return await Ds(this.viewer, t);
|
|
2349
2349
|
}
|
|
2350
2350
|
async createActorByClass(t, i) {
|
|
2351
2351
|
if (!this.viewer) {
|
|
2352
2352
|
console.warn("CreateActorByClass: viewer is undefined");
|
|
2353
2353
|
return;
|
|
2354
2354
|
}
|
|
2355
|
-
return await
|
|
2355
|
+
return await Bs(this.viewer, t, i);
|
|
2356
2356
|
}
|
|
2357
2357
|
async bind3DTilesetByTag(t, i) {
|
|
2358
2358
|
if (!this.viewer) {
|
|
2359
2359
|
console.warn("Bind3DTilesetByTag: viewer is undefined");
|
|
2360
2360
|
return;
|
|
2361
2361
|
}
|
|
2362
|
-
return await
|
|
2362
|
+
return await _s(this.viewer, t, i);
|
|
2363
2363
|
}
|
|
2364
2364
|
async unBind3DTilesetByTag(t) {
|
|
2365
2365
|
if (!this.viewer) {
|
|
2366
2366
|
console.warn("UnBind3DTilesetByTag: viewer is undefined");
|
|
2367
2367
|
return;
|
|
2368
2368
|
}
|
|
2369
|
-
return await
|
|
2369
|
+
return await Ms(this.viewer, t);
|
|
2370
2370
|
}
|
|
2371
2371
|
async unBind3DTilesetById(t) {
|
|
2372
2372
|
if (!this.viewer) {
|
|
2373
2373
|
console.warn("UnBind3DTilesetById: viewer is undefined");
|
|
2374
2374
|
return;
|
|
2375
2375
|
}
|
|
2376
|
-
return await
|
|
2376
|
+
return await $s(this.viewer, t);
|
|
2377
2377
|
}
|
|
2378
2378
|
async bindImageryByTag(t, i, r) {
|
|
2379
2379
|
if (!this.viewer) {
|
|
2380
2380
|
console.warn("BindImageryByTag: viewer is undefined");
|
|
2381
2381
|
return;
|
|
2382
2382
|
}
|
|
2383
|
-
return await
|
|
2383
|
+
return await Ws(this.viewer, t, i, r);
|
|
2384
2384
|
}
|
|
2385
2385
|
async unBindImageryByTag(t, i) {
|
|
2386
2386
|
if (!this.viewer) {
|
|
2387
2387
|
console.warn("UnBindImageryByTag: viewer is undefined");
|
|
2388
2388
|
return;
|
|
2389
2389
|
}
|
|
2390
|
-
return await
|
|
2390
|
+
return await As(this.viewer, t, i);
|
|
2391
2391
|
}
|
|
2392
2392
|
async unBindImageryById(t) {
|
|
2393
2393
|
if (!this.viewer) {
|
|
2394
2394
|
console.warn("UnBindImageryById: viewer is undefined");
|
|
2395
2395
|
return;
|
|
2396
2396
|
}
|
|
2397
|
-
return await
|
|
2397
|
+
return await Us(this.viewer, t);
|
|
2398
2398
|
}
|
|
2399
2399
|
async getIdByComponentNameAndHitItem(t, i, r) {
|
|
2400
2400
|
if (!this.viewer) {
|
|
2401
2401
|
console.warn("GetIdByComponentNameAndHitItem: viewer is undefined");
|
|
2402
2402
|
return;
|
|
2403
2403
|
}
|
|
2404
|
-
return await
|
|
2404
|
+
return await Ns(this.viewer, t, i, r);
|
|
2405
2405
|
}
|
|
2406
2406
|
/**
|
|
2407
2407
|
* @returns Promise(高度)
|
|
@@ -2413,7 +2413,7 @@ const K = class K extends Ie {
|
|
|
2413
2413
|
console.warn("GetCameraRelativeHeight: viewer is undefined");
|
|
2414
2414
|
return;
|
|
2415
2415
|
}
|
|
2416
|
-
return await
|
|
2416
|
+
return await zs(this.viewer, t);
|
|
2417
2417
|
}
|
|
2418
2418
|
/**
|
|
2419
2419
|
* 保存str到指定目录下
|
|
@@ -2425,28 +2425,28 @@ const K = class K extends Ie {
|
|
|
2425
2425
|
console.warn("SaveStringToFile: viewer is undefined");
|
|
2426
2426
|
return;
|
|
2427
2427
|
}
|
|
2428
|
-
return await
|
|
2428
|
+
return await Hs(this.viewer, t, i, r);
|
|
2429
2429
|
}
|
|
2430
2430
|
async highlightActorByTag(t, i = !0) {
|
|
2431
2431
|
if (!this.viewer) {
|
|
2432
2432
|
console.warn("HighlightActorByTag: viewer is undefined");
|
|
2433
2433
|
return;
|
|
2434
2434
|
}
|
|
2435
|
-
return await
|
|
2435
|
+
return await bs(this.viewer, t, i);
|
|
2436
2436
|
}
|
|
2437
2437
|
async sendCustomMessage(t) {
|
|
2438
2438
|
if (!this.viewer) {
|
|
2439
2439
|
console.warn("SendCustomMessage: viewer is undefined");
|
|
2440
2440
|
return;
|
|
2441
2441
|
}
|
|
2442
|
-
return await
|
|
2442
|
+
return await Js(this.viewer, t);
|
|
2443
2443
|
}
|
|
2444
2444
|
async getStatus() {
|
|
2445
2445
|
if (!this.viewer) {
|
|
2446
2446
|
console.warn("GetStatus:viewer is undefined");
|
|
2447
2447
|
return;
|
|
2448
2448
|
}
|
|
2449
|
-
return await
|
|
2449
|
+
return await Gs(this.viewer);
|
|
2450
2450
|
}
|
|
2451
2451
|
/**
|
|
2452
2452
|
* 获取场景中可替换的材质列表
|
|
@@ -2456,7 +2456,7 @@ const K = class K extends Ie {
|
|
|
2456
2456
|
console.warn("GetTilesetMaterialIDList:viewer is undefined");
|
|
2457
2457
|
return;
|
|
2458
2458
|
}
|
|
2459
|
-
return await
|
|
2459
|
+
return await Zs(this.viewer);
|
|
2460
2460
|
}
|
|
2461
2461
|
//——————————————————————————————————————————
|
|
2462
2462
|
//抽象函数实现------------------------------
|
|
@@ -2464,10 +2464,10 @@ const K = class K extends Ie {
|
|
|
2464
2464
|
if (!this.viewer) return;
|
|
2465
2465
|
let n = t;
|
|
2466
2466
|
if (t && window.ue && this.container) {
|
|
2467
|
-
const [s, o] = t, { x:
|
|
2468
|
-
n = [
|
|
2467
|
+
const [s, o] = t, { x: h, y: a } = this.container.getBoundingClientRect();
|
|
2468
|
+
n = [h + s, a + o];
|
|
2469
2469
|
}
|
|
2470
|
-
return await
|
|
2470
|
+
return await hs(this.viewer, n, i, r);
|
|
2471
2471
|
}
|
|
2472
2472
|
async pickPosition(t) {
|
|
2473
2473
|
if (!this.viewer) return;
|
|
@@ -2476,7 +2476,7 @@ const K = class K extends Ie {
|
|
|
2476
2476
|
const [r, n] = t, { x: s, y: o } = this.container.getBoundingClientRect();
|
|
2477
2477
|
i = [s + r, o + n];
|
|
2478
2478
|
}
|
|
2479
|
-
return await
|
|
2479
|
+
return await ps(this.viewer, i);
|
|
2480
2480
|
}
|
|
2481
2481
|
async quickPickPosition(t) {
|
|
2482
2482
|
return await this.pickPosition(t);
|
|
@@ -2486,7 +2486,7 @@ const K = class K extends Ie {
|
|
|
2486
2486
|
}
|
|
2487
2487
|
async flyIn(t, i = [0, 0, 0], r = 1, n = "default") {
|
|
2488
2488
|
if (!this.viewer) return;
|
|
2489
|
-
const s = await
|
|
2489
|
+
const s = await Re(this.viewer, void 0, t, i, r, n);
|
|
2490
2490
|
if (s)
|
|
2491
2491
|
return s.endType === 0 && console.warn(`flyTo:flyTo is end! endType:${s.endType}`), s.endType === 1 && console.warn(`flyTo:飞行中断! endType:${s.endType}`), s;
|
|
2492
2492
|
}
|
|
@@ -2504,8 +2504,8 @@ const K = class K extends Ie {
|
|
|
2504
2504
|
[t[2], t[1], 0]
|
|
2505
2505
|
], s = _r(n);
|
|
2506
2506
|
if (!s) return;
|
|
2507
|
-
const { center: o, radius:
|
|
2508
|
-
distance: i ??
|
|
2507
|
+
const { center: o, radius: h } = s, a = {
|
|
2508
|
+
distance: i ?? h,
|
|
2509
2509
|
heading: 0,
|
|
2510
2510
|
pitch: -90,
|
|
2511
2511
|
flyDuration: r,
|
|
@@ -2536,7 +2536,7 @@ const K = class K extends Ie {
|
|
|
2536
2536
|
*/
|
|
2537
2537
|
async changeToWalk(t, i = 4.2, r = 1.6) {
|
|
2538
2538
|
if (!this.viewer) return;
|
|
2539
|
-
const n = { mode: "Walk", position: t, jumpZVelocity: i, eyeHeight: r }, s = await
|
|
2539
|
+
const n = { mode: "Walk", position: t, jumpZVelocity: i, eyeHeight: r }, s = await b(this.viewer, n);
|
|
2540
2540
|
return s && !s.error && (this._navigationMode.value = n.mode), s;
|
|
2541
2541
|
}
|
|
2542
2542
|
/**
|
|
@@ -2545,7 +2545,7 @@ const K = class K extends Ie {
|
|
|
2545
2545
|
*/
|
|
2546
2546
|
async changeToMap() {
|
|
2547
2547
|
if (!this.viewer) return;
|
|
2548
|
-
const t = { mode: "Map" }, i = await
|
|
2548
|
+
const t = { mode: "Map" }, i = await b(this.viewer, t);
|
|
2549
2549
|
return i && !i.error && (this._navigationMode.value = t.mode), i;
|
|
2550
2550
|
}
|
|
2551
2551
|
/**
|
|
@@ -2557,7 +2557,7 @@ const K = class K extends Ie {
|
|
|
2557
2557
|
*/
|
|
2558
2558
|
async changeToRotateGlobe(t = 38, i = 1e7, r = 60) {
|
|
2559
2559
|
if (!this.viewer) return;
|
|
2560
|
-
const n = { mode: "RotateGlobe", latitude: t, height: i, cycleTime: r }, s = await
|
|
2560
|
+
const n = { mode: "RotateGlobe", latitude: t, height: i, cycleTime: r }, s = await b(this.viewer, n);
|
|
2561
2561
|
return s && !s.error && (this._navigationMode.value = n.mode), s;
|
|
2562
2562
|
}
|
|
2563
2563
|
/**
|
|
@@ -2572,8 +2572,8 @@ const K = class K extends Ie {
|
|
|
2572
2572
|
*/
|
|
2573
2573
|
async changeToLine(t, i = 10, r = 10, n = !0, s = 10, o = "auto") {
|
|
2574
2574
|
if (!this.viewer) return;
|
|
2575
|
-
const
|
|
2576
|
-
return a && !a.error && (this._navigationMode.value =
|
|
2575
|
+
const h = { mode: "Line", geoLineStringId: t, speed: i, heightOffset: r, loop: n, turnRateDPS: s, lineMode: o }, a = await b(this.viewer, h);
|
|
2576
|
+
return a && !a.error && (this._navigationMode.value = h.mode), a;
|
|
2577
2577
|
}
|
|
2578
2578
|
/**
|
|
2579
2579
|
* 切换导航模式为“UserDefined” 仅UE支持。
|
|
@@ -2582,7 +2582,7 @@ const K = class K extends Ie {
|
|
|
2582
2582
|
*/
|
|
2583
2583
|
async changeToUserDefined(t) {
|
|
2584
2584
|
if (!this.viewer) return;
|
|
2585
|
-
const i = { mode: "UserDefined", userDefinedPawn: t }, r = await
|
|
2585
|
+
const i = { mode: "UserDefined", userDefinedPawn: t }, r = await b(this.viewer, i);
|
|
2586
2586
|
return r && !r.error && (this._navigationMode.value = i.mode), r;
|
|
2587
2587
|
}
|
|
2588
2588
|
/**
|
|
@@ -2602,8 +2602,8 @@ const K = class K extends Ie {
|
|
|
2602
2602
|
orbitPeriod: r,
|
|
2603
2603
|
heading: n,
|
|
2604
2604
|
pitch: s
|
|
2605
|
-
},
|
|
2606
|
-
return
|
|
2605
|
+
}, h = await b(this.viewer, o);
|
|
2606
|
+
return h && !h.error && (this._navigationMode.value = o.mode), h;
|
|
2607
2607
|
}
|
|
2608
2608
|
/**
|
|
2609
2609
|
* 切换导航模式为“Follow”(跟随)跟随模式。 此模式允许视角跟随ES对象。
|
|
@@ -2614,8 +2614,8 @@ const K = class K extends Ie {
|
|
|
2614
2614
|
*/
|
|
2615
2615
|
async changeToFollow(t, i = 0, r = 0, n = -30, s = !0) {
|
|
2616
2616
|
if (!this.viewer) return;
|
|
2617
|
-
const o = { mode: "Follow", objectId: t, distance: i, heading: r, pitch: n, relativeRotation: s },
|
|
2618
|
-
return
|
|
2617
|
+
const o = { mode: "Follow", objectId: t, distance: i, heading: r, pitch: n, relativeRotation: s }, h = await b(this.viewer, o);
|
|
2618
|
+
return h && !h.error && (this._navigationMode.value = o.mode), h;
|
|
2619
2619
|
}
|
|
2620
2620
|
getFPS() {
|
|
2621
2621
|
return this._statusInfo.fps;
|
|
@@ -2623,47 +2623,47 @@ const K = class K extends Ie {
|
|
|
2623
2623
|
async getVersion() {
|
|
2624
2624
|
const t = window.g_XE3CopyRights ?? {};
|
|
2625
2625
|
if (!this.viewer) return t;
|
|
2626
|
-
const i = await
|
|
2626
|
+
const i = await Fs(this.viewer);
|
|
2627
2627
|
return t.esforue = i, t;
|
|
2628
2628
|
}
|
|
2629
2629
|
async getHeightByLonLat(t, i, r = "ECC_Visibility") {
|
|
2630
2630
|
if (!this.viewer) return null;
|
|
2631
|
-
const n = await
|
|
2631
|
+
const n = await vs(this.viewer, t, i, r);
|
|
2632
2632
|
return n && n.height !== void 0 ? n.height : null;
|
|
2633
2633
|
}
|
|
2634
2634
|
async getHeightsByLonLats(t, i = "ECC_Visibility") {
|
|
2635
|
-
return this.viewer ? await
|
|
2635
|
+
return this.viewer ? await fs(this.viewer, t, i) : void 0;
|
|
2636
2636
|
}
|
|
2637
2637
|
async capture(t = 64, i = 64) {
|
|
2638
|
-
return this.viewer ? await
|
|
2638
|
+
return this.viewer ? await gs(this.viewer, t, i) : void 0;
|
|
2639
2639
|
}
|
|
2640
2640
|
async partialCapture(t, i = [64, 64]) {
|
|
2641
2641
|
if (!this.viewer) {
|
|
2642
2642
|
console.warn("partialCapture:viewer is undefined");
|
|
2643
2643
|
return;
|
|
2644
2644
|
}
|
|
2645
|
-
return await
|
|
2645
|
+
return await ws(this.viewer, t, i);
|
|
2646
2646
|
}
|
|
2647
2647
|
async lonLatAltToScreenPosition(t) {
|
|
2648
2648
|
if (!this.viewer) return;
|
|
2649
|
-
const i = await
|
|
2649
|
+
const i = await ys(this.viewer, t);
|
|
2650
2650
|
return i && [i.X, i.Y];
|
|
2651
2651
|
}
|
|
2652
2652
|
//------------------------------抽象函数实现
|
|
2653
2653
|
async setGlobalProperty(t) {
|
|
2654
2654
|
if (this.viewer)
|
|
2655
|
-
return await
|
|
2655
|
+
return await cs(this.viewer, t);
|
|
2656
2656
|
}
|
|
2657
2657
|
async startEditing(t, i, r) {
|
|
2658
2658
|
r = Object.assign({ useKeyToSwitch: !0, callSource: "outer" }, r);
|
|
2659
2659
|
const n = t.components.main ?? t;
|
|
2660
2660
|
if (!n || !this.viewer || i == null) return;
|
|
2661
2661
|
const s = Array.isArray(i) ? [...i] : [i];
|
|
2662
|
-
return n.editingID = `${r.callSource}_${_()}`, await
|
|
2662
|
+
return n.editingID = `${r.callSource}_${_()}`, await Ks(this.viewer, n.id, n.editingID, s, r.useKeyToSwitch);
|
|
2663
2663
|
}
|
|
2664
2664
|
async stopEditing() {
|
|
2665
2665
|
if (this.viewer)
|
|
2666
|
-
return await
|
|
2666
|
+
return await Xs(this.viewer);
|
|
2667
2667
|
}
|
|
2668
2668
|
async moveObjects(t) {
|
|
2669
2669
|
if (!this.viewer) return;
|
|
@@ -2673,20 +2673,20 @@ const K = class K extends Ie {
|
|
|
2673
2673
|
o.editingID = r, o && i.push(o.id);
|
|
2674
2674
|
}
|
|
2675
2675
|
if (i.length !== 0)
|
|
2676
|
-
return await
|
|
2676
|
+
return await Ys(this.viewer, i, r);
|
|
2677
2677
|
}
|
|
2678
2678
|
};
|
|
2679
|
-
v(K, "type", K.register("ESUeViewer", K)), v(K, "defaults", { ...
|
|
2680
|
-
let
|
|
2679
|
+
v(K, "type", K.register("ESUeViewer", K)), v(K, "defaults", { ...Qn });
|
|
2680
|
+
let J = K;
|
|
2681
2681
|
((l) => {
|
|
2682
2682
|
l.createDefaultProps = () => ({
|
|
2683
|
-
...
|
|
2683
|
+
...Ee.createDefaultProps(),
|
|
2684
2684
|
/**
|
|
2685
2685
|
* 新增UE属性步骤!!
|
|
2686
2686
|
* 1. createReactProps 中定义属性
|
|
2687
2687
|
* 2. reactPropDefaults 中定义默认值
|
|
2688
2688
|
*/
|
|
2689
|
-
...
|
|
2689
|
+
...Cr(),
|
|
2690
2690
|
//分辨率缩放比例
|
|
2691
2691
|
resolutionScale: 1,
|
|
2692
2692
|
autoReconnect: !1,
|
|
@@ -2696,44 +2696,56 @@ let b = K;
|
|
|
2696
2696
|
speechRecognitionListening: void 0,
|
|
2697
2697
|
customMessageListening: void 0
|
|
2698
2698
|
});
|
|
2699
|
-
})(
|
|
2700
|
-
|
|
2701
|
-
class at extends
|
|
2699
|
+
})(J || (J = {}));
|
|
2700
|
+
Xn(J.prototype, J.createDefaultProps);
|
|
2701
|
+
class at extends G {
|
|
2702
2702
|
constructor(e, t) {
|
|
2703
2703
|
super(e, t);
|
|
2704
2704
|
const i = t.viewer;
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
const
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
const f =
|
|
2713
|
-
|
|
2705
|
+
if (!i) return;
|
|
2706
|
+
const r = this.ad(W(!1));
|
|
2707
|
+
e.components.main || this.d(this.createdEvent.don(() => {
|
|
2708
|
+
const n = this.constructor.propValFuncs, s = e.defaultProps, o = Object.keys(s).filter((u) => n[u] !== null);
|
|
2709
|
+
o.push(...this.constructor.forceUeUpdateProps);
|
|
2710
|
+
const h = e.constructor.defaults, a = { val: {} }, g = [];
|
|
2711
|
+
for (let u of o) {
|
|
2712
|
+
const c = u + "Changed", f = e[c];
|
|
2713
|
+
g.push(f);
|
|
2714
|
+
const w = n[u];
|
|
2715
|
+
if (w === null)
|
|
2714
2716
|
throw console.error("vf === null error"), new Error("vf === null error");
|
|
2715
|
-
const
|
|
2716
|
-
const
|
|
2717
|
-
let
|
|
2718
|
-
if (
|
|
2719
|
-
console.warn(`UE自动更新的属性,不应该为undefined! 属性名:${
|
|
2717
|
+
const y = () => {
|
|
2718
|
+
const x = e[u] ?? h[u] ?? e.constructor[`default${u.charAt(0).toUpperCase() + u.slice(1)}`];
|
|
2719
|
+
let C = w ? w(x, this, t, e) : x;
|
|
2720
|
+
if (C === void 0) {
|
|
2721
|
+
console.warn(`UE自动更新的属性,不应该为undefined! 属性名:${u} 对象名:${e.name} 对象id: ${e.id}`);
|
|
2720
2722
|
return;
|
|
2721
2723
|
}
|
|
2722
|
-
|
|
2724
|
+
a.val[u] = C;
|
|
2723
2725
|
};
|
|
2724
|
-
|
|
2726
|
+
y(), this.d(f.don(y));
|
|
2725
2727
|
}
|
|
2726
|
-
const
|
|
2728
|
+
const p = () => {
|
|
2727
2729
|
i.callUeFunc({
|
|
2728
2730
|
f: "update",
|
|
2729
2731
|
p: {
|
|
2730
2732
|
id: e.id,
|
|
2731
|
-
...
|
|
2733
|
+
...a.val
|
|
2732
2734
|
}
|
|
2733
|
-
}),
|
|
2734
|
-
},
|
|
2735
|
-
this.d(
|
|
2736
|
-
})))
|
|
2735
|
+
}), a.val = {};
|
|
2736
|
+
}, d = this.dv(P(...g));
|
|
2737
|
+
this.d(d.don(p)), this.d(r.changed.don(p)), this.d(e.flushEvent.don(() => d.flush()));
|
|
2738
|
+
})), e.components.main || (this.d(() => {
|
|
2739
|
+
r.value && Fr(i, e.id);
|
|
2740
|
+
}), i.callUeFunc({
|
|
2741
|
+
f: "create",
|
|
2742
|
+
p: {
|
|
2743
|
+
type: e.typeName,
|
|
2744
|
+
id: e.id
|
|
2745
|
+
}
|
|
2746
|
+
}).then(() => {
|
|
2747
|
+
r.value = !0;
|
|
2748
|
+
}).catch((n) => console.error(n)));
|
|
2737
2749
|
}
|
|
2738
2750
|
}
|
|
2739
2751
|
// null 表示不设置,undefined表示不做任何转换
|
|
@@ -2753,7 +2765,7 @@ class M extends at {
|
|
|
2753
2765
|
we(i, e.id, r);
|
|
2754
2766
|
})), this.d(e.flyInEvent.don((r) => {
|
|
2755
2767
|
var n, s;
|
|
2756
|
-
|
|
2768
|
+
Re(i, e.id, (n = e.flyInParam) == null ? void 0 : n.position, (s = e.flyInParam) == null ? void 0 : s.rotation, r ?? 1);
|
|
2757
2769
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
2758
2770
|
dt(i, e.id);
|
|
2759
2771
|
})), this.d(e.calcFlyInParamEvent.don(() => {
|
|
@@ -2790,59 +2802,59 @@ class I extends M {
|
|
|
2790
2802
|
));
|
|
2791
2803
|
this.d(n.don(() => {
|
|
2792
2804
|
setTimeout(r, 0);
|
|
2793
|
-
})), this.d(e.smoothMoveEvent.don((
|
|
2794
|
-
|
|
2795
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((
|
|
2796
|
-
|
|
2797
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((
|
|
2798
|
-
|
|
2799
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((
|
|
2800
|
-
|
|
2801
|
-
})), this.d(e.smoothMoveKeepPitchEvent.don(async (
|
|
2805
|
+
})), this.d(e.smoothMoveEvent.don((h, a) => {
|
|
2806
|
+
De(i, e.id, h, a);
|
|
2807
|
+
})), this.d(e.smoothMoveWithRotationEvent.don((h, a, g) => {
|
|
2808
|
+
Le(i, e.id, h, a, g);
|
|
2809
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((h, a, g, p) => {
|
|
2810
|
+
Pe(i, e.id, h, a, p, g);
|
|
2811
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((h, a, g, p, d) => {
|
|
2812
|
+
ke(i, e.id, h, a, g, p, d);
|
|
2813
|
+
})), this.d(e.smoothMoveKeepPitchEvent.don(async (h, a) => {
|
|
2802
2814
|
const g = await i.callUeFunc({
|
|
2803
2815
|
f: "SmoothMoveKeepPitch",
|
|
2804
2816
|
p: {
|
|
2805
2817
|
id: e.id,
|
|
2806
|
-
Destination:
|
|
2818
|
+
Destination: h,
|
|
2807
2819
|
Time: a
|
|
2808
2820
|
}
|
|
2809
2821
|
});
|
|
2810
2822
|
g.error && console.error("SmoothMoveKeepPitch:", g.error);
|
|
2811
|
-
})), this.d(e.automaticLandingEvent.don((
|
|
2823
|
+
})), this.d(e.automaticLandingEvent.don((h) => {
|
|
2812
2824
|
const a = [e.position[0], e.position[1]];
|
|
2813
2825
|
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((g) => {
|
|
2814
|
-
g !== null && (e.position = [...a, g], e.collision =
|
|
2826
|
+
g !== null && (e.position = [...a, g], e.collision = h);
|
|
2815
2827
|
});
|
|
2816
2828
|
}));
|
|
2817
|
-
const s = async (
|
|
2818
|
-
const { viewer: d } =
|
|
2829
|
+
const s = async (h, a, g, p) => {
|
|
2830
|
+
const { viewer: d } = h;
|
|
2819
2831
|
if (!d) {
|
|
2820
2832
|
console.error("SmoothMoveRelatively: ueViewer.viewer is undefined");
|
|
2821
2833
|
return;
|
|
2822
2834
|
}
|
|
2823
|
-
const
|
|
2835
|
+
const u = await d.callUeFunc({
|
|
2824
2836
|
f: "SmoothMoveRelatively",
|
|
2825
2837
|
p: { id: a, RelativePosition: g, Time: p }
|
|
2826
2838
|
});
|
|
2827
|
-
return
|
|
2839
|
+
return u.error && console.error("SmoothMoveRelatively:", u.error), u;
|
|
2828
2840
|
};
|
|
2829
|
-
this.d(e.smoothMoveRelativelyEvent.don((
|
|
2830
|
-
s(t, e.id,
|
|
2841
|
+
this.d(e.smoothMoveRelativelyEvent.don((h, a) => {
|
|
2842
|
+
s(t, e.id, h, a);
|
|
2831
2843
|
}));
|
|
2832
|
-
const o = async (
|
|
2833
|
-
const { viewer:
|
|
2834
|
-
if (!
|
|
2844
|
+
const o = async (h, a, g, p, d) => {
|
|
2845
|
+
const { viewer: u } = h;
|
|
2846
|
+
if (!u) {
|
|
2835
2847
|
console.error("SmoothMoveRelativelyWithRotation: ueViewer.viewer is undefined");
|
|
2836
2848
|
return;
|
|
2837
2849
|
}
|
|
2838
|
-
const c = await
|
|
2850
|
+
const c = await u.callUeFunc({
|
|
2839
2851
|
f: "SmoothMoveRelativelyWithRotation",
|
|
2840
2852
|
p: { id: a, RelativePosition: g, NewRotation: p, Time: d }
|
|
2841
2853
|
});
|
|
2842
2854
|
return c.error && console.error("SmoothMoveRelativelyWithRotation:", c.error), c;
|
|
2843
2855
|
};
|
|
2844
|
-
this.d(e.smoothMoveRelativelyWithRotationEvent.don((
|
|
2845
|
-
o(t, e.id,
|
|
2856
|
+
this.d(e.smoothMoveRelativelyWithRotationEvent.don((h, a, g) => {
|
|
2857
|
+
o(t, e.id, h, a, g);
|
|
2846
2858
|
}));
|
|
2847
2859
|
}
|
|
2848
2860
|
}
|
|
@@ -2883,7 +2895,7 @@ v(D, "propValFuncs", {
|
|
|
2883
2895
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
2884
2896
|
})
|
|
2885
2897
|
});
|
|
2886
|
-
class
|
|
2898
|
+
class z extends I {
|
|
2887
2899
|
constructor(e, t) {
|
|
2888
2900
|
super(e, t), t.viewer && this.d(t.widgetEvent.don((r) => {
|
|
2889
2901
|
if (r.objId !== e.id) return;
|
|
@@ -2930,7 +2942,7 @@ const qe = (l) => {
|
|
|
2930
2942
|
default:
|
|
2931
2943
|
return "未知错误";
|
|
2932
2944
|
}
|
|
2933
|
-
}, ct = class ct extends
|
|
2945
|
+
}, ct = class ct extends G {
|
|
2934
2946
|
constructor(t, i) {
|
|
2935
2947
|
super(t, i);
|
|
2936
2948
|
v(this, "_styleColor", this.dv(W([])));
|
|
@@ -2950,8 +2962,8 @@ const qe = (l) => {
|
|
|
2950
2962
|
show: t.show,
|
|
2951
2963
|
collision: t.collision,
|
|
2952
2964
|
allowPicking: t.allowPicking,
|
|
2953
|
-
flyToParam: t.flyToParam ??
|
|
2954
|
-
flyInParam: t.flyInParam ??
|
|
2965
|
+
flyToParam: t.flyToParam ?? me.defaultFlyToParam,
|
|
2966
|
+
flyInParam: t.flyInParam ?? me.defaultFlyInParam,
|
|
2955
2967
|
highlightID: t.highlightID,
|
|
2956
2968
|
highlightColor: t.highlightColor,
|
|
2957
2969
|
highlight: t.highlight,
|
|
@@ -2967,7 +2979,7 @@ const qe = (l) => {
|
|
|
2967
2979
|
materialOverrideMap: t.materialOverrideMap
|
|
2968
2980
|
}
|
|
2969
2981
|
});
|
|
2970
|
-
},
|
|
2982
|
+
}, h = this.dv(P(
|
|
2971
2983
|
t.urlChanged,
|
|
2972
2984
|
t.showChanged,
|
|
2973
2985
|
t.flyToParamChanged,
|
|
@@ -2985,7 +2997,7 @@ const qe = (l) => {
|
|
|
2985
2997
|
t.colorBlendModeChanged,
|
|
2986
2998
|
t.materialOverrideMapChanged
|
|
2987
2999
|
));
|
|
2988
|
-
o(), this.d(
|
|
3000
|
+
o(), this.d(h.don(o)), Reflect.has(t, "colorMode") && this.d(t.colorModeChanged.don(() => o()));
|
|
2989
3001
|
const a = this.dv(W(void 0));
|
|
2990
3002
|
{
|
|
2991
3003
|
const p = this.dv(P(
|
|
@@ -3037,17 +3049,17 @@ const qe = (l) => {
|
|
|
3037
3049
|
g();
|
|
3038
3050
|
});
|
|
3039
3051
|
{
|
|
3040
|
-
const p = this.dv(
|
|
3052
|
+
const p = this.dv(Te(async (u) => {
|
|
3041
3053
|
if (a.value === void 0) {
|
|
3042
|
-
await
|
|
3054
|
+
await u.promise(g());
|
|
3043
3055
|
return;
|
|
3044
3056
|
}
|
|
3045
3057
|
if (a.value.type === "ActorTag") {
|
|
3046
3058
|
const { actorTag: c } = a.value;
|
|
3047
|
-
if (n !== c && await
|
|
3059
|
+
if (n !== c && await u.promise(g()), n !== void 0 || c === void 0) return;
|
|
3048
3060
|
try {
|
|
3049
3061
|
n = c;
|
|
3050
|
-
const f = await
|
|
3062
|
+
const f = await u.promise(i.bind3DTilesetByTag(t.id, c));
|
|
3051
3063
|
if (!f) return;
|
|
3052
3064
|
if (f.error !== "") {
|
|
3053
3065
|
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${f.error}`);
|
|
@@ -3069,7 +3081,7 @@ const qe = (l) => {
|
|
|
3069
3081
|
if (c !== s && await g(), s !== void 0 || c === void 0) return;
|
|
3070
3082
|
try {
|
|
3071
3083
|
s = c;
|
|
3072
|
-
const f = await
|
|
3084
|
+
const f = await u.promise(r.callUeFunc({
|
|
3073
3085
|
f: "create",
|
|
3074
3086
|
p: {
|
|
3075
3087
|
type: t.typeName,
|
|
@@ -3086,31 +3098,31 @@ const qe = (l) => {
|
|
|
3086
3098
|
return;
|
|
3087
3099
|
}
|
|
3088
3100
|
}
|
|
3089
|
-
await
|
|
3101
|
+
await u.promise(o());
|
|
3090
3102
|
})), d = async () => {
|
|
3091
3103
|
p.restart();
|
|
3092
3104
|
};
|
|
3093
3105
|
d(), this.d(a.changed.don(d));
|
|
3094
3106
|
}
|
|
3095
3107
|
this.d(t.refreshTilesetEvent.don(() => {
|
|
3096
|
-
|
|
3108
|
+
Vn(r, t.id);
|
|
3097
3109
|
})), this.d(t.flyToEvent.don(async (p, d) => {
|
|
3098
3110
|
if (!n && !s) return;
|
|
3099
|
-
const
|
|
3111
|
+
const u = await we(r, t.id, p);
|
|
3100
3112
|
let c = "over";
|
|
3101
|
-
|
|
3113
|
+
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), t.flyOverEvent.emit(d, c, i);
|
|
3102
3114
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
3103
3115
|
!n && !s || dt(r, t.id);
|
|
3104
3116
|
})), this.d(t.calcFlyInParamEvent.don(async () => {
|
|
3105
3117
|
if (!n && !s || !i.actived) return;
|
|
3106
3118
|
const p = await i.getCurrentCameraInfo();
|
|
3107
3119
|
if (!p) return;
|
|
3108
|
-
const { position: d, rotation:
|
|
3109
|
-
t.flyInParam = { position: d, rotation:
|
|
3120
|
+
const { position: d, rotation: u } = p;
|
|
3121
|
+
t.flyInParam = { position: d, rotation: u, flyDuration: 1 };
|
|
3110
3122
|
})), this.d(i.propChanged.don((p) => {
|
|
3111
3123
|
!n && !s || p.objId === t.id && Object.keys(p.props).forEach((d) => {
|
|
3112
|
-
const
|
|
3113
|
-
t[d] =
|
|
3124
|
+
const u = p.props[d] === null ? void 0 : p.props[d];
|
|
3125
|
+
t[d] = u;
|
|
3114
3126
|
});
|
|
3115
3127
|
})), this.d(i.objectEvent.don((p) => {
|
|
3116
3128
|
!n && !s || p.id !== t.id || p.type !== "3DTilesetReady" || t.tilesetReady.emit(p.p);
|
|
@@ -3136,7 +3148,7 @@ const qe = (l) => {
|
|
|
3136
3148
|
console.warn(`UeES3DTileset SetFeatureVisable: ${y.error}`);
|
|
3137
3149
|
return;
|
|
3138
3150
|
}
|
|
3139
|
-
},
|
|
3151
|
+
}, u = async () => {
|
|
3140
3152
|
if (!n && !s) return;
|
|
3141
3153
|
const f = await r.callUeFunc({
|
|
3142
3154
|
f: "ResetFeatureStyle",
|
|
@@ -3164,7 +3176,7 @@ const qe = (l) => {
|
|
|
3164
3176
|
const y = [...this.styleVisable, ...w];
|
|
3165
3177
|
this.styleVisable = [...y], d(f, y);
|
|
3166
3178
|
})), this.d(t.resetFeatureStyleEvent.don(() => {
|
|
3167
|
-
|
|
3179
|
+
u(), this.styleColor = [], this.styleVisable = [];
|
|
3168
3180
|
})), this.d(t.setFeatureStyleEvent.don((f) => {
|
|
3169
3181
|
c(f);
|
|
3170
3182
|
}));
|
|
@@ -3223,8 +3235,8 @@ const qe = (l) => {
|
|
|
3223
3235
|
this._styleVisable.value = t;
|
|
3224
3236
|
}
|
|
3225
3237
|
};
|
|
3226
|
-
v(ct, "type", ct.register("ESUeViewer",
|
|
3227
|
-
let
|
|
3238
|
+
v(ct, "type", ct.register("ESUeViewer", me.type, ct));
|
|
3239
|
+
let Ue = ct;
|
|
3228
3240
|
const Qe = (l) => {
|
|
3229
3241
|
switch (l) {
|
|
3230
3242
|
case 0:
|
|
@@ -3240,7 +3252,7 @@ const Qe = (l) => {
|
|
|
3240
3252
|
default:
|
|
3241
3253
|
return "未知错误";
|
|
3242
3254
|
}
|
|
3243
|
-
}, ut = class ut extends
|
|
3255
|
+
}, ut = class ut extends G {
|
|
3244
3256
|
constructor(e, t) {
|
|
3245
3257
|
super(e, t);
|
|
3246
3258
|
const i = t.viewer;
|
|
@@ -3261,9 +3273,9 @@ const Qe = (l) => {
|
|
|
3261
3273
|
};
|
|
3262
3274
|
p(), this.ad(e.urlChanged.don(p));
|
|
3263
3275
|
}
|
|
3264
|
-
const
|
|
3276
|
+
const h = async () => {
|
|
3265
3277
|
if (!r && !n) return;
|
|
3266
|
-
let p = e.targetID ??
|
|
3278
|
+
let p = e.targetID ?? U.defaults.targetID;
|
|
3267
3279
|
if (p && p != "") {
|
|
3268
3280
|
const d = E.getSceneObject(p);
|
|
3269
3281
|
p = d ? (d.components.main ?? d).id : p;
|
|
@@ -3276,16 +3288,16 @@ const Qe = (l) => {
|
|
|
3276
3288
|
rectangle: e.rectangle ?? [-180, -90, 180, 90],
|
|
3277
3289
|
collision: e.collision ?? !0,
|
|
3278
3290
|
allowPicking: e.allowPicking ?? !1,
|
|
3279
|
-
flyToParam: e.flyToParam ??
|
|
3280
|
-
flyInParam: e.flyInParam ??
|
|
3291
|
+
flyToParam: e.flyToParam ?? U.defaultFlyToParam,
|
|
3292
|
+
flyInParam: e.flyInParam ?? U.defaultFlyInParam,
|
|
3281
3293
|
url: o.value ?? "",
|
|
3282
3294
|
zIndex: e.zIndex ?? 0,
|
|
3283
|
-
maximumLevel: e.maximumLevel ??
|
|
3284
|
-
minimumLevel: e.minimumLevel ??
|
|
3285
|
-
options: e.options ??
|
|
3295
|
+
maximumLevel: e.maximumLevel ?? U.defaults.maximumLevel,
|
|
3296
|
+
minimumLevel: e.minimumLevel ?? U.defaults.minimumLevel,
|
|
3297
|
+
options: e.options ?? U.defaults.options,
|
|
3286
3298
|
targetID: p,
|
|
3287
|
-
opacity: e.opacity ??
|
|
3288
|
-
splitDirection: e.splitDirection ??
|
|
3299
|
+
opacity: e.opacity ?? U.defaults.opacity,
|
|
3300
|
+
splitDirection: e.splitDirection ?? U.defaults.splitDirection
|
|
3289
3301
|
}
|
|
3290
3302
|
});
|
|
3291
3303
|
}, a = this.dv(P(
|
|
@@ -3304,7 +3316,7 @@ const Qe = (l) => {
|
|
|
3304
3316
|
e.opacityChanged,
|
|
3305
3317
|
e.splitDirectionChanged
|
|
3306
3318
|
));
|
|
3307
|
-
this.d(a.don(
|
|
3319
|
+
this.d(a.don(h));
|
|
3308
3320
|
const g = async () => {
|
|
3309
3321
|
const { id: p } = e;
|
|
3310
3322
|
if (r !== void 0) {
|
|
@@ -3340,17 +3352,17 @@ const Qe = (l) => {
|
|
|
3340
3352
|
g();
|
|
3341
3353
|
});
|
|
3342
3354
|
{
|
|
3343
|
-
const p = this.dv(
|
|
3355
|
+
const p = this.dv(Te(async (u) => {
|
|
3344
3356
|
if (s.value === void 0) {
|
|
3345
|
-
await
|
|
3357
|
+
await u.promise(g());
|
|
3346
3358
|
return;
|
|
3347
3359
|
}
|
|
3348
3360
|
if (s.value.type === "ActorTag") {
|
|
3349
3361
|
const { actorTag: c, componentTag: f } = s.value;
|
|
3350
|
-
if (r !== c && await
|
|
3362
|
+
if (r !== c && await u.promise(g()), r !== void 0 || c === void 0) return;
|
|
3351
3363
|
try {
|
|
3352
3364
|
r = c;
|
|
3353
|
-
const w = await
|
|
3365
|
+
const w = await u.promise(t.bindImageryByTag(e.id, c, f));
|
|
3354
3366
|
if (!w) return;
|
|
3355
3367
|
if (w.error !== "") {
|
|
3356
3368
|
console.warn(`ESImageryLayer BindImageryByTag: ${w.error}`);
|
|
@@ -3369,10 +3381,10 @@ const Qe = (l) => {
|
|
|
3369
3381
|
}
|
|
3370
3382
|
} else if (s.value.type === "CreatedUrl") {
|
|
3371
3383
|
const { url: c } = s.value;
|
|
3372
|
-
if (c !== n && await
|
|
3384
|
+
if (c !== n && await u.promise(g()), n !== void 0 || c === void 0) return;
|
|
3373
3385
|
try {
|
|
3374
3386
|
n = c;
|
|
3375
|
-
const f = await
|
|
3387
|
+
const f = await u.promise(i.callUeFunc({
|
|
3376
3388
|
f: "create",
|
|
3377
3389
|
p: {
|
|
3378
3390
|
type: "ESImageryLayer",
|
|
@@ -3389,7 +3401,7 @@ const Qe = (l) => {
|
|
|
3389
3401
|
return;
|
|
3390
3402
|
}
|
|
3391
3403
|
}
|
|
3392
|
-
await
|
|
3404
|
+
await u.promise(h());
|
|
3393
3405
|
})), d = async () => {
|
|
3394
3406
|
p.restart();
|
|
3395
3407
|
};
|
|
@@ -3414,32 +3426,32 @@ const Qe = (l) => {
|
|
|
3414
3426
|
}
|
|
3415
3427
|
this.d(e.flyToEvent.don(async (p, d) => {
|
|
3416
3428
|
if (!r && !n) return;
|
|
3417
|
-
const
|
|
3429
|
+
const u = await we(i, e.id, p);
|
|
3418
3430
|
let c = "over";
|
|
3419
|
-
|
|
3431
|
+
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(d, c, t);
|
|
3420
3432
|
})), this.d(e.flyInEvent.don(async (p, d) => {
|
|
3421
3433
|
var f, w;
|
|
3422
3434
|
if (!r && !n) return;
|
|
3423
|
-
const
|
|
3435
|
+
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);
|
|
3424
3436
|
let c = "over";
|
|
3425
|
-
|
|
3437
|
+
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(d, c, t);
|
|
3426
3438
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
3427
3439
|
!r && !n || dt(i, e.id);
|
|
3428
3440
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
3429
3441
|
if (!t.actived) return;
|
|
3430
3442
|
const p = await t.getCurrentCameraInfo();
|
|
3431
3443
|
if (!p) return;
|
|
3432
|
-
const { position: d, rotation:
|
|
3433
|
-
e.flyInParam = { position: d, rotation:
|
|
3444
|
+
const { position: d, rotation: u } = p;
|
|
3445
|
+
e.flyInParam = { position: d, rotation: u, flyDuration: 1 };
|
|
3434
3446
|
})), this.d(t.propChanged.don((p) => {
|
|
3435
3447
|
!r && !n || p.objId === e.id && Object.keys(p.props).forEach((d) => {
|
|
3436
|
-
const
|
|
3437
|
-
e[d] =
|
|
3448
|
+
const u = p.props[d] === null ? void 0 : p.props[d];
|
|
3449
|
+
e[d] = u;
|
|
3438
3450
|
});
|
|
3439
3451
|
}));
|
|
3440
3452
|
}
|
|
3441
3453
|
};
|
|
3442
|
-
v(ut, "type", ut.register("ESUeViewer",
|
|
3454
|
+
v(ut, "type", ut.register("ESUeViewer", U.type, ut));
|
|
3443
3455
|
let Ve = ut;
|
|
3444
3456
|
const X = class X extends M {
|
|
3445
3457
|
constructor(e, t) {
|
|
@@ -3560,8 +3572,8 @@ const wt = class wt extends I {
|
|
|
3560
3572
|
return;
|
|
3561
3573
|
}
|
|
3562
3574
|
this.dispose(e.flyInEvent.don((r, n, s = "default") => {
|
|
3563
|
-
const { id: o, duration:
|
|
3564
|
-
|
|
3575
|
+
const { id: o, duration: h, position: a, rotation: g } = e;
|
|
3576
|
+
Re(i, o, a, g, h ?? r, s);
|
|
3565
3577
|
})), this.dispose(e.resetWithCurrentCameraEvent.don(() => {
|
|
3566
3578
|
Ir(i, e.id);
|
|
3567
3579
|
})), this.dispose(e.captureEvent.don((r, n) => {
|
|
@@ -3655,24 +3667,24 @@ const Ft = class Ft extends I {
|
|
|
3655
3667
|
{
|
|
3656
3668
|
const o = () => {
|
|
3657
3669
|
if (typeof e.url == "string")
|
|
3658
|
-
r.value = E.context.getStrFromEnv(e.url ??
|
|
3670
|
+
r.value = E.context.getStrFromEnv(e.url ?? H.defaults.url);
|
|
3659
3671
|
else {
|
|
3660
|
-
const
|
|
3661
|
-
|
|
3672
|
+
const h = e.url;
|
|
3673
|
+
h.url = E.context.getStrFromEnv(h.url ?? H.defaults.url), r.value = h;
|
|
3662
3674
|
}
|
|
3663
3675
|
};
|
|
3664
3676
|
o(), this.ad(e.urlChanged.don(o));
|
|
3665
3677
|
}
|
|
3666
3678
|
const n = () => {
|
|
3667
|
-
const o = e.colorStops ??
|
|
3679
|
+
const o = e.colorStops ?? H.defaults.colorStops;
|
|
3668
3680
|
i.callUeFunc({
|
|
3669
3681
|
f: "update",
|
|
3670
3682
|
p: {
|
|
3671
3683
|
id: e.id,
|
|
3672
|
-
url: r.value ??
|
|
3673
|
-
currentTime: e.currentTime ??
|
|
3674
|
-
minPropValue: e.minPropValue ??
|
|
3675
|
-
maxPropValue: e.maxPropValue ??
|
|
3684
|
+
url: r.value ?? H.defaults.url,
|
|
3685
|
+
currentTime: e.currentTime ?? H.defaults.currentTime,
|
|
3686
|
+
minPropValue: e.minPropValue ?? H.defaults.minPropValue,
|
|
3687
|
+
maxPropValue: e.maxPropValue ?? H.defaults.maxPropValue,
|
|
3676
3688
|
colorStops: JSON.stringify(o)
|
|
3677
3689
|
}
|
|
3678
3690
|
});
|
|
@@ -3686,7 +3698,7 @@ const Ft = class Ft extends I {
|
|
|
3686
3698
|
this.d(s.don(n)), this.d(e.createdEvent.don(n));
|
|
3687
3699
|
}
|
|
3688
3700
|
};
|
|
3689
|
-
v(Ft, "type", Ft.register("ESUeViewer",
|
|
3701
|
+
v(Ft, "type", Ft.register("ESUeViewer", H.type, Ft));
|
|
3690
3702
|
let li = Ft;
|
|
3691
3703
|
const It = class It extends I {
|
|
3692
3704
|
constructor(e, t) {
|
|
@@ -3719,9 +3731,9 @@ const St = class St extends D {
|
|
|
3719
3731
|
const r = () => {
|
|
3720
3732
|
let s;
|
|
3721
3733
|
try {
|
|
3722
|
-
s = { ...e.strokeStyle ??
|
|
3734
|
+
s = { ...e.strokeStyle ?? Me.defaults.strokeStyle };
|
|
3723
3735
|
} catch (o) {
|
|
3724
|
-
console.error("ESDistanceMeasurement strokeStyle 属性类型错误!", o), s = { ...
|
|
3736
|
+
console.error("ESDistanceMeasurement strokeStyle 属性类型错误!", o), s = { ...Me.defaults.strokeStyle };
|
|
3725
3737
|
}
|
|
3726
3738
|
i.callUeFunc({
|
|
3727
3739
|
f: "update",
|
|
@@ -3736,7 +3748,7 @@ const St = class St extends D {
|
|
|
3736
3748
|
this.d(n.don(r)), this.d(e.createdEvent.don(r));
|
|
3737
3749
|
}
|
|
3738
3750
|
};
|
|
3739
|
-
v(St, "type", St.register("ESUeViewer",
|
|
3751
|
+
v(St, "type", St.register("ESUeViewer", Me.type, St));
|
|
3740
3752
|
let hi = St;
|
|
3741
3753
|
const Tt = class Tt extends Ke {
|
|
3742
3754
|
constructor(e, t) {
|
|
@@ -3747,8 +3759,8 @@ const Tt = class Tt extends Ke {
|
|
|
3747
3759
|
}
|
|
3748
3760
|
};
|
|
3749
3761
|
v(Tt, "type", Tt.register("ESUeViewer", Xr.type, Tt));
|
|
3750
|
-
let
|
|
3751
|
-
const xt = class xt extends
|
|
3762
|
+
let Ne = Tt;
|
|
3763
|
+
const xt = class xt extends Ne {
|
|
3752
3764
|
constructor(e, t) {
|
|
3753
3765
|
if (super(e, t), !t.viewer) {
|
|
3754
3766
|
console.warn("viewer is undefined!");
|
|
@@ -3814,8 +3826,8 @@ const Pt = class Pt extends M {
|
|
|
3814
3826
|
if (typeof e.url == "string")
|
|
3815
3827
|
r.value = E.context.getStrFromEnv(e.url);
|
|
3816
3828
|
else {
|
|
3817
|
-
const
|
|
3818
|
-
|
|
3829
|
+
const h = e.url;
|
|
3830
|
+
h.url = E.context.getStrFromEnv(h.url), r.value = h;
|
|
3819
3831
|
}
|
|
3820
3832
|
};
|
|
3821
3833
|
o(), this.ad(e.urlChanged.don(o));
|
|
@@ -3825,14 +3837,14 @@ const Pt = class Pt extends M {
|
|
|
3825
3837
|
f: "update",
|
|
3826
3838
|
p: {
|
|
3827
3839
|
id: e.id,
|
|
3828
|
-
url: r.value ??
|
|
3829
|
-
treeTypes: e.treeTypes ??
|
|
3830
|
-
xiaoBanWidget: e.xiaoBanWidget ??
|
|
3831
|
-
youShiSZ: e.youShiSZ ??
|
|
3832
|
-
diLei: e.diLei ??
|
|
3833
|
-
senLinLB: e.senLinLB ??
|
|
3834
|
-
labelMaterial: e.labelMaterial ??
|
|
3835
|
-
heightOffset: e.heightOffset ??
|
|
3840
|
+
url: r.value ?? N.defaults.url,
|
|
3841
|
+
treeTypes: e.treeTypes ?? N.defaults.treeTypes,
|
|
3842
|
+
xiaoBanWidget: e.xiaoBanWidget ?? N.defaults.xiaoBanWidget,
|
|
3843
|
+
youShiSZ: e.youShiSZ ?? N.defaults.youShiSZ,
|
|
3844
|
+
diLei: e.diLei ?? N.defaults.diLei,
|
|
3845
|
+
senLinLB: e.senLinLB ?? N.defaults.senLinLB,
|
|
3846
|
+
labelMaterial: e.labelMaterial ?? N.defaults.labelMaterial,
|
|
3847
|
+
heightOffset: e.heightOffset ?? N.defaults.heightOffset
|
|
3836
3848
|
}
|
|
3837
3849
|
});
|
|
3838
3850
|
}, s = this.dv(P(
|
|
@@ -3848,51 +3860,51 @@ const Pt = class Pt extends M {
|
|
|
3848
3860
|
this.d(s.don(n)), this.d(e.createdEvent.don(n));
|
|
3849
3861
|
}
|
|
3850
3862
|
};
|
|
3851
|
-
v(Pt, "type", Pt.register("ESUeViewer",
|
|
3863
|
+
v(Pt, "type", Pt.register("ESUeViewer", N.type, Pt));
|
|
3852
3864
|
let wi = Pt;
|
|
3853
|
-
const kt = class kt extends
|
|
3865
|
+
const kt = class kt extends G {
|
|
3854
3866
|
constructor(e, t) {
|
|
3855
|
-
super(e, t), this.ad(new L(e.renderInUEChanged, () => e.renderInUE ? new
|
|
3867
|
+
super(e, t), this.ad(new L(e.renderInUEChanged, () => e.renderInUE ? new Co(e, t) : new mo(e, t)));
|
|
3856
3868
|
}
|
|
3857
3869
|
};
|
|
3858
|
-
v(kt, "type", kt.register("ESUeViewer",
|
|
3870
|
+
v(kt, "type", kt.register("ESUeViewer", Ce.type, kt));
|
|
3859
3871
|
let yi = kt;
|
|
3860
|
-
class
|
|
3872
|
+
class mo extends m {
|
|
3861
3873
|
constructor(t, i) {
|
|
3862
3874
|
super();
|
|
3863
|
-
v(this, "_screenPosition", this.disposeVar(
|
|
3875
|
+
v(this, "_screenPosition", this.disposeVar(fr(void 0)));
|
|
3864
3876
|
const r = i.viewer;
|
|
3865
3877
|
if (!r) {
|
|
3866
3878
|
console.warn("viewer is undefined!");
|
|
3867
3879
|
return;
|
|
3868
3880
|
}
|
|
3869
|
-
const n = this.disposeVar(new
|
|
3881
|
+
const n = this.disposeVar(new pr());
|
|
3870
3882
|
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(() => {
|
|
3871
3883
|
dt(r, n.id);
|
|
3872
3884
|
})), this.dispose(t.calcFlyInParamEvent.disposableOn(async () => {
|
|
3873
3885
|
if (!i.actived) return;
|
|
3874
|
-
const
|
|
3875
|
-
if (!
|
|
3876
|
-
const { position: a, rotation: g } =
|
|
3886
|
+
const h = await i.getCurrentCameraInfo();
|
|
3887
|
+
if (!h) return;
|
|
3888
|
+
const { position: a, rotation: g } = h;
|
|
3877
3889
|
t.flyInParam = { position: a, rotation: g, flyDuration: 1 };
|
|
3878
|
-
})), this.dispose(t.smoothMoveEvent.disposableOn((
|
|
3879
|
-
|
|
3880
|
-
})), this.dispose(t.smoothMoveWithRotationEvent.disposableOn((
|
|
3881
|
-
|
|
3882
|
-
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((
|
|
3883
|
-
|
|
3884
|
-
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((
|
|
3885
|
-
|
|
3886
|
-
})), this.dispose(t.flyToEvent.disposableOn((
|
|
3887
|
-
n.flyTo(
|
|
3888
|
-
})), this.dispose(t.flyInEvent.don((
|
|
3889
|
-
n.flyIn(
|
|
3890
|
+
})), this.dispose(t.smoothMoveEvent.disposableOn((h, a) => {
|
|
3891
|
+
De(r, n.id, h, a);
|
|
3892
|
+
})), this.dispose(t.smoothMoveWithRotationEvent.disposableOn((h, a, g) => {
|
|
3893
|
+
Le(r, n.id, h, a, g);
|
|
3894
|
+
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((h, a, g, p) => {
|
|
3895
|
+
Pe(r, n.id, h, a, p, g);
|
|
3896
|
+
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((h, a, g, p, d) => {
|
|
3897
|
+
ke(r, n.id, h, a, g, p, d);
|
|
3898
|
+
})), this.dispose(t.flyToEvent.disposableOn((h, a) => {
|
|
3899
|
+
n.flyTo(h);
|
|
3900
|
+
})), this.dispose(t.flyInEvent.don((h) => {
|
|
3901
|
+
n.flyIn(h);
|
|
3890
3902
|
}));
|
|
3891
3903
|
const s = this._screenPosition, o = this.disposeVar(new He());
|
|
3892
3904
|
o.parentID = t.id, i.add(o), this.dispose(() => i.delete(o)), this.dispose(k([o, "allowPicking"], [t, "allowPicking"]));
|
|
3893
3905
|
{
|
|
3894
|
-
const
|
|
3895
|
-
t.show ?
|
|
3906
|
+
const h = this.disposeVar(be()), a = () => {
|
|
3907
|
+
t.show ? h.restart(void 0, async () => {
|
|
3896
3908
|
if (!t.position) return;
|
|
3897
3909
|
const g = await i.lonLatAltToScreenPosition(t.position);
|
|
3898
3910
|
if (!this.isDestroyed())
|
|
@@ -3902,19 +3914,19 @@ class Fo extends m {
|
|
|
3902
3914
|
const [p, d] = g;
|
|
3903
3915
|
p === -1 && d === -1 ? this._screenPosition.value = void 0 : this._screenPosition.value = [p, d];
|
|
3904
3916
|
}
|
|
3905
|
-
}) :
|
|
3917
|
+
}) : h.cancel();
|
|
3906
3918
|
};
|
|
3907
3919
|
a(), this.dispose(t.showChanged.disposableOn(a));
|
|
3908
3920
|
}
|
|
3909
3921
|
{
|
|
3910
|
-
const
|
|
3911
|
-
constructor(d,
|
|
3922
|
+
const h = () => class extends m {
|
|
3923
|
+
constructor(d, u, c) {
|
|
3912
3924
|
if (super(), this._subContainer = d, !c) return;
|
|
3913
3925
|
if (!t.instanceClass)
|
|
3914
3926
|
throw new Error("!sceneObject.instanceClass");
|
|
3915
|
-
const f = new
|
|
3927
|
+
const f = new Yn(), w = f.element;
|
|
3916
3928
|
this._subContainer.appendChild(w), this.dispose(() => this._subContainer.removeChild(w)), w.onclick = (y) => {
|
|
3917
|
-
(t.allowPicking ?? !1) && t.pickedEvent.emit(new
|
|
3929
|
+
(t.allowPicking ?? !1) && t.pickedEvent.emit(new Ae(
|
|
3918
3930
|
{ div: w, pointerEvent: y },
|
|
3919
3931
|
t,
|
|
3920
3932
|
void 0,
|
|
@@ -3943,14 +3955,14 @@ class Fo extends m {
|
|
|
3943
3955
|
}
|
|
3944
3956
|
{
|
|
3945
3957
|
const y = () => {
|
|
3946
|
-
const [x, C] = t.anchor ??
|
|
3958
|
+
const [x, C] = t.anchor ?? Ce.defaults.anchor;
|
|
3947
3959
|
f.originRatioX = x, f.originRatioY = C;
|
|
3948
3960
|
};
|
|
3949
3961
|
y(), this.dispose(t.anchorChanged.disposableOn(y));
|
|
3950
3962
|
}
|
|
3951
3963
|
{
|
|
3952
3964
|
const y = () => {
|
|
3953
|
-
f.opacity = t.opacity ??
|
|
3965
|
+
f.opacity = t.opacity ?? Ce.defaults.opacity;
|
|
3954
3966
|
};
|
|
3955
3967
|
y(), this.dispose(t.opacityChanged.disposableOn(y));
|
|
3956
3968
|
}
|
|
@@ -3958,7 +3970,7 @@ class Fo extends m {
|
|
|
3958
3970
|
}
|
|
3959
3971
|
}, a = () => {
|
|
3960
3972
|
try {
|
|
3961
|
-
t.instanceClass ? o.instanceClass =
|
|
3973
|
+
t.instanceClass ? o.instanceClass = h() : o.instanceClass = void 0;
|
|
3962
3974
|
} catch (p) {
|
|
3963
3975
|
console.error(p);
|
|
3964
3976
|
}
|
|
@@ -3985,12 +3997,12 @@ class Fo extends m {
|
|
|
3985
3997
|
this._screenPosition.value = t;
|
|
3986
3998
|
}
|
|
3987
3999
|
}
|
|
3988
|
-
class
|
|
4000
|
+
class Co extends m {
|
|
3989
4001
|
constructor(t, i) {
|
|
3990
4002
|
super();
|
|
3991
4003
|
v(this, "_imageLabel");
|
|
3992
4004
|
v(this, "_hasClassDivAndPos", {});
|
|
3993
|
-
this._imageLabel = this.dv(new
|
|
4005
|
+
this._imageLabel = this.dv(new vr()), this._imageLabel.isHoverZoom = !1, this._imageLabel.parentID = t.id;
|
|
3994
4006
|
const r = i.viewer;
|
|
3995
4007
|
if (!r) {
|
|
3996
4008
|
console.warn("viewer is undefined!");
|
|
@@ -4004,11 +4016,11 @@ class Io extends m {
|
|
|
4004
4016
|
if (!t.instanceClass)
|
|
4005
4017
|
throw new Error("!sceneObject.instanceClass");
|
|
4006
4018
|
const a = document.createElement("div"), g = this.dv(new t.instanceClass(a, t, i))._container;
|
|
4007
|
-
if (g.style.opacity = t.opacity.toString() ??
|
|
4019
|
+
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)) {
|
|
4008
4020
|
document.body.appendChild(g);
|
|
4009
4021
|
let d = g ? g.querySelectorAll("*[class]") : [];
|
|
4010
|
-
for (let
|
|
4011
|
-
const c = d[
|
|
4022
|
+
for (let u = 0; u < d.length; u++) {
|
|
4023
|
+
const c = d[u];
|
|
4012
4024
|
var p = c.getBoundingClientRect();
|
|
4013
4025
|
this._hasClassDivAndPos[c.className] = [
|
|
4014
4026
|
c.offsetLeft,
|
|
@@ -4018,7 +4030,7 @@ class Io extends m {
|
|
|
4018
4030
|
];
|
|
4019
4031
|
}
|
|
4020
4032
|
}
|
|
4021
|
-
|
|
4033
|
+
qn(g, {
|
|
4022
4034
|
backgroundColor: null,
|
|
4023
4035
|
allowTaint: !0,
|
|
4024
4036
|
useCORS: !0,
|
|
@@ -4038,11 +4050,11 @@ class Io extends m {
|
|
|
4038
4050
|
}
|
|
4039
4051
|
};
|
|
4040
4052
|
o();
|
|
4041
|
-
const
|
|
4053
|
+
const h = this.dv(P(
|
|
4042
4054
|
t.instanceClassChanged,
|
|
4043
4055
|
t.opacityChanged
|
|
4044
4056
|
));
|
|
4045
|
-
this.d(
|
|
4057
|
+
this.d(h.don(o));
|
|
4046
4058
|
}
|
|
4047
4059
|
{
|
|
4048
4060
|
const s = () => {
|
|
@@ -4054,32 +4066,32 @@ class Io extends m {
|
|
|
4054
4066
|
n.automaticLanding();
|
|
4055
4067
|
})), this.d(i.widgetEvent.don((s) => {
|
|
4056
4068
|
if (s.objId !== this._imageLabel.id) return;
|
|
4057
|
-
const { type: o, add:
|
|
4058
|
-
if (o === "leftClick" &&
|
|
4059
|
-
const a = (
|
|
4069
|
+
const { type: o, add: h } = s;
|
|
4070
|
+
if (o === "leftClick" && h) {
|
|
4071
|
+
const a = (h == null ? void 0 : h.classNames) ?? [], g = Object.keys(this._hasClassDivAndPos);
|
|
4060
4072
|
for (let p = 0; p < g.length; p++) {
|
|
4061
4073
|
const d = g[p];
|
|
4062
|
-
let
|
|
4063
|
-
|
|
4074
|
+
let u = this._hasClassDivAndPos[d];
|
|
4075
|
+
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(d);
|
|
4064
4076
|
}
|
|
4065
|
-
|
|
4077
|
+
h.classNames = a;
|
|
4066
4078
|
}
|
|
4067
|
-
t.widgetEvent.emit({ type: o, add:
|
|
4079
|
+
t.widgetEvent.emit({ type: o, add: h });
|
|
4068
4080
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
4069
4081
|
dt(r, n.id);
|
|
4070
4082
|
})), this.d(t.calcFlyInParamEvent.don(() => {
|
|
4071
4083
|
const s = i.getCurrentCameraInfo();
|
|
4072
4084
|
if (!s) return;
|
|
4073
|
-
const { position: o, rotation:
|
|
4074
|
-
t.flyInParam = { position: o, rotation:
|
|
4085
|
+
const { position: o, rotation: h } = s;
|
|
4086
|
+
t.flyInParam = { position: o, rotation: h, flyDuration: 1 };
|
|
4075
4087
|
})), this.d(t.smoothMoveEvent.don((s, o) => {
|
|
4076
|
-
|
|
4077
|
-
})), this.d(t.smoothMoveWithRotationEvent.don((s, o,
|
|
4078
|
-
|
|
4079
|
-
})), this.d(t.smoothMoveOnGroundEvent.don((s, o,
|
|
4080
|
-
|
|
4081
|
-
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o,
|
|
4082
|
-
|
|
4088
|
+
De(r, n.id, s, o);
|
|
4089
|
+
})), this.d(t.smoothMoveWithRotationEvent.don((s, o, h) => {
|
|
4090
|
+
Le(r, n.id, s, o, h);
|
|
4091
|
+
})), this.d(t.smoothMoveOnGroundEvent.don((s, o, h, a) => {
|
|
4092
|
+
Pe(r, n.id, s, o, a, h);
|
|
4093
|
+
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, h, a, g) => {
|
|
4094
|
+
ke(r, n.id, s, o, h, a, g);
|
|
4083
4095
|
})), this.d(t.flyToEvent.don((s, o) => {
|
|
4084
4096
|
n.flyTo(s);
|
|
4085
4097
|
})), this.d(t.flyInEvent.don((s) => {
|
|
@@ -4128,7 +4140,7 @@ const Bt = class Bt extends D {
|
|
|
4128
4140
|
}
|
|
4129
4141
|
};
|
|
4130
4142
|
v(Bt, "type", Bt.register("ESUeViewer", Or.type, Bt));
|
|
4131
|
-
let
|
|
4143
|
+
let ze = Bt;
|
|
4132
4144
|
const _t = class _t extends D {
|
|
4133
4145
|
constructor(e, t) {
|
|
4134
4146
|
if (super(e, t), !t.viewer) {
|
|
@@ -4158,11 +4170,11 @@ const Y = class Y extends I {
|
|
|
4158
4170
|
return;
|
|
4159
4171
|
}
|
|
4160
4172
|
this.d(e.setNodePositionEvent.don((r, n) => {
|
|
4161
|
-
|
|
4173
|
+
as(i, e.id, r, n);
|
|
4162
4174
|
})), this.d(e.setNodeRotationEvent.don((r, n) => {
|
|
4163
|
-
|
|
4175
|
+
ds(i, e.id, r, n);
|
|
4164
4176
|
})), this.d(e.setNodeScaleEvent.don((r, n) => {
|
|
4165
|
-
|
|
4177
|
+
ls(i, e.id, r, n);
|
|
4166
4178
|
}));
|
|
4167
4179
|
}
|
|
4168
4180
|
};
|
|
@@ -4171,7 +4183,7 @@ v(Y, "forceUeUpdateProps", [
|
|
|
4171
4183
|
"url"
|
|
4172
4184
|
]), v(Y, "propValFuncs", {
|
|
4173
4185
|
...I.propValFuncs,
|
|
4174
|
-
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(
|
|
4186
|
+
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(Fe(e)) : (e.url = E.context.getStrFromEnv(Fe(e.url)), e),
|
|
4175
4187
|
czmMaximumScale: null,
|
|
4176
4188
|
czmMinimumPixelSize: null,
|
|
4177
4189
|
czmNativeScale: null,
|
|
@@ -4194,7 +4206,7 @@ const Wt = class Wt extends I {
|
|
|
4194
4206
|
console.warn("viewer is undefined!");
|
|
4195
4207
|
return;
|
|
4196
4208
|
}
|
|
4197
|
-
const r = async (s, o,
|
|
4209
|
+
const r = async (s, o, h, a) => {
|
|
4198
4210
|
const { viewer: g } = s;
|
|
4199
4211
|
if (!g) {
|
|
4200
4212
|
console.error("AIMoveTo: ueViewer.viewer is undefined");
|
|
@@ -4202,7 +4214,7 @@ const Wt = class Wt extends I {
|
|
|
4202
4214
|
}
|
|
4203
4215
|
const p = await g.callUeFunc({
|
|
4204
4216
|
f: "AIMoveTo",
|
|
4205
|
-
p: { id: o, Destination:
|
|
4217
|
+
p: { id: o, Destination: h, Time: a }
|
|
4206
4218
|
});
|
|
4207
4219
|
return p.error && console.error("AIMoveTo:", p.error), p;
|
|
4208
4220
|
};
|
|
@@ -4210,12 +4222,12 @@ const Wt = class Wt extends I {
|
|
|
4210
4222
|
r(t, e.id, s, o);
|
|
4211
4223
|
}));
|
|
4212
4224
|
const n = async (s, o) => {
|
|
4213
|
-
const { viewer:
|
|
4214
|
-
if (!
|
|
4225
|
+
const { viewer: h } = s;
|
|
4226
|
+
if (!h) {
|
|
4215
4227
|
console.error("StopAIMove: ueViewer.viewer is undefined");
|
|
4216
4228
|
return;
|
|
4217
4229
|
}
|
|
4218
|
-
const a = await
|
|
4230
|
+
const a = await h.callUeFunc({
|
|
4219
4231
|
f: "StopAIMove",
|
|
4220
4232
|
p: { id: o }
|
|
4221
4233
|
});
|
|
@@ -4228,7 +4240,7 @@ const Wt = class Wt extends I {
|
|
|
4228
4240
|
};
|
|
4229
4241
|
v(Wt, "type", Wt.register("ESUeViewer", nn.type, Wt));
|
|
4230
4242
|
let Si = Wt;
|
|
4231
|
-
const Z = class Z extends
|
|
4243
|
+
const Z = class Z extends z {
|
|
4232
4244
|
constructor(e, t) {
|
|
4233
4245
|
if (super(e, t), !t.viewer) {
|
|
4234
4246
|
console.warn("viewer is undefined!");
|
|
@@ -4237,12 +4249,12 @@ const Z = class Z extends N {
|
|
|
4237
4249
|
e.anchor = [0.5, 1];
|
|
4238
4250
|
}
|
|
4239
4251
|
};
|
|
4240
|
-
v(Z, "type", Z.register("ESUeViewer",
|
|
4241
|
-
...
|
|
4252
|
+
v(Z, "type", Z.register("ESUeViewer", vr.type, Z)), v(Z, "forceUeUpdateProps", [
|
|
4253
|
+
...z.forceUeUpdateProps,
|
|
4242
4254
|
"url"
|
|
4243
4255
|
]), v(Z, "propValFuncs", {
|
|
4244
|
-
...
|
|
4245
|
-
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(
|
|
4256
|
+
...z.propValFuncs,
|
|
4257
|
+
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(Fe(e)) : (e.url = E.context.getStrFromEnv(Fe(e.url)), e)
|
|
4246
4258
|
});
|
|
4247
4259
|
let Ti = Z;
|
|
4248
4260
|
const At = class At extends I {
|
|
@@ -4315,7 +4327,7 @@ const Jt = class Jt extends D {
|
|
|
4315
4327
|
};
|
|
4316
4328
|
v(Jt, "type", Jt.register("ESUeViewer", un.type, Jt));
|
|
4317
4329
|
let Bi = Jt;
|
|
4318
|
-
const Gt = class Gt extends
|
|
4330
|
+
const Gt = class Gt extends ze {
|
|
4319
4331
|
constructor(e, t) {
|
|
4320
4332
|
if (super(e, t), !t.viewer) {
|
|
4321
4333
|
console.warn("viewer is undefined!");
|
|
@@ -4325,7 +4337,7 @@ const Gt = class Gt extends Ue {
|
|
|
4325
4337
|
};
|
|
4326
4338
|
v(Gt, "type", Gt.register("ESUeViewer", hn.type, Gt));
|
|
4327
4339
|
let _i = Gt;
|
|
4328
|
-
const Kt = class Kt extends
|
|
4340
|
+
const Kt = class Kt extends Ue {
|
|
4329
4341
|
constructor(e, t) {
|
|
4330
4342
|
super(e, t);
|
|
4331
4343
|
const i = t.viewer;
|
|
@@ -4335,16 +4347,16 @@ const Kt = class Kt extends We {
|
|
|
4335
4347
|
}
|
|
4336
4348
|
this.d(e.highlightFeatureEvent.don((r) => {
|
|
4337
4349
|
const n = typeof r == "number" ? r.toString() : r;
|
|
4338
|
-
|
|
4350
|
+
rs(i, e.id, n);
|
|
4339
4351
|
})), this.d(e.highlightFeatureAndFlyToEvent.don((r, n, s, o) => {
|
|
4340
|
-
const
|
|
4341
|
-
|
|
4352
|
+
const h = typeof r == "number" ? r.toString() : r;
|
|
4353
|
+
ns(i, e.id, h, o ?? 1);
|
|
4342
4354
|
})), this.d(e.setLayerVisibleEvent.don((r, n) => {
|
|
4343
4355
|
let s = "";
|
|
4344
|
-
typeof n != "string" ? s = JSON.stringify(n) : s = n,
|
|
4356
|
+
typeof n != "string" ? s = JSON.stringify(n) : s = n, ss(i, e.id, s);
|
|
4345
4357
|
})), this.d(e.setLayerColorEvent.don((r, n) => {
|
|
4346
4358
|
let s = "";
|
|
4347
|
-
typeof n != "string" ? s = JSON.stringify(n) : s = n,
|
|
4359
|
+
typeof n != "string" ? s = JSON.stringify(n) : s = n, os(i, e.id, s);
|
|
4348
4360
|
}));
|
|
4349
4361
|
}
|
|
4350
4362
|
};
|
|
@@ -4360,7 +4372,7 @@ const Xt = class Xt extends $ {
|
|
|
4360
4372
|
};
|
|
4361
4373
|
v(Xt, "type", Xt.register("ESUeViewer", vn.type, Xt));
|
|
4362
4374
|
let $i = Xt;
|
|
4363
|
-
const Yt = class Yt extends
|
|
4375
|
+
const Yt = class Yt extends z {
|
|
4364
4376
|
constructor(e, t) {
|
|
4365
4377
|
super(e, t);
|
|
4366
4378
|
const i = t.viewer;
|
|
@@ -4463,36 +4475,36 @@ const Vt = class Vt extends at {
|
|
|
4463
4475
|
{
|
|
4464
4476
|
const r = (o) => {
|
|
4465
4477
|
o = o.toLocaleLowerCase();
|
|
4466
|
-
let
|
|
4478
|
+
let h = [255, 255, 255, 1];
|
|
4467
4479
|
if (o.startsWith("#")) {
|
|
4468
4480
|
if (o.length === 4) {
|
|
4469
4481
|
let a = parseInt(o[1] + o[1], 16), g = parseInt(o[2] + o[2], 16), p = parseInt(o[3] + o[3], 16);
|
|
4470
|
-
|
|
4482
|
+
h = [a, g, p, 1];
|
|
4471
4483
|
} else if (o.length === 7) {
|
|
4472
4484
|
let a = parseInt(o.substring(1, 3), 16), g = parseInt(o.substring(3, 5), 16), p = parseInt(o.substring(5, 7), 16);
|
|
4473
|
-
|
|
4485
|
+
h = [a, g, p, 1];
|
|
4474
4486
|
}
|
|
4475
4487
|
} else if (o.startsWith("rgba")) {
|
|
4476
4488
|
let a = o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);
|
|
4477
4489
|
if (a) {
|
|
4478
|
-
let g = parseInt(a[1]), p = parseInt(a[2]), d = parseInt(a[3]),
|
|
4479
|
-
|
|
4490
|
+
let g = parseInt(a[1]), p = parseInt(a[2]), d = parseInt(a[3]), u = parseFloat(a[4]);
|
|
4491
|
+
h = [g, p, d, u];
|
|
4480
4492
|
}
|
|
4481
4493
|
} else if (o.startsWith("rgb")) {
|
|
4482
4494
|
let a = o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
|
4483
4495
|
if (a) {
|
|
4484
4496
|
let g = parseInt(a[1]), p = parseInt(a[2]), d = parseInt(a[3]);
|
|
4485
|
-
|
|
4497
|
+
h = [g, p, d, 1];
|
|
4486
4498
|
}
|
|
4487
4499
|
} else
|
|
4488
4500
|
console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");
|
|
4489
|
-
return [
|
|
4501
|
+
return [h[0] / 255, h[1] / 255, h[2] / 255, h[3]];
|
|
4490
4502
|
}, n = () => {
|
|
4491
4503
|
const o = e.layerConfig;
|
|
4492
4504
|
if (!o) return;
|
|
4493
|
-
const
|
|
4505
|
+
const h = [];
|
|
4494
4506
|
o.forEach((a) => {
|
|
4495
|
-
o.filter((p) => p.dataset == a.dataset).length == 1 ?
|
|
4507
|
+
o.filter((p) => p.dataset == a.dataset).length == 1 ? h.push({
|
|
4496
4508
|
condition: [{
|
|
4497
4509
|
field: "dataset",
|
|
4498
4510
|
op: "==",
|
|
@@ -4500,7 +4512,7 @@ const Vt = class Vt extends at {
|
|
|
4500
4512
|
}],
|
|
4501
4513
|
color: r(a.value.color ?? "rgb(255,255,255)"),
|
|
4502
4514
|
show: a.value.visible
|
|
4503
|
-
}) :
|
|
4515
|
+
}) : h.push({
|
|
4504
4516
|
condition: [{
|
|
4505
4517
|
field: "layer",
|
|
4506
4518
|
op: "==",
|
|
@@ -4513,7 +4525,7 @@ const Vt = class Vt extends at {
|
|
|
4513
4525
|
color: r(a.value.color ?? "rgb(255,255,255)"),
|
|
4514
4526
|
show: a.value.visible
|
|
4515
4527
|
});
|
|
4516
|
-
}), e.setFeatureStyle(
|
|
4528
|
+
}), e.setFeatureStyle(h);
|
|
4517
4529
|
};
|
|
4518
4530
|
n();
|
|
4519
4531
|
const s = this.dv(P(
|
|
@@ -4606,7 +4618,7 @@ const ee = class ee extends $ {
|
|
|
4606
4618
|
};
|
|
4607
4619
|
v(ee, "type", ee.register("ESUeViewer", kn.type, ee));
|
|
4608
4620
|
let Xi = ee;
|
|
4609
|
-
const ie = class ie extends
|
|
4621
|
+
const ie = class ie extends z {
|
|
4610
4622
|
constructor(e, t) {
|
|
4611
4623
|
if (super(e, t), !t.viewer) {
|
|
4612
4624
|
console.warn("viewer is undefined!");
|
|
@@ -4614,9 +4626,9 @@ const ie = class ie extends N {
|
|
|
4614
4626
|
}
|
|
4615
4627
|
}
|
|
4616
4628
|
};
|
|
4617
|
-
v(ie, "type", ie.register("ESUeViewer",
|
|
4629
|
+
v(ie, "type", ie.register("ESUeViewer", pr.type, ie));
|
|
4618
4630
|
let Yi = ie;
|
|
4619
|
-
const nt = class nt extends
|
|
4631
|
+
const nt = class nt extends z {
|
|
4620
4632
|
constructor(e, t) {
|
|
4621
4633
|
super(e, t);
|
|
4622
4634
|
const i = t.viewer;
|
|
@@ -4631,7 +4643,7 @@ const nt = class nt extends N {
|
|
|
4631
4643
|
}
|
|
4632
4644
|
};
|
|
4633
4645
|
v(nt, "type", nt.register("ESUeViewer", Dn.type, nt)), v(nt, "propValFuncs", {
|
|
4634
|
-
...
|
|
4646
|
+
...z.propValFuncs,
|
|
4635
4647
|
info: (e) => JSON.stringify(e ?? {})
|
|
4636
4648
|
});
|
|
4637
4649
|
let Zi = nt;
|
|
@@ -4650,7 +4662,7 @@ const qi = (l) => {
|
|
|
4650
4662
|
default:
|
|
4651
4663
|
return "未知错误";
|
|
4652
4664
|
}
|
|
4653
|
-
},
|
|
4665
|
+
}, Fo = (l) => {
|
|
4654
4666
|
switch (l) {
|
|
4655
4667
|
case 0:
|
|
4656
4668
|
return "创建成功";
|
|
@@ -4661,7 +4673,7 @@ const qi = (l) => {
|
|
|
4661
4673
|
default:
|
|
4662
4674
|
return "未知错误";
|
|
4663
4675
|
}
|
|
4664
|
-
}, re = class re extends
|
|
4676
|
+
}, re = class re extends G {
|
|
4665
4677
|
constructor(e, t) {
|
|
4666
4678
|
super(e, t);
|
|
4667
4679
|
const i = t.viewer;
|
|
@@ -4670,7 +4682,7 @@ const qi = (l) => {
|
|
|
4670
4682
|
return;
|
|
4671
4683
|
}
|
|
4672
4684
|
this.d(() => {
|
|
4673
|
-
|
|
4685
|
+
Fr(i, e.id);
|
|
4674
4686
|
});
|
|
4675
4687
|
const r = async () => {
|
|
4676
4688
|
a() || await i.callUeFunc({
|
|
@@ -4680,8 +4692,8 @@ const qi = (l) => {
|
|
|
4680
4692
|
name: e.name,
|
|
4681
4693
|
show: e.show,
|
|
4682
4694
|
rotation: e.rotation,
|
|
4683
|
-
flyToParam: e.flyToParam ??
|
|
4684
|
-
flyInParam: e.flyInParam ??
|
|
4695
|
+
flyToParam: e.flyToParam ?? $e.defaultFlyToParam,
|
|
4696
|
+
flyInParam: e.flyInParam ?? $e.defaultFlyInParam,
|
|
4685
4697
|
highlight: e.highlight,
|
|
4686
4698
|
collision: e.collision,
|
|
4687
4699
|
scale: e.scale,
|
|
@@ -4704,7 +4716,7 @@ const qi = (l) => {
|
|
|
4704
4716
|
));
|
|
4705
4717
|
this.d(n.don(r)), this.d(e.flushEvent.don(() => n.flush()));
|
|
4706
4718
|
let s, o;
|
|
4707
|
-
const
|
|
4719
|
+
const h = async () => {
|
|
4708
4720
|
a() || (await i.callUeFunc({
|
|
4709
4721
|
f: "update",
|
|
4710
4722
|
p: {
|
|
@@ -4713,8 +4725,8 @@ const qi = (l) => {
|
|
|
4713
4725
|
}
|
|
4714
4726
|
}), (t.debug ?? !1) && console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`));
|
|
4715
4727
|
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1, g = async () => {
|
|
4716
|
-
const { id: d } = e,
|
|
4717
|
-
|
|
4728
|
+
const { id: d } = e, u = await t.unBindActorByID(d);
|
|
4729
|
+
u && u.error !== "" && console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${u.error}`), s = void 0;
|
|
4718
4730
|
const c = await i.callUeFunc({ f: "destroy", p: { id: d } });
|
|
4719
4731
|
if (c && c.error !== "") {
|
|
4720
4732
|
console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${c.error}`);
|
|
@@ -4730,7 +4742,7 @@ const qi = (l) => {
|
|
|
4730
4742
|
e.actorClassChanged,
|
|
4731
4743
|
e.actorTagChanged
|
|
4732
4744
|
// sceneObject.positionChanged,
|
|
4733
|
-
)),
|
|
4745
|
+
)), u = async () => {
|
|
4734
4746
|
e.actorTag !== "" ? p.value = {
|
|
4735
4747
|
type: "ActorTag",
|
|
4736
4748
|
actorTag: e.actorTag
|
|
@@ -4741,10 +4753,10 @@ const qi = (l) => {
|
|
|
4741
4753
|
// position: sceneObject.position,
|
|
4742
4754
|
};
|
|
4743
4755
|
};
|
|
4744
|
-
|
|
4756
|
+
u(), this.d(d.don(u)), this.d(e.flushEvent.don(() => d.flush()));
|
|
4745
4757
|
}
|
|
4746
4758
|
{
|
|
4747
|
-
const d = this.dv(
|
|
4759
|
+
const d = this.dv(Te(async (c) => {
|
|
4748
4760
|
if (await c.promise(g()), p.value.type === "ActorTag") {
|
|
4749
4761
|
const { actorTag: f } = p.value;
|
|
4750
4762
|
await c.promise(g());
|
|
@@ -4780,7 +4792,7 @@ const qi = (l) => {
|
|
|
4780
4792
|
if (w.re.type === 0)
|
|
4781
4793
|
e.lastActorStatus = "created", o = f;
|
|
4782
4794
|
else {
|
|
4783
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${f},${
|
|
4795
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${f},${Fo(w.re.type)}`);
|
|
4784
4796
|
return;
|
|
4785
4797
|
}
|
|
4786
4798
|
} catch (w) {
|
|
@@ -4788,55 +4800,55 @@ const qi = (l) => {
|
|
|
4788
4800
|
return;
|
|
4789
4801
|
}
|
|
4790
4802
|
}
|
|
4791
|
-
await c.promise(r()), await c.promise(
|
|
4792
|
-
})),
|
|
4803
|
+
await c.promise(r()), await c.promise(h());
|
|
4804
|
+
})), u = async () => {
|
|
4793
4805
|
d.restart();
|
|
4794
4806
|
};
|
|
4795
|
-
|
|
4807
|
+
u(), this.d(p.changed.don(u));
|
|
4796
4808
|
}
|
|
4797
|
-
this.d(e.positionChanged.don(
|
|
4809
|
+
this.d(e.positionChanged.don(h)), this.d(e.callFunctionEvent.don(async (d, u) => {
|
|
4798
4810
|
if (a()) {
|
|
4799
4811
|
e.__callFunctionResultEvent.emit(void 0);
|
|
4800
4812
|
return;
|
|
4801
4813
|
}
|
|
4802
|
-
const c = await Er(i, e.id, d,
|
|
4814
|
+
const c = await Er(i, e.id, d, u);
|
|
4803
4815
|
e.__callFunctionResultEvent.emit(c);
|
|
4804
|
-
})), this.d(e.smoothMoveEvent.don((d,
|
|
4805
|
-
a() ||
|
|
4806
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((d,
|
|
4807
|
-
a() ||
|
|
4808
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((d,
|
|
4809
|
-
a() ||
|
|
4810
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((d,
|
|
4811
|
-
a() ||
|
|
4816
|
+
})), this.d(e.smoothMoveEvent.don((d, u) => {
|
|
4817
|
+
a() || De(i, e.id, d, u);
|
|
4818
|
+
})), this.d(e.smoothMoveWithRotationEvent.don((d, u, c) => {
|
|
4819
|
+
a() || Le(i, e.id, d, u, c);
|
|
4820
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((d, u, c, f) => {
|
|
4821
|
+
a() || Pe(i, e.id, d, u, f, c);
|
|
4822
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((d, u, c, f, w) => {
|
|
4823
|
+
a() || ke(i, e.id, d, u, c, f, w);
|
|
4812
4824
|
})), this.d(e.automaticLandingEvent.don((d) => {
|
|
4813
4825
|
if (a()) return;
|
|
4814
|
-
const
|
|
4826
|
+
const u = [e.position[0], e.position[1]];
|
|
4815
4827
|
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((c) => {
|
|
4816
|
-
c !== null && (e.position = [...
|
|
4828
|
+
c !== null && (e.position = [...u, c], e.collision = d);
|
|
4817
4829
|
});
|
|
4818
|
-
})), this.d(e.flyToEvent.don(async (d,
|
|
4830
|
+
})), this.d(e.flyToEvent.don(async (d, u) => {
|
|
4819
4831
|
if (a()) return;
|
|
4820
4832
|
const c = await we(i, e.id, d);
|
|
4821
4833
|
let f = "over";
|
|
4822
|
-
c === void 0 ? f = "error" : c.endType === 0 ? f = "over" : c.endType === 1 && (f = "cancelled"), e.flyOverEvent.emit(
|
|
4834
|
+
c === void 0 ? f = "error" : c.endType === 0 ? f = "over" : c.endType === 1 && (f = "cancelled"), e.flyOverEvent.emit(u, f, t);
|
|
4823
4835
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
4824
4836
|
a() || dt(i, e.id);
|
|
4825
4837
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
4826
4838
|
if (!t.actived) return;
|
|
4827
4839
|
const d = await t.getCurrentCameraInfo();
|
|
4828
4840
|
if (!d) return;
|
|
4829
|
-
const { position:
|
|
4830
|
-
e.flyInParam = { position:
|
|
4841
|
+
const { position: u, rotation: c } = d;
|
|
4842
|
+
e.flyInParam = { position: u, rotation: c, flyDuration: 1 };
|
|
4831
4843
|
})), this.d(t.propChanged.don((d) => {
|
|
4832
|
-
a() || d.objId === e.id && Object.keys(d.props).forEach((
|
|
4833
|
-
const c = d.props[
|
|
4834
|
-
e[
|
|
4844
|
+
a() || d.objId === e.id && Object.keys(d.props).forEach((u) => {
|
|
4845
|
+
const c = d.props[u] === null ? void 0 : d.props[u];
|
|
4846
|
+
e[u] = c;
|
|
4835
4847
|
});
|
|
4836
4848
|
}));
|
|
4837
4849
|
}
|
|
4838
4850
|
};
|
|
4839
|
-
v(re, "type", re.register("ESUeViewer",
|
|
4851
|
+
v(re, "type", re.register("ESUeViewer", $e.type, re));
|
|
4840
4852
|
let Qi = re;
|
|
4841
4853
|
const ne = class ne extends I {
|
|
4842
4854
|
constructor(e, t) {
|
|
@@ -4846,7 +4858,7 @@ const ne = class ne extends I {
|
|
|
4846
4858
|
}
|
|
4847
4859
|
}
|
|
4848
4860
|
};
|
|
4849
|
-
v(ne, "type", ne.register("ESUeViewer",
|
|
4861
|
+
v(ne, "type", ne.register("ESUeViewer", Bn.type, ne));
|
|
4850
4862
|
let Vi = ne;
|
|
4851
4863
|
const se = class se extends I {
|
|
4852
4864
|
constructor(e, t) {
|
|
@@ -4856,7 +4868,7 @@ const se = class se extends I {
|
|
|
4856
4868
|
}
|
|
4857
4869
|
}
|
|
4858
4870
|
};
|
|
4859
|
-
v(se, "type", se.register("ESUeViewer",
|
|
4871
|
+
v(se, "type", se.register("ESUeViewer", _n.type, se));
|
|
4860
4872
|
let Oi = se;
|
|
4861
4873
|
const oe = class oe extends D {
|
|
4862
4874
|
constructor(e, t) {
|
|
@@ -4866,7 +4878,7 @@ const oe = class oe extends D {
|
|
|
4866
4878
|
}
|
|
4867
4879
|
}
|
|
4868
4880
|
};
|
|
4869
|
-
v(oe, "type", oe.register("ESUeViewer",
|
|
4881
|
+
v(oe, "type", oe.register("ESUeViewer", Mn.type, oe));
|
|
4870
4882
|
let ji = oe;
|
|
4871
4883
|
const ae = class ae extends $ {
|
|
4872
4884
|
constructor(e, t) {
|
|
@@ -4893,9 +4905,9 @@ const ae = class ae extends $ {
|
|
|
4893
4905
|
}));
|
|
4894
4906
|
}
|
|
4895
4907
|
};
|
|
4896
|
-
v(ae, "type", ae.register("ESUeViewer",
|
|
4908
|
+
v(ae, "type", ae.register("ESUeViewer", $n.type, ae));
|
|
4897
4909
|
let tr = ae;
|
|
4898
|
-
const st = class st extends
|
|
4910
|
+
const st = class st extends z {
|
|
4899
4911
|
constructor(e, t) {
|
|
4900
4912
|
if (super(e, t), !t.viewer) {
|
|
4901
4913
|
console.warn("viewer is undefined!");
|
|
@@ -4903,12 +4915,12 @@ const st = class st extends N {
|
|
|
4903
4915
|
}
|
|
4904
4916
|
}
|
|
4905
4917
|
};
|
|
4906
|
-
v(st, "type", st.register("ESUeViewer",
|
|
4907
|
-
...
|
|
4918
|
+
v(st, "type", st.register("ESUeViewer", Wn.type, st)), v(st, "propValFuncs", {
|
|
4919
|
+
...z.propValFuncs,
|
|
4908
4920
|
info: (e) => JSON.stringify(e ?? {})
|
|
4909
4921
|
});
|
|
4910
4922
|
let er = st;
|
|
4911
|
-
const de = class de extends
|
|
4923
|
+
const de = class de extends G {
|
|
4912
4924
|
constructor(e, t) {
|
|
4913
4925
|
if (super(e, t), !t.viewer) {
|
|
4914
4926
|
console.warn("viewer is undefined!");
|
|
@@ -4921,10 +4933,10 @@ const de = class de extends J {
|
|
|
4921
4933
|
});
|
|
4922
4934
|
}
|
|
4923
4935
|
};
|
|
4924
|
-
v(de, "type", de.register("ESUeViewer",
|
|
4936
|
+
v(de, "type", de.register("ESUeViewer", An.type, de));
|
|
4925
4937
|
let ir = de;
|
|
4926
4938
|
E.context.getStrFromEnv(j.defaults.imgUrl);
|
|
4927
|
-
const le = class le extends
|
|
4939
|
+
const le = class le extends G {
|
|
4928
4940
|
constructor(e, t) {
|
|
4929
4941
|
if (super(e, t), !t.viewer) {
|
|
4930
4942
|
console.warn("viewer is undefined!");
|
|
@@ -4935,13 +4947,13 @@ const le = class le extends J {
|
|
|
4935
4947
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
4936
4948
|
// customDiv指向当前的CustomDiv场景对象
|
|
4937
4949
|
// viewer指定当前的视口
|
|
4938
|
-
constructor(s, o,
|
|
4950
|
+
constructor(s, o, h) {
|
|
4939
4951
|
super(), this._subContainer = s;
|
|
4940
4952
|
const a = document.createElement("div");
|
|
4941
4953
|
this._subContainer.appendChild(a), this.dispose(() => this._subContainer.removeChild(a));
|
|
4942
4954
|
{
|
|
4943
4955
|
const d = async () => {
|
|
4944
|
-
const
|
|
4956
|
+
const u = await t.getCurrentCameraInfo(), c = u == null ? void 0 : u.position, w = [...u == null ? void 0 : u.rotation];
|
|
4945
4957
|
w[0] = 360, t.flyIn(c, w);
|
|
4946
4958
|
};
|
|
4947
4959
|
a.addEventListener("click", d), a.style.cursor = "pointer", this.dispose(() => a.removeEventListener("click", d));
|
|
@@ -4973,13 +4985,13 @@ const le = class le extends J {
|
|
|
4973
4985
|
const w = -t.getCurrentCameraInfo().rotation[0];
|
|
4974
4986
|
p.style.transform = `rotate(${w}deg)`;
|
|
4975
4987
|
};
|
|
4976
|
-
let
|
|
4988
|
+
let u;
|
|
4977
4989
|
const c = async () => {
|
|
4978
|
-
d(), e.show ? (a.style.display = "block",
|
|
4990
|
+
d(), e.show ? (a.style.display = "block", u = setInterval(() => {
|
|
4979
4991
|
d();
|
|
4980
|
-
}, 1e3)) : (a.style.display = "none", clearInterval(
|
|
4992
|
+
}, 1e3)) : (a.style.display = "none", clearInterval(u));
|
|
4981
4993
|
};
|
|
4982
|
-
this.dispose(e.showChanged.disposableOn(c)), c(), this.dispose(() => clearInterval(
|
|
4994
|
+
this.dispose(e.showChanged.disposableOn(c)), c(), this.dispose(() => clearInterval(u));
|
|
4983
4995
|
}
|
|
4984
4996
|
p.style.transformOrigin = "50% 50%";
|
|
4985
4997
|
}
|
|
@@ -5007,25 +5019,24 @@ const Q = class Q extends D {
|
|
|
5007
5019
|
}
|
|
5008
5020
|
});
|
|
5009
5021
|
};
|
|
5010
|
-
this.dispose(e.materialModeChanged.disposableOn(r))
|
|
5022
|
+
this.dispose(e.materialModeChanged.disposableOn(r));
|
|
5011
5023
|
}
|
|
5012
5024
|
}
|
|
5013
5025
|
};
|
|
5014
|
-
v(Q, "type", Q.register("ESUeViewer",
|
|
5026
|
+
v(Q, "type", Q.register("ESUeViewer", Un.type, Q)), v(Q, "forceUeUpdateProps", [
|
|
5015
5027
|
...D.forceUeUpdateProps
|
|
5016
5028
|
]), v(Q, "propValFuncs", {
|
|
5017
|
-
...D.propValFuncs
|
|
5018
|
-
materialMode: null
|
|
5029
|
+
...D.propValFuncs
|
|
5019
5030
|
});
|
|
5020
5031
|
let nr = Q;
|
|
5021
|
-
async function
|
|
5032
|
+
async function Io(l) {
|
|
5022
5033
|
navigator.clipboard.writeText(l).then(function() {
|
|
5023
5034
|
console.log("复制成功");
|
|
5024
5035
|
}, function(e) {
|
|
5025
5036
|
console.log("复制失败");
|
|
5026
5037
|
});
|
|
5027
5038
|
}
|
|
5028
|
-
const ce = class ce extends
|
|
5039
|
+
const ce = class ce extends G {
|
|
5029
5040
|
constructor(e, t) {
|
|
5030
5041
|
if (super(e, t), !t.viewer) {
|
|
5031
5042
|
console.warn("viewer is undefined!");
|
|
@@ -5033,8 +5044,8 @@ const ce = class ce extends J {
|
|
|
5033
5044
|
}
|
|
5034
5045
|
const r = this.disposeVar(new He());
|
|
5035
5046
|
t.add(r), this.dispose(() => t.delete(r)), r.instanceClass = class extends m {
|
|
5036
|
-
constructor(s, o,
|
|
5037
|
-
if (super(), this._subContainer = s, !
|
|
5047
|
+
constructor(s, o, h) {
|
|
5048
|
+
if (super(), this._subContainer = s, !h || !(h instanceof J)) return;
|
|
5038
5049
|
const a = document.createElement("div");
|
|
5039
5050
|
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";
|
|
5040
5051
|
const g = document.createElement("span");
|
|
@@ -5044,10 +5055,10 @@ const ce = class ce extends J {
|
|
|
5044
5055
|
const d = document.createElement("span");
|
|
5045
5056
|
g.appendChild(d), d.addEventListener("dblclick", function() {
|
|
5046
5057
|
let c = d.innerHTML;
|
|
5047
|
-
c.startsWith("鼠标位置") && (c = c.slice(5)),
|
|
5058
|
+
c.startsWith("鼠标位置") && (c = c.slice(5)), Io(c);
|
|
5048
5059
|
}), d.style.cursor = "pointer", this.dispose(() => g.removeChild(d));
|
|
5049
|
-
const
|
|
5050
|
-
a.appendChild(
|
|
5060
|
+
const u = document.createElement("span");
|
|
5061
|
+
a.appendChild(u), this.dispose(() => a.removeChild(u));
|
|
5051
5062
|
{
|
|
5052
5063
|
const c = () => {
|
|
5053
5064
|
a.style.height = (e.height ?? A.defaults.height) + "px", a.style.lineHeight = (e.height ?? A.defaults.height) + "px";
|
|
@@ -5066,15 +5077,15 @@ const ce = class ce extends J {
|
|
|
5066
5077
|
};
|
|
5067
5078
|
this.dispose(e.bgColorChanged.disposableOn(c)), c();
|
|
5068
5079
|
}
|
|
5069
|
-
|
|
5070
|
-
c && (
|
|
5080
|
+
h.getVersion().then((c) => {
|
|
5081
|
+
c && (u.innerText = `Ue 版本 : ${c[0]} `);
|
|
5071
5082
|
}).catch((c) => {
|
|
5072
5083
|
console.log(c);
|
|
5073
5084
|
});
|
|
5074
5085
|
{
|
|
5075
5086
|
const c = () => {
|
|
5076
5087
|
let y = "", x = "";
|
|
5077
|
-
y += `帧率:${
|
|
5088
|
+
y += `帧率:${h.getFPS().toFixed(0)}FPS`, p.innerText = y;
|
|
5078
5089
|
const C = t.getCurrentCameraInfo();
|
|
5079
5090
|
y += ` 经度: ${C.position[0].toFixed(5)}° 纬度: ${C.position[1].toFixed(5)}° 高度: ${C.position[2].toFixed(2)}米 偏航角: ${C.rotation[0].toFixed(2)}° 俯仰角: ${C.rotation[1].toFixed(2)}° 翻滚角:${C.rotation[2].toFixed(2)}° `, p.innerText = y, t.pick().then((R) => {
|
|
5080
5091
|
if (R) {
|
|
@@ -5112,12 +5123,12 @@ const ue = class ue extends I {
|
|
|
5112
5123
|
}
|
|
5113
5124
|
}
|
|
5114
5125
|
};
|
|
5115
|
-
v(ue, "type", ue.register("ESUeViewer",
|
|
5126
|
+
v(ue, "type", ue.register("ESUeViewer", Nn.type, ue));
|
|
5116
5127
|
let or = ue;
|
|
5117
5128
|
const he = class he extends at {
|
|
5118
5129
|
constructor(t, i) {
|
|
5119
5130
|
super(t, i);
|
|
5120
|
-
v(this, "_es3DTileset", this.dv(new
|
|
5131
|
+
v(this, "_es3DTileset", this.dv(new me()));
|
|
5121
5132
|
if (!i.viewer) {
|
|
5122
5133
|
console.warn("viewer is undefined!");
|
|
5123
5134
|
return;
|
|
@@ -5172,7 +5183,7 @@ const he = class he extends at {
|
|
|
5172
5183
|
return this._es3DTileset;
|
|
5173
5184
|
}
|
|
5174
5185
|
};
|
|
5175
|
-
v(he, "type", he.register("ESUeViewer",
|
|
5186
|
+
v(he, "type", he.register("ESUeViewer", zn.type, he));
|
|
5176
5187
|
let ar = he;
|
|
5177
5188
|
const pe = class pe extends at {
|
|
5178
5189
|
constructor(e, t) {
|
|
@@ -5182,7 +5193,7 @@ const pe = class pe extends at {
|
|
|
5182
5193
|
}
|
|
5183
5194
|
}
|
|
5184
5195
|
};
|
|
5185
|
-
v(pe, "type", pe.register("ESUeViewer",
|
|
5196
|
+
v(pe, "type", pe.register("ESUeViewer", Hn.type, pe));
|
|
5186
5197
|
let dr = pe;
|
|
5187
5198
|
const ve = class ve extends $ {
|
|
5188
5199
|
constructor(e, t) {
|
|
@@ -5220,7 +5231,7 @@ const fe = class fe extends I {
|
|
|
5220
5231
|
}
|
|
5221
5232
|
}
|
|
5222
5233
|
};
|
|
5223
|
-
v(fe, "type", fe.register("ESUeViewer",
|
|
5234
|
+
v(fe, "type", fe.register("ESUeViewer", bn.type, fe));
|
|
5224
5235
|
let cr = fe;
|
|
5225
5236
|
const ge = class ge extends D {
|
|
5226
5237
|
constructor(e, t) {
|
|
@@ -5247,14 +5258,14 @@ const ge = class ge extends D {
|
|
|
5247
5258
|
}));
|
|
5248
5259
|
}
|
|
5249
5260
|
};
|
|
5250
|
-
v(ge, "type", ge.register("ESUeViewer",
|
|
5251
|
-
let ur = ge,
|
|
5261
|
+
v(ge, "type", ge.register("ESUeViewer", Jn.type, ge));
|
|
5262
|
+
let ur = ge, We;
|
|
5252
5263
|
try {
|
|
5253
|
-
const l = "earthsdk3-ue", e = "3.4.0
|
|
5264
|
+
const l = "earthsdk3-ue", e = "3.4.0", t = "2025-09-12T07:06:00.000Z", i = "北京西部世界科技有限公司", r = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "7bb817c2218c8ba03b2c728ade4fc430cfee47dd", o = ((Date.now() - 175766076e4) / 36e5).toFixed(1), h = `%c🌏 ${l}%c ${e}.${n.slice(0, 8)}.${t} (距今${o}个小时)
|
|
5254
5265
|
%c${r ? r + `
|
|
5255
5266
|
` : ""}当前网站正在使用${l},此软件版权归${i}所有
|
|
5256
5267
|
`;
|
|
5257
|
-
|
|
5268
|
+
We = Object.freeze({
|
|
5258
5269
|
// @ts-ignore
|
|
5259
5270
|
get owner() {
|
|
5260
5271
|
return "北京西部世界科技有限公司";
|
|
@@ -5264,15 +5275,15 @@ try {
|
|
|
5264
5275
|
},
|
|
5265
5276
|
// @ts-ignore
|
|
5266
5277
|
get gituri() {
|
|
5267
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
5278
|
+
return GITURI_ && GITURI_.replace("${commitId}", "7bb817c2218c8ba03b2c728ade4fc430cfee47dd");
|
|
5268
5279
|
},
|
|
5269
5280
|
// @ts-ignore
|
|
5270
5281
|
get info() {
|
|
5271
|
-
return
|
|
5282
|
+
return h;
|
|
5272
5283
|
},
|
|
5273
5284
|
// @ts-ignore
|
|
5274
5285
|
get date() {
|
|
5275
|
-
return "2025-09-
|
|
5286
|
+
return "2025-09-12T07:06:00.000Z";
|
|
5276
5287
|
},
|
|
5277
5288
|
// @ts-ignore
|
|
5278
5289
|
get author() {
|
|
@@ -5280,7 +5291,7 @@ try {
|
|
|
5280
5291
|
},
|
|
5281
5292
|
// @ts-ignore
|
|
5282
5293
|
get version() {
|
|
5283
|
-
return "3.4.0
|
|
5294
|
+
return "3.4.0";
|
|
5284
5295
|
},
|
|
5285
5296
|
// @ts-ignore
|
|
5286
5297
|
get name() {
|
|
@@ -5288,7 +5299,7 @@ try {
|
|
|
5288
5299
|
},
|
|
5289
5300
|
// @ts-ignore
|
|
5290
5301
|
get commitId() {
|
|
5291
|
-
return "
|
|
5302
|
+
return "7bb817c2218c8ba03b2c728ade4fc430cfee47dd";
|
|
5292
5303
|
},
|
|
5293
5304
|
print(a = !1) {
|
|
5294
5305
|
!a && window._xe2_no_copy_print || console.info(
|
|
@@ -5315,19 +5326,19 @@ try {
|
|
|
5315
5326
|
`
|
|
5316
5327
|
);
|
|
5317
5328
|
}
|
|
5318
|
-
}), window.g_XE3CopyRights = window.g_XE3CopyRights || {}, window.g_XE3CopyRights[l] =
|
|
5329
|
+
}), window.g_XE3CopyRights = window.g_XE3CopyRights || {}, window.g_XE3CopyRights[l] = We, window.g_earthsdk_copyright_print = window.g_earthsdk_copyright_print ?? !0, window.g_earthsdk_copyright_print && We.print();
|
|
5319
5330
|
} catch {
|
|
5320
5331
|
}
|
|
5321
5332
|
export {
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5333
|
+
J as ESUeViewer,
|
|
5334
|
+
Co as GeoDivFromESImageLabel,
|
|
5335
|
+
mo as GeoDivFromESTextLabel,
|
|
5336
|
+
ns as HighlightFeatureAndFlyToCallFunc,
|
|
5337
|
+
rs as HighlightFeatureCallFunc,
|
|
5338
|
+
os as SetLayerColorCallFunc,
|
|
5339
|
+
ss as SetLayerVisibleCallFunc,
|
|
5340
|
+
Be as UeCloudViewerBase,
|
|
5341
|
+
Ue as UeES3DTileset,
|
|
5331
5342
|
je as UeESAlarm,
|
|
5332
5343
|
ti as UeESApertureEffect,
|
|
5333
5344
|
ei as UeESAreaMeasurement,
|
|
@@ -5351,7 +5362,7 @@ export {
|
|
|
5351
5362
|
yi as UeESGeoDiv,
|
|
5352
5363
|
lr as UeESGeoExtrudedPolygon,
|
|
5353
5364
|
mi as UeESGeoJson,
|
|
5354
|
-
|
|
5365
|
+
ze as UeESGeoLineString,
|
|
5355
5366
|
$ as UeESGeoPolygon,
|
|
5356
5367
|
Ci as UeESGeoRectangle,
|
|
5357
5368
|
D as UeESGeoVector,
|
|
@@ -5362,10 +5373,10 @@ export {
|
|
|
5362
5373
|
ir as UeESHumanPoi,
|
|
5363
5374
|
Ti as UeESImageLabel,
|
|
5364
5375
|
Ve as UeESImageryLayer,
|
|
5365
|
-
|
|
5376
|
+
z as UeESLabel,
|
|
5366
5377
|
xi as UeESLevelRuntimeModel,
|
|
5367
5378
|
Ri as UeESLocalCircle,
|
|
5368
|
-
|
|
5379
|
+
Ne as UeESLocalPolygon,
|
|
5369
5380
|
Li as UeESLocalPolygonZ,
|
|
5370
5381
|
Pi as UeESLocalRectangle,
|
|
5371
5382
|
ki as UeESLocalSkyBox,
|
|
@@ -5406,64 +5417,64 @@ export {
|
|
|
5406
5417
|
M as UeESVisualObject,
|
|
5407
5418
|
tr as UeESVolumeMeasurement,
|
|
5408
5419
|
er as UeESWidget,
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5420
|
+
_s as bind3DTilesetByTagCallFunc,
|
|
5421
|
+
Ls as bindActorByTagCallFunc,
|
|
5422
|
+
Ws as bindImageryByTagCallFunc,
|
|
5412
5423
|
dt as calcFlyToParamCallFunc,
|
|
5413
5424
|
Er as callFunctionCallFunc,
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5425
|
+
gs as captureCallFunc,
|
|
5426
|
+
b as changeNavigationModeCallFunc,
|
|
5427
|
+
We as copyright,
|
|
5428
|
+
Bs as createActorByClassCallFunc,
|
|
5429
|
+
Fr as destroyCallFunc,
|
|
5430
|
+
Re as flyInCallFunc,
|
|
5431
|
+
On as flyInDefaultCameraCallFunc,
|
|
5421
5432
|
we as flyToCallFunc,
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5433
|
+
is as generateMemReportCallFunc,
|
|
5434
|
+
Cs as getAllSocketNamesByActorTagCallFunc,
|
|
5435
|
+
Is as getBoundSphereCallFunc,
|
|
5436
|
+
Es as getBoundSphereWithChildrenCallFunc,
|
|
5437
|
+
zs as getCameraRelativeHeightCallFunc,
|
|
5438
|
+
Ts as getFillMaterialParamInfoCallFunc,
|
|
5439
|
+
xs as getGlobalPropertyCallFunc,
|
|
5440
|
+
vs as getHeightByLonLatCallFunc,
|
|
5441
|
+
fs as getHeightByLonLatsCallFunc,
|
|
5442
|
+
Ns as getIdByComponentNameAndHitItemCallFunc,
|
|
5443
|
+
ys as getLonLatAltToScreenPositionCallFunc,
|
|
5444
|
+
Rs as getObjectByInfoCallFunc,
|
|
5445
|
+
Gs as getStatusCallFunc,
|
|
5446
|
+
Ss as getStrokeMaterialParamInfoCallFunc,
|
|
5447
|
+
Zs as getTilesetMaterialIDListCallFunc,
|
|
5448
|
+
Fs as getVersionCallFunc,
|
|
5449
|
+
bs as highlightActorByTagCallFunc,
|
|
5450
|
+
es as mountPakFiles,
|
|
5451
|
+
Ys as moveObjectsCallFunc,
|
|
5452
|
+
ws as partialCaptureCallFunc,
|
|
5453
|
+
hs as pickCallFunc,
|
|
5454
|
+
ps as pickPositionCallFunc,
|
|
5455
|
+
us as quitCallFunc,
|
|
5456
|
+
Vn as refreshTilesetCallFunc,
|
|
5446
5457
|
Ir as resetWithCurrentCameraCallFunc,
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5458
|
+
Ps as restoreOriginalSceneCallFunc,
|
|
5459
|
+
Hs as saveStringToFileCallFunc,
|
|
5460
|
+
Js as sendCustomMessageCallFunc,
|
|
5461
|
+
cs as setGlobalPropertyCallFunc,
|
|
5462
|
+
as as setNodePositionCallFunc,
|
|
5463
|
+
ds as setNodeRotationCallFunc,
|
|
5464
|
+
ls as setNodeScaleCallFunc,
|
|
5465
|
+
De as smoothMoveCallFunc,
|
|
5466
|
+
Pe as smoothMoveOnGroundCallFunc,
|
|
5467
|
+
Le as smoothMoveWithRotationCallFunc,
|
|
5468
|
+
ke as smoothMoveWithRotationOnGroundCallFunc,
|
|
5469
|
+
Ks as startEditingCallFunc,
|
|
5470
|
+
jn as startVoiceCallFunc,
|
|
5471
|
+
Xs as stopEditingCallFunc,
|
|
5472
|
+
ts as stopVoiceCallFunc,
|
|
5473
|
+
ms as uePositionToLonLatAltCallFunc,
|
|
5474
|
+
$s as unBind3DTilesetByIdCallFunc,
|
|
5475
|
+
Ms as unBind3DTilesetByTagCallFunc,
|
|
5476
|
+
ks as unBindActorByIDCallFunc,
|
|
5477
|
+
Ds as unBindActorByTagCallFunc,
|
|
5478
|
+
Us as unBindImageryByIdCallFunc,
|
|
5479
|
+
As as unBindImageryByTagCallFunc
|
|
5469
5480
|
};
|