@realsee/five-webgpu 1.0.0-alpha.13 → 1.0.0-alpha.15
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/_virtual/_rolldown/runtime.js +3 -3
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/index.AdaptiveLuminancePass.html +1 -1
- package/docs/classes/index.BoundingMesh.html +1 -1
- package/docs/classes/index.Camera.html +1 -1
- package/docs/classes/index.EyeDomeLightingPass.html +1 -1
- package/docs/classes/index.Five.html +65 -64
- package/docs/classes/index.FivePass.html +1 -1
- package/docs/classes/index.FiveRenderer.html +4 -4
- package/docs/classes/index.FlowingFireworks3DPass.html +1 -1
- package/docs/classes/index.FlowingLight2DPass.html +1 -1
- package/docs/classes/index.FlowingLight3DPass.html +1 -1
- package/docs/classes/index.GaussianBlurPass.html +1 -1
- package/docs/classes/index.InternalWebGPURenderer.html +4 -4
- package/docs/classes/index.Model.html +1 -1
- package/docs/classes/index.ModelScene.html +1 -1
- package/docs/classes/index.NetworkSubscribe.html +1 -1
- package/docs/classes/index.PBMCustomNode.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingObject.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +1 -1
- package/docs/classes/index.PBMGroup.html +1 -1
- package/docs/classes/index.PBMMesh.html +1 -1
- package/docs/classes/index.PBMMeshBasicMaterial.html +1 -1
- package/docs/classes/index.PBMMeshBasicNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhongMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhongNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhysicalMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +1 -1
- package/docs/classes/index.PBMPanoFilter.html +1 -1
- package/docs/classes/index.PBMPointCloud.html +1 -1
- package/docs/classes/index.PBMPointCloudMaterial.html +1 -1
- package/docs/classes/index.PBMSkinnedMesh.html +1 -1
- package/docs/classes/index.PBMUpdateable.html +1 -1
- package/docs/classes/index.PanoCircleMesh.html +9 -5
- package/docs/classes/index.PanoCircleMeshCustom.html +9 -5
- package/docs/classes/index.PanoCircleMeshSolid.html +9 -5
- package/docs/classes/index.Parameter.html +1 -1
- package/docs/classes/index.Scene.html +1 -1
- package/docs/classes/index.Subscribe.html +1 -1
- package/docs/classes/index.Tile3D.html +1 -1
- package/docs/classes/index.TileNode.html +1 -1
- package/docs/classes/index.TrajectoryNode.html +1 -1
- package/docs/classes/index.Work.html +15 -22
- package/docs/classes/index.WorkResolvedObserver.html +22 -22
- package/docs/functions/index.createWorks.html +1 -1
- package/docs/functions/index.parseWork.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/index.AddableObject.html +1 -1
- package/docs/interfaces/index.AjaxOptions.html +1 -1
- package/docs/interfaces/index.BaseEvent.html +1 -1
- package/docs/interfaces/index.Clock.html +1 -1
- package/docs/interfaces/index.EventCallback.html +3 -3
- package/docs/interfaces/index.GestureEvent.html +1 -1
- package/docs/interfaces/index.IPBMMaterial.html +1 -1
- package/docs/interfaces/index.ImageOptions.html +1 -1
- package/docs/interfaces/index.IntersectEvent.html +1 -1
- package/docs/interfaces/index.IntersectMesh.html +1 -1
- package/docs/interfaces/index.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/index.Intersection.html +1 -1
- package/docs/interfaces/index.LooseWorkObserver.html +2 -2
- package/docs/interfaces/index.LooseWorkPanorama.html +2 -2
- package/docs/interfaces/index.LooseWorkWithExtrinsics.html +8 -8
- package/docs/interfaces/index.ModeChangeEvent.html +1 -1
- package/docs/interfaces/index.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ModelEvent.html +1 -1
- package/docs/interfaces/index.ModelSceneEvent.html +1 -1
- package/docs/interfaces/index.ModelTileEvent.html +1 -1
- package/docs/interfaces/index.MovePanoOptions.html +1 -1
- package/docs/interfaces/index.NetworkAbortError.html +1 -1
- package/docs/interfaces/index.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/index.NetworkOptions.html +1 -1
- package/docs/interfaces/index.NetworkProxyError.html +1 -1
- package/docs/interfaces/index.NetworkResourceEvent.html +1 -1
- package/docs/interfaces/index.NetworkResponseError.html +1 -1
- package/docs/interfaces/index.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/index.ObjectEvent.html +1 -1
- package/docs/interfaces/index.PanoCircleMeshInterface.html +8 -4
- package/docs/interfaces/index.PanoCircleMeshOptions.html +2 -2
- package/docs/interfaces/index.PanoCircleMeshSolidOptions.html +2 -2
- package/docs/interfaces/index.PanoEvent.html +1 -1
- package/docs/interfaces/index.PanoPrepareEvent.html +1 -1
- package/docs/interfaces/index.PanoTextureEvent.html +1 -1
- package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ParameterMaterialValue.html +1 -1
- package/docs/interfaces/index.ParameterTilesetValue.html +1 -1
- package/docs/interfaces/index.ParameterValue.html +1 -1
- package/docs/interfaces/index.Pose.html +1 -1
- package/docs/interfaces/index.RenderEvent.html +1 -1
- package/docs/interfaces/index.ResolvedParameterValue.html +1 -1
- package/docs/interfaces/index.State.html +1 -1
- package/docs/interfaces/index.StateEvent.html +1 -1
- package/docs/interfaces/index.TextureOptions.html +1 -1
- package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ViewLayer.html +1 -1
- package/docs/interfaces/index.WorkCubeHdrGainmapImage.html +2 -2
- package/docs/interfaces/index.WorkCubeImage.html +2 -2
- package/docs/interfaces/index.WorkImage.html +5 -5
- package/docs/interfaces/index.WorkInitial.html +8 -8
- package/docs/interfaces/index.WorkInitialJson.html +2 -2
- package/docs/interfaces/index.WorkJson.html +2 -4
- package/docs/interfaces/index.WorkModel.html +8 -8
- package/docs/interfaces/index.WorkModelJson.html +2 -2
- package/docs/interfaces/index.WorkModelLayer.html +6 -6
- package/docs/interfaces/index.WorkModelLayerJson.html +2 -2
- package/docs/interfaces/index.WorkObserver.html +23 -23
- package/docs/interfaces/index.WorkObserverJson.html +2 -2
- package/docs/interfaces/index.WorkPanoramaJson.html +2 -2
- package/docs/interfaces/index.WorkPanoramasJson.html +2 -2
- package/docs/interfaces/index.WorkTile.html +5 -5
- package/docs/interfaces/index.WorkVideo.html +4 -4
- package/docs/interfaces/index.WorksEvent.html +1 -1
- package/docs/interfaces/index.XRControllerEvent.html +1 -1
- package/docs/interfaces/index.XRGestureEvent.html +2 -2
- package/docs/interfaces/index.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.XRSessionEvent.html +1 -1
- package/docs/modules/index.html +1 -1
- package/docs/types/index.LegacyEventType.html +3 -3
- package/docs/types/index.OutputTextureDataType.html +1 -1
- package/docs/types/index.ParseOptions.html +8 -8
- package/docs/types/index.PointCloudTransparencyMode.html +2 -0
- package/docs/types/index.Works.html +1 -1
- package/docs/variables/index.loadAt3d.html +2 -0
- package/docs/variables/index.loadDome.html +2 -0
- package/docs/variables/index.loadDomez.html +2 -0
- package/docs/variables/index.loadGltf.html +2 -0
- package/docs/variables/index.loadPbm.html +2 -0
- package/docs/variables/index.loadPly.html +2 -0
- package/five/application/five.d.ts +3 -2
- package/five/chunks/at3d.js +338 -0
- package/five/chunks/at3d.mjs +338 -0
- package/five/chunks/dome.js +338 -0
- package/five/chunks/dome.mjs +338 -0
- package/five/chunks/domez.js +338 -0
- package/five/chunks/domez.mjs +338 -0
- package/five/chunks/fbx.js +338 -0
- package/five/chunks/fbx.mjs +338 -0
- package/five/chunks/fflate.js +338 -0
- package/five/chunks/fflate.mjs +338 -0
- package/five/chunks/glTF-helpers.js +804 -0
- package/five/chunks/glTF-helpers.mjs +804 -0
- package/five/chunks/gltf.js +338 -0
- package/five/chunks/gltf.mjs +338 -0
- package/five/chunks/imageBitmap.js +338 -0
- package/five/chunks/imageBitmap.mjs +338 -0
- package/five/chunks/imageSupport.js +338 -0
- package/five/chunks/imageSupport.mjs +338 -0
- package/five/chunks/lzma.js +383 -0
- package/five/chunks/lzma.mjs +383 -0
- package/five/chunks/memoryUsage.js +339 -0
- package/five/chunks/memoryUsage.mjs +339 -0
- package/five/chunks/minimal.js +338 -0
- package/five/chunks/minimal.mjs +338 -0
- package/five/chunks/pbm.js +338 -0
- package/five/chunks/pbm.mjs +338 -0
- package/five/chunks/pbmGaussianSplattingObject.js +338 -0
- package/five/chunks/pbmGaussianSplattingObject.mjs +338 -0
- package/five/chunks/pbmMeshMaterial.js +338 -0
- package/five/chunks/pbmMeshMaterial.mjs +338 -0
- package/five/chunks/pick.js +338 -0
- package/five/chunks/pick.mjs +338 -0
- package/five/chunks/ply.js +339 -0
- package/five/chunks/ply.mjs +339 -0
- package/five/chunks/spz.js +364 -0
- package/five/chunks/spz.mjs +364 -0
- package/five/controllers/panorama.d.ts +6 -0
- package/five/core/webglBlendEquationFix.d.ts +41 -0
- package/five/index.d.ts +0 -1
- package/five/index.js +49 -626
- package/five/index.mjs +229 -32052
- package/five/meshes/panoCircleMesh.d.ts +1 -0
- package/five/meshes/panoCircleMeshCustom.d.ts +1 -0
- package/five/meshes/panoCircleMeshSolid.d.ts +1 -0
- package/five/meshes/panoSphereMesh.d.ts +1 -0
- package/five/model/index.d.ts +18 -6
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +1 -1
- package/five/model/loaders/spz.d.ts +1 -2
- package/five/model/loaders/spz.worker.d.ts +37 -0
- package/five/renderer/five-renderer.d.ts +1 -1
- package/five/renderer/index.d.ts +1 -1
- package/five/renderer/postprocessing/passes/pass.js +3 -3
- package/five/renderer/postprocessing/passes/pass.mjs +3 -3
- package/five/renderer/tools/full-screen-quad.js +3 -3
- package/five/renderer/tools/full-screen-quad.mjs +3 -3
- package/five/texture/initTexture.d.ts +8 -0
- package/five/texture/videoTextureBridge.d.ts +124 -15
- package/five/thirdparty/sha256.d.ts +149 -0
- package/five/types/panoCircleMeshInterface.d.ts +6 -0
- package/five/utils/calculateThreeMouse.js +3 -3
- package/five/utils/calculateThreeMouse.mjs +3 -3
- package/five/utils/distance.js +3 -3
- package/five/utils/distance.mjs +3 -3
- package/five/utils/isNil.js +3 -3
- package/five/utils/isNil.mjs +3 -3
- package/five/utils/memoryUsage.d.ts +1 -1
- package/five/utils/uuid.js +3 -3
- package/five/utils/uuid.mjs +3 -3
- package/five/work/looseWorkType.d.ts +2 -2
- package/five/work/work.d.ts +1 -8
- package/five/work/workJsonType.d.ts +2 -4
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -50
- package/line/index.js +3 -3
- package/line/index.mjs +3 -88
- package/package.json +1 -1
- package/plugins/BackgroundPlugin/Controller.js +4 -4
- package/plugins/BackgroundPlugin/Controller.mjs +4 -4
- package/plugins/BackgroundPlugin/index.js +3 -3
- package/plugins/BackgroundPlugin/index.mjs +3 -3
- package/plugins/BasePlugin/index.js +3 -3
- package/plugins/BasePlugin/index.mjs +3 -3
- package/plugins/CSS2DPlugin/Controller.js +3 -3
- package/plugins/CSS2DPlugin/Controller.mjs +3 -3
- package/plugins/CSS2DPlugin/index.js +3 -3
- package/plugins/CSS2DPlugin/index.mjs +3 -3
- package/plugins/CSS2DPlugin/style.css_raw.js +4 -4
- package/plugins/CSS2DPlugin/style.css_raw.mjs +4 -4
- package/plugins/CSS3DPlugin/Controller.js +3 -3
- package/plugins/CSS3DPlugin/Controller.mjs +3 -3
- package/plugins/CSS3DPlugin/index.js +3 -3
- package/plugins/CSS3DPlugin/index.mjs +3 -3
- package/plugins/CSS3DPlugin/style.css_raw.js +4 -4
- package/plugins/CSS3DPlugin/style.css_raw.mjs +4 -4
- package/plugins/FloorplanPlugin/Controller.js +3 -3
- package/plugins/FloorplanPlugin/Controller.mjs +3 -3
- package/plugins/FloorplanPlugin/index.js +3 -3
- package/plugins/FloorplanPlugin/index.mjs +3 -3
- package/plugins/FloorplanPlugin/render/assets.js +3 -3
- package/plugins/FloorplanPlugin/render/assets.mjs +3 -3
- package/plugins/FloorplanPlugin/render/index.js +3 -3
- package/plugins/FloorplanPlugin/render/index.mjs +3 -3
- package/plugins/FloorplanPlugin/render/isPointInPolygon.js +3 -3
- package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +3 -3
- package/plugins/FloorplanPlugin/render/renderFloor.js +3 -3
- package/plugins/FloorplanPlugin/render/renderFloor.mjs +3 -3
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +3 -3
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +3 -3
- package/plugins/FloorplanPlugin/render/style.css_raw.js +4 -4
- package/plugins/FloorplanPlugin/render/style.css_raw.mjs +4 -4
- package/plugins/FloorplanPlugin/utils/changeMode.js +3 -3
- package/plugins/FloorplanPlugin/utils/changeMode.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +3 -3
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/correctFiveState.js +3 -3
- package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/equal.js +3 -3
- package/plugins/FloorplanPlugin/utils/equal.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/filter.js +3 -3
- package/plugins/FloorplanPlugin/utils/filter.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +3 -3
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/formatData.js +3 -3
- package/plugins/FloorplanPlugin/utils/formatData.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +3 -3
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/formatPosition.js +3 -3
- package/plugins/FloorplanPlugin/utils/formatPosition.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +3 -3
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/getPxmm.js +3 -3
- package/plugins/FloorplanPlugin/utils/getPxmm.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/isTruelyObject.js +3 -3
- package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/nearlyEqual.js +3 -3
- package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/polylabel.js +3 -3
- package/plugins/FloorplanPlugin/utils/polylabel.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/to.js +3 -3
- package/plugins/FloorplanPlugin/utils/to.mjs +3 -3
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +3 -3
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +3 -3
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +3 -3
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controller.js +3 -3
- package/plugins/Object3DHelperPlugin/Controller.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +3 -3
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +3 -3
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +3 -3
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +3 -3
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +3 -3
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +3 -3
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/constant.js +3 -3
- package/plugins/Object3DHelperPlugin/constant.mjs +3 -3
- package/plugins/Object3DHelperPlugin/index.js +3 -3
- package/plugins/Object3DHelperPlugin/index.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/direction.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/direction.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/solidGuide.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/tipsDom.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +3 -3
- package/plugins/PanoAnimePlugin/Controller.js +3 -3
- package/plugins/PanoAnimePlugin/Controller.mjs +3 -3
- package/plugins/PanoAnimePlugin/index.js +3 -3
- package/plugins/PanoAnimePlugin/index.mjs +3 -3
- package/plugins/WordPassPlugin/Controller.js +3 -3
- package/plugins/WordPassPlugin/Controller.mjs +3 -3
- package/plugins/WordPassPlugin/hersheyFont.js +3 -3
- package/plugins/WordPassPlugin/hersheyFont.mjs +3 -3
- package/plugins/WordPassPlugin/index.js +3 -3
- package/plugins/WordPassPlugin/index.mjs +3 -3
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +4 -4
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +4 -4
- package/plugins/WordPassPlugin/word-pass.js +3 -3
- package/plugins/WordPassPlugin/word-pass.mjs +3 -3
- package/plugins/index.js +3 -3
- package/plugins/index.mjs +3 -3
- package/plugins/thirdParty/CSS2DRenderer.js +3 -3
- package/plugins/thirdParty/CSS2DRenderer.mjs +3 -3
- package/plugins/thirdParty/CSS3DRenderer.js +3 -3
- package/plugins/thirdParty/CSS3DRenderer.mjs +3 -3
- package/plugins/thirdParty/doctorstrange-model.js +75 -75
- package/plugins/thirdParty/doctorstrange-model.mjs +75 -75
- package/plugins/thirdParty/domevents.js +3 -3
- package/plugins/thirdParty/domevents.mjs +3 -3
- package/plugins/utils/absoluteUrl.js +3 -3
- package/plugins/utils/absoluteUrl.mjs +3 -3
- package/plugins/utils/calculatePath.js +3 -3
- package/plugins/utils/calculatePath.mjs +3 -3
- package/plugins/utils/clamp.js +3 -3
- package/plugins/utils/clamp.mjs +3 -3
- package/plugins/utils/uuid.js +3 -3
- package/plugins/utils/uuid.mjs +3 -3
- package/react/hooks/useFiveModelReadyState.d.ts +1 -1
- package/react/index.js +3 -3
- package/react/index.mjs +3 -644
- package/sticker/index.js +13 -4
- package/sticker/index.mjs +43 -260
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +4 -4
- package/umd/five-react.js +2 -2
- package/umd/five-sticker.js +13 -4
- package/umd/five-vfx.js +2 -2
- package/umd/five.js +152 -190
- package/vfx/index.js +3 -3
- package/vfx/index.mjs +3 -486
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +3 -315
- package/docs/functions/index.loadAt3d.html +0 -1
- package/docs/functions/index.loadDome.html +0 -1
- package/docs/functions/index.loadDomez.html +0 -1
- package/docs/functions/index.loadGltf.html +0 -1
- package/docs/functions/index.loadPbm.html +0 -1
- package/docs/functions/index.loadPly.html +0 -10
- package/five/certificates/hardware.d.ts +0 -1
- package/five/thirdparty/jsrsasign.d.ts +0 -753
- package/five/work/_ALLOW_HOST.d.ts +0 -2
- package/five/work/keychain.d.ts +0 -5
- package/five/work/verify.d.ts +0 -7
- package/five/work/workVerify.d.ts +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function changeModelCanvasOpacity(five,opacity,duration=300){let fiveEle=five.getElement();if(!fiveEle)return;fiveEle.style.opacity=opacity+``;let parent=fiveEle.parentElement;if(parent)for(let i=0;i<parent.children.length;i++){let child=parent.children[i];child instanceof HTMLElement&&child.dataset.infive===`1`&&(child.style.opacity=opacity+``)}fiveEle.style.transition=duration===0?`none`:`opacity ${duration}ms linear`,duration!==0&&Promise.race([new Promise(res=>fiveEle.addEventListener(`transitionend`,()=>res(),{once:!0})),new Promise(res=>setTimeout(res,duration))]).then(()=>{fiveEle.style.transition=`none`})}export{changeModelCanvasOpacity};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/const
|
|
338
|
+
*/const require_nearlyEqual=require("./nearlyEqual.js"),require_to=require("./to.js"),require_changeMode=require("./changeMode.js"),require_getDistanceFromModel=require("./getDistanceFromModel.js"),require_filter=require("./filter.js");let tslib=require("tslib");function checkShowState(five,showState){if(five.currentMode!==showState.mode)return!1;let currentState=five.getCurrentState(),fov=five.camera.fov;return!(!require_nearlyEqual.nearlyEqual(currentState.latitude,showState.latitude,2)||!require_nearlyEqual.nearlyEqual(currentState.longitude,showState.longitude,2)||showState.fov!==void 0&&!require_nearlyEqual.nearlyEqual(fov,showState.fov,2)||showState.offset&¤tState.offset.distanceTo(showState.offset)>.01)}function correctFiveState(five_1,showState_1){return(0,tslib.__awaiter)(this,arguments,void 0,function*(five,showState,userAction=!0){var _a;if(checkShowState(five,showState))return;let currentFiveState=five.getCurrentState();if(five.currentMode!==showState.mode){let innerModel=five.models.find(m=>m.name===five.state.workCode),effectiveFov=typeof showState.fov==`number`?showState.fov:80;innerModel&&(showState.distance=require_getDistanceFromModel.getDistanceFromModel(five,effectiveFov,five.camera.aspect));let[changeModeError]=yield require_to.default(require_changeMode.changeMode(five,[showState.mode,showState,void 0,userAction]));if(changeModeError)throw changeModeError;return}let{latitude,longitude,fov}=currentFiveState,targetFov=(_a=showState.fov)==null?fov:_a,time=Math.min(1e3,Math.max(200,Math.abs(latitude-Math.PI/2)*1e3,(longitude>Math.PI?Math.PI*2-longitude:longitude)*500,Number.isFinite(targetFov)?Math.abs(fov-targetFov)*10:1/0)),[updateCameraError]=yield require_to.default(five.updateCamera(require_filter.omit(showState,[`mode`]),time,userAction));if(updateCameraError)throw Error(`UpdateCameraError`)})}exports.correctFiveState=correctFiveState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import{nearlyEqual
|
|
338
|
+
*/import{nearlyEqual}from"./nearlyEqual.mjs";import to from"./to.mjs";import{changeMode}from"./changeMode.mjs";import{getDistanceFromModel}from"./getDistanceFromModel.mjs";import{omit}from"./filter.mjs";import{__awaiter}from"tslib";function checkShowState(five,showState){if(five.currentMode!==showState.mode)return!1;let currentState=five.getCurrentState(),fov=five.camera.fov;return!(!nearlyEqual(currentState.latitude,showState.latitude,2)||!nearlyEqual(currentState.longitude,showState.longitude,2)||showState.fov!==void 0&&!nearlyEqual(fov,showState.fov,2)||showState.offset&¤tState.offset.distanceTo(showState.offset)>.01)}function correctFiveState(five_1,showState_1){return __awaiter(this,arguments,void 0,function*(five,showState,userAction=!0){var _a;if(checkShowState(five,showState))return;let currentFiveState=five.getCurrentState();if(five.currentMode!==showState.mode){let innerModel=five.models.find(m=>m.name===five.state.workCode),effectiveFov=typeof showState.fov==`number`?showState.fov:80;innerModel&&(showState.distance=getDistanceFromModel(five,effectiveFov,five.camera.aspect));let[changeModeError]=yield to(changeMode(five,[showState.mode,showState,void 0,userAction]));if(changeModeError)throw changeModeError;return}let{latitude,longitude,fov}=currentFiveState,targetFov=(_a=showState.fov)==null?fov:_a,time=Math.min(1e3,Math.max(200,Math.abs(latitude-Math.PI/2)*1e3,(longitude>Math.PI?Math.PI*2-longitude:longitude)*500,Number.isFinite(targetFov)?Math.abs(fov-targetFov)*10:1/0)),[updateCameraError]=yield to(five.updateCamera(omit(showState,[`mode`]),time,userAction));if(updateCameraError)throw Error(`UpdateCameraError`)})}export{correctFiveState};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/const
|
|
338
|
+
*/const require_isTruelyObject=require("./isTruelyObject.js");function baseIsEqual(value,other){return!!(value===other||typeof value==`number`&&typeof other==`number`&&Number.isNaN(value)&&Number.isNaN(other))}function objEqualShallow(value,other){let keys=Object.keys(value);return keys.length===Object.keys(other).length?keys.every(key=>baseIsEqual(value[key],other[key])):!1}function objEqualDeep(value,other){let keys=Object.keys(value);return keys.length===Object.keys(other).length?keys.every(key=>isDeepEqual(value[key],other[key])):!1}function arrayEqualShallow(value,other){return value.length===other.length?value.every((item,index)=>baseIsEqual(item,other[index])):!1}function arrayEqualDeep(value,other){return value.length===other.length?value.every((item,index)=>isDeepEqual(item,other[index])):!1}function isShallowEqual(value,other){return baseIsEqual(value,other)?!0:require_isTruelyObject.isTruelyObject(value)&&require_isTruelyObject.isTruelyObject(other)?objEqualShallow(value,other):Array.isArray(value)&&Array.isArray(other)?arrayEqualShallow(value,other):!1}function isDeepEqual(value,other){return baseIsEqual(value,other)?!0:require_isTruelyObject.isTruelyObject(value)&&require_isTruelyObject.isTruelyObject(other)?objEqualDeep(value,other):Array.isArray(value)&&Array.isArray(other)?arrayEqualDeep(value,other):!1}function equal(value,other,opt={deep:!1}){return opt.deep?isDeepEqual(value,other):isShallowEqual(value,other)}exports.equal=equal,exports.isDeepEqual=isDeepEqual,exports.isShallowEqual=isShallowEqual;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import{isTruelyObject
|
|
338
|
+
*/import{isTruelyObject}from"./isTruelyObject.mjs";function baseIsEqual(value,other){return!!(value===other||typeof value==`number`&&typeof other==`number`&&Number.isNaN(value)&&Number.isNaN(other))}function objEqualShallow(value,other){let keys=Object.keys(value);return keys.length===Object.keys(other).length?keys.every(key=>baseIsEqual(value[key],other[key])):!1}function objEqualDeep(value,other){let keys=Object.keys(value);return keys.length===Object.keys(other).length?keys.every(key=>isDeepEqual(value[key],other[key])):!1}function arrayEqualShallow(value,other){return value.length===other.length?value.every((item,index)=>baseIsEqual(item,other[index])):!1}function arrayEqualDeep(value,other){return value.length===other.length?value.every((item,index)=>isDeepEqual(item,other[index])):!1}function isShallowEqual(value,other){return baseIsEqual(value,other)?!0:isTruelyObject(value)&&isTruelyObject(other)?objEqualShallow(value,other):Array.isArray(value)&&Array.isArray(other)?arrayEqualShallow(value,other):!1}function isDeepEqual(value,other){return baseIsEqual(value,other)?!0:isTruelyObject(value)&&isTruelyObject(other)?objEqualDeep(value,other):Array.isArray(value)&&Array.isArray(other)?arrayEqualDeep(value,other):!1}function equal(value,other,opt={deep:!1}){return opt.deep?isDeepEqual(value,other):isShallowEqual(value,other)}export{equal,isDeepEqual,isShallowEqual};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function omit(object,props){let result=Object.assign({},object);for(let prop of props)delete result[prop];return result}exports.omit=omit;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function omit(object,props){let result=Object.assign({},object);for(let prop of props)delete result[prop];return result}export{omit};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/let
|
|
338
|
+
*/let tslib=require("tslib");function getFiveModel(five){var _a;return((_a=five.models)==null?void 0:_a.filter(m=>m.name===five.state.workCode)[0])||five.model}function fiveModelIsLoaded(five){var _a;return!!((_a=getFiveModel(five))!=null&&_a.loaded)}function waitFiveModelLoaded(five){return(0,tslib.__awaiter)(this,void 0,void 0,function*(){return new Promise(resolve=>{if(fiveModelIsLoaded(five)){resolve();return}let handleModelLoaded=model=>{model===getFiveModel(five)&&(five.off(`modelLoaded`,handleModelLoaded),resolve())};five.on(`modelLoaded`,handleModelLoaded)})})}exports.fiveModelIsLoaded=fiveModelIsLoaded,exports.getFiveModel=getFiveModel,exports.waitFiveModelLoaded=waitFiveModelLoaded;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import{__awaiter
|
|
338
|
+
*/import{__awaiter}from"tslib";function getFiveModel(five){var _a;return((_a=five.models)==null?void 0:_a.filter(m=>m.name===five.state.workCode)[0])||five.model}function fiveModelIsLoaded(five){var _a;return!!((_a=getFiveModel(five))!=null&&_a.loaded)}function waitFiveModelLoaded(five){return __awaiter(this,void 0,void 0,function*(){return new Promise(resolve=>{if(fiveModelIsLoaded(five)){resolve();return}let handleModelLoaded=model=>{model===getFiveModel(five)&&(five.off(`modelLoaded`,handleModelLoaded),resolve())};five.on(`modelLoaded`,handleModelLoaded)})})}export{fiveModelIsLoaded,getFiveModel,waitFiveModelLoaded};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/let
|
|
338
|
+
*/let tslib=require("tslib");function formatOutlines(outlines){return(0,tslib.__awaiter)(this,void 0,void 0,function*(){return Promise.all(outlines.map(outline=>(0,tslib.__awaiter)(this,void 0,void 0,function*(){if(!outline.svg_url)return{url:outline.url,index:outline.index};let svgContent=yield fetch(outline.svg_url).then(res=>res.text()).catch(()=>void 0);return{url:outline.url,index:outline.index,svgUrl:outline.svg_url,svgContent}})))})}function formatRoom(data){let{room_type,floor_type,room_label,observer_indexs,customized_name,dimension}=data,rest=(0,tslib.__rest)(data,[`room_type`,`floor_type`,`room_label`,`observer_indexs`,`customized_name`,`dimension`]);return Object.assign(Object.assign({},rest),{roomType:room_type,floorType:floor_type,roomLabel:{position:room_label.position,positionInImage:room_label.position_in_image},observerIndexs:observer_indexs,customizedName:customized_name,dimension:dimension?{width:dimension.width,height:dimension.height,vertical:dimension.vertical,horizontal:dimension.horizontal}:void 0})}function formatFloorData(data){let{floor_name,floor_index,rooms}=data,rest=(0,tslib.__rest)(data,[`floor_name`,`floor_index`,`rooms`]);return Object.assign(Object.assign({},rest),{floorName:floor_name,floorIndex:floor_index,rooms:rooms.map(formatRoom)})}function formateFloorplanObserver(data){return{floorIndex:data.floor_index,positionInImage:data.position_in_image}}function formatFloorplanEntrance(data){return{positionInImage:data.position_in_image,northRad:data.north_rad,roomId:data.room_id,floorIndex:data.floor_index}}function formatData(data){return(0,tslib.__awaiter)(this,void 0,void 0,function*(){var _a,_b;let{computed_data}=data;return{outlines:yield formatOutlines((_a=data.outlines)==null?[]:_a),bounding:computed_data.bounding,floorDatas:computed_data.floor_datas.map(formatFloorData),entrance:computed_data.entrance?formatFloorplanEntrance(computed_data.entrance):null,observers:((_b=computed_data.observers)==null?[]:_b).map(formateFloorplanObserver)}})}exports.default=formatData,exports.formatData=formatData;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import{__awaiter
|
|
338
|
+
*/import{__awaiter,__rest}from"tslib";function formatOutlines(outlines){return __awaiter(this,void 0,void 0,function*(){return Promise.all(outlines.map(outline=>__awaiter(this,void 0,void 0,function*(){if(!outline.svg_url)return{url:outline.url,index:outline.index};let svgContent=yield fetch(outline.svg_url).then(res=>res.text()).catch(()=>void 0);return{url:outline.url,index:outline.index,svgUrl:outline.svg_url,svgContent}})))})}function formatRoom(data){let{room_type,floor_type,room_label,observer_indexs,customized_name,dimension}=data,rest=__rest(data,[`room_type`,`floor_type`,`room_label`,`observer_indexs`,`customized_name`,`dimension`]);return Object.assign(Object.assign({},rest),{roomType:room_type,floorType:floor_type,roomLabel:{position:room_label.position,positionInImage:room_label.position_in_image},observerIndexs:observer_indexs,customizedName:customized_name,dimension:dimension?{width:dimension.width,height:dimension.height,vertical:dimension.vertical,horizontal:dimension.horizontal}:void 0})}function formatFloorData(data){let{floor_name,floor_index,rooms}=data,rest=__rest(data,[`floor_name`,`floor_index`,`rooms`]);return Object.assign(Object.assign({},rest),{floorName:floor_name,floorIndex:floor_index,rooms:rooms.map(formatRoom)})}function formateFloorplanObserver(data){return{floorIndex:data.floor_index,positionInImage:data.position_in_image}}function formatFloorplanEntrance(data){return{positionInImage:data.position_in_image,northRad:data.north_rad,roomId:data.room_id,floorIndex:data.floor_index}}function formatData(data){return __awaiter(this,void 0,void 0,function*(){var _a,_b;let{computed_data}=data;return{outlines:yield formatOutlines((_a=data.outlines)==null?[]:_a),bounding:computed_data.bounding,floorDatas:computed_data.floor_datas.map(formatFloorData),entrance:computed_data.entrance?formatFloorplanEntrance(computed_data.entrance):null,observers:((_b=computed_data.observers)==null?[]:_b).map(formateFloorplanObserver)}})}export{formatData as default,formatData};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/const
|
|
338
|
+
*/const require_distance=require("../../../five/utils/distance.js"),require_doctorstrange_model=require("../../thirdParty/doctorstrange-model.js"),require_polylabel=require("./polylabel.js");var MIN_RULE_LENGTH=500;function formatFloorplanJson(floorplanJson,options={}){let{observers=[],locate=`zh-CN`,outlines=[]}=options;if(!floorplanJson||floorplanJson.floorplans.length===0)return null;let canvasArray=floorplanJson.floorplans.map(floorplan=>{let canvas=new require_doctorstrange_model.Canvas;return canvas.load(floorplan),canvas}),bounding=getBounding(canvasArray,floorplanJson.vrData),toImagePosition=point=>floorplanPosition2ImagePosition(point,bounding);return{outlines,computed_data:{floor_datas:getFloorDatas(canvasArray,floorplanJson,observers,bounding,locate),bounding,entrance:getEntrance(canvasArray,toImagePosition),observers:getObservers(canvasArray,floorplanJson.vrData,observers,toImagePosition)}}}function getFloorDatas(canvasArray,floorplanJson,observers,bounding,locate){return canvasArray.map((canvas,floorIndex)=>{let rooms=canvas.areas.map(area=>{let path=getCompleteRoomPoints(canvas,area),position=getCenterPointOfPath(path),room_label={position,position_in_image:floorplanPosition2ImagePosition(position,bounding)};return{id:area.id,size:canvas.info.ruleType===1?area.size(!1):area.size(),name:area.labelName(locate),customized_name:area.customizedName||void 0,path,room_type:area.roomType(),floor_type:area.floorType(),room_label,observer_indexs:[],dimension:getDimensionOfArea(area,position)}}),areas=canvas.areas,lastAreaIndex=0;return observers.filter(observer=>observer.floor_index===floorIndex).forEach(observer=>{let point=observerWorldPoint(observer,floorplanJson.vrData),findIndex=-1;for(let i=lastAreaIndex;i<areas.length&&findIndex===-1;i++)areas[i].isPointInArea(point)&&(findIndex=i);for(let i=lastAreaIndex;i>=0&&findIndex===-1;i--)areas[i].isPointInArea(point)&&(findIndex=i);findIndex!==-1&&(lastAreaIndex=findIndex,rooms[findIndex].observer_indexs.push(observer.index))}),{floor_name:floorplanJson.floorplans[floorIndex].name,floor_index:floorIndex,is_has_wall:canvas.lines.length>0,rules:getFloorplanRules(canvas),rooms}})}function getCompleteRoomPoints(canvas,area){let points=[],firstPoint=area.points[0];return area.points.concat(firstPoint).reduce((prevPoint,currPoint)=>{points.push(prevPoint);let line=canvas.getLineByPoints(prevPoint,currPoint);if(!line)return currPoint;if(line.curve){let centerPoint=line.curveCenterPoint(),curveR=line.curveR(),assistantCurveAbs=Math.abs(curveR-require_distance.distance(centerPoint,currPoint)*line.length()/Math.abs(line.curve)/4),p3=[line.curveCenterPoint.call({curve:assistantCurveAbs,points:[prevPoint,centerPoint]}),line.curveCenterPoint.call({curve:-assistantCurveAbs,points:[prevPoint,centerPoint]})].sort((a,b)=>require_distance.distance(b,currPoint)-require_distance.distance(a,currPoint))[0],p4=[line.curveCenterPoint.call({curve:assistantCurveAbs,points:[centerPoint,currPoint]}),line.curveCenterPoint.call({curve:-assistantCurveAbs,points:[centerPoint,currPoint]})].sort((a,b)=>require_distance.distance(b,prevPoint)-require_distance.distance(a,prevPoint))[0];points.push(p3,centerPoint,p4)}if(!line.isEdge()||line.items.length===0)return currPoint;let lineItems=line.items.filter(lineItem=>lineItem.type===7||lineItem.type===11);return lineItems.length===0||lineItems.forEach(lineItem=>{let start=lineItem.startPointAt(),end=lineItem.endPointAt();require_distance.distance(start,prevPoint)>require_distance.distance(end,prevPoint)&&([start,end]=[end,start]);let[offsetStart,offsetEnd]=parallelLineOfLine(700,[start,end])[0];points.push(start,offsetStart,offsetEnd,end)}),currPoint},firstPoint),points.map(({x,y})=>({x,y}))}function getCenterPointOfPath(path){let[x,y]=require_polylabel.polylabel([path.map(({x,y})=>[Math.trunc(x),Math.trunc(y)])],1);return{x,y}}function getDimensionOfArea(area,centerPoint){let points=area.innerPath();if(points.length===0)return;let minX=1/0,maxX=-1/0,minY=1/0,maxY=-1/0;points.forEach(point=>{minX=Math.min(minX,point.x),maxX=Math.max(maxX,point.x),minY=Math.min(minY,point.y),maxY=Math.max(maxY,point.y)});let width=maxX-minX,height=maxY-minY,x=Math.round(centerPoint.x),y=Math.round(centerPoint.y);return{width,height,vertical:[{x,y:minY},{x,y:maxY}],horizontal:[{x:minX,y},{x:maxX,y}]}}function getBounding(canvasArray,vrData){let padding=1e3,result={min:{x:1/0,y:1/0},max:{x:-1/0,y:-1/0},origin:{x:0,y:0}};function applyResult({x,y}){result.min.x=Math.min(x,result.min.x),result.min.y=Math.min(y,result.min.y),result.max.x=Math.max(x,result.max.x),result.max.y=Math.max(y,result.max.y)}return canvasArray.forEach(canvas=>{canvas.points.forEach(point=>applyResult(point)),canvas.lines.forEach(line=>{line.curve!==0&&applyResult(line.curveCenterPoint())})}),result.min.x-=padding,result.min.y-=padding,result.max.x+=padding,result.max.y+=padding,result.origin.x=vrData.origin.left,result.origin.y=vrData.origin.top,result}function floorplanPosition2ImagePosition(point,bounding){let boundingWidth=bounding.max.x-bounding.min.x,boundingHeight=bounding.max.y-bounding.min.y;return{x:boundingWidth===0?0:(point.x-bounding.min.x)/boundingWidth,y:boundingHeight===0?0:(bounding.max.y-point.y)/boundingHeight}}function getEntrance(canvasArray,toImagePosition){let lineItem=canvasArray.map(canvas=>canvas.lineItems).reduce((acc,val)=>acc.concat(val),[]).find(item=>item.entrance!==null);if(!lineItem)return null;let canvas=lineItem.canvas,area=canvas.areas.find(area=>lineItem.line.points.every(point=>area.points.indexOf(point)>=0));if(!area)return null;let position=getCenterPointOfPoints([lineItem.startPointAt(),lineItem.endPointAt()]),northRad=lineItem.towardsRadWithArea(area)+lineItem.entrance/180*Math.PI;return{position_in_image:toImagePosition(position),north_rad:northRad,room_id:area.id,floor_index:canvasArray.findIndex(canvasItem=>canvasItem===canvas)}}function getObservers(canvasArray,vrData,observers,toImagePosition){return observers.filter(observer=>canvasArray[observer.floor_index]).map(observer=>({floor_index:observer.floor_index,position_in_image:toImagePosition(observerWorldPoint(observer,vrData))}))}function observerWorldPoint(observer,vrData){return{x:observer.position[0]*1e3+vrData.origin.left,y:-observer.position[2]*1e3+vrData.origin.top}}function getFloorplanRules(canvas){let top=[],right=[],bottom=[],left=[];for(let line of canvas.lines){if(!line.edgeComputed||!line.points.length)continue;let area=canvas.areas.find(area=>line.points.every(point=>area.points.includes(point)));if(!area)continue;let linePoints=line.edgePoints(!0),areaInnerPath=area.innerPath(!0,!1),[pt0,pt1]=linePoints.filter(point=>areaInnerPath.some(p=>samePointAt(p,point)));if(!pt0||!pt1)continue;let roundedPt0={x:pt0.x|0,y:pt0.y|0},roundedPt1={x:pt1.x|0,y:pt1.y|0},towardsRad=line.towardsRadWithArea(area),relativeX=Math.cos(towardsRad),relativeY=Math.sin(towardsRad);Math.abs(roundedPt0.y-roundedPt1.y)>MIN_RULE_LENGTH&&(relativeX<0?left.push([roundedPt0,roundedPt1].sort((a,b)=>a.y-b.y)):relativeX>0&&right.push([roundedPt0,roundedPt1].sort((a,b)=>a.y-b.y))),Math.abs(roundedPt0.x-roundedPt1.x)>MIN_RULE_LENGTH&&(relativeY<0?bottom.push([roundedPt0,roundedPt1].sort((a,b)=>a.x-b.x)):relativeY>0&&top.push([roundedPt0,roundedPt1].sort((a,b)=>a.x-b.x)))}return{top,right,bottom,left}}function samePointAt(point1,point2){return point1.x===point2.x&&point1.y===point2.y}function parallelLineOfLine(distanceOfLine,linePoints){let k=getK(linePoints[1],linePoints[0]),dx,dy;Math.abs(k)===1/0?(dy=0,dx=distanceOfLine):(dy=Math.sqrt(distanceOfLine*distanceOfLine/(k*k+1)),dx=dy/-(1/k));let result=[[{x:linePoints[0].x-dx,y:linePoints[0].y-dy},{x:linePoints[1].x-dx,y:linePoints[1].y-dy}],[{x:linePoints[0].x+dx,y:linePoints[0].y+dy},{x:linePoints[1].x+dx,y:linePoints[1].y+dy}]];return linePoints[1].x-linePoints[0].x<0?result:linePoints[1].x-linePoints[0].x>0||linePoints[1].y-linePoints[0].y<0?result.reverse():result}function getK(p0,p1){return(p0.y-p1.y)/(p0.x-p1.x)}function getCenterPointOfPoints(points){let minX=Math.min(...points.map(p=>p.x)),maxX=Math.max(...points.map(p=>p.x)),minY=Math.min(...points.map(p=>p.y)),maxY=Math.max(...points.map(p=>p.y));return{x:(minX+maxX)/2,y:(minY+maxY)/2}}exports.default=formatFloorplanJson,exports.formatFloorplanJson=formatFloorplanJson;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import{distance
|
|
338
|
+
*/import{distance}from"../../../five/utils/distance.mjs";import{Canvas}from"../../thirdParty/doctorstrange-model.mjs";import{polylabel}from"./polylabel.mjs";var MIN_RULE_LENGTH=500;function formatFloorplanJson(floorplanJson,options={}){let{observers=[],locate=`zh-CN`,outlines=[]}=options;if(!floorplanJson||floorplanJson.floorplans.length===0)return null;let canvasArray=floorplanJson.floorplans.map(floorplan=>{let canvas=new Canvas;return canvas.load(floorplan),canvas}),bounding=getBounding(canvasArray,floorplanJson.vrData),toImagePosition=point=>floorplanPosition2ImagePosition(point,bounding);return{outlines,computed_data:{floor_datas:getFloorDatas(canvasArray,floorplanJson,observers,bounding,locate),bounding,entrance:getEntrance(canvasArray,toImagePosition),observers:getObservers(canvasArray,floorplanJson.vrData,observers,toImagePosition)}}}function getFloorDatas(canvasArray,floorplanJson,observers,bounding,locate){return canvasArray.map((canvas,floorIndex)=>{let rooms=canvas.areas.map(area=>{let path=getCompleteRoomPoints(canvas,area),position=getCenterPointOfPath(path),room_label={position,position_in_image:floorplanPosition2ImagePosition(position,bounding)};return{id:area.id,size:canvas.info.ruleType===1?area.size(!1):area.size(),name:area.labelName(locate),customized_name:area.customizedName||void 0,path,room_type:area.roomType(),floor_type:area.floorType(),room_label,observer_indexs:[],dimension:getDimensionOfArea(area,position)}}),areas=canvas.areas,lastAreaIndex=0;return observers.filter(observer=>observer.floor_index===floorIndex).forEach(observer=>{let point=observerWorldPoint(observer,floorplanJson.vrData),findIndex=-1;for(let i=lastAreaIndex;i<areas.length&&findIndex===-1;i++)areas[i].isPointInArea(point)&&(findIndex=i);for(let i=lastAreaIndex;i>=0&&findIndex===-1;i--)areas[i].isPointInArea(point)&&(findIndex=i);findIndex!==-1&&(lastAreaIndex=findIndex,rooms[findIndex].observer_indexs.push(observer.index))}),{floor_name:floorplanJson.floorplans[floorIndex].name,floor_index:floorIndex,is_has_wall:canvas.lines.length>0,rules:getFloorplanRules(canvas),rooms}})}function getCompleteRoomPoints(canvas,area){let points=[],firstPoint=area.points[0];return area.points.concat(firstPoint).reduce((prevPoint,currPoint)=>{points.push(prevPoint);let line=canvas.getLineByPoints(prevPoint,currPoint);if(!line)return currPoint;if(line.curve){let centerPoint=line.curveCenterPoint(),curveR=line.curveR(),assistantCurveAbs=Math.abs(curveR-distance(centerPoint,currPoint)*line.length()/Math.abs(line.curve)/4),p3=[line.curveCenterPoint.call({curve:assistantCurveAbs,points:[prevPoint,centerPoint]}),line.curveCenterPoint.call({curve:-assistantCurveAbs,points:[prevPoint,centerPoint]})].sort((a,b)=>distance(b,currPoint)-distance(a,currPoint))[0],p4=[line.curveCenterPoint.call({curve:assistantCurveAbs,points:[centerPoint,currPoint]}),line.curveCenterPoint.call({curve:-assistantCurveAbs,points:[centerPoint,currPoint]})].sort((a,b)=>distance(b,prevPoint)-distance(a,prevPoint))[0];points.push(p3,centerPoint,p4)}if(!line.isEdge()||line.items.length===0)return currPoint;let lineItems=line.items.filter(lineItem=>lineItem.type===7||lineItem.type===11);return lineItems.length===0||lineItems.forEach(lineItem=>{let start=lineItem.startPointAt(),end=lineItem.endPointAt();distance(start,prevPoint)>distance(end,prevPoint)&&([start,end]=[end,start]);let[offsetStart,offsetEnd]=parallelLineOfLine(700,[start,end])[0];points.push(start,offsetStart,offsetEnd,end)}),currPoint},firstPoint),points.map(({x,y})=>({x,y}))}function getCenterPointOfPath(path){let[x,y]=polylabel([path.map(({x,y})=>[Math.trunc(x),Math.trunc(y)])],1);return{x,y}}function getDimensionOfArea(area,centerPoint){let points=area.innerPath();if(points.length===0)return;let minX=1/0,maxX=-1/0,minY=1/0,maxY=-1/0;points.forEach(point=>{minX=Math.min(minX,point.x),maxX=Math.max(maxX,point.x),minY=Math.min(minY,point.y),maxY=Math.max(maxY,point.y)});let width=maxX-minX,height=maxY-minY,x=Math.round(centerPoint.x),y=Math.round(centerPoint.y);return{width,height,vertical:[{x,y:minY},{x,y:maxY}],horizontal:[{x:minX,y},{x:maxX,y}]}}function getBounding(canvasArray,vrData){let padding=1e3,result={min:{x:1/0,y:1/0},max:{x:-1/0,y:-1/0},origin:{x:0,y:0}};function applyResult({x,y}){result.min.x=Math.min(x,result.min.x),result.min.y=Math.min(y,result.min.y),result.max.x=Math.max(x,result.max.x),result.max.y=Math.max(y,result.max.y)}return canvasArray.forEach(canvas=>{canvas.points.forEach(point=>applyResult(point)),canvas.lines.forEach(line=>{line.curve!==0&&applyResult(line.curveCenterPoint())})}),result.min.x-=padding,result.min.y-=padding,result.max.x+=padding,result.max.y+=padding,result.origin.x=vrData.origin.left,result.origin.y=vrData.origin.top,result}function floorplanPosition2ImagePosition(point,bounding){let boundingWidth=bounding.max.x-bounding.min.x,boundingHeight=bounding.max.y-bounding.min.y;return{x:boundingWidth===0?0:(point.x-bounding.min.x)/boundingWidth,y:boundingHeight===0?0:(bounding.max.y-point.y)/boundingHeight}}function getEntrance(canvasArray,toImagePosition){let lineItem=canvasArray.map(canvas=>canvas.lineItems).reduce((acc,val)=>acc.concat(val),[]).find(item=>item.entrance!==null);if(!lineItem)return null;let canvas=lineItem.canvas,area=canvas.areas.find(area=>lineItem.line.points.every(point=>area.points.indexOf(point)>=0));if(!area)return null;let position=getCenterPointOfPoints([lineItem.startPointAt(),lineItem.endPointAt()]),northRad=lineItem.towardsRadWithArea(area)+lineItem.entrance/180*Math.PI;return{position_in_image:toImagePosition(position),north_rad:northRad,room_id:area.id,floor_index:canvasArray.findIndex(canvasItem=>canvasItem===canvas)}}function getObservers(canvasArray,vrData,observers,toImagePosition){return observers.filter(observer=>canvasArray[observer.floor_index]).map(observer=>({floor_index:observer.floor_index,position_in_image:toImagePosition(observerWorldPoint(observer,vrData))}))}function observerWorldPoint(observer,vrData){return{x:observer.position[0]*1e3+vrData.origin.left,y:-observer.position[2]*1e3+vrData.origin.top}}function getFloorplanRules(canvas){let top=[],right=[],bottom=[],left=[];for(let line of canvas.lines){if(!line.edgeComputed||!line.points.length)continue;let area=canvas.areas.find(area=>line.points.every(point=>area.points.includes(point)));if(!area)continue;let linePoints=line.edgePoints(!0),areaInnerPath=area.innerPath(!0,!1),[pt0,pt1]=linePoints.filter(point=>areaInnerPath.some(p=>samePointAt(p,point)));if(!pt0||!pt1)continue;let roundedPt0={x:pt0.x|0,y:pt0.y|0},roundedPt1={x:pt1.x|0,y:pt1.y|0},towardsRad=line.towardsRadWithArea(area),relativeX=Math.cos(towardsRad),relativeY=Math.sin(towardsRad);Math.abs(roundedPt0.y-roundedPt1.y)>MIN_RULE_LENGTH&&(relativeX<0?left.push([roundedPt0,roundedPt1].sort((a,b)=>a.y-b.y)):relativeX>0&&right.push([roundedPt0,roundedPt1].sort((a,b)=>a.y-b.y))),Math.abs(roundedPt0.x-roundedPt1.x)>MIN_RULE_LENGTH&&(relativeY<0?bottom.push([roundedPt0,roundedPt1].sort((a,b)=>a.x-b.x)):relativeY>0&&top.push([roundedPt0,roundedPt1].sort((a,b)=>a.x-b.x)))}return{top,right,bottom,left}}function samePointAt(point1,point2){return point1.x===point2.x&&point1.y===point2.y}function parallelLineOfLine(distanceOfLine,linePoints){let k=getK(linePoints[1],linePoints[0]),dx,dy;Math.abs(k)===1/0?(dy=0,dx=distanceOfLine):(dy=Math.sqrt(distanceOfLine*distanceOfLine/(k*k+1)),dx=dy/-(1/k));let result=[[{x:linePoints[0].x-dx,y:linePoints[0].y-dy},{x:linePoints[1].x-dx,y:linePoints[1].y-dy}],[{x:linePoints[0].x+dx,y:linePoints[0].y+dy},{x:linePoints[1].x+dx,y:linePoints[1].y+dy}]];return linePoints[1].x-linePoints[0].x<0?result:linePoints[1].x-linePoints[0].x>0||linePoints[1].y-linePoints[0].y<0?result.reverse():result}function getK(p0,p1){return(p0.y-p1.y)/(p0.x-p1.x)}function getCenterPointOfPoints(points){let minX=Math.min(...points.map(p=>p.x)),maxX=Math.max(...points.map(p=>p.x)),minY=Math.min(...points.map(p=>p.y)),maxY=Math.max(...points.map(p=>p.y));return{x:(minX+maxX)/2,y:(minY+maxY)/2}}export{formatFloorplanJson as default,formatFloorplanJson};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function pathD(points,options={}){let d=``,{needZ,format}=options;return(needZ?points.slice().concat(points[0]):points.slice()).forEach((_point,index)=>{let{x,y}=format?format(_point):_point,point=`${x},${y}`;d+=(index===0?`M`:`L`)+point}),d+(needZ?`Z`:``)}function formatFloorplanPoint({x,y},bounding){let{max,min}=bounding;return{x:x-min.x,y:max.y-y}}exports.formatFloorplanPoint=formatFloorplanPoint,exports.pathD=pathD;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function pathD(points,options={}){let d=``,{needZ,format}=options;return(needZ?points.slice().concat(points[0]):points.slice()).forEach((_point,index)=>{let{x,y}=format?format(_point):_point,point=`${x},${y}`;d+=(index===0?`M`:`L`)+point}),d+(needZ?`Z`:``)}function formatFloorplanPoint({x,y},bounding){let{max,min}=bounding;return{x:x-min.x,y:max.y-y}}export{formatFloorplanPoint,pathD};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function getDistanceFromModel(five,fov,aspect){let boundingBox=five.modelScene.boundingBox,radius=boundingBox.isEmpty()?10:Math.pow(Math.pow(boundingBox.max.x-boundingBox.min.x+1,2)+Math.pow(boundingBox.max.y-boundingBox.min.y+1,2)+Math.pow(boundingBox.max.z-boundingBox.min.z+1,2),1/2),distance=radius/2/Math.tan(Math.PI*fov/360);return aspect<1&&(distance/=aspect),Number.isNaN(distance)?radius:distance}exports.getDistanceFromModel=getDistanceFromModel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function getDistanceFromModel(five,fov,aspect){let boundingBox=five.modelScene.boundingBox,radius=boundingBox.isEmpty()?10:Math.pow(Math.pow(boundingBox.max.x-boundingBox.min.x+1,2)+Math.pow(boundingBox.max.y-boundingBox.min.y+1,2)+Math.pow(boundingBox.max.z-boundingBox.min.z+1,2),1/2),distance=radius/2/Math.tan(Math.PI*fov/360);return aspect<1&&(distance/=aspect),Number.isNaN(distance)?radius:distance}export{getDistanceFromModel};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/const
|
|
338
|
+
*/const require_runtime=require("../../../_virtual/_rolldown/runtime.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);function getFloorY(five,floorIndex){var _a,_b;let observers=(_b=(_a=five.work)==null?void 0:_a.observers)==null?[]:_b;if(floorIndex>(observers.length?Math.max(...observers.map(ob=>ob.floorIndex)):0))return five.modelScene.boundingBox.max.y;let ys=observers.filter(ob=>ob.floorIndex===floorIndex).map(ob=>ob.standingPosition.y);return ys.length?Math.max(...ys):five.modelScene.boundingBox.min.y}function getAttachedY(five,floorIndex,attachedTo=3){let boundingBox=five.modelScene.boundingBox;return attachedTo===3?(boundingBox.max.y+boundingBox.min.y)/2:attachedTo===2?getFloorY(five,floorIndex+1):getFloorY(five,floorIndex)}function getPxmm(five,container,floorIndex,options){let y=getAttachedY(five,floorIndex,options==null?void 0:options.attachedTo),originPosition=new three_webgpu.Vector3(0,y,0),originPositionXUnit=new three_webgpu.Vector3(1,y,0),mouse=originPosition.clone().project(five.camera),xUnitMouse=originPositionXUnit.clone().project(five.camera);return Math.abs((xUnitMouse.x-mouse.x)/1e3)*(container.getBoundingClientRect().width/2)}exports.getAttachedY=getAttachedY,exports.getFloorY=getFloorY,exports.getPxmm=getPxmm;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import*as
|
|
338
|
+
*/import*as THREE from"three/webgpu";function getFloorY(five,floorIndex){var _a,_b;let observers=(_b=(_a=five.work)==null?void 0:_a.observers)==null?[]:_b;if(floorIndex>(observers.length?Math.max(...observers.map(ob=>ob.floorIndex)):0))return five.modelScene.boundingBox.max.y;let ys=observers.filter(ob=>ob.floorIndex===floorIndex).map(ob=>ob.standingPosition.y);return ys.length?Math.max(...ys):five.modelScene.boundingBox.min.y}function getAttachedY(five,floorIndex,attachedTo=3){let boundingBox=five.modelScene.boundingBox;return attachedTo===3?(boundingBox.max.y+boundingBox.min.y)/2:attachedTo===2?getFloorY(five,floorIndex+1):getFloorY(five,floorIndex)}function getPxmm(five,container,floorIndex,options){let y=getAttachedY(five,floorIndex,options==null?void 0:options.attachedTo),originPosition=new THREE.Vector3(0,y,0),originPositionXUnit=new THREE.Vector3(1,y,0),mouse=originPosition.clone().project(five.camera),xUnitMouse=originPositionXUnit.clone().project(five.camera);return Math.abs((xUnitMouse.x-mouse.x)/1e3)*(container.getBoundingClientRect().width/2)}export{getAttachedY,getFloorY,getPxmm};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function isTruelyObject(value){return Object.prototype.toString.call(value)===`[object Object]`}exports.isTruelyObject=isTruelyObject;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function isTruelyObject(value){return Object.prototype.toString.call(value)===`[object Object]`}export{isTruelyObject};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function nearlyEqual(x,y,precision=2){return Number(x.toFixed(precision))===Number(y.toFixed(precision))}function nearlyEqualRad(x,y,precision=2){let TWO_PI=Math.PI*2,normalize=rad=>(rad%TWO_PI+TWO_PI)%TWO_PI,nx=normalize(x),ny=normalize(y),diff=Math.min(Math.abs(nx-ny),TWO_PI-Math.abs(nx-ny));return Number(diff.toFixed(precision))===0}exports.nearlyEqual=nearlyEqual,exports.nearlyEqualRad=nearlyEqualRad;
|