@realsee/dnalogel 2.28.0-dev.0 → 2.28.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 +94 -0
- package/dist/AreaMakerPlugin/index.d.ts +4 -0
- package/dist/AreaMakerPlugin/typing.d.ts +148 -0
- package/dist/AreaMakerPlugin/utils/Item.d.ts +114 -0
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
- package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +1 -1
- package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +2 -4
- package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +2 -0
- package/dist/base/BasePluginWithData.d.ts +1 -1
- package/dist/components/AreaLabel/Assets/roomLabelBg.d.ts +1 -0
- package/dist/floorplan/index.d.ts +0 -1
- package/dist/floorplan/utils/correctFiveState.d.ts +2 -0
- package/dist/index.cjs.js +67 -67
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6898 -7187
- package/dist/index.umd.js +60 -60
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/math/planimetry.d.ts +1 -1
- package/dist/shared-utils/three/core/Object3D.d.ts +8 -0
- package/dist/shared-utils/three/index.d.ts +2 -0
- package/dist/shared-utils/three/loadVideoTexture.d.ts +1 -1
- package/dist/shared-utils/three/objects/LineSegments.d.ts +9 -0
- package/libs/AreaMakerPlugin/Controller.d.ts +94 -0
- package/libs/AreaMakerPlugin/Controller.js +336 -0
- package/libs/AreaMakerPlugin/index.d.ts +4 -0
- package/libs/AreaMakerPlugin/index.js +37 -0
- package/libs/AreaMakerPlugin/typing.d.ts +148 -0
- package/libs/AreaMakerPlugin/utils/Item.d.ts +114 -0
- package/libs/AreaMakerPlugin/utils/Item.js +263 -0
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +42 -39
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +13 -13
- package/libs/PanoTagPlugin/controller/TagRender.js +19 -18
- package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +1 -1
- package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +2 -4
- package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +2 -0
- package/libs/PanoTagPlugin/utils/model/mediaPlane.js +10 -10
- package/libs/base/BasePlugin.js +1 -1
- package/libs/base/BasePluginWithData.d.ts +1 -1
- package/libs/components/AreaLabel/Assets/roomLabelBg.d.ts +1 -0
- package/libs/components/AreaLabel/Assets/roomLabelBg.js +4 -0
- package/libs/components/AreaLabel/LabelItem.js +125 -0
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +49 -48
- package/libs/floorplan/index.d.ts +0 -1
- package/libs/floorplan/utils/correctFiveState.d.ts +2 -0
- package/libs/floorplan/utils/correctFiveState.js +28 -28
- package/libs/index.d.ts +1 -0
- package/libs/index.js +120 -122
- package/libs/shared-utils/device.js +0 -1
- package/libs/shared-utils/five/changeMode.js +32 -29
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +27 -21
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/planimetry.d.ts +1 -1
- package/libs/shared-utils/math/planimetry.js +36 -29
- package/libs/shared-utils/three/core/Object3D.d.ts +8 -0
- package/libs/shared-utils/three/core/Object3D.js +22 -0
- package/libs/shared-utils/three/index.d.ts +2 -0
- package/libs/shared-utils/three/loadVideoTexture.d.ts +1 -1
- package/libs/shared-utils/three/loadVideoTexture.js +6 -6
- package/libs/shared-utils/three/objects/LineSegments.d.ts +9 -0
- package/libs/shared-utils/three/objects/LineSegments.js +9 -0
- package/libs/vendor/svelte/internal/index.js +79 -85
- package/package.json +2 -2
- package/dist/floorplan/FloorplanRoomsPlugin/BasePlugin.d.ts +0 -114
- package/dist/floorplan/FloorplanRoomsPlugin/BasePluginWithData.d.ts +0 -23
- package/dist/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/Room.svelte.d.ts +0 -1
- package/dist/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/RoomHighlight.svelte.d.ts +0 -1
- package/dist/floorplan/FloorplanRoomsPlugin/Components/Main.svelte.d.ts +0 -1
- package/dist/floorplan/FloorplanRoomsPlugin/Controller.d.ts +0 -40
- package/dist/floorplan/FloorplanRoomsPlugin/index.d.ts +0 -6
- package/dist/floorplan/FloorplanRoomsPlugin/typing.d.ts +0 -60
- 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/CSS3DRender.html +0 -770
- package/docs/classes/CruisePluginController.html +0 -669
- package/docs/classes/GuideLineItem.GuideLineItem.html +0 -488
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +0 -789
- package/docs/classes/Magnifier.html +0 -477
- package/docs/classes/ModelRoomLabelController.html +0 -395
- package/docs/classes/Object3DHelperController.html +0 -637
- package/docs/classes/PaintBrush.html +0 -499
- package/docs/classes/PanoMeasurePluginLine.html +0 -519
- package/docs/classes/PanoMeasurePluginModel.html +0 -568
- package/docs/classes/PanoMeasurePluginPoint.html +0 -359
- package/docs/classes/PanoMeasurePluginPolyline.html +0 -564
- package/docs/classes/PanoTagPluginController.html +0 -1087
- package/docs/classes/Util.BetterTween.html +0 -409
- package/docs/classes/Util.Interval.html +0 -425
- package/docs/classes/Util.Magnifier.html +0 -496
- package/docs/classes/Util.PointDomHelper.html +0 -400
- package/docs/classes/Util.PointHelper.html +0 -391
- package/docs/classes/Util.PointSelectorHelper.html +0 -447
- package/docs/classes/Util.Rectangle.html +0 -448
- package/docs/enums/CameraMovementEffect.html +0 -307
- package/docs/enums/ContentType.html +0 -443
- package/docs/enums/DIRECTION.html +0 -317
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +0 -317
- package/docs/enums/DimensionType.html +0 -307
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +0 -310
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +0 -317
- package/docs/enums/PaintBrushTypeEnum.html +0 -310
- package/docs/enums/PointType.html +0 -307
- package/docs/enums/Rotation.html +0 -314
- package/docs/functions/CSS3DRenderPlugin.html +0 -285
- package/docs/functions/CameraMovementPlugin.html +0 -290
- package/docs/functions/CruisePlugin.html +0 -287
- package/docs/functions/FloorplanRoomsPlugin.html +0 -285
- package/docs/functions/GuideLinePlugin.html +0 -287
- package/docs/functions/ItemLabelPlugin.html +0 -287
- package/docs/functions/MapviewFloorplanPlugin.html +0 -287
- package/docs/functions/ModelChassisCompassPlugin.html +0 -290
- package/docs/functions/ModelEntryDoorGuidePlugin.html +0 -290
- package/docs/functions/ModelFloorplanPlugin.html +0 -287
- package/docs/functions/ModelItemLabelPlugin.html +0 -287
- package/docs/functions/ModelRoomLabelPlugin.html +0 -285
- package/docs/functions/ModelTVVideoPlugin.html +0 -287
- package/docs/functions/ModelViewPlugin.html +0 -290
- package/docs/functions/Object3DHelperPlugin.html +0 -285
- package/docs/functions/PanoCompassPlugin.html +0 -287
- package/docs/functions/PanoCursorRaycasterPlugin.html +0 -291
- package/docs/functions/PanoDoorLabelPlugin.html +0 -287
- package/docs/functions/PanoFloorplanRadarPlugin.html +0 -287
- package/docs/functions/PanoMeasurePlugin.html +0 -287
- package/docs/functions/PanoRulerPlugin.html +0 -290
- package/docs/functions/PanoRulerProPlugin.html +0 -290
- package/docs/functions/PanoSpatialTagPlugin.html +0 -290
- package/docs/functions/PanoTagPlugin.html +0 -292
- package/docs/functions/PanoVideoPlugin.html +0 -296
- package/docs/functions/PipelinePlugin.html +0 -285
- package/docs/functions/TopviewFloorplanPlugin.html +0 -287
- package/docs/functions/Util.absoluteUrl.html +0 -319
- package/docs/functions/Util.getCoordsFromClient.html +0 -321
- package/docs/functions/Util.getCoordsFromElement.html +0 -321
- package/docs/functions/Util.getFrameTime.html +0 -313
- package/docs/functions/Util.getIntersectFromRelativePosition.html +0 -321
- package/docs/functions/Util.getRaycasterFromFivePointer.html +0 -321
- package/docs/functions/Util.isAbsoluteURL.html +0 -314
- package/docs/functions/Util.isModelLike.html +0 -314
- package/docs/functions/Util.isNil.html +0 -322
- package/docs/functions/Util.isPanoramaLike.html +0 -314
- package/docs/functions/Util.nextFrame.html +0 -327
- package/docs/functions/Util.notNil.html +0 -322
- package/docs/functions/Util.requestAnimationFrameInterval.html +0 -343
- package/docs/functions/Util.tweenProgress.html +0 -316
- package/docs/functions/Util.uuid.html +0 -312
- package/docs/functions/pluginFlag.html +0 -285
- package/docs/index.html +0 -351
- package/docs/interfaces/AddTagConfig.html +0 -300
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +0 -446
- package/docs/interfaces/CSS3DRenderPluginState.html +0 -322
- package/docs/interfaces/CameraMovementPluginExportType.html +0 -355
- package/docs/interfaces/CruisePluginTypes.Config.html +0 -356
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +0 -358
- package/docs/interfaces/CruisePluginTypes.EventMap.html +0 -693
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +0 -382
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +0 -418
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +0 -408
- package/docs/interfaces/CruisePluginTypes.PluginData.html +0 -348
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +0 -316
- package/docs/interfaces/CruisePluginTypes.PluginState.html +0 -405
- package/docs/interfaces/EventMap.html +0 -539
- package/docs/interfaces/FloorplanBounding.html +0 -329
- package/docs/interfaces/FloorplanData.html +0 -332
- package/docs/interfaces/FloorplanEntrance.html +0 -357
- package/docs/interfaces/FloorplanExtraObject.html +0 -347
- package/docs/interfaces/FloorplanExtraObject3D.html +0 -336
- package/docs/interfaces/FloorplanFloorData.html +0 -325
- package/docs/interfaces/FloorplanImagePosition.html +0 -311
- package/docs/interfaces/FloorplanObserver.html +0 -329
- package/docs/interfaces/FloorplanOutlineItem.html +0 -325
- package/docs/interfaces/FloorplanPosition.html +0 -311
- package/docs/interfaces/FloorplanRoomItem.html +0 -376
- package/docs/interfaces/FloorplanRoomLabelItem.html +0 -317
- package/docs/interfaces/FloorplanServerBounding.html +0 -329
- package/docs/interfaces/FloorplanServerComputedData.html +0 -328
- package/docs/interfaces/FloorplanServerData.html +0 -311
- package/docs/interfaces/FloorplanServerDoorItem.html +0 -328
- package/docs/interfaces/FloorplanServerDoorPosition.html +0 -314
- package/docs/interfaces/FloorplanServerEntrance.html +0 -357
- package/docs/interfaces/FloorplanServerFloorData.html +0 -325
- package/docs/interfaces/FloorplanServerImagePosition.html +0 -311
- package/docs/interfaces/FloorplanServerObserver.html +0 -329
- package/docs/interfaces/FloorplanServerOutlineItem.html +0 -325
- package/docs/interfaces/FloorplanServerPosition.html +0 -311
- package/docs/interfaces/FloorplanServerRoomItem.html +0 -388
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +0 -317
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +0 -320
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +0 -358
- package/docs/interfaces/GuideLinePluginType.EventMap.html +0 -522
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +0 -353
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +0 -344
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +0 -411
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +0 -343
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +0 -468
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +0 -340
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +0 -468
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +0 -305
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +0 -326
- package/docs/interfaces/GuideLinePluginType.PluginState.html +0 -351
- package/docs/interfaces/GuideLinePluginType.Route.html +0 -367
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +0 -349
- package/docs/interfaces/HelperOffset.html +0 -329
- package/docs/interfaces/ImagePlaneGroup.html +0 -303
- package/docs/interfaces/ItemLabelPluginData.html +0 -300
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +0 -385
- package/docs/interfaces/ItemLabelPluginParametersType.html +0 -321
- package/docs/interfaces/MinMax.html +0 -307
- package/docs/interfaces/ModelChassisCompassPluginData.html +0 -307
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +0 -343
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +0 -307
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +0 -314
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +0 -351
- package/docs/interfaces/ModelItemLabelPluginData.html +0 -300
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +0 -385
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +0 -307
- package/docs/interfaces/ModelRoomLabelPluginData.html +0 -300
- package/docs/interfaces/ModelTVVideoPluginData.html +0 -321
- package/docs/interfaces/ModelTVVideoPluginExportType.html +0 -345
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +0 -300
- package/docs/interfaces/ModelViewPluginExportType.html +0 -413
- package/docs/interfaces/Object3DHelperState.html +0 -314
- package/docs/interfaces/ObjectHelperControllers.html +0 -321
- package/docs/interfaces/PaintBrushAction.html +0 -360
- package/docs/interfaces/PaintBrushConfigs.html +0 -358
- package/docs/interfaces/PaintBrushState.html +0 -342
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +0 -422
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +0 -279
- package/docs/interfaces/PanoMeasureParameterType.html +0 -446
- package/docs/interfaces/PanoMeasurePluginLineJson.html +0 -314
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +0 -311
- package/docs/interfaces/PanoMeasurePluginPointJson.html +0 -307
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +0 -317
- package/docs/interfaces/PanoRulerPluginExportType.html +0 -374
- package/docs/interfaces/PanoRulerPluginOptions.html +0 -323
- package/docs/interfaces/PanoRulerPluginParameterType.html +0 -314
- package/docs/interfaces/PanoRulerProPluginExportType.html +0 -350
- package/docs/interfaces/PanoRulerProPluginOptions.html +0 -320
- package/docs/interfaces/PanoRulerProPluginParameterType.html +0 -307
- package/docs/interfaces/PanoRulerProPluginState.html +0 -314
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +0 -293
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +0 -282
- package/docs/interfaces/PanoSpatialTagPluginData.html +0 -350
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +0 -332
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +0 -428
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +0 -328
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +0 -349
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +0 -335
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +0 -328
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +0 -320
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +0 -338
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +0 -311
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +0 -417
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +0 -311
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +0 -346
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +0 -365
- package/docs/interfaces/Point.html +0 -314
- package/docs/interfaces/Room.html +0 -321
- package/docs/interfaces/RoomInfo.html +0 -307
- package/docs/interfaces/RoomLabel.html +0 -383
- package/docs/interfaces/RoomRules.html +0 -282
- package/docs/interfaces/Rooms.html +0 -282
- package/docs/interfaces/Scissor.html +0 -341
- package/docs/interfaces/State.html +0 -328
- package/docs/interfaces/TagCacheInterface.html +0 -352
- package/docs/interfaces/TagConfig.html +0 -542
- package/docs/interfaces/TagGLTFObjectGroup.html +0 -303
- package/docs/interfaces/TagIconUrl.html +0 -360
- package/docs/interfaces/TagObjectGroup.html +0 -303
- package/docs/interfaces/TagStyle.html +0 -313
- package/docs/interfaces/Tags.html +0 -543
- package/docs/interfaces/TemporaryState.html +0 -300
- package/docs/interfaces/Util.MagnifierParameter.html +0 -384
- package/docs/interfaces/Util.MouseGroupParameter.html +0 -343
- package/docs/interfaces/Util.PointIntersection.html +0 -358
- package/docs/modules/CruisePluginTypes.html +0 -325
- package/docs/modules/GuideLineItem.html +0 -286
- package/docs/modules/GuideLineModeItem.html +0 -291
- package/docs/modules/GuideLinePluginType.html +0 -345
- package/docs/modules/PanoVideoPluginType.html +0 -298
- package/docs/modules/Util.html +0 -340
- package/docs/modules.html +0 -534
- package/docs/types/ArrayPosition.html +0 -276
- package/docs/types/AudioAppearance.html +0 -276
- package/docs/types/AudioTagTypeConfigKey.html +0 -276
- package/docs/types/CSS3DRenderExportType.html +0 -276
- package/docs/types/CSS3DRenderPluginExportType.html +0 -276
- package/docs/types/CSS3DRenderPluginParameterType.html +0 -276
- package/docs/types/ClassFunctionParameters.html +0 -283
- package/docs/types/Color.html +0 -276
- package/docs/types/ContentTypeConfigKey.html +0 -276
- package/docs/types/ContentTypeConfigKeySplit.html +0 -276
- package/docs/types/ContentTypeMap.html +0 -276
- package/docs/types/Create3DDomContainerReturnType.html +0 -276
- package/docs/types/Create3DElementReturnType.html +0 -276
- package/docs/types/CruisePluginExportType.html +0 -276
- package/docs/types/CruisePluginTypes.CruiseData.html +0 -315
- package/docs/types/CruisePluginTypes.MoveEffect.html +0 -292
- package/docs/types/DeprecatedMediaPlaneProperty.html +0 -288
- package/docs/types/DeprecatedTagProperty.html +0 -291
- package/docs/types/Direction-1.html +0 -276
- package/docs/types/Direction4.html +0 -276
- package/docs/types/ElementRenderer.html +0 -300
- package/docs/types/FloorplanRoomsPluginParameterType.html +0 -276
- package/docs/types/FloorplanRoomsPluginReturnType.html +0 -276
- package/docs/types/FloorplanRuleLabels.html +0 -279
- package/docs/types/FloorplanServerRuleLabels.html +0 -276
- package/docs/types/GuideLinePluginExportType.html +0 -276
- package/docs/types/GuideLinePluginType.GuideLineItem.html +0 -348
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +0 -369
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +0 -302
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +0 -305
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +0 -305
- package/docs/types/GuideLinePluginType.PathItem.html +0 -305
- package/docs/types/GuideLinePluginType.PluginData.html +0 -314
- package/docs/types/HelperEventMap.html +0 -514
- package/docs/types/LoadTagConfig.html +0 -276
- package/docs/types/MapviewFloorplanPluginParameterType.html +0 -276
- package/docs/types/MapviewFloorplanPluginReturnType.html +0 -276
- package/docs/types/MediaData.html +0 -292
- package/docs/types/MediaStore.html +0 -281
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +0 -283
- package/docs/types/ModelFloorplanPluginParameterType.html +0 -276
- package/docs/types/ModelFloorplanPluginReturnType.html +0 -276
- package/docs/types/ModelRoomLabelPluginParameters.html +0 -276
- package/docs/types/ModelRoomLabelPluginReturnType.html +0 -276
- package/docs/types/MoveArgs.html +0 -286
- package/docs/types/MoveOpts.html +0 -284
- package/docs/types/Object3DHelperEventMap.html +0 -369
- package/docs/types/ObjectFit.html +0 -276
- package/docs/types/PaintBrushEventMap.html +0 -307
- package/docs/types/PanoCompassPluginData.html +0 -276
- package/docs/types/PanoCompassPluginExportType.html +0 -276
- package/docs/types/PanoCompassPluginParameterType.html +0 -276
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +0 -276
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +0 -276
- package/docs/types/PanoIndex.html +0 -276
- package/docs/types/PanoMeasurePluginEvent.html +0 -276
- package/docs/types/PanoMeasureReturnType.html +0 -276
- package/docs/types/PanoSpatialTagPluginId.html +0 -276
- package/docs/types/PanoTagPluginExportInterface.html +0 -276
- package/docs/types/PanoTagPluginParamsInterface.html +0 -276
- package/docs/types/PanoVideoPluginParameterType.html +0 -276
- package/docs/types/PanoVideoPluginReturnType.html +0 -276
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +0 -284
- package/docs/types/PipelinePluginParameterType.html +0 -276
- package/docs/types/PipelinePluginReturnType.html +0 -276
- package/docs/types/PlaneTag.html +0 -284
- package/docs/types/Point2DTag.html +0 -284
- package/docs/types/Point3DTag.html +0 -284
- package/docs/types/PointTag.html +0 -281
- package/docs/types/PointTagInstance.html +0 -281
- package/docs/types/Position.html +0 -276
- package/docs/types/RotateArgs.html +0 -288
- package/docs/types/RotateOpts.html +0 -284
- package/docs/types/RuleLabelsKey.html +0 -276
- package/docs/types/RuleLabelsValue.html +0 -276
- package/docs/types/StickType.html +0 -276
- package/docs/types/Tag.html +0 -342
- package/docs/types/Tag2D.html +0 -284
- package/docs/types/Tag3D.html +0 -284
- package/docs/types/TagConfigByKey.html +0 -281
- package/docs/types/TagContentType.html +0 -276
- package/docs/types/TagDimensionType.html +0 -278
- package/docs/types/TagElement.html +0 -286
- package/docs/types/TagEvents.html +0 -329
- package/docs/types/TagGLTFObject.html +0 -299
- package/docs/types/TagHooks.html +0 -276
- package/docs/types/TagId.html +0 -276
- package/docs/types/TagInstance.html +0 -348
- package/docs/types/TagPointType.html +0 -279
- package/docs/types/TagRendererMap.html +0 -281
- package/docs/types/TopviewFloorplanPluginParameterType.html +0 -276
- package/docs/types/TopviewFloorplanPluginReturnType.html +0 -276
- package/docs/types/WorkCode.html +0 -276
- package/docs/variables/FLOOR_TYPE_MAP.html +0 -286
- package/docs/variables/PLUGIN.html +0 -276
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +0 -279
- package/docs/variables/ROOM_TYPE_MAP.html +0 -286
- package/docs/variables/defaultGlobalConfig.html +0 -276
- package/docs/variables/itemLabelPluginServerParams.html +0 -283
- package/docs/variables/modelItemLabelPluginServerParams.html +0 -283
- package/docs/variables/modelRoomLabelPluginServerParams.html +0 -283
- package/libs/floorplan/FloorplanRoomsPlugin/BasePlugin.d.ts +0 -114
- package/libs/floorplan/FloorplanRoomsPlugin/BasePlugin.js +0 -51
- package/libs/floorplan/FloorplanRoomsPlugin/BasePluginWithData.d.ts +0 -23
- package/libs/floorplan/FloorplanRoomsPlugin/BasePluginWithData.js +0 -25
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/CurrentFloor.js +0 -188
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/CurrentFloor.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/ExtraObjects.js +0 -94
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/ExtraObjects.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/Room.js +0 -111
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/Room.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/RoomHighlight.js +0 -191
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/RoomHighlight.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Components/Main.js +0 -237
- package/libs/floorplan/FloorplanRoomsPlugin/Components/Main.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Controller.d.ts +0 -40
- package/libs/floorplan/FloorplanRoomsPlugin/Controller.js +0 -207
- package/libs/floorplan/FloorplanRoomsPlugin/index.d.ts +0 -6
- package/libs/floorplan/FloorplanRoomsPlugin/index.js +0 -43
- package/libs/floorplan/FloorplanRoomsPlugin/typing.d.ts +0 -60
- /package/dist/{floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/CurrentFloor.svelte.d.ts → components/AreaLabel/LabelItem.svelte.d.ts} +0 -0
- /package/libs/{floorplan/FloorplanRoomsPlugin → AreaMakerPlugin}/typing.js +0 -0
- /package/{dist/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/ExtraObjects.svelte.d.ts → libs/components/AreaLabel/LabelItem.svelte.d.ts} +0 -0
|
@@ -111,6 +111,6 @@ export declare function getCenterPointOfPoints(points: Point[]): {
|
|
|
111
111
|
x: number;
|
|
112
112
|
y: number;
|
|
113
113
|
};
|
|
114
|
-
export declare function isIntersect(linePoints1: Point[], linePoints2: Point[]):
|
|
114
|
+
export declare function isIntersect(linePoints1: Point[], linePoints2: Point[]): 1 | 0;
|
|
115
115
|
export declare function getAreaSize(points: Point[]): number;
|
|
116
116
|
export declare function getAreaSizeWithoutLine(points: Point[]): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare class Object3D<ChildeItem extends THREE.Object3D = THREE.Object3D> extends THREE.Object3D {
|
|
3
|
+
children: ChildeItem[];
|
|
4
|
+
/** 获取 raycaster 与当前物体的交点 */
|
|
5
|
+
getRaycastIntersects(raycaster: THREE.Raycaster): THREE.Intersection[];
|
|
6
|
+
/** 获取 raycaster 与当前物体的第一个交点 */
|
|
7
|
+
getRaycastIntersection(raycaster: THREE.Raycaster): THREE.Intersection;
|
|
8
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import type { Overwrite } from '../../typings/utils.type';
|
|
3
3
|
export default function loadVideoTexture(src: string, videoElement?: HTMLVideoElement): Promise<Overwrite<THREE.VideoTexture, {
|
|
4
4
|
image: HTMLVideoElement;
|
|
5
5
|
}>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @file three.js 中声明有问题,这里重载一下声明 */
|
|
2
|
+
import type { Geometry, BufferGeometry, Material } from 'three';
|
|
3
|
+
import { LineSegments as OriginLineSegments } from 'three';
|
|
4
|
+
declare class LineSegments<TGeometry extends Geometry | BufferGeometry = Geometry | BufferGeometry, TMaterial extends Material | Material[] = Material | Material[]> extends OriginLineSegments<TGeometry, TMaterial> {
|
|
5
|
+
geometry: TGeometry;
|
|
6
|
+
material: TMaterial;
|
|
7
|
+
constructor(geometry: TGeometry, material: TMaterial);
|
|
8
|
+
}
|
|
9
|
+
export { LineSegments };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { Five } from '@realsee/five';
|
|
3
|
+
import * as BasePlugin from '../base/BasePluginWithData';
|
|
4
|
+
import { AreaMakerItem } from './utils/Item';
|
|
5
|
+
import type * as PluginType from './typing';
|
|
6
|
+
export declare class Controller extends BasePlugin.Controller<PluginType.State, PluginType.EventMap, PluginType.ServerData, PluginType.PluginData> {
|
|
7
|
+
/** 插件当前状态 */
|
|
8
|
+
state: PluginType.State;
|
|
9
|
+
/** 标注模型 { id: item } 的映射表 */
|
|
10
|
+
itemMap: Map<string | number, AreaMakerItem>;
|
|
11
|
+
/** 标注模型容器 */
|
|
12
|
+
modelGroup: THREE.Group;
|
|
13
|
+
/** 当前使用的数据 */
|
|
14
|
+
data?: PluginType.PluginData;
|
|
15
|
+
/** tag 容器 */
|
|
16
|
+
tagDomContainer: HTMLDivElement;
|
|
17
|
+
/** 插件配置项 */
|
|
18
|
+
get config(): {
|
|
19
|
+
modelDepthTest: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** 是否已经被销毁 */
|
|
22
|
+
get disposed(): boolean;
|
|
23
|
+
/** 查询问题使用的调试对象 */
|
|
24
|
+
checkMsg: {
|
|
25
|
+
childrenMountedState: string;
|
|
26
|
+
};
|
|
27
|
+
/** 是否在 Five Change Mode 动画中 */
|
|
28
|
+
private isInFiveChangeModeAnime;
|
|
29
|
+
/** 子组件是否挂载 */
|
|
30
|
+
private childrenMountedState;
|
|
31
|
+
/** config 的原始值 */
|
|
32
|
+
private _config;
|
|
33
|
+
/** disposed 的原始值 */
|
|
34
|
+
private _disposed;
|
|
35
|
+
/** AreaMakerPlugin
|
|
36
|
+
* @param `five` `<Five>` Five 实例
|
|
37
|
+
* @param `params` `<PluginType.Params> | <undefined>` 插件初始化参数
|
|
38
|
+
* @param `params.initialState` `<PluginType.State> | <undefined>` 插件初始化后,使用的状态
|
|
39
|
+
*/
|
|
40
|
+
constructor(five: Five, params?: PluginType.Params);
|
|
41
|
+
/** 加载数据,重复调用会使用新数据覆盖旧数据 */
|
|
42
|
+
load(data: PluginType.ServerData): Promise<void>;
|
|
43
|
+
/** 将插件的 DOM 容器添加到指定的 DOM 元素上 */
|
|
44
|
+
appendTo(wrapper: Element): void;
|
|
45
|
+
/** 启用插件
|
|
46
|
+
* @param `options` `<Option> | <undefined>`
|
|
47
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
48
|
+
*/
|
|
49
|
+
enable(options?: BasePlugin.BaseOptions): void;
|
|
50
|
+
/** 禁用插件
|
|
51
|
+
* @param `options` `<Option> | <undefined>`
|
|
52
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
53
|
+
*/
|
|
54
|
+
disable(options?: BasePlugin.BaseOptions): void;
|
|
55
|
+
/** 展示标注
|
|
56
|
+
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
57
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
58
|
+
*/
|
|
59
|
+
show(options?: Partial<PluginType.ShowHideOptions>): Promise<void>;
|
|
60
|
+
/** 插件内容整体隐藏
|
|
61
|
+
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
62
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
63
|
+
*/
|
|
64
|
+
hide(options?: Partial<PluginType.ShowHideOptions>): Promise<void>;
|
|
65
|
+
/** 更改插件 State
|
|
66
|
+
* @param `state` `<Partial<Plugin.State>>` 插件属性 `state` 的子集。
|
|
67
|
+
* @param `options` `<Option> | <undefined>`
|
|
68
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
69
|
+
*/
|
|
70
|
+
setState(state: Partial<PluginType.State>, options?: BasePlugin.BaseOptions): void;
|
|
71
|
+
/** 更改插件 Config
|
|
72
|
+
* @param `config` `<Partial<Plugin.Config>>` 插件属性 `config` 的子集。
|
|
73
|
+
* @param `options` `<Option> | <undefined>`
|
|
74
|
+
*/
|
|
75
|
+
updateConfig(config: Partial<PluginType.Config>, options?: BasePlugin.BaseOptions): void;
|
|
76
|
+
/** 根据 ID 获取标注 */
|
|
77
|
+
getMaskItemByID(id: string | number): AreaMakerItem;
|
|
78
|
+
/** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
|
|
79
|
+
dispose: () => void;
|
|
80
|
+
protected formatData(serverData: PluginType.ServerData): PluginType.PluginData;
|
|
81
|
+
private checkChildrenMountedState;
|
|
82
|
+
private updateChildrenMountedState;
|
|
83
|
+
private onFiveInitAnimationWillStart;
|
|
84
|
+
private onFiveInitAnimationEnded;
|
|
85
|
+
private onFiveCameraUpdate;
|
|
86
|
+
private onFiveModeChange;
|
|
87
|
+
private onMakerTagClick;
|
|
88
|
+
private updateState;
|
|
89
|
+
private _enable;
|
|
90
|
+
private onWantsFiveTapGesture;
|
|
91
|
+
private _disable;
|
|
92
|
+
private _show;
|
|
93
|
+
private _hide;
|
|
94
|
+
}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
var C = Object.defineProperty, M = Object.defineProperties;
|
|
2
|
+
var A = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var f = Object.getOwnPropertySymbols;
|
|
4
|
+
var S = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var m = (h, o, t) => o in h ? C(h, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[o] = t, d = (h, o) => {
|
|
6
|
+
for (var t in o || (o = {}))
|
|
7
|
+
S.call(o, t) && m(h, t, o[t]);
|
|
8
|
+
if (f)
|
|
9
|
+
for (var t of f(o))
|
|
10
|
+
_.call(o, t) && m(h, t, o[t]);
|
|
11
|
+
return h;
|
|
12
|
+
}, p = (h, o) => M(h, A(o));
|
|
13
|
+
var r = (h, o, t) => (m(h, typeof o != "symbol" ? o + "" : o, t), t);
|
|
14
|
+
var u = (h, o, t) => new Promise((i, e) => {
|
|
15
|
+
var s = (n) => {
|
|
16
|
+
try {
|
|
17
|
+
c(t.next(n));
|
|
18
|
+
} catch (l) {
|
|
19
|
+
e(l);
|
|
20
|
+
}
|
|
21
|
+
}, a = (n) => {
|
|
22
|
+
try {
|
|
23
|
+
c(t.throw(n));
|
|
24
|
+
} catch (l) {
|
|
25
|
+
e(l);
|
|
26
|
+
}
|
|
27
|
+
}, c = (n) => n.done ? i(n.value) : Promise.resolve(n.value).then(s, a);
|
|
28
|
+
c((t = t.apply(h, o)).next());
|
|
29
|
+
});
|
|
30
|
+
import * as g from "three";
|
|
31
|
+
import { Controller as k } from "../base/BasePluginWithData.js";
|
|
32
|
+
import "hammerjs";
|
|
33
|
+
import "@realsee/five";
|
|
34
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
35
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
36
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
37
|
+
import { equal as I } from "../shared-utils/equal.js";
|
|
38
|
+
import { AreaMakerItem as D } from "./utils/Item.js";
|
|
39
|
+
import "../base/BasePlugin.js";
|
|
40
|
+
import "../shared-utils/Subscribe.js";
|
|
41
|
+
import "../shared-utils/absoluteUrl.js";
|
|
42
|
+
import "../shared-utils/positionToVector3.js";
|
|
43
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
44
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
45
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
46
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
47
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
48
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
49
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
50
|
+
import "../shared-utils/three/centerPoint.js";
|
|
51
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
52
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
53
|
+
import "../shared-utils/isTruelyObject.js";
|
|
54
|
+
import "../shared-utils/three/core/Object3D.js";
|
|
55
|
+
import "../shared-utils/three/objects/LineSegments.js";
|
|
56
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
57
|
+
import "../shared-utils/animationFrame/index.js";
|
|
58
|
+
import "../components/AreaLabel/LabelItem.js";
|
|
59
|
+
import "../vendor/svelte/internal/index.js";
|
|
60
|
+
import "../components/AreaLabel/Assets/roomLabelBg.js";
|
|
61
|
+
import "../shared-utils/math/planimetry.js";
|
|
62
|
+
class ot extends k {
|
|
63
|
+
/** AreaMakerPlugin
|
|
64
|
+
* @param `five` `<Five>` Five 实例
|
|
65
|
+
* @param `params` `<PluginType.Params> | <undefined>` 插件初始化参数
|
|
66
|
+
* @param `params.initialState` `<PluginType.State> | <undefined>` 插件初始化后,使用的状态
|
|
67
|
+
*/
|
|
68
|
+
constructor(t, i) {
|
|
69
|
+
super(t);
|
|
70
|
+
// ==================== public properties ====================
|
|
71
|
+
/** 插件当前状态 */
|
|
72
|
+
r(this, "state");
|
|
73
|
+
/** 标注模型 { id: item } 的映射表 */
|
|
74
|
+
r(this, "itemMap");
|
|
75
|
+
/** 标注模型容器 */
|
|
76
|
+
r(this, "modelGroup");
|
|
77
|
+
/** 当前使用的数据 */
|
|
78
|
+
r(this, "data");
|
|
79
|
+
/** tag 容器 */
|
|
80
|
+
r(this, "tagDomContainer");
|
|
81
|
+
/** 查询问题使用的调试对象 */
|
|
82
|
+
r(this, "checkMsg", {
|
|
83
|
+
childrenMountedState: ""
|
|
84
|
+
});
|
|
85
|
+
// ==================== private properties ====================
|
|
86
|
+
/** 是否在 Five Change Mode 动画中 */
|
|
87
|
+
r(this, "isInFiveChangeModeAnime", !1);
|
|
88
|
+
/** 子组件是否挂载 */
|
|
89
|
+
r(this, "childrenMountedState", !1);
|
|
90
|
+
/** config 的原始值 */
|
|
91
|
+
r(this, "_config");
|
|
92
|
+
/** disposed 的原始值 */
|
|
93
|
+
r(this, "_disposed", !1);
|
|
94
|
+
/** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
|
|
95
|
+
r(this, "dispose", () => {
|
|
96
|
+
this.five.scene.remove(this.modelGroup);
|
|
97
|
+
});
|
|
98
|
+
r(this, "onFiveInitAnimationWillStart", () => {
|
|
99
|
+
this.isInFiveChangeModeAnime = !0, this.updateChildrenMountedState();
|
|
100
|
+
});
|
|
101
|
+
r(this, "onFiveInitAnimationEnded", () => {
|
|
102
|
+
this.isInFiveChangeModeAnime = !1, this.updateChildrenMountedState();
|
|
103
|
+
});
|
|
104
|
+
r(this, "onFiveCameraUpdate", () => {
|
|
105
|
+
const t = this.five.camera;
|
|
106
|
+
[...this.itemMap.values()].sort((e, s) => {
|
|
107
|
+
const a = e.tagPosition.distanceTo(t.position);
|
|
108
|
+
return s.tagPosition.distanceTo(t.position) - a;
|
|
109
|
+
}).forEach((e, s) => {
|
|
110
|
+
var a;
|
|
111
|
+
(a = this.getMaskItemByID(e.id)) == null || a.setTagZIndex(s * 10);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
r(this, "onFiveModeChange", () => {
|
|
115
|
+
this.updateChildrenMountedState();
|
|
116
|
+
});
|
|
117
|
+
r(this, "onMakerTagClick", (t) => {
|
|
118
|
+
this.hooks.emit("wantsTap", { target: t.target, intersectObjects: [] });
|
|
119
|
+
});
|
|
120
|
+
r(this, "onWantsFiveTapGesture", (t) => {
|
|
121
|
+
const i = Array.from(this.itemMap.values()).filter((n) => n.mounted && n.visible).map((n) => ({
|
|
122
|
+
makerItem: n,
|
|
123
|
+
intersects: n.modelGroup.getRaycastIntersects(t)
|
|
124
|
+
})).filter(({ intersects: n }) => n.length > 0);
|
|
125
|
+
if (i.length === 0)
|
|
126
|
+
return;
|
|
127
|
+
const e = i.reduce((n, l) => {
|
|
128
|
+
const v = n.intersects[0].distance, b = l.intersects[0].distance;
|
|
129
|
+
return v < b ? n : l;
|
|
130
|
+
}), s = this.five.model.intersectRaycaster(t)[0];
|
|
131
|
+
if (this.config.modelDepthTest && s && s.distance < e.intersects[0].distance)
|
|
132
|
+
return;
|
|
133
|
+
if (this.hooks.emit("wantsTap", {
|
|
134
|
+
target: e.makerItem,
|
|
135
|
+
intersectObjects: e.intersects
|
|
136
|
+
}))
|
|
137
|
+
return !1;
|
|
138
|
+
});
|
|
139
|
+
this.five = t, this.tagDomContainer = document.createElement("div"), this.tagDomContainer.style.position = "absolute", this.tagDomContainer.style.top = "0", this.tagDomContainer.style.left = "0", this.tagDomContainer.style.width = "100%", this.tagDomContainer.style.height = "100%", this.tagDomContainer.style.pointerEvents = "none";
|
|
140
|
+
const e = {
|
|
141
|
+
enabled: !0,
|
|
142
|
+
visible: !0
|
|
143
|
+
};
|
|
144
|
+
this.state = Object.assign(e, i == null ? void 0 : i.initialState);
|
|
145
|
+
const s = d({
|
|
146
|
+
modelDepthTest: !0
|
|
147
|
+
}, i == null ? void 0 : i.config);
|
|
148
|
+
this._config = s, this.modelGroup = new g.Group(), this.modelGroup.name = "ModelMakerPluginGroup", this.itemMap = /* @__PURE__ */ new Map(), this.state.enabled && this._enable({ userAction: !1 });
|
|
149
|
+
}
|
|
150
|
+
/** 插件配置项 */
|
|
151
|
+
get config() {
|
|
152
|
+
return d({}, this._config);
|
|
153
|
+
}
|
|
154
|
+
/** 是否已经被销毁 */
|
|
155
|
+
get disposed() {
|
|
156
|
+
return this._disposed;
|
|
157
|
+
}
|
|
158
|
+
/** 加载数据,重复调用会使用新数据覆盖旧数据 */
|
|
159
|
+
load(t) {
|
|
160
|
+
return u(this, null, function* () {
|
|
161
|
+
const i = this.data;
|
|
162
|
+
this.data = this.formatData(t), this.hooks.emit("dataChange", this.data, i), this.modelGroup.remove(...this.modelGroup.children), this.itemMap.clear(), this.data.list.forEach((e) => {
|
|
163
|
+
const s = new D(this, e);
|
|
164
|
+
this.modelGroup.add(s.modelGroup), this.itemMap.set(e.id, s), s.hooks.on("tagClick", this.onMakerTagClick);
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/** 将插件的 DOM 容器添加到指定的 DOM 元素上 */
|
|
169
|
+
appendTo(t) {
|
|
170
|
+
t.appendChild(this.tagDomContainer);
|
|
171
|
+
}
|
|
172
|
+
/** 启用插件
|
|
173
|
+
* @param `options` `<Option> | <undefined>`
|
|
174
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
175
|
+
*/
|
|
176
|
+
enable(t = {}) {
|
|
177
|
+
var e;
|
|
178
|
+
if (this.state.enabled)
|
|
179
|
+
return;
|
|
180
|
+
const i = (e = t.userAction) != null ? e : !0;
|
|
181
|
+
this.updateState({ enabled: !0 }, i), this._enable({ userAction: i });
|
|
182
|
+
}
|
|
183
|
+
/** 禁用插件
|
|
184
|
+
* @param `options` `<Option> | <undefined>`
|
|
185
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
186
|
+
*/
|
|
187
|
+
disable(t = {}) {
|
|
188
|
+
var e;
|
|
189
|
+
if (this.state.enabled === !1)
|
|
190
|
+
return;
|
|
191
|
+
const i = (e = t.userAction) != null ? e : !0;
|
|
192
|
+
this.updateState({ enabled: !1 }, i), this._disable({ userAction: i });
|
|
193
|
+
}
|
|
194
|
+
/** 展示标注
|
|
195
|
+
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
196
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
197
|
+
*/
|
|
198
|
+
show(t) {
|
|
199
|
+
return u(this, null, function* () {
|
|
200
|
+
if (this.state.visible)
|
|
201
|
+
return Promise.resolve();
|
|
202
|
+
if (this.disposed)
|
|
203
|
+
return Promise.reject(new Error("不能在已销毁的插件上调用 show"));
|
|
204
|
+
const i = d({ userAction: !0 }, t);
|
|
205
|
+
this.updateState({ visible: !0 }, i.userAction), yield this._show(i);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/** 插件内容整体隐藏
|
|
209
|
+
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
210
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
211
|
+
*/
|
|
212
|
+
hide(t) {
|
|
213
|
+
return u(this, null, function* () {
|
|
214
|
+
if (this.state.visible === !1)
|
|
215
|
+
return;
|
|
216
|
+
const i = d({ userAction: !0 }, t);
|
|
217
|
+
this.updateState({ visible: !1 }, i.userAction), yield this._hide(i);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
// 目前带动画的展示和隐藏功能有些需求细节没有确定,暂时不实现
|
|
221
|
+
// /** 展示标注
|
|
222
|
+
// * @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
223
|
+
// * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
224
|
+
// * @param `options.anime` `<AnimeOptions> | <undefined>` 动画配置。
|
|
225
|
+
// * @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
226
|
+
// */
|
|
227
|
+
// public async show(options?: Partial<PluginType.ShowHideOptions>): Promise<void> {
|
|
228
|
+
// if (this.state.visible) return Promise.resolve()
|
|
229
|
+
// if (this.disposed) return Promise.reject(new Error('不能在已销毁的插件上调用 show'))
|
|
230
|
+
// const mergedOptions: PluginType.ShowHideOptions = {
|
|
231
|
+
// userAction: true,
|
|
232
|
+
// anime: { duration: 500, ...options?.anime },
|
|
233
|
+
// ...options,
|
|
234
|
+
// }
|
|
235
|
+
// this.updateState({ visible: true }, mergedOptions.userAction)
|
|
236
|
+
// await this._show(mergedOptions)
|
|
237
|
+
// }
|
|
238
|
+
// /** 插件内容整体隐藏
|
|
239
|
+
// * @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
240
|
+
// * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
241
|
+
// * @param `options.anime` `<AnimeOptions> | <undefined>` 动画配置。
|
|
242
|
+
// * @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
243
|
+
// */
|
|
244
|
+
// public async hide(options?: Partial<PluginType.ShowHideOptions>) {
|
|
245
|
+
// if (this.state.visible === false) return
|
|
246
|
+
// const mergedOptions: PluginType.ShowHideOptions = {
|
|
247
|
+
// userAction: true,
|
|
248
|
+
// anime: { duration: 500, ...options?.anime },
|
|
249
|
+
// ...options,
|
|
250
|
+
// }
|
|
251
|
+
// this.updateState({ visible: false }, mergedOptions.userAction)
|
|
252
|
+
// await this._hide(mergedOptions)
|
|
253
|
+
// }
|
|
254
|
+
/** 更改插件 State
|
|
255
|
+
* @param `state` `<Partial<Plugin.State>>` 插件属性 `state` 的子集。
|
|
256
|
+
* @param `options` `<Option> | <undefined>`
|
|
257
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
258
|
+
*/
|
|
259
|
+
setState(t, i = {}) {
|
|
260
|
+
const e = this.state;
|
|
261
|
+
if (I(t, e, { deep: !0 }))
|
|
262
|
+
return;
|
|
263
|
+
const s = i.userAction !== void 0 ? i.userAction : !0;
|
|
264
|
+
if (this.updateState(t, s), t.enabled !== void 0 && e.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), t.visible !== void 0 && e.visible !== t.visible) {
|
|
265
|
+
const a = { userAction: s, anime: { duration: 500 } };
|
|
266
|
+
t.visible ? this._show(a) : this._hide(a);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
/** 更改插件 Config
|
|
270
|
+
* @param `config` `<Partial<Plugin.Config>>` 插件属性 `config` 的子集。
|
|
271
|
+
* @param `options` `<Option> | <undefined>`
|
|
272
|
+
*/
|
|
273
|
+
updateConfig(t, i = {}) {
|
|
274
|
+
var a;
|
|
275
|
+
const e = this.config, s = d(d({}, e), t);
|
|
276
|
+
this._config = s, this.hooks.emit("configChange", { prevConfig: e, config: s, userAction: (a = i.userAction) != null ? a : !0 });
|
|
277
|
+
}
|
|
278
|
+
/** 根据 ID 获取标注 */
|
|
279
|
+
getMaskItemByID(t) {
|
|
280
|
+
return this.itemMap.get(t);
|
|
281
|
+
}
|
|
282
|
+
formatData(t) {
|
|
283
|
+
function i(e) {
|
|
284
|
+
return e.list.length === 0 ? !0 : !("shape" in e.list[0].object_data);
|
|
285
|
+
}
|
|
286
|
+
return i(t) ? {
|
|
287
|
+
list: t.list.filter((e) => e.object_data.points.length >= 3).map((e) => {
|
|
288
|
+
const s = new g.Shape(), a = e.object_data.points[0];
|
|
289
|
+
return s.moveTo(a[0], a[2]), e.object_data.points.slice(1).forEach((n) => s.lineTo(n[0], n[2])), s.lineTo(a[0], a[2]), p(d({}, e), {
|
|
290
|
+
floor_index: e.object_data.floorIndex,
|
|
291
|
+
object_data: p(d({}, e.object_data), {
|
|
292
|
+
bottom_y: a[1] + e.object_data.fixedY,
|
|
293
|
+
shape: s.toJSON(),
|
|
294
|
+
height: e.object_data.height + e.object_data.fixedHeight
|
|
295
|
+
})
|
|
296
|
+
});
|
|
297
|
+
})
|
|
298
|
+
} : t;
|
|
299
|
+
}
|
|
300
|
+
checkChildrenMountedState() {
|
|
301
|
+
const t = this.state, i = this.five;
|
|
302
|
+
if (!t.enabled)
|
|
303
|
+
return { result: !1, msg: "插件不可用" };
|
|
304
|
+
const e = i.getCurrentState().mode;
|
|
305
|
+
return e === "Panorama" ? { result: !1, msg: `Five 模态不符合条件, 当前模态为:${e}` } : this.isInFiveChangeModeAnime ? { result: !1, msg: "切换模态动画中不展示" } : { result: !0, msg: "" };
|
|
306
|
+
}
|
|
307
|
+
updateChildrenMountedState() {
|
|
308
|
+
const { result: t, msg: i } = this.checkChildrenMountedState();
|
|
309
|
+
this.checkMsg.childrenMountedState = i, t !== this.childrenMountedState && (this.childrenMountedState = t, this.itemMap.forEach((e) => {
|
|
310
|
+
this.childrenMountedState ? e.mount() : e.unmount();
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
updateState(t, i) {
|
|
314
|
+
const e = this.state;
|
|
315
|
+
this.state = d(d({}, this.state), t), this.hooks.emit("stateChange", { state: this.state, prevState: e, userAction: i });
|
|
316
|
+
}
|
|
317
|
+
_enable(t) {
|
|
318
|
+
this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.modelGroup), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture), this.five.on("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("cameraUpdate", this.onFiveCameraUpdate);
|
|
319
|
+
}
|
|
320
|
+
_disable(t) {
|
|
321
|
+
this.hooks.emit("disable", { userAction: t.userAction }), this.five.scene.remove(this.modelGroup), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture), this.five.off("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraUpdate", this.onFiveCameraUpdate);
|
|
322
|
+
}
|
|
323
|
+
_show(t) {
|
|
324
|
+
return u(this, null, function* () {
|
|
325
|
+
this.hooks.emit("show", t), this.five.needsRender = !0;
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
_hide(t) {
|
|
329
|
+
return u(this, null, function* () {
|
|
330
|
+
this.hooks.emit("hide", t), this.five.needsRender = !0;
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
export {
|
|
335
|
+
ot as Controller
|
|
336
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Controller as o } from "./Controller.js";
|
|
2
|
+
import "three";
|
|
3
|
+
import "../base/BasePluginWithData.js";
|
|
4
|
+
import "../base/BasePlugin.js";
|
|
5
|
+
import "../shared-utils/Subscribe.js";
|
|
6
|
+
import "hammerjs";
|
|
7
|
+
import "@realsee/five";
|
|
8
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
9
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
10
|
+
import "../shared-utils/positionToVector3.js";
|
|
11
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
12
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
13
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
14
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
15
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
16
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
17
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
18
|
+
import "../shared-utils/three/centerPoint.js";
|
|
19
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
20
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
21
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
22
|
+
import "../shared-utils/absoluteUrl.js";
|
|
23
|
+
import "../shared-utils/equal.js";
|
|
24
|
+
import "../shared-utils/isTruelyObject.js";
|
|
25
|
+
import "./utils/Item.js";
|
|
26
|
+
import "../shared-utils/three/core/Object3D.js";
|
|
27
|
+
import "../shared-utils/three/objects/LineSegments.js";
|
|
28
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
29
|
+
import "../shared-utils/animationFrame/index.js";
|
|
30
|
+
import "../components/AreaLabel/LabelItem.js";
|
|
31
|
+
import "../vendor/svelte/internal/index.js";
|
|
32
|
+
import "../components/AreaLabel/Assets/roomLabelBg.js";
|
|
33
|
+
import "../shared-utils/math/planimetry.js";
|
|
34
|
+
const H = (r) => new o(r);
|
|
35
|
+
export {
|
|
36
|
+
H as AreaMakerPlugin
|
|
37
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type * as BasePlugin from '../base/BasePluginWithData';
|
|
2
|
+
import type * as THREE from 'three';
|
|
3
|
+
import type { AreaMakerItem } from './utils/Item';
|
|
4
|
+
export type { Controller as AreaMakerController } from './Controller';
|
|
5
|
+
export type { AreaMakerItem };
|
|
6
|
+
/** 插件初始化参数 */
|
|
7
|
+
export interface Params {
|
|
8
|
+
config?: Partial<Config>;
|
|
9
|
+
initialState?: Partial<State>;
|
|
10
|
+
}
|
|
11
|
+
/** 插件状态 */
|
|
12
|
+
export interface State extends BasePlugin.State {
|
|
13
|
+
/** 插件是否启用 */
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
/** 插件整体是否可见 */
|
|
16
|
+
visible: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** 插件配置 */
|
|
19
|
+
export interface Config {
|
|
20
|
+
/** 标注模型是否开启深度检测,此配置仅对模型生效,不会影响标签的展示效果。
|
|
21
|
+
* @default true
|
|
22
|
+
* @description 关闭后,标注模型不会被其他模型遮挡
|
|
23
|
+
*/
|
|
24
|
+
modelDepthTest: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** 插件事件 */
|
|
27
|
+
export interface EventMap extends BasePlugin.EventMap<State, ServerData> {
|
|
28
|
+
/** visible 从 false 到 true 的回调
|
|
29
|
+
* @param event.userAction 是否是用户操作
|
|
30
|
+
*/
|
|
31
|
+
show: (event: {
|
|
32
|
+
userAction: boolean;
|
|
33
|
+
}) => void;
|
|
34
|
+
/** visible 从 true 到 false 的回调
|
|
35
|
+
* @param event.userAction 是否是用户操作
|
|
36
|
+
*/
|
|
37
|
+
hide: (event: {
|
|
38
|
+
userAction: boolean;
|
|
39
|
+
}) => void;
|
|
40
|
+
/** enabled 从 false 到 true 的回调
|
|
41
|
+
* @param event.userAction 是否是用户操作
|
|
42
|
+
*/
|
|
43
|
+
enable: (event: {
|
|
44
|
+
userAction: boolean;
|
|
45
|
+
}) => void;
|
|
46
|
+
/** enabled 从 true 到 false 的回调
|
|
47
|
+
* @param event.userAction 是否是用户操作
|
|
48
|
+
*/
|
|
49
|
+
disable: (event: {
|
|
50
|
+
userAction: boolean;
|
|
51
|
+
}) => void;
|
|
52
|
+
/** config 变更的回调
|
|
53
|
+
* @param event.prevConfig 变更前的 config
|
|
54
|
+
* @param event.config 变更后的 config
|
|
55
|
+
* @param event.userAction 是否是用户操作
|
|
56
|
+
*/
|
|
57
|
+
configChange: (event: {
|
|
58
|
+
prevConfig: Config;
|
|
59
|
+
config: Config;
|
|
60
|
+
userAction: boolean;
|
|
61
|
+
}) => void;
|
|
62
|
+
/** 插件内容点击的回调
|
|
63
|
+
* @param event.target 点击的标注实例
|
|
64
|
+
* @param event.intersectObjects 射线与标注模型的交点集合
|
|
65
|
+
* @param event.wantsFiveTapGestureParams Five wantsFiveTapGesture 的回调参数
|
|
66
|
+
* @returns <boolean> | <void> 返回 false 会阻止 Five wantsFiveTapGesture 的回调,其余 return 值会被忽略
|
|
67
|
+
*/
|
|
68
|
+
wantsTap: (event: {
|
|
69
|
+
target: AreaMakerItem;
|
|
70
|
+
intersectObjects: THREE.Intersection[];
|
|
71
|
+
}) => boolean | void;
|
|
72
|
+
}
|
|
73
|
+
/** 标注实例事件 */
|
|
74
|
+
export type AreaMakerItemEventMap = {
|
|
75
|
+
/** 标注标签点击的回调
|
|
76
|
+
* @param event.target 点击的标注实例
|
|
77
|
+
* @param event.nativeEvent 点击事件的的原始 MouseEvent
|
|
78
|
+
*/
|
|
79
|
+
tagClick: (event: {
|
|
80
|
+
target: AreaMakerItem;
|
|
81
|
+
nativeEvent: MouseEvent;
|
|
82
|
+
}) => void;
|
|
83
|
+
};
|
|
84
|
+
/** 动画相关的配置 */
|
|
85
|
+
export interface AnimeOptions {
|
|
86
|
+
/** 动画时长,单位是毫秒 */
|
|
87
|
+
duration?: number;
|
|
88
|
+
}
|
|
89
|
+
export interface ShowHideOptions extends BasePlugin.BaseOptions {
|
|
90
|
+
userAction: boolean;
|
|
91
|
+
}
|
|
92
|
+
/** 第一版数据
|
|
93
|
+
* @description 为什么会存在两种数据?
|
|
94
|
+
* 目前数据是线上已经存在的,这一版数据目前存在以下问题:
|
|
95
|
+
* 1. 无法描述弧线。
|
|
96
|
+
* 2. 数据结构不够清晰,数据存在一定产品逻辑上的抽象,比如说标注的高度,是由楼层高度和人工设置的高度修正组成的。
|
|
97
|
+
*/
|
|
98
|
+
export interface ServerDataV1 {
|
|
99
|
+
list: ServerAreaMakerItemV1[];
|
|
100
|
+
}
|
|
101
|
+
/** 第二版数据 */
|
|
102
|
+
export interface ServerDataV2 {
|
|
103
|
+
list: ServerAreaMakerItem[];
|
|
104
|
+
}
|
|
105
|
+
/** load 的数据 */
|
|
106
|
+
export type ServerData = ServerDataV1 | ServerDataV2;
|
|
107
|
+
/** 插件使用的数据 */
|
|
108
|
+
export type PluginData = ServerDataV2;
|
|
109
|
+
export interface ServerAreaMakerItem {
|
|
110
|
+
id: number | string;
|
|
111
|
+
/** 标注名称 */
|
|
112
|
+
name?: string;
|
|
113
|
+
/** 标注所在楼层 */
|
|
114
|
+
floor_index: number;
|
|
115
|
+
/** 标注物体 */
|
|
116
|
+
object_data: {
|
|
117
|
+
/** 标注底面形状,THREE.Shape().toJSON() 的结果 */
|
|
118
|
+
shape: Record<string, any>;
|
|
119
|
+
/** 标注底面 y 坐标 */
|
|
120
|
+
bottom_y: number;
|
|
121
|
+
/** 标注高度,指标注顶部距离底部的距离。只能为正值,单位是米 */
|
|
122
|
+
height: number;
|
|
123
|
+
/** 标注颜色
|
|
124
|
+
* @example "#ffffff"
|
|
125
|
+
*/
|
|
126
|
+
color?: string;
|
|
127
|
+
/** 标注透明度 */
|
|
128
|
+
opacity?: number;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export interface ServerAreaMakerItemV1 {
|
|
132
|
+
id: number;
|
|
133
|
+
name: string;
|
|
134
|
+
object_data: {
|
|
135
|
+
/** 绘制平面的三维世界坐标点集合 */
|
|
136
|
+
points: number[][];
|
|
137
|
+
/** 楼层索引 */
|
|
138
|
+
floorIndex: number;
|
|
139
|
+
/** 楼层高度 */
|
|
140
|
+
height: number;
|
|
141
|
+
/** 人工设置的y坐标方向偏移 */
|
|
142
|
+
fixedY: number;
|
|
143
|
+
/** 人工设置的高度修正 */
|
|
144
|
+
fixedHeight: number;
|
|
145
|
+
color: string;
|
|
146
|
+
opacity?: number;
|
|
147
|
+
};
|
|
148
|
+
}
|