@shjjs/visual-ui 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/commons-product-model/index.vue.mjs +2 -2
- package/es/components/commons-product-model/index.vue2.mjs +33 -33
- package/es/components/commons-three-loader3/index.vue.mjs +2 -2
- package/es/components/commons-three-loader3/index.vue2.mjs +40 -40
- package/es/components/index.d.ts +5 -0
- package/es/components/index.mjs +82 -72
- package/es/components/interaction-select/index.d.ts +188 -8
- package/es/components/interaction-select/index.vue.d.ts +193 -8
- package/es/components/interaction-select/index.vue.mjs +5 -11
- package/es/components/interaction-select/index.vue2.mjs +220 -2
- package/es/components/scene-amap2d/index.d.ts +2 -2
- package/es/components/scene-amap2d/index.vue.d.ts +2 -2
- package/es/components/scene-amap2d/index.vue.mjs +2 -2
- package/es/components/scene-amap2d/index.vue2.mjs +16 -16
- package/es/components/scene-amap3d/index.d.ts +2 -2
- package/es/components/scene-amap3d/index.vue.d.ts +2 -2
- package/es/components/scene-amap3d/index.vue.mjs +2 -2
- package/es/components/scene-amap3d/index.vue2.mjs +95 -88
- package/es/components/scene-map3d/index.d.ts +2 -2
- package/es/components/scene-map3d/index.vue.d.ts +2 -2
- package/es/components/scene-map3d/index.vue.mjs +2 -2
- package/es/components/scene-map3d/index.vue2.mjs +13 -13
- package/es/components/scene-map3d/map3d/module/MapMirror.mjs +1 -1
- package/es/components/scene-ue-iframe/index.d.ts +50 -0
- package/es/components/scene-ue-iframe/index.mjs +7 -0
- package/es/components/scene-ue-iframe/index.vue.d.ts +50 -0
- package/es/components/scene-ue-iframe/index.vue.mjs +7 -0
- package/es/components/scene-ue-iframe/index.vue2.mjs +48 -0
- package/es/components/scene-ue-shj/index.d.ts +50 -0
- package/es/components/scene-ue-shj/index.mjs +7 -0
- package/es/components/scene-ue-shj/index.vue.d.ts +50 -0
- package/es/components/scene-ue-shj/index.vue.mjs +7 -0
- package/es/components/scene-ue-shj/index.vue2.mjs +37 -0
- package/es/components/scene-unity-iframe/index.d.ts +61 -0
- package/es/components/scene-unity-iframe/index.mjs +7 -0
- package/es/components/scene-unity-iframe/index.vue.d.ts +61 -0
- package/es/components/scene-unity-iframe/index.vue.mjs +7 -0
- package/es/components/scene-unity-iframe/index.vue2.mjs +37 -0
- package/es/components/scene-unity-webgl/index.d.ts +61 -0
- package/es/components/scene-unity-webgl/index.mjs +7 -0
- package/es/components/scene-unity-webgl/index.vue.d.ts +61 -0
- package/es/components/scene-unity-webgl/index.vue.mjs +7 -0
- package/es/components/scene-unity-webgl/index.vue2.mjs +37 -0
- package/es/components/scene-vr/entity/audio.d.ts +6 -0
- package/es/components/scene-vr/index.d.ts +103 -0
- package/es/components/scene-vr/index.mjs +7 -0
- package/es/components/scene-vr/index.vue.d.ts +103 -0
- package/es/components/scene-vr/index.vue.mjs +7 -0
- package/es/components/scene-vr/index.vue2.mjs +355 -0
- package/es/components/scene-vr/resources/zv-add.svg.mjs +4 -0
- package/es/components/scene-vr/resources/zv-pause.svg.mjs +4 -0
- package/es/components/scene-vr/resources/zv-play.svg.mjs +4 -0
- package/es/components/scene-vr/resources/zv-reduce.svg.mjs +4 -0
- package/es/components/scene-vr/resources/zv-refresh.svg.mjs +4 -0
- package/es/components/scene-vr/resources/zv-return.svg.mjs +4 -0
- package/es/components/scene-vr/resources/zv-vr-select.svg.mjs +4 -0
- package/es/components/text-over-number/index.vue.d.ts +32 -32
- package/es/index.mjs +94 -84
- package/es/style.css +1 -1
- package/es/utils/clickOutSide.d.ts +5 -0
- package/es/utils/clickOutSide.mjs +13 -0
- package/es/utils/json2css.mjs +8 -8
- package/lib/components/commons-product-model/index.vue.js +1 -1
- package/lib/components/commons-product-model/index.vue2.js +1 -1
- package/lib/components/commons-three-loader3/index.vue.js +1 -1
- package/lib/components/commons-three-loader3/index.vue2.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/interaction-select/index.vue.js +1 -1
- package/lib/components/interaction-select/index.vue2.js +1 -1
- package/lib/components/scene-amap2d/index.vue.js +1 -1
- package/lib/components/scene-amap2d/index.vue2.js +1 -1
- package/lib/components/scene-amap3d/index.vue.js +1 -1
- package/lib/components/scene-amap3d/index.vue2.js +2 -2
- package/lib/components/scene-map3d/index.vue.js +1 -1
- package/lib/components/scene-map3d/index.vue2.js +1 -1
- package/lib/components/scene-map3d/map3d/module/MapMirror.js +1 -1
- package/lib/components/scene-ue-iframe/index.js +1 -0
- package/lib/components/scene-ue-iframe/index.vue.js +1 -0
- package/lib/components/scene-ue-iframe/index.vue2.js +1 -0
- package/lib/components/scene-ue-shj/index.js +1 -0
- package/lib/components/scene-ue-shj/index.vue.js +1 -0
- package/lib/components/scene-ue-shj/index.vue2.js +1 -0
- package/lib/components/scene-unity-iframe/index.js +1 -0
- package/lib/components/scene-unity-iframe/index.vue.js +1 -0
- package/lib/components/scene-unity-iframe/index.vue2.js +1 -0
- package/lib/components/scene-unity-webgl/index.js +1 -0
- package/lib/components/scene-unity-webgl/index.vue.js +1 -0
- package/lib/components/scene-unity-webgl/index.vue2.js +1 -0
- package/lib/components/scene-vr/index.js +1 -0
- package/lib/components/scene-vr/index.vue.js +1 -0
- package/lib/components/scene-vr/index.vue2.js +11 -0
- package/lib/components/scene-vr/resources/zv-add.svg.js +1 -0
- package/lib/components/scene-vr/resources/zv-pause.svg.js +1 -0
- package/lib/components/scene-vr/resources/zv-play.svg.js +1 -0
- package/lib/components/scene-vr/resources/zv-reduce.svg.js +1 -0
- package/lib/components/scene-vr/resources/zv-refresh.svg.js +1 -0
- package/lib/components/scene-vr/resources/zv-return.svg.js +1 -0
- package/lib/components/scene-vr/resources/zv-vr-select.svg.js +1 -0
- package/lib/index.js +1 -1
- package/lib/style.css +1 -1
- package/lib/utils/clickOutSide.js +1 -0
- package/lib/utils/json2css.js +1 -1
- package/package.json +2 -1
|
@@ -22,7 +22,7 @@ const oe = { class: "value" }, ae = ["onClick"], le = {
|
|
|
22
22
|
props: {
|
|
23
23
|
basicOption: {},
|
|
24
24
|
sources: {},
|
|
25
|
-
|
|
25
|
+
useEvents: {},
|
|
26
26
|
uuid: {}
|
|
27
27
|
},
|
|
28
28
|
emits: [
|
|
@@ -46,9 +46,9 @@ const oe = { class: "value" }, ae = ["onClick"], le = {
|
|
|
46
46
|
callback: (o) => {
|
|
47
47
|
try {
|
|
48
48
|
const t = a.basicOption.widgets && a.basicOption.widgets.find((s) => s._sourceId === o.id);
|
|
49
|
-
t && t.type === "bar" && l.value.createBar(t, o.data[0].data, !0, e), t && t.type === "scatter" && l.value.createScatter(t, o.data[0].data, !0, e), t && t.type === "flyline" && l.value.createFlyLine(t, o.data[0].data, !0, e), t && t.type === "regionalLevel" && l.value.createRegionalLevel(t, o.data[0].data, !0, e), e && (l.value.createBarTimeLine(), l.value.createScatterTimeLine(), l.value.createFlyLineTimeLine(), l.value.createRegionalLevelTimeLine()), i("on-data-change", o), window.SHJParseEvent(a.
|
|
49
|
+
t && t.type === "bar" && l.value.createBar(t, o.data[0].data, !0, e), t && t.type === "scatter" && l.value.createScatter(t, o.data[0].data, !0, e), t && t.type === "flyline" && l.value.createFlyLine(t, o.data[0].data, !0, e), t && t.type === "regionalLevel" && l.value.createRegionalLevel(t, o.data[0].data, !0, e), e && (l.value.createBarTimeLine(), l.value.createScatterTimeLine(), l.value.createFlyLineTimeLine(), l.value.createRegionalLevelTimeLine()), i("on-data-change", o), window.SHJParseEvent(a.useEvents, "on-data-change", o);
|
|
50
50
|
} catch {
|
|
51
|
-
i("on-data-change", null), window.SHJParseEvent(a.
|
|
51
|
+
i("on-data-change", null), window.SHJParseEvent(a.useEvents, "on-data-change", null);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
});
|
|
@@ -58,32 +58,32 @@ const oe = { class: "value" }, ae = ["onClick"], le = {
|
|
|
58
58
|
e.id = w, e.className = "zerov-map-3d", e.style.width = "100%", e.style.height = "100%", document.getElementById(I).appendChild(e);
|
|
59
59
|
}, m = (e) => (O.value = !1, C.value = !1, l.value && (l.value.destroy(), l.value = null), N(), new x(document.getElementById(w), { geoProjectionCenter: [108.55, 36.32] }, e, {
|
|
60
60
|
onAreaMouseover: (t) => {
|
|
61
|
-
i("on-area-mouseover", t), window.SHJParseEvent(a.
|
|
61
|
+
i("on-area-mouseover", t), window.SHJParseEvent(a.useEvents, "on-area-mouseover", t);
|
|
62
62
|
},
|
|
63
63
|
onAreaMouseout: (t) => {
|
|
64
|
-
i("on-area-mouseout", t), window.SHJParseEvent(a.
|
|
64
|
+
i("on-area-mouseout", t), window.SHJParseEvent(a.useEvents, "on-area-mouseout", t);
|
|
65
65
|
},
|
|
66
66
|
onLoadChild: (t) => {
|
|
67
|
-
if (i("on-area-click", t), window.SHJParseEvent(a.
|
|
68
|
-
i("on-drill-down", t), window.SHJParseEvent(a.
|
|
67
|
+
if (i("on-area-click", t), window.SHJParseEvent(a.useEvents, "on-area-click", t), t.adcode !== r.present && a.basicOption.scene.isDrilling && a.basicOption.scene.defaultMapAdcode !== 1) {
|
|
68
|
+
i("on-drill-down", t), window.SHJParseEvent(a.useEvents, "on-drill-down", t);
|
|
69
69
|
const s = v(a.basicOption);
|
|
70
70
|
s.scene.defaultMapAdcode = t.adcode, l.value = m(s), r.push(t.adcode), r.past.length <= 0 ? p.value = !1 : p.value = !0;
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
onMapSuccess: () => {
|
|
74
|
-
O.value = !0, i("on-loaded"), window.SHJParseEvent(a.
|
|
74
|
+
O.value = !0, i("on-loaded"), window.SHJParseEvent(a.useEvents, "on-loaded", null);
|
|
75
75
|
},
|
|
76
76
|
onMapAnimationSuccess: () => {
|
|
77
|
-
y(), C.value = !0, i("on-animated"), window.SHJParseEvent(a.
|
|
77
|
+
y(), C.value = !0, i("on-animated"), window.SHJParseEvent(a.useEvents, "on-animated", null);
|
|
78
78
|
},
|
|
79
79
|
onClickBar: (t) => {
|
|
80
|
-
i("on-bar-click", t), window.SHJParseEvent(a.
|
|
80
|
+
i("on-bar-click", t), window.SHJParseEvent(a.useEvents, "on-bar-click", t);
|
|
81
81
|
},
|
|
82
82
|
onClickScatter: (t) => {
|
|
83
|
-
i("on-scatter-click", t), window.SHJParseEvent(a.
|
|
83
|
+
i("on-scatter-click", t), window.SHJParseEvent(a.useEvents, "on-scatter-click", t);
|
|
84
84
|
},
|
|
85
85
|
onClickFlyline: (t) => {
|
|
86
|
-
i("on-flyline-click", t), window.SHJParseEvent(a.
|
|
86
|
+
i("on-flyline-click", t), window.SHJParseEvent(a.useEvents, "on-flyline-click", t);
|
|
87
87
|
}
|
|
88
88
|
}));
|
|
89
89
|
K(() => {
|
|
@@ -94,7 +94,7 @@ const oe = { class: "value" }, ae = ["onClick"], le = {
|
|
|
94
94
|
l.value && l.value.destroy();
|
|
95
95
|
});
|
|
96
96
|
const P = () => {
|
|
97
|
-
i("on-return", { adcode: r.present }), window.SHJParseEvent(a.
|
|
97
|
+
i("on-return", { adcode: r.present }), window.SHJParseEvent(a.useEvents, "on-return", { adcode: r.present }), r.undo();
|
|
98
98
|
const e = v(a.basicOption);
|
|
99
99
|
e.scene.defaultMapAdcode = r.present, l.value = m(e), r.past.length <= 0 ? p.value = !1 : p.value = !0;
|
|
100
100
|
}, j = () => {
|
|
@@ -74,7 +74,7 @@ function d(r) {
|
|
|
74
74
|
multisample: 0,
|
|
75
75
|
shader: n
|
|
76
76
|
});
|
|
77
|
-
e.material.transparent = !0, e.position.y = 0
|
|
77
|
+
e.material.transparent = !0, e.position.y = 0, e.rotateX(-Math.PI / 2), r.groundMirror = e, r.groundMirror.visible = r.option.map.mirrorShow, r.scene.add(e);
|
|
78
78
|
}
|
|
79
79
|
export {
|
|
80
80
|
d as createMirror
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const ZvSceneUeIframe: import("../../utils/typescript").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
basicOption: {
|
|
3
|
+
type: any;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
sources: {
|
|
7
|
+
type: any;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
useEvents: {
|
|
11
|
+
type: ArrayConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
uuid: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
isPreview: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
props: any;
|
|
24
|
+
emit: (event: "on-message", ...args: any[]) => void;
|
|
25
|
+
useUeScene: (basicOption: any) => void;
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
basicOption: {
|
|
28
|
+
type: any;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
sources: {
|
|
32
|
+
type: any;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
useEvents: {
|
|
36
|
+
type: ArrayConstructor;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
uuid: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
isPreview: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
"onOn-message"?: (...args: any[]) => any;
|
|
49
|
+
}, {}, {}>> & Record<string, any>;
|
|
50
|
+
export default ZvSceneUeIframe;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
basicOption: {
|
|
3
|
+
type: any;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
sources: {
|
|
7
|
+
type: any;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
useEvents: {
|
|
11
|
+
type: ArrayConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
uuid: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
isPreview: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
props: any;
|
|
24
|
+
emit: (event: "on-message", ...args: any[]) => void;
|
|
25
|
+
useUeScene: (basicOption: any) => void;
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
basicOption: {
|
|
28
|
+
type: any;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
sources: {
|
|
32
|
+
type: any;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
useEvents: {
|
|
36
|
+
type: ArrayConstructor;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
uuid: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
isPreview: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
"onOn-message"?: (...args: any[]) => any;
|
|
49
|
+
}, {}, {}>;
|
|
50
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as n, openBlock as c, createElementBlock as i, createElementVNode as d, onMounted as w, onBeforeUnmount as S } from "vue";
|
|
2
|
+
const m = { class: "iframe-webscoket" }, f = ["src"], l = n({ name: "zv-scene-ue-shj" }), k = /* @__PURE__ */ n({
|
|
3
|
+
...l,
|
|
4
|
+
props: {
|
|
5
|
+
basicOption: {},
|
|
6
|
+
sources: {},
|
|
7
|
+
useEvents: {},
|
|
8
|
+
uuid: {},
|
|
9
|
+
isPreview: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
emits: [
|
|
12
|
+
"on-message"
|
|
13
|
+
],
|
|
14
|
+
setup(t, { emit: r }) {
|
|
15
|
+
const s = t, a = r;
|
|
16
|
+
return ((o) => {
|
|
17
|
+
w(() => {
|
|
18
|
+
if (o.webSocketUrl)
|
|
19
|
+
try {
|
|
20
|
+
window.SHJSceneUEIframeWebscoket && (window.SHJSceneUEIframeWebscoket.close(), window.SHJSceneUEIframeWebscoket = null), window.SHJSceneUEIframeWebscoket = new WebSocket(o.webSocketUrl), window.SHJSceneUEIframeWebscoket.onmessage = (e) => {
|
|
21
|
+
try {
|
|
22
|
+
if (JSON.parse(e.data).type && JSON.parse(e.data).type === "ping")
|
|
23
|
+
return;
|
|
24
|
+
if (!JSON.parse(e.data).data)
|
|
25
|
+
throw new Error("");
|
|
26
|
+
a("on-message", JSON.parse(e.data).data), window.SHJParseEvent(s.useEvents, "on-message", JSON.parse(e.data).data);
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
}, window.SHJSceneUEIframeWebscoket.onopen = () => {
|
|
30
|
+
}, window.SHJSceneUEIframeWebscoket.onerror = () => {
|
|
31
|
+
};
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
34
|
+
}), S(() => {
|
|
35
|
+
window.SHJSceneUEIframeWebscoket && window.SHJSceneUEIframeWebscoket.close();
|
|
36
|
+
});
|
|
37
|
+
})(s.basicOption), (o, e) => (c(), i("div", m, [
|
|
38
|
+
d("iframe", {
|
|
39
|
+
src: o.basicOption.iframeUrl,
|
|
40
|
+
sandbox: "allow-scripts allow-same-origin",
|
|
41
|
+
style: { width: "100%", height: "100%", border: "0" }
|
|
42
|
+
}, null, 8, f)
|
|
43
|
+
]));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
k as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const ZvSceneUeShj: import("../../utils/typescript").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
basicOption: {
|
|
3
|
+
type: any;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
sources: {
|
|
7
|
+
type: any;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
useEvents: {
|
|
11
|
+
type: ArrayConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
uuid: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
isPreview: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
props: any;
|
|
24
|
+
emit: (event: "on-message", ...args: any[]) => void;
|
|
25
|
+
useShjForUeScene: () => void;
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
basicOption: {
|
|
28
|
+
type: any;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
sources: {
|
|
32
|
+
type: any;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
useEvents: {
|
|
36
|
+
type: ArrayConstructor;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
uuid: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
isPreview: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
"onOn-message"?: (...args: any[]) => any;
|
|
49
|
+
}, {}, {}>> & Record<string, any>;
|
|
50
|
+
export default ZvSceneUeShj;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
basicOption: {
|
|
3
|
+
type: any;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
sources: {
|
|
7
|
+
type: any;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
useEvents: {
|
|
11
|
+
type: ArrayConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
uuid: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
isPreview: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
props: any;
|
|
24
|
+
emit: (event: "on-message", ...args: any[]) => void;
|
|
25
|
+
useShjForUeScene: () => void;
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
basicOption: {
|
|
28
|
+
type: any;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
sources: {
|
|
32
|
+
type: any;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
useEvents: {
|
|
36
|
+
type: ArrayConstructor;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
uuid: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
isPreview: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
"onOn-message"?: (...args: any[]) => any;
|
|
49
|
+
}, {}, {}>;
|
|
50
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as u, createElementBlock as v, normalizeClass as p, onMounted as d } from "vue";
|
|
2
|
+
const h = t({ name: "zv-scene-ue-shj" }), m = /* @__PURE__ */ t({
|
|
3
|
+
...h,
|
|
4
|
+
props: {
|
|
5
|
+
basicOption: {},
|
|
6
|
+
sources: {},
|
|
7
|
+
useEvents: {},
|
|
8
|
+
uuid: {},
|
|
9
|
+
isPreview: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
emits: [
|
|
12
|
+
"on-message"
|
|
13
|
+
],
|
|
14
|
+
setup(i, { emit: c }) {
|
|
15
|
+
const n = i, a = c;
|
|
16
|
+
return (() => {
|
|
17
|
+
d(() => {
|
|
18
|
+
n.useEvents.length > 0 && n.useEvents.forEach((e) => {
|
|
19
|
+
e && e.receivingMethod && (window.ue.interface[e.receivingMethod] = (s) => {
|
|
20
|
+
try {
|
|
21
|
+
if (!JSON.parse(s).data)
|
|
22
|
+
throw new Error("");
|
|
23
|
+
const o = n.useEvents.filter((r) => r.receivingMethod === e.receivingMethod && r.eventType === "on-message");
|
|
24
|
+
a("on-message", JSON.parse(s).data), window.SHJParseEvent(o, "on-message", JSON.parse(s).data);
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
})(), (e, s) => (u(), v("div", {
|
|
31
|
+
class: p([{ isPreview: e.isPreview }, "shj-for-ue"])
|
|
32
|
+
}, null, 2));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
m as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare const ZvSceneUnityIframe: import("../../utils/typescript").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
basicOption: {
|
|
3
|
+
type: any;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
sources: {
|
|
7
|
+
type: any;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
useEvents: {
|
|
11
|
+
type: ArrayConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
uuid: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
isPreview: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
disableDrag: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
}, {
|
|
27
|
+
props: any;
|
|
28
|
+
emit: (event: "on-message", ...args: any[]) => void;
|
|
29
|
+
useUnityScene: () => {
|
|
30
|
+
unityIframeRef: import("vue").Ref<any>;
|
|
31
|
+
};
|
|
32
|
+
unityIframeRef: import("vue").Ref<any>;
|
|
33
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
basicOption: {
|
|
35
|
+
type: any;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
sources: {
|
|
39
|
+
type: any;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
useEvents: {
|
|
43
|
+
type: ArrayConstructor;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
uuid: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
isPreview: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
disableDrag: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
}>> & {
|
|
59
|
+
"onOn-message"?: (...args: any[]) => any;
|
|
60
|
+
}, {}, {}>> & Record<string, any>;
|
|
61
|
+
export default ZvSceneUnityIframe;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
basicOption: {
|
|
3
|
+
type: any;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
sources: {
|
|
7
|
+
type: any;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
useEvents: {
|
|
11
|
+
type: ArrayConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
uuid: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
isPreview: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
disableDrag: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
}, {
|
|
27
|
+
props: any;
|
|
28
|
+
emit: (event: "on-message", ...args: any[]) => void;
|
|
29
|
+
useUnityScene: () => {
|
|
30
|
+
unityIframeRef: import("vue").Ref<any>;
|
|
31
|
+
};
|
|
32
|
+
unityIframeRef: import("vue").Ref<any>;
|
|
33
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
basicOption: {
|
|
35
|
+
type: any;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
sources: {
|
|
39
|
+
type: any;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
useEvents: {
|
|
43
|
+
type: ArrayConstructor;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
uuid: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
isPreview: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
disableDrag: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
}>> & {
|
|
59
|
+
"onOn-message"?: (...args: any[]) => any;
|
|
60
|
+
}, {}, {}>;
|
|
61
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as f, createElementBlock as m, ref as u, onMounted as l, onBeforeUnmount as d } from "vue";
|
|
2
|
+
const p = ["src"], w = t({ name: "zv-scene-unity-iframe" }), I = /* @__PURE__ */ t({
|
|
3
|
+
...w,
|
|
4
|
+
props: {
|
|
5
|
+
basicOption: {},
|
|
6
|
+
sources: {},
|
|
7
|
+
useEvents: {},
|
|
8
|
+
uuid: {},
|
|
9
|
+
isPreview: { type: Boolean },
|
|
10
|
+
disableDrag: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
emits: [
|
|
13
|
+
"on-message"
|
|
14
|
+
],
|
|
15
|
+
setup(s, { emit: o }) {
|
|
16
|
+
const a = s, i = o, r = () => {
|
|
17
|
+
const e = u();
|
|
18
|
+
return l(() => {
|
|
19
|
+
window.SHJSceneUnityIframeInstance = e.value;
|
|
20
|
+
}), d(() => {
|
|
21
|
+
window.SHJSceneUnityIframeInstance && (window.SHJSceneUnityIframeInstance = null);
|
|
22
|
+
}), window.addEventListener("message", (n) => {
|
|
23
|
+
i("on-message", n.data), window.SHJParseEvent(a.useEvents, "on-message", n.data);
|
|
24
|
+
}, !1), { unityIframeRef: e };
|
|
25
|
+
}, { unityIframeRef: c } = r();
|
|
26
|
+
return (e, n) => (f(), m("iframe", {
|
|
27
|
+
ref_key: "unityIframeRef",
|
|
28
|
+
ref: c,
|
|
29
|
+
src: e.basicOption.iframeUrl,
|
|
30
|
+
sandbox: "allow-scripts allow-same-origin",
|
|
31
|
+
style: { width: "100%", height: "100%", border: "0" }
|
|
32
|
+
}, null, 8, p));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
I as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare const ZvSceneUnityWebgl: import("../../utils/typescript").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
basicOption: {
|
|
3
|
+
type: any;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
sources: {
|
|
7
|
+
type: any;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
useEvents: {
|
|
11
|
+
type: ArrayConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
uuid: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
isPreview: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
disableDrag: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
}, {
|
|
27
|
+
props: any;
|
|
28
|
+
emit: (event: "on-message", ...args: any[]) => void;
|
|
29
|
+
useUnityScene: () => {
|
|
30
|
+
unityIframeRef: import("vue").Ref<any>;
|
|
31
|
+
};
|
|
32
|
+
unityIframeRef: import("vue").Ref<any>;
|
|
33
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
basicOption: {
|
|
35
|
+
type: any;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
sources: {
|
|
39
|
+
type: any;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
useEvents: {
|
|
43
|
+
type: ArrayConstructor;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
uuid: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
isPreview: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
disableDrag: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
}>> & {
|
|
59
|
+
"onOn-message"?: (...args: any[]) => any;
|
|
60
|
+
}, {}, {}>> & Record<string, any>;
|
|
61
|
+
export default ZvSceneUnityWebgl;
|