web3dlink 2.1.20 → 2.1.22
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/{createGameSession-BVx3-mqj.js → createGameSession-M-AH_bw5.js} +564 -414
- package/dist/createGameSession-M-AH_bw5.js.map +1 -0
- package/dist/{linkFlowLarkSR-O7Kbmw9h.js → linkFlowLarkSR-PjAxeKoE.js} +2 -2
- package/dist/{linkFlowLarkSR-O7Kbmw9h.js.map → linkFlowLarkSR-PjAxeKoE.js.map} +1 -1
- package/dist/{linkFlowzsStream-Fci2refj.js → linkFlowzsStream-BUld17Yw.js} +2 -2
- package/dist/{linkFlowzsStream-Fci2refj.js.map → linkFlowzsStream-BUld17Yw.js.map} +1 -1
- package/dist/web3dlink-larksr.js +2 -2
- package/dist/web3dlink-zs.js +2 -2
- package/dist/web3dlink.js +3 -3
- package/package.json +17 -1
- package/dist/createGameSession-BVx3-mqj.js.map +0 -1
|
@@ -2,9 +2,24 @@
|
|
|
2
2
|
//#region baseConfig/version.js
|
|
3
3
|
var e = {
|
|
4
4
|
name: "web3dlink",
|
|
5
|
-
version: "2.1.
|
|
5
|
+
version: "2.1.22",
|
|
6
6
|
description: "LarkSR / ZS 推流 GameAPI SDK",
|
|
7
|
-
releaseNotes: {
|
|
7
|
+
releaseNotes: {
|
|
8
|
+
"2.1.22": [
|
|
9
|
+
"sceneModel.offset 补齐 rotation/scale/translation 默认值 [0,0,0]",
|
|
10
|
+
"hydrodynamicForce.waterFlow 新增 rangeList 水深颜色配置",
|
|
11
|
+
"hydrodynamicForce.sediment 新增 rangeList 泥沙颜色配置",
|
|
12
|
+
"sceneModel.outline config.IsSolidMesh 默认值改为 true",
|
|
13
|
+
"sceneModel.setOpacity config.color 默认值改为 #1A80CCFF"
|
|
14
|
+
],
|
|
15
|
+
"2.1.21": [
|
|
16
|
+
"VTK 新增 setClipPlane 位置剖切、setClipPlaneByRatio 比例剖切",
|
|
17
|
+
"VTK setMode 新增 Contour、ContourMixed 模式",
|
|
18
|
+
"VTK API 拆分为单个加载 / 通用功能 / 动画三个模块"
|
|
19
|
+
],
|
|
20
|
+
"2.1.20": ["更新 zs-stream-parent(配合推流平台修复 streamId 重复,二次打开视频流导致首次页面流关闭的问题)"],
|
|
21
|
+
"2.1.19": ["新增 videoFusion 视频融合", "更新 zs-stream-parent(配合推流平台,修复第一人称 WASD 控制)"]
|
|
22
|
+
},
|
|
8
23
|
type: "module",
|
|
9
24
|
main: "./dist/web3dlink.js",
|
|
10
25
|
module: "./dist/web3dlink.js",
|
|
@@ -1230,14 +1245,14 @@ function k(e, t) {
|
|
|
1230
1245
|
let n = e.markerType || "default";
|
|
1231
1246
|
e.config ||= {};
|
|
1232
1247
|
let r = e.config;
|
|
1233
|
-
n === "flashIcon" ?
|
|
1248
|
+
n === "flashIcon" ? Ae(r, t) : n === "component" ? Ee(r, t) : n === "customCom" ? De(r, t) : n === "menuIcon" ? je(r, t) : n === "flood" ? Me(r, t) : n === "capture" ? Ne(r, t) : [
|
|
1234
1249
|
"anchor1",
|
|
1235
1250
|
"anchor2",
|
|
1236
1251
|
"anchor3",
|
|
1237
1252
|
"anchor4",
|
|
1238
1253
|
"anchor5",
|
|
1239
1254
|
"anchor6"
|
|
1240
|
-
].includes(n) ?
|
|
1255
|
+
].includes(n) ? ke(r, t) : n === "html" ? we(r, t) : n === "url" ? Te(r, t) : n === "lod" ? Ce(r, t) : Oe(r, t);
|
|
1241
1256
|
}
|
|
1242
1257
|
function Ce(e, t) {
|
|
1243
1258
|
if (D(e, "iconStyle", t), O(e, "textStyle", t), e.levels === void 0 || e.levels === null) {
|
|
@@ -1271,7 +1286,7 @@ function Ce(e, t) {
|
|
|
1271
1286
|
})), D(e, "iconStyle", t), O(e, "textStyle", t);
|
|
1272
1287
|
});
|
|
1273
1288
|
}
|
|
1274
|
-
function
|
|
1289
|
+
function we(e, t) {
|
|
1275
1290
|
if (t.push(...m({
|
|
1276
1291
|
normalized: e,
|
|
1277
1292
|
field: "scale",
|
|
@@ -1294,7 +1309,7 @@ function A(e, t) {
|
|
|
1294
1309
|
defaultValue: ""
|
|
1295
1310
|
}));
|
|
1296
1311
|
}
|
|
1297
|
-
function
|
|
1312
|
+
function Te(e, t) {
|
|
1298
1313
|
if (t.push(..._({
|
|
1299
1314
|
normalized: e,
|
|
1300
1315
|
field: "size",
|
|
@@ -1311,7 +1326,7 @@ function we(e, t) {
|
|
|
1311
1326
|
value: e.url
|
|
1312
1327
|
}));
|
|
1313
1328
|
}
|
|
1314
|
-
function
|
|
1329
|
+
function Ee(e, t) {
|
|
1315
1330
|
t.push(...y({
|
|
1316
1331
|
normalized: e,
|
|
1317
1332
|
field: "color",
|
|
@@ -1337,7 +1352,7 @@ function Te(e, t) {
|
|
|
1337
1352
|
value: e.value ?? ""
|
|
1338
1353
|
})) : [], O(e, "dataKeyStyle", t), O(e, "dataValueStyle", t);
|
|
1339
1354
|
}
|
|
1340
|
-
function
|
|
1355
|
+
function De(e, t) {
|
|
1341
1356
|
t.push(..._({
|
|
1342
1357
|
normalized: e,
|
|
1343
1358
|
field: "size",
|
|
@@ -1369,7 +1384,7 @@ function Ee(e, t) {
|
|
|
1369
1384
|
value: e.value ?? ""
|
|
1370
1385
|
})) : [], O(e, "dataKeyStyle", t), O(e, "dataValueStyle", t);
|
|
1371
1386
|
}
|
|
1372
|
-
function
|
|
1387
|
+
function Oe(e, t) {
|
|
1373
1388
|
t.push(...m({
|
|
1374
1389
|
normalized: e,
|
|
1375
1390
|
field: "scale",
|
|
@@ -1394,7 +1409,7 @@ function De(e, t) {
|
|
|
1394
1409
|
defaultValue: [0, 2147483647]
|
|
1395
1410
|
})), D(e, "iconStyle", t), O(e, "textStyle", t);
|
|
1396
1411
|
}
|
|
1397
|
-
function
|
|
1412
|
+
function ke(e, t) {
|
|
1398
1413
|
t.push(...m({
|
|
1399
1414
|
normalized: e,
|
|
1400
1415
|
field: "scale",
|
|
@@ -1423,7 +1438,7 @@ function Oe(e, t) {
|
|
|
1423
1438
|
value: e.color
|
|
1424
1439
|
})), O(e, "textStyle", t);
|
|
1425
1440
|
}
|
|
1426
|
-
function
|
|
1441
|
+
function Ae(e, t) {
|
|
1427
1442
|
t.push(...y({
|
|
1428
1443
|
normalized: e,
|
|
1429
1444
|
field: "baseColor",
|
|
@@ -1454,7 +1469,7 @@ function ke(e, t) {
|
|
|
1454
1469
|
min: 0
|
|
1455
1470
|
}));
|
|
1456
1471
|
}
|
|
1457
|
-
function
|
|
1472
|
+
function je(e, t) {
|
|
1458
1473
|
t.push(...y({
|
|
1459
1474
|
normalized: e,
|
|
1460
1475
|
field: "color",
|
|
@@ -1524,7 +1539,7 @@ function Ae(e, t) {
|
|
|
1524
1539
|
}));
|
|
1525
1540
|
});
|
|
1526
1541
|
}
|
|
1527
|
-
function
|
|
1542
|
+
function Me(e, t) {
|
|
1528
1543
|
t.push(...y({
|
|
1529
1544
|
normalized: e,
|
|
1530
1545
|
field: "color",
|
|
@@ -1547,7 +1562,7 @@ function je(e, t) {
|
|
|
1547
1562
|
defaultValue: ""
|
|
1548
1563
|
}));
|
|
1549
1564
|
}
|
|
1550
|
-
function
|
|
1565
|
+
function Ne(e, t) {
|
|
1551
1566
|
t.push(...y({
|
|
1552
1567
|
normalized: e,
|
|
1553
1568
|
field: "color",
|
|
@@ -1616,7 +1631,7 @@ function Me(e, t) {
|
|
|
1616
1631
|
min: 0
|
|
1617
1632
|
}));
|
|
1618
1633
|
}
|
|
1619
|
-
function
|
|
1634
|
+
function Pe(e, t) {
|
|
1620
1635
|
t.push(...m({
|
|
1621
1636
|
normalized: e,
|
|
1622
1637
|
field: "scale",
|
|
@@ -1660,14 +1675,14 @@ function Ne(e, t) {
|
|
|
1660
1675
|
value: e.value ?? ""
|
|
1661
1676
|
})) : [];
|
|
1662
1677
|
}
|
|
1663
|
-
var
|
|
1664
|
-
function
|
|
1678
|
+
var Fe = [0, 2147483647];
|
|
1679
|
+
function A(e, t, n, r = "visibleRange") {
|
|
1665
1680
|
n.push(..._({
|
|
1666
1681
|
normalized: t,
|
|
1667
1682
|
field: r,
|
|
1668
1683
|
value: e[r],
|
|
1669
1684
|
length: 2,
|
|
1670
|
-
defaultValue: [...
|
|
1685
|
+
defaultValue: [...Fe]
|
|
1671
1686
|
}));
|
|
1672
1687
|
let i = t[r];
|
|
1673
1688
|
if (!Array.isArray(i) || i.length !== 2) return;
|
|
@@ -1682,7 +1697,7 @@ function j(e, t, n, r = "visibleRange") {
|
|
|
1682
1697
|
}
|
|
1683
1698
|
t[r] = [a, o];
|
|
1684
1699
|
}
|
|
1685
|
-
var
|
|
1700
|
+
var j = [
|
|
1686
1701
|
"default",
|
|
1687
1702
|
"default1",
|
|
1688
1703
|
"default2",
|
|
@@ -1705,13 +1720,13 @@ var M = [
|
|
|
1705
1720
|
];
|
|
1706
1721
|
//#endregion
|
|
1707
1722
|
//#region api/marker/iconMarker.js
|
|
1708
|
-
function
|
|
1723
|
+
function Ie(e) {
|
|
1709
1724
|
let t = [], n = { ...e };
|
|
1710
1725
|
if (n.id = e.id === void 0 || e.id === null || e.id === "" ? E() : e.id, t.push(...f(e.coordinates)), t.push(...g({
|
|
1711
1726
|
normalized: n,
|
|
1712
1727
|
field: "groupId",
|
|
1713
1728
|
value: e.groupId
|
|
1714
|
-
})),
|
|
1729
|
+
})), A(e, n, t), t.push(...b({
|
|
1715
1730
|
normalized: n,
|
|
1716
1731
|
field: "isScreenSpace",
|
|
1717
1732
|
value: e.isScreenSpace,
|
|
@@ -1724,7 +1739,7 @@ function Fe(e) {
|
|
|
1724
1739
|
value: e.markerType,
|
|
1725
1740
|
defaultValue: "default",
|
|
1726
1741
|
type: "string",
|
|
1727
|
-
list:
|
|
1742
|
+
list: j
|
|
1728
1743
|
})), e.recordData !== void 0) {
|
|
1729
1744
|
let r = e.recordData;
|
|
1730
1745
|
if (typeof r != "object" || !r || Array.isArray(r)) t.push("[recordData] 必须是对象类型");
|
|
@@ -1741,7 +1756,7 @@ function Fe(e) {
|
|
|
1741
1756
|
}
|
|
1742
1757
|
//#endregion
|
|
1743
1758
|
//#region api/marker/followMarker.js
|
|
1744
|
-
function
|
|
1759
|
+
function Le(e) {
|
|
1745
1760
|
let t = [], n = { ...e };
|
|
1746
1761
|
if (n.id = e.id === void 0 || e.id === null || e.id === "" ? E() : e.id, t.push(...h({
|
|
1747
1762
|
normalized: n,
|
|
@@ -1751,7 +1766,7 @@ function Ie(e) {
|
|
|
1751
1766
|
normalized: n,
|
|
1752
1767
|
field: "groupId",
|
|
1753
1768
|
value: e.groupId
|
|
1754
|
-
})),
|
|
1769
|
+
})), A(e, n, t), t.push(...b({
|
|
1755
1770
|
normalized: n,
|
|
1756
1771
|
field: "isScreenSpace",
|
|
1757
1772
|
value: e.isScreenSpace,
|
|
@@ -1764,7 +1779,7 @@ function Ie(e) {
|
|
|
1764
1779
|
value: e.markerType,
|
|
1765
1780
|
defaultValue: "default",
|
|
1766
1781
|
type: "string",
|
|
1767
|
-
list:
|
|
1782
|
+
list: j
|
|
1768
1783
|
})), e.recordData !== void 0) {
|
|
1769
1784
|
let r = e.recordData;
|
|
1770
1785
|
if (typeof r != "object" || !r || Array.isArray(r)) t.push("[recordData] 必须是对象类型");
|
|
@@ -1781,7 +1796,7 @@ function Ie(e) {
|
|
|
1781
1796
|
}
|
|
1782
1797
|
//#endregion
|
|
1783
1798
|
//#region api/marker/removeMarker.js
|
|
1784
|
-
function
|
|
1799
|
+
function Re(e = {}) {
|
|
1785
1800
|
let t = [], n = { ...e };
|
|
1786
1801
|
return t.push(..._({
|
|
1787
1802
|
normalized: n,
|
|
@@ -1795,7 +1810,7 @@ function Le(e = {}) {
|
|
|
1795
1810
|
}
|
|
1796
1811
|
//#endregion
|
|
1797
1812
|
//#region api/marker/removeAllMarker.js
|
|
1798
|
-
function
|
|
1813
|
+
function ze(e) {
|
|
1799
1814
|
return {
|
|
1800
1815
|
errors: [],
|
|
1801
1816
|
normalized: { ...e }
|
|
@@ -1803,7 +1818,7 @@ function Re(e) {
|
|
|
1803
1818
|
}
|
|
1804
1819
|
//#endregion
|
|
1805
1820
|
//#region api/marker/showMarker.js
|
|
1806
|
-
function
|
|
1821
|
+
function Be(e = {}) {
|
|
1807
1822
|
let t = [], n = { ...e };
|
|
1808
1823
|
return t.push(..._({
|
|
1809
1824
|
normalized: n,
|
|
@@ -1817,7 +1832,7 @@ function ze(e = {}) {
|
|
|
1817
1832
|
}
|
|
1818
1833
|
//#endregion
|
|
1819
1834
|
//#region api/marker/showAllMarker.js
|
|
1820
|
-
function
|
|
1835
|
+
function Ve(e = {}) {
|
|
1821
1836
|
return {
|
|
1822
1837
|
errors: [],
|
|
1823
1838
|
normalized: { ...e }
|
|
@@ -1825,7 +1840,7 @@ function Be(e = {}) {
|
|
|
1825
1840
|
}
|
|
1826
1841
|
//#endregion
|
|
1827
1842
|
//#region api/marker/hideMarker.js
|
|
1828
|
-
function
|
|
1843
|
+
function He(e = {}) {
|
|
1829
1844
|
let t = [], n = { ...e };
|
|
1830
1845
|
return t.push(..._({
|
|
1831
1846
|
normalized: n,
|
|
@@ -1839,7 +1854,7 @@ function Ve(e = {}) {
|
|
|
1839
1854
|
}
|
|
1840
1855
|
//#endregion
|
|
1841
1856
|
//#region api/marker/hideAllMarker.js
|
|
1842
|
-
function
|
|
1857
|
+
function Ue(e = {}) {
|
|
1843
1858
|
return {
|
|
1844
1859
|
errors: [],
|
|
1845
1860
|
normalized: { ...e }
|
|
@@ -1847,7 +1862,7 @@ function He(e = {}) {
|
|
|
1847
1862
|
}
|
|
1848
1863
|
//#endregion
|
|
1849
1864
|
//#region api/marker/iconUrlMarker.js
|
|
1850
|
-
function
|
|
1865
|
+
function We(e = {}) {
|
|
1851
1866
|
let t = [], n = { ...e };
|
|
1852
1867
|
return t.push(...h({
|
|
1853
1868
|
normalized: n,
|
|
@@ -1860,7 +1875,7 @@ function Ue(e = {}) {
|
|
|
1860
1875
|
}
|
|
1861
1876
|
//#endregion
|
|
1862
1877
|
//#region api/marker/addClustering.js
|
|
1863
|
-
function
|
|
1878
|
+
function Ge(e) {
|
|
1864
1879
|
let t = [], n = { ...e };
|
|
1865
1880
|
t.push(...b({
|
|
1866
1881
|
normalized: n,
|
|
@@ -1908,7 +1923,7 @@ function We(e) {
|
|
|
1908
1923
|
}
|
|
1909
1924
|
//#endregion
|
|
1910
1925
|
//#region api/marker/removeClustering.js
|
|
1911
|
-
function
|
|
1926
|
+
function Ke(e) {
|
|
1912
1927
|
let t = [], n = { ...e };
|
|
1913
1928
|
return t.push(...b({
|
|
1914
1929
|
normalized: n,
|
|
@@ -1932,13 +1947,13 @@ function Ge(e) {
|
|
|
1932
1947
|
}
|
|
1933
1948
|
//#endregion
|
|
1934
1949
|
//#region api/marker/secondMarker.js
|
|
1935
|
-
function
|
|
1950
|
+
function qe(e) {
|
|
1936
1951
|
let t = [], n = { ...e };
|
|
1937
1952
|
n.id = e.id === void 0 || e.id === null || e.id === "" ? E() : e.id, t.push(...f(e.coordinates)), t.push(...g({
|
|
1938
1953
|
normalized: n,
|
|
1939
1954
|
field: "groupId",
|
|
1940
1955
|
value: e.groupId
|
|
1941
|
-
})),
|
|
1956
|
+
})), A(e, n, t), t.push(...b({
|
|
1942
1957
|
normalized: n,
|
|
1943
1958
|
field: "isScreenSpace",
|
|
1944
1959
|
value: e.isScreenSpace,
|
|
@@ -1975,7 +1990,7 @@ function Ke(e) {
|
|
|
1975
1990
|
field: "title",
|
|
1976
1991
|
value: r.title,
|
|
1977
1992
|
defaultValue: ""
|
|
1978
|
-
})), n.markerType === "popupCustom1" ?
|
|
1993
|
+
})), n.markerType === "popupCustom1" ? Pe(r, t) : (O(r, "titleStyle", t), O(r, "dataKeyStyle", t), O(r, "dataValueStyle", t), r.dataTexts = Array.isArray(r.dataTexts) ? r.dataTexts.filter((e) => e && typeof e == "object").map((e) => ({
|
|
1979
1994
|
key: e.key ?? "",
|
|
1980
1995
|
value: e.value ?? ""
|
|
1981
1996
|
})) : []), e.recordData !== void 0) {
|
|
@@ -1994,23 +2009,23 @@ function Ke(e) {
|
|
|
1994
2009
|
}
|
|
1995
2010
|
//#endregion
|
|
1996
2011
|
//#region api/marker/markerApi.js
|
|
1997
|
-
var
|
|
1998
|
-
iconMarker:
|
|
1999
|
-
followMarker:
|
|
2000
|
-
removeMarker:
|
|
2001
|
-
removeAllMarker:
|
|
2002
|
-
showMarker:
|
|
2003
|
-
showAllMarker:
|
|
2004
|
-
hideMarker:
|
|
2005
|
-
hideAllMarker:
|
|
2006
|
-
iconUrlMarker:
|
|
2007
|
-
addClustering:
|
|
2008
|
-
removeClustering:
|
|
2009
|
-
secondMarker:
|
|
2012
|
+
var Je = r("marker", {
|
|
2013
|
+
iconMarker: Ie,
|
|
2014
|
+
followMarker: Le,
|
|
2015
|
+
removeMarker: Re,
|
|
2016
|
+
removeAllMarker: ze,
|
|
2017
|
+
showMarker: Be,
|
|
2018
|
+
showAllMarker: Ve,
|
|
2019
|
+
hideMarker: He,
|
|
2020
|
+
hideAllMarker: Ue,
|
|
2021
|
+
iconUrlMarker: We,
|
|
2022
|
+
addClustering: Ge,
|
|
2023
|
+
removeClustering: Ke,
|
|
2024
|
+
secondMarker: qe
|
|
2010
2025
|
}, { getOptions: (e) => e === "iconUrlMarker" ? { timeout: 12e4 } : {} });
|
|
2011
2026
|
//#endregion
|
|
2012
2027
|
//#region api/floodPeak/getList.js
|
|
2013
|
-
function
|
|
2028
|
+
function Ye(e) {
|
|
2014
2029
|
return {
|
|
2015
2030
|
errors: [],
|
|
2016
2031
|
normalized: { ...e }
|
|
@@ -2018,7 +2033,7 @@ function Je(e) {
|
|
|
2018
2033
|
}
|
|
2019
2034
|
//#endregion
|
|
2020
2035
|
//#region api/floodPeak/helpers.js
|
|
2021
|
-
var
|
|
2036
|
+
var Xe = (e, t, n) => {
|
|
2022
2037
|
e && (n === "default" || n === "default1" || n === "default2" || n === "default3" || n === "default4" || n === "flashIcon") && (t.push(...y({
|
|
2023
2038
|
normalized: e,
|
|
2024
2039
|
field: "color",
|
|
@@ -2046,7 +2061,7 @@ var Ye = (e, t, n) => {
|
|
|
2046
2061
|
};
|
|
2047
2062
|
//#endregion
|
|
2048
2063
|
//#region api/floodPeak/record.js
|
|
2049
|
-
function
|
|
2064
|
+
function Ze(e) {
|
|
2050
2065
|
let t = [], n = { ...e };
|
|
2051
2066
|
t.push(...h({
|
|
2052
2067
|
normalized: n,
|
|
@@ -2073,14 +2088,14 @@ function Xe(e) {
|
|
|
2073
2088
|
min: 0
|
|
2074
2089
|
}));
|
|
2075
2090
|
let r = n.materialType || e.materialType || "default";
|
|
2076
|
-
return
|
|
2091
|
+
return Xe(n.config, t, r), {
|
|
2077
2092
|
errors: t,
|
|
2078
2093
|
normalized: n
|
|
2079
2094
|
};
|
|
2080
2095
|
}
|
|
2081
2096
|
//#endregion
|
|
2082
2097
|
//#region api/floodPeak/offset.js
|
|
2083
|
-
function
|
|
2098
|
+
function Qe(e) {
|
|
2084
2099
|
let t = [], n = { ...e };
|
|
2085
2100
|
return t.push(...h({
|
|
2086
2101
|
normalized: n,
|
|
@@ -2097,7 +2112,7 @@ function Ze(e) {
|
|
|
2097
2112
|
}
|
|
2098
2113
|
//#endregion
|
|
2099
2114
|
//#region api/floodPeak/offsetReset.js
|
|
2100
|
-
function
|
|
2115
|
+
function $e(e) {
|
|
2101
2116
|
let t = [], n = { ...e };
|
|
2102
2117
|
return t.push(...h({
|
|
2103
2118
|
normalized: n,
|
|
@@ -2110,7 +2125,7 @@ function Qe(e) {
|
|
|
2110
2125
|
}
|
|
2111
2126
|
//#endregion
|
|
2112
2127
|
//#region api/floodPeak/setText.js
|
|
2113
|
-
function
|
|
2128
|
+
function et(e) {
|
|
2114
2129
|
let t = [], n = { ...e };
|
|
2115
2130
|
t.push(...h({
|
|
2116
2131
|
normalized: n,
|
|
@@ -2133,7 +2148,7 @@ function $e(e) {
|
|
|
2133
2148
|
}
|
|
2134
2149
|
//#endregion
|
|
2135
2150
|
//#region api/floodPeak/close.js
|
|
2136
|
-
function
|
|
2151
|
+
function tt(e) {
|
|
2137
2152
|
let t = [], n = { ...e };
|
|
2138
2153
|
return t.push(...h({
|
|
2139
2154
|
normalized: n,
|
|
@@ -2146,7 +2161,7 @@ function et(e) {
|
|
|
2146
2161
|
}
|
|
2147
2162
|
//#endregion
|
|
2148
2163
|
//#region api/floodPeak/cameraFollow.js
|
|
2149
|
-
function
|
|
2164
|
+
function nt(e) {
|
|
2150
2165
|
let t = [], n = { ...e };
|
|
2151
2166
|
t.push(...h({
|
|
2152
2167
|
normalized: n,
|
|
@@ -2180,18 +2195,18 @@ function tt(e) {
|
|
|
2180
2195
|
}
|
|
2181
2196
|
//#endregion
|
|
2182
2197
|
//#region api/floodPeak/floodPeakApi.js
|
|
2183
|
-
var
|
|
2184
|
-
getList:
|
|
2185
|
-
record:
|
|
2186
|
-
offset:
|
|
2187
|
-
offsetReset:
|
|
2188
|
-
setText:
|
|
2189
|
-
close:
|
|
2190
|
-
cameraFollow:
|
|
2198
|
+
var rt = r("floodPeak", {
|
|
2199
|
+
getList: Ye,
|
|
2200
|
+
record: Ze,
|
|
2201
|
+
offset: Qe,
|
|
2202
|
+
offsetReset: $e,
|
|
2203
|
+
setText: et,
|
|
2204
|
+
close: tt,
|
|
2205
|
+
cameraFollow: nt
|
|
2191
2206
|
}, { getOptions: () => ({ timeout: 0 }) });
|
|
2192
2207
|
//#endregion
|
|
2193
2208
|
//#region api/animation/play.js
|
|
2194
|
-
function
|
|
2209
|
+
function it(e = {}) {
|
|
2195
2210
|
let t = { ...e }, n = [];
|
|
2196
2211
|
return n.push(...h({
|
|
2197
2212
|
normalized: t,
|
|
@@ -2216,7 +2231,7 @@ function rt(e = {}) {
|
|
|
2216
2231
|
}
|
|
2217
2232
|
//#endregion
|
|
2218
2233
|
//#region api/animation/carryOn.js
|
|
2219
|
-
function
|
|
2234
|
+
function at(e = {}) {
|
|
2220
2235
|
let t = { ...e };
|
|
2221
2236
|
return {
|
|
2222
2237
|
errors: [...h({
|
|
@@ -2229,7 +2244,7 @@ function it(e = {}) {
|
|
|
2229
2244
|
}
|
|
2230
2245
|
//#endregion
|
|
2231
2246
|
//#region api/animation/pause.js
|
|
2232
|
-
function
|
|
2247
|
+
function ot(e = {}) {
|
|
2233
2248
|
let t = { ...e };
|
|
2234
2249
|
return {
|
|
2235
2250
|
errors: [...h({
|
|
@@ -2242,7 +2257,7 @@ function at(e = {}) {
|
|
|
2242
2257
|
}
|
|
2243
2258
|
//#endregion
|
|
2244
2259
|
//#region api/animation/stop.js
|
|
2245
|
-
function
|
|
2260
|
+
function st(e = {}) {
|
|
2246
2261
|
let t = { ...e };
|
|
2247
2262
|
return {
|
|
2248
2263
|
errors: [...h({
|
|
@@ -2255,7 +2270,7 @@ function ot(e = {}) {
|
|
|
2255
2270
|
}
|
|
2256
2271
|
//#endregion
|
|
2257
2272
|
//#region api/animation/jumpToFrame.js
|
|
2258
|
-
function
|
|
2273
|
+
function ct(e = {}) {
|
|
2259
2274
|
let t = { ...e }, n = [];
|
|
2260
2275
|
return n.push(...h({
|
|
2261
2276
|
normalized: t,
|
|
@@ -2274,7 +2289,7 @@ function st(e = {}) {
|
|
|
2274
2289
|
}
|
|
2275
2290
|
//#endregion
|
|
2276
2291
|
//#region api/animation/setPlaybackFrameRate.js
|
|
2277
|
-
function
|
|
2292
|
+
function lt(e = {}) {
|
|
2278
2293
|
let t = { ...e }, n = [];
|
|
2279
2294
|
return n.push(...h({
|
|
2280
2295
|
normalized: t,
|
|
@@ -2293,7 +2308,7 @@ function ct(e = {}) {
|
|
|
2293
2308
|
}
|
|
2294
2309
|
//#endregion
|
|
2295
2310
|
//#region api/animation/onData.js
|
|
2296
|
-
function
|
|
2311
|
+
function ut(e = {}) {
|
|
2297
2312
|
let t = [];
|
|
2298
2313
|
return e.onChange && typeof e.onChange != "function" && t.push("onChange 必须为函数"), {
|
|
2299
2314
|
errors: t,
|
|
@@ -2302,18 +2317,18 @@ function lt(e = {}) {
|
|
|
2302
2317
|
}
|
|
2303
2318
|
//#endregion
|
|
2304
2319
|
//#region api/animation/animationApi.js
|
|
2305
|
-
var
|
|
2306
|
-
play:
|
|
2307
|
-
carryOn:
|
|
2308
|
-
pause:
|
|
2309
|
-
stop:
|
|
2310
|
-
jumpToFrame:
|
|
2311
|
-
setPlaybackFrameRate:
|
|
2312
|
-
onData:
|
|
2320
|
+
var dt = r("animation", {
|
|
2321
|
+
play: it,
|
|
2322
|
+
carryOn: at,
|
|
2323
|
+
pause: ot,
|
|
2324
|
+
stop: st,
|
|
2325
|
+
jumpToFrame: ct,
|
|
2326
|
+
setPlaybackFrameRate: lt,
|
|
2327
|
+
onData: ut
|
|
2313
2328
|
});
|
|
2314
2329
|
//#endregion
|
|
2315
2330
|
//#region api/hydrodynamicForce/create.js
|
|
2316
|
-
function
|
|
2331
|
+
function ft(e) {
|
|
2317
2332
|
let t = [], n = { ...e };
|
|
2318
2333
|
return t.push(...p({
|
|
2319
2334
|
normalized: n,
|
|
@@ -2368,8 +2383,29 @@ function dt(e) {
|
|
|
2368
2383
|
};
|
|
2369
2384
|
}
|
|
2370
2385
|
//#endregion
|
|
2386
|
+
//#region api/hydrodynamicForce/helpers.js
|
|
2387
|
+
function M(e, t = {}) {
|
|
2388
|
+
let { required: n = !1 } = t, r = [];
|
|
2389
|
+
return e == null ? (n && r.push("[rangeList]为必填项"), r) : Array.isArray(e) ? e.length === 0 ? (r.push("[rangeList]不能为空数组"), r) : (e.forEach((e, t) => {
|
|
2390
|
+
if (typeof e != "object" || !e) {
|
|
2391
|
+
r.push(`[rangeList[${t}]]必须是对象类型`);
|
|
2392
|
+
return;
|
|
2393
|
+
}
|
|
2394
|
+
r.push(...p({
|
|
2395
|
+
normalized: e,
|
|
2396
|
+
field: "rangeDepth",
|
|
2397
|
+
value: e.rangeDepth,
|
|
2398
|
+
required: !0
|
|
2399
|
+
})), r.push(...h({
|
|
2400
|
+
normalized: e,
|
|
2401
|
+
field: "color",
|
|
2402
|
+
value: e.color
|
|
2403
|
+
}));
|
|
2404
|
+
}), r) : (r.push("[rangeList]必须是数组类型"), r);
|
|
2405
|
+
}
|
|
2406
|
+
//#endregion
|
|
2371
2407
|
//#region api/hydrodynamicForce/waterFlow.js
|
|
2372
|
-
function
|
|
2408
|
+
function pt(e) {
|
|
2373
2409
|
let t = [], n = { ...e };
|
|
2374
2410
|
return t.push(...p({
|
|
2375
2411
|
normalized: n,
|
|
@@ -2412,14 +2448,14 @@ function ft(e) {
|
|
|
2412
2448
|
normalized: n,
|
|
2413
2449
|
field: "key",
|
|
2414
2450
|
value: e.key
|
|
2415
|
-
})), {
|
|
2451
|
+
})), t.push(...M(e.rangeList)), {
|
|
2416
2452
|
errors: t,
|
|
2417
2453
|
normalized: n
|
|
2418
2454
|
};
|
|
2419
2455
|
}
|
|
2420
2456
|
//#endregion
|
|
2421
2457
|
//#region api/hydrodynamicForce/waterDepth.js
|
|
2422
|
-
function
|
|
2458
|
+
function mt(e) {
|
|
2423
2459
|
let t = [], n = { ...e };
|
|
2424
2460
|
return t.push(...p({
|
|
2425
2461
|
normalized: n,
|
|
@@ -2432,22 +2468,7 @@ function pt(e) {
|
|
|
2432
2468
|
value: e.maxWater,
|
|
2433
2469
|
required: !0,
|
|
2434
2470
|
min: e.minWater
|
|
2435
|
-
})),
|
|
2436
|
-
if (typeof e != "object" || !e) {
|
|
2437
|
-
t.push(`[rangeList[${n}]]必须是对象类型`);
|
|
2438
|
-
return;
|
|
2439
|
-
}
|
|
2440
|
-
t.push(...p({
|
|
2441
|
-
normalized: e,
|
|
2442
|
-
field: "rangeDepth",
|
|
2443
|
-
value: e.rangeDepth,
|
|
2444
|
-
required: !0
|
|
2445
|
-
})), t.push(...h({
|
|
2446
|
-
normalized: e,
|
|
2447
|
-
field: "color",
|
|
2448
|
-
value: e.color
|
|
2449
|
-
}));
|
|
2450
|
-
}) : t.push("[rangeList]必须是数组类型"), t.push(...h({
|
|
2471
|
+
})), t.push(...M(e.rangeList, { required: !0 })), t.push(...h({
|
|
2451
2472
|
normalized: n,
|
|
2452
2473
|
field: "waterDepthUrl",
|
|
2453
2474
|
value: e.waterDepthUrl
|
|
@@ -2462,7 +2483,7 @@ function pt(e) {
|
|
|
2462
2483
|
}
|
|
2463
2484
|
//#endregion
|
|
2464
2485
|
//#region api/hydrodynamicForce/sediment.js
|
|
2465
|
-
function
|
|
2486
|
+
function ht(e) {
|
|
2466
2487
|
let t = [], n = { ...e };
|
|
2467
2488
|
return t.push(...h({
|
|
2468
2489
|
normalized: n,
|
|
@@ -2494,14 +2515,14 @@ function mt(e) {
|
|
|
2494
2515
|
value: e.maxDoD,
|
|
2495
2516
|
required: !0,
|
|
2496
2517
|
min: e.minDoD
|
|
2497
|
-
})), {
|
|
2518
|
+
})), t.push(...M(e.rangeList)), {
|
|
2498
2519
|
errors: t,
|
|
2499
2520
|
normalized: n
|
|
2500
2521
|
};
|
|
2501
2522
|
}
|
|
2502
2523
|
//#endregion
|
|
2503
2524
|
//#region api/hydrodynamicForce/materialParams.js
|
|
2504
|
-
function
|
|
2525
|
+
function gt(e = {}) {
|
|
2505
2526
|
let t = [], n = { ...e };
|
|
2506
2527
|
return t.push(...h({
|
|
2507
2528
|
normalized: n,
|
|
@@ -2555,7 +2576,7 @@ function ht(e = {}) {
|
|
|
2555
2576
|
}
|
|
2556
2577
|
//#endregion
|
|
2557
2578
|
//#region api/hydrodynamicForce/close.js
|
|
2558
|
-
function
|
|
2579
|
+
function _t(e) {
|
|
2559
2580
|
let t = [], n = { ...e };
|
|
2560
2581
|
return t.push(...h({
|
|
2561
2582
|
normalized: n,
|
|
@@ -2568,17 +2589,17 @@ function gt(e) {
|
|
|
2568
2589
|
}
|
|
2569
2590
|
//#endregion
|
|
2570
2591
|
//#region api/hydrodynamicForce/hydrodynamicForceApi.js
|
|
2571
|
-
var
|
|
2572
|
-
create:
|
|
2573
|
-
waterFlow:
|
|
2574
|
-
waterDepth:
|
|
2575
|
-
sediment:
|
|
2576
|
-
materialParams:
|
|
2577
|
-
close:
|
|
2592
|
+
var vt = r("hydrodynamicForce", {
|
|
2593
|
+
create: ft,
|
|
2594
|
+
waterFlow: pt,
|
|
2595
|
+
waterDepth: mt,
|
|
2596
|
+
sediment: ht,
|
|
2597
|
+
materialParams: gt,
|
|
2598
|
+
close: _t
|
|
2578
2599
|
});
|
|
2579
2600
|
//#endregion
|
|
2580
2601
|
//#region api/sceneModel/getById.js
|
|
2581
|
-
function
|
|
2602
|
+
function yt(e) {
|
|
2582
2603
|
let t = [], n = { ...e };
|
|
2583
2604
|
return t.push(...h({
|
|
2584
2605
|
normalized: n,
|
|
@@ -2591,7 +2612,7 @@ function vt(e) {
|
|
|
2591
2612
|
}
|
|
2592
2613
|
//#endregion
|
|
2593
2614
|
//#region api/sceneModel/getByTag.js
|
|
2594
|
-
function
|
|
2615
|
+
function bt(e) {
|
|
2595
2616
|
let t = [], n = { ...e };
|
|
2596
2617
|
return t.push(...h({
|
|
2597
2618
|
normalized: n,
|
|
@@ -2652,17 +2673,43 @@ function F(e, t, n) {
|
|
|
2652
2673
|
}));
|
|
2653
2674
|
}
|
|
2654
2675
|
}
|
|
2655
|
-
function I(e, t, n
|
|
2676
|
+
function I(e, t, n, r = {
|
|
2677
|
+
x: 0,
|
|
2678
|
+
y: 0,
|
|
2679
|
+
z: 0
|
|
2680
|
+
}) {
|
|
2681
|
+
if (n == null) {
|
|
2682
|
+
e[t] = { ...r };
|
|
2683
|
+
return;
|
|
2684
|
+
}
|
|
2685
|
+
if (typeof n != "object" || Array.isArray(n)) {
|
|
2686
|
+
if (Array.isArray(n) && n.length >= 3) {
|
|
2687
|
+
e[t] = {
|
|
2688
|
+
x: Number(n[0]),
|
|
2689
|
+
y: Number(n[1]),
|
|
2690
|
+
z: Number(n[2])
|
|
2691
|
+
};
|
|
2692
|
+
return;
|
|
2693
|
+
}
|
|
2694
|
+
return;
|
|
2695
|
+
}
|
|
2696
|
+
e[t] = {
|
|
2697
|
+
x: n.x === void 0 || n.x === null ? r.x : n.x,
|
|
2698
|
+
y: n.y === void 0 || n.y === null ? r.y : n.y,
|
|
2699
|
+
z: n.z === void 0 || n.z === null ? r.z : n.z
|
|
2700
|
+
};
|
|
2701
|
+
}
|
|
2702
|
+
function L(e, t, n) {
|
|
2656
2703
|
let r = (t, n) => N(n) ? Array.isArray(n) ? n.length !== 0 || (e.push(`[${t}]不能为空数组`), !1) : (e.push(`[${t}]必须是数组类型`), !1) : !1, i = r("ids", t), a = r("tags", n);
|
|
2657
2704
|
!i && !a ? e.push("[ids]和[tags]必须提供其中一个") : i && a && e.push("[ids]和[tags]不能同时提供");
|
|
2658
2705
|
}
|
|
2659
|
-
var
|
|
2706
|
+
var xt = [
|
|
2660
2707
|
"None",
|
|
2661
2708
|
"Color",
|
|
2662
2709
|
"Texture",
|
|
2663
2710
|
"Material"
|
|
2664
2711
|
];
|
|
2665
|
-
function
|
|
2712
|
+
function R(e, t, n, r, i) {
|
|
2666
2713
|
if (r == null) {
|
|
2667
2714
|
t[n] = i;
|
|
2668
2715
|
return;
|
|
@@ -2675,7 +2722,7 @@ function L(e, t, n, r, i) {
|
|
|
2675
2722
|
}
|
|
2676
2723
|
//#endregion
|
|
2677
2724
|
//#region api/sceneModel/setTransform.js
|
|
2678
|
-
function
|
|
2725
|
+
function St(e) {
|
|
2679
2726
|
let t = [], n = { ...e };
|
|
2680
2727
|
return P(t, e), F(e.rotation, "rotation", t), F(e.scale, "scale", t), F(e.translation, "translation", t), t.push(...m({
|
|
2681
2728
|
normalized: n,
|
|
@@ -2701,7 +2748,7 @@ function xt(e) {
|
|
|
2701
2748
|
}
|
|
2702
2749
|
//#endregion
|
|
2703
2750
|
//#region api/sceneModel/clearTransform.js
|
|
2704
|
-
function
|
|
2751
|
+
function Ct(e) {
|
|
2705
2752
|
let t = [], n = { ...e };
|
|
2706
2753
|
return P(t, e), {
|
|
2707
2754
|
errors: t,
|
|
@@ -2710,25 +2757,33 @@ function St(e) {
|
|
|
2710
2757
|
}
|
|
2711
2758
|
//#endregion
|
|
2712
2759
|
//#region api/sceneModel/offset.js
|
|
2713
|
-
|
|
2760
|
+
var z = {
|
|
2761
|
+
x: 0,
|
|
2762
|
+
y: 0,
|
|
2763
|
+
z: 0
|
|
2764
|
+
};
|
|
2765
|
+
function B(e, t, n, r = "") {
|
|
2766
|
+
let i = r ? `${r}.rotation` : "rotation", a = r ? `${r}.scale` : "scale", o = r ? `${r}.translation` : "translation";
|
|
2767
|
+
I(e, "rotation", t.rotation, z), I(e, "scale", t.scale, z), I(e, "translation", t.translation, z), F(e.rotation, i, n), F(e.scale, a, n), F(e.translation, o, n);
|
|
2768
|
+
}
|
|
2769
|
+
function wt(e) {
|
|
2714
2770
|
let t = [], n = { ...e };
|
|
2715
|
-
return P(t, e),
|
|
2771
|
+
return P(t, e), B(n, e, t), t.push(...m({
|
|
2716
2772
|
normalized: n,
|
|
2717
2773
|
field: "duration",
|
|
2718
2774
|
value: e.duration,
|
|
2719
2775
|
defaultValue: 0,
|
|
2720
2776
|
min: 0
|
|
2721
|
-
})), e.list !== void 0 && e.list !== null && (Array.isArray(e.list) ? e.list.
|
|
2722
|
-
if (typeof e != "object" || !e) {
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
F(e.rotation, `list[${n}].rotation`, t), F(e.scale, `list[${n}].scale`, t), F(e.translation, `list[${n}].translation`, t), t.push(...m({
|
|
2727
|
-
normalized: e,
|
|
2777
|
+
})), e.list !== void 0 && e.list !== null && (Array.isArray(e.list) ? n.list = e.list.map((e, n) => {
|
|
2778
|
+
if (typeof e != "object" || !e) return t.push(`[list[${n}]]必须是对象类型`), e;
|
|
2779
|
+
let r = { ...e };
|
|
2780
|
+
return B(r, e, t, `list[${n}]`), t.push(...m({
|
|
2781
|
+
normalized: r,
|
|
2728
2782
|
field: "duration",
|
|
2729
2783
|
value: e.duration,
|
|
2784
|
+
defaultValue: 0,
|
|
2730
2785
|
min: 0
|
|
2731
|
-
}));
|
|
2786
|
+
})), r;
|
|
2732
2787
|
}) : t.push("[list]必须是数组类型")), {
|
|
2733
2788
|
errors: t,
|
|
2734
2789
|
normalized: n
|
|
@@ -2736,7 +2791,7 @@ function Ct(e) {
|
|
|
2736
2791
|
}
|
|
2737
2792
|
//#endregion
|
|
2738
2793
|
//#region api/sceneModel/clearOffset.js
|
|
2739
|
-
function
|
|
2794
|
+
function Tt(e) {
|
|
2740
2795
|
let t = [], n = { ...e };
|
|
2741
2796
|
return P(t, e), {
|
|
2742
2797
|
errors: t,
|
|
@@ -2745,36 +2800,36 @@ function wt(e) {
|
|
|
2745
2800
|
}
|
|
2746
2801
|
//#endregion
|
|
2747
2802
|
//#region api/sceneModel/show.js
|
|
2748
|
-
function
|
|
2803
|
+
function Et(e) {
|
|
2749
2804
|
let t = [], n = { ...e };
|
|
2750
|
-
return
|
|
2805
|
+
return L(t, e.ids, e.tags), {
|
|
2751
2806
|
errors: t,
|
|
2752
2807
|
normalized: n
|
|
2753
2808
|
};
|
|
2754
2809
|
}
|
|
2755
2810
|
//#endregion
|
|
2756
2811
|
//#region api/sceneModel/hide.js
|
|
2757
|
-
function
|
|
2812
|
+
function Dt(e) {
|
|
2758
2813
|
let t = [], n = { ...e };
|
|
2759
|
-
return
|
|
2814
|
+
return L(t, e.ids, e.tags), {
|
|
2760
2815
|
errors: t,
|
|
2761
2816
|
normalized: n
|
|
2762
2817
|
};
|
|
2763
2818
|
}
|
|
2764
2819
|
//#endregion
|
|
2765
2820
|
//#region api/sceneModel/showOnly.js
|
|
2766
|
-
function
|
|
2821
|
+
function Ot(e) {
|
|
2767
2822
|
let t = [], n = { ...e };
|
|
2768
|
-
return
|
|
2823
|
+
return L(t, e.ids, e.tags), e.isIgnoreMarker !== void 0 && typeof e.isIgnoreMarker != "boolean" ? t.push("[isIgnoreMarker]必须是布尔类型") : n.isIgnoreMarker = e.isIgnoreMarker === void 0 || e.isIgnoreMarker, e.isIgnoreSky !== void 0 && typeof e.isIgnoreSky != "boolean" ? t.push("[isIgnoreSky]必须是布尔类型") : n.isIgnoreSky = e.isIgnoreSky !== void 0 && e.isIgnoreSky, {
|
|
2769
2824
|
errors: t,
|
|
2770
2825
|
normalized: n
|
|
2771
2826
|
};
|
|
2772
2827
|
}
|
|
2773
2828
|
//#endregion
|
|
2774
2829
|
//#region api/sceneModel/highLight.js
|
|
2775
|
-
function
|
|
2830
|
+
function kt(e) {
|
|
2776
2831
|
let t = [], n = { ...e };
|
|
2777
|
-
return
|
|
2832
|
+
return L(t, e.ids, e.tags), n.config ||= {}, t.push(...y({
|
|
2778
2833
|
normalized: n.config,
|
|
2779
2834
|
field: "color",
|
|
2780
2835
|
value: n.config.color,
|
|
@@ -2808,18 +2863,18 @@ function Ot(e) {
|
|
|
2808
2863
|
}
|
|
2809
2864
|
//#endregion
|
|
2810
2865
|
//#region api/sceneModel/removeHighLight.js
|
|
2811
|
-
function
|
|
2866
|
+
function At(e) {
|
|
2812
2867
|
let t = [], n = { ...e };
|
|
2813
|
-
return
|
|
2868
|
+
return L(t, e.ids, e.tags), {
|
|
2814
2869
|
errors: t,
|
|
2815
2870
|
normalized: n
|
|
2816
2871
|
};
|
|
2817
2872
|
}
|
|
2818
2873
|
//#endregion
|
|
2819
2874
|
//#region api/sceneModel/setOpacity.js
|
|
2820
|
-
function
|
|
2875
|
+
function jt(e) {
|
|
2821
2876
|
let t = [], n = { ...e };
|
|
2822
|
-
return
|
|
2877
|
+
return L(t, e.ids, e.tags), n.config ||= {}, t.push(...m({
|
|
2823
2878
|
normalized: n.config,
|
|
2824
2879
|
field: "opacity",
|
|
2825
2880
|
value: e.config?.opacity,
|
|
@@ -2836,7 +2891,7 @@ function At(e) {
|
|
|
2836
2891
|
normalized: n.config,
|
|
2837
2892
|
field: "color",
|
|
2838
2893
|
value: e.config?.color,
|
|
2839
|
-
defaultValue: "#
|
|
2894
|
+
defaultValue: "#1A80CCFF"
|
|
2840
2895
|
})), {
|
|
2841
2896
|
errors: t,
|
|
2842
2897
|
normalized: n
|
|
@@ -2844,9 +2899,9 @@ function At(e) {
|
|
|
2844
2899
|
}
|
|
2845
2900
|
//#endregion
|
|
2846
2901
|
//#region api/sceneModel/outline.js
|
|
2847
|
-
function
|
|
2902
|
+
function Mt(e) {
|
|
2848
2903
|
let t = [], n = { ...e };
|
|
2849
|
-
return
|
|
2904
|
+
return L(t, e.ids, e.tags), n.config ||= {}, t.push(...y({
|
|
2850
2905
|
normalized: n.config,
|
|
2851
2906
|
field: "color",
|
|
2852
2907
|
value: n.config.color,
|
|
@@ -2863,7 +2918,7 @@ function jt(e) {
|
|
|
2863
2918
|
value: n.config.width,
|
|
2864
2919
|
defaultValue: 1,
|
|
2865
2920
|
min: 0
|
|
2866
|
-
})), n.config.IsSolidMesh === void 0 ? n.config.IsSolidMesh = !
|
|
2921
|
+
})), n.config.IsSolidMesh === void 0 ? n.config.IsSolidMesh = !0 : typeof n.config.IsSolidMesh != "boolean" && t.push("[config.IsSolidMesh] 必须是布尔类型"), t.push(...y({
|
|
2867
2922
|
normalized: n.config,
|
|
2868
2923
|
field: "meshColor",
|
|
2869
2924
|
value: n.config.meshColor,
|
|
@@ -2888,16 +2943,16 @@ function jt(e) {
|
|
|
2888
2943
|
}
|
|
2889
2944
|
//#endregion
|
|
2890
2945
|
//#region api/sceneModel/removeOutline.js
|
|
2891
|
-
function
|
|
2946
|
+
function Nt(e) {
|
|
2892
2947
|
let t = [], n = { ...e };
|
|
2893
|
-
return
|
|
2948
|
+
return L(t, e.ids, e.tags), {
|
|
2894
2949
|
errors: t,
|
|
2895
2950
|
normalized: n
|
|
2896
2951
|
};
|
|
2897
2952
|
}
|
|
2898
2953
|
//#endregion
|
|
2899
2954
|
//#region api/sceneModel/removeAllOutline.js
|
|
2900
|
-
function
|
|
2955
|
+
function Pt(e) {
|
|
2901
2956
|
return {
|
|
2902
2957
|
errors: [],
|
|
2903
2958
|
normalized: { ...e }
|
|
@@ -2905,7 +2960,7 @@ function Nt(e) {
|
|
|
2905
2960
|
}
|
|
2906
2961
|
//#endregion
|
|
2907
2962
|
//#region api/sceneModel/openSlice.js
|
|
2908
|
-
function
|
|
2963
|
+
function Ft(e = {}) {
|
|
2909
2964
|
let t = [], n = { ...e };
|
|
2910
2965
|
return t.push(...h({
|
|
2911
2966
|
normalized: n,
|
|
@@ -2917,7 +2972,7 @@ function Pt(e = {}) {
|
|
|
2917
2972
|
value: e.mode,
|
|
2918
2973
|
defaultValue: "None",
|
|
2919
2974
|
type: "string",
|
|
2920
|
-
list:
|
|
2975
|
+
list: xt
|
|
2921
2976
|
})), t.push(...y({
|
|
2922
2977
|
normalized: n,
|
|
2923
2978
|
field: "color",
|
|
@@ -2945,7 +3000,7 @@ function Pt(e = {}) {
|
|
|
2945
3000
|
value: e.uvScale,
|
|
2946
3001
|
length: 2,
|
|
2947
3002
|
defaultValue: [1, 1]
|
|
2948
|
-
})),
|
|
3003
|
+
})), R(t, n, "isWorldUV", e.isWorldUV, !1), t.push(..._({
|
|
2949
3004
|
normalized: n,
|
|
2950
3005
|
field: "direction",
|
|
2951
3006
|
value: e.direction,
|
|
@@ -2955,7 +3010,7 @@ function Pt(e = {}) {
|
|
|
2955
3010
|
0,
|
|
2956
3011
|
-1
|
|
2957
3012
|
]
|
|
2958
|
-
})),
|
|
3013
|
+
})), R(t, n, "isWorldDirection", e.isWorldDirection, !1), t.push(...m({
|
|
2959
3014
|
normalized: n,
|
|
2960
3015
|
field: "ratio",
|
|
2961
3016
|
value: e.ratio,
|
|
@@ -2969,7 +3024,7 @@ function Pt(e = {}) {
|
|
|
2969
3024
|
}
|
|
2970
3025
|
//#endregion
|
|
2971
3026
|
//#region api/sceneModel/closeSlice.js
|
|
2972
|
-
function
|
|
3027
|
+
function It(e = {}) {
|
|
2973
3028
|
let t = [], n = { ...e };
|
|
2974
3029
|
return t.push(...h({
|
|
2975
3030
|
normalized: n,
|
|
@@ -2982,7 +3037,7 @@ function Ft(e = {}) {
|
|
|
2982
3037
|
}
|
|
2983
3038
|
//#endregion
|
|
2984
3039
|
//#region api/sceneModel/closeAllSlice.js
|
|
2985
|
-
function
|
|
3040
|
+
function Lt(e = {}) {
|
|
2986
3041
|
return {
|
|
2987
3042
|
errors: [],
|
|
2988
3043
|
normalized: { ...e }
|
|
@@ -2990,29 +3045,29 @@ function It(e = {}) {
|
|
|
2990
3045
|
}
|
|
2991
3046
|
//#endregion
|
|
2992
3047
|
//#region api/sceneModel/sceneModelApi.js
|
|
2993
|
-
var
|
|
2994
|
-
getById:
|
|
2995
|
-
getByTag:
|
|
2996
|
-
setTransform:
|
|
2997
|
-
clearTransform:
|
|
2998
|
-
offset:
|
|
2999
|
-
clearOffset:
|
|
3000
|
-
show:
|
|
3001
|
-
hide:
|
|
3002
|
-
showOnly:
|
|
3003
|
-
highLight:
|
|
3004
|
-
removeHighLight:
|
|
3005
|
-
setOpacity:
|
|
3006
|
-
outline:
|
|
3007
|
-
removeOutline:
|
|
3008
|
-
removeAllOutline:
|
|
3009
|
-
openSlice:
|
|
3010
|
-
closeSlice:
|
|
3011
|
-
closeAllSlice:
|
|
3048
|
+
var Rt = r("sceneModel", {
|
|
3049
|
+
getById: yt,
|
|
3050
|
+
getByTag: bt,
|
|
3051
|
+
setTransform: St,
|
|
3052
|
+
clearTransform: Ct,
|
|
3053
|
+
offset: wt,
|
|
3054
|
+
clearOffset: Tt,
|
|
3055
|
+
show: Et,
|
|
3056
|
+
hide: Dt,
|
|
3057
|
+
showOnly: Ot,
|
|
3058
|
+
highLight: kt,
|
|
3059
|
+
removeHighLight: At,
|
|
3060
|
+
setOpacity: jt,
|
|
3061
|
+
outline: Mt,
|
|
3062
|
+
removeOutline: Nt,
|
|
3063
|
+
removeAllOutline: Pt,
|
|
3064
|
+
openSlice: Ft,
|
|
3065
|
+
closeSlice: It,
|
|
3066
|
+
closeAllSlice: Lt
|
|
3012
3067
|
});
|
|
3013
3068
|
//#endregion
|
|
3014
3069
|
//#region api/atmosphericEffects/time.js
|
|
3015
|
-
function
|
|
3070
|
+
function zt(e) {
|
|
3016
3071
|
let t = [], n = { ...e };
|
|
3017
3072
|
return t.push(...p({
|
|
3018
3073
|
normalized: n,
|
|
@@ -3027,7 +3082,7 @@ function Rt(e) {
|
|
|
3027
3082
|
}
|
|
3028
3083
|
//#endregion
|
|
3029
3084
|
//#region api/atmosphericEffects/weather.js
|
|
3030
|
-
function
|
|
3085
|
+
function Bt(e) {
|
|
3031
3086
|
let t = [], n = { ...e };
|
|
3032
3087
|
return !e.type || typeof e.type != "string" ? t.push("[type]为必填项,且必须是字符串类型") : n.type = e.type, {
|
|
3033
3088
|
errors: t,
|
|
@@ -3036,13 +3091,13 @@ function R(e) {
|
|
|
3036
3091
|
}
|
|
3037
3092
|
//#endregion
|
|
3038
3093
|
//#region api/atmosphericEffects/atmosphericEffectsApi.js
|
|
3039
|
-
var
|
|
3040
|
-
time:
|
|
3041
|
-
weather:
|
|
3094
|
+
var Vt = r("atmosphericEffects", {
|
|
3095
|
+
time: zt,
|
|
3096
|
+
weather: Bt
|
|
3042
3097
|
});
|
|
3043
3098
|
//#endregion
|
|
3044
3099
|
//#region api/tool/onMouseClick.js
|
|
3045
|
-
function
|
|
3100
|
+
function Ht(e) {
|
|
3046
3101
|
let t = [], n = { ...e };
|
|
3047
3102
|
return t.push(...b({
|
|
3048
3103
|
normalized: n,
|
|
@@ -3062,7 +3117,7 @@ function Bt(e) {
|
|
|
3062
3117
|
}
|
|
3063
3118
|
//#endregion
|
|
3064
3119
|
//#region api/tool/offMouseClick.js
|
|
3065
|
-
function
|
|
3120
|
+
function Ut(e) {
|
|
3066
3121
|
let t = [], n = { ...e };
|
|
3067
3122
|
return t.push(...b({
|
|
3068
3123
|
normalized: n,
|
|
@@ -3082,7 +3137,7 @@ function Vt(e) {
|
|
|
3082
3137
|
}
|
|
3083
3138
|
//#endregion
|
|
3084
3139
|
//#region api/tool/onDistance.js
|
|
3085
|
-
function
|
|
3140
|
+
function Wt(e) {
|
|
3086
3141
|
return {
|
|
3087
3142
|
errors: [],
|
|
3088
3143
|
normalized: { ...e }
|
|
@@ -3090,7 +3145,7 @@ function Ht(e) {
|
|
|
3090
3145
|
}
|
|
3091
3146
|
//#endregion
|
|
3092
3147
|
//#region api/tool/offDistance.js
|
|
3093
|
-
function
|
|
3148
|
+
function Gt(e) {
|
|
3094
3149
|
return {
|
|
3095
3150
|
errors: [],
|
|
3096
3151
|
normalized: { ...e }
|
|
@@ -3098,7 +3153,7 @@ function Ut(e) {
|
|
|
3098
3153
|
}
|
|
3099
3154
|
//#endregion
|
|
3100
3155
|
//#region api/tool/editConfigFile.js
|
|
3101
|
-
function
|
|
3156
|
+
function Kt(e) {
|
|
3102
3157
|
return {
|
|
3103
3158
|
errors: [],
|
|
3104
3159
|
normalized: { ...e }
|
|
@@ -3106,21 +3161,21 @@ function Wt(e) {
|
|
|
3106
3161
|
}
|
|
3107
3162
|
//#endregion
|
|
3108
3163
|
//#region api/tool/toolApi.js
|
|
3109
|
-
var
|
|
3110
|
-
onMouseClick:
|
|
3111
|
-
offMouseClick:
|
|
3112
|
-
onDistance:
|
|
3113
|
-
offDistance:
|
|
3114
|
-
editConfigFile:
|
|
3164
|
+
var qt = r("tool", {
|
|
3165
|
+
onMouseClick: Ht,
|
|
3166
|
+
offMouseClick: Ut,
|
|
3167
|
+
onDistance: Wt,
|
|
3168
|
+
offDistance: Gt,
|
|
3169
|
+
editConfigFile: Kt
|
|
3115
3170
|
});
|
|
3116
3171
|
//#endregion
|
|
3117
3172
|
//#region api/line/helpers.js
|
|
3118
|
-
function
|
|
3173
|
+
function Jt() {
|
|
3119
3174
|
return "line_" + Date.now() + "_" + Math.random().toString(36).substring(2, 9);
|
|
3120
3175
|
}
|
|
3121
3176
|
//#endregion
|
|
3122
3177
|
//#region api/line/addLine.js
|
|
3123
|
-
function
|
|
3178
|
+
function Yt(e) {
|
|
3124
3179
|
let t = [], n = { ...e };
|
|
3125
3180
|
if (!e.coordinates || !Array.isArray(e.coordinates)) t.push("[coordinates] 为必填项,且必须是数组类型");
|
|
3126
3181
|
else if (e.coordinates.length < 2) t.push("[coordinates] 至少需要2个坐标点才能绘制线条");
|
|
@@ -3151,7 +3206,7 @@ function qt(e) {
|
|
|
3151
3206
|
value: e.width,
|
|
3152
3207
|
defaultValue: 1,
|
|
3153
3208
|
min: .1
|
|
3154
|
-
})), e.key === void 0 || e.key === null || e.key === "" ? n.key =
|
|
3209
|
+
})), e.key === void 0 || e.key === null || e.key === "" ? n.key = Jt() : t.push(...g({
|
|
3155
3210
|
normalized: n,
|
|
3156
3211
|
field: "key",
|
|
3157
3212
|
value: e.key
|
|
@@ -3191,7 +3246,7 @@ function qt(e) {
|
|
|
3191
3246
|
}
|
|
3192
3247
|
//#endregion
|
|
3193
3248
|
//#region api/line/clearLine.js
|
|
3194
|
-
function
|
|
3249
|
+
function Xt(e) {
|
|
3195
3250
|
let t = [], n = { ...e };
|
|
3196
3251
|
if (!e.key || !Array.isArray(e.key)) t.push("[key] 为必填项,且必须是数组类型");
|
|
3197
3252
|
else if (e.key.length === 0) t.push("[key] 至少需要一个线条标识");
|
|
@@ -3208,7 +3263,7 @@ function Jt(e) {
|
|
|
3208
3263
|
}
|
|
3209
3264
|
//#endregion
|
|
3210
3265
|
//#region api/line/clearAllLine.js
|
|
3211
|
-
function
|
|
3266
|
+
function Zt(e) {
|
|
3212
3267
|
return {
|
|
3213
3268
|
errors: [],
|
|
3214
3269
|
normalized: { ...e }
|
|
@@ -3216,14 +3271,14 @@ function Yt(e) {
|
|
|
3216
3271
|
}
|
|
3217
3272
|
//#endregion
|
|
3218
3273
|
//#region api/line/lineApi.js
|
|
3219
|
-
var
|
|
3220
|
-
addLine:
|
|
3221
|
-
clearLine:
|
|
3222
|
-
clearAllLine:
|
|
3274
|
+
var Qt = r("line", {
|
|
3275
|
+
addLine: Yt,
|
|
3276
|
+
clearLine: Xt,
|
|
3277
|
+
clearAllLine: Zt
|
|
3223
3278
|
});
|
|
3224
3279
|
//#endregion
|
|
3225
3280
|
//#region api/level/switch.js
|
|
3226
|
-
function
|
|
3281
|
+
function $t(e) {
|
|
3227
3282
|
let t = [], n = { ...e };
|
|
3228
3283
|
return t.push(...h({
|
|
3229
3284
|
normalized: n,
|
|
@@ -3236,10 +3291,10 @@ function Zt(e) {
|
|
|
3236
3291
|
}
|
|
3237
3292
|
//#endregion
|
|
3238
3293
|
//#region api/level/levelApi.js
|
|
3239
|
-
var
|
|
3294
|
+
var en = r("level", { switch: $t });
|
|
3240
3295
|
//#endregion
|
|
3241
3296
|
//#region api/vtk/getInfo.js
|
|
3242
|
-
function
|
|
3297
|
+
function tn(e = {}) {
|
|
3243
3298
|
let t = [], n = { ...e };
|
|
3244
3299
|
return t.push(...h({
|
|
3245
3300
|
normalized: n,
|
|
@@ -3252,7 +3307,7 @@ function $t(e = {}) {
|
|
|
3252
3307
|
}
|
|
3253
3308
|
//#endregion
|
|
3254
3309
|
//#region api/vtk/getFieldRange.js
|
|
3255
|
-
function
|
|
3310
|
+
function nn(e = {}) {
|
|
3256
3311
|
let t = [], n = { ...e };
|
|
3257
3312
|
return t.push(...h({
|
|
3258
3313
|
normalized: n,
|
|
@@ -3276,7 +3331,7 @@ function en(e = {}) {
|
|
|
3276
3331
|
}
|
|
3277
3332
|
//#endregion
|
|
3278
3333
|
//#region api/vtk/helpers.js
|
|
3279
|
-
function
|
|
3334
|
+
function V(e, t, n, r, i) {
|
|
3280
3335
|
let a = e[t];
|
|
3281
3336
|
if (a == null || a === "") {
|
|
3282
3337
|
i[t] = n;
|
|
@@ -3288,24 +3343,24 @@ function z(e, t, n, r, i) {
|
|
|
3288
3343
|
}
|
|
3289
3344
|
i[t] = a;
|
|
3290
3345
|
}
|
|
3291
|
-
function
|
|
3346
|
+
function rn(e) {
|
|
3292
3347
|
let t = [];
|
|
3293
3348
|
if (!e || !Array.isArray(e)) return t.push("[coordinates] 为必填项,且必须是数组类型"), t;
|
|
3294
3349
|
if (e.length < 3) return t.push("[coordinates]包含:[x, y, z]"), t;
|
|
3295
3350
|
let [n, r, i] = e;
|
|
3296
3351
|
return d(n) || t.push("[coordinates[0]]必须是数字类型"), d(r) || t.push("[coordinates[1]]必须是数字类型"), d(i) || t.push("[coordinates[2]]必须是数字类型"), t;
|
|
3297
3352
|
}
|
|
3298
|
-
function
|
|
3353
|
+
function an(e, t, n) {
|
|
3299
3354
|
let r = e.coordinates;
|
|
3300
3355
|
if (r == null || r === "" || Array.isArray(r) && r.length === 0) {
|
|
3301
3356
|
n.coordinates = [];
|
|
3302
3357
|
return;
|
|
3303
3358
|
}
|
|
3304
|
-
n.isUseUePos ? t.push(...
|
|
3359
|
+
n.isUseUePos ? t.push(...rn(r)) : t.push(...f(r)), Array.isArray(r) && r.length >= 3 && (n.coordinates = r.slice(0, 3).map(Number));
|
|
3305
3360
|
}
|
|
3306
3361
|
//#endregion
|
|
3307
3362
|
//#region api/vtk/create.js
|
|
3308
|
-
function
|
|
3363
|
+
function on(e) {
|
|
3309
3364
|
let t = [];
|
|
3310
3365
|
if (!e || !Array.isArray(e)) t.push("[coordinates] 为必填项,且必须是数组类型");
|
|
3311
3366
|
else if (e.length < 3) t.push("[coordinates]包含:[x, y, z]");
|
|
@@ -3315,7 +3370,7 @@ function rn(e) {
|
|
|
3315
3370
|
}
|
|
3316
3371
|
return t;
|
|
3317
3372
|
}
|
|
3318
|
-
function
|
|
3373
|
+
function sn(e = {}) {
|
|
3319
3374
|
let t = [], n = { ...e };
|
|
3320
3375
|
return t.push(...h({
|
|
3321
3376
|
normalized: n,
|
|
@@ -3325,7 +3380,7 @@ function an(e = {}) {
|
|
|
3325
3380
|
normalized: n,
|
|
3326
3381
|
field: "url",
|
|
3327
3382
|
value: e.url
|
|
3328
|
-
})),
|
|
3383
|
+
})), V(e, "isUseUePos", !1, t, n), n.isUseUePos ? (t.push(...on(e.coordinates)), Array.isArray(e.coordinates) && e.coordinates.length >= 3 && (n.coordinates = e.coordinates.slice(0, 3).map(Number))) : t.push(...f(e.coordinates)), t.push(...v({
|
|
3329
3384
|
normalized: n,
|
|
3330
3385
|
field: "rotation",
|
|
3331
3386
|
value: e.rotation,
|
|
@@ -3350,7 +3405,7 @@ function an(e = {}) {
|
|
|
3350
3405
|
}
|
|
3351
3406
|
//#endregion
|
|
3352
3407
|
//#region api/vtk/close.js
|
|
3353
|
-
function
|
|
3408
|
+
function cn(e = {}) {
|
|
3354
3409
|
let t = [], n = { ...e };
|
|
3355
3410
|
return t.push(...h({
|
|
3356
3411
|
normalized: n,
|
|
@@ -3363,7 +3418,7 @@ function on(e = {}) {
|
|
|
3363
3418
|
}
|
|
3364
3419
|
//#endregion
|
|
3365
3420
|
//#region api/vtk/allClose.js
|
|
3366
|
-
function
|
|
3421
|
+
function ln(e = {}) {
|
|
3367
3422
|
return {
|
|
3368
3423
|
errors: [],
|
|
3369
3424
|
normalized: { ...e }
|
|
@@ -3371,7 +3426,7 @@ function sn(e = {}) {
|
|
|
3371
3426
|
}
|
|
3372
3427
|
//#endregion
|
|
3373
3428
|
//#region api/vtk/clearCacheByUrl.js
|
|
3374
|
-
function
|
|
3429
|
+
function un(e = {}) {
|
|
3375
3430
|
let t = [], n = { ...e };
|
|
3376
3431
|
return t.push(...h({
|
|
3377
3432
|
normalized: n,
|
|
@@ -3384,15 +3439,15 @@ function cn(e = {}) {
|
|
|
3384
3439
|
}
|
|
3385
3440
|
//#endregion
|
|
3386
3441
|
//#region api/vtk/clearAllCache.js
|
|
3387
|
-
function
|
|
3442
|
+
function dn(e = {}) {
|
|
3388
3443
|
return {
|
|
3389
3444
|
errors: [],
|
|
3390
3445
|
normalized: { ...e }
|
|
3391
3446
|
};
|
|
3392
3447
|
}
|
|
3393
3448
|
//#endregion
|
|
3394
|
-
//#region api/vtk/
|
|
3395
|
-
function
|
|
3449
|
+
//#region api/vtk/setDisplacementScale.js
|
|
3450
|
+
function fn(e = {}) {
|
|
3396
3451
|
let t = [], n = { ...e };
|
|
3397
3452
|
return t.push(...h({
|
|
3398
3453
|
normalized: n,
|
|
@@ -3402,7 +3457,13 @@ function un(e = {}) {
|
|
|
3402
3457
|
normalized: n,
|
|
3403
3458
|
field: "fieldName",
|
|
3404
3459
|
value: e.fieldName
|
|
3405
|
-
})), t.push(...
|
|
3460
|
+
})), t.push(...m({
|
|
3461
|
+
normalized: n,
|
|
3462
|
+
field: "scale",
|
|
3463
|
+
value: e.scale,
|
|
3464
|
+
defaultValue: 1,
|
|
3465
|
+
min: 1
|
|
3466
|
+
})), typeof n.scale == "number" && n.scale <= 0 && t.push("[scale]取值必须大于0"), t.push(..._({
|
|
3406
3467
|
normalized: n,
|
|
3407
3468
|
field: "indexList",
|
|
3408
3469
|
value: e.indexList,
|
|
@@ -3415,32 +3476,62 @@ function un(e = {}) {
|
|
|
3415
3476
|
};
|
|
3416
3477
|
}
|
|
3417
3478
|
//#endregion
|
|
3418
|
-
//#region api/vtk/
|
|
3419
|
-
function
|
|
3479
|
+
//#region api/vtk/closeDisplacementScale.js
|
|
3480
|
+
function pn(e = {}) {
|
|
3420
3481
|
let t = [], n = { ...e };
|
|
3421
3482
|
return t.push(...h({
|
|
3422
3483
|
normalized: n,
|
|
3423
3484
|
field: "id",
|
|
3424
3485
|
value: e.id
|
|
3425
|
-
})),
|
|
3486
|
+
})), {
|
|
3487
|
+
errors: t,
|
|
3488
|
+
normalized: n
|
|
3489
|
+
};
|
|
3490
|
+
}
|
|
3491
|
+
//#endregion
|
|
3492
|
+
//#region api/vtk/onMouseClick.js
|
|
3493
|
+
function mn(e = {}) {
|
|
3494
|
+
let t = [], n = { ...e };
|
|
3495
|
+
return t.push(...h({
|
|
3426
3496
|
normalized: n,
|
|
3427
|
-
field: "
|
|
3428
|
-
value: e.
|
|
3429
|
-
defaultValue: "Heatmap",
|
|
3430
|
-
type: "string",
|
|
3431
|
-
list: [
|
|
3432
|
-
"Heatmap",
|
|
3433
|
-
"Wireframe",
|
|
3434
|
-
"Mixed"
|
|
3435
|
-
]
|
|
3497
|
+
field: "id",
|
|
3498
|
+
value: e.id
|
|
3436
3499
|
})), {
|
|
3437
3500
|
errors: t,
|
|
3438
3501
|
normalized: n
|
|
3439
3502
|
};
|
|
3440
3503
|
}
|
|
3441
3504
|
//#endregion
|
|
3442
|
-
//#region api/vtk/
|
|
3443
|
-
function
|
|
3505
|
+
//#region api/vtk/offMouseClick.js
|
|
3506
|
+
function hn(e = {}) {
|
|
3507
|
+
let t = [], n = { ...e };
|
|
3508
|
+
return t.push(...h({
|
|
3509
|
+
normalized: n,
|
|
3510
|
+
field: "id",
|
|
3511
|
+
value: e.id
|
|
3512
|
+
})), {
|
|
3513
|
+
errors: t,
|
|
3514
|
+
normalized: n
|
|
3515
|
+
};
|
|
3516
|
+
}
|
|
3517
|
+
//#endregion
|
|
3518
|
+
//#region api/vtk/vtkSingleApi.js
|
|
3519
|
+
var gn = {
|
|
3520
|
+
getInfo: tn,
|
|
3521
|
+
getFieldRange: nn,
|
|
3522
|
+
create: sn,
|
|
3523
|
+
close: cn,
|
|
3524
|
+
allClose: ln,
|
|
3525
|
+
clearCacheByUrl: un,
|
|
3526
|
+
clearAllCache: dn,
|
|
3527
|
+
setDisplacementScale: fn,
|
|
3528
|
+
closeDisplacementScale: pn,
|
|
3529
|
+
onMouseClick: mn,
|
|
3530
|
+
offMouseClick: hn
|
|
3531
|
+
};
|
|
3532
|
+
//#endregion
|
|
3533
|
+
//#region api/vtk/setField.js
|
|
3534
|
+
function _n(e = {}) {
|
|
3444
3535
|
let t = [], n = { ...e };
|
|
3445
3536
|
return t.push(...h({
|
|
3446
3537
|
normalized: n,
|
|
@@ -3452,57 +3543,52 @@ function fn(e = {}) {
|
|
|
3452
3543
|
value: e.fieldName
|
|
3453
3544
|
})), t.push(..._({
|
|
3454
3545
|
normalized: n,
|
|
3455
|
-
field: "
|
|
3456
|
-
value: e.
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
}), n.cellTypes = n.cellTypes.map(Number)), t.push(...m({
|
|
3462
|
-
normalized: n,
|
|
3463
|
-
field: "value",
|
|
3464
|
-
value: e.value,
|
|
3465
|
-
defaultValue: 0,
|
|
3466
|
-
min: 0,
|
|
3467
|
-
max: 1
|
|
3468
|
-
})), {
|
|
3546
|
+
field: "indexList",
|
|
3547
|
+
value: e.indexList,
|
|
3548
|
+
defaultValue: []
|
|
3549
|
+
})), Array.isArray(n.indexList) && (n.indexList.forEach((e, n) => {
|
|
3550
|
+
Number.isFinite(Number(e)) || t.push(`[indexList[${n}]]必须是数字`);
|
|
3551
|
+
}), n.indexList = n.indexList.map(Number)), {
|
|
3469
3552
|
errors: t,
|
|
3470
3553
|
normalized: n
|
|
3471
3554
|
};
|
|
3472
3555
|
}
|
|
3473
3556
|
//#endregion
|
|
3474
|
-
//#region api/vtk/
|
|
3475
|
-
function
|
|
3557
|
+
//#region api/vtk/setMode.js
|
|
3558
|
+
function vn(e = {}) {
|
|
3476
3559
|
let t = [], n = { ...e };
|
|
3477
|
-
|
|
3560
|
+
return t.push(...h({
|
|
3478
3561
|
normalized: n,
|
|
3479
3562
|
field: "id",
|
|
3480
3563
|
value: e.id
|
|
3481
|
-
})),
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3564
|
+
})), t.push(...b({
|
|
3565
|
+
normalized: n,
|
|
3566
|
+
field: "mode",
|
|
3567
|
+
value: e.mode,
|
|
3568
|
+
defaultValue: "Heatmap",
|
|
3569
|
+
type: "string",
|
|
3570
|
+
list: [
|
|
3571
|
+
"Heatmap",
|
|
3572
|
+
"Wireframe",
|
|
3573
|
+
"Mixed",
|
|
3574
|
+
"Contour",
|
|
3575
|
+
"ContourMixed"
|
|
3576
|
+
]
|
|
3577
|
+
})), {
|
|
3492
3578
|
errors: t,
|
|
3493
3579
|
normalized: n
|
|
3494
3580
|
};
|
|
3495
3581
|
}
|
|
3496
3582
|
//#endregion
|
|
3497
3583
|
//#region api/vtk/setColorBar.js
|
|
3498
|
-
var
|
|
3584
|
+
var yn = {
|
|
3499
3585
|
0: "#0000FFFF",
|
|
3500
3586
|
"0.25": "#00FFFFFF",
|
|
3501
3587
|
"0.5": "#00FF00FF",
|
|
3502
3588
|
"0.75": "#FFFF00FF",
|
|
3503
3589
|
1: "#FF0000FF"
|
|
3504
3590
|
};
|
|
3505
|
-
function
|
|
3591
|
+
function bn(e = {}) {
|
|
3506
3592
|
let t = [], n = { ...e };
|
|
3507
3593
|
t.push(...h({
|
|
3508
3594
|
normalized: n,
|
|
@@ -3510,7 +3596,7 @@ function hn(e = {}) {
|
|
|
3510
3596
|
value: e.id
|
|
3511
3597
|
}));
|
|
3512
3598
|
let r = e.colorBar;
|
|
3513
|
-
if (r == null || r === "") n.colorBar = { ...
|
|
3599
|
+
if (r == null || r === "") n.colorBar = { ...yn };
|
|
3514
3600
|
else if (typeof r != "object" || Array.isArray(r)) t.push("[colorBar]必须是对象类型");
|
|
3515
3601
|
else {
|
|
3516
3602
|
let e = Object.keys(r);
|
|
@@ -3548,7 +3634,7 @@ function hn(e = {}) {
|
|
|
3548
3634
|
}
|
|
3549
3635
|
//#endregion
|
|
3550
3636
|
//#region api/vtk/setOpacity.js
|
|
3551
|
-
function
|
|
3637
|
+
function xn(e = {}) {
|
|
3552
3638
|
let t = [], n = { ...e };
|
|
3553
3639
|
return t.push(...h({
|
|
3554
3640
|
normalized: n,
|
|
@@ -3567,8 +3653,8 @@ function gn(e = {}) {
|
|
|
3567
3653
|
};
|
|
3568
3654
|
}
|
|
3569
3655
|
//#endregion
|
|
3570
|
-
//#region api/vtk/
|
|
3571
|
-
function
|
|
3656
|
+
//#region api/vtk/setCellOpacity.js
|
|
3657
|
+
function Sn(e = {}) {
|
|
3572
3658
|
let t = [], n = { ...e };
|
|
3573
3659
|
return t.push(...h({
|
|
3574
3660
|
normalized: n,
|
|
@@ -3578,66 +3664,143 @@ function _n(e = {}) {
|
|
|
3578
3664
|
normalized: n,
|
|
3579
3665
|
field: "fieldName",
|
|
3580
3666
|
value: e.fieldName
|
|
3581
|
-
})), t.push(...
|
|
3667
|
+
})), t.push(..._({
|
|
3582
3668
|
normalized: n,
|
|
3583
|
-
field: "
|
|
3584
|
-
value: e.
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
})),
|
|
3669
|
+
field: "cellTypes",
|
|
3670
|
+
value: e.cellTypes,
|
|
3671
|
+
required: !0,
|
|
3672
|
+
minLength: 1
|
|
3673
|
+
})), Array.isArray(n.cellTypes) && (n.cellTypes.forEach((e, n) => {
|
|
3674
|
+
Number.isFinite(Number(e)) || t.push(`[cellTypes[${n}]]必须是数字`);
|
|
3675
|
+
}), n.cellTypes = n.cellTypes.map(Number)), t.push(...m({
|
|
3588
3676
|
normalized: n,
|
|
3589
|
-
field: "
|
|
3590
|
-
value: e.
|
|
3591
|
-
defaultValue:
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
})
|
|
3677
|
+
field: "value",
|
|
3678
|
+
value: e.value,
|
|
3679
|
+
defaultValue: 0,
|
|
3680
|
+
min: 0,
|
|
3681
|
+
max: 1
|
|
3682
|
+
})), {
|
|
3595
3683
|
errors: t,
|
|
3596
3684
|
normalized: n
|
|
3597
3685
|
};
|
|
3598
3686
|
}
|
|
3599
3687
|
//#endregion
|
|
3600
|
-
//#region api/vtk/
|
|
3601
|
-
function
|
|
3688
|
+
//#region api/vtk/setColorRange.js
|
|
3689
|
+
function Cn(e = {}) {
|
|
3602
3690
|
let t = [], n = { ...e };
|
|
3603
|
-
|
|
3691
|
+
if (t.push(...h({
|
|
3604
3692
|
normalized: n,
|
|
3605
3693
|
field: "id",
|
|
3606
3694
|
value: e.id
|
|
3607
|
-
})),
|
|
3695
|
+
})), e.list === void 0 || e.list === null || e.list === "") n.list = [0, 1];
|
|
3696
|
+
else if (!Array.isArray(e.list) || e.list.length < 2) t.push("[list]必须是包含2个元素的数组");
|
|
3697
|
+
else {
|
|
3698
|
+
let r = e.list.slice(0, 2).map(Number);
|
|
3699
|
+
if (!r.every((e) => Number.isFinite(e))) t.push("[list]数组元素必须是数字");
|
|
3700
|
+
else {
|
|
3701
|
+
let e = !0;
|
|
3702
|
+
r[0] < 0 && (t.push("[list[0]]取值不能小于0"), e = !1), r[1] > 1 && (t.push("[list[1]]取值不能大于1"), e = !1), e && (n.list = r);
|
|
3703
|
+
}
|
|
3704
|
+
}
|
|
3705
|
+
return {
|
|
3608
3706
|
errors: t,
|
|
3609
3707
|
normalized: n
|
|
3610
3708
|
};
|
|
3611
3709
|
}
|
|
3612
3710
|
//#endregion
|
|
3613
|
-
//#region api/vtk/
|
|
3614
|
-
function
|
|
3711
|
+
//#region api/vtk/setClipPlane.js
|
|
3712
|
+
function H(e, t, n, r, i) {
|
|
3713
|
+
let a = e[t];
|
|
3714
|
+
if (a == null || a === "" || Array.isArray(a) && a.length === 0) {
|
|
3715
|
+
i[t] = [...n];
|
|
3716
|
+
return;
|
|
3717
|
+
}
|
|
3718
|
+
if (!Array.isArray(a) || a.length < 3) {
|
|
3719
|
+
r.push(`[${t}]必须是包含3个元素的数组`);
|
|
3720
|
+
return;
|
|
3721
|
+
}
|
|
3722
|
+
let o = a.slice(0, 3).map(Number);
|
|
3723
|
+
if (!o.every((e) => Number.isFinite(e))) {
|
|
3724
|
+
r.push(`[${t}]数组元素必须是数字`);
|
|
3725
|
+
return;
|
|
3726
|
+
}
|
|
3727
|
+
i[t] = o;
|
|
3728
|
+
}
|
|
3729
|
+
function wn(e = {}) {
|
|
3615
3730
|
let t = [], n = { ...e };
|
|
3616
3731
|
return t.push(...h({
|
|
3617
3732
|
normalized: n,
|
|
3618
3733
|
field: "id",
|
|
3619
3734
|
value: e.id
|
|
3620
|
-
})),
|
|
3735
|
+
})), V(e, "enable", !0, t, n), H(e, "planePoint", [
|
|
3736
|
+
0,
|
|
3737
|
+
0,
|
|
3738
|
+
0
|
|
3739
|
+
], t, n), H(e, "planeNormal", [
|
|
3740
|
+
0,
|
|
3741
|
+
0,
|
|
3742
|
+
-1
|
|
3743
|
+
], t, n), {
|
|
3621
3744
|
errors: t,
|
|
3622
3745
|
normalized: n
|
|
3623
3746
|
};
|
|
3624
3747
|
}
|
|
3625
3748
|
//#endregion
|
|
3626
|
-
//#region api/vtk/
|
|
3627
|
-
function
|
|
3749
|
+
//#region api/vtk/setClipPlaneByRatio.js
|
|
3750
|
+
function Tn(e, t, n, r, i) {
|
|
3751
|
+
let a = e[t];
|
|
3752
|
+
if (a == null || a === "" || Array.isArray(a) && a.length === 0) {
|
|
3753
|
+
i[t] = [...n];
|
|
3754
|
+
return;
|
|
3755
|
+
}
|
|
3756
|
+
if (!Array.isArray(a) || a.length < 3) {
|
|
3757
|
+
r.push(`[${t}]必须是包含3个元素的数组`);
|
|
3758
|
+
return;
|
|
3759
|
+
}
|
|
3760
|
+
let o = a.slice(0, 3).map(Number);
|
|
3761
|
+
if (!o.every((e) => Number.isFinite(e))) {
|
|
3762
|
+
r.push(`[${t}]数组元素必须是数字`);
|
|
3763
|
+
return;
|
|
3764
|
+
}
|
|
3765
|
+
i[t] = o;
|
|
3766
|
+
}
|
|
3767
|
+
function En(e = {}) {
|
|
3628
3768
|
let t = [], n = { ...e };
|
|
3629
3769
|
return t.push(...h({
|
|
3630
3770
|
normalized: n,
|
|
3631
3771
|
field: "id",
|
|
3632
3772
|
value: e.id
|
|
3633
|
-
})), {
|
|
3773
|
+
})), V(e, "enable", !0, t, n), t.push(...m({
|
|
3774
|
+
normalized: n,
|
|
3775
|
+
field: "clipRatio",
|
|
3776
|
+
value: e.clipRatio,
|
|
3777
|
+
defaultValue: .5,
|
|
3778
|
+
min: 0,
|
|
3779
|
+
max: 1
|
|
3780
|
+
})), Tn(e, "planeNormal", [
|
|
3781
|
+
0,
|
|
3782
|
+
0,
|
|
3783
|
+
-1
|
|
3784
|
+
], t, n), {
|
|
3634
3785
|
errors: t,
|
|
3635
3786
|
normalized: n
|
|
3636
3787
|
};
|
|
3637
3788
|
}
|
|
3638
3789
|
//#endregion
|
|
3790
|
+
//#region api/vtk/vtkCommonApi.js
|
|
3791
|
+
var Dn = {
|
|
3792
|
+
setField: _n,
|
|
3793
|
+
setMode: vn,
|
|
3794
|
+
setColorBar: bn,
|
|
3795
|
+
setOpacity: xn,
|
|
3796
|
+
setCellOpacity: Sn,
|
|
3797
|
+
setColorRange: Cn,
|
|
3798
|
+
setClipPlane: wn,
|
|
3799
|
+
setClipPlaneByRatio: En
|
|
3800
|
+
};
|
|
3801
|
+
//#endregion
|
|
3639
3802
|
//#region api/vtk/playSequence.js
|
|
3640
|
-
function
|
|
3803
|
+
function On(e = {}) {
|
|
3641
3804
|
let t = [], n = { ...e };
|
|
3642
3805
|
t.push(...h({
|
|
3643
3806
|
normalized: n,
|
|
@@ -3671,7 +3834,7 @@ function xn(e = {}) {
|
|
|
3671
3834
|
value: e.playbackSpeed,
|
|
3672
3835
|
defaultValue: 1,
|
|
3673
3836
|
min: 0
|
|
3674
|
-
})), typeof n.playbackSpeed == "number" && n.playbackSpeed <= 0 && t.push("[playbackSpeed]取值必须大于0"),
|
|
3837
|
+
})), typeof n.playbackSpeed == "number" && n.playbackSpeed <= 0 && t.push("[playbackSpeed]取值必须大于0"), V(e, "isUseUePos", !1, t, n), an(e, t, n), t.push(...v({
|
|
3675
3838
|
normalized: n,
|
|
3676
3839
|
field: "rotation",
|
|
3677
3840
|
value: e.rotation,
|
|
@@ -3696,7 +3859,7 @@ function xn(e = {}) {
|
|
|
3696
3859
|
}
|
|
3697
3860
|
//#endregion
|
|
3698
3861
|
//#region api/vtk/pauseSequence.js
|
|
3699
|
-
function
|
|
3862
|
+
function kn(e = {}) {
|
|
3700
3863
|
let t = [], n = { ...e };
|
|
3701
3864
|
return t.push(...h({
|
|
3702
3865
|
normalized: n,
|
|
@@ -3709,7 +3872,7 @@ function Sn(e = {}) {
|
|
|
3709
3872
|
}
|
|
3710
3873
|
//#endregion
|
|
3711
3874
|
//#region api/vtk/stopSequence.js
|
|
3712
|
-
function
|
|
3875
|
+
function An(e = {}) {
|
|
3713
3876
|
let t = [], n = { ...e };
|
|
3714
3877
|
return t.push(...h({
|
|
3715
3878
|
normalized: n,
|
|
@@ -3722,7 +3885,7 @@ function Cn(e = {}) {
|
|
|
3722
3885
|
}
|
|
3723
3886
|
//#endregion
|
|
3724
3887
|
//#region api/vtk/setFrame.js
|
|
3725
|
-
function
|
|
3888
|
+
function jn(e = {}) {
|
|
3726
3889
|
let t = [], n = { ...e };
|
|
3727
3890
|
return t.push(...h({
|
|
3728
3891
|
normalized: n,
|
|
@@ -3741,7 +3904,7 @@ function wn(e = {}) {
|
|
|
3741
3904
|
}
|
|
3742
3905
|
//#endregion
|
|
3743
3906
|
//#region api/vtk/setPlaybackSpeed.js
|
|
3744
|
-
function
|
|
3907
|
+
function Mn(e = {}) {
|
|
3745
3908
|
let t = [], n = { ...e };
|
|
3746
3909
|
return t.push(...h({
|
|
3747
3910
|
normalized: n,
|
|
@@ -3760,57 +3923,44 @@ function Tn(e = {}) {
|
|
|
3760
3923
|
}
|
|
3761
3924
|
//#endregion
|
|
3762
3925
|
//#region api/vtk/clearSequence.js
|
|
3763
|
-
function
|
|
3926
|
+
function Nn(e = {}) {
|
|
3764
3927
|
let t = [], n = { ...e };
|
|
3765
3928
|
return t.push(...h({
|
|
3766
3929
|
normalized: n,
|
|
3767
3930
|
field: "id",
|
|
3768
3931
|
value: e.id
|
|
3769
|
-
})),
|
|
3932
|
+
})), V(e, "isClearCache", !0, t, n), {
|
|
3770
3933
|
errors: t,
|
|
3771
3934
|
normalized: n
|
|
3772
3935
|
};
|
|
3773
3936
|
}
|
|
3774
3937
|
//#endregion
|
|
3775
3938
|
//#region api/vtk/clearAllSequence.js
|
|
3776
|
-
function
|
|
3939
|
+
function Pn(e = {}) {
|
|
3777
3940
|
let t = [], n = { ...e };
|
|
3778
|
-
return
|
|
3941
|
+
return V(e, "isClearCache", !0, t, n), {
|
|
3779
3942
|
errors: t,
|
|
3780
3943
|
normalized: n
|
|
3781
3944
|
};
|
|
3782
3945
|
}
|
|
3783
3946
|
//#endregion
|
|
3784
|
-
//#region api/vtk/
|
|
3785
|
-
var
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
setColorBar: hn,
|
|
3798
|
-
setOpacity: gn,
|
|
3799
|
-
setDisplacementScale: _n,
|
|
3800
|
-
closeDisplacementScale: vn,
|
|
3801
|
-
onMouseClick: yn,
|
|
3802
|
-
offMouseClick: bn,
|
|
3803
|
-
playSequence: xn,
|
|
3804
|
-
pauseSequence: Sn,
|
|
3805
|
-
stopSequence: Cn,
|
|
3806
|
-
setFrame: wn,
|
|
3807
|
-
setPlaybackSpeed: Tn,
|
|
3808
|
-
clearSequence: En,
|
|
3809
|
-
clearAllSequence: Dn
|
|
3947
|
+
//#region api/vtk/vtkAnimationApi.js
|
|
3948
|
+
var Fn = {
|
|
3949
|
+
playSequence: On,
|
|
3950
|
+
pauseSequence: kn,
|
|
3951
|
+
stopSequence: An,
|
|
3952
|
+
setFrame: jn,
|
|
3953
|
+
setPlaybackSpeed: Mn,
|
|
3954
|
+
clearSequence: Nn,
|
|
3955
|
+
clearAllSequence: Pn
|
|
3956
|
+
}, In = r("VTK", {
|
|
3957
|
+
...gn,
|
|
3958
|
+
...Dn,
|
|
3959
|
+
...Fn
|
|
3810
3960
|
}, { getOptions: () => ({ timeout: 0 }) });
|
|
3811
3961
|
//#endregion
|
|
3812
3962
|
//#region api/videoFusion/open.js
|
|
3813
|
-
function
|
|
3963
|
+
function Ln(e, t) {
|
|
3814
3964
|
if (t === "Geographic") return f(e);
|
|
3815
3965
|
let n = [];
|
|
3816
3966
|
if (!e || !Array.isArray(e)) n.push("[coordinates] 为必填项,且必须是数组类型");
|
|
@@ -3821,7 +3971,7 @@ function kn(e, t) {
|
|
|
3821
3971
|
}
|
|
3822
3972
|
return n;
|
|
3823
3973
|
}
|
|
3824
|
-
function
|
|
3974
|
+
function Rn(e = {}) {
|
|
3825
3975
|
let t = { ...e }, n = [];
|
|
3826
3976
|
return e.instanceId !== void 0 && e.instanceId !== null && e.instanceId !== "" ? typeof e.instanceId == "string" ? t.instanceId = e.instanceId : n.push("[instanceId]必须是字符串类型") : delete t.instanceId, n.push(...b({
|
|
3827
3977
|
normalized: t,
|
|
@@ -3830,7 +3980,7 @@ function An(e = {}) {
|
|
|
3830
3980
|
defaultValue: "Geographic",
|
|
3831
3981
|
type: "string",
|
|
3832
3982
|
list: ["UnrealWorld", "Geographic"]
|
|
3833
|
-
})), n.push(...
|
|
3983
|
+
})), n.push(...Ln(e.coordinates, t.poseMode)), n.push(...h({
|
|
3834
3984
|
normalized: t,
|
|
3835
3985
|
field: "url",
|
|
3836
3986
|
value: e.url
|
|
@@ -3904,7 +4054,7 @@ function An(e = {}) {
|
|
|
3904
4054
|
}
|
|
3905
4055
|
//#endregion
|
|
3906
4056
|
//#region api/videoFusion/close.js
|
|
3907
|
-
function
|
|
4057
|
+
function zn(e = {}) {
|
|
3908
4058
|
let t = { ...e };
|
|
3909
4059
|
return {
|
|
3910
4060
|
errors: [...h({
|
|
@@ -3917,7 +4067,7 @@ function jn(e = {}) {
|
|
|
3917
4067
|
}
|
|
3918
4068
|
//#endregion
|
|
3919
4069
|
//#region api/videoFusion/closeAll.js
|
|
3920
|
-
function
|
|
4070
|
+
function Bn(e = {}) {
|
|
3921
4071
|
return {
|
|
3922
4072
|
errors: [],
|
|
3923
4073
|
normalized: { ...e }
|
|
@@ -3925,7 +4075,7 @@ function Mn(e = {}) {
|
|
|
3925
4075
|
}
|
|
3926
4076
|
//#endregion
|
|
3927
4077
|
//#region api/videoFusion/pause.js
|
|
3928
|
-
function
|
|
4078
|
+
function Vn(e = {}) {
|
|
3929
4079
|
let t = { ...e };
|
|
3930
4080
|
return {
|
|
3931
4081
|
errors: [...h({
|
|
@@ -3938,7 +4088,7 @@ function Nn(e = {}) {
|
|
|
3938
4088
|
}
|
|
3939
4089
|
//#endregion
|
|
3940
4090
|
//#region api/videoFusion/resume.js
|
|
3941
|
-
function
|
|
4091
|
+
function Hn(e = {}) {
|
|
3942
4092
|
let t = { ...e };
|
|
3943
4093
|
return {
|
|
3944
4094
|
errors: [...h({
|
|
@@ -3951,7 +4101,7 @@ function Pn(e = {}) {
|
|
|
3951
4101
|
}
|
|
3952
4102
|
//#endregion
|
|
3953
4103
|
//#region api/videoFusion/setPlaybackRate.js
|
|
3954
|
-
function
|
|
4104
|
+
function Un(e = {}) {
|
|
3955
4105
|
let t = { ...e }, n = [];
|
|
3956
4106
|
return n.push(...h({
|
|
3957
4107
|
normalized: t,
|
|
@@ -3970,7 +4120,7 @@ function Fn(e = {}) {
|
|
|
3970
4120
|
}
|
|
3971
4121
|
//#endregion
|
|
3972
4122
|
//#region api/videoFusion/seekToTime.js
|
|
3973
|
-
function
|
|
4123
|
+
function Wn(e = {}) {
|
|
3974
4124
|
let t = { ...e }, n = [];
|
|
3975
4125
|
return n.push(...h({
|
|
3976
4126
|
normalized: t,
|
|
@@ -3989,18 +4139,18 @@ function In(e = {}) {
|
|
|
3989
4139
|
}
|
|
3990
4140
|
//#endregion
|
|
3991
4141
|
//#region api/videoFusion/videoFusionApi.js
|
|
3992
|
-
var
|
|
3993
|
-
open:
|
|
3994
|
-
close:
|
|
3995
|
-
closeAll:
|
|
3996
|
-
pause:
|
|
3997
|
-
resume:
|
|
3998
|
-
setPlaybackRate:
|
|
3999
|
-
seekToTime:
|
|
4142
|
+
var Gn = r("videoFusion", {
|
|
4143
|
+
open: Rn,
|
|
4144
|
+
close: zn,
|
|
4145
|
+
closeAll: Bn,
|
|
4146
|
+
pause: Vn,
|
|
4147
|
+
resume: Hn,
|
|
4148
|
+
setPlaybackRate: Un,
|
|
4149
|
+
seekToTime: Wn
|
|
4000
4150
|
});
|
|
4001
4151
|
//#endregion
|
|
4002
4152
|
//#region api/other/otherApi.js
|
|
4003
|
-
function
|
|
4153
|
+
function U(e) {
|
|
4004
4154
|
return class {
|
|
4005
4155
|
constructor(t) {
|
|
4006
4156
|
this.commandManager = t, this.domain = e;
|
|
@@ -4015,46 +4165,46 @@ function B(e) {
|
|
|
4015
4165
|
}
|
|
4016
4166
|
//#endregion
|
|
4017
4167
|
//#region api/index.js
|
|
4018
|
-
var
|
|
4168
|
+
var Kn = {
|
|
4019
4169
|
camera: ue,
|
|
4020
4170
|
cesium: Se,
|
|
4021
|
-
marker:
|
|
4022
|
-
floodPeak:
|
|
4023
|
-
animation:
|
|
4024
|
-
hydrodynamicForce:
|
|
4025
|
-
sceneModel:
|
|
4026
|
-
atmosphericEffects:
|
|
4027
|
-
tool:
|
|
4028
|
-
line:
|
|
4029
|
-
level:
|
|
4030
|
-
VTK:
|
|
4031
|
-
videoFusion:
|
|
4032
|
-
oneDimensionalHydrodynamics:
|
|
4033
|
-
customDomain:
|
|
4034
|
-
arrow:
|
|
4035
|
-
NC:
|
|
4036
|
-
gateOperation:
|
|
4037
|
-
},
|
|
4171
|
+
marker: Je,
|
|
4172
|
+
floodPeak: rt,
|
|
4173
|
+
animation: dt,
|
|
4174
|
+
hydrodynamicForce: vt,
|
|
4175
|
+
sceneModel: Rt,
|
|
4176
|
+
atmosphericEffects: Vt,
|
|
4177
|
+
tool: qt,
|
|
4178
|
+
line: Qt,
|
|
4179
|
+
level: en,
|
|
4180
|
+
VTK: In,
|
|
4181
|
+
videoFusion: Gn,
|
|
4182
|
+
oneDimensionalHydrodynamics: U("oneDimensionalHydrodynamics"),
|
|
4183
|
+
customDomain: U("customDomain"),
|
|
4184
|
+
arrow: U("arrow"),
|
|
4185
|
+
NC: U("NC"),
|
|
4186
|
+
gateOperation: U("gateOperation")
|
|
4187
|
+
}, W = class {
|
|
4038
4188
|
constructor(e) {
|
|
4039
4189
|
this._apis = {};
|
|
4040
|
-
for (let [t, n] of Object.entries(
|
|
4190
|
+
for (let [t, n] of Object.entries(Kn)) this._apis[t] = new n(e), this[t] = (e, n, r) => this._apis[t]._handleSend(e, n, r);
|
|
4041
4191
|
}
|
|
4042
|
-
},
|
|
4043
|
-
function
|
|
4044
|
-
|
|
4192
|
+
}, G = !0;
|
|
4193
|
+
function qn(e) {
|
|
4194
|
+
G = !!e;
|
|
4045
4195
|
}
|
|
4046
|
-
function
|
|
4047
|
-
|
|
4196
|
+
function K(...e) {
|
|
4197
|
+
G && console.log(...e);
|
|
4048
4198
|
}
|
|
4049
|
-
function
|
|
4050
|
-
|
|
4199
|
+
function q(...e) {
|
|
4200
|
+
G && console.warn(...e);
|
|
4051
4201
|
}
|
|
4052
|
-
function
|
|
4053
|
-
|
|
4202
|
+
function J(...e) {
|
|
4203
|
+
G && console.error(...e);
|
|
4054
4204
|
}
|
|
4055
4205
|
//#endregion
|
|
4056
4206
|
//#region commFlow/streamResponses.js
|
|
4057
|
-
function
|
|
4207
|
+
function Y(e) {
|
|
4058
4208
|
return (Array.isArray(e) ? e : [e]).map((e) => {
|
|
4059
4209
|
if (typeof e == "string") return e;
|
|
4060
4210
|
if (e && typeof e == "object") {
|
|
@@ -4068,7 +4218,7 @@ function K(e) {
|
|
|
4068
4218
|
return e == null ? "" : String(e);
|
|
4069
4219
|
}).filter((e) => e !== "");
|
|
4070
4220
|
}
|
|
4071
|
-
function
|
|
4221
|
+
function Jn(e, t, n) {
|
|
4072
4222
|
return {
|
|
4073
4223
|
success: !0,
|
|
4074
4224
|
message: e,
|
|
@@ -4076,27 +4226,27 @@ function Bn(e, t, n) {
|
|
|
4076
4226
|
command: n
|
|
4077
4227
|
};
|
|
4078
4228
|
}
|
|
4079
|
-
function
|
|
4229
|
+
function X(e, t, n) {
|
|
4080
4230
|
let r = {
|
|
4081
4231
|
success: !1,
|
|
4082
|
-
message:
|
|
4232
|
+
message: Y(e),
|
|
4083
4233
|
params: t,
|
|
4084
4234
|
command: n
|
|
4085
4235
|
};
|
|
4086
|
-
return
|
|
4236
|
+
return J("三维场景报错:", r), r;
|
|
4087
4237
|
}
|
|
4088
|
-
function
|
|
4238
|
+
function Yn(e, t, n) {
|
|
4089
4239
|
let r = {
|
|
4090
4240
|
success: !1,
|
|
4091
|
-
message:
|
|
4241
|
+
message: Y(e),
|
|
4092
4242
|
params: t,
|
|
4093
4243
|
command: n
|
|
4094
4244
|
};
|
|
4095
|
-
return
|
|
4245
|
+
return q("三维场景警告:", r), r;
|
|
4096
4246
|
}
|
|
4097
4247
|
//#endregion
|
|
4098
4248
|
//#region commFlow/commFlow.js
|
|
4099
|
-
function
|
|
4249
|
+
function Z() {
|
|
4100
4250
|
return {
|
|
4101
4251
|
Hovered: {},
|
|
4102
4252
|
Click: {},
|
|
@@ -4104,10 +4254,10 @@ function Y() {
|
|
|
4104
4254
|
Unhovered: {}
|
|
4105
4255
|
};
|
|
4106
4256
|
}
|
|
4107
|
-
function
|
|
4257
|
+
function Xn(e, t) {
|
|
4108
4258
|
typeof t == "function" && (e.includes(t) || e.push(t));
|
|
4109
4259
|
}
|
|
4110
|
-
function
|
|
4260
|
+
function Q(e) {
|
|
4111
4261
|
return {
|
|
4112
4262
|
prepare(t, n) {
|
|
4113
4263
|
return t._registerMarkerCallbacks(t[e], n);
|
|
@@ -4117,15 +4267,15 @@ function Z(e) {
|
|
|
4117
4267
|
}
|
|
4118
4268
|
};
|
|
4119
4269
|
}
|
|
4120
|
-
var
|
|
4121
|
-
"marker.iconMarker":
|
|
4122
|
-
"marker.iconUrlMarker":
|
|
4123
|
-
"marker.secondMarker":
|
|
4124
|
-
"marker.followMarker":
|
|
4270
|
+
var Zn = {
|
|
4271
|
+
"marker.iconMarker": Q("markerEventCallbacks"),
|
|
4272
|
+
"marker.iconUrlMarker": Q("markerEventCallbacks"),
|
|
4273
|
+
"marker.secondMarker": Q("secondMarkerEventCallbacks"),
|
|
4274
|
+
"marker.followMarker": Q("followMarkerEventCallbacks"),
|
|
4125
4275
|
"tool.onMouseClick": {
|
|
4126
4276
|
prepare(e, t) {
|
|
4127
4277
|
let { onMouseClick: n, ...r } = t || {};
|
|
4128
|
-
return
|
|
4278
|
+
return Xn(e.mouseClickCallback.MouseClick, n), r;
|
|
4129
4279
|
},
|
|
4130
4280
|
dispatch(e, t, n) {
|
|
4131
4281
|
return n.coordinates ? e._executeCallbacks(e.mouseClickCallback.MouseClick, t, n) : !1;
|
|
@@ -4153,7 +4303,7 @@ var Q = {
|
|
|
4153
4303
|
"animation.onData": {
|
|
4154
4304
|
prepare(e, t) {
|
|
4155
4305
|
let { onChange: n, ...r } = t || {};
|
|
4156
|
-
return
|
|
4306
|
+
return Xn(e.animationOnDataCallback.Change, n), r;
|
|
4157
4307
|
},
|
|
4158
4308
|
dispatch(e, t, n) {
|
|
4159
4309
|
return n.type ? e._executeCallbacks(e.animationOnDataCallback.Change, t, n) : !1;
|
|
@@ -4166,7 +4316,7 @@ var Q = {
|
|
|
4166
4316
|
});
|
|
4167
4317
|
}
|
|
4168
4318
|
_resetEventCallbacks() {
|
|
4169
|
-
this.markerEventCallbacks =
|
|
4319
|
+
this.markerEventCallbacks = Z(), this.secondMarkerEventCallbacks = Z(), this.followMarkerEventCallbacks = Z(), this.animationOnDataCallback = { Change: [] }, this.mouseClickCallback = { MouseClick: [] }, this.vtkMouseClickCallback = {};
|
|
4170
4320
|
}
|
|
4171
4321
|
destroy() {
|
|
4172
4322
|
if (!this._destroyed) {
|
|
@@ -4180,8 +4330,8 @@ var Q = {
|
|
|
4180
4330
|
}
|
|
4181
4331
|
sendWithDefault(e, t, n = {}) {
|
|
4182
4332
|
let r = this._sendPreparePayload(t, e.normalized || {});
|
|
4183
|
-
if (e.errors.length > 0) return
|
|
4184
|
-
if (this._destroyed || !this.transport) return
|
|
4333
|
+
if (e.errors.length > 0) return X(e.errors, r, t);
|
|
4334
|
+
if (this._destroyed || !this.transport) return X("连接已关闭,无法发送命令", r, t);
|
|
4185
4335
|
let i = (++this.requestId).toString(), a = n?.timeout === 0 ? 0 : n?.timeout ?? this.timeout, o = new Promise((e, t) => {
|
|
4186
4336
|
let n = null;
|
|
4187
4337
|
a !== 0 && (n = setTimeout(() => {
|
|
@@ -4196,18 +4346,18 @@ var Q = {
|
|
|
4196
4346
|
requestId: i,
|
|
4197
4347
|
params: r
|
|
4198
4348
|
};
|
|
4199
|
-
return
|
|
4349
|
+
return K("消息下发成功:", s), this.transport.sendTextToDataChannel(JSON.stringify(s)), o.then((e) => {
|
|
4200
4350
|
if (e && e.command && e.command === t) switch (e.status) {
|
|
4201
|
-
case "info": return
|
|
4202
|
-
case "warn": return
|
|
4203
|
-
default: return
|
|
4351
|
+
case "info": return Jn("操作执行成功", e.data, t);
|
|
4352
|
+
case "warn": return Yn(e.message, e.data, t);
|
|
4353
|
+
default: return X(e.message, e.data, t);
|
|
4204
4354
|
}
|
|
4205
|
-
return
|
|
4206
|
-
}).catch((e) => e && e.message ? e.message === "Command timeout with no results" ?
|
|
4355
|
+
return X("返回数据格式错乱【请注意command参数】", e?.command, t);
|
|
4356
|
+
}).catch((e) => e && e.message ? e.message === "Command timeout with no results" ? Yn(e.message, r, t) : X(e.message, r, t) : X("数据返回发生错误", r, t));
|
|
4207
4357
|
}
|
|
4208
4358
|
_handleRawResponse(e) {
|
|
4209
4359
|
if (this._destroyed) return null;
|
|
4210
|
-
if (!e) return
|
|
4360
|
+
if (!e) return J("数据第一步解析失败:", e), null;
|
|
4211
4361
|
let t;
|
|
4212
4362
|
try {
|
|
4213
4363
|
let n = JSON.parse(String(e).trim());
|
|
@@ -4219,7 +4369,7 @@ var Q = {
|
|
|
4219
4369
|
requestId: n.requestId || ""
|
|
4220
4370
|
}, t.message === "The data channel has been connected." || t.message === "The level has been initialized") return null;
|
|
4221
4371
|
} catch {
|
|
4222
|
-
return
|
|
4372
|
+
return J("数据第二步解析失败:", e), null;
|
|
4223
4373
|
}
|
|
4224
4374
|
if (this._processEventResponse(t)) return;
|
|
4225
4375
|
let { command: n, message: r, data: i, status: a, requestId: o } = t;
|
|
@@ -4233,7 +4383,7 @@ var Q = {
|
|
|
4233
4383
|
});
|
|
4234
4384
|
return;
|
|
4235
4385
|
}
|
|
4236
|
-
|
|
4386
|
+
q("注意:非常规响应", t);
|
|
4237
4387
|
}
|
|
4238
4388
|
_registerMarkerCallbacks(e, t) {
|
|
4239
4389
|
let { onMarkerClick: n, onMarkerDoubleClick: r, onMarkerDblClick: i, onMouseHover: a, onMouseLeave: o, ...s } = t || {}, c = r || i, l = s?.id, u = l != null && l !== "" ? l : "__default";
|
|
@@ -4249,27 +4399,27 @@ var Q = {
|
|
|
4249
4399
|
return this._executeCallback(o, t, n);
|
|
4250
4400
|
}
|
|
4251
4401
|
_sendPreparePayload(e, t) {
|
|
4252
|
-
let n =
|
|
4402
|
+
let n = Zn[e];
|
|
4253
4403
|
return n?.prepare ? n.prepare(this, t) : t;
|
|
4254
4404
|
}
|
|
4255
4405
|
_processEventResponse(e) {
|
|
4256
4406
|
if (!e) return !1;
|
|
4257
|
-
let { command: t, data: n = {} } = e, r =
|
|
4407
|
+
let { command: t, data: n = {} } = e, r = Zn[t];
|
|
4258
4408
|
return r?.dispatch ? r.dispatch(this, t, n) : !1;
|
|
4259
4409
|
}
|
|
4260
4410
|
_executeCallback(e, t, n) {
|
|
4261
|
-
if (typeof e != "function") return
|
|
4411
|
+
if (typeof e != "function") return K(`${t}未监听:${n.eventType}`), !0;
|
|
4262
4412
|
try {
|
|
4263
4413
|
return e(n), !0;
|
|
4264
4414
|
} catch (e) {
|
|
4265
|
-
return
|
|
4415
|
+
return J(`执行${t}回调出错:`, e, n), !0;
|
|
4266
4416
|
}
|
|
4267
4417
|
}
|
|
4268
4418
|
_executeCallbacks(e, t, n) {
|
|
4269
4419
|
return e ? Array.isArray(e) ? (e.forEach((e) => this._executeCallback(e, t, n)), !0) : this._executeCallback(e, t, n) : !1;
|
|
4270
4420
|
}
|
|
4271
4421
|
};
|
|
4272
|
-
function
|
|
4422
|
+
function Qn(e) {
|
|
4273
4423
|
if (!e) return "";
|
|
4274
4424
|
try {
|
|
4275
4425
|
return JSON.parse(String(e).trim())?.message || "";
|
|
@@ -4277,7 +4427,7 @@ function Vn(e) {
|
|
|
4277
4427
|
return "";
|
|
4278
4428
|
}
|
|
4279
4429
|
}
|
|
4280
|
-
function
|
|
4430
|
+
function $n(t = {}) {
|
|
4281
4431
|
let { sendText: n, commandTimeout: r = 3e3, onSceneInit: i } = t;
|
|
4282
4432
|
if (typeof n != "function") throw Error("createGameSession: sendText 必须是函数");
|
|
4283
4433
|
let a = null, o = !1, s = new $({
|
|
@@ -4287,11 +4437,11 @@ function Hn(t = {}) {
|
|
|
4287
4437
|
bindMessageHandler(e) {
|
|
4288
4438
|
a = e;
|
|
4289
4439
|
}
|
|
4290
|
-
}, { timeout: r }), c = new
|
|
4440
|
+
}, { timeout: r }), c = new W(s);
|
|
4291
4441
|
function l(e, t) {
|
|
4292
|
-
e && a && a(e), !o &&
|
|
4442
|
+
e && a && a(e), !o && Qn(e) === "The level has been initialized" && (o = !0, i ? i(t === void 0 ? e : t) : K("场景初始化加载成功", t === void 0 ? e : t));
|
|
4293
4443
|
}
|
|
4294
|
-
return
|
|
4444
|
+
return K(`插件初始化成功 [web3dlink@${e}]`), {
|
|
4295
4445
|
gameAPI: c,
|
|
4296
4446
|
commandManager: s,
|
|
4297
4447
|
handleIncoming: l,
|
|
@@ -4300,7 +4450,7 @@ function Hn(t = {}) {
|
|
|
4300
4450
|
}
|
|
4301
4451
|
};
|
|
4302
4452
|
}
|
|
4303
|
-
function
|
|
4453
|
+
function er(e, t, n) {
|
|
4304
4454
|
if (!(!e || !n)) {
|
|
4305
4455
|
if (typeof e.off == "function") {
|
|
4306
4456
|
e.off(t, n);
|
|
@@ -4309,10 +4459,10 @@ function Un(e, t, n) {
|
|
|
4309
4459
|
typeof e.removeListener == "function" && e.removeListener(t, n);
|
|
4310
4460
|
}
|
|
4311
4461
|
}
|
|
4312
|
-
function
|
|
4313
|
-
for (let { target: t, event: n, handler: r } of e)
|
|
4462
|
+
function tr(e = []) {
|
|
4463
|
+
for (let { target: t, event: n, handler: r } of e) er(t, n, r);
|
|
4314
4464
|
}
|
|
4315
4465
|
//#endregion
|
|
4316
|
-
export {
|
|
4466
|
+
export { J as a, e as c, K as i, tr as n, qn as o, $ as r, W as s, $n as t };
|
|
4317
4467
|
|
|
4318
|
-
//# sourceMappingURL=createGameSession-
|
|
4468
|
+
//# sourceMappingURL=createGameSession-M-AH_bw5.js.map
|