earthsdk3-ue 3.6.0-beta.1 → 3.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/earthsdk3-ue.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Br = Object.defineProperty;
|
|
2
2
|
var _r = (d, e, t) => e in d ? Br(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t;
|
|
3
3
|
var v = (d, e, t) => _r(d, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { ESViewer as Ee, reactArrayWithUndefined as pr, ESSceneObject as
|
|
5
|
-
import { Logger as wr, Config as yr, TextParameters as qn, Flags as
|
|
4
|
+
import { ESViewer as Ee, reactArrayWithUndefined as pr, ESSceneObject as I, ESJPickedResult as Ae, Destroyable as m, HasOwner as Mr, createGuid as M, Event as S, createAnimateFrame as ze, createInterval as Se, react as W, createNextAnimateFrameEvent as L, ViewerCustomInteraction as vr, ObjResettingWithEvent as P, createProcessingFromAsyncFunc as Te, sleep as $r, getGeoBoundingSphereFromPositions as Wr, extendClassProps as Ar, EngineObject as G, ES3DTileset as me, ESImageryLayer as U, reactJson as He, ESTerrainLayer as Ur, ESAlarm as Nr, ESApertureEffect as br, ESGeoPolygon as zr, ESAreaMeasurement as j, ESBlastParticleSystem as Hr, ESBoxClipping as Jr, ESCameraView as Gr, ESCameraVisibleRange as Kr, ESCar as Xr, ESClassification as ct, ESClippingPlane as Yr, ESDataMesh as z, ESDatasmithRuntimeModel as Zr, ESDirectionMeasurement as qr, ESDistanceMeasurement as Me, ESLocalPolygon as Qr, ESDynamicWater as Vr, ESEntityCluster as Or, ESExcavate as jr, ESFireParticleSystem as tn, ESForestTileset as N, ESGeoDiv as Ce, ESTextLabel as gr, bind as k, ESCustomDiv as Je, ESImageLabel as fr, track as F, PosFloatDiv as en, ESGeoJson as rn, ESGeoLineString as nn, ESGeoRectangle as sn, ESGeoWater as on, rpToap as Fe, ESGltfModel as an, ESHeightMeasurement as ln, ESHuman as dn, ESLevelRuntimeModel as cn, ESLocalCircle as un, ESLocalPolygonZ as hn, ESLocalRectangle as pn, ESLocalSkyBox as vn, ESLocationMeasurement as gn, ESPipeFence as fn, ESPipeline as wn, ESPipeserTileset as yn, ESPit as mn, ESPoi2D as Cn, ESPoi3D as Fn, ESPoiTileset as In, ESPolygonFence as En, ESPolygonFlattenedPlane as Sn, ESPolygonWithHole as Tn, ESRtsTileset as xn, ESSeparateFoliage as Rn, addTreesCallFunc as Pn, removeAllTreesCallFunc as Ln, updateTreeParamsCallFunc as kn, cutDownTreesCallFunc as Dn, growthSimulationCallFunc as Bn, ESSubmergingAnalysis as _n, ESSunshineAnalysis as Mn, ESSurfaceAreaMeasurement as $n, ESUEWidget as Wn, ESUnrealActor as $e, ESVideoFusion as An, ESViewShed as Un, ESVisibilityAnalysis as Nn, ESVolumeMeasurement as bn, ESWidget as zn, ESHumanPoi as Hn, ESNavigator as tt, ESPath as Jn, ESViewerStatusBar as A, ESGaussianSplatting as Gn, ESRtsFeatureEditing as Kn, ESMsTileset as Xn, ESGeoExtrudedPolygon as ye, ESStaticMesh as Yn, ESSkylineAnalysis as Zn } from "earthsdk3";
|
|
5
|
+
import { Logger as wr, Config as yr, TextParameters as qn, Flags as at, NumericParameters as mr, PixelStreaming as Cr } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.2";
|
|
6
6
|
import Qn from "html2canvas";
|
|
7
7
|
var hr;
|
|
8
8
|
const Vn = {
|
|
@@ -75,7 +75,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
75
75
|
}, Ir = 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) => {
|
|
79
79
|
d.callUeFunc({
|
|
80
80
|
f: "calcFlyToParam",
|
|
81
81
|
p: { id: e }
|
|
@@ -179,7 +179,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
179
179
|
p: { id: e }
|
|
180
180
|
});
|
|
181
181
|
return t.error && console.error("resetWithCurrentCamera:", t.error), t;
|
|
182
|
-
},
|
|
182
|
+
}, Pe = (d, e, t, i, r) => {
|
|
183
183
|
d.callUeFunc({
|
|
184
184
|
f: "smoothMoveWithRotation",
|
|
185
185
|
p: {
|
|
@@ -193,7 +193,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
193
193
|
}).catch((n) => {
|
|
194
194
|
console.error("smoothMoveWithRotation:", n);
|
|
195
195
|
});
|
|
196
|
-
},
|
|
196
|
+
}, Le = (d, e, t, i, r, n) => {
|
|
197
197
|
d.callUeFunc({
|
|
198
198
|
f: "smoothMoveOnGround",
|
|
199
199
|
p: { id: e, Lon: t, Lat: i, Ground: r, Time: n }
|
|
@@ -314,10 +314,10 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
314
314
|
});
|
|
315
315
|
}, H = async (d, e) => {
|
|
316
316
|
if (e.mode == "Follow") {
|
|
317
|
-
const i =
|
|
317
|
+
const i = I.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 = I.getSceneObject(e.geoLineStringId);
|
|
321
321
|
e.geoLineStringId = i ? (i.components.main ?? i).id : e.geoLineStringId;
|
|
322
322
|
}
|
|
323
323
|
const t = await d.callUeFunc({
|
|
@@ -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 ? I.getSceneObject(n) : void 0;
|
|
363
|
+
return o && o.parentID && (o = I.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
|
}, vs = 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
|
+
}, gs = 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
|
+
}, fs = async (d, e, t = "ECC_Visibility") => {
|
|
386
386
|
const i = await d.callUeFunc({
|
|
387
387
|
f: "GetHeightsByLonLats",
|
|
388
388
|
p: { LonLats: e, Channel: t }
|
|
@@ -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
|
+
}, Ps = async (d, e) => {
|
|
510
510
|
const t = await d.callUeFunc({
|
|
511
511
|
f: "GetObjectByInfo",
|
|
512
512
|
p: { info: e }
|
|
@@ -516,7 +516,7 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
518
|
return t.re;
|
|
519
|
-
},
|
|
519
|
+
}, Ls = async (d, e, t) => await d.callUeFunc({
|
|
520
520
|
f: "BindActorByTag",
|
|
521
521
|
p: { ID: e, ActorTag: t }
|
|
522
522
|
}), ks = async (d) => await d.callUeFunc({
|
|
@@ -561,12 +561,12 @@ const we = async (d, e, t, i, r, n = "default") => {
|
|
|
561
561
|
f: "UnBindImageryById",
|
|
562
562
|
p: { ID: e }
|
|
563
563
|
});
|
|
564
|
-
},
|
|
564
|
+
}, bs = 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
|
+
}, zs = async function(d, e = "ECC_Visibility") {
|
|
570
570
|
return await d.callUeFunc({
|
|
571
571
|
f: "GetCameraRelativeHeight",
|
|
572
572
|
p: { Channel: e }
|
|
@@ -699,10 +699,10 @@ class Vs extends Mr {
|
|
|
699
699
|
let h = s[o / 4];
|
|
700
700
|
o += 4;
|
|
701
701
|
for (let a = 0; a < h; a++) {
|
|
702
|
-
let
|
|
702
|
+
let f = 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 + f));
|
|
705
|
+
o += f, this._processResponseFn(p);
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
}, i.readAsArrayBuffer(t.data);
|
|
@@ -791,7 +791,7 @@ class js extends m {
|
|
|
791
791
|
[qn.SignallingServerUrl]: i
|
|
792
792
|
}
|
|
793
793
|
});
|
|
794
|
-
return r.setFlagEnabled(
|
|
794
|
+
return r.setFlagEnabled(at.BrowserSendOffer, !1), r.setFlagEnabled(at.HoveringMouseMode, !0), r.setFlagEnabled(at.MatchViewportResolution, !0), r.setNumericSetting(mr.MaxReconnectAttempts, 0), new Cr(r, { videoElementParent: t });
|
|
795
795
|
}
|
|
796
796
|
get pixelStream() {
|
|
797
797
|
return this._pixelStream;
|
|
@@ -852,14 +852,14 @@ class js extends m {
|
|
|
852
852
|
}
|
|
853
853
|
// 发送UI interface
|
|
854
854
|
emitUIInteraction(t, i) {
|
|
855
|
-
typeof i == "function" && (t.callid =
|
|
855
|
+
typeof i == "function" && (t.callid = M(), this.uiInteractionCallbacks.set(t.callid, i)), this.pixelStream.emitUIInteraction(t);
|
|
856
856
|
}
|
|
857
857
|
get webRtcController() {
|
|
858
858
|
return this.pixelStream._webRtcController;
|
|
859
859
|
}
|
|
860
860
|
// 发送UI interface
|
|
861
861
|
emitUIInteractionForBigData(t, i) {
|
|
862
|
-
typeof i == "function" && (t.callid =
|
|
862
|
+
typeof i == "function" && (t.callid = M(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
863
863
|
const r = JSON.stringify(t), n = globalThis.g_emitDescriptor_maxBytes, s = r.length, o = ++Os;
|
|
864
864
|
if (this.esMsgWsWrapper) {
|
|
865
865
|
if (s < n) {
|
|
@@ -867,8 +867,8 @@ class js extends m {
|
|
|
867
867
|
return;
|
|
868
868
|
}
|
|
869
869
|
const h = Math.ceil(s / n) | 0;
|
|
870
|
-
[...new Array(h).keys()].map((
|
|
871
|
-
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-${p}/${h}-` +
|
|
870
|
+
[...new Array(h).keys()].map((f) => r.slice(f * n, (f + 1) * n)).forEach((f, p) => {
|
|
871
|
+
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-${p}/${h}-` + f);
|
|
872
872
|
});
|
|
873
873
|
}
|
|
874
874
|
}
|
|
@@ -991,8 +991,8 @@ class eo extends Be {
|
|
|
991
991
|
const c = o.webSocketReady;
|
|
992
992
|
if (this.videoinited && this.webRtcConnected && c) {
|
|
993
993
|
console.log("%c[EarthSDK: esmsgWebSocket && videoinited && webRtcConnected]", "background: #a6ec99; color: black");
|
|
994
|
-
const
|
|
995
|
-
o.emitUIInteractionForBigData(
|
|
994
|
+
const g = { eventType: "init", params: {} };
|
|
995
|
+
o.emitUIInteractionForBigData(g), this._readyEvent.emit(), h = !0;
|
|
996
996
|
}
|
|
997
997
|
};
|
|
998
998
|
this.d(this.videoinitedChanged.don(() => {
|
|
@@ -1007,9 +1007,9 @@ class eo extends Be {
|
|
|
1007
1007
|
if (u === "error")
|
|
1008
1008
|
this._errorEvent.emit(c);
|
|
1009
1009
|
else if (u === "ueevent") {
|
|
1010
|
-
const
|
|
1011
|
-
if (
|
|
1012
|
-
const w =
|
|
1010
|
+
const g = JSON.parse(c);
|
|
1011
|
+
if (g.t === "cr") {
|
|
1012
|
+
const w = g;
|
|
1013
1013
|
if (w.frs && this._ueFuncResultWithIdsEvent.emit(w.frs), w.ers)
|
|
1014
1014
|
for (let y of w.ers)
|
|
1015
1015
|
this._ueEvent.emit(y);
|
|
@@ -1017,26 +1017,26 @@ class eo extends Be {
|
|
|
1017
1017
|
} else u === "webRtcConnected" ? this.webRtcConnected = !0 : u === "videoinited" ? this.videoinited = !0 : u === "esmsgwsopen" && (this.esmsgwsopen = !0);
|
|
1018
1018
|
}));
|
|
1019
1019
|
{
|
|
1020
|
-
const u = this.dv(
|
|
1021
|
-
let c,
|
|
1020
|
+
const u = this.dv(ze());
|
|
1021
|
+
let c, g;
|
|
1022
1022
|
u.start(() => {
|
|
1023
|
-
if (c !== t.offsetWidth ||
|
|
1024
|
-
if (c = t.offsetWidth,
|
|
1025
|
-
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${c} ${
|
|
1023
|
+
if (c !== t.offsetWidth || g !== t.offsetHeight) {
|
|
1024
|
+
if (c = t.offsetWidth, g = t.offsetHeight, c === void 0 || g === void 0 || !Number.isFinite(c) || !Number.isFinite(g) || c < 0 || g < 0) {
|
|
1025
|
+
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${c} ${g}`);
|
|
1026
1026
|
return;
|
|
1027
1027
|
}
|
|
1028
|
-
o.resize(c,
|
|
1028
|
+
o.resize(c, g), console.log(`resize: ${c} ${g}`);
|
|
1029
1029
|
}
|
|
1030
1030
|
});
|
|
1031
1031
|
}
|
|
1032
1032
|
this.d(this._ueFuncResultWithIdsEvent.don((u) => {
|
|
1033
1033
|
for (const c of u) {
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1034
|
+
const g = this._waitingUeFuncIdAndResultCallbacks.get(c.fid);
|
|
1035
|
+
g && (this._waitingUeFuncIdAndResultCallbacks.delete(c.fid), g.resultCallback(c.r));
|
|
1036
1036
|
}
|
|
1037
1037
|
}));
|
|
1038
1038
|
let a = 0;
|
|
1039
|
-
const
|
|
1039
|
+
const f = (u) => {
|
|
1040
1040
|
const c = {
|
|
1041
1041
|
n: a++,
|
|
1042
1042
|
tt: Date.now(),
|
|
@@ -1055,19 +1055,19 @@ class eo extends Be {
|
|
|
1055
1055
|
}, p = () => {
|
|
1056
1056
|
if (!h || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1057
1057
|
const u = this._ueFuncWithIdAndResultCallbacks.map(([c]) => c);
|
|
1058
|
-
for (const [c,
|
|
1059
|
-
this._waitingUeFuncIdAndResultCallbacks.set(c.fid,
|
|
1058
|
+
for (const [c, g] of this._ueFuncWithIdAndResultCallbacks)
|
|
1059
|
+
this._waitingUeFuncIdAndResultCallbacks.set(c.fid, g);
|
|
1060
1060
|
this._ueFuncWithIdAndResultCallbacks.length = 0;
|
|
1061
1061
|
{
|
|
1062
|
-
const c = globalThis.g_emitDescriptor_maxBytes,
|
|
1063
|
-
let w =
|
|
1062
|
+
const c = globalThis.g_emitDescriptor_maxBytes, g = u.map((R) => ({ f: R, s: JSON.stringify(R).length }));
|
|
1063
|
+
let w = g.length, y = 0, x = 0, C = [];
|
|
1064
1064
|
do {
|
|
1065
1065
|
do {
|
|
1066
|
-
const { f: R, s: T } =
|
|
1066
|
+
const { f: R, s: T } = g[y];
|
|
1067
1067
|
if (C.push(R), ++y, x + T > c || C.length >= 20)
|
|
1068
1068
|
break;
|
|
1069
1069
|
} while (y < w);
|
|
1070
|
-
C.length > 0 && (s.debug && console.log(`传送${C.length}条消息...`),
|
|
1070
|
+
C.length > 0 && (s.debug && console.log(`传送${C.length}条消息...`), f([...C]), C.length = 0, x = 0);
|
|
1071
1071
|
} while (y < w);
|
|
1072
1072
|
}
|
|
1073
1073
|
};
|
|
@@ -1114,13 +1114,13 @@ class eo extends Be {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
callUeFunc(t) {
|
|
1116
1116
|
return new Promise((i) => {
|
|
1117
|
-
const n = { fid:
|
|
1117
|
+
const n = { fid: M(), ...t };
|
|
1118
1118
|
this._ueFuncWithIdAndResultCallbacks.push([n, { timeStamp: Date.now(), ueFunc: t, resultCallback: i }]);
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
1121
|
disposableOnUeEvent(t, i) {
|
|
1122
1122
|
(this._ueViewer.debug ?? !1) && console.log(`disposableOnUeEvent from UeCloudViewer, type:${t}`);
|
|
1123
|
-
const r =
|
|
1123
|
+
const r = M();
|
|
1124
1124
|
this.callUeFunc({
|
|
1125
1125
|
f: "addEventListener",
|
|
1126
1126
|
p: {
|
|
@@ -1186,7 +1186,7 @@ class oo extends m {
|
|
|
1186
1186
|
},
|
|
1187
1187
|
useUrlParams: !0
|
|
1188
1188
|
});
|
|
1189
|
-
r.setFlagEnabled(
|
|
1189
|
+
r.setFlagEnabled(at.BrowserSendOffer, !1), r.setFlagEnabled(at.HoveringMouseMode, !0), r.setFlagEnabled(at.MatchViewportResolution, !0), r.setNumericSetting(mr.MaxReconnectAttempts, 0), this._pixelStream = new Cr(r, { videoElementParent: this.container }), this.d(() => {
|
|
1190
1190
|
this._pixelStream.disconnect();
|
|
1191
1191
|
});
|
|
1192
1192
|
{
|
|
@@ -1199,8 +1199,8 @@ class oo extends m {
|
|
|
1199
1199
|
const n = (s) => {
|
|
1200
1200
|
const o = this._pixelStream._webRtcController.mouseController;
|
|
1201
1201
|
setTimeout(() => {
|
|
1202
|
-
const h = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY),
|
|
1203
|
-
|
|
1202
|
+
const h = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY), f = o.toStreamerMessagesProvider.toStreamerHandlers.get("MouseUp");
|
|
1203
|
+
f && f([s.button, h.x, h.y]), s.preventDefault();
|
|
1204
1204
|
});
|
|
1205
1205
|
};
|
|
1206
1206
|
this.container.addEventListener("dblclick", n), this.d(() => {
|
|
@@ -1264,20 +1264,20 @@ class oo extends m {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
//大数据拆分
|
|
1266
1266
|
emitUIInteractionForBigData(t, i) {
|
|
1267
|
-
typeof i == "function" && (t.callid =
|
|
1267
|
+
typeof i == "function" && (t.callid = M(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
1268
1268
|
const r = JSON.stringify(t), n = globalThis.g_emitDescriptor_maxBytes ?? 3e4, s = r.length, o = ++so;
|
|
1269
1269
|
if (s < n) {
|
|
1270
|
-
const
|
|
1270
|
+
const f = {
|
|
1271
1271
|
type: "earthsdk",
|
|
1272
1272
|
time: (/* @__PURE__ */ new Date()).getTime(),
|
|
1273
1273
|
params: `${o}-0/1-` + r
|
|
1274
1274
|
};
|
|
1275
|
-
this.sendData(JSON.stringify(
|
|
1275
|
+
this.sendData(JSON.stringify(f));
|
|
1276
1276
|
return;
|
|
1277
1277
|
}
|
|
1278
1278
|
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}-` +
|
|
1279
|
+
[...new Array(h).keys()].map((f) => r.slice(f * n, (f + 1) * n)).forEach((f, p) => {
|
|
1280
|
+
const l = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${p}/${h}-` + f };
|
|
1281
1281
|
this.sendData(JSON.stringify(l));
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
@@ -1385,7 +1385,7 @@ class lo extends Be {
|
|
|
1385
1385
|
}
|
|
1386
1386
|
{
|
|
1387
1387
|
let l = !1;
|
|
1388
|
-
const u = this.dv(
|
|
1388
|
+
const u = this.dv(L(
|
|
1389
1389
|
this._videoInitialized.changed,
|
|
1390
1390
|
this._webRtcConnected.changed,
|
|
1391
1391
|
this._webSocketOpen.changed
|
|
@@ -1395,8 +1395,8 @@ class lo extends Be {
|
|
|
1395
1395
|
const c = this._ue5ViewerWrapper.instance.webSocketReady;
|
|
1396
1396
|
if (this.videoInitialized && this.webRtcConnected && c) {
|
|
1397
1397
|
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(
|
|
1398
|
+
const g = { eventType: "init", params: {} };
|
|
1399
|
+
this._ue5ViewerWrapper.emitUIInteractionForBigData(g);
|
|
1400
1400
|
} else
|
|
1401
1401
|
console.warn("webSocketReady", c), l = !1;
|
|
1402
1402
|
}));
|
|
@@ -1413,23 +1413,23 @@ class lo extends Be {
|
|
|
1413
1413
|
else if (l === "ueevent") {
|
|
1414
1414
|
const c = JSON.parse(u);
|
|
1415
1415
|
if (c.t === "cr") {
|
|
1416
|
-
const
|
|
1417
|
-
if (
|
|
1418
|
-
for (let w of
|
|
1416
|
+
const g = c;
|
|
1417
|
+
if (g.frs && this._ueFuncResultWithIdsEvent.emit(g.frs), g.ers)
|
|
1418
|
+
for (let w of g.ers)
|
|
1419
1419
|
this._ueEvent.emit(w);
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
1422
|
}));
|
|
1423
1423
|
{
|
|
1424
|
-
const l = this.dv(
|
|
1425
|
-
let u, c,
|
|
1424
|
+
const l = this.dv(ze());
|
|
1425
|
+
let u, c, g;
|
|
1426
1426
|
l.start(() => {
|
|
1427
|
-
if (u !== t.offsetWidth || c !== t.offsetHeight ||
|
|
1427
|
+
if (u !== t.offsetWidth || c !== t.offsetHeight || g !== s.resolutionScale) {
|
|
1428
1428
|
if (u = t.offsetWidth, c = t.offsetHeight, u === void 0 || c === void 0 || !Number.isFinite(u) || !Number.isFinite(c) || u < 0 || c < 0) {
|
|
1429
1429
|
console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${u} ${c}`);
|
|
1430
1430
|
return;
|
|
1431
1431
|
}
|
|
1432
|
-
|
|
1432
|
+
g = s.resolutionScale, o.resize(u / g, c / g);
|
|
1433
1433
|
}
|
|
1434
1434
|
});
|
|
1435
1435
|
}
|
|
@@ -1456,18 +1456,18 @@ class lo extends Be {
|
|
|
1456
1456
|
), console.groupEnd()), this._ue5ViewerWrapper.emitUIInteractionForBigData(u, () => {
|
|
1457
1457
|
this._waitingUeCalls.delete(u);
|
|
1458
1458
|
});
|
|
1459
|
-
},
|
|
1459
|
+
}, f = () => {
|
|
1460
1460
|
if (!this._ue5ViewerWrapper.instance.webSocketReady || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1461
1461
|
const u = this._ueFuncWithIdAndResultCallbacks.map(([c]) => c);
|
|
1462
|
-
for (const [c,
|
|
1463
|
-
this._waitingUeFuncIdAndResultCallbacks.set(c.fid,
|
|
1462
|
+
for (const [c, g] of this._ueFuncWithIdAndResultCallbacks)
|
|
1463
|
+
this._waitingUeFuncIdAndResultCallbacks.set(c.fid, g);
|
|
1464
1464
|
this._ueFuncWithIdAndResultCallbacks.length = 0;
|
|
1465
1465
|
{
|
|
1466
|
-
const c = globalThis.g_emitDescriptor_maxBytes,
|
|
1467
|
-
let w =
|
|
1466
|
+
const c = globalThis.g_emitDescriptor_maxBytes, g = u.map((R) => ({ f: R, s: JSON.stringify(R).length }));
|
|
1467
|
+
let w = g.length, y = 0, x = 0, C = [];
|
|
1468
1468
|
do {
|
|
1469
1469
|
do {
|
|
1470
|
-
const { f: R, s: T } =
|
|
1470
|
+
const { f: R, s: T } = g[y];
|
|
1471
1471
|
if (C.push(R), ++y, x + T > c || C.length >= 20)
|
|
1472
1472
|
break;
|
|
1473
1473
|
} while (y < w);
|
|
@@ -1475,7 +1475,7 @@ class lo extends Be {
|
|
|
1475
1475
|
} while (y < w);
|
|
1476
1476
|
}
|
|
1477
1477
|
};
|
|
1478
|
-
this.dv(Se()).start(
|
|
1478
|
+
this.dv(Se()).start(f, 50), this.d(() => console.log("UeCloudViewer正在销毁..."));
|
|
1479
1479
|
}
|
|
1480
1480
|
get videoInitialized() {
|
|
1481
1481
|
return this._videoInitialized.value;
|
|
@@ -1500,12 +1500,12 @@ class lo extends Be {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
callUeFunc(t) {
|
|
1502
1502
|
return new Promise((i) => {
|
|
1503
|
-
const n = { fid:
|
|
1503
|
+
const n = { fid: M(), ...t };
|
|
1504
1504
|
this._ueFuncWithIdAndResultCallbacks.push([n, { timeStamp: Date.now(), ueFunc: t, resultCallback: i }]);
|
|
1505
1505
|
});
|
|
1506
1506
|
}
|
|
1507
1507
|
disposableOnUeEvent(t, i) {
|
|
1508
|
-
const r =
|
|
1508
|
+
const r = M();
|
|
1509
1509
|
this.callUeFunc({
|
|
1510
1510
|
f: "addEventListener",
|
|
1511
1511
|
p: {
|
|
@@ -1548,7 +1548,7 @@ class co extends m {
|
|
|
1548
1548
|
this._vIframe = o, o.style.cssText = "width: 100%; height: 100%; margin: 0; padding: 0; border: none; outline: none;", t.appendChild(o), this.d(() => {
|
|
1549
1549
|
o && t.removeChild(o);
|
|
1550
1550
|
});
|
|
1551
|
-
const h =
|
|
1551
|
+
const h = I.getStrFromEnv(r + `/web/${i}.html`);
|
|
1552
1552
|
o.src = h, o.onload = () => {
|
|
1553
1553
|
const a = o.contentWindow;
|
|
1554
1554
|
if (!a) {
|
|
@@ -1610,7 +1610,7 @@ class ho extends m {
|
|
|
1610
1610
|
const a = t[h + "Changed"];
|
|
1611
1611
|
s.push(a);
|
|
1612
1612
|
});
|
|
1613
|
-
const o = this.dv(
|
|
1613
|
+
const o = this.dv(L(...s));
|
|
1614
1614
|
this.d(o.don(r));
|
|
1615
1615
|
}
|
|
1616
1616
|
this.d(t.propChanged.don((r) => {
|
|
@@ -1623,49 +1623,49 @@ class ho extends m {
|
|
|
1623
1623
|
} catch (n) {
|
|
1624
1624
|
console.error("ueViewer propChanged:" + n);
|
|
1625
1625
|
}
|
|
1626
|
-
})), t.useCustomInteraction = !1, this.dv(new vr(t, e)), this.dv(new
|
|
1626
|
+
})), t.useCustomInteraction = !1, this.dv(new vr(t, e)), this.dv(new P(t.statusUpdateIntervalChanged, (r) => {
|
|
1627
1627
|
if ((t.statusUpdateInterval ?? 0.5) === 0) return;
|
|
1628
1628
|
const s = new m();
|
|
1629
1629
|
return s.d(i.disposableOnUeEvent("statusUpdate", (o) => {
|
|
1630
1630
|
t.statusUpdateEvent.emit(o);
|
|
1631
1631
|
})), s;
|
|
1632
|
-
})), this.dv(new
|
|
1632
|
+
})), this.dv(new P(t.propChangedListeningChanged, () => {
|
|
1633
1633
|
if (!(t.propChangedListening ?? !0)) return;
|
|
1634
1634
|
const n = new m();
|
|
1635
1635
|
return n.d(i.disposableOnUeEvent("propChanged", (s) => {
|
|
1636
1636
|
t.propChanged.emit(s);
|
|
1637
1637
|
})), n;
|
|
1638
|
-
})), this.dv(new
|
|
1638
|
+
})), this.dv(new P(t.objectEventListeningChanged, () => {
|
|
1639
1639
|
if (!(t.objectEventListening ?? !0)) return;
|
|
1640
1640
|
const n = new m();
|
|
1641
1641
|
return n.d(i.disposableOnUeEvent("objectEvent", (s) => {
|
|
1642
1642
|
t.objectEvent.emit(s);
|
|
1643
1643
|
})), n;
|
|
1644
|
-
})), this.dv(new
|
|
1644
|
+
})), this.dv(new P(t.widgetEventListeningChanged, () => {
|
|
1645
1645
|
if (!(t.widgetEventListening ?? !0)) return;
|
|
1646
1646
|
const n = new m();
|
|
1647
1647
|
return n.d(i.disposableOnUeEvent("widgetEvent", (s) => {
|
|
1648
1648
|
t.widgetEvent.emit(s);
|
|
1649
1649
|
})), n;
|
|
1650
|
-
})), this.dv(new
|
|
1650
|
+
})), this.dv(new P(t.speechRecognitionListeningChanged, () => {
|
|
1651
1651
|
if (!(t.speechRecognitionListening ?? !0)) return;
|
|
1652
1652
|
const n = new m();
|
|
1653
1653
|
return n.d(i.disposableOnUeEvent("speechRecognition", (s) => {
|
|
1654
1654
|
t.speechRecognition.emit(s);
|
|
1655
1655
|
})), n;
|
|
1656
|
-
})), this.dv(new
|
|
1656
|
+
})), this.dv(new P(t.customMessageListeningChanged, () => {
|
|
1657
1657
|
if (!(t.customMessageListening ?? !0)) return;
|
|
1658
1658
|
const n = new m();
|
|
1659
1659
|
return n.d(i.disposableOnUeEvent("customMessage", (s) => {
|
|
1660
1660
|
t.customMessage.emit(s);
|
|
1661
1661
|
})), n;
|
|
1662
|
-
})), this.dv(new
|
|
1662
|
+
})), this.dv(new P(t.editingEventListeningChanged, () => {
|
|
1663
1663
|
if (!(t.editingEventListening ?? !0)) return;
|
|
1664
1664
|
const n = new m();
|
|
1665
1665
|
return n.d(i.disposableOnUeEvent("editingEvent", (s) => {
|
|
1666
1666
|
s.objectIDs = s.objectIDs.map((o) => {
|
|
1667
1667
|
var h;
|
|
1668
|
-
return ((h =
|
|
1668
|
+
return ((h = I.getSceneObjById(o)) == null ? void 0 : h.parentID) ?? o;
|
|
1669
1669
|
}), t.editingEvent.emit(s);
|
|
1670
1670
|
})), n;
|
|
1671
1671
|
})), this.ad(i.disposableOnUeEvent("cameraChanged", () => {
|
|
@@ -1706,7 +1706,7 @@ class vo extends Be {
|
|
|
1706
1706
|
}
|
|
1707
1707
|
a.UE_JSHTML5Communication ? a.UE_JSHTML5Communication.UESendMessageToJS = (c) => {
|
|
1708
1708
|
try {
|
|
1709
|
-
const
|
|
1709
|
+
const g = uo(a.HEAPU8, c), w = JSON.parse(g);
|
|
1710
1710
|
if (s.debug && (console.group(
|
|
1711
1711
|
"%cUE => JS",
|
|
1712
1712
|
" background-color:#006EFF;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
@@ -1720,22 +1720,22 @@ class vo extends Be {
|
|
|
1720
1720
|
this._ueEvent.emit(x);
|
|
1721
1721
|
}
|
|
1722
1722
|
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:",
|
|
1723
|
+
} catch (g) {
|
|
1724
|
+
console.error("UE_JSHTML5Communication.UESendMessageToJS error:", g);
|
|
1725
1725
|
}
|
|
1726
1726
|
} : console.error("UE_JSHTML5Communication UESendMessageToJS not found");
|
|
1727
1727
|
})), this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((u) => {
|
|
1728
1728
|
for (const c of u) {
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1729
|
+
const g = this._waitingUeFuncIdAndResultCallbacks.get(c.fid);
|
|
1730
|
+
g && (this._waitingUeFuncIdAndResultCallbacks.delete(c.fid), g(c.r));
|
|
1731
1731
|
}
|
|
1732
1732
|
}));
|
|
1733
|
-
let
|
|
1733
|
+
let f = 0;
|
|
1734
1734
|
const p = () => {
|
|
1735
1735
|
if (!h || !a || !a.UE_JSHTML5Communication || !a.UE_JSHTML5Communication.JSSendMessageToUE || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1736
|
-
const u = this._ueFuncWithIdAndResultCallbacks.map(([T]) => T), c = { n:
|
|
1737
|
-
for (const [T,
|
|
1738
|
-
this._waitingUeFuncIdAndResultCallbacks.set(T.fid,
|
|
1736
|
+
const u = this._ueFuncWithIdAndResultCallbacks.map(([T]) => T), c = { n: f++, tt: Date.now(), t: "c", fs: u, callid: M() };
|
|
1737
|
+
for (const [T, _] of this._ueFuncWithIdAndResultCallbacks)
|
|
1738
|
+
this._waitingUeFuncIdAndResultCallbacks.set(T.fid, _);
|
|
1739
1739
|
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.set(c.callid, c), s.debug && (console.group(
|
|
1740
1740
|
"%cxe2 => ue",
|
|
1741
1741
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
@@ -1743,15 +1743,15 @@ class vo extends Be {
|
|
|
1743
1743
|
`%c${JSON.stringify(c, void 0, "")}`,
|
|
1744
1744
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1745
1745
|
), console.groupEnd());
|
|
1746
|
-
const
|
|
1746
|
+
const g = JSON.stringify(c), w = globalThis.g_emitDescriptor_maxBytes ?? 3e4, y = g.length, x = ++po;
|
|
1747
1747
|
if (y < w) {
|
|
1748
|
-
const T = `${x}-0/1-` +
|
|
1748
|
+
const T = `${x}-0/1-` + g;
|
|
1749
1749
|
a.UE_JSHTML5Communication.JSSendMessageToUE(T);
|
|
1750
1750
|
return;
|
|
1751
1751
|
}
|
|
1752
1752
|
const C = Math.ceil(y / w) | 0;
|
|
1753
|
-
[...new Array(C).keys()].map((T) =>
|
|
1754
|
-
const _e = `${x}-${
|
|
1753
|
+
[...new Array(C).keys()].map((T) => g.slice(T * w, (T + 1) * w)).forEach((T, _) => {
|
|
1754
|
+
const _e = `${x}-${_}/${C}-` + T;
|
|
1755
1755
|
a.UE_JSHTML5Communication.JSSendMessageToUE(_e);
|
|
1756
1756
|
});
|
|
1757
1757
|
};
|
|
@@ -1774,12 +1774,12 @@ class vo extends Be {
|
|
|
1774
1774
|
}
|
|
1775
1775
|
callUeFunc(t) {
|
|
1776
1776
|
return new Promise((i) => {
|
|
1777
|
-
const n = { fid:
|
|
1777
|
+
const n = { fid: M(), ...t };
|
|
1778
1778
|
this._ueFuncWithIdAndResultCallbacks.push([n, i]);
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
1781
1781
|
disposableOnUeEvent(t, i) {
|
|
1782
|
-
const r =
|
|
1782
|
+
const r = M();
|
|
1783
1783
|
this.callUeFunc({
|
|
1784
1784
|
f: "addEventListener",
|
|
1785
1785
|
p: {
|
|
@@ -1802,8 +1802,8 @@ class vo extends Be {
|
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
let
|
|
1806
|
-
class
|
|
1805
|
+
let go = -1;
|
|
1806
|
+
class fo extends Be {
|
|
1807
1807
|
constructor(t, i) {
|
|
1808
1808
|
super();
|
|
1809
1809
|
v(this, "_ueFuncResultWithIdsEvent", this.dv(new S()));
|
|
@@ -1818,8 +1818,8 @@ class go extends Be {
|
|
|
1818
1818
|
eventType: "init",
|
|
1819
1819
|
params: {}
|
|
1820
1820
|
};
|
|
1821
|
-
globalThis.ue.es.oncommand(JSON.stringify(s)), n = !0, globalThis.calljs = (
|
|
1822
|
-
if (r.debug && console.log(`calljs eventName:${
|
|
1821
|
+
globalThis.ue.es.oncommand(JSON.stringify(s)), n = !0, globalThis.calljs = (f, p) => {
|
|
1822
|
+
if (r.debug && console.log(`calljs eventName:${f} eventDetailStr:${p}`), f === "ueevent" || f === "commanFinish")
|
|
1823
1823
|
try {
|
|
1824
1824
|
const l = JSON.parse(p);
|
|
1825
1825
|
if (l.t === "cr") {
|
|
@@ -1831,8 +1831,8 @@ class go extends Be {
|
|
|
1831
1831
|
} catch (l) {
|
|
1832
1832
|
console.error(l);
|
|
1833
1833
|
}
|
|
1834
|
-
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((
|
|
1835
|
-
for (const p of
|
|
1834
|
+
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((f) => {
|
|
1835
|
+
for (const p of f) {
|
|
1836
1836
|
const l = this._waitingUeFuncIdAndResultCallbacks.get(p.fid);
|
|
1837
1837
|
l && (this._waitingUeFuncIdAndResultCallbacks.delete(p.fid), l(p.r));
|
|
1838
1838
|
}
|
|
@@ -1840,11 +1840,11 @@ class go extends Be {
|
|
|
1840
1840
|
let o = 0;
|
|
1841
1841
|
const h = () => {
|
|
1842
1842
|
if (!n || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1843
|
-
const
|
|
1843
|
+
const f = this._ueFuncWithIdAndResultCallbacks.map(([u]) => u), p = {
|
|
1844
1844
|
n: o++,
|
|
1845
1845
|
tt: Date.now(),
|
|
1846
1846
|
t: "c",
|
|
1847
|
-
fs:
|
|
1847
|
+
fs: f
|
|
1848
1848
|
};
|
|
1849
1849
|
for (const [u, c] of this._ueFuncWithIdAndResultCallbacks)
|
|
1850
1850
|
this._waitingUeFuncIdAndResultCallbacks.set(u.fid, c);
|
|
@@ -1855,7 +1855,7 @@ class go extends Be {
|
|
|
1855
1855
|
`%c${JSON.stringify(p, void 0, "")}`,
|
|
1856
1856
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1857
1857
|
), console.groupEnd());
|
|
1858
|
-
const l = ++
|
|
1858
|
+
const l = ++go;
|
|
1859
1859
|
globalThis.ue.es.oncommand(`${l}-0/1-` + JSON.stringify(p)).then(() => {
|
|
1860
1860
|
this._waitingUeCalls.delete(p);
|
|
1861
1861
|
});
|
|
@@ -1864,12 +1864,12 @@ class go extends Be {
|
|
|
1864
1864
|
}
|
|
1865
1865
|
callUeFunc(t) {
|
|
1866
1866
|
return new Promise((i) => {
|
|
1867
|
-
const n = { fid:
|
|
1867
|
+
const n = { fid: M(), ...t };
|
|
1868
1868
|
this._ueFuncWithIdAndResultCallbacks.push([n, i]);
|
|
1869
1869
|
});
|
|
1870
1870
|
}
|
|
1871
1871
|
disposableOnUeEvent(t, i) {
|
|
1872
|
-
const r =
|
|
1872
|
+
const r = M();
|
|
1873
1873
|
this.callUeFunc({
|
|
1874
1874
|
f: "addEventListener",
|
|
1875
1875
|
p: {
|
|
@@ -1906,7 +1906,7 @@ class wo extends m {
|
|
|
1906
1906
|
const h = e[o + "Changed"];
|
|
1907
1907
|
n.push(h);
|
|
1908
1908
|
});
|
|
1909
|
-
const s = this.dv(
|
|
1909
|
+
const s = this.dv(L(...n));
|
|
1910
1910
|
this.d(s.don(i));
|
|
1911
1911
|
}
|
|
1912
1912
|
this.d(e.propChanged.don((i) => {
|
|
@@ -1919,49 +1919,49 @@ class wo extends m {
|
|
|
1919
1919
|
} catch (r) {
|
|
1920
1920
|
console.error("ueViewer propChanged:" + r);
|
|
1921
1921
|
}
|
|
1922
|
-
})), this.dv(new
|
|
1922
|
+
})), this.dv(new P(e.statusUpdateIntervalChanged, (i) => {
|
|
1923
1923
|
if ((e.statusUpdateInterval ?? 0.5) === 0) return;
|
|
1924
1924
|
const n = new m();
|
|
1925
1925
|
return n.d(t.disposableOnUeEvent("statusUpdate", (s) => {
|
|
1926
1926
|
e.statusUpdateEvent.emit(s);
|
|
1927
1927
|
})), n;
|
|
1928
|
-
})), this.dv(new
|
|
1928
|
+
})), this.dv(new P(e.propChangedListeningChanged, () => {
|
|
1929
1929
|
if (!(e.propChangedListening ?? !0)) return;
|
|
1930
1930
|
const r = new m();
|
|
1931
1931
|
return r.d(t.disposableOnUeEvent("propChanged", (n) => {
|
|
1932
1932
|
e.propChanged.emit(n);
|
|
1933
1933
|
})), r;
|
|
1934
|
-
})), this.dv(new
|
|
1934
|
+
})), this.dv(new P(e.objectEventListeningChanged, () => {
|
|
1935
1935
|
if (!(e.objectEventListening ?? !0)) return;
|
|
1936
1936
|
const r = new m();
|
|
1937
1937
|
return r.d(t.disposableOnUeEvent("objectEvent", (n) => {
|
|
1938
1938
|
e.objectEvent.emit(n);
|
|
1939
1939
|
})), r;
|
|
1940
|
-
})), this.dv(new
|
|
1940
|
+
})), this.dv(new P(e.widgetEventListeningChanged, () => {
|
|
1941
1941
|
if (!(e.widgetEventListening ?? !0)) return;
|
|
1942
1942
|
const r = new m();
|
|
1943
1943
|
return r.d(t.disposableOnUeEvent("widgetEvent", (n) => {
|
|
1944
1944
|
e.widgetEvent.emit(n);
|
|
1945
1945
|
})), r;
|
|
1946
|
-
})), this.dv(new
|
|
1946
|
+
})), this.dv(new P(e.speechRecognitionListeningChanged, () => {
|
|
1947
1947
|
if (!(e.speechRecognitionListening ?? !0)) return;
|
|
1948
1948
|
const r = new m();
|
|
1949
1949
|
return r.d(t.disposableOnUeEvent("speechRecognition", (n) => {
|
|
1950
1950
|
e.speechRecognition.emit(n);
|
|
1951
1951
|
})), r;
|
|
1952
|
-
})), this.dv(new
|
|
1952
|
+
})), this.dv(new P(e.customMessageListeningChanged, () => {
|
|
1953
1953
|
if (!(e.customMessageListening ?? !0)) return;
|
|
1954
1954
|
const r = new m();
|
|
1955
1955
|
return r.d(t.disposableOnUeEvent("customMessage", (n) => {
|
|
1956
1956
|
e.customMessage.emit(n);
|
|
1957
1957
|
})), r;
|
|
1958
|
-
})), this.dv(new
|
|
1958
|
+
})), this.dv(new P(e.editingEventListeningChanged, () => {
|
|
1959
1959
|
if (!(e.editingEventListening ?? !0)) return;
|
|
1960
1960
|
const r = new m();
|
|
1961
1961
|
return r.d(t.disposableOnUeEvent("editingEvent", (n) => {
|
|
1962
1962
|
n.objectIDs = n.objectIDs.map((s) => {
|
|
1963
1963
|
var o;
|
|
1964
|
-
return ((o =
|
|
1964
|
+
return ((o = I.getSceneObjById(s)) == null ? void 0 : o.parentID) ?? s;
|
|
1965
1965
|
}), e.editingEvent.emit(n);
|
|
1966
1966
|
})), r;
|
|
1967
1967
|
})), this.ad(t.disposableOnUeEvent("cameraChanged", () => {
|
|
@@ -1980,10 +1980,10 @@ class yo extends m {
|
|
|
1980
1980
|
n();
|
|
1981
1981
|
const s = xe(), o = [];
|
|
1982
1982
|
s.forEach((a) => {
|
|
1983
|
-
const
|
|
1984
|
-
o.push(
|
|
1983
|
+
const f = t[a + "Changed"];
|
|
1984
|
+
o.push(f);
|
|
1985
1985
|
});
|
|
1986
|
-
const h = this.dv(
|
|
1986
|
+
const h = this.dv(L(...o));
|
|
1987
1987
|
this.d(h.don(n));
|
|
1988
1988
|
}
|
|
1989
1989
|
this.d(t.propChanged.don((n) => {
|
|
@@ -2002,8 +2002,8 @@ class yo extends m {
|
|
|
2002
2002
|
r && e && e.removeChild(r);
|
|
2003
2003
|
});
|
|
2004
2004
|
{
|
|
2005
|
-
const n = (a,
|
|
2006
|
-
globalThis.ue.esinput.setinterceptevent(
|
|
2005
|
+
const n = (a, f) => {
|
|
2006
|
+
globalThis.ue.esinput.setinterceptevent(f), a.preventDefault();
|
|
2007
2007
|
}, s = (a) => {
|
|
2008
2008
|
n(a, !1);
|
|
2009
2009
|
}, o = (a) => {
|
|
@@ -2015,49 +2015,49 @@ class yo extends m {
|
|
|
2015
2015
|
r.removeEventListener("mouseenter", s), r.removeEventListener("mouseleave", o), r.removeEventListener("mousemove", h);
|
|
2016
2016
|
});
|
|
2017
2017
|
}
|
|
2018
|
-
t.useCustomInteraction = !1, this.dv(new vr(t, r)), this.dv(new
|
|
2018
|
+
t.useCustomInteraction = !1, this.dv(new vr(t, r)), this.dv(new P(t.statusUpdateIntervalChanged, (n) => {
|
|
2019
2019
|
if ((t.statusUpdateInterval ?? 0.5) === 0) return;
|
|
2020
2020
|
const o = new m();
|
|
2021
2021
|
return o.d(i.disposableOnUeEvent("statusUpdate", (h) => {
|
|
2022
2022
|
t.statusUpdateEvent.emit(h);
|
|
2023
2023
|
})), o;
|
|
2024
|
-
})), this.dv(new
|
|
2024
|
+
})), this.dv(new P(t.propChangedListeningChanged, () => {
|
|
2025
2025
|
if (!(t.propChangedListening ?? !0)) return;
|
|
2026
2026
|
const s = new m();
|
|
2027
2027
|
return s.d(i.disposableOnUeEvent("propChanged", (o) => {
|
|
2028
2028
|
t.propChanged.emit(o);
|
|
2029
2029
|
})), s;
|
|
2030
|
-
})), this.dv(new
|
|
2030
|
+
})), this.dv(new P(t.objectEventListeningChanged, () => {
|
|
2031
2031
|
if (!(t.objectEventListening ?? !0)) return;
|
|
2032
2032
|
const s = new m();
|
|
2033
2033
|
return s.d(i.disposableOnUeEvent("objectEvent", (o) => {
|
|
2034
2034
|
t.objectEvent.emit(o);
|
|
2035
2035
|
})), s;
|
|
2036
|
-
})), this.dv(new
|
|
2036
|
+
})), this.dv(new P(t.widgetEventListeningChanged, () => {
|
|
2037
2037
|
if (!(t.widgetEventListening ?? !0)) return;
|
|
2038
2038
|
const s = new m();
|
|
2039
2039
|
return s.d(i.disposableOnUeEvent("widgetEvent", (o) => {
|
|
2040
2040
|
t.widgetEvent.emit(o);
|
|
2041
2041
|
})), s;
|
|
2042
|
-
})), this.dv(new
|
|
2042
|
+
})), this.dv(new P(t.speechRecognitionListeningChanged, () => {
|
|
2043
2043
|
if (!(t.speechRecognitionListening ?? !0)) return;
|
|
2044
2044
|
const s = new m();
|
|
2045
2045
|
return s.d(i.disposableOnUeEvent("speechRecognition", (o) => {
|
|
2046
2046
|
t.speechRecognition.emit(o);
|
|
2047
2047
|
})), s;
|
|
2048
|
-
})), this.dv(new
|
|
2048
|
+
})), this.dv(new P(t.customMessageListeningChanged, () => {
|
|
2049
2049
|
if (!(t.customMessageListening ?? !0)) return;
|
|
2050
2050
|
const s = new m();
|
|
2051
2051
|
return s.d(i.disposableOnUeEvent("customMessage", (o) => {
|
|
2052
2052
|
t.customMessage.emit(o);
|
|
2053
2053
|
})), s;
|
|
2054
|
-
})), this.dv(new
|
|
2054
|
+
})), this.dv(new P(t.editingEventListeningChanged, () => {
|
|
2055
2055
|
if (!(t.editingEventListening ?? !0)) return;
|
|
2056
2056
|
const s = new m();
|
|
2057
2057
|
return s.d(i.disposableOnUeEvent("editingEvent", (o) => {
|
|
2058
2058
|
o.objectIDs = o.objectIDs.map((h) => {
|
|
2059
2059
|
var a;
|
|
2060
|
-
return ((a =
|
|
2060
|
+
return ((a = I.getSceneObjById(h)) == null ? void 0 : a.parentID) ?? h;
|
|
2061
2061
|
}), t.editingEvent.emit(o);
|
|
2062
2062
|
})), s;
|
|
2063
2063
|
})), this.ad(i.disposableOnUeEvent("cameraChanged", () => {
|
|
@@ -2074,19 +2074,19 @@ class mo extends m {
|
|
|
2074
2074
|
this.d(() => {
|
|
2075
2075
|
o && clearTimeout(o);
|
|
2076
2076
|
});
|
|
2077
|
-
const a = new URLSearchParams(globalThis.location.search).get("eswebview") === "true",
|
|
2077
|
+
const a = new URLSearchParams(globalThis.location.search).get("eswebview") === "true", f = () => {
|
|
2078
2078
|
if (globalThis.ue.esinput) {
|
|
2079
2079
|
r.setStatus("Creating"), console.log("存在(window.ue && window.ue.es && window.ue.esinput 需要适配新版ESWebView 鼠标穿透), 开始创建UeFalseCloudViewer..."), r.setStatusLog("开始创建本地视口...");
|
|
2080
|
-
const p = this.dv(new
|
|
2080
|
+
const p = this.dv(new fo(t, r));
|
|
2081
2081
|
this.d(() => r.viewer = void 0), r.viewer = p, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new yo(t, r, p));
|
|
2082
2082
|
} else
|
|
2083
2083
|
r.setStatus("Error"), r.setStatusLog("请升级 ESWebView !"), this.d(() => r.viewer = void 0), r.viewer = void 0;
|
|
2084
2084
|
};
|
|
2085
2085
|
if (globalThis.ue && globalThis.ue.es)
|
|
2086
|
-
|
|
2086
|
+
f();
|
|
2087
2087
|
else if (a) {
|
|
2088
2088
|
const p = setInterval(() => {
|
|
2089
|
-
globalThis.ue && globalThis.ue.es && (clearInterval(p),
|
|
2089
|
+
globalThis.ue && globalThis.ue.es && (clearInterval(p), f());
|
|
2090
2090
|
}, 200);
|
|
2091
2091
|
} else if (n(i.options, "ws") || n(i.options, "uri") && n(i.options, "app")) {
|
|
2092
2092
|
r.setStatus("Creating"), r.setStatusLog("开始创建云渲染视口...");
|
|
@@ -2096,32 +2096,32 @@ class mo extends m {
|
|
|
2096
2096
|
});
|
|
2097
2097
|
const l = this.dv(Te(async (u) => {
|
|
2098
2098
|
r.viewer && !r.viewer.isDestroyed() && r.viewer.destroy(), r.viewer = void 0, p && t.removeChild(p) && (p = void 0), p = document.createElement("div"), p.setAttribute("earthsdk3-ue", "earthsdk3-ue-videoContainer"), p.style.cssText = "position:relative; height: 100%;width:100%;", t.appendChild(p);
|
|
2099
|
-
let c,
|
|
2099
|
+
let c, g, w;
|
|
2100
2100
|
if (n(i.options, "ws")) {
|
|
2101
|
-
const { ws: R, esmsg: T, uselnternalSignallingServer:
|
|
2102
|
-
c = R,
|
|
2101
|
+
const { ws: R, esmsg: T, uselnternalSignallingServer: _ } = i.options;
|
|
2102
|
+
c = R, g = T, w = _ ?? !1;
|
|
2103
2103
|
}
|
|
2104
2104
|
if (n(i.options, "uri") && n(i.options, "app")) {
|
|
2105
2105
|
const { offsetWidth: R, offsetHeight: T } = p;
|
|
2106
|
-
let { uri:
|
|
2107
|
-
|
|
2106
|
+
let { uri: _, app: _e, token: Xe } = i.options;
|
|
2107
|
+
_.endsWith("/") || (_ += "/");
|
|
2108
2108
|
const xr = Xe ? `?essstoken=${Xe}` : "", Ye = `/${_e}/${R ?? 1920}/${T ?? 1080}` + xr;
|
|
2109
|
-
console.log(`请求信令服务器: ${
|
|
2110
|
-
const Rr = await u.promise(fetch(`${
|
|
2111
|
-
if (
|
|
2112
|
-
r.setStatus("Error"), r.setStatusLog(`信令服务器请求失败 ${
|
|
2109
|
+
console.log(`请求信令服务器: ${_}instance${Ye}`);
|
|
2110
|
+
const Rr = await u.promise(fetch(`${_}instance${Ye}`, { method: "GET" })), O = await u.promise(Rr.json());
|
|
2111
|
+
if (O && O.status !== "ok") {
|
|
2112
|
+
r.setStatus("Error"), r.setStatusLog(`信令服务器请求失败 ${O.status}`), this._reconnectEvent.emit(void 0);
|
|
2113
2113
|
return;
|
|
2114
2114
|
} else {
|
|
2115
|
-
console.log(`信令服务器请求成功! ${JSON.stringify(
|
|
2116
|
-
const { server:
|
|
2115
|
+
console.log(`信令服务器请求成功! ${JSON.stringify(O, void 0, " ")}`), await $r(2e3);
|
|
2116
|
+
const { server: Pr, esmsg: Lr, instanceId: kr, useInternalSignallingServer: Dr } = O;
|
|
2117
2117
|
if (!kr) {
|
|
2118
2118
|
r.setStatus("Error"), r.setStatusLog("检查信令服务器版本,返回数据错误! "), console.log("信令服务器返回数据错误!不包含instanceId!请升级到 ESSS V3.0+ 版本!"), this._reconnectEvent.emit(void 0);
|
|
2119
2119
|
return;
|
|
2120
2120
|
}
|
|
2121
|
-
c =
|
|
2121
|
+
c = Pr, g = Lr, w = Dr ?? !1, r.esssResponse = O;
|
|
2122
2122
|
}
|
|
2123
2123
|
}
|
|
2124
|
-
const y = this.dv(w ? new lo(p, c,
|
|
2124
|
+
const y = this.dv(w ? new lo(p, c, g, r) : new eo(p, c, g, r));
|
|
2125
2125
|
this.d(() => r.viewer = void 0), this.d(y.errorEvent.don((R) => {
|
|
2126
2126
|
const T = `[${R}]:像素流连接错误!`;
|
|
2127
2127
|
r.setStatus("Error"), r.setStatusLog(T), this._reconnectEvent.emit(y);
|
|
@@ -2165,7 +2165,7 @@ const K = class K extends Ee {
|
|
|
2165
2165
|
const i = t;
|
|
2166
2166
|
this.d(this._viewer.changed.don(() => {
|
|
2167
2167
|
this.viewerChanged.emit(this.viewer);
|
|
2168
|
-
})), this.dv(new
|
|
2168
|
+
})), this.dv(new P(this.subContainerChanged, () => {
|
|
2169
2169
|
if (this.setStatus("Raw"), this.setStatusLog(""), !!this.subContainer)
|
|
2170
2170
|
return new mo(this.subContainer, i, this);
|
|
2171
2171
|
}));
|
|
@@ -2274,7 +2274,7 @@ const K = class K extends Ee {
|
|
|
2274
2274
|
console.warn("GetObjectByInfo: viewer is undefined");
|
|
2275
2275
|
return;
|
|
2276
2276
|
}
|
|
2277
|
-
return await
|
|
2277
|
+
return await Ps(this.viewer, t);
|
|
2278
2278
|
}
|
|
2279
2279
|
async defaultCameraFlyIn(t = 1) {
|
|
2280
2280
|
if (!this.viewer) {
|
|
@@ -2323,7 +2323,7 @@ const K = class K extends Ee {
|
|
|
2323
2323
|
console.warn("BindActorByTag: viewer is undefined");
|
|
2324
2324
|
return;
|
|
2325
2325
|
}
|
|
2326
|
-
return await
|
|
2326
|
+
return await Ls(this.viewer, t, i);
|
|
2327
2327
|
}
|
|
2328
2328
|
async restoreOriginalScene() {
|
|
2329
2329
|
if (!this.viewer) {
|
|
@@ -2400,7 +2400,7 @@ const K = class K extends Ee {
|
|
|
2400
2400
|
console.warn("GetIdByComponentNameAndHitItem: viewer is undefined");
|
|
2401
2401
|
return;
|
|
2402
2402
|
}
|
|
2403
|
-
return await
|
|
2403
|
+
return await bs(this.viewer, t, i, r);
|
|
2404
2404
|
}
|
|
2405
2405
|
/**
|
|
2406
2406
|
* @returns Promise(高度)
|
|
@@ -2412,7 +2412,7 @@ const K = class K extends Ee {
|
|
|
2412
2412
|
console.warn("GetCameraRelativeHeight: viewer is undefined");
|
|
2413
2413
|
return;
|
|
2414
2414
|
}
|
|
2415
|
-
return await
|
|
2415
|
+
return await zs(this.viewer, t);
|
|
2416
2416
|
}
|
|
2417
2417
|
/**
|
|
2418
2418
|
* 保存str到指定目录下
|
|
@@ -2629,11 +2629,11 @@ const K = class K extends Ee {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
async getHeightByLonLat(t, i, r = "ECC_Visibility") {
|
|
2631
2631
|
if (!this.viewer) return null;
|
|
2632
|
-
const n = await
|
|
2632
|
+
const n = await gs(this.viewer, t, i, r);
|
|
2633
2633
|
return n && n.height !== void 0 ? n.height : null;
|
|
2634
2634
|
}
|
|
2635
2635
|
async getHeightsByLonLats(t, i = "ECC_Visibility") {
|
|
2636
|
-
return this.viewer ? await
|
|
2636
|
+
return this.viewer ? await fs(this.viewer, t, i) : void 0;
|
|
2637
2637
|
}
|
|
2638
2638
|
async capture(t = 64, i = 64) {
|
|
2639
2639
|
return this.viewer ? await ws(this.viewer, t, i) : void 0;
|
|
@@ -2660,7 +2660,7 @@ const K = class K extends Ee {
|
|
|
2660
2660
|
const n = t.components.main ?? t;
|
|
2661
2661
|
if (!n || !this.viewer || i == null) return;
|
|
2662
2662
|
const s = Array.isArray(i) ? [...i] : [i];
|
|
2663
|
-
return n.editingID = `${r.callSource}_${
|
|
2663
|
+
return n.editingID = `${r.callSource}_${M()}`, await Xs(this.viewer, n.id, n.editingID, s, r.useKeyToSwitch);
|
|
2664
2664
|
}
|
|
2665
2665
|
async stopEditing() {
|
|
2666
2666
|
if (this.viewer)
|
|
@@ -2668,7 +2668,7 @@ const K = class K extends Ee {
|
|
|
2668
2668
|
}
|
|
2669
2669
|
async moveObjects(t) {
|
|
2670
2670
|
if (!this.viewer) return;
|
|
2671
|
-
const i = [], r =
|
|
2671
|
+
const i = [], r = M();
|
|
2672
2672
|
for (let n = 0; n < t.length; n++) {
|
|
2673
2673
|
const s = t[n], o = s.components.main ?? s;
|
|
2674
2674
|
o.editingID = r, o && i.push(o.id);
|
|
@@ -2699,7 +2699,7 @@ let J = K;
|
|
|
2699
2699
|
});
|
|
2700
2700
|
})(J || (J = {}));
|
|
2701
2701
|
Ar(J.prototype, J.createDefaultProps);
|
|
2702
|
-
class
|
|
2702
|
+
class lt extends G {
|
|
2703
2703
|
constructor(e, t) {
|
|
2704
2704
|
super(e, t);
|
|
2705
2705
|
const i = t.viewer;
|
|
@@ -2708,10 +2708,10 @@ class at extends G {
|
|
|
2708
2708
|
e.components.main || this.d(this.createdEvent.don(() => {
|
|
2709
2709
|
const n = this.constructor.propValFuncs, s = e.defaultProps, o = Object.keys(s).filter((u) => n[u] !== null);
|
|
2710
2710
|
o.push(...this.constructor.forceUeUpdateProps);
|
|
2711
|
-
const h = e.constructor.defaults, a = { val: {} },
|
|
2711
|
+
const h = e.constructor.defaults, a = { val: {} }, f = [];
|
|
2712
2712
|
for (let u of o) {
|
|
2713
|
-
const c = u + "Changed",
|
|
2714
|
-
|
|
2713
|
+
const c = u + "Changed", g = e[c];
|
|
2714
|
+
f.push(g);
|
|
2715
2715
|
const w = n[u];
|
|
2716
2716
|
if (w === null)
|
|
2717
2717
|
throw console.error("vf === null error"), new Error("vf === null error");
|
|
@@ -2724,7 +2724,7 @@ class at extends G {
|
|
|
2724
2724
|
}
|
|
2725
2725
|
a.val[u] = C;
|
|
2726
2726
|
};
|
|
2727
|
-
y(), this.d(
|
|
2727
|
+
y(), this.d(g.don(y));
|
|
2728
2728
|
}
|
|
2729
2729
|
const p = () => {
|
|
2730
2730
|
i.callUeFunc({
|
|
@@ -2734,7 +2734,7 @@ class at extends G {
|
|
|
2734
2734
|
...a.val
|
|
2735
2735
|
}
|
|
2736
2736
|
}), a.val = {};
|
|
2737
|
-
}, l = this.dv(
|
|
2737
|
+
}, l = this.dv(L(...f));
|
|
2738
2738
|
this.d(l.don(p)), this.d(r.changed.don(p)), this.d(e.flushEvent.don(() => l.flush()));
|
|
2739
2739
|
})), e.components.main || (this.d(() => {
|
|
2740
2740
|
r.value && Ir(i, e.id);
|
|
@@ -2750,15 +2750,15 @@ class at extends G {
|
|
|
2750
2750
|
}
|
|
2751
2751
|
}
|
|
2752
2752
|
// null 表示不设置,undefined表示不做任何转换
|
|
2753
|
-
v(
|
|
2753
|
+
v(lt, "propValFuncs", {
|
|
2754
2754
|
ref: null,
|
|
2755
2755
|
devTags: null,
|
|
2756
2756
|
extras: null,
|
|
2757
2757
|
execOnceFuncStr: null,
|
|
2758
2758
|
updateFuncStr: null,
|
|
2759
2759
|
toDestroyFuncStr: null
|
|
2760
|
-
}), v(
|
|
2761
|
-
class
|
|
2760
|
+
}), v(lt, "forceUeUpdateProps", []);
|
|
2761
|
+
class D extends lt {
|
|
2762
2762
|
constructor(e, t) {
|
|
2763
2763
|
super(e, t);
|
|
2764
2764
|
const i = t.viewer;
|
|
@@ -2768,7 +2768,7 @@ class M extends at {
|
|
|
2768
2768
|
var n, s;
|
|
2769
2769
|
Re(i, e.id, (n = e.flyInParam) == null ? void 0 : n.position, (s = e.flyInParam) == null ? void 0 : s.rotation, r ?? 1);
|
|
2770
2770
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
2771
|
-
|
|
2771
|
+
dt(i, e.id);
|
|
2772
2772
|
})), this.d(e.calcFlyInParamEvent.don(() => {
|
|
2773
2773
|
const r = t.getCurrentCameraInfo();
|
|
2774
2774
|
if (!r) return;
|
|
@@ -2782,7 +2782,7 @@ class M extends at {
|
|
|
2782
2782
|
})));
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
|
-
class
|
|
2785
|
+
class E extends D {
|
|
2786
2786
|
constructor(e, t) {
|
|
2787
2787
|
super(e, t);
|
|
2788
2788
|
const i = t.viewer;
|
|
@@ -2796,7 +2796,7 @@ class I extends M {
|
|
|
2796
2796
|
rotation: e.rotation
|
|
2797
2797
|
}
|
|
2798
2798
|
});
|
|
2799
|
-
}, n = this.dv(
|
|
2799
|
+
}, n = this.dv(L(
|
|
2800
2800
|
e.positionChanged,
|
|
2801
2801
|
e.rotationChanged,
|
|
2802
2802
|
e.editingChanged
|
|
@@ -2805,14 +2805,14 @@ class I extends M {
|
|
|
2805
2805
|
setTimeout(r, 0);
|
|
2806
2806
|
})), this.d(e.smoothMoveEvent.don((h, a) => {
|
|
2807
2807
|
De(i, e.id, h, a);
|
|
2808
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((h, a,
|
|
2809
|
-
|
|
2810
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((h, a,
|
|
2811
|
-
|
|
2812
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((h, a,
|
|
2813
|
-
ke(i, e.id, h, a,
|
|
2808
|
+
})), this.d(e.smoothMoveWithRotationEvent.don((h, a, f) => {
|
|
2809
|
+
Pe(i, e.id, h, a, f);
|
|
2810
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((h, a, f, p) => {
|
|
2811
|
+
Le(i, e.id, h, a, p, f);
|
|
2812
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((h, a, f, p, l) => {
|
|
2813
|
+
ke(i, e.id, h, a, f, p, l);
|
|
2814
2814
|
})), this.d(e.smoothMoveKeepPitchEvent.don(async (h, a) => {
|
|
2815
|
-
const
|
|
2815
|
+
const f = await i.callUeFunc({
|
|
2816
2816
|
f: "SmoothMoveKeepPitch",
|
|
2817
2817
|
p: {
|
|
2818
2818
|
id: e.id,
|
|
@@ -2820,14 +2820,14 @@ class I extends M {
|
|
|
2820
2820
|
Time: a
|
|
2821
2821
|
}
|
|
2822
2822
|
});
|
|
2823
|
-
|
|
2823
|
+
f.error && console.error("SmoothMoveKeepPitch:", f.error);
|
|
2824
2824
|
})), this.d(e.automaticLandingEvent.don((h) => {
|
|
2825
2825
|
const a = [e.position[0], e.position[1]];
|
|
2826
|
-
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((
|
|
2827
|
-
|
|
2826
|
+
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((f) => {
|
|
2827
|
+
f !== null && (e.position = [...a, f], e.collision = h);
|
|
2828
2828
|
});
|
|
2829
2829
|
}));
|
|
2830
|
-
const s = async (h, a,
|
|
2830
|
+
const s = async (h, a, f, p) => {
|
|
2831
2831
|
const { viewer: l } = h;
|
|
2832
2832
|
if (!l) {
|
|
2833
2833
|
console.error("SmoothMoveRelatively: ueViewer.viewer is undefined");
|
|
@@ -2835,14 +2835,14 @@ class I extends M {
|
|
|
2835
2835
|
}
|
|
2836
2836
|
const u = await l.callUeFunc({
|
|
2837
2837
|
f: "SmoothMoveRelatively",
|
|
2838
|
-
p: { id: a, RelativePosition:
|
|
2838
|
+
p: { id: a, RelativePosition: f, Time: p }
|
|
2839
2839
|
});
|
|
2840
2840
|
return u.error && console.error("SmoothMoveRelatively:", u.error), u;
|
|
2841
2841
|
};
|
|
2842
2842
|
this.d(e.smoothMoveRelativelyEvent.don((h, a) => {
|
|
2843
2843
|
s(t, e.id, h, a);
|
|
2844
2844
|
}));
|
|
2845
|
-
const o = async (h, a,
|
|
2845
|
+
const o = async (h, a, f, p, l) => {
|
|
2846
2846
|
const { viewer: u } = h;
|
|
2847
2847
|
if (!u) {
|
|
2848
2848
|
console.error("SmoothMoveRelativelyWithRotation: ueViewer.viewer is undefined");
|
|
@@ -2850,16 +2850,16 @@ class I extends M {
|
|
|
2850
2850
|
}
|
|
2851
2851
|
const c = await u.callUeFunc({
|
|
2852
2852
|
f: "SmoothMoveRelativelyWithRotation",
|
|
2853
|
-
p: { id: a, RelativePosition:
|
|
2853
|
+
p: { id: a, RelativePosition: f, NewRotation: p, Time: l }
|
|
2854
2854
|
});
|
|
2855
2855
|
return c.error && console.error("SmoothMoveRelativelyWithRotation:", c.error), c;
|
|
2856
2856
|
};
|
|
2857
|
-
this.d(e.smoothMoveRelativelyWithRotationEvent.don((h, a,
|
|
2858
|
-
o(t, e.id, h, a,
|
|
2857
|
+
this.d(e.smoothMoveRelativelyWithRotationEvent.don((h, a, f) => {
|
|
2858
|
+
o(t, e.id, h, a, f);
|
|
2859
2859
|
}));
|
|
2860
2860
|
}
|
|
2861
2861
|
}
|
|
2862
|
-
class
|
|
2862
|
+
class B extends D {
|
|
2863
2863
|
constructor(e, t) {
|
|
2864
2864
|
super(e, t);
|
|
2865
2865
|
const i = t.viewer;
|
|
@@ -2872,7 +2872,7 @@ class D extends M {
|
|
|
2872
2872
|
points: e.points
|
|
2873
2873
|
}
|
|
2874
2874
|
});
|
|
2875
|
-
}, n = this.dv(
|
|
2875
|
+
}, n = this.dv(L(
|
|
2876
2876
|
e.pointsChanged,
|
|
2877
2877
|
e.editingChanged
|
|
2878
2878
|
));
|
|
@@ -2881,8 +2881,8 @@ class D extends M {
|
|
|
2881
2881
|
}));
|
|
2882
2882
|
}
|
|
2883
2883
|
}
|
|
2884
|
-
v(
|
|
2885
|
-
...
|
|
2884
|
+
v(B, "propValFuncs", {
|
|
2885
|
+
...D.propValFuncs,
|
|
2886
2886
|
pointStyle: (e) => ({
|
|
2887
2887
|
...e,
|
|
2888
2888
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
@@ -2896,7 +2896,7 @@ v(D, "propValFuncs", {
|
|
|
2896
2896
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
2897
2897
|
})
|
|
2898
2898
|
});
|
|
2899
|
-
class
|
|
2899
|
+
class b extends E {
|
|
2900
2900
|
constructor(e, t) {
|
|
2901
2901
|
super(e, t), t.viewer && this.d(t.widgetEvent.don((r) => {
|
|
2902
2902
|
if (r.objId !== e.id) return;
|
|
@@ -2905,13 +2905,13 @@ class z extends I {
|
|
|
2905
2905
|
}));
|
|
2906
2906
|
}
|
|
2907
2907
|
}
|
|
2908
|
-
class Tr extends
|
|
2908
|
+
class Tr extends E {
|
|
2909
2909
|
constructor(e, t) {
|
|
2910
2910
|
super(e, t), t.viewer;
|
|
2911
2911
|
}
|
|
2912
2912
|
}
|
|
2913
2913
|
v(Tr, "propValFuncs", {
|
|
2914
|
-
...
|
|
2914
|
+
...E.propValFuncs,
|
|
2915
2915
|
pointStyle: (e) => ({
|
|
2916
2916
|
...e,
|
|
2917
2917
|
materialParams: JSON.stringify(e.materialParams ?? {})
|
|
@@ -2943,7 +2943,7 @@ const qe = (d) => {
|
|
|
2943
2943
|
default:
|
|
2944
2944
|
return "未知错误";
|
|
2945
2945
|
}
|
|
2946
|
-
},
|
|
2946
|
+
}, ut = class ut extends G {
|
|
2947
2947
|
constructor(t, i) {
|
|
2948
2948
|
super(t, i);
|
|
2949
2949
|
v(this, "_styleColor", this.dv(W([])));
|
|
@@ -2980,7 +2980,7 @@ const qe = (d) => {
|
|
|
2980
2980
|
materialOverrideMap: t.materialOverrideMap
|
|
2981
2981
|
}
|
|
2982
2982
|
});
|
|
2983
|
-
}, h = this.dv(
|
|
2983
|
+
}, h = this.dv(L(
|
|
2984
2984
|
t.urlChanged,
|
|
2985
2985
|
t.showChanged,
|
|
2986
2986
|
t.flyToParamChanged,
|
|
@@ -3001,7 +3001,7 @@ const qe = (d) => {
|
|
|
3001
3001
|
o(), this.d(h.don(o)), Reflect.has(t, "colorMode") && this.d(t.colorModeChanged.don(() => o()));
|
|
3002
3002
|
const a = this.dv(W(void 0));
|
|
3003
3003
|
{
|
|
3004
|
-
const p = this.dv(
|
|
3004
|
+
const p = this.dv(L(
|
|
3005
3005
|
t.actorTagChanged,
|
|
3006
3006
|
t.urlChanged
|
|
3007
3007
|
)), l = () => {
|
|
@@ -3015,7 +3015,7 @@ const qe = (d) => {
|
|
|
3015
3015
|
};
|
|
3016
3016
|
l(), this.d(p.don(l));
|
|
3017
3017
|
}
|
|
3018
|
-
const
|
|
3018
|
+
const f = async () => {
|
|
3019
3019
|
const { id: p } = t;
|
|
3020
3020
|
if (n !== void 0) {
|
|
3021
3021
|
n = void 0;
|
|
@@ -3047,55 +3047,55 @@ const qe = (d) => {
|
|
|
3047
3047
|
}
|
|
3048
3048
|
};
|
|
3049
3049
|
this.d(() => {
|
|
3050
|
-
|
|
3050
|
+
f();
|
|
3051
3051
|
});
|
|
3052
3052
|
{
|
|
3053
3053
|
const p = this.dv(Te(async (u) => {
|
|
3054
3054
|
if (a.value === void 0) {
|
|
3055
|
-
await u.promise(
|
|
3055
|
+
await u.promise(f());
|
|
3056
3056
|
return;
|
|
3057
3057
|
}
|
|
3058
3058
|
if (a.value.type === "ActorTag") {
|
|
3059
3059
|
const { actorTag: c } = a.value;
|
|
3060
|
-
if (n !== c && await u.promise(
|
|
3060
|
+
if (n !== c && await u.promise(f()), n !== void 0 || c === void 0) return;
|
|
3061
3061
|
try {
|
|
3062
3062
|
n = c;
|
|
3063
|
-
const
|
|
3064
|
-
if (!
|
|
3065
|
-
if (
|
|
3066
|
-
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${
|
|
3063
|
+
const g = await u.promise(i.bind3DTilesetByTag(t.id, c));
|
|
3064
|
+
if (!g) return;
|
|
3065
|
+
if (g.error !== "") {
|
|
3066
|
+
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${g.error}`);
|
|
3067
3067
|
return;
|
|
3068
3068
|
}
|
|
3069
|
-
if (
|
|
3070
|
-
if (
|
|
3071
|
-
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${qe(
|
|
3069
|
+
if (g.re.type !== 0)
|
|
3070
|
+
if (g.re.type === 1)
|
|
3071
|
+
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${qe(g.re.type)}`);
|
|
3072
3072
|
else {
|
|
3073
|
-
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${qe(
|
|
3073
|
+
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${qe(g.re.type)}`);
|
|
3074
3074
|
return;
|
|
3075
3075
|
}
|
|
3076
|
-
} catch (
|
|
3077
|
-
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${
|
|
3076
|
+
} catch (g) {
|
|
3077
|
+
console.warn(`UeES3DTileset Bind3DTilesetByTag: ${g}`);
|
|
3078
3078
|
return;
|
|
3079
3079
|
}
|
|
3080
3080
|
} else if (a.value.type === "CreatedUrl") {
|
|
3081
3081
|
const { url: c } = a.value;
|
|
3082
|
-
if (c !== s && await
|
|
3082
|
+
if (c !== s && await f(), s !== void 0 || c === void 0) return;
|
|
3083
3083
|
try {
|
|
3084
3084
|
s = c;
|
|
3085
|
-
const
|
|
3085
|
+
const g = await u.promise(r.callUeFunc({
|
|
3086
3086
|
f: "create",
|
|
3087
3087
|
p: {
|
|
3088
3088
|
type: t.typeName,
|
|
3089
3089
|
id: t.id
|
|
3090
3090
|
}
|
|
3091
3091
|
}));
|
|
3092
|
-
if (!
|
|
3093
|
-
if (
|
|
3094
|
-
console.warn(`UeES3DTileset create: ${
|
|
3092
|
+
if (!g) return;
|
|
3093
|
+
if (g.error !== "") {
|
|
3094
|
+
console.warn(`UeES3DTileset create: ${g.error}`);
|
|
3095
3095
|
return;
|
|
3096
3096
|
}
|
|
3097
|
-
} catch (
|
|
3098
|
-
console.warn(`UeES3DTileset create: ${
|
|
3097
|
+
} catch (g) {
|
|
3098
|
+
console.warn(`UeES3DTileset create: ${g}`);
|
|
3099
3099
|
return;
|
|
3100
3100
|
}
|
|
3101
3101
|
}
|
|
@@ -3113,7 +3113,7 @@ const qe = (d) => {
|
|
|
3113
3113
|
let c = "over";
|
|
3114
3114
|
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), t.flyOverEvent.emit(l, c, i);
|
|
3115
3115
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
3116
|
-
!n && !s ||
|
|
3116
|
+
!n && !s || dt(r, t.id);
|
|
3117
3117
|
})), this.d(t.calcFlyInParamEvent.don(async () => {
|
|
3118
3118
|
if (!n && !s || !i.actived) return;
|
|
3119
3119
|
const p = await i.getCurrentCameraInfo();
|
|
@@ -3129,21 +3129,21 @@ const qe = (d) => {
|
|
|
3129
3129
|
!n && !s || p.id !== t.id || p.type !== "3DTilesetReady" || t.tilesetReady.emit(p.p);
|
|
3130
3130
|
}));
|
|
3131
3131
|
{
|
|
3132
|
-
const p = async (
|
|
3132
|
+
const p = async (g, w) => {
|
|
3133
3133
|
if (!n && !s) return;
|
|
3134
3134
|
const y = await r.callUeFunc({
|
|
3135
3135
|
f: "SetFeatureColor",
|
|
3136
|
-
p: { id: t.id, featureName:
|
|
3136
|
+
p: { id: t.id, featureName: g, json: w }
|
|
3137
3137
|
});
|
|
3138
3138
|
if (y && y.error !== "") {
|
|
3139
3139
|
console.warn(`UeES3DTileset SetFeatureColor: ${y.error}`);
|
|
3140
3140
|
return;
|
|
3141
3141
|
}
|
|
3142
|
-
}, l = async (
|
|
3142
|
+
}, l = async (g, w) => {
|
|
3143
3143
|
if (!n && !s) return;
|
|
3144
3144
|
const y = await r.callUeFunc({
|
|
3145
3145
|
f: "SetFeatureVisable",
|
|
3146
|
-
p: { id: t.id, featureName:
|
|
3146
|
+
p: { id: t.id, featureName: g, json: w }
|
|
3147
3147
|
});
|
|
3148
3148
|
if (y && y.error !== "") {
|
|
3149
3149
|
console.warn(`UeES3DTileset SetFeatureVisable: ${y.error}`);
|
|
@@ -3151,35 +3151,35 @@ const qe = (d) => {
|
|
|
3151
3151
|
}
|
|
3152
3152
|
}, u = async () => {
|
|
3153
3153
|
if (!n && !s) return;
|
|
3154
|
-
const
|
|
3154
|
+
const g = await r.callUeFunc({
|
|
3155
3155
|
f: "ResetFeatureStyle",
|
|
3156
3156
|
p: { id: t.id }
|
|
3157
3157
|
});
|
|
3158
|
-
if (
|
|
3159
|
-
console.warn(`UeES3DTileset ResetFeatureStyle: ${
|
|
3158
|
+
if (g && g.error !== "") {
|
|
3159
|
+
console.warn(`UeES3DTileset ResetFeatureStyle: ${g.error}`);
|
|
3160
3160
|
return;
|
|
3161
3161
|
}
|
|
3162
|
-
}, c = async (
|
|
3162
|
+
}, c = async (g) => {
|
|
3163
3163
|
if (!n && !s) return;
|
|
3164
3164
|
const w = await r.callUeFunc({
|
|
3165
3165
|
f: "SetFeatureStyle",
|
|
3166
|
-
p: { id: t.id, json:
|
|
3166
|
+
p: { id: t.id, json: g }
|
|
3167
3167
|
});
|
|
3168
3168
|
if (w && w.error !== "") {
|
|
3169
3169
|
console.warn(`UeES3DTileset SetFeatureStyle: ${w.error}`);
|
|
3170
3170
|
return;
|
|
3171
3171
|
}
|
|
3172
3172
|
};
|
|
3173
|
-
this.d(t.setFeatureColorEvent.don((
|
|
3173
|
+
this.d(t.setFeatureColorEvent.don((g, w) => {
|
|
3174
3174
|
const y = [...this.styleColor, ...w];
|
|
3175
|
-
this.styleColor = [...y], p(
|
|
3176
|
-
})), this.d(t.setFeatureVisableEvent.don((
|
|
3175
|
+
this.styleColor = [...y], p(g, y);
|
|
3176
|
+
})), this.d(t.setFeatureVisableEvent.don((g, w) => {
|
|
3177
3177
|
const y = [...this.styleVisable, ...w];
|
|
3178
|
-
this.styleVisable = [...y], l(
|
|
3178
|
+
this.styleVisable = [...y], l(g, y);
|
|
3179
3179
|
})), this.d(t.resetFeatureStyleEvent.don(() => {
|
|
3180
3180
|
u(), this.styleColor = [], this.styleVisable = [];
|
|
3181
|
-
})), this.d(t.setFeatureStyleEvent.don((
|
|
3182
|
-
c(
|
|
3181
|
+
})), this.d(t.setFeatureStyleEvent.don((g) => {
|
|
3182
|
+
c(g);
|
|
3183
3183
|
}));
|
|
3184
3184
|
}
|
|
3185
3185
|
{
|
|
@@ -3236,8 +3236,8 @@ const qe = (d) => {
|
|
|
3236
3236
|
this._styleVisable.value = t;
|
|
3237
3237
|
}
|
|
3238
3238
|
};
|
|
3239
|
-
v(
|
|
3240
|
-
let Ue =
|
|
3239
|
+
v(ut, "type", ut.register("ESUeViewer", me.type, ut));
|
|
3240
|
+
let Ue = ut;
|
|
3241
3241
|
const Qe = (d) => {
|
|
3242
3242
|
switch (d) {
|
|
3243
3243
|
case 0:
|
|
@@ -3253,7 +3253,7 @@ const Qe = (d) => {
|
|
|
3253
3253
|
default:
|
|
3254
3254
|
return "未知错误";
|
|
3255
3255
|
}
|
|
3256
|
-
},
|
|
3256
|
+
}, ht = class ht extends G {
|
|
3257
3257
|
constructor(e, t) {
|
|
3258
3258
|
super(e, t);
|
|
3259
3259
|
const i = t.viewer;
|
|
@@ -3266,10 +3266,10 @@ const Qe = (d) => {
|
|
|
3266
3266
|
{
|
|
3267
3267
|
const p = () => {
|
|
3268
3268
|
if (typeof e.url == "string")
|
|
3269
|
-
o.value =
|
|
3269
|
+
o.value = I.context.getStrFromEnv(e.url);
|
|
3270
3270
|
else {
|
|
3271
3271
|
const l = e.url;
|
|
3272
|
-
l.url =
|
|
3272
|
+
l.url = I.context.getStrFromEnv(l.url), o.value = l;
|
|
3273
3273
|
}
|
|
3274
3274
|
};
|
|
3275
3275
|
p(), this.ad(e.urlChanged.don(p));
|
|
@@ -3278,7 +3278,7 @@ const Qe = (d) => {
|
|
|
3278
3278
|
if (!r && !n) return;
|
|
3279
3279
|
let p = e.targetID ?? U.defaults.targetID;
|
|
3280
3280
|
if (p && p != "") {
|
|
3281
|
-
const l =
|
|
3281
|
+
const l = I.getSceneObject(p);
|
|
3282
3282
|
p = l ? (l.components.main ?? l).id : p;
|
|
3283
3283
|
}
|
|
3284
3284
|
await i.callUeFunc({
|
|
@@ -3301,7 +3301,7 @@ const Qe = (d) => {
|
|
|
3301
3301
|
splitDirection: e.splitDirection ?? U.defaults.splitDirection
|
|
3302
3302
|
}
|
|
3303
3303
|
});
|
|
3304
|
-
}, a = this.dv(
|
|
3304
|
+
}, a = this.dv(L(
|
|
3305
3305
|
e.showChanged,
|
|
3306
3306
|
o.changed,
|
|
3307
3307
|
e.flyToParamChanged,
|
|
@@ -3318,7 +3318,7 @@ const Qe = (d) => {
|
|
|
3318
3318
|
e.splitDirectionChanged
|
|
3319
3319
|
));
|
|
3320
3320
|
this.d(a.don(h));
|
|
3321
|
-
const
|
|
3321
|
+
const f = async () => {
|
|
3322
3322
|
const { id: p } = e;
|
|
3323
3323
|
if (r !== void 0) {
|
|
3324
3324
|
r = void 0;
|
|
@@ -3350,20 +3350,20 @@ const Qe = (d) => {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
};
|
|
3352
3352
|
this.d(() => {
|
|
3353
|
-
|
|
3353
|
+
f();
|
|
3354
3354
|
});
|
|
3355
3355
|
{
|
|
3356
3356
|
const p = this.dv(Te(async (u) => {
|
|
3357
3357
|
if (s.value === void 0) {
|
|
3358
|
-
await u.promise(
|
|
3358
|
+
await u.promise(f());
|
|
3359
3359
|
return;
|
|
3360
3360
|
}
|
|
3361
3361
|
if (s.value.type === "ActorTag") {
|
|
3362
|
-
const { actorTag: c, componentTag:
|
|
3363
|
-
if (r !== c && await u.promise(
|
|
3362
|
+
const { actorTag: c, componentTag: g } = s.value;
|
|
3363
|
+
if (r !== c && await u.promise(f()), r !== void 0 || c === void 0) return;
|
|
3364
3364
|
try {
|
|
3365
3365
|
r = c;
|
|
3366
|
-
const w = await u.promise(t.bindImageryByTag(e.id, c,
|
|
3366
|
+
const w = await u.promise(t.bindImageryByTag(e.id, c, g));
|
|
3367
3367
|
if (!w) return;
|
|
3368
3368
|
if (w.error !== "") {
|
|
3369
3369
|
console.warn(`ESImageryLayer BindImageryByTag: ${w.error}`);
|
|
@@ -3382,19 +3382,19 @@ const Qe = (d) => {
|
|
|
3382
3382
|
}
|
|
3383
3383
|
} else if (s.value.type === "CreatedUrl") {
|
|
3384
3384
|
const { url: c } = s.value;
|
|
3385
|
-
if (c !== n && await u.promise(
|
|
3385
|
+
if (c !== n && await u.promise(f()), n !== void 0 || c === void 0) return;
|
|
3386
3386
|
try {
|
|
3387
3387
|
n = c;
|
|
3388
|
-
const
|
|
3388
|
+
const g = await u.promise(i.callUeFunc({
|
|
3389
3389
|
f: "create",
|
|
3390
3390
|
p: {
|
|
3391
3391
|
type: "ESImageryLayer",
|
|
3392
3392
|
id: e.id
|
|
3393
3393
|
}
|
|
3394
3394
|
}));
|
|
3395
|
-
if (!
|
|
3396
|
-
if (
|
|
3397
|
-
console.warn(`ESImageryLayer create: ${
|
|
3395
|
+
if (!g) return;
|
|
3396
|
+
if (g.error !== "") {
|
|
3397
|
+
console.warn(`ESImageryLayer create: ${g.error}`);
|
|
3398
3398
|
return;
|
|
3399
3399
|
}
|
|
3400
3400
|
} catch {
|
|
@@ -3409,7 +3409,7 @@ const Qe = (d) => {
|
|
|
3409
3409
|
l(), this.d(s.changed.don(l));
|
|
3410
3410
|
}
|
|
3411
3411
|
{
|
|
3412
|
-
const p = this.dv(
|
|
3412
|
+
const p = this.dv(L(
|
|
3413
3413
|
e.actorTagChanged,
|
|
3414
3414
|
o.changed,
|
|
3415
3415
|
e.componentTagChanged
|
|
@@ -3431,13 +3431,13 @@ const Qe = (d) => {
|
|
|
3431
3431
|
let c = "over";
|
|
3432
3432
|
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(l, c, t);
|
|
3433
3433
|
})), this.d(e.flyInEvent.don(async (p, l) => {
|
|
3434
|
-
var
|
|
3434
|
+
var g, w;
|
|
3435
3435
|
if (!r && !n) return;
|
|
3436
|
-
const u = await Re(i, e.id, (
|
|
3436
|
+
const u = await Re(i, e.id, (g = e.flyInParam) == null ? void 0 : g.position, (w = e.flyInParam) == null ? void 0 : w.rotation, p ?? 1);
|
|
3437
3437
|
let c = "over";
|
|
3438
3438
|
u === void 0 ? c = "error" : u.endType === 0 ? c = "over" : u.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(l, c, t);
|
|
3439
3439
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
3440
|
-
!r && !n ||
|
|
3440
|
+
!r && !n || dt(i, e.id);
|
|
3441
3441
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
3442
3442
|
if (!t.actived) return;
|
|
3443
3443
|
const p = await t.getCurrentCameraInfo();
|
|
@@ -3452,9 +3452,9 @@ const Qe = (d) => {
|
|
|
3452
3452
|
}));
|
|
3453
3453
|
}
|
|
3454
3454
|
};
|
|
3455
|
-
v(
|
|
3456
|
-
let Ve =
|
|
3457
|
-
const X = class X extends
|
|
3455
|
+
v(ht, "type", ht.register("ESUeViewer", U.type, ht));
|
|
3456
|
+
let Ve = ht;
|
|
3457
|
+
const X = class X extends D {
|
|
3458
3458
|
constructor(e, t) {
|
|
3459
3459
|
if (super(e, t), !t.viewer) {
|
|
3460
3460
|
console.warn("viewer is undefined!");
|
|
@@ -3463,16 +3463,16 @@ const X = class X extends M {
|
|
|
3463
3463
|
}
|
|
3464
3464
|
};
|
|
3465
3465
|
v(X, "type", X.register("ESUeViewer", Ur.type, X)), v(X, "forceUeUpdateProps", [
|
|
3466
|
-
...
|
|
3466
|
+
...D.forceUeUpdateProps,
|
|
3467
3467
|
"url"
|
|
3468
3468
|
]), v(X, "propValFuncs", {
|
|
3469
|
-
...
|
|
3470
|
-
url: (e) => typeof e == "string" ?
|
|
3469
|
+
...D.propValFuncs,
|
|
3470
|
+
url: (e) => typeof e == "string" ? I.context.getStrFromEnv(e) : (e.url = I.context.getStrFromEnv(e.url), e),
|
|
3471
3471
|
czmMaxzoom: null,
|
|
3472
3472
|
czmMinzoom: null
|
|
3473
3473
|
});
|
|
3474
3474
|
let Oe = X;
|
|
3475
|
-
const
|
|
3475
|
+
const pt = class pt extends E {
|
|
3476
3476
|
constructor(e, t) {
|
|
3477
3477
|
if (super(e, t), !t.viewer) {
|
|
3478
3478
|
console.warn("viewer is undefined!");
|
|
@@ -3480,9 +3480,9 @@ const ht = class ht extends I {
|
|
|
3480
3480
|
}
|
|
3481
3481
|
}
|
|
3482
3482
|
};
|
|
3483
|
-
v(
|
|
3484
|
-
let je =
|
|
3485
|
-
const
|
|
3483
|
+
v(pt, "type", pt.register("ESUeViewer", Nr.type, pt));
|
|
3484
|
+
let je = pt;
|
|
3485
|
+
const vt = class vt extends E {
|
|
3486
3486
|
constructor(e, t) {
|
|
3487
3487
|
if (super(e, t), !t.viewer) {
|
|
3488
3488
|
console.warn("viewer is undefined!");
|
|
@@ -3490,9 +3490,9 @@ const pt = class pt extends I {
|
|
|
3490
3490
|
}
|
|
3491
3491
|
}
|
|
3492
3492
|
};
|
|
3493
|
-
v(
|
|
3494
|
-
let ti =
|
|
3495
|
-
const
|
|
3493
|
+
v(vt, "type", vt.register("ESUeViewer", br.type, vt));
|
|
3494
|
+
let ti = vt;
|
|
3495
|
+
const gt = class gt extends B {
|
|
3496
3496
|
constructor(e, t) {
|
|
3497
3497
|
if (super(e, t), !t.viewer) {
|
|
3498
3498
|
console.warn("viewer is undefined!");
|
|
@@ -3500,8 +3500,8 @@ const vt = class vt extends D {
|
|
|
3500
3500
|
}
|
|
3501
3501
|
}
|
|
3502
3502
|
};
|
|
3503
|
-
v(
|
|
3504
|
-
let $ =
|
|
3503
|
+
v(gt, "type", gt.register("ESUeViewer", zr.type, gt));
|
|
3504
|
+
let $ = gt;
|
|
3505
3505
|
const ft = class ft extends $ {
|
|
3506
3506
|
constructor(e, t) {
|
|
3507
3507
|
super(e, t);
|
|
@@ -3511,22 +3511,22 @@ const ft = class ft extends $ {
|
|
|
3511
3511
|
return;
|
|
3512
3512
|
}
|
|
3513
3513
|
const r = () => {
|
|
3514
|
-
let s =
|
|
3514
|
+
let s = j.defaults.fillStyle;
|
|
3515
3515
|
try {
|
|
3516
|
-
s = { ...e.fillStyle ??
|
|
3516
|
+
s = { ...e.fillStyle ?? j.defaults.fillStyle };
|
|
3517
3517
|
} catch (o) {
|
|
3518
|
-
console.error("ESAreaMeasurement fillStyle 属性类型错误!", o), s = { ...
|
|
3518
|
+
console.error("ESAreaMeasurement fillStyle 属性类型错误!", o), s = { ...j.defaults.fillStyle };
|
|
3519
3519
|
}
|
|
3520
3520
|
s.materialParams = JSON.stringify(s.materialParams), i.callUeFunc({
|
|
3521
3521
|
f: "update",
|
|
3522
3522
|
p: {
|
|
3523
3523
|
id: e.id,
|
|
3524
|
-
stroked: e.stroked ??
|
|
3524
|
+
stroked: e.stroked ?? j.defaults.stroked,
|
|
3525
3525
|
fillStyle: s,
|
|
3526
|
-
filled: e.filled ??
|
|
3526
|
+
filled: e.filled ?? j.defaults.filled
|
|
3527
3527
|
}
|
|
3528
3528
|
}), console.log(s);
|
|
3529
|
-
}, n = this.dv(
|
|
3529
|
+
}, n = this.dv(L(
|
|
3530
3530
|
e.fillStyleChanged,
|
|
3531
3531
|
e.strokedChanged,
|
|
3532
3532
|
e.filledChanged
|
|
@@ -3534,9 +3534,9 @@ const ft = class ft extends $ {
|
|
|
3534
3534
|
this.d(n.don(r)), this.d(e.createdEvent.don(r));
|
|
3535
3535
|
}
|
|
3536
3536
|
};
|
|
3537
|
-
v(ft, "type", ft.register("ESUeViewer",
|
|
3537
|
+
v(ft, "type", ft.register("ESUeViewer", j.type, ft));
|
|
3538
3538
|
let ei = ft;
|
|
3539
|
-
const
|
|
3539
|
+
const wt = class wt extends E {
|
|
3540
3540
|
constructor(e, t) {
|
|
3541
3541
|
if (super(e, t), !t.viewer) {
|
|
3542
3542
|
console.warn("viewer is undefined!");
|
|
@@ -3544,9 +3544,9 @@ const gt = class gt extends I {
|
|
|
3544
3544
|
}
|
|
3545
3545
|
}
|
|
3546
3546
|
};
|
|
3547
|
-
v(
|
|
3548
|
-
let ii =
|
|
3549
|
-
const
|
|
3547
|
+
v(wt, "type", wt.register("ESUeViewer", Hr.type, wt));
|
|
3548
|
+
let ii = wt;
|
|
3549
|
+
const et = class et extends E {
|
|
3550
3550
|
constructor(e, t) {
|
|
3551
3551
|
if (super(e, t), !t.viewer) {
|
|
3552
3552
|
console.warn("viewer is underfined!");
|
|
@@ -3554,17 +3554,17 @@ const tt = class tt extends I {
|
|
|
3554
3554
|
}
|
|
3555
3555
|
}
|
|
3556
3556
|
};
|
|
3557
|
-
v(
|
|
3558
|
-
v(
|
|
3559
|
-
...
|
|
3557
|
+
v(et, "type", et.register("ESUeViewer", Jr.type, et)), // null 表示不设置,undefined表示不做任何转换
|
|
3558
|
+
v(et, "propValFuncs", {
|
|
3559
|
+
...E.propValFuncs,
|
|
3560
3560
|
targetID: (e) => {
|
|
3561
3561
|
if (!e) return "";
|
|
3562
|
-
const t =
|
|
3562
|
+
const t = I.getSceneObject(e);
|
|
3563
3563
|
return t ? (t.components.main ?? t).id : e;
|
|
3564
3564
|
}
|
|
3565
3565
|
});
|
|
3566
|
-
let ri =
|
|
3567
|
-
const
|
|
3566
|
+
let ri = et;
|
|
3567
|
+
const yt = class yt extends E {
|
|
3568
3568
|
constructor(e, t) {
|
|
3569
3569
|
super(e, t);
|
|
3570
3570
|
const i = t.viewer;
|
|
@@ -3573,8 +3573,8 @@ const wt = class wt extends I {
|
|
|
3573
3573
|
return;
|
|
3574
3574
|
}
|
|
3575
3575
|
this.dispose(e.flyInEvent.don((r, n, s = "default") => {
|
|
3576
|
-
const { id: o, duration: h, position: a, rotation:
|
|
3577
|
-
Re(i, o, a,
|
|
3576
|
+
const { id: o, duration: h, position: a, rotation: f } = e;
|
|
3577
|
+
Re(i, o, a, f, h ?? r, s);
|
|
3578
3578
|
})), this.dispose(e.resetWithCurrentCameraEvent.don(() => {
|
|
3579
3579
|
Er(i, e.id);
|
|
3580
3580
|
})), this.dispose(e.captureEvent.don((r, n) => {
|
|
@@ -3584,9 +3584,9 @@ const wt = class wt extends I {
|
|
|
3584
3584
|
}));
|
|
3585
3585
|
}
|
|
3586
3586
|
};
|
|
3587
|
-
v(
|
|
3588
|
-
let ni =
|
|
3589
|
-
const
|
|
3587
|
+
v(yt, "type", yt.register("ESUeViewer", Gr.type, yt));
|
|
3588
|
+
let ni = yt;
|
|
3589
|
+
const mt = class mt extends E {
|
|
3590
3590
|
constructor(e, t) {
|
|
3591
3591
|
if (super(e, t), !t.viewer) {
|
|
3592
3592
|
console.warn("viewer is undefined!");
|
|
@@ -3594,9 +3594,9 @@ const yt = class yt extends I {
|
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
3596
|
};
|
|
3597
|
-
v(
|
|
3598
|
-
let si =
|
|
3599
|
-
const
|
|
3597
|
+
v(mt, "type", mt.register("ESUeViewer", Kr.type, mt));
|
|
3598
|
+
let si = mt;
|
|
3599
|
+
const Ct = class Ct extends E {
|
|
3600
3600
|
constructor(e, t) {
|
|
3601
3601
|
if (super(e, t), !t.viewer) {
|
|
3602
3602
|
console.warn("viewer is undefined!");
|
|
@@ -3604,9 +3604,9 @@ const mt = class mt extends I {
|
|
|
3604
3604
|
}
|
|
3605
3605
|
}
|
|
3606
3606
|
};
|
|
3607
|
-
v(
|
|
3608
|
-
let oi =
|
|
3609
|
-
const
|
|
3607
|
+
v(Ct, "type", Ct.register("ESUeViewer", Xr.type, Ct));
|
|
3608
|
+
let oi = Ct;
|
|
3609
|
+
const Ft = class Ft extends B {
|
|
3610
3610
|
constructor(e, t) {
|
|
3611
3611
|
super(e, t);
|
|
3612
3612
|
const i = t.viewer;
|
|
@@ -3615,30 +3615,30 @@ const Ct = class Ct extends D {
|
|
|
3615
3615
|
return;
|
|
3616
3616
|
}
|
|
3617
3617
|
const r = () => {
|
|
3618
|
-
let s =
|
|
3618
|
+
let s = ct.defaults.fillStyle;
|
|
3619
3619
|
try {
|
|
3620
|
-
s = { ...e.fillStyle ??
|
|
3620
|
+
s = { ...e.fillStyle ?? ct.defaults.fillStyle };
|
|
3621
3621
|
} catch (o) {
|
|
3622
|
-
console.error("ESClassification fillStyle 属性类型错误!", o), s = { ...
|
|
3622
|
+
console.error("ESClassification fillStyle 属性类型错误!", o), s = { ...ct.defaults.fillStyle };
|
|
3623
3623
|
}
|
|
3624
3624
|
s.materialParams = JSON.stringify(s.materialParams), i.callUeFunc({
|
|
3625
3625
|
f: "update",
|
|
3626
3626
|
p: {
|
|
3627
3627
|
id: e.id,
|
|
3628
|
-
filled: e.filled ??
|
|
3628
|
+
filled: e.filled ?? ct.defaults.filled,
|
|
3629
3629
|
fillStyle: s
|
|
3630
3630
|
}
|
|
3631
3631
|
});
|
|
3632
|
-
}, n = this.dv(
|
|
3632
|
+
}, n = this.dv(L(
|
|
3633
3633
|
e.fillStyleChanged,
|
|
3634
3634
|
e.filledChanged
|
|
3635
3635
|
));
|
|
3636
3636
|
this.d(n.don(r)), this.d(e.createdEvent.don(r));
|
|
3637
3637
|
}
|
|
3638
3638
|
};
|
|
3639
|
-
v(
|
|
3640
|
-
let ai =
|
|
3641
|
-
const
|
|
3639
|
+
v(Ft, "type", Ft.register("ESUeViewer", ct.type, Ft));
|
|
3640
|
+
let ai = Ft;
|
|
3641
|
+
const it = class it extends E {
|
|
3642
3642
|
constructor(e, t) {
|
|
3643
3643
|
if (super(e, t), !t.viewer) {
|
|
3644
3644
|
console.warn("viewer is underfined!");
|
|
@@ -3646,17 +3646,17 @@ const et = class et extends I {
|
|
|
3646
3646
|
}
|
|
3647
3647
|
}
|
|
3648
3648
|
};
|
|
3649
|
-
v(
|
|
3650
|
-
v(
|
|
3651
|
-
...
|
|
3649
|
+
v(it, "type", it.register("ESUeViewer", Yr.type, it)), // null 表示不设置,undefined表示不做任何转换
|
|
3650
|
+
v(it, "propValFuncs", {
|
|
3651
|
+
...E.propValFuncs,
|
|
3652
3652
|
targetID: (e) => {
|
|
3653
3653
|
if (!e) return "";
|
|
3654
|
-
const t =
|
|
3654
|
+
const t = I.getSceneObject(e);
|
|
3655
3655
|
return t ? (t.components.main ?? t).id : e;
|
|
3656
3656
|
}
|
|
3657
3657
|
});
|
|
3658
|
-
let li =
|
|
3659
|
-
const
|
|
3658
|
+
let li = it;
|
|
3659
|
+
const It = class It extends E {
|
|
3660
3660
|
constructor(e, t) {
|
|
3661
3661
|
super(e, t);
|
|
3662
3662
|
const i = t.viewer;
|
|
@@ -3668,28 +3668,28 @@ const Ft = class Ft extends I {
|
|
|
3668
3668
|
{
|
|
3669
3669
|
const o = () => {
|
|
3670
3670
|
if (typeof e.url == "string")
|
|
3671
|
-
r.value =
|
|
3671
|
+
r.value = I.context.getStrFromEnv(e.url ?? z.defaults.url);
|
|
3672
3672
|
else {
|
|
3673
3673
|
const h = e.url;
|
|
3674
|
-
h.url =
|
|
3674
|
+
h.url = I.context.getStrFromEnv(h.url ?? z.defaults.url), r.value = h;
|
|
3675
3675
|
}
|
|
3676
3676
|
};
|
|
3677
3677
|
o(), this.ad(e.urlChanged.don(o));
|
|
3678
3678
|
}
|
|
3679
3679
|
const n = () => {
|
|
3680
|
-
const o = e.colorStops ??
|
|
3680
|
+
const o = e.colorStops ?? z.defaults.colorStops;
|
|
3681
3681
|
i.callUeFunc({
|
|
3682
3682
|
f: "update",
|
|
3683
3683
|
p: {
|
|
3684
3684
|
id: e.id,
|
|
3685
|
-
url: r.value ??
|
|
3686
|
-
currentTime: e.currentTime ??
|
|
3687
|
-
minPropValue: e.minPropValue ??
|
|
3688
|
-
maxPropValue: e.maxPropValue ??
|
|
3685
|
+
url: r.value ?? z.defaults.url,
|
|
3686
|
+
currentTime: e.currentTime ?? z.defaults.currentTime,
|
|
3687
|
+
minPropValue: e.minPropValue ?? z.defaults.minPropValue,
|
|
3688
|
+
maxPropValue: e.maxPropValue ?? z.defaults.maxPropValue,
|
|
3689
3689
|
colorStops: JSON.stringify(o)
|
|
3690
3690
|
}
|
|
3691
3691
|
});
|
|
3692
|
-
}, s = this.dv(
|
|
3692
|
+
}, s = this.dv(L(
|
|
3693
3693
|
r.changed,
|
|
3694
3694
|
e.currentTimeChanged,
|
|
3695
3695
|
e.minPropValueChanged,
|
|
@@ -3699,9 +3699,9 @@ const Ft = class Ft extends I {
|
|
|
3699
3699
|
this.d(s.don(n)), this.d(e.createdEvent.don(n));
|
|
3700
3700
|
}
|
|
3701
3701
|
};
|
|
3702
|
-
v(
|
|
3703
|
-
let di =
|
|
3704
|
-
const
|
|
3702
|
+
v(It, "type", It.register("ESUeViewer", z.type, It));
|
|
3703
|
+
let di = It;
|
|
3704
|
+
const Et = class Et extends E {
|
|
3705
3705
|
constructor(e, t) {
|
|
3706
3706
|
if (super(e, t), !t.viewer) {
|
|
3707
3707
|
console.warn("viewer is undefined!");
|
|
@@ -3709,9 +3709,9 @@ const It = class It extends I {
|
|
|
3709
3709
|
}
|
|
3710
3710
|
}
|
|
3711
3711
|
};
|
|
3712
|
-
v(
|
|
3713
|
-
let ci =
|
|
3714
|
-
const
|
|
3712
|
+
v(Et, "type", Et.register("ESUeViewer", Zr.type, Et));
|
|
3713
|
+
let ci = Et;
|
|
3714
|
+
const St = class St extends B {
|
|
3715
3715
|
constructor(e, t) {
|
|
3716
3716
|
if (super(e, t), !t.viewer) {
|
|
3717
3717
|
console.warn("viewer is undefined!");
|
|
@@ -3719,9 +3719,9 @@ const Et = class Et extends D {
|
|
|
3719
3719
|
}
|
|
3720
3720
|
}
|
|
3721
3721
|
};
|
|
3722
|
-
v(
|
|
3723
|
-
let ui =
|
|
3724
|
-
const
|
|
3722
|
+
v(St, "type", St.register("ESUeViewer", qr.type, St));
|
|
3723
|
+
let ui = St;
|
|
3724
|
+
const Tt = class Tt extends B {
|
|
3725
3725
|
constructor(e, t) {
|
|
3726
3726
|
super(e, t);
|
|
3727
3727
|
const i = t.viewer;
|
|
@@ -3743,15 +3743,15 @@ const St = class St extends D {
|
|
|
3743
3743
|
strokeStyle: s
|
|
3744
3744
|
}
|
|
3745
3745
|
});
|
|
3746
|
-
}, n = this.dv(
|
|
3746
|
+
}, n = this.dv(L(
|
|
3747
3747
|
e.strokeStyleChanged
|
|
3748
3748
|
));
|
|
3749
3749
|
this.d(n.don(r)), this.d(e.createdEvent.don(r));
|
|
3750
3750
|
}
|
|
3751
3751
|
};
|
|
3752
|
-
v(
|
|
3753
|
-
let hi =
|
|
3754
|
-
const
|
|
3752
|
+
v(Tt, "type", Tt.register("ESUeViewer", Me.type, Tt));
|
|
3753
|
+
let hi = Tt;
|
|
3754
|
+
const xt = class xt extends Ke {
|
|
3755
3755
|
constructor(e, t) {
|
|
3756
3756
|
if (super(e, t), !t.viewer) {
|
|
3757
3757
|
console.warn("viewer is undefined!");
|
|
@@ -3759,9 +3759,9 @@ const Tt = class Tt extends Ke {
|
|
|
3759
3759
|
}
|
|
3760
3760
|
}
|
|
3761
3761
|
};
|
|
3762
|
-
v(
|
|
3763
|
-
let Ne =
|
|
3764
|
-
const
|
|
3762
|
+
v(xt, "type", xt.register("ESUeViewer", Qr.type, xt));
|
|
3763
|
+
let Ne = xt;
|
|
3764
|
+
const Rt = class Rt extends Ne {
|
|
3765
3765
|
constructor(e, t) {
|
|
3766
3766
|
if (super(e, t), !t.viewer) {
|
|
3767
3767
|
console.warn("viewer is undefined!");
|
|
@@ -3769,9 +3769,9 @@ const xt = class xt extends Ne {
|
|
|
3769
3769
|
}
|
|
3770
3770
|
}
|
|
3771
3771
|
};
|
|
3772
|
-
v(
|
|
3773
|
-
let pi =
|
|
3774
|
-
const
|
|
3772
|
+
v(Rt, "type", Rt.register("ESUeViewer", Vr.type, Rt));
|
|
3773
|
+
let pi = Rt;
|
|
3774
|
+
const Pt = class Pt extends D {
|
|
3775
3775
|
constructor(e, t) {
|
|
3776
3776
|
if (super(e, t), !t.viewer) {
|
|
3777
3777
|
console.warn("viewer is undefined!");
|
|
@@ -3784,9 +3784,9 @@ const Rt = class Rt extends M {
|
|
|
3784
3784
|
}));
|
|
3785
3785
|
}
|
|
3786
3786
|
};
|
|
3787
|
-
v(
|
|
3788
|
-
let vi =
|
|
3789
|
-
const
|
|
3787
|
+
v(Pt, "type", Pt.register("ESUeViewer", Or.type, Pt));
|
|
3788
|
+
let vi = Pt;
|
|
3789
|
+
const rt = class rt extends $ {
|
|
3790
3790
|
constructor(e, t) {
|
|
3791
3791
|
if (super(e, t), !t.viewer) {
|
|
3792
3792
|
console.warn("viewer is undefined!");
|
|
@@ -3794,16 +3794,16 @@ const it = class it extends $ {
|
|
|
3794
3794
|
}
|
|
3795
3795
|
}
|
|
3796
3796
|
};
|
|
3797
|
-
v(
|
|
3797
|
+
v(rt, "type", rt.register("ESUeViewer", jr.type, rt)), v(rt, "propValFuncs", {
|
|
3798
3798
|
...$.propValFuncs,
|
|
3799
3799
|
targetID: (e) => {
|
|
3800
3800
|
if (!e) return "";
|
|
3801
|
-
const t =
|
|
3801
|
+
const t = I.getSceneObject(e);
|
|
3802
3802
|
return t ? (t.components.main ?? t).id : e;
|
|
3803
3803
|
}
|
|
3804
3804
|
});
|
|
3805
|
-
let
|
|
3806
|
-
const Lt = class Lt extends
|
|
3805
|
+
let gi = rt;
|
|
3806
|
+
const Lt = class Lt extends E {
|
|
3807
3807
|
constructor(e, t) {
|
|
3808
3808
|
if (super(e, t), !t.viewer) {
|
|
3809
3809
|
console.warn("viewer is undefined!");
|
|
@@ -3812,8 +3812,8 @@ const Lt = class Lt extends I {
|
|
|
3812
3812
|
}
|
|
3813
3813
|
};
|
|
3814
3814
|
v(Lt, "type", Lt.register("ESUeViewer", tn.type, Lt));
|
|
3815
|
-
let
|
|
3816
|
-
const
|
|
3815
|
+
let fi = Lt;
|
|
3816
|
+
const kt = class kt extends D {
|
|
3817
3817
|
constructor(e, t) {
|
|
3818
3818
|
super(e, t);
|
|
3819
3819
|
const i = t.viewer;
|
|
@@ -3825,10 +3825,10 @@ const Pt = class Pt extends M {
|
|
|
3825
3825
|
{
|
|
3826
3826
|
const o = () => {
|
|
3827
3827
|
if (typeof e.url == "string")
|
|
3828
|
-
r.value =
|
|
3828
|
+
r.value = I.context.getStrFromEnv(e.url);
|
|
3829
3829
|
else {
|
|
3830
3830
|
const h = e.url;
|
|
3831
|
-
h.url =
|
|
3831
|
+
h.url = I.context.getStrFromEnv(h.url), r.value = h;
|
|
3832
3832
|
}
|
|
3833
3833
|
};
|
|
3834
3834
|
o(), this.ad(e.urlChanged.don(o));
|
|
@@ -3848,7 +3848,7 @@ const Pt = class Pt extends M {
|
|
|
3848
3848
|
heightOffset: e.heightOffset ?? N.defaults.heightOffset
|
|
3849
3849
|
}
|
|
3850
3850
|
});
|
|
3851
|
-
}, s = this.dv(
|
|
3851
|
+
}, s = this.dv(L(
|
|
3852
3852
|
r.changed,
|
|
3853
3853
|
e.treeTypesChanged,
|
|
3854
3854
|
e.xiaoBanWidgetChanged,
|
|
@@ -3861,15 +3861,15 @@ const Pt = class Pt extends M {
|
|
|
3861
3861
|
this.d(s.don(n)), this.d(e.createdEvent.don(n));
|
|
3862
3862
|
}
|
|
3863
3863
|
};
|
|
3864
|
-
v(
|
|
3865
|
-
let wi =
|
|
3866
|
-
const
|
|
3864
|
+
v(kt, "type", kt.register("ESUeViewer", N.type, kt));
|
|
3865
|
+
let wi = kt;
|
|
3866
|
+
const Dt = class Dt extends G {
|
|
3867
3867
|
constructor(e, t) {
|
|
3868
|
-
super(e, t), this.ad(new
|
|
3868
|
+
super(e, t), this.ad(new P(e.renderInUEChanged, () => e.renderInUE ? new Fo(e, t) : new Co(e, t)));
|
|
3869
3869
|
}
|
|
3870
3870
|
};
|
|
3871
|
-
v(
|
|
3872
|
-
let yi =
|
|
3871
|
+
v(Dt, "type", Dt.register("ESUeViewer", Ce.type, Dt));
|
|
3872
|
+
let yi = Dt;
|
|
3873
3873
|
class Co extends m {
|
|
3874
3874
|
constructor(t, i) {
|
|
3875
3875
|
super();
|
|
@@ -3879,23 +3879,23 @@ class Co extends m {
|
|
|
3879
3879
|
console.warn("viewer is undefined!");
|
|
3880
3880
|
return;
|
|
3881
3881
|
}
|
|
3882
|
-
const n = this.disposeVar(new
|
|
3882
|
+
const n = this.disposeVar(new gr());
|
|
3883
3883
|
n.parentID = t.id, t.components.disposableAdd(n, !0), n.show = !1, this.dispose(k([n, "position"], [t, "position"])), this.dispose(k([n, "rotation"], [t, "rotation"])), this.dispose(k([n, "flyToParam"], [t, "flyToParam"])), this.dispose(k([n, "flyInParam"], [t, "flyInParam"])), this.dispose(t.calcFlyToParamEvent.disposableOn(() => {
|
|
3884
|
-
|
|
3884
|
+
dt(r, n.id);
|
|
3885
3885
|
})), this.dispose(t.calcFlyInParamEvent.disposableOn(async () => {
|
|
3886
3886
|
if (!i.actived) return;
|
|
3887
3887
|
const h = await i.getCurrentCameraInfo();
|
|
3888
3888
|
if (!h) return;
|
|
3889
|
-
const { position: a, rotation:
|
|
3890
|
-
t.flyInParam = { position: a, rotation:
|
|
3889
|
+
const { position: a, rotation: f } = h;
|
|
3890
|
+
t.flyInParam = { position: a, rotation: f, flyDuration: 1 };
|
|
3891
3891
|
})), this.dispose(t.smoothMoveEvent.disposableOn((h, a) => {
|
|
3892
3892
|
De(r, n.id, h, a);
|
|
3893
|
-
})), this.dispose(t.smoothMoveWithRotationEvent.disposableOn((h, a,
|
|
3894
|
-
|
|
3895
|
-
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((h, a,
|
|
3896
|
-
|
|
3897
|
-
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((h, a,
|
|
3898
|
-
ke(r, n.id, h, a,
|
|
3893
|
+
})), this.dispose(t.smoothMoveWithRotationEvent.disposableOn((h, a, f) => {
|
|
3894
|
+
Pe(r, n.id, h, a, f);
|
|
3895
|
+
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((h, a, f, p) => {
|
|
3896
|
+
Le(r, n.id, h, a, p, f);
|
|
3897
|
+
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((h, a, f, p, l) => {
|
|
3898
|
+
ke(r, n.id, h, a, f, p, l);
|
|
3899
3899
|
})), this.dispose(t.flyToEvent.disposableOn((h, a) => {
|
|
3900
3900
|
n.flyTo(h);
|
|
3901
3901
|
})), this.dispose(t.flyInEvent.don((h) => {
|
|
@@ -3904,15 +3904,15 @@ class Co extends m {
|
|
|
3904
3904
|
const s = this._screenPosition, o = this.disposeVar(new Je());
|
|
3905
3905
|
o.parentID = t.id, i.add(o), this.dispose(() => i.delete(o)), this.dispose(k([o, "allowPicking"], [t, "allowPicking"]));
|
|
3906
3906
|
{
|
|
3907
|
-
const h = this.disposeVar(
|
|
3907
|
+
const h = this.disposeVar(ze()), a = () => {
|
|
3908
3908
|
t.show ? h.restart(void 0, async () => {
|
|
3909
3909
|
if (!t.position) return;
|
|
3910
|
-
const
|
|
3910
|
+
const f = await i.lonLatAltToScreenPosition(t.position);
|
|
3911
3911
|
if (!this.isDestroyed())
|
|
3912
|
-
if (!
|
|
3912
|
+
if (!f)
|
|
3913
3913
|
this._screenPosition.value = void 0;
|
|
3914
3914
|
else {
|
|
3915
|
-
const [p, l] =
|
|
3915
|
+
const [p, l] = f;
|
|
3916
3916
|
p === -1 && l === -1 ? this._screenPosition.value = void 0 : this._screenPosition.value = [p, l];
|
|
3917
3917
|
}
|
|
3918
3918
|
}) : h.cancel();
|
|
@@ -3925,7 +3925,7 @@ class Co extends m {
|
|
|
3925
3925
|
if (super(), this._subContainer = l, !c) return;
|
|
3926
3926
|
if (!t.instanceClass)
|
|
3927
3927
|
throw new Error("!sceneObject.instanceClass");
|
|
3928
|
-
const
|
|
3928
|
+
const g = new en(), w = g.element;
|
|
3929
3929
|
this._subContainer.appendChild(w), this.dispose(() => this._subContainer.removeChild(w)), w.onclick = (y) => {
|
|
3930
3930
|
(t.allowPicking ?? !1) && t.pickedEvent.emit(new Ae(
|
|
3931
3931
|
{ div: w, pointerEvent: y },
|
|
@@ -3945,10 +3945,10 @@ class Co extends m {
|
|
|
3945
3945
|
{
|
|
3946
3946
|
const y = () => {
|
|
3947
3947
|
const C = t.show;
|
|
3948
|
-
s.value && C ? (
|
|
3948
|
+
s.value && C ? (g.show = !0, g.winPos = [...s.value]) : (g.show = !1, g.winPos = [0, 0]);
|
|
3949
3949
|
};
|
|
3950
3950
|
y();
|
|
3951
|
-
const x = this.disposeVar(
|
|
3951
|
+
const x = this.disposeVar(L(
|
|
3952
3952
|
t.showChanged,
|
|
3953
3953
|
s.changed
|
|
3954
3954
|
));
|
|
@@ -3957,17 +3957,17 @@ class Co extends m {
|
|
|
3957
3957
|
{
|
|
3958
3958
|
const y = () => {
|
|
3959
3959
|
const [x, C] = t.anchor ?? Ce.defaults.anchor;
|
|
3960
|
-
|
|
3960
|
+
g.originRatioX = x, g.originRatioY = C;
|
|
3961
3961
|
};
|
|
3962
3962
|
y(), this.dispose(t.anchorChanged.disposableOn(y));
|
|
3963
3963
|
}
|
|
3964
3964
|
{
|
|
3965
3965
|
const y = () => {
|
|
3966
|
-
|
|
3966
|
+
g.opacity = t.opacity ?? Ce.defaults.opacity;
|
|
3967
3967
|
};
|
|
3968
3968
|
y(), this.dispose(t.opacityChanged.disposableOn(y));
|
|
3969
3969
|
}
|
|
3970
|
-
this.disposeVar(new t.instanceClass(
|
|
3970
|
+
this.disposeVar(new t.instanceClass(g.contentDiv, t, c));
|
|
3971
3971
|
}
|
|
3972
3972
|
}, a = () => {
|
|
3973
3973
|
try {
|
|
@@ -3977,7 +3977,7 @@ class Co extends m {
|
|
|
3977
3977
|
}
|
|
3978
3978
|
};
|
|
3979
3979
|
a();
|
|
3980
|
-
const
|
|
3980
|
+
const f = this.dv(L(
|
|
3981
3981
|
t.instanceClassChanged,
|
|
3982
3982
|
t.opacityChanged,
|
|
3983
3983
|
t.anchorChanged,
|
|
@@ -3985,7 +3985,7 @@ class Co extends m {
|
|
|
3985
3985
|
t.showChanged,
|
|
3986
3986
|
t.allowPickingChanged
|
|
3987
3987
|
));
|
|
3988
|
-
this.d(
|
|
3988
|
+
this.d(f.don(a));
|
|
3989
3989
|
}
|
|
3990
3990
|
}
|
|
3991
3991
|
get screenPosition() {
|
|
@@ -4003,7 +4003,7 @@ class Fo extends m {
|
|
|
4003
4003
|
super();
|
|
4004
4004
|
v(this, "_imageLabel");
|
|
4005
4005
|
v(this, "_hasClassDivAndPos", {});
|
|
4006
|
-
this._imageLabel = this.dv(new
|
|
4006
|
+
this._imageLabel = this.dv(new fr()), this._imageLabel.isHoverZoom = !1, this._imageLabel.parentID = t.id;
|
|
4007
4007
|
const r = i.viewer;
|
|
4008
4008
|
if (!r) {
|
|
4009
4009
|
console.warn("viewer is undefined!");
|
|
@@ -4016,10 +4016,10 @@ class Fo extends m {
|
|
|
4016
4016
|
if (!r) return;
|
|
4017
4017
|
if (!t.instanceClass)
|
|
4018
4018
|
throw new Error("!sceneObject.instanceClass");
|
|
4019
|
-
const a = document.createElement("div"),
|
|
4020
|
-
if (
|
|
4021
|
-
document.body.appendChild(
|
|
4022
|
-
let l =
|
|
4019
|
+
const a = document.createElement("div"), f = this.dv(new t.instanceClass(a, t, i))._container;
|
|
4020
|
+
if (f.style.opacity = t.opacity.toString() ?? Ce.defaults.opacity, f.style.position = "fixed", f.style.zIndex = "-1", f.style.top = "0px", !document.body.contains(f)) {
|
|
4021
|
+
document.body.appendChild(f);
|
|
4022
|
+
let l = f ? f.querySelectorAll("*[class]") : [];
|
|
4023
4023
|
for (let u = 0; u < l.length; u++) {
|
|
4024
4024
|
const c = l[u];
|
|
4025
4025
|
var p = c.getBoundingClientRect();
|
|
@@ -4031,17 +4031,17 @@ class Fo extends m {
|
|
|
4031
4031
|
];
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
4034
|
-
Qn(
|
|
4034
|
+
Qn(f, {
|
|
4035
4035
|
backgroundColor: null,
|
|
4036
4036
|
allowTaint: !0,
|
|
4037
4037
|
useCORS: !0,
|
|
4038
|
-
width:
|
|
4039
|
-
height:
|
|
4038
|
+
width: f.offsetWidth,
|
|
4039
|
+
height: f.offsetHeight,
|
|
4040
4040
|
scale: 1
|
|
4041
4041
|
}).then((l) => {
|
|
4042
|
-
document.body.contains(
|
|
4042
|
+
document.body.contains(f) && document.body.removeChild(f), n.url = l.toDataURL(), n.show = t.show;
|
|
4043
4043
|
}).catch(() => {
|
|
4044
|
-
document.body.contains(
|
|
4044
|
+
document.body.contains(f) && document.body.removeChild(f);
|
|
4045
4045
|
});
|
|
4046
4046
|
}, o = () => {
|
|
4047
4047
|
try {
|
|
@@ -4051,7 +4051,7 @@ class Fo extends m {
|
|
|
4051
4051
|
}
|
|
4052
4052
|
};
|
|
4053
4053
|
o();
|
|
4054
|
-
const h = this.dv(
|
|
4054
|
+
const h = this.dv(L(
|
|
4055
4055
|
t.instanceClassChanged,
|
|
4056
4056
|
t.opacityChanged
|
|
4057
4057
|
));
|
|
@@ -4069,9 +4069,9 @@ class Fo extends m {
|
|
|
4069
4069
|
if (s.objId !== this._imageLabel.id) return;
|
|
4070
4070
|
const { type: o, add: h } = s;
|
|
4071
4071
|
if (o === "leftClick" && h) {
|
|
4072
|
-
const a = (h == null ? void 0 : h.classNames) ?? [],
|
|
4073
|
-
for (let p = 0; p <
|
|
4074
|
-
const l =
|
|
4072
|
+
const a = (h == null ? void 0 : h.classNames) ?? [], f = Object.keys(this._hasClassDivAndPos);
|
|
4073
|
+
for (let p = 0; p < f.length; p++) {
|
|
4074
|
+
const l = f[p];
|
|
4075
4075
|
let u = this._hasClassDivAndPos[l];
|
|
4076
4076
|
h && h.mouseRelativePos && h.mouseRelativePos[0] >= u[0] && h.mouseRelativePos[0] <= u[2] && h.mouseRelativePos[1] >= u[1] && h.mouseRelativePos[1] <= u[3] && a.push(l);
|
|
4077
4077
|
}
|
|
@@ -4079,7 +4079,7 @@ class Fo extends m {
|
|
|
4079
4079
|
}
|
|
4080
4080
|
t.widgetEvent.emit({ type: o, add: h });
|
|
4081
4081
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
4082
|
-
|
|
4082
|
+
dt(r, n.id);
|
|
4083
4083
|
})), this.d(t.calcFlyInParamEvent.don(() => {
|
|
4084
4084
|
const s = i.getCurrentCameraInfo();
|
|
4085
4085
|
if (!s) return;
|
|
@@ -4088,11 +4088,11 @@ class Fo extends m {
|
|
|
4088
4088
|
})), this.d(t.smoothMoveEvent.don((s, o) => {
|
|
4089
4089
|
De(r, n.id, s, o);
|
|
4090
4090
|
})), this.d(t.smoothMoveWithRotationEvent.don((s, o, h) => {
|
|
4091
|
-
|
|
4091
|
+
Pe(r, n.id, s, o, h);
|
|
4092
4092
|
})), this.d(t.smoothMoveOnGroundEvent.don((s, o, h, a) => {
|
|
4093
|
-
|
|
4094
|
-
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, h, a,
|
|
4095
|
-
ke(r, n.id, s, o, h, a,
|
|
4093
|
+
Le(r, n.id, s, o, a, h);
|
|
4094
|
+
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, h, a, f) => {
|
|
4095
|
+
ke(r, n.id, s, o, h, a, f);
|
|
4096
4096
|
})), this.d(t.flyToEvent.don((s, o) => {
|
|
4097
4097
|
n.flyTo(s);
|
|
4098
4098
|
})), this.d(t.flyInEvent.don((s) => {
|
|
@@ -4100,7 +4100,7 @@ class Fo extends m {
|
|
|
4100
4100
|
}));
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
|
-
const
|
|
4103
|
+
const Y = class Y extends D {
|
|
4104
4104
|
constructor(e, t) {
|
|
4105
4105
|
super(e, t);
|
|
4106
4106
|
const i = t.viewer;
|
|
@@ -4130,9 +4130,15 @@ const Dt = class Dt extends M {
|
|
|
4130
4130
|
}));
|
|
4131
4131
|
}
|
|
4132
4132
|
};
|
|
4133
|
-
v(
|
|
4134
|
-
|
|
4135
|
-
|
|
4133
|
+
v(Y, "type", Y.register("ESUeViewer", rn.type, Y)), v(Y, "forceUeUpdateProps", [
|
|
4134
|
+
...D.forceUeUpdateProps,
|
|
4135
|
+
"url"
|
|
4136
|
+
]), v(Y, "propValFuncs", {
|
|
4137
|
+
...D.propValFuncs,
|
|
4138
|
+
url: (e) => typeof e == "string" ? I.context.getStrFromEnv(e) : e
|
|
4139
|
+
});
|
|
4140
|
+
let mi = Y;
|
|
4141
|
+
const Bt = class Bt extends B {
|
|
4136
4142
|
constructor(e, t) {
|
|
4137
4143
|
if (super(e, t), !t.viewer) {
|
|
4138
4144
|
console.warn("viewer is undefined!");
|
|
@@ -4141,8 +4147,8 @@ const Bt = class Bt extends D {
|
|
|
4141
4147
|
}
|
|
4142
4148
|
};
|
|
4143
4149
|
v(Bt, "type", Bt.register("ESUeViewer", nn.type, Bt));
|
|
4144
|
-
let
|
|
4145
|
-
const _t = class _t extends
|
|
4150
|
+
let be = Bt;
|
|
4151
|
+
const _t = class _t extends B {
|
|
4146
4152
|
constructor(e, t) {
|
|
4147
4153
|
if (super(e, t), !t.viewer) {
|
|
4148
4154
|
console.warn("viewer is undefined!");
|
|
@@ -4162,7 +4168,7 @@ const Mt = class Mt extends $ {
|
|
|
4162
4168
|
};
|
|
4163
4169
|
v(Mt, "type", Mt.register("ESUeViewer", on.type, Mt));
|
|
4164
4170
|
let Fi = Mt;
|
|
4165
|
-
const
|
|
4171
|
+
const Z = class Z extends E {
|
|
4166
4172
|
constructor(e, t) {
|
|
4167
4173
|
super(e, t);
|
|
4168
4174
|
const i = t.viewer;
|
|
@@ -4179,19 +4185,19 @@ const Y = class Y extends I {
|
|
|
4179
4185
|
}));
|
|
4180
4186
|
}
|
|
4181
4187
|
};
|
|
4182
|
-
v(
|
|
4183
|
-
...
|
|
4188
|
+
v(Z, "forceUeUpdateProps", [
|
|
4189
|
+
...E.forceUeUpdateProps,
|
|
4184
4190
|
"url"
|
|
4185
|
-
]), v(
|
|
4186
|
-
...
|
|
4187
|
-
url: (e) => typeof e == "string" ?
|
|
4191
|
+
]), v(Z, "propValFuncs", {
|
|
4192
|
+
...E.propValFuncs,
|
|
4193
|
+
url: (e) => typeof e == "string" ? I.context.getStrFromEnv(Fe(e)) : (e.url = I.context.getStrFromEnv(Fe(e.url)), e),
|
|
4188
4194
|
czmMaximumScale: null,
|
|
4189
4195
|
czmMinimumPixelSize: null,
|
|
4190
4196
|
czmNativeScale: null,
|
|
4191
4197
|
czmColor: null
|
|
4192
|
-
}), v(
|
|
4193
|
-
let Ii =
|
|
4194
|
-
const $t = class $t extends
|
|
4198
|
+
}), v(Z, "type", Z.register("ESUeViewer", an.type, Z));
|
|
4199
|
+
let Ii = Z;
|
|
4200
|
+
const $t = class $t extends B {
|
|
4195
4201
|
constructor(e, t) {
|
|
4196
4202
|
if (super(e, t), !t.viewer) {
|
|
4197
4203
|
console.warn("viewer is undefined!");
|
|
@@ -4201,19 +4207,19 @@ const $t = class $t extends D {
|
|
|
4201
4207
|
};
|
|
4202
4208
|
v($t, "type", $t.register("ESUeViewer", ln.type, $t));
|
|
4203
4209
|
let Ei = $t;
|
|
4204
|
-
const Wt = class Wt extends
|
|
4210
|
+
const Wt = class Wt extends E {
|
|
4205
4211
|
constructor(e, t) {
|
|
4206
4212
|
if (super(e, t), !t.viewer) {
|
|
4207
4213
|
console.warn("viewer is undefined!");
|
|
4208
4214
|
return;
|
|
4209
4215
|
}
|
|
4210
4216
|
const r = async (s, o, h, a) => {
|
|
4211
|
-
const { viewer:
|
|
4212
|
-
if (!
|
|
4217
|
+
const { viewer: f } = s;
|
|
4218
|
+
if (!f) {
|
|
4213
4219
|
console.error("AIMoveTo: ueViewer.viewer is undefined");
|
|
4214
4220
|
return;
|
|
4215
4221
|
}
|
|
4216
|
-
const p = await
|
|
4222
|
+
const p = await f.callUeFunc({
|
|
4217
4223
|
f: "AIMoveTo",
|
|
4218
4224
|
p: { id: o, Destination: h, Time: a }
|
|
4219
4225
|
});
|
|
@@ -4241,7 +4247,7 @@ const Wt = class Wt extends I {
|
|
|
4241
4247
|
};
|
|
4242
4248
|
v(Wt, "type", Wt.register("ESUeViewer", dn.type, Wt));
|
|
4243
4249
|
let Si = Wt;
|
|
4244
|
-
const
|
|
4250
|
+
const q = class q extends b {
|
|
4245
4251
|
constructor(e, t) {
|
|
4246
4252
|
if (super(e, t), !t.viewer) {
|
|
4247
4253
|
console.warn("viewer is undefined!");
|
|
@@ -4250,15 +4256,15 @@ const Z = class Z extends z {
|
|
|
4250
4256
|
e.anchor = [0.5, 1];
|
|
4251
4257
|
}
|
|
4252
4258
|
};
|
|
4253
|
-
v(
|
|
4254
|
-
...
|
|
4259
|
+
v(q, "type", q.register("ESUeViewer", fr.type, q)), v(q, "forceUeUpdateProps", [
|
|
4260
|
+
...b.forceUeUpdateProps,
|
|
4255
4261
|
"url"
|
|
4256
|
-
]), v(
|
|
4257
|
-
...
|
|
4258
|
-
url: (e) => typeof e == "string" ?
|
|
4262
|
+
]), v(q, "propValFuncs", {
|
|
4263
|
+
...b.propValFuncs,
|
|
4264
|
+
url: (e) => typeof e == "string" ? I.context.getStrFromEnv(Fe(e)) : (e.url = I.context.getStrFromEnv(Fe(e.url)), e)
|
|
4259
4265
|
});
|
|
4260
|
-
let Ti =
|
|
4261
|
-
const At = class At extends
|
|
4266
|
+
let Ti = q;
|
|
4267
|
+
const At = class At extends E {
|
|
4262
4268
|
constructor(e, t) {
|
|
4263
4269
|
if (super(e, t), !t.viewer) {
|
|
4264
4270
|
console.warn("viewer is undefined!");
|
|
@@ -4278,7 +4284,7 @@ const Ut = class Ut extends Ke {
|
|
|
4278
4284
|
};
|
|
4279
4285
|
v(Ut, "type", Ut.register("ESUeViewer", un.type, Ut));
|
|
4280
4286
|
let Ri = Ut;
|
|
4281
|
-
const Nt = class Nt extends
|
|
4287
|
+
const Nt = class Nt extends D {
|
|
4282
4288
|
constructor(e, t) {
|
|
4283
4289
|
if (super(e, t), !t.viewer) {
|
|
4284
4290
|
console.warn("viewer is undefined!");
|
|
@@ -4287,8 +4293,8 @@ const Nt = class Nt extends M {
|
|
|
4287
4293
|
}
|
|
4288
4294
|
};
|
|
4289
4295
|
v(Nt, "type", Nt.register("ESUeViewer", hn.type, Nt));
|
|
4290
|
-
let
|
|
4291
|
-
const
|
|
4296
|
+
let Pi = Nt;
|
|
4297
|
+
const bt = class bt extends Ke {
|
|
4292
4298
|
constructor(e, t) {
|
|
4293
4299
|
if (super(e, t), !t.viewer) {
|
|
4294
4300
|
console.warn("viewer is undefined!");
|
|
@@ -4296,9 +4302,9 @@ const zt = class zt extends Ke {
|
|
|
4296
4302
|
}
|
|
4297
4303
|
}
|
|
4298
4304
|
};
|
|
4299
|
-
v(
|
|
4300
|
-
let
|
|
4301
|
-
const
|
|
4305
|
+
v(bt, "type", bt.register("ESUeViewer", pn.type, bt));
|
|
4306
|
+
let Li = bt;
|
|
4307
|
+
const zt = class zt extends E {
|
|
4302
4308
|
constructor(e, t) {
|
|
4303
4309
|
if (super(e, t), !t.viewer) {
|
|
4304
4310
|
console.warn("viewer is undefined!");
|
|
@@ -4306,9 +4312,9 @@ const bt = class bt extends I {
|
|
|
4306
4312
|
}
|
|
4307
4313
|
}
|
|
4308
4314
|
};
|
|
4309
|
-
v(
|
|
4310
|
-
let ki =
|
|
4311
|
-
const Ht = class Ht extends
|
|
4315
|
+
v(zt, "type", zt.register("ESUeViewer", vn.type, zt));
|
|
4316
|
+
let ki = zt;
|
|
4317
|
+
const Ht = class Ht extends E {
|
|
4312
4318
|
constructor(e, t) {
|
|
4313
4319
|
if (super(e, t), !t.viewer) {
|
|
4314
4320
|
console.warn("viewer is undefined!");
|
|
@@ -4316,9 +4322,9 @@ const Ht = class Ht extends I {
|
|
|
4316
4322
|
}
|
|
4317
4323
|
}
|
|
4318
4324
|
};
|
|
4319
|
-
v(Ht, "type", Ht.register("ESUeViewer",
|
|
4325
|
+
v(Ht, "type", Ht.register("ESUeViewer", gn.type, Ht));
|
|
4320
4326
|
let Di = Ht;
|
|
4321
|
-
const Jt = class Jt extends
|
|
4327
|
+
const Jt = class Jt extends B {
|
|
4322
4328
|
constructor(e, t) {
|
|
4323
4329
|
if (super(e, t), !t.viewer) {
|
|
4324
4330
|
console.warn("viewer is undefined!");
|
|
@@ -4326,9 +4332,9 @@ const Jt = class Jt extends D {
|
|
|
4326
4332
|
}
|
|
4327
4333
|
}
|
|
4328
4334
|
};
|
|
4329
|
-
v(Jt, "type", Jt.register("ESUeViewer",
|
|
4335
|
+
v(Jt, "type", Jt.register("ESUeViewer", fn.type, Jt));
|
|
4330
4336
|
let Bi = Jt;
|
|
4331
|
-
const Gt = class Gt extends
|
|
4337
|
+
const Gt = class Gt extends be {
|
|
4332
4338
|
constructor(e, t) {
|
|
4333
4339
|
if (super(e, t), !t.viewer) {
|
|
4334
4340
|
console.warn("viewer is undefined!");
|
|
@@ -4373,7 +4379,7 @@ const Xt = class Xt extends $ {
|
|
|
4373
4379
|
};
|
|
4374
4380
|
v(Xt, "type", Xt.register("ESUeViewer", mn.type, Xt));
|
|
4375
4381
|
let $i = Xt;
|
|
4376
|
-
const Yt = class Yt extends
|
|
4382
|
+
const Yt = class Yt extends b {
|
|
4377
4383
|
constructor(e, t) {
|
|
4378
4384
|
super(e, t);
|
|
4379
4385
|
const i = t.viewer;
|
|
@@ -4396,7 +4402,7 @@ const Yt = class Yt extends z {
|
|
|
4396
4402
|
};
|
|
4397
4403
|
v(Yt, "type", Yt.register("ESUeViewer", Cn.type, Yt));
|
|
4398
4404
|
let Wi = Yt;
|
|
4399
|
-
const Zt = class Zt extends
|
|
4405
|
+
const Zt = class Zt extends E {
|
|
4400
4406
|
constructor(e, t) {
|
|
4401
4407
|
if (super(e, t), !t.viewer) {
|
|
4402
4408
|
console.warn("viewer is undefined!");
|
|
@@ -4406,7 +4412,7 @@ const Zt = class Zt extends I {
|
|
|
4406
4412
|
};
|
|
4407
4413
|
v(Zt, "type", Zt.register("ESUeViewer", Fn.type, Zt));
|
|
4408
4414
|
let Ai = Zt;
|
|
4409
|
-
const
|
|
4415
|
+
const Q = class Q extends D {
|
|
4410
4416
|
constructor(e, t) {
|
|
4411
4417
|
if (super(e, t), !t.viewer) {
|
|
4412
4418
|
console.warn("viewer is undefined!");
|
|
@@ -4414,15 +4420,15 @@ const q = class q extends M {
|
|
|
4414
4420
|
}
|
|
4415
4421
|
}
|
|
4416
4422
|
};
|
|
4417
|
-
v(
|
|
4418
|
-
...
|
|
4423
|
+
v(Q, "type", Q.register("ESUeViewer", In.type, Q)), v(Q, "forceUeUpdateProps", [
|
|
4424
|
+
...D.forceUeUpdateProps,
|
|
4419
4425
|
"url"
|
|
4420
|
-
]), v(
|
|
4421
|
-
...
|
|
4422
|
-
url: (e) => typeof e == "string" ?
|
|
4426
|
+
]), v(Q, "propValFuncs", {
|
|
4427
|
+
...D.propValFuncs,
|
|
4428
|
+
url: (e) => typeof e == "string" ? I.context.getStrFromEnv(e) : (e.url = I.context.getStrFromEnv(e.url), e)
|
|
4423
4429
|
});
|
|
4424
|
-
let Ui =
|
|
4425
|
-
const qt = class qt extends
|
|
4430
|
+
let Ui = Q;
|
|
4431
|
+
const qt = class qt extends B {
|
|
4426
4432
|
constructor(e, t) {
|
|
4427
4433
|
if (super(e, t), !t.viewer) {
|
|
4428
4434
|
console.warn("viewer is undefined!");
|
|
@@ -4432,7 +4438,7 @@ const qt = class qt extends D {
|
|
|
4432
4438
|
};
|
|
4433
4439
|
v(qt, "type", qt.register("ESUeViewer", En.type, qt));
|
|
4434
4440
|
let Ni = qt;
|
|
4435
|
-
const
|
|
4441
|
+
const nt = class nt extends $ {
|
|
4436
4442
|
constructor(e, t) {
|
|
4437
4443
|
if (super(e, t), !t.viewer) {
|
|
4438
4444
|
console.warn("viewer is undefined!");
|
|
@@ -4440,16 +4446,16 @@ const rt = class rt extends $ {
|
|
|
4440
4446
|
}
|
|
4441
4447
|
}
|
|
4442
4448
|
};
|
|
4443
|
-
v(
|
|
4444
|
-
v(
|
|
4449
|
+
v(nt, "type", nt.register("ESUeViewer", Sn.type, nt)), // null 表示不设置,undefined表示不做任何转换
|
|
4450
|
+
v(nt, "propValFuncs", {
|
|
4445
4451
|
...$.propValFuncs,
|
|
4446
4452
|
targetID: (e) => {
|
|
4447
4453
|
if (!e) return "";
|
|
4448
|
-
const t =
|
|
4454
|
+
const t = I.getSceneObject(e);
|
|
4449
4455
|
return t ? (t.components.main ?? t).id : e;
|
|
4450
4456
|
}
|
|
4451
4457
|
});
|
|
4452
|
-
let
|
|
4458
|
+
let bi = nt;
|
|
4453
4459
|
const Qt = class Qt extends $ {
|
|
4454
4460
|
constructor(e, t) {
|
|
4455
4461
|
if (super(e, t), !t.viewer) {
|
|
@@ -4459,8 +4465,8 @@ const Qt = class Qt extends $ {
|
|
|
4459
4465
|
}
|
|
4460
4466
|
};
|
|
4461
4467
|
v(Qt, "type", Qt.register("ESUeViewer", Tn.type, Qt));
|
|
4462
|
-
let
|
|
4463
|
-
const Vt = class Vt extends
|
|
4468
|
+
let zi = Qt;
|
|
4469
|
+
const Vt = class Vt extends lt {
|
|
4464
4470
|
constructor(e, t) {
|
|
4465
4471
|
if (super(e, t), !t.viewer) {
|
|
4466
4472
|
console.warn("viewer is undefined!");
|
|
@@ -4479,23 +4485,23 @@ const Vt = class Vt extends at {
|
|
|
4479
4485
|
let h = [255, 255, 255, 1];
|
|
4480
4486
|
if (o.startsWith("#")) {
|
|
4481
4487
|
if (o.length === 4) {
|
|
4482
|
-
let a = parseInt(o[1] + o[1], 16),
|
|
4483
|
-
h = [a,
|
|
4488
|
+
let a = parseInt(o[1] + o[1], 16), f = parseInt(o[2] + o[2], 16), p = parseInt(o[3] + o[3], 16);
|
|
4489
|
+
h = [a, f, p, 1];
|
|
4484
4490
|
} else if (o.length === 7) {
|
|
4485
|
-
let a = parseInt(o.substring(1, 3), 16),
|
|
4486
|
-
h = [a,
|
|
4491
|
+
let a = parseInt(o.substring(1, 3), 16), f = parseInt(o.substring(3, 5), 16), p = parseInt(o.substring(5, 7), 16);
|
|
4492
|
+
h = [a, f, p, 1];
|
|
4487
4493
|
}
|
|
4488
4494
|
} else if (o.startsWith("rgba")) {
|
|
4489
4495
|
let a = o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);
|
|
4490
4496
|
if (a) {
|
|
4491
|
-
let
|
|
4492
|
-
h = [
|
|
4497
|
+
let f = parseInt(a[1]), p = parseInt(a[2]), l = parseInt(a[3]), u = parseFloat(a[4]);
|
|
4498
|
+
h = [f, p, l, u];
|
|
4493
4499
|
}
|
|
4494
4500
|
} else if (o.startsWith("rgb")) {
|
|
4495
4501
|
let a = o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
|
4496
4502
|
if (a) {
|
|
4497
|
-
let
|
|
4498
|
-
h = [
|
|
4503
|
+
let f = parseInt(a[1]), p = parseInt(a[2]), l = parseInt(a[3]);
|
|
4504
|
+
h = [f, p, l, 1];
|
|
4499
4505
|
}
|
|
4500
4506
|
} else
|
|
4501
4507
|
console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");
|
|
@@ -4529,7 +4535,7 @@ const Vt = class Vt extends at {
|
|
|
4529
4535
|
}), e.setFeatureStyle(h);
|
|
4530
4536
|
};
|
|
4531
4537
|
n();
|
|
4532
|
-
const s = this.dv(
|
|
4538
|
+
const s = this.dv(L(
|
|
4533
4539
|
e.layerConfigChanged,
|
|
4534
4540
|
e.colorBlendModeChanged
|
|
4535
4541
|
));
|
|
@@ -4541,16 +4547,16 @@ const Vt = class Vt extends at {
|
|
|
4541
4547
|
};
|
|
4542
4548
|
v(Vt, "type", Vt.register("ESUeViewer", xn.type, Vt));
|
|
4543
4549
|
let Hi = Vt;
|
|
4544
|
-
const Ot = class Ot extends
|
|
4550
|
+
const Ot = class Ot extends D {
|
|
4545
4551
|
constructor(e, t) {
|
|
4546
4552
|
if (super(e, t), !t.viewer) {
|
|
4547
4553
|
console.warn("viewer is undefined!");
|
|
4548
4554
|
return;
|
|
4549
4555
|
}
|
|
4550
4556
|
this.d(e.addTreesEvent.don((r) => {
|
|
4551
|
-
|
|
4557
|
+
Pn(t, e.id, r);
|
|
4552
4558
|
})), this.d(e.removeAllTreesEvent.don(() => {
|
|
4553
|
-
|
|
4559
|
+
Ln(t, e.id);
|
|
4554
4560
|
})), this.d(e.updateTreeParamsEvent.don((r) => {
|
|
4555
4561
|
kn(t, e.id, r);
|
|
4556
4562
|
})), this.d(e.cutDownTreesEvent.don((r, n) => {
|
|
@@ -4562,7 +4568,7 @@ const Ot = class Ot extends M {
|
|
|
4562
4568
|
};
|
|
4563
4569
|
v(Ot, "type", Ot.register("ESUeViewer", Rn.type, Ot));
|
|
4564
4570
|
let Ji = Ot;
|
|
4565
|
-
const jt = class jt extends
|
|
4571
|
+
const jt = class jt extends E {
|
|
4566
4572
|
constructor(e, t) {
|
|
4567
4573
|
if (super(e, t), !t.viewer) {
|
|
4568
4574
|
console.warn("viewer is undefined!");
|
|
@@ -4619,7 +4625,7 @@ const ee = class ee extends $ {
|
|
|
4619
4625
|
};
|
|
4620
4626
|
v(ee, "type", ee.register("ESUeViewer", $n.type, ee));
|
|
4621
4627
|
let Xi = ee;
|
|
4622
|
-
const ie = class ie extends
|
|
4628
|
+
const ie = class ie extends b {
|
|
4623
4629
|
constructor(e, t) {
|
|
4624
4630
|
if (super(e, t), !t.viewer) {
|
|
4625
4631
|
console.warn("viewer is undefined!");
|
|
@@ -4627,9 +4633,9 @@ const ie = class ie extends z {
|
|
|
4627
4633
|
}
|
|
4628
4634
|
}
|
|
4629
4635
|
};
|
|
4630
|
-
v(ie, "type", ie.register("ESUeViewer",
|
|
4636
|
+
v(ie, "type", ie.register("ESUeViewer", gr.type, ie));
|
|
4631
4637
|
let Yi = ie;
|
|
4632
|
-
const
|
|
4638
|
+
const st = class st extends b {
|
|
4633
4639
|
constructor(e, t) {
|
|
4634
4640
|
super(e, t);
|
|
4635
4641
|
const i = t.viewer;
|
|
@@ -4643,11 +4649,11 @@ const nt = class nt extends z {
|
|
|
4643
4649
|
}));
|
|
4644
4650
|
}
|
|
4645
4651
|
};
|
|
4646
|
-
v(
|
|
4647
|
-
...
|
|
4652
|
+
v(st, "type", st.register("ESUeViewer", Wn.type, st)), v(st, "propValFuncs", {
|
|
4653
|
+
...b.propValFuncs,
|
|
4648
4654
|
info: (e) => JSON.stringify(e ?? {})
|
|
4649
4655
|
});
|
|
4650
|
-
let Zi =
|
|
4656
|
+
let Zi = st;
|
|
4651
4657
|
const qi = (d) => {
|
|
4652
4658
|
switch (d) {
|
|
4653
4659
|
case 0:
|
|
@@ -4702,7 +4708,7 @@ const qi = (d) => {
|
|
|
4702
4708
|
maxVisibleDistance: e.maxVisibleDistance
|
|
4703
4709
|
}
|
|
4704
4710
|
});
|
|
4705
|
-
}, n = this.dv(
|
|
4711
|
+
}, n = this.dv(L(
|
|
4706
4712
|
e.showChanged,
|
|
4707
4713
|
e.nameChanged,
|
|
4708
4714
|
e.rotationChanged,
|
|
@@ -4725,7 +4731,7 @@ const qi = (d) => {
|
|
|
4725
4731
|
position: e.position
|
|
4726
4732
|
}
|
|
4727
4733
|
}), (t.debug ?? !1) && console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`));
|
|
4728
|
-
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1,
|
|
4734
|
+
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1, f = async () => {
|
|
4729
4735
|
const { id: l } = e, u = await t.unBindActorByID(l);
|
|
4730
4736
|
u && u.error !== "" && console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${u.error}`), s = void 0;
|
|
4731
4737
|
const c = await i.callUeFunc({ f: "destroy", p: { id: l } });
|
|
@@ -4739,7 +4745,7 @@ const qi = (d) => {
|
|
|
4739
4745
|
actorClass: "default"
|
|
4740
4746
|
}));
|
|
4741
4747
|
{
|
|
4742
|
-
const l = this.dv(
|
|
4748
|
+
const l = this.dv(L(
|
|
4743
4749
|
e.actorClassChanged,
|
|
4744
4750
|
e.actorTagChanged
|
|
4745
4751
|
// sceneObject.positionChanged,
|
|
@@ -4758,44 +4764,44 @@ const qi = (d) => {
|
|
|
4758
4764
|
}
|
|
4759
4765
|
{
|
|
4760
4766
|
const l = this.dv(Te(async (c) => {
|
|
4761
|
-
if (await c.promise(
|
|
4762
|
-
const { actorTag:
|
|
4767
|
+
if (await c.promise(f()), e.lastActorStatus = "null", p.value.type === "ActorTag") {
|
|
4768
|
+
const { actorTag: g } = p.value;
|
|
4763
4769
|
try {
|
|
4764
|
-
const w = await c.promise(t.bindActorByTag(e.id,
|
|
4770
|
+
const w = await c.promise(t.bindActorByTag(e.id, g));
|
|
4765
4771
|
if (!w) return;
|
|
4766
4772
|
if (w.error !== "") {
|
|
4767
|
-
console.warn(`${e.id} UeESUnrealActor BindActorByTag:${
|
|
4773
|
+
console.warn(`${e.id} UeESUnrealActor BindActorByTag:${g},${w.error}`);
|
|
4768
4774
|
return;
|
|
4769
4775
|
}
|
|
4770
4776
|
if (w.re.type === 0)
|
|
4771
|
-
e.lastActorStatus = "bound", s =
|
|
4777
|
+
e.lastActorStatus = "bound", s = g;
|
|
4772
4778
|
else if (w.re.type === 1)
|
|
4773
|
-
e.lastActorStatus = "bound", s =
|
|
4779
|
+
e.lastActorStatus = "bound", s = g, console.warn(`${e.id} UeESUnrealActor BindActorByTag:${g},${qi(w.re.type)}`);
|
|
4774
4780
|
else {
|
|
4775
|
-
s = void 0, console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${
|
|
4781
|
+
s = void 0, console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${g}, ${qi(w.re.type)}`);
|
|
4776
4782
|
return;
|
|
4777
4783
|
}
|
|
4778
4784
|
} catch (w) {
|
|
4779
|
-
console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${
|
|
4785
|
+
console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${g}, ${w}`);
|
|
4780
4786
|
return;
|
|
4781
4787
|
}
|
|
4782
4788
|
} else if (p.value.type === "ActorClass") {
|
|
4783
|
-
const { actorClass:
|
|
4789
|
+
const { actorClass: g } = p.value;
|
|
4784
4790
|
try {
|
|
4785
|
-
const w = await c.promise(t.createActorByClass(e.id,
|
|
4791
|
+
const w = await c.promise(t.createActorByClass(e.id, g));
|
|
4786
4792
|
if (!w) return;
|
|
4787
4793
|
if (w.error !== "") {
|
|
4788
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${
|
|
4794
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${g}, ${w.error}`);
|
|
4789
4795
|
return;
|
|
4790
4796
|
}
|
|
4791
4797
|
if (w.re.type === 0)
|
|
4792
|
-
|
|
4798
|
+
g !== "default" && (e.lastActorStatus = "created"), o = g;
|
|
4793
4799
|
else {
|
|
4794
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${
|
|
4800
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${g},${Io(w.re.type)}`);
|
|
4795
4801
|
return;
|
|
4796
4802
|
}
|
|
4797
4803
|
} catch (w) {
|
|
4798
|
-
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${
|
|
4804
|
+
console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${g}, ${JSON.stringify(w)}`);
|
|
4799
4805
|
return;
|
|
4800
4806
|
}
|
|
4801
4807
|
}
|
|
@@ -4815,11 +4821,11 @@ const qi = (d) => {
|
|
|
4815
4821
|
})), this.d(e.smoothMoveEvent.don((l, u) => {
|
|
4816
4822
|
a() || De(i, e.id, l, u);
|
|
4817
4823
|
})), this.d(e.smoothMoveWithRotationEvent.don((l, u, c) => {
|
|
4818
|
-
a() ||
|
|
4819
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((l, u, c,
|
|
4820
|
-
a() ||
|
|
4821
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((l, u, c,
|
|
4822
|
-
a() || ke(i, e.id, l, u, c,
|
|
4824
|
+
a() || Pe(i, e.id, l, u, c);
|
|
4825
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((l, u, c, g) => {
|
|
4826
|
+
a() || Le(i, e.id, l, u, g, c);
|
|
4827
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((l, u, c, g, w) => {
|
|
4828
|
+
a() || ke(i, e.id, l, u, c, g, w);
|
|
4823
4829
|
})), this.d(e.automaticLandingEvent.don((l) => {
|
|
4824
4830
|
if (a()) return;
|
|
4825
4831
|
const u = [e.position[0], e.position[1]];
|
|
@@ -4829,10 +4835,10 @@ const qi = (d) => {
|
|
|
4829
4835
|
})), this.d(e.flyToEvent.don(async (l, u) => {
|
|
4830
4836
|
if (a()) return;
|
|
4831
4837
|
const c = await we(i, e.id, l);
|
|
4832
|
-
let
|
|
4833
|
-
c === void 0 ?
|
|
4838
|
+
let g = "over";
|
|
4839
|
+
c === void 0 ? g = "error" : c.endType === 0 ? g = "over" : c.endType === 1 && (g = "cancelled"), e.flyOverEvent.emit(u, g, t);
|
|
4834
4840
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
4835
|
-
a() ||
|
|
4841
|
+
a() || dt(i, e.id);
|
|
4836
4842
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
4837
4843
|
if (!t.actived) return;
|
|
4838
4844
|
const l = await t.getCurrentCameraInfo();
|
|
@@ -4849,7 +4855,7 @@ const qi = (d) => {
|
|
|
4849
4855
|
};
|
|
4850
4856
|
v(re, "type", re.register("ESUeViewer", $e.type, re));
|
|
4851
4857
|
let Qi = re;
|
|
4852
|
-
const ne = class ne extends
|
|
4858
|
+
const ne = class ne extends E {
|
|
4853
4859
|
constructor(e, t) {
|
|
4854
4860
|
if (super(e, t), !t.viewer) {
|
|
4855
4861
|
console.warn("viewer is undefined!");
|
|
@@ -4859,7 +4865,7 @@ const ne = class ne extends I {
|
|
|
4859
4865
|
};
|
|
4860
4866
|
v(ne, "type", ne.register("ESUeViewer", An.type, ne));
|
|
4861
4867
|
let Vi = ne;
|
|
4862
|
-
const se = class se extends
|
|
4868
|
+
const se = class se extends E {
|
|
4863
4869
|
constructor(e, t) {
|
|
4864
4870
|
if (super(e, t), !t.viewer) {
|
|
4865
4871
|
console.warn("viewer is undefined!");
|
|
@@ -4869,7 +4875,7 @@ const se = class se extends I {
|
|
|
4869
4875
|
};
|
|
4870
4876
|
v(se, "type", se.register("ESUeViewer", Un.type, se));
|
|
4871
4877
|
let Oi = se;
|
|
4872
|
-
const oe = class oe extends
|
|
4878
|
+
const oe = class oe extends B {
|
|
4873
4879
|
constructor(e, t) {
|
|
4874
4880
|
if (super(e, t), !t.viewer) {
|
|
4875
4881
|
console.warn("viewer is underfined!");
|
|
@@ -4904,9 +4910,9 @@ const ae = class ae extends $ {
|
|
|
4904
4910
|
}));
|
|
4905
4911
|
}
|
|
4906
4912
|
};
|
|
4907
|
-
v(ae, "type", ae.register("ESUeViewer",
|
|
4913
|
+
v(ae, "type", ae.register("ESUeViewer", bn.type, ae));
|
|
4908
4914
|
let tr = ae;
|
|
4909
|
-
const
|
|
4915
|
+
const ot = class ot extends b {
|
|
4910
4916
|
constructor(e, t) {
|
|
4911
4917
|
if (super(e, t), !t.viewer) {
|
|
4912
4918
|
console.warn("viewer is undefined!");
|
|
@@ -4914,11 +4920,11 @@ const st = class st extends z {
|
|
|
4914
4920
|
}
|
|
4915
4921
|
}
|
|
4916
4922
|
};
|
|
4917
|
-
v(
|
|
4918
|
-
...
|
|
4923
|
+
v(ot, "type", ot.register("ESUeViewer", zn.type, ot)), v(ot, "propValFuncs", {
|
|
4924
|
+
...b.propValFuncs,
|
|
4919
4925
|
info: (e) => JSON.stringify(e ?? {})
|
|
4920
4926
|
});
|
|
4921
|
-
let er =
|
|
4927
|
+
let er = ot;
|
|
4922
4928
|
const le = class le extends G {
|
|
4923
4929
|
constructor(e, t) {
|
|
4924
4930
|
if (super(e, t), !t.viewer) {
|
|
@@ -4934,7 +4940,7 @@ const le = class le extends G {
|
|
|
4934
4940
|
};
|
|
4935
4941
|
v(le, "type", le.register("ESUeViewer", Hn.type, le));
|
|
4936
4942
|
let ir = le;
|
|
4937
|
-
|
|
4943
|
+
I.context.getStrFromEnv(tt.defaults.imgUrl);
|
|
4938
4944
|
const de = class de extends G {
|
|
4939
4945
|
constructor(e, t) {
|
|
4940
4946
|
if (super(e, t), !t.viewer) {
|
|
@@ -4959,22 +4965,22 @@ const de = class de extends G {
|
|
|
4959
4965
|
}
|
|
4960
4966
|
{
|
|
4961
4967
|
const l = () => {
|
|
4962
|
-
a.style.width = `${e.cssSize ? e.cssSize :
|
|
4968
|
+
a.style.width = `${e.cssSize ? e.cssSize : tt.defaults.cssSize}px`, a.style.height = `${e.cssSize ? e.cssSize : tt.defaults.cssSize}px`;
|
|
4963
4969
|
};
|
|
4964
4970
|
l(), e.dispose(e.cssSizeChanged.disposableOn(l));
|
|
4965
4971
|
}
|
|
4966
4972
|
a.style.position = "fixed";
|
|
4967
4973
|
{
|
|
4968
4974
|
const l = () => {
|
|
4969
|
-
a.style.top = `${e.cssPosition ? e.cssPosition[0] :
|
|
4975
|
+
a.style.top = `${e.cssPosition ? e.cssPosition[0] : tt.defaults.cssPosition[0]}px`, a.style.right = `${e.cssPosition ? e.cssPosition[1] : tt.defaults.cssPosition[1]}px`;
|
|
4970
4976
|
};
|
|
4971
4977
|
l(), e.dispose(e.cssPositionChanged.disposableOn(l));
|
|
4972
4978
|
}
|
|
4973
4979
|
a.style.transition = " right 0.4s linear", a.style.cursor = "pointer";
|
|
4974
|
-
const
|
|
4975
|
-
a.appendChild(
|
|
4980
|
+
const f = document.createElement("div");
|
|
4981
|
+
a.appendChild(f), this.dispose(() => a.removeChild(f)), f.style.width = "100%", f.style.height = "100%", f.style.position = "relative";
|
|
4976
4982
|
const p = document.createElement("img");
|
|
4977
|
-
|
|
4983
|
+
f.appendChild(p), this.dispose(() => f.removeChild(p)), p.style.width = "100%", p.style.height = "100%", p.style.border = "none";
|
|
4978
4984
|
{
|
|
4979
4985
|
const l = () => p.src = e.imgUrl;
|
|
4980
4986
|
l(), e.dispose(e.imgUrlChanged.disposableOn(l));
|
|
@@ -4997,9 +5003,9 @@ const de = class de extends G {
|
|
|
4997
5003
|
};
|
|
4998
5004
|
}
|
|
4999
5005
|
};
|
|
5000
|
-
v(de, "type", de.register("ESUeViewer",
|
|
5006
|
+
v(de, "type", de.register("ESUeViewer", tt.type, de));
|
|
5001
5007
|
let rr = de;
|
|
5002
|
-
const
|
|
5008
|
+
const V = class V extends B {
|
|
5003
5009
|
constructor(e, t) {
|
|
5004
5010
|
super(e, t);
|
|
5005
5011
|
const i = t.viewer;
|
|
@@ -5021,12 +5027,12 @@ const Q = class Q extends D {
|
|
|
5021
5027
|
}
|
|
5022
5028
|
}
|
|
5023
5029
|
};
|
|
5024
|
-
v(
|
|
5025
|
-
...
|
|
5026
|
-
]), v(
|
|
5027
|
-
...
|
|
5030
|
+
v(V, "type", V.register("ESUeViewer", Jn.type, V)), v(V, "forceUeUpdateProps", [
|
|
5031
|
+
...B.forceUeUpdateProps
|
|
5032
|
+
]), v(V, "propValFuncs", {
|
|
5033
|
+
...B.propValFuncs
|
|
5028
5034
|
});
|
|
5029
|
-
let nr =
|
|
5035
|
+
let nr = V;
|
|
5030
5036
|
async function Eo(d) {
|
|
5031
5037
|
navigator.clipboard.writeText(d).then(function() {
|
|
5032
5038
|
console.log("复制成功");
|
|
@@ -5046,15 +5052,15 @@ const ce = class ce extends G {
|
|
|
5046
5052
|
if (super(), this._subContainer = s, !h || !(h instanceof J)) return;
|
|
5047
5053
|
const a = document.createElement("div");
|
|
5048
5054
|
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";
|
|
5049
|
-
const
|
|
5050
|
-
a.appendChild(
|
|
5055
|
+
const f = document.createElement("span");
|
|
5056
|
+
a.appendChild(f), this.dispose(() => a.removeChild(f));
|
|
5051
5057
|
const p = document.createElement("span");
|
|
5052
|
-
|
|
5058
|
+
f.appendChild(p), this.dispose(() => f.removeChild(p));
|
|
5053
5059
|
const l = document.createElement("span");
|
|
5054
|
-
|
|
5060
|
+
f.appendChild(l), l.addEventListener("dblclick", function() {
|
|
5055
5061
|
let c = l.innerHTML;
|
|
5056
5062
|
c.startsWith("鼠标位置") && (c = c.slice(5)), Eo(c);
|
|
5057
|
-
}), l.style.cursor = "pointer", this.dispose(() =>
|
|
5063
|
+
}), l.style.cursor = "pointer", this.dispose(() => f.removeChild(l));
|
|
5058
5064
|
const u = document.createElement("span");
|
|
5059
5065
|
a.appendChild(u), this.dispose(() => a.removeChild(u));
|
|
5060
5066
|
{
|
|
@@ -5089,8 +5095,8 @@ const ce = class ce extends G {
|
|
|
5089
5095
|
if (R) {
|
|
5090
5096
|
const { pickResult: T } = R;
|
|
5091
5097
|
if (T && T.position) {
|
|
5092
|
-
const { position:
|
|
5093
|
-
x += `鼠标位置:${
|
|
5098
|
+
const { position: _ } = T;
|
|
5099
|
+
x += `鼠标位置:${_[0].toFixed(5)}° ${_[1].toFixed(5)}° ${_[2].toFixed(2)}m`;
|
|
5094
5100
|
} else
|
|
5095
5101
|
x += "暂时无法获取鼠标位置...";
|
|
5096
5102
|
l.innerText = x;
|
|
@@ -5099,13 +5105,13 @@ const ce = class ce extends G {
|
|
|
5099
5105
|
console.log(R);
|
|
5100
5106
|
});
|
|
5101
5107
|
};
|
|
5102
|
-
let
|
|
5108
|
+
let g;
|
|
5103
5109
|
const w = async () => {
|
|
5104
|
-
c(), e.show ? (a.style.display = "flex",
|
|
5110
|
+
c(), e.show ? (a.style.display = "flex", g = setInterval(() => {
|
|
5105
5111
|
c();
|
|
5106
|
-
}, 1e3)) : (a.style.display = "none", clearInterval(
|
|
5112
|
+
}, 1e3)) : (a.style.display = "none", clearInterval(g));
|
|
5107
5113
|
};
|
|
5108
|
-
this.dispose(e.showChanged.disposableOn(w)), w(), this.dispose(() => clearInterval(
|
|
5114
|
+
this.dispose(e.showChanged.disposableOn(w)), w(), this.dispose(() => clearInterval(g));
|
|
5109
5115
|
}
|
|
5110
5116
|
}
|
|
5111
5117
|
};
|
|
@@ -5113,7 +5119,7 @@ const ce = class ce extends G {
|
|
|
5113
5119
|
};
|
|
5114
5120
|
v(ce, "type", ce.register("ESUeViewer", A.type, ce));
|
|
5115
5121
|
let sr = ce;
|
|
5116
|
-
const ue = class ue extends
|
|
5122
|
+
const ue = class ue extends E {
|
|
5117
5123
|
constructor(e, t) {
|
|
5118
5124
|
if (super(e, t), !t.viewer) {
|
|
5119
5125
|
console.warn("viewer is undefined!");
|
|
@@ -5123,7 +5129,7 @@ const ue = class ue extends I {
|
|
|
5123
5129
|
};
|
|
5124
5130
|
v(ue, "type", ue.register("ESUeViewer", Gn.type, ue));
|
|
5125
5131
|
let or = ue;
|
|
5126
|
-
const he = class he extends
|
|
5132
|
+
const he = class he extends lt {
|
|
5127
5133
|
constructor(t, i) {
|
|
5128
5134
|
super(t, i);
|
|
5129
5135
|
v(this, "_es3DTileset", this.dv(new me()));
|
|
@@ -5183,7 +5189,7 @@ const he = class he extends at {
|
|
|
5183
5189
|
};
|
|
5184
5190
|
v(he, "type", he.register("ESUeViewer", Kn.type, he));
|
|
5185
5191
|
let ar = he;
|
|
5186
|
-
const pe = class pe extends
|
|
5192
|
+
const pe = class pe extends lt {
|
|
5187
5193
|
constructor(e, t) {
|
|
5188
5194
|
if (super(e, t), !t.viewer) {
|
|
5189
5195
|
console.warn("viewer is undefined!");
|
|
@@ -5211,7 +5217,7 @@ const ve = class ve extends $ {
|
|
|
5211
5217
|
perPositionHeight: e.perPositionHeight ?? ye.defaults.perPositionHeight
|
|
5212
5218
|
}
|
|
5213
5219
|
});
|
|
5214
|
-
}, n = this.disposeVar(
|
|
5220
|
+
}, n = this.disposeVar(L(
|
|
5215
5221
|
e.heightChanged,
|
|
5216
5222
|
e.extrudedHeightChanged,
|
|
5217
5223
|
e.perPositionHeightChanged
|
|
@@ -5221,7 +5227,7 @@ const ve = class ve extends $ {
|
|
|
5221
5227
|
};
|
|
5222
5228
|
v(ve, "type", ve.register("ESUeViewer", ye.type, ve));
|
|
5223
5229
|
let dr = ve;
|
|
5224
|
-
const
|
|
5230
|
+
const ge = class ge extends E {
|
|
5225
5231
|
constructor(e, t) {
|
|
5226
5232
|
if (super(e, t), !t.viewer) {
|
|
5227
5233
|
console.warn("viewer is undefined!");
|
|
@@ -5229,9 +5235,9 @@ const fe = class fe extends I {
|
|
|
5229
5235
|
}
|
|
5230
5236
|
}
|
|
5231
5237
|
};
|
|
5232
|
-
v(
|
|
5233
|
-
let cr =
|
|
5234
|
-
const
|
|
5238
|
+
v(ge, "type", ge.register("ESUeViewer", Yn.type, ge));
|
|
5239
|
+
let cr = ge;
|
|
5240
|
+
const fe = class fe extends B {
|
|
5235
5241
|
constructor(e, t) {
|
|
5236
5242
|
super(e, t);
|
|
5237
5243
|
const i = t.viewer;
|
|
@@ -5256,10 +5262,10 @@ const ge = class ge extends D {
|
|
|
5256
5262
|
}));
|
|
5257
5263
|
}
|
|
5258
5264
|
};
|
|
5259
|
-
v(
|
|
5260
|
-
let ur =
|
|
5265
|
+
v(fe, "type", fe.register("ESUeViewer", Zn.type, fe));
|
|
5266
|
+
let ur = fe, We;
|
|
5261
5267
|
try {
|
|
5262
|
-
const d = "earthsdk3-ue", e = "3.6.0-beta.
|
|
5268
|
+
const d = "earthsdk3-ue", e = "3.6.0-beta.2", t = "2025-11-18T02:12:17.000Z", i = "北京西部世界科技有限公司", r = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "3eb5b31c6dea17071e3840bfc40ded19a24f5985", o = ((Date.now() - 1763431937e3) / 36e5).toFixed(1), h = `%c🌏 ${d}%c ${e}.${n.slice(0, 8)}.${t} (距今${o}个小时)
|
|
5263
5269
|
%c${r ? r + `
|
|
5264
5270
|
` : ""}当前网站正在使用${d},此软件版权归${i}所有
|
|
5265
5271
|
`;
|
|
@@ -5273,7 +5279,7 @@ try {
|
|
|
5273
5279
|
},
|
|
5274
5280
|
// @ts-ignore
|
|
5275
5281
|
get gituri() {
|
|
5276
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
5282
|
+
return GITURI_ && GITURI_.replace("${commitId}", "3eb5b31c6dea17071e3840bfc40ded19a24f5985");
|
|
5277
5283
|
},
|
|
5278
5284
|
// @ts-ignore
|
|
5279
5285
|
get info() {
|
|
@@ -5281,7 +5287,7 @@ try {
|
|
|
5281
5287
|
},
|
|
5282
5288
|
// @ts-ignore
|
|
5283
5289
|
get date() {
|
|
5284
|
-
return "2025-11-
|
|
5290
|
+
return "2025-11-18T02:12:17.000Z";
|
|
5285
5291
|
},
|
|
5286
5292
|
// @ts-ignore
|
|
5287
5293
|
get author() {
|
|
@@ -5289,7 +5295,7 @@ try {
|
|
|
5289
5295
|
},
|
|
5290
5296
|
// @ts-ignore
|
|
5291
5297
|
get version() {
|
|
5292
|
-
return "3.6.0-beta.
|
|
5298
|
+
return "3.6.0-beta.2";
|
|
5293
5299
|
},
|
|
5294
5300
|
// @ts-ignore
|
|
5295
5301
|
get name() {
|
|
@@ -5297,7 +5303,7 @@ try {
|
|
|
5297
5303
|
},
|
|
5298
5304
|
// @ts-ignore
|
|
5299
5305
|
get commitId() {
|
|
5300
|
-
return "
|
|
5306
|
+
return "3eb5b31c6dea17071e3840bfc40ded19a24f5985";
|
|
5301
5307
|
},
|
|
5302
5308
|
print(a = !1) {
|
|
5303
5309
|
!a && globalThis._xe2_no_copy_print || console.info(
|
|
@@ -5353,17 +5359,17 @@ export {
|
|
|
5353
5359
|
hi as UeESDistanceMeasurement,
|
|
5354
5360
|
pi as UeESDynamicWater,
|
|
5355
5361
|
vi as UeESEntityCluster,
|
|
5356
|
-
|
|
5357
|
-
|
|
5362
|
+
gi as UeESExcavate,
|
|
5363
|
+
fi as UeESFireParticleSystem,
|
|
5358
5364
|
wi as UeESForestTileset,
|
|
5359
5365
|
or as UeESGaussianSplatting,
|
|
5360
5366
|
yi as UeESGeoDiv,
|
|
5361
5367
|
dr as UeESGeoExtrudedPolygon,
|
|
5362
5368
|
mi as UeESGeoJson,
|
|
5363
|
-
|
|
5369
|
+
be as UeESGeoLineString,
|
|
5364
5370
|
$ as UeESGeoPolygon,
|
|
5365
5371
|
Ci as UeESGeoRectangle,
|
|
5366
|
-
|
|
5372
|
+
B as UeESGeoVector,
|
|
5367
5373
|
Fi as UeESGeoWater,
|
|
5368
5374
|
Ii as UeESGltfModel,
|
|
5369
5375
|
Ei as UeESHeightMeasurement,
|
|
@@ -5371,19 +5377,19 @@ export {
|
|
|
5371
5377
|
ir as UeESHumanPoi,
|
|
5372
5378
|
Ti as UeESImageLabel,
|
|
5373
5379
|
Ve as UeESImageryLayer,
|
|
5374
|
-
|
|
5380
|
+
b as UeESLabel,
|
|
5375
5381
|
xi as UeESLevelRuntimeModel,
|
|
5376
5382
|
Ri as UeESLocalCircle,
|
|
5377
5383
|
Ne as UeESLocalPolygon,
|
|
5378
|
-
|
|
5379
|
-
|
|
5384
|
+
Pi as UeESLocalPolygonZ,
|
|
5385
|
+
Li as UeESLocalRectangle,
|
|
5380
5386
|
ki as UeESLocalSkyBox,
|
|
5381
5387
|
Tr as UeESLocalVector,
|
|
5382
5388
|
Ke as UeESLocalVector2D,
|
|
5383
5389
|
Di as UeESLocationMeasurement,
|
|
5384
5390
|
lr as UeESMsTileset,
|
|
5385
5391
|
rr as UeESNavigator,
|
|
5386
|
-
|
|
5392
|
+
E as UeESObjectWithLocation,
|
|
5387
5393
|
nr as UeESPath,
|
|
5388
5394
|
Bi as UeESPipeFence,
|
|
5389
5395
|
_i as UeESPipeline,
|
|
@@ -5393,11 +5399,11 @@ export {
|
|
|
5393
5399
|
Ai as UeESPoi3D,
|
|
5394
5400
|
Ui as UeESPoiTileset,
|
|
5395
5401
|
Ni as UeESPolygonFence,
|
|
5396
|
-
|
|
5397
|
-
|
|
5402
|
+
bi as UeESPolygonFlattenedPlane,
|
|
5403
|
+
zi as UeESPolygonWithHole,
|
|
5398
5404
|
ar as UeESRtsFeatureEditing,
|
|
5399
5405
|
Hi as UeESRtsTileset,
|
|
5400
|
-
|
|
5406
|
+
lt as UeESSceneObject,
|
|
5401
5407
|
Ji as UeESSeparateFoliage,
|
|
5402
5408
|
ur as UeESSkylineAnalysis,
|
|
5403
5409
|
cr as UeESStaticMesh,
|
|
@@ -5412,13 +5418,13 @@ export {
|
|
|
5412
5418
|
Oi as UeESViewShed,
|
|
5413
5419
|
sr as UeESViewerStatusBar,
|
|
5414
5420
|
ji as UeESVisibilityAnalysis,
|
|
5415
|
-
|
|
5421
|
+
D as UeESVisualObject,
|
|
5416
5422
|
tr as UeESVolumeMeasurement,
|
|
5417
5423
|
er as UeESWidget,
|
|
5418
5424
|
Ms as bind3DTilesetByTagCallFunc,
|
|
5419
|
-
|
|
5425
|
+
Ls as bindActorByTagCallFunc,
|
|
5420
5426
|
As as bindImageryByTagCallFunc,
|
|
5421
|
-
|
|
5427
|
+
dt as calcFlyToParamCallFunc,
|
|
5422
5428
|
Sr as callFunctionCallFunc,
|
|
5423
5429
|
ws as captureCallFunc,
|
|
5424
5430
|
H as changeNavigationModeCallFunc,
|
|
@@ -5432,14 +5438,14 @@ export {
|
|
|
5432
5438
|
Fs as getAllSocketNamesByActorTagCallFunc,
|
|
5433
5439
|
Es as getBoundSphereCallFunc,
|
|
5434
5440
|
Ss as getBoundSphereWithChildrenCallFunc,
|
|
5435
|
-
|
|
5441
|
+
zs as getCameraRelativeHeightCallFunc,
|
|
5436
5442
|
xs as getFillMaterialParamInfoCallFunc,
|
|
5437
5443
|
Rs as getGlobalPropertyCallFunc,
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5444
|
+
gs as getHeightByLonLatCallFunc,
|
|
5445
|
+
fs as getHeightByLonLatsCallFunc,
|
|
5446
|
+
bs as getIdByComponentNameAndHitItemCallFunc,
|
|
5441
5447
|
ms as getLonLatAltToScreenPositionCallFunc,
|
|
5442
|
-
|
|
5448
|
+
Ps as getObjectByInfoCallFunc,
|
|
5443
5449
|
Ks as getStatusCallFunc,
|
|
5444
5450
|
Ts as getStrokeMaterialParamInfoCallFunc,
|
|
5445
5451
|
qs as getTilesetMaterialIDListCallFunc,
|
|
@@ -5461,8 +5467,8 @@ export {
|
|
|
5461
5467
|
ds as setNodeRotationCallFunc,
|
|
5462
5468
|
cs as setNodeScaleCallFunc,
|
|
5463
5469
|
De as smoothMoveCallFunc,
|
|
5464
|
-
|
|
5465
|
-
|
|
5470
|
+
Le as smoothMoveOnGroundCallFunc,
|
|
5471
|
+
Pe as smoothMoveWithRotationCallFunc,
|
|
5466
5472
|
ke as smoothMoveWithRotationOnGroundCallFunc,
|
|
5467
5473
|
Xs as startEditingCallFunc,
|
|
5468
5474
|
ts as startVoiceCallFunc,
|