@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,371 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.reflect.construct.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.weak-map.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.object.define-property.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
10
|
-
|
|
11
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
12
|
-
|
|
13
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
14
|
-
|
|
15
|
-
Object.defineProperty(exports, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
});
|
|
18
|
-
exports.ARVideoFigureMesh = void 0;
|
|
19
|
-
|
|
20
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
21
|
-
|
|
22
|
-
require("core-js/modules/es.array.map.js");
|
|
23
|
-
|
|
24
|
-
require("core-js/modules/es.array.iterator.js");
|
|
25
|
-
|
|
26
|
-
require("core-js/modules/es.object.to-string.js");
|
|
27
|
-
|
|
28
|
-
require("core-js/modules/es.string.iterator.js");
|
|
29
|
-
|
|
30
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
31
|
-
|
|
32
|
-
require("core-js/modules/web.url.js");
|
|
33
|
-
|
|
34
|
-
require("core-js/modules/web.url-search-params.js");
|
|
35
|
-
|
|
36
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
37
|
-
|
|
38
|
-
require("core-js/modules/es.string.replace.js");
|
|
39
|
-
|
|
40
|
-
require("core-js/modules/es.promise.js");
|
|
41
|
-
|
|
42
|
-
require("core-js/modules/web.timers.js");
|
|
43
|
-
|
|
44
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
45
|
-
|
|
46
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
47
|
-
|
|
48
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
49
|
-
|
|
50
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
51
|
-
|
|
52
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
53
|
-
|
|
54
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
55
|
-
|
|
56
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
57
|
-
|
|
58
|
-
var _Preloader = require("../../shared-utils/Preloader");
|
|
59
|
-
|
|
60
|
-
var _fragmentShader = require("./fragmentShader");
|
|
61
|
-
|
|
62
|
-
var _vertexShader = require("./vertexShader");
|
|
63
|
-
|
|
64
|
-
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); }
|
|
65
|
-
|
|
66
|
-
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; }
|
|
67
|
-
|
|
68
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
69
|
-
|
|
70
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
71
|
-
|
|
72
|
-
var ARVideoFigureMesh = /*#__PURE__*/function (_THREE$Mesh) {
|
|
73
|
-
(0, _inherits2["default"])(ARVideoFigureMesh, _THREE$Mesh);
|
|
74
|
-
|
|
75
|
-
var _super = _createSuper(ARVideoFigureMesh);
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
* @param width
|
|
80
|
-
* @param height
|
|
81
|
-
* @param widthSegments
|
|
82
|
-
* @param heightSegments
|
|
83
|
-
* @param options
|
|
84
|
-
*/
|
|
85
|
-
function ARVideoFigureMesh(width, height, widthSegments, heightSegments) {
|
|
86
|
-
var _this;
|
|
87
|
-
|
|
88
|
-
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
89
|
-
(0, _classCallCheck2["default"])(this, ARVideoFigureMesh);
|
|
90
|
-
|
|
91
|
-
if (!options.videoInstance) {
|
|
92
|
-
var videoInstance = document.createElement('video');
|
|
93
|
-
videoInstance.style.opacity = '0';
|
|
94
|
-
videoInstance.style.display = 'none';
|
|
95
|
-
videoInstance.playsInline = true;
|
|
96
|
-
document.body.append(videoInstance);
|
|
97
|
-
options.videoInstance = videoInstance;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
var geometry = new THREE.PlaneGeometry(width, height, widthSegments, heightSegments);
|
|
101
|
-
var videoTexture = new THREE.VideoTexture(options.videoInstance);
|
|
102
|
-
var material = new THREE.ShaderMaterial({
|
|
103
|
-
uniforms: {
|
|
104
|
-
map: {
|
|
105
|
-
value: videoTexture
|
|
106
|
-
},
|
|
107
|
-
enable: {
|
|
108
|
-
value: 0
|
|
109
|
-
},
|
|
110
|
-
range: {
|
|
111
|
-
value: 0.15
|
|
112
|
-
},
|
|
113
|
-
edge0: {
|
|
114
|
-
value: 0.1
|
|
115
|
-
},
|
|
116
|
-
edge1: {
|
|
117
|
-
value: 0.3
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
vertexShader: _vertexShader.vertexShader,
|
|
121
|
-
fragmentShader: (0, _fragmentShader.fragmentShaderTpl)(),
|
|
122
|
-
transparent: true
|
|
123
|
-
});
|
|
124
|
-
_this = _super.call(this, geometry, material);
|
|
125
|
-
_this.options = options;
|
|
126
|
-
_this.freeze = false;
|
|
127
|
-
return _this;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
(0, _createClass2["default"])(ARVideoFigureMesh, [{
|
|
131
|
-
key: "paused",
|
|
132
|
-
get: function get() {
|
|
133
|
-
return !!this.videoInstance.paused;
|
|
134
|
-
}
|
|
135
|
-
}, {
|
|
136
|
-
key: "videoInstance",
|
|
137
|
-
get: function get() {
|
|
138
|
-
var uniforms = this.material.uniforms;
|
|
139
|
-
var videoInstance = uniforms.map.value.image;
|
|
140
|
-
return videoInstance;
|
|
141
|
-
}
|
|
142
|
-
}, {
|
|
143
|
-
key: "uniforms",
|
|
144
|
-
get: function get() {
|
|
145
|
-
var uniforms = this.material.uniforms;
|
|
146
|
-
return uniforms;
|
|
147
|
-
}
|
|
148
|
-
}, {
|
|
149
|
-
key: "update",
|
|
150
|
-
value: function () {
|
|
151
|
-
var _update = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(videoUrl) {
|
|
152
|
-
var _this2 = this;
|
|
153
|
-
|
|
154
|
-
var onStart;
|
|
155
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
156
|
-
while (1) {
|
|
157
|
-
switch (_context.prev = _context.next) {
|
|
158
|
-
case 0:
|
|
159
|
-
if (!(this.videoUrl === videoUrl)) {
|
|
160
|
-
_context.next = 2;
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return _context.abrupt("return");
|
|
165
|
-
|
|
166
|
-
case 2:
|
|
167
|
-
this.videoUrl = videoUrl;
|
|
168
|
-
this.freeze = true;
|
|
169
|
-
_context.next = 6;
|
|
170
|
-
return this.videoInstance.pause();
|
|
171
|
-
|
|
172
|
-
case 6:
|
|
173
|
-
_context.t0 = URL;
|
|
174
|
-
_context.next = 9;
|
|
175
|
-
return _Preloader.Preloader.blob(this.videoUrl);
|
|
176
|
-
|
|
177
|
-
case 9:
|
|
178
|
-
_context.t1 = _context.sent;
|
|
179
|
-
_context.next = 12;
|
|
180
|
-
return _context.t0.createObjectURL.call(_context.t0, _context.t1);
|
|
181
|
-
|
|
182
|
-
case 12:
|
|
183
|
-
this.videoInstance.src = _context.sent;
|
|
184
|
-
this.videoInstance.setAttribute('data-src', this.videoUrl);
|
|
185
|
-
|
|
186
|
-
onStart = function onStart() {
|
|
187
|
-
if (_this2.videoInstance.currentTime === 0) return;
|
|
188
|
-
_this2.uniforms.enable.value = 1;
|
|
189
|
-
_this2.freeze = false;
|
|
190
|
-
|
|
191
|
-
_this2.videoInstance.removeEventListener('timeupdate', onStart, false);
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
this.videoInstance.addEventListener('timeupdate', onStart, false);
|
|
195
|
-
|
|
196
|
-
case 16:
|
|
197
|
-
case "end":
|
|
198
|
-
return _context.stop();
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}, _callee, this);
|
|
202
|
-
}));
|
|
203
|
-
|
|
204
|
-
function update(_x) {
|
|
205
|
-
return _update.apply(this, arguments);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return update;
|
|
209
|
-
}()
|
|
210
|
-
}, {
|
|
211
|
-
key: "updateUniforms",
|
|
212
|
-
value: function updateUniforms(_ref) {
|
|
213
|
-
var range = _ref.range,
|
|
214
|
-
edge0 = _ref.edge0,
|
|
215
|
-
edge1 = _ref.edge1;
|
|
216
|
-
this.uniforms.range.value = isNaN(range) ? 0.15 : range;
|
|
217
|
-
this.uniforms.edge0.value = isNaN(edge0) ? 0.1 : edge0;
|
|
218
|
-
this.uniforms.edge1.value = isNaN(edge1) ? 0.1 : edge1;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* 暂停视频播放
|
|
222
|
-
* @returns
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
|
-
}, {
|
|
226
|
-
key: "pause",
|
|
227
|
-
value: function () {
|
|
228
|
-
var _pause = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
229
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
230
|
-
while (1) {
|
|
231
|
-
switch (_context2.prev = _context2.next) {
|
|
232
|
-
case 0:
|
|
233
|
-
_context2.next = 2;
|
|
234
|
-
return this.videoInstance.pause();
|
|
235
|
-
|
|
236
|
-
case 2:
|
|
237
|
-
return _context2.abrupt("return", _context2.sent);
|
|
238
|
-
|
|
239
|
-
case 3:
|
|
240
|
-
case "end":
|
|
241
|
-
return _context2.stop();
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}, _callee2, this);
|
|
245
|
-
}));
|
|
246
|
-
|
|
247
|
-
function pause() {
|
|
248
|
-
return _pause.apply(this, arguments);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
return pause;
|
|
252
|
-
}()
|
|
253
|
-
/**
|
|
254
|
-
* 播放视频:
|
|
255
|
-
* - 如果没有提供 `videoUrl`,则播放上一个视频
|
|
256
|
-
* - 如果提供 `videoUrl`,则重头开始播放
|
|
257
|
-
* @param videoUrl 视频地址
|
|
258
|
-
* @returns
|
|
259
|
-
*/
|
|
260
|
-
|
|
261
|
-
}, {
|
|
262
|
-
key: "play",
|
|
263
|
-
value: function () {
|
|
264
|
-
var _play = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
265
|
-
var _this3 = this;
|
|
266
|
-
|
|
267
|
-
var videoUrl,
|
|
268
|
-
_args4 = arguments;
|
|
269
|
-
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
270
|
-
while (1) {
|
|
271
|
-
switch (_context4.prev = _context4.next) {
|
|
272
|
-
case 0:
|
|
273
|
-
videoUrl = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : '';
|
|
274
|
-
videoUrl = (videoUrl || '').replace(/https*:/, '');
|
|
275
|
-
|
|
276
|
-
if (videoUrl) {
|
|
277
|
-
_context4.next = 10;
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
if (!this.videoUrl) {
|
|
282
|
-
_context4.next = 8;
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
_context4.next = 6;
|
|
287
|
-
return this.videoInstance.play();
|
|
288
|
-
|
|
289
|
-
case 6:
|
|
290
|
-
_context4.next = 9;
|
|
291
|
-
break;
|
|
292
|
-
|
|
293
|
-
case 8:
|
|
294
|
-
console.warn('警告:视频资源未初始化。');
|
|
295
|
-
|
|
296
|
-
case 9:
|
|
297
|
-
return _context4.abrupt("return", true);
|
|
298
|
-
|
|
299
|
-
case 10:
|
|
300
|
-
if (!(videoUrl === this.videoUrl)) {
|
|
301
|
-
_context4.next = 15;
|
|
302
|
-
break;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
this.videoInstance.currentTime = 0;
|
|
306
|
-
_context4.next = 14;
|
|
307
|
-
return this.videoInstance.play();
|
|
308
|
-
|
|
309
|
-
case 14:
|
|
310
|
-
return _context4.abrupt("return", true);
|
|
311
|
-
|
|
312
|
-
case 15:
|
|
313
|
-
_context4.next = 17;
|
|
314
|
-
return this.update(videoUrl);
|
|
315
|
-
|
|
316
|
-
case 17:
|
|
317
|
-
this.videoInstance.pause();
|
|
318
|
-
_context4.next = 20;
|
|
319
|
-
return new Promise(function (resolve) {
|
|
320
|
-
return setTimeout( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
321
|
-
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
322
|
-
while (1) {
|
|
323
|
-
switch (_context3.prev = _context3.next) {
|
|
324
|
-
case 0:
|
|
325
|
-
_this3.videoInstance.currentTime = 0;
|
|
326
|
-
_context3.next = 3;
|
|
327
|
-
return _this3.videoInstance.play();
|
|
328
|
-
|
|
329
|
-
case 3:
|
|
330
|
-
resolve(true);
|
|
331
|
-
|
|
332
|
-
case 4:
|
|
333
|
-
case "end":
|
|
334
|
-
return _context3.stop();
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}, _callee3);
|
|
338
|
-
})), 20);
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
case 20:
|
|
342
|
-
return _context4.abrupt("return", _context4.sent);
|
|
343
|
-
|
|
344
|
-
case 21:
|
|
345
|
-
case "end":
|
|
346
|
-
return _context4.stop();
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}, _callee4, this);
|
|
350
|
-
}));
|
|
351
|
-
|
|
352
|
-
function play() {
|
|
353
|
-
return _play.apply(this, arguments);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
return play;
|
|
357
|
-
}()
|
|
358
|
-
/**
|
|
359
|
-
* 转成毫秒,保障精准度
|
|
360
|
-
*/
|
|
361
|
-
|
|
362
|
-
}, {
|
|
363
|
-
key: "currentTime",
|
|
364
|
-
get: function get() {
|
|
365
|
-
return this.videoInstance.currentTime * 1000;
|
|
366
|
-
}
|
|
367
|
-
}]);
|
|
368
|
-
return ARVideoFigureMesh;
|
|
369
|
-
}(THREE.Mesh);
|
|
370
|
-
|
|
371
|
-
exports.ARVideoFigureMesh = ARVideoFigureMesh;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { ARVideoFigureMesh } from './ARVideoFigureMesh';
|
|
3
|
-
export declare class ARVideoFigureScene {
|
|
4
|
-
scene: THREE.Scene;
|
|
5
|
-
renderer: THREE.WebGLRenderer;
|
|
6
|
-
camera: THREE.OrthographicCamera;
|
|
7
|
-
mesh: ARVideoFigureMesh;
|
|
8
|
-
get videoInstance(): HTMLVideoElement;
|
|
9
|
-
constructor(container: HTMLElement);
|
|
10
|
-
run: () => void;
|
|
11
|
-
}
|
|
@@ -1,85 +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.ARVideoFigureScene = void 0;
|
|
25
|
-
|
|
26
|
-
require("core-js/modules/es.array.concat.js");
|
|
27
|
-
|
|
28
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
29
|
-
|
|
30
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
31
|
-
|
|
32
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
33
|
-
|
|
34
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
35
|
-
|
|
36
|
-
var _ARVideoFigureMesh = require("./ARVideoFigureMesh");
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
var ARVideoFigureScene = /*#__PURE__*/function () {
|
|
43
|
-
function ARVideoFigureScene(container) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
|
|
46
|
-
(0, _classCallCheck2["default"])(this, ARVideoFigureScene);
|
|
47
|
-
(0, _defineProperty2["default"])(this, "scene", new THREE.Scene());
|
|
48
|
-
(0, _defineProperty2["default"])(this, "renderer", new THREE.WebGLRenderer({
|
|
49
|
-
alpha: true
|
|
50
|
-
}));
|
|
51
|
-
(0, _defineProperty2["default"])(this, "run", function () {
|
|
52
|
-
if (!_this.mesh.freeze) {
|
|
53
|
-
_this.renderer.render(_this.scene, _this.camera);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
requestAnimationFrame(_this.run);
|
|
57
|
-
});
|
|
58
|
-
var state = {
|
|
59
|
-
width: container.offsetWidth,
|
|
60
|
-
height: container.offsetHeight
|
|
61
|
-
};
|
|
62
|
-
this.camera = new THREE.OrthographicCamera(-state.width / 2, state.width / 2, state.height / 2, -state.height / 2);
|
|
63
|
-
this.camera.position.set(0, 0, 10);
|
|
64
|
-
this.camera.lookAt(0, 0, 0);
|
|
65
|
-
var domElement = this.renderer.domElement;
|
|
66
|
-
domElement.classList.add('ARVideoFigureScene-canvas');
|
|
67
|
-
this.renderer.setSize(state.width * window.devicePixelRatio, state.height * window.devicePixelRatio);
|
|
68
|
-
domElement.setAttribute('style', "width: ".concat(state.width, "px;height: ").concat(state.height, "px;"));
|
|
69
|
-
this.mesh = new _ARVideoFigureMesh.ARVideoFigureMesh(state.width, state.height, 1, 1);
|
|
70
|
-
container.append(domElement);
|
|
71
|
-
this.scene.add(this.mesh);
|
|
72
|
-
this.renderer.render(this.scene, this.camera);
|
|
73
|
-
this.run();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
(0, _createClass2["default"])(ARVideoFigureScene, [{
|
|
77
|
-
key: "videoInstance",
|
|
78
|
-
get: function get() {
|
|
79
|
-
return this.mesh.videoInstance;
|
|
80
|
-
}
|
|
81
|
-
}]);
|
|
82
|
-
return ARVideoFigureScene;
|
|
83
|
-
}();
|
|
84
|
-
|
|
85
|
-
exports.ARVideoFigureScene = ARVideoFigureScene;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ImgBgTransparentScene } from './ImgBgTransparentMesh';
|
|
3
|
-
export interface ImgBgTransparentProps {
|
|
4
|
-
imgUrl: string;
|
|
5
|
-
className?: string;
|
|
6
|
-
imgBgTransparentSceneRef?: (imgBgTransparentScene: ImgBgTransparentScene) => void;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* **透明背景** 与 **AR 视频形象** `ARVideoFigure` 实现原理一致,不过此组件仅针对图片。
|
|
10
|
-
*
|
|
11
|
-
* 生产环境中还是建议直接采用 `png` 这类支持透明背景的图片。在实际业务落地过程中,如果视频文件生成比较滞后,你可以先通过对应图片来预览效果,调试相关参数。
|
|
12
|
-
*
|
|
13
|
-
* @param props
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
export declare function ImgBgTransparent(props: ImgBgTransparentProps): JSX.Element;
|
|
@@ -1,65 +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.ImgBgTransparent = ImgBgTransparent;
|
|
25
|
-
|
|
26
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
27
|
-
|
|
28
|
-
require("core-js/modules/es.object.assign.js");
|
|
29
|
-
|
|
30
|
-
var React = _interopRequireWildcard(require("react"));
|
|
31
|
-
|
|
32
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
33
|
-
|
|
34
|
-
var _ImgBgTransparentMesh = require("./ImgBgTransparentMesh");
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* **透明背景** 与 **AR 视频形象** `ARVideoFigure` 实现原理一致,不过此组件仅针对图片。
|
|
42
|
-
*
|
|
43
|
-
* 生产环境中还是建议直接采用 `png` 这类支持透明背景的图片。在实际业务落地过程中,如果视频文件生成比较滞后,你可以先通过对应图片来预览效果,调试相关参数。
|
|
44
|
-
*
|
|
45
|
-
* @param props
|
|
46
|
-
* @returns
|
|
47
|
-
*/
|
|
48
|
-
function ImgBgTransparent(props) {
|
|
49
|
-
var ref = React.useRef(null);
|
|
50
|
-
React.useEffect(function () {
|
|
51
|
-
if (!ref.current) return;
|
|
52
|
-
var imgBgTransparentScene = new _ImgBgTransparentMesh.ImgBgTransparentScene(ref.current, props.imgUrl);
|
|
53
|
-
Object.assign(window, {
|
|
54
|
-
$imgBgTransparentScene: imgBgTransparentScene
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
if (props.imgBgTransparentSceneRef) {
|
|
58
|
-
props.imgBgTransparentSceneRef(imgBgTransparentScene);
|
|
59
|
-
}
|
|
60
|
-
}, []);
|
|
61
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
62
|
-
className: (0, _classnames["default"])('ImgBgTransparent', (0, _defineProperty2["default"])({}, props.className + '', !!props.className)),
|
|
63
|
-
ref: ref
|
|
64
|
-
});
|
|
65
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
export declare class ImgBgTransparentMesh extends THREE.Mesh {
|
|
3
|
-
imgUrl?: string;
|
|
4
|
-
freeze: boolean;
|
|
5
|
-
get imageTexture(): THREE.Texture;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param imgUrl
|
|
9
|
-
* @param width
|
|
10
|
-
* @param height
|
|
11
|
-
* @param widthSegments
|
|
12
|
-
* @param heightSegments
|
|
13
|
-
*/
|
|
14
|
-
constructor(imgUrl: string, width: number, height: number, widthSegments: number, heightSegments: number, onLoad?: (texture: THREE.Texture) => void);
|
|
15
|
-
private get uniforms();
|
|
16
|
-
setHidden(hidden: boolean): void;
|
|
17
|
-
updateUniforms({ range, edge0, edge1 }: {
|
|
18
|
-
range: number;
|
|
19
|
-
edge0: number;
|
|
20
|
-
edge1: number;
|
|
21
|
-
}): void;
|
|
22
|
-
}
|
|
23
|
-
export declare class ImgBgTransparentScene {
|
|
24
|
-
scene: THREE.Scene;
|
|
25
|
-
renderer: THREE.WebGLRenderer;
|
|
26
|
-
camera: THREE.OrthographicCamera;
|
|
27
|
-
mesh: ImgBgTransparentMesh;
|
|
28
|
-
constructor(container: HTMLElement, imgUrl: string);
|
|
29
|
-
render(): void;
|
|
30
|
-
}
|