@realsee/dnalogel 0.1.7 → 2.0.0-alpha.11
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/CHANGELOG.md +38 -0
- package/README.md +24 -68
- package/{plugins → dist}/CSS3DRenderPlugin/index.d.ts +1 -1
- package/dist/CSS3DRenderPlugin/index.js +231 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/{plugins → dist}/CameraMovementPlugin/index.d.ts +0 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/{plugins → dist}/CameraMovementPlugin/typing.d.ts +0 -0
- package/{plugins → dist}/ModelChassisCompassPlugin/index.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/index.js +142 -0
- package/{plugins → dist}/ModelEntryDoorGuidePlugin/index.d.ts +6 -2
- package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
- package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/{plugins → dist}/ModelRoomLabelPlugin/Controller.d.ts +3 -2
- package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/dist/ModelRoomLabelPlugin/index.js +463 -0
- package/{plugins → dist}/ModelRoomLabelPlugin/typings.d.ts +2 -2
- package/{plugins → dist}/ModelRoomLabelPlugin/utils/parseData.d.ts +0 -0
- package/{plugins → dist}/ModelViewPlugin/index.d.ts +0 -0
- package/dist/ModelViewPlugin/index.js +187 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +51 -0
- package/dist/PanoCompassPlugin/index.js +521 -0
- package/{plugins → dist}/PanoCursorRaycasterPlugin/index.d.ts +2 -3
- package/dist/PanoCursorRaycasterPlugin/index.js +88 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +61 -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 +22 -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 +24 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/dist/PanoMeasurePlugin/index.d.ts +7 -0
- package/dist/PanoMeasurePlugin/index.js +4789 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -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 +2 -0
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/{plugins → dist}/PanoRulerPlugin/index.d.ts +9 -5
- package/dist/PanoRulerPlugin/index.js +610 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/{plugins → dist}/PanoRulerPlugin/typings.d.ts +0 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/index.js +1259 -0
- package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/{plugins/floorplan/TopviewFloorplanPlugin → dist/PanoSpatialTagPlugin}/style.d.ts +0 -0
- package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/dist/floorplan/Assets/camera.d.ts +1 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
- package/{plugins → dist}/floorplan/ModelFloorplanPlugin/Controller.d.ts +19 -14
- package/{plugins → dist}/floorplan/ModelFloorplanPlugin/index.d.ts +1 -1
- package/dist/floorplan/ModelFloorplanPlugin/index.js +3842 -0
- package/{plugins → dist}/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -0
- package/{plugins → dist}/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
- package/{plugins → dist}/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +0 -0
- package/{plugins → dist}/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +6 -11
- package/{plugins → dist}/floorplan/PanoFloorplanRadarPlugin/index.d.ts +0 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1673 -0
- package/{plugins → dist}/floorplan/TopviewFloorplanPlugin/Controller.d.ts +18 -11
- package/{plugins → dist}/floorplan/TopviewFloorplanPlugin/index.d.ts +0 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3481 -0
- package/{plugins/floorplan/ModelFloorplanPlugin/controller.style.d.ts → dist/floorplan/TopviewFloorplanPlugin/style.d.ts} +0 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/{plugins → dist}/floorplan/typings/floorplanData.d.ts +6 -0
- package/{plugins → dist}/floorplan/typings/floorplanServerData.d.ts +8 -2
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/{plugins → dist}/floorplan/utils/formatData.d.ts +3 -3
- package/{plugins → dist}/floorplan/utils/formatPosition.d.ts +3 -4
- package/dist/index.d.ts +26 -0
- package/dist/index.es.js +12928 -0
- package/dist/index.js +12967 -0
- package/dist/index.umd.js +12961 -0
- package/{shared-utils → dist/shared-utils}/Preloader.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/Subscribe.d.ts +3 -3
- package/{shared-utils → dist/shared-utils}/animationFrame/BetterTween.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/animationFrame/calculateProgress.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/animationFrame/formatRad.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/animationFrame/index.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/animationFrame/tween.d.ts +0 -0
- package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/{shared-utils → dist/shared-utils}/createCanvasTextTexture.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/createLine/index.d.ts +1 -1
- package/{shared-utils → dist/shared-utils}/debounce.d.ts +1 -1
- package/{shared-utils → dist/shared-utils}/equal.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/filter.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/five/changeMode.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/five/useFivePlugin.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/formatRad.d.ts +0 -0
- package/dist/shared-utils/getPxmm.d.ts +11 -0
- package/{shared-utils → dist/shared-utils}/getRandomColor.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/isNil.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/isTruelyObject.d.ts +0 -0
- package/dist/shared-utils/math/evenNumber.d.ts +3 -0
- package/{shared-utils → dist/shared-utils}/math/planimetry.d.ts +4 -4
- package/{shared-utils → dist/shared-utils}/math/rad2Deg.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/nearlyEqual.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/nextFrame.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/noop.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/object3d2LocalMatrix.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/px2rem.d.ts +0 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/{shared-utils → dist/shared-utils}/tap.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/three/centerPoint.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/three/getExtraModelLoader.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/three/getNormal.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/three/getTextureLoader.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/three/loadFbxObj.d.ts +0 -0
- package/dist/shared-utils/three/loadTexture.d.ts +2 -0
- package/{shared-utils → dist/shared-utils}/three/transformPositionToVector3.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/three/transfromToMeshBasicMaterial.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/throttle.d.ts +1 -1
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/{shared-utils → dist/shared-utils}/to.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/useDebounce.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/useThrottle.d.ts +0 -0
- package/{libs/gltf-viewer → dist/shared-utils}/uuid.d.ts +0 -0
- package/{shared-utils → dist/shared-utils}/vectorTocoordinates.d.ts +0 -0
- package/{typings → dist/typings}/math.type.d.ts +0 -0
- package/{typings → dist/typings}/utils.type.d.ts +0 -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/ModelRoomLabelController.html +20 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
- package/docs/enums/ModelFloorplanErrorType.html +1 -0
- package/docs/index.html +43 -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/ModelFloorplanParameterType.html +1 -0
- package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -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/PanoRulerPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
- package/docs/interfaces/PointJson.html +1 -0
- package/docs/interfaces/RoomLabel.html +13 -0
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +1 -0
- package/docs/modules.html +28 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/index.js +179 -0
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +18 -0
- package/libs/CameraMovementPlugin/index.d.ts +7 -0
- package/libs/CameraMovementPlugin/index.js +159 -0
- package/libs/CameraMovementPlugin/typing.d.ts +68 -0
- package/libs/CameraMovementPlugin/typing.js +17 -0
- package/libs/ModelChassisCompassPlugin/index.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/index.js +75 -0
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
- package/libs/ModelEntryDoorGuidePlugin/index.js +137 -0
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -0
- package/libs/ModelRoomLabelPlugin/Controller.d.ts +36 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +100 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +255 -0
- package/libs/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/libs/ModelRoomLabelPlugin/index.js +9 -0
- package/libs/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/libs/ModelRoomLabelPlugin/typings.js +1 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.js +14 -0
- package/libs/ModelViewPlugin/index.d.ts +17 -0
- package/libs/ModelViewPlugin/index.js +160 -0
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
- package/libs/PanoCompassPlugin/index.d.ts +51 -0
- package/libs/PanoCompassPlugin/index.js +171 -0
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/libs/PanoCursorRaycasterPlugin/index.js +74 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +69 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +216 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +44 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +223 -0
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +176 -0
- package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/libs/PanoMeasurePlugin/Model/index.js +114 -0
- package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/libs/PanoMeasurePlugin/Model/line.js +64 -0
- package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/point.js +28 -0
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/polyline.js +48 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +15 -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 +22 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +108 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +33 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +75 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +103 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +117 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +102 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +35 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +69 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +78 -0
- package/libs/PanoMeasurePlugin/index.d.ts +7 -0
- package/libs/PanoMeasurePlugin/index.js +5 -0
- package/libs/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/libs/PanoMeasurePlugin/typings/data.js +1 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +28 -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/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 +114 -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 +32 -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 +2 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +21 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
- package/libs/PanoRulerPlugin/index.d.ts +31 -0
- package/libs/PanoRulerPlugin/index.js +398 -0
- package/libs/PanoRulerPlugin/style.d.ts +2 -0
- package/libs/PanoRulerPlugin/style.js +88 -0
- package/libs/PanoRulerPlugin/typings.d.ts +21 -0
- package/libs/PanoRulerPlugin/typings.js +1 -0
- package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
- package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +33 -0
- package/libs/PanoSpatialTagPlugin/index.js +411 -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/floorplan/Assets/camera.d.ts +1 -0
- package/libs/floorplan/Assets/camera.js +1 -0
- package/libs/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/libs/floorplan/Assets/floorplanExtraObject.js +1 -0
- package/libs/floorplan/Components/BaseImage.js +217 -0
- package/libs/floorplan/Components/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +70 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +289 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +328 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
- package/libs/floorplan/Components/SvgImage.js +83 -0
- package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +120 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +114 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +463 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +383 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +171 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +265 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +301 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +219 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +105 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +359 -0
- package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -0
- package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
- package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.js +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
- package/libs/floorplan/ModelFloorplanPlugin/utils/constant.js +16 -0
- package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
- package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +46 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +248 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +88 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -0
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +62 -0
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +191 -0
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -0
- package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +8 -0
- package/libs/floorplan/constant.d.ts +5 -0
- package/libs/floorplan/constant.js +6 -0
- package/libs/floorplan/typings/floorplanData.d.ts +137 -0
- package/libs/floorplan/typings/floorplanData.js +6 -0
- package/libs/floorplan/typings/floorplanServerData.d.ts +131 -0
- package/libs/floorplan/typings/floorplanServerData.js +101 -0
- package/libs/floorplan/typings/utility.d.ts +2 -0
- package/libs/floorplan/typings/utility.js +1 -0
- package/libs/floorplan/utils/formatData.d.ts +5 -0
- package/libs/floorplan/utils/formatData.js +94 -0
- package/libs/floorplan/utils/formatPosition.d.ts +36 -0
- package/libs/floorplan/utils/formatPosition.js +50 -0
- package/libs/index.d.ts +26 -0
- package/libs/index.js +16 -0
- package/libs/shared-utils/Preloader.d.ts +6 -0
- package/libs/shared-utils/Preloader.js +38 -0
- package/libs/shared-utils/Subscribe.d.ts +45 -0
- package/libs/shared-utils/Subscribe.js +101 -0
- package/libs/shared-utils/animationFrame/BetterTween.d.ts +11 -0
- package/libs/shared-utils/animationFrame/BetterTween.js +30 -0
- package/libs/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
- package/libs/shared-utils/animationFrame/calculateProgress.js +23 -0
- package/libs/shared-utils/animationFrame/formatRad.d.ts +15 -0
- package/libs/shared-utils/animationFrame/formatRad.js +20 -0
- package/libs/shared-utils/animationFrame/index.d.ts +15 -0
- package/libs/shared-utils/animationFrame/index.js +48 -0
- package/libs/shared-utils/animationFrame/tween.d.ts +75 -0
- package/libs/shared-utils/animationFrame/tween.js +44 -0
- package/libs/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/libs/shared-utils/changeModelCanvasOpacity.js +15 -0
- package/libs/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/libs/shared-utils/createCanvasTextTexture.js +19 -0
- package/libs/shared-utils/createLine/index.d.ts +3 -0
- package/libs/shared-utils/createLine/index.js +8 -0
- package/libs/shared-utils/debounce.d.ts +6 -0
- package/libs/shared-utils/debounce.js +14 -0
- package/libs/shared-utils/equal.d.ts +11 -0
- package/libs/shared-utils/equal.js +84 -0
- package/libs/shared-utils/filter.d.ts +27 -0
- package/libs/shared-utils/filter.js +53 -0
- package/libs/shared-utils/five/changeMode.d.ts +2 -0
- package/libs/shared-utils/five/changeMode.js +15 -0
- package/libs/shared-utils/five/useFivePlugin.d.ts +1 -0
- package/libs/shared-utils/five/useFivePlugin.js +8 -0
- package/libs/shared-utils/formatRad.d.ts +7 -0
- package/libs/shared-utils/formatRad.js +10 -0
- package/libs/shared-utils/getPxmm.d.ts +11 -0
- package/libs/shared-utils/getPxmm.js +34 -0
- package/libs/shared-utils/getRandomColor.d.ts +1 -0
- package/libs/shared-utils/getRandomColor.js +10 -0
- package/libs/shared-utils/isNil.d.ts +10 -0
- package/libs/shared-utils/isNil.js +14 -0
- package/libs/shared-utils/isTruelyObject.d.ts +18 -0
- package/libs/shared-utils/isTruelyObject.js +20 -0
- package/libs/shared-utils/math/evenNumber.d.ts +3 -0
- package/libs/shared-utils/math/evenNumber.js +4 -0
- package/libs/shared-utils/math/planimetry.d.ts +116 -0
- package/libs/shared-utils/math/planimetry.js +288 -0
- package/libs/shared-utils/math/rad2Deg.d.ts +1 -0
- package/libs/shared-utils/math/rad2Deg.js +3 -0
- package/libs/shared-utils/nearlyEqual.d.ts +7 -0
- package/libs/shared-utils/nearlyEqual.js +9 -0
- package/libs/shared-utils/nextFrame.d.ts +1 -0
- package/libs/shared-utils/nextFrame.js +6 -0
- package/libs/shared-utils/noop.d.ts +5 -0
- package/libs/shared-utils/noop.js +7 -0
- package/libs/shared-utils/object3d2LocalMatrix.d.ts +12 -0
- package/libs/shared-utils/object3d2LocalMatrix.js +29 -0
- package/libs/shared-utils/px2rem.d.ts +1 -0
- package/libs/shared-utils/px2rem.js +4 -0
- package/libs/shared-utils/removeArrayItem.d.ts +7 -0
- package/libs/shared-utils/removeArrayItem.js +12 -0
- package/libs/shared-utils/tap.d.ts +8 -0
- package/{shared-utils → libs/shared-utils}/tap.js +4 -13
- package/libs/shared-utils/three/centerPoint.d.ts +2 -0
- package/libs/shared-utils/three/centerPoint.js +4 -0
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/libs/shared-utils/three/getExtraModelLoader.js +18 -0
- package/libs/shared-utils/three/getNormal.d.ts +2 -0
- package/libs/shared-utils/three/getNormal.js +6 -0
- package/libs/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/libs/shared-utils/three/getTextureLoader.js +17 -0
- package/libs/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/libs/shared-utils/three/loadFbxObj.js +13 -0
- package/libs/shared-utils/three/loadTexture.d.ts +2 -0
- package/libs/shared-utils/three/loadTexture.js +10 -0
- package/libs/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/libs/shared-utils/three/transformPositionToVector3.js +3 -0
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +14 -0
- package/libs/shared-utils/throttle.d.ts +7 -0
- package/libs/shared-utils/throttle.js +18 -0
- package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
- package/libs/shared-utils/tinyEJSrender.js +180 -0
- package/libs/shared-utils/to.d.ts +8 -0
- package/libs/shared-utils/to.js +18 -0
- package/libs/shared-utils/useDebounce.d.ts +8 -0
- package/libs/shared-utils/useDebounce.js +22 -0
- package/libs/shared-utils/useThrottle.d.ts +8 -0
- package/libs/shared-utils/useThrottle.js +25 -0
- package/{shared-utils → libs/shared-utils}/uuid.d.ts +0 -0
- package/libs/shared-utils/uuid.js +11 -0
- package/libs/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/libs/shared-utils/vectorTocoordinates.js +9 -0
- package/libs/typings/math.type.d.ts +44 -0
- package/libs/typings/math.type.js +1 -0
- package/libs/typings/utils.type.d.ts +2 -0
- package/libs/typings/utils.type.js +1 -0
- package/package.json +55 -17
- package/components/ARVideoFigure/ARVideoFigureMesh.d.ts +0 -44
- package/components/ARVideoFigure/ARVideoFigureMesh.js +0 -371
- package/components/ARVideoFigure/ARVideoFigureScene.d.ts +0 -11
- package/components/ARVideoFigure/ARVideoFigureScene.js +0 -85
- package/components/ARVideoFigure/ImgBgTransparent.d.ts +0 -16
- package/components/ARVideoFigure/ImgBgTransparent.js +0 -65
- package/components/ARVideoFigure/ImgBgTransparentMesh.d.ts +0 -30
- package/components/ARVideoFigure/ImgBgTransparentMesh.js +0 -183
- package/components/ARVideoFigure/fragmentShader.d.ts +0 -5
- package/components/ARVideoFigure/fragmentShader.js +0 -18
- package/components/ARVideoFigure/index.d.ts +0 -15
- package/components/ARVideoFigure/index.js +0 -80
- package/components/ARVideoFigure/vertexShader.d.ts +0 -1
- package/components/ARVideoFigure/vertexShader.js +0 -10
- package/components/GLTFView/index.d.ts +0 -72
- package/components/GLTFView/index.js +0 -149
- package/components/GlassFilters/index.d.ts +0 -32
- package/components/GlassFilters/index.js +0 -78
- package/components/ModelView/ModelViewController.d.ts +0 -18
- package/components/ModelView/ModelViewController.js +0 -157
- package/components/ModelView/index.d.ts +0 -10
- package/components/ModelView/index.js +0 -24
- package/components/PaintBrush/index.d.ts +0 -16
- package/components/PaintBrush/index.js +0 -47
- package/components/PanoTag/index.d.ts +0 -4
- package/components/PanoTag/index.js +0 -13
- package/custom.d.js +0 -3
- package/data/1aGKl9JmrlXMXx8d.d.ts +0 -104
- package/data/1aGKl9JmrlXMXx8d.js +0 -537
- package/data/54djM0oR6ky3Ey8e.d.ts +0 -55
- package/data/54djM0oR6ky3Ey8e.js +0 -350
- package/data/6gyq3v1verxD7JO1.d.ts +0 -104
- package/data/6gyq3v1verxD7JO1.js +0 -462
- package/data/8054djM0oR6ky3Ey8e.d.ts +0 -55
- package/data/8054djM0oR6ky3Ey8e.js +0 -350
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.d.ts +0 -84
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +0 -600
- package/data/PrXel3aqGbp34JQn.d.ts +0 -389
- package/data/PrXel3aqGbp34JQn.js +0 -4649
- package/data/XJ6NMLWnkAY3Rdx8.d.ts +0 -843
- package/data/XJ6NMLWnkAY3Rdx8.js +0 -7989
- package/data/YdoNP9K4rwQDwjJr.d.ts +0 -83
- package/data/YdoNP9K4rwQDwjJr.js +0 -1453
- package/data/ZLvK29zj4L29Jowd.d.ts +0 -55
- package/data/ZLvK29zj4L29Jowd.js +0 -372
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.d.ts +0 -86
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +0 -711
- package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +0 -5
- package/data/extrude-walls/ZLvK29zj4L29Jowd.js +0 -14
- package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +0 -5
- package/data/extrude-walls/lo024DEgzanMj5BE.js +0 -14
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +0 -85
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +0 -511
- package/data/lo024DEgzanMj5BE.d.ts +0 -55
- package/data/lo024DEgzanMj5BE.js +0 -966
- package/data/oPzy3ApbjjpD8YdR.d.ts +0 -83
- package/data/oPzy3ApbjjpD8YdR.js +0 -283
- package/data/qjAxMG4XbPn96wKG.d.ts +0 -104
- package/data/qjAxMG4XbPn96wKG.js +0 -637
- package/data/rXel3aPQRRBD4JQn.d.ts +0 -86
- package/data/rXel3aPQRRBD4JQn.js +0 -622
- package/data/vLykj3NWrllMrG06.d.ts +0 -91
- package/data/vLykj3NWrllMrG06.js +0 -2729
- package/data/wz0QV9KA4ugyo9ME.d.ts +0 -39
- package/data/wz0QV9KA4ugyo9ME.js +0 -136
- package/data/zxMawr9raSg8LYjG.d.ts +0 -53
- package/data/zxMawr9raSg8LYjG.js +0 -590
- package/examples/FiveStateController/index.js +0 -134
- package/examples/VRHouse/Mobile.js +0 -36
- package/examples/VRHouse/PC.js +0 -36
- package/examples/VRHouse/index.js +0 -36
- package/index.d.ts +0 -15
- package/index.js +0 -45
- package/libs/gltf-viewer/Subscribe.d.ts +0 -76
- package/libs/gltf-viewer/Subscribe.js +0 -231
- package/libs/gltf-viewer/coordsMoveByOffset.d.ts +0 -13
- package/libs/gltf-viewer/coordsMoveByOffset.js +0 -22
- package/libs/gltf-viewer/coordsToDirection.d.ts +0 -5
- package/libs/gltf-viewer/coordsToDirection.js +0 -41
- package/libs/gltf-viewer/formatRad.d.ts +0 -1
- package/libs/gltf-viewer/formatRad.js +0 -13
- package/libs/gltf-viewer/getFrameTime.d.ts +0 -1
- package/libs/gltf-viewer/getFrameTime.js +0 -28
- package/libs/gltf-viewer/index.d.ts +0 -55
- package/libs/gltf-viewer/index.js +0 -650
- package/libs/gltf-viewer/mouseWheel.d.ts +0 -2
- package/libs/gltf-viewer/mouseWheel.js +0 -59
- package/libs/gltf-viewer/requestAnimationFrame.d.ts +0 -1
- package/libs/gltf-viewer/requestAnimationFrame.js +0 -18
- package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +0 -1
- package/libs/gltf-viewer/requestAnimationFrameInterval.js +0 -31
- package/libs/gltf-viewer/uuid.js +0 -28
- package/plugins/AutoPreloadPlugin/index.d.ts +0 -23
- package/plugins/AutoPreloadPlugin/index.js +0 -111
- package/plugins/CSS3DRenderPlugin/components/Marker/index.d.ts +0 -12
- package/plugins/CSS3DRenderPlugin/components/Marker/index.js +0 -121
- package/plugins/CSS3DRenderPlugin/index.js +0 -298
- package/plugins/CameraMovementPlugin/index.js +0 -362
- package/plugins/CameraMovementPlugin/typing.js +0 -37
- package/plugins/ModelChassisCompassPlugin/index.js +0 -157
- package/plugins/ModelEntryDoorGuidePlugin/index.js +0 -247
- package/plugins/ModelExtrudeWallsPlugin/index.d.ts +0 -16
- package/plugins/ModelExtrudeWallsPlugin/index.js +0 -252
- package/plugins/ModelRoomLabelPlugin/Controller.js +0 -153
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +0 -8
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +0 -66
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +0 -7
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +0 -159
- package/plugins/ModelRoomLabelPlugin/index.d.ts +0 -8
- package/plugins/ModelRoomLabelPlugin/index.js +0 -18
- package/plugins/ModelRoomLabelPlugin/typings.js +0 -7
- package/plugins/ModelRoomLabelPlugin/utils/parseData.js +0 -35
- package/plugins/ModelTVVideoPlugin/index.d.ts +0 -21
- package/plugins/ModelTVVideoPlugin/index.js +0 -397
- package/plugins/ModelViewPlugin/index.js +0 -223
- package/plugins/PanoCursorRaycasterPlugin/PanoCursorRaycasterPluginUsage.d.ts +0 -48
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.d.ts +0 -9
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +0 -117
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.d.ts +0 -11
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +0 -39
- package/plugins/PanoCursorRaycasterPlugin/index.js +0 -126
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.d.ts +0 -5
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +0 -27
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.d.ts +0 -3
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +0 -48
- package/plugins/PanoDoorLabelPlugin/index.d.ts +0 -4
- package/plugins/PanoDoorLabelPlugin/index.js +0 -14
- package/plugins/PanoIRobotPlugin/index.d.ts +0 -10
- package/plugins/PanoIRobotPlugin/index.js +0 -18
- package/plugins/PanoMaskSelectorPlugin/compare.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/compare.js +0 -17
- package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +0 -7
- package/plugins/PanoMaskSelectorPlugin/createBox.js +0 -79
- package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +0 -3
- package/plugins/PanoMaskSelectorPlugin/createTextures.js +0 -45
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +0 -10
- package/plugins/PanoMaskSelectorPlugin/index.d.ts +0 -49
- package/plugins/PanoMaskSelectorPlugin/index.js +0 -348
- package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/vertexShader.js +0 -10
- package/plugins/PanoRulerPlugin/data/roomInfo.d.ts +0 -3
- package/plugins/PanoRulerPlugin/data/roomInfo.js +0 -51
- package/plugins/PanoRulerPlugin/data/roomRules.d.ts +0 -3
- package/plugins/PanoRulerPlugin/data/roomRules.js +0 -235
- package/plugins/PanoRulerPlugin/index.js +0 -637
- package/plugins/PanoRulerPlugin/typings.js +0 -7
- package/plugins/PanoTVVideoPlugin/index.d.ts +0 -26
- package/plugins/PanoTVVideoPlugin/index.js +0 -433
- package/plugins/TreasurePlugin/Controller.d.ts +0 -73
- package/plugins/TreasurePlugin/Controller.js +0 -250
- package/plugins/TreasurePlugin/TreasureFaceAnime.d.ts +0 -25
- package/plugins/TreasurePlugin/TreasureFaceAnime.js +0 -143
- package/plugins/TreasurePlugin/TreasureObject.d.ts +0 -53
- package/plugins/TreasurePlugin/TreasureObject.js +0 -406
- package/plugins/TreasurePlugin/TreasureOpenAnime.d.ts +0 -25
- package/plugins/TreasurePlugin/TreasureOpenAnime.js +0 -127
- package/plugins/TreasurePlugin/constants.d.ts +0 -33
- package/plugins/TreasurePlugin/constants.js +0 -67
- package/plugins/TreasurePlugin/index.d.ts +0 -11
- package/plugins/TreasurePlugin/index.js +0 -26
- package/plugins/TreasurePlugin/typings.d.ts +0 -2
- package/plugins/TreasurePlugin/typings.js +0 -7
- package/plugins/floorplan/Assets/floorplanExtraObject.d.ts +0 -1
- package/plugins/floorplan/Assets/floorplanExtraObject.js +0 -10
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +0 -626
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +0 -78
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.d.ts +0 -5
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +0 -84
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.d.ts +0 -10
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +0 -129
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +0 -118
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +0 -62
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +0 -20
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +0 -88
- package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +0 -16
- package/plugins/floorplan/ModelFloorplanPlugin/index.js +0 -20
- package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +0 -7
- package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +0 -33
- package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +0 -154
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.d.ts +0 -13
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +0 -113
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.d.ts +0 -3
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +0 -39
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.d.ts +0 -5
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +0 -66
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.d.ts +0 -9
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +0 -126
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.d.ts +0 -11
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +0 -58
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.d.ts +0 -17
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +0 -85
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.d.ts +0 -2
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +0 -15
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +0 -211
- package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +0 -20
- package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +0 -262
- package/plugins/floorplan/TopviewFloorplanPlugin/index.js +0 -18
- package/plugins/floorplan/TopviewFloorplanPlugin/style.js +0 -16
- package/plugins/floorplan/components/FloorplanImage.d.ts +0 -7
- package/plugins/floorplan/components/FloorplanImage.js +0 -90
- package/plugins/floorplan/typings/floorplanData.js +0 -7
- package/plugins/floorplan/typings/floorplanServerData.js +0 -382
- package/plugins/floorplan/utils/formatData.js +0 -217
- package/plugins/floorplan/utils/formatPosition.js +0 -89
- package/shared-utils/Preloader.js +0 -57
- package/shared-utils/Subscribe.js +0 -230
- package/shared-utils/animationFrame/BetterTween.js +0 -103
- package/shared-utils/animationFrame/calculateProgress.js +0 -40
- package/shared-utils/animationFrame/formatRad.js +0 -36
- package/shared-utils/animationFrame/index.js +0 -81
- package/shared-utils/animationFrame/tween.js +0 -92
- package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
- package/shared-utils/changeModelCanvansOpacity.js +0 -38
- package/shared-utils/createCanvasTextTexture.js +0 -31
- package/shared-utils/createFiveContainer.d.ts +0 -10
- package/shared-utils/createFiveContainer.js +0 -171
- package/shared-utils/createLine/index.js +0 -43
- package/shared-utils/debounce.js +0 -30
- package/shared-utils/equal.js +0 -107
- package/shared-utils/filter.js +0 -127
- package/shared-utils/five/changeMode.js +0 -82
- package/shared-utils/five/useFivePlugin.js +0 -17
- package/shared-utils/formatRad.js +0 -18
- package/shared-utils/getPxmm.d.ts +0 -6
- package/shared-utils/getPxmm.js +0 -51
- package/shared-utils/getRandomColor.js +0 -23
- package/shared-utils/isNil.js +0 -26
- package/shared-utils/isTruelyObject.js +0 -31
- package/shared-utils/math/evenNumber.d.ts +0 -1
- package/shared-utils/math/evenNumber.js +0 -13
- package/shared-utils/math/planimetry.js +0 -352
- package/shared-utils/math/rad2Deg.js +0 -12
- package/shared-utils/nearlyEqual.js +0 -19
- package/shared-utils/nextFrame.js +0 -15
- package/shared-utils/noop.js +0 -19
- package/shared-utils/object3d2LocalMatrix.js +0 -79
- package/shared-utils/px2rem.js +0 -22
- package/shared-utils/three/centerPoint.js +0 -14
- package/shared-utils/three/getExtraModelLoader.js +0 -45
- package/shared-utils/three/getNormal.js +0 -17
- package/shared-utils/three/getTextureLoader.js +0 -50
- package/shared-utils/three/loadFbxObj.js +0 -54
- package/shared-utils/three/loadTexture.d.ts +0 -2
- package/shared-utils/three/loadTexture.js +0 -46
- package/shared-utils/three/transformPositionToVector3.js +0 -20
- package/shared-utils/three/transfromToMeshBasicMaterial.js +0 -33
- package/shared-utils/throttle.js +0 -29
- package/shared-utils/to.js +0 -67
- package/shared-utils/useDebounce.js +0 -49
- package/shared-utils/useThrottle.js +0 -47
- package/shared-utils/uuid.js +0 -28
- package/shared-utils/vectorTocoordinates.js +0 -18
- package/typedoc/components.d.ts +0 -6
- package/typedoc/components.js +0 -7
- package/typedoc/plugins.d.ts +0 -19
- package/typedoc/plugins.js +0 -165
- package/typedoc/shared-utils.d.ts +0 -3
- package/typedoc/shared-utils.js +0 -7
- package/typedoc/typings.d.ts +0 -3
- package/typedoc/typings.js +0 -7
- package/typings/math.type.js +0 -7
- package/typings/utils.type.js +0 -7
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var five = require('@realsee/five');
|
|
6
|
+
var three = require('three');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 平面几何相关数学函数
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* 检查两个点是否位置相同
|
|
13
|
+
* @param point1
|
|
14
|
+
* @param point2
|
|
15
|
+
* @return
|
|
16
|
+
*/
|
|
17
|
+
function samePointAt(point1, point2) {
|
|
18
|
+
return point1.x === point2.x && point1.y === point2.y;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 两个计算的斜率是否相同
|
|
22
|
+
* @param {number} k1
|
|
23
|
+
* @param {number} k2
|
|
24
|
+
* @return
|
|
25
|
+
*/
|
|
26
|
+
function sameK(k1, k2) {
|
|
27
|
+
if (Math.abs(k1) === Infinity && Math.abs(k2) === Infinity)
|
|
28
|
+
return true;
|
|
29
|
+
return Math.abs(k1 - k2) < 0.001;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 获取两点之间的斜率
|
|
33
|
+
* @param {point} point1
|
|
34
|
+
* @param {point} point2
|
|
35
|
+
* @return {number}
|
|
36
|
+
*/
|
|
37
|
+
function getK(point1, point2) {
|
|
38
|
+
return (point2.y - point1.y) / (point2.x - point1.x);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 两条线段(包括延长线)的交点点
|
|
42
|
+
* @param {linePoints} linePoints1
|
|
43
|
+
* @param {linePoints} linePoints2
|
|
44
|
+
* @param needIntersectionInLine 是否是延长线的相交
|
|
45
|
+
* @return {point || false}
|
|
46
|
+
*/
|
|
47
|
+
function intersectionOfLine(linePoints1, linePoints2, needIntersectionInLine) {
|
|
48
|
+
const k1 = getK(linePoints1[1], linePoints1[0]);
|
|
49
|
+
const k2 = getK(linePoints2[1], linePoints2[0]);
|
|
50
|
+
if (isNaN(k1) || isNaN(k2))
|
|
51
|
+
return false;
|
|
52
|
+
if (sameK(k1, k2))
|
|
53
|
+
return false;
|
|
54
|
+
if (pointOnLine(linePoints1[0], linePoints2))
|
|
55
|
+
return linePoints1[0];
|
|
56
|
+
if (pointOnLine(linePoints1[1], linePoints2))
|
|
57
|
+
return linePoints1[1];
|
|
58
|
+
if (pointOnLine(linePoints2[0], linePoints1))
|
|
59
|
+
return linePoints2[0];
|
|
60
|
+
if (pointOnLine(linePoints2[1], linePoints1))
|
|
61
|
+
return linePoints2[1];
|
|
62
|
+
//needIntersectionInLine 是否焦点在线段内
|
|
63
|
+
if (needIntersectionInLine && !isIntersect(linePoints1, linePoints2))
|
|
64
|
+
return false;
|
|
65
|
+
const p1 = linePoints1[0];
|
|
66
|
+
const p2 = linePoints2[0];
|
|
67
|
+
if (Math.abs(k1) === Infinity) {
|
|
68
|
+
return { x: p1.x, y: linePoints2[1].y - (linePoints2[1].x - p1.x) * k2 };
|
|
69
|
+
}
|
|
70
|
+
if (Math.abs(k2) === Infinity) {
|
|
71
|
+
return { x: p2.x, y: linePoints1[1].y - (linePoints1[1].x - p2.x) * k1 };
|
|
72
|
+
}
|
|
73
|
+
const x = (p2.y - p1.y + k1 * p1.x - k2 * p2.x) / (k1 - k2);
|
|
74
|
+
const y = k1 * x - k1 * p1.x + p1.y;
|
|
75
|
+
return { x, y };
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 是否点在线段上
|
|
79
|
+
* @param {point} point
|
|
80
|
+
* @param {linePoints} linePoints
|
|
81
|
+
* @return
|
|
82
|
+
*/
|
|
83
|
+
function pointOnLine(point, linePoints) {
|
|
84
|
+
if (samePointAt(point, linePoints[0]))
|
|
85
|
+
return true;
|
|
86
|
+
if (samePointAt(point, linePoints[1]))
|
|
87
|
+
return true;
|
|
88
|
+
return ((linePoints[0].x - point.x) * (point.x - linePoints[1].x) >= 0 &&
|
|
89
|
+
(linePoints[0].y - point.y) * (point.y - linePoints[1].y) >= 0 &&
|
|
90
|
+
sameK(getK(linePoints[0], point), getK(point, linePoints[1])));
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* 判断两条线段是否相交
|
|
94
|
+
*/
|
|
95
|
+
function multi(p1, p2, p0) {
|
|
96
|
+
return (p1.x - p0.x) * (p2.y - p0.y) - (p2.x - p0.x) * (p1.y - p0.y);
|
|
97
|
+
}
|
|
98
|
+
function isIntersect(linePoints1, linePoints2) {
|
|
99
|
+
if (Math.max(linePoints1[0].x, linePoints1[1].x) >= Math.min(linePoints2[0].x, linePoints2[1].x) &&
|
|
100
|
+
Math.max(linePoints2[0].x, linePoints2[1].x) >= Math.min(linePoints1[0].x, linePoints1[1].x) &&
|
|
101
|
+
Math.max(linePoints1[0].y, linePoints1[1].y) >= Math.min(linePoints2[0].y, linePoints2[1].y) &&
|
|
102
|
+
multi(linePoints2[0], linePoints1[1], linePoints1[0]) * multi(linePoints1[1], linePoints2[1], linePoints1[0]) > 0 &&
|
|
103
|
+
multi(linePoints1[0], linePoints2[1], linePoints2[0]) * multi(linePoints2[1], linePoints1[1], linePoints2[0]) > 0)
|
|
104
|
+
return 1;
|
|
105
|
+
return 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function nextFrame(fn, delay = 0) {
|
|
109
|
+
if (delay <= 0)
|
|
110
|
+
requestAnimationFrame(fn);
|
|
111
|
+
else
|
|
112
|
+
requestAnimationFrame(() => nextFrame(fn, delay - 1));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 创建一个防抖动函数,该函数在高频调用时会每隔 wait 毫秒后调用 func 方法
|
|
117
|
+
* `throttle` 会在第一次调用时立刻调用一次
|
|
118
|
+
* @param func - 要防抖动的函数
|
|
119
|
+
* @param wait - 需要延迟的毫秒数
|
|
120
|
+
*/
|
|
121
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
122
|
+
function throttle(func, wait = 200) {
|
|
123
|
+
let last;
|
|
124
|
+
return function (...args) {
|
|
125
|
+
if (last)
|
|
126
|
+
return;
|
|
127
|
+
func(...args);
|
|
128
|
+
last = setTimeout(function () {
|
|
129
|
+
last = null;
|
|
130
|
+
}, wait);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const PanoRulerStyle = `<style type="text/css">
|
|
135
|
+
.PanoRulerPlugin-rule-line {
|
|
136
|
+
position: absolute;
|
|
137
|
+
transform-origin: left center;
|
|
138
|
+
width: 0;
|
|
139
|
+
height: 0.0625rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.PanoRulerPlugin-rule-line::after {
|
|
143
|
+
content: '';
|
|
144
|
+
position: absolute;
|
|
145
|
+
left: -0.125rem;
|
|
146
|
+
top: -0.1rem;
|
|
147
|
+
width: 0.25rem;
|
|
148
|
+
height: 0.25rem;
|
|
149
|
+
border-radius: 50%;
|
|
150
|
+
background: #FFFFFF;
|
|
151
|
+
z-index: 1;
|
|
152
|
+
animation: viewport-rule-point 0.1s 1s;
|
|
153
|
+
animation-fill-mode: both;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.PanoRulerPlugin-rule-line::before {
|
|
157
|
+
content: '';
|
|
158
|
+
position: absolute;
|
|
159
|
+
right: -0.125rem;
|
|
160
|
+
top: -0.1rem;
|
|
161
|
+
width: 0.25rem;
|
|
162
|
+
height: 0.25rem;
|
|
163
|
+
border-radius: 50%;
|
|
164
|
+
background: #FFFFFF;
|
|
165
|
+
animation: viewport-rule-point 0.1s 1.5s;
|
|
166
|
+
animation-fill-mode: both;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.PanoRulerPlugin-rule-line em {
|
|
170
|
+
background: #fff;
|
|
171
|
+
display: block;
|
|
172
|
+
height: 100%;
|
|
173
|
+
animation: viewport-rule-line 0.5s ease 1s;
|
|
174
|
+
animation-fill-mode: both;
|
|
175
|
+
box-shadow: 0 0 0.25rem rgb(0 0 0 / 40%);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.PanoRulerPlugin-rule-label {
|
|
179
|
+
position: absolute;
|
|
180
|
+
width: 0;
|
|
181
|
+
height: 0;
|
|
182
|
+
top: 0.0625rem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.PanoRulerPlugin-rule-label-name {
|
|
186
|
+
position: absolute;
|
|
187
|
+
padding: 0.1875rem 0.375rem;
|
|
188
|
+
background: rgba(195,195,195,0.30);
|
|
189
|
+
backdrop-filter: blur(0.25rem);
|
|
190
|
+
-webkit-backdrop-filter: blur(0.25rem);
|
|
191
|
+
border-radius: 6.25rem;
|
|
192
|
+
border: 0.0625rem solid rgba(255,255,255,0.6);
|
|
193
|
+
white-space: nowrap;
|
|
194
|
+
overflow: hidden;
|
|
195
|
+
color: #FFFFFF;
|
|
196
|
+
font-weight: 500;
|
|
197
|
+
font-size: 0.75rem;
|
|
198
|
+
line-height: 1;
|
|
199
|
+
-webkit-animation: viewport-rule-label 0.25s ease 1s;
|
|
200
|
+
animation: viewport-rule-label 0.25s ease 1s;
|
|
201
|
+
animation-fill-mode: both;
|
|
202
|
+
box-shadow: inset 0 0 0.625rem 0 rgba(255,255,255,0.30);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@keyframes viewport-rule-line {
|
|
206
|
+
0% { width: 0% }
|
|
207
|
+
100% { width: 100% }
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@keyframes viewport-rule-label {
|
|
211
|
+
0% { opacity: 0; transform: scaleX(0); }
|
|
212
|
+
100% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); }
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@keyframes viewport-rule-point {
|
|
216
|
+
0% { transform: scaleX(0); }
|
|
217
|
+
100% { transform: scaleX(1); }
|
|
218
|
+
}
|
|
219
|
+
</style>
|
|
220
|
+
`;
|
|
221
|
+
|
|
222
|
+
const getDistance = (p1, p2) => {
|
|
223
|
+
return Math.sqrt(Math.pow(p1.z - p2.z, 2) + Math.pow(p1.x - p2.x, 2));
|
|
224
|
+
};
|
|
225
|
+
const getRoomHeightInfo = (roomInfo, five) => {
|
|
226
|
+
const roomHeightInfo = {};
|
|
227
|
+
const raycaster = new three.Raycaster();
|
|
228
|
+
const work = five.work;
|
|
229
|
+
if (!work)
|
|
230
|
+
return roomHeightInfo;
|
|
231
|
+
const observers = roomInfo.observers;
|
|
232
|
+
work.observers.forEach((observer, index) => {
|
|
233
|
+
const { standingPosition: position } = observer;
|
|
234
|
+
const point = new three.Vector3(position.x, position.y, position.z);
|
|
235
|
+
raycaster.set(point, new three.Vector3(0, 1, 0));
|
|
236
|
+
const [intersection] = five.model.intersectRaycaster(raycaster);
|
|
237
|
+
// 虚景 VR 没有天花板碰撞射线无相交,默认固定层高2.7m
|
|
238
|
+
const verticalY = intersection ? intersection.point.y : 2.7;
|
|
239
|
+
const id = observers[index];
|
|
240
|
+
if (!id)
|
|
241
|
+
return roomHeightInfo;
|
|
242
|
+
const observerRoomName = roomInfo.rooms[id].name;
|
|
243
|
+
if (roomHeightInfo[observerRoomName] === undefined) {
|
|
244
|
+
roomHeightInfo[observerRoomName] = {
|
|
245
|
+
__roof: [verticalY],
|
|
246
|
+
__floor: [point.y],
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
roomHeightInfo[observerRoomName].__roof.push(verticalY);
|
|
251
|
+
roomHeightInfo[observerRoomName].__floor.push(point.y);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
// 地板高度求中位数,屋顶高度取最高
|
|
255
|
+
for (const roomName in roomHeightInfo) {
|
|
256
|
+
const room = roomHeightInfo[roomName];
|
|
257
|
+
room.__roof.sort();
|
|
258
|
+
room.__floor.sort();
|
|
259
|
+
room.floor = room.__floor[~~(room.__floor.length / 2)];
|
|
260
|
+
room.roof = room.__roof[room.__roof.length - 1];
|
|
261
|
+
}
|
|
262
|
+
return roomHeightInfo;
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* 全景标尺插件
|
|
266
|
+
*/
|
|
267
|
+
const PanoRulerPlugin = (five$1, params) => {
|
|
268
|
+
const state = {
|
|
269
|
+
enable: false,
|
|
270
|
+
loaded: false,
|
|
271
|
+
options: params.options || {
|
|
272
|
+
distanceText: (distance) => `${distance.toFixed(1)}m`,
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
const tpl = (name, distance) => {
|
|
276
|
+
const domStr = `
|
|
277
|
+
<div class="PanoRulerPlugin-rule-line">
|
|
278
|
+
<em></em>
|
|
279
|
+
<div class="PanoRulerPlugin-rule-label">
|
|
280
|
+
<div class="PanoRulerPlugin-rule-label-name">${state.options.distanceText(distance)}</div>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
`;
|
|
284
|
+
const res = document.createElement('div');
|
|
285
|
+
res.setAttribute('class', 'PanoRulerPlugin-rule');
|
|
286
|
+
res.setAttribute('data-name', name);
|
|
287
|
+
res.setAttribute('style', 'display: none');
|
|
288
|
+
res.innerHTML = domStr;
|
|
289
|
+
return res;
|
|
290
|
+
};
|
|
291
|
+
const $rule = document.createElement('div');
|
|
292
|
+
$rule.setAttribute('style', `position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;`);
|
|
293
|
+
// 添加标尺样式
|
|
294
|
+
const style = document.createElement('div');
|
|
295
|
+
style.innerHTML = PanoRulerStyle;
|
|
296
|
+
$rule.appendChild(style);
|
|
297
|
+
const __rule = {};
|
|
298
|
+
const _load = (roomInfo, roomRules) => {
|
|
299
|
+
if (state.loaded) {
|
|
300
|
+
throw new Error('标尺被重复初始化!');
|
|
301
|
+
}
|
|
302
|
+
const roomHeightInfo = getRoomHeightInfo(roomInfo, five$1);
|
|
303
|
+
const work = five$1.work;
|
|
304
|
+
if (!work)
|
|
305
|
+
return false;
|
|
306
|
+
for (const obKey in roomRules) {
|
|
307
|
+
const points = roomRules[obKey];
|
|
308
|
+
const { standingPosition: defaultPosition } = work.observers[0];
|
|
309
|
+
const roomPoints = points.map(({ x, z, observers }) => {
|
|
310
|
+
const pointRoomName = observers.length > 0 ? roomInfo.rooms[roomInfo.observers[observers[0]]].name : '';
|
|
311
|
+
const medianFloorHeight = roomHeightInfo[pointRoomName] ? roomHeightInfo[pointRoomName].floor : null;
|
|
312
|
+
let minDistance = Infinity;
|
|
313
|
+
let nearestPoint = {
|
|
314
|
+
index: 0,
|
|
315
|
+
x: defaultPosition.x,
|
|
316
|
+
y: defaultPosition.y,
|
|
317
|
+
z: defaultPosition.z,
|
|
318
|
+
};
|
|
319
|
+
observers.forEach((index) => {
|
|
320
|
+
if (!work.observers[index])
|
|
321
|
+
return;
|
|
322
|
+
const { standingPosition: position } = work.observers[index];
|
|
323
|
+
const observerPoint = {
|
|
324
|
+
index,
|
|
325
|
+
x: position.x,
|
|
326
|
+
y: position.y,
|
|
327
|
+
z: position.z,
|
|
328
|
+
};
|
|
329
|
+
const distance = getDistance({ x, z }, observerPoint);
|
|
330
|
+
if (medianFloorHeight) {
|
|
331
|
+
// 取最近点时排除高度与房间平均高度差大于0.3米的点
|
|
332
|
+
if (distance < minDistance && Math.abs(observerPoint.y - medianFloorHeight) < 0.3) {
|
|
333
|
+
minDistance = distance;
|
|
334
|
+
nearestPoint = observerPoint;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
if (distance < minDistance) {
|
|
339
|
+
minDistance = distance;
|
|
340
|
+
nearestPoint = observerPoint;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
const _origin = new three.Vector3(x, nearestPoint.y, z);
|
|
345
|
+
Object.assign(_origin, { observers });
|
|
346
|
+
const verticalY = roomHeightInfo[pointRoomName] ? roomHeightInfo[pointRoomName].roof : null;
|
|
347
|
+
const _vertical = !verticalY ? null : new three.Vector3(x, verticalY, z);
|
|
348
|
+
if (_vertical)
|
|
349
|
+
Object.assign(_vertical, { observers });
|
|
350
|
+
const origin = _origin;
|
|
351
|
+
const vertical = _vertical;
|
|
352
|
+
return { origin, vertical };
|
|
353
|
+
});
|
|
354
|
+
__rule[obKey] = {
|
|
355
|
+
origins: roomPoints.map((roomPoint) => roomPoint.origin),
|
|
356
|
+
rules: [],
|
|
357
|
+
};
|
|
358
|
+
for (const { origin, vertical } of roomPoints) {
|
|
359
|
+
if (!vertical)
|
|
360
|
+
continue;
|
|
361
|
+
const $element = tpl(obKey, origin.distanceTo(vertical));
|
|
362
|
+
$rule.append($element);
|
|
363
|
+
__rule[obKey].rules.push({ vertical: true, rule: [origin, vertical], $element });
|
|
364
|
+
}
|
|
365
|
+
for (let index = 0; index < roomPoints.length; index++) {
|
|
366
|
+
let nextIndex = index + 1;
|
|
367
|
+
if (nextIndex >= roomPoints.length)
|
|
368
|
+
nextIndex = 0;
|
|
369
|
+
const { origin } = roomPoints[index];
|
|
370
|
+
const { origin: next } = roomPoints[nextIndex];
|
|
371
|
+
const $element = tpl(obKey, origin.distanceTo(next));
|
|
372
|
+
$rule.append($element);
|
|
373
|
+
__rule[obKey].rules.push({ vertical: false, rule: [origin, next], $element });
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
state.loaded = true;
|
|
377
|
+
return true;
|
|
378
|
+
};
|
|
379
|
+
const load = async (_roomInfo, _roomRules, options) => {
|
|
380
|
+
const roomInfo = _roomInfo || params.roomInfo;
|
|
381
|
+
const roomRules = _roomRules || params.roomRules;
|
|
382
|
+
if (!roomInfo || !roomRules) {
|
|
383
|
+
throw new Error('标尺数据依赖不齐全!');
|
|
384
|
+
}
|
|
385
|
+
state.options = Object.assign({}, state.options, options || {});
|
|
386
|
+
if (five$1.model.loaded) {
|
|
387
|
+
return _load(roomInfo, roomRules);
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
return await new Promise((resolve) => five$1.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
if (params.roomInfo && params.roomRules) {
|
|
394
|
+
load(params.roomInfo, params.roomRules);
|
|
395
|
+
}
|
|
396
|
+
const getRuleScreenIntr = (startPoint, endPoint, canvasWidth, canvasHeight) => {
|
|
397
|
+
const screenLines = [
|
|
398
|
+
[
|
|
399
|
+
{ x: 0, y: 0 },
|
|
400
|
+
{ x: canvasWidth, y: 0 },
|
|
401
|
+
],
|
|
402
|
+
[
|
|
403
|
+
{ x: 0, y: 0 },
|
|
404
|
+
{ x: 0, y: canvasHeight },
|
|
405
|
+
],
|
|
406
|
+
[
|
|
407
|
+
{ x: canvasWidth, y: 0 },
|
|
408
|
+
{ x: canvasWidth, y: canvasHeight },
|
|
409
|
+
],
|
|
410
|
+
[
|
|
411
|
+
{ x: 0, y: canvasHeight },
|
|
412
|
+
{ x: canvasWidth, y: canvasHeight },
|
|
413
|
+
],
|
|
414
|
+
];
|
|
415
|
+
const intr = [];
|
|
416
|
+
for (let i = 0; i < screenLines.length; i++) {
|
|
417
|
+
const result = intersectionOfLine([startPoint, endPoint], [screenLines[i][0], screenLines[i][1]], true);
|
|
418
|
+
if (result)
|
|
419
|
+
intr.push(result);
|
|
420
|
+
}
|
|
421
|
+
if (intr.length === 0)
|
|
422
|
+
return false;
|
|
423
|
+
else {
|
|
424
|
+
return intr;
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
const freshRule = () => {
|
|
428
|
+
const element = five$1.getElement()?.parentElement;
|
|
429
|
+
if (!element)
|
|
430
|
+
return;
|
|
431
|
+
if (!state.loaded)
|
|
432
|
+
return;
|
|
433
|
+
if (Object.keys(__rule).length <= 0)
|
|
434
|
+
return;
|
|
435
|
+
const { panoIndex, camera, currentMode } = five$1;
|
|
436
|
+
if (panoIndex === undefined)
|
|
437
|
+
return;
|
|
438
|
+
let name;
|
|
439
|
+
for (const _name in __rule) {
|
|
440
|
+
if (_name.split(',').indexOf(panoIndex.toString()) >= 0)
|
|
441
|
+
name = _name;
|
|
442
|
+
}
|
|
443
|
+
if (!name)
|
|
444
|
+
return;
|
|
445
|
+
const cameraPosition = camera.position;
|
|
446
|
+
const cameraDirection = camera.getWorldDirection(new three.Vector3());
|
|
447
|
+
const width = element.clientWidth;
|
|
448
|
+
const height = element.clientHeight;
|
|
449
|
+
// 非全景模式下隐藏所有标尺
|
|
450
|
+
if (currentMode !== five.Five.Mode.Panorama) {
|
|
451
|
+
for (const _name in __rule) {
|
|
452
|
+
for (const { $element } of __rule[_name].rules) {
|
|
453
|
+
$element.style.display = 'none';
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
// 隐藏非当前点位的标尺
|
|
459
|
+
for (const _name in __rule) {
|
|
460
|
+
for (const { $element } of __rule[_name].rules) {
|
|
461
|
+
$element.style.display = _name === name ? 'block' : 'none';
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
// 可以看到的角度最小的拐点
|
|
465
|
+
const [visibleOrigin] = __rule[name].origins
|
|
466
|
+
.slice()
|
|
467
|
+
.filter((point) => point.observers.indexOf(panoIndex) >= 0)
|
|
468
|
+
.sort((pointA, pointB) => {
|
|
469
|
+
const angleA = pointA.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
|
|
470
|
+
const angleB = pointB.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
|
|
471
|
+
return angleA - angleB;
|
|
472
|
+
});
|
|
473
|
+
for (const { rule, vertical, $element } of __rule[name].rules) {
|
|
474
|
+
const [start, end] = rule;
|
|
475
|
+
const $line = $element.querySelector('.PanoRulerPlugin-rule-line');
|
|
476
|
+
if (!$line)
|
|
477
|
+
return;
|
|
478
|
+
if (!visibleOrigin) {
|
|
479
|
+
$element.style.display = 'none';
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
if (start !== visibleOrigin && end !== visibleOrigin) {
|
|
483
|
+
$element.style.display = 'none';
|
|
484
|
+
continue;
|
|
485
|
+
}
|
|
486
|
+
if (start.distanceTo(end) < 0.5) {
|
|
487
|
+
$element.style.display = 'none';
|
|
488
|
+
continue;
|
|
489
|
+
}
|
|
490
|
+
if (start.observers.indexOf(panoIndex) === -1 || end.observers.indexOf(panoIndex) === -1) {
|
|
491
|
+
$element.style.display = 'none';
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
const startAngle = start.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
|
|
495
|
+
if (startAngle > Math.PI / 2) {
|
|
496
|
+
$element.style.display = 'none';
|
|
497
|
+
continue;
|
|
498
|
+
}
|
|
499
|
+
const endAngle = end.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
|
|
500
|
+
if (endAngle > Math.PI / 2) {
|
|
501
|
+
$element.style.display = 'none';
|
|
502
|
+
continue;
|
|
503
|
+
}
|
|
504
|
+
const ruleLength = start.distanceTo(end);
|
|
505
|
+
const midPoint = end.clone().sub(end.clone().sub(start).divide(new three.Vector3(2, 2, 2)));
|
|
506
|
+
const disFromCameraToMid = midPoint.distanceTo(cameraPosition);
|
|
507
|
+
if (disFromCameraToMid / ruleLength > 8) {
|
|
508
|
+
$element.style.display = 'none';
|
|
509
|
+
continue;
|
|
510
|
+
}
|
|
511
|
+
const mouseStart = start.clone().project(camera);
|
|
512
|
+
const startLeft = ((mouseStart.x + 1) / 2) * width;
|
|
513
|
+
const startTop = ((-mouseStart.y + 1) / 2) * height;
|
|
514
|
+
const mouseEnd = end.clone().project(camera);
|
|
515
|
+
const endLeft = ((mouseEnd.x + 1) / 2) * width;
|
|
516
|
+
const endTop = ((-mouseEnd.y + 1) / 2) * height;
|
|
517
|
+
const distance = Math.sqrt(Math.pow(endLeft - startLeft, 2) + Math.pow(endTop - startTop, 2));
|
|
518
|
+
let visibleLength = distance;
|
|
519
|
+
let labelOffset = 50;
|
|
520
|
+
const intr = getRuleScreenIntr({ x: ~~startLeft, y: ~~startTop }, {
|
|
521
|
+
x: ~~endLeft,
|
|
522
|
+
y: ~~endTop
|
|
523
|
+
}, width, height);
|
|
524
|
+
if (intr && intr.length === 1) {
|
|
525
|
+
if (visibleOrigin === start) {
|
|
526
|
+
visibleLength = Math.sqrt(Math.pow(intr[0].x - startLeft, 2) + Math.pow(intr[0].y - startTop, 2));
|
|
527
|
+
labelOffset = (visibleLength / distance) * 50;
|
|
528
|
+
}
|
|
529
|
+
else if (visibleOrigin === end) {
|
|
530
|
+
visibleLength = Math.sqrt(Math.pow(intr[0].x - endLeft, 2) + Math.pow(intr[0].y - endTop, 2));
|
|
531
|
+
labelOffset = 100 - (visibleLength / distance) * 50;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
if (intr && intr.length === 2) {
|
|
535
|
+
const middlePoint = {
|
|
536
|
+
x: (intr[0].x + intr[1].x) / 2,
|
|
537
|
+
y: (intr[0].y + intr[1].y) / 2,
|
|
538
|
+
};
|
|
539
|
+
const distanceFromStart = Math.sqrt(Math.pow(middlePoint.x - startLeft, 2) + Math.pow(middlePoint.y - startTop, 2));
|
|
540
|
+
labelOffset = (distanceFromStart / distance) * 100;
|
|
541
|
+
}
|
|
542
|
+
const rad = Math.PI / 2 - Math.atan2(endLeft - startLeft, startTop - endTop);
|
|
543
|
+
const deg = (rad / Math.PI) * 180;
|
|
544
|
+
const $label = $line.querySelector('.PanoRulerPlugin-rule-label');
|
|
545
|
+
// 线的长度小于标签时或者标签与线两端点重合时隐藏,
|
|
546
|
+
const labelWidth = $label.children[0].clientWidth;
|
|
547
|
+
if (labelWidth >= distance ||
|
|
548
|
+
labelWidth / 2 >= (labelOffset / 100) * distance ||
|
|
549
|
+
labelWidth / 2 >= (1 - labelOffset / 100) * distance) {
|
|
550
|
+
$line.style.display = 'none';
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
$line.style.display = 'block';
|
|
554
|
+
$line.style.width = distance + 'px';
|
|
555
|
+
$line.style.left = startLeft + 'px';
|
|
556
|
+
$line.style.top = startTop + 'px';
|
|
557
|
+
$line.style.transform = `rotate(${-deg}deg)`;
|
|
558
|
+
$label.style.left = `${labelOffset}%`;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
const nextFrameFreshRule = () => nextFrame(freshRule);
|
|
563
|
+
const throttleFreshRule = throttle(freshRule, 80);
|
|
564
|
+
const enable = () => {
|
|
565
|
+
if (!state.loaded)
|
|
566
|
+
return false;
|
|
567
|
+
if (state.enable)
|
|
568
|
+
return true;
|
|
569
|
+
$rule.setAttribute('class', 'PanoRulerPlugin' + (state.options.className ? ' ' + state.options.className : ''));
|
|
570
|
+
five$1.getElement()?.parentElement?.append($rule);
|
|
571
|
+
freshRule();
|
|
572
|
+
five$1.on('panoArrived', freshRule);
|
|
573
|
+
five$1.on('modeChange', freshRule);
|
|
574
|
+
five$1.on('cameraDirectionUpdate', nextFrameFreshRule);
|
|
575
|
+
five$1.on('movingToPano', nextFrameFreshRule);
|
|
576
|
+
five$1.on('mouseWheel', throttleFreshRule);
|
|
577
|
+
five$1.on('pinchGesture', throttleFreshRule);
|
|
578
|
+
state.enable = true;
|
|
579
|
+
return true;
|
|
580
|
+
};
|
|
581
|
+
const disable = () => {
|
|
582
|
+
if (!state.enable)
|
|
583
|
+
return true;
|
|
584
|
+
five$1.off('panoArrived', freshRule);
|
|
585
|
+
five$1.off('modeChange', freshRule);
|
|
586
|
+
five$1.off('cameraDirectionUpdate', nextFrameFreshRule);
|
|
587
|
+
five$1.off('movingToPano', nextFrameFreshRule);
|
|
588
|
+
five$1.off('mouseWheel', throttleFreshRule);
|
|
589
|
+
five$1.off('pinchGesture', throttleFreshRule);
|
|
590
|
+
if ($rule) {
|
|
591
|
+
$rule.remove();
|
|
592
|
+
}
|
|
593
|
+
state.enable = false;
|
|
594
|
+
return true;
|
|
595
|
+
};
|
|
596
|
+
return {
|
|
597
|
+
enable,
|
|
598
|
+
disable,
|
|
599
|
+
load,
|
|
600
|
+
state,
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
const panoRulerPluginServerParams = {
|
|
604
|
+
name: 'PanoRulerPlugin',
|
|
605
|
+
version: 0,
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
exports.PanoRulerPlugin = PanoRulerPlugin;
|
|
609
|
+
exports["default"] = PanoRulerPlugin;
|
|
610
|
+
exports.panoRulerPluginServerParams = panoRulerPluginServerParams;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const PanoRulerStyle = "<style type=\"text/css\">\n.PanoRulerPlugin-rule-line {\n position: absolute;\n transform-origin: left center;\n width: 0;\n height: 0.0625rem;\n}\n\n.PanoRulerPlugin-rule-line::after {\n content: '';\n position: absolute;\n left: -0.125rem;\n top: -0.1rem;\n width: 0.25rem;\n height: 0.25rem;\n border-radius: 50%;\n background: #FFFFFF;\n z-index: 1;\n animation: viewport-rule-point 0.1s 1s;\n animation-fill-mode: both;\n}\n\n.PanoRulerPlugin-rule-line::before {\n content: '';\n position: absolute;\n right: -0.125rem;\n top: -0.1rem;\n width: 0.25rem;\n height: 0.25rem;\n border-radius: 50%;\n background: #FFFFFF;\n animation: viewport-rule-point 0.1s 1.5s;\n animation-fill-mode: both;\n}\n\n.PanoRulerPlugin-rule-line em {\n background: #fff;\n display: block;\n height: 100%;\n animation: viewport-rule-line 0.5s ease 1s;\n animation-fill-mode: both;\n box-shadow: 0 0 0.25rem rgb(0 0 0 / 40%);\n}\n\n.PanoRulerPlugin-rule-label {\n position: absolute;\n width: 0;\n height: 0;\n top: 0.0625rem;\n}\n\n.PanoRulerPlugin-rule-label-name {\n position: absolute;\n padding: 0.1875rem 0.375rem;\n background: rgba(195,195,195,0.30);\n backdrop-filter: blur(0.25rem);\n -webkit-backdrop-filter: blur(0.25rem);\n border-radius: 6.25rem;\n border: 0.0625rem solid rgba(255,255,255,0.6);\n white-space: nowrap;\n overflow: hidden;\n color: #FFFFFF;\n font-weight: 500;\n font-size: 0.75rem;\n line-height: 1;\n -webkit-animation: viewport-rule-label 0.25s ease 1s;\n animation: viewport-rule-label 0.25s ease 1s;\n animation-fill-mode: both;\n box-shadow: inset 0 0 0.625rem 0 rgba(255,255,255,0.30);\n}\n\n@keyframes viewport-rule-line {\n 0% { width: 0% }\n 100% { width: 100% }\n}\n\n@keyframes viewport-rule-label {\n 0% { opacity: 0; transform: scaleX(0); }\n 100% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); }\n}\n\n@keyframes viewport-rule-point {\n 0% { transform: scaleX(0); }\n 100% { transform: scaleX(1); }\n}\n</style>\n";
|
|
2
|
+
export default PanoRulerStyle;
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import type { PanoSpatialTagPluginId, PanoSpatialTagPluginDataElement, PanoSpatialTagPluginContentReplacement, PanoSpatialTagPluginContentEvent } from './typings';
|
|
3
|
+
export interface PanoSpatialTagPluginData {
|
|
4
|
+
folded?: boolean;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
points: Array<PanoSpatialTagPluginDataElement>;
|
|
7
|
+
template: string;
|
|
8
|
+
events?: PanoSpatialTagPluginContentEvent;
|
|
9
|
+
render?: (template: string, replacement: PanoSpatialTagPluginContentReplacement) => string;
|
|
10
|
+
}
|
|
11
|
+
export interface PanoSpatialTagPluginParameterType {
|
|
12
|
+
container?: Element;
|
|
13
|
+
wait?: number;
|
|
14
|
+
maxNumberOnScreen?: number;
|
|
15
|
+
minRad?: number;
|
|
16
|
+
nearTolerance?: number;
|
|
17
|
+
upsideHeight?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface PanoSpatialTagPluginExportType {
|
|
20
|
+
load: (data: PanoSpatialTagPluginData) => void;
|
|
21
|
+
unfoldAll: () => void;
|
|
22
|
+
foldAll: () => void;
|
|
23
|
+
unfold: (id: PanoSpatialTagPluginId) => void;
|
|
24
|
+
fold: (id: PanoSpatialTagPluginId) => void;
|
|
25
|
+
enable: () => void;
|
|
26
|
+
disable: () => void;
|
|
27
|
+
dispose: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 空间游走标签插件
|
|
31
|
+
*/
|
|
32
|
+
export declare const PanoSpatialTagPlugin: FivePlugin<PanoSpatialTagPluginParameterType, PanoSpatialTagPluginExportType>;
|
|
33
|
+
export default PanoSpatialTagPlugin;
|