earthsdk3-ue 3.7.0-beta.14 → 3.7.0-beta.16
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 +14 -14
- package/dist/earthsdk3-ue.js +1044 -948
- package/dist/earthsdk3-ue.umd.cjs +3 -3
- package/package.json +2 -2
package/dist/earthsdk3-ue.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var f = (d, e, t) =>
|
|
4
|
-
import { ESViewer as Ee, reactArrayWithUndefined as pr, ESSceneObject as
|
|
5
|
-
import { Logger as wr, Config as yr, TextParameters as
|
|
6
|
-
import
|
|
1
|
+
var _r = Object.defineProperty;
|
|
2
|
+
var $r = (d, e, t) => e in d ? _r(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t;
|
|
3
|
+
var f = (d, e, t) => $r(d, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ESViewer as Ee, reactArrayWithUndefined as pr, ESSceneObject as E, ESJPickedResult as Ae, Destroyable as C, HasOwner as Wr, createGuid as M, Event as x, createAnimateFrame as be, createInterval as Se, react as W, createNextAnimateFrameEvent as P, ViewerCustomInteraction as fr, ObjResettingWithEvent as R, createProcessingFromAsyncFunc as Te, sleep as Ar, getGeoBoundingSphereFromPositions as Ur, extendClassProps as Nr, EngineObject as K, ES3DTileset as me, ESImageryLayer as U, reactJson as He, ESTerrainLayer as zr, ESAlarm as br, ESApertureEffect as Hr, ESGeoPolygon as Jr, ESAreaMeasurement as tt, ESBlastParticleSystem as Gr, ESBoxClipping as Kr, ESCameraView as Xr, ESCameraVisibleRange as Qr, ESCar as Yr, ESClassification as ct, ESClippingPlane as Zr, ESDataMesh as H, ESDatasmithRuntimeModel as qr, ESDirectionMeasurement as Vr, ESDistanceMeasurement as _e, ESLocalPolygon as Or, ESDynamicWater as jr, ESEntityCluster as tn, ESExcavate as en, ESFireParticleSystem as rn, ESForestTileset as N, ESGeoDiv as Ce, ESTextLabel as vr, bind as L, ESCustomDiv as Je, ESImageLabel as gr, track as I, PosFloatDiv as nn, getDistancesFromPositions as sn, ESGeoJson as on, ESGeoLineString as an, ESGeoRectangle as ln, ESGeoWater as dn, rpToap as Fe, ESGltfModel as cn, ESHeightMeasurement as un, ESHuman as hn, ESLevelRuntimeModel as pn, ESLocalCircle as fn, ESLocalPolygonZ as vn, ESLocalRectangle as gn, ESLocalSkyBox as wn, ESLocationMeasurement as yn, ESPipeFence as mn, ESPipeline as Cn, ESPipeserTileset as Fn, ESPit as In, ESPoi2D as En, ESPoi3D as Sn, ESPoiTileset as Tn, ESPolygonFence as xn, ESPolygonFlattenedPlane as Rn, ESPolygonWithHole as Pn, ESRtsTileset as Ln, ESSeparateFoliage as Dn, addTreesCallFunc as kn, removeAllTreesCallFunc as Bn, updateTreeParamsCallFunc as Mn, cutDownTreesCallFunc as _n, growthSimulationCallFunc as $n, ESSubmergingAnalysis as Wn, ESSunshineAnalysis as An, ESSurfaceAreaMeasurement as Un, ESUEWidget as Nn, ESUnrealActor as $e, ESVideoFusion as zn, ESViewShed as bn, ESVisibilityAnalysis as Hn, ESVolumeMeasurement as Jn, ESWidget as Gn, ESHumanPoi as Kn, ESNavigator as et, ESPath as Xn, ESViewerStatusBar as A, ESGaussianSplatting as Qn, ESRtsFeatureEditing as Yn, ESMsTileset as Zn, ESGeoExtrudedPolygon as ye, ESStaticMesh as qn, ESSkylineAnalysis as Vn } from "earthsdk3";
|
|
5
|
+
import { Logger as wr, Config as yr, TextParameters as mr, NumericParameters as Cr, PixelStreaming as Fr } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.2";
|
|
6
|
+
import On from "html2canvas";
|
|
7
7
|
var hr;
|
|
8
|
-
const
|
|
8
|
+
const jn = {
|
|
9
9
|
...Ee.defaults,
|
|
10
10
|
geoReferenceOrigin: void 0,
|
|
11
11
|
keepWorldOriginNearCamera: !1,
|
|
@@ -19,7 +19,7 @@ const On = {
|
|
|
19
19
|
baseUrl: ((hr = globalThis == null ? void 0 : globalThis.location) == null ? void 0 : hr.href) ?? "",
|
|
20
20
|
screenPercentage: -1,
|
|
21
21
|
antiAliasingMethod: "default"
|
|
22
|
-
},
|
|
22
|
+
}, Ir = () => ({
|
|
23
23
|
...Ee.createCommonProps(),
|
|
24
24
|
//语音模式
|
|
25
25
|
apiKey: "",
|
|
@@ -51,13 +51,13 @@ const On = {
|
|
|
51
51
|
//抗锯齿方法
|
|
52
52
|
});
|
|
53
53
|
function xe() {
|
|
54
|
-
const d =
|
|
54
|
+
const d = Ir(), e = [];
|
|
55
55
|
return Object.keys(d).forEach((t) => {
|
|
56
56
|
e.push(t);
|
|
57
57
|
}), e;
|
|
58
58
|
}
|
|
59
59
|
function Ge(d) {
|
|
60
|
-
const { defaults: e } =
|
|
60
|
+
const { defaults: e } = G, t = xe(), i = {};
|
|
61
61
|
return t.forEach((r) => {
|
|
62
62
|
i[r] = d[r] ?? e[r];
|
|
63
63
|
}), i;
|
|
@@ -72,7 +72,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
return s.re;
|
|
75
|
-
},
|
|
75
|
+
}, Er = async (d, e) => {
|
|
76
76
|
const t = await d.callUeFunc({ f: "destroy", p: { id: e } });
|
|
77
77
|
return t.error && console.error(t.error), t;
|
|
78
78
|
}, dt = (d, e) => {
|
|
@@ -84,7 +84,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
84
84
|
}).catch((t) => {
|
|
85
85
|
console.error("calcFlyToParam:", t);
|
|
86
86
|
});
|
|
87
|
-
},
|
|
87
|
+
}, ts = (d, e) => {
|
|
88
88
|
d.callUeFunc({
|
|
89
89
|
f: "refreshTileset",
|
|
90
90
|
p: { id: e }
|
|
@@ -103,7 +103,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
return s.re;
|
|
106
|
-
},
|
|
106
|
+
}, es = async (d, e) => {
|
|
107
107
|
if (!d) {
|
|
108
108
|
console.warn("DefaultCameraFlyIn: viewer is undefined");
|
|
109
109
|
return;
|
|
@@ -117,7 +117,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
return t;
|
|
120
|
-
},
|
|
120
|
+
}, is = async (d) => {
|
|
121
121
|
if (!d) {
|
|
122
122
|
console.warn("StartVoice:viewer is undefined");
|
|
123
123
|
return;
|
|
@@ -131,7 +131,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
133
|
return e;
|
|
134
|
-
},
|
|
134
|
+
}, rs = async (d) => {
|
|
135
135
|
if (!d) {
|
|
136
136
|
console.warn("StopVoice:viewer is undefined");
|
|
137
137
|
return;
|
|
@@ -145,7 +145,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
147
|
return e;
|
|
148
|
-
},
|
|
148
|
+
}, ns = async (d, e) => {
|
|
149
149
|
if (!d) {
|
|
150
150
|
console.warn("mountPakFiles:viewer is undefined");
|
|
151
151
|
return;
|
|
@@ -159,7 +159,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
return t;
|
|
162
|
-
},
|
|
162
|
+
}, ss = async (d) => {
|
|
163
163
|
if (!d) {
|
|
164
164
|
console.warn("generateMemReport:viewer is undefined");
|
|
165
165
|
return;
|
|
@@ -173,7 +173,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
175
|
return e;
|
|
176
|
-
},
|
|
176
|
+
}, Sr = async (d, e) => {
|
|
177
177
|
const t = await d.callUeFunc({
|
|
178
178
|
f: "resetWithCurrentCamera",
|
|
179
179
|
p: { id: e }
|
|
@@ -218,7 +218,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
218
218
|
}).catch((o) => {
|
|
219
219
|
console.error("smoothMoveWithRotationOnGround:", o);
|
|
220
220
|
});
|
|
221
|
-
},
|
|
221
|
+
}, os = (d, e, t) => {
|
|
222
222
|
d.callUeFunc({
|
|
223
223
|
f: "HighlightFeature",
|
|
224
224
|
p: { id: e, HlId: t }
|
|
@@ -227,7 +227,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
227
227
|
}).catch((i) => {
|
|
228
228
|
console.error("HighlightFeature:", i);
|
|
229
229
|
});
|
|
230
|
-
},
|
|
230
|
+
}, as = (d, e, t, i) => {
|
|
231
231
|
d.callUeFunc({
|
|
232
232
|
f: "HighlightFeatureAndFlyTo",
|
|
233
233
|
p: { id: e, HlId: t, Duration: i }
|
|
@@ -236,7 +236,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
236
236
|
}).catch((r) => {
|
|
237
237
|
console.error("HighlightFeatureAndFlyTo:", r);
|
|
238
238
|
});
|
|
239
|
-
},
|
|
239
|
+
}, ls = (d, e, t) => {
|
|
240
240
|
d.callUeFunc({
|
|
241
241
|
f: "SetLayerVisible",
|
|
242
242
|
p: { id: e, LayerJson: t }
|
|
@@ -245,7 +245,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
245
245
|
}).catch((i) => {
|
|
246
246
|
console.error("SetLayerVisible:", i);
|
|
247
247
|
});
|
|
248
|
-
},
|
|
248
|
+
}, ds = (d, e, t) => {
|
|
249
249
|
d.callUeFunc({
|
|
250
250
|
f: "SetLayerColor",
|
|
251
251
|
p: { id: e, LayerJson: t }
|
|
@@ -267,13 +267,13 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
267
267
|
}).catch((r) => {
|
|
268
268
|
console.error("smoothMove:", r);
|
|
269
269
|
});
|
|
270
|
-
},
|
|
270
|
+
}, Tr = async (d, e, t, i) => {
|
|
271
271
|
const r = await d.callUeFunc({
|
|
272
272
|
f: "callFunction",
|
|
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
|
+
}, cs = (d, e, t, i) => {
|
|
277
277
|
d.callUeFunc({
|
|
278
278
|
f: "SetNodePosition",
|
|
279
279
|
p: {
|
|
@@ -286,7 +286,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
286
286
|
}).catch((r) => {
|
|
287
287
|
console.error("SetNodePosition:", r);
|
|
288
288
|
});
|
|
289
|
-
},
|
|
289
|
+
}, us = (d, e, t, i) => {
|
|
290
290
|
d.callUeFunc({
|
|
291
291
|
f: "SetNodeRotation",
|
|
292
292
|
p: {
|
|
@@ -299,7 +299,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
299
299
|
}).catch((r) => {
|
|
300
300
|
console.error("SetNodeRotation:", r);
|
|
301
301
|
});
|
|
302
|
-
},
|
|
302
|
+
}, hs = (d, e, t, i) => {
|
|
303
303
|
d.callUeFunc({
|
|
304
304
|
f: "SetNodeScale",
|
|
305
305
|
p: {
|
|
@@ -312,12 +312,12 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
312
312
|
}).catch((r) => {
|
|
313
313
|
console.error("SetNodeScale:", r);
|
|
314
314
|
});
|
|
315
|
-
},
|
|
315
|
+
}, J = async (d, e) => {
|
|
316
316
|
if (e.mode == "Follow") {
|
|
317
|
-
const i =
|
|
317
|
+
const i = E.getSceneObject(e.objectId);
|
|
318
318
|
e.objectId = i ? (i.components.main ?? i).id : e.objectId;
|
|
319
319
|
} else if (e.mode == "Line") {
|
|
320
|
-
const i =
|
|
320
|
+
const i = E.getSceneObject(e.geoLineStringId);
|
|
321
321
|
e.geoLineStringId = i ? (i.components.main ?? i).id : e.geoLineStringId;
|
|
322
322
|
}
|
|
323
323
|
const t = await d.callUeFunc({
|
|
@@ -329,7 +329,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
return t;
|
|
332
|
-
},
|
|
332
|
+
}, ps = async (d, e) => {
|
|
333
333
|
const t = await d.callUeFunc({
|
|
334
334
|
f: "setGlobalProperty",
|
|
335
335
|
p: e
|
|
@@ -339,7 +339,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
341
|
return t;
|
|
342
|
-
},
|
|
342
|
+
}, fs = async (d) => {
|
|
343
343
|
const e = await d.callUeFunc({
|
|
344
344
|
f: "Quit",
|
|
345
345
|
p: void 0
|
|
@@ -349,7 +349,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
349
349
|
return;
|
|
350
350
|
}
|
|
351
351
|
return e;
|
|
352
|
-
},
|
|
352
|
+
}, vs = async (d, e, t, i) => {
|
|
353
353
|
console.log("pickCallFunc", e, t, i);
|
|
354
354
|
const r = await d.callUeFunc({
|
|
355
355
|
f: "pick",
|
|
@@ -359,8 +359,8 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
359
359
|
console.error("pick:", r.error == "" ? "未获取到结果" : r.error);
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
362
|
-
let n = r.re.id, s, o = n ?
|
|
363
|
-
return o && o.parentID && (o =
|
|
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 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
364
|
}, gs = async (d, e) => {
|
|
365
365
|
const t = await d.callUeFunc({
|
|
366
366
|
f: "pickPosition",
|
|
@@ -372,7 +372,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
372
372
|
}
|
|
373
373
|
const { position: i } = t.re;
|
|
374
374
|
return i;
|
|
375
|
-
},
|
|
375
|
+
}, ws = async (d, e, t, i = "ECC_Visibility") => {
|
|
376
376
|
const r = await d.callUeFunc({
|
|
377
377
|
f: "GetHeightByLonLat",
|
|
378
378
|
p: { Lon: e, Lat: t, Channel: i }
|
|
@@ -382,7 +382,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
382
382
|
return;
|
|
383
383
|
}
|
|
384
384
|
return r.re;
|
|
385
|
-
},
|
|
385
|
+
}, ys = async (d, e, t = "ECC_Visibility") => {
|
|
386
386
|
const i = await d.callUeFunc({
|
|
387
387
|
f: "GetHeightsByLonLats",
|
|
388
388
|
p: { LonLats: e, Channel: t }
|
|
@@ -397,7 +397,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
397
397
|
} catch {
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
|
-
},
|
|
400
|
+
}, ms = async (d, e = 64, t = 64) => {
|
|
401
401
|
const i = await d.callUeFunc({
|
|
402
402
|
f: "capture",
|
|
403
403
|
p: { resx: e, resy: t }
|
|
@@ -407,7 +407,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
409
|
return i.re.image;
|
|
410
|
-
},
|
|
410
|
+
}, Cs = async (d, e, t = [64, 64]) => {
|
|
411
411
|
const i = await d.callUeFunc({
|
|
412
412
|
f: "partialCapture",
|
|
413
413
|
p: {
|
|
@@ -420,13 +420,13 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
422
422
|
return i.re.image;
|
|
423
|
-
},
|
|
423
|
+
}, Fs = async (d, e) => {
|
|
424
424
|
const t = await d.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
|
+
}, Is = async (d, e) => {
|
|
430
430
|
const t = await d.callUeFunc({
|
|
431
431
|
f: "UEPositionToLonLatAlt",
|
|
432
432
|
p: { UEPosition: e }
|
|
@@ -436,7 +436,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
438
|
return [...t.re.LonLatAlt];
|
|
439
|
-
},
|
|
439
|
+
}, Es = async (d, e) => {
|
|
440
440
|
const t = await d.callUeFunc({
|
|
441
441
|
f: "GetAllSocketNamesByActorTag",
|
|
442
442
|
p: { ActorTag: e }
|
|
@@ -446,7 +446,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
448
|
return [...t.re.socketNames];
|
|
449
|
-
},
|
|
449
|
+
}, Ss = async (d) => {
|
|
450
450
|
const e = await d.callUeFunc({
|
|
451
451
|
f: "GetVersion",
|
|
452
452
|
p: void 0
|
|
@@ -456,7 +456,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
return e.re.version;
|
|
459
|
-
},
|
|
459
|
+
}, Ts = async (d, e) => {
|
|
460
460
|
const t = await d.callUeFunc({
|
|
461
461
|
f: "GetBoundSphere",
|
|
462
462
|
p: { id: e }
|
|
@@ -466,7 +466,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
468
|
return t.re;
|
|
469
|
-
},
|
|
469
|
+
}, xs = async (d, e) => {
|
|
470
470
|
const t = await d.callUeFunc({
|
|
471
471
|
f: "GetBoundSphereWithChildren",
|
|
472
472
|
p: { id: e }
|
|
@@ -476,7 +476,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
478
|
return t.re;
|
|
479
|
-
},
|
|
479
|
+
}, Rs = async (d, e) => {
|
|
480
480
|
const t = await d.callUeFunc({
|
|
481
481
|
f: "GetStrokeMaterialParamInfo",
|
|
482
482
|
p: { id: e }
|
|
@@ -486,7 +486,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
return t.re;
|
|
489
|
-
},
|
|
489
|
+
}, Ps = async (d, e) => {
|
|
490
490
|
const t = await d.callUeFunc({
|
|
491
491
|
f: "GetFillMaterialParamInfo",
|
|
492
492
|
p: { id: e }
|
|
@@ -496,7 +496,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
496
496
|
return;
|
|
497
497
|
}
|
|
498
498
|
return t.re;
|
|
499
|
-
},
|
|
499
|
+
}, Ls = async (d, e) => {
|
|
500
500
|
const t = await d.callUeFunc({
|
|
501
501
|
f: "getGlobalProperty",
|
|
502
502
|
p: { props: e }
|
|
@@ -506,7 +506,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
506
506
|
return;
|
|
507
507
|
}
|
|
508
508
|
return t.re;
|
|
509
|
-
},
|
|
509
|
+
}, Ds = async (d, e) => {
|
|
510
510
|
const t = await d.callUeFunc({
|
|
511
511
|
f: "GetObjectByInfo",
|
|
512
512
|
p: { info: e }
|
|
@@ -516,62 +516,62 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
518
|
return t.re;
|
|
519
|
-
},
|
|
519
|
+
}, ks = async (d, e, t) => await d.callUeFunc({
|
|
520
520
|
f: "BindActorByTag",
|
|
521
521
|
p: { ID: e, ActorTag: t }
|
|
522
|
-
}),
|
|
522
|
+
}), Bs = async (d) => await d.callUeFunc({
|
|
523
523
|
f: "RestoreOriginalScene",
|
|
524
524
|
p: void 0
|
|
525
|
-
}),
|
|
525
|
+
}), Ms = async (d, e) => await d.callUeFunc({
|
|
526
526
|
f: "UnBindActorByID",
|
|
527
527
|
p: { ID: e }
|
|
528
528
|
}), _s = async (d, e) => await d.callUeFunc({
|
|
529
529
|
f: "UnBindActorByTag",
|
|
530
530
|
p: { ActorTag: e }
|
|
531
|
-
}),
|
|
531
|
+
}), $s = async (d, e, t) => await d.callUeFunc({
|
|
532
532
|
f: "CreateActorByClass",
|
|
533
533
|
p: { ID: e, ActorClass: t }
|
|
534
|
-
}),
|
|
534
|
+
}), Ws = async function(d, e, t) {
|
|
535
535
|
return await d.callUeFunc({
|
|
536
536
|
f: "Bind3DTilesetByTag",
|
|
537
537
|
p: { ID: e, ActorTag: t }
|
|
538
538
|
});
|
|
539
|
-
},
|
|
539
|
+
}, As = async function(d, e) {
|
|
540
540
|
return await d.callUeFunc({
|
|
541
541
|
f: "UnBind3DTilesetByTag",
|
|
542
542
|
p: { ActorTag: e }
|
|
543
543
|
});
|
|
544
|
-
},
|
|
544
|
+
}, Us = async function(d, e) {
|
|
545
545
|
return await d.callUeFunc({
|
|
546
546
|
f: "UnBind3DTilesetById",
|
|
547
547
|
p: { ID: e }
|
|
548
548
|
});
|
|
549
|
-
},
|
|
549
|
+
}, Ns = async function(d, e, t, i) {
|
|
550
550
|
return await d.callUeFunc({
|
|
551
551
|
f: "BindImageryByTag",
|
|
552
552
|
p: { ID: e, ActorTag: t, ComponentTag: i }
|
|
553
553
|
});
|
|
554
|
-
},
|
|
554
|
+
}, zs = async function(d, e, t) {
|
|
555
555
|
return await d.callUeFunc({
|
|
556
556
|
f: "UnBindImageryByTag",
|
|
557
557
|
p: { ActorTag: e, ComponentTag: t }
|
|
558
558
|
});
|
|
559
|
-
},
|
|
559
|
+
}, bs = async function(d, e) {
|
|
560
560
|
return await d.callUeFunc({
|
|
561
561
|
f: "UnBindImageryById",
|
|
562
562
|
p: { ID: e }
|
|
563
563
|
});
|
|
564
|
-
},
|
|
564
|
+
}, Hs = async function(d, e, t, i) {
|
|
565
565
|
return await d.callUeFunc({
|
|
566
566
|
f: "GetIdByComponentNameAndHitItem",
|
|
567
567
|
p: { id: e, ComponentName: t, HitItem: i }
|
|
568
568
|
});
|
|
569
|
-
},
|
|
569
|
+
}, Js = async function(d, e = "ECC_Visibility") {
|
|
570
570
|
return await d.callUeFunc({
|
|
571
571
|
f: "GetCameraRelativeHeight",
|
|
572
572
|
p: { Channel: e }
|
|
573
573
|
});
|
|
574
|
-
},
|
|
574
|
+
}, Gs = async function(d, e, t, i) {
|
|
575
575
|
const r = await d.callUeFunc({
|
|
576
576
|
f: "SaveStringToFile",
|
|
577
577
|
p: {
|
|
@@ -581,7 +581,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
581
581
|
}
|
|
582
582
|
});
|
|
583
583
|
return r.error !== "" && console.warn("SaveStringToFile: ", r.error), r;
|
|
584
|
-
},
|
|
584
|
+
}, Ks = async function(d, e, t = !0) {
|
|
585
585
|
const i = await d.callUeFunc({
|
|
586
586
|
f: "HighlightActorByTag",
|
|
587
587
|
p: {
|
|
@@ -590,13 +590,13 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
590
590
|
}
|
|
591
591
|
});
|
|
592
592
|
return i.error !== "" && console.warn("HighlightActorByTag: ", i.error), i;
|
|
593
|
-
},
|
|
593
|
+
}, Xs = async function(d, e) {
|
|
594
594
|
const t = await d.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
|
+
}, Qs = async function(d) {
|
|
600
600
|
const e = await d.callUeFunc({
|
|
601
601
|
f: "GetStatus",
|
|
602
602
|
p: void 0
|
|
@@ -644,7 +644,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
644
644
|
return;
|
|
645
645
|
}
|
|
646
646
|
return i;
|
|
647
|
-
},
|
|
647
|
+
}, Vs = async (d) => {
|
|
648
648
|
const e = await d.callUeFunc({
|
|
649
649
|
f: "GetTilesetMaterialIDList",
|
|
650
650
|
p: void 0
|
|
@@ -657,7 +657,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
657
657
|
};
|
|
658
658
|
class Be extends C {
|
|
659
659
|
}
|
|
660
|
-
const
|
|
660
|
+
const Os = {
|
|
661
661
|
Response: 1
|
|
662
662
|
}, Ie = {
|
|
663
663
|
/*
|
|
@@ -667,7 +667,7 @@ const Vs = {
|
|
|
667
667
|
UIInteraction: 50,
|
|
668
668
|
MouseWheel: 75
|
|
669
669
|
};
|
|
670
|
-
class
|
|
670
|
+
class js extends Wr {
|
|
671
671
|
constructor(t, i) {
|
|
672
672
|
super(t);
|
|
673
673
|
f(this, "_processResponseFn", (t) => this.esUeViewer.processResponse(t));
|
|
@@ -694,15 +694,15 @@ class Os extends Mr {
|
|
|
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] === Os.Response) {
|
|
698
698
|
o += 4;
|
|
699
699
|
let h = s[o / 4];
|
|
700
700
|
o += 4;
|
|
701
701
|
for (let a = 0; a < h; a++) {
|
|
702
|
-
let
|
|
702
|
+
let g = s[o / 4];
|
|
703
703
|
o += 4;
|
|
704
|
-
let p = new TextDecoder("utf-8").decode(n.slice(o, o +
|
|
705
|
-
o +=
|
|
704
|
+
let p = new TextDecoder("utf-8").decode(n.slice(o, o + g));
|
|
705
|
+
o += g, this._processResponseFn(p);
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
}, i.readAsArrayBuffer(t.data);
|
|
@@ -741,9 +741,9 @@ class Os extends Mr {
|
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
globalThis.g_emitDescriptor_maxBytes = 3e4;
|
|
744
|
-
let
|
|
744
|
+
let to = -1;
|
|
745
745
|
wr.SetLoggerVerbosity(1);
|
|
746
|
-
class
|
|
746
|
+
class eo extends C {
|
|
747
747
|
constructor(t, i) {
|
|
748
748
|
super();
|
|
749
749
|
f(this, "_eventTarget", new EventTarget());
|
|
@@ -782,22 +782,70 @@ class to extends C {
|
|
|
782
782
|
_initPixelStream(t, i) {
|
|
783
783
|
const r = new yr({
|
|
784
784
|
initialSettings: {
|
|
785
|
-
AutoPlayVideo:
|
|
786
|
-
AutoConnect:
|
|
785
|
+
// AutoPlayVideo: true,
|
|
786
|
+
// AutoConnect: true,
|
|
787
787
|
// StartVideoMuted: true,
|
|
788
|
-
|
|
789
|
-
//
|
|
788
|
+
// SuppressBrowserKeys: false,
|
|
789
|
+
// [TextParameters.SignallingServerUrl]: ss_url,
|
|
790
|
+
// ========== 连接与播放相关 ==========
|
|
791
|
+
AutoConnect: !0,
|
|
792
|
+
// 自动连接到信令服务器 (默认: false)
|
|
793
|
+
AutoPlayVideo: !0,
|
|
794
|
+
// 视频准备好后自动播放 (默认: true)
|
|
795
|
+
// ========== 音视频控制 ==========
|
|
796
|
+
StartVideoMuted: !0,
|
|
797
|
+
// 视频不静音启动 (默认: false) : 首屏需要出现画面所以静音
|
|
798
|
+
UseMic: !1,
|
|
799
|
+
// 不使用麦克风 (默认: false)
|
|
800
|
+
ForceMonoAudio: !1,
|
|
801
|
+
// 不强制单声道音频 (默认: false)
|
|
802
|
+
// ========== 输入控制 ==========
|
|
803
|
+
KeyboardInput: !0,
|
|
804
|
+
// 启用键盘输入 (默认: true)
|
|
805
|
+
MouseInput: !0,
|
|
806
|
+
// 启用鼠标输入 (默认: true)
|
|
807
|
+
TouchInput: !0,
|
|
808
|
+
// 启用触摸输入 (默认: true)
|
|
809
|
+
GamepadInput: !0,
|
|
810
|
+
// 启用手柄输入 (默认: true)
|
|
811
|
+
XRControllerInput: !0,
|
|
812
|
+
// 启用XR控制器输入 (默认: true)
|
|
790
813
|
SuppressBrowserKeys: !1,
|
|
791
|
-
|
|
814
|
+
// 抑制浏览器快捷键(F5/F11等) (默认: true) :浏览器需要调试(F12)等,所以不能抑制
|
|
815
|
+
// ========== 鼠标模式 ==========
|
|
816
|
+
HoveringMouse: !0,
|
|
817
|
+
// 悬停鼠标模式(false=锁定鼠标) (默认: false)
|
|
818
|
+
FakeMouseWithTouches: !1,
|
|
819
|
+
// 单指触摸转换为鼠标事件 (默认: false)
|
|
820
|
+
// ========== WebRTC 配置 ==========
|
|
821
|
+
//@ts-ignore
|
|
822
|
+
BrowserSendOffer: !1,
|
|
823
|
+
// 浏览器不主动发起offer (默认: false)
|
|
824
|
+
ForceTURN: !1,
|
|
825
|
+
// 不强制使用TURN中继 (默认: false)
|
|
826
|
+
PreferSFU: !1,
|
|
827
|
+
// 不优先使用SFU (默认: false)
|
|
828
|
+
// ========== 质量与性能 ==========
|
|
829
|
+
IsQualityController: !0,
|
|
830
|
+
// 作为质量控制器 (默认: true)
|
|
831
|
+
MatchViewportResolution: !0,
|
|
832
|
+
// 动态匹配视口分辨率 (默认: false)
|
|
833
|
+
// ========== AFK 检测 ==========
|
|
834
|
+
AFKDetection: !1,
|
|
835
|
+
// 不启用AFK超时检测 (默认: false) :关闭超时未操作时断开连接
|
|
836
|
+
// ========== 信令服务器URL ==========
|
|
837
|
+
[mr.SignallingServerUrl]: i
|
|
838
|
+
// (默认: 自动检测当前主机)
|
|
839
|
+
// 或使用简写: ss: 'ws://localhost:8888'
|
|
792
840
|
}
|
|
793
841
|
});
|
|
794
|
-
return r.
|
|
842
|
+
return r.setNumericSetting(Cr.MaxReconnectAttempts, 0), new Fr(r, { videoElementParent: t });
|
|
795
843
|
}
|
|
796
844
|
get pixelStream() {
|
|
797
845
|
return this._pixelStream;
|
|
798
846
|
}
|
|
799
847
|
_initEsMsgWsWrapper(t) {
|
|
800
|
-
return t ? this.dv(new
|
|
848
|
+
return t ? this.dv(new js(this, t)) : void 0;
|
|
801
849
|
}
|
|
802
850
|
get esMsgWsWrapper() {
|
|
803
851
|
return this._esMsgWsWrapper;
|
|
@@ -860,15 +908,15 @@ class to extends C {
|
|
|
860
908
|
// 发送UI interface
|
|
861
909
|
emitUIInteractionForBigData(t, i) {
|
|
862
910
|
typeof i == "function" && (t.callid = M(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
863
|
-
const r = JSON.stringify(t), n = globalThis.g_emitDescriptor_maxBytes, s = r.length, o = ++
|
|
911
|
+
const r = JSON.stringify(t), n = globalThis.g_emitDescriptor_maxBytes, s = r.length, o = ++to;
|
|
864
912
|
if (this.esMsgWsWrapper) {
|
|
865
913
|
if (s < n) {
|
|
866
914
|
this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-0/1-` + r);
|
|
867
915
|
return;
|
|
868
916
|
}
|
|
869
917
|
const h = Math.ceil(s / n) | 0;
|
|
870
|
-
[...new Array(h).keys()].map((
|
|
871
|
-
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-${p}/${h}-` +
|
|
918
|
+
[...new Array(h).keys()].map((g) => r.slice(g * n, (g + 1) * n)).forEach((g, p) => {
|
|
919
|
+
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-${p}/${h}-` + g);
|
|
872
920
|
});
|
|
873
921
|
}
|
|
874
922
|
}
|
|
@@ -896,12 +944,12 @@ class to extends C {
|
|
|
896
944
|
console.log(`resizeUEVideo emitCommand ${t} ${i} begin`), this.emitCommand(r);
|
|
897
945
|
}
|
|
898
946
|
}
|
|
899
|
-
class
|
|
947
|
+
class io extends C {
|
|
900
948
|
constructor(t, i, r) {
|
|
901
949
|
super();
|
|
902
950
|
f(this, "_instance");
|
|
903
951
|
f(this, "_event", this.dv(new x()));
|
|
904
|
-
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new
|
|
952
|
+
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new eo(this._container, { url: this._wsuri, esmsgWsUri: this._esmsgWsUri })), this.instanceInit();
|
|
905
953
|
}
|
|
906
954
|
get webSocketReady() {
|
|
907
955
|
return this._instance.esWebSocketReady;
|
|
@@ -960,7 +1008,7 @@ class eo extends C {
|
|
|
960
1008
|
this._instance.resizeUEVideo(t, i);
|
|
961
1009
|
}
|
|
962
1010
|
}
|
|
963
|
-
class
|
|
1011
|
+
class ro extends Be {
|
|
964
1012
|
constructor(t, i, r, n) {
|
|
965
1013
|
super();
|
|
966
1014
|
f(this, "_esueViewerWrapper");
|
|
@@ -978,96 +1026,96 @@ class io extends Be {
|
|
|
978
1026
|
f(this, "_webRtcConnected", this.dv(W(!1)));
|
|
979
1027
|
this._ueViewer = n, console.log("CSTMPSViewer init ! 以官方像素流 + 独立通信的模式启动!");
|
|
980
1028
|
const s = this._ueViewer;
|
|
981
|
-
this._esueViewerWrapper = this.dv(new
|
|
1029
|
+
this._esueViewerWrapper = this.dv(new io(t, i, r));
|
|
982
1030
|
const o = this._esueViewerWrapper;
|
|
983
1031
|
{
|
|
984
|
-
const
|
|
985
|
-
|
|
1032
|
+
const c = () => o.debug = s.debug ?? !1;
|
|
1033
|
+
c(), this.d(s.debugChanged.don(c));
|
|
986
1034
|
}
|
|
987
1035
|
let h = !1;
|
|
988
1036
|
{
|
|
989
|
-
const
|
|
1037
|
+
const c = () => {
|
|
990
1038
|
if (h) return;
|
|
991
|
-
const
|
|
992
|
-
if (this.videoinited && this.webRtcConnected &&
|
|
1039
|
+
const u = o.webSocketReady;
|
|
1040
|
+
if (this.videoinited && this.webRtcConnected && u) {
|
|
993
1041
|
console.log("%c[EarthSDK: esmsgWebSocket && videoinited && webRtcConnected]", "background: #a6ec99; color: black");
|
|
994
|
-
const
|
|
995
|
-
o.emitUIInteractionForBigData(
|
|
1042
|
+
const v = { eventType: "init", params: {} };
|
|
1043
|
+
o.emitUIInteractionForBigData(v), this._readyEvent.emit(), h = !0;
|
|
996
1044
|
}
|
|
997
1045
|
};
|
|
998
1046
|
this.d(this.videoinitedChanged.don(() => {
|
|
999
|
-
|
|
1047
|
+
c();
|
|
1000
1048
|
})), this.d(this.webRtcConnectedChanged.don(() => {
|
|
1001
|
-
|
|
1049
|
+
c();
|
|
1002
1050
|
})), this.d(this.esmsgwsopenChanged.don(() => {
|
|
1003
|
-
|
|
1051
|
+
c();
|
|
1004
1052
|
}));
|
|
1005
1053
|
}
|
|
1006
|
-
this.d(o.event.don((
|
|
1007
|
-
if (
|
|
1008
|
-
this._errorEvent.emit(
|
|
1009
|
-
else if (
|
|
1010
|
-
const
|
|
1011
|
-
if (
|
|
1012
|
-
const w =
|
|
1054
|
+
this.d(o.event.don((c, u) => {
|
|
1055
|
+
if (c === "error")
|
|
1056
|
+
this._errorEvent.emit(u);
|
|
1057
|
+
else if (c === "ueevent") {
|
|
1058
|
+
const v = JSON.parse(u);
|
|
1059
|
+
if (v.t === "cr") {
|
|
1060
|
+
const w = v;
|
|
1013
1061
|
if (w.frs && this._ueFuncResultWithIdsEvent.emit(w.frs), w.ers)
|
|
1014
1062
|
for (let y of w.ers)
|
|
1015
1063
|
this._ueEvent.emit(y);
|
|
1016
1064
|
}
|
|
1017
|
-
} else
|
|
1065
|
+
} else c === "webRtcConnected" ? this.webRtcConnected = !0 : c === "videoinited" ? this.videoinited = !0 : c === "esmsgwsopen" && (this.esmsgwsopen = !0);
|
|
1018
1066
|
}));
|
|
1019
1067
|
{
|
|
1020
|
-
const
|
|
1021
|
-
let
|
|
1022
|
-
|
|
1023
|
-
if (
|
|
1024
|
-
if (
|
|
1025
|
-
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${
|
|
1068
|
+
const c = this.dv(be());
|
|
1069
|
+
let u, v;
|
|
1070
|
+
c.start(() => {
|
|
1071
|
+
if (u !== t.offsetWidth || v !== t.offsetHeight) {
|
|
1072
|
+
if (u = t.offsetWidth, v = t.offsetHeight, u === void 0 || v === void 0 || !Number.isFinite(u) || !Number.isFinite(v) || u < 0 || v < 0) {
|
|
1073
|
+
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${u} ${v}`);
|
|
1026
1074
|
return;
|
|
1027
1075
|
}
|
|
1028
|
-
o.resize(
|
|
1076
|
+
o.resize(u, v), console.log(`resize: ${u} ${v}`);
|
|
1029
1077
|
}
|
|
1030
1078
|
});
|
|
1031
1079
|
}
|
|
1032
|
-
this.d(this._ueFuncResultWithIdsEvent.don((
|
|
1033
|
-
for (const
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1080
|
+
this.d(this._ueFuncResultWithIdsEvent.don((c) => {
|
|
1081
|
+
for (const u of c) {
|
|
1082
|
+
const v = this._waitingUeFuncIdAndResultCallbacks.get(u.fid);
|
|
1083
|
+
v && (this._waitingUeFuncIdAndResultCallbacks.delete(u.fid), v.resultCallback(u.r));
|
|
1036
1084
|
}
|
|
1037
1085
|
}));
|
|
1038
1086
|
let a = 0;
|
|
1039
|
-
const
|
|
1040
|
-
const
|
|
1087
|
+
const g = (c) => {
|
|
1088
|
+
const u = {
|
|
1041
1089
|
n: a++,
|
|
1042
1090
|
tt: Date.now(),
|
|
1043
1091
|
t: "c",
|
|
1044
|
-
fs:
|
|
1092
|
+
fs: c
|
|
1045
1093
|
};
|
|
1046
|
-
this._waitingUeCalls.add(
|
|
1094
|
+
this._waitingUeCalls.add(u), s.debug && (console.group(
|
|
1047
1095
|
"%cxe2 => ue",
|
|
1048
1096
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
1049
1097
|
), console.log(
|
|
1050
|
-
`%c${JSON.stringify(
|
|
1098
|
+
`%c${JSON.stringify(u, void 0, "")}`,
|
|
1051
1099
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1052
|
-
), console.groupEnd()), this._esueViewerWrapper.emitUIInteractionForBigData(
|
|
1053
|
-
this._waitingUeCalls.delete(
|
|
1100
|
+
), console.groupEnd()), this._esueViewerWrapper.emitUIInteractionForBigData(u, () => {
|
|
1101
|
+
this._waitingUeCalls.delete(u);
|
|
1054
1102
|
});
|
|
1055
1103
|
}, p = () => {
|
|
1056
1104
|
if (!h || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1057
|
-
const
|
|
1058
|
-
for (const [
|
|
1059
|
-
this._waitingUeFuncIdAndResultCallbacks.set(
|
|
1105
|
+
const c = this._ueFuncWithIdAndResultCallbacks.map(([u]) => u);
|
|
1106
|
+
for (const [u, v] of this._ueFuncWithIdAndResultCallbacks)
|
|
1107
|
+
this._waitingUeFuncIdAndResultCallbacks.set(u.fid, v);
|
|
1060
1108
|
this._ueFuncWithIdAndResultCallbacks.length = 0;
|
|
1061
1109
|
{
|
|
1062
|
-
const
|
|
1063
|
-
let w =
|
|
1110
|
+
const u = globalThis.g_emitDescriptor_maxBytes, v = c.map((D) => ({ f: D, s: JSON.stringify(D).length }));
|
|
1111
|
+
let w = v.length, y = 0, T = 0, m = [];
|
|
1064
1112
|
do {
|
|
1065
1113
|
do {
|
|
1066
|
-
const { f:
|
|
1067
|
-
if (m.push(
|
|
1114
|
+
const { f: D, s: F } = v[y];
|
|
1115
|
+
if (m.push(D), ++y, T + F > u || m.length >= 20)
|
|
1068
1116
|
break;
|
|
1069
1117
|
} while (y < w);
|
|
1070
|
-
m.length > 0 && (s.debug && console.log(`传送${m.length}条消息...`),
|
|
1118
|
+
m.length > 0 && (s.debug && console.log(`传送${m.length}条消息...`), g([...m]), m.length = 0, T = 0);
|
|
1071
1119
|
} while (y < w);
|
|
1072
1120
|
}
|
|
1073
1121
|
};
|
|
@@ -1143,27 +1191,27 @@ class io extends Be {
|
|
|
1143
1191
|
};
|
|
1144
1192
|
}
|
|
1145
1193
|
}
|
|
1146
|
-
function
|
|
1194
|
+
function no(d) {
|
|
1147
1195
|
let e = "";
|
|
1148
1196
|
const t = new Uint8Array(d), i = t.length;
|
|
1149
1197
|
for (let r = 0; r < i; r++)
|
|
1150
1198
|
e += String.fromCharCode(t[r]);
|
|
1151
1199
|
return btoa(e);
|
|
1152
1200
|
}
|
|
1153
|
-
const
|
|
1201
|
+
const so = (d) => {
|
|
1154
1202
|
const e = {
|
|
1155
1203
|
type: "input",
|
|
1156
|
-
inputdata:
|
|
1204
|
+
inputdata: no(d)
|
|
1157
1205
|
};
|
|
1158
1206
|
return JSON.stringify(e);
|
|
1159
1207
|
};
|
|
1160
|
-
function
|
|
1208
|
+
function oo(d) {
|
|
1161
1209
|
return typeof d == "string" ? document.getElementById(d) : d;
|
|
1162
1210
|
}
|
|
1163
1211
|
globalThis.g_emitDescriptor_maxBytes = 3e4;
|
|
1164
|
-
let
|
|
1212
|
+
let ao = -1;
|
|
1165
1213
|
wr.SetLoggerVerbosity(1);
|
|
1166
|
-
class
|
|
1214
|
+
class lo extends C {
|
|
1167
1215
|
constructor(t, i) {
|
|
1168
1216
|
super();
|
|
1169
1217
|
f(this, "debug", !1);
|
|
@@ -1176,31 +1224,78 @@ class ao extends C {
|
|
|
1176
1224
|
this._container = t, this._option = i;
|
|
1177
1225
|
const r = new yr({
|
|
1178
1226
|
initialSettings: {
|
|
1179
|
-
|
|
1180
|
-
|
|
1227
|
+
// AutoPlayVideo: true,
|
|
1228
|
+
// AutoConnect: true,
|
|
1229
|
+
// StartVideoMuted: true,
|
|
1230
|
+
// SuppressBrowserKeys: false,
|
|
1231
|
+
// [TextParameters.SignallingServerUrl]: ss_url,
|
|
1232
|
+
// ========== 连接与播放相关 ==========
|
|
1181
1233
|
AutoConnect: !0,
|
|
1182
|
-
|
|
1183
|
-
|
|
1234
|
+
// 自动连接到信令服务器 (默认: false)
|
|
1235
|
+
AutoPlayVideo: !0,
|
|
1236
|
+
// 视频准备好后自动播放 (默认: true)
|
|
1237
|
+
// ========== 音视频控制 ==========
|
|
1238
|
+
StartVideoMuted: !0,
|
|
1239
|
+
// 视频不静音启动 (默认: false) : 首屏需要出现画面所以静音
|
|
1240
|
+
UseMic: !1,
|
|
1241
|
+
// 不使用麦克风 (默认: false)
|
|
1242
|
+
ForceMonoAudio: !1,
|
|
1243
|
+
// 不强制单声道音频 (默认: false)
|
|
1244
|
+
// ========== 输入控制 ==========
|
|
1245
|
+
KeyboardInput: !0,
|
|
1246
|
+
// 启用键盘输入 (默认: true)
|
|
1247
|
+
MouseInput: !0,
|
|
1248
|
+
// 启用鼠标输入 (默认: true)
|
|
1249
|
+
TouchInput: !0,
|
|
1250
|
+
// 启用触摸输入 (默认: true)
|
|
1251
|
+
GamepadInput: !0,
|
|
1252
|
+
// 启用手柄输入 (默认: true)
|
|
1253
|
+
XRControllerInput: !0,
|
|
1254
|
+
// 启用XR控制器输入 (默认: true)
|
|
1184
1255
|
SuppressBrowserKeys: !1,
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1256
|
+
// 抑制浏览器快捷键(F5/F11等) (默认: true) :浏览器需要调试(F12)等,所以不能抑制
|
|
1257
|
+
// ========== 鼠标模式 ==========
|
|
1258
|
+
HoveringMouse: !0,
|
|
1259
|
+
// 悬停鼠标模式(false=锁定鼠标) (默认: false)
|
|
1260
|
+
FakeMouseWithTouches: !1,
|
|
1261
|
+
// 单指触摸转换为鼠标事件 (默认: false)
|
|
1262
|
+
// ========== WebRTC 配置 ==========
|
|
1263
|
+
//@ts-ignore
|
|
1264
|
+
BrowserSendOffer: !1,
|
|
1265
|
+
// 浏览器不主动发起offer (默认: false)
|
|
1266
|
+
ForceTURN: !1,
|
|
1267
|
+
// 不强制使用TURN中继 (默认: false)
|
|
1268
|
+
PreferSFU: !1,
|
|
1269
|
+
// 不优先使用SFU (默认: false)
|
|
1270
|
+
// ========== 质量与性能 ==========
|
|
1271
|
+
IsQualityController: !0,
|
|
1272
|
+
// 作为质量控制器 (默认: true)
|
|
1273
|
+
MatchViewportResolution: !0,
|
|
1274
|
+
// 动态匹配视口分辨率 (默认: false)
|
|
1275
|
+
// ========== AFK 检测 ==========
|
|
1276
|
+
AFKDetection: !1,
|
|
1277
|
+
// 不启用AFK超时检测 (默认: false) :关闭超时未操作时断开连接
|
|
1278
|
+
// ========== 信令服务器URL ==========
|
|
1279
|
+
[mr.SignallingServerUrl]: this._option.ws
|
|
1280
|
+
// (默认: 自动检测当前主机)
|
|
1281
|
+
// 或使用简写: ss: 'ws://localhost:8888'
|
|
1282
|
+
}
|
|
1188
1283
|
});
|
|
1189
|
-
r.
|
|
1284
|
+
r.setNumericSetting(Cr.MaxReconnectAttempts, 0), this._pixelStream = new Fr(r, { videoElementParent: this.container }), this.d(() => {
|
|
1190
1285
|
this._pixelStream.disconnect();
|
|
1191
1286
|
});
|
|
1192
1287
|
{
|
|
1193
1288
|
const n = this.pixelStream.webSocketController.webSocket, s = this._pixelStream._webRtcController.sendMessageController.dataChannelSender.sendData;
|
|
1194
1289
|
this._pixelStream._webRtcController.sendMessageController.dataChannelSender.constructor.prototype.sendData = function(o) {
|
|
1195
|
-
n ? n.send(
|
|
1290
|
+
n ? n.send(so(o)) : s.call(this, o);
|
|
1196
1291
|
};
|
|
1197
1292
|
}
|
|
1198
1293
|
{
|
|
1199
1294
|
const n = (s) => {
|
|
1200
1295
|
const o = this._pixelStream._webRtcController.mouseController;
|
|
1201
1296
|
setTimeout(() => {
|
|
1202
|
-
const h = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY),
|
|
1203
|
-
|
|
1297
|
+
const h = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY), g = o.toStreamerMessagesProvider.toStreamerHandlers.get("MouseUp");
|
|
1298
|
+
g && g([s.button, h.x, h.y]), s.preventDefault();
|
|
1204
1299
|
});
|
|
1205
1300
|
};
|
|
1206
1301
|
this.container.addEventListener("dblclick", n), this.d(() => {
|
|
@@ -1237,7 +1332,7 @@ class ao extends C {
|
|
|
1237
1332
|
return this._ueevent;
|
|
1238
1333
|
}
|
|
1239
1334
|
get container() {
|
|
1240
|
-
return
|
|
1335
|
+
return oo(this._container);
|
|
1241
1336
|
}
|
|
1242
1337
|
get pixelStream() {
|
|
1243
1338
|
return this._pixelStream;
|
|
@@ -1265,19 +1360,19 @@ class ao extends C {
|
|
|
1265
1360
|
//大数据拆分
|
|
1266
1361
|
emitUIInteractionForBigData(t, i) {
|
|
1267
1362
|
typeof i == "function" && (t.callid = M(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
1268
|
-
const r = JSON.stringify(t), n = globalThis.g_emitDescriptor_maxBytes ?? 3e4, s = r.length, o = ++
|
|
1363
|
+
const r = JSON.stringify(t), n = globalThis.g_emitDescriptor_maxBytes ?? 3e4, s = r.length, o = ++ao;
|
|
1269
1364
|
if (s < n) {
|
|
1270
|
-
const
|
|
1365
|
+
const g = {
|
|
1271
1366
|
type: "earthsdk",
|
|
1272
1367
|
time: (/* @__PURE__ */ new Date()).getTime(),
|
|
1273
1368
|
params: `${o}-0/1-` + r
|
|
1274
1369
|
};
|
|
1275
|
-
this.sendData(JSON.stringify(
|
|
1370
|
+
this.sendData(JSON.stringify(g));
|
|
1276
1371
|
return;
|
|
1277
1372
|
}
|
|
1278
1373
|
const h = Math.ceil(s / n) | 0;
|
|
1279
|
-
[...new Array(h).keys()].map((
|
|
1280
|
-
const l = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${p}/${h}-` +
|
|
1374
|
+
[...new Array(h).keys()].map((g) => r.slice(g * n, (g + 1) * n)).forEach((g, p) => {
|
|
1375
|
+
const l = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${p}/${h}-` + g };
|
|
1281
1376
|
this.sendData(JSON.stringify(l));
|
|
1282
1377
|
});
|
|
1283
1378
|
}
|
|
@@ -1318,12 +1413,12 @@ class ao extends C {
|
|
|
1318
1413
|
console.log(`resizeUEVideo emitCommand ${t} ${i} begin`), this.emitCommand(r);
|
|
1319
1414
|
}
|
|
1320
1415
|
}
|
|
1321
|
-
class
|
|
1416
|
+
class co extends C {
|
|
1322
1417
|
constructor(t, i, r) {
|
|
1323
1418
|
super();
|
|
1324
1419
|
f(this, "_instance");
|
|
1325
1420
|
f(this, "_event", this.dv(new x()));
|
|
1326
|
-
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new
|
|
1421
|
+
this._container = t, this._wsuri = i, this._esmsgWsUri = r, this._instance = this.dv(new lo(this._container, { ws: this._wsuri })), this.d(this._instance.connected.don((n) => {
|
|
1327
1422
|
this._event.emit(n, n), console.log(`%c[EarthSDK] ${n}`, "background: #a6ec99; color: black");
|
|
1328
1423
|
})), this.d(this._instance.error.don((n) => {
|
|
1329
1424
|
this._event.emit("errorEvent", n), console.log(`%c[EarthSDK] ${n}`, "background: red; color: black");
|
|
@@ -1362,7 +1457,7 @@ class lo extends C {
|
|
|
1362
1457
|
this._instance.resizeUEVideo(t, i);
|
|
1363
1458
|
}
|
|
1364
1459
|
}
|
|
1365
|
-
class
|
|
1460
|
+
class uo extends Be {
|
|
1366
1461
|
constructor(t, i, r, n) {
|
|
1367
1462
|
super();
|
|
1368
1463
|
f(this, "_videoInitialized", this.dv(W(!1)));
|
|
@@ -1377,7 +1472,7 @@ class co extends Be {
|
|
|
1377
1472
|
f(this, "_errorEvent", this.dv(new x()));
|
|
1378
1473
|
f(this, "_readyEvent", this.dv(new x()));
|
|
1379
1474
|
this._ueViewer = n, console.log("INNPSViewer init ! 以内置信令服务器模式启动!");
|
|
1380
|
-
const s = this._ueViewer, o = this.dv(new
|
|
1475
|
+
const s = this._ueViewer, o = this.dv(new co(t, i, r));
|
|
1381
1476
|
this._ue5ViewerWrapper = o;
|
|
1382
1477
|
{
|
|
1383
1478
|
const l = () => o.debug = s.debug ?? !1;
|
|
@@ -1385,25 +1480,25 @@ class co extends Be {
|
|
|
1385
1480
|
}
|
|
1386
1481
|
{
|
|
1387
1482
|
let l = !1;
|
|
1388
|
-
const
|
|
1483
|
+
const c = this.dv(P(
|
|
1389
1484
|
this._videoInitialized.changed,
|
|
1390
1485
|
this._webRtcConnected.changed,
|
|
1391
1486
|
this._webSocketOpen.changed
|
|
1392
1487
|
));
|
|
1393
|
-
this.d(
|
|
1488
|
+
this.d(c.don(() => {
|
|
1394
1489
|
if (l) return;
|
|
1395
|
-
const
|
|
1396
|
-
if (this.videoInitialized && this.webRtcConnected &&
|
|
1490
|
+
const u = this._ue5ViewerWrapper.instance.webSocketReady;
|
|
1491
|
+
if (this.videoInitialized && this.webRtcConnected && u) {
|
|
1397
1492
|
this._ue5ViewerWrapper.instance.emitUIInteraction(), this._readyEvent.emit(), l = !0, console.log("%c[EarthSDK videoInitialized && webRtcConnected && webSocketReady]", "background: #a6ec99; color: black");
|
|
1398
|
-
const
|
|
1399
|
-
this._ue5ViewerWrapper.emitUIInteractionForBigData(
|
|
1493
|
+
const v = { eventType: "init", params: {} };
|
|
1494
|
+
this._ue5ViewerWrapper.emitUIInteractionForBigData(v);
|
|
1400
1495
|
} else
|
|
1401
|
-
console.warn("webSocketReady",
|
|
1496
|
+
console.warn("webSocketReady", u), l = !1;
|
|
1402
1497
|
}));
|
|
1403
1498
|
}
|
|
1404
|
-
this.d(o.event.don((l,
|
|
1499
|
+
this.d(o.event.don((l, c) => {
|
|
1405
1500
|
if (l === "errorEvent")
|
|
1406
|
-
this._errorEvent.emit(
|
|
1501
|
+
this._errorEvent.emit(c);
|
|
1407
1502
|
else if (l === "videoInitialized")
|
|
1408
1503
|
this._videoInitialized.value = !0;
|
|
1409
1504
|
else if (l === "webRtcConnected")
|
|
@@ -1411,71 +1506,71 @@ class co extends Be {
|
|
|
1411
1506
|
else if (l === "webSocketOpen")
|
|
1412
1507
|
this._webSocketOpen.value = !0;
|
|
1413
1508
|
else if (l === "ueevent") {
|
|
1414
|
-
const
|
|
1415
|
-
if (
|
|
1416
|
-
const
|
|
1417
|
-
if (
|
|
1418
|
-
for (let w of
|
|
1509
|
+
const u = JSON.parse(c);
|
|
1510
|
+
if (u.t === "cr") {
|
|
1511
|
+
const v = u;
|
|
1512
|
+
if (v.frs && this._ueFuncResultWithIdsEvent.emit(v.frs), v.ers)
|
|
1513
|
+
for (let w of v.ers)
|
|
1419
1514
|
this._ueEvent.emit(w);
|
|
1420
1515
|
}
|
|
1421
1516
|
}
|
|
1422
1517
|
}));
|
|
1423
1518
|
{
|
|
1424
1519
|
const l = this.dv(be());
|
|
1425
|
-
let
|
|
1520
|
+
let c, u, v;
|
|
1426
1521
|
l.start(() => {
|
|
1427
|
-
if (
|
|
1428
|
-
if (
|
|
1429
|
-
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${
|
|
1522
|
+
if (c !== t.offsetWidth || u !== t.offsetHeight || v !== s.resolutionScale) {
|
|
1523
|
+
if (c = t.offsetWidth, u = t.offsetHeight, c === void 0 || u === void 0 || !Number.isFinite(c) || !Number.isFinite(u) || c < 0 || u < 0) {
|
|
1524
|
+
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${c} ${u}`);
|
|
1430
1525
|
return;
|
|
1431
1526
|
}
|
|
1432
|
-
|
|
1527
|
+
v = s.resolutionScale, o.resize(c / v, u / v);
|
|
1433
1528
|
}
|
|
1434
1529
|
});
|
|
1435
1530
|
}
|
|
1436
1531
|
this.d(this._ueFuncResultWithIdsEvent.don((l) => {
|
|
1437
|
-
for (const
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1532
|
+
for (const c of l) {
|
|
1533
|
+
const u = this._waitingUeFuncIdAndResultCallbacks.get(c.fid);
|
|
1534
|
+
u && (this._waitingUeFuncIdAndResultCallbacks.delete(c.fid), u.resultCallback(c.r));
|
|
1440
1535
|
}
|
|
1441
1536
|
}));
|
|
1442
1537
|
let h = 0;
|
|
1443
1538
|
const a = (l) => {
|
|
1444
|
-
const
|
|
1539
|
+
const c = {
|
|
1445
1540
|
n: h++,
|
|
1446
1541
|
tt: Date.now(),
|
|
1447
1542
|
t: "c",
|
|
1448
1543
|
fs: l
|
|
1449
1544
|
};
|
|
1450
|
-
this._waitingUeCalls.add(
|
|
1545
|
+
this._waitingUeCalls.add(c), s.debug && (console.group(
|
|
1451
1546
|
"%cxe2 => ue",
|
|
1452
1547
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
1453
1548
|
), console.log(
|
|
1454
|
-
`%c${JSON.stringify(
|
|
1549
|
+
`%c${JSON.stringify(c, void 0, "")}`,
|
|
1455
1550
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1456
|
-
), console.groupEnd()), this._ue5ViewerWrapper.emitUIInteractionForBigData(
|
|
1457
|
-
this._waitingUeCalls.delete(
|
|
1551
|
+
), console.groupEnd()), this._ue5ViewerWrapper.emitUIInteractionForBigData(c, () => {
|
|
1552
|
+
this._waitingUeCalls.delete(c);
|
|
1458
1553
|
});
|
|
1459
|
-
},
|
|
1554
|
+
}, g = () => {
|
|
1460
1555
|
if (!this._ue5ViewerWrapper.instance.webSocketReady || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1461
|
-
const
|
|
1462
|
-
for (const [
|
|
1463
|
-
this._waitingUeFuncIdAndResultCallbacks.set(
|
|
1556
|
+
const c = this._ueFuncWithIdAndResultCallbacks.map(([u]) => u);
|
|
1557
|
+
for (const [u, v] of this._ueFuncWithIdAndResultCallbacks)
|
|
1558
|
+
this._waitingUeFuncIdAndResultCallbacks.set(u.fid, v);
|
|
1464
1559
|
this._ueFuncWithIdAndResultCallbacks.length = 0;
|
|
1465
1560
|
{
|
|
1466
|
-
const
|
|
1467
|
-
let w =
|
|
1561
|
+
const u = globalThis.g_emitDescriptor_maxBytes, v = c.map((D) => ({ f: D, s: JSON.stringify(D).length }));
|
|
1562
|
+
let w = v.length, y = 0, T = 0, m = [];
|
|
1468
1563
|
do {
|
|
1469
1564
|
do {
|
|
1470
|
-
const { f:
|
|
1471
|
-
if (m.push(
|
|
1565
|
+
const { f: D, s: F } = v[y];
|
|
1566
|
+
if (m.push(D), ++y, T + F > u || m.length >= 20)
|
|
1472
1567
|
break;
|
|
1473
1568
|
} while (y < w);
|
|
1474
|
-
m.length > 0 && (s.debug && console.log(`传送${m.length}条消息...`), a([...m]), m.length = 0,
|
|
1569
|
+
m.length > 0 && (s.debug && console.log(`传送${m.length}条消息...`), a([...m]), m.length = 0, T = 0);
|
|
1475
1570
|
} while (y < w);
|
|
1476
1571
|
}
|
|
1477
1572
|
};
|
|
1478
|
-
this.dv(Se()).start(
|
|
1573
|
+
this.dv(Se()).start(g, 50), this.d(() => console.log("UeCloudViewer正在销毁..."));
|
|
1479
1574
|
}
|
|
1480
1575
|
get videoInitialized() {
|
|
1481
1576
|
return this._videoInitialized.value;
|
|
@@ -1528,7 +1623,7 @@ class co extends Be {
|
|
|
1528
1623
|
};
|
|
1529
1624
|
}
|
|
1530
1625
|
}
|
|
1531
|
-
class
|
|
1626
|
+
class ho extends C {
|
|
1532
1627
|
/**
|
|
1533
1628
|
* Creates an instance of DLViewer.
|
|
1534
1629
|
* @param {HTMLDivElement} container
|
|
@@ -1548,7 +1643,7 @@ class uo extends C {
|
|
|
1548
1643
|
this._vIframe = o, o.style.cssText = "width: 100%; height: 100%; margin: 0; padding: 0; border: none; outline: none;", t.appendChild(o), this.d(() => {
|
|
1549
1644
|
o && t.removeChild(o);
|
|
1550
1645
|
});
|
|
1551
|
-
const h =
|
|
1646
|
+
const h = E.getStrFromEnv(r + `/web/${i}.html`);
|
|
1552
1647
|
o.src = h, o.onload = () => {
|
|
1553
1648
|
const a = o.contentWindow;
|
|
1554
1649
|
if (!a) {
|
|
@@ -1568,12 +1663,12 @@ class uo extends C {
|
|
|
1568
1663
|
return this._vIframe;
|
|
1569
1664
|
}
|
|
1570
1665
|
}
|
|
1571
|
-
const
|
|
1666
|
+
const Ye = typeof TextDecoder < "u" ? new TextDecoder() : void 0, po = (d, e = 0, t = NaN) => {
|
|
1572
1667
|
const i = e + t;
|
|
1573
1668
|
let r = e;
|
|
1574
1669
|
for (; d[r] && !(r >= i); ) ++r;
|
|
1575
|
-
if (r - e > 16 && d.buffer &&
|
|
1576
|
-
return
|
|
1670
|
+
if (r - e > 16 && d.buffer && Ye)
|
|
1671
|
+
return Ye.decode(d.subarray(e, r));
|
|
1577
1672
|
let n = "";
|
|
1578
1673
|
for (; e < r; ) {
|
|
1579
1674
|
var s = d[e++];
|
|
@@ -1596,7 +1691,7 @@ const Ze = typeof TextDecoder < "u" ? new TextDecoder() : void 0, ho = (d, e = 0
|
|
|
1596
1691
|
}
|
|
1597
1692
|
return n;
|
|
1598
1693
|
};
|
|
1599
|
-
class
|
|
1694
|
+
class fo extends C {
|
|
1600
1695
|
constructor(e, t, i) {
|
|
1601
1696
|
super();
|
|
1602
1697
|
{
|
|
@@ -1610,7 +1705,7 @@ class po extends C {
|
|
|
1610
1705
|
const a = t[h + "Changed"];
|
|
1611
1706
|
s.push(a);
|
|
1612
1707
|
});
|
|
1613
|
-
const o = this.dv(
|
|
1708
|
+
const o = this.dv(P(...s));
|
|
1614
1709
|
this.d(o.don(r));
|
|
1615
1710
|
}
|
|
1616
1711
|
this.d(t.propChanged.don((r) => {
|
|
@@ -1623,49 +1718,49 @@ class po extends C {
|
|
|
1623
1718
|
} catch (n) {
|
|
1624
1719
|
console.error("ueViewer propChanged:" + n);
|
|
1625
1720
|
}
|
|
1626
|
-
})), t.useCustomInteraction = !1, this.dv(new fr(t, e)), this.dv(new
|
|
1721
|
+
})), t.useCustomInteraction = !1, this.dv(new fr(t, e)), this.dv(new R(t.statusUpdateIntervalChanged, (r) => {
|
|
1627
1722
|
if ((t.statusUpdateInterval ?? 0.5) === 0) return;
|
|
1628
1723
|
const s = new C();
|
|
1629
1724
|
return s.d(i.disposableOnUeEvent("statusUpdate", (o) => {
|
|
1630
1725
|
t.statusUpdateEvent.emit(o);
|
|
1631
1726
|
})), s;
|
|
1632
|
-
})), this.dv(new
|
|
1727
|
+
})), this.dv(new R(t.propChangedListeningChanged, () => {
|
|
1633
1728
|
if (!(t.propChangedListening ?? !0)) return;
|
|
1634
1729
|
const n = new C();
|
|
1635
1730
|
return n.d(i.disposableOnUeEvent("propChanged", (s) => {
|
|
1636
1731
|
t.propChanged.emit(s);
|
|
1637
1732
|
})), n;
|
|
1638
|
-
})), this.dv(new
|
|
1733
|
+
})), this.dv(new R(t.objectEventListeningChanged, () => {
|
|
1639
1734
|
if (!(t.objectEventListening ?? !0)) return;
|
|
1640
1735
|
const n = new C();
|
|
1641
1736
|
return n.d(i.disposableOnUeEvent("objectEvent", (s) => {
|
|
1642
1737
|
t.objectEvent.emit(s);
|
|
1643
1738
|
})), n;
|
|
1644
|
-
})), this.dv(new
|
|
1739
|
+
})), this.dv(new R(t.widgetEventListeningChanged, () => {
|
|
1645
1740
|
if (!(t.widgetEventListening ?? !0)) return;
|
|
1646
1741
|
const n = new C();
|
|
1647
1742
|
return n.d(i.disposableOnUeEvent("widgetEvent", (s) => {
|
|
1648
1743
|
t.widgetEvent.emit(s);
|
|
1649
1744
|
})), n;
|
|
1650
|
-
})), this.dv(new
|
|
1745
|
+
})), this.dv(new R(t.speechRecognitionListeningChanged, () => {
|
|
1651
1746
|
if (!(t.speechRecognitionListening ?? !0)) return;
|
|
1652
1747
|
const n = new C();
|
|
1653
1748
|
return n.d(i.disposableOnUeEvent("speechRecognition", (s) => {
|
|
1654
1749
|
t.speechRecognition.emit(s);
|
|
1655
1750
|
})), n;
|
|
1656
|
-
})), this.dv(new
|
|
1751
|
+
})), this.dv(new R(t.customMessageListeningChanged, () => {
|
|
1657
1752
|
if (!(t.customMessageListening ?? !0)) return;
|
|
1658
1753
|
const n = new C();
|
|
1659
1754
|
return n.d(i.disposableOnUeEvent("customMessage", (s) => {
|
|
1660
1755
|
t.customMessage.emit(s);
|
|
1661
1756
|
})), n;
|
|
1662
|
-
})), this.dv(new
|
|
1757
|
+
})), this.dv(new R(t.editingEventListeningChanged, () => {
|
|
1663
1758
|
if (!(t.editingEventListening ?? !0)) return;
|
|
1664
1759
|
const n = new C();
|
|
1665
1760
|
return n.d(i.disposableOnUeEvent("editingEvent", (s) => {
|
|
1666
1761
|
s.objectIDs = s.objectIDs.map((o) => {
|
|
1667
1762
|
var h;
|
|
1668
|
-
return ((h =
|
|
1763
|
+
return ((h = E.getSceneObjById(o)) == null ? void 0 : h.parentID) ?? o;
|
|
1669
1764
|
}), t.editingEvent.emit(s);
|
|
1670
1765
|
})), n;
|
|
1671
1766
|
})), this.ad(i.disposableOnUeEvent("cameraChanged", () => {
|
|
@@ -1673,7 +1768,7 @@ class po extends C {
|
|
|
1673
1768
|
}));
|
|
1674
1769
|
}
|
|
1675
1770
|
}
|
|
1676
|
-
let
|
|
1771
|
+
let vo = -1;
|
|
1677
1772
|
class go extends Be {
|
|
1678
1773
|
/**
|
|
1679
1774
|
* Creates an instance of H5Viewer.
|
|
@@ -1692,21 +1787,21 @@ class go extends Be {
|
|
|
1692
1787
|
f(this, "_waitingUeCalls", /* @__PURE__ */ new Map());
|
|
1693
1788
|
f(this, "_ueEvent", this.dv(new x()));
|
|
1694
1789
|
this._ueViewer = n;
|
|
1695
|
-
const s = this._ueViewer, o = this.dv(new
|
|
1790
|
+
const s = this._ueViewer, o = this.dv(new ho(t, i, r, s));
|
|
1696
1791
|
let h = !1, a = null;
|
|
1697
1792
|
this.d(o.onRuntimeInitialized.don(() => {
|
|
1698
|
-
var
|
|
1699
|
-
if (h = !0, (
|
|
1793
|
+
var c;
|
|
1794
|
+
if (h = !0, (c = o == null ? void 0 : o.vIframe) != null && c.contentWindow) {
|
|
1700
1795
|
a = o.vIframe.contentWindow;
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1796
|
+
const u = o.vIframe.contentWindow.document.getElementById("mainarea");
|
|
1797
|
+
u ? this.dv(new fo(u, s, this)) : console.error("h5Container is null");
|
|
1703
1798
|
} else {
|
|
1704
1799
|
console.error("iframeWindow is null");
|
|
1705
1800
|
return;
|
|
1706
1801
|
}
|
|
1707
|
-
a.UE_JSHTML5Communication ? a.UE_JSHTML5Communication.UESendMessageToJS = (
|
|
1802
|
+
a.UE_JSHTML5Communication ? a.UE_JSHTML5Communication.UESendMessageToJS = (u) => {
|
|
1708
1803
|
try {
|
|
1709
|
-
const
|
|
1804
|
+
const v = po(a.HEAPU8, u), w = JSON.parse(v);
|
|
1710
1805
|
if (s.debug && (console.group(
|
|
1711
1806
|
"%cUE => JS",
|
|
1712
1807
|
" background-color:#006EFF;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
@@ -1716,43 +1811,43 @@ class go extends Be {
|
|
|
1716
1811
|
), console.groupEnd()), w.t === "cr") {
|
|
1717
1812
|
const y = w;
|
|
1718
1813
|
if (y.frs && this._ueFuncResultWithIdsEvent.emit(y.frs), y.ers)
|
|
1719
|
-
for (let
|
|
1720
|
-
this._ueEvent.emit(
|
|
1814
|
+
for (let T of y.ers)
|
|
1815
|
+
this._ueEvent.emit(T);
|
|
1721
1816
|
}
|
|
1722
1817
|
w.callid && this._waitingUeCalls.has(w.callid) && (this._waitingUeCalls.delete(w.callid), console.log(`waitingUeCalls.delete:${w.callid} end`));
|
|
1723
|
-
} catch (
|
|
1724
|
-
console.error("UE_JSHTML5Communication.UESendMessageToJS error:",
|
|
1818
|
+
} catch (v) {
|
|
1819
|
+
console.error("UE_JSHTML5Communication.UESendMessageToJS error:", v);
|
|
1725
1820
|
}
|
|
1726
1821
|
} : console.error("UE_JSHTML5Communication UESendMessageToJS not found");
|
|
1727
|
-
})), this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((
|
|
1728
|
-
for (const
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1822
|
+
})), this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((c) => {
|
|
1823
|
+
for (const u of c) {
|
|
1824
|
+
const v = this._waitingUeFuncIdAndResultCallbacks.get(u.fid);
|
|
1825
|
+
v && (this._waitingUeFuncIdAndResultCallbacks.delete(u.fid), v(u.r));
|
|
1731
1826
|
}
|
|
1732
1827
|
}));
|
|
1733
|
-
let
|
|
1828
|
+
let g = 0;
|
|
1734
1829
|
const p = () => {
|
|
1735
1830
|
if (!h || !a || !a.UE_JSHTML5Communication || !a.UE_JSHTML5Communication.JSSendMessageToUE || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1736
|
-
const
|
|
1737
|
-
for (const [
|
|
1738
|
-
this._waitingUeFuncIdAndResultCallbacks.set(
|
|
1739
|
-
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.set(
|
|
1831
|
+
const c = this._ueFuncWithIdAndResultCallbacks.map(([F]) => F), u = { n: g++, tt: Date.now(), t: "c", fs: c, callid: M() };
|
|
1832
|
+
for (const [F, $] of this._ueFuncWithIdAndResultCallbacks)
|
|
1833
|
+
this._waitingUeFuncIdAndResultCallbacks.set(F.fid, $);
|
|
1834
|
+
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.set(u.callid, u), s.debug && (console.group(
|
|
1740
1835
|
"%cxe2 => ue",
|
|
1741
1836
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
1742
1837
|
), console.log(
|
|
1743
|
-
`%c${JSON.stringify(
|
|
1838
|
+
`%c${JSON.stringify(u, void 0, "")}`,
|
|
1744
1839
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1745
1840
|
), console.groupEnd());
|
|
1746
|
-
const
|
|
1841
|
+
const v = JSON.stringify(u), w = globalThis.g_emitDescriptor_maxBytes ?? 3e4, y = v.length, T = ++vo;
|
|
1747
1842
|
if (y < w) {
|
|
1748
|
-
const
|
|
1749
|
-
a.UE_JSHTML5Communication.JSSendMessageToUE(
|
|
1843
|
+
const F = `${T}-0/1-` + v;
|
|
1844
|
+
a.UE_JSHTML5Communication.JSSendMessageToUE(F);
|
|
1750
1845
|
return;
|
|
1751
1846
|
}
|
|
1752
1847
|
const m = Math.ceil(y / w) | 0;
|
|
1753
|
-
[...new Array(m).keys()].map((
|
|
1754
|
-
const
|
|
1755
|
-
a.UE_JSHTML5Communication.JSSendMessageToUE(
|
|
1848
|
+
[...new Array(m).keys()].map((F) => v.slice(F * w, (F + 1) * w)).forEach((F, $) => {
|
|
1849
|
+
const b = `${T}-${$}/${m}-` + F;
|
|
1850
|
+
a.UE_JSHTML5Communication.JSSendMessageToUE(b);
|
|
1756
1851
|
});
|
|
1757
1852
|
};
|
|
1758
1853
|
this.dv(Se()).start(p, 50);
|
|
@@ -1802,8 +1897,8 @@ class go extends Be {
|
|
|
1802
1897
|
};
|
|
1803
1898
|
}
|
|
1804
1899
|
}
|
|
1805
|
-
let
|
|
1806
|
-
class
|
|
1900
|
+
let wo = -1;
|
|
1901
|
+
class yo extends Be {
|
|
1807
1902
|
constructor(t, i) {
|
|
1808
1903
|
super();
|
|
1809
1904
|
f(this, "_ueFuncResultWithIdsEvent", this.dv(new x()));
|
|
@@ -1818,21 +1913,21 @@ class wo extends Be {
|
|
|
1818
1913
|
eventType: "init",
|
|
1819
1914
|
params: {}
|
|
1820
1915
|
};
|
|
1821
|
-
globalThis.ue.es.oncommand(JSON.stringify(s)), n = !0, globalThis.calljs = (
|
|
1822
|
-
if (r.debug && console.log(`calljs eventName:${
|
|
1916
|
+
globalThis.ue.es.oncommand(JSON.stringify(s)), n = !0, globalThis.calljs = (g, p) => {
|
|
1917
|
+
if (r.debug && console.log(`calljs eventName:${g} eventDetailStr:${p}`), g === "ueevent" || g === "commanFinish")
|
|
1823
1918
|
try {
|
|
1824
1919
|
const l = JSON.parse(p);
|
|
1825
1920
|
if (l.t === "cr") {
|
|
1826
|
-
const
|
|
1827
|
-
if (
|
|
1828
|
-
for (let
|
|
1829
|
-
this._ueEvent.emit(
|
|
1921
|
+
const c = l;
|
|
1922
|
+
if (c.frs && this._ueFuncResultWithIdsEvent.emit(c.frs), c.ers)
|
|
1923
|
+
for (let u of c.ers)
|
|
1924
|
+
this._ueEvent.emit(u);
|
|
1830
1925
|
}
|
|
1831
1926
|
} catch (l) {
|
|
1832
1927
|
console.error(l);
|
|
1833
1928
|
}
|
|
1834
|
-
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((
|
|
1835
|
-
for (const p of
|
|
1929
|
+
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((g) => {
|
|
1930
|
+
for (const p of g) {
|
|
1836
1931
|
const l = this._waitingUeFuncIdAndResultCallbacks.get(p.fid);
|
|
1837
1932
|
l && (this._waitingUeFuncIdAndResultCallbacks.delete(p.fid), l(p.r));
|
|
1838
1933
|
}
|
|
@@ -1840,14 +1935,14 @@ class wo extends Be {
|
|
|
1840
1935
|
let o = 0;
|
|
1841
1936
|
const h = () => {
|
|
1842
1937
|
if (!n || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1843
|
-
const
|
|
1938
|
+
const g = this._ueFuncWithIdAndResultCallbacks.map(([c]) => c), p = {
|
|
1844
1939
|
n: o++,
|
|
1845
1940
|
tt: Date.now(),
|
|
1846
1941
|
t: "c",
|
|
1847
|
-
fs:
|
|
1942
|
+
fs: g
|
|
1848
1943
|
};
|
|
1849
|
-
for (const [
|
|
1850
|
-
this._waitingUeFuncIdAndResultCallbacks.set(
|
|
1944
|
+
for (const [c, u] of this._ueFuncWithIdAndResultCallbacks)
|
|
1945
|
+
this._waitingUeFuncIdAndResultCallbacks.set(c.fid, u);
|
|
1851
1946
|
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.add(p), r.debug && (console.group(
|
|
1852
1947
|
"%cxe2 => ue",
|
|
1853
1948
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
@@ -1855,7 +1950,7 @@ class wo extends Be {
|
|
|
1855
1950
|
`%c${JSON.stringify(p, void 0, "")}`,
|
|
1856
1951
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1857
1952
|
), console.groupEnd());
|
|
1858
|
-
const l = ++
|
|
1953
|
+
const l = ++wo;
|
|
1859
1954
|
globalThis.ue.es.oncommand(`${l}-0/1-` + JSON.stringify(p)).then(() => {
|
|
1860
1955
|
this._waitingUeCalls.delete(p);
|
|
1861
1956
|
});
|
|
@@ -1892,7 +1987,7 @@ class wo extends Be {
|
|
|
1892
1987
|
};
|
|
1893
1988
|
}
|
|
1894
1989
|
}
|
|
1895
|
-
class
|
|
1990
|
+
class mo extends C {
|
|
1896
1991
|
constructor(e, t) {
|
|
1897
1992
|
super();
|
|
1898
1993
|
{
|
|
@@ -1906,7 +2001,7 @@ class yo extends C {
|
|
|
1906
2001
|
const h = e[o + "Changed"];
|
|
1907
2002
|
n.push(h);
|
|
1908
2003
|
});
|
|
1909
|
-
const s = this.dv(
|
|
2004
|
+
const s = this.dv(P(...n));
|
|
1910
2005
|
this.d(s.don(i));
|
|
1911
2006
|
}
|
|
1912
2007
|
this.d(e.propChanged.don((i) => {
|
|
@@ -1919,49 +2014,49 @@ class yo extends C {
|
|
|
1919
2014
|
} catch (r) {
|
|
1920
2015
|
console.error("ueViewer propChanged:" + r);
|
|
1921
2016
|
}
|
|
1922
|
-
})), this.dv(new
|
|
2017
|
+
})), this.dv(new R(e.statusUpdateIntervalChanged, (i) => {
|
|
1923
2018
|
if ((e.statusUpdateInterval ?? 0.5) === 0) return;
|
|
1924
2019
|
const n = new C();
|
|
1925
2020
|
return n.d(t.disposableOnUeEvent("statusUpdate", (s) => {
|
|
1926
2021
|
e.statusUpdateEvent.emit(s);
|
|
1927
2022
|
})), n;
|
|
1928
|
-
})), this.dv(new
|
|
2023
|
+
})), this.dv(new R(e.propChangedListeningChanged, () => {
|
|
1929
2024
|
if (!(e.propChangedListening ?? !0)) return;
|
|
1930
2025
|
const r = new C();
|
|
1931
2026
|
return r.d(t.disposableOnUeEvent("propChanged", (n) => {
|
|
1932
2027
|
e.propChanged.emit(n);
|
|
1933
2028
|
})), r;
|
|
1934
|
-
})), this.dv(new
|
|
2029
|
+
})), this.dv(new R(e.objectEventListeningChanged, () => {
|
|
1935
2030
|
if (!(e.objectEventListening ?? !0)) return;
|
|
1936
2031
|
const r = new C();
|
|
1937
2032
|
return r.d(t.disposableOnUeEvent("objectEvent", (n) => {
|
|
1938
2033
|
e.objectEvent.emit(n);
|
|
1939
2034
|
})), r;
|
|
1940
|
-
})), this.dv(new
|
|
2035
|
+
})), this.dv(new R(e.widgetEventListeningChanged, () => {
|
|
1941
2036
|
if (!(e.widgetEventListening ?? !0)) return;
|
|
1942
2037
|
const r = new C();
|
|
1943
2038
|
return r.d(t.disposableOnUeEvent("widgetEvent", (n) => {
|
|
1944
2039
|
e.widgetEvent.emit(n);
|
|
1945
2040
|
})), r;
|
|
1946
|
-
})), this.dv(new
|
|
2041
|
+
})), this.dv(new R(e.speechRecognitionListeningChanged, () => {
|
|
1947
2042
|
if (!(e.speechRecognitionListening ?? !0)) return;
|
|
1948
2043
|
const r = new C();
|
|
1949
2044
|
return r.d(t.disposableOnUeEvent("speechRecognition", (n) => {
|
|
1950
2045
|
e.speechRecognition.emit(n);
|
|
1951
2046
|
})), r;
|
|
1952
|
-
})), this.dv(new
|
|
2047
|
+
})), this.dv(new R(e.customMessageListeningChanged, () => {
|
|
1953
2048
|
if (!(e.customMessageListening ?? !0)) return;
|
|
1954
2049
|
const r = new C();
|
|
1955
2050
|
return r.d(t.disposableOnUeEvent("customMessage", (n) => {
|
|
1956
2051
|
e.customMessage.emit(n);
|
|
1957
2052
|
})), r;
|
|
1958
|
-
})), this.dv(new
|
|
2053
|
+
})), this.dv(new R(e.editingEventListeningChanged, () => {
|
|
1959
2054
|
if (!(e.editingEventListening ?? !0)) return;
|
|
1960
2055
|
const r = new C();
|
|
1961
2056
|
return r.d(t.disposableOnUeEvent("editingEvent", (n) => {
|
|
1962
2057
|
n.objectIDs = n.objectIDs.map((s) => {
|
|
1963
2058
|
var o;
|
|
1964
|
-
return ((o =
|
|
2059
|
+
return ((o = E.getSceneObjById(s)) == null ? void 0 : o.parentID) ?? s;
|
|
1965
2060
|
}), e.editingEvent.emit(n);
|
|
1966
2061
|
})), r;
|
|
1967
2062
|
})), this.ad(t.disposableOnUeEvent("cameraChanged", () => {
|
|
@@ -1969,7 +2064,7 @@ class yo extends C {
|
|
|
1969
2064
|
}));
|
|
1970
2065
|
}
|
|
1971
2066
|
}
|
|
1972
|
-
class
|
|
2067
|
+
class Co extends C {
|
|
1973
2068
|
constructor(e, t, i) {
|
|
1974
2069
|
super();
|
|
1975
2070
|
{
|
|
@@ -1980,10 +2075,10 @@ class mo extends C {
|
|
|
1980
2075
|
n();
|
|
1981
2076
|
const s = xe(), o = [];
|
|
1982
2077
|
s.forEach((a) => {
|
|
1983
|
-
const
|
|
1984
|
-
o.push(
|
|
2078
|
+
const g = t[a + "Changed"];
|
|
2079
|
+
o.push(g);
|
|
1985
2080
|
});
|
|
1986
|
-
const h = this.dv(
|
|
2081
|
+
const h = this.dv(P(...o));
|
|
1987
2082
|
this.d(h.don(n));
|
|
1988
2083
|
}
|
|
1989
2084
|
this.d(t.propChanged.don((n) => {
|
|
@@ -2002,8 +2097,8 @@ class mo extends C {
|
|
|
2002
2097
|
r && e && e.removeChild(r);
|
|
2003
2098
|
});
|
|
2004
2099
|
{
|
|
2005
|
-
const n = (a,
|
|
2006
|
-
globalThis.ue.esinput.setinterceptevent(
|
|
2100
|
+
const n = (a, g) => {
|
|
2101
|
+
globalThis.ue.esinput.setinterceptevent(g), a.preventDefault();
|
|
2007
2102
|
}, s = (a) => {
|
|
2008
2103
|
n(a, !1);
|
|
2009
2104
|
}, o = (a) => {
|
|
@@ -2015,49 +2110,49 @@ class mo extends C {
|
|
|
2015
2110
|
r.removeEventListener("mouseenter", s), r.removeEventListener("mouseleave", o), r.removeEventListener("mousemove", h);
|
|
2016
2111
|
});
|
|
2017
2112
|
}
|
|
2018
|
-
t.useCustomInteraction = !1, this.dv(new fr(t, r)), this.dv(new
|
|
2113
|
+
t.useCustomInteraction = !1, this.dv(new fr(t, r)), this.dv(new R(t.statusUpdateIntervalChanged, (n) => {
|
|
2019
2114
|
if ((t.statusUpdateInterval ?? 0.5) === 0) return;
|
|
2020
2115
|
const o = new C();
|
|
2021
2116
|
return o.d(i.disposableOnUeEvent("statusUpdate", (h) => {
|
|
2022
2117
|
t.statusUpdateEvent.emit(h);
|
|
2023
2118
|
})), o;
|
|
2024
|
-
})), this.dv(new
|
|
2119
|
+
})), this.dv(new R(t.propChangedListeningChanged, () => {
|
|
2025
2120
|
if (!(t.propChangedListening ?? !0)) return;
|
|
2026
2121
|
const s = new C();
|
|
2027
2122
|
return s.d(i.disposableOnUeEvent("propChanged", (o) => {
|
|
2028
2123
|
t.propChanged.emit(o);
|
|
2029
2124
|
})), s;
|
|
2030
|
-
})), this.dv(new
|
|
2125
|
+
})), this.dv(new R(t.objectEventListeningChanged, () => {
|
|
2031
2126
|
if (!(t.objectEventListening ?? !0)) return;
|
|
2032
2127
|
const s = new C();
|
|
2033
2128
|
return s.d(i.disposableOnUeEvent("objectEvent", (o) => {
|
|
2034
2129
|
t.objectEvent.emit(o);
|
|
2035
2130
|
})), s;
|
|
2036
|
-
})), this.dv(new
|
|
2131
|
+
})), this.dv(new R(t.widgetEventListeningChanged, () => {
|
|
2037
2132
|
if (!(t.widgetEventListening ?? !0)) return;
|
|
2038
2133
|
const s = new C();
|
|
2039
2134
|
return s.d(i.disposableOnUeEvent("widgetEvent", (o) => {
|
|
2040
2135
|
t.widgetEvent.emit(o);
|
|
2041
2136
|
})), s;
|
|
2042
|
-
})), this.dv(new
|
|
2137
|
+
})), this.dv(new R(t.speechRecognitionListeningChanged, () => {
|
|
2043
2138
|
if (!(t.speechRecognitionListening ?? !0)) return;
|
|
2044
2139
|
const s = new C();
|
|
2045
2140
|
return s.d(i.disposableOnUeEvent("speechRecognition", (o) => {
|
|
2046
2141
|
t.speechRecognition.emit(o);
|
|
2047
2142
|
})), s;
|
|
2048
|
-
})), this.dv(new
|
|
2143
|
+
})), this.dv(new R(t.customMessageListeningChanged, () => {
|
|
2049
2144
|
if (!(t.customMessageListening ?? !0)) return;
|
|
2050
2145
|
const s = new C();
|
|
2051
2146
|
return s.d(i.disposableOnUeEvent("customMessage", (o) => {
|
|
2052
2147
|
t.customMessage.emit(o);
|
|
2053
2148
|
})), s;
|
|
2054
|
-
})), this.dv(new
|
|
2149
|
+
})), this.dv(new R(t.editingEventListeningChanged, () => {
|
|
2055
2150
|
if (!(t.editingEventListening ?? !0)) return;
|
|
2056
2151
|
const s = new C();
|
|
2057
2152
|
return s.d(i.disposableOnUeEvent("editingEvent", (o) => {
|
|
2058
2153
|
o.objectIDs = o.objectIDs.map((h) => {
|
|
2059
2154
|
var a;
|
|
2060
|
-
return ((a =
|
|
2155
|
+
return ((a = E.getSceneObjById(h)) == null ? void 0 : a.parentID) ?? h;
|
|
2061
2156
|
}), t.editingEvent.emit(o);
|
|
2062
2157
|
})), s;
|
|
2063
2158
|
})), this.ad(i.disposableOnUeEvent("cameraChanged", () => {
|
|
@@ -2065,7 +2160,7 @@ class mo extends C {
|
|
|
2065
2160
|
}));
|
|
2066
2161
|
}
|
|
2067
2162
|
}
|
|
2068
|
-
class
|
|
2163
|
+
class Fo extends C {
|
|
2069
2164
|
constructor(t, i, r) {
|
|
2070
2165
|
super();
|
|
2071
2166
|
f(this, "_reconnectEvent", this.dv(new x()));
|
|
@@ -2074,19 +2169,19 @@ class Co extends C {
|
|
|
2074
2169
|
this.d(() => {
|
|
2075
2170
|
o && clearTimeout(o);
|
|
2076
2171
|
});
|
|
2077
|
-
const a = new URLSearchParams(globalThis.location.search).get("eswebview") === "true",
|
|
2172
|
+
const a = new URLSearchParams(globalThis.location.search).get("eswebview") === "true", g = () => {
|
|
2078
2173
|
if (globalThis.ue.esinput) {
|
|
2079
2174
|
r.setStatus("Creating"), console.log("存在(window.ue && window.ue.es && window.ue.esinput 需要适配新版ESWebView 鼠标穿透), 开始创建UeFalseCloudViewer..."), r.setStatusLog("开始创建本地视口...");
|
|
2080
|
-
const p = this.dv(new
|
|
2081
|
-
this.d(() => r.viewer = void 0), r.viewer = p, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new
|
|
2175
|
+
const p = this.dv(new yo(t, r));
|
|
2176
|
+
this.d(() => r.viewer = void 0), r.viewer = p, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new Co(t, r, p));
|
|
2082
2177
|
} else
|
|
2083
2178
|
r.setStatus("Error"), r.setStatusLog("请升级 ESWebView !"), this.d(() => r.viewer = void 0), r.viewer = void 0;
|
|
2084
2179
|
};
|
|
2085
2180
|
if (globalThis.ue && globalThis.ue.es)
|
|
2086
|
-
|
|
2181
|
+
g();
|
|
2087
2182
|
else if (a) {
|
|
2088
2183
|
const p = setInterval(() => {
|
|
2089
|
-
globalThis.ue && globalThis.ue.es && (clearInterval(p),
|
|
2184
|
+
globalThis.ue && globalThis.ue.es && (clearInterval(p), g());
|
|
2090
2185
|
}, 200);
|
|
2091
2186
|
} else if (n(i.options, "ws") || n(i.options, "uri") && n(i.options, "app")) {
|
|
2092
2187
|
r.setStatus("Creating"), r.setStatusLog("开始创建云渲染视口...");
|
|
@@ -2094,58 +2189,59 @@ class Co extends C {
|
|
|
2094
2189
|
this.d(() => {
|
|
2095
2190
|
r.setStatus("Raw"), r.setStatusLog(""), t && p && t.removeChild(p) && (p = void 0);
|
|
2096
2191
|
});
|
|
2097
|
-
const l = this.dv(Te(async (
|
|
2192
|
+
const l = this.dv(Te(async (c) => {
|
|
2098
2193
|
r.viewer && !r.viewer.isDestroyed() && r.viewer.destroy(), r.viewer = void 0, p && t.removeChild(p) && (p = void 0), p = document.createElement("div"), p.setAttribute("earthsdk3-ue", "earthsdk3-ue-videoContainer"), p.style.cssText = "position:relative; height: 100%;width:100%;", t.appendChild(p);
|
|
2099
|
-
let
|
|
2194
|
+
let u, v, w, y;
|
|
2100
2195
|
if (n(i.options, "ws")) {
|
|
2101
|
-
const { ws:
|
|
2102
|
-
|
|
2196
|
+
const { ws: F, esmsg: $, uselnternalSignallingServer: b, silentTime: Me } = i.options;
|
|
2197
|
+
u = F, v = $, w = b ?? !1, y = Me ?? 0;
|
|
2103
2198
|
}
|
|
2104
2199
|
if (n(i.options, "uri") && n(i.options, "app")) {
|
|
2105
|
-
const { offsetWidth:
|
|
2106
|
-
let { uri:
|
|
2107
|
-
|
|
2108
|
-
const
|
|
2109
|
-
console.log(`请求信令服务器: ${
|
|
2110
|
-
const
|
|
2111
|
-
if (
|
|
2112
|
-
r.setStatus("Error"), r.setStatusLog(`信令服务器请求失败 ${
|
|
2200
|
+
const { offsetWidth: F, offsetHeight: $ } = p;
|
|
2201
|
+
let { uri: b, app: Me, token: Xe, silentTime: Rr } = i.options;
|
|
2202
|
+
b.endsWith("/") || (b += "/");
|
|
2203
|
+
const Pr = Xe ? `?essstoken=${Xe}` : "", Qe = `/${Me}/${F ?? 1920}/${$ ?? 1080}` + Pr;
|
|
2204
|
+
console.log(`请求信令服务器: ${b}instance${Qe}`);
|
|
2205
|
+
const Lr = await c.promise(fetch(`${b}instance${Qe}`, { method: "GET" })), j = await c.promise(Lr.json());
|
|
2206
|
+
if (j && j.status !== "ok") {
|
|
2207
|
+
r.setStatus("Error"), r.setStatusLog(`信令服务器请求失败 ${j.status}`), this._reconnectEvent.emit(void 0);
|
|
2113
2208
|
return;
|
|
2114
2209
|
} else {
|
|
2115
|
-
console.log(`信令服务器请求成功! ${JSON.stringify(
|
|
2116
|
-
const { server:
|
|
2117
|
-
if (!
|
|
2210
|
+
console.log(`信令服务器请求成功! ${JSON.stringify(j, void 0, " ")}`);
|
|
2211
|
+
const { server: Dr, esmsg: kr, instanceId: Br, useInternalSignallingServer: Mr } = j;
|
|
2212
|
+
if (!Br) {
|
|
2118
2213
|
r.setStatus("Error"), r.setStatusLog("检查信令服务器版本,返回数据错误! "), console.log("信令服务器返回数据错误!不包含instanceId!请升级到 ESSS V3.0+ 版本!"), this._reconnectEvent.emit(void 0);
|
|
2119
2214
|
return;
|
|
2120
2215
|
}
|
|
2121
|
-
|
|
2216
|
+
u = Dr, v = kr, w = Mr ?? !1, y = Rr ?? 0, r.esssResponse = j;
|
|
2122
2217
|
}
|
|
2123
2218
|
}
|
|
2124
|
-
|
|
2125
|
-
this.
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2219
|
+
console.log(`静默 ${y}s...`), await c.promise(Ar((y ?? 0) * 1e3)), console.log(`静默 ${y}s...done!`);
|
|
2220
|
+
const T = this.dv(w ? new uo(p, u, v, r) : new ro(p, u, v, r));
|
|
2221
|
+
this.d(() => r.viewer = void 0), this.d(T.errorEvent.don((F) => {
|
|
2222
|
+
const $ = `[${F}]:像素流连接错误!`;
|
|
2223
|
+
r.setStatus("Error"), r.setStatusLog($), this._reconnectEvent.emit(T);
|
|
2224
|
+
})), await c.promise(new Promise((F) => this.d(T.readyEvent.donce(F)))), r.setStatus("Created"), r.setStatusLog("云渲染视口创建成功!"), s = 0, o && clearTimeout(o), o = void 0;
|
|
2225
|
+
const { offsetWidth: m, offsetHeight: D } = p;
|
|
2226
|
+
T.resize(m * globalThis.devicePixelRatio, D * globalThis.devicePixelRatio), r.viewer = T, this.d(() => r.viewer = void 0), this.dv(new mo(r, T));
|
|
2131
2227
|
}));
|
|
2132
|
-
l.start(), this.d(this._reconnectEvent.don((
|
|
2133
|
-
o === void 0 && (
|
|
2228
|
+
l.start(), this.d(this._reconnectEvent.don((c) => {
|
|
2229
|
+
o === void 0 && (c && !c.isDestroyed() && c.destroy(), r.viewer && !r.viewer.isDestroyed() && r.viewer.destroy(), r.viewer = void 0, r.autoReconnect && (r.setStatus("Reconnecting"), r.setStatusLog("正在尝试重新连接..."), s = s + 5e3 > 3e4 ? 3e4 : s + 5e3, console.warn(`间隔:${s / 1e3}s,正在尝试重新连接...`), o = globalThis.setTimeout(() => {
|
|
2134
2230
|
l.restart();
|
|
2135
2231
|
}, s)));
|
|
2136
|
-
})), this.d(l.errorEvent.don((
|
|
2137
|
-
r.setStatus("Error"), r.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!",
|
|
2232
|
+
})), this.d(l.errorEvent.don((c) => {
|
|
2233
|
+
r.setStatus("Error"), r.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!", c), this._reconnectEvent.emit(void 0);
|
|
2138
2234
|
}));
|
|
2139
2235
|
} else if (n(i.options, "project")) {
|
|
2140
|
-
const p = i, l = p.options.project,
|
|
2236
|
+
const p = i, l = p.options.project, c = p.options.baseUrl;
|
|
2141
2237
|
r.setStatus("Creating"), r.setStatusLog("下载编译中...");
|
|
2142
|
-
const
|
|
2143
|
-
r.viewer =
|
|
2238
|
+
const u = this.dv(new go(t, l, c, r));
|
|
2239
|
+
r.viewer = u, this.d(() => r.viewer = void 0);
|
|
2144
2240
|
} else
|
|
2145
2241
|
r.setStatus("Error"), r.setStatusLog("视口创建失败!"), console.warn("视口创建失败: 参数错误!");
|
|
2146
2242
|
}
|
|
2147
2243
|
}
|
|
2148
|
-
const
|
|
2244
|
+
const X = class X extends Ee {
|
|
2149
2245
|
constructor(t) {
|
|
2150
2246
|
super(t);
|
|
2151
2247
|
f(this, "_viewer", this.dv(W(void 0)));
|
|
@@ -2165,13 +2261,13 @@ const K = class K extends Ee {
|
|
|
2165
2261
|
const i = t;
|
|
2166
2262
|
this.d(this._viewer.changed.don(() => {
|
|
2167
2263
|
this.viewerChanged.emit(this.viewer);
|
|
2168
|
-
})), this.dv(new
|
|
2264
|
+
})), this.dv(new R(this.subContainerChanged, () => {
|
|
2169
2265
|
if (this.setStatus("Raw"), this.setStatusLog(""), !!this.subContainer)
|
|
2170
|
-
return new
|
|
2266
|
+
return new Fo(this.subContainer, i, this);
|
|
2171
2267
|
}));
|
|
2172
2268
|
}
|
|
2173
2269
|
get defaultProps() {
|
|
2174
|
-
return
|
|
2270
|
+
return X.createDefaultProps();
|
|
2175
2271
|
}
|
|
2176
2272
|
set viewer(t) {
|
|
2177
2273
|
this._viewer.value = t;
|
|
@@ -2210,14 +2306,14 @@ const K = class K extends Ee {
|
|
|
2210
2306
|
console.warn("UEPositionToLonLatAlt: viewer is undefined");
|
|
2211
2307
|
return;
|
|
2212
2308
|
}
|
|
2213
|
-
return await
|
|
2309
|
+
return await Is(this.viewer, t);
|
|
2214
2310
|
}
|
|
2215
2311
|
async changeNavigationMode(t) {
|
|
2216
2312
|
if (!this.viewer) {
|
|
2217
2313
|
console.warn("ChangeNavigationMode: viewer is undefined");
|
|
2218
2314
|
return;
|
|
2219
2315
|
}
|
|
2220
|
-
const i = await
|
|
2316
|
+
const i = await J(this.viewer, t);
|
|
2221
2317
|
return i && !i.error && (this._navigationMode.value = t.mode), i;
|
|
2222
2318
|
}
|
|
2223
2319
|
async resetWithCurrentCamera(t) {
|
|
@@ -2225,119 +2321,119 @@ const K = class K extends Ee {
|
|
|
2225
2321
|
console.warn("resetWithCurrentCamera: viewer is undefined");
|
|
2226
2322
|
return;
|
|
2227
2323
|
}
|
|
2228
|
-
return await
|
|
2324
|
+
return await Sr(this.viewer, t);
|
|
2229
2325
|
}
|
|
2230
2326
|
async getAllSocketNamesByActorTag(t) {
|
|
2231
2327
|
if (!this.viewer) {
|
|
2232
2328
|
console.warn("GetAllSocketNamesByActorTag: viewer is undefined");
|
|
2233
2329
|
return;
|
|
2234
2330
|
}
|
|
2235
|
-
return await
|
|
2331
|
+
return await Es(this.viewer, t);
|
|
2236
2332
|
}
|
|
2237
2333
|
async getBoundSphere(t) {
|
|
2238
2334
|
if (!this.viewer) {
|
|
2239
2335
|
console.warn("getBoundSphere: viewer is undefined");
|
|
2240
2336
|
return;
|
|
2241
2337
|
}
|
|
2242
|
-
return await
|
|
2338
|
+
return await Ts(this.viewer, t);
|
|
2243
2339
|
}
|
|
2244
2340
|
async getBoundSphereWithChildren(t) {
|
|
2245
2341
|
if (!this.viewer) {
|
|
2246
2342
|
console.warn("getBoundSphereWithChildren: viewer is undefined");
|
|
2247
2343
|
return;
|
|
2248
2344
|
}
|
|
2249
|
-
return await
|
|
2345
|
+
return await xs(this.viewer, t);
|
|
2250
2346
|
}
|
|
2251
2347
|
async getStrokeMaterialParamInfo(t) {
|
|
2252
2348
|
if (!this.viewer) {
|
|
2253
2349
|
console.warn("GetStrokeMaterialParamInfo: viewer is undefined");
|
|
2254
2350
|
return;
|
|
2255
2351
|
}
|
|
2256
|
-
return await
|
|
2352
|
+
return await Rs(this.viewer, t);
|
|
2257
2353
|
}
|
|
2258
2354
|
async getFillMaterialParamInfo(t) {
|
|
2259
2355
|
if (!this.viewer) {
|
|
2260
2356
|
console.warn("getFillMaterialParamInfo: viewer is undefined");
|
|
2261
2357
|
return;
|
|
2262
2358
|
}
|
|
2263
|
-
return await
|
|
2359
|
+
return await Ps(this.viewer, t);
|
|
2264
2360
|
}
|
|
2265
2361
|
async getGlobalProperty(t) {
|
|
2266
2362
|
if (!this.viewer) {
|
|
2267
2363
|
console.warn("getGlobalProperty: viewer is undefined");
|
|
2268
2364
|
return;
|
|
2269
2365
|
}
|
|
2270
|
-
return await
|
|
2366
|
+
return await Ls(this.viewer, t);
|
|
2271
2367
|
}
|
|
2272
2368
|
async getObjectByInfo(t) {
|
|
2273
2369
|
if (!this.viewer) {
|
|
2274
2370
|
console.warn("GetObjectByInfo: viewer is undefined");
|
|
2275
2371
|
return;
|
|
2276
2372
|
}
|
|
2277
|
-
return await
|
|
2373
|
+
return await Ds(this.viewer, t);
|
|
2278
2374
|
}
|
|
2279
2375
|
async defaultCameraFlyIn(t = 1) {
|
|
2280
2376
|
if (!this.viewer) {
|
|
2281
2377
|
console.warn("DefaultCameraFlyIn: viewer is undefined");
|
|
2282
2378
|
return;
|
|
2283
2379
|
}
|
|
2284
|
-
return await
|
|
2380
|
+
return await es(this.viewer, t);
|
|
2285
2381
|
}
|
|
2286
2382
|
async startVoice() {
|
|
2287
2383
|
if (!this.viewer) {
|
|
2288
2384
|
console.warn("startVoice:viewer is undefined");
|
|
2289
2385
|
return;
|
|
2290
2386
|
}
|
|
2291
|
-
return await
|
|
2387
|
+
return await is(this.viewer);
|
|
2292
2388
|
}
|
|
2293
2389
|
async stopVoice() {
|
|
2294
2390
|
if (!this.viewer) {
|
|
2295
2391
|
console.warn("startVoice:viewer is undefined");
|
|
2296
2392
|
return;
|
|
2297
2393
|
}
|
|
2298
|
-
return await
|
|
2394
|
+
return await rs(this.viewer);
|
|
2299
2395
|
}
|
|
2300
2396
|
async mountPakFiles(t) {
|
|
2301
2397
|
if (!this.viewer) {
|
|
2302
2398
|
console.warn("mountPakFiles:viewer is undefined");
|
|
2303
2399
|
return;
|
|
2304
2400
|
}
|
|
2305
|
-
return await
|
|
2401
|
+
return await ns(this.viewer, t);
|
|
2306
2402
|
}
|
|
2307
2403
|
async generateMemReport() {
|
|
2308
2404
|
if (!this.viewer) {
|
|
2309
2405
|
console.warn("generateMemReport:viewer is undefined");
|
|
2310
2406
|
return;
|
|
2311
2407
|
}
|
|
2312
|
-
return await
|
|
2408
|
+
return await ss(this.viewer);
|
|
2313
2409
|
}
|
|
2314
2410
|
async quit() {
|
|
2315
2411
|
if (!this.viewer) {
|
|
2316
2412
|
console.warn("Quit: viewer is undefined");
|
|
2317
2413
|
return;
|
|
2318
2414
|
}
|
|
2319
|
-
return await
|
|
2415
|
+
return await fs(this.viewer);
|
|
2320
2416
|
}
|
|
2321
2417
|
async bindActorByTag(t, i) {
|
|
2322
2418
|
if (!this.viewer) {
|
|
2323
2419
|
console.warn("BindActorByTag: viewer is undefined");
|
|
2324
2420
|
return;
|
|
2325
2421
|
}
|
|
2326
|
-
return await
|
|
2422
|
+
return await ks(this.viewer, t, i);
|
|
2327
2423
|
}
|
|
2328
2424
|
async restoreOriginalScene() {
|
|
2329
2425
|
if (!this.viewer) {
|
|
2330
2426
|
console.warn("RestoreOriginalScene: viewer is undefined");
|
|
2331
2427
|
return;
|
|
2332
2428
|
}
|
|
2333
|
-
return await
|
|
2429
|
+
return await Bs(this.viewer);
|
|
2334
2430
|
}
|
|
2335
2431
|
async unBindActorByID(t) {
|
|
2336
2432
|
if (!this.viewer) {
|
|
2337
2433
|
console.warn("UnBindActorByID: viewer is undefined");
|
|
2338
2434
|
return;
|
|
2339
2435
|
}
|
|
2340
|
-
return await
|
|
2436
|
+
return await Ms(this.viewer, t);
|
|
2341
2437
|
}
|
|
2342
2438
|
async unBindActorByTag(t) {
|
|
2343
2439
|
if (!this.viewer) {
|
|
@@ -2351,56 +2447,56 @@ const K = class K extends Ee {
|
|
|
2351
2447
|
console.warn("CreateActorByClass: viewer is undefined");
|
|
2352
2448
|
return;
|
|
2353
2449
|
}
|
|
2354
|
-
return await
|
|
2450
|
+
return await $s(this.viewer, t, i);
|
|
2355
2451
|
}
|
|
2356
2452
|
async bind3DTilesetByTag(t, i) {
|
|
2357
2453
|
if (!this.viewer) {
|
|
2358
2454
|
console.warn("Bind3DTilesetByTag: viewer is undefined");
|
|
2359
2455
|
return;
|
|
2360
2456
|
}
|
|
2361
|
-
return await
|
|
2457
|
+
return await Ws(this.viewer, t, i);
|
|
2362
2458
|
}
|
|
2363
2459
|
async unBind3DTilesetByTag(t) {
|
|
2364
2460
|
if (!this.viewer) {
|
|
2365
2461
|
console.warn("UnBind3DTilesetByTag: viewer is undefined");
|
|
2366
2462
|
return;
|
|
2367
2463
|
}
|
|
2368
|
-
return await
|
|
2464
|
+
return await As(this.viewer, t);
|
|
2369
2465
|
}
|
|
2370
2466
|
async unBind3DTilesetById(t) {
|
|
2371
2467
|
if (!this.viewer) {
|
|
2372
2468
|
console.warn("UnBind3DTilesetById: viewer is undefined");
|
|
2373
2469
|
return;
|
|
2374
2470
|
}
|
|
2375
|
-
return await
|
|
2471
|
+
return await Us(this.viewer, t);
|
|
2376
2472
|
}
|
|
2377
2473
|
async bindImageryByTag(t, i, r) {
|
|
2378
2474
|
if (!this.viewer) {
|
|
2379
2475
|
console.warn("BindImageryByTag: viewer is undefined");
|
|
2380
2476
|
return;
|
|
2381
2477
|
}
|
|
2382
|
-
return await
|
|
2478
|
+
return await Ns(this.viewer, t, i, r);
|
|
2383
2479
|
}
|
|
2384
2480
|
async unBindImageryByTag(t, i) {
|
|
2385
2481
|
if (!this.viewer) {
|
|
2386
2482
|
console.warn("UnBindImageryByTag: viewer is undefined");
|
|
2387
2483
|
return;
|
|
2388
2484
|
}
|
|
2389
|
-
return await
|
|
2485
|
+
return await zs(this.viewer, t, i);
|
|
2390
2486
|
}
|
|
2391
2487
|
async unBindImageryById(t) {
|
|
2392
2488
|
if (!this.viewer) {
|
|
2393
2489
|
console.warn("UnBindImageryById: viewer is undefined");
|
|
2394
2490
|
return;
|
|
2395
2491
|
}
|
|
2396
|
-
return await
|
|
2492
|
+
return await bs(this.viewer, t);
|
|
2397
2493
|
}
|
|
2398
2494
|
async getIdByComponentNameAndHitItem(t, i, r) {
|
|
2399
2495
|
if (!this.viewer) {
|
|
2400
2496
|
console.warn("GetIdByComponentNameAndHitItem: viewer is undefined");
|
|
2401
2497
|
return;
|
|
2402
2498
|
}
|
|
2403
|
-
return await
|
|
2499
|
+
return await Hs(this.viewer, t, i, r);
|
|
2404
2500
|
}
|
|
2405
2501
|
/**
|
|
2406
2502
|
* @returns Promise(高度)
|
|
@@ -2412,7 +2508,7 @@ const K = class K extends Ee {
|
|
|
2412
2508
|
console.warn("GetCameraRelativeHeight: viewer is undefined");
|
|
2413
2509
|
return;
|
|
2414
2510
|
}
|
|
2415
|
-
return await
|
|
2511
|
+
return await Js(this.viewer, t);
|
|
2416
2512
|
}
|
|
2417
2513
|
/**
|
|
2418
2514
|
* 保存str到指定目录下
|
|
@@ -2424,28 +2520,28 @@ const K = class K extends Ee {
|
|
|
2424
2520
|
console.warn("SaveStringToFile: viewer is undefined");
|
|
2425
2521
|
return;
|
|
2426
2522
|
}
|
|
2427
|
-
return await
|
|
2523
|
+
return await Gs(this.viewer, t, i, r);
|
|
2428
2524
|
}
|
|
2429
2525
|
async highlightActorByTag(t, i = !0) {
|
|
2430
2526
|
if (!this.viewer) {
|
|
2431
2527
|
console.warn("HighlightActorByTag: viewer is undefined");
|
|
2432
2528
|
return;
|
|
2433
2529
|
}
|
|
2434
|
-
return await
|
|
2530
|
+
return await Ks(this.viewer, t, i);
|
|
2435
2531
|
}
|
|
2436
2532
|
async sendCustomMessage(t) {
|
|
2437
2533
|
if (!this.viewer) {
|
|
2438
2534
|
console.warn("SendCustomMessage: viewer is undefined");
|
|
2439
2535
|
return;
|
|
2440
2536
|
}
|
|
2441
|
-
return await
|
|
2537
|
+
return await Xs(this.viewer, t);
|
|
2442
2538
|
}
|
|
2443
2539
|
async getStatus() {
|
|
2444
2540
|
if (!this.viewer) {
|
|
2445
2541
|
console.warn("GetStatus:viewer is undefined");
|
|
2446
2542
|
return;
|
|
2447
2543
|
}
|
|
2448
|
-
return await
|
|
2544
|
+
return await Qs(this.viewer);
|
|
2449
2545
|
}
|
|
2450
2546
|
/**
|
|
2451
2547
|
* 获取场景中可替换的材质列表
|
|
@@ -2455,7 +2551,7 @@ const K = class K extends Ee {
|
|
|
2455
2551
|
console.warn("GetTilesetMaterialIDList:viewer is undefined");
|
|
2456
2552
|
return;
|
|
2457
2553
|
}
|
|
2458
|
-
return await
|
|
2554
|
+
return await Vs(this.viewer);
|
|
2459
2555
|
}
|
|
2460
2556
|
//——————————————————————————————————————————
|
|
2461
2557
|
//抽象函数实现------------------------------
|
|
@@ -2466,7 +2562,7 @@ const K = class K extends Ee {
|
|
|
2466
2562
|
const [s, o] = t, { x: h, y: a } = this.container.getBoundingClientRect();
|
|
2467
2563
|
n = [h + s, a + o];
|
|
2468
2564
|
}
|
|
2469
|
-
return await
|
|
2565
|
+
return await vs(this.viewer, n, i, r);
|
|
2470
2566
|
}
|
|
2471
2567
|
async pickPosition(t) {
|
|
2472
2568
|
if (!this.viewer) return;
|
|
@@ -2501,7 +2597,7 @@ const K = class K extends Ee {
|
|
|
2501
2597
|
[t[0], t[3], 0],
|
|
2502
2598
|
[t[2], t[3], 0],
|
|
2503
2599
|
[t[2], t[1], 0]
|
|
2504
|
-
], s =
|
|
2600
|
+
], s = Ur(n);
|
|
2505
2601
|
if (!s) return;
|
|
2506
2602
|
const { center: o, radius: h } = s, a = {
|
|
2507
2603
|
distance: i ?? h,
|
|
@@ -2537,7 +2633,7 @@ const K = class K extends Ee {
|
|
|
2537
2633
|
*/
|
|
2538
2634
|
async changeToWalk(t, i = 4.2, r = 1.6) {
|
|
2539
2635
|
if (!this.viewer) return;
|
|
2540
|
-
const n = { mode: "Walk", position: t, jumpZVelocity: i, eyeHeight: r }, s = await
|
|
2636
|
+
const n = { mode: "Walk", position: t, jumpZVelocity: i, eyeHeight: r }, s = await J(this.viewer, n);
|
|
2541
2637
|
return s && !s.error && (this._navigationMode.value = n.mode), s;
|
|
2542
2638
|
}
|
|
2543
2639
|
/**
|
|
@@ -2546,7 +2642,7 @@ const K = class K extends Ee {
|
|
|
2546
2642
|
*/
|
|
2547
2643
|
async changeToMap() {
|
|
2548
2644
|
if (!this.viewer) return;
|
|
2549
|
-
const t = { mode: "Map" }, i = await
|
|
2645
|
+
const t = { mode: "Map" }, i = await J(this.viewer, t);
|
|
2550
2646
|
return i && !i.error && (this._navigationMode.value = t.mode), i;
|
|
2551
2647
|
}
|
|
2552
2648
|
/**
|
|
@@ -2558,7 +2654,7 @@ const K = class K extends Ee {
|
|
|
2558
2654
|
*/
|
|
2559
2655
|
async changeToRotateGlobe(t = 38, i = 1e7, r = 60) {
|
|
2560
2656
|
if (!this.viewer) return;
|
|
2561
|
-
const n = { mode: "RotateGlobe", latitude: t, height: i, cycleTime: r }, s = await
|
|
2657
|
+
const n = { mode: "RotateGlobe", latitude: t, height: i, cycleTime: r }, s = await J(this.viewer, n);
|
|
2562
2658
|
return s && !s.error && (this._navigationMode.value = n.mode), s;
|
|
2563
2659
|
}
|
|
2564
2660
|
/**
|
|
@@ -2573,7 +2669,7 @@ const K = class K extends Ee {
|
|
|
2573
2669
|
*/
|
|
2574
2670
|
async changeToLine(t, i = 10, r = 10, n = !0, s = 10, o = "auto") {
|
|
2575
2671
|
if (!this.viewer) return;
|
|
2576
|
-
const h = { mode: "Line", geoLineStringId: t, speed: i, heightOffset: r, loop: n, turnRateDPS: s, lineMode: o }, a = await
|
|
2672
|
+
const h = { mode: "Line", geoLineStringId: t, speed: i, heightOffset: r, loop: n, turnRateDPS: s, lineMode: o }, a = await J(this.viewer, h);
|
|
2577
2673
|
return a && !a.error && (this._navigationMode.value = h.mode), a;
|
|
2578
2674
|
}
|
|
2579
2675
|
/**
|
|
@@ -2583,7 +2679,7 @@ const K = class K extends Ee {
|
|
|
2583
2679
|
*/
|
|
2584
2680
|
async changeToUserDefined(t) {
|
|
2585
2681
|
if (!this.viewer) return;
|
|
2586
|
-
const i = { mode: "UserDefined", userDefinedPawn: t }, r = await
|
|
2682
|
+
const i = { mode: "UserDefined", userDefinedPawn: t }, r = await J(this.viewer, i);
|
|
2587
2683
|
return r && !r.error && (this._navigationMode.value = i.mode), r;
|
|
2588
2684
|
}
|
|
2589
2685
|
/**
|
|
@@ -2603,7 +2699,7 @@ const K = class K extends Ee {
|
|
|
2603
2699
|
orbitPeriod: r,
|
|
2604
2700
|
heading: n,
|
|
2605
2701
|
pitch: s
|
|
2606
|
-
}, h = await
|
|
2702
|
+
}, h = await J(this.viewer, o);
|
|
2607
2703
|
return h && !h.error && (this._navigationMode.value = o.mode), h;
|
|
2608
2704
|
}
|
|
2609
2705
|
/**
|
|
@@ -2615,7 +2711,7 @@ const K = class K extends Ee {
|
|
|
2615
2711
|
*/
|
|
2616
2712
|
async changeToFollow(t, i = 0, r = 0, n = -30, s = !0) {
|
|
2617
2713
|
if (!this.viewer) return;
|
|
2618
|
-
const o = { mode: "Follow", objectId: t, distance: i, heading: r, pitch: n, relativeRotation: s }, h = await
|
|
2714
|
+
const o = { mode: "Follow", objectId: t, distance: i, heading: r, pitch: n, relativeRotation: s }, h = await J(this.viewer, o);
|
|
2619
2715
|
return h && !h.error && (this._navigationMode.value = o.mode), h;
|
|
2620
2716
|
}
|
|
2621
2717
|
getFPS() {
|
|
@@ -2624,36 +2720,36 @@ const K = class K extends Ee {
|
|
|
2624
2720
|
async getVersion() {
|
|
2625
2721
|
const t = globalThis.g_XE3CopyRights ?? {};
|
|
2626
2722
|
if (!this.viewer) return t;
|
|
2627
|
-
const i = await
|
|
2723
|
+
const i = await Ss(this.viewer);
|
|
2628
2724
|
return t.esforue = i, t;
|
|
2629
2725
|
}
|
|
2630
2726
|
async getHeightByLonLat(t, i, r = "ECC_Visibility") {
|
|
2631
2727
|
if (!this.viewer) return null;
|
|
2632
|
-
const n = await
|
|
2728
|
+
const n = await ws(this.viewer, t, i, r);
|
|
2633
2729
|
return n && n.height !== void 0 ? n.height : null;
|
|
2634
2730
|
}
|
|
2635
2731
|
async getHeightsByLonLats(t, i = "ECC_Visibility") {
|
|
2636
|
-
return this.viewer ? await
|
|
2732
|
+
return this.viewer ? await ys(this.viewer, t, i) : void 0;
|
|
2637
2733
|
}
|
|
2638
2734
|
async capture(t = 64, i = 64) {
|
|
2639
|
-
return this.viewer ? await
|
|
2735
|
+
return this.viewer ? await ms(this.viewer, t, i) : void 0;
|
|
2640
2736
|
}
|
|
2641
2737
|
async partialCapture(t, i = [64, 64]) {
|
|
2642
2738
|
if (!this.viewer) {
|
|
2643
2739
|
console.warn("partialCapture:viewer is undefined");
|
|
2644
2740
|
return;
|
|
2645
2741
|
}
|
|
2646
|
-
return await
|
|
2742
|
+
return await Cs(this.viewer, t, i);
|
|
2647
2743
|
}
|
|
2648
2744
|
async lonLatAltToScreenPosition(t) {
|
|
2649
2745
|
if (!this.viewer) return;
|
|
2650
|
-
const i = await
|
|
2746
|
+
const i = await Fs(this.viewer, t);
|
|
2651
2747
|
return i && [i.X, i.Y];
|
|
2652
2748
|
}
|
|
2653
2749
|
//------------------------------抽象函数实现
|
|
2654
2750
|
async setGlobalProperty(t) {
|
|
2655
2751
|
if (this.viewer)
|
|
2656
|
-
return await
|
|
2752
|
+
return await ps(this.viewer, t);
|
|
2657
2753
|
}
|
|
2658
2754
|
async startEditing(t, i, r) {
|
|
2659
2755
|
r = Object.assign({ useKeyToSwitch: !0, callSource: "outer" }, r);
|
|
@@ -2677,8 +2773,8 @@ const K = class K extends Ee {
|
|
|
2677
2773
|
return await qs(this.viewer, i, r);
|
|
2678
2774
|
}
|
|
2679
2775
|
};
|
|
2680
|
-
f(
|
|
2681
|
-
let
|
|
2776
|
+
f(X, "type", X.register("ESUeViewer", X)), f(X, "defaults", { ...jn });
|
|
2777
|
+
let G = X;
|
|
2682
2778
|
((d) => {
|
|
2683
2779
|
d.createDefaultProps = () => ({
|
|
2684
2780
|
...Ee.createDefaultProps(),
|
|
@@ -2687,7 +2783,7 @@ let J = K;
|
|
|
2687
2783
|
* 1. createReactProps 中定义属性
|
|
2688
2784
|
* 2. reactPropDefaults 中定义默认值
|
|
2689
2785
|
*/
|
|
2690
|
-
...
|
|
2786
|
+
...Ir(),
|
|
2691
2787
|
//分辨率缩放比例
|
|
2692
2788
|
resolutionScale: 1,
|
|
2693
2789
|
autoReconnect: !1,
|
|
@@ -2697,34 +2793,34 @@ let J = K;
|
|
|
2697
2793
|
speechRecognitionListening: void 0,
|
|
2698
2794
|
customMessageListening: void 0
|
|
2699
2795
|
});
|
|
2700
|
-
})(
|
|
2701
|
-
|
|
2702
|
-
class lt extends
|
|
2796
|
+
})(G || (G = {}));
|
|
2797
|
+
Nr(G.prototype, G.createDefaultProps);
|
|
2798
|
+
class lt extends K {
|
|
2703
2799
|
constructor(e, t) {
|
|
2704
2800
|
super(e, t);
|
|
2705
2801
|
const i = t.viewer;
|
|
2706
2802
|
if (!i) return;
|
|
2707
2803
|
const r = this.ad(W(!1));
|
|
2708
2804
|
e.components.main || this.d(this.createdEvent.don(() => {
|
|
2709
|
-
const n = this.constructor.propValFuncs, s = e.defaultProps, o = Object.keys(s).filter((
|
|
2805
|
+
const n = this.constructor.propValFuncs, s = e.defaultProps, o = Object.keys(s).filter((c) => n[c] !== null);
|
|
2710
2806
|
o.push(...this.constructor.forceUeUpdateProps);
|
|
2711
|
-
const h = e.constructor.defaults, a = { val: {} },
|
|
2712
|
-
for (let
|
|
2713
|
-
const
|
|
2714
|
-
|
|
2715
|
-
const w = n[
|
|
2807
|
+
const h = e.constructor.defaults, a = { val: {} }, g = [];
|
|
2808
|
+
for (let c of o) {
|
|
2809
|
+
const u = c + "Changed", v = e[u];
|
|
2810
|
+
g.push(v);
|
|
2811
|
+
const w = n[c];
|
|
2716
2812
|
if (w === null)
|
|
2717
2813
|
throw console.error("vf === null error"), new Error("vf === null error");
|
|
2718
2814
|
const y = () => {
|
|
2719
|
-
const
|
|
2720
|
-
let m = w ? w(
|
|
2815
|
+
const T = e[c] ?? h[c] ?? e.constructor[`default${c.charAt(0).toUpperCase() + c.slice(1)}`];
|
|
2816
|
+
let m = w ? w(T, this, t, e) : T;
|
|
2721
2817
|
if (m === void 0) {
|
|
2722
|
-
console.warn(`UE自动更新的属性,不应该为undefined! 属性名:${
|
|
2818
|
+
console.warn(`UE自动更新的属性,不应该为undefined! 属性名:${c} 对象名:${e.name} 对象id: ${e.id}`);
|
|
2723
2819
|
return;
|
|
2724
2820
|
}
|
|
2725
|
-
a.val[
|
|
2821
|
+
a.val[c] = m;
|
|
2726
2822
|
};
|
|
2727
|
-
y(), this.d(
|
|
2823
|
+
y(), this.d(v.don(y));
|
|
2728
2824
|
}
|
|
2729
2825
|
const p = () => {
|
|
2730
2826
|
i.callUeFunc({
|
|
@@ -2734,10 +2830,10 @@ class lt extends G {
|
|
|
2734
2830
|
...a.val
|
|
2735
2831
|
}
|
|
2736
2832
|
}), a.val = {};
|
|
2737
|
-
}, l = this.dv(
|
|
2833
|
+
}, l = this.dv(P(...g));
|
|
2738
2834
|
this.d(l.don(p)), this.d(r.changed.don(p)), this.d(e.flushEvent.don(() => l.flush()));
|
|
2739
2835
|
})), e.components.main || (this.d(() => {
|
|
2740
|
-
r.value &&
|
|
2836
|
+
r.value && Er(i, e.id);
|
|
2741
2837
|
}), i.callUeFunc({
|
|
2742
2838
|
f: "create",
|
|
2743
2839
|
p: {
|
|
@@ -2782,7 +2878,7 @@ class k extends lt {
|
|
|
2782
2878
|
})));
|
|
2783
2879
|
}
|
|
2784
2880
|
}
|
|
2785
|
-
class
|
|
2881
|
+
class S extends k {
|
|
2786
2882
|
constructor(e, t) {
|
|
2787
2883
|
super(e, t);
|
|
2788
2884
|
const i = t.viewer;
|
|
@@ -2796,7 +2892,7 @@ class E extends k {
|
|
|
2796
2892
|
rotation: e.rotation
|
|
2797
2893
|
}
|
|
2798
2894
|
});
|
|
2799
|
-
}, n = this.dv(
|
|
2895
|
+
}, n = this.dv(P(
|
|
2800
2896
|
e.positionChanged,
|
|
2801
2897
|
e.rotationChanged,
|
|
2802
2898
|
e.editingChanged
|
|
@@ -2805,14 +2901,14 @@ class E extends k {
|
|
|
2805
2901
|
setTimeout(r, 0);
|
|
2806
2902
|
})), this.d(e.smoothMoveEvent.don((h, a) => {
|
|
2807
2903
|
ke(i, e.id, h, a);
|
|
2808
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((h, a,
|
|
2809
|
-
Pe(i, e.id, h, a,
|
|
2810
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((h, a,
|
|
2811
|
-
Le(i, e.id, h, a, p,
|
|
2812
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((h, a,
|
|
2813
|
-
De(i, e.id, h, a,
|
|
2904
|
+
})), this.d(e.smoothMoveWithRotationEvent.don((h, a, g) => {
|
|
2905
|
+
Pe(i, e.id, h, a, g);
|
|
2906
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((h, a, g, p) => {
|
|
2907
|
+
Le(i, e.id, h, a, p, g);
|
|
2908
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((h, a, g, p, l) => {
|
|
2909
|
+
De(i, e.id, h, a, g, p, l);
|
|
2814
2910
|
})), this.d(e.smoothMoveKeepPitchEvent.don(async (h, a) => {
|
|
2815
|
-
const
|
|
2911
|
+
const g = await i.callUeFunc({
|
|
2816
2912
|
f: "SmoothMoveKeepPitch",
|
|
2817
2913
|
p: {
|
|
2818
2914
|
id: e.id,
|
|
@@ -2820,42 +2916,42 @@ class E extends k {
|
|
|
2820
2916
|
Time: a
|
|
2821
2917
|
}
|
|
2822
2918
|
});
|
|
2823
|
-
|
|
2919
|
+
g.error && console.error("SmoothMoveKeepPitch:", g.error);
|
|
2824
2920
|
})), this.d(e.automaticLandingEvent.don((h) => {
|
|
2825
2921
|
const a = [e.position[0], e.position[1]];
|
|
2826
|
-
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((
|
|
2827
|
-
|
|
2922
|
+
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((g) => {
|
|
2923
|
+
g !== null && (e.position = [...a, g], e.collision = h);
|
|
2828
2924
|
});
|
|
2829
2925
|
}));
|
|
2830
|
-
const s = async (h, a,
|
|
2926
|
+
const s = async (h, a, g, p) => {
|
|
2831
2927
|
const { viewer: l } = h;
|
|
2832
2928
|
if (!l) {
|
|
2833
2929
|
console.error("SmoothMoveRelatively: ueViewer.viewer is undefined");
|
|
2834
2930
|
return;
|
|
2835
2931
|
}
|
|
2836
|
-
const
|
|
2932
|
+
const c = await l.callUeFunc({
|
|
2837
2933
|
f: "SmoothMoveRelatively",
|
|
2838
|
-
p: { id: a, RelativePosition:
|
|
2934
|
+
p: { id: a, RelativePosition: g, Time: p }
|
|
2839
2935
|
});
|
|
2840
|
-
return
|
|
2936
|
+
return c.error && console.error("SmoothMoveRelatively:", c.error), c;
|
|
2841
2937
|
};
|
|
2842
2938
|
this.d(e.smoothMoveRelativelyEvent.don((h, a) => {
|
|
2843
2939
|
s(t, e.id, h, a);
|
|
2844
2940
|
}));
|
|
2845
|
-
const o = async (h, a,
|
|
2846
|
-
const { viewer:
|
|
2847
|
-
if (!
|
|
2941
|
+
const o = async (h, a, g, p, l) => {
|
|
2942
|
+
const { viewer: c } = h;
|
|
2943
|
+
if (!c) {
|
|
2848
2944
|
console.error("SmoothMoveRelativelyWithRotation: ueViewer.viewer is undefined");
|
|
2849
2945
|
return;
|
|
2850
2946
|
}
|
|
2851
|
-
const
|
|
2947
|
+
const u = await c.callUeFunc({
|
|
2852
2948
|
f: "SmoothMoveRelativelyWithRotation",
|
|
2853
|
-
p: { id: a, RelativePosition:
|
|
2949
|
+
p: { id: a, RelativePosition: g, NewRotation: p, Time: l }
|
|
2854
2950
|
});
|
|
2855
|
-
return
|
|
2951
|
+
return u.error && console.error("SmoothMoveRelativelyWithRotation:", u.error), u;
|
|
2856
2952
|
};
|
|
2857
|
-
this.d(e.smoothMoveRelativelyWithRotationEvent.don((h, a,
|
|
2858
|
-
o(t, e.id, h, a,
|
|
2953
|
+
this.d(e.smoothMoveRelativelyWithRotationEvent.don((h, a, g) => {
|
|
2954
|
+
o(t, e.id, h, a, g);
|
|
2859
2955
|
}));
|
|
2860
2956
|
}
|
|
2861
2957
|
}
|
|
@@ -2872,7 +2968,7 @@ class B extends k {
|
|
|
2872
2968
|
points: e.points
|
|
2873
2969
|
}
|
|
2874
2970
|
});
|
|
2875
|
-
}, n = this.dv(
|
|
2971
|
+
}, n = this.dv(P(
|
|
2876
2972
|
e.pointsChanged,
|
|
2877
2973
|
e.editingChanged
|
|
2878
2974
|
));
|
|
@@ -2896,7 +2992,7 @@ f(B, "propValFuncs", {
|
|
|
2896
2992
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
2897
2993
|
})
|
|
2898
2994
|
});
|
|
2899
|
-
class z extends
|
|
2995
|
+
class z extends S {
|
|
2900
2996
|
constructor(e, t) {
|
|
2901
2997
|
super(e, t), t.viewer && this.d(t.widgetEvent.don((r) => {
|
|
2902
2998
|
if (r.objId !== e.id) return;
|
|
@@ -2905,13 +3001,13 @@ class z extends E {
|
|
|
2905
3001
|
}));
|
|
2906
3002
|
}
|
|
2907
3003
|
}
|
|
2908
|
-
class
|
|
3004
|
+
class xr extends S {
|
|
2909
3005
|
constructor(e, t) {
|
|
2910
3006
|
super(e, t), t.viewer;
|
|
2911
3007
|
}
|
|
2912
3008
|
}
|
|
2913
|
-
f(
|
|
2914
|
-
...
|
|
3009
|
+
f(xr, "propValFuncs", {
|
|
3010
|
+
...S.propValFuncs,
|
|
2915
3011
|
pointStyle: (e) => ({
|
|
2916
3012
|
...e,
|
|
2917
3013
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
@@ -2925,12 +3021,12 @@ f(Tr, "propValFuncs", {
|
|
|
2925
3021
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
2926
3022
|
})
|
|
2927
3023
|
});
|
|
2928
|
-
class Ke extends
|
|
3024
|
+
class Ke extends xr {
|
|
2929
3025
|
constructor(e, t) {
|
|
2930
3026
|
super(e, t), t.viewer;
|
|
2931
3027
|
}
|
|
2932
3028
|
}
|
|
2933
|
-
const
|
|
3029
|
+
const Ze = (d) => {
|
|
2934
3030
|
switch (d) {
|
|
2935
3031
|
case 0:
|
|
2936
3032
|
return "成功绑定";
|
|
@@ -2943,7 +3039,7 @@ const qe = (d) => {
|
|
|
2943
3039
|
default:
|
|
2944
3040
|
return "未知错误";
|
|
2945
3041
|
}
|
|
2946
|
-
}, ut = class ut extends
|
|
3042
|
+
}, ut = class ut extends K {
|
|
2947
3043
|
constructor(t, i) {
|
|
2948
3044
|
super(t, i);
|
|
2949
3045
|
f(this, "_styleColor", this.dv(W([])));
|
|
@@ -2980,7 +3076,7 @@ const qe = (d) => {
|
|
|
2980
3076
|
materialOverrideMap: t.materialOverrideMap
|
|
2981
3077
|
}
|
|
2982
3078
|
});
|
|
2983
|
-
}, h = this.dv(
|
|
3079
|
+
}, h = this.dv(P(
|
|
2984
3080
|
t.urlChanged,
|
|
2985
3081
|
t.showChanged,
|
|
2986
3082
|
t.flyToParamChanged,
|
|
@@ -3001,7 +3097,7 @@ const qe = (d) => {
|
|
|
3001
3097
|
o(), this.d(h.don(o)), Reflect.has(t, "colorMode") && this.d(t.colorModeChanged.don(() => o()));
|
|
3002
3098
|
const a = this.dv(W(void 0));
|
|
3003
3099
|
{
|
|
3004
|
-
const p = this.dv(
|
|
3100
|
+
const p = this.dv(P(
|
|
3005
3101
|
t.actorTagChanged,
|
|
3006
3102
|
t.urlChanged
|
|
3007
3103
|
)), l = () => {
|
|
@@ -3015,7 +3111,7 @@ const qe = (d) => {
|
|
|
3015
3111
|
};
|
|
3016
3112
|
l(), this.d(p.don(l));
|
|
3017
3113
|
}
|
|
3018
|
-
const
|
|
3114
|
+
const g = async () => {
|
|
3019
3115
|
const { id: p } = t;
|
|
3020
3116
|
if (n !== void 0) {
|
|
3021
3117
|
n = void 0;
|
|
@@ -3047,139 +3143,139 @@ const qe = (d) => {
|
|
|
3047
3143
|
}
|
|
3048
3144
|
};
|
|
3049
3145
|
this.d(() => {
|
|
3050
|
-
|
|
3146
|
+
g();
|
|
3051
3147
|
});
|
|
3052
3148
|
{
|
|
3053
|
-
const p = this.dv(Te(async (
|
|
3149
|
+
const p = this.dv(Te(async (c) => {
|
|
3054
3150
|
if (a.value === void 0) {
|
|
3055
|
-
await
|
|
3151
|
+
await c.promise(g());
|
|
3056
3152
|
return;
|
|
3057
3153
|
}
|
|
3058
3154
|
if (a.value.type === "ActorTag") {
|
|
3059
|
-
const { actorTag:
|
|
3060
|
-
if (n !==
|
|
3155
|
+
const { actorTag: u } = a.value;
|
|
3156
|
+
if (n !== u && await c.promise(g()), n !== void 0 || u === void 0) return;
|
|
3061
3157
|
try {
|
|
3062
|
-
n =
|
|
3063
|
-
const
|
|
3064
|
-
if (!
|
|
3065
|
-
if (
|
|
3066
|
-
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${
|
|
3158
|
+
n = u;
|
|
3159
|
+
const v = await c.promise(i.bind3DTilesetByTag(t.id, u));
|
|
3160
|
+
if (!v) return;
|
|
3161
|
+
if (v.error !== "") {
|
|
3162
|
+
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${v.error}`);
|
|
3067
3163
|
return;
|
|
3068
3164
|
}
|
|
3069
|
-
if (
|
|
3070
|
-
if (
|
|
3071
|
-
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${
|
|
3165
|
+
if (v.re.type !== 0)
|
|
3166
|
+
if (v.re.type === 1)
|
|
3167
|
+
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${Ze(v.re.type)}`);
|
|
3072
3168
|
else {
|
|
3073
|
-
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${
|
|
3169
|
+
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${Ze(v.re.type)}`);
|
|
3074
3170
|
return;
|
|
3075
3171
|
}
|
|
3076
|
-
} catch (
|
|
3077
|
-
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${
|
|
3172
|
+
} catch (v) {
|
|
3173
|
+
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${v}`);
|
|
3078
3174
|
return;
|
|
3079
3175
|
}
|
|
3080
3176
|
} else if (a.value.type === "CreatedUrl") {
|
|
3081
|
-
const { url:
|
|
3082
|
-
if (
|
|
3177
|
+
const { url: u } = a.value;
|
|
3178
|
+
if (u !== s && await g(), s !== void 0 || u === void 0) return;
|
|
3083
3179
|
try {
|
|
3084
|
-
s =
|
|
3085
|
-
const
|
|
3180
|
+
s = u;
|
|
3181
|
+
const v = await c.promise(r.callUeFunc({
|
|
3086
3182
|
f: "create",
|
|
3087
3183
|
p: {
|
|
3088
3184
|
type: t.typeName,
|
|
3089
3185
|
id: t.id
|
|
3090
3186
|
}
|
|
3091
3187
|
}));
|
|
3092
|
-
if (!
|
|
3093
|
-
if (
|
|
3094
|
-
console.warn(`UeES3DTileset create: ${
|
|
3188
|
+
if (!v) return;
|
|
3189
|
+
if (v.error !== "") {
|
|
3190
|
+
console.warn(`UeES3DTileset create: ${v.error}`);
|
|
3095
3191
|
return;
|
|
3096
3192
|
}
|
|
3097
|
-
} catch (
|
|
3098
|
-
console.warn(`UeES3DTileset create: ${
|
|
3193
|
+
} catch (v) {
|
|
3194
|
+
console.warn(`UeES3DTileset create: ${v}`);
|
|
3099
3195
|
return;
|
|
3100
3196
|
}
|
|
3101
3197
|
}
|
|
3102
|
-
await
|
|
3198
|
+
await c.promise(o());
|
|
3103
3199
|
})), l = async () => {
|
|
3104
3200
|
p.restart();
|
|
3105
3201
|
};
|
|
3106
3202
|
l(), this.d(a.changed.don(l));
|
|
3107
3203
|
}
|
|
3108
3204
|
this.d(t.refreshTilesetEvent.don(() => {
|
|
3109
|
-
|
|
3205
|
+
ts(r, t.id);
|
|
3110
3206
|
})), this.d(t.flyToEvent.don(async (p, l) => {
|
|
3111
3207
|
if (!n && !s) return;
|
|
3112
|
-
const
|
|
3113
|
-
let
|
|
3114
|
-
|
|
3208
|
+
const c = await we(r, t.id, p);
|
|
3209
|
+
let u = "over";
|
|
3210
|
+
c === void 0 ? u = "error" : c.endType === 0 ? u = "over" : c.endType === 1 && (u = "cancelled"), t.flyOverEvent.emit(l, u, i);
|
|
3115
3211
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
3116
3212
|
!n && !s || dt(r, t.id);
|
|
3117
3213
|
})), this.d(t.calcFlyInParamEvent.don(async () => {
|
|
3118
3214
|
if (!n && !s || !i.actived) return;
|
|
3119
3215
|
const p = await i.getCurrentCameraInfo();
|
|
3120
3216
|
if (!p) return;
|
|
3121
|
-
const { position: l, rotation:
|
|
3122
|
-
t.flyInParam = { position: l, rotation:
|
|
3217
|
+
const { position: l, rotation: c } = p;
|
|
3218
|
+
t.flyInParam = { position: l, rotation: c, flyDuration: 1 };
|
|
3123
3219
|
})), this.d(i.propChanged.don((p) => {
|
|
3124
3220
|
!n && !s || p.objId === t.id && Object.keys(p.props).forEach((l) => {
|
|
3125
|
-
const
|
|
3126
|
-
t[l] =
|
|
3221
|
+
const c = p.props[l] === null ? void 0 : p.props[l];
|
|
3222
|
+
t[l] = c;
|
|
3127
3223
|
});
|
|
3128
3224
|
})), this.d(i.objectEvent.don((p) => {
|
|
3129
3225
|
!n && !s || p.id !== t.id || p.type !== "3DTilesetReady" || t.tilesetReady.emit(p.p);
|
|
3130
3226
|
}));
|
|
3131
3227
|
{
|
|
3132
|
-
const p = async (
|
|
3228
|
+
const p = async (v, w) => {
|
|
3133
3229
|
if (!n && !s) return;
|
|
3134
3230
|
const y = await r.callUeFunc({
|
|
3135
3231
|
f: "SetFeatureColor",
|
|
3136
|
-
p: { id: t.id, featureName:
|
|
3232
|
+
p: { id: t.id, featureName: v, json: w }
|
|
3137
3233
|
});
|
|
3138
3234
|
if (y && y.error !== "") {
|
|
3139
3235
|
console.warn(`UeES3DTileset SetFeatureColor: ${y.error}`);
|
|
3140
3236
|
return;
|
|
3141
3237
|
}
|
|
3142
|
-
}, l = async (
|
|
3238
|
+
}, l = async (v, w) => {
|
|
3143
3239
|
if (!n && !s) return;
|
|
3144
3240
|
const y = await r.callUeFunc({
|
|
3145
3241
|
f: "SetFeatureVisable",
|
|
3146
|
-
p: { id: t.id, featureName:
|
|
3242
|
+
p: { id: t.id, featureName: v, json: w }
|
|
3147
3243
|
});
|
|
3148
3244
|
if (y && y.error !== "") {
|
|
3149
3245
|
console.warn(`UeES3DTileset SetFeatureVisable: ${y.error}`);
|
|
3150
3246
|
return;
|
|
3151
3247
|
}
|
|
3152
|
-
},
|
|
3248
|
+
}, c = async () => {
|
|
3153
3249
|
if (!n && !s) return;
|
|
3154
|
-
const
|
|
3250
|
+
const v = await r.callUeFunc({
|
|
3155
3251
|
f: "ResetFeatureStyle",
|
|
3156
3252
|
p: { id: t.id }
|
|
3157
3253
|
});
|
|
3158
|
-
if (
|
|
3159
|
-
console.warn(`UeES3DTileset ResetFeatureStyle: ${
|
|
3254
|
+
if (v && v.error !== "") {
|
|
3255
|
+
console.warn(`UeES3DTileset ResetFeatureStyle: ${v.error}`);
|
|
3160
3256
|
return;
|
|
3161
3257
|
}
|
|
3162
|
-
},
|
|
3258
|
+
}, u = async (v) => {
|
|
3163
3259
|
if (!n && !s) return;
|
|
3164
3260
|
const w = await r.callUeFunc({
|
|
3165
3261
|
f: "SetFeatureStyle",
|
|
3166
|
-
p: { id: t.id, json:
|
|
3262
|
+
p: { id: t.id, json: v }
|
|
3167
3263
|
});
|
|
3168
3264
|
if (w && w.error !== "") {
|
|
3169
3265
|
console.warn(`UeES3DTileset SetFeatureStyle: ${w.error}`);
|
|
3170
3266
|
return;
|
|
3171
3267
|
}
|
|
3172
3268
|
};
|
|
3173
|
-
this.d(t.setFeatureColorEvent.don((
|
|
3269
|
+
this.d(t.setFeatureColorEvent.don((v, w) => {
|
|
3174
3270
|
const y = [...this.styleColor, ...w];
|
|
3175
|
-
this.styleColor = [...y], p(
|
|
3176
|
-
})), this.d(t.setFeatureVisableEvent.don((
|
|
3271
|
+
this.styleColor = [...y], p(v, y);
|
|
3272
|
+
})), this.d(t.setFeatureVisableEvent.don((v, w) => {
|
|
3177
3273
|
const y = [...this.styleVisable, ...w];
|
|
3178
|
-
this.styleVisable = [...y], l(
|
|
3274
|
+
this.styleVisable = [...y], l(v, y);
|
|
3179
3275
|
})), this.d(t.resetFeatureStyleEvent.don(() => {
|
|
3180
|
-
|
|
3181
|
-
})), this.d(t.setFeatureStyleEvent.don((
|
|
3182
|
-
|
|
3276
|
+
c(), this.styleColor = [], this.styleVisable = [];
|
|
3277
|
+
})), this.d(t.setFeatureStyleEvent.don((v) => {
|
|
3278
|
+
u(v);
|
|
3183
3279
|
}));
|
|
3184
3280
|
}
|
|
3185
3281
|
{
|
|
@@ -3238,7 +3334,7 @@ const qe = (d) => {
|
|
|
3238
3334
|
};
|
|
3239
3335
|
f(ut, "type", ut.register("ESUeViewer", me.type, ut));
|
|
3240
3336
|
let Ue = ut;
|
|
3241
|
-
const
|
|
3337
|
+
const qe = (d) => {
|
|
3242
3338
|
switch (d) {
|
|
3243
3339
|
case 0:
|
|
3244
3340
|
return "成功绑定";
|
|
@@ -3253,7 +3349,7 @@ const Qe = (d) => {
|
|
|
3253
3349
|
default:
|
|
3254
3350
|
return "未知错误";
|
|
3255
3351
|
}
|
|
3256
|
-
}, ht = class ht extends
|
|
3352
|
+
}, ht = class ht extends K {
|
|
3257
3353
|
constructor(e, t) {
|
|
3258
3354
|
super(e, t);
|
|
3259
3355
|
const i = t.viewer;
|
|
@@ -3266,10 +3362,10 @@ const Qe = (d) => {
|
|
|
3266
3362
|
{
|
|
3267
3363
|
const p = () => {
|
|
3268
3364
|
if (typeof e.url == "string")
|
|
3269
|
-
o.value =
|
|
3365
|
+
o.value = E.context.getStrFromEnv(e.url);
|
|
3270
3366
|
else {
|
|
3271
3367
|
const l = e.url;
|
|
3272
|
-
l.url =
|
|
3368
|
+
l.url = E.context.getStrFromEnv(l.url), o.value = l;
|
|
3273
3369
|
}
|
|
3274
3370
|
};
|
|
3275
3371
|
p(), this.ad(e.urlChanged.don(p));
|
|
@@ -3278,7 +3374,7 @@ const Qe = (d) => {
|
|
|
3278
3374
|
if (!r && !n) return;
|
|
3279
3375
|
let p = e.targetID ?? U.defaults.targetID;
|
|
3280
3376
|
if (p && p != "") {
|
|
3281
|
-
const l =
|
|
3377
|
+
const l = E.getSceneObject(p);
|
|
3282
3378
|
p = l ? (l.components.main ?? l).id : p;
|
|
3283
3379
|
}
|
|
3284
3380
|
await i.callUeFunc({
|
|
@@ -3301,7 +3397,7 @@ const Qe = (d) => {
|
|
|
3301
3397
|
splitDirection: e.splitDirection ?? U.defaults.splitDirection
|
|
3302
3398
|
}
|
|
3303
3399
|
});
|
|
3304
|
-
}, a = this.dv(
|
|
3400
|
+
}, a = this.dv(P(
|
|
3305
3401
|
e.showChanged,
|
|
3306
3402
|
o.changed,
|
|
3307
3403
|
e.flyToParamChanged,
|
|
@@ -3318,7 +3414,7 @@ const Qe = (d) => {
|
|
|
3318
3414
|
e.splitDirectionChanged
|
|
3319
3415
|
));
|
|
3320
3416
|
this.d(a.don(h));
|
|
3321
|
-
const
|
|
3417
|
+
const g = async () => {
|
|
3322
3418
|
const { id: p } = e;
|
|
3323
3419
|
if (r !== void 0) {
|
|
3324
3420
|
r = void 0;
|
|
@@ -3350,20 +3446,20 @@ const Qe = (d) => {
|
|
|
3350
3446
|
}
|
|
3351
3447
|
};
|
|
3352
3448
|
this.d(() => {
|
|
3353
|
-
|
|
3449
|
+
g();
|
|
3354
3450
|
});
|
|
3355
3451
|
{
|
|
3356
|
-
const p = this.dv(Te(async (
|
|
3452
|
+
const p = this.dv(Te(async (c) => {
|
|
3357
3453
|
if (s.value === void 0) {
|
|
3358
|
-
await
|
|
3454
|
+
await c.promise(g());
|
|
3359
3455
|
return;
|
|
3360
3456
|
}
|
|
3361
3457
|
if (s.value.type === "ActorTag") {
|
|
3362
|
-
const { actorTag:
|
|
3363
|
-
if (r !==
|
|
3458
|
+
const { actorTag: u, componentTag: v } = s.value;
|
|
3459
|
+
if (r !== u && await c.promise(g()), r !== void 0 || u === void 0) return;
|
|
3364
3460
|
try {
|
|
3365
|
-
r =
|
|
3366
|
-
const w = await
|
|
3461
|
+
r = u;
|
|
3462
|
+
const w = await c.promise(t.bindImageryByTag(e.id, u, v));
|
|
3367
3463
|
if (!w) return;
|
|
3368
3464
|
if (w.error !== "") {
|
|
3369
3465
|
console.warn(`ESImageryLayer BindImageryByTag: ${w.error}`);
|
|
@@ -3371,9 +3467,9 @@ const Qe = (d) => {
|
|
|
3371
3467
|
}
|
|
3372
3468
|
if (w.re.type !== 0)
|
|
3373
3469
|
if (w.re.type === 1)
|
|
3374
|
-
console.warn(`ESImageryLayer BindImageryByTag: ${
|
|
3470
|
+
console.warn(`ESImageryLayer BindImageryByTag: ${qe(w.re.type)}`);
|
|
3375
3471
|
else {
|
|
3376
|
-
console.warn(`ESImageryLayer BindImageryByTag: ${
|
|
3472
|
+
console.warn(`ESImageryLayer BindImageryByTag: ${qe(w.re.type)}`);
|
|
3377
3473
|
return;
|
|
3378
3474
|
}
|
|
3379
3475
|
} catch (w) {
|
|
@@ -3381,20 +3477,20 @@ const Qe = (d) => {
|
|
|
3381
3477
|
return;
|
|
3382
3478
|
}
|
|
3383
3479
|
} else if (s.value.type === "CreatedUrl") {
|
|
3384
|
-
const { url:
|
|
3385
|
-
if (
|
|
3480
|
+
const { url: u } = s.value;
|
|
3481
|
+
if (u !== n && await c.promise(g()), n !== void 0 || u === void 0) return;
|
|
3386
3482
|
try {
|
|
3387
|
-
n =
|
|
3388
|
-
const
|
|
3483
|
+
n = u;
|
|
3484
|
+
const v = await c.promise(i.callUeFunc({
|
|
3389
3485
|
f: "create",
|
|
3390
3486
|
p: {
|
|
3391
3487
|
type: "ESImageryLayer",
|
|
3392
3488
|
id: e.id
|
|
3393
3489
|
}
|
|
3394
3490
|
}));
|
|
3395
|
-
if (!
|
|
3396
|
-
if (
|
|
3397
|
-
console.warn(`ESImageryLayer create: ${
|
|
3491
|
+
if (!v) return;
|
|
3492
|
+
if (v.error !== "") {
|
|
3493
|
+
console.warn(`ESImageryLayer create: ${v.error}`);
|
|
3398
3494
|
return;
|
|
3399
3495
|
}
|
|
3400
3496
|
} catch {
|
|
@@ -3402,14 +3498,14 @@ const Qe = (d) => {
|
|
|
3402
3498
|
return;
|
|
3403
3499
|
}
|
|
3404
3500
|
}
|
|
3405
|
-
await
|
|
3501
|
+
await c.promise(h());
|
|
3406
3502
|
})), l = async () => {
|
|
3407
3503
|
p.restart();
|
|
3408
3504
|
};
|
|
3409
3505
|
l(), this.d(s.changed.don(l));
|
|
3410
3506
|
}
|
|
3411
3507
|
{
|
|
3412
|
-
const p = this.dv(
|
|
3508
|
+
const p = this.dv(P(
|
|
3413
3509
|
e.actorTagChanged,
|
|
3414
3510
|
o.changed,
|
|
3415
3511
|
e.componentTagChanged
|
|
@@ -3427,34 +3523,34 @@ const Qe = (d) => {
|
|
|
3427
3523
|
}
|
|
3428
3524
|
this.d(e.flyToEvent.don(async (p, l) => {
|
|
3429
3525
|
if (!r && !n) return;
|
|
3430
|
-
const
|
|
3431
|
-
let
|
|
3432
|
-
|
|
3526
|
+
const c = await we(i, e.id, p);
|
|
3527
|
+
let u = "over";
|
|
3528
|
+
c === void 0 ? u = "error" : c.endType === 0 ? u = "over" : c.endType === 1 && (u = "cancelled"), e.flyOverEvent.emit(l, u, t);
|
|
3433
3529
|
})), this.d(e.flyInEvent.don(async (p, l) => {
|
|
3434
|
-
var
|
|
3530
|
+
var v, w;
|
|
3435
3531
|
if (!r && !n) return;
|
|
3436
|
-
const
|
|
3437
|
-
let
|
|
3438
|
-
|
|
3532
|
+
const c = await Re(i, e.id, (v = e.flyInParam) == null ? void 0 : v.position, (w = e.flyInParam) == null ? void 0 : w.rotation, p ?? 1);
|
|
3533
|
+
let u = "over";
|
|
3534
|
+
c === void 0 ? u = "error" : c.endType === 0 ? u = "over" : c.endType === 1 && (u = "cancelled"), e.flyOverEvent.emit(l, u, t);
|
|
3439
3535
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
3440
3536
|
!r && !n || dt(i, e.id);
|
|
3441
3537
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
3442
3538
|
if (!t.actived) return;
|
|
3443
3539
|
const p = await t.getCurrentCameraInfo();
|
|
3444
3540
|
if (!p) return;
|
|
3445
|
-
const { position: l, rotation:
|
|
3446
|
-
e.flyInParam = { position: l, rotation:
|
|
3541
|
+
const { position: l, rotation: c } = p;
|
|
3542
|
+
e.flyInParam = { position: l, rotation: c, flyDuration: 1 };
|
|
3447
3543
|
})), this.d(t.propChanged.don((p) => {
|
|
3448
3544
|
!r && !n || p.objId === e.id && Object.keys(p.props).forEach((l) => {
|
|
3449
|
-
const
|
|
3450
|
-
e[l] =
|
|
3545
|
+
const c = p.props[l] === null ? void 0 : p.props[l];
|
|
3546
|
+
e[l] = c;
|
|
3451
3547
|
});
|
|
3452
3548
|
}));
|
|
3453
3549
|
}
|
|
3454
3550
|
};
|
|
3455
3551
|
f(ht, "type", ht.register("ESUeViewer", U.type, ht));
|
|
3456
3552
|
let Ve = ht;
|
|
3457
|
-
const
|
|
3553
|
+
const Q = class Q extends k {
|
|
3458
3554
|
constructor(e, t) {
|
|
3459
3555
|
if (super(e, t), !t.viewer) {
|
|
3460
3556
|
console.warn("viewer is undefined!");
|
|
@@ -3462,17 +3558,17 @@ const X = class X extends k {
|
|
|
3462
3558
|
}
|
|
3463
3559
|
}
|
|
3464
3560
|
};
|
|
3465
|
-
f(
|
|
3561
|
+
f(Q, "type", Q.register("ESUeViewer", zr.type, Q)), f(Q, "forceUeUpdateProps", [
|
|
3466
3562
|
...k.forceUeUpdateProps,
|
|
3467
3563
|
"url"
|
|
3468
|
-
]), f(
|
|
3564
|
+
]), f(Q, "propValFuncs", {
|
|
3469
3565
|
...k.propValFuncs,
|
|
3470
|
-
url: (e) => typeof e == "string" ?
|
|
3566
|
+
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(e) : (e.url = E.context.getStrFromEnv(e.url), e),
|
|
3471
3567
|
czmMaxzoom: null,
|
|
3472
3568
|
czmMinzoom: null
|
|
3473
3569
|
});
|
|
3474
|
-
let Oe =
|
|
3475
|
-
const pt = class pt extends
|
|
3570
|
+
let Oe = Q;
|
|
3571
|
+
const pt = class pt extends S {
|
|
3476
3572
|
constructor(e, t) {
|
|
3477
3573
|
if (super(e, t), !t.viewer) {
|
|
3478
3574
|
console.warn("viewer is undefined!");
|
|
@@ -3480,9 +3576,9 @@ const pt = class pt extends E {
|
|
|
3480
3576
|
}
|
|
3481
3577
|
}
|
|
3482
3578
|
};
|
|
3483
|
-
f(pt, "type", pt.register("ESUeViewer",
|
|
3579
|
+
f(pt, "type", pt.register("ESUeViewer", br.type, pt));
|
|
3484
3580
|
let je = pt;
|
|
3485
|
-
const ft = class ft extends
|
|
3581
|
+
const ft = class ft extends S {
|
|
3486
3582
|
constructor(e, t) {
|
|
3487
3583
|
if (super(e, t), !t.viewer) {
|
|
3488
3584
|
console.warn("viewer is undefined!");
|
|
@@ -3490,9 +3586,9 @@ const ft = class ft extends E {
|
|
|
3490
3586
|
}
|
|
3491
3587
|
}
|
|
3492
3588
|
};
|
|
3493
|
-
f(ft, "type", ft.register("ESUeViewer",
|
|
3589
|
+
f(ft, "type", ft.register("ESUeViewer", Hr.type, ft));
|
|
3494
3590
|
let ti = ft;
|
|
3495
|
-
const
|
|
3591
|
+
const vt = class vt extends B {
|
|
3496
3592
|
constructor(e, t) {
|
|
3497
3593
|
if (super(e, t), !t.viewer) {
|
|
3498
3594
|
console.warn("viewer is undefined!");
|
|
@@ -3500,9 +3596,9 @@ const gt = class gt extends B {
|
|
|
3500
3596
|
}
|
|
3501
3597
|
}
|
|
3502
3598
|
};
|
|
3503
|
-
f(
|
|
3504
|
-
let
|
|
3505
|
-
const
|
|
3599
|
+
f(vt, "type", vt.register("ESUeViewer", Jr.type, vt));
|
|
3600
|
+
let _ = vt;
|
|
3601
|
+
const gt = class gt extends _ {
|
|
3506
3602
|
constructor(e, t) {
|
|
3507
3603
|
super(e, t);
|
|
3508
3604
|
const i = t.viewer;
|
|
@@ -3511,22 +3607,22 @@ const vt = class vt extends $ {
|
|
|
3511
3607
|
return;
|
|
3512
3608
|
}
|
|
3513
3609
|
const r = () => {
|
|
3514
|
-
let s =
|
|
3610
|
+
let s = tt.defaults.fillStyle;
|
|
3515
3611
|
try {
|
|
3516
|
-
s = { ...e.fillStyle ??
|
|
3612
|
+
s = { ...e.fillStyle ?? tt.defaults.fillStyle };
|
|
3517
3613
|
} catch (o) {
|
|
3518
|
-
console.error("ESAreaMeasurement fillStyle 属性类型错误!", o), s = { ...
|
|
3614
|
+
console.error("ESAreaMeasurement fillStyle 属性类型错误!", o), s = { ...tt.defaults.fillStyle };
|
|
3519
3615
|
}
|
|
3520
3616
|
s.materialParams = JSON.stringify(s.materialParams), i.callUeFunc({
|
|
3521
3617
|
f: "update",
|
|
3522
3618
|
p: {
|
|
3523
3619
|
id: e.id,
|
|
3524
|
-
stroked: e.stroked ??
|
|
3620
|
+
stroked: e.stroked ?? tt.defaults.stroked,
|
|
3525
3621
|
fillStyle: s,
|
|
3526
|
-
filled: e.filled ??
|
|
3622
|
+
filled: e.filled ?? tt.defaults.filled
|
|
3527
3623
|
}
|
|
3528
3624
|
}), console.log(s);
|
|
3529
|
-
}, n = this.dv(
|
|
3625
|
+
}, n = this.dv(P(
|
|
3530
3626
|
e.fillStyleChanged,
|
|
3531
3627
|
e.strokedChanged,
|
|
3532
3628
|
e.filledChanged
|
|
@@ -3534,9 +3630,9 @@ const vt = class vt extends $ {
|
|
|
3534
3630
|
this.d(n.don(r)), this.d(e.createdEvent.don(r));
|
|
3535
3631
|
}
|
|
3536
3632
|
};
|
|
3537
|
-
f(
|
|
3538
|
-
let ei =
|
|
3539
|
-
const wt = class wt extends
|
|
3633
|
+
f(gt, "type", gt.register("ESUeViewer", tt.type, gt));
|
|
3634
|
+
let ei = gt;
|
|
3635
|
+
const wt = class wt extends S {
|
|
3540
3636
|
constructor(e, t) {
|
|
3541
3637
|
if (super(e, t), !t.viewer) {
|
|
3542
3638
|
console.warn("viewer is undefined!");
|
|
@@ -3544,9 +3640,9 @@ const wt = class wt extends E {
|
|
|
3544
3640
|
}
|
|
3545
3641
|
}
|
|
3546
3642
|
};
|
|
3547
|
-
f(wt, "type", wt.register("ESUeViewer",
|
|
3643
|
+
f(wt, "type", wt.register("ESUeViewer", Gr.type, wt));
|
|
3548
3644
|
let ii = wt;
|
|
3549
|
-
const
|
|
3645
|
+
const it = class it extends S {
|
|
3550
3646
|
constructor(e, t) {
|
|
3551
3647
|
if (super(e, t), !t.viewer) {
|
|
3552
3648
|
console.warn("viewer is underfined!");
|
|
@@ -3554,17 +3650,17 @@ const et = class et extends E {
|
|
|
3554
3650
|
}
|
|
3555
3651
|
}
|
|
3556
3652
|
};
|
|
3557
|
-
f(
|
|
3558
|
-
f(
|
|
3559
|
-
...
|
|
3653
|
+
f(it, "type", it.register("ESUeViewer", Kr.type, it)), // null 表示不设置,undefined表示不做任何转换
|
|
3654
|
+
f(it, "propValFuncs", {
|
|
3655
|
+
...S.propValFuncs,
|
|
3560
3656
|
targetID: (e) => {
|
|
3561
3657
|
if (!e) return "";
|
|
3562
|
-
const t =
|
|
3658
|
+
const t = E.getSceneObject(e);
|
|
3563
3659
|
return t ? (t.components.main ?? t).id : e;
|
|
3564
3660
|
}
|
|
3565
3661
|
});
|
|
3566
|
-
let ri =
|
|
3567
|
-
const yt = class yt extends
|
|
3662
|
+
let ri = it;
|
|
3663
|
+
const yt = class yt extends S {
|
|
3568
3664
|
constructor(e, t) {
|
|
3569
3665
|
super(e, t);
|
|
3570
3666
|
const i = t.viewer;
|
|
@@ -3573,10 +3669,10 @@ const yt = class yt extends E {
|
|
|
3573
3669
|
return;
|
|
3574
3670
|
}
|
|
3575
3671
|
this.dispose(e.flyInEvent.don((r, n, s = "default") => {
|
|
3576
|
-
const { id: o, duration: h, position: a, rotation:
|
|
3577
|
-
Re(i, o, a,
|
|
3672
|
+
const { id: o, duration: h, position: a, rotation: g } = e;
|
|
3673
|
+
Re(i, o, a, g, h ?? r, s);
|
|
3578
3674
|
})), this.dispose(e.resetWithCurrentCameraEvent.don(() => {
|
|
3579
|
-
|
|
3675
|
+
Sr(i, e.id);
|
|
3580
3676
|
})), this.dispose(e.captureEvent.don((r, n) => {
|
|
3581
3677
|
t.capture(r, n).then((o) => {
|
|
3582
3678
|
o && (e.thumbnail = o);
|
|
@@ -3584,9 +3680,9 @@ const yt = class yt extends E {
|
|
|
3584
3680
|
}));
|
|
3585
3681
|
}
|
|
3586
3682
|
};
|
|
3587
|
-
f(yt, "type", yt.register("ESUeViewer",
|
|
3683
|
+
f(yt, "type", yt.register("ESUeViewer", Xr.type, yt));
|
|
3588
3684
|
let ni = yt;
|
|
3589
|
-
const mt = class mt extends
|
|
3685
|
+
const mt = class mt extends S {
|
|
3590
3686
|
constructor(e, t) {
|
|
3591
3687
|
if (super(e, t), !t.viewer) {
|
|
3592
3688
|
console.warn("viewer is undefined!");
|
|
@@ -3594,9 +3690,9 @@ const mt = class mt extends E {
|
|
|
3594
3690
|
}
|
|
3595
3691
|
}
|
|
3596
3692
|
};
|
|
3597
|
-
f(mt, "type", mt.register("ESUeViewer",
|
|
3693
|
+
f(mt, "type", mt.register("ESUeViewer", Qr.type, mt));
|
|
3598
3694
|
let si = mt;
|
|
3599
|
-
const Ct = class Ct extends
|
|
3695
|
+
const Ct = class Ct extends S {
|
|
3600
3696
|
constructor(e, t) {
|
|
3601
3697
|
if (super(e, t), !t.viewer) {
|
|
3602
3698
|
console.warn("viewer is undefined!");
|
|
@@ -3604,7 +3700,7 @@ const Ct = class Ct extends E {
|
|
|
3604
3700
|
}
|
|
3605
3701
|
}
|
|
3606
3702
|
};
|
|
3607
|
-
f(Ct, "type", Ct.register("ESUeViewer",
|
|
3703
|
+
f(Ct, "type", Ct.register("ESUeViewer", Yr.type, Ct));
|
|
3608
3704
|
let oi = Ct;
|
|
3609
3705
|
const Ft = class Ft extends B {
|
|
3610
3706
|
constructor(e, t) {
|
|
@@ -3629,7 +3725,7 @@ const Ft = class Ft extends B {
|
|
|
3629
3725
|
fillStyle: s
|
|
3630
3726
|
}
|
|
3631
3727
|
});
|
|
3632
|
-
}, n = this.dv(
|
|
3728
|
+
}, n = this.dv(P(
|
|
3633
3729
|
e.fillStyleChanged,
|
|
3634
3730
|
e.filledChanged
|
|
3635
3731
|
));
|
|
@@ -3638,7 +3734,7 @@ const Ft = class Ft extends B {
|
|
|
3638
3734
|
};
|
|
3639
3735
|
f(Ft, "type", Ft.register("ESUeViewer", ct.type, Ft));
|
|
3640
3736
|
let ai = Ft;
|
|
3641
|
-
const
|
|
3737
|
+
const rt = class rt extends S {
|
|
3642
3738
|
constructor(e, t) {
|
|
3643
3739
|
if (super(e, t), !t.viewer) {
|
|
3644
3740
|
console.warn("viewer is underfined!");
|
|
@@ -3646,17 +3742,17 @@ const it = class it extends E {
|
|
|
3646
3742
|
}
|
|
3647
3743
|
}
|
|
3648
3744
|
};
|
|
3649
|
-
f(
|
|
3650
|
-
f(
|
|
3651
|
-
...
|
|
3745
|
+
f(rt, "type", rt.register("ESUeViewer", Zr.type, rt)), // null 表示不设置,undefined表示不做任何转换
|
|
3746
|
+
f(rt, "propValFuncs", {
|
|
3747
|
+
...S.propValFuncs,
|
|
3652
3748
|
targetID: (e) => {
|
|
3653
3749
|
if (!e) return "";
|
|
3654
|
-
const t =
|
|
3750
|
+
const t = E.getSceneObject(e);
|
|
3655
3751
|
return t ? (t.components.main ?? t).id : e;
|
|
3656
3752
|
}
|
|
3657
3753
|
});
|
|
3658
|
-
let li =
|
|
3659
|
-
const It = class It extends
|
|
3754
|
+
let li = rt;
|
|
3755
|
+
const It = class It extends S {
|
|
3660
3756
|
constructor(e, t) {
|
|
3661
3757
|
super(e, t);
|
|
3662
3758
|
const i = t.viewer;
|
|
@@ -3668,28 +3764,28 @@ const It = class It extends E {
|
|
|
3668
3764
|
{
|
|
3669
3765
|
const o = () => {
|
|
3670
3766
|
if (typeof e.url == "string")
|
|
3671
|
-
r.value =
|
|
3767
|
+
r.value = E.context.getStrFromEnv(e.url ?? H.defaults.url);
|
|
3672
3768
|
else {
|
|
3673
3769
|
const h = e.url;
|
|
3674
|
-
h.url =
|
|
3770
|
+
h.url = E.context.getStrFromEnv(h.url ?? H.defaults.url), r.value = h;
|
|
3675
3771
|
}
|
|
3676
3772
|
};
|
|
3677
3773
|
o(), this.ad(e.urlChanged.don(o));
|
|
3678
3774
|
}
|
|
3679
3775
|
const n = () => {
|
|
3680
|
-
const o = e.colorStops ??
|
|
3776
|
+
const o = e.colorStops ?? H.defaults.colorStops;
|
|
3681
3777
|
i.callUeFunc({
|
|
3682
3778
|
f: "update",
|
|
3683
3779
|
p: {
|
|
3684
3780
|
id: e.id,
|
|
3685
|
-
url: r.value ??
|
|
3686
|
-
currentTime: e.currentTime ??
|
|
3687
|
-
minPropValue: e.minPropValue ??
|
|
3688
|
-
maxPropValue: e.maxPropValue ??
|
|
3781
|
+
url: r.value ?? H.defaults.url,
|
|
3782
|
+
currentTime: e.currentTime ?? H.defaults.currentTime,
|
|
3783
|
+
minPropValue: e.minPropValue ?? H.defaults.minPropValue,
|
|
3784
|
+
maxPropValue: e.maxPropValue ?? H.defaults.maxPropValue,
|
|
3689
3785
|
colorStops: JSON.stringify(o)
|
|
3690
3786
|
}
|
|
3691
3787
|
});
|
|
3692
|
-
}, s = this.dv(
|
|
3788
|
+
}, s = this.dv(P(
|
|
3693
3789
|
r.changed,
|
|
3694
3790
|
e.currentTimeChanged,
|
|
3695
3791
|
e.minPropValueChanged,
|
|
@@ -3699,9 +3795,9 @@ const It = class It extends E {
|
|
|
3699
3795
|
this.d(s.don(n)), this.d(e.createdEvent.don(n));
|
|
3700
3796
|
}
|
|
3701
3797
|
};
|
|
3702
|
-
f(It, "type", It.register("ESUeViewer",
|
|
3798
|
+
f(It, "type", It.register("ESUeViewer", H.type, It));
|
|
3703
3799
|
let di = It;
|
|
3704
|
-
const Et = class Et extends
|
|
3800
|
+
const Et = class Et extends S {
|
|
3705
3801
|
constructor(e, t) {
|
|
3706
3802
|
if (super(e, t), !t.viewer) {
|
|
3707
3803
|
console.warn("viewer is undefined!");
|
|
@@ -3709,7 +3805,7 @@ const Et = class Et extends E {
|
|
|
3709
3805
|
}
|
|
3710
3806
|
}
|
|
3711
3807
|
};
|
|
3712
|
-
f(Et, "type", Et.register("ESUeViewer",
|
|
3808
|
+
f(Et, "type", Et.register("ESUeViewer", qr.type, Et));
|
|
3713
3809
|
let ci = Et;
|
|
3714
3810
|
const St = class St extends B {
|
|
3715
3811
|
constructor(e, t) {
|
|
@@ -3719,7 +3815,7 @@ const St = class St extends B {
|
|
|
3719
3815
|
}
|
|
3720
3816
|
}
|
|
3721
3817
|
};
|
|
3722
|
-
f(St, "type", St.register("ESUeViewer",
|
|
3818
|
+
f(St, "type", St.register("ESUeViewer", Vr.type, St));
|
|
3723
3819
|
let ui = St;
|
|
3724
3820
|
const Tt = class Tt extends B {
|
|
3725
3821
|
constructor(e, t) {
|
|
@@ -3732,9 +3828,9 @@ const Tt = class Tt extends B {
|
|
|
3732
3828
|
const r = () => {
|
|
3733
3829
|
let s;
|
|
3734
3830
|
try {
|
|
3735
|
-
s = { ...e.strokeStyle ??
|
|
3831
|
+
s = { ...e.strokeStyle ?? _e.defaults.strokeStyle };
|
|
3736
3832
|
} catch (o) {
|
|
3737
|
-
console.error("ESDistanceMeasurement strokeStyle 属性类型错误!", o), s = { ...
|
|
3833
|
+
console.error("ESDistanceMeasurement strokeStyle 属性类型错误!", o), s = { ..._e.defaults.strokeStyle };
|
|
3738
3834
|
}
|
|
3739
3835
|
i.callUeFunc({
|
|
3740
3836
|
f: "update",
|
|
@@ -3743,13 +3839,13 @@ const Tt = class Tt extends B {
|
|
|
3743
3839
|
strokeStyle: s
|
|
3744
3840
|
}
|
|
3745
3841
|
});
|
|
3746
|
-
}, n = this.dv(
|
|
3842
|
+
}, n = this.dv(P(
|
|
3747
3843
|
e.strokeStyleChanged
|
|
3748
3844
|
));
|
|
3749
3845
|
this.d(n.don(r)), this.d(e.createdEvent.don(r));
|
|
3750
3846
|
}
|
|
3751
3847
|
};
|
|
3752
|
-
f(Tt, "type", Tt.register("ESUeViewer",
|
|
3848
|
+
f(Tt, "type", Tt.register("ESUeViewer", _e.type, Tt));
|
|
3753
3849
|
let hi = Tt;
|
|
3754
3850
|
const xt = class xt extends Ke {
|
|
3755
3851
|
constructor(e, t) {
|
|
@@ -3759,7 +3855,7 @@ const xt = class xt extends Ke {
|
|
|
3759
3855
|
}
|
|
3760
3856
|
}
|
|
3761
3857
|
};
|
|
3762
|
-
f(xt, "type", xt.register("ESUeViewer",
|
|
3858
|
+
f(xt, "type", xt.register("ESUeViewer", Or.type, xt));
|
|
3763
3859
|
let Ne = xt;
|
|
3764
3860
|
const Rt = class Rt extends Ne {
|
|
3765
3861
|
constructor(e, t) {
|
|
@@ -3769,7 +3865,7 @@ const Rt = class Rt extends Ne {
|
|
|
3769
3865
|
}
|
|
3770
3866
|
}
|
|
3771
3867
|
};
|
|
3772
|
-
f(Rt, "type", Rt.register("ESUeViewer",
|
|
3868
|
+
f(Rt, "type", Rt.register("ESUeViewer", jr.type, Rt));
|
|
3773
3869
|
let pi = Rt;
|
|
3774
3870
|
const Pt = class Pt extends k {
|
|
3775
3871
|
constructor(e, t) {
|
|
@@ -3784,9 +3880,9 @@ const Pt = class Pt extends k {
|
|
|
3784
3880
|
}));
|
|
3785
3881
|
}
|
|
3786
3882
|
};
|
|
3787
|
-
f(Pt, "type", Pt.register("ESUeViewer",
|
|
3883
|
+
f(Pt, "type", Pt.register("ESUeViewer", tn.type, Pt));
|
|
3788
3884
|
let fi = Pt;
|
|
3789
|
-
const
|
|
3885
|
+
const nt = class nt extends _ {
|
|
3790
3886
|
constructor(e, t) {
|
|
3791
3887
|
if (super(e, t), !t.viewer) {
|
|
3792
3888
|
console.warn("viewer is undefined!");
|
|
@@ -3794,16 +3890,16 @@ const rt = class rt extends $ {
|
|
|
3794
3890
|
}
|
|
3795
3891
|
}
|
|
3796
3892
|
};
|
|
3797
|
-
f(
|
|
3798
|
-
|
|
3893
|
+
f(nt, "type", nt.register("ESUeViewer", en.type, nt)), f(nt, "propValFuncs", {
|
|
3894
|
+
..._.propValFuncs,
|
|
3799
3895
|
targetID: (e) => {
|
|
3800
3896
|
if (!e) return "";
|
|
3801
|
-
const t =
|
|
3897
|
+
const t = E.getSceneObject(e);
|
|
3802
3898
|
return t ? (t.components.main ?? t).id : e;
|
|
3803
3899
|
}
|
|
3804
3900
|
});
|
|
3805
|
-
let
|
|
3806
|
-
const Lt = class Lt extends
|
|
3901
|
+
let vi = nt;
|
|
3902
|
+
const Lt = class Lt extends S {
|
|
3807
3903
|
constructor(e, t) {
|
|
3808
3904
|
if (super(e, t), !t.viewer) {
|
|
3809
3905
|
console.warn("viewer is undefined!");
|
|
@@ -3811,8 +3907,8 @@ const Lt = class Lt extends E {
|
|
|
3811
3907
|
}
|
|
3812
3908
|
}
|
|
3813
3909
|
};
|
|
3814
|
-
f(Lt, "type", Lt.register("ESUeViewer",
|
|
3815
|
-
let
|
|
3910
|
+
f(Lt, "type", Lt.register("ESUeViewer", rn.type, Lt));
|
|
3911
|
+
let gi = Lt;
|
|
3816
3912
|
const Dt = class Dt extends k {
|
|
3817
3913
|
constructor(e, t) {
|
|
3818
3914
|
super(e, t);
|
|
@@ -3825,10 +3921,10 @@ const Dt = class Dt extends k {
|
|
|
3825
3921
|
{
|
|
3826
3922
|
const o = () => {
|
|
3827
3923
|
if (typeof e.url == "string")
|
|
3828
|
-
r.value =
|
|
3924
|
+
r.value = E.context.getStrFromEnv(e.url);
|
|
3829
3925
|
else {
|
|
3830
3926
|
const h = e.url;
|
|
3831
|
-
h.url =
|
|
3927
|
+
h.url = E.context.getStrFromEnv(h.url), r.value = h;
|
|
3832
3928
|
}
|
|
3833
3929
|
};
|
|
3834
3930
|
o(), this.ad(e.urlChanged.don(o));
|
|
@@ -3848,7 +3944,7 @@ const Dt = class Dt extends k {
|
|
|
3848
3944
|
heightOffset: e.heightOffset ?? N.defaults.heightOffset
|
|
3849
3945
|
}
|
|
3850
3946
|
});
|
|
3851
|
-
}, s = this.dv(
|
|
3947
|
+
}, s = this.dv(P(
|
|
3852
3948
|
r.changed,
|
|
3853
3949
|
e.treeTypesChanged,
|
|
3854
3950
|
e.xiaoBanWidgetChanged,
|
|
@@ -3863,14 +3959,14 @@ const Dt = class Dt extends k {
|
|
|
3863
3959
|
};
|
|
3864
3960
|
f(Dt, "type", Dt.register("ESUeViewer", N.type, Dt));
|
|
3865
3961
|
let wi = Dt;
|
|
3866
|
-
const kt = class kt extends
|
|
3962
|
+
const kt = class kt extends K {
|
|
3867
3963
|
constructor(e, t) {
|
|
3868
|
-
super(e, t), this.ad(new
|
|
3964
|
+
super(e, t), this.ad(new R(e.renderInUEChanged, () => e.renderInUE ? new Eo(e, t) : new Io(e, t)));
|
|
3869
3965
|
}
|
|
3870
3966
|
};
|
|
3871
3967
|
f(kt, "type", kt.register("ESUeViewer", Ce.type, kt));
|
|
3872
3968
|
let yi = kt;
|
|
3873
|
-
class
|
|
3969
|
+
class Io extends C {
|
|
3874
3970
|
constructor(t, i) {
|
|
3875
3971
|
super();
|
|
3876
3972
|
f(this, "_screenPosition", this.disposeVar(pr(void 0)));
|
|
@@ -3879,40 +3975,40 @@ class Fo extends C {
|
|
|
3879
3975
|
console.warn("viewer is undefined!");
|
|
3880
3976
|
return;
|
|
3881
3977
|
}
|
|
3882
|
-
const n = this.disposeVar(new
|
|
3883
|
-
n.parentID = t.id, this.ad(t.components.disposableAdd(n, !0)), n.show = !1, this.dispose(
|
|
3978
|
+
const n = this.disposeVar(new vr());
|
|
3979
|
+
n.parentID = t.id, this.ad(t.components.disposableAdd(n, !0)), n.show = !1, this.dispose(L([n, "position"], [t, "position"])), this.dispose(L([n, "rotation"], [t, "rotation"])), this.dispose(L([n, "flyToParam"], [t, "flyToParam"])), this.dispose(L([n, "flyInParam"], [t, "flyInParam"])), this.dispose(t.calcFlyToParamEvent.disposableOn(() => {
|
|
3884
3980
|
dt(r, n.id);
|
|
3885
3981
|
})), this.dispose(t.calcFlyInParamEvent.disposableOn(async () => {
|
|
3886
3982
|
if (!i.actived) return;
|
|
3887
3983
|
const h = await i.getCurrentCameraInfo();
|
|
3888
3984
|
if (!h) return;
|
|
3889
|
-
const { position: a, rotation:
|
|
3890
|
-
t.flyInParam = { position: a, rotation:
|
|
3985
|
+
const { position: a, rotation: g } = h;
|
|
3986
|
+
t.flyInParam = { position: a, rotation: g, flyDuration: 1 };
|
|
3891
3987
|
})), this.dispose(t.smoothMoveEvent.disposableOn((h, a) => {
|
|
3892
3988
|
ke(r, n.id, h, a);
|
|
3893
|
-
})), this.dispose(t.smoothMoveWithRotationEvent.disposableOn((h, a,
|
|
3894
|
-
Pe(r, n.id, h, a,
|
|
3895
|
-
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((h, a,
|
|
3896
|
-
Le(r, n.id, h, a, p,
|
|
3897
|
-
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((h, a,
|
|
3898
|
-
De(r, n.id, h, a,
|
|
3989
|
+
})), this.dispose(t.smoothMoveWithRotationEvent.disposableOn((h, a, g) => {
|
|
3990
|
+
Pe(r, n.id, h, a, g);
|
|
3991
|
+
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((h, a, g, p) => {
|
|
3992
|
+
Le(r, n.id, h, a, p, g);
|
|
3993
|
+
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((h, a, g, p, l) => {
|
|
3994
|
+
De(r, n.id, h, a, g, p, l);
|
|
3899
3995
|
})), this.dispose(t.flyToEvent.disposableOn((h, a) => {
|
|
3900
3996
|
n.flyTo(h);
|
|
3901
3997
|
})), this.dispose(t.flyInEvent.don((h) => {
|
|
3902
3998
|
n.flyIn(h);
|
|
3903
3999
|
}));
|
|
3904
4000
|
const s = this._screenPosition, o = this.disposeVar(new Je());
|
|
3905
|
-
o.parentID = t.id, i.add(o), this.dispose(() => i.delete(o)), this.dispose(
|
|
4001
|
+
o.parentID = t.id, i.add(o), this.dispose(() => i.delete(o)), this.dispose(L([o, "allowPicking"], [t, "allowPicking"]));
|
|
3906
4002
|
{
|
|
3907
4003
|
const h = this.disposeVar(be()), a = () => {
|
|
3908
4004
|
t.show ? h.restart(void 0, async () => {
|
|
3909
4005
|
if (!t.position) return;
|
|
3910
|
-
const
|
|
4006
|
+
const g = await i.lonLatAltToScreenPosition(t.position);
|
|
3911
4007
|
if (!this.isDestroyed())
|
|
3912
|
-
if (!
|
|
4008
|
+
if (!g)
|
|
3913
4009
|
this._screenPosition.value = void 0;
|
|
3914
4010
|
else {
|
|
3915
|
-
const [p, l] =
|
|
4011
|
+
const [p, l] = g;
|
|
3916
4012
|
p === -1 && l === -1 ? this._screenPosition.value = void 0 : this._screenPosition.value = [p, l];
|
|
3917
4013
|
}
|
|
3918
4014
|
}) : h.cancel();
|
|
@@ -3921,11 +4017,11 @@ class Fo extends C {
|
|
|
3921
4017
|
}
|
|
3922
4018
|
{
|
|
3923
4019
|
const h = () => class extends C {
|
|
3924
|
-
constructor(l,
|
|
3925
|
-
if (super(), this._subContainer = l, !
|
|
4020
|
+
constructor(l, c, u) {
|
|
4021
|
+
if (super(), this._subContainer = l, !u) return;
|
|
3926
4022
|
if (!t.instanceClass)
|
|
3927
4023
|
throw new Error("!sceneObject.instanceClass");
|
|
3928
|
-
const
|
|
4024
|
+
const v = new nn(), w = v.element;
|
|
3929
4025
|
this._subContainer.appendChild(w), this.dispose(() => this._subContainer.removeChild(w)), w.onclick = (y) => {
|
|
3930
4026
|
(t.allowPicking ?? !1) && t.pickedEvent.emit(new Ae(
|
|
3931
4027
|
{ div: w, pointerEvent: y },
|
|
@@ -3946,36 +4042,36 @@ class Fo extends C {
|
|
|
3946
4042
|
const y = () => {
|
|
3947
4043
|
let m = t.show;
|
|
3948
4044
|
if (!m)
|
|
3949
|
-
|
|
4045
|
+
v.show = m, v.winPos = [0, 0];
|
|
3950
4046
|
else if (s.value) {
|
|
3951
|
-
const
|
|
3952
|
-
t.minVisibleDistance < t.maxVisibleDistance ? m = t.minVisibleDistance <
|
|
4047
|
+
const D = i.getCurrentCameraInfo(), F = sn([t.position, D.position], "NONE")[0];
|
|
4048
|
+
t.minVisibleDistance < t.maxVisibleDistance ? m = t.minVisibleDistance < F && F < t.maxVisibleDistance : t.maxVisibleDistance == 0 && (m = F > t.minVisibleDistance), v.show = m, v.winPos = [...s.value];
|
|
3953
4049
|
}
|
|
3954
4050
|
};
|
|
3955
4051
|
y();
|
|
3956
|
-
const
|
|
4052
|
+
const T = this.disposeVar(P(
|
|
3957
4053
|
t.showChanged,
|
|
3958
4054
|
s.changed,
|
|
3959
4055
|
i.cameraChanged,
|
|
3960
4056
|
t.maxVisibleDistanceChanged,
|
|
3961
4057
|
t.minVisibleDistanceChanged
|
|
3962
4058
|
));
|
|
3963
|
-
this.dispose(
|
|
4059
|
+
this.dispose(T.disposableOn(y));
|
|
3964
4060
|
}
|
|
3965
4061
|
{
|
|
3966
4062
|
const y = () => {
|
|
3967
|
-
const [
|
|
3968
|
-
|
|
4063
|
+
const [T, m] = t.anchor ?? Ce.defaults.anchor;
|
|
4064
|
+
v.originRatioX = T, v.originRatioY = m;
|
|
3969
4065
|
};
|
|
3970
4066
|
y(), this.dispose(t.anchorChanged.disposableOn(y));
|
|
3971
4067
|
}
|
|
3972
4068
|
{
|
|
3973
4069
|
const y = () => {
|
|
3974
|
-
|
|
4070
|
+
v.opacity = t.opacity ?? Ce.defaults.opacity;
|
|
3975
4071
|
};
|
|
3976
4072
|
y(), this.dispose(t.opacityChanged.disposableOn(y));
|
|
3977
4073
|
}
|
|
3978
|
-
this.disposeVar(new t.instanceClass(
|
|
4074
|
+
this.disposeVar(new t.instanceClass(v.contentDiv, t, u));
|
|
3979
4075
|
}
|
|
3980
4076
|
}, a = () => {
|
|
3981
4077
|
try {
|
|
@@ -3985,7 +4081,7 @@ class Fo extends C {
|
|
|
3985
4081
|
}
|
|
3986
4082
|
};
|
|
3987
4083
|
a();
|
|
3988
|
-
const
|
|
4084
|
+
const g = this.dv(P(
|
|
3989
4085
|
t.instanceClassChanged,
|
|
3990
4086
|
t.opacityChanged,
|
|
3991
4087
|
t.anchorChanged,
|
|
@@ -3993,7 +4089,7 @@ class Fo extends C {
|
|
|
3993
4089
|
t.showChanged,
|
|
3994
4090
|
t.allowPickingChanged
|
|
3995
4091
|
));
|
|
3996
|
-
this.d(
|
|
4092
|
+
this.d(g.don(a));
|
|
3997
4093
|
}
|
|
3998
4094
|
}
|
|
3999
4095
|
get screenPosition() {
|
|
@@ -4006,12 +4102,12 @@ class Fo extends C {
|
|
|
4006
4102
|
this._screenPosition.value = t;
|
|
4007
4103
|
}
|
|
4008
4104
|
}
|
|
4009
|
-
class
|
|
4105
|
+
class Eo extends C {
|
|
4010
4106
|
constructor(t, i) {
|
|
4011
4107
|
super();
|
|
4012
4108
|
f(this, "_imageLabel");
|
|
4013
4109
|
f(this, "_hasClassDivAndPos", {});
|
|
4014
|
-
this._imageLabel = this.dv(new
|
|
4110
|
+
this._imageLabel = this.dv(new gr()), this._imageLabel.isHoverZoom = !1, this._imageLabel.parentID = t.id;
|
|
4015
4111
|
const r = i.viewer;
|
|
4016
4112
|
if (!r) {
|
|
4017
4113
|
console.warn("viewer is undefined!");
|
|
@@ -4024,32 +4120,32 @@ class Io extends C {
|
|
|
4024
4120
|
if (!r) return;
|
|
4025
4121
|
if (!t.instanceClass)
|
|
4026
4122
|
throw new Error("!sceneObject.instanceClass");
|
|
4027
|
-
const a = document.createElement("div"),
|
|
4028
|
-
if (
|
|
4029
|
-
document.body.appendChild(
|
|
4030
|
-
let l =
|
|
4031
|
-
for (let
|
|
4032
|
-
const
|
|
4033
|
-
var p =
|
|
4034
|
-
this._hasClassDivAndPos[
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4123
|
+
const a = document.createElement("div"), g = this.dv(new t.instanceClass(a, t, i))._container;
|
|
4124
|
+
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)) {
|
|
4125
|
+
document.body.appendChild(g);
|
|
4126
|
+
let l = g ? g.querySelectorAll("*[class]") : [];
|
|
4127
|
+
for (let c = 0; c < l.length; c++) {
|
|
4128
|
+
const u = l[c];
|
|
4129
|
+
var p = u.getBoundingClientRect();
|
|
4130
|
+
this._hasClassDivAndPos[u.className] = [
|
|
4131
|
+
u.offsetLeft,
|
|
4132
|
+
u.offsetTop,
|
|
4133
|
+
u.offsetLeft + p.width,
|
|
4134
|
+
u.offsetTop + p.height
|
|
4039
4135
|
];
|
|
4040
4136
|
}
|
|
4041
4137
|
}
|
|
4042
|
-
|
|
4138
|
+
On(g, {
|
|
4043
4139
|
backgroundColor: null,
|
|
4044
4140
|
allowTaint: !0,
|
|
4045
4141
|
useCORS: !0,
|
|
4046
|
-
width:
|
|
4047
|
-
height:
|
|
4142
|
+
width: g.offsetWidth,
|
|
4143
|
+
height: g.offsetHeight,
|
|
4048
4144
|
scale: 1
|
|
4049
4145
|
}).then((l) => {
|
|
4050
|
-
document.body.contains(
|
|
4146
|
+
document.body.contains(g) && document.body.removeChild(g), n.url = l.toDataURL(), n.show = t.show;
|
|
4051
4147
|
}).catch(() => {
|
|
4052
|
-
document.body.contains(
|
|
4148
|
+
document.body.contains(g) && document.body.removeChild(g);
|
|
4053
4149
|
});
|
|
4054
4150
|
}, o = () => {
|
|
4055
4151
|
try {
|
|
@@ -4059,7 +4155,7 @@ class Io extends C {
|
|
|
4059
4155
|
}
|
|
4060
4156
|
};
|
|
4061
4157
|
o();
|
|
4062
|
-
const h = this.dv(
|
|
4158
|
+
const h = this.dv(P(
|
|
4063
4159
|
t.instanceClassChanged,
|
|
4064
4160
|
t.opacityChanged
|
|
4065
4161
|
));
|
|
@@ -4071,17 +4167,17 @@ class Io extends C {
|
|
|
4071
4167
|
};
|
|
4072
4168
|
n.show = !1, this.ad(t.showChanged.don(s));
|
|
4073
4169
|
}
|
|
4074
|
-
this.d(
|
|
4170
|
+
this.d(I([n, "anchor"], [t, "anchor"])), this.d(L([n, "position"], [t, "position"])), this.d(L([n, "rotation"], [t, "rotation"])), this.d(L([n, "flyToParam"], [t, "flyToParam"])), this.d(L([n, "flyInParam"], [t, "flyInParam"])), this.d(L([n, "allowPicking"], [t, "allowPicking"])), this.d(L([n, "scale"], [t, "scale"])), this.d(I([n, "minVisibleDistance"], [t, "minVisibleDistance"])), this.d(I([n, "maxVisibleDistance"], [t, "maxVisibleDistance"])), this.ad(t.automaticLandingEvent.don(() => {
|
|
4075
4171
|
n.automaticLanding();
|
|
4076
4172
|
})), this.d(i.widgetEvent.don((s) => {
|
|
4077
4173
|
if (s.objId !== this._imageLabel.id) return;
|
|
4078
4174
|
const { type: o, add: h } = s;
|
|
4079
4175
|
if (o === "leftClick" && h) {
|
|
4080
|
-
const a = (h == null ? void 0 : h.classNames) ?? [],
|
|
4081
|
-
for (let p = 0; p <
|
|
4082
|
-
const l =
|
|
4083
|
-
let
|
|
4084
|
-
h && h.mouseRelativePos && h.mouseRelativePos[0] >=
|
|
4176
|
+
const a = (h == null ? void 0 : h.classNames) ?? [], g = Object.keys(this._hasClassDivAndPos);
|
|
4177
|
+
for (let p = 0; p < g.length; p++) {
|
|
4178
|
+
const l = g[p];
|
|
4179
|
+
let c = this._hasClassDivAndPos[l];
|
|
4180
|
+
h && h.mouseRelativePos && h.mouseRelativePos[0] >= c[0] && h.mouseRelativePos[0] <= c[2] && h.mouseRelativePos[1] >= c[1] && h.mouseRelativePos[1] <= c[3] && a.push(l);
|
|
4085
4181
|
}
|
|
4086
4182
|
h.classNames = a;
|
|
4087
4183
|
}
|
|
@@ -4099,8 +4195,8 @@ class Io extends C {
|
|
|
4099
4195
|
Pe(r, n.id, s, o, h);
|
|
4100
4196
|
})), this.d(t.smoothMoveOnGroundEvent.don((s, o, h, a) => {
|
|
4101
4197
|
Le(r, n.id, s, o, a, h);
|
|
4102
|
-
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, h, a,
|
|
4103
|
-
De(r, n.id, s, o, h, a,
|
|
4198
|
+
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, h, a, g) => {
|
|
4199
|
+
De(r, n.id, s, o, h, a, g);
|
|
4104
4200
|
})), this.d(t.flyToEvent.don((s, o) => {
|
|
4105
4201
|
n.flyTo(s);
|
|
4106
4202
|
})), this.d(t.flyInEvent.don((s) => {
|
|
@@ -4138,12 +4234,12 @@ const Y = class Y extends k {
|
|
|
4138
4234
|
}));
|
|
4139
4235
|
}
|
|
4140
4236
|
};
|
|
4141
|
-
f(Y, "type", Y.register("ESUeViewer",
|
|
4237
|
+
f(Y, "type", Y.register("ESUeViewer", on.type, Y)), f(Y, "forceUeUpdateProps", [
|
|
4142
4238
|
...k.forceUeUpdateProps,
|
|
4143
4239
|
"url"
|
|
4144
4240
|
]), f(Y, "propValFuncs", {
|
|
4145
4241
|
...k.propValFuncs,
|
|
4146
|
-
url: (e) => typeof e == "string" ?
|
|
4242
|
+
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(e) : e
|
|
4147
4243
|
});
|
|
4148
4244
|
let mi = Y;
|
|
4149
4245
|
const Bt = class Bt extends B {
|
|
@@ -4154,9 +4250,9 @@ const Bt = class Bt extends B {
|
|
|
4154
4250
|
}
|
|
4155
4251
|
}
|
|
4156
4252
|
};
|
|
4157
|
-
f(Bt, "type", Bt.register("ESUeViewer",
|
|
4253
|
+
f(Bt, "type", Bt.register("ESUeViewer", an.type, Bt));
|
|
4158
4254
|
let ze = Bt;
|
|
4159
|
-
const
|
|
4255
|
+
const Mt = class Mt extends B {
|
|
4160
4256
|
constructor(e, t) {
|
|
4161
4257
|
if (super(e, t), !t.viewer) {
|
|
4162
4258
|
console.warn("viewer is undefined!");
|
|
@@ -4164,9 +4260,9 @@ const _t = class _t extends B {
|
|
|
4164
4260
|
}
|
|
4165
4261
|
}
|
|
4166
4262
|
};
|
|
4167
|
-
f(
|
|
4168
|
-
let Ci =
|
|
4169
|
-
const
|
|
4263
|
+
f(Mt, "type", Mt.register("ESUeViewer", ln.type, Mt));
|
|
4264
|
+
let Ci = Mt;
|
|
4265
|
+
const _t = class _t extends _ {
|
|
4170
4266
|
constructor(e, t) {
|
|
4171
4267
|
if (super(e, t), !t.viewer) {
|
|
4172
4268
|
console.warn("viewer is undefined!");
|
|
@@ -4174,9 +4270,9 @@ const Mt = class Mt extends $ {
|
|
|
4174
4270
|
}
|
|
4175
4271
|
}
|
|
4176
4272
|
};
|
|
4177
|
-
f(
|
|
4178
|
-
let Fi =
|
|
4179
|
-
const Z = class Z extends
|
|
4273
|
+
f(_t, "type", _t.register("ESUeViewer", dn.type, _t));
|
|
4274
|
+
let Fi = _t;
|
|
4275
|
+
const Z = class Z extends S {
|
|
4180
4276
|
constructor(e, t) {
|
|
4181
4277
|
super(e, t);
|
|
4182
4278
|
const i = t.viewer;
|
|
@@ -4185,25 +4281,25 @@ const Z = class Z extends E {
|
|
|
4185
4281
|
return;
|
|
4186
4282
|
}
|
|
4187
4283
|
this.d(e.setNodePositionEvent.don((r, n) => {
|
|
4188
|
-
ds(i, e.id, r, n);
|
|
4189
|
-
})), this.d(e.setNodeRotationEvent.don((r, n) => {
|
|
4190
4284
|
cs(i, e.id, r, n);
|
|
4191
|
-
})), this.d(e.
|
|
4285
|
+
})), this.d(e.setNodeRotationEvent.don((r, n) => {
|
|
4192
4286
|
us(i, e.id, r, n);
|
|
4287
|
+
})), this.d(e.setNodeScaleEvent.don((r, n) => {
|
|
4288
|
+
hs(i, e.id, r, n);
|
|
4193
4289
|
}));
|
|
4194
4290
|
}
|
|
4195
4291
|
};
|
|
4196
4292
|
f(Z, "forceUeUpdateProps", [
|
|
4197
|
-
...
|
|
4293
|
+
...S.forceUeUpdateProps,
|
|
4198
4294
|
"url"
|
|
4199
4295
|
]), f(Z, "propValFuncs", {
|
|
4200
|
-
...
|
|
4201
|
-
url: (e) => typeof e == "string" ?
|
|
4296
|
+
...S.propValFuncs,
|
|
4297
|
+
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(Fe(e)) : (e.url = E.context.getStrFromEnv(Fe(e.url)), e),
|
|
4202
4298
|
czmMaximumScale: null,
|
|
4203
4299
|
czmMinimumPixelSize: null,
|
|
4204
4300
|
czmNativeScale: null,
|
|
4205
4301
|
czmColor: null
|
|
4206
|
-
}), f(Z, "type", Z.register("ESUeViewer",
|
|
4302
|
+
}), f(Z, "type", Z.register("ESUeViewer", cn.type, Z));
|
|
4207
4303
|
let Ii = Z;
|
|
4208
4304
|
const $t = class $t extends B {
|
|
4209
4305
|
constructor(e, t) {
|
|
@@ -4213,21 +4309,21 @@ const $t = class $t extends B {
|
|
|
4213
4309
|
}
|
|
4214
4310
|
}
|
|
4215
4311
|
};
|
|
4216
|
-
f($t, "type", $t.register("ESUeViewer",
|
|
4312
|
+
f($t, "type", $t.register("ESUeViewer", un.type, $t));
|
|
4217
4313
|
let Ei = $t;
|
|
4218
|
-
const Wt = class Wt extends
|
|
4314
|
+
const Wt = class Wt extends S {
|
|
4219
4315
|
constructor(e, t) {
|
|
4220
4316
|
if (super(e, t), !t.viewer) {
|
|
4221
4317
|
console.warn("viewer is undefined!");
|
|
4222
4318
|
return;
|
|
4223
4319
|
}
|
|
4224
4320
|
const r = async (s, o, h, a) => {
|
|
4225
|
-
const { viewer:
|
|
4226
|
-
if (!
|
|
4321
|
+
const { viewer: g } = s;
|
|
4322
|
+
if (!g) {
|
|
4227
4323
|
console.error("AIMoveTo: ueViewer.viewer is undefined");
|
|
4228
4324
|
return;
|
|
4229
4325
|
}
|
|
4230
|
-
const p = await
|
|
4326
|
+
const p = await g.callUeFunc({
|
|
4231
4327
|
f: "AIMoveTo",
|
|
4232
4328
|
p: { id: o, Destination: h, Time: a }
|
|
4233
4329
|
});
|
|
@@ -4253,7 +4349,7 @@ const Wt = class Wt extends E {
|
|
|
4253
4349
|
}));
|
|
4254
4350
|
}
|
|
4255
4351
|
};
|
|
4256
|
-
f(Wt, "type", Wt.register("ESUeViewer",
|
|
4352
|
+
f(Wt, "type", Wt.register("ESUeViewer", hn.type, Wt));
|
|
4257
4353
|
let Si = Wt;
|
|
4258
4354
|
const q = class q extends z {
|
|
4259
4355
|
constructor(e, t) {
|
|
@@ -4264,15 +4360,15 @@ const q = class q extends z {
|
|
|
4264
4360
|
e.anchor = [0.5, 1];
|
|
4265
4361
|
}
|
|
4266
4362
|
};
|
|
4267
|
-
f(q, "type", q.register("ESUeViewer",
|
|
4363
|
+
f(q, "type", q.register("ESUeViewer", gr.type, q)), f(q, "forceUeUpdateProps", [
|
|
4268
4364
|
...z.forceUeUpdateProps,
|
|
4269
4365
|
"url"
|
|
4270
4366
|
]), f(q, "propValFuncs", {
|
|
4271
4367
|
...z.propValFuncs,
|
|
4272
|
-
url: (e) => typeof e == "string" ?
|
|
4368
|
+
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(Fe(e)) : (e.url = E.context.getStrFromEnv(Fe(e.url)), e)
|
|
4273
4369
|
});
|
|
4274
4370
|
let Ti = q;
|
|
4275
|
-
const At = class At extends
|
|
4371
|
+
const At = class At extends S {
|
|
4276
4372
|
constructor(e, t) {
|
|
4277
4373
|
if (super(e, t), !t.viewer) {
|
|
4278
4374
|
console.warn("viewer is undefined!");
|
|
@@ -4280,7 +4376,7 @@ const At = class At extends E {
|
|
|
4280
4376
|
}
|
|
4281
4377
|
}
|
|
4282
4378
|
};
|
|
4283
|
-
f(At, "type", At.register("ESUeViewer",
|
|
4379
|
+
f(At, "type", At.register("ESUeViewer", pn.type, At));
|
|
4284
4380
|
let xi = At;
|
|
4285
4381
|
const Ut = class Ut extends Ke {
|
|
4286
4382
|
constructor(e, t) {
|
|
@@ -4290,7 +4386,7 @@ const Ut = class Ut extends Ke {
|
|
|
4290
4386
|
}
|
|
4291
4387
|
}
|
|
4292
4388
|
};
|
|
4293
|
-
f(Ut, "type", Ut.register("ESUeViewer",
|
|
4389
|
+
f(Ut, "type", Ut.register("ESUeViewer", fn.type, Ut));
|
|
4294
4390
|
let Ri = Ut;
|
|
4295
4391
|
const Nt = class Nt extends k {
|
|
4296
4392
|
constructor(e, t) {
|
|
@@ -4300,7 +4396,7 @@ const Nt = class Nt extends k {
|
|
|
4300
4396
|
}
|
|
4301
4397
|
}
|
|
4302
4398
|
};
|
|
4303
|
-
f(Nt, "type", Nt.register("ESUeViewer",
|
|
4399
|
+
f(Nt, "type", Nt.register("ESUeViewer", vn.type, Nt));
|
|
4304
4400
|
let Pi = Nt;
|
|
4305
4401
|
const zt = class zt extends Ke {
|
|
4306
4402
|
constructor(e, t) {
|
|
@@ -4310,9 +4406,9 @@ const zt = class zt extends Ke {
|
|
|
4310
4406
|
}
|
|
4311
4407
|
}
|
|
4312
4408
|
};
|
|
4313
|
-
f(zt, "type", zt.register("ESUeViewer",
|
|
4409
|
+
f(zt, "type", zt.register("ESUeViewer", gn.type, zt));
|
|
4314
4410
|
let Li = zt;
|
|
4315
|
-
const bt = class bt extends
|
|
4411
|
+
const bt = class bt extends S {
|
|
4316
4412
|
constructor(e, t) {
|
|
4317
4413
|
if (super(e, t), !t.viewer) {
|
|
4318
4414
|
console.warn("viewer is undefined!");
|
|
@@ -4320,9 +4416,9 @@ const bt = class bt extends E {
|
|
|
4320
4416
|
}
|
|
4321
4417
|
}
|
|
4322
4418
|
};
|
|
4323
|
-
f(bt, "type", bt.register("ESUeViewer",
|
|
4419
|
+
f(bt, "type", bt.register("ESUeViewer", wn.type, bt));
|
|
4324
4420
|
let Di = bt;
|
|
4325
|
-
const Ht = class Ht extends
|
|
4421
|
+
const Ht = class Ht extends S {
|
|
4326
4422
|
constructor(e, t) {
|
|
4327
4423
|
if (super(e, t), !t.viewer) {
|
|
4328
4424
|
console.warn("viewer is undefined!");
|
|
@@ -4330,7 +4426,7 @@ const Ht = class Ht extends E {
|
|
|
4330
4426
|
}
|
|
4331
4427
|
}
|
|
4332
4428
|
};
|
|
4333
|
-
f(Ht, "type", Ht.register("ESUeViewer",
|
|
4429
|
+
f(Ht, "type", Ht.register("ESUeViewer", yn.type, Ht));
|
|
4334
4430
|
let ki = Ht;
|
|
4335
4431
|
const Jt = class Jt extends B {
|
|
4336
4432
|
constructor(e, t) {
|
|
@@ -4340,7 +4436,7 @@ const Jt = class Jt extends B {
|
|
|
4340
4436
|
}
|
|
4341
4437
|
}
|
|
4342
4438
|
};
|
|
4343
|
-
f(Jt, "type", Jt.register("ESUeViewer",
|
|
4439
|
+
f(Jt, "type", Jt.register("ESUeViewer", mn.type, Jt));
|
|
4344
4440
|
let Bi = Jt;
|
|
4345
4441
|
const Gt = class Gt extends ze {
|
|
4346
4442
|
constructor(e, t) {
|
|
@@ -4350,8 +4446,8 @@ const Gt = class Gt extends ze {
|
|
|
4350
4446
|
}
|
|
4351
4447
|
}
|
|
4352
4448
|
};
|
|
4353
|
-
f(Gt, "type", Gt.register("ESUeViewer",
|
|
4354
|
-
let
|
|
4449
|
+
f(Gt, "type", Gt.register("ESUeViewer", Cn.type, Gt));
|
|
4450
|
+
let Mi = Gt;
|
|
4355
4451
|
const Kt = class Kt extends Ue {
|
|
4356
4452
|
constructor(e, t) {
|
|
4357
4453
|
super(e, t);
|
|
@@ -4362,22 +4458,22 @@ const Kt = class Kt extends Ue {
|
|
|
4362
4458
|
}
|
|
4363
4459
|
this.d(e.highlightFeatureEvent.don((r) => {
|
|
4364
4460
|
const n = typeof r == "number" ? r.toString() : r;
|
|
4365
|
-
|
|
4461
|
+
os(i, e.id, n);
|
|
4366
4462
|
})), this.d(e.highlightFeatureAndFlyToEvent.don((r, n, s, o) => {
|
|
4367
4463
|
const h = typeof r == "number" ? r.toString() : r;
|
|
4368
|
-
|
|
4464
|
+
as(i, e.id, h, o ?? 1);
|
|
4369
4465
|
})), this.d(e.setLayerVisibleEvent.don((r, n) => {
|
|
4370
4466
|
let s = "";
|
|
4371
|
-
typeof n != "string" ? s = JSON.stringify(n) : s = n,
|
|
4467
|
+
typeof n != "string" ? s = JSON.stringify(n) : s = n, ls(i, e.id, s);
|
|
4372
4468
|
})), this.d(e.setLayerColorEvent.don((r, n) => {
|
|
4373
4469
|
let s = "";
|
|
4374
|
-
typeof n != "string" ? s = JSON.stringify(n) : s = n,
|
|
4470
|
+
typeof n != "string" ? s = JSON.stringify(n) : s = n, ds(i, e.id, s);
|
|
4375
4471
|
}));
|
|
4376
4472
|
}
|
|
4377
4473
|
};
|
|
4378
|
-
f(Kt, "type", Kt.register("ESUeViewer",
|
|
4379
|
-
let
|
|
4380
|
-
const Xt = class Xt extends
|
|
4474
|
+
f(Kt, "type", Kt.register("ESUeViewer", Fn.type, Kt));
|
|
4475
|
+
let _i = Kt;
|
|
4476
|
+
const Xt = class Xt extends _ {
|
|
4381
4477
|
constructor(e, t) {
|
|
4382
4478
|
if (super(e, t), !t.viewer) {
|
|
4383
4479
|
console.warn("viewer is undefined!");
|
|
@@ -4385,9 +4481,9 @@ const Xt = class Xt extends $ {
|
|
|
4385
4481
|
}
|
|
4386
4482
|
}
|
|
4387
4483
|
};
|
|
4388
|
-
f(Xt, "type", Xt.register("ESUeViewer",
|
|
4484
|
+
f(Xt, "type", Xt.register("ESUeViewer", In.type, Xt));
|
|
4389
4485
|
let $i = Xt;
|
|
4390
|
-
const
|
|
4486
|
+
const Qt = class Qt extends z {
|
|
4391
4487
|
constructor(e, t) {
|
|
4392
4488
|
super(e, t);
|
|
4393
4489
|
const i = t.viewer;
|
|
@@ -4408,9 +4504,9 @@ const Yt = class Yt extends z {
|
|
|
4408
4504
|
}));
|
|
4409
4505
|
}
|
|
4410
4506
|
};
|
|
4411
|
-
f(
|
|
4412
|
-
let Wi =
|
|
4413
|
-
const
|
|
4507
|
+
f(Qt, "type", Qt.register("ESUeViewer", En.type, Qt));
|
|
4508
|
+
let Wi = Qt;
|
|
4509
|
+
const Yt = class Yt extends S {
|
|
4414
4510
|
constructor(e, t) {
|
|
4415
4511
|
if (super(e, t), !t.viewer) {
|
|
4416
4512
|
console.warn("viewer is undefined!");
|
|
@@ -4418,9 +4514,9 @@ const Zt = class Zt extends E {
|
|
|
4418
4514
|
}
|
|
4419
4515
|
}
|
|
4420
4516
|
};
|
|
4421
|
-
f(
|
|
4422
|
-
let Ai =
|
|
4423
|
-
const
|
|
4517
|
+
f(Yt, "type", Yt.register("ESUeViewer", Sn.type, Yt));
|
|
4518
|
+
let Ai = Yt;
|
|
4519
|
+
const V = class V extends k {
|
|
4424
4520
|
constructor(e, t) {
|
|
4425
4521
|
if (super(e, t), !t.viewer) {
|
|
4426
4522
|
console.warn("viewer is undefined!");
|
|
@@ -4428,15 +4524,15 @@ const Q = class Q extends k {
|
|
|
4428
4524
|
}
|
|
4429
4525
|
}
|
|
4430
4526
|
};
|
|
4431
|
-
f(
|
|
4527
|
+
f(V, "type", V.register("ESUeViewer", Tn.type, V)), f(V, "forceUeUpdateProps", [
|
|
4432
4528
|
...k.forceUeUpdateProps,
|
|
4433
4529
|
"url"
|
|
4434
|
-
]), f(
|
|
4530
|
+
]), f(V, "propValFuncs", {
|
|
4435
4531
|
...k.propValFuncs,
|
|
4436
|
-
url: (e) => typeof e == "string" ?
|
|
4532
|
+
url: (e) => typeof e == "string" ? E.context.getStrFromEnv(e) : (e.url = E.context.getStrFromEnv(e.url), e)
|
|
4437
4533
|
});
|
|
4438
|
-
let Ui =
|
|
4439
|
-
const
|
|
4534
|
+
let Ui = V;
|
|
4535
|
+
const Zt = class Zt extends B {
|
|
4440
4536
|
constructor(e, t) {
|
|
4441
4537
|
if (super(e, t), !t.viewer) {
|
|
4442
4538
|
console.warn("viewer is undefined!");
|
|
@@ -4444,9 +4540,9 @@ const qt = class qt extends B {
|
|
|
4444
4540
|
}
|
|
4445
4541
|
}
|
|
4446
4542
|
};
|
|
4447
|
-
f(
|
|
4448
|
-
let Ni =
|
|
4449
|
-
const
|
|
4543
|
+
f(Zt, "type", Zt.register("ESUeViewer", xn.type, Zt));
|
|
4544
|
+
let Ni = Zt;
|
|
4545
|
+
const st = class st extends _ {
|
|
4450
4546
|
constructor(e, t) {
|
|
4451
4547
|
if (super(e, t), !t.viewer) {
|
|
4452
4548
|
console.warn("viewer is undefined!");
|
|
@@ -4454,17 +4550,17 @@ const nt = class nt extends $ {
|
|
|
4454
4550
|
}
|
|
4455
4551
|
}
|
|
4456
4552
|
};
|
|
4457
|
-
f(
|
|
4458
|
-
f(
|
|
4459
|
-
|
|
4553
|
+
f(st, "type", st.register("ESUeViewer", Rn.type, st)), // null 表示不设置,undefined表示不做任何转换
|
|
4554
|
+
f(st, "propValFuncs", {
|
|
4555
|
+
..._.propValFuncs,
|
|
4460
4556
|
targetID: (e) => {
|
|
4461
4557
|
if (!e) return "";
|
|
4462
|
-
const t =
|
|
4558
|
+
const t = E.getSceneObject(e);
|
|
4463
4559
|
return t ? (t.components.main ?? t).id : e;
|
|
4464
4560
|
}
|
|
4465
4561
|
});
|
|
4466
|
-
let zi =
|
|
4467
|
-
const
|
|
4562
|
+
let zi = st;
|
|
4563
|
+
const qt = class qt extends _ {
|
|
4468
4564
|
constructor(e, t) {
|
|
4469
4565
|
if (super(e, t), !t.viewer) {
|
|
4470
4566
|
console.warn("viewer is undefined!");
|
|
@@ -4472,8 +4568,8 @@ const Qt = class Qt extends $ {
|
|
|
4472
4568
|
}
|
|
4473
4569
|
}
|
|
4474
4570
|
};
|
|
4475
|
-
f(
|
|
4476
|
-
let bi =
|
|
4571
|
+
f(qt, "type", qt.register("ESUeViewer", Pn.type, qt));
|
|
4572
|
+
let bi = qt;
|
|
4477
4573
|
const Vt = class Vt extends lt {
|
|
4478
4574
|
constructor(e, t) {
|
|
4479
4575
|
if (super(e, t), !t.viewer) {
|
|
@@ -4493,23 +4589,23 @@ const Vt = class Vt extends lt {
|
|
|
4493
4589
|
let h = [255, 255, 255, 1];
|
|
4494
4590
|
if (o.startsWith("#")) {
|
|
4495
4591
|
if (o.length === 4) {
|
|
4496
|
-
let a = parseInt(o[1] + o[1], 16),
|
|
4497
|
-
h = [a,
|
|
4592
|
+
let a = parseInt(o[1] + o[1], 16), g = parseInt(o[2] + o[2], 16), p = parseInt(o[3] + o[3], 16);
|
|
4593
|
+
h = [a, g, p, 1];
|
|
4498
4594
|
} else if (o.length === 7) {
|
|
4499
|
-
let a = parseInt(o.substring(1, 3), 16),
|
|
4500
|
-
h = [a,
|
|
4595
|
+
let a = parseInt(o.substring(1, 3), 16), g = parseInt(o.substring(3, 5), 16), p = parseInt(o.substring(5, 7), 16);
|
|
4596
|
+
h = [a, g, p, 1];
|
|
4501
4597
|
}
|
|
4502
4598
|
} else if (o.startsWith("rgba")) {
|
|
4503
4599
|
let a = o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);
|
|
4504
4600
|
if (a) {
|
|
4505
|
-
let
|
|
4506
|
-
h = [
|
|
4601
|
+
let g = parseInt(a[1]), p = parseInt(a[2]), l = parseInt(a[3]), c = parseFloat(a[4]);
|
|
4602
|
+
h = [g, p, l, c];
|
|
4507
4603
|
}
|
|
4508
4604
|
} else if (o.startsWith("rgb")) {
|
|
4509
4605
|
let a = o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
|
4510
4606
|
if (a) {
|
|
4511
|
-
let
|
|
4512
|
-
h = [
|
|
4607
|
+
let g = parseInt(a[1]), p = parseInt(a[2]), l = parseInt(a[3]);
|
|
4608
|
+
h = [g, p, l, 1];
|
|
4513
4609
|
}
|
|
4514
4610
|
} else
|
|
4515
4611
|
console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");
|
|
@@ -4543,7 +4639,7 @@ const Vt = class Vt extends lt {
|
|
|
4543
4639
|
}), e.setFeatureStyle(h);
|
|
4544
4640
|
};
|
|
4545
4641
|
n();
|
|
4546
|
-
const s = this.dv(
|
|
4642
|
+
const s = this.dv(P(
|
|
4547
4643
|
e.layerConfigChanged,
|
|
4548
4644
|
e.colorBlendModeChanged
|
|
4549
4645
|
));
|
|
@@ -4553,7 +4649,7 @@ const Vt = class Vt extends lt {
|
|
|
4553
4649
|
}
|
|
4554
4650
|
}
|
|
4555
4651
|
};
|
|
4556
|
-
f(Vt, "type", Vt.register("ESUeViewer",
|
|
4652
|
+
f(Vt, "type", Vt.register("ESUeViewer", Ln.type, Vt));
|
|
4557
4653
|
let Hi = Vt;
|
|
4558
4654
|
const Ot = class Ot extends k {
|
|
4559
4655
|
constructor(e, t) {
|
|
@@ -4562,21 +4658,21 @@ const Ot = class Ot extends k {
|
|
|
4562
4658
|
return;
|
|
4563
4659
|
}
|
|
4564
4660
|
this.d(e.addTreesEvent.don((r) => {
|
|
4565
|
-
|
|
4661
|
+
kn(t, e.id, r);
|
|
4566
4662
|
})), this.d(e.removeAllTreesEvent.don(() => {
|
|
4567
|
-
|
|
4663
|
+
Bn(t, e.id);
|
|
4568
4664
|
})), this.d(e.updateTreeParamsEvent.don((r) => {
|
|
4569
|
-
|
|
4665
|
+
Mn(t, e.id, r);
|
|
4570
4666
|
})), this.d(e.cutDownTreesEvent.don((r, n) => {
|
|
4571
|
-
|
|
4667
|
+
_n(t, e.id, r, n);
|
|
4572
4668
|
})), this.d(e.growthSimulationEvent.don((r, n, s) => {
|
|
4573
|
-
|
|
4669
|
+
$n(t, e.id, r, n, s);
|
|
4574
4670
|
}));
|
|
4575
4671
|
}
|
|
4576
4672
|
};
|
|
4577
|
-
f(Ot, "type", Ot.register("ESUeViewer",
|
|
4673
|
+
f(Ot, "type", Ot.register("ESUeViewer", Dn.type, Ot));
|
|
4578
4674
|
let Ji = Ot;
|
|
4579
|
-
const jt = class jt extends
|
|
4675
|
+
const jt = class jt extends S {
|
|
4580
4676
|
constructor(e, t) {
|
|
4581
4677
|
if (super(e, t), !t.viewer) {
|
|
4582
4678
|
console.warn("viewer is undefined!");
|
|
@@ -4584,9 +4680,9 @@ const jt = class jt extends E {
|
|
|
4584
4680
|
}
|
|
4585
4681
|
}
|
|
4586
4682
|
};
|
|
4587
|
-
f(jt, "type", jt.register("ESUeViewer",
|
|
4683
|
+
f(jt, "type", jt.register("ESUeViewer", Wn.type, jt));
|
|
4588
4684
|
let Gi = jt;
|
|
4589
|
-
const te = class te extends
|
|
4685
|
+
const te = class te extends _ {
|
|
4590
4686
|
constructor(e, t) {
|
|
4591
4687
|
super(e, t);
|
|
4592
4688
|
const i = t.viewer;
|
|
@@ -4611,9 +4707,9 @@ const te = class te extends $ {
|
|
|
4611
4707
|
}));
|
|
4612
4708
|
}
|
|
4613
4709
|
};
|
|
4614
|
-
f(te, "type", te.register("ESUeViewer",
|
|
4710
|
+
f(te, "type", te.register("ESUeViewer", An.type, te));
|
|
4615
4711
|
let Ki = te;
|
|
4616
|
-
const ee = class ee extends
|
|
4712
|
+
const ee = class ee extends _ {
|
|
4617
4713
|
constructor(e, t) {
|
|
4618
4714
|
super(e, t);
|
|
4619
4715
|
const i = t.viewer;
|
|
@@ -4631,7 +4727,7 @@ const ee = class ee extends $ {
|
|
|
4631
4727
|
}));
|
|
4632
4728
|
}
|
|
4633
4729
|
};
|
|
4634
|
-
f(ee, "type", ee.register("ESUeViewer",
|
|
4730
|
+
f(ee, "type", ee.register("ESUeViewer", Un.type, ee));
|
|
4635
4731
|
let Xi = ee;
|
|
4636
4732
|
const ie = class ie extends z {
|
|
4637
4733
|
constructor(e, t) {
|
|
@@ -4641,9 +4737,9 @@ const ie = class ie extends z {
|
|
|
4641
4737
|
}
|
|
4642
4738
|
}
|
|
4643
4739
|
};
|
|
4644
|
-
f(ie, "type", ie.register("ESUeViewer",
|
|
4645
|
-
let
|
|
4646
|
-
const
|
|
4740
|
+
f(ie, "type", ie.register("ESUeViewer", vr.type, ie));
|
|
4741
|
+
let Qi = ie;
|
|
4742
|
+
const ot = class ot extends z {
|
|
4647
4743
|
constructor(e, t) {
|
|
4648
4744
|
super(e, t);
|
|
4649
4745
|
const i = t.viewer;
|
|
@@ -4652,17 +4748,17 @@ const st = class st extends z {
|
|
|
4652
4748
|
return;
|
|
4653
4749
|
}
|
|
4654
4750
|
this.d(e.callFunctionEvent.don(async (r, n) => {
|
|
4655
|
-
const s = await
|
|
4751
|
+
const s = await Tr(i, e.id, r, n);
|
|
4656
4752
|
e.__callFunctionResultEvent.emit(s);
|
|
4657
4753
|
}));
|
|
4658
4754
|
}
|
|
4659
4755
|
};
|
|
4660
|
-
f(
|
|
4756
|
+
f(ot, "type", ot.register("ESUeViewer", Nn.type, ot)), f(ot, "propValFuncs", {
|
|
4661
4757
|
...z.propValFuncs,
|
|
4662
4758
|
info: (e) => JSON.stringify(e ?? {})
|
|
4663
4759
|
});
|
|
4664
|
-
let
|
|
4665
|
-
const
|
|
4760
|
+
let Yi = ot;
|
|
4761
|
+
const Zi = (d) => {
|
|
4666
4762
|
switch (d) {
|
|
4667
4763
|
case 0:
|
|
4668
4764
|
return "成功绑定";
|
|
@@ -4677,7 +4773,7 @@ const qi = (d) => {
|
|
|
4677
4773
|
default:
|
|
4678
4774
|
return "未知错误";
|
|
4679
4775
|
}
|
|
4680
|
-
},
|
|
4776
|
+
}, So = (d) => {
|
|
4681
4777
|
switch (d) {
|
|
4682
4778
|
case 0:
|
|
4683
4779
|
return "创建成功";
|
|
@@ -4688,7 +4784,7 @@ const qi = (d) => {
|
|
|
4688
4784
|
default:
|
|
4689
4785
|
return "未知错误";
|
|
4690
4786
|
}
|
|
4691
|
-
}, re = class re extends
|
|
4787
|
+
}, re = class re extends K {
|
|
4692
4788
|
constructor(e, t) {
|
|
4693
4789
|
super(e, t);
|
|
4694
4790
|
const i = t.viewer;
|
|
@@ -4697,7 +4793,7 @@ const qi = (d) => {
|
|
|
4697
4793
|
return;
|
|
4698
4794
|
}
|
|
4699
4795
|
this.d(() => {
|
|
4700
|
-
|
|
4796
|
+
Er(i, e.id);
|
|
4701
4797
|
});
|
|
4702
4798
|
const r = async () => {
|
|
4703
4799
|
a() || await i.callUeFunc({
|
|
@@ -4716,7 +4812,7 @@ const qi = (d) => {
|
|
|
4716
4812
|
maxVisibleDistance: e.maxVisibleDistance
|
|
4717
4813
|
}
|
|
4718
4814
|
});
|
|
4719
|
-
}, n = this.dv(
|
|
4815
|
+
}, n = this.dv(P(
|
|
4720
4816
|
e.showChanged,
|
|
4721
4817
|
e.nameChanged,
|
|
4722
4818
|
e.rotationChanged,
|
|
@@ -4739,12 +4835,12 @@ const qi = (d) => {
|
|
|
4739
4835
|
position: e.position
|
|
4740
4836
|
}
|
|
4741
4837
|
}), (t.debug ?? !1) && console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`));
|
|
4742
|
-
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1,
|
|
4743
|
-
const { id: l } = e,
|
|
4744
|
-
|
|
4745
|
-
const
|
|
4746
|
-
if (
|
|
4747
|
-
console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${
|
|
4838
|
+
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1, g = async () => {
|
|
4839
|
+
const { id: l } = e, c = await t.unBindActorByID(l);
|
|
4840
|
+
c && c.error !== "" && console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${c.error}`), s = void 0;
|
|
4841
|
+
const u = await i.callUeFunc({ f: "destroy", p: { id: l } });
|
|
4842
|
+
if (u && u.error !== "") {
|
|
4843
|
+
console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${u.error}`);
|
|
4748
4844
|
return;
|
|
4749
4845
|
}
|
|
4750
4846
|
o = void 0;
|
|
@@ -4753,11 +4849,11 @@ const qi = (d) => {
|
|
|
4753
4849
|
actorClass: "default"
|
|
4754
4850
|
}));
|
|
4755
4851
|
{
|
|
4756
|
-
const l = this.dv(
|
|
4852
|
+
const l = this.dv(P(
|
|
4757
4853
|
e.actorClassChanged,
|
|
4758
4854
|
e.actorTagChanged
|
|
4759
4855
|
// sceneObject.positionChanged,
|
|
4760
|
-
)),
|
|
4856
|
+
)), c = async () => {
|
|
4761
4857
|
e.actorTag !== "" ? p.value = {
|
|
4762
4858
|
type: "ActorTag",
|
|
4763
4859
|
actorTag: e.actorTag
|
|
@@ -4768,102 +4864,102 @@ const qi = (d) => {
|
|
|
4768
4864
|
// position: sceneObject.position,
|
|
4769
4865
|
};
|
|
4770
4866
|
};
|
|
4771
|
-
|
|
4867
|
+
c(), this.d(l.don(c)), this.d(e.flushEvent.don(() => l.flush()));
|
|
4772
4868
|
}
|
|
4773
4869
|
{
|
|
4774
|
-
const l = this.dv(Te(async (
|
|
4775
|
-
if (await
|
|
4776
|
-
const { actorTag:
|
|
4870
|
+
const l = this.dv(Te(async (u) => {
|
|
4871
|
+
if (await u.promise(g()), e.lastActorStatus = "null", p.value.type === "ActorTag") {
|
|
4872
|
+
const { actorTag: v } = p.value;
|
|
4777
4873
|
try {
|
|
4778
|
-
const w = await
|
|
4874
|
+
const w = await u.promise(t.bindActorByTag(e.id, v));
|
|
4779
4875
|
if (!w) return;
|
|
4780
4876
|
if (w.error !== "") {
|
|
4781
|
-
console.warn(`${e.id} UeESUnrealActor BindActorByTag:${
|
|
4877
|
+
console.warn(`${e.id} UeESUnrealActor BindActorByTag:${v},${w.error}`);
|
|
4782
4878
|
return;
|
|
4783
4879
|
}
|
|
4784
4880
|
if (w.re.type === 0)
|
|
4785
|
-
e.lastActorStatus = "bound", s =
|
|
4881
|
+
e.lastActorStatus = "bound", s = v;
|
|
4786
4882
|
else if (w.re.type === 1)
|
|
4787
|
-
e.lastActorStatus = "bound", s =
|
|
4883
|
+
e.lastActorStatus = "bound", s = v, console.warn(`${e.id} UeESUnrealActor BindActorByTag:${v},${Zi(w.re.type)}`);
|
|
4788
4884
|
else {
|
|
4789
|
-
s = void 0, console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${
|
|
4885
|
+
s = void 0, console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${v}, ${Zi(w.re.type)}`);
|
|
4790
4886
|
return;
|
|
4791
4887
|
}
|
|
4792
4888
|
} catch (w) {
|
|
4793
|
-
console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${
|
|
4889
|
+
console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${v}, ${w}`);
|
|
4794
4890
|
return;
|
|
4795
4891
|
}
|
|
4796
4892
|
} else if (p.value.type === "ActorClass") {
|
|
4797
|
-
const { actorClass:
|
|
4893
|
+
const { actorClass: v } = p.value;
|
|
4798
4894
|
try {
|
|
4799
|
-
const w = await
|
|
4895
|
+
const w = await u.promise(t.createActorByClass(e.id, v));
|
|
4800
4896
|
if (!w) return;
|
|
4801
4897
|
if (w.error !== "") {
|
|
4802
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${
|
|
4898
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${v}, ${w.error}`);
|
|
4803
4899
|
return;
|
|
4804
4900
|
}
|
|
4805
4901
|
if (w.re.type === 0)
|
|
4806
|
-
|
|
4902
|
+
v !== "default" && (e.lastActorStatus = "created"), o = v;
|
|
4807
4903
|
else {
|
|
4808
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${
|
|
4904
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${v},${So(w.re.type)}`);
|
|
4809
4905
|
return;
|
|
4810
4906
|
}
|
|
4811
4907
|
} catch (w) {
|
|
4812
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${
|
|
4908
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${v}, ${JSON.stringify(w)}`);
|
|
4813
4909
|
return;
|
|
4814
4910
|
}
|
|
4815
4911
|
}
|
|
4816
|
-
await
|
|
4817
|
-
})),
|
|
4912
|
+
await u.promise(r()), await u.promise(h());
|
|
4913
|
+
})), c = async () => {
|
|
4818
4914
|
l.restart();
|
|
4819
4915
|
};
|
|
4820
|
-
|
|
4916
|
+
c(), this.d(p.changed.don(c));
|
|
4821
4917
|
}
|
|
4822
|
-
this.d(e.positionChanged.don(h)), this.d(e.callFunctionEvent.don(async (l,
|
|
4918
|
+
this.d(e.positionChanged.don(h)), this.d(e.callFunctionEvent.don(async (l, c) => {
|
|
4823
4919
|
if (a()) {
|
|
4824
4920
|
e.__callFunctionResultEvent.emit(void 0);
|
|
4825
4921
|
return;
|
|
4826
4922
|
}
|
|
4827
|
-
const
|
|
4828
|
-
e.__callFunctionResultEvent.emit(
|
|
4829
|
-
})), this.d(e.smoothMoveEvent.don((l,
|
|
4830
|
-
a() || ke(i, e.id, l,
|
|
4831
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((l,
|
|
4832
|
-
a() || Pe(i, e.id, l,
|
|
4833
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((l,
|
|
4834
|
-
a() || Le(i, e.id, l,
|
|
4835
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((l,
|
|
4836
|
-
a() || De(i, e.id, l,
|
|
4923
|
+
const u = await Tr(i, e.id, l, c);
|
|
4924
|
+
e.__callFunctionResultEvent.emit(u);
|
|
4925
|
+
})), this.d(e.smoothMoveEvent.don((l, c) => {
|
|
4926
|
+
a() || ke(i, e.id, l, c);
|
|
4927
|
+
})), this.d(e.smoothMoveWithRotationEvent.don((l, c, u) => {
|
|
4928
|
+
a() || Pe(i, e.id, l, c, u);
|
|
4929
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((l, c, u, v) => {
|
|
4930
|
+
a() || Le(i, e.id, l, c, v, u);
|
|
4931
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((l, c, u, v, w) => {
|
|
4932
|
+
a() || De(i, e.id, l, c, u, v, w);
|
|
4837
4933
|
})), this.d(e.automaticLandingEvent.don((l) => {
|
|
4838
4934
|
if (a()) return;
|
|
4839
|
-
const
|
|
4840
|
-
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((
|
|
4841
|
-
|
|
4935
|
+
const c = [e.position[0], e.position[1]];
|
|
4936
|
+
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((u) => {
|
|
4937
|
+
u !== null && (e.position = [...c, u], e.collision = l);
|
|
4842
4938
|
});
|
|
4843
|
-
})), this.d(e.flyToEvent.don(async (l,
|
|
4939
|
+
})), this.d(e.flyToEvent.don(async (l, c) => {
|
|
4844
4940
|
if (a()) return;
|
|
4845
|
-
const
|
|
4846
|
-
let
|
|
4847
|
-
|
|
4941
|
+
const u = await we(i, e.id, l);
|
|
4942
|
+
let v = "over";
|
|
4943
|
+
u === void 0 ? v = "error" : u.endType === 0 ? v = "over" : u.endType === 1 && (v = "cancelled"), e.flyOverEvent.emit(c, v, t);
|
|
4848
4944
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
4849
4945
|
a() || dt(i, e.id);
|
|
4850
4946
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
4851
4947
|
if (!t.actived) return;
|
|
4852
4948
|
const l = await t.getCurrentCameraInfo();
|
|
4853
4949
|
if (!l) return;
|
|
4854
|
-
const { position:
|
|
4855
|
-
e.flyInParam = { position:
|
|
4950
|
+
const { position: c, rotation: u } = l;
|
|
4951
|
+
e.flyInParam = { position: c, rotation: u, flyDuration: 1 };
|
|
4856
4952
|
})), this.d(t.propChanged.don((l) => {
|
|
4857
|
-
a() || l.objId === e.id && Object.keys(l.props).forEach((
|
|
4858
|
-
const
|
|
4859
|
-
e[
|
|
4953
|
+
a() || l.objId === e.id && Object.keys(l.props).forEach((c) => {
|
|
4954
|
+
const u = l.props[c] === null ? void 0 : l.props[c];
|
|
4955
|
+
e[c] = u;
|
|
4860
4956
|
});
|
|
4861
4957
|
}));
|
|
4862
4958
|
}
|
|
4863
4959
|
};
|
|
4864
4960
|
f(re, "type", re.register("ESUeViewer", $e.type, re));
|
|
4865
|
-
let
|
|
4866
|
-
const ne = class ne extends
|
|
4961
|
+
let qi = re;
|
|
4962
|
+
const ne = class ne extends S {
|
|
4867
4963
|
constructor(e, t) {
|
|
4868
4964
|
if (super(e, t), !t.viewer) {
|
|
4869
4965
|
console.warn("viewer is undefined!");
|
|
@@ -4871,9 +4967,9 @@ const ne = class ne extends E {
|
|
|
4871
4967
|
}
|
|
4872
4968
|
}
|
|
4873
4969
|
};
|
|
4874
|
-
f(ne, "type", ne.register("ESUeViewer",
|
|
4970
|
+
f(ne, "type", ne.register("ESUeViewer", zn.type, ne));
|
|
4875
4971
|
let Vi = ne;
|
|
4876
|
-
const se = class se extends
|
|
4972
|
+
const se = class se extends S {
|
|
4877
4973
|
constructor(e, t) {
|
|
4878
4974
|
if (super(e, t), !t.viewer) {
|
|
4879
4975
|
console.warn("viewer is undefined!");
|
|
@@ -4881,7 +4977,7 @@ const se = class se extends E {
|
|
|
4881
4977
|
}
|
|
4882
4978
|
}
|
|
4883
4979
|
};
|
|
4884
|
-
f(se, "type", se.register("ESUeViewer",
|
|
4980
|
+
f(se, "type", se.register("ESUeViewer", bn.type, se));
|
|
4885
4981
|
let Oi = se;
|
|
4886
4982
|
const oe = class oe extends B {
|
|
4887
4983
|
constructor(e, t) {
|
|
@@ -4891,9 +4987,9 @@ const oe = class oe extends B {
|
|
|
4891
4987
|
}
|
|
4892
4988
|
}
|
|
4893
4989
|
};
|
|
4894
|
-
f(oe, "type", oe.register("ESUeViewer",
|
|
4990
|
+
f(oe, "type", oe.register("ESUeViewer", Hn.type, oe));
|
|
4895
4991
|
let ji = oe;
|
|
4896
|
-
const ae = class ae extends
|
|
4992
|
+
const ae = class ae extends _ {
|
|
4897
4993
|
constructor(e, t) {
|
|
4898
4994
|
super(e, t);
|
|
4899
4995
|
const i = t.viewer;
|
|
@@ -4901,7 +4997,7 @@ const ae = class ae extends $ {
|
|
|
4901
4997
|
console.warn("viewer is undefined!");
|
|
4902
4998
|
return;
|
|
4903
4999
|
}
|
|
4904
|
-
this.ad(
|
|
5000
|
+
this.ad(I([e, "volume"], [e, "cutAndFillVolume"])), this.d(e.startEvent.don(() => {
|
|
4905
5001
|
i.callUeFunc({
|
|
4906
5002
|
f: "Start",
|
|
4907
5003
|
p: {
|
|
@@ -4918,9 +5014,9 @@ const ae = class ae extends $ {
|
|
|
4918
5014
|
}));
|
|
4919
5015
|
}
|
|
4920
5016
|
};
|
|
4921
|
-
f(ae, "type", ae.register("ESUeViewer",
|
|
5017
|
+
f(ae, "type", ae.register("ESUeViewer", Jn.type, ae));
|
|
4922
5018
|
let tr = ae;
|
|
4923
|
-
const
|
|
5019
|
+
const at = class at extends z {
|
|
4924
5020
|
constructor(e, t) {
|
|
4925
5021
|
if (super(e, t), !t.viewer) {
|
|
4926
5022
|
console.warn("viewer is undefined!");
|
|
@@ -4928,12 +5024,12 @@ const ot = class ot extends z {
|
|
|
4928
5024
|
}
|
|
4929
5025
|
}
|
|
4930
5026
|
};
|
|
4931
|
-
f(
|
|
5027
|
+
f(at, "type", at.register("ESUeViewer", Gn.type, at)), f(at, "propValFuncs", {
|
|
4932
5028
|
...z.propValFuncs,
|
|
4933
5029
|
info: (e) => JSON.stringify(e ?? {})
|
|
4934
5030
|
});
|
|
4935
|
-
let er =
|
|
4936
|
-
const le = class le extends
|
|
5031
|
+
let er = at;
|
|
5032
|
+
const le = class le extends K {
|
|
4937
5033
|
constructor(e, t) {
|
|
4938
5034
|
if (super(e, t), !t.viewer) {
|
|
4939
5035
|
console.warn("viewer is undefined!");
|
|
@@ -4946,17 +5042,17 @@ const le = class le extends G {
|
|
|
4946
5042
|
});
|
|
4947
5043
|
}
|
|
4948
5044
|
};
|
|
4949
|
-
f(le, "type", le.register("ESUeViewer",
|
|
5045
|
+
f(le, "type", le.register("ESUeViewer", Kn.type, le));
|
|
4950
5046
|
let ir = le;
|
|
4951
|
-
|
|
4952
|
-
const de = class de extends
|
|
5047
|
+
E.context.getStrFromEnv(et.defaults.imgUrl);
|
|
5048
|
+
const de = class de extends K {
|
|
4953
5049
|
constructor(e, t) {
|
|
4954
5050
|
if (super(e, t), !t.viewer) {
|
|
4955
5051
|
console.warn("viewer is undefined!");
|
|
4956
5052
|
return;
|
|
4957
5053
|
}
|
|
4958
5054
|
const r = this.disposeVar(new Je());
|
|
4959
|
-
t.add(r), this.dispose(() => t.delete(r)), this.dispose(
|
|
5055
|
+
t.add(r), this.dispose(() => t.delete(r)), this.dispose(I([r, "show"], [e, "show"])), r.instanceClass = class extends C {
|
|
4960
5056
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
4961
5057
|
// customDiv指向当前的CustomDiv场景对象
|
|
4962
5058
|
// viewer指定当前的视口
|
|
@@ -4966,29 +5062,29 @@ const de = class de extends G {
|
|
|
4966
5062
|
this._subContainer.appendChild(a), this.dispose(() => this._subContainer.removeChild(a));
|
|
4967
5063
|
{
|
|
4968
5064
|
const l = async () => {
|
|
4969
|
-
const
|
|
4970
|
-
w[0] = 360, t.flyIn(
|
|
5065
|
+
const c = await t.getCurrentCameraInfo(), u = c == null ? void 0 : c.position, w = [...c == null ? void 0 : c.rotation];
|
|
5066
|
+
w[0] = 360, t.flyIn(u, w);
|
|
4971
5067
|
};
|
|
4972
5068
|
a.addEventListener("click", l), a.style.cursor = "pointer", this.dispose(() => a.removeEventListener("click", l));
|
|
4973
5069
|
}
|
|
4974
5070
|
{
|
|
4975
5071
|
const l = () => {
|
|
4976
|
-
a.style.width = `${e.cssSize ? e.cssSize :
|
|
5072
|
+
a.style.width = `${e.cssSize ? e.cssSize : et.defaults.cssSize}px`, a.style.height = `${e.cssSize ? e.cssSize : et.defaults.cssSize}px`;
|
|
4977
5073
|
};
|
|
4978
5074
|
l(), e.dispose(e.cssSizeChanged.disposableOn(l));
|
|
4979
5075
|
}
|
|
4980
5076
|
a.style.position = "fixed";
|
|
4981
5077
|
{
|
|
4982
5078
|
const l = () => {
|
|
4983
|
-
a.style.top = `${e.cssPosition ? e.cssPosition[0] :
|
|
5079
|
+
a.style.top = `${e.cssPosition ? e.cssPosition[0] : et.defaults.cssPosition[0]}px`, a.style.right = `${e.cssPosition ? e.cssPosition[1] : et.defaults.cssPosition[1]}px`;
|
|
4984
5080
|
};
|
|
4985
5081
|
l(), e.dispose(e.cssPositionChanged.disposableOn(l));
|
|
4986
5082
|
}
|
|
4987
5083
|
a.style.transition = " right 0.4s linear", a.style.cursor = "pointer";
|
|
4988
|
-
const
|
|
4989
|
-
a.appendChild(
|
|
5084
|
+
const g = document.createElement("div");
|
|
5085
|
+
a.appendChild(g), this.dispose(() => a.removeChild(g)), g.style.width = "100%", g.style.height = "100%", g.style.position = "relative";
|
|
4990
5086
|
const p = document.createElement("img");
|
|
4991
|
-
|
|
5087
|
+
g.appendChild(p), this.dispose(() => g.removeChild(p)), p.style.width = "100%", p.style.height = "100%", p.style.border = "none";
|
|
4992
5088
|
{
|
|
4993
5089
|
const l = () => p.src = e.imgUrl;
|
|
4994
5090
|
l(), e.dispose(e.imgUrlChanged.disposableOn(l));
|
|
@@ -4998,22 +5094,22 @@ const de = class de extends G {
|
|
|
4998
5094
|
const w = -t.getCurrentCameraInfo().rotation[0];
|
|
4999
5095
|
p.style.transform = `rotate(${w}deg)`;
|
|
5000
5096
|
};
|
|
5001
|
-
let
|
|
5002
|
-
const
|
|
5003
|
-
l(), e.show ? (a.style.display = "block",
|
|
5097
|
+
let c;
|
|
5098
|
+
const u = async () => {
|
|
5099
|
+
l(), e.show ? (a.style.display = "block", c = setInterval(() => {
|
|
5004
5100
|
l();
|
|
5005
|
-
}, 1e3)) : (a.style.display = "none", clearInterval(
|
|
5101
|
+
}, 1e3)) : (a.style.display = "none", clearInterval(c));
|
|
5006
5102
|
};
|
|
5007
|
-
this.dispose(e.showChanged.disposableOn(
|
|
5103
|
+
this.dispose(e.showChanged.disposableOn(u)), u(), this.dispose(() => clearInterval(c));
|
|
5008
5104
|
}
|
|
5009
5105
|
p.style.transformOrigin = "50% 50%";
|
|
5010
5106
|
}
|
|
5011
5107
|
};
|
|
5012
5108
|
}
|
|
5013
5109
|
};
|
|
5014
|
-
f(de, "type", de.register("ESUeViewer",
|
|
5110
|
+
f(de, "type", de.register("ESUeViewer", et.type, de));
|
|
5015
5111
|
let rr = de;
|
|
5016
|
-
const
|
|
5112
|
+
const O = class O extends B {
|
|
5017
5113
|
constructor(e, t) {
|
|
5018
5114
|
super(e, t);
|
|
5019
5115
|
const i = t.viewer;
|
|
@@ -5035,20 +5131,20 @@ const V = class V extends B {
|
|
|
5035
5131
|
}
|
|
5036
5132
|
}
|
|
5037
5133
|
};
|
|
5038
|
-
f(
|
|
5134
|
+
f(O, "type", O.register("ESUeViewer", Xn.type, O)), f(O, "forceUeUpdateProps", [
|
|
5039
5135
|
...B.forceUeUpdateProps
|
|
5040
|
-
]), f(
|
|
5136
|
+
]), f(O, "propValFuncs", {
|
|
5041
5137
|
...B.propValFuncs
|
|
5042
5138
|
});
|
|
5043
|
-
let nr =
|
|
5044
|
-
async function
|
|
5139
|
+
let nr = O;
|
|
5140
|
+
async function To(d) {
|
|
5045
5141
|
navigator.clipboard.writeText(d).then(function() {
|
|
5046
5142
|
console.log("复制成功");
|
|
5047
5143
|
}, function(e) {
|
|
5048
5144
|
console.log("复制失败");
|
|
5049
5145
|
});
|
|
5050
5146
|
}
|
|
5051
|
-
const ce = class ce extends
|
|
5147
|
+
const ce = class ce extends K {
|
|
5052
5148
|
constructor(e, t) {
|
|
5053
5149
|
if (super(e, t), !t.viewer) {
|
|
5054
5150
|
console.warn("viewer is undefined!");
|
|
@@ -5057,69 +5153,69 @@ const ce = class ce extends G {
|
|
|
5057
5153
|
const r = this.disposeVar(new Je());
|
|
5058
5154
|
t.add(r), this.dispose(() => t.delete(r)), r.instanceClass = class extends C {
|
|
5059
5155
|
constructor(s, o, h) {
|
|
5060
|
-
if (super(), this._subContainer = s, !h || !(h instanceof
|
|
5156
|
+
if (super(), this._subContainer = s, !h || !(h instanceof G)) return;
|
|
5061
5157
|
const a = document.createElement("div");
|
|
5062
5158
|
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";
|
|
5063
|
-
const
|
|
5064
|
-
a.appendChild(
|
|
5159
|
+
const g = document.createElement("span");
|
|
5160
|
+
a.appendChild(g), this.dispose(() => a.removeChild(g));
|
|
5065
5161
|
const p = document.createElement("span");
|
|
5066
|
-
|
|
5162
|
+
g.appendChild(p), this.dispose(() => g.removeChild(p));
|
|
5067
5163
|
const l = document.createElement("span");
|
|
5068
|
-
|
|
5069
|
-
let
|
|
5070
|
-
|
|
5071
|
-
}), l.style.cursor = "pointer", this.dispose(() =>
|
|
5072
|
-
const
|
|
5073
|
-
a.appendChild(
|
|
5164
|
+
g.appendChild(l), l.addEventListener("dblclick", function() {
|
|
5165
|
+
let u = l.innerHTML;
|
|
5166
|
+
u.startsWith("鼠标位置") && (u = u.slice(5)), To(u);
|
|
5167
|
+
}), l.style.cursor = "pointer", this.dispose(() => g.removeChild(l));
|
|
5168
|
+
const c = document.createElement("span");
|
|
5169
|
+
a.appendChild(c), this.dispose(() => a.removeChild(c));
|
|
5074
5170
|
{
|
|
5075
|
-
const
|
|
5171
|
+
const u = () => {
|
|
5076
5172
|
a.style.height = (e.height ?? A.defaults.height) + "px", a.style.lineHeight = (e.height ?? A.defaults.height) + "px";
|
|
5077
5173
|
};
|
|
5078
|
-
this.dispose(e.heightChanged.disposableOn(
|
|
5174
|
+
this.dispose(e.heightChanged.disposableOn(u)), u();
|
|
5079
5175
|
}
|
|
5080
5176
|
{
|
|
5081
|
-
const
|
|
5177
|
+
const u = () => {
|
|
5082
5178
|
a.style.fontSize = (e.fontSize ?? A.defaults.fontSize) + "px";
|
|
5083
5179
|
};
|
|
5084
|
-
this.dispose(e.fontSizeChanged.disposableOn(
|
|
5180
|
+
this.dispose(e.fontSizeChanged.disposableOn(u)), u();
|
|
5085
5181
|
}
|
|
5086
5182
|
{
|
|
5087
|
-
const
|
|
5183
|
+
const u = () => {
|
|
5088
5184
|
e.bgColor ? a.style.background = `rgba(${e.bgColor[0] * 255},${e.bgColor[1] * 255},${e.bgColor[2] * 255},${e.bgColor[3]})` : a.style.background = `rgba(${A.defaults.bgColor[0]},${A.defaults.bgColor[1]},${A.defaults.bgColor[2]},${A.defaults.bgColor[3]})`;
|
|
5089
5185
|
};
|
|
5090
|
-
this.dispose(e.bgColorChanged.disposableOn(
|
|
5186
|
+
this.dispose(e.bgColorChanged.disposableOn(u)), u();
|
|
5091
5187
|
}
|
|
5092
|
-
h.getVersion().then((
|
|
5093
|
-
|
|
5094
|
-
}).catch((
|
|
5095
|
-
console.log(
|
|
5188
|
+
h.getVersion().then((u) => {
|
|
5189
|
+
u && (c.innerText = `Ue 版本 : ${u[0]} `);
|
|
5190
|
+
}).catch((u) => {
|
|
5191
|
+
console.log(u);
|
|
5096
5192
|
});
|
|
5097
5193
|
{
|
|
5098
|
-
const
|
|
5099
|
-
let y = "",
|
|
5194
|
+
const u = () => {
|
|
5195
|
+
let y = "", T = "";
|
|
5100
5196
|
y += `帧率:${h.getFPS().toFixed(0)}FPS`, p.innerText = y;
|
|
5101
5197
|
const m = t.getCurrentCameraInfo();
|
|
5102
|
-
y += ` 经度: ${m.position[0].toFixed(5)}° 纬度: ${m.position[1].toFixed(5)}° 高度: ${m.position[2].toFixed(2)}米 偏航角: ${m.rotation[0].toFixed(2)}° 俯仰角: ${m.rotation[1].toFixed(2)}° 翻滚角:${m.rotation[2].toFixed(2)}° `, p.innerText = y, t.pick().then((
|
|
5103
|
-
if (
|
|
5104
|
-
const { pickResult:
|
|
5105
|
-
if (
|
|
5106
|
-
const { position:
|
|
5107
|
-
|
|
5198
|
+
y += ` 经度: ${m.position[0].toFixed(5)}° 纬度: ${m.position[1].toFixed(5)}° 高度: ${m.position[2].toFixed(2)}米 偏航角: ${m.rotation[0].toFixed(2)}° 俯仰角: ${m.rotation[1].toFixed(2)}° 翻滚角:${m.rotation[2].toFixed(2)}° `, p.innerText = y, t.pick().then((D) => {
|
|
5199
|
+
if (D) {
|
|
5200
|
+
const { pickResult: F } = D;
|
|
5201
|
+
if (F && F.position) {
|
|
5202
|
+
const { position: $ } = F;
|
|
5203
|
+
T += `鼠标位置:${$[0].toFixed(5)}° ${$[1].toFixed(5)}° ${$[2].toFixed(2)}m`;
|
|
5108
5204
|
} else
|
|
5109
|
-
|
|
5110
|
-
l.innerText =
|
|
5205
|
+
T += "暂时无法获取鼠标位置...";
|
|
5206
|
+
l.innerText = T;
|
|
5111
5207
|
}
|
|
5112
|
-
}).catch((
|
|
5113
|
-
console.log(
|
|
5208
|
+
}).catch((D) => {
|
|
5209
|
+
console.log(D);
|
|
5114
5210
|
});
|
|
5115
5211
|
};
|
|
5116
|
-
let
|
|
5212
|
+
let v;
|
|
5117
5213
|
const w = async () => {
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
}, 1e3)) : (a.style.display = "none", clearInterval(
|
|
5214
|
+
u(), e.show ? (a.style.display = "flex", v = setInterval(() => {
|
|
5215
|
+
u();
|
|
5216
|
+
}, 1e3)) : (a.style.display = "none", clearInterval(v));
|
|
5121
5217
|
};
|
|
5122
|
-
this.dispose(e.showChanged.disposableOn(w)), w(), this.dispose(() => clearInterval(
|
|
5218
|
+
this.dispose(e.showChanged.disposableOn(w)), w(), this.dispose(() => clearInterval(v));
|
|
5123
5219
|
}
|
|
5124
5220
|
}
|
|
5125
5221
|
};
|
|
@@ -5127,7 +5223,7 @@ const ce = class ce extends G {
|
|
|
5127
5223
|
};
|
|
5128
5224
|
f(ce, "type", ce.register("ESUeViewer", A.type, ce));
|
|
5129
5225
|
let sr = ce;
|
|
5130
|
-
const ue = class ue extends
|
|
5226
|
+
const ue = class ue extends S {
|
|
5131
5227
|
constructor(e, t) {
|
|
5132
5228
|
if (super(e, t), !t.viewer) {
|
|
5133
5229
|
console.warn("viewer is undefined!");
|
|
@@ -5135,7 +5231,7 @@ const ue = class ue extends E {
|
|
|
5135
5231
|
}
|
|
5136
5232
|
}
|
|
5137
5233
|
};
|
|
5138
|
-
f(ue, "type", ue.register("ESUeViewer",
|
|
5234
|
+
f(ue, "type", ue.register("ESUeViewer", Qn.type, ue));
|
|
5139
5235
|
let or = ue;
|
|
5140
5236
|
const he = class he extends lt {
|
|
5141
5237
|
constructor(t, i) {
|
|
@@ -5148,7 +5244,7 @@ const he = class he extends lt {
|
|
|
5148
5244
|
this.es3DTileset.parentID = t.id;
|
|
5149
5245
|
{
|
|
5150
5246
|
const n = this._es3DTileset;
|
|
5151
|
-
t.components.disposableAdd(n, !0), this.d(
|
|
5247
|
+
t.components.disposableAdd(n, !0), this.d(I([n, "allowPicking"], [t, "allowPicking"])), this.d(I([n, "collision"], [t, "collision"])), this.d(L([n, "flyToParam"], [t, "flyToParam"])), this.d(L([n, "flyToParam"], [t, "flyToParam"])), this.d(I([n, "url"], [t, "url"])), this.d(I([n, "actorTag"], [t, "actorTag"])), this.d(I([n, "materialMode"], [t, "materialMode"])), this.d(I([n, "highlight"], [t, "highlight"])), this.d(I([n, "maximumScreenSpaceError"], [t, "maximumScreenSpaceError"])), this.d(I([n, "highlightID"], [t, "highlightID"])), this.d(I([n, "highlightColor"], [t, "highlightColor"])), this.d(L([n, "offset"], [t, "offset"])), this.d(L([n, "rotation"], [t, "rotation"])), this.d(I([n, "czmImageBasedLightingFactor"], [t, "czmImageBasedLightingFactor"])), this.d(I([n, "czmLuminanceAtZenith"], [t, "czmLuminanceAtZenith"])), this.d(I([n, "czmMaximumMemoryUsage"], [t, "czmMaximumMemoryUsage"])), this.d(I([n, "czmClassificationType"], [t, "czmClassificationType"])), this.d(I([n, "czmStyleJson"], [t, "czmStyleJson"])), this.d(I([n, "czmBackFaceCulling"], [t, "czmBackFaceCulling"])), this.d(I([n, "czmDebugShowBoundingVolume"], [t, "czmDebugShowBoundingVolume"])), this.d(I([n, "czmDebugShowContentBoundingVolume"], [t, "czmDebugShowContentBoundingVolume"])), this.d(I([n, "colorBlendMode"], [t, "colorBlendMode"])), this.d(I([n, "cacheBytes"], [t, "cacheBytes"])), this.d(I([n, "clippingPlaneEnabled"], [t, "clippingPlaneEnabled"])), this.d(I([n, "unionClippingRegions"], [t, "unionClippingRegions"])), this.d(I([n, "clippingPlaneEdgeColor"], [t, "clippingPlaneEdgeColor"])), this.d(I([n, "clippingPlaneEdgeWidth"], [t, "clippingPlaneEdgeWidth"])), this.d(I([n, "materialParams"], [t, "materialParams"])), this.d(L([n, "supportEdit"], [t, "supportEdit"])), this.d(L([n, "clippingPlanesId"], [t, "clippingPlanesId"])), this.d(L([n, "clippingPlaneIds"], [t, "clippingPlaneIds"])), this.d(L([n, "flattenedPlaneId"], [t, "flattenedPlaneId"])), this.d(L([n, "flattenedPlaneEnabled"], [t, "flattenedPlaneEnabled"])), this.d(L([n, "clippingPlaneId"], [t, "clippingPlaneId"])), this.d(L([n, "excavateId"], [t, "excavateId"]));
|
|
5152
5248
|
}
|
|
5153
5249
|
{
|
|
5154
5250
|
const n = this._es3DTileset;
|
|
@@ -5195,7 +5291,7 @@ const he = class he extends lt {
|
|
|
5195
5291
|
return this._es3DTileset;
|
|
5196
5292
|
}
|
|
5197
5293
|
};
|
|
5198
|
-
f(he, "type", he.register("ESUeViewer",
|
|
5294
|
+
f(he, "type", he.register("ESUeViewer", Yn.type, he));
|
|
5199
5295
|
let ar = he;
|
|
5200
5296
|
const pe = class pe extends lt {
|
|
5201
5297
|
constructor(e, t) {
|
|
@@ -5205,9 +5301,9 @@ const pe = class pe extends lt {
|
|
|
5205
5301
|
}
|
|
5206
5302
|
}
|
|
5207
5303
|
};
|
|
5208
|
-
f(pe, "type", pe.register("ESUeViewer",
|
|
5304
|
+
f(pe, "type", pe.register("ESUeViewer", Zn.type, pe));
|
|
5209
5305
|
let lr = pe;
|
|
5210
|
-
const fe = class fe extends
|
|
5306
|
+
const fe = class fe extends _ {
|
|
5211
5307
|
constructor(e, t) {
|
|
5212
5308
|
super(e, t);
|
|
5213
5309
|
const i = t.viewer;
|
|
@@ -5225,7 +5321,7 @@ const fe = class fe extends $ {
|
|
|
5225
5321
|
perPositionHeight: e.perPositionHeight ?? ye.defaults.perPositionHeight
|
|
5226
5322
|
}
|
|
5227
5323
|
});
|
|
5228
|
-
}, n = this.disposeVar(
|
|
5324
|
+
}, n = this.disposeVar(P(
|
|
5229
5325
|
e.heightChanged,
|
|
5230
5326
|
e.extrudedHeightChanged,
|
|
5231
5327
|
e.perPositionHeightChanged
|
|
@@ -5235,7 +5331,7 @@ const fe = class fe extends $ {
|
|
|
5235
5331
|
};
|
|
5236
5332
|
f(fe, "type", fe.register("ESUeViewer", ye.type, fe));
|
|
5237
5333
|
let dr = fe;
|
|
5238
|
-
const
|
|
5334
|
+
const ve = class ve extends S {
|
|
5239
5335
|
constructor(e, t) {
|
|
5240
5336
|
if (super(e, t), !t.viewer) {
|
|
5241
5337
|
console.warn("viewer is undefined!");
|
|
@@ -5243,9 +5339,9 @@ const ge = class ge extends E {
|
|
|
5243
5339
|
}
|
|
5244
5340
|
}
|
|
5245
5341
|
};
|
|
5246
|
-
f(
|
|
5247
|
-
let cr =
|
|
5248
|
-
const
|
|
5342
|
+
f(ve, "type", ve.register("ESUeViewer", qn.type, ve));
|
|
5343
|
+
let cr = ve;
|
|
5344
|
+
const ge = class ge extends B {
|
|
5249
5345
|
constructor(e, t) {
|
|
5250
5346
|
super(e, t);
|
|
5251
5347
|
const i = t.viewer;
|
|
@@ -5270,10 +5366,10 @@ const ve = class ve extends B {
|
|
|
5270
5366
|
}));
|
|
5271
5367
|
}
|
|
5272
5368
|
};
|
|
5273
|
-
f(
|
|
5274
|
-
let ur =
|
|
5369
|
+
f(ge, "type", ge.register("ESUeViewer", Vn.type, ge));
|
|
5370
|
+
let ur = ge, We;
|
|
5275
5371
|
try {
|
|
5276
|
-
const d = "earthsdk3-ue", e = "3.7.0-beta.
|
|
5372
|
+
const d = "earthsdk3-ue", e = "3.7.0-beta.16", t = "2025-12-19T02:00:38.000Z", i = "北京西部世界科技有限公司", r = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "e29deecbad468a096c911c7d606839856be97a79", o = ((Date.now() - 1766109638e3) / 36e5).toFixed(1), h = `%c🌏 ${d}%c ${e}.${n.slice(0, 8)}.${t} (距今${o}个小时)
|
|
5277
5373
|
%c${r ? r + `
|
|
5278
5374
|
` : ""}当前网站正在使用${d},此软件版权归${i}所有
|
|
5279
5375
|
`;
|
|
@@ -5287,7 +5383,7 @@ try {
|
|
|
5287
5383
|
},
|
|
5288
5384
|
// @ts-ignore
|
|
5289
5385
|
get gituri() {
|
|
5290
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
5386
|
+
return GITURI_ && GITURI_.replace("${commitId}", "e29deecbad468a096c911c7d606839856be97a79");
|
|
5291
5387
|
},
|
|
5292
5388
|
// @ts-ignore
|
|
5293
5389
|
get info() {
|
|
@@ -5295,7 +5391,7 @@ try {
|
|
|
5295
5391
|
},
|
|
5296
5392
|
// @ts-ignore
|
|
5297
5393
|
get date() {
|
|
5298
|
-
return "2025-12-
|
|
5394
|
+
return "2025-12-19T02:00:38.000Z";
|
|
5299
5395
|
},
|
|
5300
5396
|
// @ts-ignore
|
|
5301
5397
|
get author() {
|
|
@@ -5303,7 +5399,7 @@ try {
|
|
|
5303
5399
|
},
|
|
5304
5400
|
// @ts-ignore
|
|
5305
5401
|
get version() {
|
|
5306
|
-
return "3.7.0-beta.
|
|
5402
|
+
return "3.7.0-beta.16";
|
|
5307
5403
|
},
|
|
5308
5404
|
// @ts-ignore
|
|
5309
5405
|
get name() {
|
|
@@ -5311,7 +5407,7 @@ try {
|
|
|
5311
5407
|
},
|
|
5312
5408
|
// @ts-ignore
|
|
5313
5409
|
get commitId() {
|
|
5314
|
-
return "
|
|
5410
|
+
return "e29deecbad468a096c911c7d606839856be97a79";
|
|
5315
5411
|
},
|
|
5316
5412
|
print(a = !1) {
|
|
5317
5413
|
!a && globalThis._xe2_no_copy_print || console.info(
|
|
@@ -5342,13 +5438,13 @@ try {
|
|
|
5342
5438
|
} catch {
|
|
5343
5439
|
}
|
|
5344
5440
|
export {
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5441
|
+
G as ESUeViewer,
|
|
5442
|
+
Eo as GeoDivFromESImageLabel,
|
|
5443
|
+
Io as GeoDivFromESTextLabel,
|
|
5444
|
+
as as HighlightFeatureAndFlyToCallFunc,
|
|
5445
|
+
os as HighlightFeatureCallFunc,
|
|
5446
|
+
ds as SetLayerColorCallFunc,
|
|
5447
|
+
ls as SetLayerVisibleCallFunc,
|
|
5352
5448
|
Be as UeCloudViewerBase,
|
|
5353
5449
|
Ue as UeES3DTileset,
|
|
5354
5450
|
je as UeESAlarm,
|
|
@@ -5367,15 +5463,15 @@ export {
|
|
|
5367
5463
|
hi as UeESDistanceMeasurement,
|
|
5368
5464
|
pi as UeESDynamicWater,
|
|
5369
5465
|
fi as UeESEntityCluster,
|
|
5370
|
-
|
|
5371
|
-
|
|
5466
|
+
vi as UeESExcavate,
|
|
5467
|
+
gi as UeESFireParticleSystem,
|
|
5372
5468
|
wi as UeESForestTileset,
|
|
5373
5469
|
or as UeESGaussianSplatting,
|
|
5374
5470
|
yi as UeESGeoDiv,
|
|
5375
5471
|
dr as UeESGeoExtrudedPolygon,
|
|
5376
5472
|
mi as UeESGeoJson,
|
|
5377
5473
|
ze as UeESGeoLineString,
|
|
5378
|
-
|
|
5474
|
+
_ as UeESGeoPolygon,
|
|
5379
5475
|
Ci as UeESGeoRectangle,
|
|
5380
5476
|
B as UeESGeoVector,
|
|
5381
5477
|
Fi as UeESGeoWater,
|
|
@@ -5392,16 +5488,16 @@ export {
|
|
|
5392
5488
|
Pi as UeESLocalPolygonZ,
|
|
5393
5489
|
Li as UeESLocalRectangle,
|
|
5394
5490
|
Di as UeESLocalSkyBox,
|
|
5395
|
-
|
|
5491
|
+
xr as UeESLocalVector,
|
|
5396
5492
|
Ke as UeESLocalVector2D,
|
|
5397
5493
|
ki as UeESLocationMeasurement,
|
|
5398
5494
|
lr as UeESMsTileset,
|
|
5399
5495
|
rr as UeESNavigator,
|
|
5400
|
-
|
|
5496
|
+
S as UeESObjectWithLocation,
|
|
5401
5497
|
nr as UeESPath,
|
|
5402
5498
|
Bi as UeESPipeFence,
|
|
5403
|
-
|
|
5404
|
-
|
|
5499
|
+
Mi as UeESPipeline,
|
|
5500
|
+
_i as UeESPipeserTileset,
|
|
5405
5501
|
$i as UeESPit,
|
|
5406
5502
|
Wi as UeESPoi2D,
|
|
5407
5503
|
Ai as UeESPoi3D,
|
|
@@ -5419,9 +5515,9 @@ export {
|
|
|
5419
5515
|
Ki as UeESSunshineAnalysis,
|
|
5420
5516
|
Xi as UeESSurfaceAreaMeasurement,
|
|
5421
5517
|
Oe as UeESTerrainLayer,
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5518
|
+
Qi as UeESTextLabel,
|
|
5519
|
+
Yi as UeESUEWidget,
|
|
5520
|
+
qi as UeESUnrealActor,
|
|
5425
5521
|
Vi as UeESVideoFusion,
|
|
5426
5522
|
Oi as UeESViewShed,
|
|
5427
5523
|
sr as UeESViewerStatusBar,
|
|
@@ -5429,64 +5525,64 @@ export {
|
|
|
5429
5525
|
k as UeESVisualObject,
|
|
5430
5526
|
tr as UeESVolumeMeasurement,
|
|
5431
5527
|
er as UeESWidget,
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5528
|
+
Ws as bind3DTilesetByTagCallFunc,
|
|
5529
|
+
ks as bindActorByTagCallFunc,
|
|
5530
|
+
Ns as bindImageryByTagCallFunc,
|
|
5435
5531
|
dt as calcFlyToParamCallFunc,
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5532
|
+
Tr as callFunctionCallFunc,
|
|
5533
|
+
ms as captureCallFunc,
|
|
5534
|
+
J as changeNavigationModeCallFunc,
|
|
5439
5535
|
We as copyright,
|
|
5440
|
-
|
|
5441
|
-
|
|
5536
|
+
$s as createActorByClassCallFunc,
|
|
5537
|
+
Er as destroyCallFunc,
|
|
5442
5538
|
Re as flyInCallFunc,
|
|
5443
|
-
|
|
5539
|
+
es as flyInDefaultCameraCallFunc,
|
|
5444
5540
|
we as flyToCallFunc,
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5541
|
+
ss as generateMemReportCallFunc,
|
|
5542
|
+
Es as getAllSocketNamesByActorTagCallFunc,
|
|
5543
|
+
Ts as getBoundSphereCallFunc,
|
|
5544
|
+
xs as getBoundSphereWithChildrenCallFunc,
|
|
5545
|
+
Js as getCameraRelativeHeightCallFunc,
|
|
5546
|
+
Ps as getFillMaterialParamInfoCallFunc,
|
|
5547
|
+
Ls as getGlobalPropertyCallFunc,
|
|
5548
|
+
ws as getHeightByLonLatCallFunc,
|
|
5549
|
+
ys as getHeightByLonLatsCallFunc,
|
|
5550
|
+
Hs as getIdByComponentNameAndHitItemCallFunc,
|
|
5551
|
+
Fs as getLonLatAltToScreenPositionCallFunc,
|
|
5552
|
+
Ds as getObjectByInfoCallFunc,
|
|
5553
|
+
Qs as getStatusCallFunc,
|
|
5554
|
+
Rs as getStrokeMaterialParamInfoCallFunc,
|
|
5555
|
+
Vs as getTilesetMaterialIDListCallFunc,
|
|
5556
|
+
Ss as getVersionCallFunc,
|
|
5557
|
+
Ks as highlightActorByTagCallFunc,
|
|
5558
|
+
ns as mountPakFiles,
|
|
5463
5559
|
qs as moveObjectsCallFunc,
|
|
5464
|
-
|
|
5465
|
-
|
|
5560
|
+
Cs as partialCaptureCallFunc,
|
|
5561
|
+
vs as pickCallFunc,
|
|
5466
5562
|
gs as pickPositionCallFunc,
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5563
|
+
fs as quitCallFunc,
|
|
5564
|
+
ts as refreshTilesetCallFunc,
|
|
5565
|
+
Sr as resetWithCurrentCameraCallFunc,
|
|
5566
|
+
Bs as restoreOriginalSceneCallFunc,
|
|
5567
|
+
Gs as saveStringToFileCallFunc,
|
|
5568
|
+
Xs as sendCustomMessageCallFunc,
|
|
5569
|
+
ps as setGlobalPropertyCallFunc,
|
|
5570
|
+
cs as setNodePositionCallFunc,
|
|
5571
|
+
us as setNodeRotationCallFunc,
|
|
5572
|
+
hs as setNodeScaleCallFunc,
|
|
5477
5573
|
ke as smoothMoveCallFunc,
|
|
5478
5574
|
Le as smoothMoveOnGroundCallFunc,
|
|
5479
5575
|
Pe as smoothMoveWithRotationCallFunc,
|
|
5480
5576
|
De as smoothMoveWithRotationOnGroundCallFunc,
|
|
5481
5577
|
Ys as startEditingCallFunc,
|
|
5482
|
-
|
|
5578
|
+
is as startVoiceCallFunc,
|
|
5483
5579
|
Zs as stopEditingCallFunc,
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5580
|
+
rs as stopVoiceCallFunc,
|
|
5581
|
+
Is as uePositionToLonLatAltCallFunc,
|
|
5582
|
+
Us as unBind3DTilesetByIdCallFunc,
|
|
5583
|
+
As as unBind3DTilesetByTagCallFunc,
|
|
5584
|
+
Ms as unBindActorByIDCallFunc,
|
|
5489
5585
|
_s as unBindActorByTagCallFunc,
|
|
5490
|
-
|
|
5491
|
-
|
|
5586
|
+
bs as unBindImageryByIdCallFunc,
|
|
5587
|
+
zs as unBindImageryByTagCallFunc
|
|
5492
5588
|
};
|