ep-lib-ts 1.0.52 → 1.0.53
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/BgAudio-DVqw9Nm5.js +4 -0
- package/dist/Details-7B2B5Zpd.js +4 -0
- package/dist/DisplayBox-keZ6EJSM.js +4 -0
- package/dist/Ep360Image-T9Z_eSbf.js +10 -0
- package/dist/Ep360Video-CkVrfj8k.js +10 -0
- package/dist/EpAlert-C7ESUQMp.js +4 -0
- package/dist/EpAudio-B4CMouzp.js +4 -0
- package/dist/EpAvatar-HgAYI-G8.js +4 -0
- package/dist/EpBadge-B1TCZREp.js +4 -0
- package/dist/EpBarChart-DLsUDjll.js +4 -0
- package/dist/EpBtn-C7RZAtmE.js +4 -0
- package/dist/EpCard-e3PlDwjZ.js +4 -0
- package/dist/EpCardLink-wV2KCxc-.js +4 -0
- package/dist/EpChip-DaR4OmgC.js +4 -0
- package/dist/EpCodeblock-Ccq9T4Oo.js +4 -0
- package/dist/EpConclusion-DuW6s2Kg.js +4 -0
- package/dist/EpContentSlider-CYZkQWdG.js +4 -0
- package/dist/{EpDarkmode-BmcA1kre.js → EpDarkmode-BaN4YUiN.js} +1 -1
- package/dist/EpDescription-DM9l4Vx8.js +4 -0
- package/dist/EpDivider-BFO4qXNQ.js +4 -0
- package/dist/EpDocument-CUegV3T2.js +4 -0
- package/dist/{EpDraggable-CEqhDHAq.js → EpDraggable-CxFVO0CO.js} +1 -1
- package/dist/EpEdu-Dacd0Lc7.js +4 -0
- package/dist/EpFlex-DLwZuygN.js +4 -0
- package/dist/EpFunnelChart-cmzrWVHV.js +4 -0
- package/dist/EpHeader-CTAwEG1T.js +4 -0
- package/dist/EpHover-BJIdqWVB.js +4 -0
- package/dist/EpHoverCard-DC20JMSr.js +4 -0
- package/dist/EpIcon-4Z7RS4OH.js +4 -0
- package/dist/EpIframe-CKkC-pLC.js +4 -0
- package/dist/EpImg-MgDO1oi1.js +4 -0
- package/dist/EpImgCarousel-Cq8kTVrS.js +4 -0
- package/dist/{EpInput-B2O5ovqX.js → EpInput-CnrS372r.js} +1 -1
- package/dist/EpInstructions-D3EHn7HY.js +4 -0
- package/dist/EpIntroduction-BstyHSxJ.js +4 -0
- package/dist/EpLineChart-CjEd4xIr.js +4 -0
- package/dist/EpLink-D3iLSt57.js +4 -0
- package/dist/EpLinkVersion-CDbADS82.js +4 -0
- package/dist/{EpList-BQQ6YyEU.js → EpList-B6uNyw7z.js} +1 -1
- package/dist/EpModal-CsAO3Czp.js +4 -0
- package/dist/{EpNothing-D53i__PJ.js → EpNothing-DtIooSft.js} +1 -1
- package/dist/EpObjective-Dw-WvSbL.js +4 -0
- package/dist/EpPieChart-BCtBWkxe.js +4 -0
- package/dist/EpQuestion-Hgznprlu.js +4 -0
- package/dist/EpQuote-CQLvUeVK.js +4 -0
- package/dist/EpRadio-DSRwVaD-.js +4 -0
- package/dist/EpRadioSummative-Dfh6pzsV.js +4 -0
- package/dist/EpReading-D0KkKNuU.js +4 -0
- package/dist/EpResource-CX599YKk.js +4 -0
- package/dist/EpScope-Cgx6HIBY.js +4 -0
- package/dist/EpSection-BD8bxHMp.js +4 -0
- package/dist/EpSectionCols-CqB3bUwU.js +4 -0
- package/dist/EpSkeleton-CN6QVbDm.js +4 -0
- package/dist/EpSoftware-DtMceEP0.js +4 -0
- package/dist/EpSpecificObjective-DpXhc11z.js +4 -0
- package/dist/EpSpinner-BqHqN5WU.js +4 -0
- package/dist/EpStackedList-DHuRW3oE.js +4 -0
- package/dist/EpSummativeTable-CoaHpCx_.js +4 -0
- package/dist/EpSvg-CnDKjTfO.js +4 -0
- package/dist/EpSvgShow-OGT303CY.js +4 -0
- package/dist/EpTable-BclCLFna.js +4 -0
- package/dist/EpTerm-DjJx2Buo.js +4 -0
- package/dist/EpText-CyRRZ8hC.js +4 -0
- package/dist/EpTimeLine-BuyySG7Z.js +4 -0
- package/dist/EpVideo-Bt0yvFYN.js +4 -0
- package/dist/EpVideoPanopto-D3wjsXiS.js +4 -0
- package/dist/EpWordDef-C330Ll3A.js +4 -0
- package/dist/TextMedia-h-DXXeI6.js +4 -0
- package/dist/components/interactions/Ep360Image.vue.d.ts +1 -16
- package/dist/components/interactions/Ep360Video.vue.d.ts +1 -15
- package/dist/components/medias/EpLottieSvg.vue.d.ts +1 -1
- package/dist/ep-lib-ts.js +1 -1
- package/dist/ep-lib-ts.umd.cjs +91 -4951
- package/dist/{index-C4wT5qUE.js → index-BUDqjQYW.js} +1 -1
- package/dist/{index-CxWafW_X.js → index-BeTpNY6O.js} +47 -47
- package/dist/{prism-CgWkMycv.js → prism-CV0akvnc.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/educationals/EpBranchingScenario.vue +2 -2
- package/src/components/interactions/Ep360Image.vue +130 -157
- package/src/components/interactions/Ep360Video.vue +13 -8
- package/dist/BgAudio-B0h7VdWq.js +0 -4
- package/dist/Details-DZKLvF9v.js +0 -4
- package/dist/DisplayBox-DDLKnmKJ.js +0 -4
- package/dist/Ep360Image-DHK_IWTi.js +0 -241
- package/dist/Ep360Video-C4PekHTc.js +0 -242
- package/dist/EpAlert-BjUplxWX.js +0 -4
- package/dist/EpAudio-CATD1Jbh.js +0 -4
- package/dist/EpAvatar-Dfsz07bn.js +0 -4
- package/dist/EpBadge-Dvu88JNL.js +0 -4
- package/dist/EpBarChart-Cl_SiAvN.js +0 -4
- package/dist/EpBtn-HearU7fk.js +0 -4
- package/dist/EpCard-DaEFsYjJ.js +0 -4
- package/dist/EpCardLink-B7-e3xGJ.js +0 -4
- package/dist/EpChip-B3Dl3sbg.js +0 -4
- package/dist/EpCodeblock-DhPVKsZw.js +0 -4
- package/dist/EpConclusion-DaQXAgp_.js +0 -4
- package/dist/EpContentSlider-MgPnsxoZ.js +0 -4
- package/dist/EpDescription-DWXlwJEL.js +0 -4
- package/dist/EpDivider-BmUwghGw.js +0 -4
- package/dist/EpDocument-Bh7tx9Z3.js +0 -4
- package/dist/EpEdu-CTUhM5xY.js +0 -4
- package/dist/EpFlex-bvQbwBqj.js +0 -4
- package/dist/EpFunnelChart-D57Qx8Ns.js +0 -4
- package/dist/EpHeader-BeNQdrDL.js +0 -4
- package/dist/EpHover-C6xm5kes.js +0 -4
- package/dist/EpHoverCard-D27lS9Lu.js +0 -4
- package/dist/EpIcon-DYyh_r_t.js +0 -4
- package/dist/EpIframe-DbHttqXB.js +0 -4
- package/dist/EpImg-DsXQcvsP.js +0 -4
- package/dist/EpImgCarousel-CCOYX3Sf.js +0 -4
- package/dist/EpInstructions-UzKvuasV.js +0 -4
- package/dist/EpIntroduction-DMSd580N.js +0 -4
- package/dist/EpLineChart-vIg84kEL.js +0 -4
- package/dist/EpLink-ByyNViWv.js +0 -4
- package/dist/EpLinkVersion-CcG0KUCD.js +0 -4
- package/dist/EpModal-C3eAYkVv.js +0 -4
- package/dist/EpObjective-B1T5_B94.js +0 -4
- package/dist/EpPieChart-BLup5pM9.js +0 -4
- package/dist/EpQuestion-BMmO301I.js +0 -4
- package/dist/EpQuote-BA8jGdmn.js +0 -4
- package/dist/EpRadio-BHQ8QDek.js +0 -4
- package/dist/EpRadioSummative-BSSwzhJH.js +0 -4
- package/dist/EpReading-pRs9Mtww.js +0 -4
- package/dist/EpResource-DVUh5ZLE.js +0 -4
- package/dist/EpScope-DlbXKFok.js +0 -4
- package/dist/EpSection-CI_u2BBY.js +0 -4
- package/dist/EpSectionCols-CpHJ4ZqV.js +0 -4
- package/dist/EpSkeleton-CneeChkb.js +0 -4
- package/dist/EpSoftware-wMOFrTQs.js +0 -4
- package/dist/EpSpecificObjective-D3-nfcdE.js +0 -4
- package/dist/EpSpinner-DHmfsvnE.js +0 -4
- package/dist/EpStackedList-DbQ_vuea.js +0 -4
- package/dist/EpSummativeTable-DlEEGid2.js +0 -4
- package/dist/EpSvg-N-aSiFRB.js +0 -4
- package/dist/EpSvgShow-DrenPNTe.js +0 -4
- package/dist/EpTable-CqM-ocWg.js +0 -4
- package/dist/EpTerm-D9ba8WkL.js +0 -4
- package/dist/EpText-BWLZ6D8r.js +0 -4
- package/dist/EpTimeLine-CXmdGtrb.js +0 -4
- package/dist/EpVideo-Blqwux-i.js +0 -4
- package/dist/EpVideoPanopto-DlHfv8Gm.js +0 -4
- package/dist/EpWordDef-Dbw7-k75.js +0 -4
- package/dist/TextMedia-D5hYAp0w.js +0 -4
- package/dist/three.module-B-oqC8Xk.js +0 -33752
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, ref as p, onMounted as $, createElementBlock as u, openBlock as d, createElementVNode as r, createCommentVNode as b, Fragment as _, renderList as j } from "vue";
|
|
2
|
-
import { V as x, Q as q } from "./three.module-B-oqC8Xk.js";
|
|
3
|
-
const V = { style: { width: "800px", height: "600px", overflow: "hidden", position: "relative", margin: "auto" } }, W = ["id"], H = ["id", "src"], L = ["src"], B = ["position"], N = ["color", "material", "onClick", "onMouseenter"], z = ["position"], G = ["value"], J = ["value"], K = ["position"], U = ["value"], X = ["value"], ee = /* @__PURE__ */ T({
|
|
4
|
-
__name: "Ep360Image",
|
|
5
|
-
props: {
|
|
6
|
-
scenes: {},
|
|
7
|
-
id: {}
|
|
8
|
-
},
|
|
9
|
-
setup(C) {
|
|
10
|
-
const v = C, f = p(0), a = p(null), i = p(null), s = window.AFRAME;
|
|
11
|
-
s.components["rotation-reader"] || s.registerComponent("rotation-reader", {
|
|
12
|
-
schema: {},
|
|
13
|
-
tick: w()
|
|
14
|
-
});
|
|
15
|
-
function A(e, t) {
|
|
16
|
-
if (e && ((e == null ? void 0 : e.event) === "onClick" || !e.event)) {
|
|
17
|
-
if (e.type == "descriptive")
|
|
18
|
-
i.value = e, t.target.setAttribute("material", "opacity: 0; transparent: true"), console.log("Marker clicked:", e);
|
|
19
|
-
else if (e.type == "action") {
|
|
20
|
-
const o = v.scenes.findIndex(
|
|
21
|
-
(n) => n.id === e.scene
|
|
22
|
-
);
|
|
23
|
-
o !== -1 && (f.value = o), console.log(
|
|
24
|
-
"Action Pin Clicked. Scene switched to:",
|
|
25
|
-
f.value
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function P(e, t) {
|
|
31
|
-
e && ((e == null ? void 0 : e.event) === "onHover" || !(e != null && e.event)) && (a.value = e, t.target.setAttribute("material", "opacity: 0; transparent: true"), console.log("Marker hovered:", e));
|
|
32
|
-
}
|
|
33
|
-
function E(e, t) {
|
|
34
|
-
var n;
|
|
35
|
-
if (!e) return;
|
|
36
|
-
const o = t.relatedTarget;
|
|
37
|
-
if ((e == null ? void 0 : e.event) === "onHover" || !(e != null && e.event)) {
|
|
38
|
-
const m = t.target;
|
|
39
|
-
console.log("children:", m.children), i.value == e && m.setAttribute("material", "opacity: 1; transparent: true"), !(o != null && o.classList.contains("interactive-area")) && ((n = a.value) == null ? void 0 : n.id) === (e == null ? void 0 : e.id) && (a.value = null, console.log("Hover cleared:", e));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function g(e, t) {
|
|
43
|
-
return `${e / 10} ${t / 10} -5`;
|
|
44
|
-
}
|
|
45
|
-
$(() => {
|
|
46
|
-
(async () => await M("rotation-reader", 2e3))(), (async () => await F(2e3))();
|
|
47
|
-
});
|
|
48
|
-
async function M(e, t = 1e3) {
|
|
49
|
-
s.components[e] && (await k(t), delete s.components[e]);
|
|
50
|
-
}
|
|
51
|
-
function k(e) {
|
|
52
|
-
return new Promise((t) => setTimeout(t, e));
|
|
53
|
-
}
|
|
54
|
-
async function F(e = 1e3) {
|
|
55
|
-
await k(e), s.components["rotation-reader"] && (console.warn(
|
|
56
|
-
"Existing rotation-reader component found. Re-registering..."
|
|
57
|
-
), delete s.components["rotation-reader"]), s.registerComponent("rotation-reader", {
|
|
58
|
-
schema: {},
|
|
59
|
-
tick: w()
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function w() {
|
|
63
|
-
const e = new q(), t = new x(), o = new x(), n = 5, m = 0.8;
|
|
64
|
-
return function() {
|
|
65
|
-
D(this.el.object3D, e);
|
|
66
|
-
const h = this.el.sceneEl;
|
|
67
|
-
R(e, h), this.el.object3D.getWorldPosition(t), h.querySelectorAll(".pin-marker").forEach((y) => {
|
|
68
|
-
const c = y.object3D;
|
|
69
|
-
if (c) {
|
|
70
|
-
c.getWorldPosition(o);
|
|
71
|
-
const l = t.distanceTo(o) * m / n;
|
|
72
|
-
c.scale.set(l, l, l);
|
|
73
|
-
}
|
|
74
|
-
}), h.querySelectorAll(".frame").forEach((y) => {
|
|
75
|
-
const c = y.object3D;
|
|
76
|
-
if (c) {
|
|
77
|
-
c.getWorldPosition(o);
|
|
78
|
-
const l = t.distanceTo(o) * m / n;
|
|
79
|
-
c.scale.set(l, l, l);
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function O(e) {
|
|
85
|
-
return a.value && a.value.id === e || i.value && i.value.id === e ? 0 : 1;
|
|
86
|
-
}
|
|
87
|
-
function D(e, t) {
|
|
88
|
-
e.getWorldQuaternion(t);
|
|
89
|
-
}
|
|
90
|
-
function R(e, t) {
|
|
91
|
-
t.querySelectorAll(".pin-marker").forEach((o) => {
|
|
92
|
-
const n = o.object3D;
|
|
93
|
-
n && n.setRotationFromQuaternion(e);
|
|
94
|
-
}), t.querySelectorAll(".frame").forEach((o) => {
|
|
95
|
-
const n = o.object3D;
|
|
96
|
-
n && n.setRotationFromQuaternion(e);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function S() {
|
|
100
|
-
i.value = null;
|
|
101
|
-
}
|
|
102
|
-
function Q(e) {
|
|
103
|
-
return e.color || "indigo";
|
|
104
|
-
}
|
|
105
|
-
return (e, t) => (d(), u("div", V, [
|
|
106
|
-
r("a-scene", {
|
|
107
|
-
id: e.id,
|
|
108
|
-
embedded: ""
|
|
109
|
-
}, [
|
|
110
|
-
r("a-assets", null, [
|
|
111
|
-
(d(!0), u(_, null, j(v.scenes, (o) => (d(), u("img", {
|
|
112
|
-
key: o.id,
|
|
113
|
-
id: `image${o.id}`,
|
|
114
|
-
src: o.skyImage,
|
|
115
|
-
crossorigin: "anonymous"
|
|
116
|
-
}, null, 8, H))), 128))
|
|
117
|
-
]),
|
|
118
|
-
t[4] || (t[4] = r("a-entity", {
|
|
119
|
-
camera: "",
|
|
120
|
-
"look-controls": "",
|
|
121
|
-
id: "rig",
|
|
122
|
-
"rotation-reader": ""
|
|
123
|
-
}, [
|
|
124
|
-
r("a-cursor", {
|
|
125
|
-
id: "cursor",
|
|
126
|
-
cursor: "rayOrigin: mouse",
|
|
127
|
-
raycaster: "objects: none",
|
|
128
|
-
geometry: "primitive: ring; radiusInner: 0; radiusOuter: 0",
|
|
129
|
-
material: "opacity: 0; transparent: true"
|
|
130
|
-
})
|
|
131
|
-
], -1)),
|
|
132
|
-
r("a-sky", {
|
|
133
|
-
src: `#image${v.scenes[f.value].id}`,
|
|
134
|
-
radius: "100"
|
|
135
|
-
}, null, 8, L),
|
|
136
|
-
(d(!0), u(_, null, j(v.scenes[f.value].pins, (o) => (d(), u("a-entity", {
|
|
137
|
-
key: o.id,
|
|
138
|
-
position: g(o.x, o.y),
|
|
139
|
-
cursor: "rayOrigin: mouse"
|
|
140
|
-
}, [
|
|
141
|
-
r("a-circle", {
|
|
142
|
-
class: "pin-marker",
|
|
143
|
-
color: Q(o),
|
|
144
|
-
radius: "0.15",
|
|
145
|
-
shader: "flat",
|
|
146
|
-
material: `opacity: ${O(
|
|
147
|
-
o.id
|
|
148
|
-
)}; transparent: true;`,
|
|
149
|
-
onClick: (n) => A(o, n),
|
|
150
|
-
onMouseenter: (n) => P(o, n)
|
|
151
|
-
}, t[1] || (t[1] = [
|
|
152
|
-
r("a-circle", {
|
|
153
|
-
position: "0 0 0.01",
|
|
154
|
-
color: "#FFF",
|
|
155
|
-
radius: "0.05",
|
|
156
|
-
material: "opacity: 0;"
|
|
157
|
-
}, null, -1)
|
|
158
|
-
]), 40, N)
|
|
159
|
-
], 8, B))), 128)),
|
|
160
|
-
a.value ? (d(), u("a-entity", {
|
|
161
|
-
key: 0,
|
|
162
|
-
position: g(a.value.x, a.value.y),
|
|
163
|
-
class: "frame interactive-area",
|
|
164
|
-
cursor: "rayOrigin: mouse",
|
|
165
|
-
onMouseleave: t[0] || (t[0] = (o) => E(a.value, o))
|
|
166
|
-
}, [
|
|
167
|
-
t[2] || (t[2] = r("a-plane", {
|
|
168
|
-
color: "white",
|
|
169
|
-
opacity: 1,
|
|
170
|
-
width: "4",
|
|
171
|
-
height: "1.5",
|
|
172
|
-
material: "shader: standard; side: double;",
|
|
173
|
-
position: "0 0 0",
|
|
174
|
-
geometry: "primitive: plane; height: 1.5; width: 4;"
|
|
175
|
-
}, null, -1)),
|
|
176
|
-
r("a-text", {
|
|
177
|
-
value: a.value.title,
|
|
178
|
-
color: "#2c3e50",
|
|
179
|
-
font: "dejavu",
|
|
180
|
-
align: "center",
|
|
181
|
-
width: "3.8",
|
|
182
|
-
position: "0 0.3 0.01"
|
|
183
|
-
}, null, 8, G),
|
|
184
|
-
r("a-text", {
|
|
185
|
-
value: a.value.description,
|
|
186
|
-
color: "#34495e",
|
|
187
|
-
font: "dejavu",
|
|
188
|
-
align: "center",
|
|
189
|
-
width: "3.5",
|
|
190
|
-
position: "0 -0.3 0.01"
|
|
191
|
-
}, null, 8, J)
|
|
192
|
-
], 40, z)) : b("", !0),
|
|
193
|
-
i.value ? (d(), u("a-entity", {
|
|
194
|
-
key: 1,
|
|
195
|
-
position: g(i.value.x, i.value.y),
|
|
196
|
-
class: "frame interactive-area",
|
|
197
|
-
cursor: "rayOrigin: mouse"
|
|
198
|
-
}, [
|
|
199
|
-
t[3] || (t[3] = r("a-plane", {
|
|
200
|
-
color: "white",
|
|
201
|
-
opacity: 1,
|
|
202
|
-
width: "4",
|
|
203
|
-
height: "1.5",
|
|
204
|
-
material: "shader: standard; side: double;",
|
|
205
|
-
position: "0 0 0",
|
|
206
|
-
geometry: "primitive: plane; height: 1.5; width: 4;"
|
|
207
|
-
}, null, -1)),
|
|
208
|
-
r("a-plane", {
|
|
209
|
-
class: "close-frame",
|
|
210
|
-
color: "red",
|
|
211
|
-
width: "0.4",
|
|
212
|
-
height: "0.4",
|
|
213
|
-
position: "1.8 0.55 0.01",
|
|
214
|
-
material: "shader: flat; side: double; transparent: true;",
|
|
215
|
-
geometry: "primitive: plane; height: 0.4; width: 0.4;",
|
|
216
|
-
onClick: S
|
|
217
|
-
}),
|
|
218
|
-
r("a-text", {
|
|
219
|
-
value: i.value.title,
|
|
220
|
-
color: "#2c3e50",
|
|
221
|
-
font: "dejavu",
|
|
222
|
-
align: "center",
|
|
223
|
-
width: "3.8",
|
|
224
|
-
position: "0 0.3 0.01"
|
|
225
|
-
}, null, 8, U),
|
|
226
|
-
r("a-text", {
|
|
227
|
-
value: i.value.description,
|
|
228
|
-
color: "#34495e",
|
|
229
|
-
font: "dejavu",
|
|
230
|
-
align: "center",
|
|
231
|
-
width: "3.5",
|
|
232
|
-
position: "0 -0.3 0.01"
|
|
233
|
-
}, null, 8, X)
|
|
234
|
-
], 8, K)) : b("", !0)
|
|
235
|
-
], 8, W)
|
|
236
|
-
]));
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
export {
|
|
240
|
-
ee as default
|
|
241
|
-
};
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { defineComponent as q, ref as h, onMounted as T, createElementBlock as s, openBlock as l, createElementVNode as n, toDisplayString as W, createCommentVNode as x, Fragment as p, renderList as k } from "vue";
|
|
2
|
-
import { V as P, Q as H } from "./three.module-B-oqC8Xk.js";
|
|
3
|
-
const I = { style: { width: "1200px", height: "800px", position: "relative", margin: "auto" } }, L = { embedded: "" }, B = ["id", "src"], N = ["src"], z = ["position"], G = ["color", "material", "onClick", "onMouseenter", "onMouseleave"], J = ["position"], K = ["value"], U = ["value"], X = ["position"], Y = ["value"], Z = ["value"], oe = /* @__PURE__ */ q({
|
|
4
|
-
__name: "Ep360Video",
|
|
5
|
-
props: {
|
|
6
|
-
scenes: {}
|
|
7
|
-
},
|
|
8
|
-
setup(C) {
|
|
9
|
-
const v = C, m = h(0), r = h(null), a = h(null), f = h(!1), c = window.AFRAME;
|
|
10
|
-
c.components["rotation-reader"] || c.registerComponent("rotation-reader", {
|
|
11
|
-
schema: {},
|
|
12
|
-
tick: _()
|
|
13
|
-
});
|
|
14
|
-
function E(e, t) {
|
|
15
|
-
if (e && (e == null ? void 0 : e.event) === "onClick") {
|
|
16
|
-
if (e.type === "descriptive")
|
|
17
|
-
a.value = e, t.target.setAttribute("material", "opacity: 0; transparent: true"), console.log("Marker clicked:", e);
|
|
18
|
-
else if (e.type === "action") {
|
|
19
|
-
const o = v.scenes.findIndex(
|
|
20
|
-
(i) => i.id === e.scene
|
|
21
|
-
);
|
|
22
|
-
o !== -1 && (m.value = o), console.log(
|
|
23
|
-
"Action Pin Clicked. Scene switched to:",
|
|
24
|
-
m.value
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function M(e, t) {
|
|
30
|
-
e && (e.event === "onHover" || !e.event) && (r.value = e, console.log("Marker hovered:", e));
|
|
31
|
-
}
|
|
32
|
-
function w(e, t) {
|
|
33
|
-
var i;
|
|
34
|
-
if (!e) return;
|
|
35
|
-
const o = t.relatedTarget;
|
|
36
|
-
(e.event === "onHover" || !(e != null && e.event)) && !(o != null && o.classList.contains("interactive-area")) && ((i = r.value) == null ? void 0 : i.id) === e.id && (r.value = null, console.log("Hover cleared:", e));
|
|
37
|
-
}
|
|
38
|
-
function g(e, t) {
|
|
39
|
-
return `${e / 10} ${t / 10} -5`;
|
|
40
|
-
}
|
|
41
|
-
function A() {
|
|
42
|
-
a.value = null;
|
|
43
|
-
}
|
|
44
|
-
function F(e) {
|
|
45
|
-
return e.color || "indigo";
|
|
46
|
-
}
|
|
47
|
-
function O(e) {
|
|
48
|
-
return r.value && r.value.id === e || a.value && a.value.id === e ? 0 : 1;
|
|
49
|
-
}
|
|
50
|
-
function S() {
|
|
51
|
-
f.value = !f.value, document.querySelectorAll(".video").forEach((t) => {
|
|
52
|
-
f.value ? t.play() : t.pause();
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
T(() => {
|
|
56
|
-
(async () => await D("rotation-reader", 2e3))(), (async () => await R(2e3))();
|
|
57
|
-
});
|
|
58
|
-
async function D(e, t = 1e3) {
|
|
59
|
-
c.components[e] && (await b(t), delete c.components[e]);
|
|
60
|
-
}
|
|
61
|
-
function b(e) {
|
|
62
|
-
return new Promise((t) => setTimeout(t, e));
|
|
63
|
-
}
|
|
64
|
-
async function R(e = 1e3) {
|
|
65
|
-
await b(e), c.components["rotation-reader"] && (console.warn("Existing rotation-reader found. Re-registering..."), delete c.components["rotation-reader"]), c.registerComponent("rotation-reader", {
|
|
66
|
-
schema: {},
|
|
67
|
-
tick: _()
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function _() {
|
|
71
|
-
const e = new H(), t = new P(), o = new P(), i = 5, j = 0.8;
|
|
72
|
-
return function() {
|
|
73
|
-
V(this.el.object3D, e), Q(e), this.el.object3D.getWorldPosition(t), document.querySelectorAll(".pin-marker").forEach((y) => {
|
|
74
|
-
const u = y.object3D;
|
|
75
|
-
if (u) {
|
|
76
|
-
u.getWorldPosition(o);
|
|
77
|
-
const d = t.distanceTo(o) * j / i;
|
|
78
|
-
u.scale.set(d, d, d);
|
|
79
|
-
}
|
|
80
|
-
}), document.querySelectorAll(".frame").forEach((y) => {
|
|
81
|
-
const u = y.object3D;
|
|
82
|
-
if (u) {
|
|
83
|
-
u.getWorldPosition(o);
|
|
84
|
-
const d = t.distanceTo(o) * j / i;
|
|
85
|
-
u.scale.set(d, d, d);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function V(e, t) {
|
|
91
|
-
e.getWorldQuaternion(t);
|
|
92
|
-
}
|
|
93
|
-
function Q(e) {
|
|
94
|
-
document.querySelectorAll(".pin-marker").forEach((t) => {
|
|
95
|
-
const o = t.object3D;
|
|
96
|
-
o && o.setRotationFromQuaternion(e);
|
|
97
|
-
}), document.querySelectorAll(".frame").forEach((t) => {
|
|
98
|
-
const o = t.object3D;
|
|
99
|
-
o && o.setRotationFromQuaternion(e);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
return (e, t) => (l(), s("div", I, [
|
|
103
|
-
n("button", {
|
|
104
|
-
onClick: t[0] || (t[0] = (o) => S())
|
|
105
|
-
}, W(f.value ? "Pause" : "Play"), 1),
|
|
106
|
-
n("a-scene", L, [
|
|
107
|
-
n("a-assets", null, [
|
|
108
|
-
(l(!0), s(p, null, k(v.scenes, (o) => (l(), s("video", {
|
|
109
|
-
id: `video${o.id}`,
|
|
110
|
-
src: o.skyVideo,
|
|
111
|
-
muted: "",
|
|
112
|
-
class: "video",
|
|
113
|
-
playsinline: "",
|
|
114
|
-
loop: "",
|
|
115
|
-
crossorigin: "anonymous"
|
|
116
|
-
}, null, 8, B))), 256))
|
|
117
|
-
]),
|
|
118
|
-
t[5] || (t[5] = n("a-entity", {
|
|
119
|
-
camera: "",
|
|
120
|
-
"look-controls": "",
|
|
121
|
-
id: "rig",
|
|
122
|
-
"rotation-reader": ""
|
|
123
|
-
}, [
|
|
124
|
-
n("a-cursor", {
|
|
125
|
-
id: "cursor",
|
|
126
|
-
cursor: "rayOrigin: mouse",
|
|
127
|
-
raycaster: "objects: none",
|
|
128
|
-
geometry: "primitive: ring; radiusInner: 0; radiusOuter: 0",
|
|
129
|
-
material: "opacity: 0; transparent: true"
|
|
130
|
-
})
|
|
131
|
-
], -1)),
|
|
132
|
-
(l(!0), s(p, null, k(v.scenes, (o) => (l(), s("a-videosphere", {
|
|
133
|
-
key: o.id,
|
|
134
|
-
src: `#video${v.scenes[m.value].id}`
|
|
135
|
-
}, null, 8, N))), 128)),
|
|
136
|
-
(l(!0), s(p, null, k(v.scenes[m.value].pins, (o) => (l(), s("a-entity", {
|
|
137
|
-
key: o.id,
|
|
138
|
-
position: g(o.x, o.y),
|
|
139
|
-
cursor: "rayOrigin: mouse"
|
|
140
|
-
}, [
|
|
141
|
-
n("a-circle", {
|
|
142
|
-
class: "pin-marker",
|
|
143
|
-
color: F(o),
|
|
144
|
-
radius: "0.15",
|
|
145
|
-
shader: "flat",
|
|
146
|
-
material: `opacity: ${O(
|
|
147
|
-
o.id
|
|
148
|
-
)}; transparent: true`,
|
|
149
|
-
onClick: (i) => E(o, i),
|
|
150
|
-
onMouseenter: (i) => M(o),
|
|
151
|
-
onMouseleave: (i) => w(o, i)
|
|
152
|
-
}, t[2] || (t[2] = [
|
|
153
|
-
n("a-circle", {
|
|
154
|
-
position: "0 0 0.01",
|
|
155
|
-
color: "#FFF",
|
|
156
|
-
radius: "0.05",
|
|
157
|
-
material: "opacity: 0;"
|
|
158
|
-
}, null, -1)
|
|
159
|
-
]), 40, G)
|
|
160
|
-
], 8, z))), 128)),
|
|
161
|
-
r.value ? (l(), s("a-entity", {
|
|
162
|
-
key: 0,
|
|
163
|
-
position: g(r.value.x, r.value.y),
|
|
164
|
-
class: "frame interactive-area",
|
|
165
|
-
cursor: "rayOrigin: mouse",
|
|
166
|
-
onMouseleave: t[1] || (t[1] = (o) => w(r.value, o))
|
|
167
|
-
}, [
|
|
168
|
-
t[3] || (t[3] = n("a-plane", {
|
|
169
|
-
color: "white",
|
|
170
|
-
opacity: 1,
|
|
171
|
-
width: "4",
|
|
172
|
-
height: "1.5",
|
|
173
|
-
material: "shader: standard; side: double;",
|
|
174
|
-
position: "0 0 0",
|
|
175
|
-
geometry: "primitive: plane; height: 1.5; width: 4;"
|
|
176
|
-
}, null, -1)),
|
|
177
|
-
n("a-text", {
|
|
178
|
-
value: r.value.title,
|
|
179
|
-
color: "#2c3e50",
|
|
180
|
-
font: "dejavu",
|
|
181
|
-
align: "center",
|
|
182
|
-
width: "3.8",
|
|
183
|
-
position: "0 0.3 0.01"
|
|
184
|
-
}, null, 8, K),
|
|
185
|
-
n("a-text", {
|
|
186
|
-
value: r.value.description,
|
|
187
|
-
color: "#34495e",
|
|
188
|
-
font: "dejavu",
|
|
189
|
-
align: "center",
|
|
190
|
-
width: "3.5",
|
|
191
|
-
position: "0 -0.3 0.01"
|
|
192
|
-
}, null, 8, U)
|
|
193
|
-
], 40, J)) : x("", !0),
|
|
194
|
-
a.value ? (l(), s("a-entity", {
|
|
195
|
-
key: 1,
|
|
196
|
-
position: g(a.value.x, a.value.y),
|
|
197
|
-
class: "frame interactive-area",
|
|
198
|
-
cursor: "rayOrigin: mouse"
|
|
199
|
-
}, [
|
|
200
|
-
t[4] || (t[4] = n("a-plane", {
|
|
201
|
-
color: "white",
|
|
202
|
-
opacity: 1,
|
|
203
|
-
width: "4",
|
|
204
|
-
height: "1.5",
|
|
205
|
-
material: "shader: standard; side: double;",
|
|
206
|
-
position: "0 0 0",
|
|
207
|
-
geometry: "primitive: plane; height: 1.5; width: 4;"
|
|
208
|
-
}, null, -1)),
|
|
209
|
-
n("a-plane", {
|
|
210
|
-
class: "close-frame",
|
|
211
|
-
color: "red",
|
|
212
|
-
width: "0.4",
|
|
213
|
-
height: "0.4",
|
|
214
|
-
position: "1.8 0.55 0.01",
|
|
215
|
-
material: "shader: flat; side: double; transparent: true;",
|
|
216
|
-
geometry: "primitive: plane; height: 0.4; width: 0.4;",
|
|
217
|
-
onClick: A
|
|
218
|
-
}),
|
|
219
|
-
n("a-text", {
|
|
220
|
-
value: a.value.title,
|
|
221
|
-
color: "#2c3e50",
|
|
222
|
-
font: "dejavu",
|
|
223
|
-
align: "center",
|
|
224
|
-
width: "3.8",
|
|
225
|
-
position: "0 0.3 0.01"
|
|
226
|
-
}, null, 8, Y),
|
|
227
|
-
n("a-text", {
|
|
228
|
-
value: a.value.description,
|
|
229
|
-
color: "#34495e",
|
|
230
|
-
font: "dejavu",
|
|
231
|
-
align: "center",
|
|
232
|
-
width: "3.5",
|
|
233
|
-
position: "0 -0.3 0.01"
|
|
234
|
-
}, null, 8, Z)
|
|
235
|
-
], 8, X)) : x("", !0)
|
|
236
|
-
])
|
|
237
|
-
]));
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
export {
|
|
241
|
-
oe as default
|
|
242
|
-
};
|
package/dist/EpAlert-BjUplxWX.js
DELETED
package/dist/EpAudio-CATD1Jbh.js
DELETED
package/dist/EpBadge-Dvu88JNL.js
DELETED
package/dist/EpBtn-HearU7fk.js
DELETED
package/dist/EpCard-DaEFsYjJ.js
DELETED
package/dist/EpChip-B3Dl3sbg.js
DELETED
package/dist/EpEdu-CTUhM5xY.js
DELETED
package/dist/EpFlex-bvQbwBqj.js
DELETED
package/dist/EpHover-C6xm5kes.js
DELETED
package/dist/EpIcon-DYyh_r_t.js
DELETED
package/dist/EpImg-DsXQcvsP.js
DELETED
package/dist/EpLink-ByyNViWv.js
DELETED
package/dist/EpModal-C3eAYkVv.js
DELETED