@realsee/dnalogel 2.0.0-alpha.26-beta → 2.0.0-alpha.28-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +3 -48
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +4 -6
- package/dist/CameraMovementPlugin/index.js +12 -12
- package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/dist/ModelEntryDoorGuidePlugin/index.js +0 -5
- package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +8 -3
- package/dist/ModelItemLabelPlugin/index.js +14 -8
- package/dist/ModelRoomLabelPlugin/index.js +82 -46
- package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +4 -3
- package/dist/ModelTVVideoPlugin/index.js +3 -3
- package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
- package/dist/ModelViewPlugin/index.d.ts +3 -16
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/index.d.ts +4 -47
- package/dist/PanoCompassPlugin/index.js +5 -4
- package/dist/PanoMeasurePlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.js +4 -1
- package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +4 -30
- package/dist/PanoRulerPlugin/index.js +0 -5
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +4 -32
- package/dist/PanoSpatialTagPlugin/index.js +23 -21
- package/dist/_index.d.ts +30 -0
- package/dist/index.d.ts +16 -29
- package/dist/index.es.js +122 -70
- package/dist/index.js +145 -90
- package/dist/index.umd.js +145 -90
- package/docs/assets/search.js +1 -1
- package/docs/classes/ModelRoomLabelController.html +6 -6
- package/docs/classes/PanoFloorplanRadarPluginController.html +3 -0
- package/docs/enums/CameraMovementEffect.html +3 -0
- package/docs/enums/DIRECTION.html +1 -0
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +1 -1
- package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
- package/docs/interfaces/Point.html +1 -0
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +8 -8
- package/docs/modules.html +20 -12
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
- package/libs/CSS3DRenderPlugin/index.js +2 -181
- package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
- package/libs/CameraMovementPlugin/index.d.ts +4 -6
- package/libs/CameraMovementPlugin/index.js +3 -158
- package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +75 -0
- package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/libs/ModelChassisCompassPlugin/index.js +2 -74
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -139
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +1 -1
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +8 -3
- package/libs/ModelItemLabelPlugin/index.js +7 -119
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +83 -47
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
- package/libs/ModelTVVideoPlugin/index.d.ts +4 -3
- package/libs/ModelTVVideoPlugin/index.js +3 -253
- package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
- package/libs/ModelViewPlugin/Plugin.js +160 -0
- package/libs/ModelViewPlugin/index.d.ts +3 -16
- package/libs/ModelViewPlugin/index.js +2 -159
- package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/libs/PanoCompassPlugin/Plugin.js +249 -0
- package/libs/PanoCompassPlugin/index.d.ts +4 -47
- package/libs/PanoCompassPlugin/index.js +3 -249
- package/libs/PanoMeasurePlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/index.js +1 -1
- package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/libs/PanoRulerPlugin/Plugin.js +402 -0
- package/libs/PanoRulerPlugin/index.d.ts +4 -30
- package/libs/PanoRulerPlugin/index.js +2 -401
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +33 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +415 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +4 -32
- package/libs/PanoSpatialTagPlugin/index.js +4 -412
- package/libs/_index.d.ts +30 -0
- package/libs/_index.js +18 -0
- package/libs/index.d.ts +16 -29
- package/libs/index.js +25 -16
- package/package.json +6 -5
|
@@ -24,13 +24,13 @@ function _interopNamespace(e) {
|
|
|
24
24
|
|
|
25
25
|
var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
exports.DIRECTION = void 0;
|
|
28
28
|
(function (DIRECTION) {
|
|
29
29
|
DIRECTION["TOP_LEFT"] = "topLeft";
|
|
30
30
|
DIRECTION["TOP_RIGHT"] = "topRight";
|
|
31
31
|
DIRECTION["BOTTOM_LEFT"] = "bottomLeft";
|
|
32
32
|
DIRECTION["BOTTOM_RIGHT"] = "bottomRight";
|
|
33
|
-
})(DIRECTION || (DIRECTION = {}));
|
|
33
|
+
})(exports.DIRECTION || (exports.DIRECTION = {}));
|
|
34
34
|
|
|
35
35
|
function parseModelTVVideoPoints(points) {
|
|
36
36
|
if (points.length === 0)
|
|
@@ -39,7 +39,7 @@ function parseModelTVVideoPoints(points) {
|
|
|
39
39
|
return points;
|
|
40
40
|
let newPoints = [];
|
|
41
41
|
points.map(point => {
|
|
42
|
-
const newPoint = [point[DIRECTION.TOP_LEFT], point[DIRECTION.BOTTOM_LEFT], point[DIRECTION.BOTTOM_RIGHT], point[DIRECTION.TOP_RIGHT]];
|
|
42
|
+
const newPoint = [point[exports.DIRECTION.TOP_LEFT], point[exports.DIRECTION.BOTTOM_LEFT], point[exports.DIRECTION.BOTTOM_RIGHT], point[exports.DIRECTION.TOP_RIGHT]];
|
|
43
43
|
newPoints.push(newPoint);
|
|
44
44
|
});
|
|
45
45
|
return newPoints;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
export interface ModelViewPluginExportType {
|
|
3
|
+
appendTo(element: HTMLElement, size?: {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
}): void;
|
|
7
|
+
refresh(size?: {
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
}): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Five 模型插件
|
|
14
|
+
* @template ExportType 导出方法
|
|
15
|
+
*/
|
|
16
|
+
export declare const ModelViewPlugin: FivePlugin<void, ModelViewPluginExportType>;
|
|
17
|
+
export default ModelViewPlugin;
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
appendTo(element: HTMLElement, size?: {
|
|
4
|
-
width?: number;
|
|
5
|
-
height?: number;
|
|
6
|
-
}): void;
|
|
7
|
-
refresh(size?: {
|
|
8
|
-
width?: number;
|
|
9
|
-
height?: number;
|
|
10
|
-
}): void;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Five 模型插件
|
|
14
|
-
* @template ExportType 导出方法
|
|
15
|
-
*/
|
|
16
|
-
export declare const ModelViewPlugin: FivePlugin<void, ModelViewPluginExportType>;
|
|
1
|
+
import ModelViewPlugin from './Plugin';
|
|
2
|
+
export { ModelViewPlugin };
|
|
17
3
|
export default ModelViewPlugin;
|
|
4
|
+
export type { ModelViewPluginExportType } from './Plugin';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Five, FivePlugin } from '@realsee/five';
|
|
2
|
+
import type { FloorplanServerRoomItem } from '../floorplan/typings/floorplanServerData';
|
|
3
|
+
export interface PanoCompassPluginParameterType {
|
|
4
|
+
compassImageUrl?: string;
|
|
5
|
+
entryDoorImageUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PanoCompassPluginData {
|
|
8
|
+
north_rad: null | number;
|
|
9
|
+
entrance: null | undefined | {
|
|
10
|
+
position: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
room_observers: undefined | {
|
|
17
|
+
index: number;
|
|
18
|
+
floor_index: number;
|
|
19
|
+
room: FloorplanServerRoomItem;
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
export declare type PanoCompassPluginExportType = PanoCompassController;
|
|
23
|
+
export declare const PanoCompassPlugin: FivePlugin<PanoCompassPluginParameterType | undefined, PanoCompassController>;
|
|
24
|
+
export default PanoCompassPlugin;
|
|
25
|
+
declare class PanoCompassController {
|
|
26
|
+
five: Five;
|
|
27
|
+
data?: PanoCompassPluginData;
|
|
28
|
+
config?: PanoCompassPluginParameterType;
|
|
29
|
+
private group;
|
|
30
|
+
private modelLoaded;
|
|
31
|
+
private roomInfoInstance?;
|
|
32
|
+
private roomInfoWrapperInstance?;
|
|
33
|
+
private compassMeshTween?;
|
|
34
|
+
private compassMesh?;
|
|
35
|
+
private entryDoorMesh?;
|
|
36
|
+
constructor(five: Five, config?: PanoCompassPluginParameterType);
|
|
37
|
+
load(data: PanoCompassPluginData): void;
|
|
38
|
+
dispose: () => void;
|
|
39
|
+
private onFiveFistPanoLoaded;
|
|
40
|
+
private init;
|
|
41
|
+
private loadCompassMesh;
|
|
42
|
+
private loadEntryDoorMesh;
|
|
43
|
+
private loadRoomInfo;
|
|
44
|
+
private onFivePanoWillArrive;
|
|
45
|
+
private onFivePanoArrived;
|
|
46
|
+
private onFiveCameraDirectionUpdate;
|
|
47
|
+
}
|
|
@@ -1,51 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
entryDoorImageUrl?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface PanoCompassPluginData {
|
|
8
|
-
north_rad: null | number;
|
|
9
|
-
entrance: null | undefined | {
|
|
10
|
-
position: {
|
|
11
|
-
x: number;
|
|
12
|
-
y: number;
|
|
13
|
-
z: number;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
room_observers: undefined | {
|
|
17
|
-
index: number;
|
|
18
|
-
floor_index: number;
|
|
19
|
-
room: FloorplanServerRoomItem;
|
|
20
|
-
}[];
|
|
21
|
-
}
|
|
22
|
-
export declare type PanoCompassPluginExportType = PanoCompassController;
|
|
1
|
+
import PanoCompassPlugin from './Plugin';
|
|
2
|
+
export { PanoCompassPlugin };
|
|
3
|
+
export default PanoCompassPlugin;
|
|
4
|
+
export type { PanoCompassPluginParameterType, PanoCompassPluginData, PanoCompassPluginExportType } from './Plugin';
|
|
23
5
|
export declare const panoCompassPluginServerParams: {
|
|
24
6
|
name: string;
|
|
25
7
|
version: number;
|
|
26
8
|
};
|
|
27
|
-
export declare const PanoCompassPlugin: FivePlugin<PanoCompassPluginParameterType | undefined, PanoCompassController>;
|
|
28
|
-
export default PanoCompassPlugin;
|
|
29
|
-
declare class PanoCompassController {
|
|
30
|
-
five: Five;
|
|
31
|
-
data?: PanoCompassPluginData;
|
|
32
|
-
config?: PanoCompassPluginParameterType;
|
|
33
|
-
private group;
|
|
34
|
-
private modelLoaded;
|
|
35
|
-
private roomInfoInstance?;
|
|
36
|
-
private roomInfoWrapperInstance?;
|
|
37
|
-
private compassMeshTween?;
|
|
38
|
-
private compassMesh?;
|
|
39
|
-
private entryDoorMesh?;
|
|
40
|
-
constructor(five: Five, config?: PanoCompassPluginParameterType);
|
|
41
|
-
load(data: PanoCompassPluginData): void;
|
|
42
|
-
dispose: () => void;
|
|
43
|
-
private onFiveFistPanoLoaded;
|
|
44
|
-
private init;
|
|
45
|
-
private loadCompassMesh;
|
|
46
|
-
private loadEntryDoorMesh;
|
|
47
|
-
private loadRoomInfo;
|
|
48
|
-
private onFivePanoWillArrive;
|
|
49
|
-
private onFivePanoArrived;
|
|
50
|
-
private onFiveCameraDirectionUpdate;
|
|
51
|
-
}
|
|
@@ -382,10 +382,6 @@ function tweenProgress(duration, easing = TWEEN__default["default"].Easing.Linea
|
|
|
382
382
|
return tween;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
const panoCompassPluginServerParams = {
|
|
386
|
-
name: 'PanoCompassPlugin',
|
|
387
|
-
version: 0,
|
|
388
|
-
};
|
|
389
385
|
const PanoCompassPlugin = function (five, config) {
|
|
390
386
|
return new PanoCompassController(five, config);
|
|
391
387
|
};
|
|
@@ -630,6 +626,11 @@ class PanoCompassController {
|
|
|
630
626
|
}
|
|
631
627
|
}
|
|
632
628
|
|
|
629
|
+
const panoCompassPluginServerParams = {
|
|
630
|
+
name: 'PanoCompassPlugin',
|
|
631
|
+
version: 0,
|
|
632
|
+
};
|
|
633
|
+
|
|
633
634
|
exports.PanoCompassPlugin = PanoCompassPlugin;
|
|
634
635
|
exports["default"] = PanoCompassPlugin;
|
|
635
636
|
exports.panoCompassPluginServerParams = panoCompassPluginServerParams;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FivePlugin } from '@realsee/five';
|
|
2
2
|
import MeasureController, { MeasurePluginParameter } from './Controller';
|
|
3
|
-
declare const PanoMeasurePlugin: FivePlugin<MeasurePluginParameter, PluginReturns>;
|
|
3
|
+
export declare const PanoMeasurePlugin: FivePlugin<MeasurePluginParameter, PluginReturns>;
|
|
4
4
|
export default PanoMeasurePlugin;
|
|
5
5
|
export declare type PluginReturns = MeasureController;
|
|
6
6
|
export type { PluginEvent } from './typings/event.type';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var three = require('three');
|
|
4
6
|
var line = require('@realsee/five/line');
|
|
5
7
|
var five = require('@realsee/five');
|
|
@@ -5528,4 +5530,5 @@ const PanoMeasurePlugin = function PanoMeasurePlugin(five, params) {
|
|
|
5528
5530
|
return new MeasureController(five, params);
|
|
5529
5531
|
};
|
|
5530
5532
|
|
|
5531
|
-
|
|
5533
|
+
exports.PanoMeasurePlugin = PanoMeasurePlugin;
|
|
5534
|
+
exports["default"] = PanoMeasurePlugin;
|
|
@@ -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,17 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export type { ModelRoomLabelController, ModelRoomLabelPluginData, RoomLabel, ModelRoomLabelPluginReturnType, ModelRoomLabelPluginParameters, } from './ModelRoomLabelPlugin';
|
|
6
|
-
export { default as ModelRoomLabelPlugin } from './ModelRoomLabelPlugin';
|
|
1
|
+
export * from './ModelViewPlugin';
|
|
2
|
+
export * from './CSS3DRenderPlugin';
|
|
3
|
+
export * from './PanoCursorRaycasterPlugin';
|
|
4
|
+
export * from './ModelRoomLabelPlugin';
|
|
7
5
|
export * from './floorplan/constant';
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
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';
|
|
6
|
+
export * from './floorplan/TopviewFloorplanPlugin';
|
|
7
|
+
export * from './floorplan/PanoFloorplanRadarPlugin';
|
|
8
|
+
export * from './floorplan/ModelFloorplanPlugin';
|
|
9
|
+
export * from './ModelChassisCompassPlugin';
|
|
10
|
+
export * from './ModelEntryDoorGuidePlugin';
|
|
11
|
+
export * from './CameraMovementPlugin';
|
|
12
|
+
export * from './PanoRulerPlugin';
|
|
13
|
+
export * from './PanoCompassPlugin';
|
|
14
|
+
export * from './PanoMeasurePlugin';
|
|
15
|
+
export * from './PanoSpatialTagPlugin';
|
|
16
|
+
export * from './ModelItemLabelPlugin';
|
|
17
|
+
export * from './ModelTVVideoPlugin';
|