@realsee/dnalogel 0.1.7-alpha.8 → 2.0.0-alpha.2
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 +37145 -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/{plugins → libs}/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +0 -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 +0 -0
- package/libs/ModelChassisCompassPlugin/index.js +75 -0
- package/{plugins → libs}/ModelEntryDoorGuidePlugin/index.d.ts +2 -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/{plugins → libs}/ModelRoomLabelPlugin/index.d.ts +4 -4
- 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/{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/{plugins → libs}/floorplan/Assets/floorplanExtraObject.d.ts +0 -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 +11 -12
- 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 +0 -0
- 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 +5 -10
- 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 +13 -12
- 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 -2
- package/libs/floorplan/typings/floorplanData.js +6 -0
- package/{plugins → libs}/floorplan/typings/floorplanServerData.d.ts +1 -1
- package/libs/floorplan/typings/floorplanServerData.js +101 -0
- package/{plugins/floorplan/ModelFloorplanPlugin → libs/floorplan}/typings/utility.d.ts +0 -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 +17 -0
- package/libs/index.js +10 -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/{shared-utils → libs/shared-utils}/changeModelCanvasOpacity.d.ts +0 -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/{shared-utils → libs/shared-utils}/math/evenNumber.d.ts +0 -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/{shared-utils → libs/shared-utils}/removeArrayItem.d.ts +1 -1
- 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/{shared-utils → libs/shared-utils}/three/loadTexture.d.ts +0 -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 -110
- package/components/GLTFView/index.js +0 -187
- 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/81zxMaeVKLQU93OZMG.d.ts +0 -49
- package/data/81zxMaeVKLQU93OZMG.js +0 -633
- 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 -4787
- 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/_vLykj3NWrllMrG06.d.ts +0 -95
- package/data/_vLykj3NWrllMrG06.js +0 -1
- 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 -2993
- 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 -78
- package/libs/gltf-viewer/index.js +0 -763
- 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 -303
- package/plugins/CSS3DRenderPlugin/utils/createResizeObserver.js +0 -34
- package/plugins/CameraMovementPlugin/index.js +0 -362
- package/plugins/CameraMovementPlugin/typing.js +0 -37
- package/plugins/ModelChassisCompassPlugin/index.js +0 -158
- package/plugins/ModelEntryDoorGuidePlugin/index.js +0 -252
- package/plugins/ModelExtrudeWallsPlugin/index.d.ts +0 -16
- package/plugins/ModelExtrudeWallsPlugin/index.js +0 -252
- package/plugins/ModelRoomLabelPlugin/Controller.js +0 -154
- 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.js +0 -23
- 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 -82
- 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 -350
- package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/vertexShader.js +0 -10
- package/plugins/PanoMeasurePlugin/Controller/BaseController.d.ts +0 -36
- package/plugins/PanoMeasurePlugin/Controller/BaseController.js +0 -103
- package/plugins/PanoMeasurePlugin/Controller/EditController.d.ts +0 -52
- package/plugins/PanoMeasurePlugin/Controller/EditController.js +0 -341
- package/plugins/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +0 -12
- package/plugins/PanoMeasurePlugin/Controller/ShortcutKeyController.js +0 -69
- package/plugins/PanoMeasurePlugin/Controller/WatchController.d.ts +0 -25
- package/plugins/PanoMeasurePlugin/Controller/WatchController.js +0 -371
- package/plugins/PanoMeasurePlugin/Controller/index.d.ts +0 -61
- package/plugins/PanoMeasurePlugin/Controller/index.js +0 -230
- package/plugins/PanoMeasurePlugin/Model/index.d.ts +0 -38
- package/plugins/PanoMeasurePlugin/Model/index.js +0 -235
- package/plugins/PanoMeasurePlugin/Model/line.d.ts +0 -30
- package/plugins/PanoMeasurePlugin/Model/line.js +0 -121
- package/plugins/PanoMeasurePlugin/Model/point.d.ts +0 -16
- package/plugins/PanoMeasurePlugin/Model/point.js +0 -68
- package/plugins/PanoMeasurePlugin/Model/polyline.d.ts +0 -16
- package/plugins/PanoMeasurePlugin/Model/polyline.js +0 -109
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +0 -2
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +0 -11
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +0 -2
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +0 -11
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +0 -2
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +0 -11
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +0 -22
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/index.js +0 -182
- package/plugins/PanoMeasurePlugin/Modules/FiveHelper.d.ts +0 -11
- package/plugins/PanoMeasurePlugin/Modules/FiveHelper.js +0 -66
- package/plugins/PanoMeasurePlugin/Modules/GuideController.d.ts +0 -18
- package/plugins/PanoMeasurePlugin/Modules/GuideController.js +0 -107
- package/plugins/PanoMeasurePlugin/Modules/Magnifier.d.ts +0 -24
- package/plugins/PanoMeasurePlugin/Modules/Magnifier.js +0 -139
- package/plugins/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +0 -6
- package/plugins/PanoMeasurePlugin/Modules/UIController/HTML.js +0 -26
- package/plugins/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +0 -18
- package/plugins/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +0 -169
- package/plugins/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +0 -12
- package/plugins/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +0 -59
- package/plugins/PanoMeasurePlugin/Modules/UIController/index.d.ts +0 -16
- package/plugins/PanoMeasurePlugin/Modules/UIController/index.js +0 -123
- package/plugins/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -17
- package/plugins/PanoMeasurePlugin/Modules/UIController/style.js +0 -103
- package/plugins/PanoMeasurePlugin/index.d.ts +0 -7
- package/plugins/PanoMeasurePlugin/index.js +0 -20
- package/plugins/PanoMeasurePlugin/typings/data.d.ts +0 -28
- package/plugins/PanoMeasurePlugin/typings/data.js +0 -7
- package/plugins/PanoMeasurePlugin/typings/event.type.d.ts +0 -28
- package/plugins/PanoMeasurePlugin/typings/event.type.js +0 -7
- package/plugins/PanoMeasurePlugin/typings/utils.type.d.ts +0 -1
- package/plugins/PanoMeasurePlugin/typings/utils.type.js +0 -7
- package/plugins/PanoMeasurePlugin/utils/clearGroup.d.ts +0 -2
- package/plugins/PanoMeasurePlugin/utils/clearGroup.js +0 -16
- package/plugins/PanoMeasurePlugin/utils/constants.d.ts +0 -4
- package/plugins/PanoMeasurePlugin/utils/constants.js +0 -47
- package/plugins/PanoMeasurePlugin/utils/distanceDom.d.ts +0 -28
- package/plugins/PanoMeasurePlugin/utils/distanceDom.js +0 -147
- package/plugins/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +0 -2
- package/plugins/PanoMeasurePlugin/utils/findAssociatedLines.js +0 -37
- package/plugins/PanoMeasurePlugin/utils/findClosestPoint.d.ts +0 -10
- package/plugins/PanoMeasurePlugin/utils/findClosestPoint.js +0 -49
- package/plugins/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +0 -4
- package/plugins/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +0 -20
- package/plugins/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +0 -10
- package/plugins/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +0 -33
- package/plugins/PanoMeasurePlugin/utils/ironbox.d.ts +0 -1
- package/plugins/PanoMeasurePlugin/utils/ironbox.js +0 -14
- package/plugins/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +0 -2
- package/plugins/PanoMeasurePlugin/utils/isNDCPointInScreen.js +0 -16
- package/plugins/PanoMeasurePlugin/utils/line.d.ts +0 -17
- package/plugins/PanoMeasurePlugin/utils/line.js +0 -61
- package/plugins/PanoMeasurePlugin/utils/math.d.ts +0 -17
- package/plugins/PanoMeasurePlugin/utils/math.js +0 -57
- package/plugins/PanoMeasurePlugin/utils/mouseGroup.d.ts +0 -2
- package/plugins/PanoMeasurePlugin/utils/mouseGroup.js +0 -42
- package/plugins/PanoMeasurePlugin/utils/ndc2Screen.d.ts +0 -5
- package/plugins/PanoMeasurePlugin/utils/ndc2Screen.js +0 -16
- 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 -31
- package/plugins/PanoRulerPlugin/index.js +0 -642
- 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.js +0 -10
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +0 -637
- 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/RoomMaterial.d.ts +0 -11
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomMaterial.js +0 -174
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RuleLabels.d.ts +0 -8
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RuleLabels.js +0 -178
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +0 -15
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +0 -74
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +0 -23
- 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/typings/utility.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 -114
- 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 -272
- 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/index.d.ts +0 -4
- package/plugins/floorplan/index.js +0 -13
- package/plugins/floorplan/typings/floorplanData.js +0 -7
- package/plugins/floorplan/typings/floorplanServerData.js +0 -382
- package/plugins/floorplan/utils/formatData.js +0 -218
- 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/changeModelCanvasOpacity.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.js +0 -15
- 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/removeArrayItem.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.js +0 -65
- 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/libs.d.ts +0 -1
- package/typedoc/libs.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
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.reflect.construct.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.define-property.js");
|
|
6
|
-
|
|
7
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10
|
-
value: true
|
|
11
|
-
});
|
|
12
|
-
exports["default"] = void 0;
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.array.map.js");
|
|
15
|
-
|
|
16
|
-
require("core-js/modules/es.array.for-each.js");
|
|
17
|
-
|
|
18
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
19
|
-
|
|
20
|
-
require("core-js/modules/es.array.filter.js");
|
|
21
|
-
|
|
22
|
-
require("core-js/modules/es.array.sort.js");
|
|
23
|
-
|
|
24
|
-
require("core-js/modules/es.array.find.js");
|
|
25
|
-
|
|
26
|
-
require("core-js/modules/es.array.reverse.js");
|
|
27
|
-
|
|
28
|
-
require("core-js/modules/es.array.slice.js");
|
|
29
|
-
|
|
30
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
31
|
-
|
|
32
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
33
|
-
|
|
34
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
35
|
-
|
|
36
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
37
|
-
|
|
38
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
39
|
-
|
|
40
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
41
|
-
|
|
42
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
43
|
-
|
|
44
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
45
|
-
|
|
46
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
47
|
-
|
|
48
|
-
var _hammerjs = _interopRequireDefault(require("hammerjs"));
|
|
49
|
-
|
|
50
|
-
var _DeleteDom = _interopRequireDefault(require("../Modules/DeleteDom"));
|
|
51
|
-
|
|
52
|
-
var _isNDCPointInScreen = _interopRequireDefault(require("../utils/isNDCPointInScreen"));
|
|
53
|
-
|
|
54
|
-
var _BaseController2 = _interopRequireDefault(require("./BaseController"));
|
|
55
|
-
|
|
56
|
-
var _three = require("three");
|
|
57
|
-
|
|
58
|
-
var _math = require("../utils/math");
|
|
59
|
-
|
|
60
|
-
var _findClosestPoint2 = require("../utils/findClosestPoint");
|
|
61
|
-
|
|
62
|
-
var _findAssociatedLines = require("../utils/findAssociatedLines");
|
|
63
|
-
|
|
64
|
-
var _getPointFromHammerEvent = require("../utils/getPointFromHammerEvent");
|
|
65
|
-
|
|
66
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
67
|
-
|
|
68
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
69
|
-
|
|
70
|
-
var WatchController = /*#__PURE__*/function (_BaseController) {
|
|
71
|
-
(0, _inherits2["default"])(WatchController, _BaseController);
|
|
72
|
-
|
|
73
|
-
var _super = _createSuper(WatchController);
|
|
74
|
-
|
|
75
|
-
function WatchController(params) {
|
|
76
|
-
var _this;
|
|
77
|
-
|
|
78
|
-
(0, _classCallCheck2["default"])(this, WatchController);
|
|
79
|
-
_this = _super.call(this, params);
|
|
80
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "type", 'watch');
|
|
81
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "highlightedLines", []);
|
|
82
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onPanStart", function (e) {
|
|
83
|
-
var _findClosestPoint;
|
|
84
|
-
|
|
85
|
-
if (_this.model.points.length === 0 || !_this.fiveElement) return;
|
|
86
|
-
var mouse = (0, _getPointFromHammerEvent.getPointFromHammerEvent)(e).point;
|
|
87
|
-
var closestPoint = (_findClosestPoint = (0, _findClosestPoint2.findClosestPoint)(_this.five, _this.model.points, mouse, 20)) === null || _findClosestPoint === void 0 ? void 0 : _findClosestPoint.point;
|
|
88
|
-
|
|
89
|
-
if (!closestPoint) {
|
|
90
|
-
_this.editPointState = undefined;
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
var editPointState = {
|
|
95
|
-
point: closestPoint,
|
|
96
|
-
associatedLines: (0, _findAssociatedLines.findAssociatedLines)(closestPoint.lines[0])
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
var cancelDragLine = _this.hook.emit('wantsDragLine', {
|
|
100
|
-
point: closestPoint.id,
|
|
101
|
-
lines: editPointState.associatedLines.map(function (_ref) {
|
|
102
|
-
var id = _ref.id;
|
|
103
|
-
return id;
|
|
104
|
-
})
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
if (cancelDragLine) return;
|
|
108
|
-
_this.editPointState = editPointState;
|
|
109
|
-
|
|
110
|
-
_this.magnifier.appendTo(_this.container);
|
|
111
|
-
|
|
112
|
-
_this.group.add(_this.mouseGroup);
|
|
113
|
-
});
|
|
114
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onPanEnd", function () {
|
|
115
|
-
if (!_this.editPointState) return; // 把拖动的线从虚线转换为实线
|
|
116
|
-
|
|
117
|
-
_this.editPointState.point.lines.forEach(function (line) {
|
|
118
|
-
return line.mesh.setMaterial({
|
|
119
|
-
dashed: false
|
|
120
|
-
});
|
|
121
|
-
}); // 还原选中态
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
_this.highlightLines(_this.editPointState.associatedLines);
|
|
125
|
-
|
|
126
|
-
_this.editPointState = undefined;
|
|
127
|
-
|
|
128
|
-
_this.magnifier.dispose();
|
|
129
|
-
|
|
130
|
-
_this.group.remove(_this.mouseGroup);
|
|
131
|
-
});
|
|
132
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onPan", function (e) {
|
|
133
|
-
if (!_this.editPointState || !_this.fiveElement) return;
|
|
134
|
-
var mouse = (0, _getPointFromHammerEvent.getPointFromHammerEvent)(e).ndcPoint;
|
|
135
|
-
var raycaster = new _three.Raycaster();
|
|
136
|
-
raycaster.setFromCamera(mouse, _this.five.camera);
|
|
137
|
-
|
|
138
|
-
var _this$five$model$inte = _this.five.model.intersectRaycaster(raycaster),
|
|
139
|
-
_this$five$model$inte2 = (0, _slicedToArray2["default"])(_this$five$model$inte, 1),
|
|
140
|
-
intersection = _this$five$model$inte2[0];
|
|
141
|
-
|
|
142
|
-
if (!intersection) return;
|
|
143
|
-
|
|
144
|
-
_this.onIntersectionUpdate(intersection);
|
|
145
|
-
});
|
|
146
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onIntersectionUpdate", function (intersection, mesh) {
|
|
147
|
-
if (!_this.editPointState) return; // 拖动过程中清除选中态
|
|
148
|
-
|
|
149
|
-
_this.clearHighlightLines(); // 把拖动点相关的线变成虚线 & 改变相关线的位置
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
_this.editPointState.point.position.copy(intersection.point);
|
|
153
|
-
|
|
154
|
-
_this.editPointState.point.lines.forEach(function (line) {
|
|
155
|
-
line.mesh.setPoints(line.points[0].position.clone(), line.points[1].position.clone());
|
|
156
|
-
line.lightMesh.setPoints(line.points[0].position.clone(), line.points[1].position.clone());
|
|
157
|
-
line.mesh.setMaterial({
|
|
158
|
-
dashed: true
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
_this.updateDistanceUI();
|
|
163
|
-
|
|
164
|
-
_this.magnifier.updateWithPoint(intersection.point);
|
|
165
|
-
|
|
166
|
-
_this.mouseGroup.position.copy(intersection.point);
|
|
167
|
-
|
|
168
|
-
if (mesh) {
|
|
169
|
-
_this.mouseGroup.quaternion.copy(mesh.quaternion);
|
|
170
|
-
} else if (intersection.face) {
|
|
171
|
-
var face = intersection.face.normal;
|
|
172
|
-
var positionVector = face.clone().multiplyScalar(0.05);
|
|
173
|
-
var position = intersection.point.clone().add(positionVector);
|
|
174
|
-
var lookAtVector = position.clone().add(positionVector);
|
|
175
|
-
|
|
176
|
-
_this.mouseGroup.lookAt(lookAtVector);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
_this.five.needsRender = true;
|
|
180
|
-
|
|
181
|
-
_this.hook.emit('selectedChange', _this.editPointState.associatedLines.map(function (line) {
|
|
182
|
-
return line.toCompletelyJson();
|
|
183
|
-
}));
|
|
184
|
-
});
|
|
185
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "wantsPanGesture", function () {
|
|
186
|
-
if (_this.editPointState) return false;
|
|
187
|
-
});
|
|
188
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "wantsTapGesture", function (raycaster) {
|
|
189
|
-
var _this$five$model$inte3 = _this.five.model.intersectRaycaster(raycaster),
|
|
190
|
-
_this$five$model$inte4 = (0, _slicedToArray2["default"])(_this$five$model$inte3, 1),
|
|
191
|
-
target = _this$five$model$inte4[0];
|
|
192
|
-
|
|
193
|
-
if (!target) return;
|
|
194
|
-
var camera = _this.five.camera;
|
|
195
|
-
var ndcTarget = target.point.clone().project(camera);
|
|
196
|
-
var screenWidth = _this.container.clientWidth;
|
|
197
|
-
var screenHeight = _this.container.clientHeight;
|
|
198
|
-
var targetScreenPosition = new _three.Vector2(ndcTarget.x * screenWidth, ndcTarget.y * screenHeight); // 把线的端点全部映射到屏幕上,过滤掉不在视野内的线,同时乘以屏幕宽 & 高
|
|
199
|
-
|
|
200
|
-
var screenLines = _this.model.lines.map(function (line) {
|
|
201
|
-
var _line$points = (0, _slicedToArray2["default"])(line.points, 2),
|
|
202
|
-
startPoint = _line$points[0],
|
|
203
|
-
endPoint = _line$points[1];
|
|
204
|
-
|
|
205
|
-
var ndcStartPoint = startPoint.position.clone().project(camera);
|
|
206
|
-
var ndcEndPoint = endPoint.position.clone().project(camera);
|
|
207
|
-
if (!(0, _isNDCPointInScreen["default"])(ndcStartPoint) && !(0, _isNDCPointInScreen["default"])(ndcEndPoint)) return null;
|
|
208
|
-
var startScreenPosition = new _three.Vector2(ndcStartPoint.x * screenWidth, ndcStartPoint.y * screenHeight);
|
|
209
|
-
var endScreenPosition = new _three.Vector2(ndcEndPoint.x * screenWidth, ndcEndPoint.y * screenHeight);
|
|
210
|
-
return {
|
|
211
|
-
id: line.id,
|
|
212
|
-
points: [startScreenPosition, endScreenPosition]
|
|
213
|
-
};
|
|
214
|
-
}).filter(function (line) {
|
|
215
|
-
return !!line;
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
if (screenLines.length === 0) return; // 找这些线距离鼠标点击位置最近的线
|
|
219
|
-
|
|
220
|
-
var distanceLines = screenLines.map(function (line) {
|
|
221
|
-
var closestPoint = (0, _math.closestPointOnLine)(targetScreenPosition, line.points);
|
|
222
|
-
return {
|
|
223
|
-
id: line.id,
|
|
224
|
-
distance: closestPoint.distanceTo(targetScreenPosition)
|
|
225
|
-
};
|
|
226
|
-
}).sort(function (a, b) {
|
|
227
|
-
return a.distance - b.distance;
|
|
228
|
-
});
|
|
229
|
-
var closestScreenLine = distanceLines[0];
|
|
230
|
-
if (closestScreenLine.distance > 20) return;
|
|
231
|
-
|
|
232
|
-
var closestLine = _this.model.lines.find(function (_ref2) {
|
|
233
|
-
var id = _ref2.id;
|
|
234
|
-
return id === closestScreenLine.id;
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
if (!closestLine) return;
|
|
238
|
-
|
|
239
|
-
_this.chooseLine(closestLine);
|
|
240
|
-
|
|
241
|
-
return false;
|
|
242
|
-
});
|
|
243
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "chooseLine", function (line) {
|
|
244
|
-
var highlightLines = (0, _findAssociatedLines.findAssociatedLines)(line);
|
|
245
|
-
|
|
246
|
-
_this.highlightLines(highlightLines);
|
|
247
|
-
|
|
248
|
-
_this.five.needsRender = true;
|
|
249
|
-
|
|
250
|
-
_this.hook.emit('selectedChange', highlightLines.map(function (line) {
|
|
251
|
-
return line.toCompletelyJson();
|
|
252
|
-
}));
|
|
253
|
-
});
|
|
254
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "lineRemoved", function (line) {
|
|
255
|
-
_this.removeLine(line); // TODO: 这个逻辑不太好,改进一下
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
_this.hook.emit('selectedChange', _this.model.lines.filter(function (line) {
|
|
259
|
-
return line.selected;
|
|
260
|
-
}).map(function (line) {
|
|
261
|
-
return line.toCompletelyJson();
|
|
262
|
-
}));
|
|
263
|
-
});
|
|
264
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onCameraUpdate", function () {
|
|
265
|
-
_this.updateDistanceUI();
|
|
266
|
-
|
|
267
|
-
_this.highlightedLines.length > 0 && _this.deleteDom.updatePosition();
|
|
268
|
-
});
|
|
269
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "deleteDomClickCallback", function () {
|
|
270
|
-
var firstLine = _this.highlightedLines[0]; // TODO: 优化折线的删除逻辑
|
|
271
|
-
|
|
272
|
-
firstLine.getPolyline().lines.slice().reverse().forEach(function (line) {
|
|
273
|
-
return _this.model.removeLine(line);
|
|
274
|
-
});
|
|
275
|
-
_this.highlightedLines = []; // this.clearHighlightLines()
|
|
276
|
-
// this.highlightedLines.forEach((line) => this.model.removeLine(line))
|
|
277
|
-
|
|
278
|
-
_this.deleteDom.setLines([]).hide();
|
|
279
|
-
});
|
|
280
|
-
_this.deleteDom = new _DeleteDom["default"](_this.five, {
|
|
281
|
-
onClick: _this.deleteDomClickCallback
|
|
282
|
-
}).appendTo(_this.container);
|
|
283
|
-
|
|
284
|
-
_this.model.lines.forEach(function (line) {
|
|
285
|
-
line.distanceItem.appendTo(_this.container);
|
|
286
|
-
line.distanceItem.update(_this.five);
|
|
287
|
-
line.hook.on('selected', _this.chooseLine);
|
|
288
|
-
|
|
289
|
-
_this.group.add(line.mesh);
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
var fiveElement = _this.five.getElement();
|
|
293
|
-
|
|
294
|
-
if (fiveElement) {
|
|
295
|
-
_this.fiveElement = fiveElement;
|
|
296
|
-
var hammer = new _hammerjs["default"](fiveElement);
|
|
297
|
-
_this.hammer = hammer;
|
|
298
|
-
hammer.on('pan', _this.onPan);
|
|
299
|
-
hammer.on('panstart', _this.onPanStart);
|
|
300
|
-
hammer.on('panend', _this.onPanEnd);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
_this.model.hook.on('lineRemoved', _this.lineRemoved);
|
|
304
|
-
|
|
305
|
-
_this.five.on('cameraUpdate', _this.onCameraUpdate);
|
|
306
|
-
|
|
307
|
-
_this.five.on('wantsTapGesture', _this.wantsTapGesture);
|
|
308
|
-
|
|
309
|
-
_this.five.on('wantsPanGesture', _this.wantsPanGesture);
|
|
310
|
-
|
|
311
|
-
_this.five.needsRender = true;
|
|
312
|
-
return _this;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
(0, _createClass2["default"])(WatchController, [{
|
|
316
|
-
key: "dispose",
|
|
317
|
-
value: function dispose() {
|
|
318
|
-
var _this$hammer;
|
|
319
|
-
|
|
320
|
-
(0, _get2["default"])((0, _getPrototypeOf2["default"])(WatchController.prototype), "dispose", this).call(this);
|
|
321
|
-
this.deleteDom.dispose();
|
|
322
|
-
this.model.hook.off('lineRemoved', this.lineRemoved);
|
|
323
|
-
this.five.off('cameraUpdate', this.onCameraUpdate);
|
|
324
|
-
this.five.off('wantsPanGesture', this.wantsPanGesture);
|
|
325
|
-
this.five.off('wantsTapGesture', this.wantsTapGesture);
|
|
326
|
-
this.five.needsRender = true;
|
|
327
|
-
this.hook.emit('selectedChange', []);
|
|
328
|
-
(_this$hammer = this.hammer) === null || _this$hammer === void 0 ? void 0 : _this$hammer.destroy();
|
|
329
|
-
}
|
|
330
|
-
}, {
|
|
331
|
-
key: "highlightLine",
|
|
332
|
-
value: function highlightLine(line) {
|
|
333
|
-
if (line.selected) return;
|
|
334
|
-
line.selected = true;
|
|
335
|
-
this.group.add(line.lightMesh);
|
|
336
|
-
line.distanceItem.highlight();
|
|
337
|
-
this.five.needsRender = true;
|
|
338
|
-
}
|
|
339
|
-
}, {
|
|
340
|
-
key: "clearHighlightLines",
|
|
341
|
-
value: function clearHighlightLines() {
|
|
342
|
-
var _this2 = this;
|
|
343
|
-
|
|
344
|
-
if (this.group.children.length === 0) return;
|
|
345
|
-
this.deleteDom.setLines([]).hide();
|
|
346
|
-
this.model.lines.forEach(function (line) {
|
|
347
|
-
line.selected = false;
|
|
348
|
-
line.distanceItem.unHighlight();
|
|
349
|
-
|
|
350
|
-
_this2.group.remove(line.lightMesh);
|
|
351
|
-
});
|
|
352
|
-
this.highlightedLines = [];
|
|
353
|
-
this.five.needsRender = true;
|
|
354
|
-
}
|
|
355
|
-
}, {
|
|
356
|
-
key: "highlightLines",
|
|
357
|
-
value: function highlightLines(lines) {
|
|
358
|
-
var _this3 = this;
|
|
359
|
-
|
|
360
|
-
this.clearHighlightLines();
|
|
361
|
-
this.highlightedLines = lines;
|
|
362
|
-
this.deleteDom.setLines(lines).updatePosition().show();
|
|
363
|
-
lines.forEach(function (line) {
|
|
364
|
-
return _this3.highlightLine(line);
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
}]);
|
|
368
|
-
return WatchController;
|
|
369
|
-
}(_BaseController2["default"]);
|
|
370
|
-
|
|
371
|
-
exports["default"] = WatchController;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '../typings/data';
|
|
2
|
-
import { Five, Subscribe } from '@realsee/five';
|
|
3
|
-
import { PluginEvent } from '../typings/event.type';
|
|
4
|
-
import { UserDistanceItem } from '../utils/distanceDom';
|
|
5
|
-
export declare type Mode = 'Watch' | 'Edit';
|
|
6
|
-
export interface MeasurePluginParameter {
|
|
7
|
-
useUIController?: boolean;
|
|
8
|
-
useGuideController?: boolean;
|
|
9
|
-
userDistanceItemCreator?: () => UserDistanceItem;
|
|
10
|
-
}
|
|
11
|
-
export default class MeasureController {
|
|
12
|
-
hasOpen: boolean;
|
|
13
|
-
hook: Subscribe<PluginEvent>;
|
|
14
|
-
private five;
|
|
15
|
-
private model;
|
|
16
|
-
private group;
|
|
17
|
-
private magnifier;
|
|
18
|
-
private fiveHelper;
|
|
19
|
-
private useUIController?;
|
|
20
|
-
private params;
|
|
21
|
-
private useGuideController?;
|
|
22
|
-
private container;
|
|
23
|
-
private shortcutKeyController?;
|
|
24
|
-
private controller;
|
|
25
|
-
private controllerParams;
|
|
26
|
-
constructor(five: Five, params: MeasurePluginParameter);
|
|
27
|
-
appendTo(parent: HTMLElement): void;
|
|
28
|
-
dispose(): void;
|
|
29
|
-
/** 加载数据
|
|
30
|
-
* @description 数据加载时会覆盖当前已保存的数据
|
|
31
|
-
* @description 如果当前正在编辑中,会自动退出并保存编辑
|
|
32
|
-
*/
|
|
33
|
-
load(data: PluginData): void;
|
|
34
|
-
/** 插件功能入口
|
|
35
|
-
* @description 会隐藏鼠标的默认聚焦环
|
|
36
|
-
* @description 会隐藏当前 VR 内的点位展示
|
|
37
|
-
*/
|
|
38
|
-
open(): void;
|
|
39
|
-
/** 关闭插件功能
|
|
40
|
-
* @description 清除标尺线条
|
|
41
|
-
* @description 还原点位展示和默认鼠标 UI
|
|
42
|
-
*/
|
|
43
|
-
close(): void;
|
|
44
|
-
getCurrentMode: () => Mode | null;
|
|
45
|
-
/** 变更场景
|
|
46
|
-
* @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
|
|
47
|
-
*/
|
|
48
|
-
changeMode: (mode: Mode) => void;
|
|
49
|
-
/** 撤销编辑 */
|
|
50
|
-
revoke(): void;
|
|
51
|
-
removeLineByID(lineID: string): void;
|
|
52
|
-
/**
|
|
53
|
-
* 高亮当前线段
|
|
54
|
-
*/
|
|
55
|
-
highlightLine(lineID: string): boolean;
|
|
56
|
-
clearHighlightLines(): boolean;
|
|
57
|
-
/** 保存编辑 */
|
|
58
|
-
save(): this;
|
|
59
|
-
/** 把当前以保存的数据转换成 JSON 对象 */
|
|
60
|
-
toJson(): PluginData;
|
|
61
|
-
}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.function.name.js");
|
|
13
|
-
|
|
14
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
|
|
16
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
-
|
|
18
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
|
-
|
|
20
|
-
var _Magnifier = _interopRequireDefault(require("../Modules/Magnifier"));
|
|
21
|
-
|
|
22
|
-
var _FiveHelper = _interopRequireDefault(require("../Modules/FiveHelper"));
|
|
23
|
-
|
|
24
|
-
var _EditController = _interopRequireDefault(require("./EditController"));
|
|
25
|
-
|
|
26
|
-
var _WatchController = _interopRequireDefault(require("./WatchController"));
|
|
27
|
-
|
|
28
|
-
var _three = require("three");
|
|
29
|
-
|
|
30
|
-
var _Model = require("../Model");
|
|
31
|
-
|
|
32
|
-
var _five = require("@realsee/five");
|
|
33
|
-
|
|
34
|
-
var _mouseGroup = require("../utils/mouseGroup");
|
|
35
|
-
|
|
36
|
-
var _UIController = require("../Modules/UIController");
|
|
37
|
-
|
|
38
|
-
var _GuideController = require("../Modules/GuideController");
|
|
39
|
-
|
|
40
|
-
var _ShortcutKeyController = require("./ShortcutKeyController");
|
|
41
|
-
|
|
42
|
-
var MeasureController = /*#__PURE__*/function () {
|
|
43
|
-
function MeasureController(five, params) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
|
|
46
|
-
(0, _classCallCheck2["default"])(this, MeasureController);
|
|
47
|
-
(0, _defineProperty2["default"])(this, "hasOpen", false);
|
|
48
|
-
(0, _defineProperty2["default"])(this, "hook", new _five.Subscribe());
|
|
49
|
-
(0, _defineProperty2["default"])(this, "container", document.createElement('div'));
|
|
50
|
-
(0, _defineProperty2["default"])(this, "controller", null);
|
|
51
|
-
(0, _defineProperty2["default"])(this, "getCurrentMode", function () {
|
|
52
|
-
if (_this.controller instanceof _EditController["default"]) return 'Edit';
|
|
53
|
-
if (_this.controller instanceof _WatchController["default"]) return 'Watch';
|
|
54
|
-
return null;
|
|
55
|
-
});
|
|
56
|
-
(0, _defineProperty2["default"])(this, "changeMode", function (mode) {
|
|
57
|
-
var _this$controller;
|
|
58
|
-
|
|
59
|
-
if (!_this.hasOpen) return;
|
|
60
|
-
if (_this.getCurrentMode() === mode) return;
|
|
61
|
-
(_this$controller = _this.controller) === null || _this$controller === void 0 ? void 0 : _this$controller.dispose();
|
|
62
|
-
var controllerMap = {
|
|
63
|
-
Watch: _WatchController["default"],
|
|
64
|
-
Edit: _EditController["default"]
|
|
65
|
-
};
|
|
66
|
-
if (!controllerMap[mode]) throw new Error('不存在的 Mode');
|
|
67
|
-
_this.controller = new controllerMap[mode](_this.controllerParams);
|
|
68
|
-
|
|
69
|
-
_this.hook.emit('modeChange', mode);
|
|
70
|
-
});
|
|
71
|
-
this.five = five;
|
|
72
|
-
this.params = params;
|
|
73
|
-
this.model = new _Model.Model({
|
|
74
|
-
userDistanceItemCreator: this.params.userDistanceItemCreator
|
|
75
|
-
});
|
|
76
|
-
this.fiveHelper = new _FiveHelper["default"](five); // magnifier
|
|
77
|
-
|
|
78
|
-
var magnifierSize = 190;
|
|
79
|
-
var magnifierScale = 2;
|
|
80
|
-
this.magnifier = new _Magnifier["default"](five, {
|
|
81
|
-
scale: magnifierScale,
|
|
82
|
-
width: magnifierSize,
|
|
83
|
-
height: magnifierSize
|
|
84
|
-
}); // ==================== Group ====================
|
|
85
|
-
|
|
86
|
-
this.group = new _three.Group();
|
|
87
|
-
this.group.name = 'plugin-measure-group';
|
|
88
|
-
this.container.classList.add('five-plugin-measure-container');
|
|
89
|
-
this.container.style.position = 'relative';
|
|
90
|
-
this.container.style.pointerEvents = 'none';
|
|
91
|
-
this.container.style.width = '100%';
|
|
92
|
-
this.container.style.height = '100%';
|
|
93
|
-
this.container.style.background = 'rgba(0, 0, 0, 0.15)';
|
|
94
|
-
this.controllerParams = {
|
|
95
|
-
five: this.five,
|
|
96
|
-
hook: this.hook,
|
|
97
|
-
group: this.group,
|
|
98
|
-
model: this.model,
|
|
99
|
-
magnifier: this.magnifier,
|
|
100
|
-
container: this.container,
|
|
101
|
-
fiveHelper: this.fiveHelper,
|
|
102
|
-
mouseGroup: (0, _mouseGroup.getMouseGroup)(),
|
|
103
|
-
userDistanceItemCreator: this.params.userDistanceItemCreator
|
|
104
|
-
};
|
|
105
|
-
if (this.params.useUIController !== false) this.useUIController = new _UIController.UIController(this, this.controllerParams);
|
|
106
|
-
if (this.params.useUIController !== false) this.useGuideController = new _GuideController.GuideController(this, this.controllerParams);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
(0, _createClass2["default"])(MeasureController, [{
|
|
110
|
-
key: "appendTo",
|
|
111
|
-
value: function appendTo(parent) {
|
|
112
|
-
parent.append(this.container);
|
|
113
|
-
}
|
|
114
|
-
}, {
|
|
115
|
-
key: "dispose",
|
|
116
|
-
value: function dispose() {
|
|
117
|
-
var _this$useUIController, _this$magnifier;
|
|
118
|
-
|
|
119
|
-
this.close();
|
|
120
|
-
(_this$useUIController = this.useUIController) === null || _this$useUIController === void 0 ? void 0 : _this$useUIController.dispose();
|
|
121
|
-
(_this$magnifier = this.magnifier) === null || _this$magnifier === void 0 ? void 0 : _this$magnifier.dispose();
|
|
122
|
-
this.five.needsRender = true;
|
|
123
|
-
}
|
|
124
|
-
/** 加载数据
|
|
125
|
-
* @description 数据加载时会覆盖当前已保存的数据
|
|
126
|
-
* @description 如果当前正在编辑中,会自动退出并保存编辑
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
|
-
}, {
|
|
130
|
-
key: "load",
|
|
131
|
-
value: function load(data) {
|
|
132
|
-
this.model.parse(data);
|
|
133
|
-
this.save();
|
|
134
|
-
}
|
|
135
|
-
/** 插件功能入口
|
|
136
|
-
* @description 会隐藏鼠标的默认聚焦环
|
|
137
|
-
* @description 会隐藏当前 VR 内的点位展示
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
}, {
|
|
141
|
-
key: "open",
|
|
142
|
-
value: function open() {
|
|
143
|
-
var _this$useUIController2, _this$useGuideControl;
|
|
144
|
-
|
|
145
|
-
if (this.hasOpen) return;
|
|
146
|
-
this.hasOpen = true;
|
|
147
|
-
this.five.scene.add(this.group); // 隐藏点位和鼠标聚焦环
|
|
148
|
-
|
|
149
|
-
this.five.helperVisible = false;
|
|
150
|
-
this.controller = new _WatchController["default"](this.controllerParams);
|
|
151
|
-
(_this$useUIController2 = this.useUIController) === null || _this$useUIController2 === void 0 ? void 0 : _this$useUIController2.show();
|
|
152
|
-
(_this$useGuideControl = this.useGuideController) === null || _this$useGuideControl === void 0 ? void 0 : _this$useGuideControl.show();
|
|
153
|
-
this.shortcutKeyController = new _ShortcutKeyController.ShortcutKeyController(this, this.five);
|
|
154
|
-
}
|
|
155
|
-
/** 关闭插件功能
|
|
156
|
-
* @description 清除标尺线条
|
|
157
|
-
* @description 还原点位展示和默认鼠标 UI
|
|
158
|
-
*/
|
|
159
|
-
|
|
160
|
-
}, {
|
|
161
|
-
key: "close",
|
|
162
|
-
value: function close() {
|
|
163
|
-
var _this$controller2, _this$useUIController3, _this$useGuideControl2, _this$shortcutKeyCont;
|
|
164
|
-
|
|
165
|
-
this.hasOpen = false; // 展示点位和鼠标聚焦环
|
|
166
|
-
|
|
167
|
-
(_this$controller2 = this.controller) === null || _this$controller2 === void 0 ? void 0 : _this$controller2.dispose();
|
|
168
|
-
(_this$useUIController3 = this.useUIController) === null || _this$useUIController3 === void 0 ? void 0 : _this$useUIController3.hide();
|
|
169
|
-
(_this$useGuideControl2 = this.useGuideController) === null || _this$useGuideControl2 === void 0 ? void 0 : _this$useGuideControl2.hide();
|
|
170
|
-
(_this$shortcutKeyCont = this.shortcutKeyController) === null || _this$shortcutKeyCont === void 0 ? void 0 : _this$shortcutKeyCont.dispose();
|
|
171
|
-
this.controller = null;
|
|
172
|
-
this.five.helperVisible = true;
|
|
173
|
-
this.five.scene.remove(this.group);
|
|
174
|
-
this.five.needsRender = true;
|
|
175
|
-
}
|
|
176
|
-
}, {
|
|
177
|
-
key: "revoke",
|
|
178
|
-
value:
|
|
179
|
-
/** 撤销编辑 */
|
|
180
|
-
function revoke() {
|
|
181
|
-
if (!(this.controller instanceof _EditController["default"])) return;
|
|
182
|
-
this.controller.revoke();
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
}, {
|
|
186
|
-
key: "removeLineByID",
|
|
187
|
-
value: function removeLineByID(lineID) {
|
|
188
|
-
this.model.removeLineByID(lineID);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* 高亮当前线段
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
|
-
}, {
|
|
195
|
-
key: "highlightLine",
|
|
196
|
-
value: function highlightLine(lineID) {
|
|
197
|
-
if (this.getCurrentMode() !== 'Watch') return false;
|
|
198
|
-
var line = this.model.getLineByID(lineID);
|
|
199
|
-
if (!line) return false;
|
|
200
|
-
this.controller.highlightLine(line);
|
|
201
|
-
return true;
|
|
202
|
-
}
|
|
203
|
-
}, {
|
|
204
|
-
key: "clearHighlightLines",
|
|
205
|
-
value: function clearHighlightLines() {
|
|
206
|
-
if (this.getCurrentMode() !== 'Watch') return false;
|
|
207
|
-
this.controller.clearHighlightLines();
|
|
208
|
-
return true;
|
|
209
|
-
}
|
|
210
|
-
/** 保存编辑 */
|
|
211
|
-
|
|
212
|
-
}, {
|
|
213
|
-
key: "save",
|
|
214
|
-
value: function save() {
|
|
215
|
-
if (!(this.controller instanceof _EditController["default"])) return this;
|
|
216
|
-
this.model.mergeModel(this.controller.model);
|
|
217
|
-
return this;
|
|
218
|
-
}
|
|
219
|
-
/** 把当前以保存的数据转换成 JSON 对象 */
|
|
220
|
-
|
|
221
|
-
}, {
|
|
222
|
-
key: "toJson",
|
|
223
|
-
value: function toJson() {
|
|
224
|
-
return this.model.toJson();
|
|
225
|
-
}
|
|
226
|
-
}]);
|
|
227
|
-
return MeasureController;
|
|
228
|
-
}();
|
|
229
|
-
|
|
230
|
-
exports["default"] = MeasureController;
|