@realsee/dnalogel 2.0.5-alpha.2 → 2.0.5-alpha.4
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/index.cjs.js +18 -18
- package/dist/index.es.js +1191 -1190
- package/dist/index.js +1191 -1190
- package/dist/index.umd.js +18 -18
- package/docs/classes/CruisePluginController.html +14 -14
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/PaintBrush.html +3 -3
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/PaintBrushTypeEnum.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +1 -1
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginState.html +2 -2
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +7 -7
- package/docs/interfaces/FloorplanExtraObject.html +3 -3
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +6 -6
- package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
- package/docs/interfaces/FloorplanServerEntrance.html +7 -7
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
- package/docs/interfaces/ItemLabelPluginData.html +1 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PaintBrushAction.html +7 -7
- package/docs/interfaces/PaintBrushConfigs.html +1 -1
- package/docs/interfaces/PaintBrushState.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +2 -2
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginState.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/modules.html +17 -17
- package/libs/ModelTVVideoPlugin/Plugin.js +49 -48
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -321,8 +321,8 @@ class ma extends da {
|
|
|
321
321
|
n.strokeStyle = o;
|
|
322
322
|
let s = null, r = [], a, l = [], c = 0;
|
|
323
323
|
const h = (f, u, m) => {
|
|
324
|
-
const
|
|
325
|
-
n.strokeStyle =
|
|
324
|
+
const g = this.color || "#ff0000";
|
|
325
|
+
n.strokeStyle = g, n.beginPath(), n.moveTo(f.x, f.y), n.quadraticCurveTo(u.x, u.y, m.x, m.y), n.stroke();
|
|
326
326
|
};
|
|
327
327
|
e.onmousedown = (f) => {
|
|
328
328
|
f.preventDefault(), c = Date.now();
|
|
@@ -334,8 +334,8 @@ class ma extends da {
|
|
|
334
334
|
const u = Number(f.clientX), m = Number(f.clientY);
|
|
335
335
|
if (Math.abs(u - s.x) < 5 && Math.abs(m - s.y) < 5 || (r.push({ x: u, y: m }), l.push(An({ x: u, y: m }, this.clientWidth, this.clientHeight)), r.length < 3))
|
|
336
336
|
return;
|
|
337
|
-
const { control:
|
|
338
|
-
!
|
|
337
|
+
const { control: g, end: v } = yn(r);
|
|
338
|
+
!g || !v || (h(s, g, v), s = v);
|
|
339
339
|
}, e.onmouseup = (f) => {
|
|
340
340
|
if (f.preventDefault(), s = null, r.length < 3)
|
|
341
341
|
return;
|
|
@@ -366,8 +366,8 @@ class ma extends da {
|
|
|
366
366
|
const u = Number(f.touches[0].clientX), m = Number(f.touches[0].clientY);
|
|
367
367
|
if (Math.abs(u - s.x) < 5 && Math.abs(m - s.y) < 5 || (r.push({ x: u, y: m }), l.push(An({ x: u, y: m }, this.clientWidth, this.clientHeight)), r.length < 3))
|
|
368
368
|
return;
|
|
369
|
-
const { control:
|
|
370
|
-
!
|
|
369
|
+
const { control: g, end: v } = yn(r);
|
|
370
|
+
!g || !v || (h(s, g, v), s = v);
|
|
371
371
|
}, e.ontouchend = e.ontouchcancel = (f) => {
|
|
372
372
|
if (f.preventDefault(), s = null, r.length < 3)
|
|
373
373
|
return;
|
|
@@ -453,30 +453,30 @@ class ma extends da {
|
|
|
453
453
|
const { line: l = [], color: c = "black", duration: h = 0, uuid: f } = n, u = di(n.move || {}, this.clientWidth, this.clientHeight);
|
|
454
454
|
let m = [u];
|
|
455
455
|
if (a.strokeStyle = c, a.beginPath(), a.moveTo(u.x, u.y), h && !o) {
|
|
456
|
-
let
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
var
|
|
460
|
-
if (
|
|
461
|
-
return a.clearRect(0, 0,
|
|
462
|
-
const
|
|
463
|
-
if (!
|
|
464
|
-
if (
|
|
456
|
+
let g = [];
|
|
457
|
+
const v = this;
|
|
458
|
+
v.tween = ha({ step: 0 }, { step: l.length - 1 }, h).onUpdate(({ step: b }) => {
|
|
459
|
+
var P;
|
|
460
|
+
if (v.tweening = !0, !v.ready)
|
|
461
|
+
return a.clearRect(0, 0, v.canvas[f].width, v.canvas[f].height), (P = v.tween) == null ? void 0 : P.stop();
|
|
462
|
+
const y = Math.floor(b);
|
|
463
|
+
if (!g.find((E) => E === y)) {
|
|
464
|
+
if (g.push(y), console.log("__debug__", l, l[y], y), m.push(di(l[y], v.clientWidth, v.clientHeight)), m.length < 3)
|
|
465
465
|
return;
|
|
466
|
-
const { control: E, end:
|
|
467
|
-
if (!E || !
|
|
466
|
+
const { control: E, end: z } = yn(m);
|
|
467
|
+
if (!E || !z)
|
|
468
468
|
return;
|
|
469
|
-
a.quadraticCurveTo(E.x, E.y,
|
|
469
|
+
a.quadraticCurveTo(E.x, E.y, z.x, z.y), a.stroke();
|
|
470
470
|
}
|
|
471
|
-
}).onComplete((
|
|
472
|
-
|
|
471
|
+
}).onComplete((b) => {
|
|
472
|
+
v.tween = void 0, v.tweening = !1, g = [], m = [], s && s(), r();
|
|
473
473
|
});
|
|
474
474
|
} else {
|
|
475
|
-
for (let
|
|
476
|
-
if (m.push(di(l[
|
|
475
|
+
for (let g = 0; g < l.length; g++) {
|
|
476
|
+
if (m.push(di(l[g], this.clientWidth, this.clientHeight)), m.length < 3)
|
|
477
477
|
continue;
|
|
478
|
-
const { control:
|
|
479
|
-
!
|
|
478
|
+
const { control: v, end: b } = yn(m);
|
|
479
|
+
!v || !b || a.quadraticCurveTo(v.x, v.y, b.x, b.y);
|
|
480
480
|
}
|
|
481
481
|
a.stroke(), m = [], s && s(), r();
|
|
482
482
|
}
|
|
@@ -566,68 +566,68 @@ const Ef = (i, t) => {
|
|
|
566
566
|
return n || (n = new j.WebGLRenderer({ antialias: !1, alpha: !0 }), n.setPixelRatio(i.renderer.getPixelRatio()), n.outputEncoding = j.sRGBEncoding, n.setClearColor(1579548, 0), n.autoClear = !0), n;
|
|
567
567
|
}, u = () => {
|
|
568
568
|
l.traverse((I) => {
|
|
569
|
-
I instanceof j.Mesh && [].concat(I.material).forEach((
|
|
570
|
-
}), r.remove(l), l = new j.Object3D(), r.add(l),
|
|
569
|
+
I instanceof j.Mesh && [].concat(I.material).forEach((C) => C.dispose());
|
|
570
|
+
}), r.remove(l), l = new j.Object3D(), r.add(l), P();
|
|
571
571
|
}, m = () => {
|
|
572
|
-
c =
|
|
573
|
-
function I(
|
|
574
|
-
const M =
|
|
572
|
+
c = b(i.model, a.fov, a.aspect), h = i.model.bounding.getCenter(new j.Vector3());
|
|
573
|
+
function I(C) {
|
|
574
|
+
const M = C.clone();
|
|
575
575
|
return M.uniforms.modelAlpha.value = 1, M.uniforms.map.value && (M.uniforms.map.value.needsUpdate = !0), M;
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
if (
|
|
579
|
-
const M =
|
|
577
|
+
function T(C) {
|
|
578
|
+
if (C instanceof j.Mesh) {
|
|
579
|
+
const M = C.geometry, N = Array.isArray(C.material) ? C.material.map(I) : I(C.material);
|
|
580
580
|
return new j.Mesh(M, N);
|
|
581
|
-
} else if (
|
|
581
|
+
} else if (C instanceof j.Group) {
|
|
582
582
|
const M = new j.Group();
|
|
583
|
-
return
|
|
583
|
+
return C.children.forEach((N) => M.add(T(N))), M;
|
|
584
584
|
} else {
|
|
585
585
|
const M = new j.Object3D();
|
|
586
|
-
return
|
|
586
|
+
return C.children.forEach((N) => M.add(T(N))), M;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
r.remove(l), l =
|
|
590
|
-
},
|
|
591
|
-
const
|
|
592
|
-
if (!
|
|
589
|
+
r.remove(l), l = T(i.model), r.add(l), P();
|
|
590
|
+
}, g = (I, T = {}) => {
|
|
591
|
+
const C = f();
|
|
592
|
+
if (!C)
|
|
593
593
|
return;
|
|
594
|
-
I.appendChild(
|
|
594
|
+
I.appendChild(C.domElement), v(T);
|
|
595
595
|
const M = window.getComputedStyle(I).position;
|
|
596
596
|
M !== "relative" && M !== "absolute" && M !== "fixed" && M !== "sticky" && (I.style.position = "relative");
|
|
597
|
-
},
|
|
597
|
+
}, v = (I = {}) => {
|
|
598
598
|
if (!n)
|
|
599
599
|
return;
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
602
|
-
const { width: M =
|
|
600
|
+
const C = n.domElement.parentNode;
|
|
601
|
+
if (C != null && C.nodeName) {
|
|
602
|
+
const { width: M = C.offsetWidth, height: N = C.offsetHeight } = I;
|
|
603
603
|
n.setSize(M, N), a.aspect = M / N, a.updateProjectionMatrix();
|
|
604
604
|
}
|
|
605
|
-
|
|
605
|
+
P();
|
|
606
606
|
};
|
|
607
|
-
function
|
|
607
|
+
function b(I, T, C) {
|
|
608
608
|
const M = I.bounding, N = Math.pow(
|
|
609
609
|
Math.pow(M.max.x - M.min.x + 1, 2) + Math.pow(M.max.y - M.min.y + 1, 2) + Math.pow(M.max.z - M.min.z + 1, 2),
|
|
610
610
|
1 / 2
|
|
611
611
|
);
|
|
612
|
-
let B = N / 2 / Math.tan(Math.PI *
|
|
613
|
-
return
|
|
612
|
+
let B = N / 2 / Math.tan(Math.PI * T / 360);
|
|
613
|
+
return C < 1 && (B = B / C), isNaN(B) ? N : B;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function y(I) {
|
|
616
616
|
return i.work.observers[I].standingPosition.clone();
|
|
617
617
|
}
|
|
618
|
-
const
|
|
618
|
+
const P = () => {
|
|
619
619
|
if (!c || !h)
|
|
620
620
|
return;
|
|
621
621
|
const I = i.getPose();
|
|
622
|
-
I.fov = a.fov, I.offset = h, I.distance = c, typeof s.lockedLatitude == "number" && (I.latitude = s.lockedLatitude), typeof s.lockedLongitude == "number" && (I.longitude = s.lockedLongitude), typeof s.lockedPanoIndex == "number" && (I.offset =
|
|
622
|
+
I.fov = a.fov, I.offset = h, I.distance = c, typeof s.lockedLatitude == "number" && (I.latitude = s.lockedLatitude), typeof s.lockedLongitude == "number" && (I.longitude = s.lockedLongitude), typeof s.lockedPanoIndex == "number" && (I.offset = y(s.lockedPanoIndex)), s.lookAtCurrentCamera && (I.offset = i.camera.position.clone().setY(i.camera.position.y + 1)), a.setFromPose(I), e = !0;
|
|
623
623
|
}, E = () => {
|
|
624
624
|
e !== !0 || !n || !n.domElement.parentNode || n.domElement.parentNode.offsetWidth === 0 || (n.render(r, a), e = !1);
|
|
625
|
-
},
|
|
625
|
+
}, z = () => {
|
|
626
626
|
n && n.dispose(), n = null;
|
|
627
|
-
},
|
|
628
|
-
Object.assign(s, I),
|
|
627
|
+
}, D = (I) => {
|
|
628
|
+
Object.assign(s, I), P();
|
|
629
629
|
};
|
|
630
|
-
return Object.assign(window, { camera: a }), i.on("modelLoaded", m), i.on("modelWillLoad", u), i.on("cameraDirectionUpdate",
|
|
630
|
+
return Object.assign(window, { camera: a }), i.on("modelLoaded", m), i.on("modelWillLoad", u), i.on("cameraDirectionUpdate", P), i.on("dispose", z), i.on("renderFrame", E), i.on("cameraPositionUpdate", P), { appendTo: g, refresh: v, changeConfigs: D };
|
|
631
631
|
};
|
|
632
632
|
function pa(i) {
|
|
633
633
|
return typeof Symbol > "u" ? `$Symbol<${i}>$` : Symbol(i);
|
|
@@ -696,8 +696,8 @@ class xa extends sa {
|
|
|
696
696
|
else {
|
|
697
697
|
const E = document.createElement("div");
|
|
698
698
|
E.style.width = `${c}px`, E.style.height = `${h}px`, E.style.pointerEvents = "none";
|
|
699
|
-
const
|
|
700
|
-
e.style.position = "absolute", e.style.left = "0", e.style.top = "0", e.style.width = `${
|
|
699
|
+
const z = o / r;
|
|
700
|
+
e.style.position = "absolute", e.style.left = "0", e.style.top = "0", e.style.width = `${z * c}px`, e.style.height = `${z * h}px`, E.appendChild(e), u = E;
|
|
701
701
|
}
|
|
702
702
|
super(u);
|
|
703
703
|
d(this, "version", Rs);
|
|
@@ -716,10 +716,10 @@ class xa extends sa {
|
|
|
716
716
|
this.width = E * a, this.height = E * l, this.domWidthPx = E * c, this.domHeightPx = E * h, this.centerPosition = new $().subVectors(f.clone(), n[0].clone()).multiplyScalar(E).add(n[0]);
|
|
717
717
|
}
|
|
718
718
|
e.classList.add(`${wa}__container`);
|
|
719
|
-
const m = new $().subVectors(n[1], n[0]),
|
|
720
|
-
this.lookAt(
|
|
721
|
-
const
|
|
722
|
-
this.rotateOnWorldAxis(
|
|
719
|
+
const m = new $().subVectors(n[1], n[0]), g = new $().subVectors(n[3], n[0]), v = new $().crossVectors(m, g).normalize();
|
|
720
|
+
this.lookAt(v);
|
|
721
|
+
const b = this.up.clone().applyQuaternion(this.quaternion), y = g.clone(), P = new $().crossVectors(b, y).normalize();
|
|
722
|
+
this.rotateOnWorldAxis(P, b.angleTo(y)), this.position.copy(f);
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
const Ca = "v2.0.1", Bs = "CSS3DRenderer", Nn = `${Bs}@${Ca}`, fo = (i) => `${Nn}--${i}`, pe = {};
|
|
@@ -740,7 +740,7 @@ class La {
|
|
|
740
740
|
if (this.state.disposed)
|
|
741
741
|
return this.disposedErrorLog();
|
|
742
742
|
const o = (() => {
|
|
743
|
-
const
|
|
743
|
+
const k = {
|
|
744
744
|
ratio: 216e-5,
|
|
745
745
|
devicePixelRatio: 1,
|
|
746
746
|
mode: "front",
|
|
@@ -748,11 +748,11 @@ class La {
|
|
|
748
748
|
container: document.createElement("div"),
|
|
749
749
|
pointerEvents: "none"
|
|
750
750
|
};
|
|
751
|
-
return Object.assign(
|
|
751
|
+
return Object.assign(k, n);
|
|
752
752
|
})(), s = e.map(Pa);
|
|
753
753
|
if ((s == null ? void 0 : s.length) < 4)
|
|
754
754
|
return console.error(`${Nn}: requires 4 point but params may have fewer`);
|
|
755
|
-
const { ratio: r, devicePixelRatio: a, mode: l, autoRender: c, container: h, pointerEvents: f } = o, u = [], { css3DObject: m, opacityMesh:
|
|
755
|
+
const { ratio: r, devicePixelRatio: a, mode: l, autoRender: c, container: h, pointerEvents: f } = o, u = [], { css3DObject: m, opacityMesh: g } = this.createObject(s, {
|
|
756
756
|
ratio: r,
|
|
757
757
|
dpr: a,
|
|
758
758
|
container: h,
|
|
@@ -760,14 +760,14 @@ class La {
|
|
|
760
760
|
pointerEvents: f
|
|
761
761
|
});
|
|
762
762
|
h.id = `container--${m.uuid}`;
|
|
763
|
-
const
|
|
764
|
-
|
|
763
|
+
const v = l === "front" && !pe.frontModeStore, b = l === "behind" && !pe.behindModeStore;
|
|
764
|
+
b && (pe.behindModeStore = {
|
|
765
765
|
scene: o.scene,
|
|
766
766
|
css3DScene: new j.Scene(),
|
|
767
767
|
css3DRenderer: new lo()
|
|
768
|
-
}),
|
|
769
|
-
const
|
|
770
|
-
const
|
|
768
|
+
}), v && (pe.frontModeStore = { css3DScene: new j.Scene(), css3DRenderer: new lo() });
|
|
769
|
+
const y = l === "front" ? pe.frontModeStore : pe.behindModeStore, { css3DScene: P, css3DRenderer: E } = y, z = (() => {
|
|
770
|
+
const k = () => {
|
|
771
771
|
l === "front" ? this.store.frontModeCSS3DObjects[m.uuid] = {
|
|
772
772
|
visible: !0,
|
|
773
773
|
enabled: !0,
|
|
@@ -777,42 +777,42 @@ class La {
|
|
|
777
777
|
visible: !0,
|
|
778
778
|
enabled: !0,
|
|
779
779
|
css3DObject: m,
|
|
780
|
-
opacityMesh:
|
|
780
|
+
opacityMesh: g,
|
|
781
781
|
mode: "behind",
|
|
782
782
|
scene: o.scene
|
|
783
|
-
},
|
|
783
|
+
}, P.add(m), l === "behind" && g && (o.scene.add(g), u.push(() => g && o.scene.remove(g)));
|
|
784
784
|
};
|
|
785
|
-
if (
|
|
785
|
+
if (v || b) {
|
|
786
786
|
E.domElement.style.position = "absolute", E.domElement.style.top = "0", E.domElement.style.userSelect = "none", E.domElement.style.pointerEvents = "none", E.domElement.classList.add(fo(l));
|
|
787
787
|
const J = () => {
|
|
788
788
|
const R = requestAnimationFrame(J);
|
|
789
|
-
|
|
789
|
+
y.requestAnimationFrameId = R, E.render(P, t);
|
|
790
790
|
};
|
|
791
791
|
return () => {
|
|
792
|
-
|
|
792
|
+
k(), J();
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
|
-
return () =>
|
|
796
|
-
})(),
|
|
797
|
-
if (
|
|
798
|
-
this.appendToElement(
|
|
799
|
-
const
|
|
800
|
-
|
|
795
|
+
return () => k();
|
|
796
|
+
})(), D = l === "front" ? pe.frontModeContainer : pe.behindModeContainer;
|
|
797
|
+
if (D) {
|
|
798
|
+
this.appendToElement(D, l);
|
|
799
|
+
const k = l === "front" ? pe.frontModeStore : pe.behindModeStore;
|
|
800
|
+
k && (k.appendedToPage = !0);
|
|
801
801
|
}
|
|
802
|
-
const I = (
|
|
803
|
-
return this.store.disposers.push(K), c &&
|
|
802
|
+
const I = (k) => this.setVisibleById(m.uuid, k), T = (k) => this.setEnabledById(m.uuid, k), C = () => I(!0), M = () => I(!1), N = () => T(!0), B = () => T(!1), K = () => (delete this.store.frontModeCSS3DObjects[m.uuid], delete this.store.behindModeCSS3DObjects[m.uuid], u.forEach((k) => k == null ? void 0 : k()), P.remove(m), P.children.length === 0 && (typeof y.requestAnimationFrameId == "number" && cancelAnimationFrame(y.requestAnimationFrameId), E.domElement.remove(), l === "front" && (pe.frontModeStore = void 0), l === "behind" && (pe.behindModeStore = void 0), pe.resizeObserver = void 0), !0);
|
|
803
|
+
return this.store.disposers.push(K), c && z(), {
|
|
804
804
|
id: m.uuid,
|
|
805
805
|
container: h,
|
|
806
806
|
dispose: K,
|
|
807
807
|
css3DObject: m,
|
|
808
|
-
render: c ? void 0 :
|
|
809
|
-
show:
|
|
808
|
+
render: c ? void 0 : z,
|
|
809
|
+
show: C,
|
|
810
810
|
hide: M,
|
|
811
811
|
setVisible: I,
|
|
812
812
|
disable: B,
|
|
813
813
|
enable: N,
|
|
814
|
-
setEnabled:
|
|
815
|
-
appendToElement: (
|
|
814
|
+
setEnabled: T,
|
|
815
|
+
appendToElement: (k) => this.appendToElement(k, l)
|
|
816
816
|
};
|
|
817
817
|
});
|
|
818
818
|
d(this, "setVisibleById", (t, e) => {
|
|
@@ -839,8 +839,8 @@ class La {
|
|
|
839
839
|
opacity: 0,
|
|
840
840
|
transparent: !1,
|
|
841
841
|
side: j.DoubleSide
|
|
842
|
-
}), m = new j.PlaneGeometry(c, h),
|
|
843
|
-
return
|
|
842
|
+
}), m = new j.PlaneGeometry(c, h), g = new j.Mesh(m, u);
|
|
843
|
+
return g.name = fo("mesh"), g.position.copy(l.position), g.rotation.copy(l.rotation), g.scale.copy(l.scale), g;
|
|
844
844
|
}
|
|
845
845
|
})();
|
|
846
846
|
return { css3DObject: l, opacityMesh: f };
|
|
@@ -1015,35 +1015,35 @@ const If = (i) => {
|
|
|
1015
1015
|
i.off("intersectionOnModelUpdate", e), i.off("intersectionHidden", n);
|
|
1016
1016
|
});
|
|
1017
1017
|
const o = (h, f = 2, u = 0.1) => {
|
|
1018
|
-
const m = f / 2,
|
|
1019
|
-
|
|
1018
|
+
const m = f / 2, v = c(h, u), b = new Mi();
|
|
1019
|
+
b.add(
|
|
1020
1020
|
fi(
|
|
1021
|
-
new $(
|
|
1022
|
-
new $(
|
|
1021
|
+
new $(v.x + m, v.y, v.z),
|
|
1022
|
+
new $(v.x - m, v.y, v.z),
|
|
1023
1023
|
new $(1, 0, 0)
|
|
1024
1024
|
),
|
|
1025
1025
|
fi(
|
|
1026
|
-
new $(
|
|
1027
|
-
new $(
|
|
1026
|
+
new $(v.x, v.y + m, v.z),
|
|
1027
|
+
new $(v.x, v.y - m, v.z),
|
|
1028
1028
|
new $(0, 1, 0)
|
|
1029
1029
|
),
|
|
1030
1030
|
fi(
|
|
1031
|
-
new $(
|
|
1032
|
-
new $(
|
|
1031
|
+
new $(v.x, v.y, v.z + m),
|
|
1032
|
+
new $(v.x, v.y, v.z - m),
|
|
1033
1033
|
new $(0, 0, 1)
|
|
1034
1034
|
)
|
|
1035
|
-
), i.scene.add(
|
|
1036
|
-
const
|
|
1037
|
-
i.scene.remove(
|
|
1035
|
+
), i.scene.add(b), i.needsRender = !0;
|
|
1036
|
+
const y = () => {
|
|
1037
|
+
i.scene.remove(b);
|
|
1038
1038
|
};
|
|
1039
|
-
return t.disposers.push(
|
|
1039
|
+
return t.disposers.push(y), { clear: y, pointAxesHelperMesh: b };
|
|
1040
1040
|
}, s = (h, f = 0) => {
|
|
1041
|
-
var
|
|
1042
|
-
const u = (
|
|
1041
|
+
var y, P;
|
|
1042
|
+
const u = (y = i == null ? void 0 : i.camera) == null ? void 0 : y.position;
|
|
1043
1043
|
if (!u)
|
|
1044
1044
|
return !1;
|
|
1045
|
-
const m = h.distanceTo(u),
|
|
1046
|
-
return !(
|
|
1045
|
+
const m = h.distanceTo(u), g = h.sub(u).normalize(), v = new Ct(u, g), b = (P = i.model.intersectRaycaster(v)) == null ? void 0 : P[0];
|
|
1046
|
+
return !(b && b.distance + f < m);
|
|
1047
1047
|
}, r = () => t.intersection, a = () => {
|
|
1048
1048
|
var h, f;
|
|
1049
1049
|
(f = (h = t.disposers) == null ? void 0 : h.forEach) == null || f.call(h, (u) => u == null ? void 0 : u()), i.off("intersectionOnModelUpdate", e), i.off("intersectionHidden", n);
|
|
@@ -1241,16 +1241,16 @@ function Ha(i, t, e, n, o, s, r, a = 0) {
|
|
|
1241
1241
|
const l = 16.666 / n;
|
|
1242
1242
|
let c = `{
|
|
1243
1243
|
`;
|
|
1244
|
-
for (let
|
|
1245
|
-
const
|
|
1246
|
-
c +=
|
|
1244
|
+
for (let b = 0; b <= 1; b += l) {
|
|
1245
|
+
const y = t + (e - t) * s(b);
|
|
1246
|
+
c += b * 100 + `%{${r(y, 1 - y)}}
|
|
1247
1247
|
`;
|
|
1248
1248
|
}
|
|
1249
1249
|
const h = c + `100% {${r(e, 1 - e)}}
|
|
1250
|
-
}`, f = `__svelte_${Ra(h)}_${a}`, u = Ri(i), { stylesheet: m, rules:
|
|
1251
|
-
|
|
1252
|
-
const
|
|
1253
|
-
return i.style.animation = `${
|
|
1250
|
+
}`, f = `__svelte_${Ra(h)}_${a}`, u = Ri(i), { stylesheet: m, rules: g } = Gn.get(u) || Ba(u, i);
|
|
1251
|
+
g[f] || (g[f] = !0, m.insertRule(`@keyframes ${f} ${h}`, m.cssRules.length));
|
|
1252
|
+
const v = i.style.animation || "";
|
|
1253
|
+
return i.style.animation = `${v ? `${v}, ` : ""}${f} ${n}ms linear ${o}ms 1 both`, Xn += 1, f;
|
|
1254
1254
|
}
|
|
1255
1255
|
function vo(i, t) {
|
|
1256
1256
|
const e = (i.style.animation || "").split(", "), n = e.filter(
|
|
@@ -1364,16 +1364,16 @@ function Ja(i, t, e) {
|
|
|
1364
1364
|
s && vo(i, s);
|
|
1365
1365
|
}
|
|
1366
1366
|
function c() {
|
|
1367
|
-
const { delay: f = 0, duration: u = 300, easing: m = ji, tick:
|
|
1368
|
-
|
|
1369
|
-
const
|
|
1370
|
-
r && r.abort(), o = !0, _e(() => Ao(i, !0, "start")), r = Ma((
|
|
1367
|
+
const { delay: f = 0, duration: u = 300, easing: m = ji, tick: g = ne, css: v } = n || Za;
|
|
1368
|
+
v && (s = Ha(i, 0, 1, u, f, m, v, a++)), g(0, 1);
|
|
1369
|
+
const b = za() + f, y = b + u;
|
|
1370
|
+
r && r.abort(), o = !0, _e(() => Ao(i, !0, "start")), r = Ma((P) => {
|
|
1371
1371
|
if (o) {
|
|
1372
|
-
if (
|
|
1373
|
-
return
|
|
1374
|
-
if (
|
|
1375
|
-
const E = m((
|
|
1376
|
-
|
|
1372
|
+
if (P >= y)
|
|
1373
|
+
return g(1, 0), Ao(i, !0, "end"), l(), o = !1;
|
|
1374
|
+
if (P >= b) {
|
|
1375
|
+
const E = m((P - b) / u);
|
|
1376
|
+
g(E, 1 - E);
|
|
1377
1377
|
}
|
|
1378
1378
|
}
|
|
1379
1379
|
return o;
|
|
@@ -1402,31 +1402,31 @@ function Qt(i, t) {
|
|
|
1402
1402
|
});
|
|
1403
1403
|
}
|
|
1404
1404
|
function yt(i, t, e, n, o, s, r, a, l, c, h, f) {
|
|
1405
|
-
let u = i.length, m = s.length,
|
|
1406
|
-
const
|
|
1407
|
-
for (;
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
for (
|
|
1411
|
-
const I = f(o, s,
|
|
1412
|
-
let
|
|
1413
|
-
|
|
1414
|
-
}
|
|
1415
|
-
const E = /* @__PURE__ */ new Set(),
|
|
1416
|
-
function
|
|
1405
|
+
let u = i.length, m = s.length, g = u;
|
|
1406
|
+
const v = {};
|
|
1407
|
+
for (; g--; )
|
|
1408
|
+
v[i[g].key] = g;
|
|
1409
|
+
const b = [], y = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
|
|
1410
|
+
for (g = m; g--; ) {
|
|
1411
|
+
const I = f(o, s, g), T = e(I);
|
|
1412
|
+
let C = r.get(T);
|
|
1413
|
+
C ? n && C.p(I, t) : (C = c(T, I), C.c()), y.set(T, b[g] = C), T in v && P.set(T, Math.abs(g - v[T]));
|
|
1414
|
+
}
|
|
1415
|
+
const E = /* @__PURE__ */ new Set(), z = /* @__PURE__ */ new Set();
|
|
1416
|
+
function D(I) {
|
|
1417
1417
|
H(I, 1), I.m(a, h), r.set(I.key, I), h = I.first, m--;
|
|
1418
1418
|
}
|
|
1419
1419
|
for (; u && m; ) {
|
|
1420
|
-
const I =
|
|
1421
|
-
I ===
|
|
1420
|
+
const I = b[m - 1], T = i[u - 1], C = I.key, M = T.key;
|
|
1421
|
+
I === T ? (h = I.first, u--, m--) : y.has(M) ? !r.has(C) || E.has(C) ? D(I) : z.has(M) ? u-- : P.get(C) > P.get(M) ? (z.add(C), D(I)) : (E.add(M), u--) : (l(T, r), u--);
|
|
1422
1422
|
}
|
|
1423
1423
|
for (; u--; ) {
|
|
1424
1424
|
const I = i[u];
|
|
1425
|
-
|
|
1425
|
+
y.has(I.key) || l(I, r);
|
|
1426
1426
|
}
|
|
1427
1427
|
for (; m; )
|
|
1428
|
-
|
|
1429
|
-
return
|
|
1428
|
+
D(b[m - 1]);
|
|
1429
|
+
return b;
|
|
1430
1430
|
}
|
|
1431
1431
|
function Qe(i, t) {
|
|
1432
1432
|
const e = {}, n = {}, o = { $$scope: 1 };
|
|
@@ -1488,8 +1488,8 @@ function ue(i, t, e, n, o, s, r, a = [-1]) {
|
|
|
1488
1488
|
r && r(c.root);
|
|
1489
1489
|
let h = !1;
|
|
1490
1490
|
if (c.ctx = e ? e(i, t.props || {}, (f, u, ...m) => {
|
|
1491
|
-
const
|
|
1492
|
-
return c.ctx && o(c.ctx[f], c.ctx[f] =
|
|
1491
|
+
const g = m.length ? m[0] : u;
|
|
1492
|
+
return c.ctx && o(c.ctx[f], c.ctx[f] = g) && (!c.skip_bound && c.bound[f] && c.bound[f](g), h && Va(i, f)), u;
|
|
1493
1493
|
}) : [], c.update(), h = !0, Ft(c.before_update), c.fragment = n ? n(c.ctx) : !1, t.target) {
|
|
1494
1494
|
if (t.hydrate) {
|
|
1495
1495
|
const f = ja(t.target);
|
|
@@ -1645,46 +1645,46 @@ function ol(i, t, e) {
|
|
|
1645
1645
|
let n;
|
|
1646
1646
|
var o;
|
|
1647
1647
|
let { five: s } = t, { roomLabels: r } = t, a, l, c = (o = s.model.shownFloor) !== null && o !== void 0 ? o : null;
|
|
1648
|
-
function h(
|
|
1649
|
-
if (!(c === null ||
|
|
1648
|
+
function h(b) {
|
|
1649
|
+
if (!(c === null || b.floorIndex === c))
|
|
1650
1650
|
return !1;
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1653
|
-
const [I] = s.model.intersectRaycaster(
|
|
1654
|
-
return !(I && I.distance + 1 <
|
|
1655
|
-
}
|
|
1656
|
-
function f(
|
|
1657
|
-
const E = new $(
|
|
1658
|
-
return `translate(${
|
|
1659
|
-
}
|
|
1660
|
-
function u(
|
|
1661
|
-
const { rendererSize:
|
|
1662
|
-
function
|
|
1663
|
-
const
|
|
1664
|
-
if (
|
|
1665
|
-
return
|
|
1666
|
-
const { x:
|
|
1651
|
+
const P = new Ct(), E = s.camera.position.clone(), z = new $(b.position.x, b.position.y, b.position.z), D = z.distanceTo(E);
|
|
1652
|
+
P.set(E.clone(), z.clone().sub(E).normalize());
|
|
1653
|
+
const [I] = s.model.intersectRaycaster(P);
|
|
1654
|
+
return !(I && I.distance + 1 < D);
|
|
1655
|
+
}
|
|
1656
|
+
function f(b, y) {
|
|
1657
|
+
const E = new $(b.position.x, b.position.y, b.position.z).clone().project(s.camera), z = Math.ceil((E.x + 1) / 2 * y.x), D = Math.ceil((-E.y + 1) / 2 * y.y);
|
|
1658
|
+
return `translate(${z}px, ${D}px)`;
|
|
1659
|
+
}
|
|
1660
|
+
function u(b) {
|
|
1661
|
+
const { rendererSize: y, shownFloor: P } = b, E = /* @__PURE__ */ new Map();
|
|
1662
|
+
function z(I) {
|
|
1663
|
+
const T = E.get(I.id);
|
|
1664
|
+
if (T)
|
|
1665
|
+
return T;
|
|
1666
|
+
const { x: C, y: M, z: N } = I.position, B = new $(C, M, N).clone().distanceTo(s.camera.position);
|
|
1667
1667
|
return E.set(I.id, B), B;
|
|
1668
1668
|
}
|
|
1669
1669
|
return r.map((I) => {
|
|
1670
|
-
const
|
|
1671
|
-
return Object.assign(Object.assign({}, I), { visible:
|
|
1670
|
+
const T = h(I), C = T ? f(I, y) : I.transform, M = z(I), B = r.filter((K) => K.visible && z(K) < M).length * 10;
|
|
1671
|
+
return Object.assign(Object.assign({}, I), { visible: T, transform: C, zIndex: B });
|
|
1672
1672
|
});
|
|
1673
1673
|
}
|
|
1674
1674
|
function m() {
|
|
1675
1675
|
e(0, r = u({ rendererSize: n, shownFloor: c }));
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1678
|
-
e(4, c =
|
|
1677
|
+
function g(b) {
|
|
1678
|
+
e(4, c = b);
|
|
1679
1679
|
}
|
|
1680
|
-
s.on("cameraUpdate", m), s.on("modelShownFloorChange",
|
|
1681
|
-
s.off("cameraUpdate", m), s.off("modelShownFloorChange",
|
|
1680
|
+
s.on("cameraUpdate", m), s.on("modelShownFloorChange", g), ln(() => {
|
|
1681
|
+
s.off("cameraUpdate", m), s.off("modelShownFloorChange", g);
|
|
1682
1682
|
});
|
|
1683
|
-
function
|
|
1683
|
+
function v() {
|
|
1684
1684
|
a = this.clientWidth, l = this.clientHeight, e(2, a), e(3, l);
|
|
1685
1685
|
}
|
|
1686
|
-
return i.$$set = (
|
|
1687
|
-
"five" in
|
|
1686
|
+
return i.$$set = (b) => {
|
|
1687
|
+
"five" in b && e(1, s = b.five), "roomLabels" in b && e(0, r = b.roomLabels);
|
|
1688
1688
|
}, i.$$.update = () => {
|
|
1689
1689
|
i.$$.dirty & 12 && e(5, n = { x: a, y: l }), i.$$.dirty & 48 && e(0, r = u({ rendererSize: n, shownFloor: c }));
|
|
1690
1690
|
}, [
|
|
@@ -1694,7 +1694,7 @@ function ol(i, t, e) {
|
|
|
1694
1694
|
l,
|
|
1695
1695
|
c,
|
|
1696
1696
|
n,
|
|
1697
|
-
|
|
1697
|
+
v
|
|
1698
1698
|
];
|
|
1699
1699
|
}
|
|
1700
1700
|
class sl extends de {
|
|
@@ -1869,15 +1869,15 @@ function gl(i) {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
function vl(i, t, e) {
|
|
1871
1871
|
let { panoIndex: n } = t, { floorplanData: o } = t, { lastPanoramaLongitude: s } = t, { cameraImageUrl: r } = t;
|
|
1872
|
-
const { observers: a } = o, l = a[n], c = l.positionInImage.x, h = l.positionInImage.y, f = c * 100 + "%", u = h * 100 + "%", m = -ml(s) + 45,
|
|
1873
|
-
return i.$$set = (
|
|
1874
|
-
"panoIndex" in
|
|
1872
|
+
const { observers: a } = o, l = a[n], c = l.positionInImage.x, h = l.positionInImage.y, f = c * 100 + "%", u = h * 100 + "%", m = -ml(s) + 45, g = document.body.clientWidth, v = document.body.clientHeight, y = `${(g < 500 || v < 500 ? 17 : 37) / 16}rem`;
|
|
1873
|
+
return i.$$set = (P) => {
|
|
1874
|
+
"panoIndex" in P && e(5, n = P.panoIndex), "floorplanData" in P && e(6, o = P.floorplanData), "lastPanoramaLongitude" in P && e(7, s = P.lastPanoramaLongitude), "cameraImageUrl" in P && e(0, r = P.cameraImageUrl);
|
|
1875
1875
|
}, [
|
|
1876
1876
|
r,
|
|
1877
1877
|
f,
|
|
1878
1878
|
u,
|
|
1879
1879
|
m,
|
|
1880
|
-
|
|
1880
|
+
y,
|
|
1881
1881
|
n,
|
|
1882
1882
|
o,
|
|
1883
1883
|
s
|
|
@@ -2232,12 +2232,12 @@ function Ql(i, t) {
|
|
|
2232
2232
|
}
|
|
2233
2233
|
function Wl(i, t, e) {
|
|
2234
2234
|
let n, o, s, r, { pxmm: a } = t, { room: l } = t, { hoveredRoom: c } = t, { getRoomAreaText: h } = t, { getLabelElement: f } = t, { adaptiveRoomLabelVisibleEnable: u } = t;
|
|
2235
|
-
function m(
|
|
2235
|
+
function m(C, M) {
|
|
2236
2236
|
if (M.width === 0 || M.height === 0)
|
|
2237
2237
|
return () => !1;
|
|
2238
|
-
const N =
|
|
2238
|
+
const N = C.path.map(({ x: te, y: Q }) => [te, Q]), B = C.roomLabel.position, { x: K, y: k } = B, { width: J, height: R } = M, _ = J / 2, U = R / 2;
|
|
2239
2239
|
return function(Q) {
|
|
2240
|
-
const ee = K * Q, se =
|
|
2240
|
+
const ee = K * Q, se = k * Q, ie = N.map(([Ae, xe]) => [Ae * Q, xe * Q]);
|
|
2241
2241
|
return [
|
|
2242
2242
|
[ee + _, se - U],
|
|
2243
2243
|
[ee - _, se - U],
|
|
@@ -2246,44 +2246,44 @@ function Wl(i, t, e) {
|
|
|
2246
2246
|
].every((Ae) => Ql(Ae, ie));
|
|
2247
2247
|
};
|
|
2248
2248
|
}
|
|
2249
|
-
const
|
|
2250
|
-
let
|
|
2249
|
+
const g = document.body.clientWidth, v = document.body.clientHeight, b = l.roomLabel, y = b.positionInImage.x * 100 + "%", P = b.positionInImage.y * 100 + "%", E = (g < 500 || v < 500 ? 10 : 14) / 16 + "rem";
|
|
2250
|
+
let z = !1, D, I;
|
|
2251
2251
|
c.subscribe(function(M) {
|
|
2252
|
-
e(13,
|
|
2252
|
+
e(13, z = !!M && M.id === l.id);
|
|
2253
2253
|
}), Lt(() => {
|
|
2254
|
-
const
|
|
2254
|
+
const C = D == null ? void 0 : D.getClientRects()[0];
|
|
2255
2255
|
e(14, I = {
|
|
2256
|
-
width:
|
|
2257
|
-
height:
|
|
2256
|
+
width: C.width,
|
|
2257
|
+
height: C.height
|
|
2258
2258
|
});
|
|
2259
2259
|
});
|
|
2260
|
-
function
|
|
2261
|
-
Bt[
|
|
2262
|
-
|
|
2260
|
+
function T(C) {
|
|
2261
|
+
Bt[C ? "unshift" : "push"](() => {
|
|
2262
|
+
D = C, e(2, D);
|
|
2263
2263
|
});
|
|
2264
2264
|
}
|
|
2265
|
-
return i.$$set = (
|
|
2266
|
-
"pxmm" in
|
|
2265
|
+
return i.$$set = (C) => {
|
|
2266
|
+
"pxmm" in C && e(9, a = C.pxmm), "room" in C && e(0, l = C.room), "hoveredRoom" in C && e(10, c = C.hoveredRoom), "getRoomAreaText" in C && e(11, h = C.getRoomAreaText), "getLabelElement" in C && e(1, f = C.getLabelElement), "adaptiveRoomLabelVisibleEnable" in C && e(12, u = C.adaptiveRoomLabelVisibleEnable);
|
|
2267
2267
|
}, i.$$.update = () => {
|
|
2268
|
-
i.$$.dirty & 2049 && e(5, n = l.size ? h(l.size) : ""), i.$$.dirty & 16385 && e(15, o = I ? m(l, I) : void 0), i.$$.dirty & 3 && e(4, s = f == null ? void 0 : f(l)), i.$$.dirty & 45568 && e(3, r = u ?
|
|
2268
|
+
i.$$.dirty & 2049 && e(5, n = l.size ? h(l.size) : ""), i.$$.dirty & 16385 && e(15, o = I ? m(l, I) : void 0), i.$$.dirty & 3 && e(4, s = f == null ? void 0 : f(l)), i.$$.dirty & 45568 && e(3, r = u ? z ? !0 : !!(o != null && o(a)) : !0);
|
|
2269
2269
|
}, [
|
|
2270
2270
|
l,
|
|
2271
2271
|
f,
|
|
2272
|
-
|
|
2272
|
+
D,
|
|
2273
2273
|
r,
|
|
2274
2274
|
s,
|
|
2275
2275
|
n,
|
|
2276
|
-
|
|
2277
|
-
|
|
2276
|
+
y,
|
|
2277
|
+
P,
|
|
2278
2278
|
E,
|
|
2279
2279
|
a,
|
|
2280
2280
|
c,
|
|
2281
2281
|
h,
|
|
2282
2282
|
u,
|
|
2283
|
-
|
|
2283
|
+
z,
|
|
2284
2284
|
I,
|
|
2285
2285
|
o,
|
|
2286
|
-
|
|
2286
|
+
T
|
|
2287
2287
|
];
|
|
2288
2288
|
}
|
|
2289
2289
|
class Yl extends de {
|
|
@@ -2439,8 +2439,8 @@ function Ul(i, t, e) {
|
|
|
2439
2439
|
"floorIndex" in m && e(7, o = m.floorIndex), "floorplanData" in m && e(8, s = m.floorplanData), "hoveredRoom" in m && e(0, r = m.hoveredRoom), "getRoomAreaText" in m && e(1, a = m.getRoomAreaText), "getLabelElement" in m && e(2, l = m.getLabelElement), "adaptiveRoomLabelVisibleEnable" in m && e(3, c = m.adaptiveRoomLabelVisibleEnable);
|
|
2440
2440
|
}, i.$$.update = () => {
|
|
2441
2441
|
if (i.$$.dirty & 384 && e(6, n = s.floorDatas[o].rooms), i.$$.dirty & 272) {
|
|
2442
|
-
const { max: m, min:
|
|
2443
|
-
e(5, f = h /
|
|
2442
|
+
const { max: m, min: g } = s.bounding, v = m.x - g.x;
|
|
2443
|
+
e(5, f = h / v);
|
|
2444
2444
|
}
|
|
2445
2445
|
}, [
|
|
2446
2446
|
r,
|
|
@@ -2522,69 +2522,69 @@ function ko(i, t) {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
function Kl(i) {
|
|
2524
2524
|
let t, e, n, o, s, r, a = [], l = /* @__PURE__ */ new Map(), c, h = i[3], f = [];
|
|
2525
|
-
for (let
|
|
2526
|
-
f[
|
|
2525
|
+
for (let g = 0; g < h.length; g += 1)
|
|
2526
|
+
f[g] = Lo(Co(i, h, g));
|
|
2527
2527
|
let u = i[4];
|
|
2528
|
-
const m = (
|
|
2529
|
-
for (let
|
|
2530
|
-
let
|
|
2531
|
-
l.set(
|
|
2528
|
+
const m = (g) => g[13];
|
|
2529
|
+
for (let g = 0; g < u.length; g += 1) {
|
|
2530
|
+
let v = xo(i, u, g), b = m(v);
|
|
2531
|
+
l.set(b, a[g] = ko(b, v));
|
|
2532
2532
|
}
|
|
2533
2533
|
return {
|
|
2534
2534
|
c() {
|
|
2535
2535
|
t = F("div"), e = F("div"), n = fe(), o = F("div");
|
|
2536
|
-
for (let
|
|
2537
|
-
f[
|
|
2536
|
+
for (let g = 0; g < f.length; g += 1)
|
|
2537
|
+
f[g].c();
|
|
2538
2538
|
s = fe(), r = F("div");
|
|
2539
|
-
for (let
|
|
2540
|
-
a[
|
|
2539
|
+
for (let g = 0; g < a.length; g += 1)
|
|
2540
|
+
a[g].c();
|
|
2541
2541
|
x(e, "class", "floorplan-plugin__rule-line svelte-djlmk4"), x(o, "class", "floorplan-plugin__rule-scale-wrapper svelte-djlmk4"), Me(o, "is-row", i[2]), x(r, "class", "floorplan-plugin__rule-text-wrapper svelte-djlmk4"), x(t, "class", c = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + i[0] + " svelte-djlmk4"), Me(t, "is-row", i[2]), S(t, "width", i[2] ? "100%" : 1 / 16 + "rem"), S(t, "height", i[2] ? 1 / 16 + "rem" : "100%");
|
|
2542
2542
|
},
|
|
2543
|
-
m(
|
|
2544
|
-
W(
|
|
2545
|
-
for (let
|
|
2546
|
-
f[
|
|
2543
|
+
m(g, v) {
|
|
2544
|
+
W(g, t, v), G(t, e), G(t, n), G(t, o);
|
|
2545
|
+
for (let b = 0; b < f.length; b += 1)
|
|
2546
|
+
f[b].m(o, null);
|
|
2547
2547
|
G(t, s), G(t, r);
|
|
2548
|
-
for (let
|
|
2549
|
-
a[
|
|
2550
|
-
},
|
|
2551
|
-
p(
|
|
2552
|
-
if (
|
|
2553
|
-
h =
|
|
2554
|
-
let
|
|
2555
|
-
for (
|
|
2556
|
-
const
|
|
2557
|
-
f[
|
|
2548
|
+
for (let b = 0; b < a.length; b += 1)
|
|
2549
|
+
a[b].m(r, null);
|
|
2550
|
+
},
|
|
2551
|
+
p(g, [v]) {
|
|
2552
|
+
if (v & 8) {
|
|
2553
|
+
h = g[3];
|
|
2554
|
+
let b;
|
|
2555
|
+
for (b = 0; b < h.length; b += 1) {
|
|
2556
|
+
const y = Co(g, h, b);
|
|
2557
|
+
f[b] ? f[b].p(y, v) : (f[b] = Lo(y), f[b].c(), f[b].m(o, null));
|
|
2558
2558
|
}
|
|
2559
|
-
for (;
|
|
2560
|
-
f[
|
|
2559
|
+
for (; b < f.length; b += 1)
|
|
2560
|
+
f[b].d(1);
|
|
2561
2561
|
f.length = h.length;
|
|
2562
2562
|
}
|
|
2563
|
-
|
|
2563
|
+
v & 22 && (u = g[4], a = yt(a, v, m, 1, g, u, l, r, Ys, ko, null, xo)), v & 1 && c !== (c = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + g[0] + " svelte-djlmk4") && x(t, "class", c), v & 5 && Me(t, "is-row", g[2]);
|
|
2564
2564
|
},
|
|
2565
2565
|
i: ne,
|
|
2566
2566
|
o: ne,
|
|
2567
|
-
d(
|
|
2568
|
-
|
|
2569
|
-
for (let
|
|
2570
|
-
a[
|
|
2567
|
+
d(g) {
|
|
2568
|
+
g && X(t), Gt(f, g);
|
|
2569
|
+
for (let v = 0; v < a.length; v += 1)
|
|
2570
|
+
a[v].d();
|
|
2571
2571
|
}
|
|
2572
2572
|
};
|
|
2573
2573
|
}
|
|
2574
2574
|
const St = 1e3, jt = 180;
|
|
2575
2575
|
function _l(i, t, e) {
|
|
2576
2576
|
let { type: n } = t, { data: o } = t, { bounding: s } = t, { getRuleDistanceText: r } = t;
|
|
2577
|
-
const a = n === "top" || n === "bottom", l = s.max.x - s.min.x - (St - jt) * 2, c = s.max.y - s.min.y - (St - jt) * 2, h = o.map(([
|
|
2578
|
-
const
|
|
2579
|
-
return { left:
|
|
2577
|
+
const a = n === "top" || n === "bottom", l = s.max.x - s.min.x - (St - jt) * 2, c = s.max.y - s.min.y - (St - jt) * 2, h = o.map(([g, v]) => a ? [g.x, v.x] : [g.y, v.y]).flat().sort().filter((g, v, b) => v === 0 ? !0 : g !== b[v - 1]), f = h.map((g) => {
|
|
2578
|
+
const v = a ? (g - s.min.x - St + jt) / l : 0, b = a ? 0 : (g - s.min.y - St + jt) / c;
|
|
2579
|
+
return { left: v, bottom: b };
|
|
2580
2580
|
});
|
|
2581
2581
|
f.unshift({ left: 0, bottom: 0 }), f.push(a ? { left: 1, bottom: 0 } : { left: 0, bottom: 1 });
|
|
2582
|
-
const u = h[h.length - 1] - h[0], m = h.map((v, b
|
|
2583
|
-
const
|
|
2584
|
-
return { left: E, bottom:
|
|
2585
|
-
}).filter(({ distance:
|
|
2586
|
-
return i.$$set = (
|
|
2587
|
-
"type" in
|
|
2582
|
+
const u = h[h.length - 1] - h[0], m = h.map((g, v, b) => {
|
|
2583
|
+
const y = v === 0 ? 0 : g - b[v - 1], P = v === 0 ? 0 : (g + b[v - 1]) / 2, E = a ? (P - s.min.x - St + jt) / l : 0, z = a ? 0 : (P - s.min.y - St + jt) / c;
|
|
2584
|
+
return { left: E, bottom: z, distance: y };
|
|
2585
|
+
}).filter(({ distance: g }) => g / u > 0.1);
|
|
2586
|
+
return i.$$set = (g) => {
|
|
2587
|
+
"type" in g && e(0, n = g.type), "data" in g && e(5, o = g.data), "bounding" in g && e(6, s = g.bounding), "getRuleDistanceText" in g && e(1, r = g.getRuleDistanceText);
|
|
2588
2588
|
}, [n, r, a, f, m, o, s];
|
|
2589
2589
|
}
|
|
2590
2590
|
class $l extends de {
|
|
@@ -2701,19 +2701,19 @@ function tc(i) {
|
|
|
2701
2701
|
}
|
|
2702
2702
|
const zo = 1e3, Mo = 180;
|
|
2703
2703
|
function nc(i, t, e) {
|
|
2704
|
-
let n, o, s, r, a, l, c, h, f, u, { floorIndex: m } = t, { floorplanData:
|
|
2705
|
-
return i.$$set = (
|
|
2706
|
-
"floorIndex" in
|
|
2704
|
+
let n, o, s, r, a, l, c, h, f, u, { floorIndex: m } = t, { floorplanData: g } = t, { getRuleDistanceText: v } = t;
|
|
2705
|
+
return i.$$set = (b) => {
|
|
2706
|
+
"floorIndex" in b && e(5, m = b.floorIndex), "floorplanData" in b && e(6, g = b.floorplanData), "getRuleDistanceText" in b && e(0, v = b.getRuleDistanceText);
|
|
2707
2707
|
}, i.$$.update = () => {
|
|
2708
|
-
i.$$.dirty & 64 && e(1, n =
|
|
2708
|
+
i.$$.dirty & 64 && e(1, n = g.bounding), i.$$.dirty & 96 && e(11, o = g.floorDatas[m].rules), i.$$.dirty & 2048 && e(12, s = Object.keys(o)), i.$$.dirty & 6144 && e(4, r = s.map((b) => [b, o[b]])), i.$$.dirty & 2 && e(9, a = n.max.x - n.min.x), i.$$.dirty & 2 && e(7, l = n.max.y - n.min.y), i.$$.dirty & 2 && e(10, c = n.max.x - n.min.x - (zo - Mo) * 2), i.$$.dirty & 2 && e(8, h = n.max.y - n.min.y - (zo - Mo) * 2), i.$$.dirty & 1536 && e(3, f = c / a * 100 + "%"), i.$$.dirty & 384 && e(2, u = h / l * 100 + "%");
|
|
2709
2709
|
}, [
|
|
2710
|
-
|
|
2710
|
+
v,
|
|
2711
2711
|
n,
|
|
2712
2712
|
u,
|
|
2713
2713
|
f,
|
|
2714
2714
|
r,
|
|
2715
2715
|
m,
|
|
2716
|
-
|
|
2716
|
+
g,
|
|
2717
2717
|
l,
|
|
2718
2718
|
h,
|
|
2719
2719
|
a,
|
|
@@ -3351,8 +3351,8 @@ function zc(i) {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
];
|
|
3353
3353
|
let f = {};
|
|
3354
|
-
for (let
|
|
3355
|
-
f = Ge(f, h[
|
|
3354
|
+
for (let y = 0; y < h.length; y += 1)
|
|
3355
|
+
f = Ge(f, h[y]);
|
|
3356
3356
|
e = new wc({ props: f });
|
|
3357
3357
|
let u = i[2] && Ro(i);
|
|
3358
3358
|
const m = [
|
|
@@ -3361,56 +3361,56 @@ function zc(i) {
|
|
|
3361
3361
|
floorIndex: i[1]
|
|
3362
3362
|
}
|
|
3363
3363
|
];
|
|
3364
|
-
let
|
|
3365
|
-
for (let
|
|
3366
|
-
|
|
3367
|
-
s = new Js({ props:
|
|
3368
|
-
let
|
|
3364
|
+
let g = {};
|
|
3365
|
+
for (let y = 0; y < m.length; y += 1)
|
|
3366
|
+
g = Ge(g, m[y]);
|
|
3367
|
+
s = new Js({ props: g });
|
|
3368
|
+
let v = i[3] && Bo(i), b = i[4] && Ho(i);
|
|
3369
3369
|
return {
|
|
3370
3370
|
c() {
|
|
3371
|
-
t = F("div"), ye(e.$$.fragment), n = fe(), u && u.c(), o = fe(), ye(s.$$.fragment), r = fe(),
|
|
3371
|
+
t = F("div"), ye(e.$$.fragment), n = fe(), u && u.c(), o = fe(), ye(s.$$.fragment), r = fe(), v && v.c(), a = fe(), b && b.c(), x(t, "class", l = je(`floorplan-plugin__floor${i[0] ? " floorplan-plugin__floor--is-current" : ""}`) + " svelte-bl8zrz");
|
|
3372
3372
|
},
|
|
3373
|
-
m(
|
|
3374
|
-
W(
|
|
3373
|
+
m(y, P) {
|
|
3374
|
+
W(y, t, P), ve(e, t, null), G(t, n), u && u.m(t, null), G(t, o), ve(s, t, null), G(t, r), v && v.m(t, null), G(t, a), b && b.m(t, null), c = !0;
|
|
3375
3375
|
},
|
|
3376
|
-
p(
|
|
3377
|
-
const E =
|
|
3376
|
+
p(y, [P]) {
|
|
3377
|
+
const E = P & 34 ? Qe(h, [
|
|
3378
3378
|
{
|
|
3379
|
-
floorIndex:
|
|
3380
|
-
floorplanData:
|
|
3379
|
+
floorIndex: y[1],
|
|
3380
|
+
floorplanData: y[5]
|
|
3381
3381
|
}
|
|
3382
3382
|
]) : {};
|
|
3383
|
-
e.$set(E),
|
|
3383
|
+
e.$set(E), y[2] ? u ? (u.p(y, P), P & 4 && H(u, 1)) : (u = Ro(y), u.c(), H(u, 1), u.m(t, o)) : u && (Ee(), q(u, 1, 1, () => {
|
|
3384
3384
|
u = null;
|
|
3385
3385
|
}), Ie());
|
|
3386
|
-
const
|
|
3386
|
+
const z = P & 34 ? Qe(m, [
|
|
3387
3387
|
{
|
|
3388
|
-
floorplanData:
|
|
3389
|
-
floorIndex:
|
|
3388
|
+
floorplanData: y[5],
|
|
3389
|
+
floorIndex: y[1]
|
|
3390
3390
|
}
|
|
3391
3391
|
]) : {};
|
|
3392
|
-
s.$set(
|
|
3392
|
+
s.$set(z), y[3] ? v ? (v.p(y, P), P & 8 && H(v, 1)) : (v = Bo(y), v.c(), H(v, 1), v.m(t, a)) : v && (Ee(), q(v, 1, 1, () => {
|
|
3393
|
+
v = null;
|
|
3394
|
+
}), Ie()), y[4] ? b ? (b.p(y, P), P & 16 && H(b, 1)) : (b = Ho(y), b.c(), H(b, 1), b.m(t, null)) : b && (Ee(), q(b, 1, 1, () => {
|
|
3393
3395
|
b = null;
|
|
3394
|
-
}), Ie()),
|
|
3395
|
-
A = null;
|
|
3396
|
-
}), Ie()), (!c || w & 1 && l !== (l = je(`floorplan-plugin__floor${g[0] ? " floorplan-plugin__floor--is-current" : ""}`) + " svelte-bl8zrz")) && x(t, "class", l);
|
|
3396
|
+
}), Ie()), (!c || P & 1 && l !== (l = je(`floorplan-plugin__floor${y[0] ? " floorplan-plugin__floor--is-current" : ""}`) + " svelte-bl8zrz")) && x(t, "class", l);
|
|
3397
3397
|
},
|
|
3398
|
-
i(
|
|
3399
|
-
c || (H(e.$$.fragment,
|
|
3398
|
+
i(y) {
|
|
3399
|
+
c || (H(e.$$.fragment, y), H(u), H(s.$$.fragment, y), H(v), H(b), c = !0);
|
|
3400
3400
|
},
|
|
3401
|
-
o(
|
|
3402
|
-
q(e.$$.fragment,
|
|
3401
|
+
o(y) {
|
|
3402
|
+
q(e.$$.fragment, y), q(u), q(s.$$.fragment, y), q(v), q(b), c = !1;
|
|
3403
3403
|
},
|
|
3404
|
-
d(
|
|
3405
|
-
|
|
3404
|
+
d(y) {
|
|
3405
|
+
y && X(t), be(e), u && u.d(), be(s), v && v.d(), b && b.d();
|
|
3406
3406
|
}
|
|
3407
3407
|
};
|
|
3408
3408
|
}
|
|
3409
3409
|
function Mc(i, t, e) {
|
|
3410
3410
|
let { isCurrent: n } = t, { floorIndex: o } = t, { hoverEnable: s } = t, { roomLabelsEnable: r } = t, { ruleLabelsEnable: a } = t, { floorplanData: l } = t, { getRoomAreaText: c } = t, { getLabelElement: h } = t, { getRuleDistanceText: f } = t, { adaptiveRoomLabelVisibleEnable: u } = t;
|
|
3411
3411
|
const m = Zs(void 0);
|
|
3412
|
-
return i.$$set = (
|
|
3413
|
-
"isCurrent" in
|
|
3412
|
+
return i.$$set = (g) => {
|
|
3413
|
+
"isCurrent" in g && e(0, n = g.isCurrent), "floorIndex" in g && e(1, o = g.floorIndex), "hoverEnable" in g && e(2, s = g.hoverEnable), "roomLabelsEnable" in g && e(3, r = g.roomLabelsEnable), "ruleLabelsEnable" in g && e(4, a = g.ruleLabelsEnable), "floorplanData" in g && e(5, l = g.floorplanData), "getRoomAreaText" in g && e(6, c = g.getRoomAreaText), "getLabelElement" in g && e(7, h = g.getLabelElement), "getRuleDistanceText" in g && e(8, f = g.getRuleDistanceText), "adaptiveRoomLabelVisibleEnable" in g && e(9, u = g.adaptiveRoomLabelVisibleEnable);
|
|
3414
3414
|
}, [
|
|
3415
3415
|
n,
|
|
3416
3416
|
o,
|
|
@@ -3482,25 +3482,25 @@ function Go(i) {
|
|
|
3482
3482
|
l[m].c();
|
|
3483
3483
|
e = fe(), ye(n.$$.fragment), o = fe(), u && u.c(), x(t, "class", "floorplan-main svelte-86bqav");
|
|
3484
3484
|
},
|
|
3485
|
-
m(m,
|
|
3486
|
-
W(m, t,
|
|
3487
|
-
for (let
|
|
3488
|
-
l[
|
|
3485
|
+
m(m, g) {
|
|
3486
|
+
W(m, t, g);
|
|
3487
|
+
for (let v = 0; v < l.length; v += 1)
|
|
3488
|
+
l[v].m(t, null);
|
|
3489
3489
|
G(t, e), ve(n, t, null), G(t, o), u && u.m(t, null), r = !0;
|
|
3490
3490
|
},
|
|
3491
|
-
p(m,
|
|
3492
|
-
if (i = m,
|
|
3491
|
+
p(m, g) {
|
|
3492
|
+
if (i = m, g & 62384) {
|
|
3493
3493
|
a = i[9].floorDatas;
|
|
3494
|
-
let
|
|
3495
|
-
for (
|
|
3496
|
-
const
|
|
3497
|
-
l[
|
|
3494
|
+
let b;
|
|
3495
|
+
for (b = 0; b < a.length; b += 1) {
|
|
3496
|
+
const y = Fo(i, a, b);
|
|
3497
|
+
l[b] ? (l[b].p(y, g), H(l[b], 1)) : (l[b] = Xo(y), l[b].c(), H(l[b], 1), l[b].m(t, e));
|
|
3498
3498
|
}
|
|
3499
|
-
for (Ee(),
|
|
3500
|
-
c(
|
|
3499
|
+
for (Ee(), b = a.length; b < l.length; b += 1)
|
|
3500
|
+
c(b);
|
|
3501
3501
|
Ie();
|
|
3502
3502
|
}
|
|
3503
|
-
const
|
|
3503
|
+
const v = g & 3592 ? Qe(h, [
|
|
3504
3504
|
{
|
|
3505
3505
|
panoIndex: i[3],
|
|
3506
3506
|
floorplanData: i[9],
|
|
@@ -3508,14 +3508,14 @@ function Go(i) {
|
|
|
3508
3508
|
cameraImageUrl: i[11]
|
|
3509
3509
|
}
|
|
3510
3510
|
]) : {};
|
|
3511
|
-
n.$set(
|
|
3511
|
+
n.$set(v), i[6] ? u ? (u.p(i, g), g & 64 && H(u, 1)) : (u = Qo(i), u.c(), H(u, 1), u.m(t, null)) : u && (Ee(), q(u, 1, 1, () => {
|
|
3512
3512
|
u = null;
|
|
3513
3513
|
}), Ie());
|
|
3514
3514
|
},
|
|
3515
3515
|
i(m) {
|
|
3516
3516
|
if (!r) {
|
|
3517
|
-
for (let
|
|
3518
|
-
H(l[
|
|
3517
|
+
for (let g = 0; g < a.length; g += 1)
|
|
3518
|
+
H(l[g]);
|
|
3519
3519
|
H(n.$$.fragment, m), H(u), s || _e(() => {
|
|
3520
3520
|
s = Ja(t, fl, {
|
|
3521
3521
|
duration: i[0],
|
|
@@ -3526,8 +3526,8 @@ function Go(i) {
|
|
|
3526
3526
|
},
|
|
3527
3527
|
o(m) {
|
|
3528
3528
|
l = l.filter(Boolean);
|
|
3529
|
-
for (let
|
|
3530
|
-
q(l[
|
|
3529
|
+
for (let g = 0; g < l.length; g += 1)
|
|
3530
|
+
q(l[g]);
|
|
3531
3531
|
q(n.$$.fragment, m), q(u), r = !1;
|
|
3532
3532
|
},
|
|
3533
3533
|
d(m) {
|
|
@@ -3652,9 +3652,9 @@ function Oc(i) {
|
|
|
3652
3652
|
};
|
|
3653
3653
|
}
|
|
3654
3654
|
function Nc(i, t, e) {
|
|
3655
|
-
let { duration: n = 0 } = t, { visible: o } = t, { northDesc: s } = t, { panoIndex: r } = t, { floorIndex: a } = t, { hoverEnable: l } = t, { compassEnable: c } = t, { roomLabelsEnable: h } = t, { ruleLabelsEnable: f } = t, { floorplanData: u } = t, { lastPanoramaLongitude: m } = t, { cameraImageUrl:
|
|
3655
|
+
let { duration: n = 0 } = t, { visible: o } = t, { northDesc: s } = t, { panoIndex: r } = t, { floorIndex: a } = t, { hoverEnable: l } = t, { compassEnable: c } = t, { roomLabelsEnable: h } = t, { ruleLabelsEnable: f } = t, { floorplanData: u } = t, { lastPanoramaLongitude: m } = t, { cameraImageUrl: g } = t, { getRoomAreaText: v } = t, { getLabelElement: b } = t, { getRuleDistanceText: y } = t, { adaptiveRoomLabelVisibleEnable: P } = t;
|
|
3656
3656
|
return i.$$set = (E) => {
|
|
3657
|
-
"duration" in E && e(0, n = E.duration), "visible" in E && e(1, o = E.visible), "northDesc" in E && e(2, s = E.northDesc), "panoIndex" in E && e(3, r = E.panoIndex), "floorIndex" in E && e(4, a = E.floorIndex), "hoverEnable" in E && e(5, l = E.hoverEnable), "compassEnable" in E && e(6, c = E.compassEnable), "roomLabelsEnable" in E && e(7, h = E.roomLabelsEnable), "ruleLabelsEnable" in E && e(8, f = E.ruleLabelsEnable), "floorplanData" in E && e(9, u = E.floorplanData), "lastPanoramaLongitude" in E && e(10, m = E.lastPanoramaLongitude), "cameraImageUrl" in E && e(11,
|
|
3657
|
+
"duration" in E && e(0, n = E.duration), "visible" in E && e(1, o = E.visible), "northDesc" in E && e(2, s = E.northDesc), "panoIndex" in E && e(3, r = E.panoIndex), "floorIndex" in E && e(4, a = E.floorIndex), "hoverEnable" in E && e(5, l = E.hoverEnable), "compassEnable" in E && e(6, c = E.compassEnable), "roomLabelsEnable" in E && e(7, h = E.roomLabelsEnable), "ruleLabelsEnable" in E && e(8, f = E.ruleLabelsEnable), "floorplanData" in E && e(9, u = E.floorplanData), "lastPanoramaLongitude" in E && e(10, m = E.lastPanoramaLongitude), "cameraImageUrl" in E && e(11, g = E.cameraImageUrl), "getRoomAreaText" in E && e(12, v = E.getRoomAreaText), "getLabelElement" in E && e(13, b = E.getLabelElement), "getRuleDistanceText" in E && e(14, y = E.getRuleDistanceText), "adaptiveRoomLabelVisibleEnable" in E && e(15, P = E.adaptiveRoomLabelVisibleEnable);
|
|
3658
3658
|
}, [
|
|
3659
3659
|
n,
|
|
3660
3660
|
o,
|
|
@@ -3667,11 +3667,11 @@ function Nc(i, t, e) {
|
|
|
3667
3667
|
f,
|
|
3668
3668
|
u,
|
|
3669
3669
|
m,
|
|
3670
|
+
g,
|
|
3670
3671
|
v,
|
|
3671
3672
|
b,
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
w
|
|
3673
|
+
y,
|
|
3674
|
+
P
|
|
3675
3675
|
];
|
|
3676
3676
|
}
|
|
3677
3677
|
class Hi extends de {
|
|
@@ -4674,26 +4674,26 @@ function th(i) {
|
|
|
4674
4674
|
}
|
|
4675
4675
|
function nh(i, t, e) {
|
|
4676
4676
|
let n, o, { five: s } = t, { pxmm: r } = t, { floorplanData: a } = t, { cameraImageUrl: l } = t, c = s.getCurrentState().panoIndex, h = s.getCurrentState().longitude;
|
|
4677
|
-
function f(
|
|
4678
|
-
const
|
|
4679
|
-
if (!
|
|
4677
|
+
function f(g, v) {
|
|
4678
|
+
const b = g.bounding, y = g.observers[v];
|
|
4679
|
+
if (!y)
|
|
4680
4680
|
return "";
|
|
4681
|
-
const
|
|
4682
|
-
return `translate(${
|
|
4681
|
+
const P = (b.max.x - b.min.x) * r, E = (b.max.y - b.min.y) * r, z = Math.floor(y.positionInImage.x * P), D = Math.floor(y.positionInImage.y * E);
|
|
4682
|
+
return `translate(${z}px, ${D}px)`;
|
|
4683
4683
|
}
|
|
4684
|
-
function u(
|
|
4685
|
-
e(6, c =
|
|
4684
|
+
function u(g) {
|
|
4685
|
+
e(6, c = g);
|
|
4686
4686
|
}
|
|
4687
4687
|
const m = Qi(
|
|
4688
|
-
(
|
|
4689
|
-
e(7, h =
|
|
4688
|
+
(g) => {
|
|
4689
|
+
e(7, h = g.longitude);
|
|
4690
4690
|
},
|
|
4691
4691
|
1e3 / 60
|
|
4692
4692
|
);
|
|
4693
4693
|
return Lt(() => (s.on("panoWillArrive", u), s.on("cameraDirectionUpdate", m), function() {
|
|
4694
4694
|
s.off("panoWillArrive", u), s.off("cameraDirectionUpdate", m);
|
|
4695
|
-
})), i.$$set = (
|
|
4696
|
-
"five" in
|
|
4695
|
+
})), i.$$set = (g) => {
|
|
4696
|
+
"five" in g && e(3, s = g.five), "pxmm" in g && e(4, r = g.pxmm), "floorplanData" in g && e(5, a = g.floorplanData), "cameraImageUrl" in g && e(0, l = g.cameraImageUrl);
|
|
4697
4697
|
}, i.$$.update = () => {
|
|
4698
4698
|
i.$$.dirty & 96 && e(2, n = f(a, c)), i.$$.dirty & 128 && e(1, o = th(h));
|
|
4699
4699
|
}, [
|
|
@@ -4978,7 +4978,7 @@ function Vo(i) {
|
|
|
4978
4978
|
W(u, t, m), ve(e, t, null), G(t, n), ve(o, t, null), a = !0;
|
|
4979
4979
|
},
|
|
4980
4980
|
p(u, m) {
|
|
4981
|
-
const
|
|
4981
|
+
const g = m & 1581 ? Qe(l, [
|
|
4982
4982
|
{
|
|
4983
4983
|
five: u[0],
|
|
4984
4984
|
pxmm: u[9],
|
|
@@ -4988,8 +4988,8 @@ function Vo(i) {
|
|
|
4988
4988
|
extraObjects: u[5]
|
|
4989
4989
|
}
|
|
4990
4990
|
]) : {};
|
|
4991
|
-
e.$set(
|
|
4992
|
-
const
|
|
4991
|
+
e.$set(g);
|
|
4992
|
+
const v = m & 537 ? Qe(h, [
|
|
4993
4993
|
{
|
|
4994
4994
|
pxmm: u[9],
|
|
4995
4995
|
five: u[0],
|
|
@@ -4997,7 +4997,7 @@ function Vo(i) {
|
|
|
4997
4997
|
cameraImageUrl: u[4]
|
|
4998
4998
|
}
|
|
4999
4999
|
]) : {};
|
|
5000
|
-
o.$set(
|
|
5000
|
+
o.$set(v), m & 256 && s !== (s = `${u[8]}px`) && S(t, "width", s), m & 2048 && r !== (r = `${u[11]}px`) && S(t, "height", r);
|
|
5001
5001
|
},
|
|
5002
5002
|
i(u) {
|
|
5003
5003
|
a || (H(e.$$.fragment, u), H(o.$$.fragment, u), a = !0);
|
|
@@ -5036,24 +5036,24 @@ function dh(i) {
|
|
|
5036
5036
|
};
|
|
5037
5037
|
}
|
|
5038
5038
|
function fh(i, t, e) {
|
|
5039
|
-
let { five: n } = t, { visible: o } = t, { hoverEnable: s } = t, { floorplanData: r } = t, { cameraImageUrl: a } = t, { extraObjects: l = [] } = t, c = 0, h = 0, f = 0, u = 0, m = 0,
|
|
5040
|
-
function
|
|
5041
|
-
e(10, h = n.work.observers[
|
|
5039
|
+
let { five: n } = t, { visible: o } = t, { hoverEnable: s } = t, { floorplanData: r } = t, { cameraImageUrl: a } = t, { extraObjects: l = [] } = t, c = 0, h = 0, f = 0, u = 0, m = 0, g = 0;
|
|
5040
|
+
function v(y) {
|
|
5041
|
+
e(10, h = n.work.observers[y].floorIndex);
|
|
5042
5042
|
}
|
|
5043
|
-
Lt(() => (n.on("panoArrived",
|
|
5044
|
-
n.off("panoArrived",
|
|
5043
|
+
Lt(() => (n.on("panoArrived", v), () => {
|
|
5044
|
+
n.off("panoArrived", v);
|
|
5045
5045
|
}));
|
|
5046
|
-
function
|
|
5046
|
+
function b() {
|
|
5047
5047
|
f = this.clientWidth, u = this.clientHeight, e(6, f), e(7, u);
|
|
5048
5048
|
}
|
|
5049
|
-
return i.$$set = (
|
|
5050
|
-
"five" in
|
|
5049
|
+
return i.$$set = (y) => {
|
|
5050
|
+
"five" in y && e(0, n = y.five), "visible" in y && e(1, o = y.visible), "hoverEnable" in y && e(2, s = y.hoverEnable), "floorplanData" in y && e(3, r = y.floorplanData), "cameraImageUrl" in y && e(4, a = y.cameraImageUrl), "extraObjects" in y && e(5, l = y.extraObjects);
|
|
5051
5051
|
}, i.$$.update = () => {
|
|
5052
5052
|
if (i.$$.dirty & 456) {
|
|
5053
|
-
const
|
|
5054
|
-
return
|
|
5053
|
+
const y = Math.min(f, u), { max: P, min: E } = r.bounding, z = P.x - E.x, D = P.y - E.y, I = function() {
|
|
5054
|
+
return z > D ? [y, y / z * D] : [y / D * z, y];
|
|
5055
5055
|
}();
|
|
5056
|
-
e(8, m = I[0]), e(11,
|
|
5056
|
+
e(8, m = I[0]), e(11, g = I[1]), e(9, c = m / z);
|
|
5057
5057
|
}
|
|
5058
5058
|
}, [
|
|
5059
5059
|
n,
|
|
@@ -5067,8 +5067,8 @@ function fh(i, t, e) {
|
|
|
5067
5067
|
m,
|
|
5068
5068
|
c,
|
|
5069
5069
|
h,
|
|
5070
|
-
|
|
5071
|
-
|
|
5070
|
+
g,
|
|
5071
|
+
b
|
|
5072
5072
|
];
|
|
5073
5073
|
}
|
|
5074
5074
|
class mh extends de {
|
|
@@ -5336,23 +5336,23 @@ const jf = (i, t) => {
|
|
|
5336
5336
|
const u = (f == null ? void 0 : f.fbx_url) || e, m = (K = f == null ? void 0 : f.north_rad) != null ? K : n;
|
|
5337
5337
|
if (typeof m != "number")
|
|
5338
5338
|
throw new Error('"northRad"\u914D\u7F6E\u53C2\u6570\u7F3A\u5931\uFF1A\u672A\u914D\u7F6E\u6307\u5357\u9488\u6307\u5411\uFF01');
|
|
5339
|
-
const
|
|
5339
|
+
const g = i.model.bounding, v = g.max.x - g.min.x, b = g.max.z - g.min.z, y = Math.max(v, b), E = await new Os().loadAsync(u);
|
|
5340
5340
|
er(E, {
|
|
5341
5341
|
transparent: !0,
|
|
5342
5342
|
side: j.DoubleSide,
|
|
5343
5343
|
blending: j.AdditiveBlending
|
|
5344
5344
|
});
|
|
5345
|
-
const
|
|
5345
|
+
const z = [0, m - Math.PI / 2, 0], {
|
|
5346
5346
|
model: {
|
|
5347
5347
|
bounding: {
|
|
5348
|
-
max: { x:
|
|
5349
|
-
min: { x:
|
|
5348
|
+
max: { x: D, z: I },
|
|
5349
|
+
min: { x: T, y: C, z: M }
|
|
5350
5350
|
}
|
|
5351
5351
|
}
|
|
5352
5352
|
} = i;
|
|
5353
|
-
o.yBase =
|
|
5354
|
-
const N = { x: (
|
|
5355
|
-
return gh(E, { position: N, rotation:
|
|
5353
|
+
o.yBase = C;
|
|
5354
|
+
const N = { x: (D + T) / 2, y: C - 1.6, z: (I + M) / 2 }, B = 45e-4 * y;
|
|
5355
|
+
return gh(E, { position: N, rotation: z, scale: B }), o.object = E, !0;
|
|
5356
5356
|
}, r = ({ latitude: f }) => {
|
|
5357
5357
|
if (!o.object)
|
|
5358
5358
|
return;
|
|
@@ -5384,56 +5384,56 @@ function vh(i, t) {
|
|
|
5384
5384
|
return l.fillStyle = o, l.fillRect(0, 0, e, e), l.font = `${n}px "\u5FAE\u8F6F\u96C5\u9ED1"`, l.textAlign = r, l.fillStyle = s, l.fillText(i, e / 2, e * 0.7), new Ur(a);
|
|
5385
5385
|
}
|
|
5386
5386
|
const bh = ({ x: i, y: t, z: e }) => new $(i, t, e), Of = (i, t) => {
|
|
5387
|
-
var
|
|
5388
|
-
const e = {}, n = (
|
|
5389
|
-
var M, N, B, K,
|
|
5390
|
-
const E = (M =
|
|
5387
|
+
var v, b, y;
|
|
5388
|
+
const e = {}, n = (v = t.animationEnabled) != null ? v : !0, o = (b = t.position) != null ? b : void 0, s = (y = t.rad) != null ? y : void 0, r = t.fbx_url || "//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx", a = [], l = async (P) => {
|
|
5389
|
+
var M, N, B, K, k, J, R;
|
|
5390
|
+
const E = (M = P == null ? void 0 : P.position) != null ? M : o;
|
|
5391
5391
|
if (!E)
|
|
5392
5392
|
return Promise.reject("ModelEntryDoorGuidePlugin.load(): position is undefined");
|
|
5393
|
-
const
|
|
5394
|
-
if (e.rad =
|
|
5395
|
-
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${
|
|
5396
|
-
const
|
|
5397
|
-
|
|
5398
|
-
const
|
|
5399
|
-
return
|
|
5393
|
+
const z = bh(E), D = (N = P == null ? void 0 : P.rad) != null ? N : s, I = (B = P == null ? void 0 : P.fbx_url) != null ? B : r;
|
|
5394
|
+
if (e.rad = D, D === void 0)
|
|
5395
|
+
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${D}`);
|
|
5396
|
+
const T = await new Os().loadAsync(I);
|
|
5397
|
+
T.position.copy(z), T.rotation.z = D, T.scale.set(0.8, 0.8, 0.8), er(T, { transparent: !0, side: j.DoubleSide });
|
|
5398
|
+
const C = (R = (J = (k = (K = T.children) == null ? void 0 : K[0]) == null ? void 0 : k.children) == null ? void 0 : J[3]) == null ? void 0 : R.clone();
|
|
5399
|
+
return C ? (C.material = new sn({ transparent: !0, map: vh("\u5165\u6237\u95E8") }), C.renderOrder = 3, T.children[0].add(C), e.object = T, !0) : Promise.reject(`ModelEntryDoorGuidePlugin.load(): textMesh is ${C}`);
|
|
5400
5400
|
}, c = () => {
|
|
5401
5401
|
if (e.animation)
|
|
5402
5402
|
return;
|
|
5403
5403
|
if (!e.object)
|
|
5404
5404
|
return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ", e.object);
|
|
5405
|
-
const
|
|
5405
|
+
const P = 1, E = new Vr(e.object);
|
|
5406
5406
|
a.push(E);
|
|
5407
|
-
const
|
|
5408
|
-
|
|
5409
|
-
let
|
|
5407
|
+
const z = E.clipAction(e.object.animations[0]);
|
|
5408
|
+
z.timeScale = P;
|
|
5409
|
+
let D;
|
|
5410
5410
|
const I = () => {
|
|
5411
5411
|
let N = 0, B = 0;
|
|
5412
|
-
const K = 1e3 / 30,
|
|
5413
|
-
N = requestAnimationFrame(
|
|
5412
|
+
const K = 1e3 / 30, k = (J) => {
|
|
5413
|
+
N = requestAnimationFrame(k);
|
|
5414
5414
|
const R = J - B;
|
|
5415
5415
|
R < K || (B = J, a.forEach((_) => _.update(R / 1e3)), i.needsRender = !0);
|
|
5416
5416
|
};
|
|
5417
|
-
return N = requestAnimationFrame(
|
|
5417
|
+
return N = requestAnimationFrame(k), () => {
|
|
5418
5418
|
cancelAnimationFrame(N);
|
|
5419
5419
|
};
|
|
5420
5420
|
}, M = { play: () => {
|
|
5421
|
-
|
|
5421
|
+
D || (z.play(), D = I(), requestAnimationFrame(() => {
|
|
5422
5422
|
e.object && e.object.rotation.z !== e.rad && (e.object.rotation.z = e.rad);
|
|
5423
5423
|
}));
|
|
5424
5424
|
}, stop: () => {
|
|
5425
|
-
|
|
5425
|
+
z.stop(), D == null || D(), D = void 0;
|
|
5426
5426
|
} };
|
|
5427
5427
|
e.animation = M;
|
|
5428
|
-
}, h = (
|
|
5429
|
-
var
|
|
5428
|
+
}, h = (P) => {
|
|
5429
|
+
var z;
|
|
5430
5430
|
if (!e.object)
|
|
5431
5431
|
return console.error("ModelEntryDoorGuidePlugin.enable(): object is ", e.object);
|
|
5432
|
-
((
|
|
5432
|
+
((z = P == null ? void 0 : P.animationEnable) != null ? z : n) && (e.animation || c(), e.animation.play()), i.scene.add(e.object), i.needsRender = !0;
|
|
5433
5433
|
}, f = () => {
|
|
5434
5434
|
!e.object || (e.animation && e.animation.stop(), i.scene.remove(e.object), i.needsRender = !0);
|
|
5435
|
-
}, u = (
|
|
5436
|
-
return { load: l, enable: (
|
|
5435
|
+
}, u = (P) => P === "Floorplan" ? h() : f();
|
|
5436
|
+
return { load: l, enable: (P) => (e.enabled || (e.enabled = !0, u(i.currentMode), i.on("modeChange", u), h(P)), !0), disable: () => (e.enabled && (e.enabled = !1, f(), i.off("modeChange", u)), !0) };
|
|
5437
5437
|
}, Yn = window.requestAnimationFrame || ((i) => setTimeout(i, 16)), Ah = window.cancelAnimationFrame || clearTimeout;
|
|
5438
5438
|
function Wi(i, t = 0) {
|
|
5439
5439
|
t <= 0 ? Yn(i) : Yn(() => Wi(i, t - 1));
|
|
@@ -5525,16 +5525,16 @@ const Ci = (i, t, e) => {
|
|
|
5525
5525
|
})), a.asyncEndCallback && await a.asyncEndCallback();
|
|
5526
5526
|
const { from: l, to: c } = n(s);
|
|
5527
5527
|
return await new Promise((h) => {
|
|
5528
|
-
const f = ({ progress:
|
|
5529
|
-
const
|
|
5530
|
-
|
|
5528
|
+
const f = ({ progress: b }) => {
|
|
5529
|
+
const y = {};
|
|
5530
|
+
y.longitude = vi(l.longitude, c.longitude, b), y.latitude = vi(l.latitude, c.latitude, b), y.fov = vi(l.fov, c.fov, b), i.setState(y, !0);
|
|
5531
5531
|
}, u = () => {
|
|
5532
5532
|
h(!0);
|
|
5533
5533
|
}, m = () => {
|
|
5534
5534
|
h(!1);
|
|
5535
|
-
},
|
|
5536
|
-
s.rotation === ht.Loop &&
|
|
5537
|
-
|
|
5535
|
+
}, g = s.rotateSpeed ? Math.ceil(Math.abs(c.longitude - l.longitude) / s.rotateSpeed * 1e3) : r, v = wh(g, zi.Easing.Linear.None).onUpdate(f).onComplete(u).onDestroy(m);
|
|
5536
|
+
s.rotation === ht.Loop && v.repeat(1 / 0).yoyo(!0), t.interruptCallback = (b = !0) => {
|
|
5537
|
+
v.destroy(), t.interruptCallback = void 0, t.timeoutId && (clearTimeout(t.timeoutId), t.timeoutId = void 0), h(b);
|
|
5538
5538
|
}, t.timeoutId = setTimeout(() => {
|
|
5539
5539
|
t.interruptCallback && t.interruptCallback(!0);
|
|
5540
5540
|
}, r);
|
|
@@ -5698,18 +5698,18 @@ const xh = `<style type="text/css">
|
|
|
5698
5698
|
enable: !1,
|
|
5699
5699
|
loaded: !1,
|
|
5700
5700
|
options: t.options || {
|
|
5701
|
-
distanceText: (
|
|
5701
|
+
distanceText: (v) => `${v.toFixed(1)}m`
|
|
5702
5702
|
}
|
|
5703
|
-
}, n = (
|
|
5704
|
-
const
|
|
5703
|
+
}, n = (v, b) => {
|
|
5704
|
+
const y = `
|
|
5705
5705
|
<div class="PanoRulerPlugin-rule-line">
|
|
5706
5706
|
<em></em>
|
|
5707
5707
|
<div class="PanoRulerPlugin-rule-label">
|
|
5708
|
-
<div class="PanoRulerPlugin-rule-label-name">${e.options.distanceText(
|
|
5708
|
+
<div class="PanoRulerPlugin-rule-label-name">${e.options.distanceText(b)}</div>
|
|
5709
5709
|
</div>
|
|
5710
5710
|
</div>
|
|
5711
|
-
`,
|
|
5712
|
-
return
|
|
5711
|
+
`, P = document.createElement("div");
|
|
5712
|
+
return P.setAttribute("class", "PanoRulerPlugin-rule"), P.setAttribute("data-name", v), P.setAttribute("style", "display: none"), P.innerHTML = y, P;
|
|
5713
5713
|
}, o = document.createElement("div");
|
|
5714
5714
|
o.setAttribute(
|
|
5715
5715
|
"style",
|
|
@@ -5717,107 +5717,107 @@ const xh = `<style type="text/css">
|
|
|
5717
5717
|
);
|
|
5718
5718
|
const s = document.createElement("div");
|
|
5719
5719
|
s.innerHTML = xh, o.appendChild(s);
|
|
5720
|
-
const r = {}, a = (
|
|
5720
|
+
const r = {}, a = (v, b) => {
|
|
5721
5721
|
if (e.loaded)
|
|
5722
5722
|
throw new Error("\u6807\u5C3A\u88AB\u91CD\u590D\u521D\u59CB\u5316\uFF01");
|
|
5723
|
-
const
|
|
5724
|
-
if (!
|
|
5723
|
+
const y = Lh(v, i), P = i.work;
|
|
5724
|
+
if (!P)
|
|
5725
5725
|
return !1;
|
|
5726
|
-
for (const E in
|
|
5727
|
-
const
|
|
5728
|
-
const N = M.length > 0 ?
|
|
5729
|
-
let K = 1 / 0,
|
|
5726
|
+
for (const E in b) {
|
|
5727
|
+
const z = b[E], { standingPosition: D } = P.observers[0], I = z.map(({ x: T, z: C, observers: M }) => {
|
|
5728
|
+
const N = M.length > 0 ? v.rooms[v.observers[M[0]]].name : "", B = y[N] ? y[N].floor : null;
|
|
5729
|
+
let K = 1 / 0, k = {
|
|
5730
5730
|
index: 0,
|
|
5731
|
-
x:
|
|
5732
|
-
y:
|
|
5733
|
-
z:
|
|
5731
|
+
x: D.x,
|
|
5732
|
+
y: D.y,
|
|
5733
|
+
z: D.z
|
|
5734
5734
|
};
|
|
5735
5735
|
M.forEach((Q) => {
|
|
5736
|
-
if (!
|
|
5736
|
+
if (!P.observers[Q])
|
|
5737
5737
|
return;
|
|
5738
|
-
const { standingPosition: ee } =
|
|
5738
|
+
const { standingPosition: ee } = P.observers[Q], se = {
|
|
5739
5739
|
index: Q,
|
|
5740
5740
|
x: ee.x,
|
|
5741
5741
|
y: ee.y,
|
|
5742
5742
|
z: ee.z
|
|
5743
|
-
}, ie = Ch({ x:
|
|
5744
|
-
B ? ie < K && Math.abs(se.y - B) < 0.3 && (K = ie,
|
|
5743
|
+
}, ie = Ch({ x: T, z: C }, se);
|
|
5744
|
+
B ? ie < K && Math.abs(se.y - B) < 0.3 && (K = ie, k = se) : ie < K && (K = ie, k = se);
|
|
5745
5745
|
});
|
|
5746
|
-
const J = new $(
|
|
5746
|
+
const J = new $(T, k.y, C);
|
|
5747
5747
|
Object.assign(J, { observers: M });
|
|
5748
|
-
const R =
|
|
5748
|
+
const R = y[N] ? y[N].roof : null, _ = R ? new $(T, R, C) : null;
|
|
5749
5749
|
return _ && Object.assign(_, { observers: M }), { origin: J, vertical: _ };
|
|
5750
5750
|
});
|
|
5751
5751
|
r[E] = {
|
|
5752
|
-
origins: I.map((
|
|
5752
|
+
origins: I.map((T) => T.origin),
|
|
5753
5753
|
rules: []
|
|
5754
5754
|
};
|
|
5755
|
-
for (const { origin:
|
|
5756
|
-
if (!
|
|
5755
|
+
for (const { origin: T, vertical: C } of I) {
|
|
5756
|
+
if (!C)
|
|
5757
5757
|
continue;
|
|
5758
|
-
const M = n(E,
|
|
5759
|
-
o.append(M), r[E].rules.push({ vertical: !0, rule: [
|
|
5758
|
+
const M = n(E, T.distanceTo(C));
|
|
5759
|
+
o.append(M), r[E].rules.push({ vertical: !0, rule: [T, C], $element: M });
|
|
5760
5760
|
}
|
|
5761
|
-
for (let
|
|
5762
|
-
let
|
|
5763
|
-
|
|
5764
|
-
const { origin: M } = I[
|
|
5761
|
+
for (let T = 0; T < I.length; T++) {
|
|
5762
|
+
let C = T + 1;
|
|
5763
|
+
C >= I.length && (C = 0);
|
|
5764
|
+
const { origin: M } = I[T], { origin: N } = I[C], B = n(E, M.distanceTo(N));
|
|
5765
5765
|
o.append(B), r[E].rules.push({ vertical: !1, rule: [M, N], $element: B });
|
|
5766
5766
|
}
|
|
5767
5767
|
}
|
|
5768
5768
|
return e.loaded = !0, !0;
|
|
5769
|
-
}, l = async (
|
|
5770
|
-
const
|
|
5771
|
-
if (!
|
|
5769
|
+
}, l = async (v, b, y) => {
|
|
5770
|
+
const P = v || t.roomInfo, E = b || t.roomRules;
|
|
5771
|
+
if (!P || !E)
|
|
5772
5772
|
throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");
|
|
5773
|
-
return e.loaded = !1, e.options = { ...e.options, ...
|
|
5774
|
-
(
|
|
5773
|
+
return e.loaded = !1, e.options = { ...e.options, ...y || {} }, i.model.loaded ? a(P, E) : await new Promise(
|
|
5774
|
+
(z) => i.once("modelLoaded", () => z(a(P, E)))
|
|
5775
5775
|
);
|
|
5776
5776
|
};
|
|
5777
5777
|
t.roomInfo && t.roomRules && l(t.roomInfo, t.roomRules);
|
|
5778
|
-
const c = (
|
|
5778
|
+
const c = (v, b, y, P) => {
|
|
5779
5779
|
const E = [
|
|
5780
5780
|
[
|
|
5781
5781
|
{ x: 0, y: 0 },
|
|
5782
|
-
{ x:
|
|
5782
|
+
{ x: y, y: 0 }
|
|
5783
5783
|
],
|
|
5784
5784
|
[
|
|
5785
5785
|
{ x: 0, y: 0 },
|
|
5786
|
-
{ x: 0, y:
|
|
5786
|
+
{ x: 0, y: P }
|
|
5787
5787
|
],
|
|
5788
5788
|
[
|
|
5789
|
-
{ x:
|
|
5790
|
-
{ x:
|
|
5789
|
+
{ x: y, y: 0 },
|
|
5790
|
+
{ x: y, y: P }
|
|
5791
5791
|
],
|
|
5792
5792
|
[
|
|
5793
|
-
{ x: 0, y:
|
|
5794
|
-
{ x:
|
|
5793
|
+
{ x: 0, y: P },
|
|
5794
|
+
{ x: y, y: P }
|
|
5795
5795
|
]
|
|
5796
|
-
],
|
|
5797
|
-
for (let
|
|
5798
|
-
const I = nr([
|
|
5799
|
-
I &&
|
|
5796
|
+
], z = [];
|
|
5797
|
+
for (let D = 0; D < E.length; D++) {
|
|
5798
|
+
const I = nr([v, b], [E[D][0], E[D][1]], !0);
|
|
5799
|
+
I && z.push(I);
|
|
5800
5800
|
}
|
|
5801
|
-
return
|
|
5801
|
+
return z.length === 0 ? !1 : z;
|
|
5802
5802
|
}, h = () => {
|
|
5803
5803
|
var M;
|
|
5804
|
-
const
|
|
5805
|
-
if (!
|
|
5804
|
+
const v = (M = i.getElement()) == null ? void 0 : M.parentElement;
|
|
5805
|
+
if (!v || !e.loaded || Object.keys(r).length <= 0)
|
|
5806
5806
|
return;
|
|
5807
|
-
const { panoIndex:
|
|
5808
|
-
if (
|
|
5807
|
+
const { panoIndex: b, camera: y, currentMode: P } = i;
|
|
5808
|
+
if (b === void 0)
|
|
5809
5809
|
return;
|
|
5810
5810
|
let E;
|
|
5811
5811
|
for (const N in r)
|
|
5812
|
-
N.split(",").indexOf(
|
|
5812
|
+
N.split(",").indexOf(b.toString()) >= 0 && (E = N);
|
|
5813
5813
|
if (!E) {
|
|
5814
5814
|
for (const N in r)
|
|
5815
5815
|
for (const { $element: B } of r[N].rules)
|
|
5816
5816
|
B.style.display = "none";
|
|
5817
5817
|
return;
|
|
5818
5818
|
}
|
|
5819
|
-
const
|
|
5820
|
-
if (
|
|
5819
|
+
const z = y.position, D = y.getWorldDirection(new $()), I = v.clientWidth, T = v.clientHeight;
|
|
5820
|
+
if (P !== Se.Mode.Panorama) {
|
|
5821
5821
|
for (const N in r)
|
|
5822
5822
|
for (const { $element: B } of r[N].rules)
|
|
5823
5823
|
B.style.display = "none";
|
|
@@ -5826,50 +5826,50 @@ const xh = `<style type="text/css">
|
|
|
5826
5826
|
for (const N in r)
|
|
5827
5827
|
for (const { $element: B } of r[N].rules)
|
|
5828
5828
|
B.style.display = N === E ? "block" : "none";
|
|
5829
|
-
const [
|
|
5830
|
-
const K = N.clone().setY(0).sub(
|
|
5831
|
-
return K -
|
|
5829
|
+
const [C] = r[E].origins.slice().filter((N) => N.observers.indexOf(b) >= 0).sort((N, B) => {
|
|
5830
|
+
const K = N.clone().setY(0).sub(z).normalize().angleTo(D.clone().setY(0)), k = B.clone().setY(0).sub(z).normalize().angleTo(D.clone().setY(0));
|
|
5831
|
+
return K - k;
|
|
5832
5832
|
});
|
|
5833
5833
|
for (const { rule: N, vertical: B, $element: K } of r[E].rules) {
|
|
5834
|
-
const [
|
|
5834
|
+
const [k, J] = N, R = K.querySelector(".PanoRulerPlugin-rule-line");
|
|
5835
5835
|
if (!R)
|
|
5836
5836
|
return;
|
|
5837
|
-
if (!
|
|
5837
|
+
if (!C) {
|
|
5838
5838
|
K.style.display = "none";
|
|
5839
5839
|
continue;
|
|
5840
5840
|
}
|
|
5841
|
-
if (
|
|
5841
|
+
if (k !== C && J !== C) {
|
|
5842
5842
|
K.style.display = "none";
|
|
5843
5843
|
continue;
|
|
5844
5844
|
}
|
|
5845
|
-
if (
|
|
5845
|
+
if (k.distanceTo(J) < 0.3) {
|
|
5846
5846
|
K.style.display = "none";
|
|
5847
5847
|
continue;
|
|
5848
5848
|
}
|
|
5849
|
-
if (
|
|
5849
|
+
if (k.observers.indexOf(b) === -1 || J.observers.indexOf(b) === -1) {
|
|
5850
5850
|
K.style.display = "none";
|
|
5851
5851
|
continue;
|
|
5852
5852
|
}
|
|
5853
|
-
if (
|
|
5853
|
+
if (k.clone().sub(z).normalize().angleTo(D) > Math.PI / 2) {
|
|
5854
5854
|
K.style.display = "none";
|
|
5855
5855
|
continue;
|
|
5856
5856
|
}
|
|
5857
|
-
if (J.clone().sub(
|
|
5857
|
+
if (J.clone().sub(z).normalize().angleTo(D) > Math.PI / 2) {
|
|
5858
5858
|
K.style.display = "none";
|
|
5859
5859
|
continue;
|
|
5860
5860
|
}
|
|
5861
|
-
const te =
|
|
5862
|
-
if (J.clone().sub(J.clone().sub(
|
|
5861
|
+
const te = k.distanceTo(J);
|
|
5862
|
+
if (J.clone().sub(J.clone().sub(k).divide(new $(2, 2, 2))).distanceTo(z) / te > 8) {
|
|
5863
5863
|
K.style.display = "none";
|
|
5864
5864
|
continue;
|
|
5865
5865
|
}
|
|
5866
|
-
const se =
|
|
5866
|
+
const se = k.clone().project(y), ie = (se.x + 1) / 2 * I, ce = (-se.y + 1) / 2 * T, Ae = J.clone().project(y), xe = (Ae.x + 1) / 2 * I, ze = (-Ae.y + 1) / 2 * T, Y = Math.sqrt(Math.pow(xe - ie, 2) + Math.pow(ze - ce, 2));
|
|
5867
5867
|
let re = Y, oe = 50;
|
|
5868
5868
|
const V = c({ x: ~~ie, y: ~~ce }, {
|
|
5869
5869
|
x: ~~xe,
|
|
5870
5870
|
y: ~~ze
|
|
5871
|
-
}, I,
|
|
5872
|
-
if (V && V.length === 1 && (
|
|
5871
|
+
}, I, T);
|
|
5872
|
+
if (V && V.length === 1 && (C === k ? (re = Math.sqrt(Math.pow(V[0].x - ie, 2) + Math.pow(V[0].y - ce, 2)), oe = re / Y * 50) : C === J && (re = Math.sqrt(Math.pow(V[0].x - xe, 2) + Math.pow(V[0].y - ze, 2)), oe = 100 - re / Y * 50)), V && V.length === 2) {
|
|
5873
5873
|
const Fe = {
|
|
5874
5874
|
x: (V[0].x + V[1].x) / 2,
|
|
5875
5875
|
y: (V[0].y + V[1].y) / 2
|
|
@@ -5882,16 +5882,16 @@ const xh = `<style type="text/css">
|
|
|
5882
5882
|
He >= Y || He / 2 >= oe / 100 * Y || He / 2 >= (1 - oe / 100) * Y ? R.style.display = "none" : (R.style.display = "block", R.style.width = Y + "px", R.style.left = ie + "px", R.style.top = ce + "px", R.style.transform = `rotate(${-We}deg)`, le.style.left = `${oe}%`);
|
|
5883
5883
|
}
|
|
5884
5884
|
}, f = () => ir(h), u = () => {
|
|
5885
|
-
var
|
|
5886
|
-
return e.loaded ? (e.enable || (o.setAttribute("class", "PanoRulerPlugin" + (e.options.className ? " " + e.options.className : "")), (
|
|
5885
|
+
var v, b;
|
|
5886
|
+
return e.loaded ? (e.enable || (o.setAttribute("class", "PanoRulerPlugin" + (e.options.className ? " " + e.options.className : "")), (b = (v = i.getElement()) == null ? void 0 : v.parentElement) == null || b.append(o), h(), i.on("modeChange", h), i.on("cameraUpdate", f), e.enable = !0), !0) : !1;
|
|
5887
5887
|
}, m = () => (e.enable && (i.off("modeChange", h), i.off("cameraUpdate", f), o && o.remove(), e.enable = !1), !0);
|
|
5888
|
-
function v
|
|
5889
|
-
if (
|
|
5890
|
-
const
|
|
5891
|
-
e.options.distanceText =
|
|
5892
|
-
|
|
5893
|
-
const [E,
|
|
5894
|
-
!I || (I.innerText =
|
|
5888
|
+
function g(v) {
|
|
5889
|
+
if (v.distanceText && v.distanceText !== e.options.distanceText) {
|
|
5890
|
+
const b = v.distanceText;
|
|
5891
|
+
e.options.distanceText = b, Object.values(r).forEach((y) => {
|
|
5892
|
+
y.rules.forEach((P) => {
|
|
5893
|
+
const [E, z] = P.rule, D = E.distanceTo(z), I = P.$element.querySelector(".PanoRulerPlugin-rule-label-name");
|
|
5894
|
+
!I || (I.innerText = b(D));
|
|
5895
5895
|
});
|
|
5896
5896
|
});
|
|
5897
5897
|
}
|
|
@@ -5901,7 +5901,7 @@ const xh = `<style type="text/css">
|
|
|
5901
5901
|
disable: m,
|
|
5902
5902
|
load: l,
|
|
5903
5903
|
state: e,
|
|
5904
|
-
changeConfigs:
|
|
5904
|
+
changeConfigs: g
|
|
5905
5905
|
};
|
|
5906
5906
|
};
|
|
5907
5907
|
function kh(i) {
|
|
@@ -5981,24 +5981,24 @@ function es(i) {
|
|
|
5981
5981
|
}
|
|
5982
5982
|
function zh(i) {
|
|
5983
5983
|
let t, e, n, o, s = i[0].labelElement + "", r, a, l = `${i[0].labelOffset}%`, c = `${i[0].width}px`, h = `${i[0].left}px`, f = `${i[0].top}px`, u = `rotate(${i[0].rotateDeg}deg)`;
|
|
5984
|
-
function m(
|
|
5985
|
-
return
|
|
5984
|
+
function m(b, y) {
|
|
5985
|
+
return b[0].children.length === 0 ? Dh : Th;
|
|
5986
5986
|
}
|
|
5987
|
-
let
|
|
5987
|
+
let g = m(i), v = g(i);
|
|
5988
5988
|
return {
|
|
5989
5989
|
c() {
|
|
5990
|
-
t = F("div"),
|
|
5990
|
+
t = F("div"), v.c(), e = fe(), n = F("div"), o = F("div"), r = qe(s), x(o, "class", "PanoRulerPlugin-rule-label-name svelte-1h27ktp"), _e(() => i[4].call(o)), x(n, "class", "PanoRulerPlugin-rule-label svelte-1h27ktp"), S(n, "left", l), x(t, "class", "PanoRulerPlugin-rule-line svelte-1h27ktp"), S(t, "width", c), S(t, "left", h), S(t, "top", f), S(t, "transform", u), S(t, "display", i[0].visible && i[2] ? "block" : "none");
|
|
5991
5991
|
},
|
|
5992
|
-
m(
|
|
5993
|
-
W(
|
|
5992
|
+
m(b, y) {
|
|
5993
|
+
W(b, t, y), v.m(t, null), G(t, e), G(t, n), G(n, o), G(o, r), a = Xt(o, i[4].bind(o));
|
|
5994
5994
|
},
|
|
5995
|
-
p(
|
|
5996
|
-
|
|
5995
|
+
p(b, [y]) {
|
|
5996
|
+
g === (g = m(b)) && v ? v.p(b, y) : (v.d(1), v = g(b), v && (v.c(), v.m(t, e))), y & 1 && s !== (s = b[0].labelElement + "") && dt(r, s), y & 1 && l !== (l = `${b[0].labelOffset}%`) && S(n, "left", l), y & 1 && c !== (c = `${b[0].width}px`) && S(t, "width", c), y & 1 && h !== (h = `${b[0].left}px`) && S(t, "left", h), y & 1 && f !== (f = `${b[0].top}px`) && S(t, "top", f), y & 1 && u !== (u = `rotate(${b[0].rotateDeg}deg)`) && S(t, "transform", u), y & 5 && S(t, "display", b[0].visible && b[2] ? "block" : "none");
|
|
5997
5997
|
},
|
|
5998
5998
|
i: ne,
|
|
5999
5999
|
o: ne,
|
|
6000
|
-
d(
|
|
6001
|
-
|
|
6000
|
+
d(b) {
|
|
6001
|
+
b && X(t), v.d(), a();
|
|
6002
6002
|
}
|
|
6003
6003
|
};
|
|
6004
6004
|
}
|
|
@@ -6101,42 +6101,42 @@ function jh(i) {
|
|
|
6101
6101
|
function Oh(i, t, e) {
|
|
6102
6102
|
var n, o, s, r;
|
|
6103
6103
|
let { five: a } = t, { rulerDatas: l } = t, { options: c } = t, h = [];
|
|
6104
|
-
const f = ((o = (n = a.getElement()) === null || n === void 0 ? void 0 : n.parentElement) === null || o === void 0 ? void 0 : o.clientWidth) || 0, u = ((r = (s = a.getElement()) === null || s === void 0 ? void 0 : s.parentElement) === null || r === void 0 ? void 0 : r.clientHeight) || 0, m = (E,
|
|
6105
|
-
const
|
|
6104
|
+
const f = ((o = (n = a.getElement()) === null || n === void 0 ? void 0 : n.parentElement) === null || o === void 0 ? void 0 : o.clientWidth) || 0, u = ((r = (s = a.getElement()) === null || s === void 0 ? void 0 : s.parentElement) === null || r === void 0 ? void 0 : r.clientHeight) || 0, m = (E, z) => {
|
|
6105
|
+
const D = [
|
|
6106
6106
|
[{ x: 0, y: 0 }, { x: f, y: 0 }],
|
|
6107
6107
|
[{ x: 0, y: 0 }, { x: 0, y: u }],
|
|
6108
6108
|
[{ x: f, y: 0 }, { x: f, y: u }],
|
|
6109
6109
|
[{ x: 0, y: u }, { x: f, y: u }]
|
|
6110
6110
|
], I = [];
|
|
6111
|
-
for (let
|
|
6112
|
-
const
|
|
6113
|
-
|
|
6111
|
+
for (let T = 0; T < D.length; T++) {
|
|
6112
|
+
const C = nr([E, z], [D[T][0], D[T][1]], !0);
|
|
6113
|
+
C && I.push(C);
|
|
6114
6114
|
}
|
|
6115
6115
|
return I.length === 0 ? !1 : I;
|
|
6116
|
-
},
|
|
6117
|
-
const
|
|
6116
|
+
}, g = (E, z) => {
|
|
6117
|
+
const D = E.clone().project(a.camera), I = (D.x + 1) / 2 * f, T = (-D.y + 1) / 2 * u, C = z.clone().project(a.camera), M = (C.x + 1) / 2 * f, N = (-C.y + 1) / 2 * u, B = Math.sqrt(Math.pow(M - I, 2) + Math.pow(N - T, 2));
|
|
6118
6118
|
return {
|
|
6119
6119
|
startLeft: I,
|
|
6120
|
-
startTop:
|
|
6120
|
+
startTop: T,
|
|
6121
6121
|
endLeft: M,
|
|
6122
6122
|
endTop: N,
|
|
6123
6123
|
distance: B
|
|
6124
6124
|
};
|
|
6125
|
-
},
|
|
6126
|
-
const I = a.camera.position,
|
|
6125
|
+
}, v = (E, z, D) => {
|
|
6126
|
+
const I = a.camera.position, T = a.camera.getWorldDirection(new $()), C = E.clone().sub(I).normalize().angleTo(T), M = z.clone().sub(I).normalize().angleTo(T), N = E.distanceTo(z), K = z.clone().sub(z.clone().sub(E).divide(new $(2, 2, 2))).distanceTo(I), { startLeft: k, startTop: J, endLeft: R, endTop: _, distance: U } = g(E, z), Q = -((Math.PI / 2 - Math.atan2(R - k, J - _)) / Math.PI) * 180;
|
|
6127
6127
|
let ee = !0;
|
|
6128
|
-
|
|
6128
|
+
D || (ee = !1), !nt(E, D) && !nt(z, D) && (ee = !1), N < 0.3 && (ee = !1), C > Math.PI / 2 && (ee = !1), M > Math.PI / 2 && (ee = !1), K / N > 8 && (ee = !1);
|
|
6129
6129
|
let se = 50, ie = U;
|
|
6130
|
-
const ce = m({ x: ~~
|
|
6131
|
-
if (ce && ce.length === 1 && (nt(E,
|
|
6130
|
+
const ce = m({ x: ~~k, y: ~~J }, { x: ~~R, y: ~~_ });
|
|
6131
|
+
if (ce && ce.length === 1 && (nt(E, D) ? (ie = Math.sqrt(Math.pow(ce[0].x - k, 2) + Math.pow(ce[0].y - J, 2)), se = ie / U * 50) : nt(z, D) && (ie = Math.sqrt(Math.pow(ce[0].x - R, 2) + Math.pow(ce[0].y - _, 2)), se = 100 - ie / U * 50)), ce && ce.length === 2) {
|
|
6132
6132
|
const Ae = {
|
|
6133
6133
|
x: (ce[0].x + ce[1].x) / 2,
|
|
6134
6134
|
y: (ce[0].y + ce[1].y) / 2
|
|
6135
6135
|
};
|
|
6136
|
-
se = Math.sqrt(Math.pow(Ae.x -
|
|
6136
|
+
se = Math.sqrt(Math.pow(Ae.x - k, 2) + Math.pow(Ae.y - J, 2)) / U * 100;
|
|
6137
6137
|
}
|
|
6138
6138
|
return {
|
|
6139
|
-
startLeft:
|
|
6139
|
+
startLeft: k,
|
|
6140
6140
|
startTop: J,
|
|
6141
6141
|
distance: U,
|
|
6142
6142
|
deg: Q,
|
|
@@ -6144,20 +6144,20 @@ function Oh(i, t, e) {
|
|
|
6144
6144
|
labelOffset: se,
|
|
6145
6145
|
ruleLength: N
|
|
6146
6146
|
};
|
|
6147
|
-
},
|
|
6148
|
-
const E = a.panoIndex,
|
|
6149
|
-
if (!
|
|
6147
|
+
}, b = () => {
|
|
6148
|
+
const E = a.panoIndex, z = l.find((B) => B.panoIndex === E);
|
|
6149
|
+
if (!z)
|
|
6150
6150
|
return e(0, h = []);
|
|
6151
6151
|
if (a.currentMode !== Se.Mode.Panorama)
|
|
6152
6152
|
return e(0, h = []);
|
|
6153
|
-
const
|
|
6154
|
-
const
|
|
6155
|
-
return
|
|
6156
|
-
}), N =
|
|
6157
|
-
var K,
|
|
6158
|
-
const J = B.start, R = B.end, { startLeft: _, startTop: U, distance: te, deg: Q, visible: ee, labelOffset: se, ruleLength: ie } =
|
|
6159
|
-
return B.children && ((K = B.children) === null || K === void 0 ? void 0 : K.length) > 0 && ((
|
|
6160
|
-
const xe = Ae.start, ze = Ae.end, { distance: Y } =
|
|
6153
|
+
const D = a.camera.position, I = a.camera.getWorldDirection(new $()), T = z.lines.map((B) => new $(B.start[0], -B.start[1], -B.start[2])), C = z.lines.map((B) => new $(B.end[0], -B.end[1], -B.end[2])), [M] = T.concat(C).sort((B, K) => {
|
|
6154
|
+
const k = B.clone().setY(0).sub(D).normalize().angleTo(I.clone().setY(0)), J = K.clone().setY(0).sub(D).normalize().angleTo(I.clone().setY(0));
|
|
6155
|
+
return k - J;
|
|
6156
|
+
}), N = z.lines.map((B) => {
|
|
6157
|
+
var K, k;
|
|
6158
|
+
const J = B.start, R = B.end, { startLeft: _, startTop: U, distance: te, deg: Q, visible: ee, labelOffset: se, ruleLength: ie } = v(new $(J[0], -J[1], -J[2]), new $(R[0], -R[1], -R[2]), M), ce = [];
|
|
6159
|
+
return B.children && ((K = B.children) === null || K === void 0 ? void 0 : K.length) > 0 && ((k = B.children) === null || k === void 0 || k.forEach((Ae) => {
|
|
6160
|
+
const xe = Ae.start, ze = Ae.end, { distance: Y } = g(new $(xe[0], -xe[1], -xe[2]), new $(ze[0], -ze[1], -ze[2]));
|
|
6161
6161
|
ce.push({ width: Y, state: Ae.state });
|
|
6162
6162
|
})), {
|
|
6163
6163
|
width: te,
|
|
@@ -6172,11 +6172,11 @@ function Oh(i, t, e) {
|
|
|
6172
6172
|
};
|
|
6173
6173
|
});
|
|
6174
6174
|
e(0, h = N);
|
|
6175
|
-
},
|
|
6175
|
+
}, y = () => Wi(b), P = Qi(b, 80);
|
|
6176
6176
|
return Lt(() => {
|
|
6177
|
-
|
|
6177
|
+
b(), a.on("panoArrived", b), a.on("modeChange", b), a.on("cameraDirectionUpdate", y), a.on("movingToPano", y), a.on("mouseWheel", () => P()), a.on("pinchGesture", () => P());
|
|
6178
6178
|
}), ln(() => {
|
|
6179
|
-
a.off("panoArrived",
|
|
6179
|
+
a.off("panoArrived", b), a.off("modeChange", b), a.off("cameraDirectionUpdate", y), a.off("movingToPano", y), a.off("mouseWheel", () => P()), a.off("pinchGesture", () => P());
|
|
6180
6180
|
}), i.$$set = (E) => {
|
|
6181
6181
|
"five" in E && e(1, a = E.five), "rulerDatas" in E && e(2, l = E.rulerDatas), "options" in E && e(3, c = E.options);
|
|
6182
6182
|
}, [h, a, l, c];
|
|
@@ -6478,117 +6478,117 @@ var or = { exports: {} };
|
|
|
6478
6478
|
(function(i) {
|
|
6479
6479
|
(function(t, e, n, o) {
|
|
6480
6480
|
var s = ["", "webkit", "Moz", "MS", "ms", "o"], r = e.createElement("div"), a = "function", l = Math.round, c = Math.abs, h = Date.now;
|
|
6481
|
-
function f(p,
|
|
6482
|
-
return setTimeout(E(p,
|
|
6481
|
+
function f(p, A, w) {
|
|
6482
|
+
return setTimeout(E(p, w), A);
|
|
6483
6483
|
}
|
|
6484
|
-
function u(p,
|
|
6485
|
-
return Array.isArray(p) ? (m(p,
|
|
6484
|
+
function u(p, A, w) {
|
|
6485
|
+
return Array.isArray(p) ? (m(p, w[A], w), !0) : !1;
|
|
6486
6486
|
}
|
|
6487
|
-
function m(p,
|
|
6488
|
-
var
|
|
6487
|
+
function m(p, A, w) {
|
|
6488
|
+
var L;
|
|
6489
6489
|
if (!!p)
|
|
6490
6490
|
if (p.forEach)
|
|
6491
|
-
p.forEach(
|
|
6491
|
+
p.forEach(A, w);
|
|
6492
6492
|
else if (p.length !== o)
|
|
6493
|
-
for (
|
|
6494
|
-
|
|
6493
|
+
for (L = 0; L < p.length; )
|
|
6494
|
+
A.call(w, p[L], L, p), L++;
|
|
6495
6495
|
else
|
|
6496
|
-
for (
|
|
6497
|
-
p.hasOwnProperty(
|
|
6496
|
+
for (L in p)
|
|
6497
|
+
p.hasOwnProperty(L) && A.call(w, p[L], L, p);
|
|
6498
6498
|
}
|
|
6499
|
-
function
|
|
6500
|
-
var
|
|
6501
|
-
` +
|
|
6499
|
+
function g(p, A, w) {
|
|
6500
|
+
var L = "DEPRECATED METHOD: " + A + `
|
|
6501
|
+
` + w + ` AT
|
|
6502
6502
|
`;
|
|
6503
6503
|
return function() {
|
|
6504
6504
|
var O = new Error("get-stack-trace"), Z = O && O.stack ? O.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", ae = t.console && (t.console.warn || t.console.log);
|
|
6505
|
-
return ae && ae.call(t.console,
|
|
6505
|
+
return ae && ae.call(t.console, L, Z), p.apply(this, arguments);
|
|
6506
6506
|
};
|
|
6507
6507
|
}
|
|
6508
|
-
var
|
|
6509
|
-
typeof Object.assign != "function" ?
|
|
6510
|
-
if (
|
|
6508
|
+
var v;
|
|
6509
|
+
typeof Object.assign != "function" ? v = function(A) {
|
|
6510
|
+
if (A === o || A === null)
|
|
6511
6511
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
6512
|
-
for (var
|
|
6513
|
-
var O = arguments[
|
|
6512
|
+
for (var w = Object(A), L = 1; L < arguments.length; L++) {
|
|
6513
|
+
var O = arguments[L];
|
|
6514
6514
|
if (O !== o && O !== null)
|
|
6515
6515
|
for (var Z in O)
|
|
6516
|
-
O.hasOwnProperty(Z) && (
|
|
6516
|
+
O.hasOwnProperty(Z) && (w[Z] = O[Z]);
|
|
6517
6517
|
}
|
|
6518
|
-
return
|
|
6519
|
-
} :
|
|
6520
|
-
var
|
|
6521
|
-
for (var O = Object.keys(
|
|
6522
|
-
(!
|
|
6523
|
-
return
|
|
6524
|
-
}, "extend", "Use `assign`."),
|
|
6525
|
-
return A
|
|
6518
|
+
return w;
|
|
6519
|
+
} : v = Object.assign;
|
|
6520
|
+
var b = g(function(A, w, L) {
|
|
6521
|
+
for (var O = Object.keys(w), Z = 0; Z < O.length; )
|
|
6522
|
+
(!L || L && A[O[Z]] === o) && (A[O[Z]] = w[O[Z]]), Z++;
|
|
6523
|
+
return A;
|
|
6524
|
+
}, "extend", "Use `assign`."), y = g(function(A, w) {
|
|
6525
|
+
return b(A, w, !0);
|
|
6526
6526
|
}, "merge", "Use `assign`.");
|
|
6527
|
-
function
|
|
6528
|
-
var
|
|
6529
|
-
O = p.prototype = Object.create(
|
|
6527
|
+
function P(p, A, w) {
|
|
6528
|
+
var L = A.prototype, O;
|
|
6529
|
+
O = p.prototype = Object.create(L), O.constructor = p, O._super = L, w && v(O, w);
|
|
6530
6530
|
}
|
|
6531
|
-
function E(p,
|
|
6531
|
+
function E(p, A) {
|
|
6532
6532
|
return function() {
|
|
6533
|
-
return p.apply(
|
|
6533
|
+
return p.apply(A, arguments);
|
|
6534
6534
|
};
|
|
6535
6535
|
}
|
|
6536
|
-
function
|
|
6537
|
-
return typeof p == a ? p.apply(
|
|
6536
|
+
function z(p, A) {
|
|
6537
|
+
return typeof p == a ? p.apply(A && A[0] || o, A) : p;
|
|
6538
6538
|
}
|
|
6539
|
-
function
|
|
6540
|
-
return p === o ?
|
|
6539
|
+
function D(p, A) {
|
|
6540
|
+
return p === o ? A : p;
|
|
6541
6541
|
}
|
|
6542
|
-
function I(p,
|
|
6543
|
-
m(N(
|
|
6544
|
-
p.addEventListener(
|
|
6542
|
+
function I(p, A, w) {
|
|
6543
|
+
m(N(A), function(L) {
|
|
6544
|
+
p.addEventListener(L, w, !1);
|
|
6545
6545
|
});
|
|
6546
6546
|
}
|
|
6547
|
-
function
|
|
6548
|
-
m(N(
|
|
6549
|
-
p.removeEventListener(
|
|
6547
|
+
function T(p, A, w) {
|
|
6548
|
+
m(N(A), function(L) {
|
|
6549
|
+
p.removeEventListener(L, w, !1);
|
|
6550
6550
|
});
|
|
6551
6551
|
}
|
|
6552
|
-
function
|
|
6552
|
+
function C(p, A) {
|
|
6553
6553
|
for (; p; ) {
|
|
6554
|
-
if (p ==
|
|
6554
|
+
if (p == A)
|
|
6555
6555
|
return !0;
|
|
6556
6556
|
p = p.parentNode;
|
|
6557
6557
|
}
|
|
6558
6558
|
return !1;
|
|
6559
6559
|
}
|
|
6560
|
-
function M(p,
|
|
6561
|
-
return p.indexOf(
|
|
6560
|
+
function M(p, A) {
|
|
6561
|
+
return p.indexOf(A) > -1;
|
|
6562
6562
|
}
|
|
6563
6563
|
function N(p) {
|
|
6564
6564
|
return p.trim().split(/\s+/g);
|
|
6565
6565
|
}
|
|
6566
|
-
function B(p,
|
|
6567
|
-
if (p.indexOf && !
|
|
6568
|
-
return p.indexOf(
|
|
6569
|
-
for (var
|
|
6570
|
-
if (
|
|
6571
|
-
return
|
|
6572
|
-
|
|
6566
|
+
function B(p, A, w) {
|
|
6567
|
+
if (p.indexOf && !w)
|
|
6568
|
+
return p.indexOf(A);
|
|
6569
|
+
for (var L = 0; L < p.length; ) {
|
|
6570
|
+
if (w && p[L][w] == A || !w && p[L] === A)
|
|
6571
|
+
return L;
|
|
6572
|
+
L++;
|
|
6573
6573
|
}
|
|
6574
6574
|
return -1;
|
|
6575
6575
|
}
|
|
6576
6576
|
function K(p) {
|
|
6577
6577
|
return Array.prototype.slice.call(p, 0);
|
|
6578
6578
|
}
|
|
6579
|
-
function
|
|
6580
|
-
for (var
|
|
6581
|
-
var ae =
|
|
6582
|
-
B(O, ae) < 0 &&
|
|
6579
|
+
function k(p, A, w) {
|
|
6580
|
+
for (var L = [], O = [], Z = 0; Z < p.length; ) {
|
|
6581
|
+
var ae = A ? p[Z][A] : p[Z];
|
|
6582
|
+
B(O, ae) < 0 && L.push(p[Z]), O[Z] = ae, Z++;
|
|
6583
6583
|
}
|
|
6584
|
-
return
|
|
6585
|
-
return De[
|
|
6586
|
-
}) :
|
|
6587
|
-
}
|
|
6588
|
-
function J(p,
|
|
6589
|
-
for (var
|
|
6590
|
-
if (
|
|
6591
|
-
return
|
|
6584
|
+
return w && (A ? L = L.sort(function(De, Ne) {
|
|
6585
|
+
return De[A] > Ne[A];
|
|
6586
|
+
}) : L = L.sort()), L;
|
|
6587
|
+
}
|
|
6588
|
+
function J(p, A) {
|
|
6589
|
+
for (var w, L, O = A[0].toUpperCase() + A.slice(1), Z = 0; Z < s.length; ) {
|
|
6590
|
+
if (w = s[Z], L = w ? w + O : A, L in p)
|
|
6591
|
+
return L;
|
|
6592
6592
|
Z++;
|
|
6593
6593
|
}
|
|
6594
6594
|
return o;
|
|
@@ -6598,14 +6598,14 @@ var or = { exports: {} };
|
|
|
6598
6598
|
return R++;
|
|
6599
6599
|
}
|
|
6600
6600
|
function U(p) {
|
|
6601
|
-
var
|
|
6602
|
-
return
|
|
6601
|
+
var A = p.ownerDocument || p;
|
|
6602
|
+
return A.defaultView || A.parentWindow || t;
|
|
6603
6603
|
}
|
|
6604
6604
|
var te = /mobile|tablet|ip(ad|hone|od)|android/i, Q = "ontouchstart" in t, ee = J(t, "PointerEvent") !== o, se = Q && te.test(navigator.userAgent), ie = "touch", ce = "pen", Ae = "mouse", xe = "kinect", ze = 25, Y = 1, re = 2, oe = 4, V = 8, Be = 1, We = 2, le = 4, He = 8, Fe = 16, me = We | le, we = He | Fe, Ye = me | we, ft = ["x", "y"], Ue = ["clientX", "clientY"];
|
|
6605
|
-
function Ce(p,
|
|
6606
|
-
var
|
|
6607
|
-
this.manager = p, this.callback =
|
|
6608
|
-
|
|
6605
|
+
function Ce(p, A) {
|
|
6606
|
+
var w = this;
|
|
6607
|
+
this.manager = p, this.callback = A, this.element = p.element, this.target = p.options.inputTarget, this.domHandler = function(L) {
|
|
6608
|
+
z(p.options.enable, [p]) && w.handler(L);
|
|
6609
6609
|
}, this.init();
|
|
6610
6610
|
}
|
|
6611
6611
|
Ce.prototype = {
|
|
@@ -6615,98 +6615,98 @@ var or = { exports: {} };
|
|
|
6615
6615
|
this.evEl && I(this.element, this.evEl, this.domHandler), this.evTarget && I(this.target, this.evTarget, this.domHandler), this.evWin && I(U(this.element), this.evWin, this.domHandler);
|
|
6616
6616
|
},
|
|
6617
6617
|
destroy: function() {
|
|
6618
|
-
this.evEl &&
|
|
6618
|
+
this.evEl && T(this.element, this.evEl, this.domHandler), this.evTarget && T(this.target, this.evTarget, this.domHandler), this.evWin && T(U(this.element), this.evWin, this.domHandler);
|
|
6619
6619
|
}
|
|
6620
6620
|
};
|
|
6621
6621
|
function Pe(p) {
|
|
6622
|
-
var
|
|
6623
|
-
return
|
|
6624
|
-
}
|
|
6625
|
-
function Le(p,
|
|
6626
|
-
var
|
|
6627
|
-
|
|
6628
|
-
}
|
|
6629
|
-
function st(p,
|
|
6630
|
-
var
|
|
6631
|
-
|
|
6632
|
-
var Z =
|
|
6633
|
-
|
|
6634
|
-
var Ne = hn(
|
|
6635
|
-
|
|
6622
|
+
var A, w = p.options.inputClass;
|
|
6623
|
+
return w ? A = w : ee ? A = ii : se ? A = fn : Q ? A = oi : A = dn, new A(p, Le);
|
|
6624
|
+
}
|
|
6625
|
+
function Le(p, A, w) {
|
|
6626
|
+
var L = w.pointers.length, O = w.changedPointers.length, Z = A & Y && L - O === 0, ae = A & (oe | V) && L - O === 0;
|
|
6627
|
+
w.isFirst = !!Z, w.isFinal = !!ae, Z && (p.session = {}), w.eventType = A, st(p, w), p.emit("hammer.input", w), p.recognize(w), p.session.prevInput = w;
|
|
6628
|
+
}
|
|
6629
|
+
function st(p, A) {
|
|
6630
|
+
var w = p.session, L = A.pointers, O = L.length;
|
|
6631
|
+
w.firstInput || (w.firstInput = Yt(A)), O > 1 && !w.firstMultiple ? w.firstMultiple = Yt(A) : O === 1 && (w.firstMultiple = !1);
|
|
6632
|
+
var Z = w.firstInput, ae = w.firstMultiple, ke = ae ? ae.center : Z.center, De = A.center = cn(L);
|
|
6633
|
+
A.timeStamp = h(), A.deltaTime = A.timeStamp - Z.timeStamp, A.angle = Zt(ke, De), A.distance = Dt(ke, De), Tt(w, A), A.offsetDirection = un(A.deltaX, A.deltaY);
|
|
6634
|
+
var Ne = hn(A.deltaTime, A.deltaX, A.deltaY);
|
|
6635
|
+
A.overallVelocityX = Ne.x, A.overallVelocityY = Ne.y, A.overallVelocity = c(Ne.x) > c(Ne.y) ? Ne.x : Ne.y, A.scale = ae ? Ir(ae.pointers, L) : 1, A.rotation = ae ? Er(ae.pointers, L) : 0, A.maxPointers = w.prevInput ? A.pointers.length > w.prevInput.maxPointers ? A.pointers.length : w.prevInput.maxPointers : A.pointers.length, ni(w, A);
|
|
6636
6636
|
var et = p.element;
|
|
6637
|
-
|
|
6637
|
+
C(A.srcEvent.target, et) && (et = A.srcEvent.target), A.target = et;
|
|
6638
6638
|
}
|
|
6639
|
-
function Tt(p,
|
|
6640
|
-
var
|
|
6641
|
-
(
|
|
6639
|
+
function Tt(p, A) {
|
|
6640
|
+
var w = A.center, L = p.offsetDelta || {}, O = p.prevDelta || {}, Z = p.prevInput || {};
|
|
6641
|
+
(A.eventType === Y || Z.eventType === oe) && (O = p.prevDelta = {
|
|
6642
6642
|
x: Z.deltaX || 0,
|
|
6643
6643
|
y: Z.deltaY || 0
|
|
6644
|
-
},
|
|
6645
|
-
x:
|
|
6646
|
-
y:
|
|
6647
|
-
}),
|
|
6648
|
-
}
|
|
6649
|
-
function ni(p,
|
|
6650
|
-
var
|
|
6651
|
-
if (
|
|
6652
|
-
var De =
|
|
6653
|
-
Z = et.x, ae = et.y, O = c(et.x) > c(et.y) ? et.x : et.y, ke = un(De, Ne), p.lastInterval =
|
|
6644
|
+
}, L = p.offsetDelta = {
|
|
6645
|
+
x: w.x,
|
|
6646
|
+
y: w.y
|
|
6647
|
+
}), A.deltaX = O.x + (w.x - L.x), A.deltaY = O.y + (w.y - L.y);
|
|
6648
|
+
}
|
|
6649
|
+
function ni(p, A) {
|
|
6650
|
+
var w = p.lastInterval || A, L = A.timeStamp - w.timeStamp, O, Z, ae, ke;
|
|
6651
|
+
if (A.eventType != V && (L > ze || w.velocity === o)) {
|
|
6652
|
+
var De = A.deltaX - w.deltaX, Ne = A.deltaY - w.deltaY, et = hn(L, De, Ne);
|
|
6653
|
+
Z = et.x, ae = et.y, O = c(et.x) > c(et.y) ? et.x : et.y, ke = un(De, Ne), p.lastInterval = A;
|
|
6654
6654
|
} else
|
|
6655
|
-
O =
|
|
6656
|
-
|
|
6655
|
+
O = w.velocity, Z = w.velocityX, ae = w.velocityY, ke = w.direction;
|
|
6656
|
+
A.velocity = O, A.velocityX = Z, A.velocityY = ae, A.direction = ke;
|
|
6657
6657
|
}
|
|
6658
6658
|
function Yt(p) {
|
|
6659
|
-
for (var
|
|
6660
|
-
|
|
6661
|
-
clientX: l(p.pointers[
|
|
6662
|
-
clientY: l(p.pointers[
|
|
6663
|
-
},
|
|
6659
|
+
for (var A = [], w = 0; w < p.pointers.length; )
|
|
6660
|
+
A[w] = {
|
|
6661
|
+
clientX: l(p.pointers[w].clientX),
|
|
6662
|
+
clientY: l(p.pointers[w].clientY)
|
|
6663
|
+
}, w++;
|
|
6664
6664
|
return {
|
|
6665
6665
|
timeStamp: h(),
|
|
6666
|
-
pointers:
|
|
6667
|
-
center: cn(
|
|
6666
|
+
pointers: A,
|
|
6667
|
+
center: cn(A),
|
|
6668
6668
|
deltaX: p.deltaX,
|
|
6669
6669
|
deltaY: p.deltaY
|
|
6670
6670
|
};
|
|
6671
6671
|
}
|
|
6672
6672
|
function cn(p) {
|
|
6673
|
-
var
|
|
6674
|
-
if (
|
|
6673
|
+
var A = p.length;
|
|
6674
|
+
if (A === 1)
|
|
6675
6675
|
return {
|
|
6676
6676
|
x: l(p[0].clientX),
|
|
6677
6677
|
y: l(p[0].clientY)
|
|
6678
6678
|
};
|
|
6679
|
-
for (var
|
|
6680
|
-
|
|
6679
|
+
for (var w = 0, L = 0, O = 0; O < A; )
|
|
6680
|
+
w += p[O].clientX, L += p[O].clientY, O++;
|
|
6681
6681
|
return {
|
|
6682
|
-
x: l(
|
|
6683
|
-
y: l(
|
|
6682
|
+
x: l(w / A),
|
|
6683
|
+
y: l(L / A)
|
|
6684
6684
|
};
|
|
6685
6685
|
}
|
|
6686
|
-
function hn(p,
|
|
6686
|
+
function hn(p, A, w) {
|
|
6687
6687
|
return {
|
|
6688
|
-
x:
|
|
6689
|
-
y:
|
|
6688
|
+
x: A / p || 0,
|
|
6689
|
+
y: w / p || 0
|
|
6690
6690
|
};
|
|
6691
6691
|
}
|
|
6692
|
-
function un(p,
|
|
6693
|
-
return p ===
|
|
6692
|
+
function un(p, A) {
|
|
6693
|
+
return p === A ? Be : c(p) >= c(A) ? p < 0 ? We : le : A < 0 ? He : Fe;
|
|
6694
6694
|
}
|
|
6695
|
-
function Dt(p,
|
|
6696
|
-
|
|
6697
|
-
var
|
|
6698
|
-
return Math.sqrt(
|
|
6695
|
+
function Dt(p, A, w) {
|
|
6696
|
+
w || (w = ft);
|
|
6697
|
+
var L = A[w[0]] - p[w[0]], O = A[w[1]] - p[w[1]];
|
|
6698
|
+
return Math.sqrt(L * L + O * O);
|
|
6699
6699
|
}
|
|
6700
|
-
function Zt(p,
|
|
6701
|
-
|
|
6702
|
-
var
|
|
6703
|
-
return Math.atan2(O,
|
|
6700
|
+
function Zt(p, A, w) {
|
|
6701
|
+
w || (w = ft);
|
|
6702
|
+
var L = A[w[0]] - p[w[0]], O = A[w[1]] - p[w[1]];
|
|
6703
|
+
return Math.atan2(O, L) * 180 / Math.PI;
|
|
6704
6704
|
}
|
|
6705
|
-
function Er(p,
|
|
6706
|
-
return Zt(
|
|
6705
|
+
function Er(p, A) {
|
|
6706
|
+
return Zt(A[1], A[0], Ue) + Zt(p[1], p[0], Ue);
|
|
6707
6707
|
}
|
|
6708
|
-
function Ir(p,
|
|
6709
|
-
return Dt(
|
|
6708
|
+
function Ir(p, A) {
|
|
6709
|
+
return Dt(A[0], A[1], Ue) / Dt(p[0], p[1], Ue);
|
|
6710
6710
|
}
|
|
6711
6711
|
var xr = {
|
|
6712
6712
|
mousedown: Y,
|
|
@@ -6716,14 +6716,14 @@ var or = { exports: {} };
|
|
|
6716
6716
|
function dn() {
|
|
6717
6717
|
this.evEl = Cr, this.evWin = Lr, this.pressed = !1, Ce.apply(this, arguments);
|
|
6718
6718
|
}
|
|
6719
|
-
|
|
6720
|
-
handler: function(
|
|
6721
|
-
var
|
|
6722
|
-
|
|
6723
|
-
pointers: [
|
|
6724
|
-
changedPointers: [
|
|
6719
|
+
P(dn, Ce, {
|
|
6720
|
+
handler: function(A) {
|
|
6721
|
+
var w = xr[A.type];
|
|
6722
|
+
w & Y && A.button === 0 && (this.pressed = !0), w & re && A.which !== 1 && (w = oe), this.pressed && (w & oe && (this.pressed = !1), this.callback(this.manager, w, {
|
|
6723
|
+
pointers: [A],
|
|
6724
|
+
changedPointers: [A],
|
|
6725
6725
|
pointerType: Ae,
|
|
6726
|
-
srcEvent:
|
|
6726
|
+
srcEvent: A
|
|
6727
6727
|
}));
|
|
6728
6728
|
}
|
|
6729
6729
|
});
|
|
@@ -6743,15 +6743,15 @@ var or = { exports: {} };
|
|
|
6743
6743
|
function ii() {
|
|
6744
6744
|
this.evEl = Ui, this.evWin = Vi, Ce.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
|
|
6745
6745
|
}
|
|
6746
|
-
|
|
6747
|
-
handler: function(
|
|
6748
|
-
var
|
|
6749
|
-
Z & Y && (
|
|
6750
|
-
pointers:
|
|
6751
|
-
changedPointers: [
|
|
6746
|
+
P(ii, Ce, {
|
|
6747
|
+
handler: function(A) {
|
|
6748
|
+
var w = this.store, L = !1, O = A.type.toLowerCase().replace("ms", ""), Z = kr[O], ae = Tr[A.pointerType] || A.pointerType, ke = ae == ie, De = B(w, A.pointerId, "pointerId");
|
|
6749
|
+
Z & Y && (A.button === 0 || ke) ? De < 0 && (w.push(A), De = w.length - 1) : Z & (oe | V) && (L = !0), !(De < 0) && (w[De] = A, this.callback(this.manager, Z, {
|
|
6750
|
+
pointers: w,
|
|
6751
|
+
changedPointers: [A],
|
|
6752
6752
|
pointerType: ae,
|
|
6753
|
-
srcEvent:
|
|
6754
|
-
}),
|
|
6753
|
+
srcEvent: A
|
|
6754
|
+
}), L && w.splice(De, 1));
|
|
6755
6755
|
}
|
|
6756
6756
|
});
|
|
6757
6757
|
var Dr = {
|
|
@@ -6763,23 +6763,23 @@ var or = { exports: {} };
|
|
|
6763
6763
|
function qi() {
|
|
6764
6764
|
this.evTarget = zr, this.evWin = Mr, this.started = !1, Ce.apply(this, arguments);
|
|
6765
6765
|
}
|
|
6766
|
-
|
|
6767
|
-
handler: function(
|
|
6768
|
-
var
|
|
6769
|
-
if (
|
|
6770
|
-
var
|
|
6771
|
-
|
|
6772
|
-
pointers:
|
|
6773
|
-
changedPointers:
|
|
6766
|
+
P(qi, Ce, {
|
|
6767
|
+
handler: function(A) {
|
|
6768
|
+
var w = Dr[A.type];
|
|
6769
|
+
if (w === Y && (this.started = !0), !!this.started) {
|
|
6770
|
+
var L = Sr.call(this, A, w);
|
|
6771
|
+
w & (oe | V) && L[0].length - L[1].length === 0 && (this.started = !1), this.callback(this.manager, w, {
|
|
6772
|
+
pointers: L[0],
|
|
6773
|
+
changedPointers: L[1],
|
|
6774
6774
|
pointerType: ie,
|
|
6775
|
-
srcEvent:
|
|
6775
|
+
srcEvent: A
|
|
6776
6776
|
});
|
|
6777
6777
|
}
|
|
6778
6778
|
}
|
|
6779
6779
|
});
|
|
6780
|
-
function Sr(p,
|
|
6781
|
-
var
|
|
6782
|
-
return
|
|
6780
|
+
function Sr(p, A) {
|
|
6781
|
+
var w = K(p.touches), L = K(p.changedTouches);
|
|
6782
|
+
return A & (oe | V) && (w = k(w.concat(L), "identifier", !0)), [w, L];
|
|
6783
6783
|
}
|
|
6784
6784
|
var jr = {
|
|
6785
6785
|
touchstart: Y,
|
|
@@ -6790,32 +6790,32 @@ var or = { exports: {} };
|
|
|
6790
6790
|
function fn() {
|
|
6791
6791
|
this.evTarget = Or, this.targetIds = {}, Ce.apply(this, arguments);
|
|
6792
6792
|
}
|
|
6793
|
-
|
|
6794
|
-
handler: function(
|
|
6795
|
-
var
|
|
6796
|
-
!
|
|
6797
|
-
pointers:
|
|
6798
|
-
changedPointers:
|
|
6793
|
+
P(fn, Ce, {
|
|
6794
|
+
handler: function(A) {
|
|
6795
|
+
var w = jr[A.type], L = Nr.call(this, A, w);
|
|
6796
|
+
!L || this.callback(this.manager, w, {
|
|
6797
|
+
pointers: L[0],
|
|
6798
|
+
changedPointers: L[1],
|
|
6799
6799
|
pointerType: ie,
|
|
6800
|
-
srcEvent:
|
|
6800
|
+
srcEvent: A
|
|
6801
6801
|
});
|
|
6802
6802
|
}
|
|
6803
6803
|
});
|
|
6804
|
-
function Nr(p,
|
|
6805
|
-
var
|
|
6806
|
-
if (
|
|
6807
|
-
return
|
|
6804
|
+
function Nr(p, A) {
|
|
6805
|
+
var w = K(p.touches), L = this.targetIds;
|
|
6806
|
+
if (A & (Y | re) && w.length === 1)
|
|
6807
|
+
return L[w[0].identifier] = !0, [w, w];
|
|
6808
6808
|
var O, Z, ae = K(p.changedTouches), ke = [], De = this.target;
|
|
6809
|
-
if (Z =
|
|
6810
|
-
return
|
|
6811
|
-
}),
|
|
6809
|
+
if (Z = w.filter(function(Ne) {
|
|
6810
|
+
return C(Ne.target, De);
|
|
6811
|
+
}), A === Y)
|
|
6812
6812
|
for (O = 0; O < Z.length; )
|
|
6813
|
-
|
|
6813
|
+
L[Z[O].identifier] = !0, O++;
|
|
6814
6814
|
for (O = 0; O < ae.length; )
|
|
6815
|
-
|
|
6815
|
+
L[ae[O].identifier] && ke.push(ae[O]), A & (oe | V) && delete L[ae[O].identifier], O++;
|
|
6816
6816
|
if (!!ke.length)
|
|
6817
6817
|
return [
|
|
6818
|
-
|
|
6818
|
+
k(Z.concat(ke), "identifier", !0),
|
|
6819
6819
|
ke
|
|
6820
6820
|
];
|
|
6821
6821
|
}
|
|
@@ -6825,47 +6825,47 @@ var or = { exports: {} };
|
|
|
6825
6825
|
var p = E(this.handler, this);
|
|
6826
6826
|
this.touch = new fn(this.manager, p), this.mouse = new dn(this.manager, p), this.primaryTouch = null, this.lastTouches = [];
|
|
6827
6827
|
}
|
|
6828
|
-
|
|
6829
|
-
handler: function(
|
|
6830
|
-
var O =
|
|
6831
|
-
if (!(Z &&
|
|
6828
|
+
P(oi, Ce, {
|
|
6829
|
+
handler: function(A, w, L) {
|
|
6830
|
+
var O = L.pointerType == ie, Z = L.pointerType == Ae;
|
|
6831
|
+
if (!(Z && L.sourceCapabilities && L.sourceCapabilities.firesTouchEvents)) {
|
|
6832
6832
|
if (O)
|
|
6833
|
-
Br.call(this,
|
|
6834
|
-
else if (Z && Hr.call(this,
|
|
6833
|
+
Br.call(this, w, L);
|
|
6834
|
+
else if (Z && Hr.call(this, L))
|
|
6835
6835
|
return;
|
|
6836
|
-
this.callback(
|
|
6836
|
+
this.callback(A, w, L);
|
|
6837
6837
|
}
|
|
6838
6838
|
},
|
|
6839
6839
|
destroy: function() {
|
|
6840
6840
|
this.touch.destroy(), this.mouse.destroy();
|
|
6841
6841
|
}
|
|
6842
6842
|
});
|
|
6843
|
-
function Br(p,
|
|
6844
|
-
p & Y ? (this.primaryTouch =
|
|
6843
|
+
function Br(p, A) {
|
|
6844
|
+
p & Y ? (this.primaryTouch = A.changedPointers[0].identifier, _i.call(this, A)) : p & (oe | V) && _i.call(this, A);
|
|
6845
6845
|
}
|
|
6846
6846
|
function _i(p) {
|
|
6847
|
-
var
|
|
6848
|
-
if (
|
|
6849
|
-
var
|
|
6850
|
-
this.lastTouches.push(
|
|
6851
|
-
var
|
|
6852
|
-
var Z =
|
|
6853
|
-
Z > -1 &&
|
|
6847
|
+
var A = p.changedPointers[0];
|
|
6848
|
+
if (A.identifier === this.primaryTouch) {
|
|
6849
|
+
var w = { x: A.clientX, y: A.clientY };
|
|
6850
|
+
this.lastTouches.push(w);
|
|
6851
|
+
var L = this.lastTouches, O = function() {
|
|
6852
|
+
var Z = L.indexOf(w);
|
|
6853
|
+
Z > -1 && L.splice(Z, 1);
|
|
6854
6854
|
};
|
|
6855
6855
|
setTimeout(O, Rr);
|
|
6856
6856
|
}
|
|
6857
6857
|
}
|
|
6858
6858
|
function Hr(p) {
|
|
6859
|
-
for (var
|
|
6860
|
-
var O = this.lastTouches[
|
|
6859
|
+
for (var A = p.srcEvent.clientX, w = p.srcEvent.clientY, L = 0; L < this.lastTouches.length; L++) {
|
|
6860
|
+
var O = this.lastTouches[L], Z = Math.abs(A - O.x), ae = Math.abs(w - O.y);
|
|
6861
6861
|
if (Z <= Ki && ae <= Ki)
|
|
6862
6862
|
return !0;
|
|
6863
6863
|
}
|
|
6864
6864
|
return !1;
|
|
6865
6865
|
}
|
|
6866
6866
|
var $i = J(r.style, "touchAction"), eo = $i !== o, to = "compute", no = "auto", si = "manipulation", Pt = "none", Jt = "pan-x", Ut = "pan-y", mn = Gr();
|
|
6867
|
-
function ri(p,
|
|
6868
|
-
this.manager = p, this.set(
|
|
6867
|
+
function ri(p, A) {
|
|
6868
|
+
this.manager = p, this.set(A);
|
|
6869
6869
|
}
|
|
6870
6870
|
ri.prototype = {
|
|
6871
6871
|
set: function(p) {
|
|
@@ -6876,24 +6876,24 @@ var or = { exports: {} };
|
|
|
6876
6876
|
},
|
|
6877
6877
|
compute: function() {
|
|
6878
6878
|
var p = [];
|
|
6879
|
-
return m(this.manager.recognizers, function(
|
|
6880
|
-
|
|
6879
|
+
return m(this.manager.recognizers, function(A) {
|
|
6880
|
+
z(A.options.enable, [A]) && (p = p.concat(A.getTouchAction()));
|
|
6881
6881
|
}), Fr(p.join(" "));
|
|
6882
6882
|
},
|
|
6883
6883
|
preventDefaults: function(p) {
|
|
6884
|
-
var
|
|
6884
|
+
var A = p.srcEvent, w = p.offsetDirection;
|
|
6885
6885
|
if (this.manager.session.prevented) {
|
|
6886
|
-
|
|
6886
|
+
A.preventDefault();
|
|
6887
6887
|
return;
|
|
6888
6888
|
}
|
|
6889
|
-
var
|
|
6889
|
+
var L = this.actions, O = M(L, Pt) && !mn[Pt], Z = M(L, Ut) && !mn[Ut], ae = M(L, Jt) && !mn[Jt];
|
|
6890
6890
|
if (O) {
|
|
6891
6891
|
var ke = p.pointers.length === 1, De = p.distance < 2, Ne = p.deltaTime < 250;
|
|
6892
6892
|
if (ke && De && Ne)
|
|
6893
6893
|
return;
|
|
6894
6894
|
}
|
|
6895
|
-
if (!(ae && Z) && (O || Z &&
|
|
6896
|
-
return this.preventSrc(
|
|
6895
|
+
if (!(ae && Z) && (O || Z && w & me || ae && w & we))
|
|
6896
|
+
return this.preventSrc(A);
|
|
6897
6897
|
},
|
|
6898
6898
|
preventSrc: function(p) {
|
|
6899
6899
|
this.manager.session.prevented = !0, p.preventDefault();
|
|
@@ -6902,31 +6902,31 @@ var or = { exports: {} };
|
|
|
6902
6902
|
function Fr(p) {
|
|
6903
6903
|
if (M(p, Pt))
|
|
6904
6904
|
return Pt;
|
|
6905
|
-
var
|
|
6906
|
-
return
|
|
6905
|
+
var A = M(p, Jt), w = M(p, Ut);
|
|
6906
|
+
return A && w ? Pt : A || w ? A ? Jt : Ut : M(p, si) ? si : no;
|
|
6907
6907
|
}
|
|
6908
6908
|
function Gr() {
|
|
6909
6909
|
if (!eo)
|
|
6910
6910
|
return !1;
|
|
6911
|
-
var p = {},
|
|
6912
|
-
return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(
|
|
6913
|
-
p[
|
|
6911
|
+
var p = {}, A = t.CSS && t.CSS.supports;
|
|
6912
|
+
return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(w) {
|
|
6913
|
+
p[w] = A ? t.CSS.supports("touch-action", w) : !0;
|
|
6914
6914
|
}), p;
|
|
6915
6915
|
}
|
|
6916
6916
|
var pn = 1, Je = 2, zt = 4, mt = 8, rt = mt, Vt = 16, $e = 32;
|
|
6917
6917
|
function at(p) {
|
|
6918
|
-
this.options =
|
|
6918
|
+
this.options = v({}, this.defaults, p || {}), this.id = _(), this.manager = null, this.options.enable = D(this.options.enable, !0), this.state = pn, this.simultaneous = {}, this.requireFail = [];
|
|
6919
6919
|
}
|
|
6920
6920
|
at.prototype = {
|
|
6921
6921
|
defaults: {},
|
|
6922
6922
|
set: function(p) {
|
|
6923
|
-
return
|
|
6923
|
+
return v(this.options, p), this.manager && this.manager.touchAction.update(), this;
|
|
6924
6924
|
},
|
|
6925
6925
|
recognizeWith: function(p) {
|
|
6926
6926
|
if (u(p, "recognizeWith", this))
|
|
6927
6927
|
return this;
|
|
6928
|
-
var
|
|
6929
|
-
return p = gn(p, this),
|
|
6928
|
+
var A = this.simultaneous;
|
|
6929
|
+
return p = gn(p, this), A[p.id] || (A[p.id] = p, p.recognizeWith(this)), this;
|
|
6930
6930
|
},
|
|
6931
6931
|
dropRecognizeWith: function(p) {
|
|
6932
6932
|
return u(p, "dropRecognizeWith", this) ? this : (p = gn(p, this), delete this.simultaneous[p.id], this);
|
|
@@ -6934,15 +6934,15 @@ var or = { exports: {} };
|
|
|
6934
6934
|
requireFailure: function(p) {
|
|
6935
6935
|
if (u(p, "requireFailure", this))
|
|
6936
6936
|
return this;
|
|
6937
|
-
var
|
|
6938
|
-
return p = gn(p, this), B(
|
|
6937
|
+
var A = this.requireFail;
|
|
6938
|
+
return p = gn(p, this), B(A, p) === -1 && (A.push(p), p.requireFailure(this)), this;
|
|
6939
6939
|
},
|
|
6940
6940
|
dropRequireFailure: function(p) {
|
|
6941
6941
|
if (u(p, "dropRequireFailure", this))
|
|
6942
6942
|
return this;
|
|
6943
6943
|
p = gn(p, this);
|
|
6944
|
-
var
|
|
6945
|
-
return
|
|
6944
|
+
var A = B(this.requireFail, p);
|
|
6945
|
+
return A > -1 && this.requireFail.splice(A, 1), this;
|
|
6946
6946
|
},
|
|
6947
6947
|
hasRequireFailures: function() {
|
|
6948
6948
|
return this.requireFail.length > 0;
|
|
@@ -6951,11 +6951,11 @@ var or = { exports: {} };
|
|
|
6951
6951
|
return !!this.simultaneous[p.id];
|
|
6952
6952
|
},
|
|
6953
6953
|
emit: function(p) {
|
|
6954
|
-
var
|
|
6955
|
-
function
|
|
6956
|
-
|
|
6954
|
+
var A = this, w = this.state;
|
|
6955
|
+
function L(O) {
|
|
6956
|
+
A.manager.emit(O, p);
|
|
6957
6957
|
}
|
|
6958
|
-
|
|
6958
|
+
w < mt && L(A.options.event + io(w)), L(A.options.event), p.additionalEvent && L(p.additionalEvent), w >= mt && L(A.options.event + io(w));
|
|
6959
6959
|
},
|
|
6960
6960
|
tryEmit: function(p) {
|
|
6961
6961
|
if (this.canEmit())
|
|
@@ -6971,12 +6971,12 @@ var or = { exports: {} };
|
|
|
6971
6971
|
return !0;
|
|
6972
6972
|
},
|
|
6973
6973
|
recognize: function(p) {
|
|
6974
|
-
var
|
|
6975
|
-
if (!
|
|
6974
|
+
var A = v({}, p);
|
|
6975
|
+
if (!z(this.options.enable, [this, A])) {
|
|
6976
6976
|
this.reset(), this.state = $e;
|
|
6977
6977
|
return;
|
|
6978
6978
|
}
|
|
6979
|
-
this.state & (rt | Vt | $e) && (this.state = pn), this.state = this.process(
|
|
6979
|
+
this.state & (rt | Vt | $e) && (this.state = pn), this.state = this.process(A), this.state & (Je | zt | mt | Vt) && this.tryEmit(A);
|
|
6980
6980
|
},
|
|
6981
6981
|
process: function(p) {
|
|
6982
6982
|
},
|
|
@@ -6991,30 +6991,30 @@ var or = { exports: {} };
|
|
|
6991
6991
|
function oo(p) {
|
|
6992
6992
|
return p == Fe ? "down" : p == He ? "up" : p == We ? "left" : p == le ? "right" : "";
|
|
6993
6993
|
}
|
|
6994
|
-
function gn(p,
|
|
6995
|
-
var
|
|
6996
|
-
return
|
|
6994
|
+
function gn(p, A) {
|
|
6995
|
+
var w = A.manager;
|
|
6996
|
+
return w ? w.get(p) : p;
|
|
6997
6997
|
}
|
|
6998
6998
|
function Ve() {
|
|
6999
6999
|
at.apply(this, arguments);
|
|
7000
7000
|
}
|
|
7001
|
-
|
|
7001
|
+
P(Ve, at, {
|
|
7002
7002
|
defaults: {
|
|
7003
7003
|
pointers: 1
|
|
7004
7004
|
},
|
|
7005
7005
|
attrTest: function(p) {
|
|
7006
|
-
var
|
|
7007
|
-
return
|
|
7006
|
+
var A = this.options.pointers;
|
|
7007
|
+
return A === 0 || p.pointers.length === A;
|
|
7008
7008
|
},
|
|
7009
7009
|
process: function(p) {
|
|
7010
|
-
var
|
|
7011
|
-
return
|
|
7010
|
+
var A = this.state, w = p.eventType, L = A & (Je | zt), O = this.attrTest(p);
|
|
7011
|
+
return L && (w & V || !O) ? A | Vt : L || O ? w & oe ? A | mt : A & Je ? A | zt : Je : $e;
|
|
7012
7012
|
}
|
|
7013
7013
|
});
|
|
7014
7014
|
function vn() {
|
|
7015
7015
|
Ve.apply(this, arguments), this.pX = null, this.pY = null;
|
|
7016
7016
|
}
|
|
7017
|
-
|
|
7017
|
+
P(vn, Ve, {
|
|
7018
7018
|
defaults: {
|
|
7019
7019
|
event: "pan",
|
|
7020
7020
|
threshold: 10,
|
|
@@ -7022,26 +7022,26 @@ var or = { exports: {} };
|
|
|
7022
7022
|
direction: Ye
|
|
7023
7023
|
},
|
|
7024
7024
|
getTouchAction: function() {
|
|
7025
|
-
var p = this.options.direction,
|
|
7026
|
-
return p & me &&
|
|
7025
|
+
var p = this.options.direction, A = [];
|
|
7026
|
+
return p & me && A.push(Ut), p & we && A.push(Jt), A;
|
|
7027
7027
|
},
|
|
7028
7028
|
directionTest: function(p) {
|
|
7029
|
-
var
|
|
7030
|
-
return O &
|
|
7029
|
+
var A = this.options, w = !0, L = p.distance, O = p.direction, Z = p.deltaX, ae = p.deltaY;
|
|
7030
|
+
return O & A.direction || (A.direction & me ? (O = Z === 0 ? Be : Z < 0 ? We : le, w = Z != this.pX, L = Math.abs(p.deltaX)) : (O = ae === 0 ? Be : ae < 0 ? He : Fe, w = ae != this.pY, L = Math.abs(p.deltaY))), p.direction = O, w && L > A.threshold && O & A.direction;
|
|
7031
7031
|
},
|
|
7032
7032
|
attrTest: function(p) {
|
|
7033
7033
|
return Ve.prototype.attrTest.call(this, p) && (this.state & Je || !(this.state & Je) && this.directionTest(p));
|
|
7034
7034
|
},
|
|
7035
7035
|
emit: function(p) {
|
|
7036
7036
|
this.pX = p.deltaX, this.pY = p.deltaY;
|
|
7037
|
-
var
|
|
7038
|
-
|
|
7037
|
+
var A = oo(p.direction);
|
|
7038
|
+
A && (p.additionalEvent = this.options.event + A), this._super.emit.call(this, p);
|
|
7039
7039
|
}
|
|
7040
7040
|
});
|
|
7041
7041
|
function ai() {
|
|
7042
7042
|
Ve.apply(this, arguments);
|
|
7043
7043
|
}
|
|
7044
|
-
|
|
7044
|
+
P(ai, Ve, {
|
|
7045
7045
|
defaults: {
|
|
7046
7046
|
event: "pinch",
|
|
7047
7047
|
threshold: 0,
|
|
@@ -7055,8 +7055,8 @@ var or = { exports: {} };
|
|
|
7055
7055
|
},
|
|
7056
7056
|
emit: function(p) {
|
|
7057
7057
|
if (p.scale !== 1) {
|
|
7058
|
-
var
|
|
7059
|
-
p.additionalEvent = this.options.event +
|
|
7058
|
+
var A = p.scale < 1 ? "in" : "out";
|
|
7059
|
+
p.additionalEvent = this.options.event + A;
|
|
7060
7060
|
}
|
|
7061
7061
|
this._super.emit.call(this, p);
|
|
7062
7062
|
}
|
|
@@ -7064,7 +7064,7 @@ var or = { exports: {} };
|
|
|
7064
7064
|
function li() {
|
|
7065
7065
|
at.apply(this, arguments), this._timer = null, this._input = null;
|
|
7066
7066
|
}
|
|
7067
|
-
|
|
7067
|
+
P(li, at, {
|
|
7068
7068
|
defaults: {
|
|
7069
7069
|
event: "press",
|
|
7070
7070
|
pointers: 1,
|
|
@@ -7075,13 +7075,13 @@ var or = { exports: {} };
|
|
|
7075
7075
|
return [no];
|
|
7076
7076
|
},
|
|
7077
7077
|
process: function(p) {
|
|
7078
|
-
var
|
|
7079
|
-
if (this._input = p, !
|
|
7078
|
+
var A = this.options, w = p.pointers.length === A.pointers, L = p.distance < A.threshold, O = p.deltaTime > A.time;
|
|
7079
|
+
if (this._input = p, !L || !w || p.eventType & (oe | V) && !O)
|
|
7080
7080
|
this.reset();
|
|
7081
7081
|
else if (p.eventType & Y)
|
|
7082
7082
|
this.reset(), this._timer = f(function() {
|
|
7083
7083
|
this.state = rt, this.tryEmit();
|
|
7084
|
-
},
|
|
7084
|
+
}, A.time, this);
|
|
7085
7085
|
else if (p.eventType & oe)
|
|
7086
7086
|
return rt;
|
|
7087
7087
|
return $e;
|
|
@@ -7096,7 +7096,7 @@ var or = { exports: {} };
|
|
|
7096
7096
|
function ci() {
|
|
7097
7097
|
Ve.apply(this, arguments);
|
|
7098
7098
|
}
|
|
7099
|
-
|
|
7099
|
+
P(ci, Ve, {
|
|
7100
7100
|
defaults: {
|
|
7101
7101
|
event: "rotate",
|
|
7102
7102
|
threshold: 0,
|
|
@@ -7112,7 +7112,7 @@ var or = { exports: {} };
|
|
|
7112
7112
|
function hi() {
|
|
7113
7113
|
Ve.apply(this, arguments);
|
|
7114
7114
|
}
|
|
7115
|
-
|
|
7115
|
+
P(hi, Ve, {
|
|
7116
7116
|
defaults: {
|
|
7117
7117
|
event: "swipe",
|
|
7118
7118
|
threshold: 10,
|
|
@@ -7124,18 +7124,18 @@ var or = { exports: {} };
|
|
|
7124
7124
|
return vn.prototype.getTouchAction.call(this);
|
|
7125
7125
|
},
|
|
7126
7126
|
attrTest: function(p) {
|
|
7127
|
-
var
|
|
7128
|
-
return
|
|
7127
|
+
var A = this.options.direction, w;
|
|
7128
|
+
return A & (me | we) ? w = p.overallVelocity : A & me ? w = p.overallVelocityX : A & we && (w = p.overallVelocityY), this._super.attrTest.call(this, p) && A & p.offsetDirection && p.distance > this.options.threshold && p.maxPointers == this.options.pointers && c(w) > this.options.velocity && p.eventType & oe;
|
|
7129
7129
|
},
|
|
7130
7130
|
emit: function(p) {
|
|
7131
|
-
var
|
|
7132
|
-
|
|
7131
|
+
var A = oo(p.offsetDirection);
|
|
7132
|
+
A && this.manager.emit(this.options.event + A, p), this.manager.emit(this.options.event, p);
|
|
7133
7133
|
}
|
|
7134
7134
|
});
|
|
7135
7135
|
function bn() {
|
|
7136
7136
|
at.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
|
|
7137
7137
|
}
|
|
7138
|
-
|
|
7138
|
+
P(bn, at, {
|
|
7139
7139
|
defaults: {
|
|
7140
7140
|
event: "tap",
|
|
7141
7141
|
pointers: 1,
|
|
@@ -7149,19 +7149,19 @@ var or = { exports: {} };
|
|
|
7149
7149
|
return [si];
|
|
7150
7150
|
},
|
|
7151
7151
|
process: function(p) {
|
|
7152
|
-
var
|
|
7152
|
+
var A = this.options, w = p.pointers.length === A.pointers, L = p.distance < A.threshold, O = p.deltaTime < A.time;
|
|
7153
7153
|
if (this.reset(), p.eventType & Y && this.count === 0)
|
|
7154
7154
|
return this.failTimeout();
|
|
7155
|
-
if (
|
|
7155
|
+
if (L && O && w) {
|
|
7156
7156
|
if (p.eventType != oe)
|
|
7157
7157
|
return this.failTimeout();
|
|
7158
|
-
var Z = this.pTime ? p.timeStamp - this.pTime <
|
|
7158
|
+
var Z = this.pTime ? p.timeStamp - this.pTime < A.interval : !0, ae = !this.pCenter || Dt(this.pCenter, p.center) < A.posThreshold;
|
|
7159
7159
|
this.pTime = p.timeStamp, this.pCenter = p.center, !ae || !Z ? this.count = 1 : this.count += 1, this._input = p;
|
|
7160
|
-
var ke = this.count %
|
|
7160
|
+
var ke = this.count % A.taps;
|
|
7161
7161
|
if (ke === 0)
|
|
7162
7162
|
return this.hasRequireFailures() ? (this._timer = f(function() {
|
|
7163
7163
|
this.state = rt, this.tryEmit();
|
|
7164
|
-
},
|
|
7164
|
+
}, A.interval, this), Je) : rt;
|
|
7165
7165
|
}
|
|
7166
7166
|
return $e;
|
|
7167
7167
|
},
|
|
@@ -7177,8 +7177,8 @@ var or = { exports: {} };
|
|
|
7177
7177
|
this.state == rt && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
|
|
7178
7178
|
}
|
|
7179
7179
|
});
|
|
7180
|
-
function lt(p,
|
|
7181
|
-
return
|
|
7180
|
+
function lt(p, A) {
|
|
7181
|
+
return A = A || {}, A.recognizers = D(A.recognizers, lt.defaults.preset), new ui(p, A);
|
|
7182
7182
|
}
|
|
7183
7183
|
lt.VERSION = "2.0.7", lt.defaults = {
|
|
7184
7184
|
domEvents: !1,
|
|
@@ -7205,97 +7205,97 @@ var or = { exports: {} };
|
|
|
7205
7205
|
}
|
|
7206
7206
|
};
|
|
7207
7207
|
var Xr = 1, so = 2;
|
|
7208
|
-
function ui(p,
|
|
7209
|
-
this.options =
|
|
7210
|
-
var
|
|
7211
|
-
|
|
7208
|
+
function ui(p, A) {
|
|
7209
|
+
this.options = v({}, lt.defaults, A || {}), this.options.inputTarget = this.options.inputTarget || p, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = p, this.input = Pe(this), this.touchAction = new ri(this, this.options.touchAction), ro(this, !0), m(this.options.recognizers, function(w) {
|
|
7210
|
+
var L = this.add(new w[0](w[1]));
|
|
7211
|
+
w[2] && L.recognizeWith(w[2]), w[3] && L.requireFailure(w[3]);
|
|
7212
7212
|
}, this);
|
|
7213
7213
|
}
|
|
7214
7214
|
ui.prototype = {
|
|
7215
7215
|
set: function(p) {
|
|
7216
|
-
return
|
|
7216
|
+
return v(this.options, p), p.touchAction && this.touchAction.update(), p.inputTarget && (this.input.destroy(), this.input.target = p.inputTarget, this.input.init()), this;
|
|
7217
7217
|
},
|
|
7218
7218
|
stop: function(p) {
|
|
7219
7219
|
this.session.stopped = p ? so : Xr;
|
|
7220
7220
|
},
|
|
7221
7221
|
recognize: function(p) {
|
|
7222
|
-
var
|
|
7223
|
-
if (!
|
|
7222
|
+
var A = this.session;
|
|
7223
|
+
if (!A.stopped) {
|
|
7224
7224
|
this.touchAction.preventDefaults(p);
|
|
7225
|
-
var
|
|
7226
|
-
(!O || O && O.state & rt) && (O =
|
|
7227
|
-
for (var Z = 0; Z <
|
|
7228
|
-
|
|
7225
|
+
var w, L = this.recognizers, O = A.curRecognizer;
|
|
7226
|
+
(!O || O && O.state & rt) && (O = A.curRecognizer = null);
|
|
7227
|
+
for (var Z = 0; Z < L.length; )
|
|
7228
|
+
w = L[Z], A.stopped !== so && (!O || w == O || w.canRecognizeWith(O)) ? w.recognize(p) : w.reset(), !O && w.state & (Je | zt | mt) && (O = A.curRecognizer = w), Z++;
|
|
7229
7229
|
}
|
|
7230
7230
|
},
|
|
7231
7231
|
get: function(p) {
|
|
7232
7232
|
if (p instanceof at)
|
|
7233
7233
|
return p;
|
|
7234
|
-
for (var
|
|
7235
|
-
if (
|
|
7236
|
-
return
|
|
7234
|
+
for (var A = this.recognizers, w = 0; w < A.length; w++)
|
|
7235
|
+
if (A[w].options.event == p)
|
|
7236
|
+
return A[w];
|
|
7237
7237
|
return null;
|
|
7238
7238
|
},
|
|
7239
7239
|
add: function(p) {
|
|
7240
7240
|
if (u(p, "add", this))
|
|
7241
7241
|
return this;
|
|
7242
|
-
var
|
|
7243
|
-
return
|
|
7242
|
+
var A = this.get(p.options.event);
|
|
7243
|
+
return A && this.remove(A), this.recognizers.push(p), p.manager = this, this.touchAction.update(), p;
|
|
7244
7244
|
},
|
|
7245
7245
|
remove: function(p) {
|
|
7246
7246
|
if (u(p, "remove", this))
|
|
7247
7247
|
return this;
|
|
7248
7248
|
if (p = this.get(p), p) {
|
|
7249
|
-
var
|
|
7250
|
-
|
|
7249
|
+
var A = this.recognizers, w = B(A, p);
|
|
7250
|
+
w !== -1 && (A.splice(w, 1), this.touchAction.update());
|
|
7251
7251
|
}
|
|
7252
7252
|
return this;
|
|
7253
7253
|
},
|
|
7254
|
-
on: function(p,
|
|
7255
|
-
if (p !== o &&
|
|
7256
|
-
var
|
|
7257
|
-
return m(N(p), function(
|
|
7258
|
-
|
|
7254
|
+
on: function(p, A) {
|
|
7255
|
+
if (p !== o && A !== o) {
|
|
7256
|
+
var w = this.handlers;
|
|
7257
|
+
return m(N(p), function(L) {
|
|
7258
|
+
w[L] = w[L] || [], w[L].push(A);
|
|
7259
7259
|
}), this;
|
|
7260
7260
|
}
|
|
7261
7261
|
},
|
|
7262
|
-
off: function(p,
|
|
7262
|
+
off: function(p, A) {
|
|
7263
7263
|
if (p !== o) {
|
|
7264
|
-
var
|
|
7265
|
-
return m(N(p), function(
|
|
7266
|
-
|
|
7264
|
+
var w = this.handlers;
|
|
7265
|
+
return m(N(p), function(L) {
|
|
7266
|
+
A ? w[L] && w[L].splice(B(w[L], A), 1) : delete w[L];
|
|
7267
7267
|
}), this;
|
|
7268
7268
|
}
|
|
7269
7269
|
},
|
|
7270
|
-
emit: function(p,
|
|
7271
|
-
this.options.domEvents && Qr(p,
|
|
7272
|
-
var
|
|
7273
|
-
if (!(!
|
|
7274
|
-
|
|
7275
|
-
|
|
7270
|
+
emit: function(p, A) {
|
|
7271
|
+
this.options.domEvents && Qr(p, A);
|
|
7272
|
+
var w = this.handlers[p] && this.handlers[p].slice();
|
|
7273
|
+
if (!(!w || !w.length)) {
|
|
7274
|
+
A.type = p, A.preventDefault = function() {
|
|
7275
|
+
A.srcEvent.preventDefault();
|
|
7276
7276
|
};
|
|
7277
|
-
for (var
|
|
7278
|
-
|
|
7277
|
+
for (var L = 0; L < w.length; )
|
|
7278
|
+
w[L](A), L++;
|
|
7279
7279
|
}
|
|
7280
7280
|
},
|
|
7281
7281
|
destroy: function() {
|
|
7282
7282
|
this.element && ro(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
|
|
7283
7283
|
}
|
|
7284
7284
|
};
|
|
7285
|
-
function ro(p,
|
|
7286
|
-
var
|
|
7287
|
-
if (!!
|
|
7288
|
-
var
|
|
7285
|
+
function ro(p, A) {
|
|
7286
|
+
var w = p.element;
|
|
7287
|
+
if (!!w.style) {
|
|
7288
|
+
var L;
|
|
7289
7289
|
m(p.options.cssProps, function(O, Z) {
|
|
7290
|
-
|
|
7291
|
-
}),
|
|
7290
|
+
L = J(w.style, Z), A ? (p.oldCssProps[L] = w.style[L], w.style[L] = O) : w.style[L] = p.oldCssProps[L] || "";
|
|
7291
|
+
}), A || (p.oldCssProps = {});
|
|
7292
7292
|
}
|
|
7293
7293
|
}
|
|
7294
|
-
function Qr(p,
|
|
7295
|
-
var
|
|
7296
|
-
|
|
7294
|
+
function Qr(p, A) {
|
|
7295
|
+
var w = e.createEvent("Event");
|
|
7296
|
+
w.initEvent(p, !0, !0), w.gesture = A, A.target.dispatchEvent(w);
|
|
7297
7297
|
}
|
|
7298
|
-
|
|
7298
|
+
v(lt, {
|
|
7299
7299
|
INPUT_START: Y,
|
|
7300
7300
|
INPUT_MOVE: re,
|
|
7301
7301
|
INPUT_END: oe,
|
|
@@ -7332,12 +7332,12 @@ var or = { exports: {} };
|
|
|
7332
7332
|
Rotate: ci,
|
|
7333
7333
|
Press: li,
|
|
7334
7334
|
on: I,
|
|
7335
|
-
off:
|
|
7335
|
+
off: T,
|
|
7336
7336
|
each: m,
|
|
7337
|
-
merge:
|
|
7338
|
-
extend:
|
|
7339
|
-
assign:
|
|
7340
|
-
inherit:
|
|
7337
|
+
merge: y,
|
|
7338
|
+
extend: b,
|
|
7339
|
+
assign: v,
|
|
7340
|
+
inherit: P,
|
|
7341
7341
|
bindFn: E,
|
|
7342
7342
|
prefixed: J
|
|
7343
7343
|
});
|
|
@@ -7436,10 +7436,10 @@ class Yh {
|
|
|
7436
7436
|
l,
|
|
7437
7437
|
c,
|
|
7438
7438
|
h
|
|
7439
|
-
),
|
|
7440
|
-
Wh(m,
|
|
7441
|
-
const
|
|
7442
|
-
|
|
7439
|
+
), g = Math.floor(n * a), v = Math.floor(o * a);
|
|
7440
|
+
Wh(m, g, v);
|
|
7441
|
+
const b = new ImageData(g, v);
|
|
7442
|
+
b.data.set(m), e.putImageData(b, 0, 0);
|
|
7443
7443
|
}
|
|
7444
7444
|
initStyle() {
|
|
7445
7445
|
const t = this.canvas;
|
|
@@ -7529,8 +7529,8 @@ const nu = {
|
|
|
7529
7529
|
pointsRenderOrder: 10
|
|
7530
7530
|
};
|
|
7531
7531
|
function iu(i, t, e) {
|
|
7532
|
-
var h, f, u, m,
|
|
7533
|
-
const n = (h = e == null ? void 0 : e.lineWidth) != null ? h : 2, o = (f = e == null ? void 0 : e.lineColor) != null ? f : new an(16777215), s = (u = e == null ? void 0 : e.pointSize) != null ? u : 5, r = (m = e == null ? void 0 : e.lineRenderOrder) != null ? m : 10, a = (
|
|
7532
|
+
var h, f, u, m, g;
|
|
7533
|
+
const n = (h = e == null ? void 0 : e.lineWidth) != null ? h : 2, o = (f = e == null ? void 0 : e.lineColor) != null ? f : new an(16777215), s = (u = e == null ? void 0 : e.pointSize) != null ? u : 5, r = (m = e == null ? void 0 : e.lineRenderOrder) != null ? m : 10, a = (g = e == null ? void 0 : e.lineRenderOrder) != null ? g : 20, l = new js(i, t);
|
|
7534
7534
|
l.setMaterial({ linewidth: n, color: o }), l.line.material.depthTest = !1, l.line.material.transparent = !0, l.line.renderOrder = r, l.points.renderOrder = a;
|
|
7535
7535
|
const c = l.points.material;
|
|
7536
7536
|
return c.depthTest = !1, c.size = s, e != null && e.pointColor && c.color.set(e.pointColor).convertSRGBToLinear(), e != null && e.pointTexture && (c.map = e.pointTexture), l;
|
|
@@ -7553,8 +7553,8 @@ function su(i) {
|
|
|
7553
7553
|
}
|
|
7554
7554
|
function ru(i) {
|
|
7555
7555
|
function t() {
|
|
7556
|
-
var
|
|
7557
|
-
(
|
|
7556
|
+
var g;
|
|
7557
|
+
(g = i.clickCallback) == null || g.call(i, m);
|
|
7558
7558
|
}
|
|
7559
7559
|
function e() {
|
|
7560
7560
|
if (f)
|
|
@@ -7566,25 +7566,25 @@ function ru(i) {
|
|
|
7566
7566
|
return f.unHighlight();
|
|
7567
7567
|
c.style.border = "0.5px solid rgba(255,255,255,0.6)", c.style.background = "rgba(195,195,195,0.70)";
|
|
7568
7568
|
}
|
|
7569
|
-
function o(
|
|
7570
|
-
const
|
|
7571
|
-
if (!
|
|
7569
|
+
function o(g) {
|
|
7570
|
+
const v = g.getElement();
|
|
7571
|
+
if (!v)
|
|
7572
7572
|
return;
|
|
7573
|
-
const
|
|
7573
|
+
const b = v.clientWidth, y = v.clientHeight;
|
|
7574
7574
|
if (a.points.length < 2)
|
|
7575
7575
|
return;
|
|
7576
|
-
const [
|
|
7577
|
-
if ((() => !(Math.abs(
|
|
7576
|
+
const [P, E] = a.points, z = P.position.clone().project(g.camera), D = E.position.clone().project(g.camera), I = z.clone().lerp(D, 0.5), T = new Oe(z.x * b, z.y * y), C = new Oe(D.x * b, D.y * y);
|
|
7577
|
+
if ((() => !(Math.abs(z.z) > 1 || Math.abs(D.z) > 1 || !it(z) && !it(D) || !it(I) || T.distanceTo(C) < 20))() === !1) {
|
|
7578
7578
|
h.style.opacity = "0", h.style.pointerEvents = "none";
|
|
7579
7579
|
return;
|
|
7580
7580
|
}
|
|
7581
|
-
const N = (I.x + 1) / 2 *
|
|
7582
|
-
h.style.transform = `translate(${N}px, ${B}px) rotate(${
|
|
7583
|
-
const J =
|
|
7581
|
+
const N = (I.x + 1) / 2 * b, B = -(I.y - 1) / 2 * y, k = -(Math.atan((T.y - C.y) / (T.x - C.x)) * 180) / Math.PI;
|
|
7582
|
+
h.style.transform = `translate(${N}px, ${B}px) rotate(${k}deg)`, h.style.opacity = "1", h.style.pointerEvents = "all", f && f.update({ line: a.toCompletelyJson(), polyline: a.getPolyline().toCompletelyJson() });
|
|
7583
|
+
const J = P.position.clone().distanceTo(E.position), R = i.line.model.params.getDistanceText(J);
|
|
7584
7584
|
c.innerText !== R && (c.innerText = R);
|
|
7585
7585
|
}
|
|
7586
|
-
function s(
|
|
7587
|
-
|
|
7586
|
+
function s(g) {
|
|
7587
|
+
g.appendChild(h), h.addEventListener("click", t);
|
|
7588
7588
|
}
|
|
7589
7589
|
function r() {
|
|
7590
7590
|
c.removeEventListener("click", t), h.remove();
|
|
@@ -7925,24 +7925,24 @@ class lu extends $n {
|
|
|
7925
7925
|
if (!n)
|
|
7926
7926
|
return;
|
|
7927
7927
|
const o = this.five.camera, s = n.point.clone().project(o), r = this.container.clientWidth, a = this.container.clientHeight, l = new Oe(s.x * r, s.y * a), c = this.model.lines.map((m) => {
|
|
7928
|
-
const [
|
|
7929
|
-
if (!it(
|
|
7928
|
+
const [g, v] = m.points, b = g.position.clone().project(o), y = v.position.clone().project(o);
|
|
7929
|
+
if (!it(b) && !it(y))
|
|
7930
7930
|
return null;
|
|
7931
|
-
const
|
|
7932
|
-
|
|
7933
|
-
|
|
7931
|
+
const P = new Oe(
|
|
7932
|
+
b.x * r,
|
|
7933
|
+
b.y * a
|
|
7934
7934
|
), E = new Oe(
|
|
7935
|
-
|
|
7936
|
-
|
|
7935
|
+
y.x * r,
|
|
7936
|
+
y.y * a
|
|
7937
7937
|
);
|
|
7938
|
-
return { id: m.id, points: [
|
|
7938
|
+
return { id: m.id, points: [P, E] };
|
|
7939
7939
|
}).filter((m) => !!m);
|
|
7940
7940
|
if (c.length === 0)
|
|
7941
7941
|
return;
|
|
7942
7942
|
const f = c.map((m) => {
|
|
7943
|
-
const
|
|
7944
|
-
return { id: m.id, distance:
|
|
7945
|
-
}).sort((m,
|
|
7943
|
+
const g = Ji(l, m.points);
|
|
7944
|
+
return { id: m.id, distance: g.distanceTo(l) };
|
|
7945
|
+
}).sort((m, g) => m.distance - g.distance)[0], u = f.distance > 20 ? void 0 : this.model.lines.find(({ id: m }) => m === f.id);
|
|
7946
7946
|
if (this.highlightedLines.length > 0 && !u)
|
|
7947
7947
|
return this.clearHighlightLines(), !1;
|
|
7948
7948
|
if (u)
|
|
@@ -8048,8 +8048,8 @@ class ar {
|
|
|
8048
8048
|
const l = (s + 1) / 2 * a.clientWidth, c = -(r - 1) / 2 * a.clientHeight;
|
|
8049
8049
|
let h = l, f = c - 34;
|
|
8050
8050
|
if (this.lines.length === 1 && t.length === 2) {
|
|
8051
|
-
const u = (o[1] - o[0]) / (n[1] - n[0]),
|
|
8052
|
-
Math.abs(u) > 0.4 && (h = l + 57, f =
|
|
8051
|
+
const u = (o[1] - o[0]) / (n[1] - n[0]), g = -((o[1] + o[0]) / 2 - 1) / 2 * a.clientHeight;
|
|
8052
|
+
Math.abs(u) > 0.4 && (h = l + 57, f = g);
|
|
8053
8053
|
}
|
|
8054
8054
|
return this.container.style.transform = `translate3d(${h}px, ${f}px, 10px)`, this.show();
|
|
8055
8055
|
}
|
|
@@ -8137,24 +8137,24 @@ class Ai extends $n {
|
|
|
8137
8137
|
if (!n)
|
|
8138
8138
|
return;
|
|
8139
8139
|
const o = this.five.camera, s = n.point.clone().project(o), r = this.container.clientWidth, a = this.container.clientHeight, l = new Oe(s.x * r, s.y * a), c = this.model.lines.map((m) => {
|
|
8140
|
-
const [
|
|
8141
|
-
if (!it(
|
|
8140
|
+
const [g, v] = m.points, b = g.position.clone().project(o), y = v.position.clone().project(o);
|
|
8141
|
+
if (!it(b) && !it(y))
|
|
8142
8142
|
return null;
|
|
8143
|
-
const
|
|
8144
|
-
|
|
8145
|
-
|
|
8143
|
+
const P = new Oe(
|
|
8144
|
+
b.x * r,
|
|
8145
|
+
b.y * a
|
|
8146
8146
|
), E = new Oe(
|
|
8147
|
-
|
|
8148
|
-
|
|
8147
|
+
y.x * r,
|
|
8148
|
+
y.y * a
|
|
8149
8149
|
);
|
|
8150
|
-
return { id: m.id, points: [
|
|
8150
|
+
return { id: m.id, points: [P, E] };
|
|
8151
8151
|
}).filter((m) => !!m);
|
|
8152
8152
|
if (c.length === 0)
|
|
8153
8153
|
return;
|
|
8154
8154
|
const f = c.map((m) => {
|
|
8155
|
-
const
|
|
8156
|
-
return { id: m.id, distance:
|
|
8157
|
-
}).sort((m,
|
|
8155
|
+
const g = Ji(l, m.points);
|
|
8156
|
+
return { id: m.id, distance: g.distanceTo(l) };
|
|
8157
|
+
}).sort((m, g) => m.distance - g.distance)[0];
|
|
8158
8158
|
if (f.distance > 20)
|
|
8159
8159
|
return;
|
|
8160
8160
|
const u = this.model.lines.find(({ id: m }) => m === f.id);
|
|
@@ -8237,18 +8237,18 @@ class rs extends $n {
|
|
|
8237
8237
|
if (!n)
|
|
8238
8238
|
return;
|
|
8239
8239
|
const o = this.five.camera, s = n.point.clone().project(o), r = this.container.clientWidth, a = this.container.clientHeight, l = new Oe(s.x * r, s.y * a), c = this.model.lines.map((m) => {
|
|
8240
|
-
const [
|
|
8241
|
-
if (!it(
|
|
8240
|
+
const [g, v] = m.points, b = g.position.clone().project(o), y = v.position.clone().project(o);
|
|
8241
|
+
if (!it(b) && !it(y))
|
|
8242
8242
|
return null;
|
|
8243
|
-
const
|
|
8244
|
-
return { id: m.id, points: [
|
|
8243
|
+
const P = new Oe(b.x * r, b.y * a), E = new Oe(y.x * r, y.y * a);
|
|
8244
|
+
return { id: m.id, points: [P, E] };
|
|
8245
8245
|
}).filter((m) => !!m);
|
|
8246
8246
|
if (c.length === 0)
|
|
8247
8247
|
return;
|
|
8248
8248
|
const f = c.map((m) => {
|
|
8249
|
-
const
|
|
8250
|
-
return { id: m.id, distance:
|
|
8251
|
-
}).sort((m,
|
|
8249
|
+
const g = Ji(l, m.points);
|
|
8250
|
+
return { id: m.id, distance: g.distanceTo(l) };
|
|
8251
|
+
}).sort((m, g) => m.distance - g.distance)[0];
|
|
8252
8252
|
if (f.distance > 20)
|
|
8253
8253
|
return;
|
|
8254
8254
|
const u = this.model.lines.find(({ id: m }) => m === f.id);
|
|
@@ -8341,8 +8341,8 @@ void main() {
|
|
|
8341
8341
|
}
|
|
8342
8342
|
`;
|
|
8343
8343
|
function lr(i) {
|
|
8344
|
-
var
|
|
8345
|
-
const t = (
|
|
8344
|
+
var y, P;
|
|
8345
|
+
const t = (y = i.isMobile) != null ? y : !0, e = (P = i.useNormalVector) != null ? P : !0;
|
|
8346
8346
|
let n = 10349931;
|
|
8347
8347
|
e && i.ballColor >= 0 && (n = i.ballColor);
|
|
8348
8348
|
const o = new Mi(), s = new qr(0.3, 0.3), r = t ? fu : mu, a = new Ms().load(r);
|
|
@@ -8358,13 +8358,13 @@ function lr(i) {
|
|
|
8358
8358
|
fragmentShader: gu,
|
|
8359
8359
|
depthTest: !1,
|
|
8360
8360
|
transparent: !0
|
|
8361
|
-
}), m = new jn(f, u),
|
|
8361
|
+
}), m = new jn(f, u), g = new na(0.01, 20, 20), v = new sn({
|
|
8362
8362
|
color: n,
|
|
8363
8363
|
depthTest: !1,
|
|
8364
8364
|
transparent: !0,
|
|
8365
8365
|
side: Ss
|
|
8366
|
-
}),
|
|
8367
|
-
return
|
|
8366
|
+
}), b = new jn(g, v);
|
|
8367
|
+
return b.position.set(0, 0, 0.1), o.name = "mouse-current", o.add(c), e && o.add(m, b), o;
|
|
8368
8368
|
}
|
|
8369
8369
|
const cr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxmaWx0ZXIgeD0iLTUuMyUiIHk9Ii01LjMlIiB3aWR0aD0iMTEwLjUlIiBoZWlnaHQ9IjExMC41JSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19hIj48ZmVPZmZzZXQgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjEiIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIvPjxmZUNvbXBvc2l0ZSBpbj0ic2hhZG93Qmx1ck91dGVyMSIgaW4yPSJTb3VyY2VBbHBoYSIgb3BlcmF0b3I9Im91dCIgcmVzdWx0PSJzaGFkb3dCbHVyT3V0ZXIxIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDEgMCAwIDAgMCAxIDAgMCAwIDAgMSAwIDAgMCAwLjUgMCIgaW49InNoYWRvd0JsdXJPdXRlcjEiLz48L2ZpbHRlcj48ZmlsdGVyIHg9Ii0xMS40JSIgeT0iLTExLjQlIiB3aWR0aD0iMTIyLjklIiBoZWlnaHQ9IjEyMi45JSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19jIj48ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSI0LjUiIGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJzaGFkb3dCbHVySW5uZXIxIi8+PGZlT2Zmc2V0IGluPSJzaGFkb3dCbHVySW5uZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldElubmVyMSIvPjxmZUNvbXBvc2l0ZSBpbj0ic2hhZG93T2Zmc2V0SW5uZXIxIiBpbjI9IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iYXJpdGhtZXRpYyIgazI9Ii0xIiBrMz0iMSIgcmVzdWx0PSJzaGFkb3dJbm5lcklubmVyMSIvPjxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAxIDAgMCAwIDAgMSAwIDAgMCAwIDEgMCAwIDAgMC4zIDAiIGluPSJzaGFkb3dJbm5lcklubmVyMSIvPjwvZmlsdGVyPjxmaWx0ZXIgeD0iLTEyNi42JSIgeT0iLTMzNy41JSIgd2lkdGg9IjM1My4xJSIgaGVpZ2h0PSI3NzUlIiBmaWx0ZXJVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giIGlkPSJwcmVmaXhfX2UiPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjE2IiBpbj0iU291cmNlR3JhcGhpYyIvPjwvZmlsdGVyPjxsaW5lYXJHcmFkaWVudCB4MT0iNTAlIiB5MT0iMTAwJSIgeDI9IjUwJSIgeTI9IjAlIiBpZD0icHJlZml4X19kIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9Ii43IiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRiIgc3RvcC1vcGFjaXR5PSIwIiBvZmZzZXQ9IjI2LjQzMiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iODIuMzA1JSIvPjxzdG9wIHN0b3AtY29sb3I9IiNGRkYiIHN0b3Atb3BhY2l0eT0iLjQiIG9mZnNldD0iMTAwJSIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IHgxPSI1MCUiIHkxPSIwJSIgeDI9IjUwJSIgeTI9IjEwMCUiIGlkPSJwcmVmaXhfX2YiPjxzdG9wIHN0b3AtY29sb3I9IiNGRkYiIHN0b3Atb3BhY2l0eT0iLjA1IiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRiIgc3RvcC1vcGFjaXR5PSIuMiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48Y2lyY2xlIGlkPSJwcmVmaXhfX2IiIGN4PSIzNiIgY3k9IjM2IiByPSIyOC40NDQiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBmaWxsPSIjMDAwIiBmaWx0ZXI9InVybCgjcHJlZml4X19jKSIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjxjaXJjbGUgc3Ryb2tlPSJ1cmwoI3ByZWZpeF9fZCkiIHN0cm9rZS13aWR0aD0iLjQiIGZpbGwtb3BhY2l0eT0iLjI0MSIgZmlsbD0iI0ZGRiIgc3Ryb2tlLWxpbmVqb2luPSJzcXVhcmUiIGN4PSIzNiIgY3k9IjM2IiByPSIyOC4yNDQiLz48ZWxsaXBzZSBmaWxsPSIjRkZGIiBvcGFjaXR5PSIuNTk2IiBmaWx0ZXI9InVybCgjcHJlZml4X19lKSIgY3g9IjM2IiBjeT0iMzYiIHJ4PSIxOC45NjMiIHJ5PSI3LjExMSIvPjxwYXRoIGQ9Ik0zNiAwQzE2LjExOCAwIDAgMTYuMTE4IDAgMzZzMTYuMTE4IDM2IDM2IDM2IDM2LTE2LjExOCAzNi0zNlM1NS44ODIgMCAzNiAwem0wIDQuNDQ0YzE3LjQyOCAwIDMxLjU1NiAxNC4xMjggMzEuNTU2IDMxLjU1NlM1My40MjggNjcuNTU2IDM2IDY3LjU1NiA0LjQ0NCA1My40MjggNC40NDQgMzYgMTguNTcyIDQuNDQ0IDM2IDQuNDQ0eiIgZmlsbD0idXJsKCNwcmVmaXhfX2YpIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+", hr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIxNS41MSUiIHkxPSIxMi40OTclIiB4Mj0iODUuMjY1JSIgeTI9Ijg2LjE0MyUiIGlkPSJwcmVmaXhfX2IiPjxzdG9wIHN0b3AtY29sb3I9IiM5NUFFRkYiIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjNjM4NkZGIiBvZmZzZXQ9IjEwMCUiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCB4MT0iNTAlIiB5MT0iMTAwJSIgeDI9IjUwJSIgeTI9IjAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjOTlBRUZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRiIgc3RvcC1vcGFjaXR5PSIwIiBvZmZzZXQ9IjI2LjQzMiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iODIuMzA1JSIvPjxzdG9wIHN0b3AtY29sb3I9IiM5OUFFRkYiIHN0b3Atb3BhY2l0eT0iLjQiIG9mZnNldD0iMTAwJSIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IHgxPSI1MCUiIHkxPSIwJSIgeDI9IjUwJSIgeTI9IjEwMCUiIGlkPSJwcmVmaXhfX2QiPjxzdG9wIHN0b3AtY29sb3I9IiM4Nzk3RDIiIHN0b3Atb3BhY2l0eT0iLjA1IiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzYyNzdDNyIgc3RvcC1vcGFjaXR5PSIuMiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48ZmlsdGVyIHg9Ii02My4zJSIgeT0iLTE2OC44JSIgd2lkdGg9IjIyNi42JSIgaGVpZ2h0PSI0MzcuNSUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9InByZWZpeF9fYyI+PGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iOCIgaW49IlNvdXJjZUdyYXBoaWMiLz48L2ZpbHRlcj48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIHN0cm9rZT0idXJsKCNwcmVmaXhfX2EpIiBzdHJva2Utd2lkdGg9Ii40IiBmaWxsPSJ1cmwoI3ByZWZpeF9fYikiIG9wYWNpdHk9Ii43IiBjeD0iMzYiIGN5PSIzNiIgcj0iMjguMjQ0Ii8+PGVsbGlwc2UgZmlsbD0iIzdDOTBEQSIgb3BhY2l0eT0iLjU5NiIgZmlsdGVyPSJ1cmwoI3ByZWZpeF9fYykiIGN4PSIzNiIgY3k9IjM2IiByeD0iMTguOTYzIiByeT0iNy4xMTEiLz48cGF0aCBkPSJNMzYgMEMxNi4xMTggMCAwIDE2LjExOCAwIDM2czE2LjExOCAzNiAzNiAzNiAzNi0xNi4xMTggMzYtMzZTNTUuODgyIDAgMzYgMHptMCA0LjQ0NGMxNy40MjggMCAzMS41NTYgMTQuMTI4IDMxLjU1NiAzMS41NTZTNTMuNDI4IDY3LjU1NiAzNiA2Ny41NTYgNC40NDQgNTMuNDI4IDQuNDQ0IDM2IDE4LjU3MiA0LjQ0NCAzNiA0LjQ0NHoiIGZpbGw9InVybCgjcHJlZml4X19kKSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9nPjwvc3ZnPg==", vu = `
|
|
8370
8370
|
<svg class="fpm__exit-icon width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -9193,71 +9193,71 @@ function Yu(i) {
|
|
|
9193
9193
|
ge(i, "svelte-1i5h9zh", ".PanoSpatialTagPlugin__tag-x.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh.svelte-1i5h9zh{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh.svelte-1i5h9zh{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content .svelte-1i5h9zh{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}");
|
|
9194
9194
|
}
|
|
9195
9195
|
function Zu(i) {
|
|
9196
|
-
let t, e, n, o, s, r, a, l, c, h, f, u, m,
|
|
9196
|
+
let t, e, n, o, s, r, a, l, c, h, f, u, m, g, v;
|
|
9197
9197
|
return {
|
|
9198
9198
|
c() {
|
|
9199
9199
|
t = F("div"), e = F("div"), n = fe(), o = F("div"), s = F("i"), r = fe(), a = F("i"), l = fe(), c = F("i"), h = fe(), f = F("div"), u = F("div"), x(e, "class", "PanoSpatialTagPlugin__tag-shadow svelte-1i5h9zh"), S(e, "transform", "translate(" + i[7] / 2 * i[3] * 3 + "px, " + i[8] / 2 * (i[1] ? -1 : 1) * i[3] * 3 + "px) scale(" + 1 / i[3] + ")"), x(s, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-1i5h9zh"), S(s, "width", i[4] + "rem"), x(a, "class", "PanoSpatialTagPlugin__tag-line1 svelte-1i5h9zh"), x(c, "class", "PanoSpatialTagPlugin__tag-line2 svelte-1i5h9zh"), x(o, "class", "PanoSpatialTagPlugin__tag-line svelte-1i5h9zh"), x(u, "class", "PanoSpatialTagPlugin__tag-content svelte-1i5h9zh"), x(f, "class", "PanoSpatialTagPlugin__tag-animate svelte-1i5h9zh"), S(f, "transform", "scale(" + i[3] * 3 + ")"), x(t, "id", m = "PanoSpatialTagPlugin__" + i[0]), S(t, "height", 20 * i[5] + "rem"), x(t, "class", "svelte-1i5h9zh"), Me(t, "PanoSpatialTagPlugin__tag-x", !0), Me(t, "PanoSpatialTagPlugin__tag-upside-down", i[1]), Me(t, "PanoSpatialTagPlugin__tag-show", i[10]), Me(t, "PanoSpatialTagPlugin__tag-hide", i[10] === !1 || i[6]);
|
|
9200
9200
|
},
|
|
9201
|
-
m(
|
|
9202
|
-
W(
|
|
9201
|
+
m(b, y) {
|
|
9202
|
+
W(b, t, y), G(t, e), G(t, n), G(t, o), G(o, s), G(o, r), G(o, a), G(o, l), G(o, c), G(t, h), G(t, f), G(f, u), u.innerHTML = i[2], i[16](u), g || (v = Ke(u, "click", i[11]), g = !0);
|
|
9203
9203
|
},
|
|
9204
|
-
p(
|
|
9205
|
-
|
|
9204
|
+
p(b, [y]) {
|
|
9205
|
+
y & 394 && S(e, "transform", "translate(" + b[7] / 2 * b[3] * 3 + "px, " + b[8] / 2 * (b[1] ? -1 : 1) * b[3] * 3 + "px) scale(" + 1 / b[3] + ")"), y & 16 && S(s, "width", b[4] + "rem"), y & 4 && (u.innerHTML = b[2]), y & 8 && S(f, "transform", "scale(" + b[3] * 3 + ")"), y & 1 && m !== (m = "PanoSpatialTagPlugin__" + b[0]) && x(t, "id", m), y & 32 && S(t, "height", 20 * b[5] + "rem"), y & 2 && Me(t, "PanoSpatialTagPlugin__tag-upside-down", b[1]), y & 1024 && Me(t, "PanoSpatialTagPlugin__tag-show", b[10]), y & 1088 && Me(t, "PanoSpatialTagPlugin__tag-hide", b[10] === !1 || b[6]);
|
|
9206
9206
|
},
|
|
9207
9207
|
i: ne,
|
|
9208
9208
|
o: ne,
|
|
9209
|
-
d(
|
|
9210
|
-
|
|
9209
|
+
d(b) {
|
|
9210
|
+
b && X(t), i[16](null), g = !1, v();
|
|
9211
9211
|
}
|
|
9212
9212
|
};
|
|
9213
9213
|
}
|
|
9214
9214
|
function Ju(i, t, e) {
|
|
9215
|
-
let { id: n } = t, { upsideDown: o } = t, { content: s } = t, { contentZoom: r } = t, { lineWidthZoom: a } = t, { lineHeightZoom: l } = t, { destroying: c = !1 } = t, { folded: h } = t, { dispose: f } = t, { events: u } = t, { hooks: m } = t,
|
|
9215
|
+
let { id: n } = t, { upsideDown: o } = t, { content: s } = t, { contentZoom: r } = t, { lineWidthZoom: a } = t, { lineHeightZoom: l } = t, { destroying: c = !1 } = t, { folded: h } = t, { dispose: f } = t, { events: u } = t, { hooks: m } = t, g = 0, v = 0, b, y, P = setTimeout(
|
|
9216
9216
|
() => {
|
|
9217
|
-
h || e(10,
|
|
9217
|
+
h || e(10, y = !0), P = void 0;
|
|
9218
9218
|
},
|
|
9219
9219
|
100
|
|
9220
9220
|
);
|
|
9221
9221
|
const E = (I) => {
|
|
9222
|
-
const
|
|
9223
|
-
let
|
|
9224
|
-
for (;
|
|
9225
|
-
const M =
|
|
9222
|
+
const T = Object.keys(u);
|
|
9223
|
+
let C = I.target;
|
|
9224
|
+
for (; C; ) {
|
|
9225
|
+
const M = C.getAttribute("class");
|
|
9226
9226
|
if (!M) {
|
|
9227
|
-
|
|
9227
|
+
C = C.parentNode;
|
|
9228
9228
|
continue;
|
|
9229
9229
|
}
|
|
9230
9230
|
if (M.includes("PanoSpatialTagPlugin__tag-content")) {
|
|
9231
|
-
|
|
9231
|
+
C = null;
|
|
9232
9232
|
break;
|
|
9233
9233
|
}
|
|
9234
|
-
|
|
9234
|
+
T.forEach((N) => {
|
|
9235
9235
|
M.includes(N) && u[N](n);
|
|
9236
|
-
}),
|
|
9236
|
+
}), C = C.parentNode;
|
|
9237
9237
|
}
|
|
9238
9238
|
};
|
|
9239
9239
|
Lt(() => {
|
|
9240
9240
|
m.emit("initTag", { id: n });
|
|
9241
9241
|
});
|
|
9242
|
-
const
|
|
9242
|
+
const z = fr.subscribe((I) => {
|
|
9243
9243
|
if (I === null)
|
|
9244
9244
|
return;
|
|
9245
|
-
const [
|
|
9246
|
-
n ===
|
|
9245
|
+
const [T, C] = I.split("-PanoSpatialTagPlugin-");
|
|
9246
|
+
n === T && (m.emit("clickOrigin", { id: n, show: y }), P || (e(10, y = h), e(12, h = !h), P = setTimeout(
|
|
9247
9247
|
() => {
|
|
9248
|
-
|
|
9248
|
+
P = void 0;
|
|
9249
9249
|
},
|
|
9250
9250
|
1500
|
|
9251
9251
|
)));
|
|
9252
9252
|
});
|
|
9253
9253
|
Ga(() => {
|
|
9254
|
-
e(7,
|
|
9254
|
+
e(7, g = b.offsetWidth), e(8, v = b.offsetHeight), !P && e(10, y = !h);
|
|
9255
9255
|
}), ln(() => {
|
|
9256
|
-
m.emit("destroyTag", { id: n }),
|
|
9256
|
+
m.emit("destroyTag", { id: n }), z(), f();
|
|
9257
9257
|
});
|
|
9258
|
-
function
|
|
9258
|
+
function D(I) {
|
|
9259
9259
|
Bt[I ? "unshift" : "push"](() => {
|
|
9260
|
-
|
|
9260
|
+
b = I, e(9, b);
|
|
9261
9261
|
});
|
|
9262
9262
|
}
|
|
9263
9263
|
return i.$$set = (I) => {
|
|
@@ -9270,16 +9270,16 @@ function Ju(i, t, e) {
|
|
|
9270
9270
|
a,
|
|
9271
9271
|
l,
|
|
9272
9272
|
c,
|
|
9273
|
+
g,
|
|
9273
9274
|
v,
|
|
9274
9275
|
b,
|
|
9275
|
-
|
|
9276
|
-
g,
|
|
9276
|
+
y,
|
|
9277
9277
|
E,
|
|
9278
9278
|
h,
|
|
9279
9279
|
f,
|
|
9280
9280
|
u,
|
|
9281
9281
|
m,
|
|
9282
|
-
|
|
9282
|
+
D
|
|
9283
9283
|
];
|
|
9284
9284
|
}
|
|
9285
9285
|
class Uu extends de {
|
|
@@ -9454,9 +9454,9 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9454
9454
|
const o = (Q = t == null ? void 0 : t.wait) != null ? Q : 200, s = (ee = t == null ? void 0 : t.maxNumberOnScreen) != null ? ee : 3, r = (se = t == null ? void 0 : t.minRad) != null ? se : Math.PI / 4, a = (ie = t == null ? void 0 : t.nearTolerance) != null ? ie : 100, l = (ce = t == null ? void 0 : t.upsideHeight) != null ? ce : 1.6, c = (Ae = t == null ? void 0 : t.minDistance) != null ? Ae : 1.2, h = (xe = t == null ? void 0 : t.maxDistance) != null ? xe : 3.5, f = Si(i), u = document.createElement("div");
|
|
9455
9455
|
u.classList.add("PanoSpatialTagPlugin"), Object.assign(u.style, Vu);
|
|
9456
9456
|
const m = new At();
|
|
9457
|
-
let
|
|
9458
|
-
|
|
9459
|
-
const
|
|
9457
|
+
let g = new Image();
|
|
9458
|
+
g.src = ed;
|
|
9459
|
+
const v = {
|
|
9460
9460
|
points: [],
|
|
9461
9461
|
origins: [],
|
|
9462
9462
|
tags: [],
|
|
@@ -9466,15 +9466,15 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9466
9466
|
folded: !1,
|
|
9467
9467
|
enabled: !0,
|
|
9468
9468
|
forbidden: !0
|
|
9469
|
-
},
|
|
9469
|
+
}, b = new Wu({
|
|
9470
9470
|
target: u,
|
|
9471
|
-
props: { origins:
|
|
9472
|
-
}),
|
|
9473
|
-
|
|
9474
|
-
},
|
|
9475
|
-
|
|
9471
|
+
props: { origins: v.origins }
|
|
9472
|
+
}), y = (Y, re) => {
|
|
9473
|
+
D(), re && I();
|
|
9474
|
+
}, P = () => {
|
|
9475
|
+
v.forbidden && (v.forbidden = !1, I());
|
|
9476
9476
|
}, E = (Y, re) => {
|
|
9477
|
-
if (
|
|
9477
|
+
if (v.tags.length === 0)
|
|
9478
9478
|
return;
|
|
9479
9479
|
const oe = re.longitude - i.state.longitude, V = i.camera.clone();
|
|
9480
9480
|
V.position.copy(re.offset), V.rotateOnWorldAxis(new j.Vector3(0, 1, 0), oe), V.updateProjectionMatrix(), V.updateMatrixWorld(!0);
|
|
@@ -9482,14 +9482,14 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9482
9482
|
We.multiplyMatrices(
|
|
9483
9483
|
V.projectionMatrix,
|
|
9484
9484
|
V.matrixWorldInverse
|
|
9485
|
-
), Be.setFromProjectionMatrix(We),
|
|
9485
|
+
), Be.setFromProjectionMatrix(We), v.tags.forEach((le) => {
|
|
9486
9486
|
const He = V.position.clone().setY(n).distanceTo(le.position);
|
|
9487
9487
|
if (He < c || He > h || !Be.containsPoint(le.position))
|
|
9488
9488
|
return le.destroying = !0;
|
|
9489
9489
|
const Fe = le.position.clone().sub(V.position).setY(0);
|
|
9490
9490
|
if (Fe.angleTo(le.normal) > Math.PI / 2 - r && Fe.angleTo(le.normal) < Math.PI / 2 + r)
|
|
9491
9491
|
return le.destroying = !0;
|
|
9492
|
-
}),
|
|
9492
|
+
}), v.tags.forEach((le) => {
|
|
9493
9493
|
le.destroying ? le.app.$set({
|
|
9494
9494
|
contentZoom: 0.1 + V.position.distanceTo(le.position) / h,
|
|
9495
9495
|
lineWidthZoom: 0.38 * (0.01 + V.position.distanceTo(le.position) / h),
|
|
@@ -9500,19 +9500,19 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9500
9500
|
contentZoom: 0.1 + V.position.distanceTo(le.position) / h
|
|
9501
9501
|
});
|
|
9502
9502
|
}), setTimeout(() => {
|
|
9503
|
-
|
|
9503
|
+
v.tags.forEach((le) => {
|
|
9504
9504
|
le.destroying && (le.app.$destroy(), le = null);
|
|
9505
|
-
}),
|
|
9505
|
+
}), v.tags = v.tags.filter((le) => !le.destroying), D();
|
|
9506
9506
|
}, 1900);
|
|
9507
|
-
},
|
|
9508
|
-
Y !== Se.Mode.Panorama && !
|
|
9507
|
+
}, z = (Y) => {
|
|
9508
|
+
Y !== Se.Mode.Panorama && !v.forbidden && (b.$set({ origins: [] }), v.tags.forEach((re) => {
|
|
9509
9509
|
re.app.$destroy(), re = null;
|
|
9510
|
-
}),
|
|
9511
|
-
},
|
|
9512
|
-
if (
|
|
9510
|
+
}), v.origins = [], v.tags = [], v.forbidden = !0);
|
|
9511
|
+
}, D = () => {
|
|
9512
|
+
if (v.forbidden || !v.enabled)
|
|
9513
9513
|
return;
|
|
9514
9514
|
const Y = i.camera, re = Y.getWorldDirection(new j.Vector3());
|
|
9515
|
-
|
|
9515
|
+
v.origins = v.tags.map((oe) => {
|
|
9516
9516
|
const V = oe.position.clone().project(Y), Be = oe.position.clone().sub(Y.position).setY(0).angleTo(re.setY(0)) < Math.PI / 2;
|
|
9517
9517
|
return {
|
|
9518
9518
|
id: oe.id,
|
|
@@ -9521,23 +9521,23 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9521
9521
|
top: (-V.y + 1) / 2 * 100,
|
|
9522
9522
|
destroying: oe.destroying
|
|
9523
9523
|
};
|
|
9524
|
-
}),
|
|
9524
|
+
}), b.$set({ origins: v.origins });
|
|
9525
9525
|
}, I = () => {
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
const Y =
|
|
9529
|
-
Y.length && (
|
|
9526
|
+
v.forbidden || !v.enabled || (v.timeoutId && clearTimeout(v.timeoutId), v.timeoutId = setTimeout(() => {
|
|
9527
|
+
v.timeoutId = void 0;
|
|
9528
|
+
const Y = T();
|
|
9529
|
+
Y.length && (v.tags = v.tags.concat(Y), D());
|
|
9530
9530
|
}, o));
|
|
9531
|
-
},
|
|
9531
|
+
}, T = () => {
|
|
9532
9532
|
const { clientWidth: Y, clientHeight: re } = i.getElement(), oe = [], V = i.camera, Be = new j.Frustum(), We = new j.Matrix4(), le = V.getWorldDirection(new j.Vector3());
|
|
9533
9533
|
We.multiplyMatrices(
|
|
9534
9534
|
V.projectionMatrix,
|
|
9535
9535
|
V.matrixWorldInverse
|
|
9536
9536
|
), Be.setFromProjectionMatrix(We);
|
|
9537
|
-
const He =
|
|
9537
|
+
const He = v.tags.filter(
|
|
9538
9538
|
(me) => Be.containsPoint(me.position) && !me.destroying
|
|
9539
|
-
).length, Fe =
|
|
9540
|
-
if (
|
|
9539
|
+
).length, Fe = v.points.reduce((me, we) => {
|
|
9540
|
+
if (v.tags.find((Le) => we.id === Le.id && !Le.destroying))
|
|
9541
9541
|
return me;
|
|
9542
9542
|
const Ye = V.position.clone().setY(n).distanceTo(we.position);
|
|
9543
9543
|
if (Ye < c || Ye > h || !Be.containsPoint(we.position))
|
|
@@ -9546,7 +9546,7 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9546
9546
|
if (ft.angleTo(we.normal) > Math.PI / 2 - r && ft.angleTo(we.normal) < Math.PI / 2 + r)
|
|
9547
9547
|
return me;
|
|
9548
9548
|
const Ue = we.position.clone().project(V);
|
|
9549
|
-
if (!
|
|
9549
|
+
if (!v.tags.every((Le) => {
|
|
9550
9550
|
if (Le.position.clone().sub(V.position).setY(0).angleTo(le.setY(0)) > Math.PI / 2)
|
|
9551
9551
|
return !0;
|
|
9552
9552
|
const st = Le.position.clone().project(V);
|
|
@@ -9582,7 +9582,7 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9582
9582
|
if (oe.find((Pe) => Ye.id === Pe.id))
|
|
9583
9583
|
continue;
|
|
9584
9584
|
const ft = Ye.position.clone().project(V);
|
|
9585
|
-
if (!
|
|
9585
|
+
if (!v.tags.concat(oe).every((Pe) => {
|
|
9586
9586
|
if (Pe.position.clone().sub(V.position).setY(0).angleTo(le.setY(0)) > Math.PI / 2)
|
|
9587
9587
|
return !0;
|
|
9588
9588
|
const Le = Pe.position.clone().project(V);
|
|
@@ -9596,7 +9596,7 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9596
9596
|
Ye.position.clone().sub(V.position.clone().setY(n)).normalize(),
|
|
9597
9597
|
0,
|
|
9598
9598
|
Ye.distance + ps
|
|
9599
|
-
), [Ce] =
|
|
9599
|
+
), [Ce] = v.intersectObjects ? Ue.intersectObjects(v.intersectObjects, !0) : i.model.bvhs.loaded ? i.model.intersectRaycaster(Ue) : Ue.intersectObjects(i.model.children, !0);
|
|
9600
9600
|
if (!!Ce && Ye.distance - Ce.distance < ps) {
|
|
9601
9601
|
const { position: Pe, normal: Le, id: st, replacement: Tt } = Ye, ni = new j.Plane().setFromNormalAndCoplanarPoint(Le, Pe), Yt = Pe.clone().sub(V.position).cross(new j.Vector3(0, 1, 0)).setLength(yi), cn = [
|
|
9602
9602
|
Pe.clone(),
|
|
@@ -9607,13 +9607,13 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9607
9607
|
target: hn,
|
|
9608
9608
|
props: {
|
|
9609
9609
|
id: st,
|
|
9610
|
-
content:
|
|
9610
|
+
content: v.render(v.template, Tt),
|
|
9611
9611
|
lineWidthZoom: 0.38 * (0.01 + V.position.distanceTo(Pe) / h),
|
|
9612
9612
|
lineHeightZoom: 0.4 + (V.position.distanceTo(Pe) - c) / h * 0.6,
|
|
9613
9613
|
contentZoom: 0.1 + V.position.distanceTo(Pe) / h,
|
|
9614
9614
|
upsideDown: Pe.y > l,
|
|
9615
|
-
folded:
|
|
9616
|
-
events:
|
|
9615
|
+
folded: v.folded,
|
|
9616
|
+
events: v.events,
|
|
9617
9617
|
hooks: m,
|
|
9618
9618
|
dispose: un
|
|
9619
9619
|
}
|
|
@@ -9627,8 +9627,8 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9627
9627
|
}
|
|
9628
9628
|
}
|
|
9629
9629
|
return oe;
|
|
9630
|
-
},
|
|
9631
|
-
|
|
9630
|
+
}, C = (Y) => {
|
|
9631
|
+
v.points = Y.points.map((re) => {
|
|
9632
9632
|
var oe, V;
|
|
9633
9633
|
return {
|
|
9634
9634
|
id: re.id,
|
|
@@ -9637,45 +9637,45 @@ const yi = 1e-3, ps = 0.01, ed = "https://vrlab-image4.ljcdn.com/release/web/Pan
|
|
|
9637
9637
|
replacement: (oe = re.replacement) != null ? oe : {},
|
|
9638
9638
|
weight: (V = re.weight) != null ? V : -1
|
|
9639
9639
|
};
|
|
9640
|
-
}), Y.render && (
|
|
9640
|
+
}), Y.render && (v.render = Y.render), Y.template && (v.template = Y.template), Y.events && (v.events = Y.events), Y.enabled === !1 && (v.enabled = Y.enabled), Y.folded === !0 && (v.folded = Y.folded);
|
|
9641
9641
|
}, M = (Y) => {
|
|
9642
|
-
|
|
9642
|
+
v.intersectObjects = Y, I();
|
|
9643
9643
|
}, N = () => {
|
|
9644
|
-
|
|
9644
|
+
v.enabled = !0, I();
|
|
9645
9645
|
}, B = () => {
|
|
9646
|
-
|
|
9646
|
+
v.enabled = !1, b.$set({ origins: [] }), v.tags.forEach((Y) => {
|
|
9647
9647
|
Y.app.$destroy(), Y = null;
|
|
9648
|
-
}),
|
|
9648
|
+
}), v.origins = [], v.tags = [];
|
|
9649
9649
|
}, K = () => {
|
|
9650
|
-
|
|
9651
|
-
Y.app.$set({ folded:
|
|
9650
|
+
v.folded = !1, v.tags.forEach((Y) => {
|
|
9651
|
+
Y.app.$set({ folded: v.folded });
|
|
9652
9652
|
});
|
|
9653
|
-
},
|
|
9654
|
-
|
|
9655
|
-
Y.app.$set({ folded:
|
|
9653
|
+
}, k = () => {
|
|
9654
|
+
v.folded = !0, v.tags.forEach((Y) => {
|
|
9655
|
+
Y.app.$set({ folded: v.folded });
|
|
9656
9656
|
});
|
|
9657
9657
|
}, J = (Y) => {
|
|
9658
|
-
|
|
9658
|
+
v.tags.forEach((re) => {
|
|
9659
9659
|
re.id === Y && re.app.$set({ folded: !1 });
|
|
9660
9660
|
});
|
|
9661
9661
|
}, R = (Y) => {
|
|
9662
|
-
|
|
9662
|
+
v.tags.forEach((re) => {
|
|
9663
9663
|
re.id === Y && re.app.$set({ folded: !0 });
|
|
9664
9664
|
});
|
|
9665
9665
|
}, _ = () => {
|
|
9666
|
-
i.once("renderFrame",
|
|
9666
|
+
i.once("renderFrame", D);
|
|
9667
9667
|
}, U = () => {
|
|
9668
|
-
e || (e = i.getElement().parentElement), e && e.appendChild(u),
|
|
9668
|
+
e || (e = i.getElement().parentElement), e && e.appendChild(u), v.forbidden = !1, n = i.model.bounding.getCenter(new j.Vector3()).y, I(), i.on("panoWillArrive", E), i.on("panoArrived", P), i.on("modeChange", z), i.on("cameraUpdate", y);
|
|
9669
9669
|
}, te = () => {
|
|
9670
|
-
|
|
9670
|
+
g = null, f.disposeAll(), b.$destroy(), v.tags.forEach((Y) => {
|
|
9671
9671
|
Y.app.$destroy(), Y = null;
|
|
9672
|
-
}),
|
|
9672
|
+
}), v.origins = [], v.tags = [], i.off("modelLoaded", U), i.off("renderFrame", D), i.off("panoWillArrive", E), i.off("panoArrived", P), i.off("modeChange", z), i.off("cameraUpdate", y), i.off("dispose", te), window.removeEventListener("resize", _, !1);
|
|
9673
9673
|
};
|
|
9674
9674
|
return window.addEventListener("resize", _, !1), (ze = i == null ? void 0 : i.model) != null && ze.loaded ? U() : i.once("modelLoaded", U), i.on("dispose", te), {
|
|
9675
|
-
load:
|
|
9675
|
+
load: C,
|
|
9676
9676
|
setIntersectObjects: M,
|
|
9677
9677
|
unfoldAll: K,
|
|
9678
|
-
foldAll:
|
|
9678
|
+
foldAll: k,
|
|
9679
9679
|
unfold: J,
|
|
9680
9680
|
fold: R,
|
|
9681
9681
|
enable: N,
|
|
@@ -9852,59 +9852,59 @@ function rd(i) {
|
|
|
9852
9852
|
let bs = 26, ad = 11;
|
|
9853
9853
|
function ld(i, t, e) {
|
|
9854
9854
|
const { Raycaster: n, Vector3: o } = j;
|
|
9855
|
-
let { five: s } = t, { modelOcclusionEnable: r } = t, { itemLabels: a } = t, { hooks: l } = t, { displayStrategyType: c } = t, h = null, f = null, u, m,
|
|
9856
|
-
const
|
|
9857
|
-
const R = new n(), _ =
|
|
9855
|
+
let { five: s } = t, { modelOcclusionEnable: r } = t, { itemLabels: a } = t, { hooks: l } = t, { displayStrategyType: c } = t, h = null, f = null, u, m, g = [], v = !0;
|
|
9856
|
+
const b = (k, J) => {
|
|
9857
|
+
const R = new n(), _ = k.camera.position.clone(), U = new o().fromArray(J.modelPosition), te = U.distanceTo(_);
|
|
9858
9858
|
R.set(_.clone(), U.clone().sub(_).normalize());
|
|
9859
|
-
const [Q] =
|
|
9859
|
+
const [Q] = k.model.intersectRaycaster(R);
|
|
9860
9860
|
return !(Q && Q.distance + 1 < te);
|
|
9861
|
-
},
|
|
9862
|
-
const R = new o(J.modelPosition[0], J.modelPosition[1], J.modelPosition[2]), _ =
|
|
9861
|
+
}, y = (k, J) => {
|
|
9862
|
+
const R = new o(J.modelPosition[0], J.modelPosition[1], J.modelPosition[2]), _ = k.project2d(R), U = _ == null ? void 0 : _.x, te = _ == null ? void 0 : _.y;
|
|
9863
9863
|
return [U, te];
|
|
9864
|
-
},
|
|
9865
|
-
function k
|
|
9864
|
+
}, P = (k) => `translate(${k[0]}px, ${k[1]}px)`, E = (k, J) => g.length === 0 ? !1 : !!g.find((_) => k[0] >= _[0] - J && k[0] <= _[0] + J || k[1] >= _[1] - bs && k[1] <= _[1] + bs);
|
|
9865
|
+
function z(k, J) {
|
|
9866
9866
|
switch (J) {
|
|
9867
9867
|
case Ot.SMALL:
|
|
9868
|
-
return Math.ceil(-27.78 *
|
|
9868
|
+
return Math.ceil(-27.78 * k + 85);
|
|
9869
9869
|
case Ot.MIDLLE:
|
|
9870
|
-
return Math.ceil(-38.9 *
|
|
9870
|
+
return Math.ceil(-38.9 * k + 130);
|
|
9871
9871
|
case Ot.LARGE:
|
|
9872
|
-
return Math.ceil(-44.44 *
|
|
9872
|
+
return Math.ceil(-44.44 * k + 140);
|
|
9873
9873
|
case Ot.EXTRA_LARGE:
|
|
9874
|
-
return Math.ceil(-92.59 *
|
|
9874
|
+
return Math.ceil(-92.59 * k + 300);
|
|
9875
9875
|
}
|
|
9876
9876
|
}
|
|
9877
|
-
const
|
|
9877
|
+
const D = (k, J) => {
|
|
9878
9878
|
const R = J.map((U) => {
|
|
9879
|
-
const te =
|
|
9879
|
+
const te = y(k, U), Q = U.name.length * ad, ee = z(U.modelPosition[1], c), ie = (r ? b(k, U) : !0) && !E([te[0], te[1] + ee], Q);
|
|
9880
9880
|
if (!ie)
|
|
9881
9881
|
return Object.assign(Object.assign({}, U), { visible: ie });
|
|
9882
|
-
|
|
9883
|
-
const ce =
|
|
9882
|
+
g.push(te);
|
|
9883
|
+
const ce = P(te);
|
|
9884
9884
|
return Object.assign(Object.assign({}, U), { visible: ie, transform: ce, strokeLength: ee });
|
|
9885
9885
|
}), _ = R.filter(({ visible: U }) => U).map((U) => ({
|
|
9886
9886
|
itemLabelItem: U,
|
|
9887
|
-
distance: new o(U.modelPosition[0], U.modelPosition[1], U.modelPosition[2]).clone().distanceTo(
|
|
9887
|
+
distance: new o(U.modelPosition[0], U.modelPosition[1], U.modelPosition[2]).clone().distanceTo(k.camera.position)
|
|
9888
9888
|
})).sort((U, te) => U.distance - te.distance);
|
|
9889
9889
|
return R.map((U) => {
|
|
9890
9890
|
const te = _.findIndex((Q) => Q.itemLabelItem.id === U.id);
|
|
9891
9891
|
return te !== void 0 ? Object.assign(Object.assign({}, U), { zIndex: te * 10 }) : U;
|
|
9892
9892
|
});
|
|
9893
9893
|
}, I = () => {
|
|
9894
|
-
|
|
9894
|
+
g = [], e(1, f = D(s, f));
|
|
9895
9895
|
};
|
|
9896
9896
|
Qs(() => {
|
|
9897
9897
|
N();
|
|
9898
9898
|
});
|
|
9899
|
-
const
|
|
9900
|
-
e(4,
|
|
9899
|
+
const T = () => {
|
|
9900
|
+
e(4, v = !1), C();
|
|
9901
9901
|
};
|
|
9902
9902
|
Lt(() => {
|
|
9903
|
-
e(1, f = a), h = a, I(), M(), s.on("cameraUpdate",
|
|
9903
|
+
e(1, f = a), h = a, I(), M(), s.on("cameraUpdate", T);
|
|
9904
9904
|
});
|
|
9905
|
-
const
|
|
9905
|
+
const C = pr(
|
|
9906
9906
|
() => {
|
|
9907
|
-
e(4,
|
|
9907
|
+
e(4, v = !0), I();
|
|
9908
9908
|
},
|
|
9909
9909
|
300
|
|
9910
9910
|
), M = () => {
|
|
@@ -9915,19 +9915,19 @@ function ld(i, t, e) {
|
|
|
9915
9915
|
s.once("renderFrame", I);
|
|
9916
9916
|
};
|
|
9917
9917
|
ln(() => {
|
|
9918
|
-
s.off("cameraUpdate",
|
|
9918
|
+
s.off("cameraUpdate", T), window.removeEventListener("resize", B, !1);
|
|
9919
9919
|
});
|
|
9920
9920
|
function K() {
|
|
9921
9921
|
u = this.clientWidth, m = this.clientHeight, e(2, u), e(3, m);
|
|
9922
9922
|
}
|
|
9923
|
-
return i.$$set = (
|
|
9924
|
-
"five" in
|
|
9923
|
+
return i.$$set = (k) => {
|
|
9924
|
+
"five" in k && e(5, s = k.five), "modelOcclusionEnable" in k && e(6, r = k.modelOcclusionEnable), "itemLabels" in k && e(7, a = k.itemLabels), "hooks" in k && e(0, l = k.hooks), "displayStrategyType" in k && e(8, c = k.displayStrategyType);
|
|
9925
9925
|
}, [
|
|
9926
9926
|
l,
|
|
9927
9927
|
f,
|
|
9928
9928
|
u,
|
|
9929
9929
|
m,
|
|
9930
|
-
|
|
9930
|
+
v,
|
|
9931
9931
|
s,
|
|
9932
9932
|
r,
|
|
9933
9933
|
a,
|
|
@@ -9982,15 +9982,15 @@ const Xf = (i, t) => {
|
|
|
9982
9982
|
height: 100%;
|
|
9983
9983
|
z-index: 5;
|
|
9984
9984
|
`, e.container.style.pointerEvents = "none";
|
|
9985
|
-
const n = (
|
|
9986
|
-
e.itemLabels = hd(
|
|
9985
|
+
const n = (g) => (e.wrapper = g, g.appendChild(e.container), l(), !0), o = (g) => {
|
|
9986
|
+
e.itemLabels = hd(g), l();
|
|
9987
9987
|
}, s = () => (e.enabled || (e.enabled = !0, l()), !0), r = () => (e.enabled && (e.enabled = !1, l()), !0), a = () => {
|
|
9988
9988
|
h(), e.container.remove();
|
|
9989
9989
|
}, l = () => {
|
|
9990
|
-
var
|
|
9990
|
+
var g;
|
|
9991
9991
|
if (!!e.wrapper) {
|
|
9992
9992
|
if (!e.enabled || !e.fiveModeEnabled) {
|
|
9993
|
-
(
|
|
9993
|
+
(g = e.app) == null || g.$destroy(), e.app = void 0;
|
|
9994
9994
|
return;
|
|
9995
9995
|
}
|
|
9996
9996
|
e.app ? e.app.$set({
|
|
@@ -10012,9 +10012,9 @@ const Xf = (i, t) => {
|
|
|
10012
10012
|
i.on("modeChange", f), i.once("dispose", a);
|
|
10013
10013
|
}, h = () => {
|
|
10014
10014
|
i.off("modeChange", f);
|
|
10015
|
-
}, f = (
|
|
10015
|
+
}, f = (g) => {
|
|
10016
10016
|
if (!!e.enabled) {
|
|
10017
|
-
if (
|
|
10017
|
+
if (g !== Se.Mode.Floorplan) {
|
|
10018
10018
|
e.fiveModeEnabled = !1, l();
|
|
10019
10019
|
return;
|
|
10020
10020
|
}
|
|
@@ -10060,22 +10060,22 @@ const Wf = (i, { videoElement: t }) => {
|
|
|
10060
10060
|
rectPoints: [],
|
|
10061
10061
|
enabled: !1,
|
|
10062
10062
|
videoElement: t
|
|
10063
|
-
}, n = Si(i), o = /* @__PURE__ */ new Map(), s = (
|
|
10064
|
-
e.videoTexture && (e.videoTexture.image.muted =
|
|
10063
|
+
}, n = Si(i), o = /* @__PURE__ */ new Map(), s = (P) => {
|
|
10064
|
+
e.videoTexture && (e.videoTexture.image.muted = P);
|
|
10065
10065
|
}, r = () => e.videoTexture ? e.videoTexture.image.muted : !0, a = () => {
|
|
10066
10066
|
if (e.enabled || !e.videoTexture)
|
|
10067
10067
|
return;
|
|
10068
|
-
e.enabled = !0, e.videoMeshes = c(), e.videoMeshes.forEach((
|
|
10069
|
-
const
|
|
10068
|
+
e.enabled = !0, e.videoMeshes = c(), e.videoMeshes.forEach((E) => i.scene.add(E));
|
|
10069
|
+
const P = () => {
|
|
10070
10070
|
if (!e.videoTexture)
|
|
10071
10071
|
return;
|
|
10072
|
-
const
|
|
10073
|
-
var
|
|
10074
|
-
!e.videoTexture || ((
|
|
10075
|
-
|
|
10072
|
+
const E = () => {
|
|
10073
|
+
var z;
|
|
10074
|
+
!e.videoTexture || ((z = e.videoTexture) == null || z.image.removeEventListener("timeupdate", E), e.videoTextureEnabled = !0, e.videoMeshes.forEach((D) => {
|
|
10075
|
+
D.material.map !== e.videoTexture && (D.material.map = e.videoTexture);
|
|
10076
10076
|
}), i.needsRender = !0);
|
|
10077
10077
|
};
|
|
10078
|
-
e.videoTexture.image.addEventListener("timeupdate",
|
|
10078
|
+
e.videoTexture.image.addEventListener("timeupdate", E), e.videoTexture && e.videoMeshes.length && (e.videoTexture.image.play(), e.videoTexture.image.onplay = () => {
|
|
10079
10079
|
n.hide();
|
|
10080
10080
|
}, e.videoTexture.image.onpause = () => {
|
|
10081
10081
|
n.show();
|
|
@@ -10084,114 +10084,115 @@ const Wf = (i, { videoElement: t }) => {
|
|
|
10084
10084
|
});
|
|
10085
10085
|
};
|
|
10086
10086
|
if (i.model.loaded)
|
|
10087
|
-
|
|
10087
|
+
P();
|
|
10088
10088
|
else
|
|
10089
|
-
return i.once("modelLoaded", () =>
|
|
10089
|
+
return i.once("modelLoaded", () => P());
|
|
10090
|
+
v();
|
|
10090
10091
|
}, l = () => {
|
|
10091
|
-
!e.enabled || (e.enabled = !1, e.videoMeshes.forEach((
|
|
10092
|
-
|
|
10092
|
+
!e.enabled || (e.enabled = !1, e.videoMeshes.forEach((P) => {
|
|
10093
|
+
P.geometry.dispose(), P.material.dispose(), i.scene.remove(P), e.videoTexture && e.videoTexture.image.pause();
|
|
10093
10094
|
}), e.videoMeshes = [], i.needsRender = !0);
|
|
10094
|
-
}, c = () => e.rectPoints.map((
|
|
10095
|
-
const
|
|
10096
|
-
|
|
10097
|
-
for (let
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10095
|
+
}, c = () => e.rectPoints.map((P, E) => {
|
|
10096
|
+
const z = new j.BufferGeometry(), D = 128, I = [];
|
|
10097
|
+
I.push(...P[0].toArray());
|
|
10098
|
+
for (let k = 1; k < D; k++)
|
|
10099
|
+
I.push(
|
|
10100
|
+
P[0].x + (P[1].x - P[0].x) * k / D,
|
|
10101
|
+
P[0].y + (P[1].y - P[0].y) * k / D,
|
|
10102
|
+
P[0].z + (P[1].z - P[0].z) * k / D
|
|
10102
10103
|
);
|
|
10103
|
-
|
|
10104
|
-
for (let
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10104
|
+
I.push(...P[1].toArray()), I.push(...P[2].toArray());
|
|
10105
|
+
for (let k = 1; k < D; k++)
|
|
10106
|
+
I.push(
|
|
10107
|
+
P[2].x + (P[3].x - P[2].x) * k / D,
|
|
10108
|
+
P[2].y + (P[3].y - P[2].y) * k / D,
|
|
10109
|
+
P[2].z + (P[3].z - P[2].z) * k / D
|
|
10109
10110
|
);
|
|
10110
|
-
|
|
10111
|
-
const
|
|
10112
|
-
|
|
10113
|
-
for (let
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
for (let
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
const
|
|
10120
|
-
for (let
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
const L = new j.AxesHelper(10);
|
|
10124
|
-
i.scene.add(L);
|
|
10111
|
+
I.push(...P[3].toArray());
|
|
10112
|
+
const T = [];
|
|
10113
|
+
T.push(0, 1);
|
|
10114
|
+
for (let k = 1; k < D; k++)
|
|
10115
|
+
T.push(0, 1 - k / D);
|
|
10116
|
+
T.push(0, 0), T.push(1, 0);
|
|
10117
|
+
for (let k = 1; k < D; k++)
|
|
10118
|
+
T.push(1, k / D);
|
|
10119
|
+
T.push(1, 1);
|
|
10120
|
+
const C = [];
|
|
10121
|
+
for (let k = 0; k < D; k++)
|
|
10122
|
+
C.push(k, k + 1, D * 2 - k, k, D * 2 - k, D * 2 + 1 - k);
|
|
10123
|
+
z.setAttribute("position", new j.BufferAttribute(new Float32Array(I), 3)), z.setAttribute("uv", new j.BufferAttribute(new Float32Array(T), 2)), z.setIndex(new j.BufferAttribute(new Uint32Array(C), 1));
|
|
10125
10124
|
const M = new j.MeshBasicMaterial({
|
|
10126
10125
|
map: e.videoTextureEnabled ? e.videoTexture : e.imageTexture,
|
|
10127
10126
|
side: j.DoubleSide
|
|
10128
|
-
}), N = new j.Mesh(
|
|
10129
|
-
N.renderOrder = 1, N.name = `ModelTVVideoPlugin-${
|
|
10130
|
-
const B = [
|
|
10127
|
+
}), N = new j.Mesh(z, M);
|
|
10128
|
+
N.renderOrder = 1, N.name = `ModelTVVideoPlugin-${E}-${performance.now()}`;
|
|
10129
|
+
const B = [P[1], P[2], P[3], P[0]], K = n.create3DDomContainer(B);
|
|
10131
10130
|
if (K != null && K.container) {
|
|
10132
|
-
const
|
|
10133
|
-
|
|
10131
|
+
const k = document.createElement("div");
|
|
10132
|
+
k.classList.add("play-icon"), k.style.width = "100%", k.style.height = "100%", k.style.display = "flex", k.style.justifyContent = "center", k.style.alignItems = "center", k.style.pointerEvents = "none", K.container.appendChild(k);
|
|
10134
10133
|
const J = document.createElement("img");
|
|
10135
10134
|
J.src = "//vrlab-static.ljcdn.com/release/web/play.2ada5b6f.png", J.style.width = "200px", J.style.pointerEvents = "auto", J.onclick = () => {
|
|
10136
10135
|
e.videoTexture.image.muted = !1, e.videoTexture.image.play();
|
|
10137
|
-
},
|
|
10136
|
+
}, k.appendChild(J), o.set(N, K);
|
|
10138
10137
|
}
|
|
10139
10138
|
return N;
|
|
10140
|
-
}), h = (
|
|
10141
|
-
const
|
|
10142
|
-
return
|
|
10143
|
-
}, f = (
|
|
10144
|
-
const
|
|
10145
|
-
|
|
10146
|
-
if (
|
|
10147
|
-
if (
|
|
10148
|
-
const
|
|
10149
|
-
|
|
10150
|
-
const
|
|
10151
|
-
|
|
10139
|
+
}), h = (P) => {
|
|
10140
|
+
const E = new j.TextureLoader().load(P);
|
|
10141
|
+
return E.minFilter = j.LinearFilter, E.magFilter = j.LinearFilter, E.format = j.RGBFormat, E;
|
|
10142
|
+
}, f = (P, E) => new Promise((z, D) => {
|
|
10143
|
+
const I = new XMLHttpRequest();
|
|
10144
|
+
I.onreadystatechange = () => {
|
|
10145
|
+
if (I.readyState == 4)
|
|
10146
|
+
if (I.status == 200) {
|
|
10147
|
+
const T = window.URL || window.webkitURL;
|
|
10148
|
+
E = E || document.createElement("video"), E.crossOrigin = "anonymous", E.muted = !0, E.loop = !0, E.playsInline = !0, E.src = T.createObjectURL(I.response);
|
|
10149
|
+
const C = new j.VideoTexture(E);
|
|
10150
|
+
C.minFilter = j.LinearFilter, C.magFilter = j.LinearFilter, C.format = j.RGBFormat, z(Object.assign(C, { videoSource: P }));
|
|
10152
10151
|
} else
|
|
10153
|
-
|
|
10154
|
-
},
|
|
10155
|
-
}), u = async (
|
|
10156
|
-
const { video_src:
|
|
10157
|
-
e.videoSource =
|
|
10158
|
-
}, m = (
|
|
10152
|
+
D(new Error("Video download Error: " + I.status));
|
|
10153
|
+
}, I.onerror = (T) => D(T), I.open("GET", P), I.responseType = "blob", I.send();
|
|
10154
|
+
}), u = async (P, E) => {
|
|
10155
|
+
const { video_src: z, video_poster_src: D, points: I } = P;
|
|
10156
|
+
e.videoSource = z, e.rectPoints = ud(I).map((T) => T.map(({ x: C, y: M, z: N }) => new j.Vector3(C, M, N))), e.imageTexture = h(D), E && (e.videoElement = E), e.videoTexture = await f(e.videoSource, e.videoElement), e.enabled = !!P.enable, e.enabled && a();
|
|
10157
|
+
}, m = (P) => {
|
|
10159
10158
|
if (!e.enabled)
|
|
10160
10159
|
return;
|
|
10161
|
-
const
|
|
10162
|
-
if (!(!
|
|
10160
|
+
const E = e.videoMeshes;
|
|
10161
|
+
if (!(!E || P.intersectObjects(E).length === 0))
|
|
10163
10162
|
return e.videoTexture && (e.videoTexture.image.paused || e.videoTexture.image.pause()), !1;
|
|
10164
|
-
},
|
|
10165
|
-
|
|
10166
|
-
},
|
|
10163
|
+
}, g = (P) => {
|
|
10164
|
+
P === "Floorplan" ? n.hide() : e.videoTexture.image.paused ? n.show() : n.hide();
|
|
10165
|
+
}, v = () => {
|
|
10167
10166
|
if (!e.enabled)
|
|
10168
10167
|
return;
|
|
10169
|
-
const
|
|
10170
|
-
if (o.forEach((
|
|
10171
|
-
const
|
|
10172
|
-
|
|
10168
|
+
const P = i.camera.position;
|
|
10169
|
+
if (o.forEach((E, z) => {
|
|
10170
|
+
const D = E.css3DObject.position.clone(), I = D.clone().sub(P).normalize(), T = new j.Raycaster(P, I), C = i.model.intersectRaycaster(T)[0], M = D.distanceTo(P), N = 0.01;
|
|
10171
|
+
C && C.distance + N < M ? E.hide() : E.show();
|
|
10173
10172
|
}), !r()) {
|
|
10174
|
-
const
|
|
10175
|
-
const
|
|
10176
|
-
return
|
|
10177
|
-
const
|
|
10178
|
-
return !(
|
|
10173
|
+
const E = e.rectPoints.find((z) => {
|
|
10174
|
+
const D = z[0].clone().add(z[1]).add(z[2]).add(z[3]).divideScalar(4);
|
|
10175
|
+
return z.map((I) => I.clone().add(D).divideScalar(2)).filter((I) => {
|
|
10176
|
+
const T = I.distanceTo(P), C = new j.Raycaster(P, I.clone().sub(P).normalize()), M = i.model.intersectRaycaster(C)[0], N = 0.01;
|
|
10177
|
+
return !(M && M.distance + N < T);
|
|
10179
10178
|
}).length >= 2;
|
|
10180
10179
|
});
|
|
10181
|
-
(!
|
|
10180
|
+
(!E || E.length === 0) && s(!0);
|
|
10182
10181
|
}
|
|
10183
|
-
},
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10182
|
+
}, b = () => {
|
|
10183
|
+
v();
|
|
10184
|
+
}, y = () => {
|
|
10185
|
+
l(), e.videoTexture = void 0, i.off("modeChange", g), i.off("wantsTapGesture", m), i.off("panoArrived", b), i.off("renderFrame", () => {
|
|
10186
|
+
e.videoMeshes.forEach((P) => {
|
|
10187
|
+
P && (P.needsRender = !0);
|
|
10187
10188
|
});
|
|
10188
|
-
});
|
|
10189
|
+
}), o.clear();
|
|
10189
10190
|
};
|
|
10190
|
-
return i.on("modeChange",
|
|
10191
|
-
e.videoMeshes.forEach((
|
|
10192
|
-
|
|
10191
|
+
return i.on("modeChange", g), i.on("wantsTapGesture", m), i.on("panoArrived", b), i.on("renderFrame", () => {
|
|
10192
|
+
e.videoMeshes.forEach((P) => {
|
|
10193
|
+
P && (P.needsRender = !0);
|
|
10193
10194
|
});
|
|
10194
|
-
}), { enable: a, disable: l, load: u, dispose:
|
|
10195
|
+
}), { enable: a, disable: l, load: u, dispose: y, state: e, css3DRenderPlugin: n };
|
|
10195
10196
|
};
|
|
10196
10197
|
function dd(i) {
|
|
10197
10198
|
ge(i, "svelte-1q3t254", `.item-label-item.svelte-1q3t254.svelte-1q3t254{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;animation:svelte-1q3t254-fadeIn .3s ease-in}.item-label-item.fold.svelte-1q3t254>.item-label-item__text-wrap.svelte-1q3t254{visibility:hidden}.item-label-item.fold.svelte-1q3t254>.item-label-item__bar.anchor.svelte-1q3t254{visibility:hidden}.item-label-item.fold.svelte-1q3t254>.item-label-item__bar.anchor.svelte-1q3t254:after{visibility:visible}.item-label-item__text-wrap.svelte-1q3t254.svelte-1q3t254{height:-moz-fit-content;height:fit-content;padding:0.625rem 1.04167rem 0.625rem 0.625rem;position:absolute;width:-moz-max-content;width:max-content;max-width:24.63542rem;min-height:4.79167rem;background-image:linear-gradient(269deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.60) 49%, rgba(31, 38, 46, 0.70) 100%);border:1.5px solid rgba(255, 255, 255, .65);border-radius:0.15625rem;color:white;transform:translate(-50%, 0);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;overflow:hidden;pointer-events:all}.item-label-item__custom.svelte-1q3t254.svelte-1q3t254{padding:0;max-width:unset;min-height:unset;background-image:unset;border:0;border-radius:0}.icon-wrap.svelte-1q3t254.svelte-1q3t254{width:3.54167rem;height:100%;display:flex;justify-content:center;align-content:center}.icon.svelte-1q3t254.svelte-1q3t254{width:3.54167rem;height:3.54167rem;background-repeat:no-repeat;background-size:contain;background-position:center}.item-label-text.svelte-1q3t254.svelte-1q3t254{margin-left:0.625rem;padding-left:0.625rem;min-height:3.54167rem;height:auto;display:flex;flex-flow:column;justify-content:space-around;align-content:flex-start;border-left:solid rgba(255, 255, 255, .2) 1px;border-top:solid rgba(255, 255, 255, .2) 0;border-right:solid rgba(255, 255, 255, .2) 0;border-bottom:solid rgba(255, 255, 255, .2) 0;pointer-events:auto}.item-model.svelte-1q3t254.svelte-1q3t254{white-space:nowrap;font-size:1.14583rem;font-weight:bold;line-height:1.5625rem}.item-name.svelte-1q3t254.svelte-1q3t254{height:auto;word-wrap:break-word;word-break:break-all;font-size:1.04167rem;line-height:1.45833rem}.item-label-item__bar.svelte-1q3t254.svelte-1q3t254{position:absolute;bottom:0;width:0.15625rem;background-image:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));box-shadow:0 2px 0.41667rem 0 rgba(0, 0, 0, 0.20);pointer-events:none}.item-label-item__bar.anchor.svelte-1q3t254.svelte-1q3t254:after{content:'';position:absolute;bottom:0;width:1.25rem;height:1.25rem;background-image:url("//vrlab-public.ljcdn.com/common/file/web/67e7a198-28c9-47dc-879b-507bd3ae600c.png ");background-position:center;background-size:contain;transform:translate(-0.54688rem, 50%)}@keyframes svelte-1q3t254-fadeIn{from{opacity:0
|
|
@@ -10249,8 +10250,8 @@ function As(i) {
|
|
|
10249
10250
|
}
|
|
10250
10251
|
function pd(i) {
|
|
10251
10252
|
let t, e, n, o, s, r, a, l, c, h;
|
|
10252
|
-
function f(
|
|
10253
|
-
return
|
|
10253
|
+
function f(g, v) {
|
|
10254
|
+
return v & 1 && (n = null), n == null && (n = !!Boolean(typeof g[0].render == "function")), n ? md : fd;
|
|
10254
10255
|
}
|
|
10255
10256
|
let u = f(i, -1), m = u(i);
|
|
10256
10257
|
return {
|
|
@@ -10259,18 +10260,18 @@ function pd(i) {
|
|
|
10259
10260
|
"item-label-item__custom": Boolean(typeof i[0].render == "function")
|
|
10260
10261
|
})) + " svelte-1q3t254"), S(e, "bottom", `${i[0].strokeLength}px`), x(r, "class", a = je(tt("item-label-item__bar", { anchor: i[1] })) + " svelte-1q3t254"), S(r, "height", `${i[0].strokeLength}px`), x(t, "class", l = je(tt("item-label-item", { fold: i[0].isFold })) + " svelte-1q3t254"), S(t, "z-index", i[0].zIndex), S(t, "transform", i[0].transform);
|
|
10261
10262
|
},
|
|
10262
|
-
m(
|
|
10263
|
-
W(
|
|
10263
|
+
m(g, v) {
|
|
10264
|
+
W(g, t, v), G(t, e), m.m(e, null), G(t, s), G(t, r), c || (h = Ke(e, "click", i[4]), c = !0);
|
|
10264
10265
|
},
|
|
10265
|
-
p(
|
|
10266
|
-
u === (u = f(
|
|
10267
|
-
"item-label-item__custom": Boolean(typeof
|
|
10268
|
-
})) + " svelte-1q3t254") && x(e, "class", o),
|
|
10266
|
+
p(g, [v]) {
|
|
10267
|
+
u === (u = f(g, v)) && m ? m.p(g, v) : (m.d(1), m = u(g), m && (m.c(), m.m(e, null))), v & 1 && o !== (o = je(tt("item-label-item__text-wrap", {
|
|
10268
|
+
"item-label-item__custom": Boolean(typeof g[0].render == "function")
|
|
10269
|
+
})) + " svelte-1q3t254") && x(e, "class", o), v & 1 && S(e, "bottom", `${g[0].strokeLength}px`), v & 2 && a !== (a = je(tt("item-label-item__bar", { anchor: g[1] })) + " svelte-1q3t254") && x(r, "class", a), v & 1 && S(r, "height", `${g[0].strokeLength}px`), v & 1 && l !== (l = je(tt("item-label-item", { fold: g[0].isFold })) + " svelte-1q3t254") && x(t, "class", l), v & 1 && S(t, "z-index", g[0].zIndex), v & 1 && S(t, "transform", g[0].transform);
|
|
10269
10270
|
},
|
|
10270
10271
|
i: ne,
|
|
10271
10272
|
o: ne,
|
|
10272
|
-
d(
|
|
10273
|
-
|
|
10273
|
+
d(g) {
|
|
10274
|
+
g && X(t), m.d(), c = !1, h();
|
|
10274
10275
|
}
|
|
10275
10276
|
};
|
|
10276
10277
|
}
|
|
@@ -10460,26 +10461,26 @@ function wd(i) {
|
|
|
10460
10461
|
let Ed = 11;
|
|
10461
10462
|
function Id(i, t, e) {
|
|
10462
10463
|
const { Raycaster: n, Vector3: o } = j;
|
|
10463
|
-
let { five: s } = t, { modelOcclusionEnable: r } = t, { itemLabels: a } = t, { hooks: l } = t, { displayStrategyType: c } = t, { maxVisibleDistance: h } = t, f = null, u = null, m = (s == null ? void 0 : s.currentMode) === Se.Mode.Panorama, v, b
|
|
10464
|
-
const
|
|
10464
|
+
let { five: s } = t, { modelOcclusionEnable: r } = t, { itemLabels: a } = t, { hooks: l } = t, { displayStrategyType: c } = t, { maxVisibleDistance: h } = t, f = null, u = null, m = (s == null ? void 0 : s.currentMode) === Se.Mode.Panorama, g, v, b = [], y = !0;
|
|
10465
|
+
const P = (R, _) => {
|
|
10465
10466
|
const U = R.camera.position.clone(), te = new o(_.modelPosition[0], _.modelPosition[1], _.modelPosition[2]), Q = te.distanceTo(U);
|
|
10466
10467
|
return h !== void 0 && R.state.mode === Se.Mode.Panorama && Q > h ? !1 : ys(R, te.clone().sub(U).normalize(), U, Q);
|
|
10467
10468
|
}, E = (R) => {
|
|
10468
10469
|
const { camera: _, model: U } = s, { x: te, y: Q, z: ee } = R.clone().project(_), se = (te + 1) / 2, ie = (2 - (Q + 1)) / 2, xe = Math.abs(ee) < 1 && [se, ie].every((ze) => ze < 1 && ze >= 0);
|
|
10469
10470
|
return Boolean(xe);
|
|
10470
|
-
},
|
|
10471
|
+
}, z = (R, _) => {
|
|
10471
10472
|
const U = new o(_.modelPosition[0], _.modelPosition[1], _.modelPosition[2]), te = R.project2d(U), Q = te == null ? void 0 : te.x, ee = te == null ? void 0 : te.y;
|
|
10472
10473
|
return [Q, ee];
|
|
10473
|
-
},
|
|
10474
|
+
}, D = (R, _) => {
|
|
10474
10475
|
const U = _.map((Q) => {
|
|
10475
10476
|
if (R.state.panoIndex !== Q.panoIndex)
|
|
10476
10477
|
return Object.assign(Object.assign({}, Q), { visible: !1 });
|
|
10477
|
-
const ee =
|
|
10478
|
+
const ee = z(R, Q);
|
|
10478
10479
|
Q.name.length * Ed;
|
|
10479
|
-
const se = Ad(Q.modelPosition[1], c), ie = R.currentMode === Se.Mode.Panorama ? E(new o(Q.position[0], Q.position[1], Q.position[2])) : !0, ce = r ?
|
|
10480
|
+
const se = Ad(Q.modelPosition[1], c), ie = R.currentMode === Se.Mode.Panorama ? E(new o(Q.position[0], Q.position[1], Q.position[2])) : !0, ce = r ? P(R, Q) : !1, Ae = ie && !ce;
|
|
10480
10481
|
if (!Ae)
|
|
10481
10482
|
return Object.assign(Object.assign({}, Q), { visible: Ae });
|
|
10482
|
-
|
|
10483
|
+
b.push(ee);
|
|
10483
10484
|
const xe = yd(ee);
|
|
10484
10485
|
return Object.assign(Object.assign({}, Q), { visible: Ae, transform: xe, strokeLength: se });
|
|
10485
10486
|
}), te = U.filter(({ visible: Q }) => Q).map((Q) => ({
|
|
@@ -10491,12 +10492,12 @@ function Id(i, t, e) {
|
|
|
10491
10492
|
return ee !== void 0 ? Object.assign(Object.assign({}, Q), { zIndex: ee * 10 }) : Q;
|
|
10492
10493
|
});
|
|
10493
10494
|
}, I = () => {
|
|
10494
|
-
|
|
10495
|
-
},
|
|
10496
|
-
e(5,
|
|
10497
|
-
},
|
|
10495
|
+
b = [], e(1, u = D(s, u));
|
|
10496
|
+
}, T = () => {
|
|
10497
|
+
e(5, y = !1), C();
|
|
10498
|
+
}, C = pr(
|
|
10498
10499
|
() => {
|
|
10499
|
-
e(5,
|
|
10500
|
+
e(5, y = !0), I();
|
|
10500
10501
|
},
|
|
10501
10502
|
300
|
|
10502
10503
|
), M = () => {
|
|
@@ -10521,7 +10522,7 @@ function Id(i, t, e) {
|
|
|
10521
10522
|
}
|
|
10522
10523
|
}
|
|
10523
10524
|
return typeof te == "number" ? _[te] : void 0;
|
|
10524
|
-
},
|
|
10525
|
+
}, k = (R) => {
|
|
10525
10526
|
if (s.state.mode === Se.Mode.Panorama)
|
|
10526
10527
|
return;
|
|
10527
10528
|
const _ = s.work.observers, U = new o().fromArray(R.position), te = K(U, _);
|
|
@@ -10543,12 +10544,12 @@ function Id(i, t, e) {
|
|
|
10543
10544
|
Qs(() => {
|
|
10544
10545
|
B();
|
|
10545
10546
|
}), Lt(() => {
|
|
10546
|
-
e(1, u = Ps(a)), f = a, I(), N(), s.on("cameraUpdate",
|
|
10547
|
+
e(1, u = Ps(a)), f = a, I(), N(), s.on("cameraUpdate", T);
|
|
10547
10548
|
}), ln(() => {
|
|
10548
|
-
s.off("cameraUpdate",
|
|
10549
|
+
s.off("cameraUpdate", T), window.removeEventListener("resize", M, !1);
|
|
10549
10550
|
});
|
|
10550
10551
|
function J() {
|
|
10551
|
-
|
|
10552
|
+
g = this.clientWidth, v = this.clientHeight, e(3, g), e(4, v);
|
|
10552
10553
|
}
|
|
10553
10554
|
return i.$$set = (R) => {
|
|
10554
10555
|
"five" in R && e(7, s = R.five), "modelOcclusionEnable" in R && e(8, r = R.modelOcclusionEnable), "itemLabels" in R && e(9, a = R.itemLabels), "hooks" in R && e(0, l = R.hooks), "displayStrategyType" in R && e(10, c = R.displayStrategyType), "maxVisibleDistance" in R && e(11, h = R.maxVisibleDistance);
|
|
@@ -10556,10 +10557,10 @@ function Id(i, t, e) {
|
|
|
10556
10557
|
l,
|
|
10557
10558
|
u,
|
|
10558
10559
|
m,
|
|
10559
|
-
v,
|
|
10560
|
-
b,
|
|
10561
10560
|
g,
|
|
10562
|
-
|
|
10561
|
+
v,
|
|
10562
|
+
y,
|
|
10563
|
+
k,
|
|
10563
10564
|
s,
|
|
10564
10565
|
r,
|
|
10565
10566
|
a,
|
|
@@ -10597,7 +10598,7 @@ function Cd(i) {
|
|
|
10597
10598
|
}));
|
|
10598
10599
|
}
|
|
10599
10600
|
const Ld = void 0, Zf = (i, t) => {
|
|
10600
|
-
var u, m,
|
|
10601
|
+
var u, m, g, v;
|
|
10601
10602
|
const e = {
|
|
10602
10603
|
container: document.createElement("div"),
|
|
10603
10604
|
data: null,
|
|
@@ -10609,8 +10610,8 @@ const Ld = void 0, Zf = (i, t) => {
|
|
|
10609
10610
|
hooks: new At(),
|
|
10610
10611
|
modelOcclusionEnable: (u = t == null ? void 0 : t.modelOcclusionEnable) != null ? u : !0,
|
|
10611
10612
|
onlyVisibleInPanorama: (m = t == null ? void 0 : t.onlyVisibleInPanorama) != null ? m : !0,
|
|
10612
|
-
displayStrategyType: (
|
|
10613
|
-
maxVisibleDistance: (
|
|
10613
|
+
displayStrategyType: (g = t == null ? void 0 : t.displayStrategyType) != null ? g : Nt.SMALL,
|
|
10614
|
+
maxVisibleDistance: (v = t == null ? void 0 : t.maxVisibleDistance) != null ? v : Ld
|
|
10614
10615
|
};
|
|
10615
10616
|
e.container.setAttribute("class", "item-label-plugin-container"), e.container.style.cssText = `
|
|
10616
10617
|
position: absolute;
|
|
@@ -10620,15 +10621,15 @@ const Ld = void 0, Zf = (i, t) => {
|
|
|
10620
10621
|
height: 100%;
|
|
10621
10622
|
z-index: 5;
|
|
10622
10623
|
`, e.container.style.pointerEvents = "none";
|
|
10623
|
-
const n = (
|
|
10624
|
-
e.itemLabels = Cd(
|
|
10624
|
+
const n = (b) => (e.wrapper = b, b.appendChild(e.container), l(), !0), o = (b) => {
|
|
10625
|
+
e.itemLabels = Cd(b), l();
|
|
10625
10626
|
}, s = () => (e.enabled || (e.enabled = !0, l()), !0), r = () => (e.enabled && (e.enabled = !1, l()), !0), a = () => {
|
|
10626
10627
|
h(), e.container.remove();
|
|
10627
10628
|
}, l = () => {
|
|
10628
|
-
var
|
|
10629
|
+
var b;
|
|
10629
10630
|
if (!!e.wrapper) {
|
|
10630
10631
|
if (!e.enabled || !e.fiveModeEnabled) {
|
|
10631
|
-
(
|
|
10632
|
+
(b = e.app) == null || b.$destroy(), e.app = void 0;
|
|
10632
10633
|
return;
|
|
10633
10634
|
}
|
|
10634
10635
|
e.app ? e.app.$set({
|
|
@@ -10652,8 +10653,8 @@ const Ld = void 0, Zf = (i, t) => {
|
|
|
10652
10653
|
i.on("modeChange", f), i.once("dispose", a);
|
|
10653
10654
|
}, h = () => {
|
|
10654
10655
|
i.off("modeChange", f);
|
|
10655
|
-
}, f = (
|
|
10656
|
-
if (
|
|
10656
|
+
}, f = (b) => {
|
|
10657
|
+
if (b !== Se.Mode.Panorama) {
|
|
10657
10658
|
e.fiveModeEnabled = !1, r();
|
|
10658
10659
|
return;
|
|
10659
10660
|
}
|
|
@@ -10738,24 +10739,24 @@ function Dd(i) {
|
|
|
10738
10739
|
}
|
|
10739
10740
|
function zd(i, t, e) {
|
|
10740
10741
|
let { props: n } = t, { onClick: o } = t, s, { left: r, top: a, inSight: l, transform: c, panoIndex: h, cameraToward: f, name: u } = n, m = 0;
|
|
10741
|
-
const
|
|
10742
|
+
const g = () => {
|
|
10742
10743
|
if (!r || !a || !l || !s)
|
|
10743
10744
|
return;
|
|
10744
|
-
const
|
|
10745
|
-
if (r <=
|
|
10745
|
+
const y = s.current.clientWidth / window.innerWidth * 100, P = s.current.clientHeight / window.innerHeight * 100;
|
|
10746
|
+
if (r <= y / 2 || r >= 100 - y / 2 || a <= P / 2 || a >= 100 - P / 2)
|
|
10746
10747
|
return;
|
|
10747
10748
|
h !== m && (console.log("panoDoorLabelPlugin", h, "\u89E6\u53D1\u57CB\u70B9"), m = h);
|
|
10748
|
-
},
|
|
10749
|
+
}, v = (y) => {
|
|
10749
10750
|
o && o();
|
|
10750
10751
|
};
|
|
10751
|
-
function
|
|
10752
|
-
Bt[
|
|
10753
|
-
s =
|
|
10752
|
+
function b(y) {
|
|
10753
|
+
Bt[y ? "unshift" : "push"](() => {
|
|
10754
|
+
s = y, e(2, s);
|
|
10754
10755
|
});
|
|
10755
10756
|
}
|
|
10756
|
-
return i.$$set = (
|
|
10757
|
-
"props" in
|
|
10758
|
-
},
|
|
10757
|
+
return i.$$set = (y) => {
|
|
10758
|
+
"props" in y && e(0, n = y.props), "onClick" in y && e(1, o = y.onClick);
|
|
10759
|
+
}, g(), [
|
|
10759
10760
|
n,
|
|
10760
10761
|
o,
|
|
10761
10762
|
s,
|
|
@@ -10765,8 +10766,8 @@ function zd(i, t, e) {
|
|
|
10765
10766
|
c,
|
|
10766
10767
|
f,
|
|
10767
10768
|
u,
|
|
10768
|
-
|
|
10769
|
-
|
|
10769
|
+
v,
|
|
10770
|
+
b
|
|
10770
10771
|
];
|
|
10771
10772
|
}
|
|
10772
10773
|
class Md extends de {
|
|
@@ -10846,8 +10847,8 @@ class Bd extends kd {
|
|
|
10846
10847
|
return;
|
|
10847
10848
|
const u = new Ct(), m = h.clone().sub(s).normalize();
|
|
10848
10849
|
u.set(s, m);
|
|
10849
|
-
const [
|
|
10850
|
-
|
|
10850
|
+
const [g] = this.five.model.intersectRaycaster(u);
|
|
10851
|
+
g && g.distance + 0.1 < f || a.push(c);
|
|
10851
10852
|
}), this.visibleLabelMap.set(e, a), a;
|
|
10852
10853
|
}
|
|
10853
10854
|
})();
|
|
@@ -10864,29 +10865,29 @@ class Bd extends kd {
|
|
|
10864
10865
|
const o = this.five.getElement(), s = o.clientWidth, r = o.clientHeight, a = n.getWorldDirection(new $()), l = [], c = [...this.labelItems];
|
|
10865
10866
|
if (c.forEach((h, f) => {
|
|
10866
10867
|
if (h.visible) {
|
|
10867
|
-
const u = n.position.distanceTo(h.position), m = h.position.clone().add(new $(0, this.OffsetHeight, 0)),
|
|
10868
|
-
h.left =
|
|
10868
|
+
const u = n.position.distanceTo(h.position), m = h.position.clone().add(new $(0, this.OffsetHeight, 0)), v = m.clone().sub(n.position).normalize().angleTo(a), b = m.clone().project(n), y = (b.x + 1) / 2.2 * 100, P = (-b.y + 1) / 2.2 * 100, E = y >= 0 && y <= 100 && P >= 0 && P <= 100 && u > this.MinVisibledistance && u <= this.MaxVisibledistance;
|
|
10869
|
+
h.left = y, h.top = P, h.inSight = E && v < Math.PI / 2, h.cameraToward = jd(this.five), E ? l.push({ disFromCameraToLabel: u, left: y, top: P, index: f }) : h.transform = "translate(-50%, -50%)";
|
|
10869
10870
|
} else
|
|
10870
10871
|
h.inSight = !1;
|
|
10871
10872
|
}), l.length > 1) {
|
|
10872
10873
|
let h = 0;
|
|
10873
10874
|
l.sort((f, u) => u.disFromCameraToLabel - f.disFromCameraToLabel);
|
|
10874
10875
|
for (let f = 1; f < l.length; f++) {
|
|
10875
|
-
const { index: u, left: m, top:
|
|
10876
|
-
if (!
|
|
10876
|
+
const { index: u, left: m, top: g } = l[f - 1], { index: v, left: b, top: y } = l[f], P = this.container.children[u], E = this.container.children[v];
|
|
10877
|
+
if (!P || !E)
|
|
10877
10878
|
return;
|
|
10878
|
-
const
|
|
10879
|
+
const z = {
|
|
10879
10880
|
left: s * m / 100,
|
|
10880
|
-
top: r * v / 100,
|
|
10881
|
-
width: w.children[0].clientWidth,
|
|
10882
|
-
height: w.children[0].clientHeight
|
|
10883
|
-
}, z = {
|
|
10884
|
-
left: s * A / 100,
|
|
10885
10881
|
top: r * g / 100,
|
|
10882
|
+
width: P.children[0].clientWidth,
|
|
10883
|
+
height: P.children[0].clientHeight
|
|
10884
|
+
}, D = {
|
|
10885
|
+
left: s * b / 100,
|
|
10886
|
+
top: r * y / 100,
|
|
10886
10887
|
width: E.children[0].clientWidth,
|
|
10887
10888
|
height: E.children[0].clientHeight
|
|
10888
10889
|
};
|
|
10889
|
-
Sd(
|
|
10890
|
+
Sd(z, D) && (h++, c[u].transform = `translate(-50%, ${(h - 1) * 100 - 50}%)`, c[v].transform = `translate(-50%, ${h * 100 - 50}%)`);
|
|
10890
10891
|
}
|
|
10891
10892
|
}
|
|
10892
10893
|
this.labelItems = c, this.render();
|
|
@@ -10923,19 +10924,19 @@ class Bd extends kd {
|
|
|
10923
10924
|
a && a.forEach((h) => {
|
|
10924
10925
|
const f = h.position;
|
|
10925
10926
|
let u = 1 / 0, m;
|
|
10926
|
-
l.forEach((
|
|
10927
|
-
const
|
|
10928
|
-
x:
|
|
10929
|
-
y:
|
|
10930
|
-
z:
|
|
10931
|
-
},
|
|
10932
|
-
|
|
10927
|
+
l.forEach((v) => {
|
|
10928
|
+
const b = v.standingPosition, y = {
|
|
10929
|
+
x: b.x,
|
|
10930
|
+
y: b.y,
|
|
10931
|
+
z: b.z
|
|
10932
|
+
}, P = Od(f, y);
|
|
10933
|
+
P < u && (u = P, m = y);
|
|
10933
10934
|
}), m && (f.y = m.y + 0.01);
|
|
10934
|
-
const
|
|
10935
|
-
|
|
10935
|
+
const g = new $(f.x, f.y, f.z);
|
|
10936
|
+
g.add(new $(-0.2, 1.8, 0).applyEuler(new ao(0, h.rad, 0))), this.doorLabels.push({
|
|
10936
10937
|
roomName: r.name,
|
|
10937
10938
|
name: h.name,
|
|
10938
|
-
position:
|
|
10939
|
+
position: g,
|
|
10939
10940
|
toward: Nd(h.rad)
|
|
10940
10941
|
});
|
|
10941
10942
|
});
|
|
@@ -11056,31 +11057,31 @@ function of(i, t) {
|
|
|
11056
11057
|
const c = Math.ceil(s.getLength() / n * 1.5), h = s.getPoints(c), f = [];
|
|
11057
11058
|
let u = 0;
|
|
11058
11059
|
const m = i;
|
|
11059
|
-
return m.forEach((
|
|
11060
|
-
let
|
|
11061
|
-
h.forEach((I,
|
|
11062
|
-
const
|
|
11063
|
-
|
|
11060
|
+
return m.forEach((g, v) => {
|
|
11061
|
+
let b = 0, y = 99999999;
|
|
11062
|
+
h.forEach((I, T) => {
|
|
11063
|
+
const C = I.distanceTo(g);
|
|
11064
|
+
C < y && (b = T, y = C);
|
|
11064
11065
|
});
|
|
11065
|
-
const
|
|
11066
|
-
if (
|
|
11067
|
-
let I =
|
|
11068
|
-
|
|
11069
|
-
let
|
|
11070
|
-
if (
|
|
11071
|
-
const N = m[
|
|
11066
|
+
const P = h[b + 1], E = P == null ? void 0 : P.distanceTo(g), z = h[b - 1], D = z == null ? void 0 : z.distanceTo(g);
|
|
11067
|
+
if (b > u && b - u > 1) {
|
|
11068
|
+
let I = b;
|
|
11069
|
+
z !== void 0 && D > 0.8 && (I = b + 1), z !== void 0 && D > 0.2 && D < 0.3 ? I = b : y > 0.2 && y < 0.3 && (I = b + 1);
|
|
11070
|
+
let T = u;
|
|
11071
|
+
if (P !== void 0 && E > 0.2 && E < 0.3 ? T = u + 1 : y > 0.2 && y < 0.3 && (T = u), h[T] && h[T + 1]) {
|
|
11072
|
+
const N = m[v - 1];
|
|
11072
11073
|
if (N)
|
|
11073
|
-
if (N.equals(h[
|
|
11074
|
-
|
|
11074
|
+
if (N.equals(h[T]))
|
|
11075
|
+
T += 1;
|
|
11075
11076
|
else {
|
|
11076
|
-
const B = new $().subVectors(h[
|
|
11077
|
-
B.angleTo(K) < Math.PI / 2 && (
|
|
11077
|
+
const B = new $().subVectors(h[T + 1], h[T]), K = new $().subVectors(N, h[T]);
|
|
11078
|
+
B.angleTo(K) < Math.PI / 2 && (T += 1);
|
|
11078
11079
|
}
|
|
11079
11080
|
}
|
|
11080
|
-
if (I <
|
|
11081
|
+
if (I < T || I - T <= 1)
|
|
11081
11082
|
return;
|
|
11082
|
-
const
|
|
11083
|
-
f.push(M), u =
|
|
11083
|
+
const C = h.slice(T, I), M = Ls(C, e, n);
|
|
11084
|
+
f.push(M), u = b;
|
|
11084
11085
|
}
|
|
11085
11086
|
}), f;
|
|
11086
11087
|
} else {
|
|
@@ -11089,20 +11090,20 @@ function of(i, t) {
|
|
|
11089
11090
|
}
|
|
11090
11091
|
}
|
|
11091
11092
|
function Ls(i, t, e) {
|
|
11092
|
-
const n = t / 2, o = e / t, s = i.length, r = _d(i.map((
|
|
11093
|
-
i.forEach((
|
|
11093
|
+
const n = t / 2, o = e / t, s = i.length, r = _d(i.map((y) => [y.x, y.z])), l = (i.length - 1) * $d * ef, c = 2 * s, h = c * tf, f = c * nf, u = new Uint32Array(l), m = new Float32Array(h), g = new Float32Array(f);
|
|
11094
|
+
i.forEach((y, P) => {
|
|
11094
11095
|
});
|
|
11095
|
-
let
|
|
11096
|
-
for (let
|
|
11097
|
-
const [
|
|
11098
|
-
m[
|
|
11099
|
-
const M = new $(
|
|
11100
|
-
m[
|
|
11101
|
-
const N =
|
|
11102
|
-
|
|
11103
|
-
}
|
|
11104
|
-
const
|
|
11105
|
-
return
|
|
11096
|
+
let v = 0;
|
|
11097
|
+
for (let y = 0; y < i.length; y++) {
|
|
11098
|
+
const [P, E] = r[y][0], z = i[y], { x: D, y: I, z: T } = z, C = new $(D + P * n, I + 0.05, T + E * n);
|
|
11099
|
+
m[y * 6 + 0] = C.x, m[y * 6 + 1] = C.y, m[y * 6 + 2] = C.z;
|
|
11100
|
+
const M = new $(D - P * n, I + 0.05, T - E * n);
|
|
11101
|
+
m[y * 6 + 3] = M.x, m[y * 6 + 4] = M.y, m[y * 6 + 5] = M.z, v += y > 0 ? i[y - 1].clone().sub(i[y]).length() : 0;
|
|
11102
|
+
const N = v / t / o;
|
|
11103
|
+
g[y * 4 + 0] = 0, g[y * 4 + 1] = N, g[y * 4 + 2] = 1, g[y * 4 + 3] = N, y !== i.length - 1 && (u[y * 6 + 0] = y * 2 + 0, u[y * 6 + 1] = y * 2 + 2, u[y * 6 + 2] = y * 2 + 1, u[y * 6 + 3] = y * 2 + 2, u[y * 6 + 4] = y * 2 + 3, u[y * 6 + 5] = y * 2 + 1);
|
|
11104
|
+
}
|
|
11105
|
+
const b = new j.BufferGeometry();
|
|
11106
|
+
return b.setAttribute("position", new j.BufferAttribute(m, 3)), b.setAttribute("uv", new j.BufferAttribute(g, 2)), b.setIndex(new j.BufferAttribute(u, 1)), b;
|
|
11106
11107
|
}
|
|
11107
11108
|
function sf(i) {
|
|
11108
11109
|
var n;
|
|
@@ -11280,30 +11281,30 @@ class wr extends kt {
|
|
|
11280
11281
|
});
|
|
11281
11282
|
}
|
|
11282
11283
|
async load(e, n, o) {
|
|
11283
|
-
var h, f, u, m,
|
|
11284
|
+
var h, f, u, m, g;
|
|
11284
11285
|
if (this.state.disposed)
|
|
11285
11286
|
return zs();
|
|
11286
11287
|
this.privateState.fiveOriginGetProgress || (f = (h = this.five.controller) == null ? void 0 : h.cameraMotion) != null && f.getProgress || (await this.waitFiveLoaded(), this.privateState.fiveOriginGetProgress = (m = (u = this.five.controller) == null ? void 0 : u.cameraMotion) == null ? void 0 : m.getProgress), this.clear();
|
|
11287
11288
|
const s = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, r = await this.formatData(e);
|
|
11288
11289
|
this.data = r, this.hooks.emit("dataChange", r, s);
|
|
11289
11290
|
let a = [], l;
|
|
11290
|
-
const c = this.data.keyframes.filter((
|
|
11291
|
-
c.filter((
|
|
11292
|
-
var
|
|
11293
|
-
return
|
|
11294
|
-
}).map((
|
|
11295
|
-
var
|
|
11296
|
-
const
|
|
11297
|
-
if (
|
|
11298
|
-
if (l ===
|
|
11291
|
+
const c = this.data.keyframes.filter((v) => v.data.panoIndex !== void 0);
|
|
11292
|
+
c.filter((v, b) => {
|
|
11293
|
+
var y;
|
|
11294
|
+
return v.data.panoIndex !== ((y = c[b - 1]) == null ? void 0 : y.data.panoIndex);
|
|
11295
|
+
}).map((v) => v.data.panoIndex).forEach((v) => {
|
|
11296
|
+
var y, P;
|
|
11297
|
+
const b = (y = this.five.work.observers[v]) == null ? void 0 : y.floorIndex;
|
|
11298
|
+
if (b !== void 0)
|
|
11299
|
+
if (l === b) {
|
|
11299
11300
|
const E = a.length - 1;
|
|
11300
|
-
a[E] = [...(
|
|
11301
|
+
a[E] = [...(P = a[E]) != null ? P : [], v];
|
|
11301
11302
|
} else {
|
|
11302
|
-
l =
|
|
11303
|
+
l = b;
|
|
11303
11304
|
const E = a.length;
|
|
11304
|
-
a[E] = [
|
|
11305
|
+
a[E] = [v];
|
|
11305
11306
|
}
|
|
11306
|
-
}), this.GuideLine || (this.GuideLine = rf(this.five)), (
|
|
11307
|
+
}), this.GuideLine || (this.GuideLine = rf(this.five)), (g = this.GuideLine) == null || g.load({ routes: a.map((v) => ({ panoIndexList: v })) }), this.setState({ playing: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing), this.changeSpeed(this.state.speed), n && this.setState(n, { userAction: o }), console.log(`${ti} loaded`, r), this.hooks.emit("dataLoaded", r);
|
|
11307
11308
|
}
|
|
11308
11309
|
play(e) {
|
|
11309
11310
|
this.setState({ playing: !0 }, e);
|
|
@@ -11362,15 +11363,15 @@ class wr extends kt {
|
|
|
11362
11363
|
const { moveEffect: r, moveToFirstPanoEffect: a } = o;
|
|
11363
11364
|
return this.privateState.moveToFirstPanoEffect = a, o.panoIndexList.filter((l, c) => l !== o.panoIndexList[c - 1]).forEach((l, c) => {
|
|
11364
11365
|
const h = (() => {
|
|
11365
|
-
var
|
|
11366
|
+
var v, b, y, P;
|
|
11366
11367
|
const f = o.panoIndexList[c + 1];
|
|
11367
11368
|
if (f === void 0)
|
|
11368
11369
|
return;
|
|
11369
|
-
const u = (
|
|
11370
|
-
if (!m || !u || ((
|
|
11370
|
+
const u = (v = n[l]) == null ? void 0 : v.position, m = (b = n[f]) == null ? void 0 : b.position;
|
|
11371
|
+
if (!m || !u || ((y = n[l]) == null ? void 0 : y.floorIndex) !== ((P = n[f]) == null ? void 0 : P.floorIndex))
|
|
11371
11372
|
return;
|
|
11372
|
-
const
|
|
11373
|
-
return hf(
|
|
11373
|
+
const g = new j.Vector3().subVectors(m, u);
|
|
11374
|
+
return hf(g);
|
|
11374
11375
|
})();
|
|
11375
11376
|
o.moveType === void 0 || o.moveType === "justMove" ? s.push({
|
|
11376
11377
|
moveIndex: c,
|
|
@@ -11408,33 +11409,33 @@ class wr extends kt {
|
|
|
11408
11409
|
(e == null ? void 0 : e.notEmitEvent) !== !0 && r.emit("play", { userAction: (m = e == null ? void 0 : e.userAction) != null ? m : !0 });
|
|
11409
11410
|
let h = !1;
|
|
11410
11411
|
const u = await (async () => {
|
|
11411
|
-
var
|
|
11412
|
+
var g, v;
|
|
11412
11413
|
if ((e == null ? void 0 : e.playFromIndex) !== void 0)
|
|
11413
11414
|
return e.playFromIndex;
|
|
11414
11415
|
if ((e == null ? void 0 : e.playFromId) !== void 0)
|
|
11415
|
-
return (
|
|
11416
|
+
return (g = this.data) == null ? void 0 : g.keyframes.findIndex((b) => b.id === e.playFromId);
|
|
11416
11417
|
if (c != null && c.keyframeId) {
|
|
11417
|
-
const
|
|
11418
|
-
if (c != null && c.fiveState && await this.move(c.fiveState, { moveEffect: s.moveToFirstPanoEffect }),
|
|
11419
|
-
if (
|
|
11420
|
-
return
|
|
11421
|
-
if (
|
|
11422
|
-
const
|
|
11423
|
-
return await this.playKeyframe(
|
|
11418
|
+
const b = (v = this.data) == null ? void 0 : v.keyframes.find((y) => y.id === c.keyframeId);
|
|
11419
|
+
if (c != null && c.fiveState && await this.move(c.fiveState, { moveEffect: s.moveToFirstPanoEffect }), b) {
|
|
11420
|
+
if (b.data.effect === "Move")
|
|
11421
|
+
return b.index;
|
|
11422
|
+
if (b.data.effect === "Rotate") {
|
|
11423
|
+
const y = c.duration !== void 0 ? c.duration * (1 - c.playedProgress) : void 0;
|
|
11424
|
+
return await this.playKeyframe(b, { duration: y }), h = !0, b.index + 1;
|
|
11424
11425
|
}
|
|
11425
11426
|
}
|
|
11426
11427
|
}
|
|
11427
11428
|
})();
|
|
11428
11429
|
this.clearPauseData();
|
|
11429
|
-
for (const
|
|
11430
|
+
for (const g of l) {
|
|
11430
11431
|
if (s.broke || !o.playing || !s.playing || a !== s.playId)
|
|
11431
11432
|
return;
|
|
11432
|
-
if (!(u !== void 0 &&
|
|
11433
|
+
if (!(u !== void 0 && g.index < u))
|
|
11433
11434
|
try {
|
|
11434
|
-
r.emit("playIndexChange",
|
|
11435
|
+
r.emit("playIndexChange", g.index, g), await this.playKeyframe(g, {
|
|
11435
11436
|
moveEffect: h === !1 ? s.moveToFirstPanoEffect : void 0,
|
|
11436
11437
|
duration: 800
|
|
11437
|
-
}),
|
|
11438
|
+
}), g.stay && await df(g.stay), h === !1 && (h = !0);
|
|
11438
11439
|
} catch {
|
|
11439
11440
|
return Promise.resolve("broke");
|
|
11440
11441
|
}
|
|
@@ -11544,8 +11545,8 @@ class wr extends kt {
|
|
|
11544
11545
|
return;
|
|
11545
11546
|
let a = (h = n == null ? void 0 : n.duration) != null ? h : 800;
|
|
11546
11547
|
const l = (() => {
|
|
11547
|
-
var m,
|
|
11548
|
-
const f = (m = r.config) == null ? void 0 : m.speedConfig, u = (
|
|
11548
|
+
var m, g;
|
|
11549
|
+
const f = (m = r.config) == null ? void 0 : m.speedConfig, u = (g = e.moveSpeed) != null ? g : f == null ? void 0 : f.moveSpeed;
|
|
11549
11550
|
if ((f == null ? void 0 : f.moveSpeedUnit) === void 0)
|
|
11550
11551
|
return u;
|
|
11551
11552
|
if (u !== void 0)
|
|
@@ -11558,13 +11559,13 @@ class wr extends kt {
|
|
|
11558
11559
|
s.currentPlayKeyframe && (s.currentPlayKeyframe.originDuration = a);
|
|
11559
11560
|
const c = this.getSpeededDuration(a);
|
|
11560
11561
|
return new Promise((f) => {
|
|
11561
|
-
var u, m,
|
|
11562
|
+
var u, m, g;
|
|
11562
11563
|
o.moveToPano(e.panoIndex, {
|
|
11563
11564
|
latitude: e.latitude,
|
|
11564
11565
|
longitude: e.longitude,
|
|
11565
11566
|
fov: e.fov,
|
|
11566
11567
|
duration: c,
|
|
11567
|
-
effect: (
|
|
11568
|
+
effect: (g = (m = n == null ? void 0 : n.moveEffect) != null ? m : (u = this.state.config) == null ? void 0 : u.moveEffect) != null ? g : e.moveEffect,
|
|
11568
11569
|
moveCancelCallback: () => f(),
|
|
11569
11570
|
moveEndCallback: () => f()
|
|
11570
11571
|
});
|