@realsee/dnalogel 2.1.2-alpha.9 → 2.2.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/README.md +45 -0
- package/dist/CSS3DRenderPlugin/CSS3DRender.d.ts +167 -0
- package/dist/CSS3DRenderPlugin/Controller.d.ts +81 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +5 -0
- package/dist/CSS3DRenderPlugin/typing.d.ts +26 -0
- package/dist/CSS3DRenderPlugin/utils/CSS3DObjectPlus.d.ts +34 -0
- package/dist/CSS3DRenderPlugin/utils/centerPoint.d.ts +2 -0
- package/dist/CSS3DRenderPlugin/utils/evenNumber.d.ts +3 -0
- package/dist/CSS3DRenderPlugin/utils/index.d.ts +4 -0
- package/dist/CSS3DRenderPlugin/utils/positionToVector3.d.ts +13 -0
- package/dist/CSS3DRenderPlugin/utils/random.d.ts +1 -0
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +5 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -0
- package/dist/CruisePlugin/Controller.d.ts +172 -0
- package/dist/CruisePlugin/index.d.ts +6 -0
- package/dist/CruisePlugin/typing.d.ts +134 -0
- package/dist/CruisePlugin/utils/coordinatesAngle.d.ts +12 -0
- package/dist/CruisePlugin/utils/coordinatesToVector.d.ts +7 -0
- package/dist/CruisePlugin/utils/formatRad.d.ts +7 -0
- package/dist/CruisePlugin/utils/linerValue.d.ts +1 -0
- package/dist/CruisePlugin/utils/safeCall.d.ts +1 -0
- package/dist/CruisePlugin/utils/sleep.d.ts +1 -0
- package/dist/CruisePlugin/utils/vectorToCoordinates.d.ts +7 -0
- package/dist/GuideLinePlugin/Controller.d.ts +51 -0
- package/dist/GuideLinePlugin/index.d.ts +5 -0
- package/dist/GuideLinePlugin/typing.d.ts +34 -0
- package/dist/GuideLinePlugin/utils/getArrowMaterial.d.ts +4 -0
- package/dist/GuideLinePlugin/utils/getLineGeometries.d.ts +16 -0
- package/dist/GuideLinePlugin/utils/polyline-normals.d.ts +3 -0
- package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.d.ts +9 -0
- package/dist/ItemLabelPlugin/typings.d.ts +65 -0
- package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +8 -0
- package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +4 -0
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
- package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/dist/ModelViewPlugin/Plugin.d.ts +28 -0
- package/dist/ModelViewPlugin/index.d.ts +4 -0
- package/dist/Object3DHelperPlugin/Controller.d.ts +65 -0
- package/dist/Object3DHelperPlugin/FiveControllerWrapper.d.ts +19 -0
- package/dist/Object3DHelperPlugin/index.d.ts +6 -0
- package/dist/Object3DHelperPlugin/typings.d.ts +24 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/Controller.d.ts +84 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +7 -0
- package/dist/PanoCompassPlugin/typings.d.ts +57 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/PanoDoorLabelPlugin/Controller.d.ts +37 -0
- package/dist/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoDoorLabelPlugin/typings.d.ts +38 -0
- package/dist/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +43 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +48 -0
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +42 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/ViewController.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +73 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +35 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
- package/dist/PanoMeasurePlugin/index.d.ts +10 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +37 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
- package/dist/PanoMeasurePlugin/typings/index.d.ts +8 -0
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/dist/PanoRulerPlugin/Plugin.d.ts +34 -0
- package/dist/PanoRulerPlugin/index.d.ts +5 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/dist/PanoRulerPlugin/typings.d.ts +21 -0
- package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
- package/dist/PanoRulerProPlugin/index.d.ts +8 -0
- package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/dist/PanoTagPlugin/Assets/Icon.d.ts +3 -0
- package/dist/PanoTagPlugin/controller/TagCacheController.d.ts +22 -0
- package/dist/PanoTagPlugin/controller/TagComputer.d.ts +69 -0
- package/dist/PanoTagPlugin/controller/index.d.ts +144 -0
- package/dist/PanoTagPlugin/index.d.ts +8 -0
- package/dist/PanoTagPlugin/tag.config.d.ts +7 -0
- package/dist/PanoTagPlugin/typings/controller.d.ts +103 -0
- package/dist/PanoTagPlugin/typings/index.d.ts +2 -0
- package/dist/PanoTagPlugin/typings/tag.d.ts +247 -0
- package/dist/PanoTagPlugin/utils/actionAfterFiveModelLoad.d.ts +2 -0
- package/dist/PanoTagPlugin/utils/addDebugPoints.d.ts +3 -0
- package/dist/PanoTagPlugin/utils/checkRange.d.ts +4 -0
- package/dist/PanoTagPlugin/utils/constants.d.ts +3 -0
- package/dist/PanoTagPlugin/utils/debounce.d.ts +7 -0
- package/dist/PanoTagPlugin/utils/doUtil.d.ts +1 -0
- package/dist/PanoTagPlugin/utils/index.d.ts +12 -0
- package/dist/PanoTagPlugin/utils/noTypecheck.d.ts +1 -0
- package/dist/PanoTagPlugin/utils/normalPositionToPositions.d.ts +2 -0
- package/dist/PanoTagPlugin/utils/planeNormal.d.ts +4 -0
- package/dist/PanoTagPlugin/utils/resizeObserver.d.ts +4 -0
- package/dist/PanoTagPlugin/utils/search.d.ts +11 -0
- package/dist/PanoTagPlugin/utils/tagPosition.d.ts +3 -0
- package/dist/PanoTagPlugin/utils/throttle.d.ts +7 -0
- package/dist/base/BasePlugin.d.ts +106 -0
- package/dist/base/BasePluginWithData.d.ts +34 -0
- package/dist/components/PaintBrush/Controller.d.ts +43 -0
- package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
- package/dist/components/PaintBrush/index.d.ts +27 -0
- package/dist/components/PaintBrush/style.d.ts +2 -0
- package/dist/components/PaintBrush/tween.d.ts +7 -0
- package/dist/components/PaintBrush/typings.d.ts +58 -0
- package/dist/components/PaintBrush/utils.d.ts +26 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/env.d.ts +1 -0
- package/dist/floorplan/Assets/camera.d.ts +1 -0
- package/dist/floorplan/Assets/compass.d.ts +1 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +97 -0
- package/dist/floorplan/MapviewFloorplanPlugin/index.d.ts +7 -0
- package/dist/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +99 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +7 -0
- package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +36 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +7 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +69 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +7 -0
- package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +11 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/dist/floorplan/index.d.ts +7 -0
- package/dist/floorplan/typings/floorplanData.d.ts +137 -0
- package/dist/floorplan/typings/floorplanServerData.d.ts +144 -0
- package/dist/floorplan/typings/index.d.ts +117 -0
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/dist/floorplan/utils/constant.d.ts +22 -0
- package/dist/floorplan/utils/correctFiveState.d.ts +15 -0
- package/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +23 -0
- package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +48 -0
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +91 -0
- package/dist/shared-utils/Object3DHelper/Constants/color.d.ts +12 -0
- package/dist/shared-utils/Object3DHelper/Controller/CSS3DScaleController.d.ts +6 -0
- package/dist/shared-utils/Object3DHelper/Controller/MoveController.d.ts +13 -0
- package/dist/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +37 -0
- package/dist/shared-utils/Object3DHelper/Controller/RotateController.d.ts +22 -0
- package/dist/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.d.ts +11 -0
- package/dist/shared-utils/Object3DHelper/Helper/HTML/tipsDom.d.ts +6 -0
- package/dist/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.d.ts +2 -0
- package/dist/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +13 -0
- package/dist/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.d.ts +17 -0
- package/dist/shared-utils/Object3DHelper/Helper/OutlineHelper.d.ts +11 -0
- package/dist/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +40 -0
- package/dist/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +55 -0
- package/dist/shared-utils/Object3DHelper/Helper/index.d.ts +5 -0
- package/dist/shared-utils/Object3DHelper/index.d.ts +71 -0
- package/dist/shared-utils/Object3DHelper/typings/Direction.d.ts +2 -0
- package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +45 -0
- package/dist/shared-utils/Object3DHelper/typings/Scissor.d.ts +17 -0
- package/dist/shared-utils/Object3DHelper/typings/index.d.ts +5 -0
- package/dist/shared-utils/Object3DHelper/utils/calculateThreeMouse.d.ts +14 -0
- package/dist/shared-utils/Object3DHelper/utils/direction.d.ts +14 -0
- package/dist/shared-utils/Object3DHelper/utils/filterNotColinearPoints.d.ts +2 -0
- package/dist/shared-utils/Object3DHelper/utils/getMouseRaycaster.d.ts +5 -0
- package/dist/shared-utils/Object3DHelper/utils/getPoint.d.ts +3 -0
- package/dist/shared-utils/Object3DHelper/utils/index.d.ts +8 -0
- package/dist/shared-utils/Object3DHelper/utils/normalPositionToPositions.d.ts +5 -0
- package/dist/shared-utils/Object3DHelper/utils/object3DBoundingPosition.d.ts +1 -0
- package/dist/shared-utils/Object3DHelper/utils/threex/domevents/index.d.ts +34 -0
- package/dist/shared-utils/Object3DHelper/utils/vectorIsEqual.d.ts +2 -0
- package/dist/shared-utils/Subscribe.d.ts +60 -0
- package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
- package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
- package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
- package/dist/shared-utils/animationFrame/index.d.ts +16 -0
- package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
- package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/dist/shared-utils/createLine/index.d.ts +3 -0
- package/dist/shared-utils/debounce.d.ts +6 -0
- package/dist/shared-utils/equal.d.ts +11 -0
- package/dist/shared-utils/filter.d.ts +27 -0
- package/dist/shared-utils/five/changeMode.d.ts +5 -0
- package/dist/shared-utils/getPxmm.d.ts +19 -0
- package/dist/shared-utils/index.d.ts +4 -0
- package/dist/shared-utils/isNil.d.ts +10 -0
- package/dist/shared-utils/isTruelyObject.d.ts +18 -0
- package/dist/shared-utils/math/Interval.d.ts +13 -0
- package/dist/shared-utils/math/Rectangle.d.ts +27 -0
- package/dist/shared-utils/math/index.d.ts +2 -0
- package/dist/shared-utils/math/planimetry.d.ts +116 -0
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
- package/dist/shared-utils/nearlyEqual.d.ts +7 -0
- package/dist/shared-utils/nextFrame.d.ts +1 -0
- package/dist/shared-utils/noop.d.ts +5 -0
- package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/dist/shared-utils/tap.d.ts +8 -0
- package/dist/shared-utils/three/Assets/index.d.ts +3 -0
- package/dist/shared-utils/three/FivePointSelector.d.ts +36 -0
- package/dist/shared-utils/three/Magnifier.d.ts +53 -0
- package/dist/shared-utils/three/PointDomHelper.d.ts +18 -0
- package/dist/shared-utils/three/PointHelper.d.ts +21 -0
- package/dist/shared-utils/three/getCoords.d.ts +9 -0
- package/dist/shared-utils/three/getIntersect.d.ts +6 -0
- package/dist/shared-utils/three/getRaycaster.d.ts +6 -0
- package/dist/shared-utils/three/index.d.ts +7 -0
- package/dist/shared-utils/three/loadTexture.d.ts +2 -0
- package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/dist/shared-utils/throttle.d.ts +7 -0
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/dist/shared-utils/to.d.ts +8 -0
- package/dist/shared-utils/uuid.d.ts +5 -0
- package/dist/typings/math.type.d.ts +44 -0
- package/docs/assets/highlight.css +35 -0
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +39 -39
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +12 -12
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/LinkType.html +7 -7
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +25 -4
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +8 -8
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +11 -11
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/PointJson.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeyArray.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/package.json +4 -8
- package/dist/index.es.js +0 -16650
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 函数防抖:指触发事件后,在 `n` 秒内函数只能执行一次,如果触发事件后在 `n` 秒内又触发了事件,则会重新计算函数延执行时间。
|
|
3
|
+
* @param callback 回调函数
|
|
4
|
+
* @param waitFor 等待时间
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare const debounce: <F extends (...args: any) => any>(callback: F, waitFor?: number) => (...args: Parameters<F>) => ReturnType<F>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function doUtil<T = any>(func: () => T, util: (value: T) => boolean, duration?: number, times?: number): Promise<T>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from '../../CSS3DRenderPlugin/utils';
|
|
2
|
+
export * from './addDebugPoints';
|
|
3
|
+
export * from './noTypecheck';
|
|
4
|
+
export * from './planeNormal';
|
|
5
|
+
export * from './tagPosition';
|
|
6
|
+
export * from './checkRange';
|
|
7
|
+
export * from './actionAfterFiveModelLoad';
|
|
8
|
+
export * from './normalPositionToPositions';
|
|
9
|
+
export * from './debounce';
|
|
10
|
+
export * from './throttle';
|
|
11
|
+
export * from './search';
|
|
12
|
+
export * from './resizeObserver';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const noTypecheck: <T = any>(x: T) => any;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Vector3 } from 'three';
|
|
2
|
+
import { AnyPosition } from '.';
|
|
3
|
+
export declare function planeNormal(points: [AnyPosition, AnyPosition, AnyPosition] | [AnyPosition, AnyPosition, AnyPosition, AnyPosition]): Vector3;
|
|
4
|
+
export declare function planeNormal(points: AnyPosition[]): Vector3 | void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 二分查找,查找第一个大于等于给定值的元素
|
|
3
|
+
* 数组必须有序,存在重复
|
|
4
|
+
* @param {array} arr 待排序数组
|
|
5
|
+
* @param {number} target 目标数据
|
|
6
|
+
*/
|
|
7
|
+
export declare function binarySearchFirstBig(getValueByIndex: (index: number) => number, indexRange: [number, number], target: number): number;
|
|
8
|
+
/**
|
|
9
|
+
* @description: 查找第一个小于前一个数字的值
|
|
10
|
+
*/
|
|
11
|
+
export declare function searchFirstValueSmallThanLastValue(getValueByIndex: (index: number) => number, indexRange: [number, number]): number;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import { Subscribe } from '../shared-utils/Subscribe';
|
|
3
|
+
/**
|
|
4
|
+
* 基本属性字段
|
|
5
|
+
*/
|
|
6
|
+
interface State {
|
|
7
|
+
/**
|
|
8
|
+
* 插件是否启用
|
|
9
|
+
*/
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 插件UI是否展示
|
|
13
|
+
*/
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 插件的配置项
|
|
17
|
+
*/
|
|
18
|
+
config?: unknown;
|
|
19
|
+
}
|
|
20
|
+
interface BaseOptions {
|
|
21
|
+
/** 是否是用户行为 */
|
|
22
|
+
userAction?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface Config {
|
|
25
|
+
/** 静态资源前缀 */
|
|
26
|
+
staticPrefix?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 插件基本事件
|
|
30
|
+
*/
|
|
31
|
+
declare type EventMap<PluginState> = {
|
|
32
|
+
/**
|
|
33
|
+
* 插件被销毁
|
|
34
|
+
*/
|
|
35
|
+
dispose: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* 插件状态变化
|
|
38
|
+
* @param params.state 最新的State
|
|
39
|
+
* @param params.prevState 上一个State
|
|
40
|
+
* @param params.userAction 是否是用户触发
|
|
41
|
+
*/
|
|
42
|
+
stateChange: (params: {
|
|
43
|
+
state: PluginState;
|
|
44
|
+
prevState?: PluginState;
|
|
45
|
+
userAction: boolean;
|
|
46
|
+
}) => void;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* plugin 的基本控制器
|
|
50
|
+
*/
|
|
51
|
+
declare abstract class Controller<PluginState extends State, PluginEventMap extends EventMap<PluginState>> {
|
|
52
|
+
five: Five;
|
|
53
|
+
/**
|
|
54
|
+
* 插件事件钩子
|
|
55
|
+
*/
|
|
56
|
+
hooks: Subscribe<PluginEventMap>;
|
|
57
|
+
readonly staticPrefix: string;
|
|
58
|
+
/**
|
|
59
|
+
* 当前状态
|
|
60
|
+
* @description
|
|
61
|
+
* ```text
|
|
62
|
+
* 可以通过 plugin.state 和 plugin.setState 来获取和设置。
|
|
63
|
+
* 通过 state 设置后,plugin 会通过合适的动画运动来达到设置的效果。
|
|
64
|
+
* 来迎合一些通过数据驱动的场景。
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
abstract state: PluginState;
|
|
68
|
+
constructor(five: Five, config?: Config);
|
|
69
|
+
/**
|
|
70
|
+
* 获取当前的插件状态,如果当初插件内存在需要通过动画变更的 state 值,则通过此方法可以得到中间状态
|
|
71
|
+
*/
|
|
72
|
+
getCurrentState(): PluginState;
|
|
73
|
+
/**
|
|
74
|
+
* 插件自身DOM添加到父容器
|
|
75
|
+
* @param wrapper
|
|
76
|
+
*/
|
|
77
|
+
appendTo?(wrapper: Element): void;
|
|
78
|
+
/**
|
|
79
|
+
* 展示UI
|
|
80
|
+
*/
|
|
81
|
+
show?(options?: BaseOptions): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* 隐藏UI
|
|
84
|
+
*/
|
|
85
|
+
hide?(options?: BaseOptions): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* 启用插件,让插件能够响应交互
|
|
88
|
+
*/
|
|
89
|
+
abstract enable(options?: BaseOptions): void;
|
|
90
|
+
/**
|
|
91
|
+
* 禁用插件,让插件停止响应交互
|
|
92
|
+
*/
|
|
93
|
+
abstract disable(options?: BaseOptions): void;
|
|
94
|
+
/**
|
|
95
|
+
* 插件进行销毁
|
|
96
|
+
*/
|
|
97
|
+
abstract dispose(): void;
|
|
98
|
+
/**
|
|
99
|
+
* 设置state
|
|
100
|
+
* @param state 插件的目标状态
|
|
101
|
+
* @param options 配置项
|
|
102
|
+
*/
|
|
103
|
+
abstract setState(state: Partial<PluginState>, options?: BaseOptions): void;
|
|
104
|
+
}
|
|
105
|
+
export type { State, EventMap, BaseOptions };
|
|
106
|
+
export { Controller };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as BasePlugin from './BasePlugin';
|
|
2
|
+
declare type State = BasePlugin.State;
|
|
3
|
+
interface EventMap<PluginState, PluginData> extends BasePlugin.EventMap<PluginState> {
|
|
4
|
+
/** 数据变更 */
|
|
5
|
+
dataChange: (data: PluginData, prevData?: PluginData) => void;
|
|
6
|
+
/** 数据加载完成 */
|
|
7
|
+
dataLoaded: (data: PluginData) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 插件的基础数据
|
|
11
|
+
*/
|
|
12
|
+
interface ServerData {
|
|
13
|
+
/**
|
|
14
|
+
* 数据版本
|
|
15
|
+
*/
|
|
16
|
+
version: number;
|
|
17
|
+
/**
|
|
18
|
+
* 数据
|
|
19
|
+
*/
|
|
20
|
+
data?: unknown;
|
|
21
|
+
}
|
|
22
|
+
declare abstract class Controller<PluginState extends State, PluginEventMap extends EventMap<PluginState, PluginData>, PluginServerData extends ServerData, PluginData> extends BasePlugin.Controller<PluginState, PluginEventMap> {
|
|
23
|
+
protected abstract data?: PluginData;
|
|
24
|
+
/**
|
|
25
|
+
* 加载插件依赖数据
|
|
26
|
+
* @param serverData 插件数据
|
|
27
|
+
* @param state 插件 State
|
|
28
|
+
*/
|
|
29
|
+
abstract load(serverData: PluginServerData, state?: PluginState, userAction?: boolean): Promise<void>;
|
|
30
|
+
/** 把原始数据转化为插件数据 */
|
|
31
|
+
protected abstract formatData?(serverData: PluginServerData): Promise<PluginData>;
|
|
32
|
+
}
|
|
33
|
+
export type { State, EventMap, ServerData };
|
|
34
|
+
export { Controller };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { noop } from './utils';
|
|
2
|
+
import { PaintBrushAction, PaintBrushConfigs, PaintBrushEventMap, PaintBrushState } from './typings';
|
|
3
|
+
import { Subscribe } from './Subscribe';
|
|
4
|
+
export declare class Controller extends Subscribe<PaintBrushEventMap> {
|
|
5
|
+
configs: PaintBrushConfigs;
|
|
6
|
+
private clientWidth;
|
|
7
|
+
private clientHeight;
|
|
8
|
+
private ready;
|
|
9
|
+
private uuid;
|
|
10
|
+
private tween?;
|
|
11
|
+
private tweening;
|
|
12
|
+
private container;
|
|
13
|
+
private canvas;
|
|
14
|
+
private data;
|
|
15
|
+
private tempLine;
|
|
16
|
+
get color(): string;
|
|
17
|
+
get state(): Record<string, PaintBrushState[]>;
|
|
18
|
+
get dpr(): number;
|
|
19
|
+
constructor(configs: PaintBrushConfigs);
|
|
20
|
+
ifInsertToDOM(): HTMLDivElement;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param className 初始化画板
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
initCanvas(className: string): HTMLCanvasElement;
|
|
27
|
+
/**
|
|
28
|
+
* 初始化操作面板
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
initCtrl(): HTMLDivElement;
|
|
32
|
+
openBrush(): void;
|
|
33
|
+
closeBrush(): void;
|
|
34
|
+
updateCurrentColor(color: string): void;
|
|
35
|
+
openBrushHandle(): void;
|
|
36
|
+
emitStateChange(action: PaintBrushAction, userAction?: boolean): void;
|
|
37
|
+
action(action: PaintBrushAction): void;
|
|
38
|
+
handleDrawLine(_uuid: string, data: PaintBrushState, { withUndo }: {
|
|
39
|
+
withUndo?: boolean;
|
|
40
|
+
}, callback?: typeof noop): void;
|
|
41
|
+
handleUndo(uuid: string): void;
|
|
42
|
+
destroyBrush(): void;
|
|
43
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare type EventMap = {
|
|
2
|
+
[name: string]: (...args: any[]) => void | boolean;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* 监听者模式
|
|
6
|
+
* @template T 预设的监听回调类型
|
|
7
|
+
* @example
|
|
8
|
+
* ```
|
|
9
|
+
* new Subscribe<{
|
|
10
|
+
* "foo": [arg1: number, arg2: string],
|
|
11
|
+
* "bar": [arg: boolean],
|
|
12
|
+
* }>()
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare class Subscribe<T extends EventMap> {
|
|
16
|
+
/**
|
|
17
|
+
* 判断是否注册了事件
|
|
18
|
+
* @param name 事件类型
|
|
19
|
+
*/
|
|
20
|
+
hasListener(name: keyof T): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 注册事件
|
|
23
|
+
* @param name 事件类型
|
|
24
|
+
* @param callback 事件回调函数
|
|
25
|
+
* @param once 是否只执行一次
|
|
26
|
+
* @returns 解除事件
|
|
27
|
+
* @template K 预设的监听事件名称
|
|
28
|
+
* @template C 回调函数函数上下文
|
|
29
|
+
*/
|
|
30
|
+
on<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>, once?: boolean): () => void;
|
|
31
|
+
/**
|
|
32
|
+
* 注册事件(是否只执行一次)
|
|
33
|
+
* @param name 事件类型
|
|
34
|
+
* @param callback 事件回调函数
|
|
35
|
+
* @returns 解除事件
|
|
36
|
+
* @template K 预设的监听事件名称
|
|
37
|
+
* @template C 回调函数函数上下文
|
|
38
|
+
*/
|
|
39
|
+
once<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>): () => void;
|
|
40
|
+
/**
|
|
41
|
+
* 解除事件
|
|
42
|
+
*
|
|
43
|
+
* 如果 name 不传的话解除对应所有事件
|
|
44
|
+
* 如果 name, callback 不传的话解除所有name的所有事件
|
|
45
|
+
* @param name 事件类型
|
|
46
|
+
* @param callback 事件回调函数
|
|
47
|
+
* @template K 预设的监听事件名称
|
|
48
|
+
*/
|
|
49
|
+
off<K extends keyof T>(name?: K, callback?: (...args: Parameters<T[K]>) => ReturnType<T[K]>): void;
|
|
50
|
+
/**
|
|
51
|
+
* 触发事件
|
|
52
|
+
* @param name 事件类型
|
|
53
|
+
* @param data 触发事件的数据
|
|
54
|
+
* @returns canceled 是否被触发取消
|
|
55
|
+
* @template K 预设的监听事件名称
|
|
56
|
+
*/
|
|
57
|
+
emit<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
|
|
58
|
+
}
|
|
59
|
+
export declare namespace SubscribeMixinType {
|
|
60
|
+
interface hasListener<T extends EventMap> {
|
|
61
|
+
(name: keyof T): boolean;
|
|
62
|
+
}
|
|
63
|
+
interface on<T extends EventMap> {
|
|
64
|
+
<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>, once?: boolean): () => void;
|
|
65
|
+
}
|
|
66
|
+
interface once<T extends EventMap> {
|
|
67
|
+
<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>): () => void;
|
|
68
|
+
}
|
|
69
|
+
interface off<T extends EventMap> {
|
|
70
|
+
<K extends keyof T>(names?: K | K[], callback?: (...args: any[]) => any): void;
|
|
71
|
+
}
|
|
72
|
+
interface emit<T extends EventMap> {
|
|
73
|
+
<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export { Subscribe };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PaintBrushAction, PaintBrushConfigs, PaintBrushEventMap, PaintBrushState } from './typings';
|
|
2
|
+
export declare class PaintBrush {
|
|
3
|
+
private controller;
|
|
4
|
+
constructor(configs?: Partial<PaintBrushConfigs>);
|
|
5
|
+
on<K extends keyof PaintBrushEventMap>(name: K, callback: (...args: Parameters<PaintBrushEventMap[K]>) => ReturnType<PaintBrushEventMap[K]>): void;
|
|
6
|
+
off<K extends keyof PaintBrushEventMap>(name: K, callback: (...args: Parameters<PaintBrushEventMap[K]>) => ReturnType<PaintBrushEventMap[K]>): void;
|
|
7
|
+
once<K extends keyof PaintBrushEventMap>(name: K, callback: (...args: Parameters<PaintBrushEventMap[K]>) => ReturnType<PaintBrushEventMap[K]>): void;
|
|
8
|
+
/**
|
|
9
|
+
* 显示画笔。
|
|
10
|
+
*/
|
|
11
|
+
show(): void;
|
|
12
|
+
action(action: PaintBrushAction): void;
|
|
13
|
+
/**
|
|
14
|
+
* 获取画笔状态。
|
|
15
|
+
*/
|
|
16
|
+
get state(): Record<string, PaintBrushState[]>;
|
|
17
|
+
get configs(): PaintBrushConfigs;
|
|
18
|
+
/**
|
|
19
|
+
* 销毁。
|
|
20
|
+
*
|
|
21
|
+
* @deprecated
|
|
22
|
+
*
|
|
23
|
+
* @description 画笔应该维护一个 **全局单例**,重复利用。
|
|
24
|
+
*/
|
|
25
|
+
dispose(): void;
|
|
26
|
+
setCurrentColor(color: string): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const PaintBrushStyle = "\n<style type=\"text/css\">\n\n#_gl_paintBrush {\nposition: fixed;\ntop: 0;\nbottom: 0;\nleft: 0;\nright: 0;\ntransform: translateZ(0);\nz-index: 1997;\npointer-events: none;\nopacity: 0;\ntransition: all 500ms;\n}\n\n#_gl_paintBrush.brushing {\n opacity: 1;\n}\n\n#_gl_paintBrush ._paintBrush-canvas {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n}\n\n#_gl_paintBrush ._paintBrush-canvas--sync {\n pointer-events: none;\n z-index: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n}\n\n#_gl_paintBrush ._paintBrush-canvas {\n pointer-events: none;\n z-index: 1;\n}\n\n#_gl_paintBrush.brushing ._paintBrush-canvas {\n pointer-events: auto;\n}\n\n#_gl_paintBrush ._paintBrush-ctrl {\n width: 140px;\n height: 52px;\n position: absolute;\n bottom: 28px;\n right: 50%;\n transform: translateX(50%);\n font-size: 10px;\n color: white;\n z-index: 2;\n}\n\n#_gl_paintBrush.brushing ._paintBrush-ctrl {\n pointer-events: auto;\n}\n\n#_gl_paintBrush ._paintBrush-ctrl ._paintBrush-ctrlinner {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n height: 100%;\n border-radius: 26px;\n padding: 8px 16px;\n box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);\n background-image: linear-gradient(180deg, hsl(0deg 0% 0% / 57%), hsl(0deg 0% 0% / 70%) 117%);\n}\n\n._paintBrush-ctrlitem {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 38px;\n height: 38px;\n cursor: pointer;\n}\n\n._paintBrush-ctrlitem--undo >.brush-icon{\n background-image: url(\"//vrlab-static.ljcdn.com/release/web/revoke.ab7694ef.svg\");\n background-size: 100%;\n width: 22px;\n height: 22px;\n}\n\n._paintBrush-ctrlitem--close >.brush-icon {\n background-image: url(\"//vrlab-static.ljcdn.com/release/web/exit_paintbrush.02bc1341.svg\");\n background-size: 100%;\n width: 22px;\n height: 22px;\n}\n\n</style>\n";
|
|
2
|
+
export default PaintBrushStyle;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
2
|
+
export interface TweenRes extends Tween<any> {
|
|
3
|
+
onDestroy: (fn: () => void) => any;
|
|
4
|
+
destroy: () => any;
|
|
5
|
+
}
|
|
6
|
+
export default function tween(from: any, to: any, duration: number, easing?: (amount: number) => number): TweenRes;
|
|
7
|
+
export declare function tweenProgress(duration: number, easing: (amount: number) => number): TweenRes;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface PaintBrushConfigs {
|
|
2
|
+
container?: HTMLDivElement;
|
|
3
|
+
currentColor: string;
|
|
4
|
+
DPR?: number;
|
|
5
|
+
onClickClose?: () => void;
|
|
6
|
+
onClickUndo?: () => void;
|
|
7
|
+
onUndoText?: string;
|
|
8
|
+
onExitText?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type PaintBrushEventMap = {
|
|
11
|
+
readyChange: (ready: boolean) => void;
|
|
12
|
+
stateChange: (state: PaintBrushAction, userAction: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
export interface PaintBrushState {
|
|
15
|
+
move: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
line: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
}[];
|
|
23
|
+
color: string;
|
|
24
|
+
uuid: string;
|
|
25
|
+
duration: number;
|
|
26
|
+
}
|
|
27
|
+
export declare enum PaintBrushTypeEnum {
|
|
28
|
+
Drawline = "Drawline",
|
|
29
|
+
Undo = "Undo",
|
|
30
|
+
Exit = "Exit"
|
|
31
|
+
}
|
|
32
|
+
export interface PaintBrushAction {
|
|
33
|
+
uuid: string;
|
|
34
|
+
/**
|
|
35
|
+
* 类型枚举
|
|
36
|
+
*/
|
|
37
|
+
type: PaintBrushTypeEnum;
|
|
38
|
+
/**
|
|
39
|
+
* 颜色色值
|
|
40
|
+
*/
|
|
41
|
+
color: string;
|
|
42
|
+
/**
|
|
43
|
+
* 是否就绪
|
|
44
|
+
*/
|
|
45
|
+
ready: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 状态值
|
|
48
|
+
*/
|
|
49
|
+
state?: PaintBrushState;
|
|
50
|
+
/**
|
|
51
|
+
* 时间戳:当作 uuid 使用
|
|
52
|
+
*/
|
|
53
|
+
timestamp?: number;
|
|
54
|
+
/**
|
|
55
|
+
* 是否是结尾数据
|
|
56
|
+
*/
|
|
57
|
+
end?: boolean;
|
|
58
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare function noop(): void;
|
|
2
|
+
export interface Coords {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function queue(promiseCallback?: () => Promise<void>): void;
|
|
7
|
+
export declare function transformCoords(coords: Coords, cw: number, ch: number): {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function unTransformCoords(coords: Coords, cw: number, ch: number): {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function getQuadraticCurvePoint(points: Coords[]): {
|
|
16
|
+
control?: undefined;
|
|
17
|
+
end?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
control: Coords;
|
|
20
|
+
end: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare function execInterval(i: number, time: number, callback?: typeof noop): void;
|
|
26
|
+
export declare function nextFrame(fn: FrameRequestCallback, delay?: number): void;
|
package/dist/env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@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { PartialDeep } from 'type-fest';
|
|
2
|
+
import type { BaseOptions } from '../../base/BasePlugin';
|
|
3
|
+
import type { Five } from '@realsee/five';
|
|
4
|
+
import type { ShowState } from '../utils/correctFiveState';
|
|
5
|
+
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
6
|
+
import type { State, Config, EventMap, ShowOptions, HideOptions, Parameters, PluginData, PluginServerData } from './typing';
|
|
7
|
+
import * as BasePlugin from '../../base/BasePluginWithData';
|
|
8
|
+
export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
|
|
9
|
+
name: string;
|
|
10
|
+
state: State;
|
|
11
|
+
protected data?: PluginData;
|
|
12
|
+
/** 展示户型图时,需要正确的状态 */
|
|
13
|
+
protected showState: ShowState;
|
|
14
|
+
/** show 动画的公共 Promise */
|
|
15
|
+
protected showPromise?: Promise<void>;
|
|
16
|
+
private app?;
|
|
17
|
+
private panoIndex;
|
|
18
|
+
private floorIndex;
|
|
19
|
+
private selector?;
|
|
20
|
+
/** 公共 Promise 的 reject 方法 */
|
|
21
|
+
private showRejection?;
|
|
22
|
+
/** 户型图父容器 */
|
|
23
|
+
private wrapper?;
|
|
24
|
+
/** 户型图主容器 */
|
|
25
|
+
private container;
|
|
26
|
+
/** 展示户型图图前,Five 的 Panorama Longitude */
|
|
27
|
+
private lastPanoramaLongitude;
|
|
28
|
+
/** 户型图大小 */
|
|
29
|
+
private size;
|
|
30
|
+
/** 是否已经执行过事件监听 */
|
|
31
|
+
private hasAddedEventListener;
|
|
32
|
+
/** 上一次隐藏是否是用户调用了 hide 导致的 */
|
|
33
|
+
private isHiddenByHideFunc;
|
|
34
|
+
constructor(five: Five, params?: Parameters);
|
|
35
|
+
load(serverData: PluginServerData | FloorplanServerData, state?: Partial<State>, userAction?: boolean): Promise<void>;
|
|
36
|
+
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
37
|
+
appendTo(wrapper: Element): this;
|
|
38
|
+
/** 启用插件 */
|
|
39
|
+
enable(options?: BaseOptions): void;
|
|
40
|
+
/** 禁用插件 */
|
|
41
|
+
disable(options?: BaseOptions): void;
|
|
42
|
+
/** 销毁插件 */
|
|
43
|
+
dispose: () => void;
|
|
44
|
+
/** 展示户型图
|
|
45
|
+
* 1. show 函数大部分情况下需要耗时
|
|
46
|
+
* 2. 如果当前已经在展示中,将不会触发任何事件
|
|
47
|
+
* 3. 如果展示过程被中断,将抛出错误
|
|
48
|
+
* 4. 多次调用 show 方法,只会触发一次 showAnimationEnded 事件,但是展示结果会取决于最后一次调用参数
|
|
49
|
+
* 5. 如果多次调用 show 方法,参数与上次参数不一致时,上次 show Promise 会被 reject
|
|
50
|
+
* @param opts.floorIndex 楼层
|
|
51
|
+
* @param opts.modelOpacity 模型透明度
|
|
52
|
+
* @param opts.immediately 是否立即展示
|
|
53
|
+
* @param opts.isAutoShow 是否是自动展示
|
|
54
|
+
* @param opts.userAction 是否是用户行为
|
|
55
|
+
*/
|
|
56
|
+
show: (options?: Omit<Partial<ShowOptions>, 'isAutoShow'>) => Promise<void>;
|
|
57
|
+
/** 隐藏户型图 */
|
|
58
|
+
hide: (options?: Partial<HideOptions>) => Promise<void>;
|
|
59
|
+
/** 更改插件 State */
|
|
60
|
+
setState(state: PartialDeep<State>, options?: BaseOptions): void;
|
|
61
|
+
changeConfigs(config: Partial<Config>, userAction?: boolean): void;
|
|
62
|
+
/** 更新户型图大小 */
|
|
63
|
+
updateSize: () => void;
|
|
64
|
+
/** 更新户型图位置 */
|
|
65
|
+
updatePosition(): void;
|
|
66
|
+
protected formatData(serverData: PluginServerData): Promise<PluginData>;
|
|
67
|
+
private _disable;
|
|
68
|
+
private _enable;
|
|
69
|
+
private _show;
|
|
70
|
+
private _hide;
|
|
71
|
+
private updateState;
|
|
72
|
+
/** 如果用户是通过 selector 设置父容器,需要在 modelLoaded 之后把 container 自动放到父容器里
|
|
73
|
+
*
|
|
74
|
+
* - TODO: 等 selector 功能下掉之后删除这个逻辑
|
|
75
|
+
*/
|
|
76
|
+
private initContainer;
|
|
77
|
+
private handleClick;
|
|
78
|
+
private addEventListener;
|
|
79
|
+
private removeEventListener;
|
|
80
|
+
/** modelLoaded 之后自动执行 append container 操作 */
|
|
81
|
+
private onFiveModelLoaded;
|
|
82
|
+
/** 更改模型时,自动隐藏户型图 */
|
|
83
|
+
private onFiveModeChange;
|
|
84
|
+
/** panoIndex 改变时,更新 floorIndex */
|
|
85
|
+
private onFivePanoArrived;
|
|
86
|
+
/** cameraUpdate 时判断户型图是否应该自动隐藏 */
|
|
87
|
+
private onFiveCameraUpdate;
|
|
88
|
+
/** 户型图展示中,转动三维模型,结束时应该自动修复模型状态 */
|
|
89
|
+
private onFiveWantsPanGesture;
|
|
90
|
+
/** 阻止点击分间走点 */
|
|
91
|
+
private onFiveWantsTapGesture;
|
|
92
|
+
/** 从 Panorama 切换到其他模态时,记录当前的相机水平视角 */
|
|
93
|
+
private onFiveWantsChangeMode;
|
|
94
|
+
/** 模型楼层高亮改变时,自动进行楼层切换 */
|
|
95
|
+
private onModelShownFloorChange;
|
|
96
|
+
private render;
|
|
97
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Parameters } from './typing';
|
|
2
|
+
import type { FivePlugin } from '@realsee/five';
|
|
3
|
+
import { Controller } from './Controller';
|
|
4
|
+
export declare const MapviewFloorplanPlugin: FivePlugin<undefined | Parameters, Controller>;
|
|
5
|
+
export declare type MapviewFloorplanPluginParameterType = Parameters | undefined;
|
|
6
|
+
export declare type MapviewFloorplanPluginReturnType = InstanceType<typeof Controller>;
|
|
7
|
+
export default MapviewFloorplanPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../typings';
|