@realsee/dnalogel 2.0.0-alpha.26-beta → 2.0.0-alpha.28-beta
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/CHANGELOG.md +10 -0
- package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +3 -48
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +4 -6
- package/dist/CameraMovementPlugin/index.js +12 -12
- package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/dist/ModelEntryDoorGuidePlugin/index.js +0 -5
- package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +8 -3
- package/dist/ModelItemLabelPlugin/index.js +14 -8
- package/dist/ModelRoomLabelPlugin/index.js +82 -46
- package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +4 -3
- package/dist/ModelTVVideoPlugin/index.js +3 -3
- package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
- package/dist/ModelViewPlugin/index.d.ts +3 -16
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/index.d.ts +4 -47
- package/dist/PanoCompassPlugin/index.js +5 -4
- package/dist/PanoMeasurePlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.js +4 -1
- package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +4 -30
- package/dist/PanoRulerPlugin/index.js +0 -5
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +4 -32
- package/dist/PanoSpatialTagPlugin/index.js +23 -21
- package/dist/_index.d.ts +30 -0
- package/dist/index.d.ts +16 -29
- package/dist/index.es.js +122 -70
- package/dist/index.js +145 -90
- package/dist/index.umd.js +145 -90
- package/docs/assets/search.js +1 -1
- package/docs/classes/ModelRoomLabelController.html +6 -6
- package/docs/classes/PanoFloorplanRadarPluginController.html +3 -0
- package/docs/enums/CameraMovementEffect.html +3 -0
- package/docs/enums/DIRECTION.html +1 -0
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +1 -1
- package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
- 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/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
- 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 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
- package/docs/interfaces/Point.html +1 -0
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +8 -8
- package/docs/modules.html +20 -12
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
- package/libs/CSS3DRenderPlugin/index.js +2 -181
- package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
- package/libs/CameraMovementPlugin/index.d.ts +4 -6
- package/libs/CameraMovementPlugin/index.js +3 -158
- package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +75 -0
- package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/libs/ModelChassisCompassPlugin/index.js +2 -74
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -139
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +1 -1
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +8 -3
- package/libs/ModelItemLabelPlugin/index.js +7 -119
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +83 -47
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
- package/libs/ModelTVVideoPlugin/index.d.ts +4 -3
- package/libs/ModelTVVideoPlugin/index.js +3 -253
- package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
- package/libs/ModelViewPlugin/Plugin.js +160 -0
- package/libs/ModelViewPlugin/index.d.ts +3 -16
- package/libs/ModelViewPlugin/index.js +2 -159
- package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/libs/PanoCompassPlugin/Plugin.js +249 -0
- package/libs/PanoCompassPlugin/index.d.ts +4 -47
- package/libs/PanoCompassPlugin/index.js +3 -249
- package/libs/PanoMeasurePlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/index.js +1 -1
- package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/libs/PanoRulerPlugin/Plugin.js +402 -0
- package/libs/PanoRulerPlugin/index.d.ts +4 -30
- package/libs/PanoRulerPlugin/index.js +2 -401
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +33 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +415 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +4 -32
- package/libs/PanoSpatialTagPlugin/index.js +4 -412
- package/libs/_index.d.ts +30 -0
- package/libs/_index.js +18 -0
- package/libs/index.d.ts +16 -29
- package/libs/index.js +25 -16
- package/package.json +6 -5
package/dist/index.umd.js
CHANGED
|
@@ -578,17 +578,19 @@
|
|
|
578
578
|
|
|
579
579
|
/* src/ModelRoomLabelPlugin/RoomLabelItems.svelte generated by Svelte v3.47.0 */
|
|
580
580
|
|
|
581
|
+
const { Map: Map_1 } = internal.globals;
|
|
582
|
+
|
|
581
583
|
function add_css$l(target) {
|
|
582
584
|
internal.append_styles(target, "svelte-9eg4zi", ".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}");
|
|
583
585
|
}
|
|
584
586
|
|
|
585
587
|
function get_each_context$9(ctx, list, i) {
|
|
586
588
|
const child_ctx = ctx.slice();
|
|
587
|
-
child_ctx[
|
|
589
|
+
child_ctx[12] = list[i];
|
|
588
590
|
return child_ctx;
|
|
589
591
|
}
|
|
590
592
|
|
|
591
|
-
// (
|
|
593
|
+
// (82:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
|
|
592
594
|
function create_each_block$9(key_1, ctx) {
|
|
593
595
|
let first;
|
|
594
596
|
let roomlabelitem;
|
|
@@ -596,7 +598,7 @@
|
|
|
596
598
|
|
|
597
599
|
roomlabelitem = new RoomLabelItem({
|
|
598
600
|
props: {
|
|
599
|
-
roomLabel: /*roomLableItem*/ ctx[
|
|
601
|
+
roomLabel: /*roomLableItem*/ ctx[12],
|
|
600
602
|
five: /*five*/ ctx[1]
|
|
601
603
|
}
|
|
602
604
|
});
|
|
@@ -617,7 +619,7 @@
|
|
|
617
619
|
p(new_ctx, dirty) {
|
|
618
620
|
ctx = new_ctx;
|
|
619
621
|
const roomlabelitem_changes = {};
|
|
620
|
-
if (dirty & /*roomLabels*/ 1) roomlabelitem_changes.roomLabel = /*roomLableItem*/ ctx[
|
|
622
|
+
if (dirty & /*roomLabels*/ 1) roomlabelitem_changes.roomLabel = /*roomLableItem*/ ctx[12];
|
|
621
623
|
if (dirty & /*five*/ 2) roomlabelitem_changes.five = /*five*/ ctx[1];
|
|
622
624
|
roomlabelitem.$set(roomlabelitem_changes);
|
|
623
625
|
},
|
|
@@ -640,11 +642,11 @@
|
|
|
640
642
|
function create_fragment$p(ctx) {
|
|
641
643
|
let div;
|
|
642
644
|
let each_blocks = [];
|
|
643
|
-
let each_1_lookup = new
|
|
645
|
+
let each_1_lookup = new Map_1();
|
|
644
646
|
let div_resize_listener;
|
|
645
647
|
let current;
|
|
646
648
|
let each_value = /*roomLabels*/ ctx[0];
|
|
647
|
-
const get_key = ctx => /*roomLableItem*/ ctx[
|
|
649
|
+
const get_key = ctx => /*roomLableItem*/ ctx[12].id;
|
|
648
650
|
|
|
649
651
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
650
652
|
let child_ctx = get_each_context$9(ctx, each_value, i);
|
|
@@ -661,7 +663,7 @@
|
|
|
661
663
|
}
|
|
662
664
|
|
|
663
665
|
internal.attr(div, "class", "room-labels-container svelte-9eg4zi");
|
|
664
|
-
internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[
|
|
666
|
+
internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[6].call(div));
|
|
665
667
|
},
|
|
666
668
|
m(target, anchor) {
|
|
667
669
|
internal.insert(target, div, anchor);
|
|
@@ -670,7 +672,7 @@
|
|
|
670
672
|
each_blocks[i].m(div, null);
|
|
671
673
|
}
|
|
672
674
|
|
|
673
|
-
div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[
|
|
675
|
+
div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[6].bind(div));
|
|
674
676
|
current = true;
|
|
675
677
|
},
|
|
676
678
|
p(ctx, [dirty]) {
|
|
@@ -710,22 +712,17 @@
|
|
|
710
712
|
}
|
|
711
713
|
|
|
712
714
|
function instance$p($$self, $$props, $$invalidate) {
|
|
715
|
+
let rendererSize;
|
|
713
716
|
let { five } = $$props;
|
|
714
717
|
let { roomLabels } = $$props;
|
|
715
718
|
let containerWidth;
|
|
716
719
|
let containerHeight;
|
|
720
|
+
let shownFloor = null;
|
|
717
721
|
|
|
718
|
-
function getLabelVisible(
|
|
719
|
-
// 先看是不是在当前展示的楼层上
|
|
720
|
-
const isLabelInFloor = five.model.shownFloor === null || roomLabelItem.floorIndex === five.model.shownFloor;
|
|
721
|
-
|
|
722
|
-
if (!isLabelInFloor) return false;
|
|
723
|
-
|
|
724
|
-
// 再看是不是被模型遮挡
|
|
722
|
+
function getLabelVisible(item) {
|
|
725
723
|
const raycaster = new THREE.Raycaster();
|
|
726
|
-
|
|
727
724
|
const cameraPosition = five.camera.position.clone();
|
|
728
|
-
const position = new THREE.Vector3(
|
|
725
|
+
const position = new THREE.Vector3(item.position.x, item.position.y, item.position.z);
|
|
729
726
|
const vectorDistance = position.distanceTo(cameraPosition);
|
|
730
727
|
raycaster.set(cameraPosition.clone(), position.clone().sub(cameraPosition).normalize());
|
|
731
728
|
const [intersection] = five.model.intersectRaycaster(raycaster);
|
|
@@ -733,53 +730,60 @@
|
|
|
733
730
|
return true;
|
|
734
731
|
}
|
|
735
732
|
|
|
736
|
-
function getLabelTransform(
|
|
737
|
-
const position = new THREE.Vector3(
|
|
733
|
+
function getLabelTransform(item, rendererSize) {
|
|
734
|
+
const position = new THREE.Vector3(item.position.x, item.position.y, item.position.z);
|
|
738
735
|
const mouse = position.clone().project(five.camera);
|
|
739
|
-
const xOffset = Math.ceil((mouse.x + 1) / 2 *
|
|
740
|
-
const yOffset = Math.ceil((-mouse.y + 1) / 2 *
|
|
736
|
+
const xOffset = Math.ceil((mouse.x + 1) / 2 * rendererSize.x);
|
|
737
|
+
const yOffset = Math.ceil((-mouse.y + 1) / 2 * rendererSize.y);
|
|
741
738
|
return `translate(${xOffset}px, ${yOffset}px)`;
|
|
742
739
|
}
|
|
743
740
|
|
|
744
|
-
function getFormatedRoomLabels(
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
741
|
+
function getFormatedRoomLabels(rendererSize) {
|
|
742
|
+
// 因为 item distance 需要重复计算,所以缓存一下
|
|
743
|
+
const distanceMap = new Map();
|
|
744
|
+
|
|
745
|
+
function getItemDistance(item) {
|
|
746
|
+
const cacheDistance = distanceMap.get(item.id);
|
|
747
|
+
if (cacheDistance) return cacheDistance;
|
|
748
|
+
const { x, y, z } = item.position;
|
|
749
|
+
const distance = new THREE.Vector3(x, y, z).clone().distanceTo(five.camera.position);
|
|
750
|
+
distanceMap.set(item.id, distance);
|
|
751
|
+
return distance;
|
|
752
|
+
}
|
|
748
753
|
|
|
749
|
-
|
|
754
|
+
const formatedItems = roomLabels.map(item => {
|
|
755
|
+
const visible = getLabelVisible(item);
|
|
750
756
|
|
|
751
|
-
|
|
752
|
-
|
|
757
|
+
const transform = visible
|
|
758
|
+
? getLabelTransform(item, rendererSize)
|
|
759
|
+
: item.transform;
|
|
753
760
|
|
|
754
|
-
|
|
755
|
-
});
|
|
761
|
+
const itemDistance = getItemDistance(item);
|
|
756
762
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
distance: new THREE.Vector3(...Object.values(roomLabelItem.position)).clone().distanceTo(five.camera.position)
|
|
760
|
-
})).sort((a, b) => a.distance - b.distance);
|
|
763
|
+
// visible === true 的 item 中,distance 比自己小的 item 个数
|
|
764
|
+
const minItemLen = roomLabels.filter(item => item.visible && getItemDistance(item) < itemDistance).length;
|
|
761
765
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
if (sortIndex !== undefined) return Object.assign(Object.assign({}, roomLabelItem), { zIndex: sortIndex * 10 });
|
|
765
|
-
return roomLabelItem;
|
|
766
|
+
const zIndex = minItemLen * 10;
|
|
767
|
+
return Object.assign(Object.assign({}, item), { visible, transform, zIndex });
|
|
766
768
|
});
|
|
769
|
+
|
|
770
|
+
return formatedItems;
|
|
767
771
|
}
|
|
768
772
|
|
|
769
773
|
function onFiveCameraUpdate() {
|
|
770
|
-
$$invalidate(0, roomLabels = getFormatedRoomLabels(
|
|
774
|
+
$$invalidate(0, roomLabels = getFormatedRoomLabels(rendererSize));
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
function onFiveModelShownFloorChange(floorIndex) {
|
|
778
|
+
$$invalidate(4, shownFloor = floorIndex);
|
|
771
779
|
}
|
|
772
780
|
|
|
773
781
|
five.on('cameraUpdate', onFiveCameraUpdate);
|
|
774
|
-
five.on('modelShownFloorChange',
|
|
782
|
+
five.on('modelShownFloorChange', onFiveModelShownFloorChange);
|
|
775
783
|
|
|
776
784
|
svelte.onDestroy(() => {
|
|
777
785
|
five.off('cameraUpdate', onFiveCameraUpdate);
|
|
778
|
-
five.off('modelShownFloorChange',
|
|
779
|
-
});
|
|
780
|
-
|
|
781
|
-
svelte.onMount(() => {
|
|
782
|
-
onFiveCameraUpdate();
|
|
786
|
+
five.off('modelShownFloorChange', onFiveModelShownFloorChange);
|
|
783
787
|
});
|
|
784
788
|
|
|
785
789
|
function div_elementresize_handler() {
|
|
@@ -794,7 +798,39 @@
|
|
|
794
798
|
if ('roomLabels' in $$props) $$invalidate(0, roomLabels = $$props.roomLabels);
|
|
795
799
|
};
|
|
796
800
|
|
|
797
|
-
|
|
801
|
+
$$self.$$.update = () => {
|
|
802
|
+
if ($$self.$$.dirty & /*containerWidth, containerHeight*/ 12) {
|
|
803
|
+
$$invalidate(5, rendererSize = { x: containerWidth, y: containerHeight });
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
if ($$self.$$.dirty & /*rendererSize*/ 32) {
|
|
807
|
+
{
|
|
808
|
+
// rendererSize 变化时,触发 reRender
|
|
809
|
+
$$invalidate(0, roomLabels = getFormatedRoomLabels(rendererSize));
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
if ($$self.$$.dirty & /*roomLabels, shownFloor*/ 17) {
|
|
814
|
+
{
|
|
815
|
+
// shownFloor 变化时,更新 item visible
|
|
816
|
+
$$invalidate(0, roomLabels = roomLabels.map(item => {
|
|
817
|
+
const isLabelInFloor = shownFloor === null || item.floorIndex === shownFloor;
|
|
818
|
+
const visible = isLabelInFloor ? item.visible : false;
|
|
819
|
+
return Object.assign(Object.assign({}, item), { visible });
|
|
820
|
+
}));
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
return [
|
|
826
|
+
roomLabels,
|
|
827
|
+
five,
|
|
828
|
+
containerWidth,
|
|
829
|
+
containerHeight,
|
|
830
|
+
shownFloor,
|
|
831
|
+
rendererSize,
|
|
832
|
+
div_elementresize_handler
|
|
833
|
+
];
|
|
798
834
|
}
|
|
799
835
|
|
|
800
836
|
class RoomLabelItems extends internal.SvelteComponent {
|
|
@@ -963,6 +999,10 @@
|
|
|
963
999
|
const ModelRoomLabelPlugin = (five) => {
|
|
964
1000
|
return new ModelRoomLabelController(five);
|
|
965
1001
|
};
|
|
1002
|
+
const modelRoomLabelPluginServerParams = {
|
|
1003
|
+
name: 'ModelRoomLabelPlugin',
|
|
1004
|
+
version: 0,
|
|
1005
|
+
};
|
|
966
1006
|
|
|
967
1007
|
exports.FLOOR_PLAN_ATTACHED_TO = void 0;
|
|
968
1008
|
(function (FLOOR_PLAN_ATTACHED_TO) {
|
|
@@ -6651,20 +6691,20 @@
|
|
|
6651
6691
|
/**
|
|
6652
6692
|
* 运镜效果
|
|
6653
6693
|
*/
|
|
6654
|
-
|
|
6694
|
+
exports.CameraMovementEffect = void 0;
|
|
6655
6695
|
(function (CameraMovementEffect) {
|
|
6656
6696
|
CameraMovementEffect["Move"] = "Move";
|
|
6657
6697
|
CameraMovementEffect["Rotate"] = "Rotate";
|
|
6658
|
-
})(CameraMovementEffect || (CameraMovementEffect = {}));
|
|
6698
|
+
})(exports.CameraMovementEffect || (exports.CameraMovementEffect = {}));
|
|
6659
6699
|
/**
|
|
6660
6700
|
* 旋转类型
|
|
6661
6701
|
*/
|
|
6662
|
-
|
|
6702
|
+
exports.Rotation = void 0;
|
|
6663
6703
|
(function (Rotation) {
|
|
6664
6704
|
Rotation["Clockwise"] = "Clockwise";
|
|
6665
6705
|
Rotation["Anticlockwise"] = "Anticlockwise";
|
|
6666
6706
|
Rotation["Loop"] = "Loop";
|
|
6667
|
-
})(Rotation || (Rotation = {}));
|
|
6707
|
+
})(exports.Rotation || (exports.Rotation = {}));
|
|
6668
6708
|
|
|
6669
6709
|
const PI_2 = Math.PI * 2;
|
|
6670
6710
|
/**
|
|
@@ -6695,18 +6735,18 @@
|
|
|
6695
6735
|
from = formatLongitude(from);
|
|
6696
6736
|
to = formatLongitude(to);
|
|
6697
6737
|
// 逆时针旋转,初始值必须是较大的值
|
|
6698
|
-
if (rotation === Rotation.Anticlockwise && from < to)
|
|
6738
|
+
if (rotation === exports.Rotation.Anticlockwise && from < to)
|
|
6699
6739
|
from += PI_2;
|
|
6700
6740
|
// 顺时针旋转,结束值必须是较大值
|
|
6701
|
-
if (rotation === Rotation.Clockwise && to < from)
|
|
6741
|
+
if (rotation === exports.Rotation.Clockwise && to < from)
|
|
6702
6742
|
to += PI_2;
|
|
6703
6743
|
// Loop 旋转,找锐角旋转
|
|
6704
6744
|
// 如果 to 比 from 大 180°,逆时针转
|
|
6705
6745
|
// 如果 from 比 to 大 180°,顺时针转
|
|
6706
|
-
if (rotation === Rotation.Loop && to - from > PI)
|
|
6707
|
-
return getLongitudeParams(from, to, Rotation.Anticlockwise);
|
|
6708
|
-
if (rotation === Rotation.Loop && from - to > PI)
|
|
6709
|
-
return getLongitudeParams(from, to, Rotation.Clockwise);
|
|
6746
|
+
if (rotation === exports.Rotation.Loop && to - from > PI)
|
|
6747
|
+
return getLongitudeParams(from, to, exports.Rotation.Anticlockwise);
|
|
6748
|
+
if (rotation === exports.Rotation.Loop && from - to > PI)
|
|
6749
|
+
return getLongitudeParams(from, to, exports.Rotation.Clockwise);
|
|
6710
6750
|
return { from, to };
|
|
6711
6751
|
};
|
|
6712
6752
|
/**
|
|
@@ -6756,7 +6796,7 @@
|
|
|
6756
6796
|
const fromLatitude = formatLatitude(currentFiveState.latitude);
|
|
6757
6797
|
const toLatitude = formatLatitude(args.latitude);
|
|
6758
6798
|
// longitude
|
|
6759
|
-
const { from: fromLongitude, to: toLongitude } = getLongitudeParams(currentFiveState.longitude, args.longitude, args.rotation || Rotation.Loop);
|
|
6799
|
+
const { from: fromLongitude, to: toLongitude } = getLongitudeParams(currentFiveState.longitude, args.longitude, args.rotation || exports.Rotation.Loop);
|
|
6760
6800
|
// fov
|
|
6761
6801
|
const fromFov = currentFiveState.fov;
|
|
6762
6802
|
const toFov = args.fov;
|
|
@@ -6814,7 +6854,7 @@
|
|
|
6814
6854
|
.onUpdate(onUpdate)
|
|
6815
6855
|
.onComplete(onComplete)
|
|
6816
6856
|
.onDestroy(onDestroy);
|
|
6817
|
-
if (args.rotation === Rotation.Loop) {
|
|
6857
|
+
if (args.rotation === exports.Rotation.Loop) {
|
|
6818
6858
|
tween.repeat(Infinity).yoyo(true);
|
|
6819
6859
|
}
|
|
6820
6860
|
/**
|
|
@@ -7785,6 +7825,11 @@
|
|
|
7785
7825
|
}
|
|
7786
7826
|
}
|
|
7787
7827
|
|
|
7828
|
+
const panoCompassPluginServerParams = {
|
|
7829
|
+
name: 'PanoCompassPlugin',
|
|
7830
|
+
version: 0,
|
|
7831
|
+
};
|
|
7832
|
+
|
|
7788
7833
|
/** 交换数组元素 */
|
|
7789
7834
|
function exchange(array, index1, index2) {
|
|
7790
7835
|
const value = array[index1];
|
|
@@ -14074,7 +14119,9 @@
|
|
|
14074
14119
|
}))
|
|
14075
14120
|
continue;
|
|
14076
14121
|
const raycaster = new THREE__namespace.Raycaster(camera.position.clone().setY(RAY_ORIGIN_Y), point.position.clone().sub(camera.position.clone().setY(RAY_ORIGIN_Y)).normalize(), 0, point.distance + RAY_TOLERANT_DISTANCE);
|
|
14077
|
-
const [intersect] = five$1.model.
|
|
14122
|
+
const [intersect] = five$1.model.bvhs.loaded ?
|
|
14123
|
+
five$1.model.intersectRaycaster(raycaster) :
|
|
14124
|
+
raycaster.intersectObjects(five$1.model.children, true);
|
|
14078
14125
|
if (!intersect)
|
|
14079
14126
|
continue;
|
|
14080
14127
|
if (point.distance - intersect.distance < RAY_TOLERANT_DISTANCE) {
|
|
@@ -14115,10 +14162,10 @@
|
|
|
14115
14162
|
return newTags;
|
|
14116
14163
|
};
|
|
14117
14164
|
/** 标签数据加载
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14165
|
+
* @param data.points {Array} 标签数据
|
|
14166
|
+
* @param data.enabled {Boolean} 插件是否启用
|
|
14167
|
+
* @param data.folded {Boolean} 标签是否默认展开
|
|
14168
|
+
*/
|
|
14122
14169
|
const load = (data) => {
|
|
14123
14170
|
state.points = data.points.map(point => {
|
|
14124
14171
|
var _a, _b;
|
|
@@ -14142,16 +14189,16 @@
|
|
|
14142
14189
|
state.folded = data.folded;
|
|
14143
14190
|
};
|
|
14144
14191
|
/** 标签启用
|
|
14145
|
-
|
|
14146
|
-
|
|
14192
|
+
* 启用插件并重新计算展示标签
|
|
14193
|
+
*/
|
|
14147
14194
|
const enable = () => {
|
|
14148
14195
|
state.enabled = true;
|
|
14149
14196
|
updateTags();
|
|
14150
14197
|
};
|
|
14151
14198
|
/** 插件禁用
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14199
|
+
* 1. 禁用同时会清除已展示的标签
|
|
14200
|
+
* 2. 再次启用时会重新计算展示标签
|
|
14201
|
+
*/
|
|
14155
14202
|
const disable = () => {
|
|
14156
14203
|
state.enabled = false;
|
|
14157
14204
|
origins.$set({ origins: [] });
|
|
@@ -14163,9 +14210,9 @@
|
|
|
14163
14210
|
state.tags = [];
|
|
14164
14211
|
};
|
|
14165
14212
|
/** 展开所有标签
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14213
|
+
* 1. 展开所有收起的标签
|
|
14214
|
+
* 2. 新标签会默认展开
|
|
14215
|
+
*/
|
|
14169
14216
|
const unfoldAll = () => {
|
|
14170
14217
|
state.folded = false;
|
|
14171
14218
|
state.tags.forEach(tag => {
|
|
@@ -14173,9 +14220,9 @@
|
|
|
14173
14220
|
});
|
|
14174
14221
|
};
|
|
14175
14222
|
/** 收起所有标签
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14223
|
+
* 1. 收起所有展开的标签
|
|
14224
|
+
* 2. 新标签会默认收起
|
|
14225
|
+
*/
|
|
14179
14226
|
const foldAll = () => {
|
|
14180
14227
|
state.folded = true;
|
|
14181
14228
|
state.tags.forEach(tag => {
|
|
@@ -14183,8 +14230,8 @@
|
|
|
14183
14230
|
});
|
|
14184
14231
|
};
|
|
14185
14232
|
/** 展开单个标签
|
|
14186
|
-
|
|
14187
|
-
|
|
14233
|
+
* @param id {Number | String} 标签ID
|
|
14234
|
+
*/
|
|
14188
14235
|
const unfold = (id) => {
|
|
14189
14236
|
state.tags.forEach(tag => {
|
|
14190
14237
|
if (tag.id === id)
|
|
@@ -14192,8 +14239,8 @@
|
|
|
14192
14239
|
});
|
|
14193
14240
|
};
|
|
14194
14241
|
/** 收起单个标签
|
|
14195
|
-
|
|
14196
|
-
|
|
14242
|
+
* @param id {Number | String} 标签ID
|
|
14243
|
+
*/
|
|
14197
14244
|
const fold = (id) => {
|
|
14198
14245
|
state.tags.forEach(tag => {
|
|
14199
14246
|
if (tag.id === id)
|
|
@@ -14227,7 +14274,7 @@
|
|
|
14227
14274
|
five$1.on('cameraUpdate', onCameraUpdate);
|
|
14228
14275
|
}
|
|
14229
14276
|
else {
|
|
14230
|
-
five$1.once('
|
|
14277
|
+
five$1.once('modelLoaded', () => {
|
|
14231
14278
|
if (!wrapper)
|
|
14232
14279
|
wrapper = five$1.getElement().parentElement;
|
|
14233
14280
|
wrapper.appendChild(container);
|
|
@@ -14253,13 +14300,13 @@
|
|
|
14253
14300
|
};
|
|
14254
14301
|
};
|
|
14255
14302
|
|
|
14256
|
-
|
|
14303
|
+
exports.DISPLAY_STRATEGY_TYPE = void 0;
|
|
14257
14304
|
(function (DISPLAY_STRATEGY_TYPE) {
|
|
14258
14305
|
DISPLAY_STRATEGY_TYPE["SMALL"] = "small";
|
|
14259
14306
|
DISPLAY_STRATEGY_TYPE["MIDLLE"] = "middle";
|
|
14260
14307
|
DISPLAY_STRATEGY_TYPE["LARGE"] = "large";
|
|
14261
14308
|
DISPLAY_STRATEGY_TYPE["EXTRA_LARGE"] = "x-large";
|
|
14262
|
-
})(DISPLAY_STRATEGY_TYPE || (DISPLAY_STRATEGY_TYPE = {}));
|
|
14309
|
+
})(exports.DISPLAY_STRATEGY_TYPE || (exports.DISPLAY_STRATEGY_TYPE = {}));
|
|
14263
14310
|
|
|
14264
14311
|
/* src/ModelItemLabelPlugin/ItemLabelItem.svelte generated by Svelte v3.47.0 */
|
|
14265
14312
|
|
|
@@ -14399,7 +14446,7 @@
|
|
|
14399
14446
|
return child_ctx;
|
|
14400
14447
|
}
|
|
14401
14448
|
|
|
14402
|
-
// (
|
|
14449
|
+
// (163:1) {#each renderItemLabels as itemLabelItem (itemLabelItem.id)}
|
|
14403
14450
|
function create_each_block(key_1, ctx) {
|
|
14404
14451
|
let first;
|
|
14405
14452
|
let itemlabelitem;
|
|
@@ -14600,13 +14647,13 @@
|
|
|
14600
14647
|
|
|
14601
14648
|
function getStrokeLength(itemSpaceHeight, type) {
|
|
14602
14649
|
switch (type) {
|
|
14603
|
-
case DISPLAY_STRATEGY_TYPE.SMALL:
|
|
14650
|
+
case exports.DISPLAY_STRATEGY_TYPE.SMALL:
|
|
14604
14651
|
return Math.ceil(-27.78 * itemSpaceHeight + 85);
|
|
14605
|
-
case DISPLAY_STRATEGY_TYPE.MIDLLE:
|
|
14652
|
+
case exports.DISPLAY_STRATEGY_TYPE.MIDLLE:
|
|
14606
14653
|
return Math.ceil(-38.9 * itemSpaceHeight + 130);
|
|
14607
|
-
case DISPLAY_STRATEGY_TYPE.LARGE:
|
|
14654
|
+
case exports.DISPLAY_STRATEGY_TYPE.LARGE:
|
|
14608
14655
|
return Math.ceil(-44.44 * itemSpaceHeight + 140);
|
|
14609
|
-
case DISPLAY_STRATEGY_TYPE.EXTRA_LARGE:
|
|
14656
|
+
case exports.DISPLAY_STRATEGY_TYPE.EXTRA_LARGE:
|
|
14610
14657
|
return Math.ceil(-92.59 * itemSpaceHeight + 300);
|
|
14611
14658
|
}
|
|
14612
14659
|
}
|
|
@@ -14782,7 +14829,7 @@
|
|
|
14782
14829
|
app: undefined,
|
|
14783
14830
|
hooks: new five.Subscribe(),
|
|
14784
14831
|
modelOcclusionEnable: (_a = params === null || params === void 0 ? void 0 : params.modelOcclusionEnable) !== null && _a !== void 0 ? _a : true,
|
|
14785
|
-
displayStrategyType: (_b = params === null || params === void 0 ? void 0 : params.displayStrategyType) !== null && _b !== void 0 ? _b : DISPLAY_STRATEGY_TYPE.SMALL,
|
|
14832
|
+
displayStrategyType: (_b = params === null || params === void 0 ? void 0 : params.displayStrategyType) !== null && _b !== void 0 ? _b : exports.DISPLAY_STRATEGY_TYPE.SMALL,
|
|
14786
14833
|
};
|
|
14787
14834
|
pluginState.container.setAttribute('class', 'model-item-label-plugin-container');
|
|
14788
14835
|
pluginState.container.style.cssText = `
|
|
@@ -14886,13 +14933,18 @@
|
|
|
14886
14933
|
};
|
|
14887
14934
|
};
|
|
14888
14935
|
|
|
14889
|
-
|
|
14936
|
+
const modelItemLabelPluginServerParams = {
|
|
14937
|
+
name: 'ModelItemLabelPlugin',
|
|
14938
|
+
version: 0,
|
|
14939
|
+
};
|
|
14940
|
+
|
|
14941
|
+
exports.DIRECTION = void 0;
|
|
14890
14942
|
(function (DIRECTION) {
|
|
14891
14943
|
DIRECTION["TOP_LEFT"] = "topLeft";
|
|
14892
14944
|
DIRECTION["TOP_RIGHT"] = "topRight";
|
|
14893
14945
|
DIRECTION["BOTTOM_LEFT"] = "bottomLeft";
|
|
14894
14946
|
DIRECTION["BOTTOM_RIGHT"] = "bottomRight";
|
|
14895
|
-
})(DIRECTION || (DIRECTION = {}));
|
|
14947
|
+
})(exports.DIRECTION || (exports.DIRECTION = {}));
|
|
14896
14948
|
|
|
14897
14949
|
function parseModelTVVideoPoints(points) {
|
|
14898
14950
|
if (points.length === 0)
|
|
@@ -14901,7 +14953,7 @@
|
|
|
14901
14953
|
return points;
|
|
14902
14954
|
let newPoints = [];
|
|
14903
14955
|
points.map(point => {
|
|
14904
|
-
const newPoint = [point[DIRECTION.TOP_LEFT], point[DIRECTION.BOTTOM_LEFT], point[DIRECTION.BOTTOM_RIGHT], point[DIRECTION.TOP_RIGHT]];
|
|
14956
|
+
const newPoint = [point[exports.DIRECTION.TOP_LEFT], point[exports.DIRECTION.BOTTOM_LEFT], point[exports.DIRECTION.BOTTOM_RIGHT], point[exports.DIRECTION.TOP_RIGHT]];
|
|
14905
14957
|
newPoints.push(newPoint);
|
|
14906
14958
|
});
|
|
14907
14959
|
return newPoints;
|
|
@@ -15175,6 +15227,9 @@
|
|
|
15175
15227
|
exports.PanoRulerPlugin = PanoRulerPlugin;
|
|
15176
15228
|
exports.PanoSpatialTagPlugin = PanoSpatialTagPlugin;
|
|
15177
15229
|
exports.TopviewFloorplanPlugin = TopviewFloorplanPlugin;
|
|
15230
|
+
exports.modelItemLabelPluginServerParams = modelItemLabelPluginServerParams;
|
|
15231
|
+
exports.modelRoomLabelPluginServerParams = modelRoomLabelPluginServerParams;
|
|
15232
|
+
exports.panoCompassPluginServerParams = panoCompassPluginServerParams;
|
|
15178
15233
|
|
|
15179
15234
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
15180
15235
|
|