@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 type ValueOf<T> = T[keyof T];
|
|
@@ -1,16 +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"] = clearGroup;
|
|
11
|
-
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
|
-
function clearGroup(group) {
|
|
15
|
-
group.children.length > 0 && group.remove.apply(group, (0, _toConsumableArray2["default"])(group.children));
|
|
16
|
-
}
|
|
@@ -1,47 +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.normalLineOpts = exports.lightLineOpts = exports.dashLineOpts = void 0;
|
|
9
|
-
|
|
10
|
-
require("core-js/modules/es.object.assign.js");
|
|
11
|
-
|
|
12
|
-
var _three = require("three");
|
|
13
|
-
|
|
14
|
-
var lineWidth = 2;
|
|
15
|
-
var lightLineWidth = 4;
|
|
16
|
-
var lineColor = new _three.Color(0xffffff);
|
|
17
|
-
var lightLineColor = new _three.Color(0x2d7cff);
|
|
18
|
-
var pointColor = new _three.Color(0xffffff);
|
|
19
|
-
var lightPointColor = new _three.Color(0x2d7cff);
|
|
20
|
-
var pointSize = 8;
|
|
21
|
-
var lightPointSize = 16;
|
|
22
|
-
var pointImage = 'data:image/png;base64,' + 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==';
|
|
23
|
-
var pointTexture = new _three.TextureLoader().load(pointImage);
|
|
24
|
-
var normalLineOpts = {
|
|
25
|
-
pointTexture: pointTexture,
|
|
26
|
-
pointSize: pointSize,
|
|
27
|
-
lineWidth: lineWidth,
|
|
28
|
-
lineColor: lineColor,
|
|
29
|
-
pointColor: pointColor,
|
|
30
|
-
lineRenderOrder: 20,
|
|
31
|
-
pointsRenderOrder: 20
|
|
32
|
-
};
|
|
33
|
-
exports.normalLineOpts = normalLineOpts;
|
|
34
|
-
var dashLineOpts = Object.assign({}, normalLineOpts, {
|
|
35
|
-
dashed: true
|
|
36
|
-
});
|
|
37
|
-
exports.dashLineOpts = dashLineOpts;
|
|
38
|
-
var lightLineOpts = {
|
|
39
|
-
pointTexture: pointTexture,
|
|
40
|
-
pointSize: lightPointSize,
|
|
41
|
-
lineWidth: lightLineWidth,
|
|
42
|
-
lineColor: lightLineColor,
|
|
43
|
-
pointColor: lightPointColor,
|
|
44
|
-
lineRenderOrder: 10,
|
|
45
|
-
pointsRenderOrder: 10
|
|
46
|
-
};
|
|
47
|
-
exports.lightLineOpts = lightLineOpts;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import Line from '../Model/line';
|
|
2
|
-
import { Five } from '@realsee/five';
|
|
3
|
-
import { Vector3 } from 'three';
|
|
4
|
-
import { LineCompletelyJson, PolylineCompletelyJson } from '../typings/data';
|
|
5
|
-
export declare type DistanceItem = ReturnType<typeof creatDistanceItem>;
|
|
6
|
-
export interface UserDistanceItem {
|
|
7
|
-
element: Element;
|
|
8
|
-
highlight: () => void;
|
|
9
|
-
unHighlight: () => void;
|
|
10
|
-
update: (params: {
|
|
11
|
-
line: LineCompletelyJson;
|
|
12
|
-
polyline: PolylineCompletelyJson;
|
|
13
|
-
}) => void;
|
|
14
|
-
}
|
|
15
|
-
export interface IDistanceItemProps {
|
|
16
|
-
line: Line;
|
|
17
|
-
userDistanceItem?: UserDistanceItem;
|
|
18
|
-
clickCallback?: (item: DistanceItem) => unknown;
|
|
19
|
-
}
|
|
20
|
-
export declare function creatDistanceItem(props: IDistanceItemProps): {
|
|
21
|
-
lineID: string;
|
|
22
|
-
ndcPosition: Vector3;
|
|
23
|
-
update: (five: Five) => void;
|
|
24
|
-
appendTo: (container: Element) => void;
|
|
25
|
-
remove: () => void;
|
|
26
|
-
highlight: () => void;
|
|
27
|
-
unHighlight: () => void;
|
|
28
|
-
};
|
|
@@ -1,147 +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.creatDistanceItem = creatDistanceItem;
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.array.concat.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.number.to-fixed.js");
|
|
15
|
-
|
|
16
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
-
|
|
18
|
-
var _three = require("three");
|
|
19
|
-
|
|
20
|
-
var _isNDCPointInScreen = _interopRequireDefault(require("./isNDCPointInScreen"));
|
|
21
|
-
|
|
22
|
-
function creatContentDom() {
|
|
23
|
-
var contentDom = document.createElement('div');
|
|
24
|
-
contentDom.style.height = '24px';
|
|
25
|
-
contentDom.style.width = '62px';
|
|
26
|
-
contentDom.style.lineHeight = '24px';
|
|
27
|
-
contentDom.style.textAlign = 'center';
|
|
28
|
-
contentDom.style.transform = 'translate(-50%, -50%)';
|
|
29
|
-
contentDom.style.borderRadius = '12px';
|
|
30
|
-
contentDom.style.fontSize = '14px';
|
|
31
|
-
contentDom.style.color = '#000000';
|
|
32
|
-
contentDom.style.background = '#fff';
|
|
33
|
-
contentDom.style.pointerEvents = 'all';
|
|
34
|
-
contentDom.style.cursor = 'pointer';
|
|
35
|
-
return contentDom;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function createContainerDom(line) {
|
|
39
|
-
var containerDom = document.createElement('div');
|
|
40
|
-
containerDom.id = 'distance_' + line.id;
|
|
41
|
-
containerDom.classList.add('five-plugin-measure__distance');
|
|
42
|
-
containerDom.style.opacity = '0';
|
|
43
|
-
containerDom.style.position = 'absolute';
|
|
44
|
-
containerDom.style.left = '0';
|
|
45
|
-
containerDom.style.top = '0';
|
|
46
|
-
containerDom.style.transform = 'translate3d(0, 0, 0)';
|
|
47
|
-
return containerDom;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function creatDistanceItem(props) {
|
|
51
|
-
function handleClick() {
|
|
52
|
-
var _props$clickCallback;
|
|
53
|
-
|
|
54
|
-
highlight();
|
|
55
|
-
(_props$clickCallback = props.clickCallback) === null || _props$clickCallback === void 0 ? void 0 : _props$clickCallback.call(props, distanceItem);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function highlight() {
|
|
59
|
-
if (userDistanceItem) return userDistanceItem.highlight();
|
|
60
|
-
contentDom.style.border = '1px solid #538FFF';
|
|
61
|
-
contentDom.style.color = '#538FFF';
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function unHighlight() {
|
|
65
|
-
if (userDistanceItem) return userDistanceItem.unHighlight();
|
|
66
|
-
contentDom.style.border = 'none';
|
|
67
|
-
contentDom.style.color = '#000';
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function update(five) {
|
|
71
|
-
var fiveElement = five.getElement();
|
|
72
|
-
if (!fiveElement) return;
|
|
73
|
-
var screenWidth = fiveElement.clientWidth;
|
|
74
|
-
var screenHeight = fiveElement.clientHeight;
|
|
75
|
-
if (line.points.length < 2) return;
|
|
76
|
-
|
|
77
|
-
var _line$points = (0, _slicedToArray2["default"])(line.points, 2),
|
|
78
|
-
startPoint = _line$points[0],
|
|
79
|
-
endPoint = _line$points[1];
|
|
80
|
-
|
|
81
|
-
var ndcStartPosition = startPoint.position.clone().project(five.camera);
|
|
82
|
-
var ndcEndPosition = endPoint.position.clone().project(five.camera);
|
|
83
|
-
var ndcDomPosition = ndcStartPosition.clone().lerp(ndcEndPosition, 0.5);
|
|
84
|
-
|
|
85
|
-
var visible = function () {
|
|
86
|
-
// 对于超过近平面和远平面的点,计算会有问题
|
|
87
|
-
if (Math.abs(ndcStartPosition.z) > 1 || Math.abs(ndcEndPosition.z) > 1) return false;
|
|
88
|
-
if (!(0, _isNDCPointInScreen["default"])(ndcStartPosition) && !(0, _isNDCPointInScreen["default"])(ndcEndPosition)) return false;
|
|
89
|
-
if (!(0, _isNDCPointInScreen["default"])(ndcDomPosition)) return false;
|
|
90
|
-
var screenStartPosition = new _three.Vector2(ndcStartPosition.x * screenWidth, ndcStartPosition.y * screenHeight);
|
|
91
|
-
var screenEndPosition = new _three.Vector2(ndcEndPosition.x * screenWidth, ndcEndPosition.y * screenHeight);
|
|
92
|
-
if (screenStartPosition.distanceTo(screenEndPosition) < 20) return false;
|
|
93
|
-
return true;
|
|
94
|
-
}();
|
|
95
|
-
|
|
96
|
-
if (visible === false) {
|
|
97
|
-
containerDom.style.opacity = '0';
|
|
98
|
-
containerDom.style.pointerEvents = 'none';
|
|
99
|
-
return;
|
|
100
|
-
} // 更新 UI
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var left = (ndcDomPosition.x + 1) / 2 * screenWidth;
|
|
104
|
-
var top = -(ndcDomPosition.y - 1) / 2 * screenHeight;
|
|
105
|
-
containerDom.style.transform = "translate3d(".concat(left, "px, ").concat(top, "px, 10px)");
|
|
106
|
-
containerDom.style.opacity = '1';
|
|
107
|
-
containerDom.style.pointerEvents = 'all';
|
|
108
|
-
|
|
109
|
-
if (userDistanceItem) {
|
|
110
|
-
userDistanceItem.update({
|
|
111
|
-
line: line.toCompletelyJson(),
|
|
112
|
-
polyline: line.getPolyline().toCompletelyJson()
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
var distanceString = startPoint.position.clone().distanceTo(endPoint.position).toFixed(2) + 'm';
|
|
117
|
-
contentDom.innerText !== distanceString && (contentDom.innerText = distanceString);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function appendTo(container) {
|
|
121
|
-
container.appendChild(containerDom);
|
|
122
|
-
containerDom.addEventListener('click', handleClick);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function remove() {
|
|
126
|
-
contentDom.removeEventListener('click', handleClick);
|
|
127
|
-
containerDom.remove();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
var line = props.line;
|
|
131
|
-
var lineID = line.id;
|
|
132
|
-
var contentDom = creatContentDom();
|
|
133
|
-
var containerDom = createContainerDom(line);
|
|
134
|
-
var userDistanceItem = props.userDistanceItem;
|
|
135
|
-
var ndcPosition = new _three.Vector3(0, 0, 0);
|
|
136
|
-
var distanceItem = {
|
|
137
|
-
lineID: lineID,
|
|
138
|
-
ndcPosition: ndcPosition,
|
|
139
|
-
update: update,
|
|
140
|
-
appendTo: appendTo,
|
|
141
|
-
remove: remove,
|
|
142
|
-
highlight: highlight,
|
|
143
|
-
unHighlight: unHighlight
|
|
144
|
-
};
|
|
145
|
-
userDistanceItem !== null && userDistanceItem !== void 0 && userDistanceItem.element ? containerDom.appendChild(userDistanceItem.element) : containerDom.appendChild(contentDom);
|
|
146
|
-
return distanceItem;
|
|
147
|
-
}
|
|
@@ -1,37 +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.findAssociatedLines = findAssociatedLines;
|
|
9
|
-
|
|
10
|
-
require("core-js/modules/es.array.find.js");
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.array.find-index.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.array.concat.js");
|
|
15
|
-
|
|
16
|
-
function findAssociatedLines(line) {
|
|
17
|
-
// 找跟这个线段相邻的线
|
|
18
|
-
var mergeNextLine = function mergeNextLine(point, nextIndex, target) {
|
|
19
|
-
var nextLine = point.lines.find(function (line) {
|
|
20
|
-
var pointIndex = line.points.findIndex(function (_ref) {
|
|
21
|
-
var id = _ref.id;
|
|
22
|
-
return id === point.id;
|
|
23
|
-
});
|
|
24
|
-
if (pointIndex === nextIndex) return false;
|
|
25
|
-
return true;
|
|
26
|
-
});
|
|
27
|
-
if (!nextLine) return target;
|
|
28
|
-
var nextPoint = nextLine.points[nextIndex];
|
|
29
|
-
if (!nextPoint) return target;
|
|
30
|
-
return mergeNextLine(nextPoint, nextIndex, target.concat(nextLine));
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
var rightLines = mergeNextLine(line.points[0], 1, []);
|
|
34
|
-
var leftLines = mergeNextLine(line.points[0], 0, []);
|
|
35
|
-
var lines = rightLines.concat(leftLines);
|
|
36
|
-
return lines;
|
|
37
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Vector2 } from 'three';
|
|
2
|
-
import Point from '../Model/point';
|
|
3
|
-
import { Five } from '@realsee/five';
|
|
4
|
-
/**
|
|
5
|
-
* @param tapPoint 注意这里的坐标是相对于 FiveElement 的
|
|
6
|
-
*/
|
|
7
|
-
export declare function findClosestPoint(five: Five, points: Point[], tapPoint: Vector2, maxDistance?: number): {
|
|
8
|
-
distance: number;
|
|
9
|
-
point: Point;
|
|
10
|
-
} | null;
|
|
@@ -1,49 +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.findClosestPoint = findClosestPoint;
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.array.sort.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.array.map.js");
|
|
15
|
-
|
|
16
|
-
var _ndc2Screen = _interopRequireDefault(require("./ndc2Screen"));
|
|
17
|
-
|
|
18
|
-
var _isNDCPointInScreen = _interopRequireDefault(require("./isNDCPointInScreen"));
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @param tapPoint 注意这里的坐标是相对于 FiveElement 的
|
|
22
|
-
*/
|
|
23
|
-
// eslint-disable-next-line max-params
|
|
24
|
-
function findClosestPoint(five, points, tapPoint, maxDistance) {
|
|
25
|
-
var container = five.getElement();
|
|
26
|
-
if (!container) return null;
|
|
27
|
-
if (points.length === 0) return null;
|
|
28
|
-
var containerSize = {
|
|
29
|
-
width: container.clientWidth,
|
|
30
|
-
height: container.clientHeight
|
|
31
|
-
};
|
|
32
|
-
var ndcPoints = points.map(function (point) {
|
|
33
|
-
var ndcPosition = point.position.clone().project(five.camera);
|
|
34
|
-
if (!(0, _isNDCPointInScreen["default"])(ndcPosition)) return {
|
|
35
|
-
distance: Infinity,
|
|
36
|
-
point: point
|
|
37
|
-
};
|
|
38
|
-
var screenPosition = (0, _ndc2Screen["default"])(ndcPosition, containerSize);
|
|
39
|
-
var distance = screenPosition.distanceTo(tapPoint);
|
|
40
|
-
return {
|
|
41
|
-
distance: distance,
|
|
42
|
-
point: point
|
|
43
|
-
};
|
|
44
|
-
}).sort(function (a, b) {
|
|
45
|
-
return a.distance - b.distance;
|
|
46
|
-
});
|
|
47
|
-
if (typeof maxDistance === 'number' && ndcPoints[0].distance > maxDistance) return null;
|
|
48
|
-
return ndcPoints[0];
|
|
49
|
-
}
|
|
@@ -1,20 +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.getIntersectionFromEvent = getIntersectionFromEvent;
|
|
9
|
-
|
|
10
|
-
var _three = require("three");
|
|
11
|
-
|
|
12
|
-
var _getPointFromHammerEvent = require("./getPointFromHammerEvent");
|
|
13
|
-
|
|
14
|
-
/** 通过鼠标事件或者触摸事件,获取当前点击屏幕关联的射线与模型的交点 */
|
|
15
|
-
function getIntersectionFromEvent(five, event) {
|
|
16
|
-
var mouse = (0, _getPointFromHammerEvent.getPointFromHammerEvent)(event).ndcPoint;
|
|
17
|
-
var raycaster = new _three.Raycaster();
|
|
18
|
-
raycaster.setFromCamera(mouse, five.camera);
|
|
19
|
-
return five.model.intersectRaycaster(raycaster);
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Hammer from 'hammerjs';
|
|
2
|
-
import { Vector2 } from 'three';
|
|
3
|
-
/**
|
|
4
|
-
* 从 Hammer 事件中获取操作的点在交互 DOM 中的位置
|
|
5
|
-
* @ignore TODO: make a suitable name
|
|
6
|
-
*/
|
|
7
|
-
export declare function getPointFromHammerEvent(event: typeof Hammer['Input']): {
|
|
8
|
-
point: Vector2;
|
|
9
|
-
ndcPoint: Vector2;
|
|
10
|
-
};
|
|
@@ -1,33 +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.getPointFromHammerEvent = getPointFromHammerEvent;
|
|
9
|
-
|
|
10
|
-
require("core-js/modules/es.string.sub.js");
|
|
11
|
-
|
|
12
|
-
var _three = require("three");
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* 从 Hammer 事件中获取操作的点在交互 DOM 中的位置
|
|
16
|
-
* @ignore TODO: make a suitable name
|
|
17
|
-
*/
|
|
18
|
-
function getPointFromHammerEvent(event) {
|
|
19
|
-
// clientX 与 clientY 是相对 document 的,需要转换成相对于 target 的坐标
|
|
20
|
-
var _event$center = event.center,
|
|
21
|
-
clientX = _event$center.x,
|
|
22
|
-
clientY = _event$center.y;
|
|
23
|
-
var _event$target = event.target,
|
|
24
|
-
clientWidth = _event$target.clientWidth,
|
|
25
|
-
clientHeight = _event$target.clientHeight;
|
|
26
|
-
var clientRect = event.target.getBoundingClientRect();
|
|
27
|
-
var position = new _three.Vector2(clientX, clientY).sub(new _three.Vector2(clientRect.left, clientRect.top));
|
|
28
|
-
var mouse = new _three.Vector2(position.x / clientWidth * 2 - 1, -(position.y / clientHeight) * 2 + 1);
|
|
29
|
-
return {
|
|
30
|
-
point: position,
|
|
31
|
-
ndcPoint: mouse
|
|
32
|
-
};
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const preventDefault: (e: Event) => void;
|
|
@@ -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.preventDefault = void 0;
|
|
9
|
-
|
|
10
|
-
var preventDefault = function preventDefault(e) {
|
|
11
|
-
return e.preventDefault();
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
exports.preventDefault = preventDefault;
|
|
@@ -1,16 +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"] = isNDCPointInScreen;
|
|
9
|
-
|
|
10
|
-
function isNDCPointInScreen(ndcPoint) {
|
|
11
|
-
var x = ndcPoint.x,
|
|
12
|
-
y = ndcPoint.y,
|
|
13
|
-
z = ndcPoint.z;
|
|
14
|
-
if (Math.abs(x) > 1 || Math.abs(y) > 1 || Math.abs(z) > 1) return false;
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Line from '../Model/line';
|
|
2
|
-
import { Line as FiveLine } from '@realsee/five/line';
|
|
3
|
-
import { Color, Texture, Vector3 } from 'three';
|
|
4
|
-
declare type ISetMaterialOpts = Parameters<FiveLine['setMaterial']>[0];
|
|
5
|
-
export interface ICreatLineOpts extends ISetMaterialOpts {
|
|
6
|
-
hasPoint?: boolean;
|
|
7
|
-
pointSize?: number;
|
|
8
|
-
lineWidth?: number;
|
|
9
|
-
pointTexture?: Texture;
|
|
10
|
-
lineRenderOrder?: number;
|
|
11
|
-
pointsRenderOrder?: number;
|
|
12
|
-
lineColor?: Color | string | number;
|
|
13
|
-
pointColor?: Color | string | number;
|
|
14
|
-
}
|
|
15
|
-
export declare function creatLine(start: Vector3, end: Vector3, opts?: ICreatLineOpts): FiveLine;
|
|
16
|
-
export declare function creatLineMesh(line: Line, type: 'normal' | 'light'): FiveLine;
|
|
17
|
-
export {};
|
|
@@ -1,61 +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.creatLine = creatLine;
|
|
11
|
-
exports.creatLineMesh = creatLineMesh;
|
|
12
|
-
|
|
13
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.array.map.js");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.function.name.js");
|
|
18
|
-
|
|
19
|
-
var _line = require("@realsee/five/line");
|
|
20
|
-
|
|
21
|
-
var _constants = require("./constants");
|
|
22
|
-
|
|
23
|
-
var _three = require("three");
|
|
24
|
-
|
|
25
|
-
function creatLine(start, end, opts) {
|
|
26
|
-
var _opts$lineWidth, _opts$lineColor, _opts$pointSize, _opts$lineRenderOrder, _opts$lineRenderOrder2;
|
|
27
|
-
|
|
28
|
-
var lineWidth = (_opts$lineWidth = opts === null || opts === void 0 ? void 0 : opts.lineWidth) !== null && _opts$lineWidth !== void 0 ? _opts$lineWidth : 2;
|
|
29
|
-
var lineColor = (_opts$lineColor = opts === null || opts === void 0 ? void 0 : opts.lineColor) !== null && _opts$lineColor !== void 0 ? _opts$lineColor : new _three.Color(0xffffff);
|
|
30
|
-
var pointSize = (_opts$pointSize = opts === null || opts === void 0 ? void 0 : opts.pointSize) !== null && _opts$pointSize !== void 0 ? _opts$pointSize : 5;
|
|
31
|
-
var lineRenderOrder = (_opts$lineRenderOrder = opts === null || opts === void 0 ? void 0 : opts.lineRenderOrder) !== null && _opts$lineRenderOrder !== void 0 ? _opts$lineRenderOrder : 10;
|
|
32
|
-
var pointsRenderOrder = (_opts$lineRenderOrder2 = opts === null || opts === void 0 ? void 0 : opts.lineRenderOrder) !== null && _opts$lineRenderOrder2 !== void 0 ? _opts$lineRenderOrder2 : 20;
|
|
33
|
-
var line = new _line.Line(start, end); // set line
|
|
34
|
-
|
|
35
|
-
line.setMaterial({
|
|
36
|
-
linewidth: lineWidth,
|
|
37
|
-
color: lineColor
|
|
38
|
-
});
|
|
39
|
-
line.line.material.depthTest = false;
|
|
40
|
-
line.line.material.transparent = true;
|
|
41
|
-
line.line.renderOrder = lineRenderOrder; // set point
|
|
42
|
-
|
|
43
|
-
line.points.renderOrder = pointsRenderOrder;
|
|
44
|
-
var pointMaterial = line.points.material;
|
|
45
|
-
pointMaterial.depthTest = false;
|
|
46
|
-
pointMaterial.size = pointSize;
|
|
47
|
-
(opts === null || opts === void 0 ? void 0 : opts.pointColor) && pointMaterial.color.set(opts.pointColor).convertSRGBToLinear();
|
|
48
|
-
if (opts !== null && opts !== void 0 && opts.pointTexture) pointMaterial.map = opts.pointTexture;
|
|
49
|
-
return line;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function creatLineMesh(line, type) {
|
|
53
|
-
var _line$points = (0, _slicedToArray2["default"])(line.points, 2),
|
|
54
|
-
point = _line$points[0],
|
|
55
|
-
anotherPoint = _line$points[1];
|
|
56
|
-
|
|
57
|
-
var opts = type === 'light' ? _constants.lightLineOpts : _constants.normalLineOpts;
|
|
58
|
-
var fiveLine = creatLine(point.position, anotherPoint.position, opts);
|
|
59
|
-
fiveLine.name = 'normalLine_' + line.id;
|
|
60
|
-
return fiveLine;
|
|
61
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Vector2 } from 'three';
|
|
2
|
-
/**
|
|
3
|
-
* 获取一点对于线段上最近的一点,
|
|
4
|
-
* 如果可以是过直线垂线的垂足,不行的话取线段的两端
|
|
5
|
-
* @param point
|
|
6
|
-
* @param linePoints
|
|
7
|
-
* @return
|
|
8
|
-
*/
|
|
9
|
-
export declare function closestPointOnLine(point: Vector2, linePoints: Vector2[]): Vector2;
|
|
10
|
-
/**
|
|
11
|
-
* 检查两个点是否位置相同
|
|
12
|
-
* point: { x: number, y: number }
|
|
13
|
-
* @param point1
|
|
14
|
-
* @param point2
|
|
15
|
-
* @return
|
|
16
|
-
*/
|
|
17
|
-
export declare function samePointAt(point1: Vector2, point2: Vector2): boolean;
|
|
@@ -1,57 +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.closestPointOnLine = closestPointOnLine;
|
|
9
|
-
exports.samePointAt = samePointAt;
|
|
10
|
-
|
|
11
|
-
var _three = require("three");
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 获取一点对于线段上最近的一点,
|
|
15
|
-
* 如果可以是过直线垂线的垂足,不行的话取线段的两端
|
|
16
|
-
* @param point
|
|
17
|
-
* @param linePoints
|
|
18
|
-
* @return
|
|
19
|
-
*/
|
|
20
|
-
function closestPointOnLine(point, linePoints) {
|
|
21
|
-
var tA = point.x - linePoints[0].x;
|
|
22
|
-
var tB = point.y - linePoints[0].y;
|
|
23
|
-
var tC = linePoints[1].x - linePoints[0].x;
|
|
24
|
-
var tD = linePoints[1].y - linePoints[0].y; // 设线段为 AB 线段,线段外一点为 P
|
|
25
|
-
// tDot = AP 向量与 AB 向量乘积,tLenSq 为 |AB|平方。
|
|
26
|
-
// tParam 是 AP 向量在 AB 向量投影向量 AC 与 AB 向量的比。
|
|
27
|
-
|
|
28
|
-
var tDot = tA * tC + tB * tD;
|
|
29
|
-
var tLenSq = tC * tC + tD * tD;
|
|
30
|
-
var tParam = tDot / tLenSq;
|
|
31
|
-
var tXx, tYy;
|
|
32
|
-
|
|
33
|
-
if (tParam < 0 || samePointAt(linePoints[0], linePoints[1])) {
|
|
34
|
-
tXx = linePoints[0].x;
|
|
35
|
-
tYy = linePoints[0].y;
|
|
36
|
-
} else if (tParam > 1) {
|
|
37
|
-
tXx = linePoints[1].x;
|
|
38
|
-
tYy = linePoints[1].y;
|
|
39
|
-
} else {
|
|
40
|
-
tXx = linePoints[0].x + tParam * tC;
|
|
41
|
-
tYy = linePoints[0].y + tParam * tD;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return new _three.Vector2(tXx, tYy);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 检查两个点是否位置相同
|
|
48
|
-
* point: { x: number, y: number }
|
|
49
|
-
* @param point1
|
|
50
|
-
* @param point2
|
|
51
|
-
* @return
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
function samePointAt(point1, point2) {
|
|
56
|
-
return point1.x === point2.x && point1.y === point2.y;
|
|
57
|
-
}
|