@realsee/dnalogel 2.0.0-alpha.4 → 2.0.0-alpha.40
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 +93 -4
- package/components/index.js +1450 -0
- package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +4 -0
- package/dist/CSS3DRenderPlugin/index.js +234 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +5 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -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/index.js +943 -0
- package/dist/ItemLabelPlugin/typings.d.ts +63 -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 +6 -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/ModelChassisCompassPlugin/index.js +145 -0
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +4 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +196 -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/index.js +654 -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/index.js +541 -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/index.js +301 -0
- package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
- package/dist/ModelViewPlugin/index.d.ts +4 -0
- package/dist/ModelViewPlugin/index.js +186 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.js +636 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +70 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -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/index.js +3963 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +37 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
- package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -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 +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +5 -0
- package/dist/PanoRulerPlugin/index.js +610 -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/index.js +1006 -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/index.js +1307 -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/base/BasePlugin.d.ts +100 -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 +62 -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/floorplan/Assets/camera.d.ts +1 -0
- package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/Assets/compass.d.ts +0 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +98 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +7 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +4533 -0
- package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +36 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +7 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +2008 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +67 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +7 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +4236 -0
- package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/dist/floorplan/index.d.ts +6 -0
- package/dist/floorplan/typings/floorplanData.d.ts +137 -0
- package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/constant.d.ts +10 -3
- package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/correctFiveState.d.ts +2 -1
- package/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.es.js +16212 -0
- package/dist/index.js +16266 -0
- package/dist/index.umd.js +16258 -0
- package/dist/shared-utils/Preloader.d.ts +6 -0
- package/dist/shared-utils/Subscribe.d.ts +45 -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 +15 -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/formatRad.d.ts +7 -0
- package/dist/shared-utils/getPxmm.d.ts +19 -0
- package/dist/shared-utils/getRandomColor.d.ts +1 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/isNil.d.ts +10 -0
- package/dist/shared-utils/isTruelyObject.d.ts +18 -0
- package/dist/shared-utils/logger.d.ts +16 -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/evenNumber.d.ts +3 -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/px2rem.d.ts +1 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/dist/shared-utils/tap.d.ts +8 -0
- package/dist/shared-utils/three/centerPoint.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/dist/shared-utils/three/getNormal.d.ts +2 -0
- package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/dist/shared-utils/three/loadFbxObj.d.ts +2 -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/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/dist/typings/math.type.d.ts +44 -0
- package/dist/typings/utils.type.d.ts +2 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1413 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/Magnifier.html +9 -0
- package/docs/classes/ModelRoomLabelController.html +17 -0
- package/docs/enums/CameraMovementEffect.html +3 -0
- package/docs/enums/DIRECTION.html +1 -0
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +88 -0
- package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
- package/docs/interfaces/FloorplanBounding.html +10 -0
- package/docs/interfaces/FloorplanData.html +3 -0
- package/docs/interfaces/FloorplanEntrance.html +15 -0
- package/docs/interfaces/FloorplanExtraObject.html +7 -0
- package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
- package/docs/interfaces/FloorplanFloorData.html +3 -0
- package/docs/interfaces/FloorplanImagePosition.html +3 -0
- package/docs/interfaces/FloorplanObserver.html +5 -0
- package/docs/interfaces/FloorplanOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanPosition.html +3 -0
- package/docs/interfaces/FloorplanRoomItem.html +17 -0
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
- package/docs/interfaces/FloorplanServerBounding.html +10 -0
- package/docs/interfaces/FloorplanServerComputedData.html +1 -0
- package/docs/interfaces/FloorplanServerData.html +3 -0
- package/docs/interfaces/FloorplanServerEntrance.html +15 -0
- package/docs/interfaces/FloorplanServerFloorData.html +3 -0
- package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
- package/docs/interfaces/FloorplanServerObserver.html +5 -0
- package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanServerPosition.html +3 -0
- package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
- package/docs/interfaces/ItemLabelPluginData.html +1 -0
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/LineJson.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
- package/docs/interfaces/ModelViewPluginExportType.html +1 -0
- package/docs/interfaces/OpenParameter.html +3 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -0
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoMeasureParameterType.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
- package/docs/interfaces/PanoRulerProPluginState.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
- package/docs/interfaces/Point.html +1 -0
- package/docs/interfaces/PointJson.html +1 -0
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +13 -0
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/modules.html +36 -0
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
- package/libs/CSS3DRenderPlugin/index.js +2 -180
- package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
- package/libs/CameraMovementPlugin/index.d.ts +4 -6
- package/libs/CameraMovementPlugin/index.js +3 -158
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +568 -0
- package/libs/ItemLabelPlugin/ItemLabelItem.js +227 -0
- package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/libs/ItemLabelPlugin/Plugin.js +126 -0
- package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/{floorplan/ModelFloorplanPlugin/typings → ItemLabelPlugin}/events.type.js +0 -0
- package/libs/ItemLabelPlugin/index.d.ts +9 -0
- package/libs/ItemLabelPlugin/index.js +8 -0
- package/libs/ItemLabelPlugin/typings.d.ts +63 -0
- package/libs/ItemLabelPlugin/typings.js +7 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.js +13 -0
- package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
- package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +77 -0
- package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/libs/ModelChassisCompassPlugin/index.js +2 -74
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -135
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +389 -0
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
- package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/index.js +8 -0
- package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/libs/ModelItemLabelPlugin/typings.js +7 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +67 -25
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +291 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
- package/libs/ModelTVVideoPlugin/index.d.ts +5 -0
- package/libs/ModelTVVideoPlugin/index.js +4 -0
- package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/libs/ModelTVVideoPlugin/typings.js +8 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
- package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
- package/libs/ModelViewPlugin/Plugin.js +159 -0
- package/libs/ModelViewPlugin/index.d.ts +3 -16
- package/libs/ModelViewPlugin/index.js +2 -159
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
- package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/libs/PanoCompassPlugin/Plugin.js +249 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
- package/libs/PanoCompassPlugin/index.d.ts +7 -24
- package/libs/PanoCompassPlugin/index.js +6 -88
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +132 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +64 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +316 -0
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +70 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +306 -0
- package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/libs/PanoMeasurePlugin/Model/index.js +139 -0
- package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/libs/PanoMeasurePlugin/Model/line.js +114 -0
- package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/point.js +48 -0
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/polyline.js +65 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +12 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +190 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +48 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +110 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +278 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +128 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +126 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +73 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +117 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +98 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +71 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +264 -0
- package/libs/PanoMeasurePlugin/index.d.ts +10 -0
- package/libs/PanoMeasurePlugin/index.js +7 -0
- package/libs/PanoMeasurePlugin/typings/data.d.ts +37 -0
- package/libs/PanoMeasurePlugin/typings/data.js +1 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
- package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +120 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
- package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/line.js +33 -0
- package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/math.js +44 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +69 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
- package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/libs/PanoRulerPlugin/Plugin.js +403 -0
- package/libs/PanoRulerPlugin/index.d.ts +4 -30
- package/libs/PanoRulerPlugin/index.js +2 -396
- package/libs/PanoRulerPlugin/style.d.ts +1 -1
- package/libs/PanoRulerPlugin/style.js +1 -0
- package/libs/PanoRulerProPlugin/Controller.d.ts +15 -0
- package/libs/PanoRulerProPlugin/Controller.js +110 -0
- package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
- package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
- package/libs/PanoRulerProPlugin/index.d.ts +8 -0
- package/libs/PanoRulerProPlugin/index.js +8 -0
- package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
- package/libs/PanoRulerProPlugin/typings.js +1 -0
- package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
- package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +426 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/libs/PanoSpatialTagPlugin/index.js +5 -0
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/store.js +2 -0
- package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/style.js +8 -0
- package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- package/libs/base/BasePlugin.d.ts +100 -0
- package/libs/base/BasePlugin.js +31 -0
- package/libs/base/BasePluginWithData.d.ts +34 -0
- package/libs/base/BasePluginWithData.js +4 -0
- package/libs/components/PaintBrush/Controller.d.ts +43 -0
- package/libs/components/PaintBrush/Controller.js +575 -0
- package/libs/components/PaintBrush/Subscribe.d.ts +76 -0
- package/libs/components/PaintBrush/Subscribe.js +121 -0
- package/libs/components/PaintBrush/index.d.ts +27 -0
- package/libs/components/PaintBrush/index.js +57 -0
- package/libs/components/PaintBrush/style.d.ts +2 -0
- package/libs/components/PaintBrush/style.js +102 -0
- package/libs/components/PaintBrush/tween.d.ts +62 -0
- package/libs/components/PaintBrush/tween.js +15 -0
- package/libs/components/PaintBrush/typings.d.ts +58 -0
- package/libs/components/PaintBrush/typings.js +6 -0
- package/libs/components/PaintBrush/utils.d.ts +26 -0
- package/libs/components/PaintBrush/utils.js +51 -0
- package/libs/components/index.d.ts +2 -0
- package/libs/components/index.js +3 -0
- package/libs/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
- package/libs/floorplan/Components/BaseImage.js +222 -0
- package/libs/floorplan/Components/Camera.js +120 -0
- package/libs/floorplan/Components/Compass.js +120 -0
- package/libs/floorplan/Components/CurrentFloor.js +469 -0
- package/libs/floorplan/Components/Main.js +470 -0
- package/libs/floorplan/Components/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +107 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +216 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +322 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +309 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +331 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +104 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +142 -0
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
- package/libs/floorplan/Components/SvgImage.js +83 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +71 -75
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +666 -322
- package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +168 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +373 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +195 -43
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -45
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +451 -154
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/constant.d.ts +5 -0
- package/libs/floorplan/constant.js +6 -0
- package/libs/floorplan/index.d.ts +6 -0
- package/libs/floorplan/index.js +7 -0
- package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
- package/libs/floorplan/utils/constant.d.ts +22 -0
- package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/constant.js +9 -2
- package/libs/floorplan/utils/correctFiveState.d.ts +15 -0
- package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/correctFiveState.js +16 -16
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +3 -3
- package/libs/index.d.ts +17 -21
- package/libs/index.js +29 -12
- package/libs/shared-utils/Subscribe.js +8 -1
- package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
- package/libs/shared-utils/createCanvasTextTexture.js +6 -5
- package/libs/shared-utils/five/changeMode.d.ts +4 -1
- package/libs/shared-utils/five/changeMode.js +34 -13
- package/libs/shared-utils/getPxmm.d.ts +14 -1
- package/libs/shared-utils/getPxmm.js +31 -12
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +1 -0
- package/libs/shared-utils/logger.d.ts +16 -0
- package/libs/shared-utils/logger.js +47 -0
- package/libs/shared-utils/math/Interval.d.ts +13 -0
- package/libs/shared-utils/math/Interval.js +40 -0
- package/libs/shared-utils/math/Rectangle.d.ts +27 -0
- package/libs/shared-utils/math/Rectangle.js +50 -0
- package/libs/shared-utils/math/evenNumber.js +1 -1
- package/libs/shared-utils/math/index.d.ts +2 -0
- package/libs/shared-utils/math/index.js +2 -0
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
- package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
- package/libs/shared-utils/tinyEJSrender.js +210 -0
- package/libs/shared-utils/uuid.d.ts +1 -0
- package/libs/shared-utils/uuid.js +1 -0
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +30 -14
- package/CHANGELOG.md +0 -7
- package/dist/dnalogel.cjs.js +0 -2
- package/dist/dnalogel.es.js +0 -37796
- package/dist/dnalogel.umd.js +0 -2
- package/dist/style.css +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
- package/libs/floorplan/Components/BaseImage.svelte +0 -25
- package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
- package/libs/floorplan/Components/Normalmage.svelte +0 -11
- package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
- package/libs/floorplan/Components/SvgImage.svelte +0 -25
- package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -23
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
- package/libs/shared-utils/five/useFivePlugin.d.ts +0 -1
- package/libs/shared-utils/five/useFivePlugin.js +0 -8
- package/libs/shared-utils/useDebounce.d.ts +0 -8
- package/libs/shared-utils/useDebounce.js +0 -22
- package/libs/shared-utils/useThrottle.d.ts +0 -8
- package/libs/shared-utils/useThrottle.js +0 -25
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import type { Vector3Position } from '../typings/math.type';
|
|
3
|
+
import { Vector3 } from 'three';
|
|
4
|
+
import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
5
|
+
export declare type CSS3DRenderPluginParameterType = undefined;
|
|
6
|
+
export interface CSS3DRenderPluginExportType {
|
|
7
|
+
/**
|
|
8
|
+
* @description: 根据传入的四个点位创建一个3d dom容器,可以通过ReactDom.render()的方式将react组件放到容器中
|
|
9
|
+
* @param {Five} five
|
|
10
|
+
* @param {Vector3[] | Vector3Position[]} points: 矩形四个点坐标
|
|
11
|
+
* @param {number} config.ratio: 1px对应多少米,默认为 0.002,即1px对应2mm
|
|
12
|
+
* @param {number} config.dpr: dpr, 默认为1
|
|
13
|
+
* @param {HTMLElement} config.container: HTMLElement
|
|
14
|
+
* @param {number} config.autoRender: 默认为true,如果需要手动render则传false
|
|
15
|
+
* @param {'front' | 'behind'} config.mode: 两种模式
|
|
16
|
+
* @param {HTMLElement} config.behindFiveContainer: 如果config.mode为'behind',需要传入容器,并确保此容器位five下方,且中间没有其他dom元素遮挡
|
|
17
|
+
* @return {{ container: HTMLElement; dispose: () => void }}: container: dom容器, dispose: 清理函数
|
|
18
|
+
*/
|
|
19
|
+
create3DDomContainer: (points: Vector3[] | Vector3Position[], config?: {
|
|
20
|
+
ratio?: number;
|
|
21
|
+
dpr?: number;
|
|
22
|
+
autoRender?: boolean;
|
|
23
|
+
container?: HTMLElement;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
} & ({
|
|
26
|
+
mode?: 'front';
|
|
27
|
+
} | {
|
|
28
|
+
mode: 'behind';
|
|
29
|
+
behindFiveContainer: HTMLElement;
|
|
30
|
+
})) => {
|
|
31
|
+
container: HTMLElement;
|
|
32
|
+
dispose: () => void;
|
|
33
|
+
css3DObject: CSS3DObject;
|
|
34
|
+
render?: () => void;
|
|
35
|
+
} | void;
|
|
36
|
+
/**
|
|
37
|
+
* @description: 销毁所有的渲染内容
|
|
38
|
+
* @return {void}
|
|
39
|
+
*/
|
|
40
|
+
disposeAll: () => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* **CSS3DRenderPlugin** 提供矩形区域(三维空间四个坐标点),你可以在此矩形区域中渲染 DOM 内容。
|
|
44
|
+
* 实现原理参考[CSS3DRenderer](https://threejs.org/docs/index.html?q=CSS3D#examples/en/renderers/CSS3DRenderer)。
|
|
45
|
+
*
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
export declare const CSS3DRenderPlugin: FivePlugin<CSS3DRenderPluginParameterType, CSS3DRenderPluginExportType>;
|
|
49
|
+
export default CSS3DRenderPlugin;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var THREE = require('three');
|
|
6
|
+
var CSS3DRenderer = require('three/examples/jsm/renderers/CSS3DRenderer');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n["default"] = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
|
|
27
|
+
|
|
28
|
+
function evenNumber(num, config) {
|
|
29
|
+
const roundNum = Math.round(num);
|
|
30
|
+
return roundNum % 2 === 0 ? roundNum : roundNum + Number((config === null || config === void 0 ? void 0 : config.smaller) ? -1 : 1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function centerPoint(point1, point2) {
|
|
34
|
+
return new THREE.Vector3((point1.x + point2.x) / 2, (point1.y + point2.y) / 2, (point1.z + point2.z) / 2);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const transformPositionToVector3 = ({ x, y, z }) => new THREE.Vector3(x, y, z);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @description: 究极简陋的 ResizeObserver polyfill
|
|
41
|
+
*/
|
|
42
|
+
function createResizeObserver(func, element) {
|
|
43
|
+
if (!element || typeof ResizeObserver === 'undefined') {
|
|
44
|
+
return {
|
|
45
|
+
observe: () => window.addEventListener('resize', func),
|
|
46
|
+
unobserve: () => window.removeEventListener('resize', func),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
const observer = new ResizeObserver(func);
|
|
51
|
+
return {
|
|
52
|
+
observe: () => observer.observe(element),
|
|
53
|
+
unobserve: () => observer.unobserve(element),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* **CSS3DRenderPlugin** 提供矩形区域(三维空间四个坐标点),你可以在此矩形区域中渲染 DOM 内容。
|
|
60
|
+
* 实现原理参考[CSS3DRenderer](https://threejs.org/docs/index.html?q=CSS3D#examples/en/renderers/CSS3DRenderer)。
|
|
61
|
+
*
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
const CSS3DRenderPlugin = (five) => {
|
|
65
|
+
const state = { disposeCallbacks: [] };
|
|
66
|
+
const create3DDomContainer = (...params) => {
|
|
67
|
+
var _a, _b, _c;
|
|
68
|
+
const points = params[0].map((point) => (point instanceof THREE.Vector3 ? point : transformPositionToVector3(point)));
|
|
69
|
+
const config = params[1];
|
|
70
|
+
if ((points === null || points === void 0 ? void 0 : points.length) < 4)
|
|
71
|
+
return console.error('points must be equal or greater than than 4');
|
|
72
|
+
if (!((_a = five === null || five === void 0 ? void 0 : five.model) === null || _a === void 0 ? void 0 : _a.loaded))
|
|
73
|
+
return console.error('five.model.loaded is: ', (_b = five === null || five === void 0 ? void 0 : five.model) === null || _b === void 0 ? void 0 : _b.loaded);
|
|
74
|
+
const fiveElement = five.getElement();
|
|
75
|
+
if (!fiveElement)
|
|
76
|
+
return console.error('five.getElement() is ' + fiveElement);
|
|
77
|
+
const disposers = [];
|
|
78
|
+
const ratio = (config === null || config === void 0 ? void 0 : config.ratio) || 0.00216;
|
|
79
|
+
if (ratio <= 0.00215)
|
|
80
|
+
console.warn('if you need click css3DElement on safari, ratio must be greater than 0.00215');
|
|
81
|
+
const dpr = (config === null || config === void 0 ? void 0 : config.dpr) || 1;
|
|
82
|
+
const mode = (config === null || config === void 0 ? void 0 : config.mode) || 'front';
|
|
83
|
+
const autoRender = (_c = config === null || config === void 0 ? void 0 : config.autoRender) !== null && _c !== void 0 ? _c : true;
|
|
84
|
+
const behindFiveContainer = (config === null || config === void 0 ? void 0 : config.behindFiveContainer) || fiveElement.parentElement || document.body;
|
|
85
|
+
const container = (config === null || config === void 0 ? void 0 : config.container) || document.createElement('div');
|
|
86
|
+
container.classList.add('__Dnalogel-plugin--CSS3DRenderPlugin');
|
|
87
|
+
// 获取css3DObject, 如果mode为behind的话,一起获取mesh
|
|
88
|
+
const { css3DObject, mesh } = createObject(points, { ratio, dpr, container, mode });
|
|
89
|
+
// ======= INIT START =======
|
|
90
|
+
let resizeObserver;
|
|
91
|
+
const frontModeUnInited = mode === 'front' && !state.frontMode;
|
|
92
|
+
const behindModeUnInited = mode === 'behind' && !state.behindMode;
|
|
93
|
+
const inited = !(frontModeUnInited || behindModeUnInited);
|
|
94
|
+
if (behindModeUnInited) {
|
|
95
|
+
state.behindMode = { scene: new THREE.Scene(), css3DRenderer: new CSS3DRenderer.CSS3DRenderer() };
|
|
96
|
+
}
|
|
97
|
+
if (frontModeUnInited) {
|
|
98
|
+
state.frontMode = { scene: new THREE.Scene(), css3DRenderer: new CSS3DRenderer.CSS3DRenderer() };
|
|
99
|
+
}
|
|
100
|
+
const stateMode = mode === 'behind' ? state.behindMode : state.frontMode;
|
|
101
|
+
const { scene, css3DRenderer } = stateMode;
|
|
102
|
+
const render = (() => {
|
|
103
|
+
if (!inited) {
|
|
104
|
+
const css3DRendererSetSize = () => {
|
|
105
|
+
// 这里evenNumber策略是遇到奇数会加1,不知道为啥会触发滚动条显示,导致fiveElement变小,fiveElement变小又触发了这里的resize,宽高变小,滚动条消失,然后又触发resize。。。无限循环
|
|
106
|
+
// 为了规避上面这种情况,evenNumber设置了一个参数,遇到奇数可选择减一
|
|
107
|
+
const rendererWidth = evenNumber(fiveElement.clientWidth, { smaller: true });
|
|
108
|
+
const rendererHeight = evenNumber(fiveElement.clientHeight, { smaller: true });
|
|
109
|
+
css3DRenderer.setSize(rendererWidth, rendererHeight);
|
|
110
|
+
};
|
|
111
|
+
css3DRendererSetSize();
|
|
112
|
+
resizeObserver = createResizeObserver(css3DRendererSetSize, fiveElement);
|
|
113
|
+
css3DRenderer.domElement.style.position = 'absolute';
|
|
114
|
+
css3DRenderer.domElement.style.top = '0';
|
|
115
|
+
css3DRenderer.domElement.style.userSelect = 'none';
|
|
116
|
+
css3DRenderer.domElement.style.pointerEvents = 'none';
|
|
117
|
+
const renderEveryFrame = () => {
|
|
118
|
+
const requestAnimationFrameId = requestAnimationFrame(renderEveryFrame);
|
|
119
|
+
stateMode.requestAnimationFrameId = requestAnimationFrameId;
|
|
120
|
+
css3DRenderer.render(scene, five.camera);
|
|
121
|
+
};
|
|
122
|
+
return () => {
|
|
123
|
+
var _a;
|
|
124
|
+
scene.add(css3DObject);
|
|
125
|
+
(_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.observe) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
|
|
126
|
+
renderEveryFrame();
|
|
127
|
+
if (mode === 'behind' && mesh) {
|
|
128
|
+
five.scene.add(mesh);
|
|
129
|
+
disposers.push(() => mesh && five.scene.remove(mesh));
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
return () => {
|
|
135
|
+
scene.add(css3DObject);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
})();
|
|
139
|
+
if (frontModeUnInited) {
|
|
140
|
+
const wrapper = fiveElement.parentElement || document.body;
|
|
141
|
+
wrapper.appendChild(css3DRenderer.domElement);
|
|
142
|
+
}
|
|
143
|
+
if (behindModeUnInited) {
|
|
144
|
+
const wrapper = behindFiveContainer;
|
|
145
|
+
wrapper.appendChild(css3DRenderer.domElement);
|
|
146
|
+
}
|
|
147
|
+
// ======= INIT END =======
|
|
148
|
+
const dispose = () => {
|
|
149
|
+
var _a;
|
|
150
|
+
disposers.forEach((d) => d === null || d === void 0 ? void 0 : d());
|
|
151
|
+
scene.remove(css3DObject);
|
|
152
|
+
if (scene.children.length === 0) {
|
|
153
|
+
if (typeof stateMode.requestAnimationFrameId === 'number') {
|
|
154
|
+
cancelAnimationFrame(stateMode.requestAnimationFrameId);
|
|
155
|
+
}
|
|
156
|
+
css3DRenderer.domElement.remove();
|
|
157
|
+
if (mode === 'front')
|
|
158
|
+
state.frontMode = undefined;
|
|
159
|
+
if (mode === 'behind')
|
|
160
|
+
state.behindMode = undefined;
|
|
161
|
+
if (!state.behindMode && !state.frontMode) {
|
|
162
|
+
(_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.unobserve) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return true;
|
|
166
|
+
};
|
|
167
|
+
const idx = state.disposeCallbacks.findIndex((item) => item === dispose);
|
|
168
|
+
if (idx !== -1) {
|
|
169
|
+
state.disposeCallbacks.splice(idx, 1);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
state.disposeCallbacks.push(dispose);
|
|
173
|
+
}
|
|
174
|
+
if (autoRender)
|
|
175
|
+
render();
|
|
176
|
+
return { container, dispose, css3DObject, render: autoRender ? undefined : render };
|
|
177
|
+
};
|
|
178
|
+
const createObject = (points, config) => {
|
|
179
|
+
const { ratio, dpr, container: element, mode } = config;
|
|
180
|
+
const planeWidth = points[0].distanceTo(points[1]);
|
|
181
|
+
const planeHeight = points[1].distanceTo(points[2]);
|
|
182
|
+
const domWidthPx = evenNumber((planeWidth / ratio) * dpr);
|
|
183
|
+
const domHeightPx = evenNumber((planeHeight / ratio) * dpr);
|
|
184
|
+
const css3DObject = new CSS3DRenderer.CSS3DObject(element);
|
|
185
|
+
css3DObject.scale.set(ratio, ratio, ratio);
|
|
186
|
+
element.style.width = domWidthPx + 'px';
|
|
187
|
+
element.style.height = domHeightPx + 'px';
|
|
188
|
+
element.style.pointerEvents = 'none';
|
|
189
|
+
const centerPosition = centerPoint(points[0], points[2]);
|
|
190
|
+
const vector01 = points[1].clone().sub(points[0]); // 点0 -> 点1 的向量
|
|
191
|
+
const vector12 = points[2].clone().sub(points[1]); // 点1 -> 点2 的向量
|
|
192
|
+
// 旋转
|
|
193
|
+
const rotateXAngle = new THREE.Vector3(0, 1, 0).angleTo(new THREE.Vector3(0, vector12.y, vector12.z));
|
|
194
|
+
const rotateYAngle = new THREE.Vector3(1, 0, 0).angleTo(new THREE.Vector3(vector01.x, 0, vector01.z));
|
|
195
|
+
const rotateZAngle = vector01.angleTo(new THREE.Vector3(vector01.x, 0, vector01.z));
|
|
196
|
+
/**
|
|
197
|
+
* [0,1,0] => [0,0,1] 为rotate Worldx正方向
|
|
198
|
+
* [0,0,1] => [0,1,0] 为rotate Worldy正方向
|
|
199
|
+
* [0,1,1] => [-1,0,0] 为rotate Worldz正方向
|
|
200
|
+
*/
|
|
201
|
+
const rotateX = (vector12.z > 0 ? -1 : 1) * rotateXAngle;
|
|
202
|
+
const rotateY = (vector01.z < 0 ? 1 : -1) * rotateYAngle;
|
|
203
|
+
const rotateZ = ((vector01.x > 0 && vector01.y < 0) || (vector01.x < 0 && vector01.y > 0) ? -1 : 1) * rotateZAngle;
|
|
204
|
+
css3DObject.rotateOnWorldAxis(new THREE.Vector3(1, 0, 0), rotateX); // x
|
|
205
|
+
css3DObject.rotateOnWorldAxis(new THREE.Vector3(0, 1, 0), rotateY); // y
|
|
206
|
+
css3DObject.rotateOnWorldAxis(new THREE.Vector3(0, 0, 1), rotateZ); // z
|
|
207
|
+
css3DObject.position.set(centerPosition.x, centerPosition.y, centerPosition.z);
|
|
208
|
+
let mesh;
|
|
209
|
+
if (mode === 'behind') {
|
|
210
|
+
const material = new THREE__namespace.MeshBasicMaterial({
|
|
211
|
+
opacity: 0,
|
|
212
|
+
transparent: false,
|
|
213
|
+
side: THREE__namespace.DoubleSide,
|
|
214
|
+
});
|
|
215
|
+
const geometry = new THREE__namespace.PlaneGeometry(domWidthPx, domHeightPx);
|
|
216
|
+
mesh = new THREE__namespace.Mesh(geometry, material);
|
|
217
|
+
mesh.name = 'CSS3DRenderPlugin-mesh';
|
|
218
|
+
mesh.position.copy(css3DObject.position);
|
|
219
|
+
mesh.rotation.copy(css3DObject.rotation);
|
|
220
|
+
mesh.scale.copy(css3DObject.scale);
|
|
221
|
+
}
|
|
222
|
+
return { css3DObject, mesh };
|
|
223
|
+
};
|
|
224
|
+
return {
|
|
225
|
+
create3DDomContainer,
|
|
226
|
+
disposeAll: () => {
|
|
227
|
+
state.disposeCallbacks.forEach((d) => d === null || d === void 0 ? void 0 : d());
|
|
228
|
+
state.disposeCallbacks = [];
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
exports.CSS3DRenderPlugin = CSS3DRenderPlugin;
|
|
234
|
+
exports["default"] = CSS3DRenderPlugin;
|
|
@@ -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,302 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var five = require('@realsee/five');
|
|
6
|
+
var TWEEN = require('@tweenjs/tween.js');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n["default"] = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var TWEEN__namespace = /*#__PURE__*/_interopNamespace(TWEEN);
|
|
27
|
+
|
|
28
|
+
const _requestAnimationFrame = window.requestAnimationFrame || ((fn) => setTimeout(fn, 16));
|
|
29
|
+
const _cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
|
|
30
|
+
function nextFrame(fn, delay = 0) {
|
|
31
|
+
if (delay <= 0)
|
|
32
|
+
_requestAnimationFrame(fn);
|
|
33
|
+
else
|
|
34
|
+
_requestAnimationFrame(() => nextFrame(fn, delay - 1));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 在每个 AnimationFrame 中调用传入的函数
|
|
38
|
+
* @param callback 每次 AnimationFrame 中调用的函数
|
|
39
|
+
* @param frame 每秒运行多少次
|
|
40
|
+
* @returns 返回一个函数,调用可以停止 AnimationFrameLoop
|
|
41
|
+
*/
|
|
42
|
+
function requestAnimationFrameInterval(callback, frame = 60) {
|
|
43
|
+
let index = -1;
|
|
44
|
+
let oldTime = 0;
|
|
45
|
+
let startTime = -1;
|
|
46
|
+
const minDeltaTime = 1000 / frame;
|
|
47
|
+
function loop(time) {
|
|
48
|
+
startTime === -1 && (startTime = time);
|
|
49
|
+
index = _requestAnimationFrame(loop);
|
|
50
|
+
const deltaTime = time - oldTime;
|
|
51
|
+
if (deltaTime < minDeltaTime)
|
|
52
|
+
return;
|
|
53
|
+
oldTime = time;
|
|
54
|
+
callback && callback(time - startTime);
|
|
55
|
+
}
|
|
56
|
+
index = _requestAnimationFrame(loop);
|
|
57
|
+
return function stop() {
|
|
58
|
+
_cancelAnimationFrame(index);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
// export { Easing } from './tween'
|
|
62
|
+
// export { default as tween } from './tween'
|
|
63
|
+
|
|
64
|
+
const Easing = TWEEN__namespace.Easing;
|
|
65
|
+
/**
|
|
66
|
+
* 对象变化的补间动画
|
|
67
|
+
* 1. 应用 requestAnimationFrameInterval 做 update
|
|
68
|
+
* 2. 在原生 tween 上新增 destroy 方法和 onDestroy 监听
|
|
69
|
+
* DOC: https://github.com/tweenjs/tween.js
|
|
70
|
+
* @param from 对象起始状态
|
|
71
|
+
* @param to 对象末尾状态
|
|
72
|
+
* @param duration 经历时间(s)
|
|
73
|
+
* @param easing 过程动画,默认是 Easing.Linear.None
|
|
74
|
+
*/
|
|
75
|
+
function tween(from, to, duration, easing = Easing.Linear.None) {
|
|
76
|
+
const tween = new TWEEN__namespace.Tween(from).to(to, duration).easing(easing);
|
|
77
|
+
// 这里注意一下,因为 requestAnimationFrameInterval 给的时间是从 0 开始的,tween 动画也从 0 开始
|
|
78
|
+
nextFrame(() => tween.start(0));
|
|
79
|
+
const cancelAnimationFrame = requestAnimationFrameInterval((time) => {
|
|
80
|
+
if (tween.update(time) === false)
|
|
81
|
+
cancelAnimationFrame();
|
|
82
|
+
});
|
|
83
|
+
const destroyMethods = [];
|
|
84
|
+
tween.onDestroy = (fn) => {
|
|
85
|
+
destroyMethods.push(fn);
|
|
86
|
+
return tween;
|
|
87
|
+
};
|
|
88
|
+
tween.destroy = function () {
|
|
89
|
+
this.stop();
|
|
90
|
+
Object.assign(tween, {
|
|
91
|
+
_onStartCallback: null,
|
|
92
|
+
_onUpdateCallback: null,
|
|
93
|
+
_onCompleteCallback: null,
|
|
94
|
+
_onStopCallbackL: null,
|
|
95
|
+
});
|
|
96
|
+
let destroyMethod;
|
|
97
|
+
while ((destroyMethod = destroyMethods.shift()))
|
|
98
|
+
destroyMethod();
|
|
99
|
+
cancelAnimationFrame();
|
|
100
|
+
};
|
|
101
|
+
return tween;
|
|
102
|
+
}
|
|
103
|
+
function tweenProgress(duration, easing) {
|
|
104
|
+
return tween({ progress: 0 }, { progress: 1 }, duration, easing);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 运镜效果
|
|
109
|
+
*/
|
|
110
|
+
exports.CameraMovementEffect = void 0;
|
|
111
|
+
(function (CameraMovementEffect) {
|
|
112
|
+
CameraMovementEffect["Move"] = "Move";
|
|
113
|
+
CameraMovementEffect["Rotate"] = "Rotate";
|
|
114
|
+
})(exports.CameraMovementEffect || (exports.CameraMovementEffect = {}));
|
|
115
|
+
/**
|
|
116
|
+
* 旋转类型
|
|
117
|
+
*/
|
|
118
|
+
exports.Rotation = void 0;
|
|
119
|
+
(function (Rotation) {
|
|
120
|
+
Rotation["Clockwise"] = "Clockwise";
|
|
121
|
+
Rotation["Anticlockwise"] = "Anticlockwise";
|
|
122
|
+
Rotation["Loop"] = "Loop";
|
|
123
|
+
})(exports.Rotation || (exports.Rotation = {}));
|
|
124
|
+
|
|
125
|
+
const PI_2 = Math.PI * 2;
|
|
126
|
+
/**
|
|
127
|
+
* 把一个任意角度的弧度值转换为一个 [0, 2PI] 的弧度值
|
|
128
|
+
* @param rad 弧度值
|
|
129
|
+
*/
|
|
130
|
+
function formatLongitude(rad) {
|
|
131
|
+
return ((rad % PI_2) + PI_2) % PI_2;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* 把一个任意角度的弧度值转换为一个 [-2PI, 2PI] 的弧度值
|
|
135
|
+
* @param rad 弧度值
|
|
136
|
+
*/
|
|
137
|
+
function formatLatitude(rad) {
|
|
138
|
+
return rad % PI_2;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* 线性过程插值
|
|
143
|
+
*/
|
|
144
|
+
function progressNumber(from, to, pst) {
|
|
145
|
+
return from + (to - from) * pst;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const getLongitudeParams = (from, to, rotation) => {
|
|
149
|
+
const PI = Math.PI;
|
|
150
|
+
const PI_2 = PI * 2;
|
|
151
|
+
from = formatLongitude(from);
|
|
152
|
+
to = formatLongitude(to);
|
|
153
|
+
// 逆时针旋转,初始值必须是较大的值
|
|
154
|
+
if (rotation === exports.Rotation.Anticlockwise && from < to)
|
|
155
|
+
from += PI_2;
|
|
156
|
+
// 顺时针旋转,结束值必须是较大值
|
|
157
|
+
if (rotation === exports.Rotation.Clockwise && to < from)
|
|
158
|
+
to += PI_2;
|
|
159
|
+
// Loop 旋转,找锐角旋转
|
|
160
|
+
// 如果 to 比 from 大 180°,逆时针转
|
|
161
|
+
// 如果 from 比 to 大 180°,顺时针转
|
|
162
|
+
if (rotation === exports.Rotation.Loop && to - from > PI)
|
|
163
|
+
return getLongitudeParams(from, to, exports.Rotation.Anticlockwise);
|
|
164
|
+
if (rotation === exports.Rotation.Loop && from - to > PI)
|
|
165
|
+
return getLongitudeParams(from, to, exports.Rotation.Clockwise);
|
|
166
|
+
return { from, to };
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* **运镜插件** 模拟类似于电影运镜效果。
|
|
170
|
+
*/
|
|
171
|
+
const CameraMovementPlugin = (five$1) => {
|
|
172
|
+
const state = {};
|
|
173
|
+
const move = async (args, duration, opts = { preload: true }) => {
|
|
174
|
+
if (state.interruptCallback) {
|
|
175
|
+
state.interruptCallback(false);
|
|
176
|
+
}
|
|
177
|
+
if (opts.asyncStartCallback) {
|
|
178
|
+
await opts.asyncStartCallback();
|
|
179
|
+
}
|
|
180
|
+
if (args.mode && args.mode !== five$1.currentMode) {
|
|
181
|
+
await five$1.changeMode(args.mode);
|
|
182
|
+
}
|
|
183
|
+
if (opts.preload && args.panoIndex !== undefined && args.panoIndex !== five$1.panoIndex) {
|
|
184
|
+
await five$1.preloadPano(args.panoIndex);
|
|
185
|
+
}
|
|
186
|
+
if (opts.asyncEndCallback) {
|
|
187
|
+
await opts.asyncEndCallback();
|
|
188
|
+
}
|
|
189
|
+
if (args.panoIndex === undefined &&
|
|
190
|
+
args.fov === undefined &&
|
|
191
|
+
args.latitude === undefined &&
|
|
192
|
+
args.longitude === undefined) {
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
return await new Promise((resolve, reject) => {
|
|
196
|
+
const panoIndex = args.panoIndex !== undefined ? args.panoIndex : five$1.panoIndex;
|
|
197
|
+
if (panoIndex !== undefined) {
|
|
198
|
+
five$1.moveToPano(panoIndex, Object.assign({
|
|
199
|
+
duration,
|
|
200
|
+
moveEndCallback: () => resolve(true),
|
|
201
|
+
moveCancelCallback: () => reject(false), // 移动开始
|
|
202
|
+
}, args));
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
reject(false);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const getAnimeParams = (args) => {
|
|
210
|
+
const currentFiveState = five$1.state;
|
|
211
|
+
// latitude
|
|
212
|
+
const fromLatitude = formatLatitude(currentFiveState.latitude);
|
|
213
|
+
const toLatitude = formatLatitude(args.latitude);
|
|
214
|
+
// longitude
|
|
215
|
+
const { from: fromLongitude, to: toLongitude } = getLongitudeParams(currentFiveState.longitude, args.longitude, args.rotation || exports.Rotation.Loop);
|
|
216
|
+
// fov
|
|
217
|
+
const fromFov = currentFiveState.fov;
|
|
218
|
+
const toFov = args.fov;
|
|
219
|
+
return {
|
|
220
|
+
from: { latitude: fromLatitude, longitude: fromLongitude, fov: fromFov },
|
|
221
|
+
to: { latitude: toLatitude, longitude: toLongitude, fov: toFov },
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
const rotate = async (args, duration, opts = {}) => {
|
|
225
|
+
if (state.interruptCallback) {
|
|
226
|
+
state.interruptCallback(false);
|
|
227
|
+
}
|
|
228
|
+
if (opts.asyncStartCallback) {
|
|
229
|
+
await opts.asyncStartCallback();
|
|
230
|
+
}
|
|
231
|
+
if (five$1.currentMode !== five.Five.Mode.Panorama) {
|
|
232
|
+
await five$1.changeMode(five.Five.Mode.Panorama);
|
|
233
|
+
}
|
|
234
|
+
if (args.panoIndex !== undefined && args.panoIndex !== five$1.panoIndex) {
|
|
235
|
+
if (opts.preload)
|
|
236
|
+
await five$1.preloadPano(args.panoIndex);
|
|
237
|
+
await new Promise((resolve, reject) => {
|
|
238
|
+
if (!args.panoIndex) {
|
|
239
|
+
resolve(true);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
five$1.moveToPano(args.panoIndex, {
|
|
243
|
+
moveEndCallback: () => resolve(true),
|
|
244
|
+
moveCancelCallback: () => reject(false), // 移动开始
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
if (opts.asyncEndCallback) {
|
|
249
|
+
await opts.asyncEndCallback();
|
|
250
|
+
}
|
|
251
|
+
const { from, to } = getAnimeParams(args);
|
|
252
|
+
return await new Promise((resolve) => {
|
|
253
|
+
const onUpdate = ({ progress }) => {
|
|
254
|
+
const state = {};
|
|
255
|
+
state.longitude = progressNumber(from.longitude, to.longitude, progress);
|
|
256
|
+
state.latitude = progressNumber(from.latitude, to.latitude, progress);
|
|
257
|
+
state.fov = progressNumber(from.fov, to.fov, progress);
|
|
258
|
+
five$1.setState(state, true);
|
|
259
|
+
};
|
|
260
|
+
const onComplete = () => {
|
|
261
|
+
resolve(true);
|
|
262
|
+
};
|
|
263
|
+
const onDestroy = () => {
|
|
264
|
+
resolve(false);
|
|
265
|
+
};
|
|
266
|
+
const animeDuration = args.rotateSpeed
|
|
267
|
+
? Math.ceil((Math.abs(to.longitude - from.longitude) / args.rotateSpeed) * 1000)
|
|
268
|
+
: duration;
|
|
269
|
+
const tween = tweenProgress(animeDuration, TWEEN__namespace.Easing.Linear.None)
|
|
270
|
+
.onUpdate(onUpdate)
|
|
271
|
+
.onComplete(onComplete)
|
|
272
|
+
.onDestroy(onDestroy);
|
|
273
|
+
if (args.rotation === exports.Rotation.Loop) {
|
|
274
|
+
tween.repeat(Infinity).yoyo(true);
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* 中断回调:可能会被其他动画中断。
|
|
278
|
+
*/
|
|
279
|
+
state.interruptCallback = (flag = true) => {
|
|
280
|
+
tween.destroy();
|
|
281
|
+
state.interruptCallback = undefined;
|
|
282
|
+
if (state.timeoutId) {
|
|
283
|
+
clearTimeout(state.timeoutId);
|
|
284
|
+
state.timeoutId = undefined;
|
|
285
|
+
}
|
|
286
|
+
resolve(flag);
|
|
287
|
+
};
|
|
288
|
+
state.timeoutId = setTimeout(() => {
|
|
289
|
+
// 总时间到了之后强制结束,同时也是 Loop 模式的结束方式
|
|
290
|
+
if (state.interruptCallback)
|
|
291
|
+
state.interruptCallback(true);
|
|
292
|
+
}, duration);
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
return {
|
|
296
|
+
move,
|
|
297
|
+
rotate,
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
exports.CameraMovementPlugin = CameraMovementPlugin;
|
|
302
|
+
exports["default"] = CameraMovementPlugin;
|
|
@@ -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,4 @@
|
|
|
1
|
+
import type { FivePlugin } from "@realsee/five";
|
|
2
|
+
import { ItemLabelPluginExportReturnsType, ItemLabelPluginParametersType } from "./typings";
|
|
3
|
+
export declare const Plugin: FivePlugin<ItemLabelPluginParametersType, ItemLabelPluginExportReturnsType>;
|
|
4
|
+
export default Plugin;
|