@realsee/dnalogel 0.1.7 → 2.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -89
- package/dist/dnalogel.cjs.js +2 -0
- package/dist/dnalogel.es.js +37288 -0
- package/dist/dnalogel.umd.js +2 -0
- package/dist/style.css +1 -0
- package/{plugins → libs}/CSS3DRenderPlugin/index.d.ts +1 -1
- package/libs/CSS3DRenderPlugin/index.js +181 -0
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +18 -0
- package/{plugins → libs}/CameraMovementPlugin/index.d.ts +0 -0
- package/libs/CameraMovementPlugin/index.js +159 -0
- package/{plugins → libs}/CameraMovementPlugin/typing.d.ts +0 -0
- package/libs/CameraMovementPlugin/typing.js +17 -0
- package/{plugins → libs}/ModelChassisCompassPlugin/index.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +75 -0
- package/{plugins → libs}/ModelEntryDoorGuidePlugin/index.d.ts +6 -2
- package/libs/ModelEntryDoorGuidePlugin/index.js +136 -0
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -0
- package/{plugins → libs}/ModelRoomLabelPlugin/Controller.d.ts +3 -2
- package/libs/ModelRoomLabelPlugin/Controller.js +100 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +63 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +1 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +80 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +1 -0
- package/libs/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/libs/ModelRoomLabelPlugin/index.js +9 -0
- package/{plugins → libs}/ModelRoomLabelPlugin/typings.d.ts +2 -2
- package/libs/ModelRoomLabelPlugin/typings.js +1 -0
- package/{plugins → libs}/ModelRoomLabelPlugin/utils/parseData.d.ts +0 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.js +14 -0
- package/{plugins → libs}/ModelViewPlugin/index.d.ts +0 -0
- package/libs/ModelViewPlugin/index.js +160 -0
- package/libs/PanoCompassPlugin/index.d.ts +25 -0
- package/libs/PanoCompassPlugin/index.js +89 -0
- package/{plugins → libs}/PanoCursorRaycasterPlugin/index.d.ts +2 -3
- package/libs/PanoCursorRaycasterPlugin/index.js +74 -0
- package/libs/floorplan/Assets/camera.d.ts +1 -0
- package/libs/floorplan/Assets/camera.js +1 -0
- package/libs/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/libs/floorplan/Assets/floorplanExtraObject.js +1 -0
- package/libs/floorplan/Components/BaseImage.svelte +25 -0
- package/libs/floorplan/Components/BaseImage.svelte.map +1 -0
- package/libs/floorplan/Components/Normalmage.svelte +11 -0
- package/libs/floorplan/Components/Normalmage.svelte.map +1 -0
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +21 -0
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +1 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +60 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +35 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +7 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +16 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +17 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +1 -0
- package/libs/floorplan/Components/SvgImage.svelte +25 -0
- package/libs/floorplan/Components/SvgImage.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +46 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +48 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +37 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +50 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +41 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +25 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +148 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +15 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +1 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -14
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +357 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -0
- package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.js +1 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/utils/constant.js +16 -0
- package/{plugins → libs}/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +0 -0
- package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +46 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +84 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +18 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +40 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +61 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +1 -0
- package/{plugins → libs}/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +6 -11
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +88 -0
- package/{plugins → libs}/floorplan/PanoFloorplanRadarPlugin/index.d.ts +0 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -0
- package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/Controller.d.ts +15 -11
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +189 -0
- package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/index.d.ts +0 -0
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -0
- package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/style.d.ts +0 -0
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +8 -0
- package/{plugins → libs}/floorplan/typings/floorplanData.d.ts +6 -0
- package/libs/floorplan/typings/floorplanData.js +6 -0
- package/{plugins → libs}/floorplan/typings/floorplanServerData.d.ts +4 -2
- package/libs/floorplan/typings/floorplanServerData.js +101 -0
- package/libs/floorplan/typings/utility.d.ts +2 -0
- package/libs/floorplan/typings/utility.js +1 -0
- package/{plugins → libs}/floorplan/utils/formatData.d.ts +3 -3
- package/libs/floorplan/utils/formatData.js +94 -0
- package/{plugins → libs}/floorplan/utils/formatPosition.d.ts +3 -4
- package/libs/floorplan/utils/formatPosition.js +50 -0
- package/libs/index.d.ts +19 -0
- package/libs/index.js +11 -0
- package/{shared-utils → libs/shared-utils}/Preloader.d.ts +0 -0
- package/libs/shared-utils/Preloader.js +38 -0
- package/{shared-utils → libs/shared-utils}/Subscribe.d.ts +3 -3
- package/libs/shared-utils/Subscribe.js +101 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/BetterTween.d.ts +0 -0
- package/libs/shared-utils/animationFrame/BetterTween.js +30 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/calculateProgress.d.ts +0 -0
- package/libs/shared-utils/animationFrame/calculateProgress.js +23 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/formatRad.d.ts +0 -0
- package/libs/shared-utils/animationFrame/formatRad.js +20 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/index.d.ts +0 -0
- package/libs/shared-utils/animationFrame/index.js +48 -0
- package/{shared-utils → libs/shared-utils}/animationFrame/tween.d.ts +0 -0
- package/libs/shared-utils/animationFrame/tween.js +44 -0
- package/libs/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/libs/shared-utils/changeModelCanvasOpacity.js +15 -0
- package/{shared-utils → libs/shared-utils}/createCanvasTextTexture.d.ts +0 -0
- package/libs/shared-utils/createCanvasTextTexture.js +19 -0
- package/{shared-utils → libs/shared-utils}/createLine/index.d.ts +1 -1
- package/libs/shared-utils/createLine/index.js +8 -0
- package/{shared-utils → libs/shared-utils}/debounce.d.ts +1 -1
- package/libs/shared-utils/debounce.js +14 -0
- package/{shared-utils → libs/shared-utils}/equal.d.ts +0 -0
- package/libs/shared-utils/equal.js +84 -0
- package/{shared-utils → libs/shared-utils}/filter.d.ts +0 -0
- package/libs/shared-utils/filter.js +53 -0
- package/{shared-utils → libs/shared-utils}/five/changeMode.d.ts +0 -0
- package/libs/shared-utils/five/changeMode.js +15 -0
- package/{shared-utils → libs/shared-utils}/five/useFivePlugin.d.ts +0 -0
- package/libs/shared-utils/five/useFivePlugin.js +8 -0
- package/{shared-utils → libs/shared-utils}/formatRad.d.ts +0 -0
- package/libs/shared-utils/formatRad.js +10 -0
- package/{shared-utils → libs/shared-utils}/getPxmm.d.ts +0 -0
- package/libs/shared-utils/getPxmm.js +20 -0
- package/{shared-utils → libs/shared-utils}/getRandomColor.d.ts +0 -0
- package/libs/shared-utils/getRandomColor.js +10 -0
- package/{shared-utils → libs/shared-utils}/isNil.d.ts +0 -0
- package/libs/shared-utils/isNil.js +14 -0
- package/{shared-utils → libs/shared-utils}/isTruelyObject.d.ts +0 -0
- package/libs/shared-utils/isTruelyObject.js +20 -0
- package/libs/shared-utils/math/evenNumber.d.ts +3 -0
- package/libs/shared-utils/math/evenNumber.js +4 -0
- package/{shared-utils → libs/shared-utils}/math/planimetry.d.ts +4 -4
- package/libs/shared-utils/math/planimetry.js +288 -0
- package/{shared-utils → libs/shared-utils}/math/rad2Deg.d.ts +0 -0
- package/libs/shared-utils/math/rad2Deg.js +3 -0
- package/{shared-utils → libs/shared-utils}/nearlyEqual.d.ts +0 -0
- package/libs/shared-utils/nearlyEqual.js +9 -0
- package/{shared-utils → libs/shared-utils}/nextFrame.d.ts +0 -0
- package/libs/shared-utils/nextFrame.js +6 -0
- package/{shared-utils → libs/shared-utils}/noop.d.ts +0 -0
- package/libs/shared-utils/noop.js +7 -0
- package/{shared-utils → libs/shared-utils}/object3d2LocalMatrix.d.ts +0 -0
- package/libs/shared-utils/object3d2LocalMatrix.js +29 -0
- package/{shared-utils → libs/shared-utils}/px2rem.d.ts +0 -0
- package/libs/shared-utils/px2rem.js +4 -0
- package/libs/shared-utils/removeArrayItem.d.ts +7 -0
- package/libs/shared-utils/removeArrayItem.js +12 -0
- package/{shared-utils → libs/shared-utils}/tap.d.ts +0 -0
- package/{shared-utils → libs/shared-utils}/tap.js +4 -13
- package/{shared-utils → libs/shared-utils}/three/centerPoint.d.ts +0 -0
- package/libs/shared-utils/three/centerPoint.js +4 -0
- package/{shared-utils → libs/shared-utils}/three/getExtraModelLoader.d.ts +0 -0
- package/libs/shared-utils/three/getExtraModelLoader.js +18 -0
- package/{shared-utils → libs/shared-utils}/three/getNormal.d.ts +0 -0
- package/libs/shared-utils/three/getNormal.js +6 -0
- package/{shared-utils → libs/shared-utils}/three/getTextureLoader.d.ts +0 -0
- package/libs/shared-utils/three/getTextureLoader.js +17 -0
- package/{shared-utils → libs/shared-utils}/three/loadFbxObj.d.ts +0 -0
- package/libs/shared-utils/three/loadFbxObj.js +13 -0
- package/libs/shared-utils/three/loadTexture.d.ts +2 -0
- package/libs/shared-utils/three/loadTexture.js +10 -0
- package/{shared-utils → libs/shared-utils}/three/transformPositionToVector3.d.ts +0 -0
- package/libs/shared-utils/three/transformPositionToVector3.js +3 -0
- package/{shared-utils → libs/shared-utils}/three/transfromToMeshBasicMaterial.d.ts +0 -0
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +14 -0
- package/{shared-utils → libs/shared-utils}/throttle.d.ts +1 -1
- package/libs/shared-utils/throttle.js +18 -0
- package/{shared-utils → libs/shared-utils}/to.d.ts +0 -0
- package/libs/shared-utils/to.js +18 -0
- package/{shared-utils → libs/shared-utils}/useDebounce.d.ts +0 -0
- package/libs/shared-utils/useDebounce.js +22 -0
- package/{shared-utils → libs/shared-utils}/useThrottle.d.ts +0 -0
- package/libs/shared-utils/useThrottle.js +25 -0
- package/libs/{gltf-viewer → shared-utils}/uuid.d.ts +0 -0
- package/libs/shared-utils/uuid.js +11 -0
- package/{shared-utils → libs/shared-utils}/vectorTocoordinates.d.ts +0 -0
- package/libs/shared-utils/vectorTocoordinates.js +9 -0
- package/{typings → libs/typings}/math.type.d.ts +0 -0
- package/libs/typings/math.type.js +1 -0
- package/{typings → libs/typings}/utils.type.d.ts +0 -0
- package/libs/typings/utils.type.js +1 -0
- package/package.json +45 -17
- package/TERMS.txt +0 -56
- package/components/ARVideoFigure/ARVideoFigureMesh.d.ts +0 -44
- package/components/ARVideoFigure/ARVideoFigureMesh.js +0 -371
- package/components/ARVideoFigure/ARVideoFigureScene.d.ts +0 -11
- package/components/ARVideoFigure/ARVideoFigureScene.js +0 -85
- package/components/ARVideoFigure/ImgBgTransparent.d.ts +0 -16
- package/components/ARVideoFigure/ImgBgTransparent.js +0 -65
- package/components/ARVideoFigure/ImgBgTransparentMesh.d.ts +0 -30
- package/components/ARVideoFigure/ImgBgTransparentMesh.js +0 -183
- package/components/ARVideoFigure/fragmentShader.d.ts +0 -5
- package/components/ARVideoFigure/fragmentShader.js +0 -18
- package/components/ARVideoFigure/index.d.ts +0 -15
- package/components/ARVideoFigure/index.js +0 -80
- package/components/ARVideoFigure/vertexShader.d.ts +0 -1
- package/components/ARVideoFigure/vertexShader.js +0 -10
- package/components/GLTFView/index.d.ts +0 -72
- package/components/GLTFView/index.js +0 -149
- package/components/GlassFilters/index.d.ts +0 -32
- package/components/GlassFilters/index.js +0 -78
- package/components/ModelView/ModelViewController.d.ts +0 -18
- package/components/ModelView/ModelViewController.js +0 -157
- package/components/ModelView/index.d.ts +0 -10
- package/components/ModelView/index.js +0 -24
- package/components/PaintBrush/index.d.ts +0 -16
- package/components/PaintBrush/index.js +0 -47
- package/components/PanoTag/index.d.ts +0 -4
- package/components/PanoTag/index.js +0 -13
- package/custom.d.js +0 -3
- package/data/1aGKl9JmrlXMXx8d.d.ts +0 -104
- package/data/1aGKl9JmrlXMXx8d.js +0 -537
- package/data/54djM0oR6ky3Ey8e.d.ts +0 -55
- package/data/54djM0oR6ky3Ey8e.js +0 -350
- package/data/6gyq3v1verxD7JO1.d.ts +0 -104
- package/data/6gyq3v1verxD7JO1.js +0 -462
- package/data/8054djM0oR6ky3Ey8e.d.ts +0 -55
- package/data/8054djM0oR6ky3Ey8e.js +0 -350
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.d.ts +0 -84
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +0 -600
- package/data/PrXel3aqGbp34JQn.d.ts +0 -389
- package/data/PrXel3aqGbp34JQn.js +0 -4649
- package/data/XJ6NMLWnkAY3Rdx8.d.ts +0 -843
- package/data/XJ6NMLWnkAY3Rdx8.js +0 -7989
- package/data/YdoNP9K4rwQDwjJr.d.ts +0 -83
- package/data/YdoNP9K4rwQDwjJr.js +0 -1453
- package/data/ZLvK29zj4L29Jowd.d.ts +0 -55
- package/data/ZLvK29zj4L29Jowd.js +0 -372
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.d.ts +0 -86
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +0 -711
- package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +0 -5
- package/data/extrude-walls/ZLvK29zj4L29Jowd.js +0 -14
- package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +0 -5
- package/data/extrude-walls/lo024DEgzanMj5BE.js +0 -14
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +0 -85
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +0 -511
- package/data/lo024DEgzanMj5BE.d.ts +0 -55
- package/data/lo024DEgzanMj5BE.js +0 -966
- package/data/oPzy3ApbjjpD8YdR.d.ts +0 -83
- package/data/oPzy3ApbjjpD8YdR.js +0 -283
- package/data/qjAxMG4XbPn96wKG.d.ts +0 -104
- package/data/qjAxMG4XbPn96wKG.js +0 -637
- package/data/rXel3aPQRRBD4JQn.d.ts +0 -86
- package/data/rXel3aPQRRBD4JQn.js +0 -622
- package/data/vLykj3NWrllMrG06.d.ts +0 -91
- package/data/vLykj3NWrllMrG06.js +0 -2729
- package/data/wz0QV9KA4ugyo9ME.d.ts +0 -39
- package/data/wz0QV9KA4ugyo9ME.js +0 -136
- package/data/zxMawr9raSg8LYjG.d.ts +0 -53
- package/data/zxMawr9raSg8LYjG.js +0 -590
- package/examples/FiveStateController/index.js +0 -134
- package/examples/VRHouse/Mobile.js +0 -36
- package/examples/VRHouse/PC.js +0 -36
- package/examples/VRHouse/index.js +0 -36
- package/index.d.ts +0 -15
- package/index.js +0 -45
- package/libs/gltf-viewer/Subscribe.d.ts +0 -76
- package/libs/gltf-viewer/Subscribe.js +0 -231
- package/libs/gltf-viewer/coordsMoveByOffset.d.ts +0 -13
- package/libs/gltf-viewer/coordsMoveByOffset.js +0 -22
- package/libs/gltf-viewer/coordsToDirection.d.ts +0 -5
- package/libs/gltf-viewer/coordsToDirection.js +0 -41
- package/libs/gltf-viewer/formatRad.d.ts +0 -1
- package/libs/gltf-viewer/formatRad.js +0 -13
- package/libs/gltf-viewer/getFrameTime.d.ts +0 -1
- package/libs/gltf-viewer/getFrameTime.js +0 -28
- package/libs/gltf-viewer/index.d.ts +0 -55
- package/libs/gltf-viewer/index.js +0 -650
- package/libs/gltf-viewer/mouseWheel.d.ts +0 -2
- package/libs/gltf-viewer/mouseWheel.js +0 -59
- package/libs/gltf-viewer/requestAnimationFrame.d.ts +0 -1
- package/libs/gltf-viewer/requestAnimationFrame.js +0 -18
- package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +0 -1
- package/libs/gltf-viewer/requestAnimationFrameInterval.js +0 -31
- package/libs/gltf-viewer/uuid.js +0 -28
- package/plugins/AutoPreloadPlugin/index.d.ts +0 -23
- package/plugins/AutoPreloadPlugin/index.js +0 -111
- package/plugins/CSS3DRenderPlugin/components/Marker/index.d.ts +0 -12
- package/plugins/CSS3DRenderPlugin/components/Marker/index.js +0 -121
- package/plugins/CSS3DRenderPlugin/index.js +0 -298
- package/plugins/CameraMovementPlugin/index.js +0 -362
- package/plugins/CameraMovementPlugin/typing.js +0 -37
- package/plugins/ModelChassisCompassPlugin/index.js +0 -157
- package/plugins/ModelEntryDoorGuidePlugin/index.js +0 -247
- package/plugins/ModelExtrudeWallsPlugin/index.d.ts +0 -16
- package/plugins/ModelExtrudeWallsPlugin/index.js +0 -252
- package/plugins/ModelRoomLabelPlugin/Controller.js +0 -153
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +0 -8
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +0 -66
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +0 -7
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +0 -159
- package/plugins/ModelRoomLabelPlugin/index.d.ts +0 -8
- package/plugins/ModelRoomLabelPlugin/index.js +0 -18
- package/plugins/ModelRoomLabelPlugin/typings.js +0 -7
- package/plugins/ModelRoomLabelPlugin/utils/parseData.js +0 -35
- package/plugins/ModelTVVideoPlugin/index.d.ts +0 -21
- package/plugins/ModelTVVideoPlugin/index.js +0 -397
- package/plugins/ModelViewPlugin/index.js +0 -223
- package/plugins/PanoCursorRaycasterPlugin/PanoCursorRaycasterPluginUsage.d.ts +0 -48
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.d.ts +0 -9
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +0 -117
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.d.ts +0 -11
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +0 -39
- package/plugins/PanoCursorRaycasterPlugin/index.js +0 -126
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.d.ts +0 -5
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +0 -27
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.d.ts +0 -3
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +0 -48
- package/plugins/PanoDoorLabelPlugin/index.d.ts +0 -4
- package/plugins/PanoDoorLabelPlugin/index.js +0 -14
- package/plugins/PanoIRobotPlugin/index.d.ts +0 -10
- package/plugins/PanoIRobotPlugin/index.js +0 -18
- package/plugins/PanoMaskSelectorPlugin/compare.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/compare.js +0 -17
- package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +0 -7
- package/plugins/PanoMaskSelectorPlugin/createBox.js +0 -79
- package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +0 -3
- package/plugins/PanoMaskSelectorPlugin/createTextures.js +0 -45
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +0 -10
- package/plugins/PanoMaskSelectorPlugin/index.d.ts +0 -49
- package/plugins/PanoMaskSelectorPlugin/index.js +0 -348
- package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +0 -1
- package/plugins/PanoMaskSelectorPlugin/vertexShader.js +0 -10
- package/plugins/PanoRulerPlugin/data/roomInfo.d.ts +0 -3
- package/plugins/PanoRulerPlugin/data/roomInfo.js +0 -51
- package/plugins/PanoRulerPlugin/data/roomRules.d.ts +0 -3
- package/plugins/PanoRulerPlugin/data/roomRules.js +0 -235
- package/plugins/PanoRulerPlugin/index.d.ts +0 -27
- package/plugins/PanoRulerPlugin/index.js +0 -637
- package/plugins/PanoRulerPlugin/typings.d.ts +0 -21
- package/plugins/PanoRulerPlugin/typings.js +0 -7
- package/plugins/PanoTVVideoPlugin/index.d.ts +0 -26
- package/plugins/PanoTVVideoPlugin/index.js +0 -433
- package/plugins/TreasurePlugin/Controller.d.ts +0 -73
- package/plugins/TreasurePlugin/Controller.js +0 -250
- package/plugins/TreasurePlugin/TreasureFaceAnime.d.ts +0 -25
- package/plugins/TreasurePlugin/TreasureFaceAnime.js +0 -143
- package/plugins/TreasurePlugin/TreasureObject.d.ts +0 -53
- package/plugins/TreasurePlugin/TreasureObject.js +0 -406
- package/plugins/TreasurePlugin/TreasureOpenAnime.d.ts +0 -25
- package/plugins/TreasurePlugin/TreasureOpenAnime.js +0 -127
- package/plugins/TreasurePlugin/constants.d.ts +0 -33
- package/plugins/TreasurePlugin/constants.js +0 -67
- package/plugins/TreasurePlugin/index.d.ts +0 -11
- package/plugins/TreasurePlugin/index.js +0 -26
- package/plugins/TreasurePlugin/typings.d.ts +0 -2
- package/plugins/TreasurePlugin/typings.js +0 -7
- package/plugins/floorplan/Assets/floorplanExtraObject.d.ts +0 -1
- package/plugins/floorplan/Assets/floorplanExtraObject.js +0 -10
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +0 -626
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +0 -78
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.d.ts +0 -5
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +0 -84
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.d.ts +0 -10
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +0 -129
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +0 -118
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +0 -13
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +0 -62
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +0 -20
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +0 -88
- package/plugins/floorplan/ModelFloorplanPlugin/controller.style.d.ts +0 -1
- package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +0 -16
- package/plugins/floorplan/ModelFloorplanPlugin/index.js +0 -20
- package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +0 -7
- package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +0 -33
- package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +0 -154
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.d.ts +0 -13
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +0 -113
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.d.ts +0 -3
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +0 -39
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.d.ts +0 -5
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +0 -66
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.d.ts +0 -9
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +0 -126
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.d.ts +0 -11
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +0 -58
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.d.ts +0 -17
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +0 -85
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.d.ts +0 -2
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +0 -15
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +0 -211
- package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +0 -20
- package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +0 -262
- package/plugins/floorplan/TopviewFloorplanPlugin/index.js +0 -18
- package/plugins/floorplan/TopviewFloorplanPlugin/style.js +0 -16
- package/plugins/floorplan/components/FloorplanImage.d.ts +0 -7
- package/plugins/floorplan/components/FloorplanImage.js +0 -90
- package/plugins/floorplan/typings/floorplanData.js +0 -7
- package/plugins/floorplan/typings/floorplanServerData.js +0 -382
- package/plugins/floorplan/utils/formatData.js +0 -217
- package/plugins/floorplan/utils/formatPosition.js +0 -89
- package/shared-utils/Preloader.js +0 -57
- package/shared-utils/Subscribe.js +0 -230
- package/shared-utils/animationFrame/BetterTween.js +0 -103
- package/shared-utils/animationFrame/calculateProgress.js +0 -40
- package/shared-utils/animationFrame/formatRad.js +0 -36
- package/shared-utils/animationFrame/index.js +0 -81
- package/shared-utils/animationFrame/tween.js +0 -92
- package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
- package/shared-utils/changeModelCanvansOpacity.js +0 -38
- package/shared-utils/createCanvasTextTexture.js +0 -31
- package/shared-utils/createFiveContainer.d.ts +0 -10
- package/shared-utils/createFiveContainer.js +0 -171
- package/shared-utils/createLine/index.js +0 -43
- package/shared-utils/debounce.js +0 -30
- package/shared-utils/equal.js +0 -107
- package/shared-utils/filter.js +0 -127
- package/shared-utils/five/changeMode.js +0 -82
- package/shared-utils/five/useFivePlugin.js +0 -17
- package/shared-utils/formatRad.js +0 -18
- package/shared-utils/getPxmm.js +0 -51
- package/shared-utils/getRandomColor.js +0 -23
- package/shared-utils/isNil.js +0 -26
- package/shared-utils/isTruelyObject.js +0 -31
- package/shared-utils/math/evenNumber.d.ts +0 -1
- package/shared-utils/math/evenNumber.js +0 -13
- package/shared-utils/math/planimetry.js +0 -352
- package/shared-utils/math/rad2Deg.js +0 -12
- package/shared-utils/nearlyEqual.js +0 -19
- package/shared-utils/nextFrame.js +0 -15
- package/shared-utils/noop.js +0 -19
- package/shared-utils/object3d2LocalMatrix.js +0 -79
- package/shared-utils/px2rem.js +0 -22
- package/shared-utils/three/centerPoint.js +0 -14
- package/shared-utils/three/getExtraModelLoader.js +0 -45
- package/shared-utils/three/getNormal.js +0 -17
- package/shared-utils/three/getTextureLoader.js +0 -50
- package/shared-utils/three/loadFbxObj.js +0 -54
- package/shared-utils/three/loadTexture.d.ts +0 -2
- package/shared-utils/three/loadTexture.js +0 -46
- package/shared-utils/three/transformPositionToVector3.js +0 -20
- package/shared-utils/three/transfromToMeshBasicMaterial.js +0 -33
- package/shared-utils/throttle.js +0 -29
- package/shared-utils/to.js +0 -67
- package/shared-utils/useDebounce.js +0 -49
- package/shared-utils/useThrottle.js +0 -47
- package/shared-utils/uuid.d.ts +0 -4
- package/shared-utils/uuid.js +0 -28
- package/shared-utils/vectorTocoordinates.js +0 -18
- package/typedoc/components.d.ts +0 -6
- package/typedoc/components.js +0 -7
- package/typedoc/plugins.d.ts +0 -19
- package/typedoc/plugins.js +0 -165
- package/typedoc/shared-utils.d.ts +0 -3
- package/typedoc/shared-utils.js +0 -7
- package/typedoc/typings.d.ts +0 -3
- package/typedoc/typings.js +0 -7
- package/typings/math.type.js +0 -7
- package/typings/utils.type.js +0 -7
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.iterator.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.string.iterator.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.weak-map.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.define-property.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
|
|
17
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
-
|
|
19
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
20
|
-
|
|
21
|
-
Object.defineProperty(exports, "__esModule", {
|
|
22
|
-
value: true
|
|
23
|
-
});
|
|
24
|
-
exports["default"] = MovePointTowardsCamera;
|
|
25
|
-
|
|
26
|
-
require("core-js/modules/es.array.slice.js");
|
|
27
|
-
|
|
28
|
-
require("core-js/modules/es.array.map.js");
|
|
29
|
-
|
|
30
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
31
|
-
|
|
32
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
33
|
-
|
|
34
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
35
|
-
|
|
36
|
-
var React = _interopRequireWildcard(require("react"));
|
|
37
|
-
|
|
38
|
-
var _antd = require("antd");
|
|
39
|
-
|
|
40
|
-
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); }
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
44
|
-
function MovePointTowardsCamera(props) {
|
|
45
|
-
if (!props.movePointTowardsCamera) return null; // 用于临时保存点的偏移数据
|
|
46
|
-
|
|
47
|
-
var _React$useState = React.useState([]),
|
|
48
|
-
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
|
49
|
-
fixDistance = _React$useState2[0],
|
|
50
|
-
setFixDistance = _React$useState2[1];
|
|
51
|
-
|
|
52
|
-
(0, React.useEffect)(function () {
|
|
53
|
-
// 监听撤销
|
|
54
|
-
if (props.state.length < fixDistance.length) {
|
|
55
|
-
setFixDistance(fixDistance.slice(0, props.state.length));
|
|
56
|
-
}
|
|
57
|
-
}, [props.state.length, fixDistance.length]);
|
|
58
|
-
var handlePointFix = React.useCallback(function (value, index) {
|
|
59
|
-
var render = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
60
|
-
fixDistance[index] = value;
|
|
61
|
-
setFixDistance((0, _toConsumableArray2["default"])(fixDistance));
|
|
62
|
-
if (!render) return;
|
|
63
|
-
var _state = props.state;
|
|
64
|
-
var point = _state[index].originPoint;
|
|
65
|
-
_state[index].fixDistance = value;
|
|
66
|
-
_state[index].point = props.movePointTowardsCamera(point, value / 100);
|
|
67
|
-
props.setState((0, _toConsumableArray2["default"])(_state));
|
|
68
|
-
}, [props.state]);
|
|
69
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
70
|
-
className: "PanoCursorRaycasterPluginUsage-Slider"
|
|
71
|
-
}, props.state.map(function (item, idx) {
|
|
72
|
-
var params = {
|
|
73
|
-
min: -10,
|
|
74
|
-
max: 20,
|
|
75
|
-
step: 0.1,
|
|
76
|
-
defaultValue: 0
|
|
77
|
-
};
|
|
78
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
key: idx
|
|
80
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
className: "inline-block flag-circle",
|
|
82
|
-
style: {
|
|
83
|
-
backgroundColor: props.pointColors[idx]
|
|
84
|
-
}
|
|
85
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
86
|
-
className: "inline-block slider",
|
|
87
|
-
style: {
|
|
88
|
-
width: 100
|
|
89
|
-
}
|
|
90
|
-
}, /*#__PURE__*/React.createElement(_antd.Slider, (0, _extends2["default"])({}, params, {
|
|
91
|
-
value: fixDistance[idx],
|
|
92
|
-
tipFormatter: function tipFormatter(value) {
|
|
93
|
-
return value + 'cm';
|
|
94
|
-
},
|
|
95
|
-
onChange: function onChange(value) {
|
|
96
|
-
return handlePointFix(value, idx);
|
|
97
|
-
},
|
|
98
|
-
onAfterChange: function onAfterChange(value) {
|
|
99
|
-
return handlePointFix(value, idx, true);
|
|
100
|
-
}
|
|
101
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
102
|
-
className: "inline-block",
|
|
103
|
-
style: {
|
|
104
|
-
width: 50
|
|
105
|
-
}
|
|
106
|
-
}, /*#__PURE__*/React.createElement(_antd.InputNumber, (0, _extends2["default"])({}, params, {
|
|
107
|
-
value: fixDistance[idx],
|
|
108
|
-
size: "small",
|
|
109
|
-
formatter: function formatter(value) {
|
|
110
|
-
return "".concat(value, " cm");
|
|
111
|
-
},
|
|
112
|
-
onChange: function onChange(value) {
|
|
113
|
-
return handlePointFix(value, idx, true);
|
|
114
|
-
}
|
|
115
|
-
}))));
|
|
116
|
-
}));
|
|
117
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as THREE from 'three';
|
|
3
|
-
import { Vector3 } from 'three';
|
|
4
|
-
import { StateType } from '../PanoCursorRaycasterPluginUsage';
|
|
5
|
-
export default function PointAxesHelper(props: {
|
|
6
|
-
state: StateType;
|
|
7
|
-
pointAxesHelper?: (point: Vector3, length?: number, fixDistance?: number) => {
|
|
8
|
-
clear: () => void;
|
|
9
|
-
pointAxesHelperMesh: THREE.Group;
|
|
10
|
-
};
|
|
11
|
-
}): JSX.Element;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.iterator.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.string.iterator.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.weak-map.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.define-property.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
|
|
17
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, "__esModule", {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
exports["default"] = PointAxesHelper;
|
|
23
|
-
|
|
24
|
-
var React = _interopRequireWildcard(require("react"));
|
|
25
|
-
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
function PointAxesHelper(props) {
|
|
31
|
-
// 添加辅助坐标轴
|
|
32
|
-
(0, React.useEffect)(function () {
|
|
33
|
-
if (!props.pointAxesHelper) return;
|
|
34
|
-
var point = props.state.point;
|
|
35
|
-
var disposer = props.pointAxesHelper(point).clear;
|
|
36
|
-
return disposer;
|
|
37
|
-
}, [props.state]);
|
|
38
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
39
|
-
}
|
|
@@ -1,126 +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"] = exports.PanoCursorRaycasterPlugin = void 0;
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.string.sub.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.array.for-each.js");
|
|
15
|
-
|
|
16
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
17
|
-
|
|
18
|
-
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
19
|
-
|
|
20
|
-
var _three = require("three");
|
|
21
|
-
|
|
22
|
-
var _createLine = _interopRequireDefault(require("../../shared-utils/createLine"));
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 全景中对当前鼠标的位置进行碰撞监测
|
|
26
|
-
* @param five
|
|
27
|
-
* @return
|
|
28
|
-
*/
|
|
29
|
-
var PanoCursorRaycasterPlugin = function PanoCursorRaycasterPlugin(five, _ref) {
|
|
30
|
-
(0, _objectDestructuringEmpty2["default"])(_ref);
|
|
31
|
-
var state = {
|
|
32
|
-
intersection: null,
|
|
33
|
-
disposers: []
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
var updateIntersection = function updateIntersection(intersection) {
|
|
37
|
-
state.intersection = intersection;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var clearIntersection = function clearIntersection() {
|
|
41
|
-
state.intersection = null;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
five.on('modelLoaded', function () {
|
|
45
|
-
five.on('intersectionOnModelUpdate', updateIntersection);
|
|
46
|
-
five.on('intersectionHidden', clearIntersection);
|
|
47
|
-
});
|
|
48
|
-
five.on('dispose', function () {
|
|
49
|
-
five.off('intersectionOnModelUpdate', updateIntersection);
|
|
50
|
-
five.off('intersectionHidden', clearIntersection);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
var pointAxesHelper = function pointAxesHelper(point) {
|
|
54
|
-
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
55
|
-
var fixDistance = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.1;
|
|
56
|
-
var halfLength = length / 2;
|
|
57
|
-
var helperCenterPoint = movePointTowardsCamera(point, fixDistance);
|
|
58
|
-
var p = helperCenterPoint;
|
|
59
|
-
var pointAxesHelperMesh = new _three.Group();
|
|
60
|
-
pointAxesHelperMesh.add((0, _createLine["default"])(new _three.Vector3(p.x + halfLength, p.y, p.z), new _three.Vector3(p.x - halfLength, p.y, p.z), new _three.Vector3(1, 0, 0)), (0, _createLine["default"])(new _three.Vector3(p.x, p.y + halfLength, p.z), new _three.Vector3(p.x, p.y - halfLength, p.z), new _three.Vector3(0, 1, 0)), (0, _createLine["default"])(new _three.Vector3(p.x, p.y, p.z + halfLength), new _three.Vector3(p.x, p.y, p.z - halfLength), new _three.Vector3(0, 0, 1)));
|
|
61
|
-
five.scene.add(pointAxesHelperMesh);
|
|
62
|
-
five.needsRender = true; // 清理函数
|
|
63
|
-
|
|
64
|
-
var clear = function clear() {
|
|
65
|
-
five.scene.remove(pointAxesHelperMesh);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
state.disposers.push(clear);
|
|
69
|
-
return {
|
|
70
|
-
clear: clear,
|
|
71
|
-
pointAxesHelperMesh: pointAxesHelperMesh
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
var canSeePoint = function canSeePoint(point) {
|
|
76
|
-
var _five$camera, _five$model$intersect;
|
|
77
|
-
|
|
78
|
-
var distanceError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
79
|
-
var cameraPosition = five === null || five === void 0 ? void 0 : (_five$camera = five.camera) === null || _five$camera === void 0 ? void 0 : _five$camera.position;
|
|
80
|
-
if (!cameraPosition) return false;
|
|
81
|
-
var distance = point.distanceTo(cameraPosition);
|
|
82
|
-
var direction = point.sub(cameraPosition).normalize();
|
|
83
|
-
var raycaster = new _three.Raycaster(cameraPosition, direction);
|
|
84
|
-
var intersection = (_five$model$intersect = five.model.intersectRaycaster(raycaster)) === null || _five$model$intersect === void 0 ? void 0 : _five$model$intersect[0];
|
|
85
|
-
if (intersection && intersection.distance + distanceError < distance) return false;
|
|
86
|
-
return true;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
var intersection = function intersection() {
|
|
90
|
-
return state.intersection;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
var destroy = function destroy() {
|
|
94
|
-
var _state$disposers, _state$disposers$forE;
|
|
95
|
-
|
|
96
|
-
(_state$disposers = state.disposers) === null || _state$disposers === void 0 ? void 0 : (_state$disposers$forE = _state$disposers.forEach) === null || _state$disposers$forE === void 0 ? void 0 : _state$disposers$forE.call(_state$disposers, function (d) {
|
|
97
|
-
return d === null || d === void 0 ? void 0 : d();
|
|
98
|
-
});
|
|
99
|
-
five.off('intersectionOnModelUpdate', updateIntersection);
|
|
100
|
-
five.off('intersectionHidden', clearIntersection);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
var movePointTowardsCamera = function movePointTowardsCamera(point, distance) {
|
|
104
|
-
// 原点 position
|
|
105
|
-
var originPoint = point.clone(); // camera position
|
|
106
|
-
|
|
107
|
-
var cameraPosition = five.camera.position.clone(); // 移动的向量
|
|
108
|
-
|
|
109
|
-
var fixVector3 = cameraPosition.sub(originPoint).setLength(distance); // 向量相加
|
|
110
|
-
|
|
111
|
-
var newPoint = fixVector3.add(originPoint);
|
|
112
|
-
return newPoint;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return {
|
|
116
|
-
intersection: intersection,
|
|
117
|
-
pointAxesHelper: pointAxesHelper,
|
|
118
|
-
movePointTowardsCamera: movePointTowardsCamera,
|
|
119
|
-
destroy: destroy,
|
|
120
|
-
canSeePoint: canSeePoint
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
exports.PanoCursorRaycasterPlugin = PanoCursorRaycasterPlugin;
|
|
125
|
-
var _default = PanoCursorRaycasterPlugin;
|
|
126
|
-
exports["default"] = _default;
|
|
@@ -1,27 +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"] = addLineToFive;
|
|
11
|
-
|
|
12
|
-
var _createLine = _interopRequireDefault(require("../../../shared-utils/createLine"));
|
|
13
|
-
|
|
14
|
-
function addLineToFive(five, point1, point2, color) {
|
|
15
|
-
var line = (0, _createLine["default"])(point1, point2, color, false);
|
|
16
|
-
five.scene.add(line);
|
|
17
|
-
five.needsRender = true;
|
|
18
|
-
|
|
19
|
-
var clear = function clear() {
|
|
20
|
-
five === null || five === void 0 ? void 0 : five.scene.remove(line);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
clear: clear,
|
|
25
|
-
line: line
|
|
26
|
-
};
|
|
27
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.iterator.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.string.iterator.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.weak-map.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.define-property.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
|
|
17
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, "__esModule", {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
exports["default"] = creatLine;
|
|
23
|
-
|
|
24
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
25
|
-
|
|
26
|
-
var _line = require("@realsee/five/line");
|
|
27
|
-
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
function creatLine(point1, point2) {
|
|
33
|
-
var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new THREE.Vector3(1, 1, 1);
|
|
34
|
-
var dashed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
35
|
-
var line = new _line.Line(point1, point2);
|
|
36
|
-
line.setMaterial({
|
|
37
|
-
dashed: dashed,
|
|
38
|
-
color: color,
|
|
39
|
-
linewidth: 1
|
|
40
|
-
});
|
|
41
|
-
line.remove(line.points);
|
|
42
|
-
return line; // const material = dash
|
|
43
|
-
// ? new LineDashedMaterial({ color, dashSize: 0.1, gapSize: 0.05, scale: 0.2 })
|
|
44
|
-
// : new THREE.LineBasicMaterial({ color })
|
|
45
|
-
// const geometry = new THREE.BufferGeometry().setFromPoints([point1, point2])
|
|
46
|
-
// const line = new THREE.Line(geometry, material)
|
|
47
|
-
// return line
|
|
48
|
-
}
|
|
@@ -1,14 +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.PanoDoorLabelPlugin = PanoDoorLabelPlugin;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @todo
|
|
12
|
-
*/
|
|
13
|
-
function PanoDoorLabelPlugin() {//
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { FivePlugin } from '@realsee/five';
|
|
2
|
-
export interface PanoIRobotPluginParameterType {
|
|
3
|
-
}
|
|
4
|
-
export interface PanoIRobotPluginExportType {
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* 全景扫地机器人插件
|
|
8
|
-
*/
|
|
9
|
-
declare const PanoIRobotPlugin: FivePlugin<PanoIRobotPluginParameterType, PanoIRobotPluginExportType>;
|
|
10
|
-
export default PanoIRobotPlugin;
|
|
@@ -1,18 +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["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 全景扫地机器人插件
|
|
12
|
-
*/
|
|
13
|
-
var PanoIRobotPlugin = function PanoIRobotPlugin() {
|
|
14
|
-
return {};
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var _default = PanoIRobotPlugin;
|
|
18
|
-
exports["default"] = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function compare(c1: THREE.Color, c2: THREE.Color, threshold?: number): boolean;
|
|
@@ -1,17 +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.compare = compare;
|
|
9
|
-
|
|
10
|
-
// 判断两个颜色是否相似
|
|
11
|
-
function compare(c1, c2) {
|
|
12
|
-
var threshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.025;
|
|
13
|
-
var r = Math.abs(c1.r - c2.r);
|
|
14
|
-
var g = Math.abs(c1.g - c2.g);
|
|
15
|
-
var b = Math.abs(c1.b - c2.b);
|
|
16
|
-
return r < threshold && g < threshold && b < threshold;
|
|
17
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { WorkObserver } from '@realsee/five';
|
|
3
|
-
export declare function createBox(textures: THREE.Texture[], observer: WorkObserver, _config?: {
|
|
4
|
-
opacity?: boolean;
|
|
5
|
-
maskColor?: THREE.Color;
|
|
6
|
-
thickness?: number;
|
|
7
|
-
}): THREE.Mesh<THREE.BoxBufferGeometry, THREE.ShaderMaterial[]>;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.iterator.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.string.iterator.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.weak-map.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.define-property.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
|
|
17
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, "__esModule", {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
exports.createBox = createBox;
|
|
23
|
-
|
|
24
|
-
require("core-js/modules/es.object.assign.js");
|
|
25
|
-
|
|
26
|
-
require("core-js/modules/es.array.map.js");
|
|
27
|
-
|
|
28
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
29
|
-
|
|
30
|
-
var _vertexShader = require("./vertexShader");
|
|
31
|
-
|
|
32
|
-
var _fragmentShader = require("./fragmentShader");
|
|
33
|
-
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
function createBox(textures, observer, _config) {
|
|
39
|
-
var config = Object.assign({
|
|
40
|
-
opacity: true,
|
|
41
|
-
thickness: 0.005,
|
|
42
|
-
maskColor: new THREE.Color(1, 0, 0)
|
|
43
|
-
}, _config || {});
|
|
44
|
-
var materials = textures.map(function (texture) {
|
|
45
|
-
return new THREE.ShaderMaterial({
|
|
46
|
-
uniforms: {
|
|
47
|
-
map: {
|
|
48
|
-
value: texture
|
|
49
|
-
},
|
|
50
|
-
enable: {
|
|
51
|
-
value: 1
|
|
52
|
-
},
|
|
53
|
-
opacity: {
|
|
54
|
-
value: config.opacity ? 0.0 : 1
|
|
55
|
-
},
|
|
56
|
-
selectedColor: {
|
|
57
|
-
value: new THREE.Color(0, 0, 0)
|
|
58
|
-
},
|
|
59
|
-
maskColor: {
|
|
60
|
-
value: config.maskColor
|
|
61
|
-
},
|
|
62
|
-
thickness: {
|
|
63
|
-
value: config.thickness
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
vertexShader: _vertexShader.vertexShader,
|
|
67
|
-
fragmentShader: _fragmentShader.fragmentShader,
|
|
68
|
-
transparent: true,
|
|
69
|
-
depthTest: false,
|
|
70
|
-
side: THREE.DoubleSide
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
var boxBufferGeometry = new THREE.BoxBufferGeometry(1, 1, 1);
|
|
74
|
-
var box = new THREE.Mesh(boxBufferGeometry, materials);
|
|
75
|
-
box.geometry.scale(-1, 1, 1);
|
|
76
|
-
box.position.set(observer.position.x, observer.position.y, observer.position.z);
|
|
77
|
-
box.quaternion.multiply(observer.quaternion);
|
|
78
|
-
return box;
|
|
79
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.iterator.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.string.iterator.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.weak-map.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.define-property.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
|
|
17
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, "__esModule", {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
exports.createTextures = createTextures;
|
|
23
|
-
|
|
24
|
-
require("core-js/modules/es.array.map.js");
|
|
25
|
-
|
|
26
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
27
|
-
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
function createTextures(imgs) {
|
|
33
|
-
var loader = new THREE.ImageLoader();
|
|
34
|
-
var keys = ['up', 'down', 'right', 'left', 'front', 'back'];
|
|
35
|
-
var textures = keys.map(function (key) {
|
|
36
|
-
var url = imgs[key];
|
|
37
|
-
var texture = new THREE.Texture();
|
|
38
|
-
loader.load(url, function (image) {
|
|
39
|
-
texture.image = image;
|
|
40
|
-
texture.needsUpdate = true;
|
|
41
|
-
});
|
|
42
|
-
return texture;
|
|
43
|
-
});
|
|
44
|
-
return textures;
|
|
45
|
-
}
|
|
@@ -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;
|