earthsdk3-ue 3.3.0-beta.2 → 3.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/earthsdk3-ue.iife.js +2 -2
- package/dist/earthsdk3-ue.js +281 -281
- package/dist/earthsdk3-ue.umd.cjs +2 -2
- package/dist/types/UeObjects/base/UeESGeoVector/index.d.ts +2 -0
- package/dist/types/UeObjects/base/UeESGeoVector/index.d.ts.map +1 -1
- package/dist/types/UeObjects/base/UeESLocalVector/index.d.ts +2 -0
- package/dist/types/UeObjects/base/UeESLocalVector/index.d.ts.map +1 -1
- package/dist/types/UeObjects/general/UeESExcavate/index.d.ts +2 -0
- package/dist/types/UeObjects/general/UeESExcavate/index.d.ts.map +1 -1
- package/dist/types/UeObjects/general/UeESPath/index.d.ts +2 -0
- package/dist/types/UeObjects/general/UeESPath/index.d.ts.map +1 -1
- package/dist/types/UeObjects/general/UeESPolygonFlattenedPlane/index.d.ts +2 -0
- package/dist/types/UeObjects/general/UeESPolygonFlattenedPlane/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/earthsdk3-ue.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var Lr = Object.defineProperty;
|
|
2
2
|
var Pr = (c, e, t) => e in c ? Lr(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
|
|
3
3
|
var p = (c, e, t) => Pr(c, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { ESViewer as Se, ESSceneObject as E, ESJPickedResult as We, ViewerCustomInteraction as lr, getGeoBoundingSphereFromPositions as kr, EngineObject as
|
|
5
|
-
import { reactArrayWithUndefined as pr, Destroyable as m, HasOwner as
|
|
6
|
-
import { Logger as
|
|
4
|
+
import { ESViewer as Se, ESSceneObject as E, ESJPickedResult as We, ViewerCustomInteraction as lr, getGeoBoundingSphereFromPositions as kr, EngineObject as b, ES3DTileset as cr, ESVisualObject as at, ESImageryLayer as G, ESTerrainLayer as Dr, ESAlarm as Br, ESApertureEffect as _r, ESGeoPolygon as Mr, ESAreaMeasurement as O, ESBlastParticleSystem as $r, ESBoxClipping as Wr, ESCameraView as Ar, ESCameraVisibleRange as Ur, ESCar as Nr, ESClassification as ct, ESClippingPlane as zr, ESDataMesh as z, ESDatasmithRuntimeModel as Hr, ESDirectionMeasurement as Jr, ESDistanceMeasurement as Me, ESLocalPolygon as br, ESDynamicWater as Gr, ESEntityCluster as Kr, ESExcavate as Xr, ESFireParticleSystem as Yr, ESForestTileset as U, ESGeoDiv as Fe, ESTextLabel as ur, ESCustomDiv as ze, ESImageLabel as hr, ESGeoJson as Zr, ESGeoLineString as qr, ESGeoRectangle as Qr, ESGeoWater as Vr, rpToap as Ie, ESGltfModel as Or, ESHeightMeasurement as jr, ESHuman as tn, ESLevelRuntimeModel as en, ESLocalCircle as rn, ESLocalPolygonZ as nn, ESLocalRectangle as sn, ESLocalSkyBox as on, ESLocationMeasurement as an, ESPipeFence as dn, ESPipeline as ln, ESPipeserTileset as cn, ESPit as un, ESPoi2D as hn, ESPoi3D as pn, ESPoiTileset as fn, ESPolygonFence as vn, ESPolygonFlattenedPlane as gn, ESPolygonWithHole as wn, ESRtsTileset as yn, ESSeparateFoliage as mn, addTreesCallFunc as Cn, removeAllTreesCallFunc as Fn, updateTreeParamsCallFunc as In, cutDownTreesCallFunc as En, growthSimulationCallFunc as Sn, ESSubmergingAnalysis as Tn, ESSunshineAnalysis as xn, ESSurfaceAreaMeasurement as Rn, ESUEWidget as Ln, ESUnrealActor as Pn, ESVideoFusion as kn, ESViewShed as Dn, ESVisibilityAnalysis as Bn, ESVolumeMeasurement as _n, ESWidget as Mn, ESHumanPoi as $n, ESNavigator as j, ESPath as Wn, ESViewerStatusBar as W, ESGaussianSplatting as An, ESRtsFeatureEditing as Un, ESMsTileset as Nn, ESGeoExtrudedPolygon as Ce, ESStaticMesh as zn, ESSkylineAnalysis as Hn } from "earthsdk3";
|
|
5
|
+
import { reactArrayWithUndefined as pr, Destroyable as m, HasOwner as Jn, createGuid as B, Event as T, createAnimateFrame as He, createInterval as Te, react as $, createNextAnimateFrameEvent as R, ObjResettingWithEvent as x, createProcessingFromAsyncFunc as xe, sleep as bn, extendClassProps as Gn, reactJson as Je, bind as L, track as F, PosFloatDiv as Kn } from "xbsj-base";
|
|
6
|
+
import { Logger as fr, Config as vr, TextParameters as Xn, Flags as ot, NumericParameters as gr, PixelStreaming as wr } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.2";
|
|
7
7
|
import Yn from "html2canvas";
|
|
8
8
|
const Zn = {
|
|
9
9
|
...Se.defaults,
|
|
@@ -50,8 +50,8 @@ function Re() {
|
|
|
50
50
|
e.push(t);
|
|
51
51
|
}), e;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const { defaults: e } =
|
|
53
|
+
function be(c) {
|
|
54
|
+
const { defaults: e } = J, t = Re(), i = {};
|
|
55
55
|
return t.forEach((r) => {
|
|
56
56
|
i[r] = c[r] ?? e[r];
|
|
57
57
|
}), i;
|
|
@@ -396,7 +396,7 @@ const ye = async (c, e, t, i, r, n = "default") => {
|
|
|
396
396
|
} catch {
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
|
-
},
|
|
399
|
+
}, fs = async (c, e = 64, t = 64) => {
|
|
400
400
|
const i = await c.callUeFunc({
|
|
401
401
|
f: "capture",
|
|
402
402
|
p: { resx: e, resy: t }
|
|
@@ -406,7 +406,7 @@ const ye = async (c, e, t, i, r, n = "default") => {
|
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
408
|
return i.re.image;
|
|
409
|
-
},
|
|
409
|
+
}, vs = async (c, e, t = [64, 64]) => {
|
|
410
410
|
const i = await c.callUeFunc({
|
|
411
411
|
f: "partialCapture",
|
|
412
412
|
p: {
|
|
@@ -595,7 +595,7 @@ const ye = async (c, e, t, i, r, n = "default") => {
|
|
|
595
595
|
p: { Message: e }
|
|
596
596
|
});
|
|
597
597
|
return t.error !== "" && console.warn("SendCustomMessage: ", t.error), t;
|
|
598
|
-
},
|
|
598
|
+
}, Js = async function(c) {
|
|
599
599
|
const e = await c.callUeFunc({
|
|
600
600
|
f: "GetStatus",
|
|
601
601
|
p: void 0
|
|
@@ -605,7 +605,7 @@ const ye = async (c, e, t, i, r, n = "default") => {
|
|
|
605
605
|
return;
|
|
606
606
|
}
|
|
607
607
|
return e.re;
|
|
608
|
-
},
|
|
608
|
+
}, bs = async (c, e, t, i, r = !0) => {
|
|
609
609
|
const n = await c.callUeFunc({
|
|
610
610
|
f: "startEditing",
|
|
611
611
|
p: {
|
|
@@ -666,7 +666,7 @@ const Ys = {
|
|
|
666
666
|
UIInteraction: 50,
|
|
667
667
|
MouseWheel: 75
|
|
668
668
|
};
|
|
669
|
-
class Zs extends
|
|
669
|
+
class Zs extends Jn {
|
|
670
670
|
constructor(t, i) {
|
|
671
671
|
super(t);
|
|
672
672
|
p(this, "_processResponseFn", (t) => this.esUeViewer.processResponse(t));
|
|
@@ -698,10 +698,10 @@ class Zs extends bn {
|
|
|
698
698
|
let l = s[o / 4];
|
|
699
699
|
o += 4;
|
|
700
700
|
for (let a = 0; a < l; a++) {
|
|
701
|
-
let
|
|
701
|
+
let v = s[o / 4];
|
|
702
702
|
o += 4;
|
|
703
|
-
let
|
|
704
|
-
o +=
|
|
703
|
+
let f = new TextDecoder("utf-8").decode(n.slice(o, o + v));
|
|
704
|
+
o += v, this._processResponseFn(f);
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
}, i.readAsArrayBuffer(t.data);
|
|
@@ -741,7 +741,7 @@ class Zs extends bn {
|
|
|
741
741
|
}
|
|
742
742
|
window.g_emitDescriptor_maxBytes = 3e4;
|
|
743
743
|
let qs = -1;
|
|
744
|
-
|
|
744
|
+
fr.SetLoggerVerbosity(1);
|
|
745
745
|
class Qs extends m {
|
|
746
746
|
constructor(t, i) {
|
|
747
747
|
super();
|
|
@@ -779,7 +779,7 @@ class Qs extends m {
|
|
|
779
779
|
return this.eventTarget.dispatchEvent(t);
|
|
780
780
|
}
|
|
781
781
|
_initPixelStream(t, i) {
|
|
782
|
-
const r = new
|
|
782
|
+
const r = new vr({
|
|
783
783
|
initialSettings: {
|
|
784
784
|
AutoPlayVideo: !0,
|
|
785
785
|
AutoConnect: !0,
|
|
@@ -866,8 +866,8 @@ class Qs extends m {
|
|
|
866
866
|
return;
|
|
867
867
|
}
|
|
868
868
|
const l = Math.ceil(s / n) | 0;
|
|
869
|
-
[...new Array(l).keys()].map((
|
|
870
|
-
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ee.UIInteraction, `${o}-${
|
|
869
|
+
[...new Array(l).keys()].map((v) => r.slice(v * n, (v + 1) * n)).forEach((v, f) => {
|
|
870
|
+
this.esMsgWsWrapper && this.esMsgWsWrapper.emitDescriptorWithString(Ee.UIInteraction, `${o}-${f}/${l}-` + v);
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
873
|
}
|
|
@@ -1035,7 +1035,7 @@ class Os extends _e {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
}));
|
|
1037
1037
|
let a = 0;
|
|
1038
|
-
const
|
|
1038
|
+
const v = (h) => {
|
|
1039
1039
|
const u = {
|
|
1040
1040
|
n: a++,
|
|
1041
1041
|
tt: Date.now(),
|
|
@@ -1051,7 +1051,7 @@ class Os extends _e {
|
|
|
1051
1051
|
), console.groupEnd()), this._esueViewerWrapper.emitUIInteractionForBigData(u, () => {
|
|
1052
1052
|
this._waitingUeCalls.delete(u);
|
|
1053
1053
|
});
|
|
1054
|
-
},
|
|
1054
|
+
}, f = () => {
|
|
1055
1055
|
if (!l || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1056
1056
|
const h = this._ueFuncWithIdAndResultCallbacks.map(([u]) => u);
|
|
1057
1057
|
for (const [u, g] of this._ueFuncWithIdAndResultCallbacks)
|
|
@@ -1066,11 +1066,11 @@ class Os extends _e {
|
|
|
1066
1066
|
if (C.push(k), ++y, S + P > u || C.length >= 20)
|
|
1067
1067
|
break;
|
|
1068
1068
|
} while (y < w);
|
|
1069
|
-
C.length > 0 && (s.debug && console.log(`传送${C.length}条消息...`),
|
|
1069
|
+
C.length > 0 && (s.debug && console.log(`传送${C.length}条消息...`), v([...C]), C.length = 0, S = 0);
|
|
1070
1070
|
} while (y < w);
|
|
1071
1071
|
}
|
|
1072
1072
|
};
|
|
1073
|
-
this.dv(Te()).start(
|
|
1073
|
+
this.dv(Te()).start(f, 50), this.d(() => console.log("UeCloudViewer正在销毁..."));
|
|
1074
1074
|
}
|
|
1075
1075
|
get esueViewerWrapper() {
|
|
1076
1076
|
return this._esueViewerWrapper;
|
|
@@ -1162,7 +1162,7 @@ function eo(c) {
|
|
|
1162
1162
|
window.g_emitDescriptor_maxBytes = 3e4;
|
|
1163
1163
|
console.log("全局可设置消息体最大字节, window.g_emitDescriptor_maxBytes 默认 30000 。");
|
|
1164
1164
|
let io = -1;
|
|
1165
|
-
|
|
1165
|
+
fr.SetLoggerVerbosity(1);
|
|
1166
1166
|
class ro extends m {
|
|
1167
1167
|
constructor(t, i) {
|
|
1168
1168
|
super();
|
|
@@ -1174,7 +1174,7 @@ class ro extends m {
|
|
|
1174
1174
|
//发送时记录消息,回调函数中对应消息后再删除
|
|
1175
1175
|
p(this, "uiInteractionCallbacks", /* @__PURE__ */ new Map());
|
|
1176
1176
|
this._container = t, this._option = i;
|
|
1177
|
-
const r = new
|
|
1177
|
+
const r = new vr({
|
|
1178
1178
|
initialSettings: {
|
|
1179
1179
|
HoveringMouse: !0,
|
|
1180
1180
|
AutoPlayVideo: !0,
|
|
@@ -1199,8 +1199,8 @@ class ro extends m {
|
|
|
1199
1199
|
const n = (s) => {
|
|
1200
1200
|
const o = this._pixelStream._webRtcController.mouseController;
|
|
1201
1201
|
setTimeout(() => {
|
|
1202
|
-
const l = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY),
|
|
1203
|
-
|
|
1202
|
+
const l = o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX, s.offsetY), v = o.toStreamerMessagesProvider.toStreamerHandlers.get("MouseUp");
|
|
1203
|
+
v && v([s.button, l.x, l.y]), s.preventDefault();
|
|
1204
1204
|
});
|
|
1205
1205
|
};
|
|
1206
1206
|
this.container.addEventListener("dblclick", n), this.d(() => {
|
|
@@ -1267,17 +1267,17 @@ class ro extends m {
|
|
|
1267
1267
|
typeof i == "function" && (t.callid = B(), this.uiInteractionCallbacks.set(t.callid, i));
|
|
1268
1268
|
const r = JSON.stringify(t), n = window.g_emitDescriptor_maxBytes ?? 3e4, s = r.length, o = ++io;
|
|
1269
1269
|
if (s < n) {
|
|
1270
|
-
const
|
|
1270
|
+
const v = {
|
|
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(v));
|
|
1276
1276
|
return;
|
|
1277
1277
|
}
|
|
1278
1278
|
const l = Math.ceil(s / n) | 0;
|
|
1279
|
-
[...new Array(l).keys()].map((
|
|
1280
|
-
const d = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${
|
|
1279
|
+
[...new Array(l).keys()].map((v) => r.slice(v * n, (v + 1) * n)).forEach((v, f) => {
|
|
1280
|
+
const d = { type: "earthsdk", time: (/* @__PURE__ */ new Date()).getTime(), params: `${o}-${f}/${l}-` + v };
|
|
1281
1281
|
this.sendData(JSON.stringify(d));
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
@@ -1456,7 +1456,7 @@ class so extends _e {
|
|
|
1456
1456
|
), console.groupEnd()), this._ue5ViewerWrapper.emitUIInteractionForBigData(h, () => {
|
|
1457
1457
|
this._waitingUeCalls.delete(h);
|
|
1458
1458
|
});
|
|
1459
|
-
},
|
|
1459
|
+
}, v = () => {
|
|
1460
1460
|
if (!this._ue5ViewerWrapper.instance.webSocketReady || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1461
1461
|
const h = this._ueFuncWithIdAndResultCallbacks.map(([u]) => u);
|
|
1462
1462
|
for (const [u, g] of this._ueFuncWithIdAndResultCallbacks)
|
|
@@ -1475,7 +1475,7 @@ class so extends _e {
|
|
|
1475
1475
|
} while (y < w);
|
|
1476
1476
|
}
|
|
1477
1477
|
};
|
|
1478
|
-
this.dv(Te()).start(
|
|
1478
|
+
this.dv(Te()).start(v, 50), this.d(() => console.log("UeCloudViewer正在销毁..."));
|
|
1479
1479
|
}
|
|
1480
1480
|
get videoInitialized() {
|
|
1481
1481
|
return this._videoInitialized.value;
|
|
@@ -1601,7 +1601,7 @@ class lo extends m {
|
|
|
1601
1601
|
super();
|
|
1602
1602
|
{
|
|
1603
1603
|
const r = () => {
|
|
1604
|
-
const l =
|
|
1604
|
+
const l = be(t);
|
|
1605
1605
|
t.setGlobalProperty(l);
|
|
1606
1606
|
};
|
|
1607
1607
|
r();
|
|
@@ -1728,10 +1728,10 @@ class uo extends _e {
|
|
|
1728
1728
|
g && (this._waitingUeFuncIdAndResultCallbacks.delete(u.fid), g(u.r));
|
|
1729
1729
|
}
|
|
1730
1730
|
}));
|
|
1731
|
-
let
|
|
1732
|
-
const
|
|
1731
|
+
let v = 0;
|
|
1732
|
+
const f = () => {
|
|
1733
1733
|
if (!l || !a || !a.UE_JSHTML5Communication || !a.UE_JSHTML5Communication.JSSendMessageToUE || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1734
|
-
const h = this._ueFuncWithIdAndResultCallbacks.map(([P]) => P), u = { n:
|
|
1734
|
+
const h = this._ueFuncWithIdAndResultCallbacks.map(([P]) => P), u = { n: v++, tt: Date.now(), t: "c", fs: h, callid: B() };
|
|
1735
1735
|
for (const [P, A] of this._ueFuncWithIdAndResultCallbacks)
|
|
1736
1736
|
this._waitingUeFuncIdAndResultCallbacks.set(P.fid, A);
|
|
1737
1737
|
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.set(u.callid, u), s.debug && (console.group(
|
|
@@ -1753,7 +1753,7 @@ class uo extends _e {
|
|
|
1753
1753
|
a.UE_JSHTML5Communication.JSSendMessageToUE(me);
|
|
1754
1754
|
});
|
|
1755
1755
|
};
|
|
1756
|
-
this.dv(Te()).start(
|
|
1756
|
+
this.dv(Te()).start(f, 50);
|
|
1757
1757
|
}
|
|
1758
1758
|
processResponse(t) {
|
|
1759
1759
|
if (this._ueViewer.debug ?? !1)
|
|
@@ -1816,10 +1816,10 @@ class po extends _e {
|
|
|
1816
1816
|
eventType: "init",
|
|
1817
1817
|
params: {}
|
|
1818
1818
|
};
|
|
1819
|
-
window.ue.es.oncommand(JSON.stringify(s)), n = !0, window.calljs = (
|
|
1820
|
-
if (r.debug && console.log(`calljs eventName:${
|
|
1819
|
+
window.ue.es.oncommand(JSON.stringify(s)), n = !0, window.calljs = (v, f) => {
|
|
1820
|
+
if (r.debug && console.log(`calljs eventName:${v} eventDetailStr:${f}`), v === "ueevent" || v === "commanFinish")
|
|
1821
1821
|
try {
|
|
1822
|
-
const d = JSON.parse(
|
|
1822
|
+
const d = JSON.parse(f);
|
|
1823
1823
|
if (d.t === "cr") {
|
|
1824
1824
|
const h = d;
|
|
1825
1825
|
if (h.frs && this._ueFuncResultWithIdsEvent.emit(h.frs), h.ers)
|
|
@@ -1829,33 +1829,33 @@ class po extends _e {
|
|
|
1829
1829
|
} catch (d) {
|
|
1830
1830
|
console.error(d);
|
|
1831
1831
|
}
|
|
1832
|
-
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((
|
|
1833
|
-
for (const
|
|
1834
|
-
const d = this._waitingUeFuncIdAndResultCallbacks.get(
|
|
1835
|
-
d && (this._waitingUeFuncIdAndResultCallbacks.delete(
|
|
1832
|
+
}, this.dispose(this._ueFuncResultWithIdsEvent.disposableOn((v) => {
|
|
1833
|
+
for (const f of v) {
|
|
1834
|
+
const d = this._waitingUeFuncIdAndResultCallbacks.get(f.fid);
|
|
1835
|
+
d && (this._waitingUeFuncIdAndResultCallbacks.delete(f.fid), d(f.r));
|
|
1836
1836
|
}
|
|
1837
1837
|
}));
|
|
1838
1838
|
let o = 0;
|
|
1839
1839
|
const l = () => {
|
|
1840
1840
|
if (!n || this._ueFuncWithIdAndResultCallbacks.length === 0) return;
|
|
1841
|
-
const
|
|
1841
|
+
const v = this._ueFuncWithIdAndResultCallbacks.map(([h]) => h), f = {
|
|
1842
1842
|
n: o++,
|
|
1843
1843
|
tt: Date.now(),
|
|
1844
1844
|
t: "c",
|
|
1845
|
-
fs:
|
|
1845
|
+
fs: v
|
|
1846
1846
|
};
|
|
1847
1847
|
for (const [h, u] of this._ueFuncWithIdAndResultCallbacks)
|
|
1848
1848
|
this._waitingUeFuncIdAndResultCallbacks.set(h.fid, u);
|
|
1849
|
-
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.add(
|
|
1849
|
+
this._ueFuncWithIdAndResultCallbacks.length = 0, this._waitingUeCalls.add(f), r.debug && (console.group(
|
|
1850
1850
|
"%cxe2 => ue",
|
|
1851
1851
|
" background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"
|
|
1852
1852
|
), console.log(
|
|
1853
|
-
`%c${JSON.stringify(
|
|
1853
|
+
`%c${JSON.stringify(f, void 0, "")}`,
|
|
1854
1854
|
" border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"
|
|
1855
1855
|
), console.groupEnd());
|
|
1856
1856
|
const d = ++ho;
|
|
1857
|
-
window.ue.es.oncommand(`${d}-0/1-` + JSON.stringify(
|
|
1858
|
-
this._waitingUeCalls.delete(
|
|
1857
|
+
window.ue.es.oncommand(`${d}-0/1-` + JSON.stringify(f)).then(() => {
|
|
1858
|
+
this._waitingUeCalls.delete(f);
|
|
1859
1859
|
});
|
|
1860
1860
|
};
|
|
1861
1861
|
this.dv(Te()).start(l, 50);
|
|
@@ -1890,12 +1890,12 @@ class po extends _e {
|
|
|
1890
1890
|
};
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
|
-
class
|
|
1893
|
+
class fo extends m {
|
|
1894
1894
|
constructor(e, t) {
|
|
1895
1895
|
super();
|
|
1896
1896
|
{
|
|
1897
1897
|
const i = () => {
|
|
1898
|
-
const o =
|
|
1898
|
+
const o = be(e);
|
|
1899
1899
|
e.setGlobalProperty(o);
|
|
1900
1900
|
};
|
|
1901
1901
|
i();
|
|
@@ -1965,19 +1965,19 @@ class vo extends m {
|
|
|
1965
1965
|
}));
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
class
|
|
1968
|
+
class vo extends m {
|
|
1969
1969
|
constructor(e, t, i) {
|
|
1970
1970
|
super();
|
|
1971
1971
|
{
|
|
1972
1972
|
const n = () => {
|
|
1973
|
-
const a =
|
|
1973
|
+
const a = be(t);
|
|
1974
1974
|
t.setGlobalProperty(a);
|
|
1975
1975
|
};
|
|
1976
1976
|
n();
|
|
1977
1977
|
const s = Re(), o = [];
|
|
1978
1978
|
s.forEach((a) => {
|
|
1979
|
-
const
|
|
1980
|
-
o.push(
|
|
1979
|
+
const v = t[a + "Changed"];
|
|
1980
|
+
o.push(v);
|
|
1981
1981
|
});
|
|
1982
1982
|
const l = this.dv(R(...o));
|
|
1983
1983
|
this.d(l.don(n));
|
|
@@ -1998,8 +1998,8 @@ class fo extends m {
|
|
|
1998
1998
|
r && e && e.removeChild(r);
|
|
1999
1999
|
});
|
|
2000
2000
|
{
|
|
2001
|
-
const n = (a,
|
|
2002
|
-
window.ue.esinput.setinterceptevent(
|
|
2001
|
+
const n = (a, v) => {
|
|
2002
|
+
window.ue.esinput.setinterceptevent(v), a.preventDefault();
|
|
2003
2003
|
}, s = (a) => {
|
|
2004
2004
|
n(a, !1);
|
|
2005
2005
|
}, o = (a) => {
|
|
@@ -2071,7 +2071,7 @@ class go extends m {
|
|
|
2071
2071
|
if (window.ue.esinput) {
|
|
2072
2072
|
r.setStatus("Creating"), console.log("存在(window.ue && window.ue.es && window.ue.esinput 需要适配新版ESWebView 鼠标穿透), 开始创建UeFalseCloudViewer..."), r.setStatusLog("开始创建本地视口...");
|
|
2073
2073
|
const l = this.dv(new po(t, r));
|
|
2074
|
-
this.d(() => r.viewer = void 0), r.viewer = l, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new
|
|
2074
|
+
this.d(() => r.viewer = void 0), r.viewer = l, r.setStatus("Created"), r.setStatusLog("本地视口创建成功!"), this.dv(new vo(t, r, l));
|
|
2075
2075
|
} else
|
|
2076
2076
|
r.setStatus("Error"), r.setStatusLog("请升级 ESWebView !");
|
|
2077
2077
|
else if (n(i.options, "ws") || n(i.options, "uri") && n(i.options, "app")) {
|
|
@@ -2080,12 +2080,12 @@ class go extends m {
|
|
|
2080
2080
|
this.d(() => {
|
|
2081
2081
|
r.setStatus("Raw"), r.setStatusLog(""), t && l && t.removeChild(l) && (l = void 0);
|
|
2082
2082
|
});
|
|
2083
|
-
const a = this.dv(xe(async (
|
|
2083
|
+
const a = this.dv(xe(async (v) => {
|
|
2084
2084
|
r.viewer && !r.viewer.isDestroyed() && r.viewer.destroy(), r.viewer = void 0, l && t.removeChild(l) && (l = void 0), l = document.createElement("div"), l.setAttribute("earthsdk3-ue", "earthsdk3-ue-videoContainer"), l.style.cssText = "position:relative; height: 100%;width:100%;", t.appendChild(l);
|
|
2085
|
-
let
|
|
2085
|
+
let f, d, h;
|
|
2086
2086
|
if (n(i.options, "ws")) {
|
|
2087
2087
|
const { ws: y, esmsg: S, uselnternalSignallingServer: C } = i.options;
|
|
2088
|
-
|
|
2088
|
+
f = y, d = S, h = C ?? !1;
|
|
2089
2089
|
}
|
|
2090
2090
|
if (n(i.options, "uri") && n(i.options, "app")) {
|
|
2091
2091
|
const { offsetWidth: y, offsetHeight: S } = l;
|
|
@@ -2093,40 +2093,40 @@ class go extends m {
|
|
|
2093
2093
|
C.endsWith("/") || (C += "/");
|
|
2094
2094
|
const A = P ? `?essstoken=${P}` : "", me = `/${k}/${y ?? 1920}/${S ?? 1080}` + A;
|
|
2095
2095
|
console.log(`请求信令服务器: ${C}instance${me}`);
|
|
2096
|
-
const Er = await
|
|
2096
|
+
const Er = await v.promise(fetch(`${C}instance${me}`, { method: "GET" })), V = await v.promise(Er.json());
|
|
2097
2097
|
if (V && V.status !== "ok") {
|
|
2098
2098
|
r.setStatus("Error"), r.setStatusLog(`信令服务器请求失败 ${V.status}`), this._reconnectEvent.emit(void 0);
|
|
2099
2099
|
return;
|
|
2100
2100
|
} else {
|
|
2101
|
-
console.log(`信令服务器请求成功! ${JSON.stringify(V, void 0, " ")}`), await
|
|
2101
|
+
console.log(`信令服务器请求成功! ${JSON.stringify(V, void 0, " ")}`), await bn(2e3);
|
|
2102
2102
|
const { server: Sr, esmsg: Tr, instanceId: xr, useInternalSignallingServer: Rr } = V;
|
|
2103
2103
|
if (!xr) {
|
|
2104
2104
|
r.setStatus("Error"), r.setStatusLog("检查信令服务器版本,返回数据错误! "), console.log("信令服务器返回数据错误!不包含instanceId!请升级到 ESSS V3.0+ 版本!"), this._reconnectEvent.emit(void 0);
|
|
2105
2105
|
return;
|
|
2106
2106
|
}
|
|
2107
|
-
|
|
2107
|
+
f = Sr, d = Tr, h = Rr ?? !1, r.esssResponse = V;
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
|
-
const u = this.dv(h ? new so(l,
|
|
2110
|
+
const u = this.dv(h ? new so(l, f, d, r) : new Os(l, f, d, r));
|
|
2111
2111
|
this.d(() => r.viewer = void 0), this.d(u.errorEvent.don((y) => {
|
|
2112
2112
|
const S = `[${y}]:像素流连接错误!`;
|
|
2113
2113
|
r.setStatus("Error"), r.setStatusLog(S), this._reconnectEvent.emit(u);
|
|
2114
|
-
})), await
|
|
2114
|
+
})), await v.promise(new Promise((y) => this.d(u.readyEvent.donce(y)))), r.setStatus("Created"), r.setStatusLog("云渲染视口创建成功!"), s = 0, o && clearTimeout(o), o = void 0;
|
|
2115
2115
|
const { offsetWidth: g, offsetHeight: w } = l;
|
|
2116
|
-
u.resize(g * window.devicePixelRatio, w * window.devicePixelRatio), r.viewer = u, this.d(() => r.viewer = void 0), this.dv(new
|
|
2116
|
+
u.resize(g * window.devicePixelRatio, w * window.devicePixelRatio), r.viewer = u, this.d(() => r.viewer = void 0), this.dv(new fo(r, u));
|
|
2117
2117
|
}));
|
|
2118
|
-
a.start(), this.d(this._reconnectEvent.don((
|
|
2119
|
-
o === void 0 && (
|
|
2118
|
+
a.start(), this.d(this._reconnectEvent.don((v) => {
|
|
2119
|
+
o === void 0 && (v && !v.isDestroyed() && v.destroy(), r.viewer && !r.viewer.isDestroyed() && r.viewer.destroy(), r.viewer = void 0, r.autoReconnect && (r.setStatus("Reconnecting"), r.setStatusLog("正在尝试重新连接..."), s = s + 5e3 > 3e4 ? 3e4 : s + 5e3, console.warn(`间隔:${s / 1e3}s,正在尝试重新连接...`), o = window.setTimeout(() => {
|
|
2120
2120
|
a.restart();
|
|
2121
2121
|
}, s)));
|
|
2122
|
-
})), this.d(a.errorEvent.don((
|
|
2123
|
-
r.setStatus("Error"), r.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!",
|
|
2122
|
+
})), this.d(a.errorEvent.don((v) => {
|
|
2123
|
+
r.setStatus("Error"), r.setStatusLog("云渲染视口创建失败!"), console.warn("云渲染视口创建失败!", v), this._reconnectEvent.emit(void 0);
|
|
2124
2124
|
}));
|
|
2125
2125
|
} else if (n(i.options, "project")) {
|
|
2126
|
-
const l = i, a = l.options.project,
|
|
2126
|
+
const l = i, a = l.options.project, v = l.options.baseUrl;
|
|
2127
2127
|
r.setStatus("Creating"), r.setStatusLog("下载编译中...");
|
|
2128
|
-
const
|
|
2129
|
-
r.viewer =
|
|
2128
|
+
const f = this.dv(new uo(t, a, v, r));
|
|
2129
|
+
r.viewer = f, this.d(() => r.viewer = void 0);
|
|
2130
2130
|
} else
|
|
2131
2131
|
r.setStatus("Error"), r.setStatusLog("视口创建失败!"), console.warn("视口创建失败: 参数错误!");
|
|
2132
2132
|
}
|
|
@@ -2431,7 +2431,7 @@ const K = class K extends Se {
|
|
|
2431
2431
|
console.warn("GetStatus:viewer is undefined");
|
|
2432
2432
|
return;
|
|
2433
2433
|
}
|
|
2434
|
-
return await
|
|
2434
|
+
return await Js(this.viewer);
|
|
2435
2435
|
}
|
|
2436
2436
|
/**
|
|
2437
2437
|
* 获取场景中可替换的材质列表
|
|
@@ -2617,14 +2617,14 @@ const K = class K extends Se {
|
|
|
2617
2617
|
return this.viewer ? await ps(this.viewer, t, i) : void 0;
|
|
2618
2618
|
}
|
|
2619
2619
|
async capture(t = 64, i = 64) {
|
|
2620
|
-
return this.viewer ? await
|
|
2620
|
+
return this.viewer ? await fs(this.viewer, t, i) : void 0;
|
|
2621
2621
|
}
|
|
2622
2622
|
async partialCapture(t, i = [64, 64]) {
|
|
2623
2623
|
if (!this.viewer) {
|
|
2624
2624
|
console.warn("partialCapture:viewer is undefined");
|
|
2625
2625
|
return;
|
|
2626
2626
|
}
|
|
2627
|
-
return await
|
|
2627
|
+
return await vs(this.viewer, t, i);
|
|
2628
2628
|
}
|
|
2629
2629
|
async lonLatAltToScreenPosition(t) {
|
|
2630
2630
|
if (!this.viewer) return;
|
|
@@ -2641,7 +2641,7 @@ const K = class K extends Se {
|
|
|
2641
2641
|
const n = t.combinationClass ? t.getMainClass() : t;
|
|
2642
2642
|
if (!n || !this.viewer || i == null) return;
|
|
2643
2643
|
const s = Array.isArray(i) ? [...i] : [i];
|
|
2644
|
-
return n.editingID = `${r.callSource}_${B()}`, await
|
|
2644
|
+
return n.editingID = `${r.callSource}_${B()}`, await bs(this.viewer, n.id, n.editingID, s, r.useKeyToSwitch);
|
|
2645
2645
|
}
|
|
2646
2646
|
async stopEditing() {
|
|
2647
2647
|
if (this.viewer)
|
|
@@ -2664,7 +2664,7 @@ const K = class K extends Se {
|
|
|
2664
2664
|
}
|
|
2665
2665
|
};
|
|
2666
2666
|
p(K, "type", K.register("ESUeViewer", K)), p(K, "defaults", { ...Zn });
|
|
2667
|
-
let
|
|
2667
|
+
let J = K;
|
|
2668
2668
|
((c) => {
|
|
2669
2669
|
c.createDefaultProps = () => ({
|
|
2670
2670
|
...Se.createDefaultProps(),
|
|
@@ -2683,9 +2683,9 @@ let b = K;
|
|
|
2683
2683
|
speechRecognitionListening: void 0,
|
|
2684
2684
|
customMessageListening: void 0
|
|
2685
2685
|
});
|
|
2686
|
-
})(
|
|
2687
|
-
Gn(
|
|
2688
|
-
class dt extends
|
|
2686
|
+
})(J || (J = {}));
|
|
2687
|
+
Gn(J.prototype, J.createDefaultProps);
|
|
2688
|
+
class dt extends b {
|
|
2689
2689
|
constructor(e, t) {
|
|
2690
2690
|
super(e, t);
|
|
2691
2691
|
const i = t.viewer;
|
|
@@ -2710,7 +2710,7 @@ class dt extends J {
|
|
|
2710
2710
|
};
|
|
2711
2711
|
w(), this.d(u.don(w));
|
|
2712
2712
|
}
|
|
2713
|
-
const
|
|
2713
|
+
const v = () => {
|
|
2714
2714
|
i.callUeFunc({
|
|
2715
2715
|
f: "update",
|
|
2716
2716
|
p: {
|
|
@@ -2718,8 +2718,8 @@ class dt extends J {
|
|
|
2718
2718
|
...l.val
|
|
2719
2719
|
}
|
|
2720
2720
|
}), l.val = {};
|
|
2721
|
-
},
|
|
2722
|
-
this.d(
|
|
2721
|
+
}, f = this.dv(R(...a));
|
|
2722
|
+
this.d(f.don(v)), this.d(e.createdEvent.don(v)), this.d(e.flushEvent.don(() => f.flush()));
|
|
2723
2723
|
})), !e.combinationClass)) {
|
|
2724
2724
|
let r = !1;
|
|
2725
2725
|
this.d(() => {
|
|
@@ -2792,14 +2792,14 @@ class I extends _ {
|
|
|
2792
2792
|
setTimeout(r, 0);
|
|
2793
2793
|
})), this.d(e.smoothMoveEvent.don((l, a) => {
|
|
2794
2794
|
Be(i, e.id, l, a);
|
|
2795
|
-
})), this.d(e.smoothMoveWithRotationEvent.don((l, a,
|
|
2796
|
-
Pe(i, e.id, l, a,
|
|
2797
|
-
})), this.d(e.smoothMoveOnGroundEvent.don((l, a,
|
|
2798
|
-
ke(i, e.id, l, a,
|
|
2799
|
-
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((l, a,
|
|
2800
|
-
De(i, e.id, l, a,
|
|
2795
|
+
})), this.d(e.smoothMoveWithRotationEvent.don((l, a, v) => {
|
|
2796
|
+
Pe(i, e.id, l, a, v);
|
|
2797
|
+
})), this.d(e.smoothMoveOnGroundEvent.don((l, a, v, f) => {
|
|
2798
|
+
ke(i, e.id, l, a, f, v);
|
|
2799
|
+
})), this.d(e.smoothMoveWithRotationOnGroundEvent.don((l, a, v, f, d) => {
|
|
2800
|
+
De(i, e.id, l, a, v, f, d);
|
|
2801
2801
|
})), this.d(e.smoothMoveKeepPitchEvent.don(async (l, a) => {
|
|
2802
|
-
const
|
|
2802
|
+
const v = await i.callUeFunc({
|
|
2803
2803
|
f: "SmoothMoveKeepPitch",
|
|
2804
2804
|
p: {
|
|
2805
2805
|
id: e.id,
|
|
@@ -2807,14 +2807,14 @@ class I extends _ {
|
|
|
2807
2807
|
Time: a
|
|
2808
2808
|
}
|
|
2809
2809
|
});
|
|
2810
|
-
|
|
2810
|
+
v.error && console.error("SmoothMoveKeepPitch:", v.error);
|
|
2811
2811
|
})), this.d(e.automaticLandingEvent.don((l) => {
|
|
2812
2812
|
const a = [e.position[0], e.position[1]];
|
|
2813
|
-
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((
|
|
2814
|
-
|
|
2813
|
+
t.getHeightByLonLat(e.position[0], e.position[1], "Visibility").then((v) => {
|
|
2814
|
+
v !== null && (e.position = [...a, v], e.collision = l);
|
|
2815
2815
|
});
|
|
2816
2816
|
}));
|
|
2817
|
-
const s = async (l, a,
|
|
2817
|
+
const s = async (l, a, v, f) => {
|
|
2818
2818
|
const { viewer: d } = l;
|
|
2819
2819
|
if (!d) {
|
|
2820
2820
|
console.error("SmoothMoveRelatively: ueViewer.viewer is undefined");
|
|
@@ -2822,14 +2822,14 @@ class I extends _ {
|
|
|
2822
2822
|
}
|
|
2823
2823
|
const h = await d.callUeFunc({
|
|
2824
2824
|
f: "SmoothMoveRelatively",
|
|
2825
|
-
p: { id: a, RelativePosition:
|
|
2825
|
+
p: { id: a, RelativePosition: v, Time: f }
|
|
2826
2826
|
});
|
|
2827
2827
|
return h.error && console.error("SmoothMoveRelatively:", h.error), h;
|
|
2828
2828
|
};
|
|
2829
2829
|
this.d(e.smoothMoveRelativelyEvent.don((l, a) => {
|
|
2830
2830
|
s(t, e.id, l, a);
|
|
2831
2831
|
}));
|
|
2832
|
-
const o = async (l, a,
|
|
2832
|
+
const o = async (l, a, v, f, d) => {
|
|
2833
2833
|
const { viewer: h } = l;
|
|
2834
2834
|
if (!h) {
|
|
2835
2835
|
console.error("SmoothMoveRelativelyWithRotation: ueViewer.viewer is undefined");
|
|
@@ -2837,12 +2837,12 @@ class I extends _ {
|
|
|
2837
2837
|
}
|
|
2838
2838
|
const u = await h.callUeFunc({
|
|
2839
2839
|
f: "SmoothMoveRelativelyWithRotation",
|
|
2840
|
-
p: { id: a, RelativePosition:
|
|
2840
|
+
p: { id: a, RelativePosition: v, NewRotation: f, Time: d }
|
|
2841
2841
|
});
|
|
2842
2842
|
return u.error && console.error("SmoothMoveRelativelyWithRotation:", u.error), u;
|
|
2843
2843
|
};
|
|
2844
|
-
this.d(e.smoothMoveRelativelyWithRotationEvent.don((l, a,
|
|
2845
|
-
o(t, e.id, l, a,
|
|
2844
|
+
this.d(e.smoothMoveRelativelyWithRotationEvent.don((l, a, v) => {
|
|
2845
|
+
o(t, e.id, l, a, v);
|
|
2846
2846
|
}));
|
|
2847
2847
|
}
|
|
2848
2848
|
}
|
|
@@ -2930,7 +2930,7 @@ const Xe = (c) => {
|
|
|
2930
2930
|
default:
|
|
2931
2931
|
return "未知错误";
|
|
2932
2932
|
}
|
|
2933
|
-
}, ut = class ut extends
|
|
2933
|
+
}, ut = class ut extends b {
|
|
2934
2934
|
constructor(t, i) {
|
|
2935
2935
|
super(t, i);
|
|
2936
2936
|
p(this, "_styleColor", this.dv($([])));
|
|
@@ -2988,7 +2988,7 @@ const Xe = (c) => {
|
|
|
2988
2988
|
o(), this.d(l.don(o)), Reflect.has(t, "colorMode") && this.d(t.colorModeChanged.don(() => o()));
|
|
2989
2989
|
const a = this.dv($(void 0));
|
|
2990
2990
|
{
|
|
2991
|
-
const
|
|
2991
|
+
const f = this.dv(R(
|
|
2992
2992
|
t.actorTagChanged,
|
|
2993
2993
|
t.urlChanged
|
|
2994
2994
|
)), d = () => {
|
|
@@ -3000,14 +3000,14 @@ const Xe = (c) => {
|
|
|
3000
3000
|
url: t.url
|
|
3001
3001
|
} : a.value = void 0, t.editing = !1;
|
|
3002
3002
|
};
|
|
3003
|
-
d(), this.d(
|
|
3003
|
+
d(), this.d(f.don(d));
|
|
3004
3004
|
}
|
|
3005
|
-
const
|
|
3006
|
-
const { id:
|
|
3005
|
+
const v = async () => {
|
|
3006
|
+
const { id: f } = t;
|
|
3007
3007
|
if (n !== void 0) {
|
|
3008
3008
|
n = void 0;
|
|
3009
3009
|
try {
|
|
3010
|
-
const d = await i.unBind3DTilesetById(
|
|
3010
|
+
const d = await i.unBind3DTilesetById(f);
|
|
3011
3011
|
if (!d) return;
|
|
3012
3012
|
if (d.error !== "") {
|
|
3013
3013
|
console.warn(`UeES3DTileset UnBind3DTilesetById: ${d.error}`);
|
|
@@ -3021,7 +3021,7 @@ const Xe = (c) => {
|
|
|
3021
3021
|
if (s !== void 0) {
|
|
3022
3022
|
s = void 0;
|
|
3023
3023
|
try {
|
|
3024
|
-
const d = await r.callUeFunc({ f: "destroy", p: { id:
|
|
3024
|
+
const d = await r.callUeFunc({ f: "destroy", p: { id: f } });
|
|
3025
3025
|
if (!d) return;
|
|
3026
3026
|
if (d.error !== "") {
|
|
3027
3027
|
console.warn(`UeES3DTileset Destroy: ${d.error}`);
|
|
@@ -3034,17 +3034,17 @@ const Xe = (c) => {
|
|
|
3034
3034
|
}
|
|
3035
3035
|
};
|
|
3036
3036
|
this.d(() => {
|
|
3037
|
-
|
|
3037
|
+
v();
|
|
3038
3038
|
});
|
|
3039
3039
|
{
|
|
3040
|
-
const
|
|
3040
|
+
const f = this.dv(xe(async (h) => {
|
|
3041
3041
|
if (a.value === void 0) {
|
|
3042
|
-
await h.promise(
|
|
3042
|
+
await h.promise(v());
|
|
3043
3043
|
return;
|
|
3044
3044
|
}
|
|
3045
3045
|
if (a.value.type === "ActorTag") {
|
|
3046
3046
|
const { actorTag: u } = a.value;
|
|
3047
|
-
if (n !== u && await h.promise(
|
|
3047
|
+
if (n !== u && await h.promise(v()), n !== void 0 || u === void 0) return;
|
|
3048
3048
|
try {
|
|
3049
3049
|
n = u;
|
|
3050
3050
|
const g = await h.promise(i.bind3DTilesetByTag(t.id, u));
|
|
@@ -3066,7 +3066,7 @@ const Xe = (c) => {
|
|
|
3066
3066
|
}
|
|
3067
3067
|
} else if (a.value.type === "CreatedUrl") {
|
|
3068
3068
|
const { url: u } = a.value;
|
|
3069
|
-
if (u !== s && await
|
|
3069
|
+
if (u !== s && await v(), s !== void 0 || u === void 0) return;
|
|
3070
3070
|
try {
|
|
3071
3071
|
s = u;
|
|
3072
3072
|
const g = await h.promise(r.callUeFunc({
|
|
@@ -3088,35 +3088,35 @@ const Xe = (c) => {
|
|
|
3088
3088
|
}
|
|
3089
3089
|
await h.promise(o());
|
|
3090
3090
|
})), d = async () => {
|
|
3091
|
-
|
|
3091
|
+
f.restart();
|
|
3092
3092
|
};
|
|
3093
3093
|
d(), this.d(a.changed.don(d));
|
|
3094
3094
|
}
|
|
3095
3095
|
this.d(t.refreshTilesetEvent.don(() => {
|
|
3096
3096
|
qn(r, t.id);
|
|
3097
|
-
})), this.d(t.flyToEvent.don(async (
|
|
3097
|
+
})), this.d(t.flyToEvent.don(async (f, d) => {
|
|
3098
3098
|
if (!n && !s) return;
|
|
3099
|
-
const h = await ye(r, t.id,
|
|
3099
|
+
const h = await ye(r, t.id, f);
|
|
3100
3100
|
let u = "over";
|
|
3101
3101
|
h === void 0 ? u = "error" : h.endType === 0 ? u = "over" : h.endType === 1 && (u = "cancelled"), t.flyOverEvent.emit(d, u, i);
|
|
3102
3102
|
})), this.d(t.calcFlyToParamEvent.don(() => {
|
|
3103
3103
|
!n && !s || lt(r, t.id);
|
|
3104
3104
|
})), this.d(t.calcFlyInParamEvent.don(async () => {
|
|
3105
3105
|
if (!n && !s || !i.actived) return;
|
|
3106
|
-
const
|
|
3107
|
-
if (!
|
|
3108
|
-
const { position: d, rotation: h } =
|
|
3106
|
+
const f = await i.getCurrentCameraInfo();
|
|
3107
|
+
if (!f) return;
|
|
3108
|
+
const { position: d, rotation: h } = f;
|
|
3109
3109
|
t.flyInParam = { position: d, rotation: h, flyDuration: 1 };
|
|
3110
|
-
})), this.d(i.propChanged.don((
|
|
3111
|
-
!n && !s ||
|
|
3112
|
-
const h =
|
|
3110
|
+
})), this.d(i.propChanged.don((f) => {
|
|
3111
|
+
!n && !s || f.objId === t.id && Object.keys(f.props).forEach((d) => {
|
|
3112
|
+
const h = f.props[d] === null ? void 0 : f.props[d];
|
|
3113
3113
|
t[d] = h;
|
|
3114
3114
|
});
|
|
3115
|
-
})), this.d(i.objectEvent.don((
|
|
3116
|
-
!n && !s ||
|
|
3115
|
+
})), this.d(i.objectEvent.don((f) => {
|
|
3116
|
+
!n && !s || f.id !== t.id || f.type !== "3DTilesetReady" || t.tilesetReady.emit(f.p);
|
|
3117
3117
|
}));
|
|
3118
3118
|
{
|
|
3119
|
-
const
|
|
3119
|
+
const f = async (g, w) => {
|
|
3120
3120
|
if (!n && !s) return;
|
|
3121
3121
|
const y = await r.callUeFunc({
|
|
3122
3122
|
f: "SetFeatureColor",
|
|
@@ -3159,7 +3159,7 @@ const Xe = (c) => {
|
|
|
3159
3159
|
};
|
|
3160
3160
|
this.d(t.setFeatureColorEvent.don((g, w) => {
|
|
3161
3161
|
const y = [...this.styleColor, ...w];
|
|
3162
|
-
this.styleColor = [...y],
|
|
3162
|
+
this.styleColor = [...y], f(g, y);
|
|
3163
3163
|
})), this.d(t.setFeatureVisableEvent.don((g, w) => {
|
|
3164
3164
|
const y = [...this.styleVisable, ...w];
|
|
3165
3165
|
this.styleVisable = [...y], d(g, y);
|
|
@@ -3170,7 +3170,7 @@ const Xe = (c) => {
|
|
|
3170
3170
|
}));
|
|
3171
3171
|
}
|
|
3172
3172
|
{
|
|
3173
|
-
const
|
|
3173
|
+
const f = async () => {
|
|
3174
3174
|
if (!n && !s) {
|
|
3175
3175
|
t._featureTableResultEvent.emit(void 0);
|
|
3176
3176
|
return;
|
|
@@ -3186,11 +3186,11 @@ const Xe = (c) => {
|
|
|
3186
3186
|
}
|
|
3187
3187
|
};
|
|
3188
3188
|
this.d(t.getFeatureTableEvent.don(() => {
|
|
3189
|
-
|
|
3189
|
+
f();
|
|
3190
3190
|
}));
|
|
3191
3191
|
}
|
|
3192
3192
|
{
|
|
3193
|
-
const
|
|
3193
|
+
const f = async () => {
|
|
3194
3194
|
if (!n && !s) {
|
|
3195
3195
|
t.getMaterialNameListEvent.emit(void 0);
|
|
3196
3196
|
return;
|
|
@@ -3206,7 +3206,7 @@ const Xe = (c) => {
|
|
|
3206
3206
|
}
|
|
3207
3207
|
};
|
|
3208
3208
|
this.ad(t.getMaterialNameListEvent.don((d) => {
|
|
3209
|
-
d == "start" &&
|
|
3209
|
+
d == "start" && f();
|
|
3210
3210
|
}));
|
|
3211
3211
|
}
|
|
3212
3212
|
}
|
|
@@ -3240,7 +3240,7 @@ const Ye = (c) => {
|
|
|
3240
3240
|
default:
|
|
3241
3241
|
return "未知错误";
|
|
3242
3242
|
}
|
|
3243
|
-
}, ht = class ht extends
|
|
3243
|
+
}, ht = class ht extends b {
|
|
3244
3244
|
constructor(e, t) {
|
|
3245
3245
|
super(e, t);
|
|
3246
3246
|
const i = t.viewer;
|
|
@@ -3249,9 +3249,9 @@ const Ye = (c) => {
|
|
|
3249
3249
|
return;
|
|
3250
3250
|
}
|
|
3251
3251
|
let r, n;
|
|
3252
|
-
const s = this.dv($(void 0)), o = this.ad(
|
|
3252
|
+
const s = this.dv($(void 0)), o = this.ad(Je(""));
|
|
3253
3253
|
{
|
|
3254
|
-
const
|
|
3254
|
+
const f = () => {
|
|
3255
3255
|
if (typeof e.url == "string")
|
|
3256
3256
|
o.value = E.context.getStrFromEnv(e.url);
|
|
3257
3257
|
else {
|
|
@@ -3259,14 +3259,14 @@ const Ye = (c) => {
|
|
|
3259
3259
|
d.url = E.context.getStrFromEnv(d.url), o.value = d;
|
|
3260
3260
|
}
|
|
3261
3261
|
};
|
|
3262
|
-
|
|
3262
|
+
f(), this.ad(e.urlChanged.don(f));
|
|
3263
3263
|
}
|
|
3264
3264
|
const l = async () => {
|
|
3265
3265
|
if (!r && !n) return;
|
|
3266
|
-
let
|
|
3267
|
-
if (
|
|
3268
|
-
const d = E.getSceneObject(
|
|
3269
|
-
|
|
3266
|
+
let f = e.targetID ?? G.defaults.targetID;
|
|
3267
|
+
if (f && f != "") {
|
|
3268
|
+
const d = E.getSceneObject(f);
|
|
3269
|
+
f = d ? d.getMainClass().id : f;
|
|
3270
3270
|
}
|
|
3271
3271
|
await i.callUeFunc({
|
|
3272
3272
|
f: "update",
|
|
@@ -3283,7 +3283,7 @@ const Ye = (c) => {
|
|
|
3283
3283
|
maximumLevel: e.maximumLevel ?? G.defaults.maximumLevel,
|
|
3284
3284
|
minimumLevel: e.minimumLevel ?? G.defaults.minimumLevel,
|
|
3285
3285
|
options: e.options ?? G.defaults.options,
|
|
3286
|
-
targetID:
|
|
3286
|
+
targetID: f,
|
|
3287
3287
|
opacity: e.opacity ?? G.defaults.opacity,
|
|
3288
3288
|
splitDirection: e.splitDirection ?? G.defaults.splitDirection
|
|
3289
3289
|
}
|
|
@@ -3305,12 +3305,12 @@ const Ye = (c) => {
|
|
|
3305
3305
|
e.splitDirectionChanged
|
|
3306
3306
|
));
|
|
3307
3307
|
this.d(a.don(l));
|
|
3308
|
-
const
|
|
3309
|
-
const { id:
|
|
3308
|
+
const v = async () => {
|
|
3309
|
+
const { id: f } = e;
|
|
3310
3310
|
if (r !== void 0) {
|
|
3311
3311
|
r = void 0;
|
|
3312
3312
|
try {
|
|
3313
|
-
const d = await t.unBindImageryById(
|
|
3313
|
+
const d = await t.unBindImageryById(f);
|
|
3314
3314
|
if (!d) return;
|
|
3315
3315
|
if (d.error !== "") {
|
|
3316
3316
|
console.warn(`UeESImageryLayer UnImageryByID: ${d.error}`);
|
|
@@ -3324,7 +3324,7 @@ const Ye = (c) => {
|
|
|
3324
3324
|
if (n !== void 0) {
|
|
3325
3325
|
n = void 0;
|
|
3326
3326
|
try {
|
|
3327
|
-
const d = await i.callUeFunc({ f: "destroy", p: { id:
|
|
3327
|
+
const d = await i.callUeFunc({ f: "destroy", p: { id: f, test: "UeESImageryLayer" } });
|
|
3328
3328
|
if (!d) return;
|
|
3329
3329
|
if (d.error !== "") {
|
|
3330
3330
|
console.warn(`UeESImageryLayer Destroy: ${d.error}`);
|
|
@@ -3337,17 +3337,17 @@ const Ye = (c) => {
|
|
|
3337
3337
|
}
|
|
3338
3338
|
};
|
|
3339
3339
|
this.d(() => {
|
|
3340
|
-
|
|
3340
|
+
v();
|
|
3341
3341
|
});
|
|
3342
3342
|
{
|
|
3343
|
-
const
|
|
3343
|
+
const f = this.dv(xe(async (h) => {
|
|
3344
3344
|
if (s.value === void 0) {
|
|
3345
|
-
await h.promise(
|
|
3345
|
+
await h.promise(v());
|
|
3346
3346
|
return;
|
|
3347
3347
|
}
|
|
3348
3348
|
if (s.value.type === "ActorTag") {
|
|
3349
3349
|
const { actorTag: u, componentTag: g } = s.value;
|
|
3350
|
-
if (r !== u && await h.promise(
|
|
3350
|
+
if (r !== u && await h.promise(v()), r !== void 0 || u === void 0) return;
|
|
3351
3351
|
try {
|
|
3352
3352
|
r = u;
|
|
3353
3353
|
const w = await h.promise(t.bindImageryByTag(e.id, u, g));
|
|
@@ -3369,7 +3369,7 @@ const Ye = (c) => {
|
|
|
3369
3369
|
}
|
|
3370
3370
|
} else if (s.value.type === "CreatedUrl") {
|
|
3371
3371
|
const { url: u } = s.value;
|
|
3372
|
-
if (u !== n && await h.promise(
|
|
3372
|
+
if (u !== n && await h.promise(v()), n !== void 0 || u === void 0) return;
|
|
3373
3373
|
try {
|
|
3374
3374
|
n = u;
|
|
3375
3375
|
const g = await h.promise(i.callUeFunc({
|
|
@@ -3391,12 +3391,12 @@ const Ye = (c) => {
|
|
|
3391
3391
|
}
|
|
3392
3392
|
await h.promise(l());
|
|
3393
3393
|
})), d = async () => {
|
|
3394
|
-
|
|
3394
|
+
f.restart();
|
|
3395
3395
|
};
|
|
3396
3396
|
d(), this.d(s.changed.don(d));
|
|
3397
3397
|
}
|
|
3398
3398
|
{
|
|
3399
|
-
const
|
|
3399
|
+
const f = this.dv(R(
|
|
3400
3400
|
e.actorTagChanged,
|
|
3401
3401
|
o.changed,
|
|
3402
3402
|
e.componentTagChanged
|
|
@@ -3410,30 +3410,30 @@ const Ye = (c) => {
|
|
|
3410
3410
|
url: o.value
|
|
3411
3411
|
} : s.value = void 0;
|
|
3412
3412
|
};
|
|
3413
|
-
d(), this.d(
|
|
3413
|
+
d(), this.d(f.don(d));
|
|
3414
3414
|
}
|
|
3415
|
-
this.d(e.flyToEvent.don(async (
|
|
3415
|
+
this.d(e.flyToEvent.don(async (f, d) => {
|
|
3416
3416
|
if (!r && !n) return;
|
|
3417
|
-
const h = await ye(i, e.id,
|
|
3417
|
+
const h = await ye(i, e.id, f);
|
|
3418
3418
|
let u = "over";
|
|
3419
3419
|
h === void 0 ? u = "error" : h.endType === 0 ? u = "over" : h.endType === 1 && (u = "cancelled"), e.flyOverEvent.emit(d, u, t);
|
|
3420
|
-
})), this.d(e.flyInEvent.don(async (
|
|
3420
|
+
})), this.d(e.flyInEvent.don(async (f, d) => {
|
|
3421
3421
|
var g, w;
|
|
3422
3422
|
if (!r && !n) return;
|
|
3423
|
-
const h = await Le(i, e.id, (g = e.flyInParam) == null ? void 0 : g.position, (w = e.flyInParam) == null ? void 0 : w.rotation,
|
|
3423
|
+
const h = await Le(i, e.id, (g = e.flyInParam) == null ? void 0 : g.position, (w = e.flyInParam) == null ? void 0 : w.rotation, f ?? 1);
|
|
3424
3424
|
let u = "over";
|
|
3425
3425
|
h === void 0 ? u = "error" : h.endType === 0 ? u = "over" : h.endType === 1 && (u = "cancelled"), e.flyOverEvent.emit(d, u, t);
|
|
3426
3426
|
})), this.d(e.calcFlyToParamEvent.don(() => {
|
|
3427
3427
|
!r && !n || lt(i, e.id);
|
|
3428
3428
|
})), this.d(e.calcFlyInParamEvent.don(async () => {
|
|
3429
3429
|
if (!t.actived) return;
|
|
3430
|
-
const
|
|
3431
|
-
if (!
|
|
3432
|
-
const { position: d, rotation: h } =
|
|
3430
|
+
const f = await t.getCurrentCameraInfo();
|
|
3431
|
+
if (!f) return;
|
|
3432
|
+
const { position: d, rotation: h } = f;
|
|
3433
3433
|
e.flyInParam = { position: d, rotation: h, flyDuration: 1 };
|
|
3434
|
-
})), this.d(t.propChanged.don((
|
|
3435
|
-
!r && !n ||
|
|
3436
|
-
const h =
|
|
3434
|
+
})), this.d(t.propChanged.don((f) => {
|
|
3435
|
+
!r && !n || f.objId === e.id && Object.keys(f.props).forEach((d) => {
|
|
3436
|
+
const h = f.props[d] === null ? void 0 : f.props[d];
|
|
3437
3437
|
e[d] = h;
|
|
3438
3438
|
});
|
|
3439
3439
|
}));
|
|
@@ -3469,7 +3469,7 @@ const pt = class pt extends I {
|
|
|
3469
3469
|
};
|
|
3470
3470
|
p(pt, "type", pt.register("ESUeViewer", Br.type, pt));
|
|
3471
3471
|
let Qe = pt;
|
|
3472
|
-
const
|
|
3472
|
+
const ft = class ft extends I {
|
|
3473
3473
|
constructor(e, t) {
|
|
3474
3474
|
if (super(e, t), !t.viewer) {
|
|
3475
3475
|
console.warn("viewer is undefined!");
|
|
@@ -3477,9 +3477,9 @@ const vt = class vt extends I {
|
|
|
3477
3477
|
}
|
|
3478
3478
|
}
|
|
3479
3479
|
};
|
|
3480
|
-
p(
|
|
3481
|
-
let Ve =
|
|
3482
|
-
const
|
|
3480
|
+
p(ft, "type", ft.register("ESUeViewer", _r.type, ft));
|
|
3481
|
+
let Ve = ft;
|
|
3482
|
+
const vt = class vt extends D {
|
|
3483
3483
|
constructor(e, t) {
|
|
3484
3484
|
if (super(e, t), !t.viewer) {
|
|
3485
3485
|
console.warn("viewer is undefined!");
|
|
@@ -3487,8 +3487,8 @@ const ft = class ft extends D {
|
|
|
3487
3487
|
}
|
|
3488
3488
|
}
|
|
3489
3489
|
};
|
|
3490
|
-
p(
|
|
3491
|
-
let M =
|
|
3490
|
+
p(vt, "type", vt.register("ESUeViewer", Mr.type, vt));
|
|
3491
|
+
let M = vt;
|
|
3492
3492
|
const gt = class gt extends M {
|
|
3493
3493
|
constructor(e, t) {
|
|
3494
3494
|
super(e, t);
|
|
@@ -3560,8 +3560,8 @@ const yt = class yt extends I {
|
|
|
3560
3560
|
return;
|
|
3561
3561
|
}
|
|
3562
3562
|
this.dispose(e.flyInEvent.don((r, n, s = "default") => {
|
|
3563
|
-
const { id: o, duration: l, position: a, rotation:
|
|
3564
|
-
Le(i, o, a,
|
|
3563
|
+
const { id: o, duration: l, position: a, rotation: v } = e;
|
|
3564
|
+
Le(i, o, a, v, l ?? r, s);
|
|
3565
3565
|
})), this.dispose(e.resetWithCurrentCameraEvent.don(() => {
|
|
3566
3566
|
Cr(i, e.id);
|
|
3567
3567
|
})), this.dispose(e.captureEvent.don((r, n) => {
|
|
@@ -3651,7 +3651,7 @@ const It = class It extends I {
|
|
|
3651
3651
|
console.warn("viewer is undefined!");
|
|
3652
3652
|
return;
|
|
3653
3653
|
}
|
|
3654
|
-
const r = this.ad(
|
|
3654
|
+
const r = this.ad(Je(""));
|
|
3655
3655
|
{
|
|
3656
3656
|
const o = () => {
|
|
3657
3657
|
if (typeof e.url == "string")
|
|
@@ -3706,7 +3706,7 @@ const St = class St extends D {
|
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
3708
|
};
|
|
3709
|
-
p(St, "type", St.register("ESUeViewer",
|
|
3709
|
+
p(St, "type", St.register("ESUeViewer", Jr.type, St));
|
|
3710
3710
|
let di = St;
|
|
3711
3711
|
const Tt = class Tt extends D {
|
|
3712
3712
|
constructor(e, t) {
|
|
@@ -3746,7 +3746,7 @@ const xt = class xt extends Ge {
|
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
3748
|
};
|
|
3749
|
-
p(xt, "type", xt.register("ESUeViewer",
|
|
3749
|
+
p(xt, "type", xt.register("ESUeViewer", br.type, xt));
|
|
3750
3750
|
let Ue = xt;
|
|
3751
3751
|
const Rt = class Rt extends Ue {
|
|
3752
3752
|
constructor(e, t) {
|
|
@@ -3808,7 +3808,7 @@ const kt = class kt extends _ {
|
|
|
3808
3808
|
console.warn("viewer is undefined!");
|
|
3809
3809
|
return;
|
|
3810
3810
|
}
|
|
3811
|
-
const r = this.ad(
|
|
3811
|
+
const r = this.ad(Je(""));
|
|
3812
3812
|
{
|
|
3813
3813
|
const o = () => {
|
|
3814
3814
|
if (typeof e.url == "string")
|
|
@@ -3849,14 +3849,14 @@ const kt = class kt extends _ {
|
|
|
3849
3849
|
}
|
|
3850
3850
|
};
|
|
3851
3851
|
p(kt, "type", kt.register("ESUeViewer", U.type, kt));
|
|
3852
|
-
let
|
|
3853
|
-
const Dt = class Dt extends
|
|
3852
|
+
let fi = kt;
|
|
3853
|
+
const Dt = class Dt extends b {
|
|
3854
3854
|
constructor(e, t) {
|
|
3855
3855
|
super(e, t), this.ad(new x(e.renderInUEChanged, () => e.renderInUE ? new yo(e, t) : new wo(e, t)));
|
|
3856
3856
|
}
|
|
3857
3857
|
};
|
|
3858
3858
|
p(Dt, "type", Dt.register("ESUeViewer", Fe.type, Dt));
|
|
3859
|
-
let
|
|
3859
|
+
let vi = Dt;
|
|
3860
3860
|
class wo extends m {
|
|
3861
3861
|
constructor(t, i) {
|
|
3862
3862
|
super();
|
|
@@ -3873,16 +3873,16 @@ class wo extends m {
|
|
|
3873
3873
|
if (!i.actived) return;
|
|
3874
3874
|
const l = await i.getCurrentCameraInfo();
|
|
3875
3875
|
if (!l) return;
|
|
3876
|
-
const { position: a, rotation:
|
|
3877
|
-
t.flyInParam = { position: a, rotation:
|
|
3876
|
+
const { position: a, rotation: v } = l;
|
|
3877
|
+
t.flyInParam = { position: a, rotation: v, flyDuration: 1 };
|
|
3878
3878
|
})), this.dispose(t.smoothMoveEvent.disposableOn((l, a) => {
|
|
3879
3879
|
Be(r, n.id, l, a);
|
|
3880
|
-
})), this.dispose(t.smoothMoveWithRotationEvent.disposableOn((l, a,
|
|
3881
|
-
Pe(r, n.id, l, a,
|
|
3882
|
-
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((l, a,
|
|
3883
|
-
ke(r, n.id, l, a,
|
|
3884
|
-
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((l, a,
|
|
3885
|
-
De(r, n.id, l, a,
|
|
3880
|
+
})), this.dispose(t.smoothMoveWithRotationEvent.disposableOn((l, a, v) => {
|
|
3881
|
+
Pe(r, n.id, l, a, v);
|
|
3882
|
+
})), this.dispose(t.smoothMoveOnGroundEvent.disposableOn((l, a, v, f) => {
|
|
3883
|
+
ke(r, n.id, l, a, f, v);
|
|
3884
|
+
})), this.dispose(t.smoothMoveWithRotationOnGroundEvent.disposableOn((l, a, v, f, d) => {
|
|
3885
|
+
De(r, n.id, l, a, v, f, d);
|
|
3886
3886
|
})), this.dispose(t.flyToEvent.disposableOn((l, a) => {
|
|
3887
3887
|
n.flyTo(l);
|
|
3888
3888
|
})), this.dispose(t.flyInEvent.don((l) => {
|
|
@@ -3894,13 +3894,13 @@ class wo extends m {
|
|
|
3894
3894
|
const l = this.disposeVar(He()), a = () => {
|
|
3895
3895
|
t.show ? l.restart(void 0, async () => {
|
|
3896
3896
|
if (!t.position) return;
|
|
3897
|
-
const
|
|
3897
|
+
const v = await i.lonLatAltToScreenPosition(t.position);
|
|
3898
3898
|
if (!this.isDestroyed())
|
|
3899
|
-
if (!
|
|
3899
|
+
if (!v)
|
|
3900
3900
|
this._screenPosition.value = void 0;
|
|
3901
3901
|
else {
|
|
3902
|
-
const [
|
|
3903
|
-
|
|
3902
|
+
const [f, d] = v;
|
|
3903
|
+
f === -1 && d === -1 ? this._screenPosition.value = void 0 : this._screenPosition.value = [f, d];
|
|
3904
3904
|
}
|
|
3905
3905
|
}) : l.cancel();
|
|
3906
3906
|
};
|
|
@@ -3959,12 +3959,12 @@ class wo extends m {
|
|
|
3959
3959
|
}, a = () => {
|
|
3960
3960
|
try {
|
|
3961
3961
|
t.instanceClass ? o.instanceClass = l() : o.instanceClass = void 0;
|
|
3962
|
-
} catch (
|
|
3963
|
-
console.error(
|
|
3962
|
+
} catch (f) {
|
|
3963
|
+
console.error(f);
|
|
3964
3964
|
}
|
|
3965
3965
|
};
|
|
3966
3966
|
a();
|
|
3967
|
-
const
|
|
3967
|
+
const v = this.dv(R(
|
|
3968
3968
|
t.instanceClassChanged,
|
|
3969
3969
|
t.opacityChanged,
|
|
3970
3970
|
t.anchorChanged,
|
|
@@ -3972,7 +3972,7 @@ class wo extends m {
|
|
|
3972
3972
|
t.showChanged,
|
|
3973
3973
|
t.allowPickingChanged
|
|
3974
3974
|
));
|
|
3975
|
-
this.d(
|
|
3975
|
+
this.d(v.don(a));
|
|
3976
3976
|
}
|
|
3977
3977
|
}
|
|
3978
3978
|
get screenPosition() {
|
|
@@ -4004,32 +4004,32 @@ class yo extends m {
|
|
|
4004
4004
|
if (!r) return;
|
|
4005
4005
|
if (!t.instanceClass)
|
|
4006
4006
|
throw new Error("!sceneObject.instanceClass");
|
|
4007
|
-
const a = document.createElement("div"),
|
|
4008
|
-
if (
|
|
4009
|
-
document.body.appendChild(
|
|
4010
|
-
let d =
|
|
4007
|
+
const a = document.createElement("div"), v = this.dv(new t.instanceClass(a, t, i))._container;
|
|
4008
|
+
if (v.style.opacity = t.opacity.toString() ?? Fe.defaults.opacity, v.style.position = "fixed", v.style.zIndex = "-1", v.style.top = "0px", !document.body.contains(v)) {
|
|
4009
|
+
document.body.appendChild(v);
|
|
4010
|
+
let d = v ? v.querySelectorAll("*[class]") : [];
|
|
4011
4011
|
for (let h = 0; h < d.length; h++) {
|
|
4012
4012
|
const u = d[h];
|
|
4013
|
-
var
|
|
4013
|
+
var f = u.getBoundingClientRect();
|
|
4014
4014
|
this._hasClassDivAndPos[u.className] = [
|
|
4015
4015
|
u.offsetLeft,
|
|
4016
4016
|
u.offsetTop,
|
|
4017
|
-
u.offsetLeft +
|
|
4018
|
-
u.offsetTop +
|
|
4017
|
+
u.offsetLeft + f.width,
|
|
4018
|
+
u.offsetTop + f.height
|
|
4019
4019
|
];
|
|
4020
4020
|
}
|
|
4021
4021
|
}
|
|
4022
|
-
Yn(
|
|
4022
|
+
Yn(v, {
|
|
4023
4023
|
backgroundColor: null,
|
|
4024
4024
|
allowTaint: !0,
|
|
4025
4025
|
useCORS: !0,
|
|
4026
|
-
width:
|
|
4027
|
-
height:
|
|
4026
|
+
width: v.offsetWidth,
|
|
4027
|
+
height: v.offsetHeight,
|
|
4028
4028
|
scale: 1
|
|
4029
4029
|
}).then((d) => {
|
|
4030
|
-
document.body.contains(
|
|
4030
|
+
document.body.contains(v) && document.body.removeChild(v), n.url = d.toDataURL(), n.show = t.show;
|
|
4031
4031
|
}).catch(() => {
|
|
4032
|
-
document.body.contains(
|
|
4032
|
+
document.body.contains(v) && document.body.removeChild(v);
|
|
4033
4033
|
});
|
|
4034
4034
|
}, o = () => {
|
|
4035
4035
|
try {
|
|
@@ -4057,9 +4057,9 @@ class yo extends m {
|
|
|
4057
4057
|
if (s.objId !== this._imageLabel.id) return;
|
|
4058
4058
|
const { type: o, add: l } = s;
|
|
4059
4059
|
if (o === "leftClick" && l) {
|
|
4060
|
-
const a = (l == null ? void 0 : l.classNames) ?? [],
|
|
4061
|
-
for (let
|
|
4062
|
-
const d = f
|
|
4060
|
+
const a = (l == null ? void 0 : l.classNames) ?? [], v = Object.keys(this._hasClassDivAndPos);
|
|
4061
|
+
for (let f = 0; f < v.length; f++) {
|
|
4062
|
+
const d = v[f];
|
|
4063
4063
|
let h = this._hasClassDivAndPos[d];
|
|
4064
4064
|
l && l.mouseRelativePos && l.mouseRelativePos[0] >= h[0] && l.mouseRelativePos[0] <= h[2] && l.mouseRelativePos[1] >= h[1] && l.mouseRelativePos[1] <= h[3] && a.push(d);
|
|
4065
4065
|
}
|
|
@@ -4079,8 +4079,8 @@ class yo extends m {
|
|
|
4079
4079
|
Pe(r, n.id, s, o, l);
|
|
4080
4080
|
})), this.d(t.smoothMoveOnGroundEvent.don((s, o, l, a) => {
|
|
4081
4081
|
ke(r, n.id, s, o, a, l);
|
|
4082
|
-
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, l, a,
|
|
4083
|
-
De(r, n.id, s, o, l, a,
|
|
4082
|
+
})), this.d(t.smoothMoveWithRotationOnGroundEvent.don((s, o, l, a, v) => {
|
|
4083
|
+
De(r, n.id, s, o, l, a, v);
|
|
4084
4084
|
})), this.d(t.flyToEvent.don((s, o) => {
|
|
4085
4085
|
n.flyTo(s);
|
|
4086
4086
|
})), this.d(t.flyInEvent.don((s) => {
|
|
@@ -4196,16 +4196,16 @@ const At = class At extends I {
|
|
|
4196
4196
|
return;
|
|
4197
4197
|
}
|
|
4198
4198
|
const r = async (s, o, l, a) => {
|
|
4199
|
-
const { viewer:
|
|
4200
|
-
if (!
|
|
4199
|
+
const { viewer: v } = s;
|
|
4200
|
+
if (!v) {
|
|
4201
4201
|
console.error("AIMoveTo: ueViewer.viewer is undefined");
|
|
4202
4202
|
return;
|
|
4203
4203
|
}
|
|
4204
|
-
const
|
|
4204
|
+
const f = await v.callUeFunc({
|
|
4205
4205
|
f: "AIMoveTo",
|
|
4206
4206
|
p: { id: o, Destination: l, Time: a }
|
|
4207
4207
|
});
|
|
4208
|
-
return
|
|
4208
|
+
return f.error && console.error("AIMoveTo:", f.error), f;
|
|
4209
4209
|
};
|
|
4210
4210
|
this.d(e.aiMoveToEvent.don((s, o) => {
|
|
4211
4211
|
r(t, e.id, s, o);
|
|
@@ -4286,7 +4286,7 @@ const Ht = class Ht extends Ge {
|
|
|
4286
4286
|
};
|
|
4287
4287
|
p(Ht, "type", Ht.register("ESUeViewer", sn.type, Ht));
|
|
4288
4288
|
let xi = Ht;
|
|
4289
|
-
const
|
|
4289
|
+
const Jt = class Jt extends I {
|
|
4290
4290
|
constructor(e, t) {
|
|
4291
4291
|
if (super(e, t), !t.viewer) {
|
|
4292
4292
|
console.warn("viewer is undefined!");
|
|
@@ -4294,9 +4294,9 @@ const bt = class bt extends I {
|
|
|
4294
4294
|
}
|
|
4295
4295
|
}
|
|
4296
4296
|
};
|
|
4297
|
-
p(
|
|
4298
|
-
let Ri =
|
|
4299
|
-
const
|
|
4297
|
+
p(Jt, "type", Jt.register("ESUeViewer", on.type, Jt));
|
|
4298
|
+
let Ri = Jt;
|
|
4299
|
+
const bt = class bt extends I {
|
|
4300
4300
|
constructor(e, t) {
|
|
4301
4301
|
if (super(e, t), !t.viewer) {
|
|
4302
4302
|
console.warn("viewer is undefined!");
|
|
@@ -4304,8 +4304,8 @@ const Jt = class Jt extends I {
|
|
|
4304
4304
|
}
|
|
4305
4305
|
}
|
|
4306
4306
|
};
|
|
4307
|
-
p(
|
|
4308
|
-
let Li =
|
|
4307
|
+
p(bt, "type", bt.register("ESUeViewer", an.type, bt));
|
|
4308
|
+
let Li = bt;
|
|
4309
4309
|
const Gt = class Gt extends D {
|
|
4310
4310
|
constructor(e, t) {
|
|
4311
4311
|
if (super(e, t), !t.viewer) {
|
|
@@ -4402,7 +4402,7 @@ const q = class q extends _ {
|
|
|
4402
4402
|
}
|
|
4403
4403
|
}
|
|
4404
4404
|
};
|
|
4405
|
-
p(q, "type", q.register("ESUeViewer",
|
|
4405
|
+
p(q, "type", q.register("ESUeViewer", fn.type, q)), p(q, "forceUeUpdateProps", [
|
|
4406
4406
|
..._.forceUeUpdateProps,
|
|
4407
4407
|
"url"
|
|
4408
4408
|
]), p(q, "propValFuncs", {
|
|
@@ -4418,7 +4418,7 @@ const Qt = class Qt extends D {
|
|
|
4418
4418
|
}
|
|
4419
4419
|
}
|
|
4420
4420
|
};
|
|
4421
|
-
p(Qt, "type", Qt.register("ESUeViewer",
|
|
4421
|
+
p(Qt, "type", Qt.register("ESUeViewer", vn.type, Qt));
|
|
4422
4422
|
let Wi = Qt;
|
|
4423
4423
|
const rt = class rt extends M {
|
|
4424
4424
|
constructor(e, t) {
|
|
@@ -4467,23 +4467,23 @@ const Ot = class Ot extends dt {
|
|
|
4467
4467
|
let l = [255, 255, 255, 1];
|
|
4468
4468
|
if (o.startsWith("#")) {
|
|
4469
4469
|
if (o.length === 4) {
|
|
4470
|
-
let a = parseInt(o[1] + o[1], 16),
|
|
4471
|
-
l = [a,
|
|
4470
|
+
let a = parseInt(o[1] + o[1], 16), v = parseInt(o[2] + o[2], 16), f = parseInt(o[3] + o[3], 16);
|
|
4471
|
+
l = [a, v, f, 1];
|
|
4472
4472
|
} else if (o.length === 7) {
|
|
4473
|
-
let a = parseInt(o.substring(1, 3), 16),
|
|
4474
|
-
l = [a,
|
|
4473
|
+
let a = parseInt(o.substring(1, 3), 16), v = parseInt(o.substring(3, 5), 16), f = parseInt(o.substring(5, 7), 16);
|
|
4474
|
+
l = [a, v, f, 1];
|
|
4475
4475
|
}
|
|
4476
4476
|
} else if (o.startsWith("rgba")) {
|
|
4477
4477
|
let a = o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);
|
|
4478
4478
|
if (a) {
|
|
4479
|
-
let
|
|
4480
|
-
l = [
|
|
4479
|
+
let v = parseInt(a[1]), f = parseInt(a[2]), d = parseInt(a[3]), h = parseFloat(a[4]);
|
|
4480
|
+
l = [v, f, d, h];
|
|
4481
4481
|
}
|
|
4482
4482
|
} else if (o.startsWith("rgb")) {
|
|
4483
4483
|
let a = o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
|
4484
4484
|
if (a) {
|
|
4485
|
-
let
|
|
4486
|
-
l = [
|
|
4485
|
+
let v = parseInt(a[1]), f = parseInt(a[2]), d = parseInt(a[3]);
|
|
4486
|
+
l = [v, f, d, 1];
|
|
4487
4487
|
}
|
|
4488
4488
|
} else
|
|
4489
4489
|
console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");
|
|
@@ -4493,7 +4493,7 @@ const Ot = class Ot extends dt {
|
|
|
4493
4493
|
if (!o) return;
|
|
4494
4494
|
const l = [];
|
|
4495
4495
|
o.forEach((a) => {
|
|
4496
|
-
o.filter((
|
|
4496
|
+
o.filter((f) => f.dataset == a.dataset).length == 1 ? l.push({
|
|
4497
4497
|
condition: [{
|
|
4498
4498
|
field: "dataset",
|
|
4499
4499
|
op: "==",
|
|
@@ -4586,7 +4586,7 @@ const ee = class ee extends M {
|
|
|
4586
4586
|
}
|
|
4587
4587
|
};
|
|
4588
4588
|
p(ee, "type", ee.register("ESUeViewer", xn.type, ee));
|
|
4589
|
-
let
|
|
4589
|
+
let Ji = ee;
|
|
4590
4590
|
const ie = class ie extends M {
|
|
4591
4591
|
constructor(e, t) {
|
|
4592
4592
|
super(e, t);
|
|
@@ -4606,7 +4606,7 @@ const ie = class ie extends M {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
};
|
|
4608
4608
|
p(ie, "type", ie.register("ESUeViewer", Rn.type, ie));
|
|
4609
|
-
let
|
|
4609
|
+
let bi = ie;
|
|
4610
4610
|
const re = class re extends N {
|
|
4611
4611
|
constructor(e, t) {
|
|
4612
4612
|
if (super(e, t), !t.viewer) {
|
|
@@ -4662,7 +4662,7 @@ const Xi = (c) => {
|
|
|
4662
4662
|
default:
|
|
4663
4663
|
return "未知错误";
|
|
4664
4664
|
}
|
|
4665
|
-
}, ne = class ne extends
|
|
4665
|
+
}, ne = class ne extends b {
|
|
4666
4666
|
constructor(e, t) {
|
|
4667
4667
|
super(e, t);
|
|
4668
4668
|
const i = t.viewer;
|
|
@@ -4713,7 +4713,7 @@ const Xi = (c) => {
|
|
|
4713
4713
|
position: e.position
|
|
4714
4714
|
}
|
|
4715
4715
|
}), (t.debug ?? !1) && console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`));
|
|
4716
|
-
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1,
|
|
4716
|
+
}, a = () => !s && !o ? (console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`), !0) : !1, v = async () => {
|
|
4717
4717
|
const { id: d } = e, h = await t.unBindActorByID(d);
|
|
4718
4718
|
h && h.error !== "" && console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${h.error}`), s = void 0;
|
|
4719
4719
|
const u = await i.callUeFunc({ f: "destroy", p: { id: d } });
|
|
@@ -4722,7 +4722,7 @@ const Xi = (c) => {
|
|
|
4722
4722
|
return;
|
|
4723
4723
|
}
|
|
4724
4724
|
o = void 0;
|
|
4725
|
-
},
|
|
4725
|
+
}, f = this.dv($({
|
|
4726
4726
|
type: "ActorClass",
|
|
4727
4727
|
actorClass: "default"
|
|
4728
4728
|
}));
|
|
@@ -4732,11 +4732,11 @@ const Xi = (c) => {
|
|
|
4732
4732
|
e.actorTagChanged
|
|
4733
4733
|
// sceneObject.positionChanged,
|
|
4734
4734
|
)), h = async () => {
|
|
4735
|
-
e.actorTag !== "" ?
|
|
4735
|
+
e.actorTag !== "" ? f.value = {
|
|
4736
4736
|
type: "ActorTag",
|
|
4737
4737
|
actorTag: e.actorTag
|
|
4738
4738
|
// position: sceneObject.position,
|
|
4739
|
-
} :
|
|
4739
|
+
} : f.value = {
|
|
4740
4740
|
type: "ActorClass",
|
|
4741
4741
|
actorClass: e.actorClass === "" ? "default" : e.actorClass
|
|
4742
4742
|
// position: sceneObject.position,
|
|
@@ -4746,9 +4746,9 @@ const Xi = (c) => {
|
|
|
4746
4746
|
}
|
|
4747
4747
|
{
|
|
4748
4748
|
const d = this.dv(xe(async (u) => {
|
|
4749
|
-
if (await u.promise(
|
|
4750
|
-
const { actorTag: g } =
|
|
4751
|
-
await u.promise(
|
|
4749
|
+
if (await u.promise(v()), f.value.type === "ActorTag") {
|
|
4750
|
+
const { actorTag: g } = f.value;
|
|
4751
|
+
await u.promise(v());
|
|
4752
4752
|
try {
|
|
4753
4753
|
e.lastActorStatus = "null";
|
|
4754
4754
|
const w = await u.promise(t.bindActorByTag(e.id, g));
|
|
@@ -4769,8 +4769,8 @@ const Xi = (c) => {
|
|
|
4769
4769
|
console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${g}, ${w}`);
|
|
4770
4770
|
return;
|
|
4771
4771
|
}
|
|
4772
|
-
} else if (
|
|
4773
|
-
const { actorClass: g } =
|
|
4772
|
+
} else if (f.value.type === "ActorClass") {
|
|
4773
|
+
const { actorClass: g } = f.value;
|
|
4774
4774
|
try {
|
|
4775
4775
|
const w = await u.promise(t.createActorByClass(e.id, g));
|
|
4776
4776
|
if (!w) return;
|
|
@@ -4793,7 +4793,7 @@ const Xi = (c) => {
|
|
|
4793
4793
|
})), h = async () => {
|
|
4794
4794
|
d.restart();
|
|
4795
4795
|
};
|
|
4796
|
-
h(), this.d(
|
|
4796
|
+
h(), this.d(f.changed.don(h));
|
|
4797
4797
|
}
|
|
4798
4798
|
this.d(e.positionChanged.don(l)), this.d(e.callFunctionEvent.don(async (d, h) => {
|
|
4799
4799
|
if (a()) {
|
|
@@ -4909,7 +4909,7 @@ p(st, "type", st.register("ESUeViewer", Mn.type, st)), p(st, "propValFuncs", {
|
|
|
4909
4909
|
info: (e) => JSON.stringify(e ?? {})
|
|
4910
4910
|
});
|
|
4911
4911
|
let Oi = st;
|
|
4912
|
-
const le = class le extends
|
|
4912
|
+
const le = class le extends b {
|
|
4913
4913
|
constructor(e, t) {
|
|
4914
4914
|
if (super(e, t), !t.viewer) {
|
|
4915
4915
|
console.warn("viewer is undefined!");
|
|
@@ -4925,7 +4925,7 @@ const le = class le extends J {
|
|
|
4925
4925
|
p(le, "type", le.register("ESUeViewer", $n.type, le));
|
|
4926
4926
|
let ji = le;
|
|
4927
4927
|
E.context.getStrFromEnv(j.defaults.imgUrl);
|
|
4928
|
-
const ce = class ce extends
|
|
4928
|
+
const ce = class ce extends b {
|
|
4929
4929
|
constructor(e, t) {
|
|
4930
4930
|
if (super(e, t), !t.viewer) {
|
|
4931
4931
|
console.warn("viewer is undefined!");
|
|
@@ -4961,18 +4961,18 @@ const ce = class ce extends J {
|
|
|
4961
4961
|
d(), e.dispose(e.cssPositionChanged.disposableOn(d));
|
|
4962
4962
|
}
|
|
4963
4963
|
a.style.transition = " right 0.4s linear", a.style.cursor = "pointer";
|
|
4964
|
-
const
|
|
4965
|
-
a.appendChild(
|
|
4966
|
-
const
|
|
4967
|
-
|
|
4964
|
+
const v = document.createElement("div");
|
|
4965
|
+
a.appendChild(v), this.dispose(() => a.removeChild(v)), v.style.width = "100%", v.style.height = "100%", v.style.position = "relative";
|
|
4966
|
+
const f = document.createElement("img");
|
|
4967
|
+
v.appendChild(f), this.dispose(() => v.removeChild(f)), f.style.width = "100%", f.style.height = "100%", f.style.border = "none";
|
|
4968
4968
|
{
|
|
4969
|
-
const d = () =>
|
|
4969
|
+
const d = () => f.src = e.imgUrl;
|
|
4970
4970
|
d(), e.dispose(e.imgUrlChanged.disposableOn(d));
|
|
4971
4971
|
}
|
|
4972
4972
|
{
|
|
4973
4973
|
const d = () => {
|
|
4974
4974
|
const w = -t.getCurrentCameraInfo().rotation[0];
|
|
4975
|
-
|
|
4975
|
+
f.style.transform = `rotate(${w}deg)`;
|
|
4976
4976
|
};
|
|
4977
4977
|
let h;
|
|
4978
4978
|
const u = async () => {
|
|
@@ -4982,7 +4982,7 @@ const ce = class ce extends J {
|
|
|
4982
4982
|
};
|
|
4983
4983
|
this.dispose(e.showChanged.disposableOn(u)), u(), this.dispose(() => clearInterval(h));
|
|
4984
4984
|
}
|
|
4985
|
-
|
|
4985
|
+
f.style.transformOrigin = "50% 50%";
|
|
4986
4986
|
}
|
|
4987
4987
|
};
|
|
4988
4988
|
}
|
|
@@ -5026,7 +5026,7 @@ async function Co(c) {
|
|
|
5026
5026
|
console.log("复制失败");
|
|
5027
5027
|
});
|
|
5028
5028
|
}
|
|
5029
|
-
const ue = class ue extends
|
|
5029
|
+
const ue = class ue extends b {
|
|
5030
5030
|
constructor(e, t) {
|
|
5031
5031
|
if (super(e, t), !t.viewer) {
|
|
5032
5032
|
console.warn("viewer is undefined!");
|
|
@@ -5035,18 +5035,18 @@ const ue = class ue extends J {
|
|
|
5035
5035
|
const r = this.disposeVar(new ze());
|
|
5036
5036
|
t.add(r), this.dispose(() => t.delete(r)), r.instanceClass = class extends m {
|
|
5037
5037
|
constructor(s, o, l) {
|
|
5038
|
-
if (super(), this._subContainer = s, !l || !(l instanceof
|
|
5038
|
+
if (super(), this._subContainer = s, !l || !(l instanceof J)) return;
|
|
5039
5039
|
const a = document.createElement("div");
|
|
5040
5040
|
this._subContainer.appendChild(a), this.dispose(() => this._subContainer.removeChild(a)), a.style.width = "100%", a.style.position = "absolute", a.style.height = `${W.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 = `${W.defaults.height}px`, a.style.zIndex = "100", a.style.alignContent = "center", a.style.justifyContent = "space-between";
|
|
5041
|
-
const f = document.createElement("span");
|
|
5042
|
-
a.appendChild(f), this.dispose(() => a.removeChild(f));
|
|
5043
5041
|
const v = document.createElement("span");
|
|
5044
|
-
|
|
5042
|
+
a.appendChild(v), this.dispose(() => a.removeChild(v));
|
|
5043
|
+
const f = document.createElement("span");
|
|
5044
|
+
v.appendChild(f), this.dispose(() => v.removeChild(f));
|
|
5045
5045
|
const d = document.createElement("span");
|
|
5046
|
-
|
|
5046
|
+
v.appendChild(d), d.addEventListener("dblclick", function() {
|
|
5047
5047
|
let u = d.innerHTML;
|
|
5048
5048
|
u.startsWith("鼠标位置") && (u = u.slice(5)), Co(u);
|
|
5049
|
-
}), d.style.cursor = "pointer", this.dispose(() =>
|
|
5049
|
+
}), d.style.cursor = "pointer", this.dispose(() => v.removeChild(d));
|
|
5050
5050
|
const h = document.createElement("span");
|
|
5051
5051
|
a.appendChild(h), this.dispose(() => a.removeChild(h));
|
|
5052
5052
|
{
|
|
@@ -5075,9 +5075,9 @@ const ue = class ue extends J {
|
|
|
5075
5075
|
{
|
|
5076
5076
|
const u = () => {
|
|
5077
5077
|
let y = "", S = "";
|
|
5078
|
-
y += `帧率:${l.getFPS().toFixed(0)}FPS`,
|
|
5078
|
+
y += `帧率:${l.getFPS().toFixed(0)}FPS`, f.innerText = y;
|
|
5079
5079
|
const C = t.getCurrentCameraInfo();
|
|
5080
|
-
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)}° `,
|
|
5080
|
+
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)}° `, f.innerText = y, t.pick().then((k) => {
|
|
5081
5081
|
if (k) {
|
|
5082
5082
|
const { pickResult: P } = k;
|
|
5083
5083
|
if (P && P.position) {
|
|
@@ -5175,7 +5175,7 @@ const pe = class pe extends dt {
|
|
|
5175
5175
|
};
|
|
5176
5176
|
p(pe, "type", pe.register("ESUeViewer", Un.type, pe));
|
|
5177
5177
|
let nr = pe;
|
|
5178
|
-
const
|
|
5178
|
+
const fe = class fe extends dt {
|
|
5179
5179
|
constructor(e, t) {
|
|
5180
5180
|
if (super(e, t), !t.viewer) {
|
|
5181
5181
|
console.warn("viewer is undefined!");
|
|
@@ -5183,9 +5183,9 @@ const ve = class ve extends dt {
|
|
|
5183
5183
|
}
|
|
5184
5184
|
}
|
|
5185
5185
|
};
|
|
5186
|
-
p(
|
|
5187
|
-
let sr =
|
|
5188
|
-
const
|
|
5186
|
+
p(fe, "type", fe.register("ESUeViewer", Nn.type, fe));
|
|
5187
|
+
let sr = fe;
|
|
5188
|
+
const ve = class ve extends M {
|
|
5189
5189
|
constructor(e, t) {
|
|
5190
5190
|
super(e, t);
|
|
5191
5191
|
const i = t.viewer;
|
|
@@ -5211,8 +5211,8 @@ const fe = class fe extends M {
|
|
|
5211
5211
|
this.dispose(n.disposableOn(r)), this.dispose(e.createdEvent.disposableOn(r));
|
|
5212
5212
|
}
|
|
5213
5213
|
};
|
|
5214
|
-
p(
|
|
5215
|
-
let or =
|
|
5214
|
+
p(ve, "type", ve.register("ESUeViewer", Ce.type, ve));
|
|
5215
|
+
let or = ve;
|
|
5216
5216
|
const ge = class ge extends I {
|
|
5217
5217
|
constructor(e, t) {
|
|
5218
5218
|
if (super(e, t), !t.viewer) {
|
|
@@ -5251,7 +5251,7 @@ const we = class we extends D {
|
|
|
5251
5251
|
p(we, "type", we.register("ESUeViewer", Hn.type, we));
|
|
5252
5252
|
let dr = we, $e;
|
|
5253
5253
|
try {
|
|
5254
|
-
const c = "earthsdk3-ue", e = "3.
|
|
5254
|
+
const c = "earthsdk3-ue", e = "3.4.0-beta.1", t = "2025-08-09T03:50:17.000Z", i = "北京西部世界科技有限公司", r = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "1531dd57505d7ebc358ef15c59f7523bf5f8f80a", o = ((Date.now() - 1754711417e3) / 36e5).toFixed(1), l = `%c🌏 ${c}%c ${e}.${n.slice(0, 8)}.${t} (距今${o}个小时)
|
|
5255
5255
|
%c${r ? r + `
|
|
5256
5256
|
` : ""}当前网站正在使用${c},此软件版权归${i}所有
|
|
5257
5257
|
`;
|
|
@@ -5265,7 +5265,7 @@ try {
|
|
|
5265
5265
|
},
|
|
5266
5266
|
// @ts-ignore
|
|
5267
5267
|
get gituri() {
|
|
5268
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
5268
|
+
return GITURI_ && GITURI_.replace("${commitId}", "1531dd57505d7ebc358ef15c59f7523bf5f8f80a");
|
|
5269
5269
|
},
|
|
5270
5270
|
// @ts-ignore
|
|
5271
5271
|
get info() {
|
|
@@ -5273,7 +5273,7 @@ try {
|
|
|
5273
5273
|
},
|
|
5274
5274
|
// @ts-ignore
|
|
5275
5275
|
get date() {
|
|
5276
|
-
return "2025-08-
|
|
5276
|
+
return "2025-08-09T03:50:17.000Z";
|
|
5277
5277
|
},
|
|
5278
5278
|
// @ts-ignore
|
|
5279
5279
|
get author() {
|
|
@@ -5281,7 +5281,7 @@ try {
|
|
|
5281
5281
|
},
|
|
5282
5282
|
// @ts-ignore
|
|
5283
5283
|
get version() {
|
|
5284
|
-
return "3.
|
|
5284
|
+
return "3.4.0-beta.1";
|
|
5285
5285
|
},
|
|
5286
5286
|
// @ts-ignore
|
|
5287
5287
|
get name() {
|
|
@@ -5289,7 +5289,7 @@ try {
|
|
|
5289
5289
|
},
|
|
5290
5290
|
// @ts-ignore
|
|
5291
5291
|
get commitId() {
|
|
5292
|
-
return "
|
|
5292
|
+
return "1531dd57505d7ebc358ef15c59f7523bf5f8f80a";
|
|
5293
5293
|
},
|
|
5294
5294
|
print(a = !1) {
|
|
5295
5295
|
!a && window._xe2_no_copy_print || console.info(
|
|
@@ -5320,7 +5320,7 @@ try {
|
|
|
5320
5320
|
} catch {
|
|
5321
5321
|
}
|
|
5322
5322
|
export {
|
|
5323
|
-
|
|
5323
|
+
J as ESUeViewer,
|
|
5324
5324
|
yo as GeoDivFromESImageLabel,
|
|
5325
5325
|
wo as GeoDivFromESTextLabel,
|
|
5326
5326
|
is as HighlightFeatureAndFlyToCallFunc,
|
|
@@ -5347,9 +5347,9 @@ export {
|
|
|
5347
5347
|
ui as UeESEntityCluster,
|
|
5348
5348
|
hi as UeESExcavate,
|
|
5349
5349
|
pi as UeESFireParticleSystem,
|
|
5350
|
-
|
|
5350
|
+
fi as UeESForestTileset,
|
|
5351
5351
|
rr as UeESGaussianSplatting,
|
|
5352
|
-
|
|
5352
|
+
vi as UeESGeoDiv,
|
|
5353
5353
|
or as UeESGeoExtrudedPolygon,
|
|
5354
5354
|
gi as UeESGeoJson,
|
|
5355
5355
|
Ne as UeESGeoLineString,
|
|
@@ -5394,8 +5394,8 @@ export {
|
|
|
5394
5394
|
dr as UeESSkylineAnalysis,
|
|
5395
5395
|
ar as UeESStaticMesh,
|
|
5396
5396
|
Hi as UeESSubmergingAnalysis,
|
|
5397
|
-
|
|
5398
|
-
|
|
5397
|
+
Ji as UeESSunshineAnalysis,
|
|
5398
|
+
bi as UeESSurfaceAreaMeasurement,
|
|
5399
5399
|
qe as UeESTerrainLayer,
|
|
5400
5400
|
Gi as UeESTextLabel,
|
|
5401
5401
|
Ki as UeESUEWidget,
|
|
@@ -5412,7 +5412,7 @@ export {
|
|
|
5412
5412
|
Ms as bindImageryByTagCallFunc,
|
|
5413
5413
|
lt as calcFlyToParamCallFunc,
|
|
5414
5414
|
Fr as callFunctionCallFunc,
|
|
5415
|
-
|
|
5415
|
+
fs as captureCallFunc,
|
|
5416
5416
|
H as changeNavigationModeCallFunc,
|
|
5417
5417
|
$e as copyright,
|
|
5418
5418
|
ks as createActorByClassCallFunc,
|
|
@@ -5432,14 +5432,14 @@ export {
|
|
|
5432
5432
|
As as getIdByComponentNameAndHitItemCallFunc,
|
|
5433
5433
|
gs as getLonLatAltToScreenPositionCallFunc,
|
|
5434
5434
|
Ts as getObjectByInfoCallFunc,
|
|
5435
|
-
|
|
5435
|
+
Js as getStatusCallFunc,
|
|
5436
5436
|
Is as getStrokeMaterialParamInfoCallFunc,
|
|
5437
5437
|
Xs as getTilesetMaterialIDListCallFunc,
|
|
5438
5438
|
ms as getVersionCallFunc,
|
|
5439
5439
|
zs as highlightActorByTagCallFunc,
|
|
5440
5440
|
jn as mountPakFiles,
|
|
5441
5441
|
Ks as moveObjectsCallFunc,
|
|
5442
|
-
|
|
5442
|
+
vs as partialCaptureCallFunc,
|
|
5443
5443
|
cs as pickCallFunc,
|
|
5444
5444
|
us as pickPositionCallFunc,
|
|
5445
5445
|
ls as quitCallFunc,
|
|
@@ -5456,7 +5456,7 @@ export {
|
|
|
5456
5456
|
ke as smoothMoveOnGroundCallFunc,
|
|
5457
5457
|
Pe as smoothMoveWithRotationCallFunc,
|
|
5458
5458
|
De as smoothMoveWithRotationOnGroundCallFunc,
|
|
5459
|
-
|
|
5459
|
+
bs as startEditingCallFunc,
|
|
5460
5460
|
Vn as startVoiceCallFunc,
|
|
5461
5461
|
Gs as stopEditingCallFunc,
|
|
5462
5462
|
On as stopVoiceCallFunc,
|