@realsee/dnalogel 3.6.0-dev.0 → 3.6.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/AreaMakerPlugin/Controller.d.ts +2 -0
- package/dist/AreaMakerPlugin/typing.d.ts +1 -0
- package/dist/AreaMakerPlugin/utils/Item.d.ts +4 -0
- package/dist/CruisePlugin/Controller.d.ts +171 -0
- package/dist/CruisePlugin/index.d.ts +3 -4
- package/dist/CruisePlugin/typing.d.ts +2 -2
- package/dist/CruisePlugin/utils/linerValue.d.ts +1 -0
- package/dist/GuideLinePlugin/Controller.d.ts +6 -1
- package/dist/index.cjs.js +54 -54
- package/dist/index.js +4104 -4142
- package/dist/index.umd.js +58 -58
- package/libs/AreaMakerPlugin/Controller.d.ts +2 -0
- package/libs/AreaMakerPlugin/Controller.js +32 -30
- package/libs/AreaMakerPlugin/typing.d.ts +1 -0
- package/libs/AreaMakerPlugin/utils/Item.d.ts +4 -0
- package/libs/AreaMakerPlugin/utils/Item.js +59 -53
- package/libs/CruisePlugin/Controller.d.ts +171 -0
- package/libs/CruisePlugin/Controller.js +760 -0
- package/libs/CruisePlugin/index.d.ts +3 -4
- package/libs/CruisePlugin/index.js +12 -17
- package/libs/CruisePlugin/typing.d.ts +2 -2
- package/libs/GuideLinePlugin/Controller.d.ts +6 -1
- package/libs/GuideLinePlugin/Controller.js +62 -48
- package/libs/GuideLinePlugin/GuideLineItem/index.js +43 -53
- package/libs/GuideLinePlugin/GuideLineItem.js +10 -13
- package/libs/GuideLinePlugin/index.js +17 -20
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/components/AreaLabel/LabelItem.js +111 -68
- package/libs/index.js +119 -124
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +2 -2
- package/dist/CruisePlugin/BaseController.d.ts +0 -159
- package/dist/CruisePlugin/Move.d.ts +0 -40
- package/dist/CruisePlugin/Work.d.ts +0 -120
- package/dist/CruisePlugin/utils/getFiveStateOnCurve.d.ts +0 -11
- package/dist/shared-utils/five/fiveLoaded.d.ts +0 -2
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -120
- package/docs/assets/main.js +0 -58
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1367
- package/docs/classes/AreaMakerPluginType.AreaMakerController.html +0 -728
- package/docs/classes/AreaMakerPluginType.AreaMakerItem.html +0 -681
- package/docs/classes/CSS3DRender.html +0 -776
- package/docs/classes/GuideLineItem.GuideLineItem.html +0 -479
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +0 -859
- package/docs/classes/Magnifier.html +0 -483
- package/docs/classes/ModelRoomLabelController.html +0 -401
- package/docs/classes/MoveController.html +0 -652
- package/docs/classes/Object3DHelperController.html +0 -643
- package/docs/classes/PaintBrush.html +0 -505
- package/docs/classes/PanoMeasurePluginLine.html +0 -525
- package/docs/classes/PanoMeasurePluginModel.html +0 -574
- package/docs/classes/PanoMeasurePluginPoint.html +0 -365
- package/docs/classes/PanoMeasurePluginPolyline.html +0 -570
- package/docs/classes/PanoTagPluginController.html +0 -1114
- package/docs/classes/Util.BetterTween.html +0 -419
- package/docs/classes/Util.Interval.html +0 -435
- package/docs/classes/Util.LineSegments.html +0 -387
- package/docs/classes/Util.Magnifier.html +0 -506
- package/docs/classes/Util.Object3D.html +0 -409
- package/docs/classes/Util.PointDomHelper.html +0 -410
- package/docs/classes/Util.PointHelper.html +0 -401
- package/docs/classes/Util.PointSelectorHelper.html +0 -457
- package/docs/classes/Util.Rectangle.html +0 -458
- package/docs/classes/WalkController.html +0 -671
- package/docs/enums/CameraMovementEffect.html +0 -313
- package/docs/enums/ContentType.html +0 -459
- package/docs/enums/DIRECTION.html +0 -323
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +0 -323
- package/docs/enums/DimensionType.html +0 -313
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +0 -316
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +0 -323
- package/docs/enums/PaintBrushTypeEnum.html +0 -316
- package/docs/enums/PointType.html +0 -313
- package/docs/enums/Rotation.html +0 -320
- package/docs/functions/AreaMakerPlugin.html +0 -293
- package/docs/functions/CSS3DRenderPlugin.html +0 -291
- package/docs/functions/CameraMovementPlugin.html +0 -296
- package/docs/functions/CruisePlugin.html +0 -293
- package/docs/functions/CurrentPanoImagePlugin.html +0 -293
- package/docs/functions/GuideLinePlugin.html +0 -293
- package/docs/functions/ItemLabelPlugin.html +0 -293
- package/docs/functions/MapviewFloorplanPlugin.html +0 -293
- package/docs/functions/ModelChassisCompassPlugin.html +0 -296
- package/docs/functions/ModelEntryDoorGuidePlugin.html +0 -296
- package/docs/functions/ModelFloorplanPlugin.html +0 -293
- package/docs/functions/ModelItemLabelPlugin.html +0 -293
- package/docs/functions/ModelRoomLabelPlugin.html +0 -291
- package/docs/functions/ModelTVVideoPlugin.html +0 -293
- package/docs/functions/ModelViewPlugin.html +0 -296
- package/docs/functions/Object3DHelperPlugin.html +0 -291
- package/docs/functions/PanoCompassPlugin.html +0 -293
- package/docs/functions/PanoCursorRaycasterPlugin.html +0 -297
- package/docs/functions/PanoDoorLabelPlugin.html +0 -293
- package/docs/functions/PanoFloorplanRadarPlugin.html +0 -293
- package/docs/functions/PanoMeasurePlugin.html +0 -293
- package/docs/functions/PanoRulerPlugin.html +0 -296
- package/docs/functions/PanoRulerProPlugin.html +0 -296
- package/docs/functions/PanoSpatialTagPlugin.html +0 -296
- package/docs/functions/PanoTagPlugin.html +0 -298
- package/docs/functions/PanoVideoPlugin.html +0 -302
- package/docs/functions/PipelinePlugin.html +0 -291
- package/docs/functions/TopviewFloorplanPlugin.html +0 -293
- package/docs/functions/Util.absoluteUrl.html +0 -329
- package/docs/functions/Util.checkFiveModelLoaded.html +0 -332
- package/docs/functions/Util.equal.html +0 -341
- package/docs/functions/Util.getCoordsFromClient.html +0 -331
- package/docs/functions/Util.getCoordsFromElement.html +0 -331
- package/docs/functions/Util.getFrameTime.html +0 -323
- package/docs/functions/Util.getIntersectFromRelativePosition.html +0 -331
- package/docs/functions/Util.getRaycasterFromFivePointer.html +0 -331
- package/docs/functions/Util.isAbsoluteURL.html +0 -324
- package/docs/functions/Util.isModelLike.html +0 -324
- package/docs/functions/Util.isNil.html +0 -332
- package/docs/functions/Util.isPanoramaLike.html +0 -324
- package/docs/functions/Util.nextFrame.html +0 -337
- package/docs/functions/Util.notNil.html +0 -332
- package/docs/functions/Util.requestAnimationFrameInterval.html +0 -353
- package/docs/functions/Util.tweenProgress.html +0 -326
- package/docs/functions/Util.uuid.html +0 -322
- package/docs/functions/pluginFlag.html +0 -291
- package/docs/index.html +0 -357
- package/docs/interfaces/AddTagConfig.html +0 -306
- package/docs/interfaces/AreaMakerPluginType.AnimeOptions.html +0 -332
- package/docs/interfaces/AreaMakerPluginType.Config.html +0 -337
- package/docs/interfaces/AreaMakerPluginType.EventMap.html +0 -623
- package/docs/interfaces/AreaMakerPluginType.Params.html +0 -336
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItem.html +0 -386
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItemV1.html +0 -371
- package/docs/interfaces/AreaMakerPluginType.ServerDataV1.html +0 -336
- package/docs/interfaces/AreaMakerPluginType.ServerDataV2.html +0 -329
- package/docs/interfaces/AreaMakerPluginType.ShowHideOptions.html +0 -328
- package/docs/interfaces/AreaMakerPluginType.State.html +0 -357
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +0 -452
- package/docs/interfaces/CSS3DRenderPluginState.html +0 -328
- package/docs/interfaces/CameraMovementPluginExportType.html +0 -361
- package/docs/interfaces/CruisePluginTypes.Config.html +0 -362
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +0 -364
- package/docs/interfaces/CruisePluginTypes.EventMap.html +0 -699
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +0 -388
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +0 -424
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +0 -414
- package/docs/interfaces/CruisePluginTypes.PluginData.html +0 -354
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +0 -322
- package/docs/interfaces/CruisePluginTypes.PluginState.html +0 -390
- package/docs/interfaces/CurrentPanoImagePluginType.Config.html +0 -385
- package/docs/interfaces/CurrentPanoImagePluginType.EventMap.html +0 -524
- package/docs/interfaces/CurrentPanoImagePluginType.Params.html +0 -326
- package/docs/interfaces/CurrentPanoImagePluginType.ShowHideOptions.html +0 -318
- package/docs/interfaces/CurrentPanoImagePluginType.State.html +0 -340
- package/docs/interfaces/EventMap.html +0 -545
- package/docs/interfaces/FloorplanBounding.html +0 -335
- package/docs/interfaces/FloorplanData.html +0 -338
- package/docs/interfaces/FloorplanEntrance.html +0 -363
- package/docs/interfaces/FloorplanExtraObject.html +0 -353
- package/docs/interfaces/FloorplanExtraObject3D.html +0 -342
- package/docs/interfaces/FloorplanFloorData.html +0 -331
- package/docs/interfaces/FloorplanImagePosition.html +0 -317
- package/docs/interfaces/FloorplanObserver.html +0 -335
- package/docs/interfaces/FloorplanOutlineItem.html +0 -331
- package/docs/interfaces/FloorplanPosition.html +0 -317
- package/docs/interfaces/FloorplanRoomItem.html +0 -382
- package/docs/interfaces/FloorplanRoomLabelItem.html +0 -323
- package/docs/interfaces/FloorplanServerBounding.html +0 -335
- package/docs/interfaces/FloorplanServerComputedData.html +0 -334
- package/docs/interfaces/FloorplanServerData.html +0 -317
- package/docs/interfaces/FloorplanServerDoorItem.html +0 -334
- package/docs/interfaces/FloorplanServerDoorPosition.html +0 -320
- package/docs/interfaces/FloorplanServerEntrance.html +0 -363
- package/docs/interfaces/FloorplanServerFloorData.html +0 -331
- package/docs/interfaces/FloorplanServerImagePosition.html +0 -317
- package/docs/interfaces/FloorplanServerObserver.html +0 -335
- package/docs/interfaces/FloorplanServerOutlineItem.html +0 -331
- package/docs/interfaces/FloorplanServerPosition.html +0 -317
- package/docs/interfaces/FloorplanServerRoomItem.html +0 -394
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +0 -323
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +0 -326
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +0 -365
- package/docs/interfaces/GuideLinePluginType.EventMap.html +0 -529
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +0 -360
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +0 -351
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +0 -418
- package/docs/interfaces/GuideLinePluginType.GuideLineMeshStyle.html +0 -340
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +0 -350
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +0 -486
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +0 -347
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +0 -486
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +0 -312
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +0 -333
- package/docs/interfaces/GuideLinePluginType.PluginState.html +0 -358
- package/docs/interfaces/GuideLinePluginType.Route.html +0 -374
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +0 -356
- package/docs/interfaces/HelperOffset.html +0 -335
- package/docs/interfaces/ImagePlaneGroup.html +0 -309
- package/docs/interfaces/ItemLabelPluginData.html +0 -306
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +0 -391
- package/docs/interfaces/ItemLabelPluginParametersType.html +0 -327
- package/docs/interfaces/MinMax.html +0 -313
- package/docs/interfaces/ModelChassisCompassPluginData.html +0 -313
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +0 -349
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +0 -313
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +0 -320
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +0 -357
- package/docs/interfaces/ModelItemLabelPluginData.html +0 -306
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +0 -391
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +0 -313
- package/docs/interfaces/ModelRoomLabelPluginData.html +0 -306
- package/docs/interfaces/ModelTVVideoPluginData.html +0 -327
- package/docs/interfaces/ModelTVVideoPluginExportType.html +0 -351
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +0 -306
- package/docs/interfaces/ModelViewPluginExportType.html +0 -419
- package/docs/interfaces/Object3DHelperState.html +0 -320
- package/docs/interfaces/ObjectHelperControllers.html +0 -327
- package/docs/interfaces/PaintBrushAction.html +0 -366
- package/docs/interfaces/PaintBrushConfigs.html +0 -364
- package/docs/interfaces/PaintBrushState.html +0 -348
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +0 -428
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +0 -285
- package/docs/interfaces/PanoMeasureParameterType.html +0 -452
- package/docs/interfaces/PanoMeasurePluginLineJson.html +0 -320
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +0 -317
- package/docs/interfaces/PanoMeasurePluginPointJson.html +0 -313
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +0 -323
- package/docs/interfaces/PanoRulerPluginExportType.html +0 -380
- package/docs/interfaces/PanoRulerPluginOptions.html +0 -329
- package/docs/interfaces/PanoRulerPluginParameterType.html +0 -320
- package/docs/interfaces/PanoRulerProPluginExportType.html +0 -356
- package/docs/interfaces/PanoRulerProPluginOptions.html +0 -326
- package/docs/interfaces/PanoRulerProPluginParameterType.html +0 -313
- package/docs/interfaces/PanoRulerProPluginState.html +0 -320
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +0 -299
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +0 -288
- package/docs/interfaces/PanoSpatialTagPluginData.html +0 -356
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +0 -338
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +0 -434
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +0 -334
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +0 -355
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +0 -341
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +0 -334
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +0 -326
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +0 -344
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +0 -317
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +0 -423
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +0 -317
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +0 -352
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +0 -371
- package/docs/interfaces/Point.html +0 -320
- package/docs/interfaces/Room.html +0 -327
- package/docs/interfaces/RoomInfo.html +0 -313
- package/docs/interfaces/RoomLabel.html +0 -389
- package/docs/interfaces/RoomRules.html +0 -288
- package/docs/interfaces/Rooms.html +0 -288
- package/docs/interfaces/Scissor.html +0 -347
- package/docs/interfaces/State.html +0 -334
- package/docs/interfaces/TagCacheInterface.html +0 -365
- package/docs/interfaces/TagConfig.html +0 -568
- package/docs/interfaces/TagGLTFObjectGroup.html +0 -309
- package/docs/interfaces/TagIconUrl.html +0 -366
- package/docs/interfaces/TagObjectGroup.html +0 -309
- package/docs/interfaces/TagStyle.html +0 -319
- package/docs/interfaces/Tags.html +0 -2823
- package/docs/interfaces/TemporaryState.html +0 -306
- package/docs/interfaces/Util.MagnifierParameter.html +0 -394
- package/docs/interfaces/Util.MouseGroupParameter.html +0 -353
- package/docs/interfaces/Util.PointIntersection.html +0 -368
- package/docs/modules/AreaMakerPluginType.html +0 -326
- package/docs/modules/CruisePluginTypes.html +0 -331
- package/docs/modules/CurrentPanoImagePluginType.html +0 -300
- package/docs/modules/GuideLineItem.html +0 -292
- package/docs/modules/GuideLineModeItem.html +0 -297
- package/docs/modules/GuideLinePluginType.html +0 -353
- package/docs/modules/PanoVideoPluginType.html +0 -304
- package/docs/modules/Util.html +0 -354
- package/docs/modules.html +0 -560
- package/docs/types/AreaMakerPluginType.AreaMakerItemEventMap.html +0 -334
- package/docs/types/AreaMakerPluginType.PluginData.html +0 -304
- package/docs/types/AreaMakerPluginType.ServerData.html +0 -304
- package/docs/types/ArrayPosition.html +0 -282
- package/docs/types/AudioAppearance.html +0 -282
- package/docs/types/AudioTagTypeConfigKey.html +0 -282
- package/docs/types/CSS3DRenderExportType.html +0 -282
- package/docs/types/CSS3DRenderPluginExportType.html +0 -282
- package/docs/types/CSS3DRenderPluginParameterType.html +0 -282
- package/docs/types/ClassFunctionParameters.html +0 -289
- package/docs/types/Color.html +0 -282
- package/docs/types/ContentTypeConfigKey.html +0 -282
- package/docs/types/ContentTypeConfigKeySplit.html +0 -282
- package/docs/types/ContentTypeMap.html +0 -282
- package/docs/types/Create3DDomContainerReturnType.html +0 -282
- package/docs/types/Create3DElementReturnType.html +0 -282
- package/docs/types/CruisePluginExportType.html +0 -282
- package/docs/types/CruisePluginTypes.CruiseData.html +0 -321
- package/docs/types/CruisePluginTypes.MoveEffect.html +0 -298
- package/docs/types/CurrentPanoImagePluginExportType.html +0 -282
- package/docs/types/DeprecatedMediaPlaneProperty.html +0 -294
- package/docs/types/DeprecatedTagProperty.html +0 -297
- package/docs/types/Direction-1.html +0 -282
- package/docs/types/Direction4.html +0 -282
- package/docs/types/ElementRenderer.html +0 -306
- package/docs/types/FloorplanRuleLabels.html +0 -285
- package/docs/types/FloorplanServerRuleLabels.html +0 -282
- package/docs/types/GuideLinePluginExportType.html +0 -282
- package/docs/types/GuideLinePluginType.GuideLineItem.html +0 -355
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +0 -376
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +0 -309
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +0 -312
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +0 -312
- package/docs/types/GuideLinePluginType.PathItem.html +0 -312
- package/docs/types/GuideLinePluginType.PluginData.html +0 -321
- package/docs/types/HelperEventMap.html +0 -520
- package/docs/types/LoadTagConfig.html +0 -282
- package/docs/types/MapviewFloorplanPluginParameterType.html +0 -282
- package/docs/types/MapviewFloorplanPluginReturnType.html +0 -282
- package/docs/types/MediaData.html +0 -303
- package/docs/types/MediaStore.html +0 -287
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +0 -289
- package/docs/types/ModelFloorplanPluginParameterType.html +0 -282
- package/docs/types/ModelFloorplanPluginReturnType.html +0 -282
- package/docs/types/ModelId.html +0 -282
- package/docs/types/ModelRoomLabelPluginParameters.html +0 -282
- package/docs/types/ModelRoomLabelPluginReturnType.html +0 -282
- package/docs/types/MoveArgs.html +0 -292
- package/docs/types/MoveOpts.html +0 -290
- package/docs/types/Object3DHelperEventMap.html +0 -375
- package/docs/types/ObjectFit.html +0 -282
- package/docs/types/PaintBrushEventMap.html +0 -313
- package/docs/types/PanoCompassPluginData.html +0 -282
- package/docs/types/PanoCompassPluginExportType.html +0 -282
- package/docs/types/PanoCompassPluginParameterType.html +0 -282
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +0 -282
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +0 -282
- package/docs/types/PanoIndex.html +0 -282
- package/docs/types/PanoMeasurePluginEvent.html +0 -282
- package/docs/types/PanoMeasureReturnType.html +0 -282
- package/docs/types/PanoSpatialTagPluginId.html +0 -282
- package/docs/types/PanoTagPluginExportInterface.html +0 -282
- package/docs/types/PanoTagPluginParamsInterface.html +0 -282
- package/docs/types/PanoVideoPluginParameterType.html +0 -282
- package/docs/types/PanoVideoPluginReturnType.html +0 -282
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +0 -290
- package/docs/types/PipelinePluginParameterType.html +0 -282
- package/docs/types/PipelinePluginReturnType.html +0 -282
- package/docs/types/PlaneTag.html +0 -290
- package/docs/types/Point2DTag.html +0 -290
- package/docs/types/Point3DTag.html +0 -290
- package/docs/types/PointTag.html +0 -287
- package/docs/types/PointTagInstance.html +0 -287
- package/docs/types/Position.html +0 -282
- package/docs/types/RotateArgs.html +0 -294
- package/docs/types/RotateOpts.html +0 -290
- package/docs/types/RuleLabelsKey.html +0 -282
- package/docs/types/RuleLabelsValue.html +0 -282
- package/docs/types/StickType.html +0 -282
- package/docs/types/Tag.html +0 -348
- package/docs/types/Tag2D.html +0 -290
- package/docs/types/Tag3D.html +0 -290
- package/docs/types/TagConfigByKey.html +0 -287
- package/docs/types/TagContentType.html +0 -282
- package/docs/types/TagContentTypeMapping.html +0 -282
- package/docs/types/TagDimensionType.html +0 -284
- package/docs/types/TagElement.html +0 -292
- package/docs/types/TagEvents.html +0 -335
- package/docs/types/TagGLTFObject.html +0 -305
- package/docs/types/TagHooks.html +0 -282
- package/docs/types/TagId.html +0 -282
- package/docs/types/TagInstance.html +0 -360
- package/docs/types/TagPointType.html +0 -285
- package/docs/types/TagRendererMap.html +0 -287
- package/docs/types/TopviewFloorplanPluginParameterType.html +0 -282
- package/docs/types/TopviewFloorplanPluginReturnType.html +0 -282
- package/docs/types/WorkCode.html +0 -282
- package/docs/variables/FLOOR_TYPE_MAP.html +0 -292
- package/docs/variables/PLUGIN.html +0 -282
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +0 -285
- package/docs/variables/ROOM_TYPE_MAP.html +0 -292
- package/docs/variables/defaultGlobalConfig.html +0 -282
- package/docs/variables/itemLabelPluginServerParams.html +0 -289
- package/docs/variables/modelItemLabelPluginServerParams.html +0 -289
- package/docs/variables/modelRoomLabelPluginServerParams.html +0 -289
- package/libs/CruisePlugin/BaseController.d.ts +0 -159
- package/libs/CruisePlugin/BaseController.js +0 -231
- package/libs/CruisePlugin/Move.d.ts +0 -40
- package/libs/CruisePlugin/Move.js +0 -120
- package/libs/CruisePlugin/Work.d.ts +0 -120
- package/libs/CruisePlugin/Work.js +0 -597
- package/libs/CruisePlugin/utils/getFiveStateOnCurve.d.ts +0 -11
- package/libs/CruisePlugin/utils/getFiveStateOnCurve.js +0 -11
- package/libs/shared-utils/five/fiveLoaded.d.ts +0 -2
- package/libs/shared-utils/five/fiveLoaded.js +0 -30
- package/libs/shared-utils/formatRad.d.ts +0 -7
- package/libs/shared-utils/formatRad.js +0 -7
- /package/dist/{shared-utils → CruisePlugin/utils}/formatRad.d.ts +0 -0
- /package/dist/{shared-utils/vectorToCoordinate.d.ts → CruisePlugin/utils/vectorToCoordinates.d.ts} +0 -0
- /package/libs/{shared-utils/vectorToCoordinate.d.ts → CruisePlugin/utils/vectorToCoordinates.d.ts} +0 -0
- /package/libs/{shared-utils/vectorToCoordinate.js → CruisePlugin/utils/vectorToCoordinates.js} +0 -0
|
@@ -0,0 +1,760 @@
|
|
|
1
|
+
var T = Object.defineProperty, K = Object.defineProperties;
|
|
2
|
+
var A = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var F = Object.getOwnPropertySymbols;
|
|
4
|
+
var O = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var L = (c, l, e) => l in c ? T(c, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[l] = e, P = (c, l) => {
|
|
6
|
+
for (var e in l || (l = {}))
|
|
7
|
+
O.call(l, e) && L(c, e, l[e]);
|
|
8
|
+
if (F)
|
|
9
|
+
for (var e of F(l))
|
|
10
|
+
U.call(l, e) && L(c, e, l[e]);
|
|
11
|
+
return c;
|
|
12
|
+
}, C = (c, l) => K(c, A(l));
|
|
13
|
+
var I = (c, l, e) => (L(c, typeof l != "symbol" ? l + "" : l, e), e);
|
|
14
|
+
var v = (c, l, e) => new Promise((t, r) => {
|
|
15
|
+
var i = (d) => {
|
|
16
|
+
try {
|
|
17
|
+
s(e.next(d));
|
|
18
|
+
} catch (a) {
|
|
19
|
+
r(a);
|
|
20
|
+
}
|
|
21
|
+
}, n = (d) => {
|
|
22
|
+
try {
|
|
23
|
+
s(e.throw(d));
|
|
24
|
+
} catch (a) {
|
|
25
|
+
r(a);
|
|
26
|
+
}
|
|
27
|
+
}, s = (d) => d.done ? t(d.value) : Promise.resolve(d.value).then(i, n);
|
|
28
|
+
s((e = e.apply(c, l)).next());
|
|
29
|
+
});
|
|
30
|
+
import { Controller as V } from "../base/BasePluginWithData.js";
|
|
31
|
+
import { GuideLinePlugin as $ } from "../GuideLinePlugin/index.js";
|
|
32
|
+
import { uuid as w } from "../shared-utils/uuid.js";
|
|
33
|
+
import { coordinatesAngle as Q } from "./utils/coordinatesAngle.js";
|
|
34
|
+
import { safeCall as _ } from "./utils/safeCall.js";
|
|
35
|
+
import { equal as R } from "../shared-utils/equal.js";
|
|
36
|
+
import { vectorToCoordinates as N } from "./utils/vectorToCoordinates.js";
|
|
37
|
+
import * as j from "three";
|
|
38
|
+
import H from "./utils/linerValue.js";
|
|
39
|
+
import { sleep as J } from "./utils/sleep.js";
|
|
40
|
+
import "../base/BasePlugin.js";
|
|
41
|
+
import "../shared-utils/Subscribe.js";
|
|
42
|
+
import "hammerjs";
|
|
43
|
+
import "@realsee/five";
|
|
44
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
45
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
46
|
+
import "../shared-utils/positionToVector3.js";
|
|
47
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
48
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
49
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
50
|
+
import "../shared-utils/util.js";
|
|
51
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
52
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
53
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
54
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
55
|
+
import "../shared-utils/three/centerPoint.js";
|
|
56
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
57
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
58
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
59
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
60
|
+
import "../shared-utils/url/absoluteUrl.js";
|
|
61
|
+
import "../GuideLinePlugin/Controller.js";
|
|
62
|
+
import "../GuideLinePlugin/GuideLineItem/index.js";
|
|
63
|
+
import "../GuideLinePlugin/GuideLineModeItem/index.js";
|
|
64
|
+
import "../shared-utils/log.js";
|
|
65
|
+
import "../GuideLinePlugin/utils/createLineGeometry.js";
|
|
66
|
+
import "../vendor/polyline-normals/index.js";
|
|
67
|
+
import "../vendor/polyline-miter-util/index.js";
|
|
68
|
+
import "../vendor/gl-vec2/add.js";
|
|
69
|
+
import "../vendor/gl-vec2/set.js";
|
|
70
|
+
import "../vendor/gl-vec2/normalize.js";
|
|
71
|
+
import "../vendor/gl-vec2/subtract.js";
|
|
72
|
+
import "../vendor/gl-vec2/dot.js";
|
|
73
|
+
import "../shared-utils/five/mode.js";
|
|
74
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
75
|
+
import "../shared-utils/animationFrame/index.js";
|
|
76
|
+
import "../shared-utils/three/loadTexture.js";
|
|
77
|
+
import "../PanoTagPlugin/controller/index.js";
|
|
78
|
+
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
79
|
+
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
80
|
+
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
81
|
+
import "../PanoTagPlugin/utils/debounce.js";
|
|
82
|
+
import "../PanoTagPlugin/utils/throttle.js";
|
|
83
|
+
import "../PanoTagPlugin/utils/resizeObserver.js";
|
|
84
|
+
import "../PanoTagPlugin/utils/tag/format.js";
|
|
85
|
+
import "../shared-utils/audio.js";
|
|
86
|
+
import "../PanoTagPlugin/controller/TagRender.js";
|
|
87
|
+
import "../PanoTagPlugin/controller/TagComputer.js";
|
|
88
|
+
import "../PanoTagPlugin/utils/tagPosition.js";
|
|
89
|
+
import "../PanoTagPlugin/utils/checkRange.js";
|
|
90
|
+
import "../shared-utils/isNil.js";
|
|
91
|
+
import "../PanoTagPlugin/controller/TagUtil.js";
|
|
92
|
+
import "../PanoTagPlugin/typings/tag/TagConfig.js";
|
|
93
|
+
import "../PanoTagPlugin/tag.config.js";
|
|
94
|
+
import "../PanoTagPlugin/utils/planeNormal.js";
|
|
95
|
+
import "../PanoTagPlugin/utils/normalPositionToPositions.js";
|
|
96
|
+
import "../PanoTagPlugin/controller/TagCache.js";
|
|
97
|
+
import "../vendor/svelte/store/index.js";
|
|
98
|
+
import "../vendor/svelte/internal/index.js";
|
|
99
|
+
import "../shared-utils/device.js";
|
|
100
|
+
import "../PanoTagPlugin/utils/model/mediaPlane.js";
|
|
101
|
+
import "../shared-utils/three/Quadrangle.js";
|
|
102
|
+
import "../shared-utils/math/pointIsRectangle.js";
|
|
103
|
+
import "../shared-utils/three/loadVideoTexture.js";
|
|
104
|
+
import "../PanoTagPlugin/Assets/Icon.js";
|
|
105
|
+
import "../shared-utils/three/getPositionsByObjectFit.js";
|
|
106
|
+
import "../shared-utils/three/FragmentTransparencyMaterial.js";
|
|
107
|
+
import "../shared-utils/three/getNormal.js";
|
|
108
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
109
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
110
|
+
import "../PanoTagPlugin/utils/tag/adaptConfig.js";
|
|
111
|
+
import "../shared-utils/typescript/entries.js";
|
|
112
|
+
import "../shared-utils/url/getUrl.js";
|
|
113
|
+
import "../shared-utils/five/transformPosition.js";
|
|
114
|
+
import "../shared-utils/five/getFloorIndex.js";
|
|
115
|
+
import "../shared-utils/safeObj.js";
|
|
116
|
+
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
117
|
+
import "../PanoTagPlugin/Components/TagItem.js";
|
|
118
|
+
import "../PanoTagPlugin/Components/Tag/index.js";
|
|
119
|
+
import "../PanoTagPlugin/Components/Tag/TextTag/index.js";
|
|
120
|
+
import "../PanoTagPlugin/Components/Tag/TextTag/TextTag.js";
|
|
121
|
+
import "../PanoTagPlugin/Components/Common/Line/Straight.js";
|
|
122
|
+
import "../vendor/svelte/transition/index.js";
|
|
123
|
+
import "../vendor/svelte/easing/index.js";
|
|
124
|
+
import "../PanoTagPlugin/Components/Common/Shadow.js";
|
|
125
|
+
import "../PanoTagPlugin/Components/Common/Text/FlyMText.js";
|
|
126
|
+
import "../PanoTagPlugin/Components/Common/Text/FlyText.js";
|
|
127
|
+
import "animejs";
|
|
128
|
+
import "../PanoTagPlugin/utils/search.js";
|
|
129
|
+
import "../PanoTagPlugin/utils/constants.js";
|
|
130
|
+
import "../PanoTagPlugin/Components/Common/Arrow.js";
|
|
131
|
+
import "../PanoTagPlugin/utils/doUtil.js";
|
|
132
|
+
import "../shared-utils/svelte/resizeObserver.js";
|
|
133
|
+
import "../vendor/resize-observer-polyfill/dist/ResizeObserver.es.js";
|
|
134
|
+
import "../PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.js";
|
|
135
|
+
import "../PanoTagPlugin/Components/Common/Text/MText.js";
|
|
136
|
+
import "../PanoTagPlugin/utils/px2rem.js";
|
|
137
|
+
import "../PanoTagPlugin/Components/Tag/ImageTextTag.js";
|
|
138
|
+
import "../PanoTagPlugin/Components/Common/Line/Polyline.js";
|
|
139
|
+
import "../PanoTagPlugin/Components/Common/Media.js";
|
|
140
|
+
import "../vendor/svelte-carousel/src/components/Carousel/Carousel.js";
|
|
141
|
+
import "../vendor/svelte-carousel/src/components/Dots/Dots.js";
|
|
142
|
+
import "../vendor/svelte-carousel/src/components/Dot/Dot.js";
|
|
143
|
+
import "../vendor/svelte-carousel/src/components/Arrow/Arrow.js";
|
|
144
|
+
import "../vendor/svelte-carousel/src/direction.js";
|
|
145
|
+
import "../vendor/svelte-carousel/src/components/Progress/Progress.js";
|
|
146
|
+
import "../vendor/svelte-carousel/src/actions/swipeable/swipeable.js";
|
|
147
|
+
import "../vendor/svelte-carousel/src/actions/swipeable/event.js";
|
|
148
|
+
import "../vendor/svelte-carousel/src/utils/event.js";
|
|
149
|
+
import "../vendor/svelte-carousel/src/units.js";
|
|
150
|
+
import "../vendor/svelte-carousel/src/actions/hoverable/hoverable.js";
|
|
151
|
+
import "../vendor/svelte-carousel/src/actions/hoverable/event.js";
|
|
152
|
+
import "../vendor/svelte-carousel/src/actions/tappable/tappable.js";
|
|
153
|
+
import "../vendor/svelte-carousel/src/utils/math.js";
|
|
154
|
+
import "../vendor/svelte-carousel/src/actions/tappable/event.js";
|
|
155
|
+
import "../vendor/svelte-carousel/src/utils/page.js";
|
|
156
|
+
import "../vendor/svelte-carousel/src/utils/clones.js";
|
|
157
|
+
import "../vendor/svelte-carousel/src/utils/object.js";
|
|
158
|
+
import "../vendor/svelte-carousel/src/components/Carousel/createCarousel.js";
|
|
159
|
+
import "../vendor/easy-reactive/src/simply-reactive.js";
|
|
160
|
+
import "../vendor/lodash.get/index.js";
|
|
161
|
+
import "../_commonjsHelpers.js";
|
|
162
|
+
import "../vendor/lodash.clonedeep/index.js";
|
|
163
|
+
import "../vendor/easy-reactive/src/utils/subscription.js";
|
|
164
|
+
import "../vendor/easy-reactive/src/utils/object.js";
|
|
165
|
+
import "../vendor/lodash.isequal/index.js";
|
|
166
|
+
import "../vendor/easy-reactive/src/utils/watcher.js";
|
|
167
|
+
import "../vendor/svelte-carousel/src/utils/lazy.js";
|
|
168
|
+
import "../vendor/svelte-carousel/src/utils/ProgressManager.js";
|
|
169
|
+
import "../vendor/svelte-carousel/src/utils/interval.js";
|
|
170
|
+
import "../PanoTagPlugin/Components/Common/MediaItem.js";
|
|
171
|
+
import "../PanoTagPlugin/Components/Tag/MarketingTag.js";
|
|
172
|
+
import "../PanoTagPlugin/utils/noTypecheck.js";
|
|
173
|
+
import "../PanoTagPlugin/Components/Tag/AudioTag/index.js";
|
|
174
|
+
import "../PanoTagPlugin/Components/Tag/AudioTag/AudioTag.js";
|
|
175
|
+
import "../PanoTagPlugin/Components/Common/Audio.js";
|
|
176
|
+
import "../PanoTagPlugin/utils/audio/SharedAudio.js";
|
|
177
|
+
import "../PanoTagPlugin/Components/Common/Icon/audioIcon.js";
|
|
178
|
+
import "../PanoTagPlugin/Components/Tag/AudioTag/AudioPlaneTag.js";
|
|
179
|
+
import "../PanoTagPlugin/Components/Tag/MediaPlane.js";
|
|
180
|
+
import "../PanoTagPlugin/Components/Tag/LinkTag.js";
|
|
181
|
+
import "../PanoTagPlugin/Components/Common/Icon/Icon.js";
|
|
182
|
+
import "../PanoTagPlugin/utils/getImageInfo.js";
|
|
183
|
+
import "../PanoTagPlugin/Components/Tag/PanoramaTag.js";
|
|
184
|
+
import "../PanoTagPlugin/Components/Tag/CustomTag.js";
|
|
185
|
+
import "../vendor/classnames/index.js";
|
|
186
|
+
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
187
|
+
import "../CSS3DRenderPlugin/index.js";
|
|
188
|
+
import "../CSS3DRenderPlugin/Controller.js";
|
|
189
|
+
import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
190
|
+
import "../shared-utils/three/GLTFLoader.js";
|
|
191
|
+
import "@realsee/five/gltf-loader";
|
|
192
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
193
|
+
import "../GuideLinePlugin/Components/Tag.js";
|
|
194
|
+
import "../GuideLinePlugin/utils/index.js";
|
|
195
|
+
import "./Controller.js";
|
|
196
|
+
import "../shared-utils/to.js";
|
|
197
|
+
import "../shared-utils/five/changeMode.js";
|
|
198
|
+
import "../shared-utils/nearlyEqual.js";
|
|
199
|
+
import "./utils/coordinatesToVector.js";
|
|
200
|
+
import "../shared-utils/isTruelyObject.js";
|
|
201
|
+
import "./utils/formatRad.js";
|
|
202
|
+
const M = "v1.0.6", G = "CruisePlugin", x = `${G}@${M}`, sr = (c) => `${x}--${c}`, D = () => {
|
|
203
|
+
console.error(`${x} is disposed`);
|
|
204
|
+
}, W = () => {
|
|
205
|
+
console.warn(`${x} is disabled`);
|
|
206
|
+
}, q = () => {
|
|
207
|
+
console.error(`${x} is disabled`);
|
|
208
|
+
}, E = /* @__PURE__ */ new Map();
|
|
209
|
+
class z extends V {
|
|
210
|
+
constructor(e, t) {
|
|
211
|
+
super(e, t);
|
|
212
|
+
I(this, "state", {
|
|
213
|
+
visible: !0,
|
|
214
|
+
enabled: !0,
|
|
215
|
+
disposed: !1,
|
|
216
|
+
playing: !1,
|
|
217
|
+
speed: 1,
|
|
218
|
+
config: {
|
|
219
|
+
speedConfig: {
|
|
220
|
+
rotateSpeed: 1e-3,
|
|
221
|
+
rotateSpeedUnit: "rad/ms",
|
|
222
|
+
moveSpeed: 2e-3,
|
|
223
|
+
moveSpeedUnit: "m/ms"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
I(this, "data");
|
|
228
|
+
I(this, "config");
|
|
229
|
+
I(this, "privateState", {
|
|
230
|
+
playing: !1,
|
|
231
|
+
currentPlayQueue: [],
|
|
232
|
+
currentPlayKeyframe: null,
|
|
233
|
+
broke: !1,
|
|
234
|
+
disposers: [],
|
|
235
|
+
modeChanging: !1
|
|
236
|
+
});
|
|
237
|
+
I(this, "GuideLine");
|
|
238
|
+
this.config = t, Object.assign(window, { [`__${G}_DEBUG__`]: this });
|
|
239
|
+
const r = this.setFiveLinearUpdateCamera.bind(this), i = this.setFiveOriginUpdateCamera.bind(this);
|
|
240
|
+
this.hooks.on("play", r), this.hooks.on("broke", i), this.hooks.on("end", i), this.hooks.on("pause", i), this.privateState.disposers.push(() => {
|
|
241
|
+
this.hooks.off("play", r), this.hooks.off("broke", i), this.hooks.off("end", i), this.hooks.off("pause", i);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* @description Load Data and State
|
|
246
|
+
*/
|
|
247
|
+
load(e, t, r) {
|
|
248
|
+
return v(this, null, function* () {
|
|
249
|
+
var o, m, f, u, h, g;
|
|
250
|
+
if (this.state.disposed)
|
|
251
|
+
return D();
|
|
252
|
+
this.privateState.fiveOriginGetProgress || (m = (o = this.five.controller) == null ? void 0 : o.cameraMotion) != null && m.getProgress || (yield this.waitFiveLoaded(), this.privateState.fiveOriginGetProgress = (u = (f = this.five.controller) == null ? void 0 : f.cameraMotion) == null ? void 0 : u.getProgress), this.clear();
|
|
253
|
+
const i = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, n = yield this.formatData(e);
|
|
254
|
+
this.data = n, this.hooks.emit("dataChange", n, i);
|
|
255
|
+
let s = [], d;
|
|
256
|
+
const a = this.data.keyframes.filter((p) => p.data.panoIndex !== void 0);
|
|
257
|
+
a.filter((p, y) => {
|
|
258
|
+
var S;
|
|
259
|
+
return p.data.panoIndex !== ((S = a[y - 1]) == null ? void 0 : S.data.panoIndex);
|
|
260
|
+
}).map((p) => p.data.panoIndex).forEach((p) => {
|
|
261
|
+
var S, k;
|
|
262
|
+
const y = (S = this.five.work.observers[p]) == null ? void 0 : S.floorIndex;
|
|
263
|
+
if (y !== void 0)
|
|
264
|
+
if (d === y) {
|
|
265
|
+
const b = s.length - 1;
|
|
266
|
+
s[b] = [...(k = s[b]) != null ? k : [], p];
|
|
267
|
+
} else {
|
|
268
|
+
d = y;
|
|
269
|
+
const b = s.length;
|
|
270
|
+
s[b] = [p];
|
|
271
|
+
}
|
|
272
|
+
}), !this.GuideLine && ((h = this.config) == null ? void 0 : h.useGuideLine) !== !1 && n.useGuildLine !== !1 && (this.GuideLine = $(this.five, this.config)), (g = this.GuideLine) == null || g.load({ routes: s.map((p) => ({ panoIndexList: p })), config: n.guildPluginOptions }), t ? this.setState(t, { userAction: r }) : (this.setState({ playing: !1 }, { userAction: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing, { userAction: !1 }), this.changeSpeed(this.state.speed)), this.clearPauseData(), console.debug(`${x} loaded`, n), this.hooks.emit("dataLoaded", n);
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* @description Play | Continue play. if have been paused, continue play from the pause position; if playing, do nothing
|
|
277
|
+
*/
|
|
278
|
+
play(e) {
|
|
279
|
+
this.setState({ playing: !0 }, e);
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @description If playing, first pause, then play from keyframes index/id
|
|
283
|
+
* @param {number} options.index play from keyframes index
|
|
284
|
+
* @param {string} options.id play from keyframes id
|
|
285
|
+
*/
|
|
286
|
+
playFrom(e) {
|
|
287
|
+
const { index: t, id: r, userAction: i } = e;
|
|
288
|
+
this.state.playing && this.setState({ playing: !1 }, { userAction: i }), this.setState({ playing: !0 }, { userAction: i, playFromIndex: t, playFromId: r });
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @description Play from first keyframe
|
|
292
|
+
*/
|
|
293
|
+
playFromStart(e) {
|
|
294
|
+
return this.playFrom(C(P({}, e), { index: 0 }));
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* @description Pause
|
|
298
|
+
*/
|
|
299
|
+
pause(e) {
|
|
300
|
+
this.setState({ playing: !1 }, e);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* @description Show guide line
|
|
304
|
+
*/
|
|
305
|
+
show(e) {
|
|
306
|
+
return v(this, null, function* () {
|
|
307
|
+
this.setState({ visible: !0 }, e);
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* @description Hide guide line
|
|
312
|
+
*/
|
|
313
|
+
hide(e) {
|
|
314
|
+
return v(this, null, function* () {
|
|
315
|
+
this.setState({ visible: !1 }, e);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* @description Enable
|
|
320
|
+
*/
|
|
321
|
+
enable(e) {
|
|
322
|
+
this.setState({ enabled: !0 }, e);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* @description Disable
|
|
326
|
+
*/
|
|
327
|
+
disable(e) {
|
|
328
|
+
this.setState({ enabled: !1 }, e);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* @description Dispose
|
|
332
|
+
*/
|
|
333
|
+
dispose() {
|
|
334
|
+
this.setState({ disposed: !0 });
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* @description Set state
|
|
338
|
+
*/
|
|
339
|
+
setState(e, t) {
|
|
340
|
+
var i;
|
|
341
|
+
if (this.state.disposed)
|
|
342
|
+
return D();
|
|
343
|
+
if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
|
|
344
|
+
return q();
|
|
345
|
+
const r = P({}, this.state);
|
|
346
|
+
this.state = P(P({}, 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, t == null ? void 0 : t.userAction), e.enabled !== void 0 && e.enabled !== r.enabled && this.handleEnable(e.enabled, t == null ? void 0 : t.userAction), e.playing !== void 0 && e.playing !== r.playing && this.changePlayState(e.playing, t), e.speed !== void 0 && e.speed !== r.speed && this.changeSpeed(e.speed, t == null ? void 0 : t.userAction), R(r, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: r, userAction: (i = t == null ? void 0 : t.userAction) != null ? i : !0 });
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* @description Format data
|
|
350
|
+
*/
|
|
351
|
+
formatData(e) {
|
|
352
|
+
return v(this, null, function* () {
|
|
353
|
+
this.five.work || (yield this.waitFiveLoaded());
|
|
354
|
+
const t = this.five.work.observers, r = (() => {
|
|
355
|
+
const i = e;
|
|
356
|
+
return typeof i == "object" && i !== null && i.version && i.data ? i.data : i;
|
|
357
|
+
})();
|
|
358
|
+
if (r.keyframes)
|
|
359
|
+
return {
|
|
360
|
+
keyframesId: w(),
|
|
361
|
+
keyframes: r.keyframes.map((i, n) => {
|
|
362
|
+
var a;
|
|
363
|
+
const s = r.keyframes[n + 1], d = (() => !s || s.start === void 0 || i.end === void 0 ? 0 : s.start - i.end)();
|
|
364
|
+
return C(P({ id: (a = i.uuid) != null ? a : w(), moveIndex: n, stay: d, index: n }, i), { guildPluginOptions: r.guildPluginOptions });
|
|
365
|
+
})
|
|
366
|
+
};
|
|
367
|
+
if (r.panoIndexList) {
|
|
368
|
+
let i = [];
|
|
369
|
+
const { moveEffect: n, moveToFirstPanoEffect: s, moveToFirstPanoDuration: d } = r;
|
|
370
|
+
return this.privateState.moveToFirstPanoEffect = s, this.privateState.moveToFirstPanoDuration = d, r.panoIndexList.forEach((a, o) => {
|
|
371
|
+
const m = (() => {
|
|
372
|
+
var p, y, S, k;
|
|
373
|
+
const f = r.panoIndexList.slice(o).find((b) => b !== a);
|
|
374
|
+
if (f === void 0)
|
|
375
|
+
return;
|
|
376
|
+
const u = (p = t[a]) == null ? void 0 : p.position, h = (y = t[f]) == null ? void 0 : y.position;
|
|
377
|
+
if (!h || !u || ((S = t[a]) == null ? void 0 : S.floorIndex) !== ((k = t[f]) == null ? void 0 : k.floorIndex))
|
|
378
|
+
return;
|
|
379
|
+
const g = new j.Vector3().subVectors(h, u);
|
|
380
|
+
return N(g.normalize());
|
|
381
|
+
})();
|
|
382
|
+
r.moveType === void 0 || r.moveType === "justMove" ? i.push({
|
|
383
|
+
moveIndex: o,
|
|
384
|
+
stay: r.stay,
|
|
385
|
+
data: P({ effect: "Move", panoIndex: a, moveEffect: n }, m != null ? m : {})
|
|
386
|
+
}) : r.moveType === "moveAndRotate" && (i.push({ moveIndex: o, stay: r.stay, data: { effect: "Move", panoIndex: a, moveEffect: n } }), m && i.push({ moveIndex: o, stay: r.stay, data: P({ effect: "Rotate", panoIndex: a }, m) }));
|
|
387
|
+
}), {
|
|
388
|
+
keyframesId: w(),
|
|
389
|
+
keyframes: i.map((a, o) => P({ id: w(), index: o }, a)),
|
|
390
|
+
guildPluginOptions: r.guildPluginOptions,
|
|
391
|
+
useGuildLine: r.useGuildLine
|
|
392
|
+
};
|
|
393
|
+
} else
|
|
394
|
+
throw new Error("format error: data no keyframes or no panoIndexList");
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
handleEnable(e, t = !0) {
|
|
398
|
+
var r, i;
|
|
399
|
+
e ? ((r = this.GuideLine) == null || r.enable(), this.hooks.emit("enable", { userAction: t })) : ((i = this.GuideLine) == null || i.disable(), this.changePlayState(!1, { userAction: t }), this.hooks.emit("disable", { userAction: t })), this.state.enabled = e;
|
|
400
|
+
}
|
|
401
|
+
handleVisible(e, t = !0) {
|
|
402
|
+
var r, i;
|
|
403
|
+
e ? ((r = this.GuideLine) == null || r.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: t }))) : ((i = this.GuideLine) == null || i.hide(), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: t }))), this.state.visible = e;
|
|
404
|
+
}
|
|
405
|
+
changePlayState(e, t) {
|
|
406
|
+
this.actionIfStateIsEnabled(
|
|
407
|
+
() => {
|
|
408
|
+
var r;
|
|
409
|
+
return this.hooks.emit("playStateChange", e ? "playing" : "pause", { userAction: (r = t == null ? void 0 : t.userAction) != null ? r : !0 });
|
|
410
|
+
}
|
|
411
|
+
), e ? this.handlePlay(t) : this.handlePause(t), this.state.playing = e;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* @description Play | Continue play. if have been paused, continue play from the pause position; if playing, do nothing
|
|
415
|
+
* @param {number} options.playFromIndex play from keyframes index
|
|
416
|
+
* @param {string} options.playFromId play from keyframes id
|
|
417
|
+
*/
|
|
418
|
+
// eslint-disable-next-line complexity
|
|
419
|
+
handlePlay(e) {
|
|
420
|
+
return v(this, null, function* () {
|
|
421
|
+
var u;
|
|
422
|
+
const { data: t, state: r, privateState: i, hooks: n } = this;
|
|
423
|
+
if (i.playing || !(t != null && t.keyframes) || (t == null ? void 0 : t.keyframes.length) === 0)
|
|
424
|
+
return;
|
|
425
|
+
const s = w();
|
|
426
|
+
i.playId = s, i.playing = !0, i.broke = !1;
|
|
427
|
+
const d = t.keyframes, a = this.getPauseData();
|
|
428
|
+
(e == null ? void 0 : e.notEmitEvent) !== !0 && n.emit("play", { userAction: (u = e == null ? void 0 : e.userAction) != null ? u : !0 });
|
|
429
|
+
let o = !1;
|
|
430
|
+
const f = yield (() => v(this, null, function* () {
|
|
431
|
+
var h, g;
|
|
432
|
+
if ((e == null ? void 0 : e.playFromIndex) !== void 0)
|
|
433
|
+
return e.playFromIndex;
|
|
434
|
+
if ((e == null ? void 0 : e.playFromId) !== void 0)
|
|
435
|
+
return (h = this.data) == null ? void 0 : h.keyframes.findIndex((p) => p.id === e.playFromId);
|
|
436
|
+
if (a != null && a.keyframeId) {
|
|
437
|
+
const p = (g = this.data) == null ? void 0 : g.keyframes.find((y) => y.id === a.keyframeId);
|
|
438
|
+
if (a != null && a.fiveState && (yield this.move(a.fiveState, {
|
|
439
|
+
moveEffect: i.moveToFirstPanoEffect,
|
|
440
|
+
duration: i.moveToFirstPanoDuration
|
|
441
|
+
})), p) {
|
|
442
|
+
if (p.data.effect === "Move")
|
|
443
|
+
return p.index;
|
|
444
|
+
if (p.data.effect === "Rotate") {
|
|
445
|
+
const y = a.duration !== void 0 ? a.duration * (1 - a.playedProgress) : void 0;
|
|
446
|
+
return yield this.playKeyframe(p, { duration: y }), o = !0, p.index + 1;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}))();
|
|
451
|
+
this.clearPauseData();
|
|
452
|
+
for (const h of d) {
|
|
453
|
+
if (i.broke || !r.playing || !i.playing || s !== i.playId)
|
|
454
|
+
return;
|
|
455
|
+
if (!(f !== void 0 && h.index < f))
|
|
456
|
+
try {
|
|
457
|
+
n.emit("playIndexChange", h.index, h), yield this.playKeyframe(h, {
|
|
458
|
+
moveEffect: o === !1 ? i.moveToFirstPanoEffect : void 0,
|
|
459
|
+
duration: o === !1 && typeof i.moveToFirstPanoDuration == "number" ? i.moveToFirstPanoDuration : void 0
|
|
460
|
+
}), h.stay && (yield J(h.stay)), o === !1 && (o = !0);
|
|
461
|
+
} catch (g) {
|
|
462
|
+
return console.error(g), Promise.resolve("broke");
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
r.playing && s === i.playId && (this.setState({ playing: !1 }, { userAction: !1 }), n.emit("end"), this.clearPauseData());
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* @description: Pause and record pause state
|
|
470
|
+
*/
|
|
471
|
+
handlePause(e) {
|
|
472
|
+
var n;
|
|
473
|
+
const { state: t, privateState: r, hooks: i } = this;
|
|
474
|
+
t.playing = !1, r.playing !== !1 && (r.playing = !1, (e == null ? void 0 : e.userAction) !== !1 && this.setPauseData(), r.broke || this.forceInteruptUpdateCamera(), (e == null ? void 0 : e.notEmitEvent) !== !0 && i.emit("pause", { userAction: (n = e == null ? void 0 : e.userAction) != null ? n : !0 }));
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* @description Play single keyframe
|
|
478
|
+
*/
|
|
479
|
+
playKeyframe(e, t) {
|
|
480
|
+
return v(this, null, function* () {
|
|
481
|
+
var i;
|
|
482
|
+
const { privateState: r } = this;
|
|
483
|
+
return ((i = this.privateState.currentPlayKeyframe) == null ? void 0 : i.keyframe.id) !== e.id && (this.privateState.currentPlayKeyframe = { keyframe: e }), r.currentPlayQueue.push(this.getPlayPromise(e, t)), this.actionPromiseQueue();
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* @description: listen interupted by five gesture
|
|
488
|
+
*/
|
|
489
|
+
addInterruptListener(e) {
|
|
490
|
+
const t = () => {
|
|
491
|
+
this.privateState.modeChanging || e();
|
|
492
|
+
}, r = (i) => {
|
|
493
|
+
i !== "mouseMove" && e();
|
|
494
|
+
};
|
|
495
|
+
return this.five.once("gesture", r), this.five.once("wantsChangeMode", t), () => {
|
|
496
|
+
this.five.off("gesture", r), this.five.once("wantsChangeMode", t);
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* @description: getPlayPromise
|
|
501
|
+
*/
|
|
502
|
+
getPlayPromise(r) {
|
|
503
|
+
return v(this, arguments, function* (e, t = {}) {
|
|
504
|
+
var n;
|
|
505
|
+
const i = e.data;
|
|
506
|
+
if (t.duration = (n = t.duration) != null ? n : e.start !== void 0 && e.end !== void 0 ? e.end - e.start : void 0, !!i)
|
|
507
|
+
return new Promise((s, d) => {
|
|
508
|
+
let a = !1;
|
|
509
|
+
this.addInterruptListener(() => {
|
|
510
|
+
if (!a)
|
|
511
|
+
return this.hooks.emit("broke"), this.privateState.broke = !0, this.setState({ playing: !1 }), a = !0, d(new Error("play is interupted"));
|
|
512
|
+
});
|
|
513
|
+
try {
|
|
514
|
+
if (a)
|
|
515
|
+
return;
|
|
516
|
+
const o = () => {
|
|
517
|
+
s(), a = !0;
|
|
518
|
+
};
|
|
519
|
+
switch (i.effect) {
|
|
520
|
+
case "Move":
|
|
521
|
+
this.move(i, t).then(o);
|
|
522
|
+
break;
|
|
523
|
+
case "Rotate":
|
|
524
|
+
this.rotate(i, t).then(o);
|
|
525
|
+
break;
|
|
526
|
+
default:
|
|
527
|
+
this.rotate(i, t).then(o);
|
|
528
|
+
}
|
|
529
|
+
} catch (o) {
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* @description Action promise queue in sequence
|
|
536
|
+
*/
|
|
537
|
+
actionPromiseQueue() {
|
|
538
|
+
return v(this, null, function* () {
|
|
539
|
+
const { privateState: e } = this;
|
|
540
|
+
return new Promise((t, r) => {
|
|
541
|
+
if (e.currentPlayQueue.length === 0) {
|
|
542
|
+
t();
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
const i = e.currentPlayQueue.shift();
|
|
546
|
+
if (!i) {
|
|
547
|
+
t();
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
i.then(t, r);
|
|
551
|
+
}).then(() => e.currentPlayQueue.length === 0 ? Promise.resolve() : this.actionPromiseQueue());
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* @description Action move keyframe
|
|
556
|
+
*/
|
|
557
|
+
move(e, t) {
|
|
558
|
+
return v(this, null, function* () {
|
|
559
|
+
if (e.mode && e.mode !== this.five.currentMode)
|
|
560
|
+
yield this.changeMode(e);
|
|
561
|
+
else if (e.panoIndex !== this.five.panoIndex)
|
|
562
|
+
yield this.changePano(e, t);
|
|
563
|
+
else
|
|
564
|
+
return Promise.resolve();
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* @description Action rotate keyframe
|
|
569
|
+
*/
|
|
570
|
+
rotate(e, t) {
|
|
571
|
+
return v(this, null, function* () {
|
|
572
|
+
if (e.mode && e.mode !== this.five.currentMode)
|
|
573
|
+
yield this.changeMode({ mode: e.mode, panoIndex: e.panoIndex });
|
|
574
|
+
else if (e.panoIndex && e.panoIndex !== this.five.panoIndex)
|
|
575
|
+
return yield this.changePano(e, t);
|
|
576
|
+
yield this.updateCamera(e, t);
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* @description Update five camera
|
|
581
|
+
*/
|
|
582
|
+
updateCamera(r) {
|
|
583
|
+
return v(this, arguments, function* (e, t = {}) {
|
|
584
|
+
const { five: i, privateState: n, state: s } = this, d = (() => {
|
|
585
|
+
var u, h;
|
|
586
|
+
const m = (u = s.config) == null ? void 0 : u.speedConfig, f = (h = e.rotateSpeed) != null ? h : m == null ? void 0 : m.rotateSpeed;
|
|
587
|
+
if ((m == null ? void 0 : m.rotateSpeedUnit) === void 0)
|
|
588
|
+
return f;
|
|
589
|
+
if (f !== void 0)
|
|
590
|
+
return m.rotateSpeedUnit === "rad/ms" ? f : f / 1e3;
|
|
591
|
+
})(), a = (() => {
|
|
592
|
+
if (t.duration)
|
|
593
|
+
return t.duration;
|
|
594
|
+
if (d) {
|
|
595
|
+
const m = this.five.getCurrentState();
|
|
596
|
+
return Q(m, e) / d;
|
|
597
|
+
}
|
|
598
|
+
return 800;
|
|
599
|
+
})();
|
|
600
|
+
n.currentPlayKeyframe && (n.currentPlayKeyframe.originDuration = a);
|
|
601
|
+
const o = this.getSpeededDuration(a);
|
|
602
|
+
return new Promise((m) => {
|
|
603
|
+
_(() => i.updateCamera(e, o)), setTimeout(() => m(), o);
|
|
604
|
+
});
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* @description: Change five pano
|
|
609
|
+
*/
|
|
610
|
+
changePano(e, t) {
|
|
611
|
+
return v(this, null, function* () {
|
|
612
|
+
const { five: r, privateState: i, state: n } = this;
|
|
613
|
+
if (typeof e.panoIndex != "number" || e.panoIndex === r.panoIndex)
|
|
614
|
+
return;
|
|
615
|
+
const s = r.getCurrentState().mode !== "Panorama";
|
|
616
|
+
s && (this.privateState.modeChanging = !0);
|
|
617
|
+
const d = (() => {
|
|
618
|
+
var f, u;
|
|
619
|
+
const o = (f = n.config) == null ? void 0 : f.speedConfig, m = (u = e.moveSpeed) != null ? u : o == null ? void 0 : o.moveSpeed;
|
|
620
|
+
if ((o == null ? void 0 : o.moveSpeedUnit) === void 0)
|
|
621
|
+
return m;
|
|
622
|
+
if (m !== void 0)
|
|
623
|
+
return o.moveSpeedUnit === "m/ms" ? m : m / 1e3;
|
|
624
|
+
})(), a = (() => {
|
|
625
|
+
if (t != null && t.duration)
|
|
626
|
+
return t.duration;
|
|
627
|
+
if (d && typeof r.panoIndex == "number" && typeof e.panoIndex == "number") {
|
|
628
|
+
const o = r.work.observers[r.panoIndex].position, m = r.work.observers[e.panoIndex].position;
|
|
629
|
+
return o.distanceTo(m) / d;
|
|
630
|
+
}
|
|
631
|
+
return 800;
|
|
632
|
+
})();
|
|
633
|
+
i.currentPlayKeyframe && (i.currentPlayKeyframe.originDuration = a), yield new Promise((o) => {
|
|
634
|
+
var m, f, u;
|
|
635
|
+
r.moveToPano(e.panoIndex, {
|
|
636
|
+
latitude: e.latitude,
|
|
637
|
+
longitude: e.longitude,
|
|
638
|
+
fov: e.fov,
|
|
639
|
+
duration: this.getSpeededDuration(a),
|
|
640
|
+
effect: (u = (f = t == null ? void 0 : t.moveEffect) != null ? f : (m = this.state.config) == null ? void 0 : m.moveEffect) != null ? u : e.moveEffect,
|
|
641
|
+
moveCancelCallback: () => o(),
|
|
642
|
+
moveEndCallback: () => o()
|
|
643
|
+
}), s && r.once("panoArrived", () => o());
|
|
644
|
+
}), s && (this.privateState.modeChanging = !1);
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* @description: Change play speed
|
|
649
|
+
*/
|
|
650
|
+
changeSpeed(e, t = !0) {
|
|
651
|
+
const { state: r, privateState: i, hooks: n } = this, { currentPlayKeyframe: s } = i;
|
|
652
|
+
if (n.emit("speedChange", e, { userAction: t }), r.playing && s)
|
|
653
|
+
try {
|
|
654
|
+
const d = s.originDuration !== void 0 ? s.originDuration * (1 - this.getProgress()) : void 0, a = this.playKeyframe(s.keyframe, { duration: d });
|
|
655
|
+
i.currentPlayQueue.push(a);
|
|
656
|
+
} catch (d) {
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* @description Get duration by speed
|
|
661
|
+
*/
|
|
662
|
+
getSpeededDuration(e) {
|
|
663
|
+
return e / this.state.speed;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* @description Get ratate progress
|
|
667
|
+
*/
|
|
668
|
+
getProgress() {
|
|
669
|
+
return this.five.controller.cameraMotion.progress;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* @description Change five mode
|
|
673
|
+
*/
|
|
674
|
+
changeMode(e, t) {
|
|
675
|
+
return v(this, null, function* () {
|
|
676
|
+
e.mode && e.mode !== this.five.currentMode && (this.privateState.modeChanging = !0, yield this.five.changeMode(e.mode, e, t), this.privateState.modeChanging = !1);
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* @description Force interupt five updateCamera
|
|
681
|
+
*/
|
|
682
|
+
forceInteruptUpdateCamera() {
|
|
683
|
+
this.five.updateCamera({}, 0);
|
|
684
|
+
}
|
|
685
|
+
getPauseData() {
|
|
686
|
+
var e, t;
|
|
687
|
+
if ((e = this.data) != null && e.keyframesId)
|
|
688
|
+
return E.get((t = this.data) == null ? void 0 : t.keyframesId);
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* @description Set pause data
|
|
692
|
+
*/
|
|
693
|
+
setPauseData() {
|
|
694
|
+
var e, t, r, i;
|
|
695
|
+
if ((e = this.data) != null && e.keyframesId)
|
|
696
|
+
return E.set((t = this.data) == null ? void 0 : t.keyframesId, {
|
|
697
|
+
keyframeId: (r = this.privateState.currentPlayKeyframe) == null ? void 0 : r.keyframe.id,
|
|
698
|
+
fiveState: this.five.getCurrentState(),
|
|
699
|
+
duration: (i = this.privateState.currentPlayKeyframe) == null ? void 0 : i.originDuration,
|
|
700
|
+
playedProgress: this.getProgress()
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* @description Clear pause data
|
|
705
|
+
*/
|
|
706
|
+
clearPauseData() {
|
|
707
|
+
var e, t;
|
|
708
|
+
if ((e = this.data) != null && e.keyframesId)
|
|
709
|
+
return E.delete((t = this.data) == null ? void 0 : t.keyframesId);
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* @description: Restore state that before loaded
|
|
713
|
+
*/
|
|
714
|
+
clear() {
|
|
715
|
+
this.clearPauseData(), this.privateState.currentPlayKeyframe = null;
|
|
716
|
+
}
|
|
717
|
+
// TODO
|
|
718
|
+
handleDispose() {
|
|
719
|
+
var e, t;
|
|
720
|
+
this.setState({ playing: !1 }), this.clearPauseData(), this.clear(), (e = this.GuideLine) == null || e.dispose(), this.GuideLine = void 0, (t = this.privateState.disposers) == null || t.forEach((r) => r == null ? void 0 : r());
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* @description Action function if plugin is enable
|
|
724
|
+
*/
|
|
725
|
+
actionIfStateIsEnabled(e, t) {
|
|
726
|
+
if (this.state.enabled)
|
|
727
|
+
return e();
|
|
728
|
+
t != null && t.warnLog && W();
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* @description: Wait for five work ready
|
|
732
|
+
*/
|
|
733
|
+
waitFiveLoaded() {
|
|
734
|
+
return v(this, null, function* () {
|
|
735
|
+
return new Promise((e) => {
|
|
736
|
+
if (this.five.work) {
|
|
737
|
+
e();
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
this.five.once("loaded", () => {
|
|
741
|
+
e();
|
|
742
|
+
});
|
|
743
|
+
});
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
setFiveLinearUpdateCamera() {
|
|
747
|
+
this.privateState.fiveOriginGetProgress && (this.five.controller.cameraMotion.getProgress = (e) => {
|
|
748
|
+
const t = this.five.controller.cameraMotion, r = e - t.startTime;
|
|
749
|
+
return r < 0 ? 0 : r >= t.duration ? 1 : 1 - H(1, t.startVelocity, t.duration, r);
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
setFiveOriginUpdateCamera() {
|
|
753
|
+
this.privateState.fiveOriginGetProgress && (this.five.controller.cameraMotion.getProgress = this.privateState.fiveOriginGetProgress);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
I(z, "PluginVersion", M);
|
|
757
|
+
export {
|
|
758
|
+
z as default,
|
|
759
|
+
sr as pluginFlag
|
|
760
|
+
};
|