@realsee/dnalogel 2.3.6 → 2.3.7-1
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/PanoMeasurePlugin/Controller/BaseController.d.ts +5 -5
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +5 -6
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +6 -9
- package/dist/PanoMeasurePlugin/Controller/ViewController.d.ts +6 -3
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +27 -9
- package/dist/PanoMeasurePlugin/Model/index.d.ts +17 -17
- package/dist/PanoMeasurePlugin/Model/line.d.ts +6 -4
- package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -4
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +37 -12
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +3 -4
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -2
- package/dist/PanoMeasurePlugin/index.d.ts +6 -2
- package/dist/PanoMeasurePlugin/typings/data.d.ts +6 -16
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +18 -14
- package/dist/PanoMeasurePlugin/typings/index.d.ts +4 -2
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +5 -3
- package/dist/index.cjs.js +97 -97
- package/dist/index.js +2609 -2528
- package/dist/index.umd.js +91 -91
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +318 -0
- package/docs/classes/PanoMeasurePluginModel.html +275 -0
- package/docs/classes/PanoMeasurePluginPoint.html +160 -0
- package/docs/classes/PanoMeasurePluginPolyline.html +306 -0
- package/docs/classes/PanoTagPluginController.html +39 -39
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +12 -12
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/LinkType.html +7 -7
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +12 -7
- package/docs/functions/CameraMovementPlugin.html +12 -7
- package/docs/functions/CruisePlugin.html +12 -7
- package/docs/functions/GuideLinePlugin.html +13 -8
- package/docs/functions/ItemLabelPlugin.html +12 -7
- package/docs/functions/MapviewFloorplanPlugin.html +12 -7
- package/docs/functions/ModelChassisCompassPlugin.html +12 -7
- package/docs/functions/ModelEntryDoorGuidePlugin.html +12 -7
- package/docs/functions/ModelFloorplanPlugin.html +12 -7
- package/docs/functions/ModelItemLabelPlugin.html +12 -7
- package/docs/functions/ModelRoomLabelPlugin.html +12 -7
- package/docs/functions/ModelTVVideoPlugin.html +12 -7
- package/docs/functions/ModelViewPlugin.html +12 -7
- package/docs/functions/Object3DHelperPlugin.html +12 -7
- package/docs/functions/PanoCompassPlugin.html +12 -7
- package/docs/functions/PanoCursorRaycasterPlugin.html +12 -7
- package/docs/functions/PanoDoorLabelPlugin.html +12 -7
- package/docs/functions/PanoFloorplanRadarPlugin.html +12 -7
- package/docs/functions/PanoMeasurePlugin.html +12 -7
- package/docs/functions/PanoRulerPlugin.html +12 -7
- package/docs/functions/PanoRulerProPlugin.html +12 -7
- package/docs/functions/PanoSpatialTagPlugin.html +12 -7
- package/docs/functions/PanoTagPlugin.html +12 -7
- package/docs/functions/TopviewFloorplanPlugin.html +12 -7
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +13 -8
- package/docs/index.html +12 -7
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +13 -8
- package/docs/interfaces/PanoMeasureParameterType.html +24 -14
- package/docs/interfaces/PanoMeasurePluginLineJson.html +78 -0
- package/docs/interfaces/{OpenParameter.html → PanoMeasurePluginOpenParameter.html} +15 -15
- package/docs/interfaces/{LineJson.html → PanoMeasurePluginPointJson.html} +18 -18
- package/docs/interfaces/{PointJson.html → PanoMeasurePluginPolylineJson.html} +24 -22
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +13 -8
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +13 -8
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +13 -8
- package/docs/interfaces/Rooms.html +13 -8
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +20 -10
- package/docs/types/ArrayPosition.html +13 -8
- package/docs/types/CSS3DRenderExportType.html +13 -8
- package/docs/types/CSS3DRenderPluginExportType.html +13 -8
- package/docs/types/CSS3DRenderPluginParameterType.html +13 -8
- package/docs/types/Color.html +13 -8
- package/docs/types/ContentTypeConfigKey.html +13 -8
- package/docs/types/ContentTypeConfigKeyArray.html +13 -8
- package/docs/types/Create3DDomContainerReturnType.html +13 -8
- package/docs/types/Create3DElementReturnType.html +13 -8
- package/docs/types/CruisePluginExportType.html +13 -8
- package/docs/types/Direction-1.html +13 -8
- package/docs/types/Direction4.html +13 -8
- package/docs/types/FloorplanRuleLabels.html +13 -8
- package/docs/types/FloorplanServerRuleLabels.html +13 -8
- package/docs/types/GuideLinePluginExportType.html +13 -8
- package/docs/types/HelperEventMap.html +13 -8
- package/docs/types/MapviewFloorplanPluginParameterType.html +13 -8
- package/docs/types/MapviewFloorplanPluginReturnType.html +13 -8
- package/docs/types/MediaData.html +13 -8
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +13 -8
- package/docs/types/ModelFloorplanPluginParameterType.html +13 -8
- package/docs/types/ModelFloorplanPluginReturnType.html +13 -8
- package/docs/types/ModelRoomLabelPluginParameters.html +13 -8
- package/docs/types/ModelRoomLabelPluginReturnType.html +13 -8
- package/docs/types/MoveArgs.html +13 -8
- package/docs/types/MoveOpts.html +13 -8
- package/docs/types/Object3DHelperEventMap.html +13 -8
- package/docs/types/ObjectFit.html +13 -8
- package/docs/types/PaintBrushEventMap.html +13 -8
- package/docs/types/PanoCompassPluginData.html +13 -8
- package/docs/types/PanoCompassPluginExportType.html +13 -8
- package/docs/types/PanoCompassPluginParameterType.html +13 -8
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +13 -8
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +13 -8
- package/docs/types/PanoMeasurePluginEvent.html +13 -8
- package/docs/types/PanoMeasureReturnType.html +13 -8
- package/docs/types/PanoSpatialTagPluginId.html +13 -8
- package/docs/types/PanoTagPluginExportInterface.html +13 -8
- package/docs/types/PanoTagPluginParamsInterface.html +13 -8
- package/docs/types/PlaneTag.html +13 -8
- package/docs/types/PointTag.html +13 -8
- package/docs/types/Position.html +13 -8
- package/docs/types/RotateArgs.html +13 -8
- package/docs/types/RotateOpts.html +13 -8
- package/docs/types/RuleLabelsKey.html +13 -8
- package/docs/types/RuleLabelsValue.html +13 -8
- package/docs/types/Tag.html +13 -8
- package/docs/types/Tag2D.html +13 -8
- package/docs/types/Tag3D.html +13 -8
- package/docs/types/TagId.html +13 -8
- package/docs/types/TopviewFloorplanPluginParameterType.html +13 -8
- package/docs/types/TopviewFloorplanPluginReturnType.html +13 -8
- package/docs/variables/FLOOR_TYPE_MAP.html +13 -8
- package/docs/variables/PLUGIN.html +13 -8
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +13 -8
- package/docs/variables/ROOM_TYPE_MAP.html +13 -8
- package/docs/variables/VERSION.html +13 -8
- package/docs/variables/itemLabelPluginServerParams.html +13 -8
- package/docs/variables/modelItemLabelPluginServerParams.html +13 -8
- package/docs/variables/modelRoomLabelPluginServerParams.html +13 -8
- package/libs/PanoCompassPlugin/Controller.js +3 -8
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +5 -5
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +10 -10
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +5 -6
- package/libs/PanoMeasurePlugin/Controller/EditController.js +55 -56
- package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +6 -9
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +38 -37
- package/libs/PanoMeasurePlugin/Controller/ViewController.d.ts +6 -3
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +68 -52
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +40 -42
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +27 -9
- package/libs/PanoMeasurePlugin/Controller/index.js +117 -92
- package/libs/PanoMeasurePlugin/Model/index.d.ts +17 -17
- package/libs/PanoMeasurePlugin/Model/index.js +49 -72
- package/libs/PanoMeasurePlugin/Model/line.d.ts +6 -4
- package/libs/PanoMeasurePlugin/Model/line.js +29 -25
- package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -4
- package/libs/PanoMeasurePlugin/Model/point.js +3 -3
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +37 -12
- package/libs/PanoMeasurePlugin/Model/polyline.js +90 -37
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +16 -11
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +5 -4
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +3 -4
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +21 -21
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -2
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +22 -22
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +5 -4
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +10 -10
- package/libs/PanoMeasurePlugin/index.d.ts +6 -2
- package/libs/PanoMeasurePlugin/index.js +31 -27
- package/libs/PanoMeasurePlugin/typings/data.d.ts +6 -16
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +18 -14
- package/libs/PanoMeasurePlugin/typings/index.d.ts +4 -2
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +5 -3
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +62 -41
- package/libs/index.js +109 -105
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import type { UserDistanceItem } from '../utils/distanceDom';
|
|
|
8
8
|
import type { Five, Intersection, IntersectMeshInterface, Subscribe } from '@realsee/five';
|
|
9
9
|
import type { OpenParameter } from '../typings/data';
|
|
10
10
|
import Line from '../Model/line';
|
|
11
|
-
export interface
|
|
11
|
+
export interface ControllerParams {
|
|
12
12
|
five: Five;
|
|
13
13
|
group: Group;
|
|
14
14
|
model: Model;
|
|
@@ -32,10 +32,10 @@ export default class BaseController {
|
|
|
32
32
|
protected mouseGroup: Group;
|
|
33
33
|
protected container: Element;
|
|
34
34
|
protected fiveHelper: FiveHelper;
|
|
35
|
-
protected hook:
|
|
36
|
-
protected magnifier:
|
|
37
|
-
protected userDistanceItemCreator:
|
|
38
|
-
constructor(params:
|
|
35
|
+
protected hook: ControllerParams['hook'];
|
|
36
|
+
protected magnifier: ControllerParams['magnifier'];
|
|
37
|
+
protected userDistanceItemCreator: ControllerParams['userDistanceItemCreator'];
|
|
38
|
+
constructor(params: ControllerParams);
|
|
39
39
|
updateDistanceUI: () => void;
|
|
40
40
|
protected removeLine(line: Line): void;
|
|
41
41
|
protected updateMouseGroup(intersection: Intersection, mesh?: IntersectMeshInterface): Group;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { LineJson } from '../typings/data';
|
|
2
1
|
import Line from '../Model/line';
|
|
3
|
-
import BaseController, {
|
|
4
|
-
|
|
5
|
-
editedLineChange: (lines: LineJson[]) => void;
|
|
6
|
-
}
|
|
2
|
+
import BaseController, { ControllerParams } from './BaseController';
|
|
3
|
+
import { Polyline } from '../Model/polyline';
|
|
7
4
|
export default class EditController extends BaseController {
|
|
8
5
|
type: string;
|
|
6
|
+
polyline: Polyline;
|
|
7
|
+
/** 拖动的控制点 */
|
|
9
8
|
private pressPoint?;
|
|
10
9
|
private hasAppendDashed;
|
|
11
10
|
private hasAppendMouseGroup;
|
|
@@ -15,7 +14,7 @@ export default class EditController extends BaseController {
|
|
|
15
14
|
private hammer?;
|
|
16
15
|
/** 根据 intersection 更新放大镜和吸附点 */
|
|
17
16
|
private onIntersectionUpdate;
|
|
18
|
-
constructor(params:
|
|
17
|
+
constructor(params: ControllerParams);
|
|
19
18
|
dispose(): void;
|
|
20
19
|
getEditingLines(): Line[];
|
|
21
20
|
/** 撤销编辑 */
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import type { LineJson } from '../typings/data';
|
|
2
|
-
import { Model } from '../Model';
|
|
3
1
|
import Line from '../Model/line';
|
|
4
|
-
import BaseController, {
|
|
2
|
+
import BaseController, { ControllerParams } from './BaseController';
|
|
3
|
+
import { Polyline } from '../Model/polyline';
|
|
5
4
|
export declare type State = 'watching' | 'editing';
|
|
6
|
-
export interface EditEvent {
|
|
7
|
-
editedLineChange: (lines: LineJson[]) => void;
|
|
8
|
-
}
|
|
9
5
|
export default class MixedController extends BaseController {
|
|
10
6
|
state: State;
|
|
11
|
-
|
|
7
|
+
polyline: Polyline;
|
|
12
8
|
private hasAppendDashed;
|
|
13
|
-
private fiveElement?;
|
|
14
9
|
private mobileStartPoint;
|
|
15
10
|
private mobileNowPoint;
|
|
16
11
|
private highlightedLines;
|
|
17
12
|
private deleteDom;
|
|
18
|
-
|
|
13
|
+
private rangePieceController;
|
|
14
|
+
constructor(params: ControllerParams);
|
|
19
15
|
dispose(): void;
|
|
20
16
|
highlightLine(line: Line): void;
|
|
21
17
|
clearHighlightLines(): void;
|
|
22
18
|
getEditingLines(): Line[];
|
|
19
|
+
addStartPoint(): void;
|
|
23
20
|
/** 编辑线条发生改变时通知外部 */
|
|
24
21
|
private onLineChanged;
|
|
25
22
|
private onWantsTapGesture;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type Line from '../Model/line';
|
|
2
|
-
import BaseController, {
|
|
2
|
+
import BaseController, { ControllerParams } from './BaseController';
|
|
3
3
|
export default class ViewController extends BaseController {
|
|
4
4
|
type: string;
|
|
5
5
|
private highlightedLines;
|
|
6
6
|
private hammer?;
|
|
7
|
-
constructor(params:
|
|
7
|
+
constructor(params: ControllerParams);
|
|
8
8
|
dispose(): void;
|
|
9
9
|
highlightLine(line: Line): void;
|
|
10
10
|
clearHighlightLines(): void;
|
|
11
11
|
private wantsTapGesture;
|
|
12
12
|
private chooseLine;
|
|
13
13
|
private highlightLines;
|
|
14
|
-
private
|
|
14
|
+
private polylineRemoved;
|
|
15
|
+
private polylineAdded;
|
|
15
16
|
private onCameraUpdate;
|
|
17
|
+
private onFivePanoWillArrive;
|
|
18
|
+
private onFivePanoArrived;
|
|
16
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type Line from '../Model/line';
|
|
2
|
-
import BaseController, {
|
|
2
|
+
import BaseController, { ControllerParams } from './BaseController';
|
|
3
3
|
export default class WatchController extends BaseController {
|
|
4
4
|
type: string;
|
|
5
5
|
private deleteDom;
|
|
@@ -7,7 +7,7 @@ export default class WatchController extends BaseController {
|
|
|
7
7
|
private fiveElement?;
|
|
8
8
|
private editPointState?;
|
|
9
9
|
private hammer?;
|
|
10
|
-
constructor(params:
|
|
10
|
+
constructor(params: ControllerParams);
|
|
11
11
|
dispose(): void;
|
|
12
12
|
highlightLine(line: Line): void;
|
|
13
13
|
clearHighlightLines(): void;
|
|
@@ -19,7 +19,7 @@ export default class WatchController extends BaseController {
|
|
|
19
19
|
private wantsTapGesture;
|
|
20
20
|
private chooseLine;
|
|
21
21
|
private highlightLines;
|
|
22
|
-
private
|
|
22
|
+
private polylineRemoved;
|
|
23
23
|
private onCameraUpdate;
|
|
24
24
|
private deleteDomClickCallback;
|
|
25
25
|
private cancelDeleteClickCallback;
|
|
@@ -6,6 +6,7 @@ import Magnifier, { MagnifierParameter } from '../Modules/Magnifier';
|
|
|
6
6
|
import { Five, Subscribe } from '@realsee/five';
|
|
7
7
|
import { UIControllerParams } from '../Modules/UIController';
|
|
8
8
|
import { GuideControllerParams } from '../Modules/GuideController';
|
|
9
|
+
import { Polyline } from '../Model/polyline';
|
|
9
10
|
export declare type Mode = 'Watch' | 'Edit' | 'Mixed' | 'View';
|
|
10
11
|
export interface PanoMeasureParameterType extends Partial<Config> {
|
|
11
12
|
openParams?: OpenParameter;
|
|
@@ -22,15 +23,14 @@ export default class MeasureController {
|
|
|
22
23
|
private model;
|
|
23
24
|
private group;
|
|
24
25
|
private config;
|
|
26
|
+
private isMobile;
|
|
25
27
|
private fiveHelper;
|
|
26
28
|
private useUIController?;
|
|
27
29
|
private params;
|
|
28
30
|
private useGuideController?;
|
|
29
|
-
private rangePieceController?;
|
|
30
31
|
private container;
|
|
31
32
|
private shortcutKeyController?;
|
|
32
33
|
private controller;
|
|
33
|
-
private controllerParams;
|
|
34
34
|
constructor(five: Five, params: PanoMeasureParameterType);
|
|
35
35
|
appendTo(parent: HTMLElement): void;
|
|
36
36
|
dispose(): void;
|
|
@@ -43,7 +43,9 @@ export default class MeasureController {
|
|
|
43
43
|
* @description 会隐藏鼠标的默认聚焦环
|
|
44
44
|
* @description 会隐藏当前 VR 内的点位展示
|
|
45
45
|
*/
|
|
46
|
-
enable(
|
|
46
|
+
enable(config?: {
|
|
47
|
+
mode: Mode;
|
|
48
|
+
}): void;
|
|
47
49
|
/** 关闭插件功能
|
|
48
50
|
* @description 清除标尺线条
|
|
49
51
|
* @description 还原点位展示和默认鼠标 UI
|
|
@@ -53,23 +55,39 @@ export default class MeasureController {
|
|
|
53
55
|
/** 变更场景
|
|
54
56
|
* @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
|
|
55
57
|
*/
|
|
56
|
-
changeMode: (mode: Mode) =>
|
|
58
|
+
changeMode: (mode: Mode) => void;
|
|
59
|
+
/** 进入编辑模式 */
|
|
60
|
+
edit(): void;
|
|
57
61
|
/** 撤销编辑 */
|
|
58
62
|
revoke(): void;
|
|
59
|
-
|
|
63
|
+
removePolyline(polyline: Polyline): void;
|
|
64
|
+
removePolylineByID(id: string): void;
|
|
65
|
+
getPolylineByID(id: string): Polyline;
|
|
66
|
+
getEditedPolyline(): void;
|
|
60
67
|
/**
|
|
61
68
|
* 高亮当前线段
|
|
62
69
|
*/
|
|
63
70
|
highlightLine(lineID: string): boolean;
|
|
64
71
|
clearHighlightLines(): boolean;
|
|
65
|
-
/** 保存编辑
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
/** 保存编辑
|
|
73
|
+
* @description 以下情况可能报错
|
|
74
|
+
*/
|
|
75
|
+
save(config?: {
|
|
76
|
+
mode?: Mode;
|
|
77
|
+
}): this;
|
|
78
|
+
/** Mixed 模式才有用,添加起点 */
|
|
79
|
+
addStartPoint(): void;
|
|
80
|
+
/** Mixed 模式才有用,添加终点 */
|
|
81
|
+
addEndPoint(): void;
|
|
82
|
+
/** 导出数据 */
|
|
68
83
|
toJson(): PluginData;
|
|
69
84
|
/**
|
|
70
85
|
* @description 改变插件的模式(pc端模式或移动端模式)
|
|
71
86
|
* @param isMobile true为移动端模式,false为pc端
|
|
72
87
|
*/
|
|
73
88
|
changeIsMobile(isMobile: boolean): void;
|
|
74
|
-
changeConfigs(config:
|
|
89
|
+
changeConfigs(config: Config): void;
|
|
90
|
+
/** 设置线段的文本 */
|
|
91
|
+
setCustomText(lineID: string, text: string): void;
|
|
92
|
+
private createControllerParams;
|
|
75
93
|
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import type { Config } from '../typings';
|
|
2
2
|
import type { PluginData } from '../typings/data';
|
|
3
3
|
import Line from './line';
|
|
4
|
-
import Point from './point';
|
|
5
|
-
import { Subscribe, SubscribeEventMap } from '@realsee/five';
|
|
6
4
|
import { Polyline } from './polyline';
|
|
7
|
-
|
|
5
|
+
import { Subscribe } from '@realsee/five';
|
|
6
|
+
declare type IModelEvent = {
|
|
8
7
|
/** 新增线条
|
|
9
8
|
* @param line 被创建的线条
|
|
10
9
|
*/
|
|
11
|
-
|
|
10
|
+
polylineAdded: (line: Polyline) => void;
|
|
12
11
|
/** 删除线条
|
|
13
12
|
* @param lines 被删除的线条数组
|
|
14
13
|
*/
|
|
15
|
-
|
|
16
|
-
}
|
|
14
|
+
polylineRemoved: (lines: Polyline) => void;
|
|
15
|
+
};
|
|
17
16
|
export declare class Model {
|
|
18
|
-
readonly
|
|
19
|
-
readonly points: Point[];
|
|
20
|
-
readonly params: Config;
|
|
17
|
+
readonly config?: Config;
|
|
21
18
|
readonly polylines: Polyline[];
|
|
22
19
|
readonly hook: Subscribe<IModelEvent>;
|
|
23
|
-
constructor(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
getPointByID(id: string): Point;
|
|
20
|
+
constructor(config?: Config);
|
|
21
|
+
addPolyline(polyline: Polyline): void;
|
|
22
|
+
replacePolylineByID(id: string, polyline: Polyline): void;
|
|
23
|
+
removePolyline(polyline: Polyline): void;
|
|
24
|
+
getPolylineByID(id: string): Polyline;
|
|
25
|
+
getPolylineByLine(line: Line): Polyline;
|
|
30
26
|
getLineByID(id: string): Line;
|
|
27
|
+
getAllLines(): Line[];
|
|
28
|
+
getAllPoints(): import("./point").default[];
|
|
29
|
+
includes(item: Polyline): boolean;
|
|
30
|
+
clear(): void;
|
|
31
31
|
getClosestPoint(): void;
|
|
32
|
-
parse(data: PluginData):
|
|
32
|
+
parse(data: PluginData): void;
|
|
33
33
|
toJson(): PluginData;
|
|
34
34
|
}
|
|
35
35
|
export {};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { Model } from '.';
|
|
2
|
-
import
|
|
3
|
-
import type { LineJson } from '
|
|
4
|
-
import type { LineCompletelyJson } from '../typings/data';
|
|
2
|
+
import Point from './point';
|
|
3
|
+
import type { LineJson } from '../typings/data';
|
|
5
4
|
import type { Line as FiveLine } from '@realsee/five/line';
|
|
6
5
|
import { Polyline } from './polyline';
|
|
7
6
|
import { Subscribe, SubscribeEventMap } from '@realsee/five';
|
|
8
7
|
import { DistanceItem } from '../utils/distanceDom';
|
|
9
8
|
export interface ILineHook extends SubscribeEventMap {
|
|
10
9
|
selected: (line: Line) => void;
|
|
10
|
+
textChanged: (text: string | undefined) => void;
|
|
11
11
|
}
|
|
12
12
|
export default class Line {
|
|
13
13
|
id: string;
|
|
14
14
|
selected: boolean;
|
|
15
|
+
text?: string;
|
|
15
16
|
readonly type = "line";
|
|
16
17
|
readonly model: Model;
|
|
17
18
|
readonly mesh: FiveLine;
|
|
@@ -22,9 +23,10 @@ export default class Line {
|
|
|
22
23
|
private polyline?;
|
|
23
24
|
constructor(point: Point, anotherPoint: Point, model: Model);
|
|
24
25
|
clear(): void;
|
|
26
|
+
isEmpty(): boolean;
|
|
25
27
|
getPolyline(): Polyline;
|
|
26
28
|
findAnotherPoint(point: Point): Point;
|
|
29
|
+
setText(text: string | null): void;
|
|
27
30
|
toJson(): LineJson;
|
|
28
|
-
toCompletelyJson(): LineCompletelyJson;
|
|
29
31
|
clone(): Line;
|
|
30
32
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import type Line from './line';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PointJson } from '../typings/data';
|
|
3
3
|
import { Vector3 } from 'three';
|
|
4
|
-
declare type IPointData = PluginData['points'][0];
|
|
5
4
|
export default class Point {
|
|
6
5
|
id: string;
|
|
7
6
|
lines: Line[];
|
|
8
7
|
position: Vector3;
|
|
9
8
|
readonly type = "point";
|
|
10
9
|
constructor(position: Vector3 | number[]);
|
|
11
|
-
toJson():
|
|
10
|
+
toJson(): PointJson;
|
|
12
11
|
addLine(line: Line): void;
|
|
13
12
|
removeLine(line: Line): void;
|
|
14
13
|
clone(): Point;
|
|
15
14
|
}
|
|
16
|
-
export {};
|
|
@@ -1,16 +1,41 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import type { PolylineJson } from '../typings/data';
|
|
2
|
+
import Line from './line';
|
|
3
|
+
import Point from './point';
|
|
4
|
+
import { Subscribe } from '@realsee/five';
|
|
5
|
+
import { Model } from '.';
|
|
6
|
+
export declare type PolylineEventMap = {
|
|
7
|
+
/** 新增线条
|
|
8
|
+
* @param line 被创建的线条
|
|
9
|
+
*/
|
|
10
|
+
lineAdded: (line: Line) => void;
|
|
11
|
+
/** 删除线条
|
|
12
|
+
* @param lines 被删除的线条数组
|
|
13
|
+
*/
|
|
14
|
+
lineRemoved: (lines: Line) => void;
|
|
15
|
+
};
|
|
4
16
|
export declare class Polyline {
|
|
5
|
-
|
|
17
|
+
id: string;
|
|
18
|
+
lines: Line[];
|
|
6
19
|
points: Point[];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
20
|
+
visiblePanoIndexes?: number[];
|
|
21
|
+
readonly model: Model;
|
|
22
|
+
readonly type = "polyline";
|
|
23
|
+
readonly hook: Subscribe<PolylineEventMap>;
|
|
24
|
+
constructor(config: {
|
|
25
|
+
model: Model;
|
|
26
|
+
});
|
|
27
|
+
addLine(line: Line): void;
|
|
28
|
+
removeLine(line: Line): void;
|
|
29
|
+
isLastLine(line: Line): boolean;
|
|
30
|
+
getLastLine(): Line;
|
|
31
|
+
clear(): void;
|
|
32
|
+
/** 是否产生重叠 */
|
|
33
|
+
overlapWith(item: Point | Line | Polyline): boolean;
|
|
34
|
+
includes(item: Point | Line): boolean;
|
|
35
|
+
isEmpty(): boolean;
|
|
36
|
+
getLastPoint(): Point;
|
|
14
37
|
toJson(): PolylineJson;
|
|
15
|
-
|
|
38
|
+
getPointByID(id: string): Point;
|
|
39
|
+
fromJson(data: PolylineJson): this;
|
|
40
|
+
replace(polyline: Polyline): void;
|
|
16
41
|
}
|
|
@@ -11,6 +11,8 @@ export declare class GuideController {
|
|
|
11
11
|
private textDom;
|
|
12
12
|
private container;
|
|
13
13
|
private hasAnchor;
|
|
14
|
+
/** 是否曾经切换到 Watch 模式过 */
|
|
15
|
+
private hasChangedToWatch;
|
|
14
16
|
private _params;
|
|
15
17
|
constructor(measureController: MeasureController, params: GuideControllerParams);
|
|
16
18
|
dispose(): void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Mode } from '../../../Controller';
|
|
2
1
|
import type MeasureController from '../../../Controller';
|
|
3
2
|
export default class Revoke {
|
|
4
3
|
private container;
|
|
@@ -7,7 +6,7 @@ export default class Revoke {
|
|
|
7
6
|
private measureController;
|
|
8
7
|
constructor(measureController: MeasureController, container: Element);
|
|
9
8
|
dispose(): void;
|
|
10
|
-
onClick
|
|
11
|
-
onModeChange
|
|
12
|
-
|
|
9
|
+
private onClick;
|
|
10
|
+
private onModeChange;
|
|
11
|
+
private onAnchorChange;
|
|
13
12
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type MeasureController from '../../Controller';
|
|
2
|
-
import type { OpenParameter } from '../../typings/data';
|
|
3
2
|
export interface UIControllerParams {
|
|
4
3
|
container: Element;
|
|
5
|
-
|
|
4
|
+
mode?: 'pc' | 'mobile';
|
|
6
5
|
startButtonText?: string;
|
|
7
6
|
endButtonText?: string;
|
|
8
7
|
revokeButtonText?: string;
|
|
@@ -3,8 +3,12 @@ import MeasureController, { PanoMeasureParameterType } from './Controller';
|
|
|
3
3
|
import Magnifier from './Modules/Magnifier';
|
|
4
4
|
export declare const PanoMeasurePlugin: FivePlugin<PanoMeasureParameterType, PanoMeasureReturnType>;
|
|
5
5
|
export default PanoMeasurePlugin;
|
|
6
|
+
export { Magnifier };
|
|
7
|
+
export { Model as PanoMeasurePluginModel } from './Model';
|
|
8
|
+
export { default as PanoMeasurePluginPoint } from './Model/point';
|
|
9
|
+
export { default as PanoMeasurePluginLine } from './Model/line';
|
|
10
|
+
export { Polyline as PanoMeasurePluginPolyline } from './Model/polyline';
|
|
6
11
|
export declare type PanoMeasureReturnType = MeasureController;
|
|
7
12
|
export type { PanoMeasurePluginEvent } from './typings/event.type';
|
|
8
|
-
export type { LineJson, PointJson, OpenParameter } from './typings/data';
|
|
13
|
+
export type { LineJson as PanoMeasurePluginLineJson, PointJson as PanoMeasurePluginPointJson, PolylineJson as PanoMeasurePluginPolylineJson, OpenParameter as PanoMeasurePluginOpenParameter, } from './typings/data';
|
|
9
14
|
export type { PanoMeasureParameterType } from './Controller';
|
|
10
|
-
export { Magnifier };
|
|
@@ -1,29 +1,19 @@
|
|
|
1
|
-
export interface
|
|
2
|
-
id: string;
|
|
3
|
-
points: PointJson[];
|
|
4
|
-
}
|
|
5
|
-
export interface PolylineCompletelyJson {
|
|
1
|
+
export interface PolylineJson {
|
|
6
2
|
id: string;
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
lines: LineJson[];
|
|
4
|
+
/** 当前折线在哪个点位上可见,字段不存在时,不做限制 */
|
|
5
|
+
visiblePanoIndexes?: number[];
|
|
9
6
|
}
|
|
10
7
|
export interface LineJson {
|
|
11
8
|
id: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export interface PolylineJson {
|
|
15
|
-
id: string;
|
|
16
|
-
points: string[];
|
|
17
|
-
lines: string[];
|
|
9
|
+
text?: string;
|
|
10
|
+
points: PointJson[];
|
|
18
11
|
}
|
|
19
12
|
export interface PointJson {
|
|
20
13
|
id: string;
|
|
21
|
-
lines: string[];
|
|
22
14
|
position: number[];
|
|
23
15
|
}
|
|
24
16
|
export interface PluginData {
|
|
25
|
-
lines: LineJson[];
|
|
26
|
-
points: PointJson[];
|
|
27
17
|
polylines: PolylineJson[];
|
|
28
18
|
}
|
|
29
19
|
/** 开放可配置参数 */
|
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
import type { SubscribeEventMap } from '@realsee/five';
|
|
2
1
|
import type { Vector3 } from 'three';
|
|
3
2
|
import type { Mode } from '../Controller';
|
|
4
3
|
import type { State } from '../Controller/MixedController';
|
|
4
|
+
import Line from '../Model/line';
|
|
5
5
|
import type Point from '../Model/point';
|
|
6
|
-
import
|
|
7
|
-
|
|
6
|
+
import { Polyline } from '../Model/polyline';
|
|
7
|
+
declare type ControllerEvent = {
|
|
8
|
+
enable: (userAction: boolean) => void;
|
|
9
|
+
disable: (userAction: boolean) => void;
|
|
8
10
|
/**
|
|
9
11
|
* Mode 变更
|
|
10
12
|
*/
|
|
11
13
|
modeChange: (mode: Mode) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
selectedChange: (lines:
|
|
15
|
-
}
|
|
16
|
-
|
|
14
|
+
};
|
|
15
|
+
declare type WatchEvent = {
|
|
16
|
+
selectedChange: (lines: Line[]) => void;
|
|
17
|
+
};
|
|
18
|
+
declare type EditEvent = {
|
|
17
19
|
/**
|
|
18
20
|
* 编辑线条变更
|
|
19
21
|
*/
|
|
20
|
-
|
|
22
|
+
editedPolylineChange: (polyline: Polyline) => void;
|
|
23
|
+
/** 编辑中的虚线变更 */
|
|
24
|
+
editedDashedLineChange: (line: Line | null) => void;
|
|
21
25
|
anchorChange: (anchor: Vector3 | null) => void;
|
|
22
|
-
}
|
|
23
|
-
|
|
26
|
+
};
|
|
27
|
+
declare type DragEvent = {
|
|
24
28
|
wantsDragLine: (event: {
|
|
25
29
|
point: string;
|
|
26
30
|
lines: string[];
|
|
27
31
|
}) => boolean;
|
|
28
|
-
}
|
|
32
|
+
};
|
|
29
33
|
/** 移动端专用事件 */
|
|
30
|
-
|
|
34
|
+
declare type MobileEvent = {
|
|
31
35
|
getStartPoint: (point: Point) => void;
|
|
32
36
|
getEndPoint: (point: Point) => void;
|
|
33
37
|
willChangeState: (state: State, newState: State) => void;
|
|
34
38
|
nowPointChange: (point: Point) => void;
|
|
35
|
-
}
|
|
39
|
+
};
|
|
36
40
|
export declare type PanoMeasurePluginEvent = ControllerEvent & EditEvent & WatchEvent & DragEvent & MobileEvent;
|
|
37
41
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { UserDistanceItem } from '../utils/distanceDom';
|
|
2
2
|
export interface Config {
|
|
3
|
-
userDistanceItemCreator
|
|
3
|
+
userDistanceItemCreator?: undefined | (() => UserDistanceItem);
|
|
4
4
|
/** 展示 distance DOM 时,使用的转换函数
|
|
5
5
|
* @param distance 单位是 m
|
|
6
6
|
*/
|
|
7
|
-
getDistanceText
|
|
7
|
+
getDistanceText?: (distance: number) => string;
|
|
8
|
+
/** 默认的 distance DOM 文本 */
|
|
9
|
+
defaultText?: string | null;
|
|
8
10
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type Line from '../Model/line';
|
|
2
2
|
import type { Five } from '@realsee/five';
|
|
3
|
-
import type { LineCompletelyJson, PolylineCompletelyJson } from '../typings/data';
|
|
4
3
|
import { Vector3 } from 'three';
|
|
4
|
+
import { Polyline } from '../Model/polyline';
|
|
5
5
|
export declare type DistanceItem = ReturnType<typeof createDistanceItem>;
|
|
6
6
|
export interface UserDistanceItem {
|
|
7
7
|
element: Element;
|
|
8
8
|
highlight: () => void;
|
|
9
9
|
unHighlight: () => void;
|
|
10
10
|
update: (params: {
|
|
11
|
-
line:
|
|
12
|
-
polyline:
|
|
11
|
+
line: Line;
|
|
12
|
+
polyline: Polyline;
|
|
13
13
|
}) => void;
|
|
14
14
|
}
|
|
15
15
|
export interface CreateDistanceItemProps {
|
|
@@ -25,4 +25,6 @@ export declare function createDistanceItem(props: CreateDistanceItemProps): {
|
|
|
25
25
|
remove: () => void;
|
|
26
26
|
highlight: () => void;
|
|
27
27
|
unHighlight: () => void;
|
|
28
|
+
getCurrentContent: () => string;
|
|
29
|
+
setItemSelectable: (value: boolean) => void;
|
|
28
30
|
};
|