earthsdk3-ue 3.0.7 → 3.0.8-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,9 +1,9 @@
|
|
|
1
1
|
var xi = Object.defineProperty;
|
|
2
2
|
var Ri = (a, e, t) => e in a ? xi(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
3
|
var p = (a, e, t) => Ri(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { ESViewer as Ee, ESSceneObject as B, ESJPickedResult as be, ViewerCustomInteraction as ai, getGeoBoundingSphereFromPositions as Li, EngineObject as J, ES3DTileset as di, ESVisualObject as it, ESImageryLayer as V, ESTerrainLayer as ki, ESAlarm as Bi, ESApertureEffect as Di, ESGeoPolygon as Pi, ESAreaMeasurement as O, ESBlastParticleSystem as _i, ESBoxClipping as $i, ESCameraView as Mi, ESCameraVisibleRange as Wi, ESCar as Ai, ESClassification as st, ESClippingPlane as Ui, ESDataMesh as z, ESDatasmithRuntimeModel as Ni, ESDirectionMeasurement as zi, ESDistanceMeasurement as ke, ESLocalPolygon as bi, ESDynamicWater as Hi, ESEntityCluster as Ji, ESExcavate as Gi, ESFireParticleSystem as Ki, ESForestTileset as U, ESGeoDiv as He, ESImageLabel as li, ESGeoJson as Xi, ESGeoLineString as Zi, ESGeoRectangle as Qi, ESGeoWater as Yi, rpToap as Fe, ESGltfModel as qi, ESHeightMeasurement as Vi, ESHuman as Oi, ESLevelRuntimeModel as ji, ESLocalCircle as tn, ESLocalPolygonZ as en, ESLocalRectangle as rn, ESLocalSkyBox as nn, ESLocationMeasurement as sn, ESPipeFence as on, ESPipeline as an, ESPipeserTileset as dn, ESPit as ln, ESPoi2D as cn, ESPoi3D as un, ESPoiTileset as hn, ESPolygonFence as pn, ESPolygonFlattenedPlane as
|
|
4
|
+
import { ESViewer as Ee, ESSceneObject as B, ESJPickedResult as be, ViewerCustomInteraction as ai, getGeoBoundingSphereFromPositions as Li, EngineObject as J, ES3DTileset as di, ESVisualObject as it, ESImageryLayer as V, ESTerrainLayer as ki, ESAlarm as Bi, ESApertureEffect as Di, ESGeoPolygon as Pi, ESAreaMeasurement as O, ESBlastParticleSystem as _i, ESBoxClipping as $i, ESCameraView as Mi, ESCameraVisibleRange as Wi, ESCar as Ai, ESClassification as st, ESClippingPlane as Ui, ESDataMesh as z, ESDatasmithRuntimeModel as Ni, ESDirectionMeasurement as zi, ESDistanceMeasurement as ke, ESLocalPolygon as bi, ESDynamicWater as Hi, ESEntityCluster as Ji, ESExcavate as Gi, ESFireParticleSystem as Ki, ESForestTileset as U, ESGeoDiv as He, ESImageLabel as li, ESGeoJson as Xi, ESGeoLineString as Zi, ESGeoRectangle as Qi, ESGeoWater as Yi, rpToap as Fe, ESGltfModel as qi, ESHeightMeasurement as Vi, ESHuman as Oi, ESLevelRuntimeModel as ji, ESLocalCircle as tn, ESLocalPolygonZ as en, ESLocalRectangle as rn, ESLocalSkyBox as nn, ESLocationMeasurement as sn, ESPipeFence as on, ESPipeline as an, ESPipeserTileset as dn, ESPit as ln, ESPoi2D as cn, ESPoi3D as un, ESPoiTileset as hn, ESPolygonFence as pn, ESPolygonFlattenedPlane as vn, ESPolygonWithHole as fn, ESRtsTileset as gn, ESSeparateFoliage as wn, addTreesCallFunc as yn, removeAllTreesCallFunc as mn, updateTreeParamsCallFunc as Cn, cutDownTreesCallFunc as Fn, growthSimulationCallFunc as In, ESSubmergingAnalysis as En, ESSunshineAnalysis as Sn, ESSurfaceAreaMeasurement as Tn, ESTextLabel as xn, ESUEWidget as Rn, ESUnrealActor as Ln, ESVideoFusion as kn, ESViewShed as Bn, ESVisibilityAnalysis as Dn, ESVolumeMeasurement as Pn, ESWidget as _n, ESHumanPoi as $n, ESNavigator as j, ESCustomDiv as ci, ESPath as Mn, ESViewerStatusBar as W, ESGaussianSplatting as Wn, ESRtsFeatureEditing as An, ESMsTileset as Un, ESGeoExtrudedPolygon as Ce, ESStaticMesh as Nn, ESSkylineAnalysis as zn } from "earthsdk3";
|
|
5
5
|
import { reactArrayWithUndefined as bn, Destroyable as m, HasOwner as Hn, createGuid as P, Event as E, createAnimateFrame as ui, createInterval as Se, react as $, createNextAnimateFrameEvent as R, ObjResettingWithEvent as T, createProcessingFromAsyncFunc as Te, sleep as Jn, extendClassProps as Gn, reactJson as $e, track as F, bind as k } from "xbsj-base";
|
|
6
|
-
import { Logger as hi, Config as pi, TextParameters as Kn, Flags as rt, NumericParameters as
|
|
6
|
+
import { Logger as hi, Config as pi, TextParameters as Kn, Flags as rt, NumericParameters as vi, PixelStreaming as fi } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.2";
|
|
7
7
|
import Xn from "html2canvas";
|
|
8
8
|
const Zn = {
|
|
9
9
|
...Ee.defaults,
|
|
@@ -348,7 +348,7 @@ const we = async (a, e, t, r, i, n = "default") => {
|
|
|
348
348
|
}
|
|
349
349
|
let n = i.re.id, s;
|
|
350
350
|
const o = n ? B.getSceneObject(n) : void 0;
|
|
351
|
-
return o && Reflect.has(o, "allowPicking") && Reflect.has(o, "pickedEvent") && (o.allowPicking ?? !1) &&
|
|
351
|
+
return s = new be(i.re, o, i.re.features, i.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 be() : s;
|
|
352
352
|
}, cs = async (a, e) => {
|
|
353
353
|
const t = await a.callUeFunc({
|
|
354
354
|
f: "pickPosition",
|
|
@@ -395,7 +395,7 @@ const we = async (a, e, t, r, i, n = "default") => {
|
|
|
395
395
|
return;
|
|
396
396
|
}
|
|
397
397
|
return r.re.image;
|
|
398
|
-
},
|
|
398
|
+
}, vs = async (a, e, t = [64, 64]) => {
|
|
399
399
|
const r = await a.callUeFunc({
|
|
400
400
|
f: "partialCapture",
|
|
401
401
|
p: {
|
|
@@ -408,7 +408,7 @@ const we = async (a, e, t, r, i, n = "default") => {
|
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
410
410
|
return r.re.image;
|
|
411
|
-
},
|
|
411
|
+
}, fs = async (a, e) => {
|
|
412
412
|
const t = await a.callUeFunc({
|
|
413
413
|
f: "LonLatAltToScreenPosition",
|
|
414
414
|
p: { LonLatAlt: e }
|
|
@@ -687,10 +687,10 @@ class Zs extends Hn {
|
|
|
687
687
|
let u = s[o / 4];
|
|
688
688
|
o += 4;
|
|
689
689
|
for (let d = 0; d < u; d++) {
|
|
690
|
-
let
|
|
690
|
+
let f = s[o / 4];
|
|
691
691
|
o += 4;
|
|
692
|
-
let
|
|
693
|
-
o +=
|
|
692
|
+
let v = new TextDecoder("utf-8").decode(n.slice(o, o + f));
|
|
693
|
+
o += f, this._processResponseFn(v);
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
696
|
}, r.readAsArrayBuffer(t.data);
|
|
@@ -778,7 +778,7 @@ class Ys extends m {
|
|
|
778
778
|
[Kn.SignallingServerUrl]: r
|
|
779
779
|
}
|
|
780
780
|
});
|
|
781
|
-
return i.setFlagEnabled(rt.BrowserSendOffer, !1), i.setFlagEnabled(rt.HoveringMouseMode, !0), i.setFlagEnabled(rt.MatchViewportResolution, !0), i.setNumericSetting(
|
|
781
|
+
return i.setFlagEnabled(rt.BrowserSendOffer, !1), i.setFlagEnabled(rt.HoveringMouseMode, !0), i.setFlagEnabled(rt.MatchViewportResolution, !0), i.setNumericSetting(vi.MaxReconnectAttempts, 0), new fi(i, { videoElementParent: t });
|
|
782
782
|
}
|
|
783
783
|
get pixelStream() {
|
|
784
784
|
return this._pixelStream;
|
|
@@ -854,8 +854,8 @@ class Ys extends m {
|
|
|
854
854
|
return;
|
|
855
855
|
}
|
|
856
856
|
const u = Math.ceil(s / n) | 0;
|
|
857
|
-
[...new Array(u).keys()].map((
|
|
858
|
-
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-${
|
|
857
|
+
[...new Array(u).keys()].map((f) => i.slice(f * n, (f + 1) * n)).forEach((f, v) => {
|
|
858
|
+
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ie.UIInteraction, `${o}-${v}/${u}-` + f);
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
861
|
}
|
|
@@ -1023,7 +1023,7 @@ class Vs extends Le {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
}));
|
|
1025
1025
|
let d = 0;
|
|
1026
|
-
const
|
|
1026
|
+
const f = (h) => {
|
|
1027
1027
|
const c = {
|
|
1028
1028
|
n: d++,
|
|
1029
1029
|
tt: Date.now(),
|
|
@@ -1039,7 +1039,7 @@ class Vs extends Le {
|
|
|
1039
1039
|
), console.groupEnd()), this._esueViewerWrapper.emitUIInteractionForBigData(c, () => {
|
|
1040
1040
|
this._waitingUeCalls.delete(c);
|
|
1041
1041
|
});
|
|
1042
|
-
},
|
|
1042
|
+
}, v = () => {
|
|
1043
1043
|
if (!u || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1044
1044
|
const h = this._ueFuncWithIdAndResultCallbacks.map(([c]) => c);
|
|
1045
1045
|
for (const [c, g] of this._ueFuncWithIdAndResultCallbacks)
|
|
@@ -1054,11 +1054,11 @@ class Vs extends Le {
|
|
|
1054
1054
|
if (C.push(L), ++y, S + x > c || C.length >= 20)
|
|
1055
1055
|
break;
|
|
1056
1056
|
} while (y < w);
|
|
1057
|
-
C.length > 0 && (s.debug && console.log(`传送${C.length}条消息...`),
|
|
1057
|
+
C.length > 0 && (s.debug && console.log(`传送${C.length}条消息...`), f([...C]), C.length = 0, S = 0);
|
|
1058
1058
|
} while (y < w);
|
|
1059
1059
|
}
|
|
1060
1060
|
};
|
|
1061
|
-
this.dv(Se()).start(
|
|
1061
|
+
this.dv(Se()).start(v, 50), this.d(() => console.log("UeCloudViewer正在销毁..."));
|
|
1062
1062
|
}
|
|
1063
1063
|
get esueViewerWrapper() {
|
|
1064
1064
|
return this._esueViewerWrapper;
|
|
@@ -1174,7 +1174,7 @@ class ro extends m {
|
|
|
1174
1174
|
},
|
|
1175
1175
|
useUrlParams: !0
|
|
1176
1176
|
});
|
|
1177
|
-
i.setFlagEnabled(rt.BrowserSendOffer, !1), i.setFlagEnabled(rt.HoveringMouseMode, !0), i.setFlagEnabled(rt.MatchViewportResolution, !0), i.setNumericSetting(
|
|
1177
|
+
i.setFlagEnabled(rt.BrowserSendOffer, !1), i.setFlagEnabled(rt.HoveringMouseMode, !0), i.setFlagEnabled(rt.MatchViewportResolution, !0), i.setNumericSetting(vi.MaxReconnectAttempts, 0), this._pixelStream = new fi(i, { videoElementParent: this.container }), this.d(() => {
|
|
1178
1178
|
this._pixelStream.disconnect();
|
|
1179
1179
|
});
|
|
1180
1180
|
{
|
|
@@ -1187,8 +1187,8 @@ class ro extends m {
|
|
|
1187
1187
|
const n = (s) => {
|
|
1188
1188
|
const o = this._pixelStream._webRtcController.mouseController;
|
|
1189
1189
|
setTimeout(() => {
|
|
1190
|
-
const u = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY),
|
|
1191
|
-
|
|
1190
|
+
const u = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY), f = o.toStreamerMessagesProvider.toStreamerHandlers.get("MouseUp");
|
|
1191
|
+
f && f([s.button, u.x, u.y]), s.preventDefault();
|
|
1192
1192
|
});
|
|
1193
1193
|
};
|
|
1194
1194
|
this.container.addEventListener("dblclick", n), this.d(() => {
|
|
@@ -1255,17 +1255,17 @@ class ro extends m {
|
|
|
1255
1255
|
typeof r == "function" && (t.callid = P(), this.uiInteractionCallbacks.set(t.callid, r));
|
|
1256
1256
|
const i = JSON.stringify(t), n = window.g_emitDescriptor_maxBytes ?? 3e4, s = i.length, o = ++eo;
|
|
1257
1257
|
if (s < n) {
|
|
1258
|
-
const
|
|
1258
|
+
const f = {
|
|
1259
1259
|
type: "earthsdk",
|
|
1260
1260
|
time: (/* @__PURE__ */ new Date()).getTime(),
|
|
1261
1261
|
params: `${o}-0/1-` + i
|
|
1262
1262
|
};
|
|
1263
|
-
this.sendData(JSON.stringify(
|
|
1263
|
+
this.sendData(JSON.stringify(f));
|
|
1264
1264
|
return;
|
|
1265
1265
|
}
|
|
1266
1266
|
const u = Math.ceil(s / n) | 0;
|
|
1267
|
-
[...new Array(u).keys()].map((
|
|
1268
|
-
const l = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${
|
|
1267
|
+
[...new Array(u).keys()].map((f) => i.slice(f * n, (f + 1) * n)).forEach((f, v) => {
|
|
1268
|
+
const l = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${v}/${u}-` + f };
|
|
1269
1269
|
this.sendData(JSON.stringify(l));
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
@@ -1444,7 +1444,7 @@ class no extends Le {
|
|
|
1444
1444
|
), console.groupEnd()), this._ue5ViewerWrapper.emitUIInteractionForBigData(h, () => {
|
|
1445
1445
|
this._waitingUeCalls.delete(h);
|
|
1446
1446
|
});
|
|
1447
|
-
},
|
|
1447
|
+
}, f = () => {
|
|
1448
1448
|
if (!this._ue5ViewerWrapper.instance.webSocketReady || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1449
1449
|
const h = this._ueFuncWithIdAndResultCallbacks.map(([c]) => c);
|
|
1450
1450
|
for (const [c, g] of this._ueFuncWithIdAndResultCallbacks)
|
|
@@ -1463,7 +1463,7 @@ class no extends Le {
|
|
|
1463
1463
|
} while (y < w);
|
|
1464
1464
|
}
|
|
1465
1465
|
};
|
|
1466
|
-
this.dv(Se()).start(
|
|
1466
|
+
this.dv(Se()).start(f, 50), this.d(() => console.log("UeCloudViewer正在销毁..."));
|
|
1467
1467
|
}
|
|
1468
1468
|
get videoInitialized() {
|
|
1469
1469
|
return this._videoInitialized.value;
|
|
@@ -1713,10 +1713,10 @@ class co extends Le {
|
|
|
1713
1713
|
g && (this._waitingUeFuncIdAndResultCallbacks.delete(c.fid), g(c.r));
|
|
1714
1714
|
}
|
|
1715
1715
|
}));
|
|
1716
|
-
let
|
|
1717
|
-
const
|
|
1716
|
+
let f = 0;
|
|
1717
|
+
const v = () => {
|
|
1718
1718
|
if (!u || !d || !d.UE_JSHTML5Communication || !d.UE_JSHTML5Communication.JSSendMessageToUE || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1719
|
-
const h = this._ueFuncWithIdAndResultCallbacks.map(([x]) => x), c = { n:
|
|
1719
|
+
const h = this._ueFuncWithIdAndResultCallbacks.map(([x]) => x), c = { n: f++, tt: Date.now(), t: "c", fs: h, callid: P() };
|
|
1720
1720
|
for (const [x, A] of this._ueFuncWithIdAndResultCallbacks)
|
|
1721
1721
|
this._waitingUeFuncIdAndResultCallbacks.set(x.fid, A);
|
|
1722
1722
|
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.set(c.callid, c), s.debug && (console.group(
|
|
@@ -1738,7 +1738,7 @@ class co extends Le {
|
|
|
1738
1738
|
d.UE_JSHTML5Communication.JSSendMessageToUE(me);
|
|
1739
1739
|
});
|
|
1740
1740
|
};
|
|
1741
|
-
this.dv(Se()).start(
|
|
1741
|
+
this.dv(Se()).start(v, 50);
|
|
1742
1742
|
}
|
|
1743
1743
|
processResponse(t) {
|
|
1744
1744
|
if (this._ueViewer.debug ?? !1)
|
|
@@ -1801,10 +1801,10 @@ class ho extends Le {
|
|
|
1801
1801
|
eventType: "init",
|
|
1802
1802
|
params: {}
|
|
1803
1803
|
};
|
|
1804
|
-
window.ue.es.oncommand(JSON.stringify(s)), n = !0, window.calljs = (
|
|
1805
|
-
if (i.debug && console.log(`calljs eventName:${
|
|
1804
|
+
window.ue.es.oncommand(JSON.stringify(s)), n = !0, window.calljs = (f, v) => {
|
|
1805
|
+
if (i.debug && console.log(`calljs eventName:${f} eventDetailStr:${v}`), f === "ueevent" || f === "commanFinish")
|
|
1806
1806
|
try {
|
|
1807
|
-
const l = JSON.parse(
|
|
1807
|
+
const l = JSON.parse(v);
|
|
1808
1808
|
if (l.t === "cr") {
|
|
1809
1809
|
const h = l;
|
|
1810
1810
|
if (h.frs && this._ueFuncResultWithIdsEvent.emit(h.frs), h.ers)
|
|
@@ -1814,33 +1814,33 @@ class ho extends Le {
|
|
|
1814
1814
|
} catch (l) {
|
|
1815
1815
|
console.error(l);
|
|
1816
1816
|
}
|
|
1817
|
-
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((
|
|
1818
|
-
for (const
|
|
1819
|
-
const l = this._waitingUeFuncIdAndResultCallbacks.get(
|
|
1820
|
-
l && (this._waitingUeFuncIdAndResultCallbacks.delete(
|
|
1817
|
+
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((f) => {
|
|
1818
|
+
for (const v of f) {
|
|
1819
|
+
const l = this._waitingUeFuncIdAndResultCallbacks.get(v.fid);
|
|
1820
|
+
l && (this._waitingUeFuncIdAndResultCallbacks.delete(v.fid), l(v.r));
|
|
1821
1821
|
}
|
|
1822
1822
|
}));
|
|
1823
1823
|
let o = 0;
|
|
1824
1824
|
const u = () => {
|
|
1825
1825
|
if (!n || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1826
|
-
const
|
|
1826
|
+
const f = this._ueFuncWithIdAndResultCallbacks.map(([h]) => h), v = {
|
|
1827
1827
|
n: o++,
|
|
1828
1828
|
tt: Date.now(),
|
|
1829
1829
|
t: "c",
|
|
1830
|
-
fs:
|
|
1830
|
+
fs: f
|
|
1831
1831
|
};
|
|
1832
1832
|
for (const [h, c] of this._ueFuncWithIdAndResultCallbacks)
|
|
1833
1833
|
this._waitingUeFuncIdAndResultCallbacks.set(h.fid, c);
|
|
1834
|
-
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.add(
|
|
1834
|
+
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.add(v), i.debug && (console.group(
|
|
1835
1835
|
"%cxe2 => ue",
|
|
1836
1836
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
1837
1837
|
), console.log(
|
|
1838
|
-
`%c${JSON.stringify(
|
|
1838
|
+
`%c${JSON.stringify(v, void 0, "")}`,
|
|
1839
1839
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1840
1840
|
), console.groupEnd());
|
|
1841
1841
|
const l = ++uo;
|
|
1842
|
-
window.ue.es.oncommand(`${l}-0/1-` + JSON.stringify(
|
|
1843
|
-
this._waitingUeCalls.delete(
|
|
1842
|
+
window.ue.es.oncommand(`${l}-0/1-` + JSON.stringify(v)).then(() => {
|
|
1843
|
+
this._waitingUeCalls.delete(v);
|
|
1844
1844
|
});
|
|
1845
1845
|
};
|
|
1846
1846
|
this.dv(Se()).start(u, 50);
|
|
@@ -1947,7 +1947,7 @@ class po extends m {
|
|
|
1947
1947
|
}));
|
|
1948
1948
|
}
|
|
1949
1949
|
}
|
|
1950
|
-
class
|
|
1950
|
+
class vo extends m {
|
|
1951
1951
|
constructor(e, t, r) {
|
|
1952
1952
|
super();
|
|
1953
1953
|
{
|
|
@@ -1958,8 +1958,8 @@ class fo extends m {
|
|
|
1958
1958
|
n();
|
|
1959
1959
|
const s = xe(), o = [];
|
|
1960
1960
|
s.forEach((d) => {
|
|
1961
|
-
const
|
|
1962
|
-
o.push(
|
|
1961
|
+
const f = t[d + "Changed"];
|
|
1962
|
+
o.push(f);
|
|
1963
1963
|
});
|
|
1964
1964
|
const u = this.dv(R(...o));
|
|
1965
1965
|
this.d(u.don(n));
|
|
@@ -1980,8 +1980,8 @@ class fo extends m {
|
|
|
1980
1980
|
i && e && e.removeChild(i);
|
|
1981
1981
|
});
|
|
1982
1982
|
{
|
|
1983
|
-
const n = (d,
|
|
1984
|
-
window.ue.esinput.setinterceptevent(
|
|
1983
|
+
const n = (d, f) => {
|
|
1984
|
+
window.ue.esinput.setinterceptevent(f), d.preventDefault();
|
|
1985
1985
|
}, s = (d) => {
|
|
1986
1986
|
n(d, !1);
|
|
1987
1987
|
}, o = (d) => {
|
|
@@ -2038,7 +2038,7 @@ class fo extends m {
|
|
|
2038
2038
|
}));
|
|
2039
2039
|
}
|
|
2040
2040
|
}
|
|
2041
|
-
class
|
|
2041
|
+
class fo extends m {
|
|
2042
2042
|
constructor(t, r, i) {
|
|
2043
2043
|
super();
|
|
2044
2044
|
p(this, "_reconnectEvent", this.dv(new E()));
|
|
@@ -2050,7 +2050,7 @@ class vo extends m {
|
|
|
2050
2050
|
if (window.ue.esinput) {
|
|
2051
2051
|
i.setStatus("Creating"), console.log("存在(window.ue && window.ue.es && window.ue.esinput 需要适配新版ESWebView 鼠标穿透), 开始创建UeFalseCloudViewer..."), i.setStatusLog("开始创建本地视口...");
|
|
2052
2052
|
const u = this.dv(new ho(t, i));
|
|
2053
|
-
this.d(() => i.viewer = void 0), i.viewer = u, i.setStatus("Created"), i.setStatusLog("本地视口创建成功!"), this.dv(new
|
|
2053
|
+
this.d(() => i.viewer = void 0), i.viewer = u, i.setStatus("Created"), i.setStatusLog("本地视口创建成功!"), this.dv(new vo(t, i, u));
|
|
2054
2054
|
} else
|
|
2055
2055
|
i.setStatus("Error"), i.setStatusLog("请升级 ESWebView !");
|
|
2056
2056
|
else if (n(r.options, "ws") || n(r.options, "uri") && n(r.options, "app")) {
|
|
@@ -2059,12 +2059,12 @@ class vo extends m {
|
|
|
2059
2059
|
this.d(() => {
|
|
2060
2060
|
i.setStatus("Raw"), i.setStatusLog(""), t && u && t.removeChild(u) && (u = void 0);
|
|
2061
2061
|
});
|
|
2062
|
-
const d = this.dv(Te(async (
|
|
2062
|
+
const d = this.dv(Te(async (f) => {
|
|
2063
2063
|
i.viewer && !i.viewer.isDestroyed() && i.viewer.destroy(), i.viewer = void 0, u && t.removeChild(u) && (u = void 0), u = document.createElement("div"), u.setAttribute("earthsdk3-ue", "earthsdk3-ue-videoContainer"), u.style.cssText = "position:relative; height: 100%;width:100%;", t.appendChild(u);
|
|
2064
|
-
let
|
|
2064
|
+
let v, l, h;
|
|
2065
2065
|
if (n(r.options, "ws")) {
|
|
2066
2066
|
const { ws: y, esmsg: S, uselnternalSignallingServer: C } = r.options;
|
|
2067
|
-
|
|
2067
|
+
v = y, l = S, h = C ?? !1;
|
|
2068
2068
|
}
|
|
2069
2069
|
if (n(r.options, "uri") && n(r.options, "app")) {
|
|
2070
2070
|
const { offsetWidth: y, offsetHeight: S } = u;
|
|
@@ -2072,7 +2072,7 @@ class vo extends m {
|
|
|
2072
2072
|
C.endsWith("/") || (C += "/");
|
|
2073
2073
|
const A = x ? `?essstoken=${x}` : "", me = `/${L}/${y ?? 1920}/${S ?? 1080}` + A;
|
|
2074
2074
|
console.log(`请求信令服务器: ${C}instance${me}`);
|
|
2075
|
-
const Fi = await
|
|
2075
|
+
const Fi = await f.promise(fetch(`${C}instance${me}`, { method: "GET" })), q = await f.promise(Fi.json());
|
|
2076
2076
|
if (q && q.status !== "ok") {
|
|
2077
2077
|
i.setStatus("Error"), i.setStatusLog(`信令服务器请求失败 ${q.status}`), this._reconnectEvent.emit(void 0);
|
|
2078
2078
|
return;
|
|
@@ -2083,29 +2083,29 @@ class vo extends m {
|
|
|
2083
2083
|
i.setStatus("Error"), i.setStatusLog("检查信令服务器版本,返回数据错误! "), console.log("信令服务器返回数据错误!不包含instanceId!请升级到 ESSS V3.0+ 版本!"), this._reconnectEvent.emit(void 0);
|
|
2084
2084
|
return;
|
|
2085
2085
|
}
|
|
2086
|
-
|
|
2086
|
+
v = Ii, l = Ei, h = Ti ?? !1, i.esssResponse = q;
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
|
-
const c = this.dv(h ? new no(u,
|
|
2089
|
+
const c = this.dv(h ? new no(u, v, l, i) : new Vs(u, v, l, i));
|
|
2090
2090
|
this.d(() => i.viewer = void 0), this.d(c.errorEvent.don((y) => {
|
|
2091
2091
|
const S = `[${y}]:像素流连接错误!`;
|
|
2092
2092
|
i.setStatus("Error"), i.setStatusLog(S), this._reconnectEvent.emit(c);
|
|
2093
|
-
})), await
|
|
2093
|
+
})), await f.promise(new Promise((y) => this.d(c.readyEvent.donce(y)))), i.setStatus("Created"), i.setStatusLog("云渲染视口创建成功!"), s = 0, o && clearTimeout(o), o = void 0;
|
|
2094
2094
|
const { offsetWidth: g, offsetHeight: w } = u;
|
|
2095
2095
|
c.resize(g * window.devicePixelRatio, w * window.devicePixelRatio), i.viewer = c, this.d(() => i.viewer = void 0), this.dv(new po(i, c));
|
|
2096
2096
|
}));
|
|
2097
|
-
d.start(), this.d(this._reconnectEvent.don((
|
|
2098
|
-
o === void 0 && (
|
|
2097
|
+
d.start(), this.d(this._reconnectEvent.don((f) => {
|
|
2098
|
+
o === void 0 && (f && !f.isDestroyed() && f.destroy(), i.viewer && !i.viewer.isDestroyed() && i.viewer.destroy(), i.viewer = void 0, i.autoReconnect && (i.setStatus("Reconnecting"), i.setStatusLog("正在尝试重新连接..."), s = s + 5e3 > 3e4 ? 3e4 : s + 5e3, console.warn(`间隔:${s / 1e3}s,正在尝试重新连接...`), o = window.setTimeout(() => {
|
|
2099
2099
|
d.restart();
|
|
2100
2100
|
}, s)));
|
|
2101
|
-
})), this.d(d.errorEvent.don((
|
|
2102
|
-
i.setStatus("Error"), i.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!",
|
|
2101
|
+
})), this.d(d.errorEvent.don((f) => {
|
|
2102
|
+
i.setStatus("Error"), i.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!", f), this._reconnectEvent.emit(void 0);
|
|
2103
2103
|
}));
|
|
2104
2104
|
} else if (n(r.options, "project")) {
|
|
2105
|
-
const u = r, d = u.options.project,
|
|
2105
|
+
const u = r, d = u.options.project, f = u.options.baseUrl;
|
|
2106
2106
|
i.setStatus("Creating"), i.setStatusLog("下载编译中...");
|
|
2107
|
-
const
|
|
2108
|
-
i.viewer =
|
|
2107
|
+
const v = this.dv(new co(t, d, f, i));
|
|
2108
|
+
i.viewer = v, this.d(() => i.viewer = void 0);
|
|
2109
2109
|
} else
|
|
2110
2110
|
i.setStatus("Error"), i.setStatusLog("视口创建失败!"), console.warn("视口创建失败: 参数错误!");
|
|
2111
2111
|
}
|
|
@@ -2132,7 +2132,7 @@ const G = class G extends Ee {
|
|
|
2132
2132
|
this.viewerChanged.emit(this.viewer);
|
|
2133
2133
|
})), this.dv(new T(this.subContainerChanged, () => {
|
|
2134
2134
|
if (this.setStatus("Raw"), this.setStatusLog(""), !!this.subContainer)
|
|
2135
|
-
return new
|
|
2135
|
+
return new fo(this.subContainer, r, this);
|
|
2136
2136
|
}));
|
|
2137
2137
|
}
|
|
2138
2138
|
get defaultProps() {
|
|
@@ -2600,11 +2600,11 @@ const G = class G extends Ee {
|
|
|
2600
2600
|
console.warn("partialCapture:viewer is undefined");
|
|
2601
2601
|
return;
|
|
2602
2602
|
}
|
|
2603
|
-
return await
|
|
2603
|
+
return await vs(this.viewer, t, r);
|
|
2604
2604
|
}
|
|
2605
2605
|
async lonLatAltToScreenPosition(t) {
|
|
2606
2606
|
if (!this.viewer) return;
|
|
2607
|
-
const r = await
|
|
2607
|
+
const r = await fs(this.viewer, t);
|
|
2608
2608
|
return r && [r.X, r.Y];
|
|
2609
2609
|
}
|
|
2610
2610
|
//------------------------------抽象函数实现
|
|
@@ -2686,7 +2686,7 @@ class nt extends J {
|
|
|
2686
2686
|
};
|
|
2687
2687
|
w(), this.d(c.don(w));
|
|
2688
2688
|
}
|
|
2689
|
-
const
|
|
2689
|
+
const f = () => {
|
|
2690
2690
|
r.callUeFunc({
|
|
2691
2691
|
f: "update",
|
|
2692
2692
|
p: {
|
|
@@ -2694,8 +2694,8 @@ class nt extends J {
|
|
|
2694
2694
|
...u.val
|
|
2695
2695
|
}
|
|
2696
2696
|
}), u.val = {};
|
|
2697
|
-
},
|
|
2698
|
-
this.d(
|
|
2697
|
+
}, v = this.dv(R(...d));
|
|
2698
|
+
this.d(v.don(f)), this.d(e.createdEvent.don(f)), this.d(e.flushEvent.don(() => v.flush()));
|
|
2699
2699
|
})), !e.combinationClass)) {
|
|
2700
2700
|
let i = !1;
|
|
2701
2701
|
this.d(() => {
|
|
@@ -2768,14 +2768,14 @@ class I extends _ {
|
|
|
2768
2768
|
setTimeout(i, 0);
|
|
2769
2769
|
})), this.d(e.smoothMoveEvent.don((u, d) => {
|
|
2770
2770
|
Ne(r, e.id, u, d);
|
|
2771
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((u, d,
|
|
2772
|
-
We(r, e.id, u, d,
|
|
2773
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((u, d,
|
|
2774
|
-
Ae(r, e.id, u, d,
|
|
2775
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((u, d,
|
|
2776
|
-
Ue(r, e.id, u, d,
|
|
2771
|
+
})), this.d(e.smoothMoveWithRotationEvent.don((u, d, f) => {
|
|
2772
|
+
We(r, e.id, u, d, f);
|
|
2773
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((u, d, f, v) => {
|
|
2774
|
+
Ae(r, e.id, u, d, v, f);
|
|
2775
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((u, d, f, v, l) => {
|
|
2776
|
+
Ue(r, e.id, u, d, f, v, l);
|
|
2777
2777
|
})), this.d(e.smoothMoveKeepPitchEvent.don(async (u, d) => {
|
|
2778
|
-
const
|
|
2778
|
+
const f = await r.callUeFunc({
|
|
2779
2779
|
f: "SmoothMoveKeepPitch",
|
|
2780
2780
|
p: {
|
|
2781
2781
|
id: e.id,
|
|
@@ -2783,14 +2783,14 @@ class I extends _ {
|
|
|
2783
2783
|
Time: d
|
|
2784
2784
|
}
|
|
2785
2785
|
});
|
|
2786
|
-
|
|
2786
|
+
f.error && console.error("SmoothMoveKeepPitch:", f.error);
|
|
2787
2787
|
})), this.d(e.automaticLandingEvent.don((u) => {
|
|
2788
2788
|
const d = [e.position[0], e.position[1]];
|
|
2789
|
-
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((
|
|
2790
|
-
|
|
2789
|
+
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((f) => {
|
|
2790
|
+
f !== null && (e.position = [...d, f], e.collision = u);
|
|
2791
2791
|
});
|
|
2792
2792
|
}));
|
|
2793
|
-
const s = async (u, d,
|
|
2793
|
+
const s = async (u, d, f, v) => {
|
|
2794
2794
|
const { viewer: l } = u;
|
|
2795
2795
|
if (!l) {
|
|
2796
2796
|
console.error("SmoothMoveRelatively: ueViewer.viewer is undefined");
|
|
@@ -2798,14 +2798,14 @@ class I extends _ {
|
|
|
2798
2798
|
}
|
|
2799
2799
|
const h = await l.callUeFunc({
|
|
2800
2800
|
f: "SmoothMoveRelatively",
|
|
2801
|
-
p: { id: d, RelativePosition:
|
|
2801
|
+
p: { id: d, RelativePosition: f, Time: v }
|
|
2802
2802
|
});
|
|
2803
2803
|
return h.error && console.error("SmoothMoveRelatively:", h.error), h;
|
|
2804
2804
|
};
|
|
2805
2805
|
this.d(e.smoothMoveRelativelyEvent.don((u, d) => {
|
|
2806
2806
|
s(t, e.id, u, d);
|
|
2807
2807
|
}));
|
|
2808
|
-
const o = async (u, d,
|
|
2808
|
+
const o = async (u, d, f, v, l) => {
|
|
2809
2809
|
const { viewer: h } = u;
|
|
2810
2810
|
if (!h) {
|
|
2811
2811
|
console.error("SmoothMoveRelativelyWithRotation: ueViewer.viewer is undefined");
|
|
@@ -2813,12 +2813,12 @@ class I extends _ {
|
|
|
2813
2813
|
}
|
|
2814
2814
|
const c = await h.callUeFunc({
|
|
2815
2815
|
f: "SmoothMoveRelativelyWithRotation",
|
|
2816
|
-
p: { id: d, RelativePosition:
|
|
2816
|
+
p: { id: d, RelativePosition: f, NewRotation: v, Time: l }
|
|
2817
2817
|
});
|
|
2818
2818
|
return c.error && console.error("SmoothMoveRelativelyWithRotation:", c.error), c;
|
|
2819
2819
|
};
|
|
2820
|
-
this.d(e.smoothMoveRelativelyWithRotationEvent.don((u, d,
|
|
2821
|
-
o(t, e.id, u, d,
|
|
2820
|
+
this.d(e.smoothMoveRelativelyWithRotationEvent.don((u, d, f) => {
|
|
2821
|
+
o(t, e.id, u, d, f);
|
|
2822
2822
|
}));
|
|
2823
2823
|
}
|
|
2824
2824
|
}
|
|
@@ -2964,7 +2964,7 @@ const Ge = (a) => {
|
|
|
2964
2964
|
o(), this.d(u.don(o)), Reflect.has(t, "colorMode") && this.d(t.colorModeChanged.don(() => o()));
|
|
2965
2965
|
const d = this.dv($(void 0));
|
|
2966
2966
|
{
|
|
2967
|
-
const
|
|
2967
|
+
const v = this.dv(R(
|
|
2968
2968
|
t.actorTagChanged,
|
|
2969
2969
|
t.urlChanged
|
|
2970
2970
|
)), l = () => {
|
|
@@ -2976,14 +2976,14 @@ const Ge = (a) => {
|
|
|
2976
2976
|
url: t.url
|
|
2977
2977
|
} : d.value = void 0, t.editing = !1;
|
|
2978
2978
|
};
|
|
2979
|
-
l(), this.d(
|
|
2979
|
+
l(), this.d(v.don(l));
|
|
2980
2980
|
}
|
|
2981
|
-
const
|
|
2982
|
-
const { id:
|
|
2981
|
+
const f = async () => {
|
|
2982
|
+
const { id: v } = t;
|
|
2983
2983
|
if (n !== void 0) {
|
|
2984
2984
|
n = void 0;
|
|
2985
2985
|
try {
|
|
2986
|
-
const l = await r.unBind3DTilesetById(
|
|
2986
|
+
const l = await r.unBind3DTilesetById(v);
|
|
2987
2987
|
if (!l) return;
|
|
2988
2988
|
if (l.error !== "") {
|
|
2989
2989
|
console.warn(`UeES3DTileset UnBind3DTilesetById: ${l.error}`);
|
|
@@ -2997,7 +2997,7 @@ const Ge = (a) => {
|
|
|
2997
2997
|
if (s !== void 0) {
|
|
2998
2998
|
s = void 0;
|
|
2999
2999
|
try {
|
|
3000
|
-
const l = await i.callUeFunc({ f: "destroy", p: { id:
|
|
3000
|
+
const l = await i.callUeFunc({ f: "destroy", p: { id: v } });
|
|
3001
3001
|
if (!l) return;
|
|
3002
3002
|
if (l.error !== "") {
|
|
3003
3003
|
console.warn(`UeES3DTileset Destroy: ${l.error}`);
|
|
@@ -3010,17 +3010,17 @@ const Ge = (a) => {
|
|
|
3010
3010
|
}
|
|
3011
3011
|
};
|
|
3012
3012
|
this.d(() => {
|
|
3013
|
-
|
|
3013
|
+
f();
|
|
3014
3014
|
});
|
|
3015
3015
|
{
|
|
3016
|
-
const
|
|
3016
|
+
const v = this.dv(Te(async (h) => {
|
|
3017
3017
|
if (d.value === void 0) {
|
|
3018
|
-
await h.promise(
|
|
3018
|
+
await h.promise(f());
|
|
3019
3019
|
return;
|
|
3020
3020
|
}
|
|
3021
3021
|
if (d.value.type === "ActorTag") {
|
|
3022
3022
|
const { actorTag: c } = d.value;
|
|
3023
|
-
if (n !== c && await h.promise(
|
|
3023
|
+
if (n !== c && await h.promise(f()), n !== void 0 || c === void 0) return;
|
|
3024
3024
|
try {
|
|
3025
3025
|
n = c;
|
|
3026
3026
|
const g = await h.promise(r.bind3DTilesetByTag(t.id, c));
|
|
@@ -3042,7 +3042,7 @@ const Ge = (a) => {
|
|
|
3042
3042
|
}
|
|
3043
3043
|
} else if (d.value.type === "CreatedUrl") {
|
|
3044
3044
|
const { url: c } = d.value;
|
|
3045
|
-
if (c !== s && await
|
|
3045
|
+
if (c !== s && await f(), s !== void 0 || c === void 0) return;
|
|
3046
3046
|
try {
|
|
3047
3047
|
s = c;
|
|
3048
3048
|
const g = await h.promise(i.callUeFunc({
|
|
@@ -3064,35 +3064,35 @@ const Ge = (a) => {
|
|
|
3064
3064
|
}
|
|
3065
3065
|
await h.promise(o());
|
|
3066
3066
|
})), l = async () => {
|
|
3067
|
-
|
|
3067
|
+
v.restart();
|
|
3068
3068
|
};
|
|
3069
3069
|
l(), this.d(d.changed.don(l));
|
|
3070
3070
|
}
|
|
3071
3071
|
this.d(t.refreshTilesetEvent.don(() => {
|
|
3072
3072
|
Qn(i, t.id);
|
|
3073
|
-
})), this.d(t.flyToEvent.don(async (
|
|
3073
|
+
})), this.d(t.flyToEvent.don(async (v, l) => {
|
|
3074
3074
|
if (!n && !s) return;
|
|
3075
|
-
const h = await we(i, t.id,
|
|
3075
|
+
const h = await we(i, t.id, v);
|
|
3076
3076
|
let c = "over";
|
|
3077
3077
|
h === void 0 ? c = "error" : h.endType === 0 ? c = "over" : h.endType === 1 && (c = "cancelled"), t.flyOverEvent.emit(l, c, r);
|
|
3078
3078
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
3079
3079
|
!n && !s || ye(i, t.id);
|
|
3080
3080
|
})), this.d(t.calcFlyInParamEvent.don(async () => {
|
|
3081
3081
|
if (!n && !s || !r.actived) return;
|
|
3082
|
-
const
|
|
3083
|
-
if (!
|
|
3084
|
-
const { position: l, rotation: h } =
|
|
3082
|
+
const v = await r.getCurrentCameraInfo();
|
|
3083
|
+
if (!v) return;
|
|
3084
|
+
const { position: l, rotation: h } = v;
|
|
3085
3085
|
t.flyInParam = { position: l, rotation: h, flyDuration: 1 };
|
|
3086
|
-
})), this.d(r.propChanged.don((
|
|
3087
|
-
!n && !s ||
|
|
3088
|
-
const h =
|
|
3086
|
+
})), this.d(r.propChanged.don((v) => {
|
|
3087
|
+
!n && !s || v.objId === t.id && Object.keys(v.props).forEach((l) => {
|
|
3088
|
+
const h = v.props[l] === null ? void 0 : v.props[l];
|
|
3089
3089
|
t[l] = h;
|
|
3090
3090
|
});
|
|
3091
|
-
})), this.d(r.objectEvent.don((
|
|
3092
|
-
!n && !s ||
|
|
3091
|
+
})), this.d(r.objectEvent.don((v) => {
|
|
3092
|
+
!n && !s || v.id !== t.id || v.type !== "3DTilesetReady" || t.tilesetReady.emit(v.p);
|
|
3093
3093
|
}));
|
|
3094
3094
|
{
|
|
3095
|
-
const
|
|
3095
|
+
const v = async (g, w) => {
|
|
3096
3096
|
if (!n && !s) return;
|
|
3097
3097
|
const y = await i.callUeFunc({
|
|
3098
3098
|
f: "SetFeatureColor",
|
|
@@ -3135,7 +3135,7 @@ const Ge = (a) => {
|
|
|
3135
3135
|
};
|
|
3136
3136
|
this.d(t.setFeatureColorEvent.don((g, w) => {
|
|
3137
3137
|
const y = [...this.styleColor, ...w];
|
|
3138
|
-
this.styleColor = [...y],
|
|
3138
|
+
this.styleColor = [...y], v(g, y);
|
|
3139
3139
|
})), this.d(t.setFeatureVisableEvent.don((g, w) => {
|
|
3140
3140
|
const y = [...this.styleVisable, ...w];
|
|
3141
3141
|
this.styleVisable = [...y], l(g, y);
|
|
@@ -3146,7 +3146,7 @@ const Ge = (a) => {
|
|
|
3146
3146
|
}));
|
|
3147
3147
|
}
|
|
3148
3148
|
{
|
|
3149
|
-
const
|
|
3149
|
+
const v = async () => {
|
|
3150
3150
|
if (!n && !s) {
|
|
3151
3151
|
t._featureTableResultEvent.emit(void 0);
|
|
3152
3152
|
return;
|
|
@@ -3162,11 +3162,11 @@ const Ge = (a) => {
|
|
|
3162
3162
|
}
|
|
3163
3163
|
};
|
|
3164
3164
|
this.d(t.getFeatureTableEvent.don(() => {
|
|
3165
|
-
|
|
3165
|
+
v();
|
|
3166
3166
|
}));
|
|
3167
3167
|
}
|
|
3168
3168
|
{
|
|
3169
|
-
const
|
|
3169
|
+
const v = async () => {
|
|
3170
3170
|
if (!n && !s) {
|
|
3171
3171
|
t.getMaterialNameListEvent.emit(void 0);
|
|
3172
3172
|
return;
|
|
@@ -3182,7 +3182,7 @@ const Ge = (a) => {
|
|
|
3182
3182
|
}
|
|
3183
3183
|
};
|
|
3184
3184
|
this.ad(t.getMaterialNameListEvent.don((l) => {
|
|
3185
|
-
l == "start" &&
|
|
3185
|
+
l == "start" && v();
|
|
3186
3186
|
}));
|
|
3187
3187
|
}
|
|
3188
3188
|
}
|
|
@@ -3227,7 +3227,7 @@ const Ke = (a) => {
|
|
|
3227
3227
|
let i, n;
|
|
3228
3228
|
const s = this.dv($(void 0)), o = this.ad($e(""));
|
|
3229
3229
|
{
|
|
3230
|
-
const
|
|
3230
|
+
const v = () => {
|
|
3231
3231
|
if (typeof e.url == "string")
|
|
3232
3232
|
o.value = B.context.getStrFromEnv(e.url);
|
|
3233
3233
|
else {
|
|
@@ -3235,7 +3235,7 @@ const Ke = (a) => {
|
|
|
3235
3235
|
l.url = B.context.getStrFromEnv(l.url), o.value = l;
|
|
3236
3236
|
}
|
|
3237
3237
|
};
|
|
3238
|
-
|
|
3238
|
+
v(), this.ad(e.urlChanged.don(v));
|
|
3239
3239
|
}
|
|
3240
3240
|
const u = async () => {
|
|
3241
3241
|
!i && !n || await r.callUeFunc({
|
|
@@ -3273,12 +3273,12 @@ const Ke = (a) => {
|
|
|
3273
3273
|
e.opacityChanged
|
|
3274
3274
|
));
|
|
3275
3275
|
this.d(d.don(u));
|
|
3276
|
-
const
|
|
3277
|
-
const { id:
|
|
3276
|
+
const f = async () => {
|
|
3277
|
+
const { id: v } = e;
|
|
3278
3278
|
if (i !== void 0) {
|
|
3279
3279
|
i = void 0;
|
|
3280
3280
|
try {
|
|
3281
|
-
const l = await t.unBindImageryById(
|
|
3281
|
+
const l = await t.unBindImageryById(v);
|
|
3282
3282
|
if (!l) return;
|
|
3283
3283
|
if (l.error !== "") {
|
|
3284
3284
|
console.warn(`UeESImageryLayer UnImageryByID: ${l.error}`);
|
|
@@ -3292,7 +3292,7 @@ const Ke = (a) => {
|
|
|
3292
3292
|
if (n !== void 0) {
|
|
3293
3293
|
n = void 0;
|
|
3294
3294
|
try {
|
|
3295
|
-
const l = await r.callUeFunc({ f: "destroy", p: { id:
|
|
3295
|
+
const l = await r.callUeFunc({ f: "destroy", p: { id: v, test: "UeESImageryLayer" } });
|
|
3296
3296
|
if (!l) return;
|
|
3297
3297
|
if (l.error !== "") {
|
|
3298
3298
|
console.warn(`UeESImageryLayer Destroy: ${l.error}`);
|
|
@@ -3305,17 +3305,17 @@ const Ke = (a) => {
|
|
|
3305
3305
|
}
|
|
3306
3306
|
};
|
|
3307
3307
|
this.d(() => {
|
|
3308
|
-
|
|
3308
|
+
f();
|
|
3309
3309
|
});
|
|
3310
3310
|
{
|
|
3311
|
-
const
|
|
3311
|
+
const v = this.dv(Te(async (h) => {
|
|
3312
3312
|
if (s.value === void 0) {
|
|
3313
|
-
await h.promise(
|
|
3313
|
+
await h.promise(f());
|
|
3314
3314
|
return;
|
|
3315
3315
|
}
|
|
3316
3316
|
if (s.value.type === "ActorTag") {
|
|
3317
3317
|
const { actorTag: c, componentTag: g } = s.value;
|
|
3318
|
-
if (i !== c && await h.promise(
|
|
3318
|
+
if (i !== c && await h.promise(f()), i !== void 0 || c === void 0) return;
|
|
3319
3319
|
try {
|
|
3320
3320
|
i = c;
|
|
3321
3321
|
const w = await h.promise(t.bindImageryByTag(e.id, c, g));
|
|
@@ -3337,7 +3337,7 @@ const Ke = (a) => {
|
|
|
3337
3337
|
}
|
|
3338
3338
|
} else if (s.value.type === "CreatedUrl") {
|
|
3339
3339
|
const { url: c } = s.value;
|
|
3340
|
-
if (c !== n && await h.promise(
|
|
3340
|
+
if (c !== n && await h.promise(f()), n !== void 0 || c === void 0) return;
|
|
3341
3341
|
try {
|
|
3342
3342
|
n = c;
|
|
3343
3343
|
const g = await h.promise(r.callUeFunc({
|
|
@@ -3359,12 +3359,12 @@ const Ke = (a) => {
|
|
|
3359
3359
|
}
|
|
3360
3360
|
await h.promise(u());
|
|
3361
3361
|
})), l = async () => {
|
|
3362
|
-
|
|
3362
|
+
v.restart();
|
|
3363
3363
|
};
|
|
3364
3364
|
l(), this.d(s.changed.don(l));
|
|
3365
3365
|
}
|
|
3366
3366
|
{
|
|
3367
|
-
const
|
|
3367
|
+
const v = this.dv(R(
|
|
3368
3368
|
e.actorTagChanged,
|
|
3369
3369
|
o.changed,
|
|
3370
3370
|
e.componentTagChanged
|
|
@@ -3378,30 +3378,30 @@ const Ke = (a) => {
|
|
|
3378
3378
|
url: o.value
|
|
3379
3379
|
} : s.value = void 0;
|
|
3380
3380
|
};
|
|
3381
|
-
l(), this.d(
|
|
3381
|
+
l(), this.d(v.don(l));
|
|
3382
3382
|
}
|
|
3383
|
-
this.d(e.flyToEvent.don(async (
|
|
3383
|
+
this.d(e.flyToEvent.don(async (v, l) => {
|
|
3384
3384
|
if (!i && !n) return;
|
|
3385
|
-
const h = await we(r, e.id,
|
|
3385
|
+
const h = await we(r, e.id, v);
|
|
3386
3386
|
let c = "over";
|
|
3387
3387
|
h === void 0 ? c = "error" : h.endType === 0 ? c = "over" : h.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(l, c, t);
|
|
3388
|
-
})), this.d(e.flyInEvent.don(async (
|
|
3388
|
+
})), this.d(e.flyInEvent.don(async (v, l) => {
|
|
3389
3389
|
var g, w;
|
|
3390
3390
|
if (!i && !n) return;
|
|
3391
|
-
const h = await Re(r, e.id, (g = e.flyInParam) == null ? void 0 : g.position, (w = e.flyInParam) == null ? void 0 : w.rotation,
|
|
3391
|
+
const h = await Re(r, e.id, (g = e.flyInParam) == null ? void 0 : g.position, (w = e.flyInParam) == null ? void 0 : w.rotation, v ?? 1);
|
|
3392
3392
|
let c = "over";
|
|
3393
3393
|
h === void 0 ? c = "error" : h.endType === 0 ? c = "over" : h.endType === 1 && (c = "cancelled"), e.flyOverEvent.emit(l, c, t);
|
|
3394
3394
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
3395
3395
|
!i && !n || ye(r, e.id);
|
|
3396
3396
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
3397
3397
|
if (!t.actived) return;
|
|
3398
|
-
const
|
|
3399
|
-
if (!
|
|
3400
|
-
const { position: l, rotation: h } =
|
|
3398
|
+
const v = await t.getCurrentCameraInfo();
|
|
3399
|
+
if (!v) return;
|
|
3400
|
+
const { position: l, rotation: h } = v;
|
|
3401
3401
|
e.flyInParam = { position: l, rotation: h, flyDuration: 1 };
|
|
3402
|
-
})), this.d(t.propChanged.don((
|
|
3403
|
-
!i && !n ||
|
|
3404
|
-
const h =
|
|
3402
|
+
})), this.d(t.propChanged.don((v) => {
|
|
3403
|
+
!i && !n || v.objId === e.id && Object.keys(v.props).forEach((l) => {
|
|
3404
|
+
const h = v.props[l] === null ? void 0 : v.props[l];
|
|
3405
3405
|
e[l] = h;
|
|
3406
3406
|
});
|
|
3407
3407
|
}));
|
|
@@ -3511,7 +3511,7 @@ const pt = class pt extends I {
|
|
|
3511
3511
|
};
|
|
3512
3512
|
p(pt, "type", pt.register("ESUeViewer", $i.type, pt));
|
|
3513
3513
|
let Oe = pt;
|
|
3514
|
-
const
|
|
3514
|
+
const vt = class vt extends I {
|
|
3515
3515
|
constructor(e, t) {
|
|
3516
3516
|
super(e, t);
|
|
3517
3517
|
const r = t.viewer;
|
|
@@ -3520,8 +3520,8 @@ const ft = class ft extends I {
|
|
|
3520
3520
|
return;
|
|
3521
3521
|
}
|
|
3522
3522
|
this.dispose(e.flyInEvent.don((i, n, s = "default") => {
|
|
3523
|
-
const { id: o, duration: u, position: d, rotation:
|
|
3524
|
-
Re(r, o, d,
|
|
3523
|
+
const { id: o, duration: u, position: d, rotation: f } = e;
|
|
3524
|
+
Re(r, o, d, f, u ?? i, s);
|
|
3525
3525
|
})), this.dispose(e.resetWithCurrentCameraEvent.don(() => {
|
|
3526
3526
|
yi(r, e.id);
|
|
3527
3527
|
})), this.dispose(e.captureEvent.don((i, n) => {
|
|
@@ -3531,9 +3531,9 @@ const ft = class ft extends I {
|
|
|
3531
3531
|
}));
|
|
3532
3532
|
}
|
|
3533
3533
|
};
|
|
3534
|
-
p(
|
|
3535
|
-
let je =
|
|
3536
|
-
const
|
|
3534
|
+
p(vt, "type", vt.register("ESUeViewer", Mi.type, vt));
|
|
3535
|
+
let je = vt;
|
|
3536
|
+
const ft = class ft extends I {
|
|
3537
3537
|
constructor(e, t) {
|
|
3538
3538
|
if (super(e, t), !t.viewer) {
|
|
3539
3539
|
console.warn("viewer is undefined!");
|
|
@@ -3541,8 +3541,8 @@ const vt = class vt extends I {
|
|
|
3541
3541
|
}
|
|
3542
3542
|
}
|
|
3543
3543
|
};
|
|
3544
|
-
p(
|
|
3545
|
-
let tr =
|
|
3544
|
+
p(ft, "type", ft.register("ESUeViewer", Wi.type, ft));
|
|
3545
|
+
let tr = ft;
|
|
3546
3546
|
const gt = class gt extends I {
|
|
3547
3547
|
constructor(e, t) {
|
|
3548
3548
|
if (super(e, t), !t.viewer) {
|
|
@@ -3813,32 +3813,32 @@ const kt = class kt extends J {
|
|
|
3813
3813
|
if (!i) return;
|
|
3814
3814
|
if (!t.instanceClass)
|
|
3815
3815
|
throw new Error("!sceneObject.instanceClass");
|
|
3816
|
-
const d = document.createElement("div"),
|
|
3817
|
-
if (
|
|
3818
|
-
document.body.appendChild(
|
|
3819
|
-
let l =
|
|
3816
|
+
const d = document.createElement("div"), f = this.dv(new t.instanceClass(d, t, r))._container;
|
|
3817
|
+
if (f.style.opacity = t.opacity.toString() ?? He.defaults.opacity, f.style.position = "fixed", f.style.zIndex = "-1", f.style.top = "0px", !document.body.contains(f)) {
|
|
3818
|
+
document.body.appendChild(f);
|
|
3819
|
+
let l = f ? f.querySelectorAll("*[class]") : [];
|
|
3820
3820
|
for (let h = 0; h < l.length; h++) {
|
|
3821
3821
|
const c = l[h];
|
|
3822
|
-
var
|
|
3822
|
+
var v = c.getBoundingClientRect();
|
|
3823
3823
|
this._hasClassDivAndPos[c.className] = [
|
|
3824
3824
|
c.offsetLeft,
|
|
3825
3825
|
c.offsetTop,
|
|
3826
|
-
c.offsetLeft +
|
|
3827
|
-
c.offsetTop +
|
|
3826
|
+
c.offsetLeft + v.width,
|
|
3827
|
+
c.offsetTop + v.height
|
|
3828
3828
|
];
|
|
3829
3829
|
}
|
|
3830
3830
|
}
|
|
3831
|
-
Xn(
|
|
3831
|
+
Xn(f, {
|
|
3832
3832
|
backgroundColor: null,
|
|
3833
3833
|
allowTaint: !0,
|
|
3834
3834
|
useCORS: !0,
|
|
3835
|
-
width:
|
|
3836
|
-
height:
|
|
3835
|
+
width: f.offsetWidth,
|
|
3836
|
+
height: f.offsetHeight,
|
|
3837
3837
|
scale: 1
|
|
3838
3838
|
}).then((l) => {
|
|
3839
|
-
document.body.contains(
|
|
3839
|
+
document.body.contains(f) && document.body.removeChild(f), n.url = l.toDataURL(), n.show = t.show;
|
|
3840
3840
|
}).catch(() => {
|
|
3841
|
-
document.body.contains(
|
|
3841
|
+
document.body.contains(f) && document.body.removeChild(f);
|
|
3842
3842
|
});
|
|
3843
3843
|
}, o = () => {
|
|
3844
3844
|
try {
|
|
@@ -3868,9 +3868,9 @@ const kt = class kt extends J {
|
|
|
3868
3868
|
if (s.objId !== this._imageLabel.id) return;
|
|
3869
3869
|
const { type: o, add: u } = s;
|
|
3870
3870
|
if (o === "leftClick" && u) {
|
|
3871
|
-
const d = (u == null ? void 0 : u.classNames) ?? [],
|
|
3872
|
-
for (let
|
|
3873
|
-
const l = v
|
|
3871
|
+
const d = (u == null ? void 0 : u.classNames) ?? [], f = Object.keys(this._hasClassDivAndPos);
|
|
3872
|
+
for (let v = 0; v < f.length; v++) {
|
|
3873
|
+
const l = f[v];
|
|
3874
3874
|
let h = this._hasClassDivAndPos[l];
|
|
3875
3875
|
u && u.mouseRelativePos && u.mouseRelativePos[0] >= h[0] && u.mouseRelativePos[0] <= h[2] && u.mouseRelativePos[1] >= h[1] && u.mouseRelativePos[1] <= h[3] && d.push(l);
|
|
3876
3876
|
}
|
|
@@ -3890,8 +3890,8 @@ const kt = class kt extends J {
|
|
|
3890
3890
|
We(i, n.id, s, o, u);
|
|
3891
3891
|
})), this.d(t.smoothMoveOnGroundEvent.don((s, o, u, d) => {
|
|
3892
3892
|
Ae(i, n.id, s, o, d, u);
|
|
3893
|
-
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, u, d,
|
|
3894
|
-
Ue(i, n.id, s, o, u, d,
|
|
3893
|
+
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, u, d, f) => {
|
|
3894
|
+
Ue(i, n.id, s, o, u, d, f);
|
|
3895
3895
|
})), this.d(t.flyToEvent.don((s, o) => {
|
|
3896
3896
|
n.flyTo(s);
|
|
3897
3897
|
})), this.d(t.flyInEvent.don((s) => {
|
|
@@ -3932,7 +3932,7 @@ const Bt = class Bt extends _ {
|
|
|
3932
3932
|
}
|
|
3933
3933
|
};
|
|
3934
3934
|
p(Bt, "type", Bt.register("ESUeViewer", Xi.type, Bt));
|
|
3935
|
-
let
|
|
3935
|
+
let vr = Bt;
|
|
3936
3936
|
const Dt = class Dt extends D {
|
|
3937
3937
|
constructor(e, t) {
|
|
3938
3938
|
if (super(e, t), !t.viewer) {
|
|
@@ -3952,7 +3952,7 @@ const Pt = class Pt extends D {
|
|
|
3952
3952
|
}
|
|
3953
3953
|
};
|
|
3954
3954
|
p(Pt, "type", Pt.register("ESUeViewer", Qi.type, Pt));
|
|
3955
|
-
let
|
|
3955
|
+
let fr = Pt;
|
|
3956
3956
|
const _t = class _t extends M {
|
|
3957
3957
|
constructor(e, t) {
|
|
3958
3958
|
if (super(e, t), !t.viewer) {
|
|
@@ -4009,16 +4009,16 @@ const Mt = class Mt extends I {
|
|
|
4009
4009
|
return;
|
|
4010
4010
|
}
|
|
4011
4011
|
const i = async (s, o, u, d) => {
|
|
4012
|
-
const { viewer:
|
|
4013
|
-
if (!
|
|
4012
|
+
const { viewer: f } = s;
|
|
4013
|
+
if (!f) {
|
|
4014
4014
|
console.error("AIMoveTo: ueViewer.viewer is undefined");
|
|
4015
4015
|
return;
|
|
4016
4016
|
}
|
|
4017
|
-
const
|
|
4017
|
+
const v = await f.callUeFunc({
|
|
4018
4018
|
f: "AIMoveTo",
|
|
4019
4019
|
p: { id: o, Destination: u, Time: d }
|
|
4020
4020
|
});
|
|
4021
|
-
return
|
|
4021
|
+
return v.error && console.error("AIMoveTo:", v.error), v;
|
|
4022
4022
|
};
|
|
4023
4023
|
this.d(e.aiMoveToEvent.don((s, o) => {
|
|
4024
4024
|
i(t, e.id, s, o);
|
|
@@ -4241,7 +4241,7 @@ const Yt = class Yt extends M {
|
|
|
4241
4241
|
}
|
|
4242
4242
|
}
|
|
4243
4243
|
};
|
|
4244
|
-
p(Yt, "type", Yt.register("ESUeViewer",
|
|
4244
|
+
p(Yt, "type", Yt.register("ESUeViewer", vn.type, Yt));
|
|
4245
4245
|
let Mr = Yt;
|
|
4246
4246
|
const qt = class qt extends M {
|
|
4247
4247
|
constructor(e, t) {
|
|
@@ -4251,7 +4251,7 @@ const qt = class qt extends M {
|
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
4253
|
};
|
|
4254
|
-
p(qt, "type", qt.register("ESUeViewer",
|
|
4254
|
+
p(qt, "type", qt.register("ESUeViewer", fn.type, qt));
|
|
4255
4255
|
let Wr = qt;
|
|
4256
4256
|
const Vt = class Vt extends nt {
|
|
4257
4257
|
constructor(e, t) {
|
|
@@ -4272,23 +4272,23 @@ const Vt = class Vt extends nt {
|
|
|
4272
4272
|
let u = [255, 255, 255, 1];
|
|
4273
4273
|
if (o.startsWith("#")) {
|
|
4274
4274
|
if (o.length === 4) {
|
|
4275
|
-
let d = parseInt(o[1] + o[1], 16),
|
|
4276
|
-
u = [d,
|
|
4275
|
+
let d = parseInt(o[1] + o[1], 16), f = parseInt(o[2] + o[2], 16), v = parseInt(o[3] + o[3], 16);
|
|
4276
|
+
u = [d, f, v, 1];
|
|
4277
4277
|
} else if (o.length === 7) {
|
|
4278
|
-
let d = parseInt(o.substring(1, 3), 16),
|
|
4279
|
-
u = [d,
|
|
4278
|
+
let d = parseInt(o.substring(1, 3), 16), f = parseInt(o.substring(3, 5), 16), v = parseInt(o.substring(5, 7), 16);
|
|
4279
|
+
u = [d, f, v, 1];
|
|
4280
4280
|
}
|
|
4281
4281
|
} else if (o.startsWith("rgba")) {
|
|
4282
4282
|
let d = o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);
|
|
4283
4283
|
if (d) {
|
|
4284
|
-
let
|
|
4285
|
-
u = [
|
|
4284
|
+
let f = parseInt(d[1]), v = parseInt(d[2]), l = parseInt(d[3]), h = parseFloat(d[4]);
|
|
4285
|
+
u = [f, v, l, h];
|
|
4286
4286
|
}
|
|
4287
4287
|
} else if (o.startsWith("rgb")) {
|
|
4288
4288
|
let d = o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
|
4289
4289
|
if (d) {
|
|
4290
|
-
let
|
|
4291
|
-
u = [
|
|
4290
|
+
let f = parseInt(d[1]), v = parseInt(d[2]), l = parseInt(d[3]);
|
|
4291
|
+
u = [f, v, l, 1];
|
|
4292
4292
|
}
|
|
4293
4293
|
} else
|
|
4294
4294
|
console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");
|
|
@@ -4510,7 +4510,7 @@ const Gr = (a) => {
|
|
|
4510
4510
|
position: e.position
|
|
4511
4511
|
}
|
|
4512
4512
|
}), (t.debug ?? !1) && console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`));
|
|
4513
|
-
}, d = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1,
|
|
4513
|
+
}, d = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1, f = async () => {
|
|
4514
4514
|
const { id: l } = e, h = await t.unBindActorByID(l);
|
|
4515
4515
|
h && h.error !== "" && console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${h.error}`), s = void 0;
|
|
4516
4516
|
const c = await r.callUeFunc({ f: "destroy", p: { id: l } });
|
|
@@ -4519,7 +4519,7 @@ const Gr = (a) => {
|
|
|
4519
4519
|
return;
|
|
4520
4520
|
}
|
|
4521
4521
|
o = void 0;
|
|
4522
|
-
},
|
|
4522
|
+
}, v = this.dv($({
|
|
4523
4523
|
type: "ActorClass",
|
|
4524
4524
|
actorClass: "default"
|
|
4525
4525
|
}));
|
|
@@ -4529,11 +4529,11 @@ const Gr = (a) => {
|
|
|
4529
4529
|
e.actorTagChanged
|
|
4530
4530
|
// sceneObject.positionChanged,
|
|
4531
4531
|
)), h = async () => {
|
|
4532
|
-
e.actorTag !== "" ?
|
|
4532
|
+
e.actorTag !== "" ? v.value = {
|
|
4533
4533
|
type: "ActorTag",
|
|
4534
4534
|
actorTag: e.actorTag
|
|
4535
4535
|
// position: sceneObject.position,
|
|
4536
|
-
} :
|
|
4536
|
+
} : v.value = {
|
|
4537
4537
|
type: "ActorClass",
|
|
4538
4538
|
actorClass: e.actorClass === "" ? "default" : e.actorClass
|
|
4539
4539
|
// position: sceneObject.position,
|
|
@@ -4543,9 +4543,9 @@ const Gr = (a) => {
|
|
|
4543
4543
|
}
|
|
4544
4544
|
{
|
|
4545
4545
|
const l = this.dv(Te(async (c) => {
|
|
4546
|
-
if (await c.promise(
|
|
4547
|
-
const { actorTag: g } =
|
|
4548
|
-
await c.promise(
|
|
4546
|
+
if (await c.promise(f()), v.value.type === "ActorTag") {
|
|
4547
|
+
const { actorTag: g } = v.value;
|
|
4548
|
+
await c.promise(f());
|
|
4549
4549
|
try {
|
|
4550
4550
|
e.lastActorStatus = "null";
|
|
4551
4551
|
const w = await c.promise(t.bindActorByTag(e.id, g));
|
|
@@ -4566,8 +4566,8 @@ const Gr = (a) => {
|
|
|
4566
4566
|
console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${g}, ${w}`);
|
|
4567
4567
|
return;
|
|
4568
4568
|
}
|
|
4569
|
-
} else if (
|
|
4570
|
-
const { actorClass: g } =
|
|
4569
|
+
} else if (v.value.type === "ActorClass") {
|
|
4570
|
+
const { actorClass: g } = v.value;
|
|
4571
4571
|
try {
|
|
4572
4572
|
const w = await c.promise(t.createActorByClass(e.id, g));
|
|
4573
4573
|
if (!w) return;
|
|
@@ -4590,7 +4590,7 @@ const Gr = (a) => {
|
|
|
4590
4590
|
})), h = async () => {
|
|
4591
4591
|
l.restart();
|
|
4592
4592
|
};
|
|
4593
|
-
h(), this.d(
|
|
4593
|
+
h(), this.d(v.changed.don(h));
|
|
4594
4594
|
}
|
|
4595
4595
|
this.d(e.positionChanged.don(u)), this.d(e.callFunctionEvent.don(async (l, h) => {
|
|
4596
4596
|
if (d()) {
|
|
@@ -4674,7 +4674,7 @@ const ae = class ae extends M {
|
|
|
4674
4674
|
console.warn("viewer is undefined!");
|
|
4675
4675
|
return;
|
|
4676
4676
|
}
|
|
4677
|
-
this.d(e.startEvent.don(() => {
|
|
4677
|
+
this.ad(F([e, "volume"], [e, "cutAndFillVolume"])), this.d(e.startEvent.don(() => {
|
|
4678
4678
|
r.callUeFunc({
|
|
4679
4679
|
f: "Start",
|
|
4680
4680
|
p: {
|
|
@@ -4758,18 +4758,18 @@ const le = class le extends J {
|
|
|
4758
4758
|
l(), e.dispose(e.cssPositionChanged.disposableOn(l));
|
|
4759
4759
|
}
|
|
4760
4760
|
d.style.transition = " right 0.4s linear", d.style.cursor = "pointer";
|
|
4761
|
-
const
|
|
4762
|
-
d.appendChild(
|
|
4763
|
-
const
|
|
4764
|
-
|
|
4761
|
+
const f = document.createElement("div");
|
|
4762
|
+
d.appendChild(f), this.dispose(() => d.removeChild(f)), f.style.width = "100%", f.style.height = "100%", f.style.position = "relative";
|
|
4763
|
+
const v = document.createElement("img");
|
|
4764
|
+
f.appendChild(v), this.dispose(() => f.removeChild(v)), v.style.width = "100%", v.style.height = "100%", v.style.border = "none";
|
|
4765
4765
|
{
|
|
4766
|
-
const l = () =>
|
|
4766
|
+
const l = () => v.src = e.imgUrl;
|
|
4767
4767
|
l(), e.dispose(e.imgUrlChanged.disposableOn(l));
|
|
4768
4768
|
}
|
|
4769
4769
|
{
|
|
4770
4770
|
const l = () => {
|
|
4771
4771
|
const w = -t.getCurrentCameraInfo().rotation[0];
|
|
4772
|
-
|
|
4772
|
+
v.style.transform = `rotate(${w}deg)`;
|
|
4773
4773
|
};
|
|
4774
4774
|
let h;
|
|
4775
4775
|
const c = async () => {
|
|
@@ -4779,7 +4779,7 @@ const le = class le extends J {
|
|
|
4779
4779
|
};
|
|
4780
4780
|
this.dispose(e.showChanged.disposableOn(c)), c(), this.dispose(() => clearInterval(h));
|
|
4781
4781
|
}
|
|
4782
|
-
|
|
4782
|
+
v.style.transformOrigin = "50% 50%";
|
|
4783
4783
|
}
|
|
4784
4784
|
};
|
|
4785
4785
|
}
|
|
@@ -4835,15 +4835,15 @@ const ce = class ce extends J {
|
|
|
4835
4835
|
if (super(), this._subContainer = s, !u || !(u instanceof H)) return;
|
|
4836
4836
|
const d = document.createElement("div");
|
|
4837
4837
|
this._subContainer.appendChild(d), this.dispose(() => this._subContainer.removeChild(d)), d.style.width = "100%", d.style.position = "absolute", d.style.height = `${W.defaults.height}px`, d.style.left = "0", d.style.bottom = "0", d.style.color = "#fff", d.style.padding = "0 20px 0 0", d.style.boxSizing = "border-box", d.style.lineHeight = `${W.defaults.height}px`, d.style.zIndex = "100", d.style.alignContent = "center", d.style.justifyContent = "space-between";
|
|
4838
|
-
const v = document.createElement("span");
|
|
4839
|
-
d.appendChild(v), this.dispose(() => d.removeChild(v));
|
|
4840
4838
|
const f = document.createElement("span");
|
|
4841
|
-
|
|
4839
|
+
d.appendChild(f), this.dispose(() => d.removeChild(f));
|
|
4840
|
+
const v = document.createElement("span");
|
|
4841
|
+
f.appendChild(v), this.dispose(() => f.removeChild(v));
|
|
4842
4842
|
const l = document.createElement("span");
|
|
4843
|
-
|
|
4843
|
+
f.appendChild(l), l.addEventListener("dblclick", function() {
|
|
4844
4844
|
let c = l.innerHTML;
|
|
4845
4845
|
c.startsWith("鼠标位置") && (c = c.slice(5)), wo(c);
|
|
4846
|
-
}), l.style.cursor = "pointer", this.dispose(() =>
|
|
4846
|
+
}), l.style.cursor = "pointer", this.dispose(() => f.removeChild(l));
|
|
4847
4847
|
const h = document.createElement("span");
|
|
4848
4848
|
d.appendChild(h), this.dispose(() => d.removeChild(h));
|
|
4849
4849
|
{
|
|
@@ -4872,9 +4872,9 @@ const ce = class ce extends J {
|
|
|
4872
4872
|
{
|
|
4873
4873
|
const c = () => {
|
|
4874
4874
|
let y = "", S = "";
|
|
4875
|
-
y += `帧率:${u.getFPS().toFixed(0)}FPS`,
|
|
4875
|
+
y += `帧率:${u.getFPS().toFixed(0)}FPS`, v.innerText = y;
|
|
4876
4876
|
const C = t.getCurrentCameraInfo();
|
|
4877
|
-
y += ` 经度: ${C.position[0].toFixed(5)}° 纬度: ${C.position[1].toFixed(5)}° 高度: ${C.position[2].toFixed(2)}米 偏航角: ${C.rotation[0].toFixed(2)}° 俯仰角: ${C.rotation[1].toFixed(2)}° 翻滚角:${C.rotation[2].toFixed(2)}° `,
|
|
4877
|
+
y += ` 经度: ${C.position[0].toFixed(5)}° 纬度: ${C.position[1].toFixed(5)}° 高度: ${C.position[2].toFixed(2)}米 偏航角: ${C.rotation[0].toFixed(2)}° 俯仰角: ${C.rotation[1].toFixed(2)}° 翻滚角:${C.rotation[2].toFixed(2)}° `, v.innerText = y, t.pick().then((L) => {
|
|
4878
4878
|
if (L) {
|
|
4879
4879
|
const { pickResult: x } = L;
|
|
4880
4880
|
if (x && x.position) {
|
|
@@ -4982,7 +4982,7 @@ const pe = class pe extends nt {
|
|
|
4982
4982
|
};
|
|
4983
4983
|
p(pe, "type", pe.register("ESUeViewer", Un.type, pe));
|
|
4984
4984
|
let ii = pe;
|
|
4985
|
-
const
|
|
4985
|
+
const ve = class ve extends M {
|
|
4986
4986
|
constructor(e, t) {
|
|
4987
4987
|
super(e, t);
|
|
4988
4988
|
const r = t.viewer;
|
|
@@ -5008,9 +5008,9 @@ const fe = class fe extends M {
|
|
|
5008
5008
|
this.dispose(n.disposableOn(i)), this.dispose(e.createdEvent.disposableOn(i));
|
|
5009
5009
|
}
|
|
5010
5010
|
};
|
|
5011
|
-
p(
|
|
5012
|
-
let ni =
|
|
5013
|
-
const
|
|
5011
|
+
p(ve, "type", ve.register("ESUeViewer", Ce.type, ve));
|
|
5012
|
+
let ni = ve;
|
|
5013
|
+
const fe = class fe extends I {
|
|
5014
5014
|
constructor(e, t) {
|
|
5015
5015
|
if (super(e, t), !t.viewer) {
|
|
5016
5016
|
console.warn("viewer is undefined!");
|
|
@@ -5018,8 +5018,8 @@ const ve = class ve extends I {
|
|
|
5018
5018
|
}
|
|
5019
5019
|
}
|
|
5020
5020
|
};
|
|
5021
|
-
p(
|
|
5022
|
-
let si =
|
|
5021
|
+
p(fe, "type", fe.register("ESUeViewer", Nn.type, fe));
|
|
5022
|
+
let si = fe;
|
|
5023
5023
|
const ge = class ge extends D {
|
|
5024
5024
|
constructor(e, t) {
|
|
5025
5025
|
super(e, t);
|
|
@@ -5048,7 +5048,7 @@ const ge = class ge extends D {
|
|
|
5048
5048
|
p(ge, "type", ge.register("ESUeViewer", zn.type, ge));
|
|
5049
5049
|
let oi = ge, Be;
|
|
5050
5050
|
try {
|
|
5051
|
-
const a = "earthsdk3-ue", e = "3.0.
|
|
5051
|
+
const a = "earthsdk3-ue", e = "3.0.8-beta.2", t = "2025-06-16T01:35:09.000Z", r = "北京西部世界科技有限公司", i = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "bb8010020199b408171f0ba5e38ed63dd6584fbc", o = ((Date.now() - 1750037709e3) / 36e5).toFixed(1), u = `%c🌏 ${a}%c ${e}.${n.slice(0, 8)}.${t} (距今${o}个小时)
|
|
5052
5052
|
%c${i ? i + `
|
|
5053
5053
|
` : ""}当前网站正在使用${a},此软件版权归${r}所有
|
|
5054
5054
|
`;
|
|
@@ -5062,7 +5062,7 @@ try {
|
|
|
5062
5062
|
},
|
|
5063
5063
|
// @ts-ignore
|
|
5064
5064
|
get gituri() {
|
|
5065
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
5065
|
+
return GITURI_ && GITURI_.replace("${commitId}", "bb8010020199b408171f0ba5e38ed63dd6584fbc");
|
|
5066
5066
|
},
|
|
5067
5067
|
// @ts-ignore
|
|
5068
5068
|
get info() {
|
|
@@ -5070,7 +5070,7 @@ try {
|
|
|
5070
5070
|
},
|
|
5071
5071
|
// @ts-ignore
|
|
5072
5072
|
get date() {
|
|
5073
|
-
return "2025-06-
|
|
5073
|
+
return "2025-06-16T01:35:09.000Z";
|
|
5074
5074
|
},
|
|
5075
5075
|
// @ts-ignore
|
|
5076
5076
|
get author() {
|
|
@@ -5078,7 +5078,7 @@ try {
|
|
|
5078
5078
|
},
|
|
5079
5079
|
// @ts-ignore
|
|
5080
5080
|
get version() {
|
|
5081
|
-
return "3.0.
|
|
5081
|
+
return "3.0.8-beta.2";
|
|
5082
5082
|
},
|
|
5083
5083
|
// @ts-ignore
|
|
5084
5084
|
get name() {
|
|
@@ -5086,7 +5086,7 @@ try {
|
|
|
5086
5086
|
},
|
|
5087
5087
|
// @ts-ignore
|
|
5088
5088
|
get commitId() {
|
|
5089
|
-
return "
|
|
5089
|
+
return "bb8010020199b408171f0ba5e38ed63dd6584fbc";
|
|
5090
5090
|
},
|
|
5091
5091
|
print(d = !1) {
|
|
5092
5092
|
!d && window._xe2_no_copy_print || console.info(
|
|
@@ -5146,10 +5146,10 @@ export {
|
|
|
5146
5146
|
ei as UeESGaussianSplatting,
|
|
5147
5147
|
pr as UeESGeoDiv,
|
|
5148
5148
|
ni as UeESGeoExtrudedPolygon,
|
|
5149
|
-
|
|
5149
|
+
vr as UeESGeoJson,
|
|
5150
5150
|
_e as UeESGeoLineString,
|
|
5151
5151
|
M as UeESGeoPolygon,
|
|
5152
|
-
|
|
5152
|
+
fr as UeESGeoRectangle,
|
|
5153
5153
|
D as UeESGeoVector,
|
|
5154
5154
|
gr as UeESGeoWater,
|
|
5155
5155
|
wr as UeESGltfModel,
|
|
@@ -5225,7 +5225,7 @@ export {
|
|
|
5225
5225
|
us as getHeightByLonLatCallFunc,
|
|
5226
5226
|
hs as getHeightByLonLatsCallFunc,
|
|
5227
5227
|
Ws as getIdByComponentNameAndHitItemCallFunc,
|
|
5228
|
-
|
|
5228
|
+
fs as getLonLatAltToScreenPositionCallFunc,
|
|
5229
5229
|
Ss as getObjectByInfoCallFunc,
|
|
5230
5230
|
bs as getStatusCallFunc,
|
|
5231
5231
|
Fs as getStrokeMaterialParamInfoCallFunc,
|
|
@@ -5234,7 +5234,7 @@ export {
|
|
|
5234
5234
|
Ns as highlightActorByTagCallFunc,
|
|
5235
5235
|
On as mountPakFiles,
|
|
5236
5236
|
Gs as moveObjectsCallFunc,
|
|
5237
|
-
|
|
5237
|
+
vs as partialCaptureCallFunc,
|
|
5238
5238
|
ls as pickCallFunc,
|
|
5239
5239
|
cs as pickPositionCallFunc,
|
|
5240
5240
|
ds as quitCallFunc,
|