@realsee/dnalogel 2.0.0-alpha.2 → 2.0.0-alpha.22
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 +78 -0
- package/README.md +93 -4
- package/TERMS.txt +56 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.js +234 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.js +143 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +201 -0
- package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/index.js +668 -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 +505 -0
- package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +4 -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/index.d.ts +17 -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 +635 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoCursorRaycasterPlugin/index.js +90 -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 +13 -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 +5531 -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/dist/PanoRulerPlugin/index.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.js +612 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/dist/PanoRulerPlugin/typings.d.ts +21 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/index.js +1294 -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/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 +105 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +4034 -0
- package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1642 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +75 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3646 -0
- package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/dist/floorplan/constant.d.ts +5 -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/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.es.js +15138 -0
- package/dist/index.js +15180 -0
- package/dist/index.umd.js +15173 -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 +2 -0
- package/dist/shared-utils/five/useFivePlugin.d.ts +1 -0
- package/dist/shared-utils/formatRad.d.ts +7 -0
- package/dist/shared-utils/getPxmm.d.ts +11 -0
- package/dist/shared-utils/getRandomColor.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/math/evenNumber.d.ts +3 -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/useDebounce.d.ts +8 -0
- package/dist/shared-utils/useThrottle.d.ts +8 -0
- package/dist/shared-utils/uuid.d.ts +4 -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/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 +88 -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/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/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 +19 -0
- package/docs/modules.html +28 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
- package/libs/CSS3DRenderPlugin/index.js +27 -26
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +2 -2
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/libs/ModelEntryDoorGuidePlugin/index.js +13 -9
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +409 -0
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
- package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/index.js +120 -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 +255 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/index.js +254 -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/index.js +6 -6
- 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 +253 -0
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +124 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -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 +25 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +305 -0
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +265 -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 +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 +153 -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 +24 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +153 -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 +148 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +70 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +102 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +79 -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 +115 -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 +2 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +22 -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 +400 -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 +413 -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/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 +119 -0
- package/libs/floorplan/Components/CurrentFloor.js +456 -0
- package/libs/floorplan/Components/Main.js +464 -0
- package/libs/floorplan/Components/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +68 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +199 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +173 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +265 -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 +103 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -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 +4 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +455 -279
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -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 +312 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +89 -37
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +30 -14
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +269 -118
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
- package/libs/floorplan/constant.d.ts +5 -0
- package/libs/floorplan/constant.js +6 -0
- package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +3 -3
- package/libs/index.d.ts +22 -9
- package/libs/index.js +11 -3
- 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/getPxmm.d.ts +6 -1
- package/libs/shared-utils/getPxmm.js +26 -12
- package/libs/shared-utils/math/evenNumber.js +1 -1
- 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/useDebounce.js +1 -1
- package/libs/shared-utils/useThrottle.js +2 -1
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +26 -13
- package/dist/dnalogel.cjs.js +0 -2
- package/dist/dnalogel.es.js +0 -37145
- 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/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
|
@@ -1,24 +1,53 @@
|
|
|
1
1
|
import TWEEN from '@tweenjs/tween.js';
|
|
2
2
|
import { requestAnimationFrameInterval } from './index';
|
|
3
3
|
export class BetterTween extends TWEEN.Tween {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
Object.defineProperty(this, "disposeMethods", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: []
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(this, "animationFrameDisposer", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: void 0
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(this, "onDispose", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: (callback) => {
|
|
23
|
+
this.disposeMethods.push(callback);
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(this, "play", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: () => {
|
|
32
|
+
this.start(0);
|
|
33
|
+
this.animationFrameDisposer = requestAnimationFrameInterval((time) => this.update(time));
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(this, "dispose", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
value: () => {
|
|
42
|
+
var _a;
|
|
43
|
+
this.stop();
|
|
44
|
+
(_a = this.animationFrameDisposer) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
45
|
+
this.disposeMethods.forEach((fn) => fn());
|
|
46
|
+
this.disposeMethods = [];
|
|
47
|
+
TWEEN.remove(this);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
22
51
|
}
|
|
23
52
|
export function tweenProgress(duration, easing = TWEEN.Easing.Linear.None) {
|
|
24
53
|
const tween = new BetterTween({ progress: 0 }).to({ progress: 1 });
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CanvasTexture } from 'three';
|
|
2
2
|
export default function createCanvasTextTexture(text, config) {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
3
|
+
var _a, _b, _c, _d, _e;
|
|
4
|
+
const size = (_a = config === null || config === void 0 ? void 0 : config.size) !== null && _a !== void 0 ? _a : 512;
|
|
5
|
+
const fontSize = (_b = config === null || config === void 0 ? void 0 : config.fontSize) !== null && _b !== void 0 ? _b : size * (35 / 256) * 1.2;
|
|
6
|
+
const backgroundColor = (_c = config === null || config === void 0 ? void 0 : config.backgroundColor) !== null && _c !== void 0 ? _c : 'rgba(0,0,0,0)';
|
|
7
|
+
const fontColor = (_d = config === null || config === void 0 ? void 0 : config.fontColor) !== null && _d !== void 0 ? _d : '#fff';
|
|
8
|
+
const textAlign = (_e = config === null || config === void 0 ? void 0 : config.textAlign) !== null && _e !== void 0 ? _e : 'center';
|
|
8
9
|
const canvas = document.createElement('canvas');
|
|
9
10
|
canvas.setAttribute('width', size + '');
|
|
10
11
|
canvas.setAttribute('height', size + '');
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
|
+
import { FLOOR_PLAN_ATTACHED_TO } from '../floorplan/constant';
|
|
3
|
+
interface GetPxmmOption {
|
|
4
|
+
attachedTo: FLOOR_PLAN_ATTACHED_TO;
|
|
5
|
+
}
|
|
2
6
|
/**
|
|
3
7
|
* 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
|
|
4
8
|
* @param five five
|
|
5
9
|
*/
|
|
6
|
-
export default function getPxmm(five: Five, container: Element): number;
|
|
10
|
+
export default function getPxmm(five: Five, container: Element, floorIndex: number, options?: GetPxmmOption): number;
|
|
11
|
+
export {};
|
|
@@ -1,20 +1,34 @@
|
|
|
1
|
+
import { FLOOR_PLAN_ATTACHED_TO } from '../floorplan/constant';
|
|
1
2
|
import * as THREE from 'three';
|
|
2
3
|
/**
|
|
3
4
|
* 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
|
|
4
5
|
* @param five five
|
|
5
6
|
*/
|
|
6
|
-
export default function getPxmm(five, container) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
export default function getPxmm(five, container, floorIndex, options) {
|
|
8
|
+
const maxFloorIndex = Math.max(...five.work.observers.map((ob) => ob.floorIndex));
|
|
9
|
+
function getFloorY(floorIndex) {
|
|
10
|
+
return floorIndex > maxFloorIndex
|
|
11
|
+
? five.model.bounding.max.y
|
|
12
|
+
: Math.max(...five.work.observers
|
|
13
|
+
.filter((ob) => ob.floorIndex === floorIndex)
|
|
14
|
+
.map((ob) => ob.standingPosition.y));
|
|
15
|
+
}
|
|
16
|
+
function getY() {
|
|
17
|
+
const currentFloorY = getFloorY(floorIndex);
|
|
18
|
+
const nextFloorY = getFloorY(floorIndex + 1);
|
|
19
|
+
const attachedTo = (options === null || options === void 0 ? void 0 : options.attachedTo) || FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER;
|
|
20
|
+
if (attachedTo === FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER)
|
|
21
|
+
return (five.model.bounding.max.y + five.model.bounding.min.y) / 2;
|
|
22
|
+
else if (attachedTo === FLOOR_PLAN_ATTACHED_TO.CEILING)
|
|
23
|
+
return nextFloorY;
|
|
24
|
+
else
|
|
25
|
+
return currentFloorY;
|
|
26
|
+
}
|
|
27
|
+
const y = getY();
|
|
28
|
+
const originPosition = new THREE.Vector3(0, y, 0);
|
|
29
|
+
const originPositionXUnit = new THREE.Vector3(1, y, 0);
|
|
30
|
+
const mouse = originPosition.clone().project(five.camera);
|
|
31
|
+
const xUnitMouse = originPositionXUnit.clone().project(five.camera);
|
|
18
32
|
const pxmm = Math.abs((xUnitMouse.x - mouse.x) / 1000) * (container.getBoundingClientRect().width / 2);
|
|
19
33
|
return pxmm;
|
|
20
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export default function evenNumber(num, config) {
|
|
2
2
|
const roundNum = Math.round(num);
|
|
3
|
-
return roundNum % 2 === 0 ? roundNum : roundNum + Number(config
|
|
3
|
+
return roundNum % 2 === 0 ? roundNum : roundNum + Number((config === null || config === void 0 ? void 0 : config.smaller) ? -1 : 1);
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Vector3 } from 'three';
|
|
1
|
+
import type { Vector3 } from 'three';
|
|
2
2
|
export default function getNormal(a: Vector3, b: Vector3, c: Vector3): Vector3;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Group } from 'three';
|
|
1
|
+
import type { Group } from 'three';
|
|
2
2
|
export declare function loadFbxObj(url: string): Promise<Group>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { MeshBasicMaterial } from 'three';
|
|
2
2
|
export default function transfromToMeshBasicMaterial(object, options) {
|
|
3
3
|
object.traverse((ele) => {
|
|
4
|
+
var _a;
|
|
4
5
|
if (ele.type === 'Mesh') {
|
|
5
6
|
const mesh = ele;
|
|
6
7
|
const materialConf = Object.assign({ map: mesh.material.map || {} }, options);
|
|
7
8
|
mesh.material = new MeshBasicMaterial(materialConf);
|
|
8
9
|
mesh.renderOrder = 1;
|
|
9
|
-
if (ele.parent
|
|
10
|
+
if (((_a = ele.parent) === null || _a === void 0 ? void 0 : _a.type) === 'Mesh') {
|
|
10
11
|
ele.renderOrder = ele.parent.renderOrder + 1;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
const DEFAULT_OPEN_DELIMITER = '<';
|
|
2
|
+
const DEFAULT_CLOSE_DELIMITER = '>';
|
|
3
|
+
const DEFAULT_DELIMITER = '%';
|
|
4
|
+
const DEFAULT_LOCALS_NAME = 'locals';
|
|
5
|
+
const REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)';
|
|
6
|
+
const ENCODE_HTML_RULES = {
|
|
7
|
+
'&': '&',
|
|
8
|
+
'<': '<',
|
|
9
|
+
'>': '>',
|
|
10
|
+
'"': '"',
|
|
11
|
+
"'": '''
|
|
12
|
+
};
|
|
13
|
+
const TEMPLATE_MODES = {
|
|
14
|
+
EVAL: 'eval',
|
|
15
|
+
ESCAPED: 'escaped',
|
|
16
|
+
RAW: 'raw',
|
|
17
|
+
COMMENT: 'comment',
|
|
18
|
+
LITERAL: 'literal',
|
|
19
|
+
};
|
|
20
|
+
function stripSemi(str) {
|
|
21
|
+
return str.replace(/;(\s*$)/, '$1');
|
|
22
|
+
}
|
|
23
|
+
export default function render(template, data) {
|
|
24
|
+
const templ = new Template(template);
|
|
25
|
+
return templ.compileFunction()(data);
|
|
26
|
+
}
|
|
27
|
+
class Template {
|
|
28
|
+
constructor(text) {
|
|
29
|
+
Object.defineProperty(this, "templateText", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: void 0
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(this, "mode", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: null
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(this, "truncate", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true,
|
|
45
|
+
value: false
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(this, "currentLine", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: 1
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(this, "source", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: ''
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(this, "regex", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
configurable: true,
|
|
62
|
+
writable: true,
|
|
63
|
+
value: new RegExp(REGEX_STRING)
|
|
64
|
+
});
|
|
65
|
+
this.templateText = text;
|
|
66
|
+
}
|
|
67
|
+
compileFunction() {
|
|
68
|
+
let src;
|
|
69
|
+
const prepended = ' var __output = "";\n' +
|
|
70
|
+
' function __append(s) { if (s !== undefined && s !== null) __output += s }\n' +
|
|
71
|
+
' with (' + DEFAULT_LOCALS_NAME + ' || {}) {' + '\n';
|
|
72
|
+
const appended = ' }' + '\n return __output;' + '\n';
|
|
73
|
+
const escapeFn = function (markup) {
|
|
74
|
+
return markup == undefined
|
|
75
|
+
? ''
|
|
76
|
+
: String(markup)
|
|
77
|
+
.replace(/[&<>'"]/g, function (c) {
|
|
78
|
+
return ENCODE_HTML_RULES[c] || c;
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
this._generateSource();
|
|
82
|
+
this.source = prepended + this.source + appended;
|
|
83
|
+
src = this.source;
|
|
84
|
+
src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src;
|
|
85
|
+
return new Function(DEFAULT_LOCALS_NAME + ', escapeFn', src);
|
|
86
|
+
}
|
|
87
|
+
_generateSource() {
|
|
88
|
+
this.templateText =
|
|
89
|
+
this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
|
|
90
|
+
const matches = this._parseTemplateText();
|
|
91
|
+
const d = DEFAULT_DELIMITER;
|
|
92
|
+
const o = DEFAULT_OPEN_DELIMITER;
|
|
93
|
+
const c = DEFAULT_CLOSE_DELIMITER;
|
|
94
|
+
if (matches && matches.length) {
|
|
95
|
+
matches.forEach((line, index) => {
|
|
96
|
+
let closing;
|
|
97
|
+
if (line.indexOf(o + d) === 0
|
|
98
|
+
&& line.indexOf(o + d + d) !== 0) {
|
|
99
|
+
closing = matches[index + 2];
|
|
100
|
+
if (!(closing == d + c || closing == '-' + d + c || closing == '_' + d + c)) {
|
|
101
|
+
throw new Error('Could not find matching close tag for "' + line + '".');
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
this._scanLine(line);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
_parseTemplateText() {
|
|
109
|
+
let str = this.templateText;
|
|
110
|
+
const pat = this.regex;
|
|
111
|
+
let result = pat.exec(str);
|
|
112
|
+
const arr = [];
|
|
113
|
+
let firstPos;
|
|
114
|
+
while (result) {
|
|
115
|
+
firstPos = result.index;
|
|
116
|
+
if (firstPos !== 0) {
|
|
117
|
+
arr.push(str.substring(0, firstPos));
|
|
118
|
+
str = str.slice(firstPos);
|
|
119
|
+
}
|
|
120
|
+
arr.push(result[0]);
|
|
121
|
+
str = str.slice(result[0].length);
|
|
122
|
+
result = pat.exec(str);
|
|
123
|
+
}
|
|
124
|
+
if (str) {
|
|
125
|
+
arr.push(str);
|
|
126
|
+
}
|
|
127
|
+
return arr;
|
|
128
|
+
}
|
|
129
|
+
_addOutput(line) {
|
|
130
|
+
if (this.truncate) {
|
|
131
|
+
line = line.replace(/^(?:\r\n|\r|\n)/, '');
|
|
132
|
+
this.truncate = false;
|
|
133
|
+
}
|
|
134
|
+
if (!line)
|
|
135
|
+
return line;
|
|
136
|
+
line = line.replace(/\\/g, '\\\\');
|
|
137
|
+
line = line.replace(/\n/g, '\\n');
|
|
138
|
+
line = line.replace(/\r/g, '\\r');
|
|
139
|
+
line = line.replace(/"/g, '\\"');
|
|
140
|
+
this.source += ' ; __append("' + line + '")' + '\n';
|
|
141
|
+
}
|
|
142
|
+
_scanLine(line) {
|
|
143
|
+
const d = DEFAULT_DELIMITER;
|
|
144
|
+
const o = DEFAULT_OPEN_DELIMITER;
|
|
145
|
+
const c = DEFAULT_CLOSE_DELIMITER;
|
|
146
|
+
const newLineCount = line.split('\n').length - 1;
|
|
147
|
+
switch (line) {
|
|
148
|
+
case o + d:
|
|
149
|
+
case o + d + '_':
|
|
150
|
+
this.mode = TEMPLATE_MODES.EVAL;
|
|
151
|
+
break;
|
|
152
|
+
case o + d + '=':
|
|
153
|
+
this.mode = TEMPLATE_MODES.ESCAPED;
|
|
154
|
+
break;
|
|
155
|
+
case o + d + '-':
|
|
156
|
+
this.mode = TEMPLATE_MODES.RAW;
|
|
157
|
+
break;
|
|
158
|
+
case o + d + '#':
|
|
159
|
+
this.mode = TEMPLATE_MODES.COMMENT;
|
|
160
|
+
break;
|
|
161
|
+
case o + d + d:
|
|
162
|
+
this.mode = TEMPLATE_MODES.LITERAL;
|
|
163
|
+
this.source += ' ; __append("' + line.replace(o + d + d, o + d) + '")' + '\n';
|
|
164
|
+
break;
|
|
165
|
+
case d + d + c:
|
|
166
|
+
this.mode = TEMPLATE_MODES.LITERAL;
|
|
167
|
+
this.source += ' ; __append("' + line.replace(d + d + c, d + c) + '")' + '\n';
|
|
168
|
+
break;
|
|
169
|
+
case d + c:
|
|
170
|
+
case '-' + d + c:
|
|
171
|
+
case '_' + d + c:
|
|
172
|
+
if (this.mode == TEMPLATE_MODES.LITERAL) {
|
|
173
|
+
this._addOutput(line);
|
|
174
|
+
}
|
|
175
|
+
this.mode = null;
|
|
176
|
+
this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
|
|
177
|
+
break;
|
|
178
|
+
default:
|
|
179
|
+
if (this.mode) {
|
|
180
|
+
switch (this.mode) {
|
|
181
|
+
case TEMPLATE_MODES.EVAL:
|
|
182
|
+
case TEMPLATE_MODES.ESCAPED:
|
|
183
|
+
case TEMPLATE_MODES.RAW:
|
|
184
|
+
if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
|
|
185
|
+
line += '\n';
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
switch (this.mode) {
|
|
189
|
+
case TEMPLATE_MODES.EVAL:
|
|
190
|
+
this.source += ' ; ' + line + '\n';
|
|
191
|
+
break;
|
|
192
|
+
case TEMPLATE_MODES.ESCAPED:
|
|
193
|
+
this.source += ' ; __append(escapeFn(' + stripSemi(line) + '))' + '\n';
|
|
194
|
+
break;
|
|
195
|
+
case TEMPLATE_MODES.RAW:
|
|
196
|
+
this.source += ' ; __append(' + stripSemi(line) + ')' + '\n';
|
|
197
|
+
break;
|
|
198
|
+
case TEMPLATE_MODES.COMMENT:
|
|
199
|
+
break;
|
|
200
|
+
case TEMPLATE_MODES.LITERAL:
|
|
201
|
+
this._addOutput(line);
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
this._addOutput(line);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -16,7 +16,7 @@ export const useDebounce = (callback, waitFor = 200) => {
|
|
|
16
16
|
clearTimeout(timer.current);
|
|
17
17
|
timer.current = null;
|
|
18
18
|
}
|
|
19
|
-
timer.current = setTimeout(() => savedFunc.current
|
|
19
|
+
timer.current = setTimeout(() => { var _a; return (_a = savedFunc.current) === null || _a === void 0 ? void 0 : _a.call(savedFunc, ...args); }, waitFor);
|
|
20
20
|
}, []);
|
|
21
21
|
};
|
|
22
22
|
export default useDebounce;
|
|
@@ -12,9 +12,10 @@ export const useThrottle = (callback, waitFor) => {
|
|
|
12
12
|
savedFunc.current = callback;
|
|
13
13
|
}, [waitFor]);
|
|
14
14
|
return useCallback((...args) => {
|
|
15
|
+
var _a;
|
|
15
16
|
if (timer.current)
|
|
16
17
|
return;
|
|
17
|
-
savedFunc.current
|
|
18
|
+
(_a = savedFunc.current) === null || _a === void 0 ? void 0 : _a.call(savedFunc, ...args);
|
|
18
19
|
timer.current = setTimeout(() => {
|
|
19
20
|
if (timer.current)
|
|
20
21
|
clearTimeout(timer.current);
|
package/package.json
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/dnalogel",
|
|
3
3
|
"main": "libs/index.js",
|
|
4
|
+
"typings": "./lib/index.d.ts",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"author": "REALSEE-DEVELOPER",
|
|
6
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
|
+
"description": "如视 VR 看房插件合集",
|
|
7
9
|
"private": false,
|
|
8
|
-
"version": "2.0.0-alpha.
|
|
10
|
+
"version": "2.0.0-alpha.22",
|
|
9
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
10
12
|
"scripts": {
|
|
11
|
-
"build
|
|
12
|
-
"build": "yarn
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"build": "yarn run tsb && yarn run build:rollup && yarn build:docs",
|
|
14
|
+
"build:dev": "yarn build:svelte && tsc --watch",
|
|
15
|
+
"build:rollup": " rollup --config rollup.config.js",
|
|
16
|
+
"tsb": "tsc && yarn build:svelte && ./bin/svelte-compile.js",
|
|
17
|
+
"build:svelte": "svelte-strip strip src/ libs -m=false",
|
|
15
18
|
"build:docs": "typedoc --options ./typedoc.json",
|
|
16
19
|
"preview": "vite preview",
|
|
17
20
|
"check": "svelte-check --tsconfig ./tsconfig.json"
|
|
18
21
|
},
|
|
19
22
|
"files": [
|
|
20
23
|
"libs",
|
|
21
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"docs",
|
|
26
|
+
"TERMS.txt"
|
|
22
27
|
],
|
|
23
28
|
"devDependencies": {
|
|
24
29
|
"@babel/core": "^7.17.5",
|
|
25
|
-
"@realsee/five": "^5.0.0-alpha.
|
|
30
|
+
"@realsee/five": "^5.0.0-alpha.123",
|
|
26
31
|
"@rollup/plugin-alias": "^3.1.9",
|
|
27
|
-
"@
|
|
32
|
+
"@rollup/plugin-commonjs": "^21.1.0",
|
|
33
|
+
"@rollup/plugin-typescript": "^8.3.2",
|
|
34
|
+
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.44",
|
|
28
35
|
"@tsconfig/svelte": "^2.0.1",
|
|
29
|
-
"@tweenjs/tween.js": "^18.6.4",
|
|
30
36
|
"@typescript-eslint/eslint-plugin": "^5.12.1",
|
|
31
37
|
"@typescript-eslint/parser": "^5.12.1",
|
|
32
38
|
"@vitejs/plugin-react-refresh": "^1.3.6",
|
|
@@ -34,18 +40,25 @@
|
|
|
34
40
|
"classnames": "^2.3.1",
|
|
35
41
|
"eslint": "^8.9.0",
|
|
36
42
|
"eslint-config-alloy": "^4.5.1",
|
|
37
|
-
"glob": "^
|
|
38
|
-
"hammerjs": "^2.0.8",
|
|
43
|
+
"glob": "^8.0.1",
|
|
39
44
|
"postcss": "^8.4.6",
|
|
40
45
|
"postcss-plugin-px2rem": "^0.8.1",
|
|
41
|
-
"
|
|
46
|
+
"replace": "^1.2.1",
|
|
47
|
+
"rollup-plugin-multi-input": "^1.3.1",
|
|
48
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
49
|
+
"rollup-plugin-svelte": "^7.1.0",
|
|
42
50
|
"svelte-check": "^2.2.7",
|
|
43
|
-
"svelte-preprocess": "^4.
|
|
51
|
+
"svelte-preprocess": "^4.10.6",
|
|
44
52
|
"svelte-strip": "^1.0.1",
|
|
45
53
|
"three": "0.117.1",
|
|
46
54
|
"tslib": "^2.3.1",
|
|
47
55
|
"typedoc": "^0.22.11",
|
|
48
56
|
"typescript": "^4.5.5",
|
|
49
57
|
"vite": "^2.8.0"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@tweenjs/tween.js": "^18.6.4",
|
|
61
|
+
"hammerjs": "^2.0.8",
|
|
62
|
+
"svelte": "^3.47.0"
|
|
50
63
|
}
|
|
51
64
|
}
|