@realsee/dnalogel 2.15.0 → 2.16.0-0
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/CSS3DRenderPlugin/Controller.d.ts +1 -0
- package/dist/CruisePlugin/Controller.d.ts +1 -2
- package/dist/CruisePlugin/typing.d.ts +12 -2
- package/dist/GuideLinePlugin/Controller.d.ts +17 -11
- package/dist/GuideLinePlugin/GuideLineItem.d.ts +26 -0
- package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +61 -0
- package/dist/GuideLinePlugin/index.d.ts +3 -0
- package/dist/GuideLinePlugin/typing.d.ts +78 -1
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +19 -0
- package/dist/GuideLinePlugin/utils/index.d.ts +7 -0
- package/dist/base/BasePlugin.d.ts +1 -0
- package/dist/index.cjs.js +118 -118
- package/dist/index.js +4431 -4294
- package/dist/index.umd.js +117 -117
- package/dist/shared-utils/five/index.d.ts +1 -0
- package/dist/shared-utils/five/mode.d.ts +3 -0
- package/dist/shared-utils/index.d.ts +3 -0
- package/dist/shared-utils/isAbsoluteURL.d.ts +1 -0
- package/dist/shared-utils/log.d.ts +2 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +33 -31
- package/docs/classes/CruisePluginController.html +43 -25
- package/docs/classes/GuideLineItem.GuideLineItem.html +168 -0
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +283 -0
- package/docs/classes/Magnifier.html +22 -20
- package/docs/classes/ModelRoomLabelController.html +13 -11
- package/docs/classes/Object3DHelperController.html +42 -24
- package/docs/classes/PaintBrush.html +17 -15
- package/docs/classes/PanoMeasurePluginLine.html +25 -23
- package/docs/classes/PanoMeasurePluginModel.html +24 -22
- package/docs/classes/PanoMeasurePluginPoint.html +16 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +28 -26
- package/docs/classes/PanoTagPluginController.html +64 -46
- package/docs/classes/Util.BetterTween.html +10 -8
- package/docs/classes/Util.FivePointSelector.html +14 -12
- package/docs/classes/Util.Interval.html +14 -12
- package/docs/classes/Util.Magnifier.html +19 -17
- package/docs/classes/Util.PointDomHelper.html +13 -11
- package/docs/classes/Util.PointHelper.html +13 -11
- package/docs/classes/Util.Rectangle.html +15 -13
- package/docs/enums/CameraMovementEffect.html +9 -7
- package/docs/enums/ContentType.html +21 -19
- package/docs/enums/DIRECTION.html +11 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +11 -9
- package/docs/enums/DimensionType.html +9 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +10 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +11 -9
- package/docs/enums/PaintBrushTypeEnum.html +10 -8
- package/docs/enums/Rotation.html +10 -8
- package/docs/functions/CSS3DRenderPlugin.html +6 -4
- package/docs/functions/CameraMovementPlugin.html +6 -4
- package/docs/functions/CruisePlugin.html +6 -4
- package/docs/functions/GuideLinePlugin.html +7 -5
- package/docs/functions/ItemLabelPlugin.html +6 -4
- package/docs/functions/MapviewFloorplanPlugin.html +6 -4
- package/docs/functions/ModelChassisCompassPlugin.html +6 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +6 -4
- package/docs/functions/ModelFloorplanPlugin.html +6 -4
- package/docs/functions/ModelItemLabelPlugin.html +6 -4
- package/docs/functions/ModelRoomLabelPlugin.html +6 -4
- package/docs/functions/ModelTVVideoPlugin.html +6 -4
- package/docs/functions/ModelViewPlugin.html +6 -4
- package/docs/functions/Object3DHelperPlugin.html +6 -4
- package/docs/functions/PanoCompassPlugin.html +6 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +6 -4
- package/docs/functions/PanoDoorLabelPlugin.html +6 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +6 -4
- package/docs/functions/PanoMeasurePlugin.html +6 -4
- package/docs/functions/PanoRulerPlugin.html +6 -4
- package/docs/functions/PanoRulerProPlugin.html +6 -4
- package/docs/functions/PanoSpatialTagPlugin.html +6 -4
- package/docs/functions/PanoTagPlugin.html +6 -4
- package/docs/functions/PanoVideoPlugin.html +6 -4
- package/docs/functions/TopviewFloorplanPlugin.html +6 -4
- package/docs/functions/Util.getCoordsFromClient.html +12 -6
- package/docs/functions/Util.getCoordsFromElement.html +12 -6
- package/docs/functions/Util.getFrameTime.html +12 -6
- package/docs/functions/Util.getIntersectFromRelativePosition.html +12 -6
- package/docs/functions/Util.getRaycasterFromFivePointer.html +12 -6
- package/docs/functions/Util.isAbsoluteURL.html +78 -0
- package/docs/functions/Util.isModelLike.html +78 -0
- package/docs/functions/Util.isNil.html +12 -6
- package/docs/functions/Util.isPanoramaLike.html +78 -0
- package/docs/functions/Util.nextFrame.html +12 -6
- package/docs/functions/Util.notNil.html +12 -6
- package/docs/functions/Util.requestAnimationFrameInterval.html +12 -6
- package/docs/functions/Util.tweenProgress.html +12 -6
- package/docs/functions/Util.uuid.html +75 -0
- package/docs/functions/pluginFlag.html +7 -5
- package/docs/index.html +6 -4
- package/docs/interfaces/AddTagConfig.html +8 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +13 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +10 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +9 -7
- package/docs/interfaces/EventMap.html +17 -15
- package/docs/interfaces/FloorplanBounding.html +10 -8
- package/docs/interfaces/FloorplanData.html +12 -10
- package/docs/interfaces/FloorplanEntrance.html +13 -11
- package/docs/interfaces/FloorplanExtraObject.html +12 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +10 -8
- package/docs/interfaces/FloorplanFloorData.html +11 -9
- package/docs/interfaces/FloorplanImagePosition.html +9 -7
- package/docs/interfaces/FloorplanObserver.html +11 -9
- package/docs/interfaces/FloorplanOutlineItem.html +11 -9
- package/docs/interfaces/FloorplanPosition.html +9 -7
- package/docs/interfaces/FloorplanRoomItem.html +15 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +9 -7
- package/docs/interfaces/FloorplanServerBounding.html +10 -8
- package/docs/interfaces/FloorplanServerComputedData.html +12 -10
- package/docs/interfaces/FloorplanServerData.html +9 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +12 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +10 -8
- package/docs/interfaces/FloorplanServerEntrance.html +13 -11
- package/docs/interfaces/FloorplanServerFloorData.html +11 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +9 -7
- package/docs/interfaces/FloorplanServerObserver.html +11 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +11 -9
- package/docs/interfaces/FloorplanServerPosition.html +9 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +16 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +9 -7
- package/docs/interfaces/HelperOffset.html +10 -8
- package/docs/interfaces/ImagePlaneGroup.html +8 -6
- package/docs/interfaces/ItemLabelPluginData.html +8 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +13 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +11 -9
- package/docs/interfaces/MinMax.html +9 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +9 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +10 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +9 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +10 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +10 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +8 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +13 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +9 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +8 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +11 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +10 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +8 -6
- package/docs/interfaces/ModelViewPluginExportType.html +13 -11
- package/docs/interfaces/Object3DHelperState.html +10 -8
- package/docs/interfaces/ObjectHelperControllers.html +11 -9
- package/docs/interfaces/PaintBrushAction.html +14 -12
- package/docs/interfaces/PaintBrushConfigs.html +14 -12
- package/docs/interfaces/PaintBrushState.html +12 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +12 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +7 -5
- package/docs/interfaces/PanoMeasureParameterType.html +16 -14
- package/docs/interfaces/PanoMeasurePluginLineJson.html +10 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +9 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +9 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +10 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +12 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +9 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +10 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +11 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +9 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +9 -7
- package/docs/interfaces/PanoRulerProPluginState.html +10 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +7 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +7 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +13 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +12 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +15 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +12 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +15 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +13 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +12 -10
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +8 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +10 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +8 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +11 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +8 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +10 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +12 -10
- package/docs/interfaces/Point.html +10 -8
- package/docs/interfaces/Room.html +11 -9
- package/docs/interfaces/RoomInfo.html +9 -7
- package/docs/interfaces/RoomLabel.html +16 -14
- package/docs/interfaces/RoomRules.html +7 -5
- package/docs/interfaces/Rooms.html +7 -5
- package/docs/interfaces/Scissor.html +11 -9
- package/docs/interfaces/State.html +10 -8
- package/docs/interfaces/TagCacheInterface.html +14 -12
- package/docs/interfaces/TagConfig.html +13 -11
- package/docs/interfaces/TagGLTFObjectGroup.html +8 -6
- package/docs/interfaces/TagIconUrl.html +13 -11
- package/docs/interfaces/TagObjectGroup.html +8 -6
- package/docs/interfaces/TagStyle.html +8 -6
- package/docs/interfaces/Tags.html +11 -9
- package/docs/interfaces/TemporaryState.html +8 -6
- package/docs/interfaces/Util.MagnifierParameter.html +13 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +10 -8
- package/docs/modules/GuideLineItem.html +52 -0
- package/docs/modules/GuideLineModeItem.html +52 -0
- package/docs/modules/PanoVideoPluginType.html +7 -5
- package/docs/modules/Util.html +16 -6
- package/docs/modules.html +9 -5
- package/docs/types/ArrayPosition.html +7 -5
- package/docs/types/AudioAppearance.html +7 -5
- package/docs/types/AudioTagTypeConfigKey.html +7 -5
- package/docs/types/CSS3DRenderExportType.html +7 -5
- package/docs/types/CSS3DRenderPluginExportType.html +7 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +7 -5
- package/docs/types/ClassFunctionParameters.html +7 -5
- package/docs/types/Color.html +7 -5
- package/docs/types/ContentTypeConfigKey.html +7 -5
- package/docs/types/ContentTypeConfigKeySplit.html +7 -5
- package/docs/types/ContentTypeMap.html +7 -5
- package/docs/types/Create3DDomContainerReturnType.html +7 -5
- package/docs/types/Create3DElementReturnType.html +7 -5
- package/docs/types/CruisePluginExportType.html +7 -5
- package/docs/types/Direction-1.html +7 -5
- package/docs/types/Direction4.html +7 -5
- package/docs/types/FloorplanRuleLabels.html +7 -5
- package/docs/types/FloorplanServerRuleLabels.html +7 -5
- package/docs/types/GuideLinePluginExportType.html +7 -5
- package/docs/types/HelperEventMap.html +7 -5
- package/docs/types/LoadTagConfig.html +7 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +7 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +7 -5
- package/docs/types/MediaData.html +7 -5
- package/docs/types/MediaStore.html +7 -5
- package/docs/types/ModelElement.html +7 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +7 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +7 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +7 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +7 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +7 -5
- package/docs/types/MoveArgs.html +7 -5
- package/docs/types/MoveOpts.html +7 -5
- package/docs/types/Object3DHelperEventMap.html +7 -5
- package/docs/types/ObjectFit.html +7 -5
- package/docs/types/PaintBrushEventMap.html +7 -5
- package/docs/types/PanoCompassPluginData.html +7 -5
- package/docs/types/PanoCompassPluginExportType.html +7 -5
- package/docs/types/PanoCompassPluginParameterType.html +7 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +7 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +7 -5
- package/docs/types/PanoIndex.html +7 -5
- package/docs/types/PanoMeasurePluginEvent.html +7 -5
- package/docs/types/PanoMeasureReturnType.html +7 -5
- package/docs/types/PanoSpatialTagPluginId.html +7 -5
- package/docs/types/PanoTagPluginExportInterface.html +7 -5
- package/docs/types/PanoTagPluginParamsInterface.html +7 -5
- package/docs/types/PanoVideoPluginParameterType.html +7 -5
- package/docs/types/PanoVideoPluginReturnType.html +7 -5
- package/docs/types/PlaneTag.html +7 -5
- package/docs/types/PlaneTagElement.html +7 -5
- package/docs/types/Point2DElement.html +7 -5
- package/docs/types/Point2DTag.html +7 -5
- package/docs/types/Point3DElement.html +7 -5
- package/docs/types/Point3DTag.html +7 -5
- package/docs/types/PointTag.html +7 -5
- package/docs/types/PointTagElement.html +7 -5
- package/docs/types/Position.html +7 -5
- package/docs/types/RotateArgs.html +7 -5
- package/docs/types/RotateOpts.html +7 -5
- package/docs/types/RuleLabelsKey.html +7 -5
- package/docs/types/RuleLabelsValue.html +7 -5
- package/docs/types/StickType.html +7 -5
- package/docs/types/Tag.html +7 -5
- package/docs/types/Tag2D.html +7 -5
- package/docs/types/Tag3D.html +7 -5
- package/docs/types/TagContentType.html +7 -5
- package/docs/types/TagDimensionType.html +7 -5
- package/docs/types/TagElement.html +7 -5
- package/docs/types/TagEvents.html +7 -5
- package/docs/types/TagGLTFObject.html +7 -5
- package/docs/types/TagHooks.html +7 -5
- package/docs/types/TagIconSize.html +7 -5
- package/docs/types/TagId.html +7 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +7 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +7 -5
- package/docs/types/WorkCode.html +7 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +7 -5
- package/docs/variables/PLUGIN.html +7 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +7 -5
- package/docs/variables/ROOM_TYPE_MAP.html +7 -5
- package/docs/variables/itemLabelPluginServerParams.html +7 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +7 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +7 -5
- package/libs/CSS3DRenderPlugin/Controller.d.ts +1 -0
- package/libs/CSS3DRenderPlugin/Controller.js +40 -31
- package/libs/CSS3DRenderPlugin/index.js +12 -6
- package/libs/CruisePlugin/Controller.d.ts +1 -2
- package/libs/CruisePlugin/Controller.js +197 -174
- package/libs/CruisePlugin/index.js +33 -10
- package/libs/CruisePlugin/typing.d.ts +12 -2
- package/libs/GuideLinePlugin/Controller.d.ts +17 -11
- package/libs/GuideLinePlugin/Controller.js +111 -85
- package/libs/GuideLinePlugin/GuideLineItem/index.js +35 -0
- package/libs/GuideLinePlugin/GuideLineItem.d.ts +26 -0
- package/libs/GuideLinePlugin/GuideLineItem.js +31 -0
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +148 -0
- package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +61 -0
- package/libs/GuideLinePlugin/GuideLineModeItem.js +29 -0
- package/libs/GuideLinePlugin/index.d.ts +3 -0
- package/libs/GuideLinePlugin/index.js +33 -7
- package/libs/GuideLinePlugin/typing.d.ts +78 -1
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +19 -0
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +35 -0
- package/libs/GuideLinePlugin/utils/dataFormatter.d.ts +2 -0
- package/libs/GuideLinePlugin/utils/dataFormatter.js +6 -0
- package/libs/GuideLinePlugin/utils/index.d.ts +7 -0
- package/libs/GuideLinePlugin/utils/index.js +32 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +37 -31
- package/libs/ModelTVVideoPlugin/index.js +11 -5
- package/libs/Object3DHelperPlugin/Controller.js +33 -28
- package/libs/Object3DHelperPlugin/index.js +18 -13
- package/libs/PanoCompassPlugin/Controller.js +8 -6
- package/libs/PanoCompassPlugin/index.js +12 -10
- package/libs/PanoDoorLabelPlugin/BaseController.js +47 -28
- package/libs/PanoDoorLabelPlugin/Controller.js +40 -22
- package/libs/PanoDoorLabelPlugin/index.js +21 -3
- package/libs/PanoMeasurePlugin/typings/index.js +20 -1
- package/libs/PanoSpatialTagPlugin/Plugin.js +8 -3
- package/libs/PanoSpatialTagPlugin/index.js +8 -3
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -1
- package/libs/PanoTagPlugin/Components/Tag/index.js +1 -1
- package/libs/PanoTagPlugin/Components/TagContainer.js +1 -1
- package/libs/PanoTagPlugin/Components/TagItem.js +1 -1
- package/libs/PanoTagPlugin/controller/TagCache.js +42 -22
- package/libs/PanoTagPlugin/controller/TagComputer.js +4 -3
- package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
- package/libs/PanoTagPlugin/controller/TagUtil.js +8 -3
- package/libs/PanoTagPlugin/controller/index.js +6 -5
- package/libs/PanoTagPlugin/index.js +11 -10
- package/libs/PanoVideoPlugin/Controller.js +4 -3
- package/libs/PanoVideoPlugin/VideoMeshController.js +1 -1
- package/libs/PanoVideoPlugin/index.js +7 -6
- package/libs/base/BasePlugin.d.ts +1 -0
- package/libs/base/BasePlugin.js +21 -10
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +57 -38
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +22 -3
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +48 -29
- package/libs/floorplan/ModelFloorplanPlugin/index.js +22 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +31 -11
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +23 -3
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +59 -40
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +22 -3
- package/libs/floorplan/index.js +6 -0
- package/libs/index.js +116 -110
- package/libs/shared-utils/five/index.d.ts +1 -0
- package/libs/shared-utils/five/index.js +1 -0
- package/libs/shared-utils/five/mode.d.ts +3 -0
- package/libs/shared-utils/five/mode.js +11 -0
- package/libs/shared-utils/index.d.ts +3 -0
- package/libs/shared-utils/index.js +36 -29
- package/libs/shared-utils/isAbsoluteURL.d.ts +1 -0
- package/libs/shared-utils/isAbsoluteURL.js +6 -0
- package/libs/shared-utils/log.d.ts +2 -0
- package/libs/shared-utils/log.js +10 -0
- package/libs/shared-utils/three/PointDomHelper.js +1 -1
- package/package.json +2 -2
- package/dist/GuideLinePlugin/utils/getLineGeometries.d.ts +0 -16
- package/libs/GuideLinePlugin/utils/getLineGeometries.d.ts +0 -16
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +0 -64
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
import o from "./Controller.js";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as X } from "./Controller.js";
|
|
3
3
|
import "../base/BasePluginWithData.js";
|
|
4
4
|
import "../base/BasePlugin.js";
|
|
5
5
|
import "../shared-utils/Subscribe.js";
|
|
6
|
+
import "@realsee/five";
|
|
7
|
+
import "hammerjs";
|
|
8
|
+
import "three";
|
|
9
|
+
import "@tweenjs/tween.js";
|
|
10
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
11
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
12
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
13
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
14
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
15
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
16
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
17
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
18
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
19
|
+
import "../shared-utils/three/centerPoint.js";
|
|
20
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
21
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
22
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
23
|
+
import "../shared-utils/isAbsoluteURL.js";
|
|
24
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
25
|
+
import "../shared-utils/animationFrame/index.js";
|
|
6
26
|
import "../GuideLinePlugin/index.js";
|
|
7
27
|
import "../GuideLinePlugin/Controller.js";
|
|
8
|
-
import "three";
|
|
9
|
-
import "../GuideLinePlugin/utils/getLineGeometries.js";
|
|
10
|
-
import "polyline-normals";
|
|
11
|
-
import "../GuideLinePlugin/utils/getArrowMaterial.js";
|
|
12
|
-
import "../shared-utils/isNil.js";
|
|
13
28
|
import "../shared-utils/equal.js";
|
|
14
29
|
import "../shared-utils/isTruelyObject.js";
|
|
30
|
+
import "../GuideLinePlugin/GuideLineItem/index.js";
|
|
31
|
+
import "object-assign-deep";
|
|
32
|
+
import "../GuideLinePlugin/GuideLineModeItem/index.js";
|
|
33
|
+
import "../shared-utils/log.js";
|
|
34
|
+
import "../GuideLinePlugin/utils/createLineGeometry.js";
|
|
35
|
+
import "polyline-normals";
|
|
36
|
+
import "../shared-utils/five/mode.js";
|
|
37
|
+
import "../shared-utils/three/loadTexture.js";
|
|
15
38
|
import "../shared-utils/uuid.js";
|
|
16
39
|
import "./utils/coordinatesAngle.js";
|
|
17
40
|
import "./utils/coordinatesToVector.js";
|
|
@@ -20,9 +43,9 @@ import "./utils/vectorToCoordinates.js";
|
|
|
20
43
|
import "./utils/formatRad.js";
|
|
21
44
|
import "./utils/linerValue.js";
|
|
22
45
|
import "./utils/sleep.js";
|
|
23
|
-
const
|
|
46
|
+
const U = (r) => new o(r);
|
|
24
47
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
48
|
+
U as CruisePlugin,
|
|
49
|
+
X as CruisePluginController,
|
|
50
|
+
U as default
|
|
28
51
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { MovePanoOptions, Pose, State } from '@realsee/five';
|
|
2
2
|
import type CruisePlugin from '.';
|
|
3
3
|
import type * as BasePluginWithData from '../base/BasePluginWithData';
|
|
4
|
-
import type
|
|
4
|
+
import type * as BasePlugin from '../base/BasePlugin';
|
|
5
|
+
import type { PluginDataV1 as GuideLinePluginData } from '../GuideLinePlugin/typing';
|
|
5
6
|
declare type FivePoseAndState = Partial<Pose> & Partial<State>;
|
|
6
7
|
export declare type MoveEffect = MovePanoOptions['effect'];
|
|
7
8
|
export declare type CruiseData = {
|
|
@@ -26,7 +27,12 @@ export interface CruiseKeyframe {
|
|
|
26
27
|
export interface PluginData {
|
|
27
28
|
keyframesId: string;
|
|
28
29
|
keyframes: CruiseKeyframe[];
|
|
29
|
-
guildPluginOptions?:
|
|
30
|
+
guildPluginOptions?: {
|
|
31
|
+
arrowTextureUrl?: string;
|
|
32
|
+
skipPanoIndexMesh?: boolean;
|
|
33
|
+
unitWidth?: number;
|
|
34
|
+
unitHeight?: number;
|
|
35
|
+
};
|
|
30
36
|
}
|
|
31
37
|
export interface PluginServerData extends BasePluginWithData.ServerData {
|
|
32
38
|
data: {
|
|
@@ -135,5 +141,9 @@ export interface EventMap extends BasePluginWithData.EventMap<PluginState, Plugi
|
|
|
135
141
|
userAction: boolean;
|
|
136
142
|
}) => void;
|
|
137
143
|
}
|
|
144
|
+
export interface Config extends BasePlugin.Config {
|
|
145
|
+
/** 漫游时是否加载路线 */
|
|
146
|
+
useGuideLine?: boolean;
|
|
147
|
+
}
|
|
138
148
|
export declare type CruisePluginExportType = ReturnType<typeof CruisePlugin>;
|
|
139
149
|
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as BasePluginWithData from '../base/BasePluginWithData';
|
|
2
2
|
import type { Five } from '@realsee/five';
|
|
3
3
|
import type { EventMap, PluginData, PluginServerData, PluginState } from './typing';
|
|
4
|
+
import type * as PluginType from './typing';
|
|
4
5
|
import type { Config } from '../base/BasePlugin';
|
|
6
|
+
import { GuideLineItem } from './GuideLineItem';
|
|
5
7
|
export declare const pluginFlag: (name: string) => string;
|
|
6
8
|
export default class Controller extends BasePluginWithData.Controller<PluginState, EventMap, PluginServerData, PluginData> {
|
|
7
|
-
|
|
9
|
+
readonly version = "v1.1.0";
|
|
10
|
+
readonly name = "GuideLinePlugin";
|
|
8
11
|
state: {
|
|
9
12
|
visible: boolean;
|
|
10
13
|
enabled: boolean;
|
|
@@ -12,40 +15,43 @@ export default class Controller extends BasePluginWithData.Controller<PluginStat
|
|
|
12
15
|
};
|
|
13
16
|
protected data?: PluginData;
|
|
14
17
|
private linesGroup?;
|
|
18
|
+
/** GuideLineItem 索引 */
|
|
19
|
+
private itemMap;
|
|
15
20
|
constructor(five: Five, config?: Config);
|
|
16
21
|
load(serverData: PluginServerData | PluginData, state?: PluginState, userAction?: boolean): Promise<void>;
|
|
17
|
-
formatData(serverData: any): Promise<
|
|
22
|
+
formatData(serverData: any): Promise<PluginType.PluginDataV2>;
|
|
23
|
+
/** 展示插件 */
|
|
18
24
|
show(options?: {
|
|
19
25
|
userAction?: boolean;
|
|
20
26
|
}): Promise<void>;
|
|
27
|
+
/** 隐藏插件 */
|
|
21
28
|
hide(options?: {
|
|
22
29
|
userAction?: boolean;
|
|
23
30
|
}): Promise<void>;
|
|
31
|
+
/** 开启插件 */
|
|
24
32
|
enable(options?: {
|
|
25
33
|
userAction?: boolean;
|
|
26
34
|
}): void;
|
|
35
|
+
/** 关闭插件 */
|
|
27
36
|
disable(options?: {
|
|
28
37
|
userAction?: boolean;
|
|
29
38
|
}): void;
|
|
39
|
+
/** 销毁插件 */
|
|
30
40
|
dispose(): void;
|
|
31
41
|
setState(state: Partial<PluginState>, options?: {
|
|
32
42
|
userAction?: boolean;
|
|
33
43
|
}): void;
|
|
44
|
+
/** 添加一个 GuideLineItem */
|
|
45
|
+
addGuideLineItem(data?: PluginType.GuideLineItem): GuideLineItem;
|
|
46
|
+
/** 获取 Plugin 内的 GuideLineItem */
|
|
47
|
+
getGuideLineItemByID(id: string | number): GuideLineItem;
|
|
34
48
|
private handleEnable;
|
|
35
49
|
private handleVisible;
|
|
36
50
|
private handleDispose;
|
|
37
|
-
/**
|
|
38
|
-
* 获取多条路线的 Mesh Group
|
|
39
|
-
*/
|
|
40
|
-
private getLinesGroup;
|
|
41
|
-
/**
|
|
42
|
-
* 获取单条路线
|
|
43
|
-
*/
|
|
44
|
-
private getLine;
|
|
45
51
|
private disposedErrorLog;
|
|
46
|
-
private actionWhenEnabled;
|
|
47
52
|
/**
|
|
48
53
|
* @description: Wait for five model ready
|
|
49
54
|
*/
|
|
50
55
|
private waitFiveModelLoaded;
|
|
56
|
+
private getDataWithoutVersion;
|
|
51
57
|
}
|
|
@@ -1,81 +1,123 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var g = Object.defineProperty;
|
|
2
|
+
var b = Object.getOwnPropertySymbols;
|
|
3
|
+
var L = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var u = (s, t, e) => t in s ? g(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, m = (s, t) => {
|
|
5
5
|
for (var e in t || (t = {}))
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var e of
|
|
9
|
-
|
|
10
|
-
return
|
|
6
|
+
L.call(t, e) && u(s, e, t[e]);
|
|
7
|
+
if (b)
|
|
8
|
+
for (var e of b(t))
|
|
9
|
+
w.call(t, e) && u(s, e, t[e]);
|
|
10
|
+
return s;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
var n = (s, t, e) => (u(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
13
|
+
var h = (s, t, e) => new Promise((i, r) => {
|
|
14
|
+
var d = (a) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
16
|
+
l(e.next(a));
|
|
17
|
+
} catch (p) {
|
|
18
|
+
r(p);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, o = (a) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
22
|
+
l(e.throw(a));
|
|
23
|
+
} catch (p) {
|
|
24
|
+
r(p);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, l = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(d, o);
|
|
27
|
+
l((e = e.apply(s, t)).next());
|
|
28
28
|
});
|
|
29
|
-
import { Controller as
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import
|
|
29
|
+
import { Controller as _ } from "../base/BasePluginWithData.js";
|
|
30
|
+
import "three";
|
|
31
|
+
import { equal as D } from "../shared-utils/equal.js";
|
|
32
|
+
import { GuideLineItem as G } from "./GuideLineItem/index.js";
|
|
33
|
+
import "polyline-normals";
|
|
34
|
+
import "@realsee/five";
|
|
35
|
+
import "hammerjs";
|
|
36
|
+
import "@tweenjs/tween.js";
|
|
37
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
38
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
39
|
+
import { uuid as S } from "../shared-utils/uuid.js";
|
|
40
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
41
|
+
import "../shared-utils/three/loadTexture.js";
|
|
35
42
|
import "../base/BasePlugin.js";
|
|
36
43
|
import "../shared-utils/Subscribe.js";
|
|
37
|
-
import "
|
|
44
|
+
import "../shared-utils/isAbsoluteURL.js";
|
|
38
45
|
import "../shared-utils/isTruelyObject.js";
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
import "object-assign-deep";
|
|
47
|
+
import "./GuideLineModeItem/index.js";
|
|
48
|
+
import "../shared-utils/log.js";
|
|
49
|
+
import "./utils/createLineGeometry.js";
|
|
50
|
+
import "../shared-utils/five/mode.js";
|
|
51
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
52
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
53
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
54
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
55
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
56
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
57
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
58
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
59
|
+
import "../shared-utils/three/centerPoint.js";
|
|
60
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
61
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
62
|
+
import "../shared-utils/animationFrame/index.js";
|
|
63
|
+
const v = "v1.1.0", c = "GuideLinePlugin", f = `${c}@${v}`, ne = (s) => `${f}--${s}`;
|
|
64
|
+
function y(s) {
|
|
65
|
+
return Object.hasOwn(s, "routes");
|
|
66
|
+
}
|
|
67
|
+
class de extends _ {
|
|
41
68
|
constructor(e, i) {
|
|
42
69
|
super(e, i);
|
|
43
|
-
|
|
70
|
+
n(this, "version", v);
|
|
71
|
+
n(this, "name", c);
|
|
72
|
+
n(this, "state", {
|
|
44
73
|
visible: !1,
|
|
45
74
|
enabled: !0,
|
|
46
75
|
disposed: !1
|
|
47
76
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
77
|
+
n(this, "data");
|
|
78
|
+
n(this, "linesGroup");
|
|
79
|
+
n(this, "itemMap", /* @__PURE__ */ new Map());
|
|
80
|
+
n(this, "disposedErrorLog", () => {
|
|
81
|
+
console.error(`${f} is disposed`);
|
|
52
82
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const a = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, n = yield this.formatData(e);
|
|
62
|
-
this.hooks.emit("dataChange", n, a), this.data = n, this.linesGroup && this.five.scene.remove(this.linesGroup);
|
|
63
|
-
const h = this.getLinesGroup(n.routes, n.config);
|
|
64
|
-
!h || (this.linesGroup = h, yield this.waitFiveModelLoaded(), this.five.scene.add(h), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), i && this.setState(i), this.five.needsRender = !0, this.hooks.emit("dataLoaded", n), console.info(`${c} loaded`, n));
|
|
83
|
+
Object.assign(window, { [`__${c}_DEBUG__`]: this });
|
|
84
|
+
}
|
|
85
|
+
load(e, i, r = !0) {
|
|
86
|
+
return h(this, null, function* () {
|
|
87
|
+
const d = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, o = yield this.formatData(e);
|
|
88
|
+
this.hooks.emit("dataChange", o, d), this.data = o, o.lines.forEach((l) => {
|
|
89
|
+
this.addGuideLineItem(l);
|
|
90
|
+
}), yield this.waitFiveModelLoaded(), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), i && this.setState(i, { userAction: r }), this.hooks.emit("dataLoaded", o), console.info(`${f} loaded`, o);
|
|
65
91
|
});
|
|
66
92
|
}
|
|
67
93
|
formatData(e) {
|
|
68
|
-
return
|
|
69
|
-
|
|
94
|
+
return h(this, null, function* () {
|
|
95
|
+
const i = this.getDataWithoutVersion(e);
|
|
96
|
+
if (y(i)) {
|
|
97
|
+
const { routes: r } = i;
|
|
98
|
+
return { lines: r.map((o) => {
|
|
99
|
+
const { panoIndexList: l } = o;
|
|
100
|
+
return {
|
|
101
|
+
render_id: S(),
|
|
102
|
+
pano_group: l,
|
|
103
|
+
panorama_like_visible: !0,
|
|
104
|
+
panorama_style: {
|
|
105
|
+
width: 0.6,
|
|
106
|
+
unit_length: 0.4
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}) };
|
|
110
|
+
}
|
|
111
|
+
return i;
|
|
70
112
|
});
|
|
71
113
|
}
|
|
72
114
|
show(e) {
|
|
73
|
-
return
|
|
115
|
+
return h(this, null, function* () {
|
|
74
116
|
this.setState({ visible: !0 }, e);
|
|
75
117
|
});
|
|
76
118
|
}
|
|
77
119
|
hide(e) {
|
|
78
|
-
return
|
|
120
|
+
return h(this, null, function* () {
|
|
79
121
|
this.setState({ visible: !1 }, e);
|
|
80
122
|
});
|
|
81
123
|
}
|
|
@@ -89,48 +131,30 @@ class V extends W {
|
|
|
89
131
|
this.setState({ disposed: !0 });
|
|
90
132
|
}
|
|
91
133
|
setState(e, i) {
|
|
92
|
-
var
|
|
134
|
+
var d;
|
|
93
135
|
if (this.state.disposed)
|
|
94
136
|
return this.disposedErrorLog();
|
|
95
|
-
const
|
|
96
|
-
this.state = m(m({}, this.state), e), e.disposed !== void 0 && e.disposed !==
|
|
137
|
+
const r = m({}, this.state);
|
|
138
|
+
this.state = m(m({}, this.state), e), e.disposed !== void 0 && e.disposed !== r.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== r.visible && this.handleVisible(e.visible, i == null ? void 0 : i.userAction), e.enabled !== void 0 && e.enabled !== r.enabled && this.handleEnable(e.enabled, i == null ? void 0 : i.userAction), D(r, this.state, { deep: !0 }) || (this.hooks.emit("stateChange", { state: this.state, prevState: r, userAction: (d = i == null ? void 0 : i.userAction) != null ? d : !0 }), this.five.needsRender = !0);
|
|
139
|
+
}
|
|
140
|
+
addGuideLineItem(e) {
|
|
141
|
+
const i = e.render_id || e.id, r = new G({ five: this.five, id: i, plugin: this });
|
|
142
|
+
return this.itemMap.set(i, r), e && r.setData(e), r;
|
|
143
|
+
}
|
|
144
|
+
getGuideLineItemByID(e) {
|
|
145
|
+
return this.itemMap.get(e);
|
|
97
146
|
}
|
|
98
147
|
handleEnable(e, i = !0) {
|
|
99
|
-
this.
|
|
148
|
+
this.hooks.emit(e ? "enable" : "disable", { userAction: i });
|
|
100
149
|
}
|
|
101
150
|
handleVisible(e, i = !0) {
|
|
102
|
-
this.
|
|
151
|
+
!this.state.enabled || this.hooks.emit(e ? "show" : "hide", { userAction: i });
|
|
103
152
|
}
|
|
104
153
|
handleDispose() {
|
|
105
154
|
this.linesGroup && this.five.scene.remove(this.linesGroup), this.hooks.emit("dispose");
|
|
106
155
|
}
|
|
107
|
-
getLinesGroup(e, i) {
|
|
108
|
-
const s = e.map((n) => this.getLine(n, i)).filter(P), a = new v.Group();
|
|
109
|
-
if (a.name = M("route-group"), s.length !== 0)
|
|
110
|
-
return a.add(...s), a;
|
|
111
|
-
}
|
|
112
|
-
getLine(e, i) {
|
|
113
|
-
var o, l, G, w, E, L, k, S;
|
|
114
|
-
const s = new v.Group(), a = e.panoIndexList.map((b) => {
|
|
115
|
-
var p;
|
|
116
|
-
return (p = this.five.work.observers[b]) == null ? void 0 : p.standingPosition;
|
|
117
|
-
}).filter(P), n = U(a, {
|
|
118
|
-
skipPanoIndexMesh: (l = (o = e.skipPanoIndexMesh) != null ? o : i == null ? void 0 : i.skipPanoIndexMesh) != null ? l : !0,
|
|
119
|
-
unitWidth: (w = (G = e.unitWidth) != null ? G : i == null ? void 0 : i.unitWidth) != null ? w : 0.6,
|
|
120
|
-
unitHeight: (L = (E = e.unitHeight) != null ? E : i == null ? void 0 : i.unitHeight) != null ? L : 0.4
|
|
121
|
-
});
|
|
122
|
-
if (!n)
|
|
123
|
-
return;
|
|
124
|
-
const h = _({
|
|
125
|
-
textureUrl: (S = (k = e.arrowTextureUrl) != null ? k : i == null ? void 0 : i.arrowTextureUrl) != null ? S : this.staticPrefix + "/release/web/arrow6.b6ce0c62.png"
|
|
126
|
-
});
|
|
127
|
-
return n.forEach((b) => {
|
|
128
|
-
const p = new v.Mesh(b, h);
|
|
129
|
-
p.name = M("route-line-mesh"), s.add(p);
|
|
130
|
-
}), s;
|
|
131
|
-
}
|
|
132
156
|
waitFiveModelLoaded() {
|
|
133
|
-
return
|
|
157
|
+
return h(this, null, function* () {
|
|
134
158
|
return new Promise((e) => {
|
|
135
159
|
if (this.five.model.loaded) {
|
|
136
160
|
e();
|
|
@@ -142,9 +166,11 @@ class V extends W {
|
|
|
142
166
|
});
|
|
143
167
|
});
|
|
144
168
|
}
|
|
169
|
+
getDataWithoutVersion(e) {
|
|
170
|
+
return typeof e == "object" && e !== null && e.version && e.data ? e.data : e;
|
|
171
|
+
}
|
|
145
172
|
}
|
|
146
|
-
d(V, "lasestVersion", $);
|
|
147
173
|
export {
|
|
148
|
-
|
|
149
|
-
|
|
174
|
+
de as default,
|
|
175
|
+
ne as pluginFlag
|
|
150
176
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var h = (o, e, t) => e in o ? u(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var i = (o, e, t) => (h(o, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import c from "object-assign-deep";
|
|
5
|
+
import { GuideLineModeItem as s } from "../GuideLineModeItem/index.js";
|
|
6
|
+
class d {
|
|
7
|
+
constructor(e) {
|
|
8
|
+
i(this, "id");
|
|
9
|
+
i(this, "renderID");
|
|
10
|
+
i(this, "isGuideLine", !0);
|
|
11
|
+
i(this, "panoramaItem");
|
|
12
|
+
i(this, "modelItem");
|
|
13
|
+
i(this, "plugin");
|
|
14
|
+
i(this, "five");
|
|
15
|
+
this.id = e.id, this.five = e.five, this.plugin = e.plugin, this.panoramaItem = new s(this.five, { mode: "panorama", plugin: this.plugin }), this.modelItem = new s(this.five, { mode: "model", plugin: this.plugin });
|
|
16
|
+
}
|
|
17
|
+
setData(e) {
|
|
18
|
+
this.setDataByMode("panorama", e), this.setDataByMode("model", e);
|
|
19
|
+
}
|
|
20
|
+
setDataByMode(e, t) {
|
|
21
|
+
const r = e === "panorama" ? this.panoramaItem : this.modelItem, a = e === "panorama" ? t.panorama_style : t.model_style;
|
|
22
|
+
if (!a)
|
|
23
|
+
return;
|
|
24
|
+
const m = t.path, l = { url: this.plugin.staticPrefix + "/release/web/arrow6.b6ce0c62.png" }, n = a, p = c({ texture: l }, a);
|
|
25
|
+
t.path ? r.setGeometryByPath(m, n) : t.pano_group && r.setGeometryByPanoGroup(t.pano_group, n), r.setMartial(p);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
29
|
+
__proto__: null,
|
|
30
|
+
GuideLineItem: d
|
|
31
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
32
|
+
export {
|
|
33
|
+
d as GuideLineItem,
|
|
34
|
+
I as GuideLineItem$1
|
|
35
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import type GuideLinePlugin from './Controller';
|
|
3
|
+
import type * as PluginType from './typing';
|
|
4
|
+
import { GuideLineModeItem } from './GuideLineModeItem';
|
|
5
|
+
/** 路线引导实例。
|
|
6
|
+
* - 路线包括两个部分:全景路线和模型路线。
|
|
7
|
+
* - Five 切换模态时,路线会自动切换。
|
|
8
|
+
* - GuideLineItem P
|
|
9
|
+
*/
|
|
10
|
+
declare class GuideLineItem {
|
|
11
|
+
readonly id: string | number;
|
|
12
|
+
readonly renderID?: string;
|
|
13
|
+
readonly isGuideLine = true;
|
|
14
|
+
readonly panoramaItem: GuideLineModeItem;
|
|
15
|
+
readonly modelItem: GuideLineModeItem;
|
|
16
|
+
private plugin;
|
|
17
|
+
private five;
|
|
18
|
+
constructor(options: {
|
|
19
|
+
five: Five;
|
|
20
|
+
id: string | number;
|
|
21
|
+
plugin: GuideLinePlugin;
|
|
22
|
+
});
|
|
23
|
+
setData(data: PluginType.GuideLineItem): void;
|
|
24
|
+
setDataByMode(mode: PluginType.GuideLineModeItemMode, data: PluginType.GuideLineItem): void;
|
|
25
|
+
}
|
|
26
|
+
export { GuideLineItem };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "object-assign-deep";
|
|
2
|
+
import "./GuideLineModeItem/index.js";
|
|
3
|
+
import { GuideLineItem as A } from "./GuideLineItem/index.js";
|
|
4
|
+
import "three";
|
|
5
|
+
import "../shared-utils/log.js";
|
|
6
|
+
import "./utils/createLineGeometry.js";
|
|
7
|
+
import "polyline-normals";
|
|
8
|
+
import "../shared-utils/five/mode.js";
|
|
9
|
+
import "@realsee/five";
|
|
10
|
+
import "hammerjs";
|
|
11
|
+
import "@tweenjs/tween.js";
|
|
12
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
13
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
14
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
15
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
16
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
17
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
18
|
+
import "../shared-utils/Subscribe.js";
|
|
19
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
20
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
21
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
22
|
+
import "../shared-utils/three/centerPoint.js";
|
|
23
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
24
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
25
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
26
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
27
|
+
import "../shared-utils/animationFrame/index.js";
|
|
28
|
+
import "../shared-utils/three/loadTexture.js";
|
|
29
|
+
export {
|
|
30
|
+
A as GuideLineItem
|
|
31
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
var g = Object.defineProperty;
|
|
2
|
+
var u = Object.getOwnPropertySymbols;
|
|
3
|
+
var f = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var l = (s, e, i) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i, m = (s, e) => {
|
|
5
|
+
for (var i in e || (e = {}))
|
|
6
|
+
f.call(e, i) && l(s, i, e[i]);
|
|
7
|
+
if (u)
|
|
8
|
+
for (var i of u(e))
|
|
9
|
+
p.call(e, i) && l(s, i, e[i]);
|
|
10
|
+
return s;
|
|
11
|
+
};
|
|
12
|
+
var t = (s, e, i) => (l(s, typeof e != "symbol" ? e + "" : e, i), i);
|
|
13
|
+
import * as o from "three";
|
|
14
|
+
import { logWarning as b, logError as c } from "../../shared-utils/log.js";
|
|
15
|
+
import { createLineGeometry as y } from "../utils/createLineGeometry.js";
|
|
16
|
+
import { isPanoramaLike as P, isModelLike as v } from "../../shared-utils/five/mode.js";
|
|
17
|
+
import "hammerjs";
|
|
18
|
+
import "@realsee/five";
|
|
19
|
+
import "@tweenjs/tween.js";
|
|
20
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
21
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
22
|
+
import "../../shared-utils/animationFrame/BetterTween.js";
|
|
23
|
+
import { loadTexture as V } from "../../shared-utils/three/loadTexture.js";
|
|
24
|
+
class w {
|
|
25
|
+
constructor(e, i) {
|
|
26
|
+
t(this, "mesh", new o.Mesh(
|
|
27
|
+
new o.BufferGeometry(),
|
|
28
|
+
new o.MeshBasicMaterial({ transparent: !0 })
|
|
29
|
+
));
|
|
30
|
+
t(this, "five");
|
|
31
|
+
t(this, "mode");
|
|
32
|
+
t(this, "path", []);
|
|
33
|
+
t(this, "color", [0, 0, 0]);
|
|
34
|
+
t(this, "opacity", 1);
|
|
35
|
+
t(this, "textureUrl", "");
|
|
36
|
+
t(this, "scale", 1);
|
|
37
|
+
t(this, "width", 0.5);
|
|
38
|
+
t(this, "unitLength", 0.5);
|
|
39
|
+
t(this, "visible", !1);
|
|
40
|
+
t(this, "modeVisible", !1);
|
|
41
|
+
t(this, "customVisible", null);
|
|
42
|
+
t(this, "plugin");
|
|
43
|
+
t(this, "textureHasLoaded", !1);
|
|
44
|
+
t(this, "disposed", !1);
|
|
45
|
+
t(this, "onPluginShow", () => {
|
|
46
|
+
this.updateVisible();
|
|
47
|
+
});
|
|
48
|
+
t(this, "onPluginHide", () => {
|
|
49
|
+
this.updateVisible();
|
|
50
|
+
});
|
|
51
|
+
t(this, "onPluginEnable", () => {
|
|
52
|
+
this.updateVisible();
|
|
53
|
+
});
|
|
54
|
+
t(this, "onPluginDisable", () => {
|
|
55
|
+
this.updateVisible();
|
|
56
|
+
});
|
|
57
|
+
t(this, "onFiveModeChange", (e) => {
|
|
58
|
+
this.modeVisible = this.mode === "panorama" ? P(e) : v(e), this.updateVisible();
|
|
59
|
+
});
|
|
60
|
+
t(this, "logWarning", (e) => b("GuideLineModeItem: ", e));
|
|
61
|
+
t(this, "logError", (e) => c("GuideLineModeItem: ", e));
|
|
62
|
+
this.five = e, this.mode = i.mode, this.mesh.name = "GuideLineModeItem", this.plugin = i.plugin, this.plugin.hooks.on("show", this.onPluginShow), this.plugin.hooks.on("hide", this.onPluginHide), this.plugin.hooks.on("enable", this.onPluginEnable), this.plugin.hooks.on("disable", this.onPluginDisable), this.five.on("modeChange", this.onFiveModeChange), this.onFiveModeChange(this.five.getCurrentState().mode);
|
|
63
|
+
}
|
|
64
|
+
setCustomVisible(e) {
|
|
65
|
+
if (this.disposed)
|
|
66
|
+
return this.logError("disposed");
|
|
67
|
+
this.customVisible !== e && (this.customVisible = e, this.updateVisible());
|
|
68
|
+
}
|
|
69
|
+
setModeVisible(e) {
|
|
70
|
+
if (this.disposed)
|
|
71
|
+
return this.logError("disposed");
|
|
72
|
+
this.modeVisible !== e && (this.modeVisible = e, this.updateVisible());
|
|
73
|
+
}
|
|
74
|
+
dispose() {
|
|
75
|
+
this.disposed || (this.disposed = !0, this.five.off("modeChange", this.onFiveModeChange), this.plugin.hooks.off("show", this.onPluginShow), this.plugin.hooks.off("hide", this.onPluginHide), this.plugin.hooks.off("enable", this.onPluginEnable), this.plugin.hooks.off("disable", this.onPluginDisable), this.doHide());
|
|
76
|
+
}
|
|
77
|
+
setUnitSize(e, i) {
|
|
78
|
+
if (this.disposed)
|
|
79
|
+
return this.logError("disposed");
|
|
80
|
+
this.width = e, this.unitLength = i, this.setGeometryByPath(this.path, { width: e, unit_length: i });
|
|
81
|
+
}
|
|
82
|
+
setScale(e) {
|
|
83
|
+
if (this.disposed)
|
|
84
|
+
return this.logError("disposed");
|
|
85
|
+
this.scale = e, this.setGeometryByPath(this.path, { scale: e });
|
|
86
|
+
}
|
|
87
|
+
setGeometryByPanoGroup(e, i) {
|
|
88
|
+
if (this.disposed)
|
|
89
|
+
return this.logError("disposed");
|
|
90
|
+
if (!this.five.work)
|
|
91
|
+
return this.logError("setPathByPanoGroup: work is not ready");
|
|
92
|
+
const r = this.getPathFromPanoGroup(e, this.five.work, i);
|
|
93
|
+
this.path = r, this.setGeometryByPath(r, i);
|
|
94
|
+
}
|
|
95
|
+
setGeometryByPath(e, i) {
|
|
96
|
+
var a;
|
|
97
|
+
if (this.disposed)
|
|
98
|
+
return this.logError("disposed");
|
|
99
|
+
this.path = e;
|
|
100
|
+
const r = (a = i == null ? void 0 : i.scale) != null ? a : this.scale, n = i != null && i.width ? i.width * r : this.width * r, d = i != null && i.unit_length ? i.unit_length * r : this.unitLength * r, h = y({ path: e, width: n, unitLength: d });
|
|
101
|
+
this.mesh.geometry = h;
|
|
102
|
+
}
|
|
103
|
+
setMartial(e) {
|
|
104
|
+
var i;
|
|
105
|
+
if (this.disposed)
|
|
106
|
+
return this.logError("disposed");
|
|
107
|
+
e != null && e.color && this.setColor(e.color), e != null && e.opacity && this.setOpacity(e.opacity), (i = e == null ? void 0 : e.texture) != null && i.url && this.setTextureUrl(e.texture.url);
|
|
108
|
+
}
|
|
109
|
+
setColor(e) {
|
|
110
|
+
if (this.disposed)
|
|
111
|
+
return this.logError("disposed");
|
|
112
|
+
this.color = e;
|
|
113
|
+
}
|
|
114
|
+
setOpacity(e) {
|
|
115
|
+
if (this.disposed)
|
|
116
|
+
return this.logError("disposed");
|
|
117
|
+
this.opacity = e;
|
|
118
|
+
}
|
|
119
|
+
setTextureUrl(e) {
|
|
120
|
+
if (this.disposed)
|
|
121
|
+
return this.logError("disposed");
|
|
122
|
+
this.textureUrl = e, V(e).then((i) => {
|
|
123
|
+
this.disposed || this.textureUrl === e && (i.wrapT = o.RepeatWrapping, this.textureHasLoaded = !0, this.mesh.material.map = i, this.mesh.material.map.needsUpdate = !0, this.mesh.material.needsUpdate = !0, this.five.needsRender = !0, this.updateVisible());
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
updateVisible() {
|
|
127
|
+
const e = (() => !this.plugin.state.enabled || !this.plugin.state.visible ? !1 : this.customVisible !== null ? this.customVisible : this.modeVisible && this.textureHasLoaded)();
|
|
128
|
+
this.visible !== e && (this.visible = e, e ? this.doShow() : this.doHide());
|
|
129
|
+
}
|
|
130
|
+
doShow() {
|
|
131
|
+
this.five.scene.add(this.mesh), this.five.needsRender = !0;
|
|
132
|
+
}
|
|
133
|
+
doHide() {
|
|
134
|
+
this.five.scene.remove(this.mesh), this.five.needsRender = !0;
|
|
135
|
+
}
|
|
136
|
+
getPathFromPanoGroup(e, i, r) {
|
|
137
|
+
const d = e.map((h) => i.observers[h]).map((h) => h.standingPosition.toArray());
|
|
138
|
+
return [m({ type: "CatmullRomCurve3", points: d }, r)];
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
142
|
+
__proto__: null,
|
|
143
|
+
GuideLineModeItem: w
|
|
144
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
145
|
+
export {
|
|
146
|
+
w as GuideLineModeItem,
|
|
147
|
+
_ as GuideLineModeItem$1
|
|
148
|
+
};
|