@realsee/dnalogel 2.0.0-alpha.35 → 2.0.0-alpha.38
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/ModelViewPlugin/Plugin.d.ts +4 -4
- package/dist/ModelViewPlugin/index.js +2 -3
- 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/PanoRulerProPlugin/Controller.d.ts +15 -0
- package/dist/PanoRulerProPlugin/index.d.ts +8 -0
- package/dist/PanoRulerProPlugin/index.js +1006 -0
- package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
- 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.d.ts +1 -0
- package/dist/index.es.js +3173 -1633
- package/dist/index.js +3194 -1653
- package/dist/index.umd.js +3090 -1549
- package/dist/shared-utils/five/changeMode.d.ts +4 -1
- package/dist/shared-utils/getPxmm.d.ts +8 -0
- package/dist/shared-utils/logger.d.ts +16 -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/PanoRulerProPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
- package/docs/interfaces/PanoRulerProPluginState.html +1 -0
- 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 +19 -27
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +21 -41
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +16 -36
- package/libs/ModelViewPlugin/Plugin.d.ts +4 -4
- package/libs/ModelViewPlugin/Plugin.js +2 -3
- 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/PanoRulerProPlugin/Controller.d.ts +15 -0
- package/libs/PanoRulerProPlugin/Controller.js +110 -0
- package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
- package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
- package/libs/PanoRulerProPlugin/index.d.ts +8 -0
- package/libs/PanoRulerProPlugin/index.js +8 -0
- package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
- package/libs/{floorplan/ModelFloorplanPlugin/typings/events.type.js → PanoRulerProPlugin/typings.js} +0 -0
- 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/typing.js +1 -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/index.d.ts +1 -0
- package/libs/index.js +2 -0
- 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/libs/shared-utils/logger.d.ts +16 -0
- package/libs/shared-utils/logger.js +47 -0
- 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
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
import type { Parameters } from './typing';
|
|
1
2
|
import type { FivePlugin } from '@realsee/five';
|
|
2
|
-
import
|
|
3
|
-
export declare const ModelFloorplanPlugin: FivePlugin<
|
|
3
|
+
import { Controller } from './Controller';
|
|
4
|
+
export declare const ModelFloorplanPlugin: FivePlugin<undefined | Parameters, Controller>;
|
|
5
|
+
export declare type ModelFloorplanPluginParameterType = Parameters | undefined;
|
|
6
|
+
export declare type ModelFloorplanPluginReturnType = InstanceType<typeof Controller>;
|
|
4
7
|
export default ModelFloorplanPlugin;
|
|
5
|
-
export declare type ModelFloorplanPluginReturnType = FloorplanPluginController;
|
|
6
|
-
export type { ModelFloorplanViewEvent } from './typings/events.type';
|
|
7
|
-
export type { FloorplanErrorType as ModelFloorplanErrorType } from './utils/constant';
|
|
8
|
-
export type { ModelFloorplanPluginsConfigs, ModelFloorplanParameterType } from './Controller';
|
|
9
|
-
export type { FloorplanEventHandlers as ModelFloorplanEventHandlers } from './typings/events.type';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Controller } from './Controller';
|
|
2
2
|
export const ModelFloorplanPlugin = (five, params) => {
|
|
3
|
-
return new
|
|
3
|
+
return new Controller(five, params);
|
|
4
4
|
};
|
|
5
5
|
export default ModelFloorplanPlugin;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { FLOOR_PLAN_ATTACHED_TO } from '../constant';
|
|
2
|
+
import type * as BasePlugin from '../../base/BasePluginWithData';
|
|
3
|
+
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
4
|
+
import type { FloorplanData, FloorplanRoomItem } from '../typings/floorplanData';
|
|
5
|
+
export interface State extends BasePlugin.State {
|
|
6
|
+
visible: boolean;
|
|
7
|
+
config: Config;
|
|
8
|
+
}
|
|
9
|
+
export interface Config {
|
|
10
|
+
/** 指北针的显示文案,默认为 '北' */
|
|
11
|
+
northDesc: string;
|
|
12
|
+
/** 户型图展示时,模型的透明度,默认为 1 */
|
|
13
|
+
modelOpacity: number;
|
|
14
|
+
/** 鼠标放置在分间上时,是否要自动高亮分间,默认为 true */
|
|
15
|
+
hoverEnable: boolean;
|
|
16
|
+
/** 是否要启用指北针功能,默认为 true */
|
|
17
|
+
compassEnable: boolean;
|
|
18
|
+
/** Five 切换到 Topview Mode 时,是否自动展示户型图,默认为 true */
|
|
19
|
+
autoShowEnable: boolean;
|
|
20
|
+
/** 是否要启用户型图分间标尺功能,默认为 true */
|
|
21
|
+
ruleLabelsEnable: boolean;
|
|
22
|
+
/** 是否要启用户型图分间标签功能,默认为 true */
|
|
23
|
+
roomLabelsEnable: boolean;
|
|
24
|
+
/** 自定义「雷达」图标 */
|
|
25
|
+
cameraImageUrl: string;
|
|
26
|
+
/** 计算户型图大小时,以模型的哪个高度为依据,默认为 BOUNDING_CENTER
|
|
27
|
+
* - FLOOR_PLAN_ATTACHED_TO.FLOOR: 户型图大小与模型的地板进行贴合
|
|
28
|
+
* - FLOOR_PLAN_ATTACHED_TO.CEILING: 户型图大小与模型的天花板进行贴合
|
|
29
|
+
* - FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER: 户型图大小与模型的中心进行贴合
|
|
30
|
+
*/
|
|
31
|
+
attachedTo: FLOOR_PLAN_ATTACHED_TO;
|
|
32
|
+
/** 分间标签的自定义函数,通过返回自定义 DOM 替换对应分间的标签 */
|
|
33
|
+
getLabelElement: undefined | ((room: FloorplanRoomItem) => Element | null);
|
|
34
|
+
/** 是否支持房屋标签自适应展示,默认为 true
|
|
35
|
+
* @description
|
|
36
|
+
* * 标签边框超过房间边框时,自动隐藏;不超过时自动展示。
|
|
37
|
+
* * 鼠标 hover 时,自动展示。
|
|
38
|
+
* */
|
|
39
|
+
adaptiveRoomLabelVisibleEnable: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface Parameters extends Partial<Config> {
|
|
42
|
+
selector?: string | Element;
|
|
43
|
+
scale?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ViewEvent {
|
|
46
|
+
/** 是否是用户滑动模型导致的户型图自动展示/消失 */
|
|
47
|
+
auto: boolean;
|
|
48
|
+
/** 是否是用户操作 */
|
|
49
|
+
userAction: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface EventMap extends BasePlugin.EventMap<State, FloorplanData> {
|
|
52
|
+
/**
|
|
53
|
+
* 展示结束的回调
|
|
54
|
+
* @param event.auto 是否是自动操作
|
|
55
|
+
* @param event.userAction 是否是用户操作
|
|
56
|
+
*/
|
|
57
|
+
showAnimationEnded: (event: ViewEvent) => void;
|
|
58
|
+
/** visible 从 false 到 true 的回调
|
|
59
|
+
* @param event.userAction 是否是用户操作
|
|
60
|
+
*/
|
|
61
|
+
show: (event: ViewEvent) => void;
|
|
62
|
+
/** visible 从 true 到 false 的回调
|
|
63
|
+
* @param event.auto 是否是自动操作
|
|
64
|
+
* @param event.userAction 是否是用户操作
|
|
65
|
+
*/
|
|
66
|
+
hide: (event: ViewEvent) => void;
|
|
67
|
+
/** enabled 从 false 到 true 的回调
|
|
68
|
+
* @param event.userAction 是否是用户操作
|
|
69
|
+
*/
|
|
70
|
+
enable: (event: {
|
|
71
|
+
userAction: boolean;
|
|
72
|
+
}) => void;
|
|
73
|
+
/** enabled 从 true 到 false 的回调
|
|
74
|
+
* @param event.userAction 是否是用户操作
|
|
75
|
+
*/
|
|
76
|
+
disable: (event: {
|
|
77
|
+
userAction: boolean;
|
|
78
|
+
}) => void;
|
|
79
|
+
/**
|
|
80
|
+
* 点击户型图的回调
|
|
81
|
+
* @return 当返回 false 时,会阻止默认行为
|
|
82
|
+
*/
|
|
83
|
+
click: () => boolean | void;
|
|
84
|
+
}
|
|
85
|
+
export interface PluginServerData extends BasePlugin.ServerData {
|
|
86
|
+
version: number;
|
|
87
|
+
data: FloorplanServerData;
|
|
88
|
+
}
|
|
89
|
+
export interface ShowOptions {
|
|
90
|
+
/** 展示户型图时,希望到达的楼层数 */
|
|
91
|
+
floorIndex: number;
|
|
92
|
+
/** 是否自动展示 */
|
|
93
|
+
isAutoShow: boolean;
|
|
94
|
+
/** 展示户型图时,模型透明度 */
|
|
95
|
+
modelOpacity: number;
|
|
96
|
+
/** 是否需要 opacity 动画 */
|
|
97
|
+
immediately: boolean;
|
|
98
|
+
/** 是否是用户操作 */
|
|
99
|
+
userAction: boolean;
|
|
100
|
+
}
|
|
101
|
+
export interface HideOptions {
|
|
102
|
+
/** 是否自动隐藏 */
|
|
103
|
+
isAutoHide: boolean;
|
|
104
|
+
/** 是否是用户操作 */
|
|
105
|
+
userAction: boolean;
|
|
106
|
+
}
|
|
107
|
+
export { FloorplanData as PluginData };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
set_style
|
|
14
14
|
} from "svelte/internal";
|
|
15
15
|
|
|
16
|
-
import { onMount
|
|
16
|
+
import { onMount } from 'svelte';
|
|
17
17
|
import { CAMERA_IMAGE } from '../../Assets/camera';
|
|
18
18
|
import throttle from '../../../shared-utils/throttle';
|
|
19
19
|
|
|
@@ -107,11 +107,11 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
107
107
|
onMount(() => {
|
|
108
108
|
five.on('panoWillArrive', onFivePanoWillArrive);
|
|
109
109
|
five.on('cameraDirectionUpdate', onFiveCameraDirectionUpdate);
|
|
110
|
-
});
|
|
111
110
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
return function dispose() {
|
|
112
|
+
five.off('panoWillArrive', onFivePanoWillArrive);
|
|
113
|
+
five.off('cameraDirectionUpdate', onFiveCameraDirectionUpdate);
|
|
114
|
+
};
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
$$self.$$set = $$props => {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
destroy_component,
|
|
13
13
|
detach,
|
|
14
14
|
element,
|
|
15
|
+
empty,
|
|
15
16
|
get_spread_update,
|
|
16
17
|
group_outros,
|
|
17
18
|
init,
|
|
@@ -32,24 +33,85 @@ function add_css(target) {
|
|
|
32
33
|
append_styles(target, "svelte-7d8ub2", ".plugin-floorplan-radar.svelte-7d8ub2{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-7d8ub2{position:relative}");
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
// (41:
|
|
36
|
+
// (41:0) {#if visible}
|
|
36
37
|
function create_if_block(ctx) {
|
|
38
|
+
let div;
|
|
39
|
+
let div_resize_listener;
|
|
40
|
+
let current;
|
|
41
|
+
let if_block = /*clientWidth*/ ctx[6] !== 0 && create_if_block_1(ctx);
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
c() {
|
|
45
|
+
div = element("div");
|
|
46
|
+
if (if_block) if_block.c();
|
|
47
|
+
attr(div, "class", "plugin-floorplan-radar svelte-7d8ub2");
|
|
48
|
+
add_render_callback(() => /*div_elementresize_handler*/ ctx[12].call(div));
|
|
49
|
+
},
|
|
50
|
+
m(target, anchor) {
|
|
51
|
+
insert(target, div, anchor);
|
|
52
|
+
if (if_block) if_block.m(div, null);
|
|
53
|
+
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[12].bind(div));
|
|
54
|
+
current = true;
|
|
55
|
+
},
|
|
56
|
+
p(ctx, dirty) {
|
|
57
|
+
if (/*clientWidth*/ ctx[6] !== 0) {
|
|
58
|
+
if (if_block) {
|
|
59
|
+
if_block.p(ctx, dirty);
|
|
60
|
+
|
|
61
|
+
if (dirty & /*clientWidth*/ 64) {
|
|
62
|
+
transition_in(if_block, 1);
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
if_block = create_if_block_1(ctx);
|
|
66
|
+
if_block.c();
|
|
67
|
+
transition_in(if_block, 1);
|
|
68
|
+
if_block.m(div, null);
|
|
69
|
+
}
|
|
70
|
+
} else if (if_block) {
|
|
71
|
+
group_outros();
|
|
72
|
+
|
|
73
|
+
transition_out(if_block, 1, 1, () => {
|
|
74
|
+
if_block = null;
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
check_outros();
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
i(local) {
|
|
81
|
+
if (current) return;
|
|
82
|
+
transition_in(if_block);
|
|
83
|
+
current = true;
|
|
84
|
+
},
|
|
85
|
+
o(local) {
|
|
86
|
+
transition_out(if_block);
|
|
87
|
+
current = false;
|
|
88
|
+
},
|
|
89
|
+
d(detaching) {
|
|
90
|
+
if (detaching) detach(div);
|
|
91
|
+
if (if_block) if_block.d();
|
|
92
|
+
div_resize_listener();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// (43:4) {#if clientWidth !== 0}
|
|
98
|
+
function create_if_block_1(ctx) {
|
|
37
99
|
let div;
|
|
38
100
|
let currentfloor;
|
|
39
101
|
let t;
|
|
40
102
|
let camera;
|
|
41
|
-
let style_width = `${/*contentWidth*/ ctx[
|
|
42
|
-
let style_height = `${/*contentHeight*/ ctx[
|
|
103
|
+
let style_width = `${/*contentWidth*/ ctx[8]}px`;
|
|
104
|
+
let style_height = `${/*contentHeight*/ ctx[11]}px`;
|
|
43
105
|
let current;
|
|
44
106
|
|
|
45
107
|
const currentfloor_spread_levels = [
|
|
46
108
|
{
|
|
47
109
|
five: /*five*/ ctx[0],
|
|
48
|
-
pxmm: /*pxmm*/ ctx[
|
|
49
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
50
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
51
|
-
hoverEnable: /*hoverEnable*/ ctx[
|
|
52
|
-
extraObjects: /*extraObjects*/ ctx[
|
|
110
|
+
pxmm: /*pxmm*/ ctx[9],
|
|
111
|
+
floorIndex: /*floorIndex*/ ctx[10],
|
|
112
|
+
floorplanData: /*floorplanData*/ ctx[3],
|
|
113
|
+
hoverEnable: /*hoverEnable*/ ctx[2],
|
|
114
|
+
extraObjects: /*extraObjects*/ ctx[5]
|
|
53
115
|
}
|
|
54
116
|
];
|
|
55
117
|
|
|
@@ -63,10 +125,10 @@ function create_if_block(ctx) {
|
|
|
63
125
|
|
|
64
126
|
const camera_spread_levels = [
|
|
65
127
|
{
|
|
66
|
-
pxmm: /*pxmm*/ ctx[
|
|
128
|
+
pxmm: /*pxmm*/ ctx[9],
|
|
67
129
|
five: /*five*/ ctx[0],
|
|
68
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
69
|
-
cameraImageUrl: /*cameraImageUrl*/ ctx[
|
|
130
|
+
floorplanData: /*floorplanData*/ ctx[3],
|
|
131
|
+
cameraImageUrl: /*cameraImageUrl*/ ctx[4]
|
|
70
132
|
}
|
|
71
133
|
];
|
|
72
134
|
|
|
@@ -96,39 +158,39 @@ function create_if_block(ctx) {
|
|
|
96
158
|
current = true;
|
|
97
159
|
},
|
|
98
160
|
p(ctx, dirty) {
|
|
99
|
-
const currentfloor_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, hoverEnable, extraObjects*/
|
|
161
|
+
const currentfloor_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, hoverEnable, extraObjects*/ 1581)
|
|
100
162
|
? get_spread_update(currentfloor_spread_levels, [
|
|
101
163
|
{
|
|
102
164
|
five: /*five*/ ctx[0],
|
|
103
|
-
pxmm: /*pxmm*/ ctx[
|
|
104
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
105
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
106
|
-
hoverEnable: /*hoverEnable*/ ctx[
|
|
107
|
-
extraObjects: /*extraObjects*/ ctx[
|
|
165
|
+
pxmm: /*pxmm*/ ctx[9],
|
|
166
|
+
floorIndex: /*floorIndex*/ ctx[10],
|
|
167
|
+
floorplanData: /*floorplanData*/ ctx[3],
|
|
168
|
+
hoverEnable: /*hoverEnable*/ ctx[2],
|
|
169
|
+
extraObjects: /*extraObjects*/ ctx[5]
|
|
108
170
|
}
|
|
109
171
|
])
|
|
110
172
|
: {};
|
|
111
173
|
|
|
112
174
|
currentfloor.$set(currentfloor_changes);
|
|
113
175
|
|
|
114
|
-
const camera_changes = (dirty & /*pxmm, five, floorplanData, cameraImageUrl*/
|
|
176
|
+
const camera_changes = (dirty & /*pxmm, five, floorplanData, cameraImageUrl*/ 537)
|
|
115
177
|
? get_spread_update(camera_spread_levels, [
|
|
116
178
|
{
|
|
117
|
-
pxmm: /*pxmm*/ ctx[
|
|
179
|
+
pxmm: /*pxmm*/ ctx[9],
|
|
118
180
|
five: /*five*/ ctx[0],
|
|
119
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
120
|
-
cameraImageUrl: /*cameraImageUrl*/ ctx[
|
|
181
|
+
floorplanData: /*floorplanData*/ ctx[3],
|
|
182
|
+
cameraImageUrl: /*cameraImageUrl*/ ctx[4]
|
|
121
183
|
}
|
|
122
184
|
])
|
|
123
185
|
: {};
|
|
124
186
|
|
|
125
187
|
camera.$set(camera_changes);
|
|
126
188
|
|
|
127
|
-
if (dirty & /*contentWidth*/
|
|
189
|
+
if (dirty & /*contentWidth*/ 256 && style_width !== (style_width = `${/*contentWidth*/ ctx[8]}px`)) {
|
|
128
190
|
set_style(div, "width", style_width, false);
|
|
129
191
|
}
|
|
130
192
|
|
|
131
|
-
if (dirty & /*contentHeight*/
|
|
193
|
+
if (dirty & /*contentHeight*/ 2048 && style_height !== (style_height = `${/*contentHeight*/ ctx[11]}px`)) {
|
|
132
194
|
set_style(div, "height", style_height, false);
|
|
133
195
|
}
|
|
134
196
|
},
|
|
@@ -152,37 +214,33 @@ function create_if_block(ctx) {
|
|
|
152
214
|
}
|
|
153
215
|
|
|
154
216
|
function create_fragment(ctx) {
|
|
155
|
-
let
|
|
156
|
-
let div_resize_listener;
|
|
217
|
+
let if_block_anchor;
|
|
157
218
|
let current;
|
|
158
|
-
let if_block = /*
|
|
219
|
+
let if_block = /*visible*/ ctx[1] && create_if_block(ctx);
|
|
159
220
|
|
|
160
221
|
return {
|
|
161
222
|
c() {
|
|
162
|
-
div = element("div");
|
|
163
223
|
if (if_block) if_block.c();
|
|
164
|
-
|
|
165
|
-
add_render_callback(() => /*div_elementresize_handler*/ ctx[11].call(div));
|
|
224
|
+
if_block_anchor = empty();
|
|
166
225
|
},
|
|
167
226
|
m(target, anchor) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[11].bind(div));
|
|
227
|
+
if (if_block) if_block.m(target, anchor);
|
|
228
|
+
insert(target, if_block_anchor, anchor);
|
|
171
229
|
current = true;
|
|
172
230
|
},
|
|
173
231
|
p(ctx, [dirty]) {
|
|
174
|
-
if (/*
|
|
232
|
+
if (/*visible*/ ctx[1]) {
|
|
175
233
|
if (if_block) {
|
|
176
234
|
if_block.p(ctx, dirty);
|
|
177
235
|
|
|
178
|
-
if (dirty & /*
|
|
236
|
+
if (dirty & /*visible*/ 2) {
|
|
179
237
|
transition_in(if_block, 1);
|
|
180
238
|
}
|
|
181
239
|
} else {
|
|
182
240
|
if_block = create_if_block(ctx);
|
|
183
241
|
if_block.c();
|
|
184
242
|
transition_in(if_block, 1);
|
|
185
|
-
if_block.m(
|
|
243
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
186
244
|
}
|
|
187
245
|
} else if (if_block) {
|
|
188
246
|
group_outros();
|
|
@@ -204,15 +262,15 @@ function create_fragment(ctx) {
|
|
|
204
262
|
current = false;
|
|
205
263
|
},
|
|
206
264
|
d(detaching) {
|
|
207
|
-
if (
|
|
208
|
-
if (
|
|
209
|
-
div_resize_listener();
|
|
265
|
+
if (if_block) if_block.d(detaching);
|
|
266
|
+
if (detaching) detach(if_block_anchor);
|
|
210
267
|
}
|
|
211
268
|
};
|
|
212
269
|
}
|
|
213
270
|
|
|
214
271
|
function instance($$self, $$props, $$invalidate) {
|
|
215
272
|
let { five } = $$props;
|
|
273
|
+
let { visible } = $$props;
|
|
216
274
|
let { hoverEnable } = $$props;
|
|
217
275
|
let { floorplanData } = $$props;
|
|
218
276
|
let { cameraImageUrl } = $$props;
|
|
@@ -225,7 +283,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
225
283
|
let contentHeight = 0;
|
|
226
284
|
|
|
227
285
|
function handlePanoArrived(panoIndex) {
|
|
228
|
-
$$invalidate(
|
|
286
|
+
$$invalidate(10, floorIndex = five.work.observers[panoIndex].floorIndex);
|
|
229
287
|
}
|
|
230
288
|
|
|
231
289
|
onMount(() => {
|
|
@@ -239,20 +297,21 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
239
297
|
function div_elementresize_handler() {
|
|
240
298
|
clientWidth = this.clientWidth;
|
|
241
299
|
clientHeight = this.clientHeight;
|
|
242
|
-
$$invalidate(
|
|
243
|
-
$$invalidate(
|
|
300
|
+
$$invalidate(6, clientWidth);
|
|
301
|
+
$$invalidate(7, clientHeight);
|
|
244
302
|
}
|
|
245
303
|
|
|
246
304
|
$$self.$$set = $$props => {
|
|
247
305
|
if ('five' in $$props) $$invalidate(0, five = $$props.five);
|
|
248
|
-
if ('
|
|
249
|
-
if ('
|
|
250
|
-
if ('
|
|
251
|
-
if ('
|
|
306
|
+
if ('visible' in $$props) $$invalidate(1, visible = $$props.visible);
|
|
307
|
+
if ('hoverEnable' in $$props) $$invalidate(2, hoverEnable = $$props.hoverEnable);
|
|
308
|
+
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
309
|
+
if ('cameraImageUrl' in $$props) $$invalidate(4, cameraImageUrl = $$props.cameraImageUrl);
|
|
310
|
+
if ('extraObjects' in $$props) $$invalidate(5, extraObjects = $$props.extraObjects);
|
|
252
311
|
};
|
|
253
312
|
|
|
254
313
|
$$self.$$.update = () => {
|
|
255
|
-
if ($$self.$$.dirty & /*clientWidth, clientHeight, floorplanData, contentWidth*/
|
|
314
|
+
if ($$self.$$.dirty & /*clientWidth, clientHeight, floorplanData, contentWidth*/ 456) {
|
|
256
315
|
$: {
|
|
257
316
|
const size = Math.min(clientWidth, clientHeight);
|
|
258
317
|
const { max, min } = floorplanData.bounding;
|
|
@@ -264,15 +323,16 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
264
323
|
return [size / boundingHeight * boundingWidth, size];
|
|
265
324
|
})();
|
|
266
325
|
|
|
267
|
-
$$invalidate(
|
|
268
|
-
$$invalidate(
|
|
269
|
-
$$invalidate(
|
|
326
|
+
$$invalidate(8, contentWidth = contentSize[0]);
|
|
327
|
+
$$invalidate(11, contentHeight = contentSize[1]);
|
|
328
|
+
$$invalidate(9, pxmm = contentWidth / boundingWidth);
|
|
270
329
|
}
|
|
271
330
|
}
|
|
272
331
|
};
|
|
273
332
|
|
|
274
333
|
return [
|
|
275
334
|
five,
|
|
335
|
+
visible,
|
|
276
336
|
hoverEnable,
|
|
277
337
|
floorplanData,
|
|
278
338
|
cameraImageUrl,
|
|
@@ -299,10 +359,11 @@ class Component extends SvelteComponent {
|
|
|
299
359
|
safe_not_equal,
|
|
300
360
|
{
|
|
301
361
|
five: 0,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
362
|
+
visible: 1,
|
|
363
|
+
hoverEnable: 2,
|
|
364
|
+
floorplanData: 3,
|
|
365
|
+
cameraImageUrl: 4,
|
|
366
|
+
extraObjects: 5
|
|
306
367
|
},
|
|
307
368
|
add_css
|
|
308
369
|
);
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { BaseOptions } from '../../base/BasePlugin';
|
|
2
3
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
3
4
|
import type { FloorplanExtraObject3D } from '../typings/floorplanData';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export default class PanoFloorplanRadarPluginController {
|
|
5
|
+
import type { State, Config, EventMap, Parameters, PluginData, PluginServerData } from './typing';
|
|
6
|
+
import * as BasePlugin from '../../base/BasePluginWithData';
|
|
7
|
+
export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
|
|
8
|
+
name: string;
|
|
9
|
+
state: State;
|
|
10
|
+
protected data?: PluginData;
|
|
12
11
|
private app?;
|
|
13
|
-
private five;
|
|
14
12
|
private wrapperSelector;
|
|
15
|
-
private data?;
|
|
16
13
|
private wrapper;
|
|
14
|
+
private disposed;
|
|
17
15
|
private extraObjects;
|
|
18
|
-
|
|
19
|
-
constructor(five: Five, params?: PanoFloorplanRadarPluginControllerParameter);
|
|
16
|
+
constructor(five: Five, params?: Parameters);
|
|
20
17
|
dispose: () => void;
|
|
21
|
-
load
|
|
18
|
+
load(serverData: PluginServerData | FloorplanServerData, state?: Partial<State>, userAction?: boolean): Promise<void>;
|
|
19
|
+
show(options?: BaseOptions): Promise<void>;
|
|
20
|
+
hide(options?: BaseOptions): Promise<void>;
|
|
21
|
+
enable(options?: BaseOptions): void;
|
|
22
|
+
disable(options?: BaseOptions): void;
|
|
23
|
+
/** 更改插件 State */
|
|
24
|
+
setState(state: Partial<State>, options?: BaseOptions): void;
|
|
22
25
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
23
26
|
appendTo(wrapper: Element): void;
|
|
24
|
-
changeConfigs(
|
|
27
|
+
changeConfigs(config: Config, userAction?: boolean): void;
|
|
25
28
|
setExtraObjectsWith3DPositions(data: FloorplanExtraObject3D[]): void;
|
|
29
|
+
protected formatData(serverData: PluginServerData): Promise<PluginData>;
|
|
30
|
+
private _enable;
|
|
31
|
+
private _disable;
|
|
32
|
+
private _show;
|
|
33
|
+
private _hide;
|
|
34
|
+
private updateState;
|
|
26
35
|
private render;
|
|
27
36
|
}
|