@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,92 +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.Easing = void 0;
|
|
23
|
-
exports["default"] = tween;
|
|
24
|
-
exports.tweenProgress = tweenProgress;
|
|
25
|
-
|
|
26
|
-
require("core-js/modules/es.object.assign.js");
|
|
27
|
-
|
|
28
|
-
var TWEEN = _interopRequireWildcard(require("@tweenjs/tween.js"));
|
|
29
|
-
|
|
30
|
-
var _index = require("./index");
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
var Easing = TWEEN.Easing;
|
|
37
|
-
exports.Easing = Easing;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 对象变化的补间动画
|
|
41
|
-
* 1. 应用 requestAnimationFrameInterval 做 update
|
|
42
|
-
* 2. 在原生 tween 上新增 destroy 方法和 onDestroy 监听
|
|
43
|
-
* DOC: https://github.com/tweenjs/tween.js
|
|
44
|
-
* @param from 对象起始状态
|
|
45
|
-
* @param to 对象末尾状态
|
|
46
|
-
* @param duration 经历时间(s)
|
|
47
|
-
* @param easing 过程动画,默认是 Easing.Linear.None
|
|
48
|
-
*/
|
|
49
|
-
function tween(from, to, duration) {
|
|
50
|
-
var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Easing.Linear.None;
|
|
51
|
-
var tween = new TWEEN.Tween(from).to(to, duration).easing(easing); // 这里注意一下,因为 requestAnimationFrameInterval 给的时间是从 0 开始的,tween 动画也从 0 开始
|
|
52
|
-
|
|
53
|
-
(0, _index.nextFrame)(function () {
|
|
54
|
-
return tween.start(0);
|
|
55
|
-
});
|
|
56
|
-
var cancelAnimationFrame = (0, _index.requestAnimationFrameInterval)(function (time) {
|
|
57
|
-
if (tween.update(time) === false) cancelAnimationFrame();
|
|
58
|
-
});
|
|
59
|
-
var destroyMethods = [];
|
|
60
|
-
|
|
61
|
-
tween.onDestroy = function (fn) {
|
|
62
|
-
destroyMethods.push(fn);
|
|
63
|
-
return tween;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
tween.destroy = function () {
|
|
67
|
-
this.stop();
|
|
68
|
-
Object.assign(tween, {
|
|
69
|
-
_onStartCallback: null,
|
|
70
|
-
_onUpdateCallback: null,
|
|
71
|
-
_onCompleteCallback: null,
|
|
72
|
-
_onStopCallbackL: null
|
|
73
|
-
});
|
|
74
|
-
var destroyMethod;
|
|
75
|
-
|
|
76
|
-
while (destroyMethod = destroyMethods.shift()) {
|
|
77
|
-
destroyMethod();
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
cancelAnimationFrame();
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
return tween;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function tweenProgress(duration, easing) {
|
|
87
|
-
return tween({
|
|
88
|
-
progress: 0
|
|
89
|
-
}, {
|
|
90
|
-
progress: 1
|
|
91
|
-
}, duration, easing);
|
|
92
|
-
}
|
|
@@ -1,38 +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"] = changeModelCanvansOpacity;
|
|
9
|
-
|
|
10
|
-
require("core-js/modules/es.array.iterator.js");
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.promise.js");
|
|
15
|
-
|
|
16
|
-
require("core-js/modules/es.string.iterator.js");
|
|
17
|
-
|
|
18
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
19
|
-
|
|
20
|
-
require("core-js/modules/web.timers.js");
|
|
21
|
-
|
|
22
|
-
function changeModelCanvansOpacity(five, opacity) {
|
|
23
|
-
var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
|
|
24
|
-
var fiveEle = five.getElement();
|
|
25
|
-
if (!fiveEle) return;
|
|
26
|
-
fiveEle.style.opacity = opacity + '';
|
|
27
|
-
fiveEle.style.transition = duration === 0 ? 'none' : "opacity ".concat(duration, "ms linear");
|
|
28
|
-
if (duration === 0) return;
|
|
29
|
-
Promise.race([new Promise(function (res) {
|
|
30
|
-
return fiveEle.addEventListener('transitionend', res, {
|
|
31
|
-
once: true
|
|
32
|
-
});
|
|
33
|
-
}), new Promise(function (res) {
|
|
34
|
-
return setTimeout(res, duration);
|
|
35
|
-
})]).then(function () {
|
|
36
|
-
fiveEle.style.transition = 'none';
|
|
37
|
-
});
|
|
38
|
-
}
|
|
@@ -1,31 +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"] = createCanvasTextTexture;
|
|
9
|
-
|
|
10
|
-
var _three = require("three");
|
|
11
|
-
|
|
12
|
-
function createCanvasTextTexture(text, config) {
|
|
13
|
-
var _config$size, _config$fontSize, _config$backgroundCol, _config$fontColor, _config$textAlign;
|
|
14
|
-
|
|
15
|
-
var size = (_config$size = config === null || config === void 0 ? void 0 : config.size) !== null && _config$size !== void 0 ? _config$size : 512;
|
|
16
|
-
var fontSize = (_config$fontSize = config === null || config === void 0 ? void 0 : config.fontSize) !== null && _config$fontSize !== void 0 ? _config$fontSize : size * (35 / 256) * 1.2;
|
|
17
|
-
var backgroundColor = (_config$backgroundCol = config === null || config === void 0 ? void 0 : config.backgroundColor) !== null && _config$backgroundCol !== void 0 ? _config$backgroundCol : 'rgba(0,0,0,0)';
|
|
18
|
-
var fontColor = (_config$fontColor = config === null || config === void 0 ? void 0 : config.fontColor) !== null && _config$fontColor !== void 0 ? _config$fontColor : '#fff';
|
|
19
|
-
var textAlign = (_config$textAlign = config === null || config === void 0 ? void 0 : config.textAlign) !== null && _config$textAlign !== void 0 ? _config$textAlign : 'center';
|
|
20
|
-
var canvas = document.createElement('canvas');
|
|
21
|
-
canvas.setAttribute('width', size + '');
|
|
22
|
-
canvas.setAttribute('height', size + '');
|
|
23
|
-
var context = canvas.getContext('2d');
|
|
24
|
-
context.fillStyle = backgroundColor;
|
|
25
|
-
context.fillRect(0, 0, size, size);
|
|
26
|
-
context.font = "".concat(fontSize, "px \"\u5FAE\u8F6F\u96C5\u9ED1\"");
|
|
27
|
-
context.textAlign = textAlign;
|
|
28
|
-
context.fillStyle = fontColor;
|
|
29
|
-
context.fillText(text, size / 2, size * 0.7);
|
|
30
|
-
return new _three.CanvasTexture(canvas);
|
|
31
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FiveInitArgs } from '@realsee/five';
|
|
3
|
-
import { FiveProviderPropTypes } from '@realsee/five/react';
|
|
4
|
-
/**
|
|
5
|
-
* 创建一个Five App 容器:附带 Five 相关的 React Context & Hooks。
|
|
6
|
-
*
|
|
7
|
-
* @param workJson
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export default function createFiveContainer(workJson: Record<string, any>, fiveInitArgs?: FiveInitArgs, withOpt?: boolean, initialState?: FiveProviderPropTypes['initialState']): React.FC<{}>;
|
|
@@ -1,171 +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"] = createFiveContainer;
|
|
25
|
-
|
|
26
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
27
|
-
|
|
28
|
-
require("core-js/modules/es.object.assign.js");
|
|
29
|
-
|
|
30
|
-
var React = _interopRequireWildcard(require("react"));
|
|
31
|
-
|
|
32
|
-
var _five = require("@realsee/five");
|
|
33
|
-
|
|
34
|
-
var _react2 = require("@realsee/five/react");
|
|
35
|
-
|
|
36
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
37
|
-
|
|
38
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
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
|
-
/**
|
|
45
|
-
* 创建一个Five App 容器:附带 Five 相关的 React Context & Hooks。
|
|
46
|
-
*
|
|
47
|
-
* @param workJson
|
|
48
|
-
* @returns
|
|
49
|
-
*/
|
|
50
|
-
function createFiveContainer(workJson) {
|
|
51
|
-
var fiveInitArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
52
|
-
var withOpt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
53
|
-
var initialState = arguments.length > 3 ? arguments[3] : undefined;
|
|
54
|
-
var work = (0, _five.parseWork)(workJson);
|
|
55
|
-
var defaultInitArgs = {
|
|
56
|
-
imageOptions: {
|
|
57
|
-
size: 2048
|
|
58
|
-
},
|
|
59
|
-
textureOptions: {
|
|
60
|
-
size: 512
|
|
61
|
-
},
|
|
62
|
-
onlyRenderIfNeeds: true
|
|
63
|
-
};
|
|
64
|
-
var FiveProvider = (0, _react2.createFiveProvider)(Object.assign(defaultInitArgs, fiveInitArgs));
|
|
65
|
-
|
|
66
|
-
var FiveContainer = function FiveContainer(props) {
|
|
67
|
-
var _React$useState = React.useState({
|
|
68
|
-
width: 200,
|
|
69
|
-
height: 540
|
|
70
|
-
}),
|
|
71
|
-
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
|
72
|
-
wh = _React$useState2[0],
|
|
73
|
-
setWH = _React$useState2[1];
|
|
74
|
-
|
|
75
|
-
var ref = React.useRef(null);
|
|
76
|
-
var fixedHeightRef = React.useRef(false);
|
|
77
|
-
var resizeObserverRef = React.useRef(new ResizeObserver(function (entries) {
|
|
78
|
-
var entry = entries[0];
|
|
79
|
-
var width = entry.contentRect.width;
|
|
80
|
-
var height = fixedHeightRef.current ? wh.height : entry.contentRect.height;
|
|
81
|
-
if (!ref.current) return;
|
|
82
|
-
if (!resizeObserverRef.current) return;
|
|
83
|
-
setWH({
|
|
84
|
-
width: width,
|
|
85
|
-
height: height
|
|
86
|
-
});
|
|
87
|
-
}));
|
|
88
|
-
React.useEffect(function () {
|
|
89
|
-
if (!ref.current) return;
|
|
90
|
-
if (!resizeObserverRef.current) return;
|
|
91
|
-
var rootNd = document.querySelector('#root');
|
|
92
|
-
|
|
93
|
-
if (rootNd && rootNd.getAttribute('hidden') === 'true') {
|
|
94
|
-
fixedHeightRef.current = true;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
resizeObserverRef.current.observe(ref.current);
|
|
98
|
-
}, []);
|
|
99
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FiveProvider, {
|
|
100
|
-
initialState: initialState,
|
|
101
|
-
initialWork: work,
|
|
102
|
-
ref: function ref(_ref) {
|
|
103
|
-
return Object.assign(window, {
|
|
104
|
-
$five: _ref === null || _ref === void 0 ? void 0 : _ref.five,
|
|
105
|
-
$Five: _five.Five,
|
|
106
|
-
$THREE: THREE
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
110
|
-
ref: ref,
|
|
111
|
-
style: {
|
|
112
|
-
width: '100%',
|
|
113
|
-
height: '100%',
|
|
114
|
-
position: 'relative'
|
|
115
|
-
}
|
|
116
|
-
}, /*#__PURE__*/React.createElement(_react2.FiveCanvas, {
|
|
117
|
-
width: wh.width,
|
|
118
|
-
height: wh.height
|
|
119
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
120
|
-
style: {
|
|
121
|
-
position: 'absolute',
|
|
122
|
-
left: 0,
|
|
123
|
-
top: 0,
|
|
124
|
-
width: '100%',
|
|
125
|
-
height: '100%',
|
|
126
|
-
pointerEvents: 'none',
|
|
127
|
-
overflow: 'hidden'
|
|
128
|
-
}
|
|
129
|
-
}, props.children), withOpt && /*#__PURE__*/React.createElement(FiveOpt, null))));
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
return FiveContainer;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function FiveOpt() {
|
|
136
|
-
var _useFiveState = (0, _react2.useFiveState)(),
|
|
137
|
-
_useFiveState2 = (0, _slicedToArray2["default"])(_useFiveState, 2),
|
|
138
|
-
fiveState = _useFiveState2[0],
|
|
139
|
-
setFiveState = _useFiveState2[1];
|
|
140
|
-
|
|
141
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
142
|
-
className: "five-opt",
|
|
143
|
-
style: {
|
|
144
|
-
position: 'absolute',
|
|
145
|
-
bottom: '36px',
|
|
146
|
-
right: '24px',
|
|
147
|
-
display: 'flex',
|
|
148
|
-
flexDirection: 'column',
|
|
149
|
-
pointerEvents: 'all',
|
|
150
|
-
overflow: 'hidden'
|
|
151
|
-
}
|
|
152
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
153
|
-
className: (0, _classnames["default"])('pure-button pure-button-primary', {
|
|
154
|
-
'pure-button-disabled': fiveState.mode === _five.Five.Mode.Panorama
|
|
155
|
-
}),
|
|
156
|
-
onClick: function onClick() {
|
|
157
|
-
return setFiveState({
|
|
158
|
-
mode: _five.Five.Mode.Panorama
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
}, "\u5168\u666F\u6A21\u5F0F"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("button", {
|
|
162
|
-
className: (0, _classnames["default"])('pure-button pure-button-primary', {
|
|
163
|
-
'pure-button-disabled': fiveState.mode === _five.Five.Mode.Floorplan
|
|
164
|
-
}),
|
|
165
|
-
onClick: function onClick() {
|
|
166
|
-
return setFiveState({
|
|
167
|
-
mode: _five.Five.Mode.Floorplan
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}, "\u4E09\u7EF4\u6A21\u5F0F"));
|
|
171
|
-
}
|
|
@@ -1,43 +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"] = createLine;
|
|
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 createLine(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;
|
|
43
|
-
}
|
package/shared-utils/debounce.js
DELETED
|
@@ -1,30 +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"] = debounce;
|
|
9
|
-
|
|
10
|
-
require("core-js/modules/web.timers.js");
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 创建一个防抖动函数,该函数会在 wait 毫秒后调用 func 方法
|
|
14
|
-
* @param func - 要防抖动的函数
|
|
15
|
-
* @param [wait=0] - 需要延迟的毫秒数
|
|
16
|
-
*/
|
|
17
|
-
function debounce(func) {
|
|
18
|
-
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
|
|
19
|
-
var last;
|
|
20
|
-
return function () {
|
|
21
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22
|
-
args[_key] = arguments[_key];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
clearTimeout(last);
|
|
26
|
-
last = setTimeout(function () {
|
|
27
|
-
func.apply(void 0, args);
|
|
28
|
-
}, wait);
|
|
29
|
-
};
|
|
30
|
-
}
|
package/shared-utils/equal.js
DELETED
|
@@ -1,107 +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"] = equal;
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.number.is-nan.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.number.constructor.js");
|
|
15
|
-
|
|
16
|
-
require("core-js/modules/es.object.get-own-property-names.js");
|
|
17
|
-
|
|
18
|
-
require("core-js/modules/es.array.is-array.js");
|
|
19
|
-
|
|
20
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
21
|
-
|
|
22
|
-
var _isTruelyObject = _interopRequireDefault(require("./isTruelyObject"));
|
|
23
|
-
|
|
24
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
25
|
-
function baseIsEqual(value, other) {
|
|
26
|
-
if (value === other) return true;
|
|
27
|
-
if ((0, _typeof2["default"])(value) !== (0, _typeof2["default"])(other)) return false;
|
|
28
|
-
if (Number.isNaN(value) && Number.isNaN(other)) return true;
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function objEqualShallow(value, other) {
|
|
33
|
-
var valueProps = Object.getOwnPropertyNames(value);
|
|
34
|
-
var otherProps = Object.getOwnPropertyNames(other);
|
|
35
|
-
if (valueProps.length !== otherProps.length) return false;
|
|
36
|
-
|
|
37
|
-
for (var i = 0, len = valueProps.length; i < len; i++) {
|
|
38
|
-
var propName = valueProps[i];
|
|
39
|
-
if (!baseIsEqual(value[propName], other[propName])) return false;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function arrayEqualShallow(value, other) {
|
|
46
|
-
if (value.length !== other.length) return false;
|
|
47
|
-
|
|
48
|
-
for (var i = 0, len = value.length; i < len; i++) {
|
|
49
|
-
if (!baseIsEqual(value[i], other[i])) return false;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function isShallowEqual(value, other) {
|
|
56
|
-
if (baseIsEqual(value, other)) return true;
|
|
57
|
-
if ((0, _isTruelyObject["default"])(value) && (0, _isTruelyObject["default"])(other)) return objEqualShallow(value, other);
|
|
58
|
-
if (Array.isArray(value) && Array.isArray(other)) return arrayEqualShallow(value, other);
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function isDeepEqual(value, other) {
|
|
63
|
-
if (baseIsEqual(value, other)) return true;
|
|
64
|
-
if ((0, _isTruelyObject["default"])(value) && (0, _isTruelyObject["default"])(other)) return objEqualDeep(value, other);
|
|
65
|
-
if (Array.isArray(value) && Array.isArray(other)) return arrayEqualDeep(value, other);
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function arrayEqualDeep(value, other) {
|
|
70
|
-
if (value.length !== other.length) return false;
|
|
71
|
-
|
|
72
|
-
for (var i = 0, len = value.length; i < len; i++) {
|
|
73
|
-
if (!isDeepEqual(value[i], other[i])) return false;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function objEqualDeep(value, other) {
|
|
80
|
-
var valueProps = Object.getOwnPropertyNames(value);
|
|
81
|
-
var otherProps = Object.getOwnPropertyNames(other);
|
|
82
|
-
if (valueProps.length !== otherProps.length) return false;
|
|
83
|
-
|
|
84
|
-
for (var i = 0, len = valueProps.length; i < len; i++) {
|
|
85
|
-
var propName = valueProps[i];
|
|
86
|
-
if (!isDeepEqual(value[propName], other[propName])) return false;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* 对象比较
|
|
93
|
-
* @param {*} value 第一个比较的值
|
|
94
|
-
* @param {*} other 第二个比较的值
|
|
95
|
-
* @param {Object} options 可选参数,可选项包括:<br />
|
|
96
|
-
* deep {Boolean} 是否深比较<br />
|
|
97
|
-
* @returns {boolean} 是否相等
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
function equal(value, other) {
|
|
102
|
-
var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
103
|
-
deep: false
|
|
104
|
-
};
|
|
105
|
-
if (!opt.deep) return isShallowEqual(value, other);
|
|
106
|
-
return isDeepEqual(value, other);
|
|
107
|
-
}
|
package/shared-utils/filter.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.slice.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.function.name.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.array.from.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/es.string.iterator.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.symbol.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.symbol.description.js");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.symbol.iterator.js");
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/es.array.iterator.js");
|
|
20
|
-
|
|
21
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
22
|
-
|
|
23
|
-
require("core-js/modules/es.array.is-array.js");
|
|
24
|
-
|
|
25
|
-
require("core-js/modules/es.object.define-property.js");
|
|
26
|
-
|
|
27
|
-
require("core-js/modules/es.array.filter.js");
|
|
28
|
-
|
|
29
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
30
|
-
|
|
31
|
-
Object.defineProperty(exports, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
});
|
|
34
|
-
exports.filter = filter;
|
|
35
|
-
exports.mirror = mirror;
|
|
36
|
-
exports.omit = omit;
|
|
37
|
-
exports.pick = pick;
|
|
38
|
-
|
|
39
|
-
require("core-js/modules/es.array.for-each.js");
|
|
40
|
-
|
|
41
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
42
|
-
|
|
43
|
-
require("core-js/modules/es.object.keys.js");
|
|
44
|
-
|
|
45
|
-
require("core-js/modules/es.array.index-of.js");
|
|
46
|
-
|
|
47
|
-
var _tap = _interopRequireDefault(require("./tap"));
|
|
48
|
-
|
|
49
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
50
|
-
|
|
51
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
52
|
-
|
|
53
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 对象属性筛选函数。
|
|
57
|
-
* 基于已有对象生成一个满足条件(属性)新的对象。
|
|
58
|
-
* @param {object} object
|
|
59
|
-
* @param {Function} check
|
|
60
|
-
*/
|
|
61
|
-
function filter(object, check) {
|
|
62
|
-
return (0, _tap["default"])({}, function (result) {
|
|
63
|
-
Object.keys(object).forEach(function (key) {
|
|
64
|
-
var _key = key;
|
|
65
|
-
|
|
66
|
-
if (check(_key, object[_key])) {
|
|
67
|
-
result[_key] = object[_key];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* 对象镜子函数。
|
|
74
|
-
* 生成一个"镜子"对象:对象的属性名与其值相同。
|
|
75
|
-
* @param {string[]} strings 对象属性
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
function mirror(strings) {
|
|
80
|
-
return (0, _tap["default"])({}, function (result) {
|
|
81
|
-
var _iterator = _createForOfIteratorHelper(strings),
|
|
82
|
-
_step;
|
|
83
|
-
|
|
84
|
-
try {
|
|
85
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
86
|
-
var string = _step.value;
|
|
87
|
-
result[string] = string;
|
|
88
|
-
}
|
|
89
|
-
} catch (err) {
|
|
90
|
-
_iterator.e(err);
|
|
91
|
-
} finally {
|
|
92
|
-
_iterator.f();
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
|
|
98
|
-
* @param object
|
|
99
|
-
* @param props 排除的属性
|
|
100
|
-
* @return
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
function omit(object, props) {
|
|
105
|
-
return (0, _tap["default"])({}, function (result) {
|
|
106
|
-
for (var name in object) {
|
|
107
|
-
if (props.indexOf(name) !== -1) continue;
|
|
108
|
-
result[name] = object[name];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* 筛选需要的对象字段:实现从一个对象中选择某些指定属性生成新的对象(与`omit()`功能相反)。
|
|
114
|
-
* @param {object} object
|
|
115
|
-
* @param {string[]} props
|
|
116
|
-
* @return {object}
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
function pick(object, props) {
|
|
121
|
-
// eslint-disable-next-line no-return-assign
|
|
122
|
-
return (0, _tap["default"])({}, function (result) {
|
|
123
|
-
return props.forEach(function (prop) {
|
|
124
|
-
return result[prop] = object[prop];
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
}
|