@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 +0,0 @@
|
|
|
1
|
-
export declare const fragmentShader = "\nconst float PI = 3.1415926535897932384626433832795;\nuniform int enable;\nuniform sampler2D map;\nvarying vec2 vUv;\n\nuniform vec3 selectedColor;\nuniform vec3 maskColor;\nuniform float opacity;\nuniform float thickness;\n\n\n// \u5224\u65AD\u4E24\u4E2A\u989C\u8272\u662F\u5426\u76F8\u4F3C\nbool compare(vec3 c1, vec3 c2, float threshold) {\n // \u8272\u503C\u8BEF\u5DEE 0.05\n float diff = threshold;\n\n float r = abs(c1.x - c2.x);\n float g = abs(c1.y - c2.y);\n float b = abs(c1.z - c2.z);\n\n return r < diff && g < diff && b < diff;\n}\n\nvoid main(void) {\n vec3 color = texture2D(map, vUv).xyz;\n float alpha = texture2D(map, vUv).a;\n\n gl_FragColor = vec4(color, opacity);\n\n // \u5F00\u5173\n if (enable != 1) {\n gl_FragColor = vec4(color, opacity);\n return;\n }\n\n // \u9ED8\u8BA4\u503C\uFF1A\u672A\u63D0\u4F9B \u9009\u4E2D\u8272\u503C\n if (selectedColor.x == 0.0 && selectedColor.y == 0.0 && selectedColor.z == 0.0) {\n gl_FragColor = vec4(color, opacity);\n return;\n }\n\n bool similar = compare(color, selectedColor, 0.025);\n\n // \u4E0D\u76F8\u4F3C\n if (similar == false) {\n gl_FragColor = vec4(color, opacity);\n return;\n }\n\n // \u5BF9\u6BD4\u534A\u5F84\u5E45\u5EA6\n float offset1 = thickness;\n float offset2 = offset1 * sin(PI/4.0);\n\n vec3 top = texture2D(map, vec2(vUv.x, vUv.y + offset1)).xyz;\n vec3 right = texture2D(map, vec2(vUv.x + offset1, vUv.y)).xyz;\n vec3 bottom = texture2D(map, vec2(vUv.x, vUv.y - offset1)).xyz;\n vec3 left = texture2D(map, vec2(vUv.x - offset1, vUv.y)).xyz;\n \n vec3 topRight = texture2D(map, vec2(vUv.x + offset2, vUv.y + offset2)).xyz;\n vec3 rightBottom = texture2D(map, vec2(vUv.x + offset2, vUv.y - offset2)).xyz;\n vec3 bottomLeft = texture2D(map, vec2(vUv.x - offset2, vUv.y - offset2)).xyz;\n vec3 leftTop = texture2D(map, vec2(vUv.x - offset2, vUv.y + offset2)).xyz;\n\n float threshold = 0.0025;\n bool a1 = compare(color, top, threshold);\n bool b1 = compare(color, right, threshold);\n bool c1 = compare(color, bottom, threshold);\n bool d1 = compare(color, left, threshold);\n\n\n bool a2 = compare(color, topRight, threshold);\n bool b2 = compare(color, rightBottom, threshold);\n bool c2 = compare(color, bottomLeft, threshold);\n bool d2 = compare(color, leftTop, threshold);\n\n if (a1 == true && b1 == true && c1 == true && d1 == true && a2 == true && b2 == true && c2 == true && d2 == true) {\n gl_FragColor = vec4(color, opacity);\n return;\n }\n\n gl_FragColor = vec4(maskColor.x, maskColor.y, maskColor.z, 1.0);\n // gl_FragColor = vec4(154.0 / 255.0, 205.0 / 255.0, 50.0 / 255.0, 1.0) ;\n // gl_FragColor = vec4(139.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0, 1.0) ;\n // gl_FragColor = vec4(255.0 / 255.0, 235.0 / 255.0, 59.0 / 255.0, 1.0) ;\n\n}\n";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.fragmentShader = void 0;
|
|
9
|
-
var fragmentShader = "\nconst float PI = 3.1415926535897932384626433832795;\nuniform int enable;\nuniform sampler2D map;\nvarying vec2 vUv;\n\nuniform vec3 selectedColor;\nuniform vec3 maskColor;\nuniform float opacity;\nuniform float thickness;\n\n\n// \u5224\u65AD\u4E24\u4E2A\u989C\u8272\u662F\u5426\u76F8\u4F3C\nbool compare(vec3 c1, vec3 c2, float threshold) {\n // \u8272\u503C\u8BEF\u5DEE 0.05\n float diff = threshold;\n\n float r = abs(c1.x - c2.x);\n float g = abs(c1.y - c2.y);\n float b = abs(c1.z - c2.z);\n\n return r < diff && g < diff && b < diff;\n}\n\nvoid main(void) {\n vec3 color = texture2D(map, vUv).xyz;\n float alpha = texture2D(map, vUv).a;\n\n gl_FragColor = vec4(color, opacity);\n\n // \u5F00\u5173\n if (enable != 1) {\n gl_FragColor = vec4(color, opacity);\n return;\n }\n\n // \u9ED8\u8BA4\u503C\uFF1A\u672A\u63D0\u4F9B \u9009\u4E2D\u8272\u503C\n if (selectedColor.x == 0.0 && selectedColor.y == 0.0 && selectedColor.z == 0.0) {\n gl_FragColor = vec4(color, opacity);\n return;\n }\n\n bool similar = compare(color, selectedColor, 0.025);\n\n // \u4E0D\u76F8\u4F3C\n if (similar == false) {\n gl_FragColor = vec4(color, opacity);\n return;\n }\n\n // \u5BF9\u6BD4\u534A\u5F84\u5E45\u5EA6\n float offset1 = thickness;\n float offset2 = offset1 * sin(PI/4.0);\n\n vec3 top = texture2D(map, vec2(vUv.x, vUv.y + offset1)).xyz;\n vec3 right = texture2D(map, vec2(vUv.x + offset1, vUv.y)).xyz;\n vec3 bottom = texture2D(map, vec2(vUv.x, vUv.y - offset1)).xyz;\n vec3 left = texture2D(map, vec2(vUv.x - offset1, vUv.y)).xyz;\n \n vec3 topRight = texture2D(map, vec2(vUv.x + offset2, vUv.y + offset2)).xyz;\n vec3 rightBottom = texture2D(map, vec2(vUv.x + offset2, vUv.y - offset2)).xyz;\n vec3 bottomLeft = texture2D(map, vec2(vUv.x - offset2, vUv.y - offset2)).xyz;\n vec3 leftTop = texture2D(map, vec2(vUv.x - offset2, vUv.y + offset2)).xyz;\n\n float threshold = 0.0025;\n bool a1 = compare(color, top, threshold);\n bool b1 = compare(color, right, threshold);\n bool c1 = compare(color, bottom, threshold);\n bool d1 = compare(color, left, threshold);\n\n\n bool a2 = compare(color, topRight, threshold);\n bool b2 = compare(color, rightBottom, threshold);\n bool c2 = compare(color, bottomLeft, threshold);\n bool d2 = compare(color, leftTop, threshold);\n\n if (a1 == true && b1 == true && c1 == true && d1 == true && a2 == true && b2 == true && c2 == true && d2 == true) {\n gl_FragColor = vec4(color, opacity);\n return;\n }\n\n gl_FragColor = vec4(maskColor.x, maskColor.y, maskColor.z, 1.0);\n // gl_FragColor = vec4(154.0 / 255.0, 205.0 / 255.0, 50.0 / 255.0, 1.0) ;\n // gl_FragColor = vec4(139.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0, 1.0) ;\n // gl_FragColor = vec4(255.0 / 255.0, 235.0 / 255.0, 59.0 / 255.0, 1.0) ;\n\n}\n";
|
|
10
|
-
exports.fragmentShader = fragmentShader;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { FivePlugin, WorkImage } from '@realsee/five';
|
|
3
|
-
export interface PanoMaskObject {
|
|
4
|
-
color: {
|
|
5
|
-
r: number;
|
|
6
|
-
g: number;
|
|
7
|
-
b: number;
|
|
8
|
-
};
|
|
9
|
-
name?: string;
|
|
10
|
-
id: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PanoMaskSelectorPluginData {
|
|
13
|
-
panoramaImgs: Omit<WorkImage, 'depth' | 'tiles'>[];
|
|
14
|
-
colorMaps: PanoMaskObject[];
|
|
15
|
-
config?: {
|
|
16
|
-
maskColor?: THREE.Color;
|
|
17
|
-
thickness?: number;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export interface PanoMaskSelectorPluginParameterType {
|
|
21
|
-
data?: PanoMaskSelectorPluginData;
|
|
22
|
-
}
|
|
23
|
-
export interface PanoMaskSelectorPluginReturnType {
|
|
24
|
-
/**
|
|
25
|
-
* 加载数据
|
|
26
|
-
*/
|
|
27
|
-
load: (data: PanoMaskSelectorPluginData) => Promise<boolean>;
|
|
28
|
-
/**
|
|
29
|
-
* @returns 返回值为 选中的 物体信息;如果选中失败 则 返回 false。
|
|
30
|
-
*/
|
|
31
|
-
select: (x: number, y: number) => Promise<false | PanoMaskObject>;
|
|
32
|
-
/**
|
|
33
|
-
* 擦除选中物体的 Mask(不可还原)。
|
|
34
|
-
*/
|
|
35
|
-
erase: () => void;
|
|
36
|
-
/**
|
|
37
|
-
* 隐藏 选中物体的 Mask。
|
|
38
|
-
*/
|
|
39
|
-
hide: () => void;
|
|
40
|
-
/**
|
|
41
|
-
* 展示 选中物体的 Mask。
|
|
42
|
-
*/
|
|
43
|
-
show: () => void;
|
|
44
|
-
/**
|
|
45
|
-
* 销毁函数。
|
|
46
|
-
*/
|
|
47
|
-
dispose: () => void;
|
|
48
|
-
}
|
|
49
|
-
export declare const PanoMaskSelectorPlugin: FivePlugin<PanoMaskSelectorPluginParameterType, PanoMaskSelectorPluginReturnType>;
|
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.string.iterator.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.weak-map.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.object.define-property.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
12
|
-
|
|
13
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
14
|
-
|
|
15
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
16
|
-
|
|
17
|
-
Object.defineProperty(exports, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
});
|
|
20
|
-
exports.PanoMaskSelectorPlugin = void 0;
|
|
21
|
-
|
|
22
|
-
require("core-js/modules/es.array.iterator.js");
|
|
23
|
-
|
|
24
|
-
require("core-js/modules/es.array-buffer.slice.js");
|
|
25
|
-
|
|
26
|
-
require("core-js/modules/es.object.to-string.js");
|
|
27
|
-
|
|
28
|
-
require("core-js/modules/es.typed-array.uint8-array.js");
|
|
29
|
-
|
|
30
|
-
require("core-js/modules/es.typed-array.copy-within.js");
|
|
31
|
-
|
|
32
|
-
require("core-js/modules/es.typed-array.every.js");
|
|
33
|
-
|
|
34
|
-
require("core-js/modules/es.typed-array.fill.js");
|
|
35
|
-
|
|
36
|
-
require("core-js/modules/es.typed-array.filter.js");
|
|
37
|
-
|
|
38
|
-
require("core-js/modules/es.typed-array.find.js");
|
|
39
|
-
|
|
40
|
-
require("core-js/modules/es.typed-array.find-index.js");
|
|
41
|
-
|
|
42
|
-
require("core-js/modules/es.typed-array.for-each.js");
|
|
43
|
-
|
|
44
|
-
require("core-js/modules/es.typed-array.includes.js");
|
|
45
|
-
|
|
46
|
-
require("core-js/modules/es.typed-array.index-of.js");
|
|
47
|
-
|
|
48
|
-
require("core-js/modules/es.typed-array.iterator.js");
|
|
49
|
-
|
|
50
|
-
require("core-js/modules/es.typed-array.join.js");
|
|
51
|
-
|
|
52
|
-
require("core-js/modules/es.typed-array.last-index-of.js");
|
|
53
|
-
|
|
54
|
-
require("core-js/modules/es.typed-array.map.js");
|
|
55
|
-
|
|
56
|
-
require("core-js/modules/es.typed-array.reduce.js");
|
|
57
|
-
|
|
58
|
-
require("core-js/modules/es.typed-array.reduce-right.js");
|
|
59
|
-
|
|
60
|
-
require("core-js/modules/es.typed-array.reverse.js");
|
|
61
|
-
|
|
62
|
-
require("core-js/modules/es.typed-array.set.js");
|
|
63
|
-
|
|
64
|
-
require("core-js/modules/es.typed-array.slice.js");
|
|
65
|
-
|
|
66
|
-
require("core-js/modules/es.typed-array.some.js");
|
|
67
|
-
|
|
68
|
-
require("core-js/modules/es.typed-array.sort.js");
|
|
69
|
-
|
|
70
|
-
require("core-js/modules/es.typed-array.subarray.js");
|
|
71
|
-
|
|
72
|
-
require("core-js/modules/es.typed-array.to-locale-string.js");
|
|
73
|
-
|
|
74
|
-
require("core-js/modules/es.typed-array.to-string.js");
|
|
75
|
-
|
|
76
|
-
require("core-js/modules/es.array.fill.js");
|
|
77
|
-
|
|
78
|
-
require("core-js/modules/es.array.slice.js");
|
|
79
|
-
|
|
80
|
-
require("core-js/modules/es.array.find.js");
|
|
81
|
-
|
|
82
|
-
require("core-js/modules/es.array.for-each.js");
|
|
83
|
-
|
|
84
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
85
|
-
|
|
86
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
87
|
-
|
|
88
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
89
|
-
|
|
90
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
91
|
-
|
|
92
|
-
var _five = require("@realsee/five");
|
|
93
|
-
|
|
94
|
-
var _createBox = require("./createBox");
|
|
95
|
-
|
|
96
|
-
var _createTextures = require("./createTextures");
|
|
97
|
-
|
|
98
|
-
var _compare = require("./compare");
|
|
99
|
-
|
|
100
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
101
|
-
|
|
102
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
103
|
-
|
|
104
|
-
var PanoMaskSelectorPlugin = function PanoMaskSelectorPlugin(five) {
|
|
105
|
-
var parameters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
106
|
-
var state = {
|
|
107
|
-
data: parameters.data
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
var dispose = function dispose() {
|
|
111
|
-
if (state.box) {
|
|
112
|
-
five.scene.remove(state.box);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
five.off('panoArrived', wrapper);
|
|
116
|
-
five.off('modeChange', modeChangeListener);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
var wrapper = function wrapper() {
|
|
120
|
-
var _state$data$config, _state$data$config2;
|
|
121
|
-
|
|
122
|
-
if (five.panoIndex === undefined) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (five.panoIndex === state.currentLoadedIndex) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (!state.data) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (state.box) {
|
|
135
|
-
five.scene.remove(state.box);
|
|
136
|
-
state.box = undefined;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
var panoramaImgs = state.data.panoramaImgs[five.panoIndex];
|
|
140
|
-
state.currentLoadedIndex = five.panoIndex;
|
|
141
|
-
|
|
142
|
-
if (!panoramaImgs) {
|
|
143
|
-
state.textures = undefined;
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
state.textures = (0, _createTextures.createTextures)(panoramaImgs);
|
|
148
|
-
state.box = (0, _createBox.createBox)(state.textures, five.work.observers[five.panoIndex], {
|
|
149
|
-
opacity: true,
|
|
150
|
-
maskColor: ((_state$data$config = state.data.config) === null || _state$data$config === void 0 ? void 0 : _state$data$config.maskColor) || new THREE.Color(1, 0, 0),
|
|
151
|
-
thickness: ((_state$data$config2 = state.data.config) === null || _state$data$config2 === void 0 ? void 0 : _state$data$config2.thickness) || 0.005
|
|
152
|
-
});
|
|
153
|
-
five.scene.add(state.box);
|
|
154
|
-
five.needsRender = true;
|
|
155
|
-
return true;
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
var load = /*#__PURE__*/function () {
|
|
159
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) {
|
|
160
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
161
|
-
while (1) {
|
|
162
|
-
switch (_context.prev = _context.next) {
|
|
163
|
-
case 0:
|
|
164
|
-
state.data = data;
|
|
165
|
-
wrapper();
|
|
166
|
-
return _context.abrupt("return", true);
|
|
167
|
-
|
|
168
|
-
case 3:
|
|
169
|
-
case "end":
|
|
170
|
-
return _context.stop();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}, _callee);
|
|
174
|
-
}));
|
|
175
|
-
|
|
176
|
-
return function load(_x2) {
|
|
177
|
-
return _ref.apply(this, arguments);
|
|
178
|
-
};
|
|
179
|
-
}();
|
|
180
|
-
|
|
181
|
-
var select = /*#__PURE__*/function () {
|
|
182
|
-
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(_x, _y) {
|
|
183
|
-
var _state$data;
|
|
184
|
-
|
|
185
|
-
var element, pixel, x, y, renderTarget, pickingBuffer, camera, renderer, newScence, observer, newBox, unit8ArrayGroup, i, selectedColor, colorMaps, object;
|
|
186
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
187
|
-
while (1) {
|
|
188
|
-
switch (_context2.prev = _context2.next) {
|
|
189
|
-
case 0:
|
|
190
|
-
if (state.textures) {
|
|
191
|
-
_context2.next = 2;
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return _context2.abrupt("return", false);
|
|
196
|
-
|
|
197
|
-
case 2:
|
|
198
|
-
if (state.box) {
|
|
199
|
-
_context2.next = 4;
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return _context2.abrupt("return", false);
|
|
204
|
-
|
|
205
|
-
case 4:
|
|
206
|
-
if (!(five.panoIndex === undefined)) {
|
|
207
|
-
_context2.next = 6;
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
return _context2.abrupt("return", false);
|
|
212
|
-
|
|
213
|
-
case 6:
|
|
214
|
-
if (!(five.currentMode !== _five.Five.Mode.Panorama)) {
|
|
215
|
-
_context2.next = 8;
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
return _context2.abrupt("return", false);
|
|
220
|
-
|
|
221
|
-
case 8:
|
|
222
|
-
if (five.renderer) {
|
|
223
|
-
_context2.next = 10;
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return _context2.abrupt("return", false);
|
|
228
|
-
|
|
229
|
-
case 10:
|
|
230
|
-
element = five.getElement();
|
|
231
|
-
|
|
232
|
-
if (element) {
|
|
233
|
-
_context2.next = 13;
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return _context2.abrupt("return", false);
|
|
238
|
-
|
|
239
|
-
case 13:
|
|
240
|
-
pixel = 1;
|
|
241
|
-
x = _x * five.renderer.getPixelRatio();
|
|
242
|
-
y = _y * five.renderer.getPixelRatio();
|
|
243
|
-
renderTarget = new THREE.WebGLRenderTarget(pixel, pixel);
|
|
244
|
-
pickingBuffer = new Uint8Array(4 * pixel * pixel);
|
|
245
|
-
camera = five.camera.clone();
|
|
246
|
-
renderer = five.renderer;
|
|
247
|
-
newScence = new THREE.Scene();
|
|
248
|
-
observer = five.work.observers[five.panoIndex];
|
|
249
|
-
newBox = (0, _createBox.createBox)(state.textures, observer, {
|
|
250
|
-
opacity: false
|
|
251
|
-
});
|
|
252
|
-
newScence.add(newBox);
|
|
253
|
-
camera.setViewOffset(element.width, element.height, x, y, pixel, pixel);
|
|
254
|
-
renderer.setRenderTarget(renderTarget);
|
|
255
|
-
renderer.render(newScence, camera);
|
|
256
|
-
pickingBuffer.fill(0);
|
|
257
|
-
renderer.readRenderTargetPixels(renderTarget, 0, 0, pixel, pixel, pickingBuffer);
|
|
258
|
-
camera.clearViewOffset();
|
|
259
|
-
renderer.setRenderTarget(null);
|
|
260
|
-
unit8ArrayGroup = [];
|
|
261
|
-
|
|
262
|
-
for (i = 0; i < pickingBuffer.length; i += 4 * pixel) {
|
|
263
|
-
unit8ArrayGroup.push(pickingBuffer.slice(i, i + 4 * pixel));
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
selectedColor = new THREE.Color(pickingBuffer[0] / 255, pickingBuffer[1] / 255, pickingBuffer[2] / 255);
|
|
267
|
-
colorMaps = ((_state$data = state.data) === null || _state$data === void 0 ? void 0 : _state$data.colorMaps) || [];
|
|
268
|
-
object = colorMaps.find(function (item) {
|
|
269
|
-
var objectColor = new THREE.Color(item.color.r, item.color.g, item.color.b);
|
|
270
|
-
return (0, _compare.compare)(objectColor, selectedColor);
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
if (object) {
|
|
274
|
-
_context2.next = 38;
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
return _context2.abrupt("return", false);
|
|
279
|
-
|
|
280
|
-
case 38:
|
|
281
|
-
state.box.material.forEach(function (m) {
|
|
282
|
-
return m.uniforms.selectedColor.value = selectedColor;
|
|
283
|
-
});
|
|
284
|
-
five.needsRender = true;
|
|
285
|
-
return _context2.abrupt("return", object);
|
|
286
|
-
|
|
287
|
-
case 41:
|
|
288
|
-
case "end":
|
|
289
|
-
return _context2.stop();
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}, _callee2);
|
|
293
|
-
}));
|
|
294
|
-
|
|
295
|
-
return function select(_x3, _x4) {
|
|
296
|
-
return _ref2.apply(this, arguments);
|
|
297
|
-
};
|
|
298
|
-
}();
|
|
299
|
-
|
|
300
|
-
var erase = function erase() {
|
|
301
|
-
if (!state.box) return;
|
|
302
|
-
state.box.material.forEach(function (m) {
|
|
303
|
-
return m.uniforms.selectedColor.value = new THREE.Color(0.0, 0.0, 0.0);
|
|
304
|
-
});
|
|
305
|
-
five.needsRender = true;
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
var hide = function hide() {
|
|
309
|
-
var _state$box, _state$box$material;
|
|
310
|
-
|
|
311
|
-
(_state$box = state.box) === null || _state$box === void 0 ? void 0 : (_state$box$material = _state$box.material) === null || _state$box$material === void 0 ? void 0 : _state$box$material.forEach(function (material) {
|
|
312
|
-
material.visible = false;
|
|
313
|
-
});
|
|
314
|
-
five.needsRender = true;
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
var show = function show() {
|
|
318
|
-
var _state$box2, _state$box2$material;
|
|
319
|
-
|
|
320
|
-
if (five.currentMode !== _five.Five.Mode.Panorama) {
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
(_state$box2 = state.box) === null || _state$box2 === void 0 ? void 0 : (_state$box2$material = _state$box2.material) === null || _state$box2$material === void 0 ? void 0 : _state$box2$material.forEach(function (material) {
|
|
325
|
-
material.visible = true;
|
|
326
|
-
});
|
|
327
|
-
five.needsRender = true;
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
var modeChangeListener = function modeChangeListener(mode) {
|
|
331
|
-
if (mode !== _five.Five.Mode.Panorama) {
|
|
332
|
-
hide();
|
|
333
|
-
} else {
|
|
334
|
-
show();
|
|
335
|
-
}
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
five.on('panoArrived', wrapper);
|
|
339
|
-
five.on('modeChange', modeChangeListener);
|
|
340
|
-
return {
|
|
341
|
-
load: load,
|
|
342
|
-
select: select,
|
|
343
|
-
erase: erase,
|
|
344
|
-
dispose: dispose,
|
|
345
|
-
hide: hide,
|
|
346
|
-
show: show
|
|
347
|
-
};
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
exports.PanoMaskSelectorPlugin = PanoMaskSelectorPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const vertexShader = "\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n}\n\n";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.vertexShader = void 0;
|
|
9
|
-
var vertexShader = "\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n}\n\n";
|
|
10
|
-
exports.vertexShader = vertexShader;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import Line from '../Model/line';
|
|
2
|
-
import Magnifier from '../Modules/Magnifier';
|
|
3
|
-
import FiveHelper from '../Modules/FiveHelper';
|
|
4
|
-
import { Group } from 'three';
|
|
5
|
-
import { Model } from '../Model';
|
|
6
|
-
import { PluginEvent } from '../typings/event.type';
|
|
7
|
-
import { Five, Intersection, IntersectMeshInterface, Subscribe } from '@realsee/five';
|
|
8
|
-
import { UserDistanceItem } from '../utils/distanceDom';
|
|
9
|
-
export interface IControllerParams {
|
|
10
|
-
five: Five;
|
|
11
|
-
group: Group;
|
|
12
|
-
model: Model;
|
|
13
|
-
mouseGroup: Group;
|
|
14
|
-
container: Element;
|
|
15
|
-
magnifier: Magnifier;
|
|
16
|
-
fiveHelper: FiveHelper;
|
|
17
|
-
hook: Subscribe<PluginEvent>;
|
|
18
|
-
userDistanceItemCreator?: () => UserDistanceItem;
|
|
19
|
-
}
|
|
20
|
-
export default abstract class BaseController {
|
|
21
|
-
protected five: Five;
|
|
22
|
-
protected group: Group;
|
|
23
|
-
protected model: Model;
|
|
24
|
-
protected disposed: boolean;
|
|
25
|
-
protected mouseGroup: Group;
|
|
26
|
-
protected container: Element;
|
|
27
|
-
protected fiveHelper: FiveHelper;
|
|
28
|
-
protected hook: IControllerParams['hook'];
|
|
29
|
-
protected magnifier: IControllerParams['magnifier'];
|
|
30
|
-
protected userDistanceItemCreator: IControllerParams['userDistanceItemCreator'];
|
|
31
|
-
constructor(params: IControllerParams);
|
|
32
|
-
protected removeLine(line: Line): void;
|
|
33
|
-
protected updateDistanceUI: () => void;
|
|
34
|
-
protected updateMouseGroup(intersection: Intersection, mesh?: IntersectMeshInterface): Group;
|
|
35
|
-
protected dispose(): void;
|
|
36
|
-
}
|
|
@@ -1,103 +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.array.for-each.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
15
|
-
|
|
16
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
17
|
-
|
|
18
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
19
|
-
|
|
20
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
-
|
|
22
|
-
var _ironbox = require("../utils/ironbox");
|
|
23
|
-
|
|
24
|
-
var BaseController = /*#__PURE__*/function () {
|
|
25
|
-
function BaseController(params) {
|
|
26
|
-
var _this = this;
|
|
27
|
-
|
|
28
|
-
(0, _classCallCheck2["default"])(this, BaseController);
|
|
29
|
-
(0, _defineProperty2["default"])(this, "disposed", false);
|
|
30
|
-
(0, _defineProperty2["default"])(this, "updateDistanceUI", function () {
|
|
31
|
-
_this.model.lines.forEach(function (line) {
|
|
32
|
-
return line.distanceItem.update(_this.five);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
// ==================== Params ====================
|
|
36
|
-
this.five = params.five;
|
|
37
|
-
this.hook = params.hook;
|
|
38
|
-
this.model = params.model;
|
|
39
|
-
this.magnifier = params.magnifier;
|
|
40
|
-
this.container = params.container;
|
|
41
|
-
this.fiveHelper = params.fiveHelper;
|
|
42
|
-
this.userDistanceItemCreator = params.userDistanceItemCreator; // ==================== Groups ====================
|
|
43
|
-
|
|
44
|
-
this.group = params.group;
|
|
45
|
-
this.mouseGroup = params.mouseGroup;
|
|
46
|
-
var fiveElement = this.five.getElement();
|
|
47
|
-
|
|
48
|
-
if (fiveElement) {
|
|
49
|
-
fiveElement.addEventListener('touchstart', _ironbox.preventDefault);
|
|
50
|
-
fiveElement.addEventListener('contextmenu', _ironbox.preventDefault);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
(0, _createClass2["default"])(BaseController, [{
|
|
55
|
-
key: "removeLine",
|
|
56
|
-
value: function removeLine(line) {
|
|
57
|
-
this.group.remove(line.mesh, line.lightMesh);
|
|
58
|
-
line.distanceItem.remove();
|
|
59
|
-
this.five.needsRender = true;
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
|
-
key: "updateMouseGroup",
|
|
63
|
-
value: function updateMouseGroup(intersection, mesh) {
|
|
64
|
-
if (!intersection) return this.mouseGroup; // ============ update mouseGroup position ============
|
|
65
|
-
|
|
66
|
-
var adsorbentPoint = this.fiveHelper.getAdsorbentPoint(intersection);
|
|
67
|
-
var viewPosition = adsorbentPoint ? adsorbentPoint : intersection.point;
|
|
68
|
-
this.mouseGroup.position.copy(viewPosition); // ============ update mouseGroup quaternion ============
|
|
69
|
-
|
|
70
|
-
if (mesh) {
|
|
71
|
-
this.mouseGroup.quaternion.copy(mesh.quaternion);
|
|
72
|
-
} else if (intersection.face) {
|
|
73
|
-
var normal = intersection.face.normal;
|
|
74
|
-
var positionVector = normal.clone().multiplyScalar(0.05);
|
|
75
|
-
var position = intersection.point.clone().add(positionVector);
|
|
76
|
-
var lookAtVector = position.clone().add(positionVector);
|
|
77
|
-
this.mouseGroup.lookAt(lookAtVector);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return this.mouseGroup;
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
key: "dispose",
|
|
84
|
-
value: function dispose() {
|
|
85
|
-
var _this2 = this;
|
|
86
|
-
|
|
87
|
-
this.disposed = true;
|
|
88
|
-
this.magnifier.dispose();
|
|
89
|
-
this.model.lines.forEach(function (line) {
|
|
90
|
-
return _this2.removeLine(line);
|
|
91
|
-
});
|
|
92
|
-
var fiveElement = this.five.getElement();
|
|
93
|
-
|
|
94
|
-
if (fiveElement) {
|
|
95
|
-
fiveElement.removeEventListener('touchstart', _ironbox.preventDefault);
|
|
96
|
-
fiveElement.removeEventListener('contextmenu', _ironbox.preventDefault);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}]);
|
|
100
|
-
return BaseController;
|
|
101
|
-
}();
|
|
102
|
-
|
|
103
|
-
exports["default"] = BaseController;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Model } from '../Model';
|
|
2
|
-
import Line from '../Model/line';
|
|
3
|
-
import { LineJson } from '../typings/data';
|
|
4
|
-
import BaseController, { IControllerParams } from './BaseController';
|
|
5
|
-
export interface EditEvent {
|
|
6
|
-
editedLineChange: (lines: LineJson[]) => void;
|
|
7
|
-
}
|
|
8
|
-
export default class EditController extends BaseController {
|
|
9
|
-
type: string;
|
|
10
|
-
model: Model;
|
|
11
|
-
private pressPoint?;
|
|
12
|
-
private hasAppendDashed;
|
|
13
|
-
private hasAppendMouseGroup;
|
|
14
|
-
private fiveElement?;
|
|
15
|
-
/** 上一个端点位置 */
|
|
16
|
-
private lastPoint;
|
|
17
|
-
/** 鼠标点到上一个端点连接的虚线 */
|
|
18
|
-
private dashed;
|
|
19
|
-
private hammer?;
|
|
20
|
-
/** 根据 intersection 更新放大镜和吸附点 */
|
|
21
|
-
private onIntersectionUpdate;
|
|
22
|
-
constructor(params: IControllerParams);
|
|
23
|
-
dispose(): void;
|
|
24
|
-
getEditingLines(): Line[];
|
|
25
|
-
/** 撤销编辑 */
|
|
26
|
-
revoke: () => void;
|
|
27
|
-
private onMouseLeave;
|
|
28
|
-
/** 编辑线条发生改变时通知外部 */
|
|
29
|
-
private onLineChanged;
|
|
30
|
-
private onPress;
|
|
31
|
-
/**
|
|
32
|
-
* 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
|
|
33
|
-
* 2. 如果有长按点,把长按点位置更新为当前位置
|
|
34
|
-
*/
|
|
35
|
-
private onPan;
|
|
36
|
-
private onPanEnd;
|
|
37
|
-
/**
|
|
38
|
-
* 1. 如果存在上一个点,需要绘制当前点到上一个点的连线
|
|
39
|
-
* 2. 把上一个点的位置更新为当前点的位置
|
|
40
|
-
* 3. 清除 mouseGroup 和 magnifier
|
|
41
|
-
*/
|
|
42
|
-
private onTap;
|
|
43
|
-
private onWantsTapGesture;
|
|
44
|
-
/** 编辑时取消走点 */
|
|
45
|
-
private onWantsToMoveToPano;
|
|
46
|
-
/** 存在长按点时不能移动全景 */
|
|
47
|
-
private onWantsPanGesture;
|
|
48
|
-
/** 移动全景时更新 distanceItem 在屏幕上的位置 */
|
|
49
|
-
private onCameraUpdate;
|
|
50
|
-
/** 更新虚线 */
|
|
51
|
-
private updateDashed;
|
|
52
|
-
}
|