@realsee/dnalogel 0.1.7 → 2.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -89
- package/dist/dnalogel.cjs.js +2 -0
- package/dist/dnalogel.es.js +37288 -0
- package/dist/dnalogel.umd.js +2 -0
- package/dist/style.css +1 -0
- package/{plugins → libs}/CSS3DRenderPlugin/index.d.ts +1 -1
- package/libs/CSS3DRenderPlugin/index.js +181 -0
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +18 -0
- package/{plugins → libs}/CameraMovementPlugin/index.d.ts +0 -0
- package/libs/CameraMovementPlugin/index.js +159 -0
- package/{plugins → libs}/CameraMovementPlugin/typing.d.ts +0 -0
- package/libs/CameraMovementPlugin/typing.js +17 -0
- package/{plugins → libs}/ModelChassisCompassPlugin/index.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +75 -0
- package/{plugins → libs}/ModelEntryDoorGuidePlugin/index.d.ts +6 -2
- package/libs/ModelEntryDoorGuidePlugin/index.js +136 -0
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -0
- package/{plugins → libs}/ModelRoomLabelPlugin/Controller.d.ts +3 -2
- package/libs/ModelRoomLabelPlugin/Controller.js +100 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +63 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +1 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +80 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +1 -0
- package/libs/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/libs/ModelRoomLabelPlugin/index.js +9 -0
- package/{plugins → libs}/ModelRoomLabelPlugin/typings.d.ts +2 -2
- package/libs/ModelRoomLabelPlugin/typings.js +1 -0
- package/{plugins → libs}/ModelRoomLabelPlugin/utils/parseData.d.ts +0 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.js +14 -0
- package/{plugins → libs}/ModelViewPlugin/index.d.ts +0 -0
- package/libs/ModelViewPlugin/index.js +160 -0
- package/libs/PanoCompassPlugin/index.d.ts +25 -0
- package/libs/PanoCompassPlugin/index.js +89 -0
- package/{plugins → libs}/PanoCursorRaycasterPlugin/index.d.ts +2 -3
- package/libs/PanoCursorRaycasterPlugin/index.js +74 -0
- package/libs/floorplan/Assets/camera.d.ts +1 -0
- package/libs/floorplan/Assets/camera.js +1 -0
- package/libs/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/libs/floorplan/Assets/floorplanExtraObject.js +1 -0
- package/libs/floorplan/Components/BaseImage.svelte +25 -0
- package/libs/floorplan/Components/BaseImage.svelte.map +1 -0
- package/libs/floorplan/Components/Normalmage.svelte +11 -0
- package/libs/floorplan/Components/Normalmage.svelte.map +1 -0
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +21 -0
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +1 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +60 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +35 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +7 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +16 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +17 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +1 -0
- package/libs/floorplan/Components/SvgImage.svelte +25 -0
- package/libs/floorplan/Components/SvgImage.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +46 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +48 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +37 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +50 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +41 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +25 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +148 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +15 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +1 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -14
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +357 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -0
- package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.js +1 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/utils/constant.js +16 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +0 -0
- package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +46 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +84 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +18 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +40 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +61 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +1 -0
- package/{plugins → libs}/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +6 -11
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +88 -0
- package/{plugins → libs}/floorplan/PanoFloorplanRadarPlugin/index.d.ts +0 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -0
- package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/Controller.d.ts +15 -11
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +189 -0
- package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/index.d.ts +0 -0
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -0
- package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/style.d.ts +0 -0
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +8 -0
- package/{plugins → libs}/floorplan/typings/floorplanData.d.ts +6 -0
- package/libs/floorplan/typings/floorplanData.js +6 -0
- package/{plugins → libs}/floorplan/typings/floorplanServerData.d.ts +4 -2
- package/libs/floorplan/typings/floorplanServerData.js +101 -0
- package/libs/floorplan/typings/utility.d.ts +2 -0
- package/libs/floorplan/typings/utility.js +1 -0
- package/{plugins → libs}/floorplan/utils/formatData.d.ts +3 -3
- package/libs/floorplan/utils/formatData.js +94 -0
- package/{plugins → libs}/floorplan/utils/formatPosition.d.ts +3 -4
- package/libs/floorplan/utils/formatPosition.js +50 -0
- package/libs/index.d.ts +19 -0
- package/libs/index.js +11 -0
- package/{shared-utils → libs/shared-utils}/Preloader.d.ts +0 -0
- package/libs/shared-utils/Preloader.js +38 -0
- package/{shared-utils → libs/shared-utils}/Subscribe.d.ts +3 -3
- package/libs/shared-utils/Subscribe.js +101 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/BetterTween.d.ts +0 -0
- package/libs/shared-utils/animationFrame/BetterTween.js +30 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/calculateProgress.d.ts +0 -0
- package/libs/shared-utils/animationFrame/calculateProgress.js +23 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/formatRad.d.ts +0 -0
- package/libs/shared-utils/animationFrame/formatRad.js +20 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/index.d.ts +0 -0
- package/libs/shared-utils/animationFrame/index.js +48 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/tween.d.ts +0 -0
- package/libs/shared-utils/animationFrame/tween.js +44 -0
- package/libs/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/libs/shared-utils/changeModelCanvasOpacity.js +15 -0
- package/{shared-utils → libs/shared-utils}/createCanvasTextTexture.d.ts +0 -0
- package/libs/shared-utils/createCanvasTextTexture.js +19 -0
- package/{shared-utils → libs/shared-utils}/createLine/index.d.ts +1 -1
- package/libs/shared-utils/createLine/index.js +8 -0
- package/{shared-utils → libs/shared-utils}/debounce.d.ts +1 -1
- package/libs/shared-utils/debounce.js +14 -0
- package/{shared-utils → libs/shared-utils}/equal.d.ts +0 -0
- package/libs/shared-utils/equal.js +84 -0
- package/{shared-utils → libs/shared-utils}/filter.d.ts +0 -0
- package/libs/shared-utils/filter.js +53 -0
- package/{shared-utils → libs/shared-utils}/five/changeMode.d.ts +0 -0
- package/libs/shared-utils/five/changeMode.js +15 -0
- package/{shared-utils → libs/shared-utils}/five/useFivePlugin.d.ts +0 -0
- package/libs/shared-utils/five/useFivePlugin.js +8 -0
- package/{shared-utils → libs/shared-utils}/formatRad.d.ts +0 -0
- package/libs/shared-utils/formatRad.js +10 -0
- package/{shared-utils → libs/shared-utils}/getPxmm.d.ts +0 -0
- package/libs/shared-utils/getPxmm.js +20 -0
- package/{shared-utils → libs/shared-utils}/getRandomColor.d.ts +0 -0
- package/libs/shared-utils/getRandomColor.js +10 -0
- package/{shared-utils → libs/shared-utils}/isNil.d.ts +0 -0
- package/libs/shared-utils/isNil.js +14 -0
- package/{shared-utils → libs/shared-utils}/isTruelyObject.d.ts +0 -0
- package/libs/shared-utils/isTruelyObject.js +20 -0
- package/libs/shared-utils/math/evenNumber.d.ts +3 -0
- package/libs/shared-utils/math/evenNumber.js +4 -0
- package/{shared-utils → libs/shared-utils}/math/planimetry.d.ts +4 -4
- package/libs/shared-utils/math/planimetry.js +288 -0
- package/{shared-utils → libs/shared-utils}/math/rad2Deg.d.ts +0 -0
- package/libs/shared-utils/math/rad2Deg.js +3 -0
- package/{shared-utils → libs/shared-utils}/nearlyEqual.d.ts +0 -0
- package/libs/shared-utils/nearlyEqual.js +9 -0
- package/{shared-utils → libs/shared-utils}/nextFrame.d.ts +0 -0
- package/libs/shared-utils/nextFrame.js +6 -0
- package/{shared-utils → libs/shared-utils}/noop.d.ts +0 -0
- package/libs/shared-utils/noop.js +7 -0
- package/{shared-utils → libs/shared-utils}/object3d2LocalMatrix.d.ts +0 -0
- package/libs/shared-utils/object3d2LocalMatrix.js +29 -0
- package/{shared-utils → libs/shared-utils}/px2rem.d.ts +0 -0
- package/libs/shared-utils/px2rem.js +4 -0
- package/libs/shared-utils/removeArrayItem.d.ts +7 -0
- package/libs/shared-utils/removeArrayItem.js +12 -0
- package/{shared-utils → libs/shared-utils}/tap.d.ts +0 -0
- package/{shared-utils → libs/shared-utils}/tap.js +4 -13
- package/{shared-utils → libs/shared-utils}/three/centerPoint.d.ts +0 -0
- package/libs/shared-utils/three/centerPoint.js +4 -0
- package/{shared-utils → libs/shared-utils}/three/getExtraModelLoader.d.ts +0 -0
- package/libs/shared-utils/three/getExtraModelLoader.js +18 -0
- package/{shared-utils → libs/shared-utils}/three/getNormal.d.ts +0 -0
- package/libs/shared-utils/three/getNormal.js +6 -0
- package/{shared-utils → libs/shared-utils}/three/getTextureLoader.d.ts +0 -0
- package/libs/shared-utils/three/getTextureLoader.js +17 -0
- package/{shared-utils → libs/shared-utils}/three/loadFbxObj.d.ts +0 -0
- package/libs/shared-utils/three/loadFbxObj.js +13 -0
- package/libs/shared-utils/three/loadTexture.d.ts +2 -0
- package/libs/shared-utils/three/loadTexture.js +10 -0
- package/{shared-utils → libs/shared-utils}/three/transformPositionToVector3.d.ts +0 -0
- package/libs/shared-utils/three/transformPositionToVector3.js +3 -0
- package/{shared-utils → libs/shared-utils}/three/transfromToMeshBasicMaterial.d.ts +0 -0
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +14 -0
- package/{shared-utils → libs/shared-utils}/throttle.d.ts +1 -1
- package/libs/shared-utils/throttle.js +18 -0
- package/{shared-utils → libs/shared-utils}/to.d.ts +0 -0
- package/libs/shared-utils/to.js +18 -0
- package/{shared-utils → libs/shared-utils}/useDebounce.d.ts +0 -0
- package/libs/shared-utils/useDebounce.js +22 -0
- package/{shared-utils → libs/shared-utils}/useThrottle.d.ts +0 -0
- package/libs/shared-utils/useThrottle.js +25 -0
- package/libs/{gltf-viewer → shared-utils}/uuid.d.ts +0 -0
- package/libs/shared-utils/uuid.js +11 -0
- package/{shared-utils → libs/shared-utils}/vectorTocoordinates.d.ts +0 -0
- package/libs/shared-utils/vectorTocoordinates.js +9 -0
- package/{typings → libs/typings}/math.type.d.ts +0 -0
- package/libs/typings/math.type.js +1 -0
- package/{typings → libs/typings}/utils.type.d.ts +0 -0
- package/libs/typings/utils.type.js +1 -0
- package/package.json +45 -17
- package/TERMS.txt +0 -56
- package/components/ARVideoFigure/ARVideoFigureMesh.d.ts +0 -44
- package/components/ARVideoFigure/ARVideoFigureMesh.js +0 -371
- package/components/ARVideoFigure/ARVideoFigureScene.d.ts +0 -11
- package/components/ARVideoFigure/ARVideoFigureScene.js +0 -85
- package/components/ARVideoFigure/ImgBgTransparent.d.ts +0 -16
- package/components/ARVideoFigure/ImgBgTransparent.js +0 -65
- package/components/ARVideoFigure/ImgBgTransparentMesh.d.ts +0 -30
- package/components/ARVideoFigure/ImgBgTransparentMesh.js +0 -183
- package/components/ARVideoFigure/fragmentShader.d.ts +0 -5
- package/components/ARVideoFigure/fragmentShader.js +0 -18
- package/components/ARVideoFigure/index.d.ts +0 -15
- package/components/ARVideoFigure/index.js +0 -80
- package/components/ARVideoFigure/vertexShader.d.ts +0 -1
- package/components/ARVideoFigure/vertexShader.js +0 -10
- package/components/GLTFView/index.d.ts +0 -72
- package/components/GLTFView/index.js +0 -149
- package/components/GlassFilters/index.d.ts +0 -32
- package/components/GlassFilters/index.js +0 -78
- package/components/ModelView/ModelViewController.d.ts +0 -18
- package/components/ModelView/ModelViewController.js +0 -157
- package/components/ModelView/index.d.ts +0 -10
- package/components/ModelView/index.js +0 -24
- package/components/PaintBrush/index.d.ts +0 -16
- package/components/PaintBrush/index.js +0 -47
- package/components/PanoTag/index.d.ts +0 -4
- package/components/PanoTag/index.js +0 -13
- package/custom.d.js +0 -3
- package/data/1aGKl9JmrlXMXx8d.d.ts +0 -104
- package/data/1aGKl9JmrlXMXx8d.js +0 -537
- package/data/54djM0oR6ky3Ey8e.d.ts +0 -55
- package/data/54djM0oR6ky3Ey8e.js +0 -350
- package/data/6gyq3v1verxD7JO1.d.ts +0 -104
- package/data/6gyq3v1verxD7JO1.js +0 -462
- package/data/8054djM0oR6ky3Ey8e.d.ts +0 -55
- package/data/8054djM0oR6ky3Ey8e.js +0 -350
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.d.ts +0 -84
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +0 -600
- package/data/PrXel3aqGbp34JQn.d.ts +0 -389
- package/data/PrXel3aqGbp34JQn.js +0 -4649
- package/data/XJ6NMLWnkAY3Rdx8.d.ts +0 -843
- package/data/XJ6NMLWnkAY3Rdx8.js +0 -7989
- package/data/YdoNP9K4rwQDwjJr.d.ts +0 -83
- package/data/YdoNP9K4rwQDwjJr.js +0 -1453
- package/data/ZLvK29zj4L29Jowd.d.ts +0 -55
- package/data/ZLvK29zj4L29Jowd.js +0 -372
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.d.ts +0 -86
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +0 -711
- package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +0 -5
- package/data/extrude-walls/ZLvK29zj4L29Jowd.js +0 -14
- package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +0 -5
- package/data/extrude-walls/lo024DEgzanMj5BE.js +0 -14
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +0 -85
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +0 -511
- package/data/lo024DEgzanMj5BE.d.ts +0 -55
- package/data/lo024DEgzanMj5BE.js +0 -966
- package/data/oPzy3ApbjjpD8YdR.d.ts +0 -83
- package/data/oPzy3ApbjjpD8YdR.js +0 -283
- package/data/qjAxMG4XbPn96wKG.d.ts +0 -104
- package/data/qjAxMG4XbPn96wKG.js +0 -637
- package/data/rXel3aPQRRBD4JQn.d.ts +0 -86
- package/data/rXel3aPQRRBD4JQn.js +0 -622
- package/data/vLykj3NWrllMrG06.d.ts +0 -91
- package/data/vLykj3NWrllMrG06.js +0 -2729
- package/data/wz0QV9KA4ugyo9ME.d.ts +0 -39
- package/data/wz0QV9KA4ugyo9ME.js +0 -136
- package/data/zxMawr9raSg8LYjG.d.ts +0 -53
- package/data/zxMawr9raSg8LYjG.js +0 -590
- package/examples/FiveStateController/index.js +0 -134
- package/examples/VRHouse/Mobile.js +0 -36
- package/examples/VRHouse/PC.js +0 -36
- package/examples/VRHouse/index.js +0 -36
- package/index.d.ts +0 -15
- package/index.js +0 -45
- package/libs/gltf-viewer/Subscribe.d.ts +0 -76
- package/libs/gltf-viewer/Subscribe.js +0 -231
- package/libs/gltf-viewer/coordsMoveByOffset.d.ts +0 -13
- package/libs/gltf-viewer/coordsMoveByOffset.js +0 -22
- package/libs/gltf-viewer/coordsToDirection.d.ts +0 -5
- package/libs/gltf-viewer/coordsToDirection.js +0 -41
- package/libs/gltf-viewer/formatRad.d.ts +0 -1
- package/libs/gltf-viewer/formatRad.js +0 -13
- package/libs/gltf-viewer/getFrameTime.d.ts +0 -1
- package/libs/gltf-viewer/getFrameTime.js +0 -28
- package/libs/gltf-viewer/index.d.ts +0 -55
- package/libs/gltf-viewer/index.js +0 -650
- package/libs/gltf-viewer/mouseWheel.d.ts +0 -2
- package/libs/gltf-viewer/mouseWheel.js +0 -59
- package/libs/gltf-viewer/requestAnimationFrame.d.ts +0 -1
- package/libs/gltf-viewer/requestAnimationFrame.js +0 -18
- package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +0 -1
- package/libs/gltf-viewer/requestAnimationFrameInterval.js +0 -31
- package/libs/gltf-viewer/uuid.js +0 -28
- package/plugins/AutoPreloadPlugin/index.d.ts +0 -23
- package/plugins/AutoPreloadPlugin/index.js +0 -111
- package/plugins/CSS3DRenderPlugin/components/Marker/index.d.ts +0 -12
- package/plugins/CSS3DRenderPlugin/components/Marker/index.js +0 -121
- package/plugins/CSS3DRenderPlugin/index.js +0 -298
- package/plugins/CameraMovementPlugin/index.js +0 -362
- package/plugins/CameraMovementPlugin/typing.js +0 -37
- package/plugins/ModelChassisCompassPlugin/index.js +0 -157
- package/plugins/ModelEntryDoorGuidePlugin/index.js +0 -247
- package/plugins/ModelExtrudeWallsPlugin/index.d.ts +0 -16
- package/plugins/ModelExtrudeWallsPlugin/index.js +0 -252
- package/plugins/ModelRoomLabelPlugin/Controller.js +0 -153
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +0 -8
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +0 -66
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +0 -7
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +0 -159
- package/plugins/ModelRoomLabelPlugin/index.d.ts +0 -8
- package/plugins/ModelRoomLabelPlugin/index.js +0 -18
- package/plugins/ModelRoomLabelPlugin/typings.js +0 -7
- package/plugins/ModelRoomLabelPlugin/utils/parseData.js +0 -35
- package/plugins/ModelTVVideoPlugin/index.d.ts +0 -21
- package/plugins/ModelTVVideoPlugin/index.js +0 -397
- package/plugins/ModelViewPlugin/index.js +0 -223
- package/plugins/PanoCursorRaycasterPlugin/PanoCursorRaycasterPluginUsage.d.ts +0 -48
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.d.ts +0 -9
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +0 -117
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.d.ts +0 -11
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +0 -39
- package/plugins/PanoCursorRaycasterPlugin/index.js +0 -126
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.d.ts +0 -5
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +0 -27
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.d.ts +0 -3
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +0 -48
- package/plugins/PanoDoorLabelPlugin/index.d.ts +0 -4
- package/plugins/PanoDoorLabelPlugin/index.js +0 -14
- package/plugins/PanoIRobotPlugin/index.d.ts +0 -10
- package/plugins/PanoIRobotPlugin/index.js +0 -18
- package/plugins/PanoMaskSelectorPlugin/compare.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/compare.js +0 -17
- package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +0 -7
- package/plugins/PanoMaskSelectorPlugin/createBox.js +0 -79
- package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +0 -3
- package/plugins/PanoMaskSelectorPlugin/createTextures.js +0 -45
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +0 -10
- package/plugins/PanoMaskSelectorPlugin/index.d.ts +0 -49
- package/plugins/PanoMaskSelectorPlugin/index.js +0 -348
- package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/vertexShader.js +0 -10
- package/plugins/PanoRulerPlugin/data/roomInfo.d.ts +0 -3
- package/plugins/PanoRulerPlugin/data/roomInfo.js +0 -51
- package/plugins/PanoRulerPlugin/data/roomRules.d.ts +0 -3
- package/plugins/PanoRulerPlugin/data/roomRules.js +0 -235
- package/plugins/PanoRulerPlugin/index.d.ts +0 -27
- package/plugins/PanoRulerPlugin/index.js +0 -637
- package/plugins/PanoRulerPlugin/typings.d.ts +0 -21
- package/plugins/PanoRulerPlugin/typings.js +0 -7
- package/plugins/PanoTVVideoPlugin/index.d.ts +0 -26
- package/plugins/PanoTVVideoPlugin/index.js +0 -433
- package/plugins/TreasurePlugin/Controller.d.ts +0 -73
- package/plugins/TreasurePlugin/Controller.js +0 -250
- package/plugins/TreasurePlugin/TreasureFaceAnime.d.ts +0 -25
- package/plugins/TreasurePlugin/TreasureFaceAnime.js +0 -143
- package/plugins/TreasurePlugin/TreasureObject.d.ts +0 -53
- package/plugins/TreasurePlugin/TreasureObject.js +0 -406
- package/plugins/TreasurePlugin/TreasureOpenAnime.d.ts +0 -25
- package/plugins/TreasurePlugin/TreasureOpenAnime.js +0 -127
- package/plugins/TreasurePlugin/constants.d.ts +0 -33
- package/plugins/TreasurePlugin/constants.js +0 -67
- package/plugins/TreasurePlugin/index.d.ts +0 -11
- package/plugins/TreasurePlugin/index.js +0 -26
- package/plugins/TreasurePlugin/typings.d.ts +0 -2
- package/plugins/TreasurePlugin/typings.js +0 -7
- package/plugins/floorplan/Assets/floorplanExtraObject.d.ts +0 -1
- package/plugins/floorplan/Assets/floorplanExtraObject.js +0 -10
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +0 -626
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +0 -78
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.d.ts +0 -5
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +0 -84
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.d.ts +0 -10
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +0 -129
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +0 -118
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +0 -62
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +0 -20
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +0 -88
- package/plugins/floorplan/ModelFloorplanPlugin/controller.style.d.ts +0 -1
- package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +0 -16
- package/plugins/floorplan/ModelFloorplanPlugin/index.js +0 -20
- package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +0 -7
- package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +0 -33
- package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +0 -154
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.d.ts +0 -13
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +0 -113
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.d.ts +0 -3
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +0 -39
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.d.ts +0 -5
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +0 -66
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.d.ts +0 -9
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +0 -126
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.d.ts +0 -11
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +0 -58
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.d.ts +0 -17
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +0 -85
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.d.ts +0 -2
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +0 -15
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +0 -211
- package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +0 -20
- package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +0 -262
- package/plugins/floorplan/TopviewFloorplanPlugin/index.js +0 -18
- package/plugins/floorplan/TopviewFloorplanPlugin/style.js +0 -16
- package/plugins/floorplan/components/FloorplanImage.d.ts +0 -7
- package/plugins/floorplan/components/FloorplanImage.js +0 -90
- package/plugins/floorplan/typings/floorplanData.js +0 -7
- package/plugins/floorplan/typings/floorplanServerData.js +0 -382
- package/plugins/floorplan/utils/formatData.js +0 -217
- package/plugins/floorplan/utils/formatPosition.js +0 -89
- package/shared-utils/Preloader.js +0 -57
- package/shared-utils/Subscribe.js +0 -230
- package/shared-utils/animationFrame/BetterTween.js +0 -103
- package/shared-utils/animationFrame/calculateProgress.js +0 -40
- package/shared-utils/animationFrame/formatRad.js +0 -36
- package/shared-utils/animationFrame/index.js +0 -81
- package/shared-utils/animationFrame/tween.js +0 -92
- package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
- package/shared-utils/changeModelCanvansOpacity.js +0 -38
- package/shared-utils/createCanvasTextTexture.js +0 -31
- package/shared-utils/createFiveContainer.d.ts +0 -10
- package/shared-utils/createFiveContainer.js +0 -171
- package/shared-utils/createLine/index.js +0 -43
- package/shared-utils/debounce.js +0 -30
- package/shared-utils/equal.js +0 -107
- package/shared-utils/filter.js +0 -127
- package/shared-utils/five/changeMode.js +0 -82
- package/shared-utils/five/useFivePlugin.js +0 -17
- package/shared-utils/formatRad.js +0 -18
- package/shared-utils/getPxmm.js +0 -51
- package/shared-utils/getRandomColor.js +0 -23
- package/shared-utils/isNil.js +0 -26
- package/shared-utils/isTruelyObject.js +0 -31
- package/shared-utils/math/evenNumber.d.ts +0 -1
- package/shared-utils/math/evenNumber.js +0 -13
- package/shared-utils/math/planimetry.js +0 -352
- package/shared-utils/math/rad2Deg.js +0 -12
- package/shared-utils/nearlyEqual.js +0 -19
- package/shared-utils/nextFrame.js +0 -15
- package/shared-utils/noop.js +0 -19
- package/shared-utils/object3d2LocalMatrix.js +0 -79
- package/shared-utils/px2rem.js +0 -22
- package/shared-utils/three/centerPoint.js +0 -14
- package/shared-utils/three/getExtraModelLoader.js +0 -45
- package/shared-utils/three/getNormal.js +0 -17
- package/shared-utils/three/getTextureLoader.js +0 -50
- package/shared-utils/three/loadFbxObj.js +0 -54
- package/shared-utils/three/loadTexture.d.ts +0 -2
- package/shared-utils/three/loadTexture.js +0 -46
- package/shared-utils/three/transformPositionToVector3.js +0 -20
- package/shared-utils/three/transfromToMeshBasicMaterial.js +0 -33
- package/shared-utils/throttle.js +0 -29
- package/shared-utils/to.js +0 -67
- package/shared-utils/useDebounce.js +0 -49
- package/shared-utils/useThrottle.js +0 -47
- package/shared-utils/uuid.d.ts +0 -4
- package/shared-utils/uuid.js +0 -28
- package/shared-utils/vectorTocoordinates.js +0 -18
- package/typedoc/components.d.ts +0 -6
- package/typedoc/components.js +0 -7
- package/typedoc/plugins.d.ts +0 -19
- package/typedoc/plugins.js +0 -165
- package/typedoc/shared-utils.d.ts +0 -3
- package/typedoc/shared-utils.js +0 -7
- package/typedoc/typings.d.ts +0 -3
- package/typedoc/typings.js +0 -7
- package/typings/math.type.js +0 -7
- package/typings/utils.type.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ROOM_LABEL_BG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+NE3XfrZWWVcVVLHVLmuXG/74148V5m2bm/N8bR0dH+Bx988Po333zzbz///PONg4ODa+I9I9y/cuXKgV77h4eH+1KH3hP/yv7+vuBAsG+5UCIpCkMzDQ962Eu80Q1P/KmHT82v8IocZFL4pslDvL3fNARHoPI2wtbrV1jBIf9N8SEZ0UUP2wFHv2ocSc/2ouEz8PVooJXQ0/j10aNHoH2Idj4PHz4k1n29/k+5/u3ll1/+r7fffvtLzfGzd8ibjK6+9957f5ajf1XzH9y7d+8Xjf9FRs1SdvNBBg2SDQ1xh9ALH4yN0M2BNZrKw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LMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Five } from '@realsee/five';
|
|
2
|
-
import { ModelRoomLabelPluginData } from './typings';
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { ModelRoomLabelPluginData } from './typings';
|
|
3
3
|
export declare type ModelRoomLabelPluginParameters = undefined;
|
|
4
4
|
export declare class ModelRoomLabelController {
|
|
5
5
|
private five;
|
|
6
6
|
private enabled;
|
|
7
7
|
private fiveModeEnabled;
|
|
8
|
+
private app?;
|
|
8
9
|
private wrapper?;
|
|
9
10
|
private roomLabels;
|
|
10
11
|
private container;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import RoomLabelItems from './RoomLabelItems.svelte';
|
|
2
|
+
import { parseModelRoomLabelPluginData } from './utils/parseData';
|
|
3
|
+
export class ModelRoomLabelController {
|
|
4
|
+
five;
|
|
5
|
+
enabled = true;
|
|
6
|
+
fiveModeEnabled;
|
|
7
|
+
app = undefined;
|
|
8
|
+
wrapper;
|
|
9
|
+
roomLabels = [];
|
|
10
|
+
container = document.createElement('div');
|
|
11
|
+
constructor(five) {
|
|
12
|
+
this.five = five;
|
|
13
|
+
this.fiveModeEnabled = this.five.currentMode === 'Floorplan';
|
|
14
|
+
// init container style
|
|
15
|
+
this.container.classList.add('model-room-label-plugin-container');
|
|
16
|
+
this.container.style.width = '100%';
|
|
17
|
+
this.container.style.height = '100%';
|
|
18
|
+
this.container.style.position = 'absolute';
|
|
19
|
+
this.container.style.pointerEvents = 'none';
|
|
20
|
+
this.container.style.left = '0';
|
|
21
|
+
this.container.style.top = '0';
|
|
22
|
+
// five listener
|
|
23
|
+
this.five.once('dispose', () => this.dispose());
|
|
24
|
+
this.five.on('modeChange', this.onFiveModeChange);
|
|
25
|
+
this.render();
|
|
26
|
+
}
|
|
27
|
+
dispose() {
|
|
28
|
+
this.five.off('modeChange', this.onFiveModeChange);
|
|
29
|
+
// ReactDOM.unmountComponentAtNode(this.container)
|
|
30
|
+
this.container.remove();
|
|
31
|
+
}
|
|
32
|
+
/** 加载数据 */
|
|
33
|
+
load(data) {
|
|
34
|
+
this.roomLabels = parseModelRoomLabelPluginData(data);
|
|
35
|
+
this.render();
|
|
36
|
+
}
|
|
37
|
+
/** 设置插件容器 */
|
|
38
|
+
appendTo(wrapper) {
|
|
39
|
+
this.wrapper = wrapper;
|
|
40
|
+
wrapper.appendChild(this.container);
|
|
41
|
+
this.render();
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
/** 禁用插件功能
|
|
45
|
+
* @description
|
|
46
|
+
* - 如果当前正在展示中,会清除所有展示的 DOM
|
|
47
|
+
* - 如果当前未展示,即使后续 Five 状态满足展示要求,也不会展示
|
|
48
|
+
* */
|
|
49
|
+
disable() {
|
|
50
|
+
this.enabled = false;
|
|
51
|
+
this.render();
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
/** 启用插件功能
|
|
55
|
+
* @description
|
|
56
|
+
* - 如果当前符合展示条件,会立刻展示
|
|
57
|
+
* - 如果不符合展示条件,会等待 Five 状态满足条件后再展示
|
|
58
|
+
*/
|
|
59
|
+
enable() {
|
|
60
|
+
this.enabled = true;
|
|
61
|
+
this.render();
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
/** 监听 Five Mode 变化
|
|
65
|
+
* @description
|
|
66
|
+
* Mode 不符合要求时,立刻消失,满足要求时,需要等待动画结束再展示
|
|
67
|
+
*/
|
|
68
|
+
onFiveModeChange = (mode) => {
|
|
69
|
+
if (mode !== 'Floorplan') {
|
|
70
|
+
this.fiveModeEnabled = false;
|
|
71
|
+
this.render();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.five.once('initAnimationEnded', () => {
|
|
75
|
+
this.fiveModeEnabled = this.five.currentMode === 'Floorplan';
|
|
76
|
+
this.render();
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
render() {
|
|
80
|
+
if (!this.wrapper)
|
|
81
|
+
return;
|
|
82
|
+
if (!this.enable || !this.fiveModeEnabled) {
|
|
83
|
+
this.app?.$destroy();
|
|
84
|
+
this.app = undefined;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (!this.app) {
|
|
88
|
+
this.app = new RoomLabelItems({
|
|
89
|
+
target: this.container,
|
|
90
|
+
props: {
|
|
91
|
+
five: this.five,
|
|
92
|
+
roomLabels: this.roomLabels,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.app.$set({ five: this.five, roomLabels: this.roomLabels });
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script>import { ROOM_LABEL_BG } from './Assets/roomLabelBg';
|
|
2
|
+
export let five;
|
|
3
|
+
export let roomLabel;
|
|
4
|
+
function onClick() {
|
|
5
|
+
five.setState({ panoIndex: roomLabel.panoIndex, mode: 'Panorama', longitude: roomLabel.longitude });
|
|
6
|
+
}
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div
|
|
10
|
+
class="room-label-item"
|
|
11
|
+
style:z-index="{roomLabel.zIndex}"
|
|
12
|
+
style:transform="{roomLabel.transform}"
|
|
13
|
+
style:opacity="{roomLabel.visible ? 1 : 0}"
|
|
14
|
+
>
|
|
15
|
+
<span
|
|
16
|
+
class="room-label-item__text"
|
|
17
|
+
class:wide="{roomLabel.name.length > 3}"
|
|
18
|
+
style="background-image: url({ROOM_LABEL_BG})"
|
|
19
|
+
on:click="{onClick}">{roomLabel.name}</span
|
|
20
|
+
>
|
|
21
|
+
<div class="room-label-item__bar"></div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
.room-label-item {
|
|
26
|
+
position: absolute;
|
|
27
|
+
font-size: 8px;
|
|
28
|
+
z-index: 0;
|
|
29
|
+
transform: none;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
user-select: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.room-label-item__text {
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: 0;
|
|
38
|
+
top: -64px;
|
|
39
|
+
transform: translate(-50%, 0);
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
height: 20px;
|
|
44
|
+
min-width: 32px;
|
|
45
|
+
padding: 0 6px;
|
|
46
|
+
pointer-events: all;
|
|
47
|
+
background-size: 100% 100%;
|
|
48
|
+
background-repeat: no-repeat;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.room-label-item__bar {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: -44px;
|
|
55
|
+
height: 48px;
|
|
56
|
+
width: 1px;
|
|
57
|
+
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.wide {
|
|
61
|
+
font-size: 10px;
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"AAAA,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;;;;;;AAWjB,CAAC,CAAC,MAAM;;AAER,CAAC;AACD,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI;AACxB,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC;AACnC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;AACxC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAA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|
|
3
|
+
import RoomLabelItem from './RoomLabelItem.svelte';
|
|
4
|
+
export let five;
|
|
5
|
+
export let roomLabels;
|
|
6
|
+
let containerWidth;
|
|
7
|
+
let containerHeight;
|
|
8
|
+
function getLabelVisible(five, roomLabelItem) {
|
|
9
|
+
// 先看是不是在当前展示的楼层上
|
|
10
|
+
const isLabelInFloor = five.model.shownFloor === null || roomLabelItem.floorIndex === five.model.shownFloor;
|
|
11
|
+
if (!isLabelInFloor)
|
|
12
|
+
return false;
|
|
13
|
+
// 再看是不是被模型遮挡
|
|
14
|
+
const raycaster = new Raycaster();
|
|
15
|
+
const cameraPosition = five.camera.position.clone();
|
|
16
|
+
const position = new Vector3(roomLabelItem.position.x, roomLabelItem.position.y, roomLabelItem.position.z);
|
|
17
|
+
const vectorDistance = position.distanceTo(cameraPosition);
|
|
18
|
+
raycaster.set(cameraPosition.clone(), position.clone().sub(cameraPosition).normalize());
|
|
19
|
+
const [intersection] = five.model.intersectRaycaster(raycaster);
|
|
20
|
+
if (intersection && intersection.distance + 1 < vectorDistance)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
function getLabelTransform(five, roomLabelItem) {
|
|
25
|
+
const position = new Vector3(roomLabelItem.position.x, roomLabelItem.position.y, roomLabelItem.position.z);
|
|
26
|
+
const mouse = position.clone().project(five.camera);
|
|
27
|
+
const xOffset = Math.ceil(((mouse.x + 1) / 2) * containerWidth);
|
|
28
|
+
const yOffset = Math.ceil(((-mouse.y + 1) / 2) * containerHeight);
|
|
29
|
+
return `translate(${xOffset}px, ${yOffset}px)`;
|
|
30
|
+
}
|
|
31
|
+
function getFormatedRoomLabels(five, labels) {
|
|
32
|
+
const newLabels = labels.map((roomLabelItem) => {
|
|
33
|
+
// 计算是否可见,入股不可见,不会更新位置
|
|
34
|
+
const visible = getLabelVisible(five, roomLabelItem);
|
|
35
|
+
if (!visible)
|
|
36
|
+
return { ...roomLabelItem, visible };
|
|
37
|
+
// 更新位置
|
|
38
|
+
const transform = getLabelTransform(five, roomLabelItem);
|
|
39
|
+
return { ...roomLabelItem, visible, transform };
|
|
40
|
+
});
|
|
41
|
+
const sortedRoomLabelItems = newLabels
|
|
42
|
+
.filter(({ visible }) => visible)
|
|
43
|
+
.map((roomLabelItem) => ({
|
|
44
|
+
roomLabelItem: roomLabelItem,
|
|
45
|
+
distance: new Vector3(...Object.values(roomLabelItem.position)).clone().distanceTo(five.camera.position),
|
|
46
|
+
}))
|
|
47
|
+
.sort((a, b) => a.distance - b.distance);
|
|
48
|
+
return newLabels.map((roomLabelItem) => {
|
|
49
|
+
const sortIndex = sortedRoomLabelItems.findIndex((item) => item.roomLabelItem.id === roomLabelItem.id);
|
|
50
|
+
if (sortIndex !== undefined)
|
|
51
|
+
return { ...roomLabelItem, zIndex: sortIndex * 10 };
|
|
52
|
+
return roomLabelItem;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function onFiveCameraDirectionUpdate() {
|
|
56
|
+
roomLabels = getFormatedRoomLabels(five, roomLabels);
|
|
57
|
+
}
|
|
58
|
+
five.on('cameraDirectionUpdate', onFiveCameraDirectionUpdate);
|
|
59
|
+
onDestroy(() => {
|
|
60
|
+
five.off('cameraDirectionUpdate', onFiveCameraDirectionUpdate);
|
|
61
|
+
});
|
|
62
|
+
onMount(() => {
|
|
63
|
+
onFiveCameraDirectionUpdate();
|
|
64
|
+
});
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<div class="room-labels-container" bind:clientWidth="{containerWidth}" bind:clientHeight="{containerHeight}">
|
|
68
|
+
{#each roomLabels as roomLableItem (roomLableItem.id)}
|
|
69
|
+
<RoomLabelItem roomLabel="{roomLableItem}" five="{five}" />
|
|
70
|
+
{/each}
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<style>
|
|
74
|
+
.room-labels-container {
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: 100%;
|
|
77
|
+
position: relative;
|
|
78
|
+
color: #fff;
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"AAAA,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EjB,CAAC,CAAC,MAAM;;AAER,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;AAC5G,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC;AACvD,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC9D,EAAE,CAAC,CAAC,IAAI;AACR,CAAC,CAAC,GAAG;;AAEL,CAAC,KAAK;AACN,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC;AACf,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC;AAChB,IAAI,QAAQ,CAAC,CAAC,QAAQ;AACtB,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG;AACf,EAAE;AACF,CAAC,CAAC,KAAK;","names":[],"sources":["RoomLabelItems.svelte"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as Controller from './Controller';
|
|
2
|
+
import type { FivePlugin } from '@realsee/five';
|
|
3
|
+
export declare const ModelRoomLabelPlugin: FivePlugin<Controller.ModelRoomLabelPluginParameters, ModelRoomLabelPluginReturnType>;
|
|
4
|
+
export default ModelRoomLabelPlugin;
|
|
5
|
+
export declare const modelRoomLabelPluginServerParams: {
|
|
6
|
+
name: string;
|
|
7
|
+
version: number;
|
|
8
|
+
};
|
|
9
|
+
export type { ModelRoomLabelController } from './Controller';
|
|
10
|
+
export type { ModelRoomLabelPluginData, RoomLabel } from './typings';
|
|
11
|
+
export declare type ModelRoomLabelPluginReturnType = Controller.ModelRoomLabelController;
|
|
12
|
+
export type { ModelRoomLabelPluginParameters } from './Controller';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as Controller from './Controller';
|
|
2
|
+
export const ModelRoomLabelPlugin = (five) => {
|
|
3
|
+
return new Controller.ModelRoomLabelController(five);
|
|
4
|
+
};
|
|
5
|
+
export default ModelRoomLabelPlugin;
|
|
6
|
+
export const modelRoomLabelPluginServerParams = {
|
|
7
|
+
name: 'ModelRoomLabelPlugin',
|
|
8
|
+
version: 0,
|
|
9
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface ModelRoomLabelPluginData {
|
|
2
2
|
model_room_labels: Readonly<{
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
@@ -11,7 +11,7 @@ export declare type ModelRoomLabelPluginData = {
|
|
|
11
11
|
z: number;
|
|
12
12
|
};
|
|
13
13
|
}>[];
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
export interface RoomLabel {
|
|
16
16
|
/** 房屋 ID */
|
|
17
17
|
readonly id: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @description 下划线转驼峰 */
|
|
2
|
+
export function parseModelRoomLabelPluginData(data) {
|
|
3
|
+
return data.model_room_labels.map(({ id, pano_index, floor_index, name, position, longitude }) => ({
|
|
4
|
+
id,
|
|
5
|
+
name,
|
|
6
|
+
position,
|
|
7
|
+
longitude,
|
|
8
|
+
panoIndex: pano_index,
|
|
9
|
+
floorIndex: floor_index,
|
|
10
|
+
zIndex: 0,
|
|
11
|
+
visible: false,
|
|
12
|
+
transform: '',
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* Five 模型插件
|
|
4
|
+
* @template ExportType 导出方法
|
|
5
|
+
*/
|
|
6
|
+
export const ModelViewPlugin = (five) => {
|
|
7
|
+
let needsRender = true;
|
|
8
|
+
const scene = new THREE.Scene();
|
|
9
|
+
const camera = new THREE.PerspectiveCamera(60, 1, 0.1, 1000);
|
|
10
|
+
let model = new THREE.Object3D();
|
|
11
|
+
{
|
|
12
|
+
const light = new THREE.DirectionalLight(0xffffff, 0.5);
|
|
13
|
+
light.position.copy(new THREE.Vector3(1, 1, 1));
|
|
14
|
+
scene.add(light);
|
|
15
|
+
}
|
|
16
|
+
{
|
|
17
|
+
const light = new THREE.DirectionalLight(0xffffff, 0.3);
|
|
18
|
+
scene.add(light);
|
|
19
|
+
}
|
|
20
|
+
{
|
|
21
|
+
const light = new THREE.AmbientLight(0xffffff, 0.3);
|
|
22
|
+
scene.add(light);
|
|
23
|
+
}
|
|
24
|
+
scene.add(model);
|
|
25
|
+
let renderer = null;
|
|
26
|
+
const initRendererIfNeeds = () => {
|
|
27
|
+
if (!five.renderer)
|
|
28
|
+
return;
|
|
29
|
+
if (!renderer) {
|
|
30
|
+
renderer = new THREE.WebGLRenderer({ antialias: false, alpha: true });
|
|
31
|
+
renderer.setPixelRatio(five.renderer.getPixelRatio());
|
|
32
|
+
renderer.outputEncoding = THREE.sRGBEncoding;
|
|
33
|
+
renderer.setClearColor(0x181a1c, 0);
|
|
34
|
+
renderer.autoClear = true;
|
|
35
|
+
}
|
|
36
|
+
return renderer;
|
|
37
|
+
};
|
|
38
|
+
const modelWillLoad = () => {
|
|
39
|
+
model.traverse((object) => {
|
|
40
|
+
if (object instanceof THREE.Mesh) {
|
|
41
|
+
const materials = [].concat(object.material);
|
|
42
|
+
materials.forEach((material) => material.dispose());
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
scene.remove(model);
|
|
46
|
+
model = new THREE.Object3D();
|
|
47
|
+
scene.add(model);
|
|
48
|
+
update();
|
|
49
|
+
};
|
|
50
|
+
const modelLoaded = () => {
|
|
51
|
+
function cloneMaterial(material) {
|
|
52
|
+
material = material.clone();
|
|
53
|
+
material.uniforms.modelAlpha.value = 1;
|
|
54
|
+
if (material.uniforms.map.value) {
|
|
55
|
+
material.uniforms.map.value.needsUpdate = true;
|
|
56
|
+
}
|
|
57
|
+
return material;
|
|
58
|
+
}
|
|
59
|
+
function cloneModel(model) {
|
|
60
|
+
if (model instanceof THREE.Mesh) {
|
|
61
|
+
const geometry = model.geometry;
|
|
62
|
+
const material = Array.isArray(model.material)
|
|
63
|
+
? model.material.map(cloneMaterial)
|
|
64
|
+
: cloneMaterial(model.material);
|
|
65
|
+
return new THREE.Mesh(geometry, material);
|
|
66
|
+
}
|
|
67
|
+
else if (model instanceof THREE.Group) {
|
|
68
|
+
const group = new THREE.Group();
|
|
69
|
+
model.children.forEach((object) => group.add(cloneModel(object)));
|
|
70
|
+
return group;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
const object3D = new THREE.Object3D();
|
|
74
|
+
model.children.forEach((object) => object3D.add(cloneModel(object)));
|
|
75
|
+
return object3D;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
scene.remove(model);
|
|
79
|
+
model = cloneModel(five.model);
|
|
80
|
+
scene.add(model);
|
|
81
|
+
update();
|
|
82
|
+
};
|
|
83
|
+
const appendTo = (element, size = {}) => {
|
|
84
|
+
const renderer = initRendererIfNeeds();
|
|
85
|
+
if (!renderer)
|
|
86
|
+
return;
|
|
87
|
+
element.appendChild(renderer.domElement);
|
|
88
|
+
refresh(size);
|
|
89
|
+
const positionType = window.getComputedStyle(element).position;
|
|
90
|
+
if (positionType !== 'relative' &&
|
|
91
|
+
positionType !== 'absolute' &&
|
|
92
|
+
positionType !== 'fixed' &&
|
|
93
|
+
positionType !== 'sticky')
|
|
94
|
+
element.style.position = 'relative';
|
|
95
|
+
};
|
|
96
|
+
const refresh = (size = {}) => {
|
|
97
|
+
if (!renderer)
|
|
98
|
+
return;
|
|
99
|
+
const element = renderer.domElement;
|
|
100
|
+
const container = element.parentNode;
|
|
101
|
+
if (container && container.nodeName) {
|
|
102
|
+
const { width = container.offsetWidth, height = container.offsetHeight } = size;
|
|
103
|
+
renderer.setSize(width, height);
|
|
104
|
+
// 修改摄像机 aspect 比值
|
|
105
|
+
camera.aspect = width / height;
|
|
106
|
+
camera.updateProjectionMatrix();
|
|
107
|
+
}
|
|
108
|
+
needsRender = true;
|
|
109
|
+
};
|
|
110
|
+
const cameraDistance = () => {
|
|
111
|
+
const bounding = five.model.bounding;
|
|
112
|
+
const { fov, aspect } = camera;
|
|
113
|
+
const radius = Math.sqrt(Math.pow(bounding.max.x - bounding.min.x + 2, 2) +
|
|
114
|
+
Math.pow(bounding.max.y - bounding.min.y + 2, 2) +
|
|
115
|
+
Math.pow(bounding.max.z - bounding.min.z + 2, 2));
|
|
116
|
+
// fit screen
|
|
117
|
+
let distance = radius / 2 / Math.tan((Math.PI * fov) / 360);
|
|
118
|
+
if (aspect < 1)
|
|
119
|
+
distance = distance / aspect;
|
|
120
|
+
return isNaN(distance) ? radius : distance;
|
|
121
|
+
};
|
|
122
|
+
const update = () => {
|
|
123
|
+
const { longitude, latitude } = five.getPose();
|
|
124
|
+
const distance = cameraDistance();
|
|
125
|
+
const lookAt = five.model.bounding.getCenter(new THREE.Vector3());
|
|
126
|
+
const longitudeDistance = distance * Math.cos(latitude);
|
|
127
|
+
const cameraPosition = new THREE.Vector3();
|
|
128
|
+
cameraPosition.x = Math.sin(longitude) * longitudeDistance + lookAt.x;
|
|
129
|
+
cameraPosition.z = Math.cos(longitude) * longitudeDistance + lookAt.z;
|
|
130
|
+
cameraPosition.y = Math.sin(latitude) * distance + lookAt.y;
|
|
131
|
+
camera.position.copy(cameraPosition);
|
|
132
|
+
camera.lookAt(lookAt);
|
|
133
|
+
needsRender = true;
|
|
134
|
+
};
|
|
135
|
+
const render = () => {
|
|
136
|
+
if (needsRender !== true)
|
|
137
|
+
return;
|
|
138
|
+
if (!renderer)
|
|
139
|
+
return;
|
|
140
|
+
if (!renderer.domElement.parentNode)
|
|
141
|
+
return;
|
|
142
|
+
const parentNode = renderer.domElement.parentNode;
|
|
143
|
+
if (parentNode.offsetWidth === 0)
|
|
144
|
+
return;
|
|
145
|
+
renderer.render(scene, camera);
|
|
146
|
+
needsRender = false;
|
|
147
|
+
};
|
|
148
|
+
const dispose = () => {
|
|
149
|
+
if (renderer)
|
|
150
|
+
renderer.dispose();
|
|
151
|
+
renderer = null;
|
|
152
|
+
};
|
|
153
|
+
five.on('modelLoaded', modelLoaded);
|
|
154
|
+
five.on('modelWillLoad', modelWillLoad);
|
|
155
|
+
five.on('cameraDirectionUpdate', update);
|
|
156
|
+
five.on('dispose', dispose);
|
|
157
|
+
five.on('renderFrame', render);
|
|
158
|
+
return { appendTo, refresh };
|
|
159
|
+
};
|
|
160
|
+
export default ModelViewPlugin;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Five, FivePlugin } from '@realsee/five';
|
|
2
|
+
export interface PanoCompassPluginParameterType {
|
|
3
|
+
compassImageUrl?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface PanoCompassPluginData {
|
|
6
|
+
north_rad: number;
|
|
7
|
+
}
|
|
8
|
+
export declare type PanoCompassPluginExportType = PanoCompassController;
|
|
9
|
+
export declare const PanoCompassPlugin: FivePlugin<PanoCompassPluginParameterType | undefined, PanoCompassController>;
|
|
10
|
+
export default PanoCompassPlugin;
|
|
11
|
+
declare class PanoCompassController {
|
|
12
|
+
five: Five;
|
|
13
|
+
data?: PanoCompassPluginData;
|
|
14
|
+
config?: PanoCompassPluginParameterType;
|
|
15
|
+
private compassMeshTween?;
|
|
16
|
+
private compassMesh?;
|
|
17
|
+
constructor(five: Five, config?: PanoCompassPluginParameterType);
|
|
18
|
+
load(data: PanoCompassPluginData): void;
|
|
19
|
+
dispose: () => void;
|
|
20
|
+
private loadCompassMesh;
|
|
21
|
+
private onFivePanoWillArrive;
|
|
22
|
+
private onFivePanoArrived;
|
|
23
|
+
private fixPosition;
|
|
24
|
+
private fixRotation;
|
|
25
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { loadTexture } from '../shared-utils/three/loadTexture';
|
|
3
|
+
import { tweenProgress } from '../shared-utils/animationFrame/BetterTween';
|
|
4
|
+
export const PanoCompassPlugin = function (five, config) {
|
|
5
|
+
return new PanoCompassController(five, config);
|
|
6
|
+
};
|
|
7
|
+
export default PanoCompassPlugin;
|
|
8
|
+
class PanoCompassController {
|
|
9
|
+
five;
|
|
10
|
+
data;
|
|
11
|
+
config;
|
|
12
|
+
compassMeshTween;
|
|
13
|
+
compassMesh;
|
|
14
|
+
constructor(five, config) {
|
|
15
|
+
this.five = five;
|
|
16
|
+
this.config = config;
|
|
17
|
+
five.once('panoLoaded', this.loadCompassMesh);
|
|
18
|
+
five.once('dispose', this.dispose);
|
|
19
|
+
this.five.on('panoArrived', this.onFivePanoArrived);
|
|
20
|
+
this.five.on('panoWillArrive', this.onFivePanoWillArrive);
|
|
21
|
+
}
|
|
22
|
+
load(data) {
|
|
23
|
+
this.data = data;
|
|
24
|
+
if (this.compassMesh && !this.five.scene.children.includes(this.compassMesh)) {
|
|
25
|
+
// 模型已经加载好了,才加载数据
|
|
26
|
+
this.fixRotation(data.north_rad);
|
|
27
|
+
this.fixPosition(this.five.panoIndex || 0);
|
|
28
|
+
this.five.scene.add(this.compassMesh);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
dispose = () => {
|
|
32
|
+
this.five.off('panoArrived', this.onFivePanoArrived);
|
|
33
|
+
this.five.off('panoWillArrive', this.onFivePanoWillArrive);
|
|
34
|
+
this.five.off();
|
|
35
|
+
};
|
|
36
|
+
loadCompassMesh = async () => {
|
|
37
|
+
const compassImageUrl = this.config?.compassImageUrl || '//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png';
|
|
38
|
+
const texture = await loadTexture(compassImageUrl);
|
|
39
|
+
const compassGeometry = new THREE.CircleGeometry(0.7, 32);
|
|
40
|
+
const compassMaterial = new THREE.MeshBasicMaterial({
|
|
41
|
+
map: texture,
|
|
42
|
+
transparent: true,
|
|
43
|
+
opacity: 1,
|
|
44
|
+
depthTest: false,
|
|
45
|
+
});
|
|
46
|
+
const compassMesh = new THREE.Mesh(compassGeometry, compassMaterial);
|
|
47
|
+
compassMesh.rotateX(-Math.PI / 2);
|
|
48
|
+
compassMesh.name = 'pano-compass-mesh';
|
|
49
|
+
this.compassMesh = compassMesh;
|
|
50
|
+
this.fixPosition(this.five.panoIndex || 0);
|
|
51
|
+
if (!this.data)
|
|
52
|
+
return;
|
|
53
|
+
this.fixRotation(this.data.north_rad);
|
|
54
|
+
this.five.scene.add(compassMesh);
|
|
55
|
+
};
|
|
56
|
+
onFivePanoWillArrive = (panoIndex) => {
|
|
57
|
+
if (panoIndex === this.five.panoIndex)
|
|
58
|
+
return;
|
|
59
|
+
this.compassMeshTween?.dispose();
|
|
60
|
+
this.compassMesh?.material.setValues({ opacity: 0 });
|
|
61
|
+
};
|
|
62
|
+
onFivePanoArrived = (panoIndex) => {
|
|
63
|
+
if (this.compassMesh?.material.opacity !== 0)
|
|
64
|
+
return;
|
|
65
|
+
this.fixPosition(panoIndex);
|
|
66
|
+
this.compassMeshTween?.dispose();
|
|
67
|
+
this.compassMeshTween = tweenProgress(1000)
|
|
68
|
+
.onUpdate(({ progress }) => {
|
|
69
|
+
this.compassMesh?.material.setValues({ opacity: progress });
|
|
70
|
+
this.five.needsRender = true;
|
|
71
|
+
})
|
|
72
|
+
.play();
|
|
73
|
+
};
|
|
74
|
+
fixPosition(panoIndex) {
|
|
75
|
+
if (!this.compassMesh)
|
|
76
|
+
return;
|
|
77
|
+
const standingPosition = this.five.work.observers[panoIndex].standingPosition;
|
|
78
|
+
// 指南针上移 0.01m,防止与地板重合
|
|
79
|
+
const compassPosition = standingPosition.clone().add(new THREE.Vector3(0, 0.01, 0));
|
|
80
|
+
this.compassMesh.position.copy(compassPosition);
|
|
81
|
+
this.five.needsRender = true;
|
|
82
|
+
}
|
|
83
|
+
fixRotation(northRad) {
|
|
84
|
+
if (!this.compassMesh)
|
|
85
|
+
return;
|
|
86
|
+
this.compassMesh.rotateZ(northRad - Math.PI / 2);
|
|
87
|
+
this.five.needsRender = true;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Group, Vector3 } from 'three';
|
|
2
2
|
import type { FivePlugin, Intersection } from '@realsee/five';
|
|
3
|
-
import { Vector3 } from 'three';
|
|
4
3
|
export interface PanoCursorRaycasterPluginParameterType {
|
|
5
4
|
}
|
|
6
5
|
export interface PanoCursorRaycasterPluginExportType {
|
|
@@ -18,7 +17,7 @@ export interface PanoCursorRaycasterPluginExportType {
|
|
|
18
17
|
*/
|
|
19
18
|
pointAxesHelper: (point: Vector3, length?: number, fixDistance?: number) => {
|
|
20
19
|
clear: () => void;
|
|
21
|
-
pointAxesHelperMesh:
|
|
20
|
+
pointAxesHelperMesh: Group;
|
|
22
21
|
};
|
|
23
22
|
/**
|
|
24
23
|
* @description: 将一个点在camera和点的向量上移动。传入点的位置和相对移动的距离,返回一个新的位置
|