ep-lib-ts 1.0.51 → 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-DjqBE3PK.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-BdqCt0bX.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-Dn3ZhCkT.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-Yhz8LAhH.js → EpList-B6uNyw7z.js} +1 -1
- package/dist/EpModal-CsAO3Czp.js +4 -0
- package/dist/{EpNothing-TCBDkSPe.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/educationals/EpBranchingScenario.vue.d.ts +1 -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/components/tools/TextMedia.vue.d.ts +2 -0
- package/dist/ep-lib-ts.js +1 -1
- package/dist/ep-lib-ts.umd.cjs +91 -4951
- package/dist/{index-DVN62rPz.js → index-BUDqjQYW.js} +1 -1
- package/dist/{index-BZh3ZH_r.js → index-BeTpNY6O.js} +1999 -1984
- package/dist/{prism-CnGAWjP8.js → prism-CV0akvnc.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Component.d.ts +1 -0
- package/dist/types/Hierarchy.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/basics/EpCard.vue +2 -2
- package/src/components/educationals/EpBranchingScenario.vue +31 -44
- package/src/components/educationals/EpDocument.vue +1 -1
- package/src/components/forms/EpSwitch.vue +0 -1
- package/src/components/interactions/Ep360Image.vue +130 -157
- package/src/components/interactions/Ep360Video.vue +13 -8
- package/src/components/tools/Details.vue +1 -0
- package/src/components/tools/TextMedia.vue +12 -2
- package/dist/BgAudio-CfOyhY60.js +0 -4
- package/dist/Details-C2ibtnG1.js +0 -4
- package/dist/DisplayBox-842AxmPD.js +0 -4
- package/dist/Ep360Image-DHK_IWTi.js +0 -241
- package/dist/Ep360Video-C4PekHTc.js +0 -242
- package/dist/EpAlert-D_1oS26j.js +0 -4
- package/dist/EpAudio-CkAmtlFP.js +0 -4
- package/dist/EpAvatar-C3aEQ8pb.js +0 -4
- package/dist/EpBadge-DTAqBHg0.js +0 -4
- package/dist/EpBarChart-B477k9Ot.js +0 -4
- package/dist/EpBtn-w2CaP7VV.js +0 -4
- package/dist/EpCard-BBn794w5.js +0 -4
- package/dist/EpCardLink-BXD2hNWN.js +0 -4
- package/dist/EpChip-D7yiZLYj.js +0 -4
- package/dist/EpCodeblock-Csmouv_q.js +0 -4
- package/dist/EpConclusion-B3uB1fwu.js +0 -4
- package/dist/EpContentSlider-DhQqokB-.js +0 -4
- package/dist/EpDescription-DXFCekiB.js +0 -4
- package/dist/EpDivider-DuqIp04O.js +0 -4
- package/dist/EpDocument-kCCmYdZd.js +0 -4
- package/dist/EpEdu-Cmoe0FPr.js +0 -4
- package/dist/EpFlex-B5vaUPNy.js +0 -4
- package/dist/EpFunnelChart-CCY-RIHg.js +0 -4
- package/dist/EpHeader-hbN7H1zv.js +0 -4
- package/dist/EpHover-BEfGwtRy.js +0 -4
- package/dist/EpHoverCard-CLc-BteV.js +0 -4
- package/dist/EpIcon-DBG-wtLX.js +0 -4
- package/dist/EpIframe-B8sHwop-.js +0 -4
- package/dist/EpImg-CmzA6uO-.js +0 -4
- package/dist/EpImgCarousel-CV6GYKIV.js +0 -4
- package/dist/EpInstructions-_ZpOEQkA.js +0 -4
- package/dist/EpIntroduction-LMhdJymO.js +0 -4
- package/dist/EpLineChart-BTfB4-nk.js +0 -4
- package/dist/EpLink-D_RoQCwk.js +0 -4
- package/dist/EpLinkVersion-CyJ5Zso3.js +0 -4
- package/dist/EpModal-D6002RFz.js +0 -4
- package/dist/EpObjective-me7OFFWn.js +0 -4
- package/dist/EpPieChart-C0myD-Lh.js +0 -4
- package/dist/EpQuestion-Dgd_r9Di.js +0 -4
- package/dist/EpQuote-CerpN43p.js +0 -4
- package/dist/EpRadio-D788J3ol.js +0 -4
- package/dist/EpRadioSummative-CpBwOYCi.js +0 -4
- package/dist/EpReading-wcrCpcQ-.js +0 -4
- package/dist/EpResource-Dh038rvl.js +0 -4
- package/dist/EpScope-N1_GpZry.js +0 -4
- package/dist/EpSection-BtV8HQLl.js +0 -4
- package/dist/EpSectionCols-CVaWBh4Z.js +0 -4
- package/dist/EpSkeleton-PLY2DMXj.js +0 -4
- package/dist/EpSoftware--IWOZC1R.js +0 -4
- package/dist/EpSpecificObjective-CH7jCrOb.js +0 -4
- package/dist/EpSpinner-BnJarh6N.js +0 -4
- package/dist/EpStackedList-CB9birW-.js +0 -4
- package/dist/EpSummativeTable-C5HW1Sk5.js +0 -4
- package/dist/EpSvg-F4ikbEKY.js +0 -4
- package/dist/EpSvgShow-CEdQpJyn.js +0 -4
- package/dist/EpTable-SSCSZK__.js +0 -4
- package/dist/EpTerm-_NGJgmG0.js +0 -4
- package/dist/EpText-CzSBl1zy.js +0 -4
- package/dist/EpTimeLine-BnK4Gl34.js +0 -4
- package/dist/EpVideo-DLYxwxnk.js +0 -4
- package/dist/EpVideoPanopto-BOx_s1Qa.js +0 -4
- package/dist/EpWordDef-CGSFlRbS.js +0 -4
- package/dist/TextMedia-ovcNIdCV.js +0 -4
- package/dist/three.module-B-oqC8Xk.js +0 -33752
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/*
|
|
2
3
|
import { ref, onMounted } from "vue";
|
|
3
4
|
// import * as AFRAME from "aframe";
|
|
4
|
-
|
|
5
|
+
|
|
5
6
|
import { Object3D, Quaternion, Vector3 } from "three";
|
|
6
7
|
import type { Pin, Scene } from "../../types/video360";
|
|
7
8
|
|
|
@@ -194,10 +195,11 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
194
195
|
frameObject.setRotationFromQuaternion(quaternion);
|
|
195
196
|
}
|
|
196
197
|
});
|
|
197
|
-
}
|
|
198
|
+
}*/
|
|
198
199
|
</script>
|
|
199
200
|
|
|
200
201
|
<template>
|
|
202
|
+
<!--
|
|
201
203
|
<div style="width: 1200px; height: 800px; position: relative; margin: auto">
|
|
202
204
|
<button @click="toggleVideo()">
|
|
203
205
|
{{ isPlaying ? "Pause" : "Play" }}
|
|
@@ -217,7 +219,7 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
217
219
|
></video>
|
|
218
220
|
</a-assets>
|
|
219
221
|
|
|
220
|
-
|
|
222
|
+
|
|
221
223
|
<a-entity camera look-controls id="rig" rotation-reader>
|
|
222
224
|
<a-cursor
|
|
223
225
|
id="cursor"
|
|
@@ -228,14 +230,14 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
228
230
|
></a-cursor>
|
|
229
231
|
</a-entity>
|
|
230
232
|
|
|
231
|
-
|
|
233
|
+
|
|
232
234
|
<a-videosphere
|
|
233
235
|
v-for="scene in props.scenes"
|
|
234
236
|
:key="scene.id"
|
|
235
237
|
:src="`#video${props.scenes[currentSceneIndex].id}`"
|
|
236
238
|
></a-videosphere>
|
|
237
239
|
|
|
238
|
-
|
|
240
|
+
|
|
239
241
|
<a-entity
|
|
240
242
|
v-for="pin in props.scenes[currentSceneIndex].pins"
|
|
241
243
|
:key="pin.id"
|
|
@@ -254,7 +256,7 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
254
256
|
@mouseenter="(event: Event) => handleMouseEnter(pin, event)"
|
|
255
257
|
@mouseleave="(event: Event) => handleMouseLeave(pin, event)"
|
|
256
258
|
>
|
|
257
|
-
|
|
259
|
+
|
|
258
260
|
<a-circle
|
|
259
261
|
position="0 0 0.01"
|
|
260
262
|
color="#FFF"
|
|
@@ -265,7 +267,7 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
265
267
|
</a-circle>
|
|
266
268
|
</a-entity>
|
|
267
269
|
|
|
268
|
-
|
|
270
|
+
|
|
269
271
|
<a-entity
|
|
270
272
|
v-if="hoveredPin"
|
|
271
273
|
:position="convertToPosition(hoveredPin.x, hoveredPin.y)"
|
|
@@ -301,7 +303,7 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
301
303
|
></a-text>
|
|
302
304
|
</a-entity>
|
|
303
305
|
|
|
304
|
-
|
|
306
|
+
|
|
305
307
|
<a-entity
|
|
306
308
|
v-if="clickedPin"
|
|
307
309
|
:position="convertToPosition(clickedPin.x, clickedPin.y)"
|
|
@@ -347,5 +349,8 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
347
349
|
></a-text>
|
|
348
350
|
</a-entity>
|
|
349
351
|
</a-scene>
|
|
352
|
+
</div>-->
|
|
353
|
+
<div>
|
|
354
|
+
La lib aframe et three.js à revoir
|
|
350
355
|
</div>
|
|
351
356
|
</template>
|
|
@@ -7,6 +7,8 @@ import type { NestedComponents } from "../../types/Component";
|
|
|
7
7
|
interface Props{
|
|
8
8
|
media?:NestedComponents;
|
|
9
9
|
text:string;
|
|
10
|
+
cols?:boolean;
|
|
11
|
+
textLeft?:boolean
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -20,11 +22,19 @@ const currentRenderComponent = computed(() => {
|
|
|
20
22
|
return null;
|
|
21
23
|
});
|
|
22
24
|
|
|
25
|
+
const colsStyle = computed(()=> {
|
|
26
|
+
return props.cols ? 'flex items-center justify-center gap-1' : ''
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const alignText = computed(()=>{
|
|
30
|
+
return props.textLeft ? '' : 'justify-center';
|
|
31
|
+
})
|
|
32
|
+
|
|
23
33
|
</script>
|
|
24
34
|
|
|
25
35
|
<template>
|
|
26
|
-
<div class="
|
|
27
|
-
<div class="w-full" v-html="useRenderText(text)"></div>
|
|
36
|
+
<div :class="colsStyle">
|
|
37
|
+
<div :class="`w-full flex ${alignText}`" v-html="useRenderText(text)"></div>
|
|
28
38
|
<div class="w-full" v-if="currentRenderComponent && media">
|
|
29
39
|
<component
|
|
30
40
|
:is="currentRenderComponent"
|
package/dist/BgAudio-CfOyhY60.js
DELETED
package/dist/Details-C2ibtnG1.js
DELETED
|
@@ -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-D_1oS26j.js
DELETED
package/dist/EpAudio-CkAmtlFP.js
DELETED
package/dist/EpBadge-DTAqBHg0.js
DELETED
package/dist/EpBtn-w2CaP7VV.js
DELETED
package/dist/EpCard-BBn794w5.js
DELETED
package/dist/EpChip-D7yiZLYj.js
DELETED