@realsee/dnalogel 2.0.0-alpha.26 → 2.0.0-alpha.28
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 +6 -0
- package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +3 -48
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +4 -6
- package/dist/CameraMovementPlugin/index.js +12 -12
- package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/dist/ModelEntryDoorGuidePlugin/index.js +0 -5
- package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +8 -3
- package/dist/ModelItemLabelPlugin/index.js +13 -7
- package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +4 -3
- package/dist/ModelTVVideoPlugin/index.js +3 -3
- package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
- package/dist/ModelViewPlugin/index.d.ts +3 -16
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/index.d.ts +4 -47
- package/dist/PanoCompassPlugin/index.js +5 -4
- package/dist/PanoMeasurePlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.js +4 -1
- package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +4 -30
- package/dist/PanoRulerPlugin/index.js +0 -5
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +4 -32
- package/dist/PanoSpatialTagPlugin/index.js +23 -21
- package/dist/_index.d.ts +30 -0
- package/dist/floorplan/index.d.ts +6 -0
- package/dist/index.d.ts +15 -30
- package/dist/index.es.js +149 -22
- package/dist/index.js +177 -43
- package/dist/index.umd.js +180 -47
- package/docs/assets/search.js +1 -1
- package/docs/classes/ModelRoomLabelController.html +5 -8
- package/docs/classes/PanoFloorplanRadarPluginController.html +3 -0
- package/docs/enums/CameraMovementEffect.html +3 -0
- package/docs/enums/DIRECTION.html +1 -0
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
- package/docs/interfaces/FloorplanBounding.html +10 -0
- package/docs/interfaces/FloorplanData.html +3 -0
- package/docs/interfaces/FloorplanEntrance.html +15 -0
- package/docs/interfaces/FloorplanExtraObject.html +7 -0
- package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
- package/docs/interfaces/FloorplanFloorData.html +3 -0
- package/docs/interfaces/FloorplanImagePosition.html +3 -0
- package/docs/interfaces/FloorplanObserver.html +5 -0
- package/docs/interfaces/FloorplanOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanPosition.html +3 -0
- package/docs/interfaces/FloorplanRoomItem.html +17 -0
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
- package/docs/interfaces/FloorplanServerBounding.html +10 -0
- package/docs/interfaces/FloorplanServerComputedData.html +1 -0
- package/docs/interfaces/FloorplanServerData.html +3 -0
- package/docs/interfaces/FloorplanServerEntrance.html +15 -0
- package/docs/interfaces/FloorplanServerFloorData.html +3 -0
- package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
- package/docs/interfaces/FloorplanServerObserver.html +5 -0
- package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanServerPosition.html +3 -0
- package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +3 -3
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
- package/docs/interfaces/Point.html +1 -0
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +10 -10
- package/docs/modules.html +28 -12
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
- package/libs/CSS3DRenderPlugin/index.js +2 -181
- package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
- package/libs/CameraMovementPlugin/index.d.ts +4 -6
- package/libs/CameraMovementPlugin/index.js +3 -158
- package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +75 -0
- package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/libs/ModelChassisCompassPlugin/index.js +2 -74
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -139
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +8 -3
- package/libs/ModelItemLabelPlugin/index.js +7 -119
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
- package/libs/ModelTVVideoPlugin/index.d.ts +4 -3
- package/libs/ModelTVVideoPlugin/index.js +3 -253
- package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
- package/libs/ModelViewPlugin/Plugin.js +160 -0
- package/libs/ModelViewPlugin/index.d.ts +3 -16
- package/libs/ModelViewPlugin/index.js +2 -159
- package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/libs/PanoCompassPlugin/Plugin.js +249 -0
- package/libs/PanoCompassPlugin/index.d.ts +4 -47
- package/libs/PanoCompassPlugin/index.js +3 -249
- package/libs/PanoMeasurePlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/index.js +1 -1
- package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/libs/PanoRulerPlugin/Plugin.js +402 -0
- package/libs/PanoRulerPlugin/index.d.ts +4 -30
- package/libs/PanoRulerPlugin/index.js +2 -401
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +33 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +415 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +4 -32
- package/libs/PanoSpatialTagPlugin/index.js +4 -412
- package/libs/_index.d.ts +30 -0
- package/libs/_index.js +18 -0
- package/libs/floorplan/index.d.ts +6 -0
- package/libs/floorplan/index.js +7 -0
- package/libs/index.d.ts +15 -30
- package/libs/index.js +25 -17
- package/package.json +5 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import type { RoomInfo, RoomRules } from './typings';
|
|
3
|
+
export interface PanoRulerPluginOptions {
|
|
4
|
+
distanceText?: (distance: number) => string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
interface PanoRulerPluginPluginState {
|
|
8
|
+
enable: boolean;
|
|
9
|
+
loaded: boolean;
|
|
10
|
+
options: PanoRulerPluginOptions;
|
|
11
|
+
}
|
|
12
|
+
export interface PanoRulerPluginParameterType {
|
|
13
|
+
roomInfo?: RoomInfo;
|
|
14
|
+
roomRules?: RoomRules;
|
|
15
|
+
options?: PanoRulerPluginOptions;
|
|
16
|
+
}
|
|
17
|
+
export interface PanoRulerPluginExportType {
|
|
18
|
+
enable: () => void;
|
|
19
|
+
disable: () => void;
|
|
20
|
+
load: (roomInfo?: RoomInfo, roomRules?: RoomRules, options?: PanoRulerPluginOptions) => Promise<boolean>;
|
|
21
|
+
state: PanoRulerPluginPluginState;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 全景标尺插件
|
|
25
|
+
*/
|
|
26
|
+
export declare const PanoRulerPlugin: FivePlugin<PanoRulerPluginParameterType, PanoRulerPluginExportType>;
|
|
27
|
+
export declare const panoRulerPluginServerParams: {
|
|
28
|
+
name: string;
|
|
29
|
+
version: number;
|
|
30
|
+
};
|
|
31
|
+
export default PanoRulerPlugin;
|
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export interface PanoRulerPluginOptions {
|
|
4
|
-
distanceText?: (distance: number) => string;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
interface PanoRulerPluginPluginState {
|
|
8
|
-
enable: boolean;
|
|
9
|
-
loaded: boolean;
|
|
10
|
-
options: PanoRulerPluginOptions;
|
|
11
|
-
}
|
|
12
|
-
export interface PanoRulerPluginParameterType {
|
|
13
|
-
roomInfo?: RoomInfo;
|
|
14
|
-
roomRules?: RoomRules;
|
|
15
|
-
options?: PanoRulerPluginOptions;
|
|
16
|
-
}
|
|
17
|
-
export interface PanoRulerPluginExportType {
|
|
18
|
-
enable: () => void;
|
|
19
|
-
disable: () => void;
|
|
20
|
-
load: (roomInfo?: RoomInfo, roomRules?: RoomRules, options?: PanoRulerPluginOptions) => Promise<boolean>;
|
|
21
|
-
state: PanoRulerPluginPluginState;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* 全景标尺插件
|
|
25
|
-
*/
|
|
26
|
-
export declare const PanoRulerPlugin: FivePlugin<PanoRulerPluginParameterType, PanoRulerPluginExportType>;
|
|
27
|
-
export declare const panoRulerPluginServerParams: {
|
|
28
|
-
name: string;
|
|
29
|
-
version: number;
|
|
30
|
-
};
|
|
1
|
+
import PanoRulerPlugin from './Plugin';
|
|
2
|
+
export { PanoRulerPlugin };
|
|
31
3
|
export default PanoRulerPlugin;
|
|
4
|
+
export type { Room, Rooms, RoomInfo, RoomRules } from './typings';
|
|
5
|
+
export type { PanoRulerPluginOptions, PanoRulerPluginParameterType, PanoRulerPluginExportType } from './Plugin';
|
|
@@ -604,11 +604,6 @@ const PanoRulerPlugin = (five$1, params) => {
|
|
|
604
604
|
state,
|
|
605
605
|
};
|
|
606
606
|
};
|
|
607
|
-
const panoRulerPluginServerParams = {
|
|
608
|
-
name: 'PanoRulerPlugin',
|
|
609
|
-
version: 0,
|
|
610
|
-
};
|
|
611
607
|
|
|
612
608
|
exports.PanoRulerPlugin = PanoRulerPlugin;
|
|
613
609
|
exports["default"] = PanoRulerPlugin;
|
|
614
|
-
exports.panoRulerPluginServerParams = panoRulerPluginServerParams;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import type { PanoSpatialTagPluginId, PanoSpatialTagPluginDataElement, PanoSpatialTagPluginContentReplacement, PanoSpatialTagPluginContentEvent } from './typings';
|
|
3
|
+
export interface PanoSpatialTagPluginData {
|
|
4
|
+
folded?: boolean;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
points: Array<PanoSpatialTagPluginDataElement>;
|
|
7
|
+
template: string;
|
|
8
|
+
events?: PanoSpatialTagPluginContentEvent;
|
|
9
|
+
render?: (template: string, replacement: PanoSpatialTagPluginContentReplacement) => string;
|
|
10
|
+
}
|
|
11
|
+
export interface PanoSpatialTagPluginParameterType {
|
|
12
|
+
container?: Element;
|
|
13
|
+
wait?: number;
|
|
14
|
+
maxNumberOnScreen?: number;
|
|
15
|
+
minRad?: number;
|
|
16
|
+
nearTolerance?: number;
|
|
17
|
+
upsideHeight?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface PanoSpatialTagPluginExportType {
|
|
20
|
+
load: (data: PanoSpatialTagPluginData) => void;
|
|
21
|
+
unfoldAll: () => void;
|
|
22
|
+
foldAll: () => void;
|
|
23
|
+
unfold: (id: PanoSpatialTagPluginId) => void;
|
|
24
|
+
fold: (id: PanoSpatialTagPluginId) => void;
|
|
25
|
+
enable: () => void;
|
|
26
|
+
disable: () => void;
|
|
27
|
+
dispose: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 空间游走标签插件
|
|
31
|
+
*/
|
|
32
|
+
export declare const PanoSpatialTagPlugin: FivePlugin<PanoSpatialTagPluginParameterType, PanoSpatialTagPluginExportType>;
|
|
33
|
+
export default PanoSpatialTagPlugin;
|
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export interface PanoSpatialTagPluginData {
|
|
4
|
-
folded?: boolean;
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
points: Array<PanoSpatialTagPluginDataElement>;
|
|
7
|
-
template: string;
|
|
8
|
-
events?: PanoSpatialTagPluginContentEvent;
|
|
9
|
-
render?: (template: string, replacement: PanoSpatialTagPluginContentReplacement) => string;
|
|
10
|
-
}
|
|
11
|
-
export interface PanoSpatialTagPluginParameterType {
|
|
12
|
-
container?: Element;
|
|
13
|
-
wait?: number;
|
|
14
|
-
maxNumberOnScreen?: number;
|
|
15
|
-
minRad?: number;
|
|
16
|
-
nearTolerance?: number;
|
|
17
|
-
upsideHeight?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface PanoSpatialTagPluginExportType {
|
|
20
|
-
load: (data: PanoSpatialTagPluginData) => void;
|
|
21
|
-
unfoldAll: () => void;
|
|
22
|
-
foldAll: () => void;
|
|
23
|
-
unfold: (id: PanoSpatialTagPluginId) => void;
|
|
24
|
-
fold: (id: PanoSpatialTagPluginId) => void;
|
|
25
|
-
enable: () => void;
|
|
26
|
-
disable: () => void;
|
|
27
|
-
dispose: () => void;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* 空间游走标签插件
|
|
31
|
-
*/
|
|
32
|
-
export declare const PanoSpatialTagPlugin: FivePlugin<PanoSpatialTagPluginParameterType, PanoSpatialTagPluginExportType>;
|
|
1
|
+
import PanoSpatialTagPlugin from './Plugin';
|
|
2
|
+
export { PanoSpatialTagPlugin };
|
|
33
3
|
export default PanoSpatialTagPlugin;
|
|
4
|
+
export * from './typings';
|
|
5
|
+
export type { PanoSpatialTagPluginExportType, PanoSpatialTagPluginParameterType, PanoSpatialTagPluginData } from './Plugin';
|
|
@@ -1111,7 +1111,9 @@ const PanoSpatialTagPlugin = (five$1, params) => {
|
|
|
1111
1111
|
}))
|
|
1112
1112
|
continue;
|
|
1113
1113
|
const raycaster = new THREE__namespace.Raycaster(camera.position.clone().setY(RAY_ORIGIN_Y), point.position.clone().sub(camera.position.clone().setY(RAY_ORIGIN_Y)).normalize(), 0, point.distance + RAY_TOLERANT_DISTANCE);
|
|
1114
|
-
const [intersect] = five$1.model.
|
|
1114
|
+
const [intersect] = five$1.model.bvhs.loaded ?
|
|
1115
|
+
five$1.model.intersectRaycaster(raycaster) :
|
|
1116
|
+
raycaster.intersectObjects(five$1.model.children, true);
|
|
1115
1117
|
if (!intersect)
|
|
1116
1118
|
continue;
|
|
1117
1119
|
if (point.distance - intersect.distance < RAY_TOLERANT_DISTANCE) {
|
|
@@ -1152,10 +1154,10 @@ const PanoSpatialTagPlugin = (five$1, params) => {
|
|
|
1152
1154
|
return newTags;
|
|
1153
1155
|
};
|
|
1154
1156
|
/** 标签数据加载
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1157
|
+
* @param data.points {Array} 标签数据
|
|
1158
|
+
* @param data.enabled {Boolean} 插件是否启用
|
|
1159
|
+
* @param data.folded {Boolean} 标签是否默认展开
|
|
1160
|
+
*/
|
|
1159
1161
|
const load = (data) => {
|
|
1160
1162
|
state.points = data.points.map(point => {
|
|
1161
1163
|
var _a, _b;
|
|
@@ -1179,16 +1181,16 @@ const PanoSpatialTagPlugin = (five$1, params) => {
|
|
|
1179
1181
|
state.folded = data.folded;
|
|
1180
1182
|
};
|
|
1181
1183
|
/** 标签启用
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
+
* 启用插件并重新计算展示标签
|
|
1185
|
+
*/
|
|
1184
1186
|
const enable = () => {
|
|
1185
1187
|
state.enabled = true;
|
|
1186
1188
|
updateTags();
|
|
1187
1189
|
};
|
|
1188
1190
|
/** 插件禁用
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1191
|
+
* 1. 禁用同时会清除已展示的标签
|
|
1192
|
+
* 2. 再次启用时会重新计算展示标签
|
|
1193
|
+
*/
|
|
1192
1194
|
const disable = () => {
|
|
1193
1195
|
state.enabled = false;
|
|
1194
1196
|
origins.$set({ origins: [] });
|
|
@@ -1200,9 +1202,9 @@ const PanoSpatialTagPlugin = (five$1, params) => {
|
|
|
1200
1202
|
state.tags = [];
|
|
1201
1203
|
};
|
|
1202
1204
|
/** 展开所有标签
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1205
|
+
* 1. 展开所有收起的标签
|
|
1206
|
+
* 2. 新标签会默认展开
|
|
1207
|
+
*/
|
|
1206
1208
|
const unfoldAll = () => {
|
|
1207
1209
|
state.folded = false;
|
|
1208
1210
|
state.tags.forEach(tag => {
|
|
@@ -1210,9 +1212,9 @@ const PanoSpatialTagPlugin = (five$1, params) => {
|
|
|
1210
1212
|
});
|
|
1211
1213
|
};
|
|
1212
1214
|
/** 收起所有标签
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1215
|
+
* 1. 收起所有展开的标签
|
|
1216
|
+
* 2. 新标签会默认收起
|
|
1217
|
+
*/
|
|
1216
1218
|
const foldAll = () => {
|
|
1217
1219
|
state.folded = true;
|
|
1218
1220
|
state.tags.forEach(tag => {
|
|
@@ -1220,8 +1222,8 @@ const PanoSpatialTagPlugin = (five$1, params) => {
|
|
|
1220
1222
|
});
|
|
1221
1223
|
};
|
|
1222
1224
|
/** 展开单个标签
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
+
* @param id {Number | String} 标签ID
|
|
1226
|
+
*/
|
|
1225
1227
|
const unfold = (id) => {
|
|
1226
1228
|
state.tags.forEach(tag => {
|
|
1227
1229
|
if (tag.id === id)
|
|
@@ -1229,8 +1231,8 @@ const PanoSpatialTagPlugin = (five$1, params) => {
|
|
|
1229
1231
|
});
|
|
1230
1232
|
};
|
|
1231
1233
|
/** 收起单个标签
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
+
* @param id {Number | String} 标签ID
|
|
1235
|
+
*/
|
|
1234
1236
|
const fold = (id) => {
|
|
1235
1237
|
state.tags.forEach(tag => {
|
|
1236
1238
|
if (tag.id === id)
|
|
@@ -1264,7 +1266,7 @@ const PanoSpatialTagPlugin = (five$1, params) => {
|
|
|
1264
1266
|
five$1.on('cameraUpdate', onCameraUpdate);
|
|
1265
1267
|
}
|
|
1266
1268
|
else {
|
|
1267
|
-
five$1.once('
|
|
1269
|
+
five$1.once('modelLoaded', () => {
|
|
1268
1270
|
if (!wrapper)
|
|
1269
1271
|
wrapper = five$1.getElement().parentElement;
|
|
1270
1272
|
wrapper.appendChild(container);
|
package/dist/_index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { default as ModelViewPlugin } from './ModelViewPlugin';
|
|
2
|
+
export { default as CSS3DRenderPlugin } from './CSS3DRenderPlugin';
|
|
3
|
+
export type { PanoCursorRaycasterPluginExportType } from './PanoCursorRaycasterPlugin';
|
|
4
|
+
export { default as PanoCursorRaycasterPlugin } from './PanoCursorRaycasterPlugin';
|
|
5
|
+
export type { ModelRoomLabelController, ModelRoomLabelPluginData, RoomLabel, ModelRoomLabelPluginReturnType, ModelRoomLabelPluginParameters, } from './ModelRoomLabelPlugin';
|
|
6
|
+
export { default as ModelRoomLabelPlugin } from './ModelRoomLabelPlugin';
|
|
7
|
+
export * from './floorplan/constant';
|
|
8
|
+
export type { TopviewFloorplanPluginReturnType, TopviewFloorplanPluginParameterType, } from './floorplan/TopviewFloorplanPlugin';
|
|
9
|
+
export { default as TopviewFloorplanPlugin } from './floorplan/TopviewFloorplanPlugin';
|
|
10
|
+
export type { PanoFloorplanRadarPluginReturnType, PanoFloorplanRadarPluginParameterType, } from './floorplan/PanoFloorplanRadarPlugin';
|
|
11
|
+
export { default as PanoFloorplanRadarPlugin } from './floorplan/PanoFloorplanRadarPlugin';
|
|
12
|
+
export type { ModelFloorplanParameterType, ModelFloorplanPluginReturnType, ModelFloorplanErrorType, ModelFloorplanPluginsConfigs, ModelFloorplanEventHandlers, ModelFloorplanViewEvent, } from './floorplan/ModelFloorplanPlugin';
|
|
13
|
+
export { default as ModelFloorplanPlugin } from './floorplan/ModelFloorplanPlugin';
|
|
14
|
+
export type { ModelChassisCompassPluginParameterType, ModelChassisCompassPluginData, ModelChassisCompassPluginExportType, } from './ModelChassisCompassPlugin';
|
|
15
|
+
export { default as ModelChassisCompassPlugin } from './ModelChassisCompassPlugin';
|
|
16
|
+
export type { ModelEntryDoorGuidePluginParameterType, ModelEntryDoorGuidePluginData, ModelEntryDoorGuidePluginExportType, } from './ModelEntryDoorGuidePlugin';
|
|
17
|
+
export { default as ModelEntryDoorGuidePlugin } from './ModelEntryDoorGuidePlugin';
|
|
18
|
+
export { default as CameraMovementPlugin } from './CameraMovementPlugin';
|
|
19
|
+
export type { PanoRulerPluginParameterType, PanoRulerPluginExportType, PanoRulerPluginOptions, } from './PanoRulerPlugin';
|
|
20
|
+
export { default as PanoRulerPlugin } from './PanoRulerPlugin';
|
|
21
|
+
export type { PanoCompassPluginParameterType, PanoCompassPluginExportType, PanoCompassPluginData, } from './PanoCompassPlugin';
|
|
22
|
+
export { default as PanoCompassPlugin } from './PanoCompassPlugin';
|
|
23
|
+
export type { PluginReturns, PluginEvent, LineJson, PointJson } from './PanoMeasurePlugin';
|
|
24
|
+
export { default as PanoMeasurePlugin } from './PanoMeasurePlugin';
|
|
25
|
+
export type { PanoSpatialTagPluginParameterType, PanoSpatialTagPluginData, PanoSpatialTagPluginExportType } from './PanoSpatialTagPlugin';
|
|
26
|
+
export { default as PanoSpatialTagPlugin } from './PanoSpatialTagPlugin';
|
|
27
|
+
export type { ModelItemLabelPluginData, ModelItemLabelPluginExportReturnsType, ModelItemLabelPluginParametersType } from './ModelItemLabelPlugin/typings';
|
|
28
|
+
export { default as ModelItemLabelPlugin } from './ModelItemLabelPlugin';
|
|
29
|
+
export type { ModelTVVideoPluginData, ModelTVVideoPluginParameterType, ModelTVVideoPluginExportType } from './ModelTVVideoPlugin/typings';
|
|
30
|
+
export { default as ModelTVVideoPlugin } from './ModelTVVideoPlugin';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export * from './
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export type { ModelEntryDoorGuidePluginParameterType, ModelEntryDoorGuidePluginData, ModelEntryDoorGuidePluginExportType, } from './ModelEntryDoorGuidePlugin';
|
|
17
|
-
export { default as ModelEntryDoorGuidePlugin } from './ModelEntryDoorGuidePlugin';
|
|
18
|
-
export { default as CameraMovementPlugin } from './CameraMovementPlugin';
|
|
19
|
-
export type { PanoRulerPluginParameterType, PanoRulerPluginExportType, PanoRulerPluginOptions, } from './PanoRulerPlugin';
|
|
20
|
-
export { default as PanoRulerPlugin } from './PanoRulerPlugin';
|
|
21
|
-
export type { PanoCompassPluginParameterType, PanoCompassPluginExportType, PanoCompassPluginData, } from './PanoCompassPlugin';
|
|
22
|
-
export { default as PanoCompassPlugin } from './PanoCompassPlugin';
|
|
23
|
-
export type { PluginReturns, PluginEvent, LineJson, PointJson } from './PanoMeasurePlugin';
|
|
24
|
-
export { default as PanoMeasurePlugin } from './PanoMeasurePlugin';
|
|
25
|
-
export type { PanoSpatialTagPluginParameterType, PanoSpatialTagPluginData, PanoSpatialTagPluginExportType } from './PanoSpatialTagPlugin';
|
|
26
|
-
export { default as PanoSpatialTagPlugin } from './PanoSpatialTagPlugin';
|
|
27
|
-
export type { ModelItemLabelPluginData, ModelItemLabelPluginExportReturnsType, ModelItemLabelPluginParametersType } from './ModelItemLabelPlugin/typings';
|
|
28
|
-
export { default as ModelItemLabelPlugin } from './ModelItemLabelPlugin';
|
|
29
|
-
export type { ModelTVVideoPluginData, ModelTVVideoPluginParameterType, ModelTVVideoPluginExportType } from './ModelTVVideoPlugin/typings';
|
|
30
|
-
export { default as ModelTVVideoPlugin } from './ModelTVVideoPlugin';
|
|
1
|
+
export * from './shared-utils/five/useFivePlugin';
|
|
2
|
+
export * from './ModelViewPlugin';
|
|
3
|
+
export * from './CSS3DRenderPlugin';
|
|
4
|
+
export * from './PanoCursorRaycasterPlugin';
|
|
5
|
+
export * from './ModelRoomLabelPlugin';
|
|
6
|
+
export * from './floorplan';
|
|
7
|
+
export * from './ModelChassisCompassPlugin';
|
|
8
|
+
export * from './ModelEntryDoorGuidePlugin';
|
|
9
|
+
export * from './CameraMovementPlugin';
|
|
10
|
+
export * from './PanoRulerPlugin';
|
|
11
|
+
export * from './PanoCompassPlugin';
|
|
12
|
+
export * from './PanoMeasurePlugin';
|
|
13
|
+
export * from './PanoSpatialTagPlugin';
|
|
14
|
+
export * from './ModelItemLabelPlugin';
|
|
15
|
+
export * from './ModelTVVideoPlugin';
|
package/dist/index.es.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { unsafe__useFiveInstance } from '@realsee/five/react';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
import { Vector3, Scene, Group, Raycaster, MeshBasicMaterial, CanvasTexture, AnimationMixer, Vector2, Color, TextureLoader, PlaneGeometry, sRGBEncoding, Mesh, CurvePath, LineCurve3, TubeGeometry, DoubleSide, SphereGeometry } from 'three';
|
|
3
4
|
import { CSS3DRenderer, CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
@@ -13,6 +14,14 @@ import TWEEN__default from '@tweenjs/tween.js';
|
|
|
13
14
|
import { writable } from 'svelte/store';
|
|
14
15
|
import classNames from 'classnames';
|
|
15
16
|
|
|
17
|
+
function useFivePlugin(name) {
|
|
18
|
+
const five = unsafe__useFiveInstance();
|
|
19
|
+
const plugin = five.plugins[name];
|
|
20
|
+
if (!plugin)
|
|
21
|
+
throw new Error(`can not find plugin "${name}"`);
|
|
22
|
+
return plugin;
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
/**
|
|
17
26
|
* Five 模型插件
|
|
18
27
|
* @template ExportType 导出方法
|
|
@@ -983,6 +992,10 @@ class ModelRoomLabelController {
|
|
|
983
992
|
const ModelRoomLabelPlugin = (five) => {
|
|
984
993
|
return new ModelRoomLabelController(five);
|
|
985
994
|
};
|
|
995
|
+
const modelRoomLabelPluginServerParams = {
|
|
996
|
+
name: 'ModelRoomLabelPlugin',
|
|
997
|
+
version: 0,
|
|
998
|
+
};
|
|
986
999
|
|
|
987
1000
|
var FLOOR_PLAN_ATTACHED_TO;
|
|
988
1001
|
(function (FLOOR_PLAN_ATTACHED_TO) {
|
|
@@ -6325,6 +6338,108 @@ const ModelFloorplanPlugin = (five, params) => {
|
|
|
6325
6338
|
return new ModelFloorplanPluginController(five, params);
|
|
6326
6339
|
};
|
|
6327
6340
|
|
|
6341
|
+
/** 房屋数据映射表 */
|
|
6342
|
+
const ROOM_FETILE_TYPE_MAP = [
|
|
6343
|
+
{ type: 0, floorType: 1, roomType: '100900000012', name: '其他' },
|
|
6344
|
+
{ type: 1, floorType: 1, roomType: '100900000002', name: '客厅' },
|
|
6345
|
+
{ type: 2, floorType: 1, roomType: '100900000002', name: '餐厅' },
|
|
6346
|
+
{ type: 3, floorType: 0, roomType: '100900000001', name: '卧室' },
|
|
6347
|
+
{ type: 4, floorType: 0, roomType: '100900000001', name: '书房' },
|
|
6348
|
+
{ type: 5, floorType: 3, roomType: '100900000004', name: '卫生间' },
|
|
6349
|
+
{ type: 6, floorType: 3, roomType: '100900000004', name: '淋浴间' },
|
|
6350
|
+
{ type: 7, floorType: 3, roomType: '100900000004', name: '洗手间' },
|
|
6351
|
+
{ type: 8, floorType: 3, roomType: '100900000003', name: '厨房' },
|
|
6352
|
+
{
|
|
6353
|
+
type: 9,
|
|
6354
|
+
floorType: 1,
|
|
6355
|
+
roomType: '100900000003',
|
|
6356
|
+
name: '开放厨房',
|
|
6357
|
+
onlySubArea: true,
|
|
6358
|
+
},
|
|
6359
|
+
{ type: 10, floorType: 0, roomType: '100900000001', name: '多功能间' },
|
|
6360
|
+
{ type: 11, floorType: 0, roomType: '100900000009', name: '保姆间' },
|
|
6361
|
+
{ type: 12, floorType: 4, roomType: '100900000005', name: '阳台' },
|
|
6362
|
+
{ type: 13, floorType: 4, roomType: '100900000006', name: '露台' },
|
|
6363
|
+
{ type: 14, floorType: 0, roomType: '100900000008', name: '储物间' },
|
|
6364
|
+
{ type: 15, floorType: 0, roomType: '100900000013', name: '衣帽间' },
|
|
6365
|
+
{ type: 16, floorType: 0, roomType: '100900000011', name: '阁楼' },
|
|
6366
|
+
{ type: 17, floorType: 2, roomType: '100900000007', name: '花园' },
|
|
6367
|
+
{ type: 18, floorType: 5, roomType: '100900000010', name: '车库' },
|
|
6368
|
+
{ type: 19, floorType: 1, roomType: '100900000012', name: '电梯' },
|
|
6369
|
+
{ type: 20, floorType: 1, roomType: '100900000012', name: '地下室' },
|
|
6370
|
+
{ type: 21, floorType: 1, roomType: '100900000012', name: '天井' },
|
|
6371
|
+
{ type: 22, floorType: 1, roomType: '100900000012', name: '阳光房' },
|
|
6372
|
+
{ type: 23, floorType: 1, roomType: '100900000012', name: '过道' },
|
|
6373
|
+
{ type: 24, floorType: 1, roomType: '100900000012', name: '楼梯间' },
|
|
6374
|
+
{ type: 25, floorType: 1, roomType: '100900000012', name: '门厅' },
|
|
6375
|
+
{ type: 26, floorType: 2, roomType: '100900000012', name: '入户花园' },
|
|
6376
|
+
{ type: 27, floorType: 1, roomType: '100900000012', name: '玄关' },
|
|
6377
|
+
{ type: 28, floorType: 1, roomType: '100900000012', name: '挑空' },
|
|
6378
|
+
{ type: 29, floorType: 4, roomType: '100900000012', name: '晾晒区' },
|
|
6379
|
+
{ type: 30, floorType: 4, roomType: '100900000012', name: '洗衣房' },
|
|
6380
|
+
{ type: 31, floorType: 0, roomType: '100900000012', name: '娱乐区' },
|
|
6381
|
+
{ type: 32, floorType: 0, roomType: '100900000012', name: '健身区' },
|
|
6382
|
+
{ type: 33, floorType: 0, roomType: '100900000012', name: '接待区' },
|
|
6383
|
+
{ type: 34, floorType: 0, roomType: '100900000012', name: '影音区' },
|
|
6384
|
+
{ type: 35, floorType: 1, roomType: '100900000012', name: '餐饮区' },
|
|
6385
|
+
{
|
|
6386
|
+
type: 36,
|
|
6387
|
+
floorType: 1,
|
|
6388
|
+
roomType: '100900000012',
|
|
6389
|
+
name: '其他',
|
|
6390
|
+
onlySubArea: true,
|
|
6391
|
+
},
|
|
6392
|
+
{ type: 37, floorType: 1, roomType: '100900000002', name: '起居室' },
|
|
6393
|
+
{ type: 38, floorType: 0, roomType: '100900000001', name: '主卧' },
|
|
6394
|
+
{ type: 39, floorType: 0, roomType: '100900000001', name: '次卧' },
|
|
6395
|
+
{ type: 40, floorType: 0, roomType: '100900000001', name: '优化间' },
|
|
6396
|
+
{ type: 41, floorType: 0, roomType: '100900000001', name: '办公室' },
|
|
6397
|
+
{ type: 42, floorType: 0, roomType: '100900000001', name: '会议室' },
|
|
6398
|
+
{ type: 43, floorType: 0, roomType: '100900000001', name: '洽谈间' },
|
|
6399
|
+
{ type: 44, floorType: 1, roomType: '100900000002', name: '共享大厅' },
|
|
6400
|
+
{ type: 45, floorType: 1, roomType: '100900000012', name: '水吧' },
|
|
6401
|
+
{ type: 46, floorType: 0, roomType: '100900000015', name: '出入口' },
|
|
6402
|
+
{ type: 47, floorType: 0, roomType: '100900000015', name: '大厅' },
|
|
6403
|
+
{ type: 48, floorType: 0, roomType: '100900000015', name: '包厢' },
|
|
6404
|
+
{ type: 49, floorType: 0, roomType: '100900000015', name: '其他' },
|
|
6405
|
+
{ type: 50, floorType: 0, roomType: '100900000016', name: '出入口' },
|
|
6406
|
+
{ type: 51, floorType: 0, roomType: '100900000016', name: '办公区' },
|
|
6407
|
+
{ type: 52, floorType: 0, roomType: '100900000016', name: '老板间' },
|
|
6408
|
+
{ type: 53, floorType: 0, roomType: '100900000016', name: '会议室' },
|
|
6409
|
+
{ type: 54, floorType: 0, roomType: '100900000016', name: '休息区/水吧' },
|
|
6410
|
+
{ type: 55, floorType: 0, roomType: '100900000016', name: '其他' },
|
|
6411
|
+
{ type: 56, floorType: 2, roomType: '100900000012', name: '空中花园' },
|
|
6412
|
+
{ type: 57, floorType: 0, roomType: '100900000001', name: '洋室' },
|
|
6413
|
+
{ type: 58, floorType: 0, roomType: '100900000001', name: '和室' },
|
|
6414
|
+
];
|
|
6415
|
+
/** 地板信息映射表 */
|
|
6416
|
+
const FLOOR_TYPE_MAP = [
|
|
6417
|
+
{ type: 0, description: '木质地板' },
|
|
6418
|
+
{ type: 1, description: '瓷砖地面' },
|
|
6419
|
+
{ type: 2, description: '户外地面' },
|
|
6420
|
+
{ type: 3, description: '卫生间地面' },
|
|
6421
|
+
{ type: 4, description: '阳台地面' },
|
|
6422
|
+
{ type: 5, description: '车库地面' },
|
|
6423
|
+
];
|
|
6424
|
+
/** 房屋类型映射表 */
|
|
6425
|
+
const ROOM_TYPE_MAP = [
|
|
6426
|
+
{ roomType: '100900000001', description: '室' },
|
|
6427
|
+
{ roomType: '100900000002', description: '厅' },
|
|
6428
|
+
{ roomType: '100900000003', description: '厨' },
|
|
6429
|
+
{ roomType: '100900000004', description: '卫' },
|
|
6430
|
+
{ roomType: '100900000005', description: '阳台' },
|
|
6431
|
+
{ roomType: '100900000006', description: '露台' },
|
|
6432
|
+
{ roomType: '100900000007', description: '花园' },
|
|
6433
|
+
{ roomType: '100900000008', description: '储' },
|
|
6434
|
+
{ roomType: '100900000009', description: '保姆间' },
|
|
6435
|
+
{ roomType: '100900000010', description: '车库' },
|
|
6436
|
+
{ roomType: '100900000011', description: '阁楼' },
|
|
6437
|
+
{ roomType: '100900000012', description: '其他' },
|
|
6438
|
+
{ roomType: '100900000013', description: '衣' },
|
|
6439
|
+
{ roomType: '100900000015', description: '商铺' },
|
|
6440
|
+
{ roomType: '100900000016', description: '写字楼' },
|
|
6441
|
+
];
|
|
6442
|
+
|
|
6328
6443
|
const genRotationMatrix = (x, y, z) => {
|
|
6329
6444
|
const matrix = new THREE.Matrix4();
|
|
6330
6445
|
const euler = new THREE.Euler(x, y, z, 'YXZ');
|
|
@@ -7805,6 +7920,11 @@ class PanoCompassController {
|
|
|
7805
7920
|
}
|
|
7806
7921
|
}
|
|
7807
7922
|
|
|
7923
|
+
const panoCompassPluginServerParams = {
|
|
7924
|
+
name: 'PanoCompassPlugin',
|
|
7925
|
+
version: 0,
|
|
7926
|
+
};
|
|
7927
|
+
|
|
7808
7928
|
/** 交换数组元素 */
|
|
7809
7929
|
function exchange(array, index1, index2) {
|
|
7810
7930
|
const value = array[index1];
|
|
@@ -14094,7 +14214,9 @@ const PanoSpatialTagPlugin = (five, params) => {
|
|
|
14094
14214
|
}))
|
|
14095
14215
|
continue;
|
|
14096
14216
|
const raycaster = new THREE.Raycaster(camera.position.clone().setY(RAY_ORIGIN_Y), point.position.clone().sub(camera.position.clone().setY(RAY_ORIGIN_Y)).normalize(), 0, point.distance + RAY_TOLERANT_DISTANCE);
|
|
14097
|
-
const [intersect] = five.model.
|
|
14217
|
+
const [intersect] = five.model.bvhs.loaded ?
|
|
14218
|
+
five.model.intersectRaycaster(raycaster) :
|
|
14219
|
+
raycaster.intersectObjects(five.model.children, true);
|
|
14098
14220
|
if (!intersect)
|
|
14099
14221
|
continue;
|
|
14100
14222
|
if (point.distance - intersect.distance < RAY_TOLERANT_DISTANCE) {
|
|
@@ -14135,10 +14257,10 @@ const PanoSpatialTagPlugin = (five, params) => {
|
|
|
14135
14257
|
return newTags;
|
|
14136
14258
|
};
|
|
14137
14259
|
/** 标签数据加载
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14260
|
+
* @param data.points {Array} 标签数据
|
|
14261
|
+
* @param data.enabled {Boolean} 插件是否启用
|
|
14262
|
+
* @param data.folded {Boolean} 标签是否默认展开
|
|
14263
|
+
*/
|
|
14142
14264
|
const load = (data) => {
|
|
14143
14265
|
state.points = data.points.map(point => {
|
|
14144
14266
|
var _a, _b;
|
|
@@ -14162,16 +14284,16 @@ const PanoSpatialTagPlugin = (five, params) => {
|
|
|
14162
14284
|
state.folded = data.folded;
|
|
14163
14285
|
};
|
|
14164
14286
|
/** 标签启用
|
|
14165
|
-
|
|
14166
|
-
|
|
14287
|
+
* 启用插件并重新计算展示标签
|
|
14288
|
+
*/
|
|
14167
14289
|
const enable = () => {
|
|
14168
14290
|
state.enabled = true;
|
|
14169
14291
|
updateTags();
|
|
14170
14292
|
};
|
|
14171
14293
|
/** 插件禁用
|
|
14172
|
-
|
|
14173
|
-
|
|
14174
|
-
|
|
14294
|
+
* 1. 禁用同时会清除已展示的标签
|
|
14295
|
+
* 2. 再次启用时会重新计算展示标签
|
|
14296
|
+
*/
|
|
14175
14297
|
const disable = () => {
|
|
14176
14298
|
state.enabled = false;
|
|
14177
14299
|
origins.$set({ origins: [] });
|
|
@@ -14183,9 +14305,9 @@ const PanoSpatialTagPlugin = (five, params) => {
|
|
|
14183
14305
|
state.tags = [];
|
|
14184
14306
|
};
|
|
14185
14307
|
/** 展开所有标签
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14308
|
+
* 1. 展开所有收起的标签
|
|
14309
|
+
* 2. 新标签会默认展开
|
|
14310
|
+
*/
|
|
14189
14311
|
const unfoldAll = () => {
|
|
14190
14312
|
state.folded = false;
|
|
14191
14313
|
state.tags.forEach(tag => {
|
|
@@ -14193,9 +14315,9 @@ const PanoSpatialTagPlugin = (five, params) => {
|
|
|
14193
14315
|
});
|
|
14194
14316
|
};
|
|
14195
14317
|
/** 收起所有标签
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
|
|
14318
|
+
* 1. 收起所有展开的标签
|
|
14319
|
+
* 2. 新标签会默认收起
|
|
14320
|
+
*/
|
|
14199
14321
|
const foldAll = () => {
|
|
14200
14322
|
state.folded = true;
|
|
14201
14323
|
state.tags.forEach(tag => {
|
|
@@ -14203,8 +14325,8 @@ const PanoSpatialTagPlugin = (five, params) => {
|
|
|
14203
14325
|
});
|
|
14204
14326
|
};
|
|
14205
14327
|
/** 展开单个标签
|
|
14206
|
-
|
|
14207
|
-
|
|
14328
|
+
* @param id {Number | String} 标签ID
|
|
14329
|
+
*/
|
|
14208
14330
|
const unfold = (id) => {
|
|
14209
14331
|
state.tags.forEach(tag => {
|
|
14210
14332
|
if (tag.id === id)
|
|
@@ -14212,8 +14334,8 @@ const PanoSpatialTagPlugin = (five, params) => {
|
|
|
14212
14334
|
});
|
|
14213
14335
|
};
|
|
14214
14336
|
/** 收起单个标签
|
|
14215
|
-
|
|
14216
|
-
|
|
14337
|
+
* @param id {Number | String} 标签ID
|
|
14338
|
+
*/
|
|
14217
14339
|
const fold = (id) => {
|
|
14218
14340
|
state.tags.forEach(tag => {
|
|
14219
14341
|
if (tag.id === id)
|
|
@@ -14247,7 +14369,7 @@ const PanoSpatialTagPlugin = (five, params) => {
|
|
|
14247
14369
|
five.on('cameraUpdate', onCameraUpdate);
|
|
14248
14370
|
}
|
|
14249
14371
|
else {
|
|
14250
|
-
five.once('
|
|
14372
|
+
five.once('modelLoaded', () => {
|
|
14251
14373
|
if (!wrapper)
|
|
14252
14374
|
wrapper = five.getElement().parentElement;
|
|
14253
14375
|
wrapper.appendChild(container);
|
|
@@ -14906,6 +15028,11 @@ const ModelItemLabelPlugin = (five, params) => {
|
|
|
14906
15028
|
};
|
|
14907
15029
|
};
|
|
14908
15030
|
|
|
15031
|
+
const modelItemLabelPluginServerParams = {
|
|
15032
|
+
name: 'ModelItemLabelPlugin',
|
|
15033
|
+
version: 0,
|
|
15034
|
+
};
|
|
15035
|
+
|
|
14909
15036
|
var DIRECTION;
|
|
14910
15037
|
(function (DIRECTION) {
|
|
14911
15038
|
DIRECTION["TOP_LEFT"] = "topLeft";
|
|
@@ -15179,4 +15306,4 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15179
15306
|
return { enable, disable, load, dispose };
|
|
15180
15307
|
};
|
|
15181
15308
|
|
|
15182
|
-
export { CSS3DRenderPlugin, CameraMovementPlugin, FLOOR_PLAN_ATTACHED_TO, ModelChassisCompassPlugin, ModelEntryDoorGuidePlugin, ModelFloorplanPlugin, ModelItemLabelPlugin, ModelRoomLabelPlugin, ModelTVVideoPlugin, ModelViewPlugin, PanoCompassPlugin, PanoCursorRaycasterPlugin, PanoFloorplanRadarPlugin, PanoMeasurePlugin, PanoRulerPlugin, PanoSpatialTagPlugin, TopviewFloorplanPlugin };
|
|
15309
|
+
export { CSS3DRenderPlugin, CameraMovementEffect, CameraMovementPlugin, DIRECTION, DISPLAY_STRATEGY_TYPE, FLOOR_PLAN_ATTACHED_TO, FLOOR_TYPE_MAP, ModelChassisCompassPlugin, ModelEntryDoorGuidePlugin, ModelFloorplanPlugin, ModelItemLabelPlugin, ModelRoomLabelPlugin, ModelTVVideoPlugin, ModelViewPlugin, PanoCompassPlugin, PanoCursorRaycasterPlugin, PanoFloorplanRadarPlugin, PanoMeasurePlugin, PanoRulerPlugin, PanoSpatialTagPlugin, ROOM_FETILE_TYPE_MAP, ROOM_TYPE_MAP, Rotation, TopviewFloorplanPlugin, modelItemLabelPluginServerParams, modelRoomLabelPluginServerParams, panoCompassPluginServerParams, useFivePlugin };
|