@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
package/README.md
CHANGED
|
@@ -86,6 +86,51 @@ five.plugins.PluginName.dispose()
|
|
|
86
86
|
- 🔌 PanoCompassPlugin:全景指南针插件
|
|
87
87
|
- 其他插件持续更新中...
|
|
88
88
|
|
|
89
|
+
# 可能遇到的问题
|
|
90
|
+
|
|
91
|
+
1. webpack打包出现以下错误
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
Module not found: Error: Can't resolve '@realsee/five/line' in 'xxx/node_modules/@realsee/dnalogel/libs'
|
|
95
|
+
Did you mean 'index.js'?
|
|
96
|
+
BREAKING CHANGE: The request '@realsee/five/line' failed to resolve only because it was resolved as fully specified
|
|
97
|
+
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
|
|
98
|
+
The extension in the request is mandatory for it to be fully specified.
|
|
99
|
+
Add the extension to the request.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
解决方案:在webpack配置里加以下rule
|
|
103
|
+
参考:[resolvefullyspecified](https://webpack.js.org/configuration/module/#resolvefullyspecified)
|
|
104
|
+
|
|
105
|
+
```js
|
|
106
|
+
{
|
|
107
|
+
test: /\.m?js$/,
|
|
108
|
+
resolve: {
|
|
109
|
+
fullySpecified: false, // disable the behaviour
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
2. webpack4出现以下错误:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
Error: Can't resolve 'swiper/css' in 'xxx/node_modules/@realsee/dnalogel/libs
|
|
118
|
+
Error: Can't resolve 'swiper/css/autoplay' in 'xxx/node_modules/@realsee/dnalogel/libs
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
解决方案:在webpack配置里加以下alias
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
alias: {
|
|
125
|
+
// swiper 使用exports声明导出,webpack4还不支持,需要用alias处理,并且要从子路径开始,否则父路径会覆盖子路径
|
|
126
|
+
'swiper/css/autoplay': path.resolve(
|
|
127
|
+
__dirname,
|
|
128
|
+
'node_modules/swiper/modules/autoplay/autoplay.min.css'
|
|
129
|
+
),
|
|
130
|
+
'swiper/css': path.resolve(__dirname, 'node_modules/swiper/swiper.min.css'),
|
|
131
|
+
},
|
|
132
|
+
```
|
|
133
|
+
|
|
89
134
|
# License
|
|
90
135
|
|
|
91
136
|
[TERMS](https://github.com/realsee-developer/dnalogel/blob/main/plugins/TERMS.txt)
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { CSS3DRenderer } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
3
|
+
import { Subscribe } from '../shared-utils/Subscribe';
|
|
4
|
+
import { AnyPosition } from './utils';
|
|
5
|
+
import { CSS3DObjectPlus, Mode } from './utils/CSS3DObjectPlus';
|
|
6
|
+
export { MinRatio } from './utils/CSS3DObjectPlus';
|
|
7
|
+
export declare const __ELEMENT__ = "__CSS3DOBJECT_CSS3DRENDER_CONTAINER__";
|
|
8
|
+
export declare const PLUGIN: string;
|
|
9
|
+
export interface CSS3DRenderState {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
disposed: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare type CSS3DRenderEventMap = {
|
|
15
|
+
show: (options?: {
|
|
16
|
+
userAction?: boolean;
|
|
17
|
+
}) => void;
|
|
18
|
+
hide: (options?: {
|
|
19
|
+
userAction?: boolean;
|
|
20
|
+
}) => void;
|
|
21
|
+
enable: (options?: {
|
|
22
|
+
userAction?: boolean;
|
|
23
|
+
}) => void;
|
|
24
|
+
disable: (options?: {
|
|
25
|
+
userAction?: boolean;
|
|
26
|
+
}) => void;
|
|
27
|
+
dispose: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* 插件状态变化
|
|
30
|
+
* @param params.state 最新的State
|
|
31
|
+
* @param params.prevState 上一个State
|
|
32
|
+
* @param params.userAction 是否是用户触发
|
|
33
|
+
*/
|
|
34
|
+
stateChange: (params: {
|
|
35
|
+
state: CSS3DRenderState;
|
|
36
|
+
prevState?: CSS3DRenderState;
|
|
37
|
+
userAction: boolean;
|
|
38
|
+
}) => void;
|
|
39
|
+
};
|
|
40
|
+
export interface Create3DDElementParamsType {
|
|
41
|
+
points: AnyPosition[];
|
|
42
|
+
config?: {
|
|
43
|
+
ratio?: number;
|
|
44
|
+
devicePixelRatio?: number;
|
|
45
|
+
autoRender?: boolean;
|
|
46
|
+
container?: HTMLElement;
|
|
47
|
+
pointerEvents?: 'none' | 'auto';
|
|
48
|
+
scene?: THREE.Scene;
|
|
49
|
+
} & ({
|
|
50
|
+
mode?: 'front';
|
|
51
|
+
} | {
|
|
52
|
+
mode: 'behind';
|
|
53
|
+
scene: THREE.Scene;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export declare const globalStore: {
|
|
57
|
+
frontModeResizeObserver?: {
|
|
58
|
+
observe: () => void;
|
|
59
|
+
unobserve: () => void;
|
|
60
|
+
};
|
|
61
|
+
behindModeResizeObserver?: {
|
|
62
|
+
observe: () => void;
|
|
63
|
+
unobserve: () => void;
|
|
64
|
+
};
|
|
65
|
+
frontModeContainer?: Element;
|
|
66
|
+
behindModeContainer?: Element;
|
|
67
|
+
frontModeStore?: {
|
|
68
|
+
css3DScene: THREE.Scene;
|
|
69
|
+
css3DRenderer: CSS3DRenderer;
|
|
70
|
+
requestAnimationFrameId?: number;
|
|
71
|
+
appendedToPage?: boolean;
|
|
72
|
+
};
|
|
73
|
+
behindModeStore?: {
|
|
74
|
+
scene: THREE.Scene;
|
|
75
|
+
css3DScene: THREE.Scene;
|
|
76
|
+
css3DRenderer: CSS3DRenderer;
|
|
77
|
+
requestAnimationFrameId?: number;
|
|
78
|
+
appendedToPage?: boolean;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export declare class CSS3DRender {
|
|
82
|
+
hooks: Subscribe<CSS3DRenderEventMap>;
|
|
83
|
+
state: CSS3DRenderState;
|
|
84
|
+
private store;
|
|
85
|
+
getCurrentState(): CSS3DRenderState;
|
|
86
|
+
setState(state: Partial<CSS3DRenderState>, options?: {
|
|
87
|
+
userAction: boolean;
|
|
88
|
+
}): void;
|
|
89
|
+
dispose(): void;
|
|
90
|
+
show({ userAction }?: {
|
|
91
|
+
userAction: boolean;
|
|
92
|
+
}): Promise<void>;
|
|
93
|
+
hide({ userAction }?: {
|
|
94
|
+
userAction: boolean;
|
|
95
|
+
}): Promise<void>;
|
|
96
|
+
enable({ userAction }?: {
|
|
97
|
+
userAction: boolean;
|
|
98
|
+
}): void;
|
|
99
|
+
disable({ userAction }?: {
|
|
100
|
+
userAction: boolean;
|
|
101
|
+
}): void;
|
|
102
|
+
/**
|
|
103
|
+
* @description 根据传入的四个点位创建一个 3d dom容器,可以通过ReactDom.render()的方式将react组件放到容器中
|
|
104
|
+
* @param { Vector3Position[] } points 矩形四个点坐标
|
|
105
|
+
* @param config 均为可选值
|
|
106
|
+
* @config_document `config` 均为可选值
|
|
107
|
+
* | key | type | defaultValue | comment |
|
|
108
|
+
* | - | - | - | - |
|
|
109
|
+
* | `ratio` | *`number`* | `0.00216` | 1px对应多少米,默认为 0.00216,即1px对应2.16mm |
|
|
110
|
+
* | `devicePixelRatio` | *`number`* | `1` | 设备的物理像素分辨率与CSS像素分辨率的比值 |
|
|
111
|
+
* | `container` | *`HTMLElement`* | `undefined` | 自定义 return 中的 `container`
|
|
112
|
+
* | `pointerEvents` | *`'none'\|'auto'`* | `'none'` | container 的 css属性:`pointer-events` 的值 |
|
|
113
|
+
* | `autoRender` | *`boolean`* | `true` | 是否自动渲染,通常为true |
|
|
114
|
+
* | `mode` | *`'front'\|'behind'`* | `front` | 两种模式:|
|
|
115
|
+
* | | | | `front` 模式:DOM 处于 five Canvas 上方,所以无法模拟遮挡效果,需要手动检测是否可见去设置显隐 |
|
|
116
|
+
* | | | | `behind` 模式:DOM 处于 five Canvas 下方,可以模拟真实的遮挡效果,但是 DOM 必须是非透明的 |
|
|
117
|
+
* | `scene` | *`THREE.Scene`* | `undefined` | 如果 mode 为 `behind`,需要传入 |
|
|
118
|
+
*
|
|
119
|
+
* @return
|
|
120
|
+
* ```typescript
|
|
121
|
+
* {
|
|
122
|
+
* id: string, // id
|
|
123
|
+
* container: HTMLDIVElement // dom容器
|
|
124
|
+
* dispose: () => void // 销毁
|
|
125
|
+
* css3DObject: CSS3DObject // THREE.CSS3DObject 实例
|
|
126
|
+
* render?: () => void // 渲染函数,当 config.autoRender = true || undefined 时为 undefined
|
|
127
|
+
* setVisible: (visible: boolean) => void // 设置显隐, 同 setVisibleById(id, visible)
|
|
128
|
+
* show: () => void // 同 setVisible(true)
|
|
129
|
+
* hide: () => void // 同 setVisible(false)
|
|
130
|
+
* setEnabled: (enabled: boolean) => void // 添加/移除 container, 同 setEnabledById(id, enabled)
|
|
131
|
+
* enable: () => void // 同 setEnabled(true)
|
|
132
|
+
* disable: () => void // 同 setEnabled(false)
|
|
133
|
+
* } | void
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
create3DElement: (camera: THREE.Camera, points: Create3DDElementParamsType['points'], config?: Create3DDElementParamsType['config']) => void | {
|
|
137
|
+
id: string;
|
|
138
|
+
container: HTMLElement;
|
|
139
|
+
dispose: () => boolean;
|
|
140
|
+
css3DObject: CSS3DObjectPlus<HTMLElement>;
|
|
141
|
+
render: () => void;
|
|
142
|
+
show: () => void;
|
|
143
|
+
hide: () => void;
|
|
144
|
+
setVisible: (visible: boolean) => void;
|
|
145
|
+
disable: () => void;
|
|
146
|
+
enable: () => void;
|
|
147
|
+
setEnabled: (enabled: boolean) => void;
|
|
148
|
+
appendToElement: (container: Element) => void;
|
|
149
|
+
};
|
|
150
|
+
setContainer(container: Element, mode: Mode): void;
|
|
151
|
+
appendToElement(container: Element | undefined, mode: Mode): void;
|
|
152
|
+
setVisibleById: (id: string, visible: boolean) => void;
|
|
153
|
+
setEnabledById: (id: string, enabled: boolean) => void;
|
|
154
|
+
private render;
|
|
155
|
+
private createObject;
|
|
156
|
+
private initGlobalModeStore;
|
|
157
|
+
/**
|
|
158
|
+
* @description: 生成透明Mesh
|
|
159
|
+
*/
|
|
160
|
+
private createOpacityMesh;
|
|
161
|
+
private handleShow;
|
|
162
|
+
private handleHide;
|
|
163
|
+
private handleEnable;
|
|
164
|
+
private handleDisable;
|
|
165
|
+
private createResizeObserver;
|
|
166
|
+
private disposedErrorLog;
|
|
167
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type * as BasePlugin from '../base/BasePlugin';
|
|
2
|
+
import type { Five } from '@realsee/five';
|
|
3
|
+
import { CSS3DRender, CSS3DRenderEventMap, CSS3DRenderState } from './CSS3DRender';
|
|
4
|
+
import type { AnyPosition } from './utils';
|
|
5
|
+
export declare const PLUGIN_NAME: string;
|
|
6
|
+
export interface Create3DDomContainerParamsType {
|
|
7
|
+
points: AnyPosition[];
|
|
8
|
+
config?: {
|
|
9
|
+
ratio?: number;
|
|
10
|
+
/** @deprecated dpr renamed as devicePixelRatio */
|
|
11
|
+
dpr?: number;
|
|
12
|
+
devicePixelRatio?: number;
|
|
13
|
+
autoRender?: boolean;
|
|
14
|
+
container?: HTMLElement;
|
|
15
|
+
pointerEvents?: 'none' | 'auto';
|
|
16
|
+
} & ({
|
|
17
|
+
mode?: 'front';
|
|
18
|
+
} | {
|
|
19
|
+
mode: 'behind';
|
|
20
|
+
behindFiveContainer: HTMLElement;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export default class Controller extends CSS3DRender implements BasePlugin.Controller<CSS3DRenderState, CSS3DRenderEventMap> {
|
|
24
|
+
five: Five;
|
|
25
|
+
behindFiveContainer?: HTMLElement;
|
|
26
|
+
readonly staticPrefix: string;
|
|
27
|
+
constructor(five: Five);
|
|
28
|
+
/** @deprecated disposeAll() renamed as dispose() */
|
|
29
|
+
disposeAll(): void;
|
|
30
|
+
setState(...params: Parameters<InstanceType<typeof CSS3DRender>['setState']>): void;
|
|
31
|
+
/**
|
|
32
|
+
* @description 根据传入的四个点位创建一个 3d dom容器,可以通过ReactDom.render()的方式将react组件放到容器中
|
|
33
|
+
* @param { Vector3Position[] } points 矩形四个点坐标
|
|
34
|
+
* @param config 均为可选值
|
|
35
|
+
* @config_document `config` 均为可选值
|
|
36
|
+
* | key | type | defaultValue | comment |
|
|
37
|
+
* | - | - | - | - |
|
|
38
|
+
* | `ratio` | *`number`* | `0.00216` | 1px对应多少米,默认为 0.00216,即1px对应2.16mm |
|
|
39
|
+
* | ~~`dpr`~~ | ~~*`number`*~~ | ~~`undefined`~~ | ~~**已改名**,请使用~~ `devicePixelRatio` |
|
|
40
|
+
* | `devicePixelRatio` | *`number`* | `1` | 设备的物理像素分辨率与CSS像素分辨率的比值 |
|
|
41
|
+
* | `container` | *`HTMLElement`* | `undefined` | 自定义 return 中的 `container`
|
|
42
|
+
* | `pointerEvents` | *`'none'\|'auto'`* | `'none'` | container 的 css属性:`pointer-events` 的值 |
|
|
43
|
+
* | `autoRender` | *`boolean`* | `true` | 是否自动渲染,通常为true |
|
|
44
|
+
* | `mode` | *`'front'\|'behind'`* | `front` | 两种模式:|
|
|
45
|
+
* | | | | `front` 模式:DOM 处于 five Canvas 上方,所以无法模拟遮挡效果,需要手动检测是否可见去设置显隐 |
|
|
46
|
+
* | | | | `behind` 模式:DOM 处于 five Canvas 下方,可以模拟真实的遮挡效果,但是 DOM 必须是非透明的 |
|
|
47
|
+
* | `behindFiveContainer` | *`HTMLElement`* | `undefined` | 如果 mode 为 `behind`,需要传入容器,并确保此容器位five下方,且中间无其他不透明的dom元素遮挡 |
|
|
48
|
+
*
|
|
49
|
+
* @return
|
|
50
|
+
* ```typescript
|
|
51
|
+
* {
|
|
52
|
+
* id: string, // id
|
|
53
|
+
* container: HTMLDIVElement // dom容器
|
|
54
|
+
* dispose: () => void // 销毁
|
|
55
|
+
* css3DObject: CSS3DObject // THREE.CSS3DObject 实例
|
|
56
|
+
* render?: () => void // 渲染函数,当 config.autoRender = true || undefined 时为 undefined
|
|
57
|
+
* setVisible: (visible: boolean) => void // 设置显隐, 同 setVisibleById(id, visible)
|
|
58
|
+
* show: () => void // 同 setVisible(true)
|
|
59
|
+
* hide: () => void // 同 setVisible(false)
|
|
60
|
+
* setEnabled: (enabled: boolean) => void // 添加/移除 container, 同 setEnabledById(id, enabled)
|
|
61
|
+
* enable: () => void // 同 setEnabled(true)
|
|
62
|
+
* disable: () => void // 同 setEnabled(false)
|
|
63
|
+
* } | void
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
create3DDomContainer: (points: Create3DDomContainerParamsType['points'], config?: Create3DDomContainerParamsType['config']) => {
|
|
67
|
+
render: () => void;
|
|
68
|
+
id: string;
|
|
69
|
+
container: HTMLElement;
|
|
70
|
+
dispose: () => boolean;
|
|
71
|
+
css3DObject: import("./utils/CSS3DObjectPlus").CSS3DObjectPlus<HTMLElement>;
|
|
72
|
+
show: () => void;
|
|
73
|
+
hide: () => void;
|
|
74
|
+
setVisible: (visible: boolean) => void;
|
|
75
|
+
disable: () => void;
|
|
76
|
+
enable: () => void;
|
|
77
|
+
setEnabled: (enabled: boolean) => void;
|
|
78
|
+
appendToElement: (container: Element) => void;
|
|
79
|
+
};
|
|
80
|
+
private getBehindFiveElement;
|
|
81
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type CSS3DRenderPlugin from '.';
|
|
2
|
+
import type * as BasePlugin from '../base/BasePlugin';
|
|
3
|
+
import type { CSS3DRender } from './CSS3DRender';
|
|
4
|
+
export declare type CSS3DRenderPluginParameterType = undefined;
|
|
5
|
+
export declare type CSS3DRenderPluginExportType = ReturnType<typeof CSS3DRenderPlugin>;
|
|
6
|
+
export declare type CSS3DRenderExportType = InstanceType<typeof CSS3DRender>;
|
|
7
|
+
export declare type Create3DDomContainerReturnType = ReturnType<CSS3DRenderPluginExportType['create3DDomContainer']>;
|
|
8
|
+
export declare type Create3DElementReturnType = ReturnType<InstanceType<typeof CSS3DRender>['create3DElement']>;
|
|
9
|
+
export interface CSS3DRenderPluginState extends BasePlugin.State {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface CSS3DRenderPluginEventMap extends BasePlugin.EventMap<CSS3DRenderPluginState> {
|
|
14
|
+
show: (options?: {
|
|
15
|
+
userAction?: boolean;
|
|
16
|
+
}) => void;
|
|
17
|
+
hide: (options?: {
|
|
18
|
+
userAction?: boolean;
|
|
19
|
+
}) => void;
|
|
20
|
+
enable: (options?: {
|
|
21
|
+
userAction?: boolean;
|
|
22
|
+
}) => void;
|
|
23
|
+
disable: (options?: {
|
|
24
|
+
userAction?: boolean;
|
|
25
|
+
}) => void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
2
|
+
import { Matrix4, Quaternion, Vector3 } from 'three';
|
|
3
|
+
import { Subscribe } from '../../shared-utils/Subscribe';
|
|
4
|
+
import type * as THREE from 'three';
|
|
5
|
+
export declare const MinRatio = 0.00216;
|
|
6
|
+
export declare const DefaultRatio = 0.003;
|
|
7
|
+
export declare type Mode = 'front' | 'behind';
|
|
8
|
+
export declare type CornerPoints = [Vector3, Vector3, Vector3, Vector3];
|
|
9
|
+
export declare type CSS3DRenderEventMap = {
|
|
10
|
+
applyMatrix4: (matrix: Matrix4) => void;
|
|
11
|
+
applyQuaternion: (quaternion: Quaternion) => void;
|
|
12
|
+
applyScaleMatrix4: (matrix: Matrix4) => void;
|
|
13
|
+
changeMode: <T extends Mode = Mode>(mode: T, prevMode: Mode, scene: T extends 'behind' ? THREE.Scene : undefined) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare class CSS3DObjectPlus<T extends HTMLElement = HTMLElement> extends CSS3DObject {
|
|
16
|
+
version: string;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
domWidthPx: number;
|
|
20
|
+
domHeightPx: number;
|
|
21
|
+
cornerPoints: CornerPoints;
|
|
22
|
+
ratio: number;
|
|
23
|
+
container: T;
|
|
24
|
+
centerPosition: Vector3;
|
|
25
|
+
mode: 'front' | 'behind';
|
|
26
|
+
readonly hooks: Subscribe<CSS3DRenderEventMap>;
|
|
27
|
+
readonly isCSS3DObjectPlus: true;
|
|
28
|
+
constructor(container: T, cornerPoints: CornerPoints, ratio?: number, dpr?: number, mode?: Mode);
|
|
29
|
+
changeMode(mode: 'front'): void;
|
|
30
|
+
changeMode(mode: 'behind', scene: THREE.Scene): void;
|
|
31
|
+
applyScaleMatrix4(matrix: Matrix4): void;
|
|
32
|
+
applyMatrix4(matrix: Matrix4): void;
|
|
33
|
+
applyQuaternion(quaternion: Quaternion): this;
|
|
34
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
|
+
export declare type AnyPosition = Vector3 | [number, number, number] | {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
z: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const positionToVector3: ({ x, y, z }: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
z: number;
|
|
11
|
+
}) => Vector3;
|
|
12
|
+
export declare const arrayPositionToVector3: ([x, y, z]: [number, number, number]) => Vector3;
|
|
13
|
+
export declare const anyPositionToVector3: (position: AnyPosition) => Vector3;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function random(): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import { CameraMovementPluginExportType, CameraMovementPluginParameterType } from './typing';
|
|
3
|
+
/**
|
|
4
|
+
* **运镜插件** 模拟类似于电影运镜效果。
|
|
5
|
+
*/
|
|
6
|
+
export declare const CameraMovementPlugin: FivePlugin<CameraMovementPluginParameterType, CameraMovementPluginExportType>;
|
|
7
|
+
export default CameraMovementPlugin;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import CameraMovementPlugin from "./CameraMovementPlugin";
|
|
2
|
+
export { CameraMovementPlugin };
|
|
3
|
+
export default CameraMovementPlugin;
|
|
4
|
+
export type { MoveArgs, MoveOpts, RotateArgs, RotateOpts, CameraMovementPluginExportType } from './typing';
|
|
5
|
+
export { CameraMovementEffect, Rotation } from './typing';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Mode, Pose } from '@realsee/five';
|
|
2
|
+
export interface CameraMovementPluginParameterType {
|
|
3
|
+
}
|
|
4
|
+
export interface CameraMovementPluginExportType {
|
|
5
|
+
/**
|
|
6
|
+
* 运镜:移动
|
|
7
|
+
* @param moveArgs 移动参数
|
|
8
|
+
* @param duration 移动耗时
|
|
9
|
+
* @param opts 额外配置
|
|
10
|
+
*/
|
|
11
|
+
move(moveArgs: Partial<MoveArgs>, duration: number, opts?: MoveOpts): Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* 运镜:旋转
|
|
14
|
+
* @param rotateArgs 旋转参数
|
|
15
|
+
* @param duration 旋转耗时
|
|
16
|
+
* @param opts 额外配置
|
|
17
|
+
*/
|
|
18
|
+
rotate(rotateArgs: Partial<RotateArgs>, duration: number, opts?: RotateOpts): Promise<boolean>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 运镜效果
|
|
22
|
+
*/
|
|
23
|
+
export declare enum CameraMovementEffect {
|
|
24
|
+
Move = "Move",
|
|
25
|
+
Rotate = "Rotate"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 旋转类型
|
|
29
|
+
*/
|
|
30
|
+
export declare enum Rotation {
|
|
31
|
+
Clockwise = "Clockwise",
|
|
32
|
+
Anticlockwise = "Anticlockwise",
|
|
33
|
+
Loop = "Loop"
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 回调配置
|
|
37
|
+
*/
|
|
38
|
+
export interface CameraMovementOptsCallback {
|
|
39
|
+
asyncStartCallback?: () => void;
|
|
40
|
+
asyncEndCallback?: () => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 移动运镜参数
|
|
44
|
+
*/
|
|
45
|
+
export declare type MoveArgs = {
|
|
46
|
+
mode: Mode;
|
|
47
|
+
panoIndex: number;
|
|
48
|
+
} & Pose;
|
|
49
|
+
/**
|
|
50
|
+
* 移动运镜配置
|
|
51
|
+
*/
|
|
52
|
+
export declare type MoveOpts = {
|
|
53
|
+
preload?: boolean;
|
|
54
|
+
} & CameraMovementOptsCallback;
|
|
55
|
+
/**
|
|
56
|
+
* 旋转运镜参数
|
|
57
|
+
*/
|
|
58
|
+
export declare type RotateArgs = {
|
|
59
|
+
panoIndex?: number;
|
|
60
|
+
rotateSpeed?: number;
|
|
61
|
+
rotation?: Rotation;
|
|
62
|
+
} & Pose;
|
|
63
|
+
/**
|
|
64
|
+
* 旋转运镜配置
|
|
65
|
+
*/
|
|
66
|
+
export declare type RotateOpts = {
|
|
67
|
+
preload?: boolean;
|
|
68
|
+
} & CameraMovementOptsCallback;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { BaseOptions } from '../base/BasePlugin';
|
|
3
|
+
import * as BasePluginWithData from '../base/BasePluginWithData';
|
|
4
|
+
import type { PluginState, EventMap, PluginServerData, PluginData } from './typing';
|
|
5
|
+
import type { Config } from '../base/BasePlugin';
|
|
6
|
+
export declare const pluginFlag: (name: string) => string;
|
|
7
|
+
export default class CruisePluginController extends BasePluginWithData.Controller<PluginState, EventMap, PluginServerData, PluginData> {
|
|
8
|
+
static PluginVersion: string;
|
|
9
|
+
state: PluginState;
|
|
10
|
+
protected data?: PluginData;
|
|
11
|
+
private config?;
|
|
12
|
+
private privateState;
|
|
13
|
+
private GuideLine?;
|
|
14
|
+
constructor(five: Five, config?: Config);
|
|
15
|
+
/**
|
|
16
|
+
* @description Load Data and State
|
|
17
|
+
*/
|
|
18
|
+
load(serverData: PluginServerData | PluginServerData['data'], state?: PluginState, userAction?: boolean): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* @description Play | Continue play. if have been paused, continue play from the pause position; if playing, do nothing
|
|
21
|
+
*/
|
|
22
|
+
play(options?: {
|
|
23
|
+
userAction?: boolean;
|
|
24
|
+
}): void;
|
|
25
|
+
/**
|
|
26
|
+
* @description If playing, first pause, then play from keyframes index/id
|
|
27
|
+
* @param {number} options.index play from keyframes index
|
|
28
|
+
* @param {string} options.id play from keyframes id
|
|
29
|
+
*/
|
|
30
|
+
playFrom(options: {
|
|
31
|
+
userAction?: boolean;
|
|
32
|
+
index?: number;
|
|
33
|
+
id?: string;
|
|
34
|
+
}): void;
|
|
35
|
+
/**
|
|
36
|
+
* @description Play from first keyframe
|
|
37
|
+
*/
|
|
38
|
+
playFromStart(options?: {
|
|
39
|
+
userAction?: boolean;
|
|
40
|
+
}): void;
|
|
41
|
+
/**
|
|
42
|
+
* @description Pause
|
|
43
|
+
*/
|
|
44
|
+
pause(options?: {
|
|
45
|
+
userAction?: boolean;
|
|
46
|
+
}): void;
|
|
47
|
+
/**
|
|
48
|
+
* @description Show guide line
|
|
49
|
+
*/
|
|
50
|
+
show(options?: {
|
|
51
|
+
userAction?: boolean;
|
|
52
|
+
}): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* @description Hide guide line
|
|
55
|
+
*/
|
|
56
|
+
hide(options?: {
|
|
57
|
+
userAction?: boolean;
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* @description Enable
|
|
61
|
+
*/
|
|
62
|
+
enable(options?: {
|
|
63
|
+
userAction?: boolean;
|
|
64
|
+
}): void;
|
|
65
|
+
/**
|
|
66
|
+
* @description Disable
|
|
67
|
+
*/
|
|
68
|
+
disable(options?: {
|
|
69
|
+
userAction?: boolean;
|
|
70
|
+
}): void;
|
|
71
|
+
/**
|
|
72
|
+
* @description Dispose
|
|
73
|
+
*/
|
|
74
|
+
dispose(): void;
|
|
75
|
+
/**
|
|
76
|
+
* @description Set state
|
|
77
|
+
*/
|
|
78
|
+
setState(state: Partial<PluginState>, options?: BaseOptions & Record<string, any>): void;
|
|
79
|
+
/**
|
|
80
|
+
* @description Format data
|
|
81
|
+
*/
|
|
82
|
+
protected formatData(serverData: PluginServerData | PluginServerData['data']): Promise<PluginData>;
|
|
83
|
+
private handleEnable;
|
|
84
|
+
private handleVisible;
|
|
85
|
+
private changePlayState;
|
|
86
|
+
/**
|
|
87
|
+
* @description Play | Continue play. if have been paused, continue play from the pause position; if playing, do nothing
|
|
88
|
+
* @param {number} options.playFromIndex play from keyframes index
|
|
89
|
+
* @param {string} options.playFromId play from keyframes id
|
|
90
|
+
*/
|
|
91
|
+
private handlePlay;
|
|
92
|
+
/**
|
|
93
|
+
* @description: Pause and record pause state
|
|
94
|
+
*/
|
|
95
|
+
private handlePause;
|
|
96
|
+
/**
|
|
97
|
+
* @description Play single keyframe
|
|
98
|
+
*/
|
|
99
|
+
private playKeyframe;
|
|
100
|
+
/**
|
|
101
|
+
* @description: listen interupted by five gesture
|
|
102
|
+
*/
|
|
103
|
+
private addInterruptListener;
|
|
104
|
+
/**
|
|
105
|
+
* @description: getPlayPromise
|
|
106
|
+
*/
|
|
107
|
+
private getPlayPromise;
|
|
108
|
+
/**
|
|
109
|
+
* @description Action promise queue in sequence
|
|
110
|
+
*/
|
|
111
|
+
private actionPromiseQueue;
|
|
112
|
+
/**
|
|
113
|
+
* @description Action move keyframe
|
|
114
|
+
*/
|
|
115
|
+
private move;
|
|
116
|
+
/**
|
|
117
|
+
* @description Action rotate keyframe
|
|
118
|
+
*/
|
|
119
|
+
private rotate;
|
|
120
|
+
/**
|
|
121
|
+
* @description Update five camera
|
|
122
|
+
*/
|
|
123
|
+
private updateCamera;
|
|
124
|
+
/**
|
|
125
|
+
* @description: Change five pano
|
|
126
|
+
*/
|
|
127
|
+
private changePano;
|
|
128
|
+
/**
|
|
129
|
+
* @description: Change play speed
|
|
130
|
+
*/
|
|
131
|
+
private changeSpeed;
|
|
132
|
+
/**
|
|
133
|
+
* @description Get duration by speed
|
|
134
|
+
*/
|
|
135
|
+
private getSpeededDuration;
|
|
136
|
+
/**
|
|
137
|
+
* @description Get ratate progress
|
|
138
|
+
*/
|
|
139
|
+
private getProgress;
|
|
140
|
+
/**
|
|
141
|
+
* @description Change five mode
|
|
142
|
+
*/
|
|
143
|
+
private changeMode;
|
|
144
|
+
/**
|
|
145
|
+
* @description Force interupt five updateCamera
|
|
146
|
+
*/
|
|
147
|
+
private forceInteruptUpdateCamera;
|
|
148
|
+
private getPauseData;
|
|
149
|
+
/**
|
|
150
|
+
* @description Set pause data
|
|
151
|
+
*/
|
|
152
|
+
private setPauseData;
|
|
153
|
+
/**
|
|
154
|
+
* @description Clear pause data
|
|
155
|
+
*/
|
|
156
|
+
private clearPauseData;
|
|
157
|
+
/**
|
|
158
|
+
* @description: Restore state that before loaded
|
|
159
|
+
*/
|
|
160
|
+
private clear;
|
|
161
|
+
private handleDispose;
|
|
162
|
+
/**
|
|
163
|
+
* @description Action function if plugin is enable
|
|
164
|
+
*/
|
|
165
|
+
private actionIfStateIsEnabled;
|
|
166
|
+
/**
|
|
167
|
+
* @description: Wait for five work ready
|
|
168
|
+
*/
|
|
169
|
+
private waitFiveLoaded;
|
|
170
|
+
private setFiveLinearUpdateCamera;
|
|
171
|
+
private setFiveOriginUpdateCamera;
|
|
172
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import CruisePluginController from './Controller';
|
|
3
|
+
export { CruisePluginController };
|
|
4
|
+
export declare const CruisePlugin: FivePlugin<void, InstanceType<typeof CruisePluginController>>;
|
|
5
|
+
export type { CruisePluginExportType } from './typing';
|
|
6
|
+
export default CruisePlugin;
|