@realsee/dnalogel 2.0.0-alpha.18 → 2.0.0-alpha.20
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/index.d.ts +2 -2
- package/dist/CameraMovementPlugin/index.js +15 -40
- package/dist/CameraMovementPlugin/typing.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/index.js +3 -28
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/dist/ModelEntryDoorGuidePlugin/index.js +8 -33
- package/dist/ModelItemLabelPlugin/events.type.d.ts +2 -2
- package/dist/ModelItemLabelPlugin/typings.d.ts +2 -2
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.js +3 -28
- package/dist/PanoCompassPlugin/index.js +53 -86
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.js +2 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.js +3 -28
- package/dist/PanoSpatialTagPlugin/typings.d.ts +1 -1
- package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
- package/dist/floorplan/ModelFloorplanPlugin/index.js +1253 -1284
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +61 -183
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +1243 -1235
- package/dist/floorplan/utils/formatPosition.d.ts +1 -1
- package/dist/index.es.js +1431 -1435
- package/dist/index.js +1430 -1434
- package/dist/index.umd.js +1430 -1434
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/dist/shared-utils/three/getNormal.d.ts +1 -1
- package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/ModelRoomLabelController.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.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/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/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -1
- package/docs/modules.html +12 -12
- package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
- package/libs/CameraMovementPlugin/index.js +15 -24
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +3 -12
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/libs/ModelEntryDoorGuidePlugin/index.js +8 -17
- package/libs/ModelItemLabelPlugin/events.type.d.ts +2 -2
- package/libs/ModelItemLabelPlugin/typings.d.ts +2 -2
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.js +3 -12
- package/libs/ModelTVVideoPlugin/typings.js +1 -0
- package/libs/PanoCompassPlugin/index.js +49 -64
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/libs/PanoMeasurePlugin/Model/line.js +1 -1
- package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +2 -0
- package/libs/PanoMeasurePlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +1 -0
- package/libs/PanoRulerPlugin/index.d.ts +1 -1
- package/libs/PanoRulerPlugin/index.js +3 -12
- package/libs/PanoSpatialTagPlugin/typings.d.ts +1 -1
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Camera.js +2 -2
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Compass.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components/CurrentFloor → Components}/CurrentFloor.js +73 -80
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Main.js +186 -105
- package/libs/floorplan/Components/RoomHighlight/Room.js +5 -7
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +24 -116
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabel.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabels.js +2 -2
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +26 -22
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RuleLabels/RuleLabels.js +82 -32
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +34 -43
- package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +22 -33
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -12
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +80 -54
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
- package/libs/floorplan/utils/formatData.js +28 -43
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +2 -2
- package/libs/shared-utils/five/changeMode.js +12 -23
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.js +9 -20
- package/libs/shared-utils/three/loadTexture.js +6 -17
- package/libs/shared-utils/to.js +10 -21
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +0 -301
|
@@ -4,32 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var internal = require('svelte/internal');
|
|
6
6
|
var svelte = require('svelte');
|
|
7
|
-
var three = require('three');
|
|
8
|
-
|
|
9
|
-
/*! *****************************************************************************
|
|
10
|
-
Copyright (c) Microsoft Corporation.
|
|
11
|
-
|
|
12
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
-
purpose with or without fee is hereby granted.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
-
***************************************************************************** */
|
|
23
|
-
|
|
24
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
25
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
26
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
27
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
28
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
29
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
30
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
7
|
|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uKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==';
|
|
35
9
|
|
|
@@ -662,9 +636,9 @@ function pathD(points, options = {}) {
|
|
|
662
636
|
return d + (needZ ? 'Z' : '');
|
|
663
637
|
}
|
|
664
638
|
/** 把户型图上点点位转换到 SVG 上的点位 */
|
|
665
|
-
function formatFloorplanPoint({ x, y },
|
|
639
|
+
function formatFloorplanPoint({ x, y }, bounding) {
|
|
666
640
|
const { max, min } = bounding;
|
|
667
|
-
return { x:
|
|
641
|
+
return { x: x - min.x, y: max.y - y };
|
|
668
642
|
}
|
|
669
643
|
/** 模型坐标转户型图坐标 */
|
|
670
644
|
function modelPosition2FloorplanPosition(position, floorplanData) {
|
|
@@ -721,45 +695,43 @@ function create_fragment$3(ctx) {
|
|
|
721
695
|
}
|
|
722
696
|
|
|
723
697
|
function instance$3($$self, $$props, $$invalidate) {
|
|
724
|
-
let { pxmm } = $$props;
|
|
725
698
|
let { room } = $$props;
|
|
726
699
|
let { floorplanData } = $$props;
|
|
727
700
|
const { bounding } = floorplanData;
|
|
728
701
|
|
|
729
702
|
const _pathD = pathD(room.path, {
|
|
730
703
|
needZ: true,
|
|
731
|
-
format: vector => formatFloorplanPoint(vector,
|
|
704
|
+
format: vector => formatFloorplanPoint(vector, bounding)
|
|
732
705
|
});
|
|
733
706
|
|
|
734
707
|
$$self.$$set = $$props => {
|
|
735
|
-
if ('
|
|
736
|
-
if ('
|
|
737
|
-
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
708
|
+
if ('room' in $$props) $$invalidate(1, room = $$props.room);
|
|
709
|
+
if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
|
|
738
710
|
};
|
|
739
711
|
|
|
740
|
-
return [_pathD,
|
|
712
|
+
return [_pathD, room, floorplanData];
|
|
741
713
|
}
|
|
742
714
|
|
|
743
715
|
class Room extends internal.SvelteComponent {
|
|
744
716
|
constructor(options) {
|
|
745
717
|
super();
|
|
746
|
-
internal.init(this, options, instance$3, create_fragment$3, internal.safe_not_equal, {
|
|
718
|
+
internal.init(this, options, instance$3, create_fragment$3, internal.safe_not_equal, { room: 1, floorplanData: 2 }, add_css$2);
|
|
747
719
|
}
|
|
748
720
|
}
|
|
749
721
|
|
|
750
722
|
/* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
|
|
751
723
|
|
|
752
724
|
function add_css$1(target) {
|
|
753
|
-
internal.append_styles(target, "svelte-
|
|
725
|
+
internal.append_styles(target, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
|
|
754
726
|
}
|
|
755
727
|
|
|
756
728
|
function get_each_context(ctx, list, i) {
|
|
757
729
|
const child_ctx = ctx.slice();
|
|
758
|
-
child_ctx[
|
|
730
|
+
child_ctx[4] = list[i];
|
|
759
731
|
return child_ctx;
|
|
760
732
|
}
|
|
761
733
|
|
|
762
|
-
// (
|
|
734
|
+
// (10:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
|
|
763
735
|
function create_each_block(key_1, ctx) {
|
|
764
736
|
let first;
|
|
765
737
|
let room;
|
|
@@ -767,9 +739,8 @@ function create_each_block(key_1, ctx) {
|
|
|
767
739
|
|
|
768
740
|
const room_spread_levels = [
|
|
769
741
|
{
|
|
770
|
-
room: /*room*/ ctx[
|
|
771
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
772
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
742
|
+
room: /*room*/ ctx[4],
|
|
743
|
+
floorplanData: /*floorplanData*/ ctx[1]
|
|
773
744
|
}
|
|
774
745
|
];
|
|
775
746
|
|
|
@@ -797,12 +768,11 @@ function create_each_block(key_1, ctx) {
|
|
|
797
768
|
p(new_ctx, dirty) {
|
|
798
769
|
ctx = new_ctx;
|
|
799
770
|
|
|
800
|
-
const room_changes = (dirty & /*floorplanData, floorIndex
|
|
771
|
+
const room_changes = (dirty & /*floorplanData, floorIndex*/ 3)
|
|
801
772
|
? internal.get_spread_update(room_spread_levels, [
|
|
802
773
|
{
|
|
803
|
-
room: /*room*/ ctx[
|
|
804
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
805
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
774
|
+
room: /*room*/ ctx[4],
|
|
775
|
+
floorplanData: /*floorplanData*/ ctx[1]
|
|
806
776
|
}
|
|
807
777
|
])
|
|
808
778
|
: {};
|
|
@@ -830,12 +800,9 @@ function create_fragment$2(ctx) {
|
|
|
830
800
|
let svg;
|
|
831
801
|
let each_blocks = [];
|
|
832
802
|
let each_1_lookup = new Map();
|
|
833
|
-
let div_resize_listener;
|
|
834
803
|
let current;
|
|
835
|
-
let
|
|
836
|
-
|
|
837
|
-
let each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
|
|
838
|
-
const get_key = ctx => /*room*/ ctx[12].id;
|
|
804
|
+
let each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
|
|
805
|
+
const get_key = ctx => /*room*/ ctx[4].id;
|
|
839
806
|
|
|
840
807
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
841
808
|
let child_ctx = get_each_context(ctx, each_value, i);
|
|
@@ -852,9 +819,11 @@ function create_fragment$2(ctx) {
|
|
|
852
819
|
each_blocks[i].c();
|
|
853
820
|
}
|
|
854
821
|
|
|
855
|
-
internal.attr(svg, "
|
|
856
|
-
internal.attr(
|
|
857
|
-
internal.
|
|
822
|
+
internal.attr(svg, "width", "100%");
|
|
823
|
+
internal.attr(svg, "height", "100%");
|
|
824
|
+
internal.attr(svg, "viewBox", `0 0 ${/*boundingWidth*/ ctx[2]} ${/*boundingHeight*/ ctx[3]}`);
|
|
825
|
+
internal.attr(svg, "class", "svelte-1kqo6e4");
|
|
826
|
+
internal.attr(div, "class", "floorplan-plugin__room-highlight svelte-1kqo6e4");
|
|
858
827
|
},
|
|
859
828
|
m(target, anchor) {
|
|
860
829
|
internal.insert(target, div, anchor);
|
|
@@ -864,18 +833,11 @@ function create_fragment$2(ctx) {
|
|
|
864
833
|
each_blocks[i].m(svg, null);
|
|
865
834
|
}
|
|
866
835
|
|
|
867
|
-
/*div_binding*/ ctx[9](div);
|
|
868
|
-
div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[10].bind(div));
|
|
869
836
|
current = true;
|
|
870
|
-
|
|
871
|
-
if (!mounted) {
|
|
872
|
-
dispose = internal.listen(div, "click", /*handleClick*/ ctx[6]);
|
|
873
|
-
mounted = true;
|
|
874
|
-
}
|
|
875
837
|
},
|
|
876
838
|
p(ctx, [dirty]) {
|
|
877
|
-
if (dirty & /*floorplanData, floorIndex
|
|
878
|
-
each_value = /*floorplanData*/ ctx[
|
|
839
|
+
if (dirty & /*floorplanData, floorIndex*/ 3) {
|
|
840
|
+
each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
|
|
879
841
|
internal.group_outros();
|
|
880
842
|
each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block, null, get_each_context);
|
|
881
843
|
internal.check_outros();
|
|
@@ -903,106 +865,28 @@ function create_fragment$2(ctx) {
|
|
|
903
865
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
904
866
|
each_blocks[i].d();
|
|
905
867
|
}
|
|
906
|
-
|
|
907
|
-
/*div_binding*/ ctx[9](null);
|
|
908
|
-
div_resize_listener();
|
|
909
|
-
mounted = false;
|
|
910
|
-
dispose();
|
|
911
868
|
}
|
|
912
869
|
};
|
|
913
870
|
}
|
|
914
871
|
|
|
915
872
|
function instance$2($$self, $$props, $$invalidate) {
|
|
916
|
-
let { five } = $$props;
|
|
917
|
-
let { pxmm } = $$props;
|
|
918
873
|
let { floorIndex } = $$props;
|
|
919
874
|
let { floorplanData } = $$props;
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
let clientHeight;
|
|
923
|
-
let highlightContainerDom;
|
|
924
|
-
const { observers: floorplan_observers } = floorplanData;
|
|
925
|
-
|
|
926
|
-
const handleClick = function (e) {
|
|
927
|
-
if ((onRoomHeightClick === null || onRoomHeightClick === void 0
|
|
928
|
-
? void 0
|
|
929
|
-
: onRoomHeightClick(e)) === false) return;
|
|
930
|
-
|
|
931
|
-
// 因为 mouse.offsetX 的兼容性问题,手动计算 mouse offsetX offsetY
|
|
932
|
-
const boundingClientRect = highlightContainerDom.getBoundingClientRect();
|
|
933
|
-
|
|
934
|
-
const mouseClientVector = new three.Vector2(e.clientX, e.clientY);
|
|
935
|
-
const domTopLeftVector = new three.Vector2(boundingClientRect.left, boundingClientRect.top);
|
|
936
|
-
const mouseOffsetVector = mouseClientVector.clone().sub(domTopLeftVector);
|
|
937
|
-
|
|
938
|
-
// px 转换为 百分比
|
|
939
|
-
const mouseOffsetRelativeVector = new three.Vector2(mouseOffsetVector.x / clientWidth, mouseOffsetVector.y / clientHeight);
|
|
940
|
-
|
|
941
|
-
const closestPoint = floorplan_observers.filter(observer => observer.floorIndex === floorIndex).sort((ob1, ob2) => {
|
|
942
|
-
const position1 = new three.Vector2(ob1.positionInImage.x, ob1.positionInImage.y);
|
|
943
|
-
const position2 = new three.Vector2(ob2.positionInImage.x, ob2.positionInImage.y);
|
|
944
|
-
return position1.distanceTo(mouseOffsetRelativeVector) - position2.distanceTo(mouseOffsetRelativeVector);
|
|
945
|
-
})[0];
|
|
946
|
-
|
|
947
|
-
five.moveToPano(closestPoint.index);
|
|
948
|
-
};
|
|
949
|
-
|
|
950
|
-
function div_binding($$value) {
|
|
951
|
-
internal.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
952
|
-
highlightContainerDom = $$value;
|
|
953
|
-
$$invalidate(5, highlightContainerDom);
|
|
954
|
-
});
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
function div_elementresize_handler() {
|
|
958
|
-
clientWidth = this.clientWidth;
|
|
959
|
-
clientHeight = this.clientHeight;
|
|
960
|
-
$$invalidate(3, clientWidth);
|
|
961
|
-
$$invalidate(4, clientHeight);
|
|
962
|
-
}
|
|
875
|
+
const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
|
|
876
|
+
const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
|
|
963
877
|
|
|
964
878
|
$$self.$$set = $$props => {
|
|
965
|
-
if ('
|
|
966
|
-
if ('
|
|
967
|
-
if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
|
|
968
|
-
if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
|
|
969
|
-
if ('onRoomHeightClick' in $$props) $$invalidate(8, onRoomHeightClick = $$props.onRoomHeightClick);
|
|
879
|
+
if ('floorIndex' in $$props) $$invalidate(0, floorIndex = $$props.floorIndex);
|
|
880
|
+
if ('floorplanData' in $$props) $$invalidate(1, floorplanData = $$props.floorplanData);
|
|
970
881
|
};
|
|
971
882
|
|
|
972
|
-
return [
|
|
973
|
-
pxmm,
|
|
974
|
-
floorIndex,
|
|
975
|
-
floorplanData,
|
|
976
|
-
clientWidth,
|
|
977
|
-
clientHeight,
|
|
978
|
-
highlightContainerDom,
|
|
979
|
-
handleClick,
|
|
980
|
-
five,
|
|
981
|
-
onRoomHeightClick,
|
|
982
|
-
div_binding,
|
|
983
|
-
div_elementresize_handler
|
|
984
|
-
];
|
|
883
|
+
return [floorIndex, floorplanData, boundingWidth, boundingHeight];
|
|
985
884
|
}
|
|
986
885
|
|
|
987
886
|
class RoomHighlight extends internal.SvelteComponent {
|
|
988
887
|
constructor(options) {
|
|
989
888
|
super();
|
|
990
|
-
|
|
991
|
-
internal.init(
|
|
992
|
-
this,
|
|
993
|
-
options,
|
|
994
|
-
instance$2,
|
|
995
|
-
create_fragment$2,
|
|
996
|
-
internal.safe_not_equal,
|
|
997
|
-
{
|
|
998
|
-
five: 7,
|
|
999
|
-
pxmm: 0,
|
|
1000
|
-
floorIndex: 1,
|
|
1001
|
-
floorplanData: 2,
|
|
1002
|
-
onRoomHeightClick: 8
|
|
1003
|
-
},
|
|
1004
|
-
add_css$1
|
|
1005
|
-
);
|
|
889
|
+
internal.init(this, options, instance$2, create_fragment$2, internal.safe_not_equal, { floorIndex: 0, floorplanData: 1 }, add_css$1);
|
|
1006
890
|
}
|
|
1007
891
|
}
|
|
1008
892
|
|
|
@@ -1518,26 +1402,22 @@ class Main extends internal.SvelteComponent {
|
|
|
1518
1402
|
|
|
1519
1403
|
const FLOORPLAN_EXTRA_OBJECT_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1N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
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
url: item.url,
|
|
1529
|
-
svgUrl: item.svg_url,
|
|
1530
|
-
};
|
|
1531
|
-
if (item.svg_url) {
|
|
1532
|
-
const svgContent = yield fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
1533
|
-
outlineItem.svgContent = svgContent;
|
|
1534
|
-
}
|
|
1535
|
-
return outlineItem;
|
|
1536
|
-
});
|
|
1405
|
+
async function formatOutlines(outlines) {
|
|
1406
|
+
const headers = new Headers({ 'Content-Type': 'text/plain' });
|
|
1407
|
+
const getOutlineItem = async function (item) {
|
|
1408
|
+
const outlineItem = {
|
|
1409
|
+
index: item.index,
|
|
1410
|
+
url: item.url,
|
|
1411
|
+
svgUrl: item.svg_url,
|
|
1537
1412
|
};
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1413
|
+
if (item.svg_url) {
|
|
1414
|
+
const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
1415
|
+
outlineItem.svgContent = svgContent;
|
|
1416
|
+
}
|
|
1417
|
+
return outlineItem;
|
|
1418
|
+
};
|
|
1419
|
+
const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
|
|
1420
|
+
return svgOutlineItems;
|
|
1541
1421
|
}
|
|
1542
1422
|
function formatRoom(data) {
|
|
1543
1423
|
const floorplanRoomItem = {
|
|
@@ -1583,21 +1463,19 @@ function formatFloorplanEntrance(data) {
|
|
|
1583
1463
|
};
|
|
1584
1464
|
return floorplanEntrance;
|
|
1585
1465
|
}
|
|
1586
|
-
function formatData(data) {
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
return floorplanData;
|
|
1600
|
-
});
|
|
1466
|
+
async function formatData(data) {
|
|
1467
|
+
const outlines = await formatOutlines(data.outlines);
|
|
1468
|
+
const bounding = data.computed_data.bounding;
|
|
1469
|
+
const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
|
|
1470
|
+
const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
|
|
1471
|
+
const floorplanData = {
|
|
1472
|
+
outlines,
|
|
1473
|
+
entrance,
|
|
1474
|
+
bounding,
|
|
1475
|
+
floorDatas,
|
|
1476
|
+
observers: data.computed_data.observers.map(formateFloorplanObserver),
|
|
1477
|
+
};
|
|
1478
|
+
return floorplanData;
|
|
1601
1479
|
}
|
|
1602
1480
|
function formatExtraObjects(data, five, floorplanData) {
|
|
1603
1481
|
const extraObjects = data.map((object) => {
|
|
@@ -1680,9 +1558,9 @@ class PanoFloorplanRadarPluginController {
|
|
|
1680
1558
|
enumerable: true,
|
|
1681
1559
|
configurable: true,
|
|
1682
1560
|
writable: true,
|
|
1683
|
-
value: (data) =>
|
|
1561
|
+
value: async (data) => {
|
|
1684
1562
|
const copyData = JSON.parse(JSON.stringify(data));
|
|
1685
|
-
const floorplanData =
|
|
1563
|
+
const floorplanData = await formatData(copyData);
|
|
1686
1564
|
this.data = floorplanData;
|
|
1687
1565
|
// const loadImage = async () => {
|
|
1688
1566
|
// const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
|
|
@@ -1700,7 +1578,7 @@ class PanoFloorplanRadarPluginController {
|
|
|
1700
1578
|
// }
|
|
1701
1579
|
// await loadImage()
|
|
1702
1580
|
this.render();
|
|
1703
|
-
}
|
|
1581
|
+
}
|
|
1704
1582
|
});
|
|
1705
1583
|
this.five = five;
|
|
1706
1584
|
(params === null || params === void 0 ? void 0 : params.configs) && Object.assign(this.configs, params.configs);
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { FLOOR_PLAN_ATTACHED_TO } from '../constant';
|
|
2
3
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
3
4
|
import type { FloorplanRoomItem } from '../typings/floorplanData';
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/** TopviewFloorplanPlugin 配置参数 */
|
|
6
|
+
interface Configs {
|
|
6
7
|
northDesc?: string;
|
|
7
|
-
selector?: string | Element;
|
|
8
|
-
scale?: number;
|
|
9
8
|
modelOpacity?: number;
|
|
10
9
|
cameraImageUrl?: string;
|
|
10
|
+
/** 是否开启高亮房间功能,默认为 false */
|
|
11
11
|
hoverEnable?: boolean;
|
|
12
|
+
/** 是否开启放大缩小和拖动功能,默认为 false */
|
|
13
|
+
gestureEnable?: boolean;
|
|
14
|
+
/** 是否展示指南针,默认为 true */
|
|
12
15
|
compassEnable?: boolean;
|
|
13
|
-
|
|
16
|
+
/** 是否展示户型图标尺,默认为 true */
|
|
14
17
|
ruleLabelsEnable?: boolean;
|
|
18
|
+
/** 是否展示房间标签,默认为 true */
|
|
15
19
|
roomLabelsEnable?: boolean;
|
|
20
|
+
/** 点击房间时,是否需要跳转到被点房间的全景态点位上,默认为 true */
|
|
16
21
|
preventRoomClick?: boolean;
|
|
22
|
+
/** 户型图展示时,应该对应到模型的哪个位置上,默认是 BOUNDING_CENTER */
|
|
17
23
|
attachedTo?: FLOOR_PLAN_ATTACHED_TO;
|
|
24
|
+
/** 用户自定义房间标间 DOM 函数 */
|
|
18
25
|
getLabelElement?: (room: FloorplanRoomItem) => Element | null;
|
|
19
26
|
}
|
|
27
|
+
/** TopviewFloorplanPlugin 初始化参数 */
|
|
28
|
+
export interface TopviewFloorplanPluginParameterType extends Configs {
|
|
29
|
+
selector?: string | Element;
|
|
30
|
+
scale?: number;
|
|
31
|
+
}
|
|
20
32
|
export declare type TopviewFloorplanPluginReturnType = TopviewFloorplanPluginController;
|
|
21
33
|
export declare class TopviewFloorplanPluginController {
|
|
22
34
|
size: {
|
|
@@ -41,22 +53,23 @@ export declare class TopviewFloorplanPluginController {
|
|
|
41
53
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
42
54
|
appendTo(wrapper: Element): this;
|
|
43
55
|
dispose: () => void;
|
|
44
|
-
|
|
56
|
+
private onFiveWantsMoveToPano;
|
|
57
|
+
private onFiveWantsGesture;
|
|
45
58
|
private onModelShownFloorChange;
|
|
46
|
-
|
|
47
|
-
private
|
|
48
|
-
|
|
49
|
-
private
|
|
50
|
-
/** 在户型图展示时阻止 Five 滑动行为 */
|
|
51
|
-
private handleWantsPanGesture;
|
|
52
|
-
private handleModelLoaded;
|
|
59
|
+
private onFivePanoArrived;
|
|
60
|
+
private onFivePanGesture;
|
|
61
|
+
private onFivePinchGesture;
|
|
62
|
+
private onFiveModelLoaded;
|
|
53
63
|
/** 非 Topview 态隐藏户型图 */
|
|
54
|
-
private
|
|
64
|
+
private onFiveModeChange;
|
|
55
65
|
/** 动画结束后是 Topview 态就展示户型图 */
|
|
56
|
-
private
|
|
66
|
+
private onFiveInitAnimationEnded;
|
|
57
67
|
private show;
|
|
58
68
|
private hide;
|
|
59
69
|
/** 更新户型图大小 */
|
|
60
70
|
private updateSize;
|
|
71
|
+
/** 更新户型图位置 */
|
|
72
|
+
private updatePosition;
|
|
61
73
|
private render;
|
|
62
74
|
}
|
|
75
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FivePlugin } from '@realsee/five';
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
2
|
import { TopviewFloorplanPluginParameterType, TopviewFloorplanPluginReturnType } from './Controller';
|
|
3
3
|
export declare const TopviewFloorplanPlugin: FivePlugin<TopviewFloorplanPluginParameterType, TopviewFloorplanPluginReturnType>;
|
|
4
4
|
export default TopviewFloorplanPlugin;
|