@realsee/dnalogel 2.0.0-alpha.35-beta2 → 2.0.0-alpha.37
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/ItemLabelPlugin/index.js +21 -41
- package/dist/ModelItemLabelPlugin/index.js +16 -36
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +0 -4
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +0 -3
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/{NewMainBtnController.d.ts → mobileMainBtnController.d.ts} +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -3
- package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +2 -0
- package/dist/PanoMeasurePlugin/index.js +298 -331
- package/dist/PanoMeasurePlugin/typings/data.d.ts +5 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +6 -1
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +2 -0
- package/dist/PanoSpatialTagPlugin/index.js +40 -45
- package/dist/base/BasePlugin.d.ts +100 -0
- package/dist/base/BasePluginWithData.d.ts +34 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +71 -78
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/dist/floorplan/ModelFloorplanPlugin/index.js +1064 -567
- package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +23 -14
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +489 -129
- package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +50 -58
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -3
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +1031 -443
- package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/constant.d.ts +10 -3
- package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/correctFiveState.d.ts +2 -1
- package/dist/index.es.js +2262 -1487
- package/dist/index.js +2266 -1491
- package/dist/index.umd.js +2293 -1518
- package/dist/shared-utils/five/changeMode.d.ts +4 -1
- package/dist/shared-utils/getPxmm.d.ts +8 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- 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/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginExportType.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/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/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +1 -1
- 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 -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 -27
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +21 -41
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +16 -36
- package/libs/PanoMeasurePlugin/Controller/index.js +4 -2
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +2 -2
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +0 -4
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +66 -55
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +0 -3
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +51 -73
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +7 -4
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +10 -12
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +2 -2
- package/libs/PanoMeasurePlugin/Modules/UIController/{NewMainBtnController.d.ts → mobileMainBtnController.d.ts} +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/{NewMainBtnController.js → mobileMainBtnController.js} +4 -4
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -3
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +7 -24
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -2
- package/libs/PanoMeasurePlugin/typings/data.d.ts +5 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +6 -1
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +55 -7
- package/libs/PanoSpatialTagPlugin/Components/tag.js +2 -2
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +2 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +38 -43
- package/libs/base/BasePlugin.d.ts +100 -0
- package/libs/base/BasePlugin.js +31 -0
- package/libs/base/BasePluginWithData.d.ts +34 -0
- package/libs/base/BasePluginWithData.js +4 -0
- package/libs/floorplan/Components/Compass.js +11 -11
- package/libs/floorplan/Components/CurrentFloor.js +24 -11
- package/libs/floorplan/Components/Main.js +21 -15
- package/libs/floorplan/Components/RoomHighlight/Room.js +44 -5
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +29 -12
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +164 -15
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +68 -24
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +11 -9
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +71 -78
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +439 -272
- package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/libs/floorplan/ModelFloorplanPlugin/{typings/events.type.js → typing.js} +0 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +5 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +114 -53
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +23 -14
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +162 -52
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +50 -58
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +320 -174
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -3
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
- package/{dist/floorplan/ModelFloorplanPlugin → libs/floorplan}/utils/constant.d.ts +10 -3
- package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/constant.js +9 -2
- package/{dist/floorplan/ModelFloorplanPlugin → libs/floorplan}/utils/correctFiveState.d.ts +2 -1
- package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/correctFiveState.js +16 -16
- package/libs/shared-utils/five/changeMode.d.ts +4 -1
- package/libs/shared-utils/five/changeMode.js +34 -13
- package/libs/shared-utils/getPxmm.d.ts +8 -0
- package/libs/shared-utils/getPxmm.js +25 -20
- package/package.json +2 -2
- package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -23
- package/docs/classes/PanoFloorplanRadarPluginController.html +0 -3
- package/docs/enums/ModelFloorplanErrorType.html +0 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +0 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +0 -5
- package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +0 -1
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +0 -19
- package/libs/ModelSimulationPlugin/index.d.ts +0 -33
- package/libs/ModelSimulationPlugin/index.js +0 -166
- package/libs/ModelSimulationPlugin/shaders/fragment.d.ts +0 -2
- package/libs/ModelSimulationPlugin/shaders/fragment.js +0 -96
- package/libs/ModelSimulationPlugin/shaders/vertex.d.ts +0 -2
- package/libs/ModelSimulationPlugin/shaders/vertex.js +0 -23
- package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +0 -120
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +0 -106
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +0 -463
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +0 -375
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +0 -171
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +0 -265
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +0 -301
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +0 -219
- package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -23
- package/libs/shared-utils/five/useFivePlugin.d.ts +0 -1
- package/libs/shared-utils/five/useFivePlugin.js +0 -8
- package/libs/shared-utils/useDebounce.d.ts +0 -8
- package/libs/shared-utils/useDebounce.js +0 -22
- package/libs/shared-utils/useThrottle.d.ts +0 -8
- package/libs/shared-utils/useThrottle.js +0 -25
|
@@ -15,6 +15,8 @@ export interface PanoSpatialTagPluginParameterType {
|
|
|
15
15
|
minRad?: number;
|
|
16
16
|
nearTolerance?: number;
|
|
17
17
|
upsideHeight?: number;
|
|
18
|
+
minDistance?: number;
|
|
19
|
+
maxDistance?: number;
|
|
18
20
|
}
|
|
19
21
|
export interface PanoSpatialTagPluginExportType {
|
|
20
22
|
load: (data: PanoSpatialTagPluginData) => void;
|
|
@@ -8,13 +8,11 @@ import render from '../shared-utils/tinyEJSrender';
|
|
|
8
8
|
const MESH_SIZE = 0.001;
|
|
9
9
|
const RAY_TOLERANT_DISTANCE = 0.01;
|
|
10
10
|
const BLUR_IMAGE_URL = 'https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png';
|
|
11
|
-
const MIN_DISTANCE = 1.2;
|
|
12
|
-
const MAX_DISTANCE = 3.5;
|
|
13
11
|
/**
|
|
14
12
|
* 空间游走标签插件
|
|
15
13
|
*/
|
|
16
14
|
export const PanoSpatialTagPlugin = (five, params) => {
|
|
17
|
-
var _a, _b, _c, _d, _e, _f;
|
|
15
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
18
16
|
let wrapper = params === null || params === void 0 ? void 0 : params.container;
|
|
19
17
|
let centerY = 1.4;
|
|
20
18
|
const wait = (_a = params === null || params === void 0 ? void 0 : params.wait) !== null && _a !== void 0 ? _a : 200;
|
|
@@ -22,6 +20,8 @@ export const PanoSpatialTagPlugin = (five, params) => {
|
|
|
22
20
|
const minRad = (_c = params === null || params === void 0 ? void 0 : params.minRad) !== null && _c !== void 0 ? _c : Math.PI / 4;
|
|
23
21
|
const nearTolerance = (_d = params === null || params === void 0 ? void 0 : params.nearTolerance) !== null && _d !== void 0 ? _d : 100;
|
|
24
22
|
const upsideHeight = (_e = params === null || params === void 0 ? void 0 : params.upsideHeight) !== null && _e !== void 0 ? _e : 1.6;
|
|
23
|
+
const minDistance = (_f = params === null || params === void 0 ? void 0 : params.minDistance) !== null && _f !== void 0 ? _f : 1.2;
|
|
24
|
+
const maxDistance = (_g = params === null || params === void 0 ? void 0 : params.maxDistance) !== null && _g !== void 0 ? _g : 3.5;
|
|
25
25
|
// const foldPercent = params?.foldPercent ?? 20
|
|
26
26
|
const css3DRender = CSS3DRenderPlugin(five);
|
|
27
27
|
const container = document.createElement('div');
|
|
@@ -76,7 +76,7 @@ export const PanoSpatialTagPlugin = (five, params) => {
|
|
|
76
76
|
frustum.setFromProjectionMatrix(projScreenMatrix);
|
|
77
77
|
state.tags.forEach(tag => {
|
|
78
78
|
const distance = camera.position.clone().setY(centerY).distanceTo(tag.position);
|
|
79
|
-
if (distance <
|
|
79
|
+
if (distance < minDistance || distance > maxDistance)
|
|
80
80
|
return tag.destroying = true;
|
|
81
81
|
if (!frustum.containsPoint(tag.position))
|
|
82
82
|
return tag.destroying = true;
|
|
@@ -88,16 +88,16 @@ export const PanoSpatialTagPlugin = (five, params) => {
|
|
|
88
88
|
state.tags.forEach(tag => {
|
|
89
89
|
if (tag.destroying) {
|
|
90
90
|
tag.app.$set({
|
|
91
|
-
contentZoom: 0.1 + camera.position.distanceTo(tag.position) /
|
|
92
|
-
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(tag.position) /
|
|
91
|
+
contentZoom: 0.1 + camera.position.distanceTo(tag.position) / maxDistance,
|
|
92
|
+
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(tag.position) / maxDistance),
|
|
93
93
|
destroying: tag.destroying,
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
else {
|
|
97
97
|
tag.app.$set({
|
|
98
|
-
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(tag.position) /
|
|
99
|
-
lineHeightZoom: 0.4 + (camera.position.distanceTo(tag.position) -
|
|
100
|
-
contentZoom: 0.1 + camera.position.distanceTo(tag.position) /
|
|
98
|
+
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(tag.position) / maxDistance),
|
|
99
|
+
lineHeightZoom: 0.4 + (camera.position.distanceTo(tag.position) - minDistance) / maxDistance * 0.6,
|
|
100
|
+
contentZoom: 0.1 + camera.position.distanceTo(tag.position) / maxDistance,
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -171,7 +171,7 @@ export const PanoSpatialTagPlugin = (five, params) => {
|
|
|
171
171
|
if (state.tags.find(tag => point.id === tag.id && !tag.destroying))
|
|
172
172
|
return result;
|
|
173
173
|
const distance = camera.position.clone().setY(centerY).distanceTo(point.position);
|
|
174
|
-
if (distance <
|
|
174
|
+
if (distance < minDistance || distance > maxDistance)
|
|
175
175
|
return result;
|
|
176
176
|
if (!frustum.containsPoint(point.position))
|
|
177
177
|
return result;
|
|
@@ -256,9 +256,9 @@ export const PanoSpatialTagPlugin = (five, params) => {
|
|
|
256
256
|
props: {
|
|
257
257
|
id,
|
|
258
258
|
content: state.render(state.template, replacement),
|
|
259
|
-
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(position) /
|
|
260
|
-
lineHeightZoom: 0.4 + (camera.position.distanceTo(position) -
|
|
261
|
-
contentZoom: 0.1 + camera.position.distanceTo(position) /
|
|
259
|
+
lineWidthZoom: 0.38 * (0.01 + camera.position.distanceTo(position) / maxDistance),
|
|
260
|
+
lineHeightZoom: 0.4 + (camera.position.distanceTo(position) - minDistance) / maxDistance * 0.6,
|
|
261
|
+
contentZoom: 0.1 + camera.position.distanceTo(position) / maxDistance,
|
|
262
262
|
upsideDown: position.y > upsideHeight,
|
|
263
263
|
folded: state.folded,
|
|
264
264
|
events: state.events,
|
|
@@ -369,6 +369,22 @@ export const PanoSpatialTagPlugin = (five, params) => {
|
|
|
369
369
|
tag.app.$set({ folded: true });
|
|
370
370
|
});
|
|
371
371
|
};
|
|
372
|
+
const onResize = () => {
|
|
373
|
+
five.once('renderFrame', updateOrigins);
|
|
374
|
+
};
|
|
375
|
+
const onModelLoaded = () => {
|
|
376
|
+
if (!wrapper)
|
|
377
|
+
wrapper = five.getElement().parentElement;
|
|
378
|
+
if (wrapper)
|
|
379
|
+
wrapper.appendChild(container);
|
|
380
|
+
state.forbidden = false;
|
|
381
|
+
centerY = five.model.bounding.getCenter(new THREE.Vector3()).y;
|
|
382
|
+
updateTags();
|
|
383
|
+
five.on('panoWillArrive', onPanoWillArrive);
|
|
384
|
+
five.on('panoArrived', onPanoArrived);
|
|
385
|
+
five.on('modeChange', onModeChange);
|
|
386
|
+
five.on('cameraUpdate', onCameraUpdate);
|
|
387
|
+
};
|
|
372
388
|
const dispose = () => {
|
|
373
389
|
blurImage = null;
|
|
374
390
|
css3DRender.disposeAll();
|
|
@@ -379,41 +395,20 @@ export const PanoSpatialTagPlugin = (five, params) => {
|
|
|
379
395
|
});
|
|
380
396
|
state.origins = [];
|
|
381
397
|
state.tags = [];
|
|
398
|
+
five.off('modelLoaded', onModelLoaded);
|
|
399
|
+
five.off('renderFrame', updateOrigins);
|
|
382
400
|
five.off('panoWillArrive', onPanoWillArrive);
|
|
383
401
|
five.off('panoArrived', onPanoArrived);
|
|
384
402
|
five.off('modeChange', onModeChange);
|
|
385
403
|
five.off('cameraUpdate', onCameraUpdate);
|
|
386
|
-
|
|
404
|
+
five.off('dispose', dispose);
|
|
405
|
+
window.removeEventListener('resize', onResize, false);
|
|
387
406
|
};
|
|
388
|
-
window.addEventListener('resize',
|
|
389
|
-
if ((
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
wrapper.appendChild(container);
|
|
394
|
-
state.forbidden = false;
|
|
395
|
-
centerY = five.model.bounding.getCenter(new THREE.Vector3()).y;
|
|
396
|
-
updateTags();
|
|
397
|
-
five.on('panoWillArrive', onPanoWillArrive);
|
|
398
|
-
five.on('panoArrived', onPanoArrived);
|
|
399
|
-
five.on('modeChange', onModeChange);
|
|
400
|
-
five.on('cameraUpdate', onCameraUpdate);
|
|
401
|
-
}
|
|
402
|
-
else {
|
|
403
|
-
five.once('modelLoaded', () => {
|
|
404
|
-
if (!wrapper)
|
|
405
|
-
wrapper = five.getElement().parentElement;
|
|
406
|
-
if (wrapper)
|
|
407
|
-
wrapper.appendChild(container);
|
|
408
|
-
centerY = five.model.bounding.getCenter(new THREE.Vector3()).y;
|
|
409
|
-
state.forbidden = false;
|
|
410
|
-
updateTags();
|
|
411
|
-
five.on('panoWillArrive', onPanoWillArrive);
|
|
412
|
-
five.on('panoArrived', onPanoArrived);
|
|
413
|
-
five.on('modeChange', onModeChange);
|
|
414
|
-
five.on('cameraUpdate', onCameraUpdate);
|
|
415
|
-
});
|
|
416
|
-
}
|
|
407
|
+
window.addEventListener('resize', onResize, false);
|
|
408
|
+
if ((_h = five === null || five === void 0 ? void 0 : five.model) === null || _h === void 0 ? void 0 : _h.loaded)
|
|
409
|
+
onModelLoaded();
|
|
410
|
+
else
|
|
411
|
+
five.once('modelLoaded', onModelLoaded);
|
|
417
412
|
five.on('dispose', dispose);
|
|
418
413
|
return {
|
|
419
414
|
load,
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Five, Subscribe } from '@realsee/five';
|
|
2
|
+
/**
|
|
3
|
+
* 基本属性字段
|
|
4
|
+
*/
|
|
5
|
+
interface State {
|
|
6
|
+
/**
|
|
7
|
+
* 插件是否启用
|
|
8
|
+
*/
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 插件UI是否展示
|
|
12
|
+
*/
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 插件的配置项
|
|
16
|
+
*/
|
|
17
|
+
config?: unknown;
|
|
18
|
+
}
|
|
19
|
+
interface BaseOptions {
|
|
20
|
+
/** 是否是用户行为 */
|
|
21
|
+
userAction?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 插件基本事件
|
|
25
|
+
*/
|
|
26
|
+
declare type EventMap<PluginState> = {
|
|
27
|
+
/**
|
|
28
|
+
* 插件被销毁
|
|
29
|
+
*/
|
|
30
|
+
dispose: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* 插件状态变化
|
|
33
|
+
* @param params.state 最新的State
|
|
34
|
+
* @param params.prevState 上一个State
|
|
35
|
+
* @param params.userAction 是否是用户触发
|
|
36
|
+
*/
|
|
37
|
+
stateChange: (params: {
|
|
38
|
+
state: PluginState;
|
|
39
|
+
prevState?: PluginState;
|
|
40
|
+
userAction: boolean;
|
|
41
|
+
}) => void;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* plugin 的基本控制器
|
|
45
|
+
*/
|
|
46
|
+
declare abstract class Controller<PluginState extends State, PluginEventMap extends EventMap<PluginState>> {
|
|
47
|
+
five: Five;
|
|
48
|
+
/**
|
|
49
|
+
* 插件事件钩子
|
|
50
|
+
*/
|
|
51
|
+
hooks: Subscribe<PluginEventMap>;
|
|
52
|
+
/**
|
|
53
|
+
* 当前状态
|
|
54
|
+
* @description
|
|
55
|
+
* ```text
|
|
56
|
+
* 可以通过 plugin.state 和 plugin.setState 来获取和设置。
|
|
57
|
+
* 通过 state 设置后,plugin 会通过合适的动画运动来达到设置的效果。
|
|
58
|
+
* 来迎合一些通过数据驱动的场景。
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
abstract state: PluginState;
|
|
62
|
+
constructor(five: Five);
|
|
63
|
+
/**
|
|
64
|
+
* 获取当前的插件状态,如果当初插件内存在需要通过动画变更的 state 值,则通过此方法可以得到中间状态
|
|
65
|
+
*/
|
|
66
|
+
getCurrentState(): PluginState;
|
|
67
|
+
/**
|
|
68
|
+
* 插件自身DOM添加到父容器
|
|
69
|
+
* @param wrapper
|
|
70
|
+
*/
|
|
71
|
+
appendTo?(wrapper: Element): void;
|
|
72
|
+
/**
|
|
73
|
+
* 展示UI
|
|
74
|
+
*/
|
|
75
|
+
show?(options?: BaseOptions): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* 隐藏UI
|
|
78
|
+
*/
|
|
79
|
+
hide?(options?: BaseOptions): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* 启用插件,让插件能够响应交互
|
|
82
|
+
*/
|
|
83
|
+
abstract enable(options?: BaseOptions): void;
|
|
84
|
+
/**
|
|
85
|
+
* 禁用插件,让插件停止响应交互
|
|
86
|
+
*/
|
|
87
|
+
abstract disable(options?: BaseOptions): void;
|
|
88
|
+
/**
|
|
89
|
+
* 插件进行销毁
|
|
90
|
+
*/
|
|
91
|
+
abstract dispose(): void;
|
|
92
|
+
/**
|
|
93
|
+
* 设置state
|
|
94
|
+
* @param state 插件的目标状态
|
|
95
|
+
* @param options 配置项
|
|
96
|
+
*/
|
|
97
|
+
abstract setState(state: Partial<PluginState>, options?: BaseOptions): void;
|
|
98
|
+
}
|
|
99
|
+
export type { State, EventMap, BaseOptions };
|
|
100
|
+
export { Controller };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Subscribe } from '@realsee/five';
|
|
2
|
+
/**
|
|
3
|
+
* plugin 的基本控制器
|
|
4
|
+
*/
|
|
5
|
+
class Controller {
|
|
6
|
+
constructor(five) {
|
|
7
|
+
Object.defineProperty(this, "five", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
configurable: true,
|
|
10
|
+
writable: true,
|
|
11
|
+
value: void 0
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* 插件事件钩子
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(this, "hooks", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: new Subscribe()
|
|
21
|
+
});
|
|
22
|
+
this.five = five;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 获取当前的插件状态,如果当初插件内存在需要通过动画变更的 state 值,则通过此方法可以得到中间状态
|
|
26
|
+
*/
|
|
27
|
+
getCurrentState() {
|
|
28
|
+
return this.state;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export { Controller };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as BasePlugin from './BasePlugin';
|
|
2
|
+
declare type State = BasePlugin.State;
|
|
3
|
+
interface EventMap<PluginState, PluginData> extends BasePlugin.EventMap<PluginState> {
|
|
4
|
+
/** 数据变更 */
|
|
5
|
+
dataChange: (data: PluginData, prevData?: PluginData) => void;
|
|
6
|
+
/** 数据加载完成 */
|
|
7
|
+
dataLoaded: (data: PluginData) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 插件的基础数据
|
|
11
|
+
*/
|
|
12
|
+
interface ServerData {
|
|
13
|
+
/**
|
|
14
|
+
* 数据版本
|
|
15
|
+
*/
|
|
16
|
+
version: number;
|
|
17
|
+
/**
|
|
18
|
+
* 数据
|
|
19
|
+
*/
|
|
20
|
+
data?: unknown;
|
|
21
|
+
}
|
|
22
|
+
declare abstract class Controller<PluginState extends State, PluginEventMap extends EventMap<PluginState, PluginData>, PluginServerData extends ServerData, PluginData> extends BasePlugin.Controller<PluginState, PluginEventMap> {
|
|
23
|
+
protected abstract data?: PluginData;
|
|
24
|
+
/**
|
|
25
|
+
* 加载插件依赖数据
|
|
26
|
+
* @param serverData 插件数据
|
|
27
|
+
* @param state 插件 State
|
|
28
|
+
*/
|
|
29
|
+
abstract load(serverData: PluginServerData, state?: PluginState, userAction?: boolean): Promise<void>;
|
|
30
|
+
/** 把原始数据转化为插件数据 */
|
|
31
|
+
protected abstract formatData?(serverData: PluginServerData): Promise<PluginData>;
|
|
32
|
+
}
|
|
33
|
+
export type { State, EventMap, ServerData };
|
|
34
|
+
export { Controller };
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
import { COMPASS_IMAGE } from '../Assets/compass';
|
|
21
21
|
|
|
22
22
|
function add_css(target) {
|
|
23
|
-
append_styles(target, "svelte-
|
|
23
|
+
append_styles(target, "svelte-p7yk9v", ".floorplan-plugin__compass.svelte-p7yk9v{position:absolute;left:50%;top:-46px;width:231px;height:41px;will-change:opacity;transform-origin:center 184px}.floorplan-plugin__compass-image.svelte-p7yk9v{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-p7yk9v{position:absolute;left:50%;top:15px;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:10px;color:#fff}");
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
// (14:0) {#if
|
|
26
|
+
// (14:0) {#if canCompassShow}
|
|
27
27
|
function create_if_block(ctx) {
|
|
28
28
|
let div1;
|
|
29
29
|
let div0;
|
|
@@ -38,11 +38,11 @@ function create_if_block(ctx) {
|
|
|
38
38
|
t0 = space();
|
|
39
39
|
span = element("span");
|
|
40
40
|
t1 = text(/*northDesc*/ ctx[0]);
|
|
41
|
-
attr(div0, "class", "floorplan-plugin__compass-image svelte-
|
|
41
|
+
attr(div0, "class", "floorplan-plugin__compass-image svelte-p7yk9v");
|
|
42
42
|
set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
|
|
43
|
-
attr(span, "class", "floorplan-plugin__compass-text svelte-
|
|
44
|
-
attr(div1, "class", "floorplan-plugin__compass svelte-
|
|
45
|
-
set_style(div1, "transform", /*compassTransformStyle*/ ctx[
|
|
43
|
+
attr(span, "class", "floorplan-plugin__compass-text svelte-p7yk9v");
|
|
44
|
+
attr(div1, "class", "floorplan-plugin__compass svelte-p7yk9v");
|
|
45
|
+
set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
|
|
46
46
|
},
|
|
47
47
|
m(target, anchor) {
|
|
48
48
|
insert(target, div1, anchor);
|
|
@@ -62,7 +62,7 @@ function create_if_block(ctx) {
|
|
|
62
62
|
|
|
63
63
|
function create_fragment(ctx) {
|
|
64
64
|
let if_block_anchor;
|
|
65
|
-
let if_block = /*
|
|
65
|
+
let if_block = /*canCompassShow*/ ctx[1] && create_if_block(ctx);
|
|
66
66
|
|
|
67
67
|
return {
|
|
68
68
|
c() {
|
|
@@ -74,7 +74,7 @@ function create_fragment(ctx) {
|
|
|
74
74
|
insert(target, if_block_anchor, anchor);
|
|
75
75
|
},
|
|
76
76
|
p(ctx, [dirty]) {
|
|
77
|
-
if (/*
|
|
77
|
+
if (/*canCompassShow*/ ctx[1]) if_block.p(ctx, dirty);
|
|
78
78
|
},
|
|
79
79
|
i: noop,
|
|
80
80
|
o: noop,
|
|
@@ -98,16 +98,16 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
98
98
|
? void 0
|
|
99
99
|
: _a.northRad;
|
|
100
100
|
|
|
101
|
-
const
|
|
101
|
+
const canCompassShow = typeof northRad === 'number';
|
|
102
|
+
const rotate = !northRad ? 0 : rad2Deg(northRad);
|
|
102
103
|
const compassTransformStyle = `translateX(-50%) translateZ(10px) rotate(${-rotate + 90}deg)`;
|
|
103
|
-
const canShowCompass = typeof northRad === 'number';
|
|
104
104
|
|
|
105
105
|
$$self.$$set = $$props => {
|
|
106
106
|
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
107
107
|
if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
return [northDesc,
|
|
110
|
+
return [northDesc, canCompassShow, compassTransformStyle, floorplanData];
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
class Component extends SvelteComponent {
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
transition_out
|
|
23
23
|
} from "svelte/internal";
|
|
24
24
|
|
|
25
|
+
import { writable } from 'svelte/store';
|
|
25
26
|
import BaseImage from './BaseImage';
|
|
26
27
|
import RoomLabels from './RoomLabels/RoomLabels';
|
|
27
28
|
import RuleLabels from './RuleLabels/RuleLabels';
|
|
@@ -32,7 +33,7 @@ function add_css(target) {
|
|
|
32
33
|
append_styles(target, "svelte-1oamigj", ".floorplan-plugin__floor.svelte-1oamigj{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-1oamigj{opacity:1;pointer-events:auto}");
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
// (
|
|
36
|
+
// (20:2) {#if hoverEnable}
|
|
36
37
|
function create_if_block_2(ctx) {
|
|
37
38
|
let roomhighlight;
|
|
38
39
|
let current;
|
|
@@ -40,7 +41,8 @@ function create_if_block_2(ctx) {
|
|
|
40
41
|
const roomhighlight_spread_levels = [
|
|
41
42
|
{
|
|
42
43
|
floorIndex: /*floorIndex*/ ctx[1],
|
|
43
|
-
floorplanData: /*floorplanData*/ ctx[5]
|
|
44
|
+
floorplanData: /*floorplanData*/ ctx[5],
|
|
45
|
+
hoveredRoom: /*hoveredRoom*/ ctx[8]
|
|
44
46
|
}
|
|
45
47
|
];
|
|
46
48
|
|
|
@@ -61,11 +63,12 @@ function create_if_block_2(ctx) {
|
|
|
61
63
|
current = true;
|
|
62
64
|
},
|
|
63
65
|
p(ctx, dirty) {
|
|
64
|
-
const roomhighlight_changes = (dirty & /*floorIndex, floorplanData*/
|
|
66
|
+
const roomhighlight_changes = (dirty & /*floorIndex, floorplanData, hoveredRoom*/ 290)
|
|
65
67
|
? get_spread_update(roomhighlight_spread_levels, [
|
|
66
68
|
{
|
|
67
69
|
floorIndex: /*floorIndex*/ ctx[1],
|
|
68
|
-
floorplanData: /*floorplanData*/ ctx[5]
|
|
70
|
+
floorplanData: /*floorplanData*/ ctx[5],
|
|
71
|
+
hoveredRoom: /*hoveredRoom*/ ctx[8]
|
|
69
72
|
}
|
|
70
73
|
])
|
|
71
74
|
: {};
|
|
@@ -87,7 +90,7 @@ function create_if_block_2(ctx) {
|
|
|
87
90
|
};
|
|
88
91
|
}
|
|
89
92
|
|
|
90
|
-
// (
|
|
93
|
+
// (24:2) {#if roomLabelsEnable}
|
|
91
94
|
function create_if_block_1(ctx) {
|
|
92
95
|
let roomlabels;
|
|
93
96
|
let current;
|
|
@@ -96,7 +99,9 @@ function create_if_block_1(ctx) {
|
|
|
96
99
|
{
|
|
97
100
|
floorplanData: /*floorplanData*/ ctx[5],
|
|
98
101
|
floorIndex: /*floorIndex*/ ctx[1],
|
|
99
|
-
getLabelElement: /*getLabelElement*/ ctx[6]
|
|
102
|
+
getLabelElement: /*getLabelElement*/ ctx[6],
|
|
103
|
+
hoveredRoom: /*hoveredRoom*/ ctx[8],
|
|
104
|
+
adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[7]
|
|
100
105
|
}
|
|
101
106
|
];
|
|
102
107
|
|
|
@@ -117,12 +122,14 @@ function create_if_block_1(ctx) {
|
|
|
117
122
|
current = true;
|
|
118
123
|
},
|
|
119
124
|
p(ctx, dirty) {
|
|
120
|
-
const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement*/
|
|
125
|
+
const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement, hoveredRoom, adaptiveRoomLabelVisibleEnable*/ 482)
|
|
121
126
|
? get_spread_update(roomlabels_spread_levels, [
|
|
122
127
|
{
|
|
123
128
|
floorplanData: /*floorplanData*/ ctx[5],
|
|
124
129
|
floorIndex: /*floorIndex*/ ctx[1],
|
|
125
|
-
getLabelElement: /*getLabelElement*/ ctx[6]
|
|
130
|
+
getLabelElement: /*getLabelElement*/ ctx[6],
|
|
131
|
+
hoveredRoom: /*hoveredRoom*/ ctx[8],
|
|
132
|
+
adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[7]
|
|
126
133
|
}
|
|
127
134
|
])
|
|
128
135
|
: {};
|
|
@@ -144,7 +151,7 @@ function create_if_block_1(ctx) {
|
|
|
144
151
|
};
|
|
145
152
|
}
|
|
146
153
|
|
|
147
|
-
// (
|
|
154
|
+
// (27:2) {#if ruleLabelsEnable}
|
|
148
155
|
function create_if_block(ctx) {
|
|
149
156
|
let rulelabels;
|
|
150
157
|
let current;
|
|
@@ -407,6 +414,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
407
414
|
let { ruleLabelsEnable } = $$props;
|
|
408
415
|
let { floorplanData } = $$props;
|
|
409
416
|
let { getLabelElement } = $$props;
|
|
417
|
+
let { adaptiveRoomLabelVisibleEnable } = $$props;
|
|
418
|
+
const hoveredRoom = writable(undefined);
|
|
410
419
|
|
|
411
420
|
$$self.$$set = $$props => {
|
|
412
421
|
if ('isCurrent' in $$props) $$invalidate(0, isCurrent = $$props.isCurrent);
|
|
@@ -416,6 +425,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
416
425
|
if ('ruleLabelsEnable' in $$props) $$invalidate(4, ruleLabelsEnable = $$props.ruleLabelsEnable);
|
|
417
426
|
if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
|
|
418
427
|
if ('getLabelElement' in $$props) $$invalidate(6, getLabelElement = $$props.getLabelElement);
|
|
428
|
+
if ('adaptiveRoomLabelVisibleEnable' in $$props) $$invalidate(7, adaptiveRoomLabelVisibleEnable = $$props.adaptiveRoomLabelVisibleEnable);
|
|
419
429
|
};
|
|
420
430
|
|
|
421
431
|
return [
|
|
@@ -425,7 +435,9 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
425
435
|
roomLabelsEnable,
|
|
426
436
|
ruleLabelsEnable,
|
|
427
437
|
floorplanData,
|
|
428
|
-
getLabelElement
|
|
438
|
+
getLabelElement,
|
|
439
|
+
adaptiveRoomLabelVisibleEnable,
|
|
440
|
+
hoveredRoom
|
|
429
441
|
];
|
|
430
442
|
}
|
|
431
443
|
|
|
@@ -446,7 +458,8 @@ class Component extends SvelteComponent {
|
|
|
446
458
|
roomLabelsEnable: 3,
|
|
447
459
|
ruleLabelsEnable: 4,
|
|
448
460
|
floorplanData: 5,
|
|
449
|
-
getLabelElement: 6
|
|
461
|
+
getLabelElement: 6,
|
|
462
|
+
adaptiveRoomLabelVisibleEnable: 7
|
|
450
463
|
},
|
|
451
464
|
add_css
|
|
452
465
|
);
|
|
@@ -37,11 +37,11 @@ function add_css(target) {
|
|
|
37
37
|
|
|
38
38
|
function get_each_context(ctx, list, i) {
|
|
39
39
|
const child_ctx = ctx.slice();
|
|
40
|
-
child_ctx[
|
|
40
|
+
child_ctx[14] = list[i];
|
|
41
41
|
return child_ctx;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
// (
|
|
44
|
+
// (22:0) {#if visible}
|
|
45
45
|
function create_if_block(ctx) {
|
|
46
46
|
let div;
|
|
47
47
|
let t0;
|
|
@@ -108,7 +108,7 @@ function create_if_block(ctx) {
|
|
|
108
108
|
p(new_ctx, dirty) {
|
|
109
109
|
ctx = new_ctx;
|
|
110
110
|
|
|
111
|
-
if (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, floorIndex*/
|
|
111
|
+
if (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable, floorIndex*/ 13232) {
|
|
112
112
|
each_value = /*floorplanData*/ ctx[9].floorDatas;
|
|
113
113
|
let i;
|
|
114
114
|
|
|
@@ -214,7 +214,7 @@ function create_if_block(ctx) {
|
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
// (
|
|
217
|
+
// (24:4) {#each floorplanData.floorDatas as floorData}
|
|
218
218
|
function create_each_block(ctx) {
|
|
219
219
|
let currentfloor;
|
|
220
220
|
let current;
|
|
@@ -225,13 +225,14 @@ function create_each_block(ctx) {
|
|
|
225
225
|
floorplanData: /*floorplanData*/ ctx[9],
|
|
226
226
|
getLabelElement: /*getLabelElement*/ ctx[12],
|
|
227
227
|
roomLabelsEnable: /*roomLabelsEnable*/ ctx[7],
|
|
228
|
-
ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8]
|
|
228
|
+
ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8],
|
|
229
|
+
adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[13]
|
|
229
230
|
},
|
|
230
231
|
{
|
|
231
|
-
floorIndex: /*floorData*/ ctx[
|
|
232
|
+
floorIndex: /*floorData*/ ctx[14].floorIndex
|
|
232
233
|
},
|
|
233
234
|
{
|
|
234
|
-
isCurrent: /*floorData*/ ctx[
|
|
235
|
+
isCurrent: /*floorData*/ ctx[14].floorIndex === /*floorIndex*/ ctx[4]
|
|
235
236
|
}
|
|
236
237
|
];
|
|
237
238
|
|
|
@@ -252,20 +253,21 @@ function create_each_block(ctx) {
|
|
|
252
253
|
current = true;
|
|
253
254
|
},
|
|
254
255
|
p(ctx, dirty) {
|
|
255
|
-
const currentfloor_changes = (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, floorIndex*/
|
|
256
|
+
const currentfloor_changes = (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable, floorIndex*/ 13232)
|
|
256
257
|
? get_spread_update(currentfloor_spread_levels, [
|
|
257
|
-
dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable*/
|
|
258
|
+
dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable*/ 13216 && {
|
|
258
259
|
hoverEnable: /*hoverEnable*/ ctx[5],
|
|
259
260
|
floorplanData: /*floorplanData*/ ctx[9],
|
|
260
261
|
getLabelElement: /*getLabelElement*/ ctx[12],
|
|
261
262
|
roomLabelsEnable: /*roomLabelsEnable*/ ctx[7],
|
|
262
|
-
ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8]
|
|
263
|
+
ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8],
|
|
264
|
+
adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[13]
|
|
263
265
|
},
|
|
264
266
|
dirty & /*floorplanData*/ 512 && {
|
|
265
|
-
floorIndex: /*floorData*/ ctx[
|
|
267
|
+
floorIndex: /*floorData*/ ctx[14].floorIndex
|
|
266
268
|
},
|
|
267
269
|
dirty & /*floorplanData, floorIndex*/ 528 && {
|
|
268
|
-
isCurrent: /*floorData*/ ctx[
|
|
270
|
+
isCurrent: /*floorData*/ ctx[14].floorIndex === /*floorIndex*/ ctx[4]
|
|
269
271
|
}
|
|
270
272
|
])
|
|
271
273
|
: {};
|
|
@@ -287,7 +289,7 @@ function create_each_block(ctx) {
|
|
|
287
289
|
};
|
|
288
290
|
}
|
|
289
291
|
|
|
290
|
-
// (
|
|
292
|
+
// (39:4) {#if compassEnable}
|
|
291
293
|
function create_if_block_1(ctx) {
|
|
292
294
|
let compass;
|
|
293
295
|
let current;
|
|
@@ -397,6 +399,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
397
399
|
let { lastPanoramaLongitude } = $$props;
|
|
398
400
|
let { cameraImageUrl } = $$props;
|
|
399
401
|
let { getLabelElement } = $$props;
|
|
402
|
+
let { adaptiveRoomLabelVisibleEnable } = $$props;
|
|
400
403
|
|
|
401
404
|
$$self.$$set = $$props => {
|
|
402
405
|
if ('duration' in $$props) $$invalidate(0, duration = $$props.duration);
|
|
@@ -412,6 +415,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
412
415
|
if ('lastPanoramaLongitude' in $$props) $$invalidate(10, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
|
|
413
416
|
if ('cameraImageUrl' in $$props) $$invalidate(11, cameraImageUrl = $$props.cameraImageUrl);
|
|
414
417
|
if ('getLabelElement' in $$props) $$invalidate(12, getLabelElement = $$props.getLabelElement);
|
|
418
|
+
if ('adaptiveRoomLabelVisibleEnable' in $$props) $$invalidate(13, adaptiveRoomLabelVisibleEnable = $$props.adaptiveRoomLabelVisibleEnable);
|
|
415
419
|
};
|
|
416
420
|
|
|
417
421
|
return [
|
|
@@ -427,7 +431,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
427
431
|
floorplanData,
|
|
428
432
|
lastPanoramaLongitude,
|
|
429
433
|
cameraImageUrl,
|
|
430
|
-
getLabelElement
|
|
434
|
+
getLabelElement,
|
|
435
|
+
adaptiveRoomLabelVisibleEnable
|
|
431
436
|
];
|
|
432
437
|
}
|
|
433
438
|
|
|
@@ -454,7 +459,8 @@ class Component extends SvelteComponent {
|
|
|
454
459
|
floorplanData: 9,
|
|
455
460
|
lastPanoramaLongitude: 10,
|
|
456
461
|
cameraImageUrl: 11,
|
|
457
|
-
getLabelElement: 12
|
|
462
|
+
getLabelElement: 12,
|
|
463
|
+
adaptiveRoomLabelVisibleEnable: 13
|
|
458
464
|
},
|
|
459
465
|
add_css
|
|
460
466
|
);
|