web3dlink 2.1.21 → 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-B7F0mf8j.js → createGameSession-M-AH_bw5.js} +276 -229
- package/dist/createGameSession-M-AH_bw5.js.map +1 -0
- package/dist/{linkFlowLarkSR-D8KzB4mT.js → linkFlowLarkSR-PjAxeKoE.js} +2 -2
- package/dist/{linkFlowLarkSR-D8KzB4mT.js.map → linkFlowLarkSR-PjAxeKoE.js.map} +1 -1
- package/dist/{linkFlowzsStream-DbhgylOU.js → linkFlowzsStream-BUld17Yw.js} +2 -2
- package/dist/{linkFlowzsStream-DbhgylOU.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 +8 -1
- package/dist/createGameSession-B7F0mf8j.js.map +0 -1
|
@@ -2,9 +2,16 @@
|
|
|
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
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
|
+
],
|
|
8
15
|
"2.1.21": [
|
|
9
16
|
"VTK 新增 setClipPlane 位置剖切、setClipPlaneByRatio 比例剖切",
|
|
10
17
|
"VTK setMode 新增 Contour、ContourMixed 模式",
|
|
@@ -2376,6 +2383,27 @@ function ft(e) {
|
|
|
2376
2383
|
};
|
|
2377
2384
|
}
|
|
2378
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
|
|
2379
2407
|
//#region api/hydrodynamicForce/waterFlow.js
|
|
2380
2408
|
function pt(e) {
|
|
2381
2409
|
let t = [], n = { ...e };
|
|
@@ -2420,7 +2448,7 @@ function pt(e) {
|
|
|
2420
2448
|
normalized: n,
|
|
2421
2449
|
field: "key",
|
|
2422
2450
|
value: e.key
|
|
2423
|
-
})), {
|
|
2451
|
+
})), t.push(...M(e.rangeList)), {
|
|
2424
2452
|
errors: t,
|
|
2425
2453
|
normalized: n
|
|
2426
2454
|
};
|
|
@@ -2440,22 +2468,7 @@ function mt(e) {
|
|
|
2440
2468
|
value: e.maxWater,
|
|
2441
2469
|
required: !0,
|
|
2442
2470
|
min: e.minWater
|
|
2443
|
-
})),
|
|
2444
|
-
if (typeof e != "object" || !e) {
|
|
2445
|
-
t.push(`[rangeList[${n}]]必须是对象类型`);
|
|
2446
|
-
return;
|
|
2447
|
-
}
|
|
2448
|
-
t.push(...p({
|
|
2449
|
-
normalized: e,
|
|
2450
|
-
field: "rangeDepth",
|
|
2451
|
-
value: e.rangeDepth,
|
|
2452
|
-
required: !0
|
|
2453
|
-
})), t.push(...h({
|
|
2454
|
-
normalized: e,
|
|
2455
|
-
field: "color",
|
|
2456
|
-
value: e.color
|
|
2457
|
-
}));
|
|
2458
|
-
}) : t.push("[rangeList]必须是数组类型"), t.push(...h({
|
|
2471
|
+
})), t.push(...M(e.rangeList, { required: !0 })), t.push(...h({
|
|
2459
2472
|
normalized: n,
|
|
2460
2473
|
field: "waterDepthUrl",
|
|
2461
2474
|
value: e.waterDepthUrl
|
|
@@ -2502,7 +2515,7 @@ function ht(e) {
|
|
|
2502
2515
|
value: e.maxDoD,
|
|
2503
2516
|
required: !0,
|
|
2504
2517
|
min: e.minDoD
|
|
2505
|
-
})), {
|
|
2518
|
+
})), t.push(...M(e.rangeList)), {
|
|
2506
2519
|
errors: t,
|
|
2507
2520
|
normalized: n
|
|
2508
2521
|
};
|
|
@@ -2612,9 +2625,9 @@ function bt(e) {
|
|
|
2612
2625
|
}
|
|
2613
2626
|
//#endregion
|
|
2614
2627
|
//#region api/sceneModel/helpers.js
|
|
2615
|
-
var
|
|
2616
|
-
function
|
|
2617
|
-
let r =
|
|
2628
|
+
var N = (e) => e != null && e !== "";
|
|
2629
|
+
function P(e, { id: t, tag: n }) {
|
|
2630
|
+
let r = N(t), i = N(n);
|
|
2618
2631
|
if (!r && !i) {
|
|
2619
2632
|
e.push("[id]和[tag]必须提供其中一个");
|
|
2620
2633
|
return;
|
|
@@ -2631,7 +2644,7 @@ function N(e, { id: t, tag: n }) {
|
|
|
2631
2644
|
value: n
|
|
2632
2645
|
}));
|
|
2633
2646
|
}
|
|
2634
|
-
function
|
|
2647
|
+
function F(e, t, n) {
|
|
2635
2648
|
if (e == null) return;
|
|
2636
2649
|
if (typeof e != "object") {
|
|
2637
2650
|
n.push(`[${t}]必须是对象类型`);
|
|
@@ -2660,8 +2673,34 @@ function P(e, t, n) {
|
|
|
2660
2673
|
}));
|
|
2661
2674
|
}
|
|
2662
2675
|
}
|
|
2663
|
-
function
|
|
2664
|
-
|
|
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) {
|
|
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);
|
|
2665
2704
|
!i && !a ? e.push("[ids]和[tags]必须提供其中一个") : i && a && e.push("[ids]和[tags]不能同时提供");
|
|
2666
2705
|
}
|
|
2667
2706
|
var xt = [
|
|
@@ -2670,7 +2709,7 @@ var xt = [
|
|
|
2670
2709
|
"Texture",
|
|
2671
2710
|
"Material"
|
|
2672
2711
|
];
|
|
2673
|
-
function
|
|
2712
|
+
function R(e, t, n, r, i) {
|
|
2674
2713
|
if (r == null) {
|
|
2675
2714
|
t[n] = i;
|
|
2676
2715
|
return;
|
|
@@ -2685,7 +2724,7 @@ function I(e, t, n, r, i) {
|
|
|
2685
2724
|
//#region api/sceneModel/setTransform.js
|
|
2686
2725
|
function St(e) {
|
|
2687
2726
|
let t = [], n = { ...e };
|
|
2688
|
-
return
|
|
2727
|
+
return P(t, e), F(e.rotation, "rotation", t), F(e.scale, "scale", t), F(e.translation, "translation", t), t.push(...m({
|
|
2689
2728
|
normalized: n,
|
|
2690
2729
|
field: "duration",
|
|
2691
2730
|
value: e.duration,
|
|
@@ -2696,7 +2735,7 @@ function St(e) {
|
|
|
2696
2735
|
t.push(`[list[${n}]]必须是对象类型`);
|
|
2697
2736
|
return;
|
|
2698
2737
|
}
|
|
2699
|
-
|
|
2738
|
+
F(e.rotation, `list[${n}].rotation`, t), F(e.scale, `list[${n}].scale`, t), F(e.translation, `list[${n}].translation`, t), t.push(...m({
|
|
2700
2739
|
normalized: e,
|
|
2701
2740
|
field: "duration",
|
|
2702
2741
|
value: e.duration,
|
|
@@ -2711,32 +2750,40 @@ function St(e) {
|
|
|
2711
2750
|
//#region api/sceneModel/clearTransform.js
|
|
2712
2751
|
function Ct(e) {
|
|
2713
2752
|
let t = [], n = { ...e };
|
|
2714
|
-
return
|
|
2753
|
+
return P(t, e), {
|
|
2715
2754
|
errors: t,
|
|
2716
2755
|
normalized: n
|
|
2717
2756
|
};
|
|
2718
2757
|
}
|
|
2719
2758
|
//#endregion
|
|
2720
2759
|
//#region api/sceneModel/offset.js
|
|
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
|
+
}
|
|
2721
2769
|
function wt(e) {
|
|
2722
2770
|
let t = [], n = { ...e };
|
|
2723
|
-
return
|
|
2771
|
+
return P(t, e), B(n, e, t), t.push(...m({
|
|
2724
2772
|
normalized: n,
|
|
2725
2773
|
field: "duration",
|
|
2726
2774
|
value: e.duration,
|
|
2727
2775
|
defaultValue: 0,
|
|
2728
2776
|
min: 0
|
|
2729
|
-
})), e.list !== void 0 && e.list !== null && (Array.isArray(e.list) ? e.list.
|
|
2730
|
-
if (typeof e != "object" || !e) {
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
P(e.rotation, `list[${n}].rotation`, t), P(e.scale, `list[${n}].scale`, t), P(e.translation, `list[${n}].translation`, t), t.push(...m({
|
|
2735
|
-
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,
|
|
2736
2782
|
field: "duration",
|
|
2737
2783
|
value: e.duration,
|
|
2784
|
+
defaultValue: 0,
|
|
2738
2785
|
min: 0
|
|
2739
|
-
}));
|
|
2786
|
+
})), r;
|
|
2740
2787
|
}) : t.push("[list]必须是数组类型")), {
|
|
2741
2788
|
errors: t,
|
|
2742
2789
|
normalized: n
|
|
@@ -2746,7 +2793,7 @@ function wt(e) {
|
|
|
2746
2793
|
//#region api/sceneModel/clearOffset.js
|
|
2747
2794
|
function Tt(e) {
|
|
2748
2795
|
let t = [], n = { ...e };
|
|
2749
|
-
return
|
|
2796
|
+
return P(t, e), {
|
|
2750
2797
|
errors: t,
|
|
2751
2798
|
normalized: n
|
|
2752
2799
|
};
|
|
@@ -2755,7 +2802,7 @@ function Tt(e) {
|
|
|
2755
2802
|
//#region api/sceneModel/show.js
|
|
2756
2803
|
function Et(e) {
|
|
2757
2804
|
let t = [], n = { ...e };
|
|
2758
|
-
return
|
|
2805
|
+
return L(t, e.ids, e.tags), {
|
|
2759
2806
|
errors: t,
|
|
2760
2807
|
normalized: n
|
|
2761
2808
|
};
|
|
@@ -2764,7 +2811,7 @@ function Et(e) {
|
|
|
2764
2811
|
//#region api/sceneModel/hide.js
|
|
2765
2812
|
function Dt(e) {
|
|
2766
2813
|
let t = [], n = { ...e };
|
|
2767
|
-
return
|
|
2814
|
+
return L(t, e.ids, e.tags), {
|
|
2768
2815
|
errors: t,
|
|
2769
2816
|
normalized: n
|
|
2770
2817
|
};
|
|
@@ -2773,7 +2820,7 @@ function Dt(e) {
|
|
|
2773
2820
|
//#region api/sceneModel/showOnly.js
|
|
2774
2821
|
function Ot(e) {
|
|
2775
2822
|
let t = [], n = { ...e };
|
|
2776
|
-
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, {
|
|
2777
2824
|
errors: t,
|
|
2778
2825
|
normalized: n
|
|
2779
2826
|
};
|
|
@@ -2782,7 +2829,7 @@ function Ot(e) {
|
|
|
2782
2829
|
//#region api/sceneModel/highLight.js
|
|
2783
2830
|
function kt(e) {
|
|
2784
2831
|
let t = [], n = { ...e };
|
|
2785
|
-
return
|
|
2832
|
+
return L(t, e.ids, e.tags), n.config ||= {}, t.push(...y({
|
|
2786
2833
|
normalized: n.config,
|
|
2787
2834
|
field: "color",
|
|
2788
2835
|
value: n.config.color,
|
|
@@ -2818,7 +2865,7 @@ function kt(e) {
|
|
|
2818
2865
|
//#region api/sceneModel/removeHighLight.js
|
|
2819
2866
|
function At(e) {
|
|
2820
2867
|
let t = [], n = { ...e };
|
|
2821
|
-
return
|
|
2868
|
+
return L(t, e.ids, e.tags), {
|
|
2822
2869
|
errors: t,
|
|
2823
2870
|
normalized: n
|
|
2824
2871
|
};
|
|
@@ -2827,7 +2874,7 @@ function At(e) {
|
|
|
2827
2874
|
//#region api/sceneModel/setOpacity.js
|
|
2828
2875
|
function jt(e) {
|
|
2829
2876
|
let t = [], n = { ...e };
|
|
2830
|
-
return
|
|
2877
|
+
return L(t, e.ids, e.tags), n.config ||= {}, t.push(...m({
|
|
2831
2878
|
normalized: n.config,
|
|
2832
2879
|
field: "opacity",
|
|
2833
2880
|
value: e.config?.opacity,
|
|
@@ -2844,7 +2891,7 @@ function jt(e) {
|
|
|
2844
2891
|
normalized: n.config,
|
|
2845
2892
|
field: "color",
|
|
2846
2893
|
value: e.config?.color,
|
|
2847
|
-
defaultValue: "#
|
|
2894
|
+
defaultValue: "#1A80CCFF"
|
|
2848
2895
|
})), {
|
|
2849
2896
|
errors: t,
|
|
2850
2897
|
normalized: n
|
|
@@ -2854,7 +2901,7 @@ function jt(e) {
|
|
|
2854
2901
|
//#region api/sceneModel/outline.js
|
|
2855
2902
|
function Mt(e) {
|
|
2856
2903
|
let t = [], n = { ...e };
|
|
2857
|
-
return
|
|
2904
|
+
return L(t, e.ids, e.tags), n.config ||= {}, t.push(...y({
|
|
2858
2905
|
normalized: n.config,
|
|
2859
2906
|
field: "color",
|
|
2860
2907
|
value: n.config.color,
|
|
@@ -2871,7 +2918,7 @@ function Mt(e) {
|
|
|
2871
2918
|
value: n.config.width,
|
|
2872
2919
|
defaultValue: 1,
|
|
2873
2920
|
min: 0
|
|
2874
|
-
})), 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({
|
|
2875
2922
|
normalized: n.config,
|
|
2876
2923
|
field: "meshColor",
|
|
2877
2924
|
value: n.config.meshColor,
|
|
@@ -2898,7 +2945,7 @@ function Mt(e) {
|
|
|
2898
2945
|
//#region api/sceneModel/removeOutline.js
|
|
2899
2946
|
function Nt(e) {
|
|
2900
2947
|
let t = [], n = { ...e };
|
|
2901
|
-
return
|
|
2948
|
+
return L(t, e.ids, e.tags), {
|
|
2902
2949
|
errors: t,
|
|
2903
2950
|
normalized: n
|
|
2904
2951
|
};
|
|
@@ -2953,7 +3000,7 @@ function Ft(e = {}) {
|
|
|
2953
3000
|
value: e.uvScale,
|
|
2954
3001
|
length: 2,
|
|
2955
3002
|
defaultValue: [1, 1]
|
|
2956
|
-
})),
|
|
3003
|
+
})), R(t, n, "isWorldUV", e.isWorldUV, !1), t.push(..._({
|
|
2957
3004
|
normalized: n,
|
|
2958
3005
|
field: "direction",
|
|
2959
3006
|
value: e.direction,
|
|
@@ -2963,7 +3010,7 @@ function Ft(e = {}) {
|
|
|
2963
3010
|
0,
|
|
2964
3011
|
-1
|
|
2965
3012
|
]
|
|
2966
|
-
})),
|
|
3013
|
+
})), R(t, n, "isWorldDirection", e.isWorldDirection, !1), t.push(...m({
|
|
2967
3014
|
normalized: n,
|
|
2968
3015
|
field: "ratio",
|
|
2969
3016
|
value: e.ratio,
|
|
@@ -3090,7 +3137,7 @@ function Ut(e) {
|
|
|
3090
3137
|
}
|
|
3091
3138
|
//#endregion
|
|
3092
3139
|
//#region api/tool/onDistance.js
|
|
3093
|
-
function
|
|
3140
|
+
function Wt(e) {
|
|
3094
3141
|
return {
|
|
3095
3142
|
errors: [],
|
|
3096
3143
|
normalized: { ...e }
|
|
@@ -3098,7 +3145,7 @@ function L(e) {
|
|
|
3098
3145
|
}
|
|
3099
3146
|
//#endregion
|
|
3100
3147
|
//#region api/tool/offDistance.js
|
|
3101
|
-
function
|
|
3148
|
+
function Gt(e) {
|
|
3102
3149
|
return {
|
|
3103
3150
|
errors: [],
|
|
3104
3151
|
normalized: { ...e }
|
|
@@ -3106,7 +3153,7 @@ function Wt(e) {
|
|
|
3106
3153
|
}
|
|
3107
3154
|
//#endregion
|
|
3108
3155
|
//#region api/tool/editConfigFile.js
|
|
3109
|
-
function
|
|
3156
|
+
function Kt(e) {
|
|
3110
3157
|
return {
|
|
3111
3158
|
errors: [],
|
|
3112
3159
|
normalized: { ...e }
|
|
@@ -3114,21 +3161,21 @@ function Gt(e) {
|
|
|
3114
3161
|
}
|
|
3115
3162
|
//#endregion
|
|
3116
3163
|
//#region api/tool/toolApi.js
|
|
3117
|
-
var
|
|
3164
|
+
var qt = r("tool", {
|
|
3118
3165
|
onMouseClick: Ht,
|
|
3119
3166
|
offMouseClick: Ut,
|
|
3120
|
-
onDistance:
|
|
3121
|
-
offDistance:
|
|
3122
|
-
editConfigFile:
|
|
3167
|
+
onDistance: Wt,
|
|
3168
|
+
offDistance: Gt,
|
|
3169
|
+
editConfigFile: Kt
|
|
3123
3170
|
});
|
|
3124
3171
|
//#endregion
|
|
3125
3172
|
//#region api/line/helpers.js
|
|
3126
|
-
function
|
|
3173
|
+
function Jt() {
|
|
3127
3174
|
return "line_" + Date.now() + "_" + Math.random().toString(36).substring(2, 9);
|
|
3128
3175
|
}
|
|
3129
3176
|
//#endregion
|
|
3130
3177
|
//#region api/line/addLine.js
|
|
3131
|
-
function
|
|
3178
|
+
function Yt(e) {
|
|
3132
3179
|
let t = [], n = { ...e };
|
|
3133
3180
|
if (!e.coordinates || !Array.isArray(e.coordinates)) t.push("[coordinates] 为必填项,且必须是数组类型");
|
|
3134
3181
|
else if (e.coordinates.length < 2) t.push("[coordinates] 至少需要2个坐标点才能绘制线条");
|
|
@@ -3159,7 +3206,7 @@ function Jt(e) {
|
|
|
3159
3206
|
value: e.width,
|
|
3160
3207
|
defaultValue: 1,
|
|
3161
3208
|
min: .1
|
|
3162
|
-
})), 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({
|
|
3163
3210
|
normalized: n,
|
|
3164
3211
|
field: "key",
|
|
3165
3212
|
value: e.key
|
|
@@ -3199,7 +3246,7 @@ function Jt(e) {
|
|
|
3199
3246
|
}
|
|
3200
3247
|
//#endregion
|
|
3201
3248
|
//#region api/line/clearLine.js
|
|
3202
|
-
function
|
|
3249
|
+
function Xt(e) {
|
|
3203
3250
|
let t = [], n = { ...e };
|
|
3204
3251
|
if (!e.key || !Array.isArray(e.key)) t.push("[key] 为必填项,且必须是数组类型");
|
|
3205
3252
|
else if (e.key.length === 0) t.push("[key] 至少需要一个线条标识");
|
|
@@ -3216,7 +3263,7 @@ function Yt(e) {
|
|
|
3216
3263
|
}
|
|
3217
3264
|
//#endregion
|
|
3218
3265
|
//#region api/line/clearAllLine.js
|
|
3219
|
-
function
|
|
3266
|
+
function Zt(e) {
|
|
3220
3267
|
return {
|
|
3221
3268
|
errors: [],
|
|
3222
3269
|
normalized: { ...e }
|
|
@@ -3224,14 +3271,14 @@ function Xt(e) {
|
|
|
3224
3271
|
}
|
|
3225
3272
|
//#endregion
|
|
3226
3273
|
//#region api/line/lineApi.js
|
|
3227
|
-
var
|
|
3228
|
-
addLine:
|
|
3229
|
-
clearLine:
|
|
3230
|
-
clearAllLine:
|
|
3274
|
+
var Qt = r("line", {
|
|
3275
|
+
addLine: Yt,
|
|
3276
|
+
clearLine: Xt,
|
|
3277
|
+
clearAllLine: Zt
|
|
3231
3278
|
});
|
|
3232
3279
|
//#endregion
|
|
3233
3280
|
//#region api/level/switch.js
|
|
3234
|
-
function
|
|
3281
|
+
function $t(e) {
|
|
3235
3282
|
let t = [], n = { ...e };
|
|
3236
3283
|
return t.push(...h({
|
|
3237
3284
|
normalized: n,
|
|
@@ -3244,10 +3291,10 @@ function Qt(e) {
|
|
|
3244
3291
|
}
|
|
3245
3292
|
//#endregion
|
|
3246
3293
|
//#region api/level/levelApi.js
|
|
3247
|
-
var
|
|
3294
|
+
var en = r("level", { switch: $t });
|
|
3248
3295
|
//#endregion
|
|
3249
3296
|
//#region api/vtk/getInfo.js
|
|
3250
|
-
function
|
|
3297
|
+
function tn(e = {}) {
|
|
3251
3298
|
let t = [], n = { ...e };
|
|
3252
3299
|
return t.push(...h({
|
|
3253
3300
|
normalized: n,
|
|
@@ -3260,7 +3307,7 @@ function en(e = {}) {
|
|
|
3260
3307
|
}
|
|
3261
3308
|
//#endregion
|
|
3262
3309
|
//#region api/vtk/getFieldRange.js
|
|
3263
|
-
function
|
|
3310
|
+
function nn(e = {}) {
|
|
3264
3311
|
let t = [], n = { ...e };
|
|
3265
3312
|
return t.push(...h({
|
|
3266
3313
|
normalized: n,
|
|
@@ -3284,7 +3331,7 @@ function tn(e = {}) {
|
|
|
3284
3331
|
}
|
|
3285
3332
|
//#endregion
|
|
3286
3333
|
//#region api/vtk/helpers.js
|
|
3287
|
-
function
|
|
3334
|
+
function V(e, t, n, r, i) {
|
|
3288
3335
|
let a = e[t];
|
|
3289
3336
|
if (a == null || a === "") {
|
|
3290
3337
|
i[t] = n;
|
|
@@ -3296,24 +3343,24 @@ function R(e, t, n, r, i) {
|
|
|
3296
3343
|
}
|
|
3297
3344
|
i[t] = a;
|
|
3298
3345
|
}
|
|
3299
|
-
function
|
|
3346
|
+
function rn(e) {
|
|
3300
3347
|
let t = [];
|
|
3301
3348
|
if (!e || !Array.isArray(e)) return t.push("[coordinates] 为必填项,且必须是数组类型"), t;
|
|
3302
3349
|
if (e.length < 3) return t.push("[coordinates]包含:[x, y, z]"), t;
|
|
3303
3350
|
let [n, r, i] = e;
|
|
3304
3351
|
return d(n) || t.push("[coordinates[0]]必须是数字类型"), d(r) || t.push("[coordinates[1]]必须是数字类型"), d(i) || t.push("[coordinates[2]]必须是数字类型"), t;
|
|
3305
3352
|
}
|
|
3306
|
-
function
|
|
3353
|
+
function an(e, t, n) {
|
|
3307
3354
|
let r = e.coordinates;
|
|
3308
3355
|
if (r == null || r === "" || Array.isArray(r) && r.length === 0) {
|
|
3309
3356
|
n.coordinates = [];
|
|
3310
3357
|
return;
|
|
3311
3358
|
}
|
|
3312
|
-
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));
|
|
3313
3360
|
}
|
|
3314
3361
|
//#endregion
|
|
3315
3362
|
//#region api/vtk/create.js
|
|
3316
|
-
function
|
|
3363
|
+
function on(e) {
|
|
3317
3364
|
let t = [];
|
|
3318
3365
|
if (!e || !Array.isArray(e)) t.push("[coordinates] 为必填项,且必须是数组类型");
|
|
3319
3366
|
else if (e.length < 3) t.push("[coordinates]包含:[x, y, z]");
|
|
@@ -3323,7 +3370,7 @@ function an(e) {
|
|
|
3323
3370
|
}
|
|
3324
3371
|
return t;
|
|
3325
3372
|
}
|
|
3326
|
-
function
|
|
3373
|
+
function sn(e = {}) {
|
|
3327
3374
|
let t = [], n = { ...e };
|
|
3328
3375
|
return t.push(...h({
|
|
3329
3376
|
normalized: n,
|
|
@@ -3333,7 +3380,7 @@ function on(e = {}) {
|
|
|
3333
3380
|
normalized: n,
|
|
3334
3381
|
field: "url",
|
|
3335
3382
|
value: e.url
|
|
3336
|
-
})),
|
|
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({
|
|
3337
3384
|
normalized: n,
|
|
3338
3385
|
field: "rotation",
|
|
3339
3386
|
value: e.rotation,
|
|
@@ -3358,7 +3405,7 @@ function on(e = {}) {
|
|
|
3358
3405
|
}
|
|
3359
3406
|
//#endregion
|
|
3360
3407
|
//#region api/vtk/close.js
|
|
3361
|
-
function
|
|
3408
|
+
function cn(e = {}) {
|
|
3362
3409
|
let t = [], n = { ...e };
|
|
3363
3410
|
return t.push(...h({
|
|
3364
3411
|
normalized: n,
|
|
@@ -3371,7 +3418,7 @@ function sn(e = {}) {
|
|
|
3371
3418
|
}
|
|
3372
3419
|
//#endregion
|
|
3373
3420
|
//#region api/vtk/allClose.js
|
|
3374
|
-
function
|
|
3421
|
+
function ln(e = {}) {
|
|
3375
3422
|
return {
|
|
3376
3423
|
errors: [],
|
|
3377
3424
|
normalized: { ...e }
|
|
@@ -3379,7 +3426,7 @@ function cn(e = {}) {
|
|
|
3379
3426
|
}
|
|
3380
3427
|
//#endregion
|
|
3381
3428
|
//#region api/vtk/clearCacheByUrl.js
|
|
3382
|
-
function
|
|
3429
|
+
function un(e = {}) {
|
|
3383
3430
|
let t = [], n = { ...e };
|
|
3384
3431
|
return t.push(...h({
|
|
3385
3432
|
normalized: n,
|
|
@@ -3392,7 +3439,7 @@ function ln(e = {}) {
|
|
|
3392
3439
|
}
|
|
3393
3440
|
//#endregion
|
|
3394
3441
|
//#region api/vtk/clearAllCache.js
|
|
3395
|
-
function
|
|
3442
|
+
function dn(e = {}) {
|
|
3396
3443
|
return {
|
|
3397
3444
|
errors: [],
|
|
3398
3445
|
normalized: { ...e }
|
|
@@ -3400,7 +3447,7 @@ function un(e = {}) {
|
|
|
3400
3447
|
}
|
|
3401
3448
|
//#endregion
|
|
3402
3449
|
//#region api/vtk/setDisplacementScale.js
|
|
3403
|
-
function
|
|
3450
|
+
function fn(e = {}) {
|
|
3404
3451
|
let t = [], n = { ...e };
|
|
3405
3452
|
return t.push(...h({
|
|
3406
3453
|
normalized: n,
|
|
@@ -3430,7 +3477,7 @@ function dn(e = {}) {
|
|
|
3430
3477
|
}
|
|
3431
3478
|
//#endregion
|
|
3432
3479
|
//#region api/vtk/closeDisplacementScale.js
|
|
3433
|
-
function
|
|
3480
|
+
function pn(e = {}) {
|
|
3434
3481
|
let t = [], n = { ...e };
|
|
3435
3482
|
return t.push(...h({
|
|
3436
3483
|
normalized: n,
|
|
@@ -3443,7 +3490,7 @@ function fn(e = {}) {
|
|
|
3443
3490
|
}
|
|
3444
3491
|
//#endregion
|
|
3445
3492
|
//#region api/vtk/onMouseClick.js
|
|
3446
|
-
function
|
|
3493
|
+
function mn(e = {}) {
|
|
3447
3494
|
let t = [], n = { ...e };
|
|
3448
3495
|
return t.push(...h({
|
|
3449
3496
|
normalized: n,
|
|
@@ -3456,7 +3503,7 @@ function pn(e = {}) {
|
|
|
3456
3503
|
}
|
|
3457
3504
|
//#endregion
|
|
3458
3505
|
//#region api/vtk/offMouseClick.js
|
|
3459
|
-
function
|
|
3506
|
+
function hn(e = {}) {
|
|
3460
3507
|
let t = [], n = { ...e };
|
|
3461
3508
|
return t.push(...h({
|
|
3462
3509
|
normalized: n,
|
|
@@ -3469,22 +3516,22 @@ function mn(e = {}) {
|
|
|
3469
3516
|
}
|
|
3470
3517
|
//#endregion
|
|
3471
3518
|
//#region api/vtk/vtkSingleApi.js
|
|
3472
|
-
var
|
|
3473
|
-
getInfo:
|
|
3474
|
-
getFieldRange:
|
|
3475
|
-
create:
|
|
3476
|
-
close:
|
|
3477
|
-
allClose:
|
|
3478
|
-
clearCacheByUrl:
|
|
3479
|
-
clearAllCache:
|
|
3480
|
-
setDisplacementScale:
|
|
3481
|
-
closeDisplacementScale:
|
|
3482
|
-
onMouseClick:
|
|
3483
|
-
offMouseClick:
|
|
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
|
|
3484
3531
|
};
|
|
3485
3532
|
//#endregion
|
|
3486
3533
|
//#region api/vtk/setField.js
|
|
3487
|
-
function
|
|
3534
|
+
function _n(e = {}) {
|
|
3488
3535
|
let t = [], n = { ...e };
|
|
3489
3536
|
return t.push(...h({
|
|
3490
3537
|
normalized: n,
|
|
@@ -3508,7 +3555,7 @@ function gn(e = {}) {
|
|
|
3508
3555
|
}
|
|
3509
3556
|
//#endregion
|
|
3510
3557
|
//#region api/vtk/setMode.js
|
|
3511
|
-
function
|
|
3558
|
+
function vn(e = {}) {
|
|
3512
3559
|
let t = [], n = { ...e };
|
|
3513
3560
|
return t.push(...h({
|
|
3514
3561
|
normalized: n,
|
|
@@ -3534,14 +3581,14 @@ function _n(e = {}) {
|
|
|
3534
3581
|
}
|
|
3535
3582
|
//#endregion
|
|
3536
3583
|
//#region api/vtk/setColorBar.js
|
|
3537
|
-
var
|
|
3584
|
+
var yn = {
|
|
3538
3585
|
0: "#0000FFFF",
|
|
3539
3586
|
"0.25": "#00FFFFFF",
|
|
3540
3587
|
"0.5": "#00FF00FF",
|
|
3541
3588
|
"0.75": "#FFFF00FF",
|
|
3542
3589
|
1: "#FF0000FF"
|
|
3543
3590
|
};
|
|
3544
|
-
function
|
|
3591
|
+
function bn(e = {}) {
|
|
3545
3592
|
let t = [], n = { ...e };
|
|
3546
3593
|
t.push(...h({
|
|
3547
3594
|
normalized: n,
|
|
@@ -3549,7 +3596,7 @@ function yn(e = {}) {
|
|
|
3549
3596
|
value: e.id
|
|
3550
3597
|
}));
|
|
3551
3598
|
let r = e.colorBar;
|
|
3552
|
-
if (r == null || r === "") n.colorBar = { ...
|
|
3599
|
+
if (r == null || r === "") n.colorBar = { ...yn };
|
|
3553
3600
|
else if (typeof r != "object" || Array.isArray(r)) t.push("[colorBar]必须是对象类型");
|
|
3554
3601
|
else {
|
|
3555
3602
|
let e = Object.keys(r);
|
|
@@ -3587,7 +3634,7 @@ function yn(e = {}) {
|
|
|
3587
3634
|
}
|
|
3588
3635
|
//#endregion
|
|
3589
3636
|
//#region api/vtk/setOpacity.js
|
|
3590
|
-
function
|
|
3637
|
+
function xn(e = {}) {
|
|
3591
3638
|
let t = [], n = { ...e };
|
|
3592
3639
|
return t.push(...h({
|
|
3593
3640
|
normalized: n,
|
|
@@ -3607,7 +3654,7 @@ function bn(e = {}) {
|
|
|
3607
3654
|
}
|
|
3608
3655
|
//#endregion
|
|
3609
3656
|
//#region api/vtk/setCellOpacity.js
|
|
3610
|
-
function
|
|
3657
|
+
function Sn(e = {}) {
|
|
3611
3658
|
let t = [], n = { ...e };
|
|
3612
3659
|
return t.push(...h({
|
|
3613
3660
|
normalized: n,
|
|
@@ -3639,7 +3686,7 @@ function xn(e = {}) {
|
|
|
3639
3686
|
}
|
|
3640
3687
|
//#endregion
|
|
3641
3688
|
//#region api/vtk/setColorRange.js
|
|
3642
|
-
function
|
|
3689
|
+
function Cn(e = {}) {
|
|
3643
3690
|
let t = [], n = { ...e };
|
|
3644
3691
|
if (t.push(...h({
|
|
3645
3692
|
normalized: n,
|
|
@@ -3662,7 +3709,7 @@ function Sn(e = {}) {
|
|
|
3662
3709
|
}
|
|
3663
3710
|
//#endregion
|
|
3664
3711
|
//#region api/vtk/setClipPlane.js
|
|
3665
|
-
function
|
|
3712
|
+
function H(e, t, n, r, i) {
|
|
3666
3713
|
let a = e[t];
|
|
3667
3714
|
if (a == null || a === "" || Array.isArray(a) && a.length === 0) {
|
|
3668
3715
|
i[t] = [...n];
|
|
@@ -3679,17 +3726,17 @@ function z(e, t, n, r, i) {
|
|
|
3679
3726
|
}
|
|
3680
3727
|
i[t] = o;
|
|
3681
3728
|
}
|
|
3682
|
-
function
|
|
3729
|
+
function wn(e = {}) {
|
|
3683
3730
|
let t = [], n = { ...e };
|
|
3684
3731
|
return t.push(...h({
|
|
3685
3732
|
normalized: n,
|
|
3686
3733
|
field: "id",
|
|
3687
3734
|
value: e.id
|
|
3688
|
-
})),
|
|
3735
|
+
})), V(e, "enable", !0, t, n), H(e, "planePoint", [
|
|
3689
3736
|
0,
|
|
3690
3737
|
0,
|
|
3691
3738
|
0
|
|
3692
|
-
], t, n),
|
|
3739
|
+
], t, n), H(e, "planeNormal", [
|
|
3693
3740
|
0,
|
|
3694
3741
|
0,
|
|
3695
3742
|
-1
|
|
@@ -3700,7 +3747,7 @@ function Cn(e = {}) {
|
|
|
3700
3747
|
}
|
|
3701
3748
|
//#endregion
|
|
3702
3749
|
//#region api/vtk/setClipPlaneByRatio.js
|
|
3703
|
-
function
|
|
3750
|
+
function Tn(e, t, n, r, i) {
|
|
3704
3751
|
let a = e[t];
|
|
3705
3752
|
if (a == null || a === "" || Array.isArray(a) && a.length === 0) {
|
|
3706
3753
|
i[t] = [...n];
|
|
@@ -3717,20 +3764,20 @@ function wn(e, t, n, r, i) {
|
|
|
3717
3764
|
}
|
|
3718
3765
|
i[t] = o;
|
|
3719
3766
|
}
|
|
3720
|
-
function
|
|
3767
|
+
function En(e = {}) {
|
|
3721
3768
|
let t = [], n = { ...e };
|
|
3722
3769
|
return t.push(...h({
|
|
3723
3770
|
normalized: n,
|
|
3724
3771
|
field: "id",
|
|
3725
3772
|
value: e.id
|
|
3726
|
-
})),
|
|
3773
|
+
})), V(e, "enable", !0, t, n), t.push(...m({
|
|
3727
3774
|
normalized: n,
|
|
3728
3775
|
field: "clipRatio",
|
|
3729
3776
|
value: e.clipRatio,
|
|
3730
3777
|
defaultValue: .5,
|
|
3731
3778
|
min: 0,
|
|
3732
3779
|
max: 1
|
|
3733
|
-
})),
|
|
3780
|
+
})), Tn(e, "planeNormal", [
|
|
3734
3781
|
0,
|
|
3735
3782
|
0,
|
|
3736
3783
|
-1
|
|
@@ -3741,19 +3788,19 @@ function Tn(e = {}) {
|
|
|
3741
3788
|
}
|
|
3742
3789
|
//#endregion
|
|
3743
3790
|
//#region api/vtk/vtkCommonApi.js
|
|
3744
|
-
var
|
|
3745
|
-
setField:
|
|
3746
|
-
setMode:
|
|
3747
|
-
setColorBar:
|
|
3748
|
-
setOpacity:
|
|
3749
|
-
setCellOpacity:
|
|
3750
|
-
setColorRange:
|
|
3751
|
-
setClipPlane:
|
|
3752
|
-
setClipPlaneByRatio:
|
|
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
|
|
3753
3800
|
};
|
|
3754
3801
|
//#endregion
|
|
3755
3802
|
//#region api/vtk/playSequence.js
|
|
3756
|
-
function
|
|
3803
|
+
function On(e = {}) {
|
|
3757
3804
|
let t = [], n = { ...e };
|
|
3758
3805
|
t.push(...h({
|
|
3759
3806
|
normalized: n,
|
|
@@ -3787,7 +3834,7 @@ function Dn(e = {}) {
|
|
|
3787
3834
|
value: e.playbackSpeed,
|
|
3788
3835
|
defaultValue: 1,
|
|
3789
3836
|
min: 0
|
|
3790
|
-
})), 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({
|
|
3791
3838
|
normalized: n,
|
|
3792
3839
|
field: "rotation",
|
|
3793
3840
|
value: e.rotation,
|
|
@@ -3812,7 +3859,7 @@ function Dn(e = {}) {
|
|
|
3812
3859
|
}
|
|
3813
3860
|
//#endregion
|
|
3814
3861
|
//#region api/vtk/pauseSequence.js
|
|
3815
|
-
function
|
|
3862
|
+
function kn(e = {}) {
|
|
3816
3863
|
let t = [], n = { ...e };
|
|
3817
3864
|
return t.push(...h({
|
|
3818
3865
|
normalized: n,
|
|
@@ -3825,7 +3872,7 @@ function On(e = {}) {
|
|
|
3825
3872
|
}
|
|
3826
3873
|
//#endregion
|
|
3827
3874
|
//#region api/vtk/stopSequence.js
|
|
3828
|
-
function
|
|
3875
|
+
function An(e = {}) {
|
|
3829
3876
|
let t = [], n = { ...e };
|
|
3830
3877
|
return t.push(...h({
|
|
3831
3878
|
normalized: n,
|
|
@@ -3838,7 +3885,7 @@ function kn(e = {}) {
|
|
|
3838
3885
|
}
|
|
3839
3886
|
//#endregion
|
|
3840
3887
|
//#region api/vtk/setFrame.js
|
|
3841
|
-
function
|
|
3888
|
+
function jn(e = {}) {
|
|
3842
3889
|
let t = [], n = { ...e };
|
|
3843
3890
|
return t.push(...h({
|
|
3844
3891
|
normalized: n,
|
|
@@ -3857,7 +3904,7 @@ function An(e = {}) {
|
|
|
3857
3904
|
}
|
|
3858
3905
|
//#endregion
|
|
3859
3906
|
//#region api/vtk/setPlaybackSpeed.js
|
|
3860
|
-
function
|
|
3907
|
+
function Mn(e = {}) {
|
|
3861
3908
|
let t = [], n = { ...e };
|
|
3862
3909
|
return t.push(...h({
|
|
3863
3910
|
normalized: n,
|
|
@@ -3876,44 +3923,44 @@ function jn(e = {}) {
|
|
|
3876
3923
|
}
|
|
3877
3924
|
//#endregion
|
|
3878
3925
|
//#region api/vtk/clearSequence.js
|
|
3879
|
-
function
|
|
3926
|
+
function Nn(e = {}) {
|
|
3880
3927
|
let t = [], n = { ...e };
|
|
3881
3928
|
return t.push(...h({
|
|
3882
3929
|
normalized: n,
|
|
3883
3930
|
field: "id",
|
|
3884
3931
|
value: e.id
|
|
3885
|
-
})),
|
|
3932
|
+
})), V(e, "isClearCache", !0, t, n), {
|
|
3886
3933
|
errors: t,
|
|
3887
3934
|
normalized: n
|
|
3888
3935
|
};
|
|
3889
3936
|
}
|
|
3890
3937
|
//#endregion
|
|
3891
3938
|
//#region api/vtk/clearAllSequence.js
|
|
3892
|
-
function
|
|
3939
|
+
function Pn(e = {}) {
|
|
3893
3940
|
let t = [], n = { ...e };
|
|
3894
|
-
return
|
|
3941
|
+
return V(e, "isClearCache", !0, t, n), {
|
|
3895
3942
|
errors: t,
|
|
3896
3943
|
normalized: n
|
|
3897
3944
|
};
|
|
3898
3945
|
}
|
|
3899
3946
|
//#endregion
|
|
3900
3947
|
//#region api/vtk/vtkAnimationApi.js
|
|
3901
|
-
var
|
|
3902
|
-
playSequence:
|
|
3903
|
-
pauseSequence:
|
|
3904
|
-
stopSequence:
|
|
3905
|
-
setFrame:
|
|
3906
|
-
setPlaybackSpeed:
|
|
3907
|
-
clearSequence:
|
|
3908
|
-
clearAllSequence:
|
|
3909
|
-
},
|
|
3910
|
-
...
|
|
3911
|
-
...
|
|
3912
|
-
...
|
|
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
|
|
3913
3960
|
}, { getOptions: () => ({ timeout: 0 }) });
|
|
3914
3961
|
//#endregion
|
|
3915
3962
|
//#region api/videoFusion/open.js
|
|
3916
|
-
function
|
|
3963
|
+
function Ln(e, t) {
|
|
3917
3964
|
if (t === "Geographic") return f(e);
|
|
3918
3965
|
let n = [];
|
|
3919
3966
|
if (!e || !Array.isArray(e)) n.push("[coordinates] 为必填项,且必须是数组类型");
|
|
@@ -3924,7 +3971,7 @@ function In(e, t) {
|
|
|
3924
3971
|
}
|
|
3925
3972
|
return n;
|
|
3926
3973
|
}
|
|
3927
|
-
function
|
|
3974
|
+
function Rn(e = {}) {
|
|
3928
3975
|
let t = { ...e }, n = [];
|
|
3929
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({
|
|
3930
3977
|
normalized: t,
|
|
@@ -3933,7 +3980,7 @@ function Ln(e = {}) {
|
|
|
3933
3980
|
defaultValue: "Geographic",
|
|
3934
3981
|
type: "string",
|
|
3935
3982
|
list: ["UnrealWorld", "Geographic"]
|
|
3936
|
-
})), n.push(...
|
|
3983
|
+
})), n.push(...Ln(e.coordinates, t.poseMode)), n.push(...h({
|
|
3937
3984
|
normalized: t,
|
|
3938
3985
|
field: "url",
|
|
3939
3986
|
value: e.url
|
|
@@ -4007,7 +4054,7 @@ function Ln(e = {}) {
|
|
|
4007
4054
|
}
|
|
4008
4055
|
//#endregion
|
|
4009
4056
|
//#region api/videoFusion/close.js
|
|
4010
|
-
function
|
|
4057
|
+
function zn(e = {}) {
|
|
4011
4058
|
let t = { ...e };
|
|
4012
4059
|
return {
|
|
4013
4060
|
errors: [...h({
|
|
@@ -4020,7 +4067,7 @@ function Rn(e = {}) {
|
|
|
4020
4067
|
}
|
|
4021
4068
|
//#endregion
|
|
4022
4069
|
//#region api/videoFusion/closeAll.js
|
|
4023
|
-
function
|
|
4070
|
+
function Bn(e = {}) {
|
|
4024
4071
|
return {
|
|
4025
4072
|
errors: [],
|
|
4026
4073
|
normalized: { ...e }
|
|
@@ -4028,7 +4075,7 @@ function zn(e = {}) {
|
|
|
4028
4075
|
}
|
|
4029
4076
|
//#endregion
|
|
4030
4077
|
//#region api/videoFusion/pause.js
|
|
4031
|
-
function
|
|
4078
|
+
function Vn(e = {}) {
|
|
4032
4079
|
let t = { ...e };
|
|
4033
4080
|
return {
|
|
4034
4081
|
errors: [...h({
|
|
@@ -4041,7 +4088,7 @@ function Bn(e = {}) {
|
|
|
4041
4088
|
}
|
|
4042
4089
|
//#endregion
|
|
4043
4090
|
//#region api/videoFusion/resume.js
|
|
4044
|
-
function
|
|
4091
|
+
function Hn(e = {}) {
|
|
4045
4092
|
let t = { ...e };
|
|
4046
4093
|
return {
|
|
4047
4094
|
errors: [...h({
|
|
@@ -4054,7 +4101,7 @@ function Vn(e = {}) {
|
|
|
4054
4101
|
}
|
|
4055
4102
|
//#endregion
|
|
4056
4103
|
//#region api/videoFusion/setPlaybackRate.js
|
|
4057
|
-
function
|
|
4104
|
+
function Un(e = {}) {
|
|
4058
4105
|
let t = { ...e }, n = [];
|
|
4059
4106
|
return n.push(...h({
|
|
4060
4107
|
normalized: t,
|
|
@@ -4073,7 +4120,7 @@ function Hn(e = {}) {
|
|
|
4073
4120
|
}
|
|
4074
4121
|
//#endregion
|
|
4075
4122
|
//#region api/videoFusion/seekToTime.js
|
|
4076
|
-
function
|
|
4123
|
+
function Wn(e = {}) {
|
|
4077
4124
|
let t = { ...e }, n = [];
|
|
4078
4125
|
return n.push(...h({
|
|
4079
4126
|
normalized: t,
|
|
@@ -4092,18 +4139,18 @@ function Un(e = {}) {
|
|
|
4092
4139
|
}
|
|
4093
4140
|
//#endregion
|
|
4094
4141
|
//#region api/videoFusion/videoFusionApi.js
|
|
4095
|
-
var
|
|
4096
|
-
open:
|
|
4097
|
-
close:
|
|
4098
|
-
closeAll:
|
|
4099
|
-
pause:
|
|
4100
|
-
resume:
|
|
4101
|
-
setPlaybackRate:
|
|
4102
|
-
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
|
|
4103
4150
|
});
|
|
4104
4151
|
//#endregion
|
|
4105
4152
|
//#region api/other/otherApi.js
|
|
4106
|
-
function
|
|
4153
|
+
function U(e) {
|
|
4107
4154
|
return class {
|
|
4108
4155
|
constructor(t) {
|
|
4109
4156
|
this.commandManager = t, this.domain = e;
|
|
@@ -4118,7 +4165,7 @@ function B(e) {
|
|
|
4118
4165
|
}
|
|
4119
4166
|
//#endregion
|
|
4120
4167
|
//#region api/index.js
|
|
4121
|
-
var
|
|
4168
|
+
var Kn = {
|
|
4122
4169
|
camera: ue,
|
|
4123
4170
|
cesium: Se,
|
|
4124
4171
|
marker: Je,
|
|
@@ -4127,37 +4174,37 @@ var Gn = {
|
|
|
4127
4174
|
hydrodynamicForce: vt,
|
|
4128
4175
|
sceneModel: Rt,
|
|
4129
4176
|
atmosphericEffects: Vt,
|
|
4130
|
-
tool:
|
|
4131
|
-
line:
|
|
4132
|
-
level:
|
|
4133
|
-
VTK:
|
|
4134
|
-
videoFusion:
|
|
4135
|
-
oneDimensionalHydrodynamics:
|
|
4136
|
-
customDomain:
|
|
4137
|
-
arrow:
|
|
4138
|
-
NC:
|
|
4139
|
-
gateOperation:
|
|
4140
|
-
},
|
|
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 {
|
|
4141
4188
|
constructor(e) {
|
|
4142
4189
|
this._apis = {};
|
|
4143
|
-
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);
|
|
4144
4191
|
}
|
|
4145
|
-
},
|
|
4146
|
-
function
|
|
4147
|
-
|
|
4192
|
+
}, G = !0;
|
|
4193
|
+
function qn(e) {
|
|
4194
|
+
G = !!e;
|
|
4148
4195
|
}
|
|
4149
|
-
function
|
|
4150
|
-
|
|
4196
|
+
function K(...e) {
|
|
4197
|
+
G && console.log(...e);
|
|
4151
4198
|
}
|
|
4152
|
-
function
|
|
4153
|
-
|
|
4199
|
+
function q(...e) {
|
|
4200
|
+
G && console.warn(...e);
|
|
4154
4201
|
}
|
|
4155
|
-
function
|
|
4156
|
-
|
|
4202
|
+
function J(...e) {
|
|
4203
|
+
G && console.error(...e);
|
|
4157
4204
|
}
|
|
4158
4205
|
//#endregion
|
|
4159
4206
|
//#region commFlow/streamResponses.js
|
|
4160
|
-
function
|
|
4207
|
+
function Y(e) {
|
|
4161
4208
|
return (Array.isArray(e) ? e : [e]).map((e) => {
|
|
4162
4209
|
if (typeof e == "string") return e;
|
|
4163
4210
|
if (e && typeof e == "object") {
|
|
@@ -4171,7 +4218,7 @@ function K(e) {
|
|
|
4171
4218
|
return e == null ? "" : String(e);
|
|
4172
4219
|
}).filter((e) => e !== "");
|
|
4173
4220
|
}
|
|
4174
|
-
function
|
|
4221
|
+
function Jn(e, t, n) {
|
|
4175
4222
|
return {
|
|
4176
4223
|
success: !0,
|
|
4177
4224
|
message: e,
|
|
@@ -4179,27 +4226,27 @@ function qn(e, t, n) {
|
|
|
4179
4226
|
command: n
|
|
4180
4227
|
};
|
|
4181
4228
|
}
|
|
4182
|
-
function
|
|
4229
|
+
function X(e, t, n) {
|
|
4183
4230
|
let r = {
|
|
4184
4231
|
success: !1,
|
|
4185
|
-
message:
|
|
4232
|
+
message: Y(e),
|
|
4186
4233
|
params: t,
|
|
4187
4234
|
command: n
|
|
4188
4235
|
};
|
|
4189
|
-
return
|
|
4236
|
+
return J("三维场景报错:", r), r;
|
|
4190
4237
|
}
|
|
4191
|
-
function
|
|
4238
|
+
function Yn(e, t, n) {
|
|
4192
4239
|
let r = {
|
|
4193
4240
|
success: !1,
|
|
4194
|
-
message:
|
|
4241
|
+
message: Y(e),
|
|
4195
4242
|
params: t,
|
|
4196
4243
|
command: n
|
|
4197
4244
|
};
|
|
4198
|
-
return
|
|
4245
|
+
return q("三维场景警告:", r), r;
|
|
4199
4246
|
}
|
|
4200
4247
|
//#endregion
|
|
4201
4248
|
//#region commFlow/commFlow.js
|
|
4202
|
-
function
|
|
4249
|
+
function Z() {
|
|
4203
4250
|
return {
|
|
4204
4251
|
Hovered: {},
|
|
4205
4252
|
Click: {},
|
|
@@ -4207,10 +4254,10 @@ function Y() {
|
|
|
4207
4254
|
Unhovered: {}
|
|
4208
4255
|
};
|
|
4209
4256
|
}
|
|
4210
|
-
function
|
|
4257
|
+
function Xn(e, t) {
|
|
4211
4258
|
typeof t == "function" && (e.includes(t) || e.push(t));
|
|
4212
4259
|
}
|
|
4213
|
-
function
|
|
4260
|
+
function Q(e) {
|
|
4214
4261
|
return {
|
|
4215
4262
|
prepare(t, n) {
|
|
4216
4263
|
return t._registerMarkerCallbacks(t[e], n);
|
|
@@ -4220,15 +4267,15 @@ function Z(e) {
|
|
|
4220
4267
|
}
|
|
4221
4268
|
};
|
|
4222
4269
|
}
|
|
4223
|
-
var
|
|
4224
|
-
"marker.iconMarker":
|
|
4225
|
-
"marker.iconUrlMarker":
|
|
4226
|
-
"marker.secondMarker":
|
|
4227
|
-
"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"),
|
|
4228
4275
|
"tool.onMouseClick": {
|
|
4229
4276
|
prepare(e, t) {
|
|
4230
4277
|
let { onMouseClick: n, ...r } = t || {};
|
|
4231
|
-
return
|
|
4278
|
+
return Xn(e.mouseClickCallback.MouseClick, n), r;
|
|
4232
4279
|
},
|
|
4233
4280
|
dispatch(e, t, n) {
|
|
4234
4281
|
return n.coordinates ? e._executeCallbacks(e.mouseClickCallback.MouseClick, t, n) : !1;
|
|
@@ -4256,7 +4303,7 @@ var Q = {
|
|
|
4256
4303
|
"animation.onData": {
|
|
4257
4304
|
prepare(e, t) {
|
|
4258
4305
|
let { onChange: n, ...r } = t || {};
|
|
4259
|
-
return
|
|
4306
|
+
return Xn(e.animationOnDataCallback.Change, n), r;
|
|
4260
4307
|
},
|
|
4261
4308
|
dispatch(e, t, n) {
|
|
4262
4309
|
return n.type ? e._executeCallbacks(e.animationOnDataCallback.Change, t, n) : !1;
|
|
@@ -4269,7 +4316,7 @@ var Q = {
|
|
|
4269
4316
|
});
|
|
4270
4317
|
}
|
|
4271
4318
|
_resetEventCallbacks() {
|
|
4272
|
-
this.markerEventCallbacks =
|
|
4319
|
+
this.markerEventCallbacks = Z(), this.secondMarkerEventCallbacks = Z(), this.followMarkerEventCallbacks = Z(), this.animationOnDataCallback = { Change: [] }, this.mouseClickCallback = { MouseClick: [] }, this.vtkMouseClickCallback = {};
|
|
4273
4320
|
}
|
|
4274
4321
|
destroy() {
|
|
4275
4322
|
if (!this._destroyed) {
|
|
@@ -4283,8 +4330,8 @@ var Q = {
|
|
|
4283
4330
|
}
|
|
4284
4331
|
sendWithDefault(e, t, n = {}) {
|
|
4285
4332
|
let r = this._sendPreparePayload(t, e.normalized || {});
|
|
4286
|
-
if (e.errors.length > 0) return
|
|
4287
|
-
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);
|
|
4288
4335
|
let i = (++this.requestId).toString(), a = n?.timeout === 0 ? 0 : n?.timeout ?? this.timeout, o = new Promise((e, t) => {
|
|
4289
4336
|
let n = null;
|
|
4290
4337
|
a !== 0 && (n = setTimeout(() => {
|
|
@@ -4299,18 +4346,18 @@ var Q = {
|
|
|
4299
4346
|
requestId: i,
|
|
4300
4347
|
params: r
|
|
4301
4348
|
};
|
|
4302
|
-
return
|
|
4349
|
+
return K("消息下发成功:", s), this.transport.sendTextToDataChannel(JSON.stringify(s)), o.then((e) => {
|
|
4303
4350
|
if (e && e.command && e.command === t) switch (e.status) {
|
|
4304
|
-
case "info": return
|
|
4305
|
-
case "warn": return
|
|
4306
|
-
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);
|
|
4307
4354
|
}
|
|
4308
|
-
return
|
|
4309
|
-
}).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));
|
|
4310
4357
|
}
|
|
4311
4358
|
_handleRawResponse(e) {
|
|
4312
4359
|
if (this._destroyed) return null;
|
|
4313
|
-
if (!e) return
|
|
4360
|
+
if (!e) return J("数据第一步解析失败:", e), null;
|
|
4314
4361
|
let t;
|
|
4315
4362
|
try {
|
|
4316
4363
|
let n = JSON.parse(String(e).trim());
|
|
@@ -4322,7 +4369,7 @@ var Q = {
|
|
|
4322
4369
|
requestId: n.requestId || ""
|
|
4323
4370
|
}, t.message === "The data channel has been connected." || t.message === "The level has been initialized") return null;
|
|
4324
4371
|
} catch {
|
|
4325
|
-
return
|
|
4372
|
+
return J("数据第二步解析失败:", e), null;
|
|
4326
4373
|
}
|
|
4327
4374
|
if (this._processEventResponse(t)) return;
|
|
4328
4375
|
let { command: n, message: r, data: i, status: a, requestId: o } = t;
|
|
@@ -4336,7 +4383,7 @@ var Q = {
|
|
|
4336
4383
|
});
|
|
4337
4384
|
return;
|
|
4338
4385
|
}
|
|
4339
|
-
|
|
4386
|
+
q("注意:非常规响应", t);
|
|
4340
4387
|
}
|
|
4341
4388
|
_registerMarkerCallbacks(e, t) {
|
|
4342
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";
|
|
@@ -4352,27 +4399,27 @@ var Q = {
|
|
|
4352
4399
|
return this._executeCallback(o, t, n);
|
|
4353
4400
|
}
|
|
4354
4401
|
_sendPreparePayload(e, t) {
|
|
4355
|
-
let n =
|
|
4402
|
+
let n = Zn[e];
|
|
4356
4403
|
return n?.prepare ? n.prepare(this, t) : t;
|
|
4357
4404
|
}
|
|
4358
4405
|
_processEventResponse(e) {
|
|
4359
4406
|
if (!e) return !1;
|
|
4360
|
-
let { command: t, data: n = {} } = e, r =
|
|
4407
|
+
let { command: t, data: n = {} } = e, r = Zn[t];
|
|
4361
4408
|
return r?.dispatch ? r.dispatch(this, t, n) : !1;
|
|
4362
4409
|
}
|
|
4363
4410
|
_executeCallback(e, t, n) {
|
|
4364
|
-
if (typeof e != "function") return
|
|
4411
|
+
if (typeof e != "function") return K(`${t}未监听:${n.eventType}`), !0;
|
|
4365
4412
|
try {
|
|
4366
4413
|
return e(n), !0;
|
|
4367
4414
|
} catch (e) {
|
|
4368
|
-
return
|
|
4415
|
+
return J(`执行${t}回调出错:`, e, n), !0;
|
|
4369
4416
|
}
|
|
4370
4417
|
}
|
|
4371
4418
|
_executeCallbacks(e, t, n) {
|
|
4372
4419
|
return e ? Array.isArray(e) ? (e.forEach((e) => this._executeCallback(e, t, n)), !0) : this._executeCallback(e, t, n) : !1;
|
|
4373
4420
|
}
|
|
4374
4421
|
};
|
|
4375
|
-
function
|
|
4422
|
+
function Qn(e) {
|
|
4376
4423
|
if (!e) return "";
|
|
4377
4424
|
try {
|
|
4378
4425
|
return JSON.parse(String(e).trim())?.message || "";
|
|
@@ -4380,7 +4427,7 @@ function Jn(e) {
|
|
|
4380
4427
|
return "";
|
|
4381
4428
|
}
|
|
4382
4429
|
}
|
|
4383
|
-
function
|
|
4430
|
+
function $n(t = {}) {
|
|
4384
4431
|
let { sendText: n, commandTimeout: r = 3e3, onSceneInit: i } = t;
|
|
4385
4432
|
if (typeof n != "function") throw Error("createGameSession: sendText 必须是函数");
|
|
4386
4433
|
let a = null, o = !1, s = new $({
|
|
@@ -4390,11 +4437,11 @@ function Yn(t = {}) {
|
|
|
4390
4437
|
bindMessageHandler(e) {
|
|
4391
4438
|
a = e;
|
|
4392
4439
|
}
|
|
4393
|
-
}, { timeout: r }), c = new
|
|
4440
|
+
}, { timeout: r }), c = new W(s);
|
|
4394
4441
|
function l(e, t) {
|
|
4395
|
-
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));
|
|
4396
4443
|
}
|
|
4397
|
-
return
|
|
4444
|
+
return K(`插件初始化成功 [web3dlink@${e}]`), {
|
|
4398
4445
|
gameAPI: c,
|
|
4399
4446
|
commandManager: s,
|
|
4400
4447
|
handleIncoming: l,
|
|
@@ -4403,7 +4450,7 @@ function Yn(t = {}) {
|
|
|
4403
4450
|
}
|
|
4404
4451
|
};
|
|
4405
4452
|
}
|
|
4406
|
-
function
|
|
4453
|
+
function er(e, t, n) {
|
|
4407
4454
|
if (!(!e || !n)) {
|
|
4408
4455
|
if (typeof e.off == "function") {
|
|
4409
4456
|
e.off(t, n);
|
|
@@ -4412,10 +4459,10 @@ function Xn(e, t, n) {
|
|
|
4412
4459
|
typeof e.removeListener == "function" && e.removeListener(t, n);
|
|
4413
4460
|
}
|
|
4414
4461
|
}
|
|
4415
|
-
function
|
|
4416
|
-
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);
|
|
4417
4464
|
}
|
|
4418
4465
|
//#endregion
|
|
4419
|
-
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 };
|
|
4420
4467
|
|
|
4421
|
-
//# sourceMappingURL=createGameSession-
|
|
4468
|
+
//# sourceMappingURL=createGameSession-M-AH_bw5.js.map
|