@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,35 +1,35 @@
|
|
|
1
|
-
var
|
|
1
|
+
var T = Object.defineProperty, K = Object.defineProperties;
|
|
2
2
|
var O = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var L = Object.getOwnPropertySymbols;
|
|
4
4
|
var U = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
6
|
-
for (var e in
|
|
7
|
-
U.call(
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
A.call(
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var I = (
|
|
14
|
-
var
|
|
15
|
-
var
|
|
5
|
+
var C = (p, u, e) => u in p ? T(p, u, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[u] = e, g = (p, u) => {
|
|
6
|
+
for (var e in u || (u = {}))
|
|
7
|
+
U.call(u, e) && C(p, e, u[e]);
|
|
8
|
+
if (L)
|
|
9
|
+
for (var e of L(u))
|
|
10
|
+
A.call(u, e) && C(p, e, u[e]);
|
|
11
|
+
return p;
|
|
12
|
+
}, E = (p, u) => K(p, O(u));
|
|
13
|
+
var I = (p, u, e) => (C(p, typeof u != "symbol" ? u + "" : u, e), e);
|
|
14
|
+
var v = (p, u, e) => new Promise((t, i) => {
|
|
15
|
+
var r = (f) => {
|
|
16
16
|
try {
|
|
17
17
|
n(e.next(f));
|
|
18
|
-
} catch (
|
|
19
|
-
i(
|
|
18
|
+
} catch (a) {
|
|
19
|
+
i(a);
|
|
20
20
|
}
|
|
21
21
|
}, o = (f) => {
|
|
22
22
|
try {
|
|
23
23
|
n(e.throw(f));
|
|
24
|
-
} catch (
|
|
25
|
-
i(
|
|
24
|
+
} catch (a) {
|
|
25
|
+
i(a);
|
|
26
26
|
}
|
|
27
|
-
}, n = (f) => f.done ? t(f.value) : Promise.resolve(f.value).then(
|
|
28
|
-
n((e = e.apply(
|
|
27
|
+
}, n = (f) => f.done ? t(f.value) : Promise.resolve(f.value).then(r, o);
|
|
28
|
+
n((e = e.apply(p, u)).next());
|
|
29
29
|
});
|
|
30
30
|
import { Controller as V } from "../base/BasePluginWithData.js";
|
|
31
31
|
import { GuideLinePlugin as Q } from "../GuideLinePlugin/index.js";
|
|
32
|
-
import { uuid as
|
|
32
|
+
import { uuid as w } from "../shared-utils/uuid.js";
|
|
33
33
|
import { coordinatesAngle as $ } from "./utils/coordinatesAngle.js";
|
|
34
34
|
import { safeCall as _ } from "./utils/safeCall.js";
|
|
35
35
|
import { equal as R } from "../shared-utils/equal.js";
|
|
@@ -39,21 +39,44 @@ import H from "./utils/linerValue.js";
|
|
|
39
39
|
import { sleep as J } from "./utils/sleep.js";
|
|
40
40
|
import "../base/BasePlugin.js";
|
|
41
41
|
import "../shared-utils/Subscribe.js";
|
|
42
|
+
import "@realsee/five";
|
|
43
|
+
import "hammerjs";
|
|
44
|
+
import "@tweenjs/tween.js";
|
|
45
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
46
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
47
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
48
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
49
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
50
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
51
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
52
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
53
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
54
|
+
import "../shared-utils/three/centerPoint.js";
|
|
55
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
56
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
57
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
58
|
+
import "../shared-utils/isAbsoluteURL.js";
|
|
59
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
60
|
+
import "../shared-utils/animationFrame/index.js";
|
|
42
61
|
import "../GuideLinePlugin/Controller.js";
|
|
43
|
-
import "../GuideLinePlugin/
|
|
62
|
+
import "../GuideLinePlugin/GuideLineItem/index.js";
|
|
63
|
+
import "object-assign-deep";
|
|
64
|
+
import "../GuideLinePlugin/GuideLineModeItem/index.js";
|
|
65
|
+
import "../shared-utils/log.js";
|
|
66
|
+
import "../GuideLinePlugin/utils/createLineGeometry.js";
|
|
44
67
|
import "polyline-normals";
|
|
45
|
-
import "../
|
|
46
|
-
import "../shared-utils/
|
|
68
|
+
import "../shared-utils/five/mode.js";
|
|
69
|
+
import "../shared-utils/three/loadTexture.js";
|
|
47
70
|
import "./utils/coordinatesToVector.js";
|
|
48
71
|
import "../shared-utils/isTruelyObject.js";
|
|
49
72
|
import "./utils/formatRad.js";
|
|
50
|
-
const
|
|
51
|
-
console.error(`${
|
|
73
|
+
const M = "v1.0.6", G = "CruisePlugin", x = `${G}@${M}`, Qe = (p) => `${x}--${p}`, D = () => {
|
|
74
|
+
console.error(`${x} is disposed`);
|
|
52
75
|
}, W = () => {
|
|
53
|
-
console.warn(`${
|
|
76
|
+
console.warn(`${x} is disabled`);
|
|
54
77
|
}, q = () => {
|
|
55
|
-
console.error(`${
|
|
56
|
-
},
|
|
78
|
+
console.error(`${x} is disabled`);
|
|
79
|
+
}, F = /* @__PURE__ */ new Map();
|
|
57
80
|
class z extends V {
|
|
58
81
|
constructor(e, t) {
|
|
59
82
|
super(e, t);
|
|
@@ -83,60 +106,60 @@ class z extends V {
|
|
|
83
106
|
modeChanging: !1
|
|
84
107
|
});
|
|
85
108
|
I(this, "GuideLine");
|
|
86
|
-
this.config = t, Object.assign(window, { [`__${
|
|
87
|
-
const i = this.setFiveLinearUpdateCamera.bind(this),
|
|
88
|
-
this.hooks.on("play", i), this.hooks.on("broke",
|
|
89
|
-
this.hooks.off("play", i), this.hooks.off("broke",
|
|
109
|
+
this.config = t, Object.assign(window, { [`__${G}_DEBUG__`]: this });
|
|
110
|
+
const i = this.setFiveLinearUpdateCamera.bind(this), r = this.setFiveOriginUpdateCamera.bind(this);
|
|
111
|
+
this.hooks.on("play", i), this.hooks.on("broke", r), this.hooks.on("end", r), this.hooks.on("pause", r), this.privateState.disposers.push(() => {
|
|
112
|
+
this.hooks.off("play", i), this.hooks.off("broke", r), this.hooks.off("end", r), this.hooks.off("pause", r);
|
|
90
113
|
});
|
|
91
114
|
}
|
|
92
115
|
load(e, t, i) {
|
|
93
|
-
return
|
|
94
|
-
var s, d,
|
|
116
|
+
return v(this, null, function* () {
|
|
117
|
+
var s, d, l, c, m, P;
|
|
95
118
|
if (this.state.disposed)
|
|
96
|
-
return
|
|
97
|
-
this.privateState.fiveOriginGetProgress || (d = (s = this.five.controller) == null ? void 0 : s.cameraMotion) != null && d.getProgress || (yield this.waitFiveLoaded(), this.privateState.fiveOriginGetProgress = (
|
|
98
|
-
const
|
|
99
|
-
this.data = o, this.hooks.emit("dataChange", o,
|
|
119
|
+
return D();
|
|
120
|
+
this.privateState.fiveOriginGetProgress || (d = (s = this.five.controller) == null ? void 0 : s.cameraMotion) != null && d.getProgress || (yield this.waitFiveLoaded(), this.privateState.fiveOriginGetProgress = (c = (l = this.five.controller) == null ? void 0 : l.cameraMotion) == null ? void 0 : c.getProgress), this.clear();
|
|
121
|
+
const r = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, o = yield this.formatData(e);
|
|
122
|
+
this.data = o, this.hooks.emit("dataChange", o, r);
|
|
100
123
|
let n = [], f;
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
return
|
|
105
|
-
}).map((
|
|
106
|
-
var
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
if (f ===
|
|
110
|
-
const
|
|
111
|
-
n[
|
|
124
|
+
const a = this.data.keyframes.filter((h) => h.data.panoIndex !== void 0);
|
|
125
|
+
a.filter((h, y) => {
|
|
126
|
+
var S;
|
|
127
|
+
return h.data.panoIndex !== ((S = a[y - 1]) == null ? void 0 : S.data.panoIndex);
|
|
128
|
+
}).map((h) => h.data.panoIndex).forEach((h) => {
|
|
129
|
+
var S, k;
|
|
130
|
+
const y = (S = this.five.work.observers[h]) == null ? void 0 : S.floorIndex;
|
|
131
|
+
if (y !== void 0)
|
|
132
|
+
if (f === y) {
|
|
133
|
+
const b = n.length - 1;
|
|
134
|
+
n[b] = [...(k = n[b]) != null ? k : [], h];
|
|
112
135
|
} else {
|
|
113
|
-
f =
|
|
114
|
-
const
|
|
115
|
-
n[
|
|
136
|
+
f = y;
|
|
137
|
+
const b = n.length;
|
|
138
|
+
n[b] = [h];
|
|
116
139
|
}
|
|
117
|
-
}), this.GuideLine
|
|
140
|
+
}), !this.GuideLine && ((m = this.config) == null ? void 0 : m.useGuideLine) !== !1 && (this.GuideLine = Q(this.five, this.config)), (P = this.GuideLine) == null || P.load({ routes: n.map((h) => ({ panoIndexList: h })), config: o.guildPluginOptions }), this.setState({ playing: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing), this.changeSpeed(this.state.speed), t && this.setState(t, { userAction: i }), console.info(`${x} loaded`, o), this.hooks.emit("dataLoaded", o);
|
|
118
141
|
});
|
|
119
142
|
}
|
|
120
143
|
play(e) {
|
|
121
144
|
this.setState({ playing: !0 }, e);
|
|
122
145
|
}
|
|
123
146
|
playFrom(e) {
|
|
124
|
-
const { index: t, id: i, userAction:
|
|
125
|
-
this.state.playing && this.setState({ playing: !1 }, { userAction:
|
|
147
|
+
const { index: t, id: i, userAction: r } = e;
|
|
148
|
+
this.state.playing && this.setState({ playing: !1 }, { userAction: r }), this.setState({ playing: !0 }, { userAction: r, playFromIndex: t, playFromId: i });
|
|
126
149
|
}
|
|
127
150
|
playFromStart(e) {
|
|
128
|
-
return this.playFrom(
|
|
151
|
+
return this.playFrom(E(g({}, e), { index: 0 }));
|
|
129
152
|
}
|
|
130
153
|
pause(e) {
|
|
131
154
|
this.setState({ playing: !1 }, e);
|
|
132
155
|
}
|
|
133
156
|
show(e) {
|
|
134
|
-
return
|
|
157
|
+
return v(this, null, function* () {
|
|
135
158
|
this.setState({ visible: !0 }, e);
|
|
136
159
|
});
|
|
137
160
|
}
|
|
138
161
|
hide(e) {
|
|
139
|
-
return
|
|
162
|
+
return v(this, null, function* () {
|
|
140
163
|
this.setState({ visible: !1 }, e);
|
|
141
164
|
});
|
|
142
165
|
}
|
|
@@ -150,53 +173,53 @@ class z extends V {
|
|
|
150
173
|
this.setState({ disposed: !0 });
|
|
151
174
|
}
|
|
152
175
|
setState(e, t) {
|
|
153
|
-
var
|
|
176
|
+
var r;
|
|
154
177
|
if (this.state.disposed)
|
|
155
|
-
return
|
|
178
|
+
return D();
|
|
156
179
|
if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
|
|
157
180
|
return q();
|
|
158
|
-
const i =
|
|
159
|
-
this.state =
|
|
181
|
+
const i = g({}, this.state);
|
|
182
|
+
this.state = g(g({}, this.state), e), e.disposed !== void 0 && e.disposed !== i.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== i.visible && this.handleVisible(e.visible, t == null ? void 0 : t.userAction), e.enabled !== void 0 && e.enabled !== i.enabled && this.handleEnable(e.enabled, t == null ? void 0 : t.userAction), e.playing !== void 0 && e.playing !== i.playing && this.changePlayState(e.playing, t), e.speed !== void 0 && e.speed !== i.speed && this.changeSpeed(e.speed, t == null ? void 0 : t.userAction), R(i, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: (r = t == null ? void 0 : t.userAction) != null ? r : !0 });
|
|
160
183
|
}
|
|
161
184
|
formatData(e) {
|
|
162
|
-
return
|
|
185
|
+
return v(this, null, function* () {
|
|
163
186
|
this.five.work || (yield this.waitFiveLoaded());
|
|
164
187
|
const t = this.five.work.observers, i = (() => {
|
|
165
|
-
const
|
|
166
|
-
return typeof
|
|
188
|
+
const r = e;
|
|
189
|
+
return typeof r == "object" && r !== null && r.version && r.data ? r.data : r;
|
|
167
190
|
})();
|
|
168
191
|
if (i.keyframes)
|
|
169
192
|
return {
|
|
170
|
-
keyframesId:
|
|
171
|
-
keyframes: i.keyframes.map((
|
|
172
|
-
var
|
|
173
|
-
const n = i.keyframes[o + 1], f = (() => !n || n.start === void 0 ||
|
|
174
|
-
return
|
|
193
|
+
keyframesId: w(),
|
|
194
|
+
keyframes: i.keyframes.map((r, o) => {
|
|
195
|
+
var a;
|
|
196
|
+
const n = i.keyframes[o + 1], f = (() => !n || n.start === void 0 || r.end === void 0 ? 0 : n.start - r.end)();
|
|
197
|
+
return E(g({ id: (a = r.uuid) != null ? a : w(), moveIndex: o, stay: f, index: o }, r), { guildPluginOptions: i.guildPluginOptions });
|
|
175
198
|
})
|
|
176
199
|
};
|
|
177
200
|
if (i.panoIndexList) {
|
|
178
|
-
let
|
|
201
|
+
let r = [];
|
|
179
202
|
const { moveEffect: o, moveToFirstPanoEffect: n, moveToFirstPanoDuration: f } = i;
|
|
180
|
-
return this.privateState.moveToFirstPanoEffect = n, this.privateState.moveToFirstPanoDuration = f, i.panoIndexList.forEach((
|
|
203
|
+
return this.privateState.moveToFirstPanoEffect = n, this.privateState.moveToFirstPanoDuration = f, i.panoIndexList.forEach((a, s) => {
|
|
181
204
|
const d = (() => {
|
|
182
|
-
var
|
|
183
|
-
const
|
|
184
|
-
if (
|
|
205
|
+
var h, y, S, k;
|
|
206
|
+
const l = i.panoIndexList.slice(s).find((b) => b !== a);
|
|
207
|
+
if (l === void 0)
|
|
185
208
|
return;
|
|
186
|
-
const
|
|
187
|
-
if (!
|
|
209
|
+
const c = (h = t[a]) == null ? void 0 : h.position, m = (y = t[l]) == null ? void 0 : y.position;
|
|
210
|
+
if (!m || !c || ((S = t[a]) == null ? void 0 : S.floorIndex) !== ((k = t[l]) == null ? void 0 : k.floorIndex))
|
|
188
211
|
return;
|
|
189
|
-
const
|
|
190
|
-
return N(
|
|
212
|
+
const P = new j.Vector3().subVectors(m, c);
|
|
213
|
+
return N(P.normalize());
|
|
191
214
|
})();
|
|
192
|
-
i.moveType === void 0 || i.moveType === "justMove" ?
|
|
215
|
+
i.moveType === void 0 || i.moveType === "justMove" ? r.push({
|
|
193
216
|
moveIndex: s,
|
|
194
217
|
stay: i.stay,
|
|
195
|
-
data:
|
|
196
|
-
}) : i.moveType === "moveAndRotate" && (
|
|
218
|
+
data: g({ effect: "Move", panoIndex: a, moveEffect: o }, d != null ? d : {})
|
|
219
|
+
}) : i.moveType === "moveAndRotate" && (r.push({ moveIndex: s, stay: i.stay, data: { effect: "Move", panoIndex: a, moveEffect: o } }), d && r.push({ moveIndex: s, stay: i.stay, data: g({ effect: "Rotate", panoIndex: a }, d) }));
|
|
197
220
|
}), {
|
|
198
|
-
keyframesId:
|
|
199
|
-
keyframes:
|
|
221
|
+
keyframesId: w(),
|
|
222
|
+
keyframes: r.map((a, s) => g({ id: w(), index: s }, a)),
|
|
200
223
|
guildPluginOptions: i.guildPluginOptions
|
|
201
224
|
};
|
|
202
225
|
} else
|
|
@@ -204,12 +227,12 @@ class z extends V {
|
|
|
204
227
|
});
|
|
205
228
|
}
|
|
206
229
|
handleEnable(e, t = !0) {
|
|
207
|
-
var i,
|
|
208
|
-
e ? ((i = this.GuideLine) == null || i.enable(), this.hooks.emit("enable", { userAction: t })) : ((
|
|
230
|
+
var i, r;
|
|
231
|
+
e ? ((i = this.GuideLine) == null || i.enable(), this.hooks.emit("enable", { userAction: t })) : ((r = this.GuideLine) == null || r.disable(), this.changePlayState(!1, { userAction: t }), this.hooks.emit("disable", { userAction: t })), this.state.enabled = e;
|
|
209
232
|
}
|
|
210
233
|
handleVisible(e, t = !0) {
|
|
211
|
-
var i,
|
|
212
|
-
e ? ((i = this.GuideLine) == null || i.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: t }))) : ((
|
|
234
|
+
var i, r;
|
|
235
|
+
e ? ((i = this.GuideLine) == null || i.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: t }))) : ((r = this.GuideLine) == null || r.hide(), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: t }))), this.state.visible = e;
|
|
213
236
|
}
|
|
214
237
|
changePlayState(e, t) {
|
|
215
238
|
this.actionIfStateIsEnabled(
|
|
@@ -220,64 +243,64 @@ class z extends V {
|
|
|
220
243
|
), e ? this.handlePlay(t) : this.handlePause(t), this.state.playing = e;
|
|
221
244
|
}
|
|
222
245
|
handlePlay(e) {
|
|
223
|
-
return
|
|
224
|
-
var
|
|
225
|
-
const { data: t, state: i, privateState:
|
|
226
|
-
if (
|
|
246
|
+
return v(this, null, function* () {
|
|
247
|
+
var c;
|
|
248
|
+
const { data: t, state: i, privateState: r, hooks: o } = this;
|
|
249
|
+
if (r.playing || !(t != null && t.keyframes) || (t == null ? void 0 : t.keyframes.length) === 0)
|
|
227
250
|
return;
|
|
228
|
-
const n =
|
|
229
|
-
|
|
230
|
-
const f = t.keyframes,
|
|
231
|
-
(e == null ? void 0 : e.notEmitEvent) !== !0 && o.emit("play", { userAction: (
|
|
251
|
+
const n = w();
|
|
252
|
+
r.playId = n, r.playing = !0, r.broke = !1;
|
|
253
|
+
const f = t.keyframes, a = this.getPauseData();
|
|
254
|
+
(e == null ? void 0 : e.notEmitEvent) !== !0 && o.emit("play", { userAction: (c = e == null ? void 0 : e.userAction) != null ? c : !0 });
|
|
232
255
|
let s = !1;
|
|
233
|
-
const
|
|
234
|
-
var
|
|
256
|
+
const l = yield (() => v(this, null, function* () {
|
|
257
|
+
var m, P;
|
|
235
258
|
if ((e == null ? void 0 : e.playFromIndex) !== void 0)
|
|
236
259
|
return e.playFromIndex;
|
|
237
260
|
if ((e == null ? void 0 : e.playFromId) !== void 0)
|
|
238
|
-
return (
|
|
239
|
-
if (
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
242
|
-
moveEffect:
|
|
243
|
-
duration:
|
|
244
|
-
})),
|
|
245
|
-
if (
|
|
246
|
-
return
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
249
|
-
return yield this.playKeyframe(
|
|
261
|
+
return (m = this.data) == null ? void 0 : m.keyframes.findIndex((h) => h.id === e.playFromId);
|
|
262
|
+
if (a != null && a.keyframeId) {
|
|
263
|
+
const h = (P = this.data) == null ? void 0 : P.keyframes.find((y) => y.id === a.keyframeId);
|
|
264
|
+
if (a != null && a.fiveState && (yield this.move(a.fiveState, {
|
|
265
|
+
moveEffect: r.moveToFirstPanoEffect,
|
|
266
|
+
duration: r.moveToFirstPanoDuration
|
|
267
|
+
})), h) {
|
|
268
|
+
if (h.data.effect === "Move")
|
|
269
|
+
return h.index;
|
|
270
|
+
if (h.data.effect === "Rotate") {
|
|
271
|
+
const y = a.duration !== void 0 ? a.duration * (1 - a.playedProgress) : void 0;
|
|
272
|
+
return yield this.playKeyframe(h, { duration: y }), s = !0, h.index + 1;
|
|
250
273
|
}
|
|
251
274
|
}
|
|
252
275
|
}
|
|
253
276
|
}))();
|
|
254
277
|
this.clearPauseData();
|
|
255
|
-
for (const
|
|
256
|
-
if (
|
|
278
|
+
for (const m of f) {
|
|
279
|
+
if (r.broke || !i.playing || !r.playing || n !== r.playId)
|
|
257
280
|
return;
|
|
258
|
-
if (!(
|
|
281
|
+
if (!(l !== void 0 && m.index < l))
|
|
259
282
|
try {
|
|
260
|
-
o.emit("playIndexChange",
|
|
261
|
-
moveEffect: s === !1 ?
|
|
262
|
-
duration: s === !1 && typeof
|
|
263
|
-
}),
|
|
264
|
-
} catch (
|
|
283
|
+
o.emit("playIndexChange", m.index, m), yield this.playKeyframe(m, {
|
|
284
|
+
moveEffect: s === !1 ? r.moveToFirstPanoEffect : void 0,
|
|
285
|
+
duration: s === !1 && typeof r.moveToFirstPanoDuration == "number" ? r.moveToFirstPanoDuration : void 0
|
|
286
|
+
}), m.stay && (yield J(m.stay)), s === !1 && (s = !0);
|
|
287
|
+
} catch (P) {
|
|
265
288
|
return Promise.resolve("broke");
|
|
266
289
|
}
|
|
267
290
|
}
|
|
268
|
-
i.playing && n ===
|
|
291
|
+
i.playing && n === r.playId && (this.setState({ playing: !1 }, { userAction: !1 }), o.emit("end"), this.clearPauseData());
|
|
269
292
|
});
|
|
270
293
|
}
|
|
271
294
|
handlePause(e) {
|
|
272
295
|
var o;
|
|
273
|
-
const { state: t, privateState: i, hooks:
|
|
274
|
-
t.playing = !1, i.playing !== !1 && (i.playing = !1, this.setPauseData(), i.broke || this.forceInteruptUpdateCamera(), (e == null ? void 0 : e.notEmitEvent) !== !0 &&
|
|
296
|
+
const { state: t, privateState: i, hooks: r } = this;
|
|
297
|
+
t.playing = !1, i.playing !== !1 && (i.playing = !1, this.setPauseData(), i.broke || this.forceInteruptUpdateCamera(), (e == null ? void 0 : e.notEmitEvent) !== !0 && r.emit("pause", { userAction: (o = e == null ? void 0 : e.userAction) != null ? o : !0 }));
|
|
275
298
|
}
|
|
276
299
|
playKeyframe(e, t) {
|
|
277
|
-
return
|
|
278
|
-
var
|
|
300
|
+
return v(this, null, function* () {
|
|
301
|
+
var r;
|
|
279
302
|
const { privateState: i } = this;
|
|
280
|
-
return ((
|
|
303
|
+
return ((r = this.privateState.currentPlayKeyframe) == null ? void 0 : r.keyframe.id) !== e.id && (this.privateState.currentPlayKeyframe = { keyframe: e }), i.currentPlayQueue.push(this.getPlayPromise(e, t)), this.actionPromiseQueue();
|
|
281
304
|
});
|
|
282
305
|
}
|
|
283
306
|
addInterruptListener(e) {
|
|
@@ -289,31 +312,31 @@ class z extends V {
|
|
|
289
312
|
};
|
|
290
313
|
}
|
|
291
314
|
getPlayPromise(i) {
|
|
292
|
-
return
|
|
315
|
+
return v(this, arguments, function* (e, t = {}) {
|
|
293
316
|
var o;
|
|
294
|
-
const
|
|
295
|
-
if (t.duration = (o = t.duration) != null ? o : e.start !== void 0 && e.end !== void 0 ? e.end - e.start : void 0, !!
|
|
317
|
+
const r = e.data;
|
|
318
|
+
if (t.duration = (o = t.duration) != null ? o : e.start !== void 0 && e.end !== void 0 ? e.end - e.start : void 0, !!r)
|
|
296
319
|
return new Promise((n, f) => {
|
|
297
|
-
let
|
|
320
|
+
let a = !1;
|
|
298
321
|
this.addInterruptListener(() => {
|
|
299
|
-
if (!
|
|
300
|
-
return this.hooks.emit("broke"), this.privateState.broke = !0, this.setState({ playing: !1 }),
|
|
322
|
+
if (!a)
|
|
323
|
+
return this.hooks.emit("broke"), this.privateState.broke = !0, this.setState({ playing: !1 }), a = !0, f(new Error("play is interupted"));
|
|
301
324
|
});
|
|
302
325
|
try {
|
|
303
|
-
if (
|
|
326
|
+
if (a)
|
|
304
327
|
return;
|
|
305
328
|
const s = () => {
|
|
306
|
-
n(),
|
|
329
|
+
n(), a = !0;
|
|
307
330
|
};
|
|
308
|
-
switch (
|
|
331
|
+
switch (r.effect) {
|
|
309
332
|
case "Move":
|
|
310
|
-
this.move(
|
|
333
|
+
this.move(r, t).then(s);
|
|
311
334
|
break;
|
|
312
335
|
case "Rotate":
|
|
313
|
-
this.rotate(
|
|
336
|
+
this.rotate(r, t).then(s);
|
|
314
337
|
break;
|
|
315
338
|
default:
|
|
316
|
-
this.rotate(
|
|
339
|
+
this.rotate(r, t).then(s);
|
|
317
340
|
}
|
|
318
341
|
} catch (s) {
|
|
319
342
|
}
|
|
@@ -321,24 +344,24 @@ class z extends V {
|
|
|
321
344
|
});
|
|
322
345
|
}
|
|
323
346
|
actionPromiseQueue() {
|
|
324
|
-
return
|
|
347
|
+
return v(this, null, function* () {
|
|
325
348
|
const { privateState: e } = this;
|
|
326
349
|
return new Promise((t, i) => {
|
|
327
350
|
if (e.currentPlayQueue.length === 0) {
|
|
328
351
|
t();
|
|
329
352
|
return;
|
|
330
353
|
}
|
|
331
|
-
const
|
|
332
|
-
if (!
|
|
354
|
+
const r = e.currentPlayQueue.shift();
|
|
355
|
+
if (!r) {
|
|
333
356
|
t();
|
|
334
357
|
return;
|
|
335
358
|
}
|
|
336
|
-
|
|
359
|
+
r.then(t, i);
|
|
337
360
|
}).then(() => e.currentPlayQueue.length === 0 ? Promise.resolve() : this.actionPromiseQueue());
|
|
338
361
|
});
|
|
339
362
|
}
|
|
340
363
|
move(e, t) {
|
|
341
|
-
return
|
|
364
|
+
return v(this, null, function* () {
|
|
342
365
|
if (e.mode && e.mode !== this.five.currentMode)
|
|
343
366
|
yield this.changeMode(e);
|
|
344
367
|
else if (e.panoIndex !== this.five.panoIndex)
|
|
@@ -348,7 +371,7 @@ class z extends V {
|
|
|
348
371
|
});
|
|
349
372
|
}
|
|
350
373
|
rotate(e, t) {
|
|
351
|
-
return
|
|
374
|
+
return v(this, null, function* () {
|
|
352
375
|
if (e.mode && e.mode !== this.five.currentMode)
|
|
353
376
|
yield this.changeMode({ mode: e.mode, panoIndex: e.panoIndex });
|
|
354
377
|
else if (e.panoIndex && e.panoIndex !== this.five.panoIndex)
|
|
@@ -357,15 +380,15 @@ class z extends V {
|
|
|
357
380
|
});
|
|
358
381
|
}
|
|
359
382
|
updateCamera(i) {
|
|
360
|
-
return
|
|
361
|
-
const { five:
|
|
362
|
-
var
|
|
363
|
-
const d = (
|
|
383
|
+
return v(this, arguments, function* (e, t = {}) {
|
|
384
|
+
const { five: r, privateState: o, state: n } = this, f = (() => {
|
|
385
|
+
var c, m;
|
|
386
|
+
const d = (c = n.config) == null ? void 0 : c.speedConfig, l = (m = e.rotateSpeed) != null ? m : d == null ? void 0 : d.rotateSpeed;
|
|
364
387
|
if ((d == null ? void 0 : d.rotateSpeedUnit) === void 0)
|
|
365
|
-
return
|
|
366
|
-
if (
|
|
367
|
-
return d.rotateSpeedUnit === "rad/ms" ?
|
|
368
|
-
})(),
|
|
388
|
+
return l;
|
|
389
|
+
if (l !== void 0)
|
|
390
|
+
return d.rotateSpeedUnit === "rad/ms" ? l : l / 1e3;
|
|
391
|
+
})(), a = (() => {
|
|
369
392
|
if (t.duration)
|
|
370
393
|
return t.duration;
|
|
371
394
|
if (f) {
|
|
@@ -374,28 +397,28 @@ class z extends V {
|
|
|
374
397
|
}
|
|
375
398
|
return 800;
|
|
376
399
|
})();
|
|
377
|
-
o.currentPlayKeyframe && (o.currentPlayKeyframe.originDuration =
|
|
378
|
-
const s = this.getSpeededDuration(
|
|
400
|
+
o.currentPlayKeyframe && (o.currentPlayKeyframe.originDuration = a);
|
|
401
|
+
const s = this.getSpeededDuration(a);
|
|
379
402
|
return new Promise((d) => {
|
|
380
|
-
_(() =>
|
|
403
|
+
_(() => r.updateCamera(e, s)), setTimeout(() => d(), s);
|
|
381
404
|
});
|
|
382
405
|
});
|
|
383
406
|
}
|
|
384
407
|
changePano(e, t) {
|
|
385
|
-
return
|
|
386
|
-
const { five: i, privateState:
|
|
408
|
+
return v(this, null, function* () {
|
|
409
|
+
const { five: i, privateState: r, state: o } = this;
|
|
387
410
|
if (typeof e.panoIndex != "number" || e.panoIndex === i.panoIndex)
|
|
388
411
|
return;
|
|
389
412
|
const n = i.getCurrentState().mode !== "Panorama";
|
|
390
413
|
n && (this.privateState.modeChanging = !0);
|
|
391
414
|
const f = (() => {
|
|
392
|
-
var
|
|
393
|
-
const s = (
|
|
415
|
+
var l, c;
|
|
416
|
+
const s = (l = o.config) == null ? void 0 : l.speedConfig, d = (c = e.moveSpeed) != null ? c : s == null ? void 0 : s.moveSpeed;
|
|
394
417
|
if ((s == null ? void 0 : s.moveSpeedUnit) === void 0)
|
|
395
418
|
return d;
|
|
396
419
|
if (d !== void 0)
|
|
397
420
|
return s.moveSpeedUnit === "m/ms" ? d : d / 1e3;
|
|
398
|
-
})(),
|
|
421
|
+
})(), a = (() => {
|
|
399
422
|
if (t != null && t.duration)
|
|
400
423
|
return t.duration;
|
|
401
424
|
if (f && typeof i.panoIndex == "number" && typeof e.panoIndex == "number") {
|
|
@@ -404,14 +427,14 @@ class z extends V {
|
|
|
404
427
|
}
|
|
405
428
|
return 800;
|
|
406
429
|
})();
|
|
407
|
-
|
|
408
|
-
var d,
|
|
430
|
+
r.currentPlayKeyframe && (r.currentPlayKeyframe.originDuration = a), yield new Promise((s) => {
|
|
431
|
+
var d, l, c;
|
|
409
432
|
i.moveToPano(e.panoIndex, {
|
|
410
433
|
latitude: e.latitude,
|
|
411
434
|
longitude: e.longitude,
|
|
412
435
|
fov: e.fov,
|
|
413
|
-
duration: this.getSpeededDuration(
|
|
414
|
-
effect: (
|
|
436
|
+
duration: this.getSpeededDuration(a),
|
|
437
|
+
effect: (c = (l = t == null ? void 0 : t.moveEffect) != null ? l : (d = this.state.config) == null ? void 0 : d.moveEffect) != null ? c : e.moveEffect,
|
|
415
438
|
moveCancelCallback: () => s(),
|
|
416
439
|
moveEndCallback: () => s()
|
|
417
440
|
}), n && i.once("panoArrived", () => s());
|
|
@@ -419,11 +442,11 @@ class z extends V {
|
|
|
419
442
|
});
|
|
420
443
|
}
|
|
421
444
|
changeSpeed(e, t = !0) {
|
|
422
|
-
const { state: i, privateState:
|
|
445
|
+
const { state: i, privateState: r, hooks: o } = this, { currentPlayKeyframe: n } = r;
|
|
423
446
|
if (o.emit("speedChange", e, { userAction: t }), i.playing && n)
|
|
424
447
|
try {
|
|
425
|
-
const f = n.originDuration !== void 0 ? n.originDuration * (1 - this.getProgress()) : void 0,
|
|
426
|
-
|
|
448
|
+
const f = n.originDuration !== void 0 ? n.originDuration * (1 - this.getProgress()) : void 0, a = this.playKeyframe(n.keyframe, { duration: f });
|
|
449
|
+
r.currentPlayQueue.push(a);
|
|
427
450
|
} catch (f) {
|
|
428
451
|
}
|
|
429
452
|
}
|
|
@@ -434,7 +457,7 @@ class z extends V {
|
|
|
434
457
|
return this.five.controller.cameraMotion.progress;
|
|
435
458
|
}
|
|
436
459
|
changeMode(e, t) {
|
|
437
|
-
return
|
|
460
|
+
return v(this, null, function* () {
|
|
438
461
|
e.mode && e.mode !== this.five.currentMode && (this.privateState.modeChanging = !0, yield this.five.changeMode(e.mode, e, t), this.privateState.modeChanging = !1);
|
|
439
462
|
});
|
|
440
463
|
}
|
|
@@ -444,22 +467,22 @@ class z extends V {
|
|
|
444
467
|
getPauseData() {
|
|
445
468
|
var e, t;
|
|
446
469
|
if ((e = this.data) != null && e.keyframesId)
|
|
447
|
-
return
|
|
470
|
+
return F.get((t = this.data) == null ? void 0 : t.keyframesId);
|
|
448
471
|
}
|
|
449
472
|
setPauseData() {
|
|
450
|
-
var e, t, i,
|
|
473
|
+
var e, t, i, r;
|
|
451
474
|
if ((e = this.data) != null && e.keyframesId)
|
|
452
|
-
return
|
|
475
|
+
return F.set((t = this.data) == null ? void 0 : t.keyframesId, {
|
|
453
476
|
keyframeId: (i = this.privateState.currentPlayKeyframe) == null ? void 0 : i.keyframe.id,
|
|
454
477
|
fiveState: this.five.getCurrentState(),
|
|
455
|
-
duration: (
|
|
478
|
+
duration: (r = this.privateState.currentPlayKeyframe) == null ? void 0 : r.originDuration,
|
|
456
479
|
playedProgress: this.getProgress()
|
|
457
480
|
});
|
|
458
481
|
}
|
|
459
482
|
clearPauseData() {
|
|
460
483
|
var e, t;
|
|
461
484
|
if ((e = this.data) != null && e.keyframesId)
|
|
462
|
-
return
|
|
485
|
+
return F.delete((t = this.data) == null ? void 0 : t.keyframesId);
|
|
463
486
|
}
|
|
464
487
|
clear() {
|
|
465
488
|
this.clearPauseData(), this.privateState.currentPlayKeyframe = null;
|
|
@@ -474,7 +497,7 @@ class z extends V {
|
|
|
474
497
|
t != null && t.warnLog && W();
|
|
475
498
|
}
|
|
476
499
|
waitFiveLoaded() {
|
|
477
|
-
return
|
|
500
|
+
return v(this, null, function* () {
|
|
478
501
|
return new Promise((e) => {
|
|
479
502
|
if (this.five.work) {
|
|
480
503
|
e();
|
|
@@ -496,8 +519,8 @@ class z extends V {
|
|
|
496
519
|
!this.privateState.fiveOriginGetProgress || (this.five.controller.cameraMotion.getProgress = this.privateState.fiveOriginGetProgress);
|
|
497
520
|
}
|
|
498
521
|
}
|
|
499
|
-
I(z, "PluginVersion",
|
|
522
|
+
I(z, "PluginVersion", M);
|
|
500
523
|
export {
|
|
501
524
|
z as default,
|
|
502
|
-
|
|
525
|
+
Qe as pluginFlag
|
|
503
526
|
};
|