@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
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var THREE = require('three');
|
|
6
|
+
var CSS3DRenderer = require('three/examples/jsm/renderers/CSS3DRenderer');
|
|
7
|
+
var TWEEN = require('@tweenjs/tween.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n["default"] = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
|
|
30
|
+
var TWEEN__default = /*#__PURE__*/_interopDefaultLegacy(TWEEN);
|
|
31
|
+
|
|
32
|
+
const roomInfoIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAAB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/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC';
|
|
33
|
+
|
|
34
|
+
function getRoomInfoInstance() {
|
|
35
|
+
const infoDom = document.createElement('div');
|
|
36
|
+
const iconDom = document.createElement('i');
|
|
37
|
+
const textDom = document.createElement('span');
|
|
38
|
+
infoDom.appendChild(iconDom);
|
|
39
|
+
infoDom.appendChild(textDom);
|
|
40
|
+
// infoDom style
|
|
41
|
+
infoDom.style.position = 'relative';
|
|
42
|
+
infoDom.style.width = '100%';
|
|
43
|
+
infoDom.style.display = 'flex';
|
|
44
|
+
infoDom.style.flexDirection = 'column';
|
|
45
|
+
infoDom.style.alignItems = 'center';
|
|
46
|
+
infoDom.style.marginTop = `${150 / 16}rem`;
|
|
47
|
+
infoDom.style.opacity = '0';
|
|
48
|
+
infoDom.style.transition = 'opacity 1000ms linear';
|
|
49
|
+
// iconDom style
|
|
50
|
+
iconDom.style.display = 'block';
|
|
51
|
+
iconDom.style.width = `${134 / 16}rem`;
|
|
52
|
+
iconDom.style.height = `${22 / 16}rem`;
|
|
53
|
+
iconDom.style.backgroundSize = '100%';
|
|
54
|
+
iconDom.style.backgroundRepeat = 'no-repeat';
|
|
55
|
+
iconDom.style.backgroundImage = `url(${roomInfoIcon})`;
|
|
56
|
+
textDom.style.marginTop = `${10 / 16}rem`;
|
|
57
|
+
// textDom style
|
|
58
|
+
textDom.style.fontSize = `${16 / 16}rem`;
|
|
59
|
+
textDom.style.color = '#fff';
|
|
60
|
+
textDom.style.opacity = '0.7';
|
|
61
|
+
textDom.style.textShadow = '0 2px 16px rgb(22 34 83 / 24%)';
|
|
62
|
+
textDom.style.fontWeight = 'bold';
|
|
63
|
+
return {
|
|
64
|
+
appendTo(element) {
|
|
65
|
+
element.appendChild(infoDom);
|
|
66
|
+
},
|
|
67
|
+
dispose() {
|
|
68
|
+
infoDom.remove();
|
|
69
|
+
},
|
|
70
|
+
setRoom(room) {
|
|
71
|
+
textDom.innerHTML = room.name + ' ' + Math.floor(room.size / 1000000) + '㎡';
|
|
72
|
+
},
|
|
73
|
+
show() {
|
|
74
|
+
infoDom.style.opacity = '1';
|
|
75
|
+
},
|
|
76
|
+
hide() {
|
|
77
|
+
infoDom.style.opacity = '0';
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const textureLoader = new THREE__namespace.TextureLoader();
|
|
83
|
+
async function loadTexture(url) {
|
|
84
|
+
return new Promise((resolve, reject) => {
|
|
85
|
+
textureLoader.load(url, resolve, undefined, reject);
|
|
86
|
+
}).then((texture) => {
|
|
87
|
+
texture.encoding = THREE__namespace.sRGBEncoding;
|
|
88
|
+
return texture;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function evenNumber(num, config) {
|
|
93
|
+
const roundNum = Math.round(num);
|
|
94
|
+
return roundNum % 2 === 0 ? roundNum : roundNum + Number((config === null || config === void 0 ? void 0 : config.smaller) ? -1 : 1);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function centerPoint(point1, point2) {
|
|
98
|
+
return new THREE.Vector3((point1.x + point2.x) / 2, (point1.y + point2.y) / 2, (point1.z + point2.z) / 2);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const transformPositionToVector3 = ({ x, y, z }) => new THREE.Vector3(x, y, z);
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @description: 究极简陋的 ResizeObserver polyfill
|
|
105
|
+
*/
|
|
106
|
+
function createResizeObserver(func, element) {
|
|
107
|
+
if (!element || typeof ResizeObserver === 'undefined') {
|
|
108
|
+
return {
|
|
109
|
+
observe: () => window.addEventListener('resize', func),
|
|
110
|
+
unobserve: () => window.removeEventListener('resize', func),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
const observer = new ResizeObserver(func);
|
|
115
|
+
return {
|
|
116
|
+
observe: () => observer.observe(element),
|
|
117
|
+
unobserve: () => observer.unobserve(element),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* **CSS3DRenderPlugin** 提供矩形区域(三维空间四个坐标点),你可以在此矩形区域中渲染 DOM 内容。
|
|
124
|
+
* 实现原理参考[CSS3DRenderer](https://threejs.org/docs/index.html?q=CSS3D#examples/en/renderers/CSS3DRenderer)。
|
|
125
|
+
*
|
|
126
|
+
* @returns
|
|
127
|
+
*/
|
|
128
|
+
const CSS3DRenderPlugin = (five) => {
|
|
129
|
+
const state = { disposeCallbacks: [] };
|
|
130
|
+
const create3DDomContainer = (...params) => {
|
|
131
|
+
var _a, _b, _c;
|
|
132
|
+
const points = params[0].map((point) => (point instanceof THREE.Vector3 ? point : transformPositionToVector3(point)));
|
|
133
|
+
const config = params[1];
|
|
134
|
+
if ((points === null || points === void 0 ? void 0 : points.length) < 4)
|
|
135
|
+
return console.error('points must be equal or greater than than 4');
|
|
136
|
+
if (!((_a = five === null || five === void 0 ? void 0 : five.model) === null || _a === void 0 ? void 0 : _a.loaded))
|
|
137
|
+
return console.error('five.model.loaded is: ', (_b = five === null || five === void 0 ? void 0 : five.model) === null || _b === void 0 ? void 0 : _b.loaded);
|
|
138
|
+
const fiveElement = five.getElement();
|
|
139
|
+
if (!fiveElement)
|
|
140
|
+
return console.error('five.getElement() is ' + fiveElement);
|
|
141
|
+
const disposers = [];
|
|
142
|
+
const ratio = (config === null || config === void 0 ? void 0 : config.ratio) || 0.00216;
|
|
143
|
+
if (ratio <= 0.00215)
|
|
144
|
+
console.warn('if you need click css3DElement on safari, ratio must be greater than 0.00215');
|
|
145
|
+
const dpr = (config === null || config === void 0 ? void 0 : config.dpr) || 1;
|
|
146
|
+
const mode = (config === null || config === void 0 ? void 0 : config.mode) || 'front';
|
|
147
|
+
const autoRender = (_c = config === null || config === void 0 ? void 0 : config.autoRender) !== null && _c !== void 0 ? _c : true;
|
|
148
|
+
const behindFiveContainer = (config === null || config === void 0 ? void 0 : config.behindFiveContainer) || fiveElement.parentElement || document.body;
|
|
149
|
+
const container = (config === null || config === void 0 ? void 0 : config.container) || document.createElement('div');
|
|
150
|
+
container.classList.add('__Dnalogel-plugin--CSS3DRenderPlugin');
|
|
151
|
+
// 获取css3DObject, 如果mode为behind的话,一起获取mesh
|
|
152
|
+
const { css3DObject, mesh } = createObject(points, { ratio, dpr, container, mode });
|
|
153
|
+
// ======= INIT START =======
|
|
154
|
+
let resizeObserver;
|
|
155
|
+
const frontModeUnInited = mode === 'front' && !state.frontMode;
|
|
156
|
+
const behindModeUnInited = mode === 'behind' && !state.behindMode;
|
|
157
|
+
const inited = !(frontModeUnInited || behindModeUnInited);
|
|
158
|
+
if (behindModeUnInited) {
|
|
159
|
+
state.behindMode = { scene: new THREE.Scene(), css3DRenderer: new CSS3DRenderer.CSS3DRenderer() };
|
|
160
|
+
}
|
|
161
|
+
if (frontModeUnInited) {
|
|
162
|
+
state.frontMode = { scene: new THREE.Scene(), css3DRenderer: new CSS3DRenderer.CSS3DRenderer() };
|
|
163
|
+
}
|
|
164
|
+
const stateMode = mode === 'behind' ? state.behindMode : state.frontMode;
|
|
165
|
+
const { scene, css3DRenderer } = stateMode;
|
|
166
|
+
const render = (() => {
|
|
167
|
+
if (!inited) {
|
|
168
|
+
const css3DRendererSetSize = () => {
|
|
169
|
+
// 这里evenNumber策略是遇到奇数会加1,不知道为啥会触发滚动条显示,导致fiveElement变小,fiveElement变小又触发了这里的resize,宽高变小,滚动条消失,然后又触发resize。。。无限循环
|
|
170
|
+
// 为了规避上面这种情况,evenNumber设置了一个参数,遇到奇数可选择减一
|
|
171
|
+
const rendererWidth = evenNumber(fiveElement.clientWidth, { smaller: true });
|
|
172
|
+
const rendererHeight = evenNumber(fiveElement.clientHeight, { smaller: true });
|
|
173
|
+
css3DRenderer.setSize(rendererWidth, rendererHeight);
|
|
174
|
+
};
|
|
175
|
+
css3DRendererSetSize();
|
|
176
|
+
resizeObserver = createResizeObserver(css3DRendererSetSize, fiveElement);
|
|
177
|
+
css3DRenderer.domElement.style.position = 'absolute';
|
|
178
|
+
css3DRenderer.domElement.style.top = '0';
|
|
179
|
+
css3DRenderer.domElement.style.userSelect = 'none';
|
|
180
|
+
css3DRenderer.domElement.style.pointerEvents = 'none';
|
|
181
|
+
const renderEveryFrame = () => {
|
|
182
|
+
const requestAnimationFrameId = requestAnimationFrame(renderEveryFrame);
|
|
183
|
+
stateMode.requestAnimationFrameId = requestAnimationFrameId;
|
|
184
|
+
css3DRenderer.render(scene, five.camera);
|
|
185
|
+
};
|
|
186
|
+
return () => {
|
|
187
|
+
var _a;
|
|
188
|
+
scene.add(css3DObject);
|
|
189
|
+
(_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.observe) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
|
|
190
|
+
renderEveryFrame();
|
|
191
|
+
if (mode === 'behind' && mesh) {
|
|
192
|
+
five.scene.add(mesh);
|
|
193
|
+
disposers.push(() => mesh && five.scene.remove(mesh));
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
return () => {
|
|
199
|
+
scene.add(css3DObject);
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
})();
|
|
203
|
+
if (frontModeUnInited) {
|
|
204
|
+
const wrapper = fiveElement.parentElement || document.body;
|
|
205
|
+
wrapper.appendChild(css3DRenderer.domElement);
|
|
206
|
+
}
|
|
207
|
+
if (behindModeUnInited) {
|
|
208
|
+
const wrapper = behindFiveContainer;
|
|
209
|
+
wrapper.appendChild(css3DRenderer.domElement);
|
|
210
|
+
}
|
|
211
|
+
// ======= INIT END =======
|
|
212
|
+
const dispose = () => {
|
|
213
|
+
var _a;
|
|
214
|
+
disposers.forEach((d) => d === null || d === void 0 ? void 0 : d());
|
|
215
|
+
scene.remove(css3DObject);
|
|
216
|
+
if (scene.children.length === 0) {
|
|
217
|
+
if (typeof stateMode.requestAnimationFrameId === 'number') {
|
|
218
|
+
cancelAnimationFrame(stateMode.requestAnimationFrameId);
|
|
219
|
+
}
|
|
220
|
+
css3DRenderer.domElement.remove();
|
|
221
|
+
if (mode === 'front')
|
|
222
|
+
state.frontMode = undefined;
|
|
223
|
+
if (mode === 'behind')
|
|
224
|
+
state.behindMode = undefined;
|
|
225
|
+
if (!state.behindMode && !state.frontMode) {
|
|
226
|
+
(_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.unobserve) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return true;
|
|
230
|
+
};
|
|
231
|
+
const idx = state.disposeCallbacks.findIndex((item) => item === dispose);
|
|
232
|
+
if (idx !== -1) {
|
|
233
|
+
state.disposeCallbacks.splice(idx, 1);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
state.disposeCallbacks.push(dispose);
|
|
237
|
+
}
|
|
238
|
+
if (autoRender)
|
|
239
|
+
render();
|
|
240
|
+
return { container, dispose, css3DObject, render: autoRender ? undefined : render };
|
|
241
|
+
};
|
|
242
|
+
const createObject = (points, config) => {
|
|
243
|
+
const { ratio, dpr, container: element, mode } = config;
|
|
244
|
+
const planeWidth = points[0].distanceTo(points[1]);
|
|
245
|
+
const planeHeight = points[1].distanceTo(points[2]);
|
|
246
|
+
const domWidthPx = evenNumber((planeWidth / ratio) * dpr);
|
|
247
|
+
const domHeightPx = evenNumber((planeHeight / ratio) * dpr);
|
|
248
|
+
const css3DObject = new CSS3DRenderer.CSS3DObject(element);
|
|
249
|
+
css3DObject.scale.set(ratio, ratio, ratio);
|
|
250
|
+
element.style.width = domWidthPx + 'px';
|
|
251
|
+
element.style.height = domHeightPx + 'px';
|
|
252
|
+
element.style.pointerEvents = 'none';
|
|
253
|
+
const centerPosition = centerPoint(points[0], points[2]);
|
|
254
|
+
const vector01 = points[1].clone().sub(points[0]); // 点0 -> 点1 的向量
|
|
255
|
+
const vector12 = points[2].clone().sub(points[1]); // 点1 -> 点2 的向量
|
|
256
|
+
// 旋转
|
|
257
|
+
const rotateXAngle = new THREE.Vector3(0, 1, 0).angleTo(new THREE.Vector3(0, vector12.y, vector12.z));
|
|
258
|
+
const rotateYAngle = new THREE.Vector3(1, 0, 0).angleTo(new THREE.Vector3(vector01.x, 0, vector01.z));
|
|
259
|
+
const rotateZAngle = vector01.angleTo(new THREE.Vector3(vector01.x, 0, vector01.z));
|
|
260
|
+
/**
|
|
261
|
+
* [0,1,0] => [0,0,1] 为rotate Worldx正方向
|
|
262
|
+
* [0,0,1] => [0,1,0] 为rotate Worldy正方向
|
|
263
|
+
* [0,1,1] => [-1,0,0] 为rotate Worldz正方向
|
|
264
|
+
*/
|
|
265
|
+
const rotateX = (vector12.z > 0 ? -1 : 1) * rotateXAngle;
|
|
266
|
+
const rotateY = (vector01.z < 0 ? 1 : -1) * rotateYAngle;
|
|
267
|
+
const rotateZ = ((vector01.x > 0 && vector01.y < 0) || (vector01.x < 0 && vector01.y > 0) ? -1 : 1) * rotateZAngle;
|
|
268
|
+
css3DObject.rotateOnWorldAxis(new THREE.Vector3(1, 0, 0), rotateX); // x
|
|
269
|
+
css3DObject.rotateOnWorldAxis(new THREE.Vector3(0, 1, 0), rotateY); // y
|
|
270
|
+
css3DObject.rotateOnWorldAxis(new THREE.Vector3(0, 0, 1), rotateZ); // z
|
|
271
|
+
css3DObject.position.set(centerPosition.x, centerPosition.y, centerPosition.z);
|
|
272
|
+
let mesh;
|
|
273
|
+
if (mode === 'behind') {
|
|
274
|
+
const material = new THREE__namespace.MeshBasicMaterial({
|
|
275
|
+
opacity: 0,
|
|
276
|
+
transparent: false,
|
|
277
|
+
side: THREE__namespace.DoubleSide,
|
|
278
|
+
});
|
|
279
|
+
const geometry = new THREE__namespace.PlaneGeometry(domWidthPx, domHeightPx);
|
|
280
|
+
mesh = new THREE__namespace.Mesh(geometry, material);
|
|
281
|
+
mesh.name = 'CSS3DRenderPlugin-mesh';
|
|
282
|
+
mesh.position.copy(css3DObject.position);
|
|
283
|
+
mesh.rotation.copy(css3DObject.rotation);
|
|
284
|
+
mesh.scale.copy(css3DObject.scale);
|
|
285
|
+
}
|
|
286
|
+
return { css3DObject, mesh };
|
|
287
|
+
};
|
|
288
|
+
return {
|
|
289
|
+
create3DDomContainer,
|
|
290
|
+
disposeAll: () => {
|
|
291
|
+
state.disposeCallbacks.forEach((d) => d === null || d === void 0 ? void 0 : d());
|
|
292
|
+
state.disposeCallbacks = [];
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
const _requestAnimationFrame = window.requestAnimationFrame || ((fn) => setTimeout(fn, 16));
|
|
298
|
+
const _cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
|
|
299
|
+
/**
|
|
300
|
+
* 在每个 AnimationFrame 中调用传入的函数
|
|
301
|
+
* @param callback 每次 AnimationFrame 中调用的函数
|
|
302
|
+
* @param frame 每秒运行多少次
|
|
303
|
+
* @returns 返回一个函数,调用可以停止 AnimationFrameLoop
|
|
304
|
+
*/
|
|
305
|
+
function requestAnimationFrameInterval(callback, frame = 60) {
|
|
306
|
+
let index = -1;
|
|
307
|
+
let oldTime = 0;
|
|
308
|
+
let startTime = -1;
|
|
309
|
+
const minDeltaTime = 1000 / frame;
|
|
310
|
+
function loop(time) {
|
|
311
|
+
startTime === -1 && (startTime = time);
|
|
312
|
+
index = _requestAnimationFrame(loop);
|
|
313
|
+
const deltaTime = time - oldTime;
|
|
314
|
+
if (deltaTime < minDeltaTime)
|
|
315
|
+
return;
|
|
316
|
+
oldTime = time;
|
|
317
|
+
callback && callback(time - startTime);
|
|
318
|
+
}
|
|
319
|
+
index = _requestAnimationFrame(loop);
|
|
320
|
+
return function stop() {
|
|
321
|
+
_cancelAnimationFrame(index);
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
// export { Easing } from './tween'
|
|
325
|
+
// export { default as tween } from './tween'
|
|
326
|
+
|
|
327
|
+
class BetterTween extends TWEEN__default["default"].Tween {
|
|
328
|
+
constructor() {
|
|
329
|
+
super(...arguments);
|
|
330
|
+
Object.defineProperty(this, "disposeMethods", {
|
|
331
|
+
enumerable: true,
|
|
332
|
+
configurable: true,
|
|
333
|
+
writable: true,
|
|
334
|
+
value: []
|
|
335
|
+
});
|
|
336
|
+
Object.defineProperty(this, "animationFrameDisposer", {
|
|
337
|
+
enumerable: true,
|
|
338
|
+
configurable: true,
|
|
339
|
+
writable: true,
|
|
340
|
+
value: void 0
|
|
341
|
+
});
|
|
342
|
+
Object.defineProperty(this, "onDispose", {
|
|
343
|
+
enumerable: true,
|
|
344
|
+
configurable: true,
|
|
345
|
+
writable: true,
|
|
346
|
+
value: (callback) => {
|
|
347
|
+
this.disposeMethods.push(callback);
|
|
348
|
+
return this;
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
Object.defineProperty(this, "play", {
|
|
352
|
+
enumerable: true,
|
|
353
|
+
configurable: true,
|
|
354
|
+
writable: true,
|
|
355
|
+
value: () => {
|
|
356
|
+
this.start(0);
|
|
357
|
+
this.animationFrameDisposer = requestAnimationFrameInterval((time) => this.update(time));
|
|
358
|
+
return this;
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
Object.defineProperty(this, "dispose", {
|
|
362
|
+
enumerable: true,
|
|
363
|
+
configurable: true,
|
|
364
|
+
writable: true,
|
|
365
|
+
value: () => {
|
|
366
|
+
var _a;
|
|
367
|
+
this.stop();
|
|
368
|
+
(_a = this.animationFrameDisposer) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
369
|
+
this.disposeMethods.forEach((fn) => fn());
|
|
370
|
+
this.disposeMethods = [];
|
|
371
|
+
TWEEN__default["default"].remove(this);
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
function tweenProgress(duration, easing = TWEEN__default["default"].Easing.Linear.None) {
|
|
377
|
+
const tween = new BetterTween({ progress: 0 }).to({ progress: 1 });
|
|
378
|
+
if (duration !== undefined)
|
|
379
|
+
tween.duration(duration);
|
|
380
|
+
if (easing !== undefined)
|
|
381
|
+
tween.easing(easing);
|
|
382
|
+
return tween;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const panoCompassPluginServerParams = {
|
|
386
|
+
name: 'PanoCompassPlugin',
|
|
387
|
+
version: 0,
|
|
388
|
+
};
|
|
389
|
+
const PanoCompassPlugin = function (five, config) {
|
|
390
|
+
return new PanoCompassController(five, config);
|
|
391
|
+
};
|
|
392
|
+
class PanoCompassController {
|
|
393
|
+
constructor(five, config) {
|
|
394
|
+
Object.defineProperty(this, "five", {
|
|
395
|
+
enumerable: true,
|
|
396
|
+
configurable: true,
|
|
397
|
+
writable: true,
|
|
398
|
+
value: void 0
|
|
399
|
+
});
|
|
400
|
+
Object.defineProperty(this, "data", {
|
|
401
|
+
enumerable: true,
|
|
402
|
+
configurable: true,
|
|
403
|
+
writable: true,
|
|
404
|
+
value: void 0
|
|
405
|
+
});
|
|
406
|
+
Object.defineProperty(this, "config", {
|
|
407
|
+
enumerable: true,
|
|
408
|
+
configurable: true,
|
|
409
|
+
writable: true,
|
|
410
|
+
value: void 0
|
|
411
|
+
});
|
|
412
|
+
Object.defineProperty(this, "group", {
|
|
413
|
+
enumerable: true,
|
|
414
|
+
configurable: true,
|
|
415
|
+
writable: true,
|
|
416
|
+
value: new THREE__namespace.Group()
|
|
417
|
+
});
|
|
418
|
+
Object.defineProperty(this, "modelLoaded", {
|
|
419
|
+
enumerable: true,
|
|
420
|
+
configurable: true,
|
|
421
|
+
writable: true,
|
|
422
|
+
value: false
|
|
423
|
+
});
|
|
424
|
+
Object.defineProperty(this, "roomInfoInstance", {
|
|
425
|
+
enumerable: true,
|
|
426
|
+
configurable: true,
|
|
427
|
+
writable: true,
|
|
428
|
+
value: void 0
|
|
429
|
+
});
|
|
430
|
+
Object.defineProperty(this, "roomInfoWrapperInstance", {
|
|
431
|
+
enumerable: true,
|
|
432
|
+
configurable: true,
|
|
433
|
+
writable: true,
|
|
434
|
+
value: void 0
|
|
435
|
+
});
|
|
436
|
+
Object.defineProperty(this, "compassMeshTween", {
|
|
437
|
+
enumerable: true,
|
|
438
|
+
configurable: true,
|
|
439
|
+
writable: true,
|
|
440
|
+
value: void 0
|
|
441
|
+
});
|
|
442
|
+
Object.defineProperty(this, "compassMesh", {
|
|
443
|
+
enumerable: true,
|
|
444
|
+
configurable: true,
|
|
445
|
+
writable: true,
|
|
446
|
+
value: void 0
|
|
447
|
+
});
|
|
448
|
+
Object.defineProperty(this, "entryDoorMesh", {
|
|
449
|
+
enumerable: true,
|
|
450
|
+
configurable: true,
|
|
451
|
+
writable: true,
|
|
452
|
+
value: void 0
|
|
453
|
+
});
|
|
454
|
+
Object.defineProperty(this, "dispose", {
|
|
455
|
+
enumerable: true,
|
|
456
|
+
configurable: true,
|
|
457
|
+
writable: true,
|
|
458
|
+
value: () => {
|
|
459
|
+
var _a, _b, _c, _d;
|
|
460
|
+
this.five.scene.remove(this.group);
|
|
461
|
+
this.group.remove(...this.group.children);
|
|
462
|
+
(_b = (_a = this.compassMesh) === null || _a === void 0 ? void 0 : _a.material.map) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
463
|
+
(_d = (_c = this.entryDoorMesh) === null || _c === void 0 ? void 0 : _c.material.map) === null || _d === void 0 ? void 0 : _d.dispose();
|
|
464
|
+
this.five.off('panoArrived', this.onFivePanoArrived);
|
|
465
|
+
this.five.off('panoWillArrive', this.onFivePanoWillArrive);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
Object.defineProperty(this, "onFiveFistPanoLoaded", {
|
|
469
|
+
enumerable: true,
|
|
470
|
+
configurable: true,
|
|
471
|
+
writable: true,
|
|
472
|
+
value: () => {
|
|
473
|
+
this.modelLoaded = true;
|
|
474
|
+
if (this.data)
|
|
475
|
+
this.init();
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
Object.defineProperty(this, "onFivePanoWillArrive", {
|
|
479
|
+
enumerable: true,
|
|
480
|
+
configurable: true,
|
|
481
|
+
writable: true,
|
|
482
|
+
value: (panoIndex) => {
|
|
483
|
+
var _a, _b;
|
|
484
|
+
if (panoIndex === this.five.panoIndex)
|
|
485
|
+
return;
|
|
486
|
+
(_a = this.compassMeshTween) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
487
|
+
(_b = this.compassMesh) === null || _b === void 0 ? void 0 : _b.material.setValues({ opacity: 0 });
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
Object.defineProperty(this, "onFivePanoArrived", {
|
|
491
|
+
enumerable: true,
|
|
492
|
+
configurable: true,
|
|
493
|
+
writable: true,
|
|
494
|
+
value: (panoIndex) => {
|
|
495
|
+
var _a, _b, _c, _d;
|
|
496
|
+
// ======== fix compass position ========
|
|
497
|
+
const standingPosition = this.five.work.observers[panoIndex].standingPosition;
|
|
498
|
+
if (this.compassMesh) {
|
|
499
|
+
// 指南针上移 0.01m,防止与地板重合
|
|
500
|
+
this.compassMesh.position.copy(standingPosition.clone().setY(standingPosition.y + 0.01));
|
|
501
|
+
if (this.compassMesh.material.opacity !== 0)
|
|
502
|
+
return;
|
|
503
|
+
(_a = this.compassMeshTween) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
504
|
+
this.compassMeshTween = tweenProgress(1000)
|
|
505
|
+
.onUpdate(({ progress }) => {
|
|
506
|
+
var _a;
|
|
507
|
+
(_a = this.compassMesh) === null || _a === void 0 ? void 0 : _a.material.setValues({ opacity: progress });
|
|
508
|
+
this.five.needsRender = true;
|
|
509
|
+
})
|
|
510
|
+
.play();
|
|
511
|
+
}
|
|
512
|
+
// ======== fix entry door label position and rotation ========
|
|
513
|
+
if (this.entryDoorMesh) {
|
|
514
|
+
const entryDoorPosition = new THREE__namespace.Vector3(this.data.entrance.position.x, this.data.entrance.position.y, this.data.entrance.position.z);
|
|
515
|
+
const panoToEntryDoorVector = entryDoorPosition
|
|
516
|
+
.clone()
|
|
517
|
+
.setY(standingPosition.y)
|
|
518
|
+
.sub(standingPosition)
|
|
519
|
+
.normalize();
|
|
520
|
+
const compassEntryDoorPosition = standingPosition
|
|
521
|
+
.clone()
|
|
522
|
+
.add(panoToEntryDoorVector.clone().multiplyScalar(0.7))
|
|
523
|
+
.setY(standingPosition.y + 0.01);
|
|
524
|
+
this.entryDoorMesh.rotation.z = new THREE__namespace.Vector3(0, 0, -1).angleTo(panoToEntryDoorVector);
|
|
525
|
+
this.entryDoorMesh.position.copy(compassEntryDoorPosition);
|
|
526
|
+
// 不是客厅时,隐藏入户门指引
|
|
527
|
+
((_b = this.data) === null || _b === void 0 ? void 0 : _b.room_observers[panoIndex].room.type) === 1
|
|
528
|
+
? (_c = this.entryDoorMesh) === null || _c === void 0 ? void 0 : _c.material.setValues({ opacity: 1 })
|
|
529
|
+
: (_d = this.entryDoorMesh) === null || _d === void 0 ? void 0 : _d.material.setValues({ opacity: 0 });
|
|
530
|
+
}
|
|
531
|
+
// ======== fix room info ========
|
|
532
|
+
if (this.roomInfoInstance && this.roomInfoWrapperInstance) {
|
|
533
|
+
this.roomInfoWrapperInstance.css3DObject.position.copy(standingPosition.clone().setY(standingPosition.y + 0.01));
|
|
534
|
+
this.roomInfoInstance.setRoom(this.data.room_observers[panoIndex].room);
|
|
535
|
+
}
|
|
536
|
+
this.five.needsRender = true;
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
Object.defineProperty(this, "onFiveCameraDirectionUpdate", {
|
|
540
|
+
enumerable: true,
|
|
541
|
+
configurable: true,
|
|
542
|
+
writable: true,
|
|
543
|
+
value: ({ longitude, latitude, }) => {
|
|
544
|
+
var _a, _b;
|
|
545
|
+
if (!this.roomInfoWrapperInstance)
|
|
546
|
+
return;
|
|
547
|
+
this.roomInfoWrapperInstance.css3DObject.rotation.z = longitude;
|
|
548
|
+
latitude > 0.66 && this.five.getCurrentState().mode === 'Panorama'
|
|
549
|
+
? (_a = this.roomInfoInstance) === null || _a === void 0 ? void 0 : _a.show()
|
|
550
|
+
: (_b = this.roomInfoInstance) === null || _b === void 0 ? void 0 : _b.hide();
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
this.five = five;
|
|
554
|
+
this.config = config;
|
|
555
|
+
this.five.scene.add(this.group);
|
|
556
|
+
five.once('dispose', this.dispose);
|
|
557
|
+
five.once('modelLoaded', this.onFiveFistPanoLoaded);
|
|
558
|
+
this.five.on('panoArrived', this.onFivePanoArrived);
|
|
559
|
+
this.five.on('panoWillArrive', this.onFivePanoWillArrive);
|
|
560
|
+
this.five.on('cameraDirectionUpdate', this.onFiveCameraDirectionUpdate);
|
|
561
|
+
}
|
|
562
|
+
load(data) {
|
|
563
|
+
this.data = data;
|
|
564
|
+
if (this.modelLoaded)
|
|
565
|
+
this.init();
|
|
566
|
+
}
|
|
567
|
+
async init() {
|
|
568
|
+
if (!this.data || !this.modelLoaded)
|
|
569
|
+
return;
|
|
570
|
+
const northRad = this.data.north_rad;
|
|
571
|
+
if (northRad != null) {
|
|
572
|
+
this.compassMesh = await this.loadCompassMesh();
|
|
573
|
+
this.compassMesh.rotateX(-Math.PI / 2);
|
|
574
|
+
this.compassMesh.rotateZ(northRad - Math.PI / 2);
|
|
575
|
+
this.group.add(this.compassMesh);
|
|
576
|
+
}
|
|
577
|
+
if (this.data.entrance != null) {
|
|
578
|
+
this.entryDoorMesh = await this.loadEntryDoorMesh();
|
|
579
|
+
this.roomInfoWrapperInstance = this.loadRoomInfo();
|
|
580
|
+
this.roomInfoInstance = getRoomInfoInstance();
|
|
581
|
+
this.entryDoorMesh.rotateX(-Math.PI / 2);
|
|
582
|
+
if (this.roomInfoWrapperInstance)
|
|
583
|
+
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
584
|
+
this.group.add(this.entryDoorMesh);
|
|
585
|
+
}
|
|
586
|
+
this.onFivePanoArrived(this.five.panoIndex || 0);
|
|
587
|
+
this.five.needsRender = true;
|
|
588
|
+
}
|
|
589
|
+
async loadCompassMesh() {
|
|
590
|
+
var _a;
|
|
591
|
+
const compassImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.compassImageUrl) ||
|
|
592
|
+
'//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png';
|
|
593
|
+
const compassTexture = await loadTexture(compassImageUrl);
|
|
594
|
+
const compassGeometry = new THREE__namespace.CircleGeometry(0.7, 32);
|
|
595
|
+
const compassMaterial = new THREE__namespace.MeshBasicMaterial({
|
|
596
|
+
map: compassTexture,
|
|
597
|
+
transparent: true,
|
|
598
|
+
opacity: 0,
|
|
599
|
+
depthTest: false,
|
|
600
|
+
});
|
|
601
|
+
const compassMesh = new THREE__namespace.Mesh(compassGeometry, compassMaterial);
|
|
602
|
+
compassMesh.name = 'pano-compass-mesh';
|
|
603
|
+
return compassMesh;
|
|
604
|
+
}
|
|
605
|
+
async loadEntryDoorMesh() {
|
|
606
|
+
var _a;
|
|
607
|
+
const entryDoorImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.entryDoorImageUrl) ||
|
|
608
|
+
'//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png';
|
|
609
|
+
const entryDoorTexture = await loadTexture(entryDoorImageUrl);
|
|
610
|
+
const entryDoorGeometry = new THREE__namespace.PlaneGeometry(0.2, 0.16);
|
|
611
|
+
const entryDoorMaterial = new THREE__namespace.MeshBasicMaterial({
|
|
612
|
+
map: entryDoorTexture,
|
|
613
|
+
transparent: true,
|
|
614
|
+
opacity: 0.8,
|
|
615
|
+
depthTest: false,
|
|
616
|
+
});
|
|
617
|
+
const entryDoorMesh = new THREE__namespace.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
618
|
+
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
619
|
+
return entryDoorMesh;
|
|
620
|
+
}
|
|
621
|
+
loadRoomInfo() {
|
|
622
|
+
const points = [
|
|
623
|
+
new THREE__namespace.Vector3(-0.7, 0, -0.7),
|
|
624
|
+
new THREE__namespace.Vector3(0.7, 0, -0.7),
|
|
625
|
+
new THREE__namespace.Vector3(0.7, 0, 0.7),
|
|
626
|
+
new THREE__namespace.Vector3(-0.7, 0, 0.7),
|
|
627
|
+
];
|
|
628
|
+
const roomInfo = CSS3DRenderPlugin(this.five).create3DDomContainer(points);
|
|
629
|
+
return roomInfo;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
exports.PanoCompassPlugin = PanoCompassPlugin;
|
|
634
|
+
exports["default"] = PanoCompassPlugin;
|
|
635
|
+
exports.panoCompassPluginServerParams = panoCompassPluginServerParams;
|