@shjjs/visual-ui 3.0.7 → 3.0.9
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/commons/plugins/datasource/index.mjs +53 -52
- package/es/commons/plugins/datasource/utils/utils.mjs +5 -5
- package/es/components/Commons/components/CustomComponentRender/index.vue.mjs +2 -2
- package/es/components/Commons/components/CustomComponentRender/index.vue2.mjs +8 -6
- package/es/components/Commons/components/ModelViewer/index.vue.mjs +81 -71
- package/es/components/Scene/components/Amap2d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Amap2d/index.vue2.mjs +140 -136
- package/es/components/Scene/components/Amap3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Amap3d/index.vue2.mjs +221 -213
- package/es/components/Scene/components/Map3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Map3d/utils/map.mjs +23 -21
- package/es/components/Scene/components/Vr/index.vue.mjs +1 -1
- package/es/components/Scene/components/Vr/index.vue2.mjs +326 -249
- package/es/packages/commons/plugins/datasource/utils/utils.d.ts +1 -1
- package/es/packages/components/Commons/components/ModelViewer/index.vue.d.ts +2 -1
- package/es/packages/components/Scene/components/Amap2d/index.vue.d.ts +2 -0
- package/es/packages/components/Scene/components/Vr/index.vue.d.ts +2 -1
- package/es/widgets.css +1 -1
- package/package.json +76 -76
- package/umd/index.js +1272 -1269
- package/umd/widgets.css +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as $, computed as P, ref as p, watch as D, onMounted as we, nextTick as C, onUnmounted as fe, resolveComponent as N, createElementBlock as s, openBlock as c, createCommentVNode as u, createElementVNode as l, Fragment as G, withDirectives as W, vShow as U, normalizeStyle as j, createVNode as Y, withCtx as F, renderList as Se, toDisplayString as Ve, createStaticVNode as ye } from "vue";
|
|
2
|
+
import ge from "./resources/zv-vr-select.svg.mjs";
|
|
3
|
+
import _ from "./resources/zv-return.svg.mjs";
|
|
4
|
+
import he from "./resources/zv-add.svg.mjs";
|
|
5
|
+
import He from "./resources/zv-reduce.svg.mjs";
|
|
6
6
|
import be from "./resources/zv-play.svg.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { useRoute as
|
|
7
|
+
import Je from "./resources/zv-pause.svg.mjs";
|
|
8
|
+
import ke from "./resources/zv-refresh.svg.mjs";
|
|
9
|
+
import M from "hls.js";
|
|
10
|
+
import { cloneDeep as H, isArray as Ee, debounce as Te } from "lodash";
|
|
11
|
+
import { useRoute as Ce } from "vue-router";
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
import "../../../Interaction/components/Tabs/index.mjs";
|
|
@@ -164,28 +164,28 @@ import "../UnityIframe/index.mjs";
|
|
|
164
164
|
import "../UnityWebgl/index.mjs";
|
|
165
165
|
import "./index.mjs";
|
|
166
166
|
import "../Earth/index.mjs";
|
|
167
|
-
import { SHJParseEvent as
|
|
167
|
+
import { SHJParseEvent as I } from "../../../../commons/plugins/event/index.mjs";
|
|
168
168
|
import "../../../../commons/plugins/datasource/utils/request.mjs";
|
|
169
169
|
import "mqtt";
|
|
170
170
|
import "nanoid";
|
|
171
|
-
import { upgradeVr as
|
|
172
|
-
const
|
|
171
|
+
import { upgradeVr as Ie } from "./version.mjs";
|
|
172
|
+
const Oe = {
|
|
173
173
|
key: 0,
|
|
174
174
|
class: "loading-placeholder"
|
|
175
|
-
},
|
|
175
|
+
}, Re = {
|
|
176
176
|
id: "panorama",
|
|
177
177
|
class: "vr-scene"
|
|
178
178
|
}, _e = {
|
|
179
179
|
id: "panorama-video-wrap",
|
|
180
180
|
class: "vr-scene-main"
|
|
181
|
-
},
|
|
181
|
+
}, Ae = {
|
|
182
182
|
key: 2,
|
|
183
183
|
class: "vr-scene-controls"
|
|
184
|
-
},
|
|
184
|
+
}, Le = { class: "scene-list" }, xe = ["onClick"], Pe = ["src"], je = { class: "label" }, Me = ["autoplay", "loop", "volume"], ze = ["src"], Be = {
|
|
185
185
|
key: 4,
|
|
186
186
|
class: "mouse-tip"
|
|
187
|
-
},
|
|
188
|
-
...
|
|
187
|
+
}, De = $({ name: "ShjVr" }), Xr = /* @__PURE__ */ $({
|
|
188
|
+
...De,
|
|
189
189
|
props: {
|
|
190
190
|
option: {},
|
|
191
191
|
sources: {},
|
|
@@ -197,16 +197,16 @@ const Re = {
|
|
|
197
197
|
"on-scene-zooming",
|
|
198
198
|
"on-scene-hotClick"
|
|
199
199
|
],
|
|
200
|
-
setup(
|
|
201
|
-
const
|
|
202
|
-
let
|
|
203
|
-
const
|
|
200
|
+
setup(y, { expose: Z, emit: K }) {
|
|
201
|
+
const q = Ce(), t = P(() => Ie(y.option)), b = K, w = p(), f = p({ src: "", autoplay: !0, loop: !0, volume: 50 }), m = p(null), S = p(null), A = p(), v = p(!1), V = p(!1);
|
|
202
|
+
let J = null;
|
|
203
|
+
const Q = p(t.value.default.firstScene), g = p(Q.value), r = P(() => {
|
|
204
204
|
try {
|
|
205
|
-
return
|
|
205
|
+
return t.value.scenes[g.value];
|
|
206
206
|
} catch {
|
|
207
207
|
return null;
|
|
208
208
|
}
|
|
209
|
-
}),
|
|
209
|
+
}), z = {
|
|
210
210
|
bylineLabel: "来自 %s",
|
|
211
211
|
noPanoramaError: "未指定全景图像。",
|
|
212
212
|
fileAccessError: "The file %s could not be accessed.",
|
|
@@ -215,21 +215,25 @@ const Re = {
|
|
|
215
215
|
genericWebGLError: "您的浏览器没有显示此全景图所需的WebGL支持。",
|
|
216
216
|
textureSizeError: "This panorama is too big for your device! It's %spx wide, but your device only supports images up to %spx wide. Try another device. (If you're the author, try scaling down the image.)",
|
|
217
217
|
unknownError: "未知错误。检查开发人员控制台。"
|
|
218
|
-
},
|
|
218
|
+
}, X = () => {
|
|
219
|
+
const o = H(t.value);
|
|
219
220
|
window.SHJSceneVrViewer = window.pannellum.viewer("panorama", {
|
|
220
|
-
...o
|
|
221
|
-
default: Object.assign(
|
|
222
|
-
firstScene:
|
|
221
|
+
...o,
|
|
222
|
+
default: Object.assign(H(o.default), {
|
|
223
|
+
firstScene: g.value
|
|
223
224
|
}),
|
|
224
|
-
strings:
|
|
225
|
+
strings: z
|
|
225
226
|
});
|
|
226
|
-
},
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
}, ee = () => {
|
|
228
|
+
var n, a;
|
|
229
|
+
const o = () => {
|
|
230
|
+
const d = document.getElementById("panorama-video-wrap");
|
|
231
|
+
d.innerHTML = `
|
|
230
232
|
<video
|
|
231
233
|
id="panorama-video"
|
|
232
234
|
autoplay
|
|
235
|
+
muted
|
|
236
|
+
playsinline
|
|
233
237
|
class="video-js vjs-default-skin vr-scene vjs-big-play-centered"
|
|
234
238
|
preload="none"
|
|
235
239
|
style="width:100%;height:100%;"
|
|
@@ -238,105 +242,158 @@ const Re = {
|
|
|
238
242
|
</video>
|
|
239
243
|
`;
|
|
240
244
|
};
|
|
241
|
-
|
|
245
|
+
m.value && (m.value.dispose(), m.value = null, o()), m.value || o();
|
|
242
246
|
const e = document.getElementById(
|
|
243
247
|
"panorama-video"
|
|
244
|
-
),
|
|
245
|
-
if (
|
|
248
|
+
), i = H(t.value);
|
|
249
|
+
if (m.value = window.videojs(e, {
|
|
246
250
|
loop: !0,
|
|
247
251
|
autoplay: !0,
|
|
252
|
+
muted: !0,
|
|
253
|
+
controls: !1,
|
|
248
254
|
plugins: {
|
|
249
255
|
pannellum: {
|
|
250
|
-
...
|
|
251
|
-
default: Object.assign(
|
|
252
|
-
firstScene:
|
|
256
|
+
...i,
|
|
257
|
+
default: Object.assign(H(i.default), {
|
|
258
|
+
firstScene: g.value
|
|
253
259
|
}),
|
|
254
|
-
strings:
|
|
260
|
+
strings: z
|
|
255
261
|
}
|
|
256
262
|
}
|
|
257
|
-
}), window.SHJSceneVrViewer =
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
263
|
+
}), window.SHJSceneVrViewer = m.value.pnlmViewer, r.value.sceneType === "video" && (e.muted = !0, e.src = r.value.panorama, (n = e.play) == null || n.call(e).catch(() => {
|
|
264
|
+
})), r.value.sceneType === "hls")
|
|
265
|
+
if (M.isSupported()) {
|
|
266
|
+
if (S.value)
|
|
267
|
+
try {
|
|
268
|
+
S.value.destroy();
|
|
269
|
+
} catch {
|
|
270
|
+
}
|
|
271
|
+
const d = new M();
|
|
272
|
+
S.value = d, d.loadSource(r.value.panorama), d.attachMedia(e), d.on(M.Events.MANIFEST_PARSED, () => {
|
|
273
|
+
e.muted = !0, e.play();
|
|
262
274
|
});
|
|
263
|
-
} else e.canPlayType("application/vnd.apple.mpegurl") && (e.src =
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
} else e.canPlayType("application/vnd.apple.mpegurl") && (e.src = r.value.panorama, e.muted = !0, (a = e.play) == null || a.call(e).catch(() => {
|
|
276
|
+
}));
|
|
277
|
+
}, k = q.path.includes("designer-vr"), h = (o = !1) => {
|
|
278
|
+
if (!(!o && (!v.value || V.value))) {
|
|
279
|
+
if (o) {
|
|
280
|
+
if (V.value = !1, window.SHJSceneVrViewer) {
|
|
281
|
+
try {
|
|
282
|
+
window.SHJSceneVrViewer.destroy();
|
|
283
|
+
} catch {
|
|
284
|
+
}
|
|
285
|
+
window.SHJSceneVrViewer = null;
|
|
286
|
+
}
|
|
287
|
+
if (m.value) {
|
|
288
|
+
try {
|
|
289
|
+
m.value.dispose();
|
|
290
|
+
} catch {
|
|
291
|
+
}
|
|
292
|
+
m.value = null;
|
|
293
|
+
}
|
|
294
|
+
if (S.value) {
|
|
295
|
+
try {
|
|
296
|
+
S.value.destroy();
|
|
297
|
+
} catch {
|
|
298
|
+
}
|
|
299
|
+
S.value = null;
|
|
300
|
+
}
|
|
301
|
+
const e = document.getElementById(
|
|
302
|
+
"panorama-video"
|
|
278
303
|
);
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}, 100);
|
|
287
|
-
});
|
|
288
|
-
}();
|
|
289
|
-
} catch {
|
|
304
|
+
if (e && (e.pause(), e.src = "", e.srcObject = null, e.load(), e.hls))
|
|
305
|
+
try {
|
|
306
|
+
e.hls.destroy(), e.hls = null;
|
|
307
|
+
} catch {
|
|
308
|
+
}
|
|
309
|
+
const i = document.getElementById("panorama-video-wrap");
|
|
310
|
+
i && (i.innerHTML = "");
|
|
290
311
|
}
|
|
291
|
-
window.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
y
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
i.value
|
|
312
|
-
);
|
|
313
|
-
});
|
|
314
|
-
}), window.SHJSceneVrViewer.on(
|
|
315
|
-
"zoomchange",
|
|
316
|
-
he(() => {
|
|
317
|
-
g("on-scene-zooming", i.value), E.parseEvents(
|
|
318
|
-
S.useEvents,
|
|
319
|
-
"on-scene-zooming",
|
|
320
|
-
i.value
|
|
312
|
+
if (window.pannellum && t.value) {
|
|
313
|
+
if (!o && window.SHJSceneVrViewer) {
|
|
314
|
+
try {
|
|
315
|
+
window.SHJSceneVrViewer.destroy();
|
|
316
|
+
} catch {
|
|
317
|
+
}
|
|
318
|
+
window.SHJSceneVrViewer = null;
|
|
319
|
+
}
|
|
320
|
+
r.value.sceneType === "image" ? X() : ee();
|
|
321
|
+
try {
|
|
322
|
+
t.value.scenes[window.SHJSceneVrViewer.getScene()] && (f.value = t.value.default.audio, w.value && f.value && (window.SHJSceneVrViewer.audio = w, w.value.src = f.value.src, setTimeout(() => {
|
|
323
|
+
w.value && (T.value = w.value.paused);
|
|
324
|
+
}, 500)));
|
|
325
|
+
} catch {
|
|
326
|
+
}
|
|
327
|
+
window.SHJSceneVrViewer.on("load", () => {
|
|
328
|
+
b("on-scene-loaded", r.value), I.parseEvents(
|
|
329
|
+
y.useEvents,
|
|
330
|
+
"on-scene-loaded",
|
|
331
|
+
r.value
|
|
321
332
|
);
|
|
322
|
-
},
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
333
|
+
}), k || t.value.default.autoRotate === 0 ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate();
|
|
334
|
+
try {
|
|
335
|
+
window.SHJSceneVrViewer && async function() {
|
|
336
|
+
const e = H(t.value.scenes);
|
|
337
|
+
for (const i in e)
|
|
338
|
+
Object.prototype.hasOwnProperty.call(e, i) && e[i].hotSpots.forEach(async (a) => {
|
|
339
|
+
await setTimeout(() => {
|
|
340
|
+
const d = H(a);
|
|
341
|
+
d.draggable = k, window.SHJSceneVrViewer.removeHotSpot(d.id, i), window.SHJSceneVrViewer.addHotSpot(d, i);
|
|
342
|
+
}, 100);
|
|
343
|
+
});
|
|
344
|
+
}();
|
|
345
|
+
} catch {
|
|
346
|
+
}
|
|
347
|
+
window.SHJSceneVrViewer.on("scenechange", (e) => {
|
|
348
|
+
const i = document.getElementsByTagName("video");
|
|
349
|
+
if (Ee(i) && i.length > 0 && i.forEach((n) => {
|
|
350
|
+
n && n.pause();
|
|
351
|
+
}), r.value) {
|
|
352
|
+
const n = r.value.sceneType;
|
|
353
|
+
g.value = e;
|
|
354
|
+
const a = r.value.sceneType;
|
|
355
|
+
setTimeout(() => {
|
|
356
|
+
(a !== "image" || n !== "image" && a === "image" || n !== a) && h(!0), O.value = g.value, b("on-scene-scenechange", r.value), I.parseEvents(
|
|
357
|
+
y.useEvents,
|
|
358
|
+
"on-scene-scenechange",
|
|
359
|
+
r.value
|
|
360
|
+
);
|
|
361
|
+
}), k ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate();
|
|
362
|
+
} else
|
|
363
|
+
g.value = t.value.default.firstScene, C(() => {
|
|
364
|
+
h(), b("on-scene-scenechange", r.value), I.parseEvents(
|
|
365
|
+
y.useEvents,
|
|
366
|
+
"on-scene-scenechange",
|
|
367
|
+
r.value
|
|
368
|
+
);
|
|
369
|
+
});
|
|
370
|
+
}), window.SHJSceneVrViewer.on(
|
|
371
|
+
"zoomchange",
|
|
372
|
+
Te(() => {
|
|
373
|
+
b("on-scene-zooming", r.value), I.parseEvents(
|
|
374
|
+
y.useEvents,
|
|
375
|
+
"on-scene-zooming",
|
|
376
|
+
r.value
|
|
377
|
+
);
|
|
378
|
+
}, 300)
|
|
379
|
+
), window.SHJSceneVrViewer.on("hot-click", (e) => {
|
|
380
|
+
b("on-scene-hotClick", e), I.parseEvents(y.useEvents, "on-scene-hotClick", e);
|
|
381
|
+
}), V.value = !0;
|
|
382
|
+
}
|
|
326
383
|
}
|
|
327
|
-
},
|
|
328
|
-
if (
|
|
384
|
+
}, te = () => {
|
|
385
|
+
if (A.value) {
|
|
329
386
|
if (!("IntersectionObserver" in window)) {
|
|
330
|
-
|
|
331
|
-
|
|
387
|
+
v.value = !0, C(() => {
|
|
388
|
+
h();
|
|
332
389
|
});
|
|
333
390
|
return;
|
|
334
391
|
}
|
|
335
|
-
|
|
336
|
-
(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
392
|
+
J = new IntersectionObserver(
|
|
393
|
+
(o) => {
|
|
394
|
+
o.forEach((e) => {
|
|
395
|
+
v.value = e.isIntersecting, e.isIntersecting && !V.value && C(() => {
|
|
396
|
+
h();
|
|
340
397
|
});
|
|
341
398
|
});
|
|
342
399
|
},
|
|
@@ -346,113 +403,133 @@ const Re = {
|
|
|
346
403
|
rootMargin: "50px"
|
|
347
404
|
// 提前50px开始加载
|
|
348
405
|
}
|
|
349
|
-
),
|
|
406
|
+
), J.observe(A.value);
|
|
350
407
|
}
|
|
351
|
-
}, ee = () => {
|
|
352
|
-
f.value || (p.value = !0, h(() => {
|
|
353
|
-
y();
|
|
354
|
-
}));
|
|
355
408
|
}, oe = () => {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
409
|
+
V.value || (v.value = !0, C(() => {
|
|
410
|
+
h();
|
|
411
|
+
}));
|
|
412
|
+
}, re = () => {
|
|
413
|
+
J && (J.disconnect(), J = null);
|
|
414
|
+
}, O = p(t.value.default.firstScene), ie = P(() => {
|
|
415
|
+
const o = [];
|
|
416
|
+
if (t.value) {
|
|
417
|
+
const e = t.value.scenes;
|
|
418
|
+
for (const i in e)
|
|
419
|
+
if (Object.prototype.hasOwnProperty.call(e, i)) {
|
|
420
|
+
const n = e[i];
|
|
421
|
+
o.push({
|
|
422
|
+
label: n.label,
|
|
423
|
+
value: i,
|
|
424
|
+
thumbnail: n.cover
|
|
368
425
|
});
|
|
369
426
|
}
|
|
370
427
|
}
|
|
371
|
-
return
|
|
372
|
-
const
|
|
373
|
-
return
|
|
428
|
+
return o.sort((e, i) => {
|
|
429
|
+
const n = parseInt(e.value.replace("scene", "")), a = parseInt(i.value.replace("scene", ""));
|
|
430
|
+
return n - a;
|
|
374
431
|
});
|
|
375
432
|
});
|
|
376
|
-
|
|
377
|
-
() =>
|
|
433
|
+
D(
|
|
434
|
+
() => t.value.default,
|
|
378
435
|
() => {
|
|
379
|
-
window.SHJSceneVrViewer && (
|
|
436
|
+
window.SHJSceneVrViewer && (k ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate());
|
|
380
437
|
},
|
|
381
438
|
{ deep: !0 }
|
|
382
439
|
);
|
|
383
|
-
const
|
|
384
|
-
window.SHJSceneVrViewer &&
|
|
385
|
-
},
|
|
386
|
-
|
|
440
|
+
const ne = (o) => {
|
|
441
|
+
window.SHJSceneVrViewer && O.value !== o && (O.value = o, window.SHJSceneVrViewer.isLoaded() && (window.SHJSceneVrViewer.loadScene(o), k ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate()));
|
|
442
|
+
}, L = p(), E = p(!0), le = () => {
|
|
443
|
+
E.value ? L.value.style.bottom = "-999px" : L.value.style.bottom = "80px", E.value = !E.value;
|
|
387
444
|
};
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}),
|
|
391
|
-
|
|
392
|
-
|
|
445
|
+
we(() => {
|
|
446
|
+
t.value && (t.value.default.controls === void 0 && (t.value.default.controls = r.value.controls), t.value.default.audio === void 0 && (t.value.default.audio = r.value.audio)), te(), ve();
|
|
447
|
+
}), D(v, (o) => {
|
|
448
|
+
o && !V.value && C(() => {
|
|
449
|
+
h();
|
|
393
450
|
});
|
|
394
|
-
}),
|
|
395
|
-
|
|
451
|
+
}), fe(() => {
|
|
452
|
+
if (re(), window.SHJSceneVrViewer) {
|
|
453
|
+
try {
|
|
454
|
+
window.SHJSceneVrViewer.destroy();
|
|
455
|
+
} catch {
|
|
456
|
+
}
|
|
457
|
+
window.SHJSceneVrViewer = null;
|
|
458
|
+
}
|
|
459
|
+
if (m.value) {
|
|
460
|
+
try {
|
|
461
|
+
m.value.dispose();
|
|
462
|
+
} catch {
|
|
463
|
+
}
|
|
464
|
+
m.value = null;
|
|
465
|
+
}
|
|
466
|
+
if (S.value) {
|
|
467
|
+
try {
|
|
468
|
+
S.value.destroy();
|
|
469
|
+
} catch {
|
|
470
|
+
}
|
|
471
|
+
S.value = null;
|
|
472
|
+
}
|
|
396
473
|
});
|
|
397
|
-
const
|
|
474
|
+
const ae = () => {
|
|
398
475
|
window.SHJSceneVrViewer.setPitch(window.SHJSceneVrViewer.getPitch() + 10);
|
|
399
|
-
}, le = () => {
|
|
400
|
-
window.SHJSceneVrViewer.setPitch(window.SHJSceneVrViewer.getPitch() - 10);
|
|
401
476
|
}, se = () => {
|
|
477
|
+
window.SHJSceneVrViewer.setPitch(window.SHJSceneVrViewer.getPitch() - 10);
|
|
478
|
+
}, ce = () => {
|
|
402
479
|
window.SHJSceneVrViewer.setYaw(window.SHJSceneVrViewer.getYaw() - 10);
|
|
403
|
-
}, ae = () => {
|
|
404
|
-
window.SHJSceneVrViewer.setYaw(window.SHJSceneVrViewer.getYaw() + 10);
|
|
405
480
|
}, ue = () => {
|
|
481
|
+
window.SHJSceneVrViewer.setYaw(window.SHJSceneVrViewer.getYaw() + 10);
|
|
482
|
+
}, pe = () => {
|
|
406
483
|
window.SHJSceneVrViewer.setHfov(window.SHJSceneVrViewer.getHfov() - 10);
|
|
407
|
-
},
|
|
484
|
+
}, me = () => {
|
|
408
485
|
window.SHJSceneVrViewer.setHfov(window.SHJSceneVrViewer.getHfov() + 10);
|
|
409
|
-
},
|
|
410
|
-
|
|
411
|
-
},
|
|
486
|
+
}, T = p(!1), B = (o) => {
|
|
487
|
+
w.value && (o === "play" ? (w.value.play(), T.value = !1) : (w.value.pause(), T.value = !0));
|
|
488
|
+
}, de = () => {
|
|
412
489
|
window.SHJSceneVrViewer.startAutoRotate();
|
|
413
490
|
};
|
|
414
|
-
let
|
|
415
|
-
const R =
|
|
416
|
-
|
|
491
|
+
let x;
|
|
492
|
+
const R = p(!1), ve = () => {
|
|
493
|
+
t.value.default.controls ? R.value = t.value.default.controls.mouseTipShow : R.value = !0, x && clearTimeout(x), x = setTimeout(() => {
|
|
417
494
|
R.value = !1;
|
|
418
495
|
}, 3500);
|
|
419
496
|
};
|
|
420
|
-
return
|
|
421
|
-
forceInit:
|
|
422
|
-
isVisible:
|
|
423
|
-
isInitialized:
|
|
424
|
-
}), (
|
|
425
|
-
const
|
|
426
|
-
return
|
|
497
|
+
return Z({
|
|
498
|
+
forceInit: oe,
|
|
499
|
+
isVisible: v,
|
|
500
|
+
isInitialized: V
|
|
501
|
+
}), (o, e) => {
|
|
502
|
+
const i = N("el-tooltip"), n = N("el-scrollbar");
|
|
503
|
+
return c(), s("div", {
|
|
427
504
|
ref_key: "containerRef",
|
|
428
|
-
ref:
|
|
505
|
+
ref: A,
|
|
429
506
|
class: "vr-scene-wrap"
|
|
430
507
|
}, [
|
|
431
|
-
!
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
508
|
+
!v.value && !V.value ? (c(), s("div", Oe, e[2] || (e[2] = [
|
|
509
|
+
l("div", { class: "loading-content" }, [
|
|
510
|
+
l("div", { class: "loading-spinner" }),
|
|
511
|
+
l("p", null, "全景场景加载中...")
|
|
435
512
|
], -1)
|
|
436
513
|
]))) : u("", !0),
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
[
|
|
514
|
+
r.value && v.value ? (c(), s(G, { key: 1 }, [
|
|
515
|
+
W(l("div", Re, null, 512), [
|
|
516
|
+
[U, r.value.sceneType === "image"]
|
|
440
517
|
]),
|
|
441
|
-
|
|
442
|
-
[
|
|
518
|
+
W(l("div", _e, null, 512), [
|
|
519
|
+
[U, r.value.sceneType !== "image"]
|
|
443
520
|
])
|
|
444
521
|
], 64)) : u("", !0),
|
|
445
|
-
|
|
446
|
-
|
|
522
|
+
t.value.default.controls && v.value ? (c(), s("div", Ae, [
|
|
523
|
+
t.value.default.controls.scene ? (c(), s("div", {
|
|
447
524
|
key: 0,
|
|
448
525
|
class: "btn-icon left",
|
|
449
|
-
style:
|
|
450
|
-
onClick:
|
|
526
|
+
style: j({ borderColor: E.value ? "#ff7d00" : "#ffffff3d" }),
|
|
527
|
+
onClick: le
|
|
451
528
|
}, [
|
|
452
|
-
|
|
453
|
-
default:
|
|
454
|
-
|
|
455
|
-
src:
|
|
529
|
+
Y(i, { content: "场景选择" }, {
|
|
530
|
+
default: F(() => e[3] || (e[3] = [
|
|
531
|
+
l("img", {
|
|
532
|
+
src: ge,
|
|
456
533
|
alt: ""
|
|
457
534
|
}, null, -1)
|
|
458
535
|
])),
|
|
@@ -460,146 +537,146 @@ const Re = {
|
|
|
460
537
|
__: [3]
|
|
461
538
|
})
|
|
462
539
|
], 4)) : u("", !0),
|
|
463
|
-
|
|
540
|
+
t.value.default.controls.left ? (c(), s("div", {
|
|
464
541
|
key: 1,
|
|
465
542
|
class: "btn-icon left",
|
|
466
|
-
onClick:
|
|
543
|
+
onClick: ce
|
|
467
544
|
}, e[4] || (e[4] = [
|
|
468
|
-
|
|
469
|
-
src:
|
|
545
|
+
l("img", {
|
|
546
|
+
src: _,
|
|
470
547
|
alt: ""
|
|
471
548
|
}, null, -1)
|
|
472
549
|
]))) : u("", !0),
|
|
473
|
-
|
|
550
|
+
t.value.default.controls.right ? (c(), s("div", {
|
|
474
551
|
key: 2,
|
|
475
552
|
class: "btn-icon right",
|
|
476
|
-
onClick:
|
|
553
|
+
onClick: ue
|
|
477
554
|
}, e[5] || (e[5] = [
|
|
478
|
-
|
|
479
|
-
src:
|
|
555
|
+
l("img", {
|
|
556
|
+
src: _,
|
|
480
557
|
alt: ""
|
|
481
558
|
}, null, -1)
|
|
482
559
|
]))) : u("", !0),
|
|
483
|
-
|
|
560
|
+
t.value.default.controls.top ? (c(), s("div", {
|
|
484
561
|
key: 3,
|
|
485
562
|
class: "btn-icon up",
|
|
486
|
-
onClick:
|
|
563
|
+
onClick: ae
|
|
487
564
|
}, e[6] || (e[6] = [
|
|
488
|
-
|
|
489
|
-
src:
|
|
565
|
+
l("img", {
|
|
566
|
+
src: _,
|
|
490
567
|
alt: ""
|
|
491
568
|
}, null, -1)
|
|
492
569
|
]))) : u("", !0),
|
|
493
|
-
|
|
570
|
+
t.value.default.controls.bottom ? (c(), s("div", {
|
|
494
571
|
key: 4,
|
|
495
572
|
class: "btn-icon down",
|
|
496
|
-
onClick:
|
|
573
|
+
onClick: se
|
|
497
574
|
}, e[7] || (e[7] = [
|
|
498
|
-
|
|
499
|
-
src:
|
|
575
|
+
l("img", {
|
|
576
|
+
src: _,
|
|
500
577
|
alt: ""
|
|
501
578
|
}, null, -1)
|
|
502
579
|
]))) : u("", !0),
|
|
503
|
-
|
|
580
|
+
t.value.default.controls.magnify ? (c(), s("div", {
|
|
504
581
|
key: 5,
|
|
505
582
|
class: "btn-icon",
|
|
506
|
-
onClick:
|
|
583
|
+
onClick: pe
|
|
507
584
|
}, e[8] || (e[8] = [
|
|
508
|
-
|
|
509
|
-
src:
|
|
585
|
+
l("img", {
|
|
586
|
+
src: he,
|
|
510
587
|
alt: ""
|
|
511
588
|
}, null, -1)
|
|
512
589
|
]))) : u("", !0),
|
|
513
|
-
|
|
590
|
+
t.value.default.controls.shrink ? (c(), s("div", {
|
|
514
591
|
key: 6,
|
|
515
592
|
class: "btn-icon",
|
|
516
|
-
onClick:
|
|
593
|
+
onClick: me
|
|
517
594
|
}, e[9] || (e[9] = [
|
|
518
|
-
|
|
519
|
-
src:
|
|
595
|
+
l("img", {
|
|
596
|
+
src: He,
|
|
520
597
|
alt: ""
|
|
521
598
|
}, null, -1)
|
|
522
599
|
]))) : u("", !0),
|
|
523
|
-
|
|
600
|
+
T.value && f.value.src && t.value.default.audio ? (c(), s("div", {
|
|
524
601
|
key: 7,
|
|
525
602
|
class: "btn-icon",
|
|
526
|
-
onClick: e[0] || (e[0] = (
|
|
603
|
+
onClick: e[0] || (e[0] = (a) => B("play"))
|
|
527
604
|
}, e[10] || (e[10] = [
|
|
528
|
-
|
|
605
|
+
l("img", {
|
|
529
606
|
src: be,
|
|
530
607
|
alt: ""
|
|
531
608
|
}, null, -1)
|
|
532
609
|
]))) : u("", !0),
|
|
533
|
-
!
|
|
610
|
+
!T.value && f.value.src && t.value.default.audio ? (c(), s("div", {
|
|
534
611
|
key: 8,
|
|
535
612
|
class: "btn-icon",
|
|
536
|
-
onClick: e[1] || (e[1] = (
|
|
613
|
+
onClick: e[1] || (e[1] = (a) => B("pause"))
|
|
537
614
|
}, e[11] || (e[11] = [
|
|
538
|
-
|
|
539
|
-
src:
|
|
615
|
+
l("img", {
|
|
616
|
+
src: Je,
|
|
540
617
|
alt: ""
|
|
541
618
|
}, null, -1)
|
|
542
619
|
]))) : u("", !0),
|
|
543
|
-
|
|
620
|
+
t.value.default.controls.rotate ? (c(), s("div", {
|
|
544
621
|
key: 9,
|
|
545
622
|
class: "btn-icon",
|
|
546
|
-
onClick:
|
|
623
|
+
onClick: de
|
|
547
624
|
}, e[12] || (e[12] = [
|
|
548
|
-
|
|
549
|
-
src:
|
|
625
|
+
l("img", {
|
|
626
|
+
src: ke,
|
|
550
627
|
alt: ""
|
|
551
628
|
}, null, -1)
|
|
552
629
|
]))) : u("", !0)
|
|
553
630
|
])) : u("", !0),
|
|
554
|
-
|
|
631
|
+
t.value.default.controls && v.value ? (c(), s("div", {
|
|
555
632
|
key: 3,
|
|
556
633
|
ref_key: "sceneMenuRef",
|
|
557
|
-
ref:
|
|
634
|
+
ref: L,
|
|
558
635
|
class: "scene-menu",
|
|
559
|
-
style:
|
|
560
|
-
bottom:
|
|
636
|
+
style: j({
|
|
637
|
+
bottom: E.value && t.value.default.controls.scene ? "80px" : "-9999999999999px"
|
|
561
638
|
})
|
|
562
639
|
}, [
|
|
563
|
-
|
|
564
|
-
default:
|
|
565
|
-
|
|
566
|
-
(
|
|
567
|
-
key:
|
|
640
|
+
Y(n, null, {
|
|
641
|
+
default: F(() => [
|
|
642
|
+
l("div", Le, [
|
|
643
|
+
(c(!0), s(G, null, Se(ie.value, (a) => (c(), s("div", {
|
|
644
|
+
key: a.value,
|
|
568
645
|
class: "scene-item",
|
|
569
|
-
style:
|
|
570
|
-
borderColor:
|
|
646
|
+
style: j({
|
|
647
|
+
borderColor: O.value === a.value ? "#ff7d00" : "#fff"
|
|
571
648
|
}),
|
|
572
|
-
onClick: (
|
|
649
|
+
onClick: (d) => ne(a.value)
|
|
573
650
|
}, [
|
|
574
|
-
|
|
651
|
+
l("img", {
|
|
575
652
|
class: "thumbnail",
|
|
576
|
-
src:
|
|
577
|
-
}, null, 8,
|
|
578
|
-
|
|
579
|
-
], 12,
|
|
653
|
+
src: a.thumbnail
|
|
654
|
+
}, null, 8, Pe),
|
|
655
|
+
l("p", je, Ve(a.label), 1)
|
|
656
|
+
], 12, xe))), 128))
|
|
580
657
|
])
|
|
581
658
|
]),
|
|
582
659
|
_: 1
|
|
583
660
|
})
|
|
584
661
|
], 4)) : u("", !0),
|
|
585
|
-
|
|
662
|
+
l("audio", {
|
|
586
663
|
ref_key: "audioRef",
|
|
587
|
-
ref:
|
|
588
|
-
autoplay:
|
|
589
|
-
loop:
|
|
590
|
-
volume:
|
|
664
|
+
ref: w,
|
|
665
|
+
autoplay: f.value.autoplay,
|
|
666
|
+
loop: f.value.loop,
|
|
667
|
+
volume: f.value.volume
|
|
591
668
|
}, [
|
|
592
|
-
|
|
593
|
-
src:
|
|
594
|
-
}, null, 8,
|
|
595
|
-
], 8,
|
|
596
|
-
R.value &&
|
|
597
|
-
|
|
669
|
+
l("source", {
|
|
670
|
+
src: f.value.src
|
|
671
|
+
}, null, 8, ze)
|
|
672
|
+
], 8, Me),
|
|
673
|
+
R.value && v.value ? (c(), s("div", Be, e[13] || (e[13] = [
|
|
674
|
+
ye('<div class="icon-wrap" data-v-5d09e9c5><div class="left" data-v-5d09e9c5><i class="iconfont zv-drop-down" data-v-5d09e9c5></i></div><i class="iconfont zv-mouse" data-v-5d09e9c5></i><div class="right" data-v-5d09e9c5><i class="iconfont zv-drop-down" data-v-5d09e9c5></i></div></div><p class="title" data-v-5d09e9c5>左右拖动 更多精彩</p>', 2)
|
|
598
675
|
]))) : u("", !0)
|
|
599
676
|
], 512);
|
|
600
677
|
};
|
|
601
678
|
}
|
|
602
679
|
});
|
|
603
680
|
export {
|
|
604
|
-
|
|
681
|
+
Xr as default
|
|
605
682
|
};
|