@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
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* @realsee/five-webgpu
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
|
+
* License:
|
|
7
|
+
* Realsee SDK License Agreement
|
|
8
|
+
|
|
9
|
+
* Last updated: 2026-09-22
|
|
10
|
+
|
|
11
|
+
* THIS LICENSE AGREEMENT BETWEEN YOU AND BEIKE REALSEE TECHNOLOGY (HK) LIMITED
|
|
12
|
+
* (“Realsee”) FORMS A LEGALLY BINDING CONTRACT BETWEEN YOU AND REALSEE IN RELATION
|
|
13
|
+
* TO YOUR USE OF THE SDK. This License Agreement accompanies the Realsee Software
|
|
14
|
+
* Development Kit(s) for the software and related explanatory materials (the
|
|
15
|
+
* "SDK") and includes any upgrades, modified versions, updates, additions, and
|
|
16
|
+
* copies of the SDK licensed to You by Realsee.
|
|
17
|
+
|
|
18
|
+
* BY DOWNLOADING, INSTALLING, OR OTHERWISE ACCESSING OR USING THE SDK, YOU AGREE
|
|
19
|
+
* THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THIS AGREEMENT. YOU ARE
|
|
20
|
+
* AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO
|
|
21
|
+
* THE TERMS AND CONDITIONS STATED BELOW.
|
|
22
|
+
|
|
23
|
+
* This Agreement applies to Your use of the SDK in the country in which You
|
|
24
|
+
* legally install it (“Territory”) and is subject to the laws of such Territory
|
|
25
|
+
* and further subject to Section 12 below. Different terms, conditions, and
|
|
26
|
+
* limitations may apply to the use of the SDK in any additional countries.
|
|
27
|
+
|
|
28
|
+
* 1. DEFINITIONS.
|
|
29
|
+
|
|
30
|
+
* “Agreement” means this Realsee SDK License Agreement.
|
|
31
|
+
|
|
32
|
+
* “Developer”, “You” and “Your” means the person(s) or entity acquiring or using
|
|
33
|
+
* the SDK or otherwise exercising rights under the terms of this Agreement.
|
|
34
|
+
|
|
35
|
+
* “Documentation” means the technical or other specifications or documentation
|
|
36
|
+
* that Realsee may provide to You for use in connection with the SDK.
|
|
37
|
+
|
|
38
|
+
* “Integrated Product” means any software, website, or on-line service developed
|
|
39
|
+
* by You based on or using the SDK (collectively, the “Integrated Product”).
|
|
40
|
+
|
|
41
|
+
* “Intellectual Property” means any patents, patent rights, trademarks, service
|
|
42
|
+
* marks, registered and unregistered designs, applications for any of the
|
|
43
|
+
* foregoing, copyright, and any other similar protected rights in any country and
|
|
44
|
+
* to the extent recognised by any relevant jurisdiction as intellectual property,
|
|
45
|
+
* trade secrets, know-how and confidential information. Realsee reserves all
|
|
46
|
+
* rights not expressly granted to You.
|
|
47
|
+
|
|
48
|
+
* “Realsee” means [Beike Realsee Technology (HK) Limited, a company incorporated
|
|
49
|
+
* and validly existing under the laws of Hong Kong].
|
|
50
|
+
|
|
51
|
+
* “SDK” means the Realsee-proprietary Software Development Kits (SDK) provided
|
|
52
|
+
* hereunder, includes all development tools (including any compiler and debugger),
|
|
53
|
+
* application programming interfaces (“APIs”), libraries, binary utilities, header
|
|
54
|
+
* files, Documentation, content, data, code samples, and other materials provided
|
|
55
|
+
* to You in connection with this Agreement, whether delivered through a download,
|
|
56
|
+
* or any other media or form, and is licensed, not sold, to You by Realsee for use
|
|
57
|
+
* only under the terms of this Agreement. The terms of this Agreement will govern
|
|
58
|
+
* any updates provided by Realsee that replace and/or supplement the original SDK
|
|
59
|
+
* delivered to You, unless such update is accompanied by a separate license, in
|
|
60
|
+
* which case the terms of such license will govern.
|
|
61
|
+
|
|
62
|
+
* “Term” means the period commencing on the date You first download, install,
|
|
63
|
+
* access, or use the SDK, and continuing until this Agreement is terminated in
|
|
64
|
+
* accordance with Section 6.
|
|
65
|
+
|
|
66
|
+
* 2. LICENSED USES AND RESTRICTIONS.
|
|
67
|
+
|
|
68
|
+
* 2.1 Subject to the restrictions contained in this Section 2, Realsee grants to
|
|
69
|
+
* You during the Term, a limited, non-exclusive, revocable, non-sublicensable,
|
|
70
|
+
* non-transferable license to install, use, and integrate the SDK within the
|
|
71
|
+
* Territory only for the purpose of developing, testing, operating and supporting
|
|
72
|
+
* Integrated Products.
|
|
73
|
+
|
|
74
|
+
* 2.2 Restrictions. You acknowledge and agree that, You shall not, and shall
|
|
75
|
+
* ensure that Your affiliates, employees, agents, representatives, officers, and
|
|
76
|
+
* subcontractors do not (directly or indirectly):
|
|
77
|
+
|
|
78
|
+
* 2.2.1 decompile, reverse engineer, disassemble or attempt to derive the source
|
|
79
|
+
* code of, those components of the SDK provided in object code form, or any part
|
|
80
|
+
* thereof;
|
|
81
|
+
|
|
82
|
+
* 2.2.2 remove, alter, or obscure any copyright notice or other proprietary rights
|
|
83
|
+
* notice on any part of the SDK;
|
|
84
|
+
|
|
85
|
+
* 2.2.3 sell, assign, pledge, rent, lease, lend, upload to or host on any website
|
|
86
|
+
* or server for use by any third party except You, redistribute, or sublicense the
|
|
87
|
+
* SDK (or any part thereof), or operate the SDK (or any part thereof) in the
|
|
88
|
+
* capacity of a service bureau or other hosted services provider, in whole or in
|
|
89
|
+
* part, nor may You enable others to do so;
|
|
90
|
+
|
|
91
|
+
* 2.2.4 alter, modify, customize or improve the SDK, or any part thereof;
|
|
92
|
+
|
|
93
|
+
* 2.2.5 use the SDK (or any part thereof) for any illegal purpose, in any manner
|
|
94
|
+
* that is inconsistent with the terms of this Agreement, or to engage in any
|
|
95
|
+
* illegal activity;
|
|
96
|
+
|
|
97
|
+
* 2.2.6 use the SDK (or any part thereof) in any manner that may damage the
|
|
98
|
+
* operation of Realsee’s products or services; or
|
|
99
|
+
|
|
100
|
+
* 2.2.7 use the SDK or any non-public information provided by Realsee for the
|
|
101
|
+
* primary purpose of developing products or services that substantially replicate
|
|
102
|
+
* the core functionality of Realsee proprietary SDK offerings;
|
|
103
|
+
|
|
104
|
+
* 2.2.8 distribute, re-sell, or make available the SDK (or any part thereof) as a
|
|
105
|
+
* standalone product, library, or development toolkit to any third party.
|
|
106
|
+
|
|
107
|
+
* 2.3 Realsee has the right to impose reasonable conditions such as a reasonable
|
|
108
|
+
* fee for use of the SDK in Integrated Product in the future.
|
|
109
|
+
|
|
110
|
+
* 2.4 You may make a limited number of copies of the SDK to be used by Your
|
|
111
|
+
* employees or consultants as provided herein, and not for general business
|
|
112
|
+
* purposes, and such employees or consultants shall be subject to the obligations
|
|
113
|
+
* and restrictions in this Agreement.
|
|
114
|
+
|
|
115
|
+
* 2.5 All licenses not expressly granted in this Agreement are reserved and no
|
|
116
|
+
* other licenses, immunity, or rights, express or implied, are granted by Realsee,
|
|
117
|
+
* by implication, estoppel, or otherwise.
|
|
118
|
+
|
|
119
|
+
* 3. CONFIDENTIALITY.
|
|
120
|
+
|
|
121
|
+
* The SDK and all source code, Documentation, specifications, engineering details,
|
|
122
|
+
* and related information pertaining to the SDK, whether in oral, written,
|
|
123
|
+
* graphic, or electronic form, are and shall remain the confidential and
|
|
124
|
+
* proprietary information of Realsee or its licensors (collectively, the
|
|
125
|
+
* “Confidential Information”). You shall (i) disclose Confidential Information to
|
|
126
|
+
* only those directors and employees (collectively, “Affiliates”) whose duties
|
|
127
|
+
* justify their need to know such information and who have been clearly informed
|
|
128
|
+
* of their obligation to maintain the confidential, proprietary, and/or trade
|
|
129
|
+
* secret status of such Confidential Information; and (ii) use Confidential
|
|
130
|
+
* Information solely in accordance with the license granted hereunder. In any
|
|
131
|
+
* event, You and Your Affiliates shall treat Confidential Information as strictly
|
|
132
|
+
* confidential and shall use the same care to prevent disclosure of such
|
|
133
|
+
* information as You use with respect to Your own similar confidential and/or
|
|
134
|
+
* proprietary information, which shall not be less than the care a reasonable
|
|
135
|
+
* person would use under similar circumstances. All Confidential Information, and
|
|
136
|
+
* any copies thereof, shall be returned promptly to Realsee upon request. You
|
|
137
|
+
* shall ensure that Your Affiliates comply with the provisions of this Section 3,
|
|
138
|
+
* and You shall be liable for any breach of this Section 3 resulting from the act
|
|
139
|
+
* or omission of any of Your Affiliates. You shall not disclose Confidential
|
|
140
|
+
* Information to any third party, including, without limitation, any of Your
|
|
141
|
+
* subcontractors.
|
|
142
|
+
|
|
143
|
+
* 4. PROPRIETARY RIGHTS.
|
|
144
|
+
|
|
145
|
+
* 4.1 As between You and Realsee, Realsee and/or its licensors retain ownership of
|
|
146
|
+
* all right, title, and interest in, to, and under the SDK, including, without
|
|
147
|
+
* limitation, all patents, copyrights, trade secrets, trademarks and other
|
|
148
|
+
* intellectual property and other proprietary rights therein, and reserve all
|
|
149
|
+
* rights not expressly granted to You.
|
|
150
|
+
|
|
151
|
+
* 4.2 The items contained in the SDK are the intellectual property of Realsee and
|
|
152
|
+
* its licensors and are protected by PRC copyright and patent law, international
|
|
153
|
+
* treaty provisions and applicable laws of the country in which it is being used.
|
|
154
|
+
* You agree to protect all copyright and other ownership interests of Realsee
|
|
155
|
+
* and/or its licensors in all items in the SDK supplied under this License
|
|
156
|
+
* Agreement. You agree that all copies of the items in the SDK, reproduced for any
|
|
157
|
+
* reason by You, contain the same copyright notices, and other proprietary notices
|
|
158
|
+
* as appropriate, as appear on or in the original items delivered by Realsee in
|
|
159
|
+
* the SDK. Realsee and/or its licensors retain title and ownership of the items in
|
|
160
|
+
* the SDK, the media on which it is loaded, and all subsequent copies, regardless
|
|
161
|
+
* of the form or media in or on which the original and other copies may exist.
|
|
162
|
+
* Except as stated above, this Agreement does not grant You any rights to patents,
|
|
163
|
+
* copyrights, trade secrets, trademarks or any other rights in respect to the
|
|
164
|
+
* items in the SDK.
|
|
165
|
+
|
|
166
|
+
* 5. DATA PRIVACY AND PROTECTION
|
|
167
|
+
|
|
168
|
+
* 5.1 In connection with Your use of the SDK and any Integrated Product, You shall
|
|
169
|
+
* comply with all applicable privacy, data protection, cybersecurity, and
|
|
170
|
+
* cross-border data transfer laws and regulations. To the extent Your use of the
|
|
171
|
+
* SDK involves the collection, processing, transmission, disclosure, or storage of
|
|
172
|
+
* personal data or personal information, You shall be solely responsible for: (i)
|
|
173
|
+
* ensuring that You have a valid legal basis for such processing; (ii) providing
|
|
174
|
+
* all required notices and obtaining all necessary consents or authorisations; and
|
|
175
|
+
* (iii) implementing reasonable and appropriate technical and organisational
|
|
176
|
+
* measures to protect such data against unauthorised access, use, disclosure,
|
|
177
|
+
* alteration, or destruction.
|
|
178
|
+
|
|
179
|
+
* 5.2 You shall promptly notify Realsee of any material security incident relating
|
|
180
|
+
* to the SDK or Integrated Product that may materially affect Realsee, the SDK, or
|
|
181
|
+
* any personal data processed in connection with the SDK.
|
|
182
|
+
|
|
183
|
+
* 5.3 Developer shall be solely responsible for Developer’s compliance with
|
|
184
|
+
* applicable privacy, data protection, and cybersecurity laws in connection with
|
|
185
|
+
* the Integrated Product.
|
|
186
|
+
|
|
187
|
+
* 6. TERM AND TERMINATION.
|
|
188
|
+
|
|
189
|
+
* 6.1 This Agreement is effective until terminated. Realsee has the right to
|
|
190
|
+
* terminate this Agreement immediately, without judicial intervention, if You fail
|
|
191
|
+
* to comply with any term herein. Upon any such termination You must remove all
|
|
192
|
+
* full and partial copies of the items in the SDK from Your computer and
|
|
193
|
+
* discontinue the use of the items in the SDK.
|
|
194
|
+
|
|
195
|
+
* 6.2 Realsee may at any time, terminate the Agreement with You if: (A) You have
|
|
196
|
+
* breached any provision of the Agreement; or (B) Realsee is required to do so by
|
|
197
|
+
* law; or (C) Realsee decides to no longer provide the SDK or certain parts of the
|
|
198
|
+
* SDK to users in the country in which You are resident or from which You use the
|
|
199
|
+
* service, or the provision of the SDK or certain SDK services to You by Realsee
|
|
200
|
+
* is, in Realsee's sole discretion, no longer legally or commercially viable.
|
|
201
|
+
|
|
202
|
+
* 6.3 When the Agreement comes to an end, all of the legal rights, obligations and
|
|
203
|
+
* liabilities that You and Realsee have benefited from, been subject to (or which
|
|
204
|
+
* have accrued over time whilst the Agreement has been in force) or which are
|
|
205
|
+
* expressed to continue indefinitely, shall be unaffected by this cessation, and
|
|
206
|
+
* the provisions of Sections 3, 4, 5, 7, 8, 9, 10, and 11 shall continue to apply
|
|
207
|
+
* to such rights, obligations and liabilities indefinitely.
|
|
208
|
+
|
|
209
|
+
* 7. DISCLAIMER OF WARRANTY.
|
|
210
|
+
|
|
211
|
+
* YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE
|
|
212
|
+
* LAW, USE OF THE SDK (OR ANY PART THEREOF) IS AT YOUR SOLE RISK AND THAT THE
|
|
213
|
+
* ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS
|
|
214
|
+
* WITH YOU. REALSEE LICENSES THE SDK TO YOU ONLY ON AN "AS-IS" BASIS. REALSEE
|
|
215
|
+
* MAKES NO REPRESENTATION WITH RESPECT TO THE ADEQUACY OF ANY ITEMS IN THE SDK,
|
|
216
|
+
* WHETHER OR NOT USED BY YOU IN THE DEVELOPMENT OF INTEGRATED PRODUCT, FOR ANY
|
|
217
|
+
* PARTICULAR PURPOSE OR WITH RESPECT TO THEIR ADEQUACY TO PRODUCE ANY PARTICULAR
|
|
218
|
+
* RESULT. REALSEE AND ITS LICENSORS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING
|
|
219
|
+
* OUT OF THIS AGREEMENT OR FROM THE DISTRIBUTION OR USE OF INTEGRATED PRODUCT
|
|
220
|
+
* CONTAINING PORTIONS OF THE SDK. REALSEE AND ITS LICENSORS DISCLAIM ALL
|
|
221
|
+
* WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED
|
|
222
|
+
* CONDITIONS OR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
223
|
+
* OR NONINFRINGEMENT OF ANY THIRD PARTY RIGHT IN RESPECT OF THE ITEMS IN THE SDK
|
|
224
|
+
* OR ANY SERVICES RELATED TO THE SDK.
|
|
225
|
+
|
|
226
|
+
* REALSEE IS UNDER NO OBLIGATION TO PROVIDE ANY SUPPORT UNDER THIS LICENSE
|
|
227
|
+
* AGREEMENT, INCLUDING UPGRADES OR FUTURE VERSIONS OF THE SDK OR ANY PORTIONS
|
|
228
|
+
* THEREOF, TO YOU, END USER OR TO ANY OTHER PARTY.
|
|
229
|
+
|
|
230
|
+
* 8. LIMITATION OF LIABILITY.
|
|
231
|
+
|
|
232
|
+
* TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, IN NO EVENT WILL REALSEE OR ITS
|
|
233
|
+
* LICENSORS BE LIABLE FOR ANY DIRECT, INCIDENTAL, SPECIAL, INDIRECT, OR
|
|
234
|
+
* CONSEQUENTIAL DAMAGES, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE,
|
|
235
|
+
* LOSS OF BUSINESS, REVENUE, OR PROFITS, LOSS OF OPPORTUNITY (WHETHER DIRECT OR
|
|
236
|
+
* INDIRECT), CORRUPTION OR LOSS OF DATA, LOSS OF REPUTATION OR SAVINGS, DOWNTIME,
|
|
237
|
+
* OR DAMAGE TO, LOSS OF OR REPLACEMENT OF DATA OR TRANSACTIONS, COST OF
|
|
238
|
+
* PROCUREMENT OF SUBSTITUTE SERVICES, BUSINESS INTERRUPTION, OR ANY OTHER
|
|
239
|
+
* COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OR INABILITY
|
|
240
|
+
* TO USE THE SDK (OR ANY PART THEREOF), ANY INTEGRATED PRODUCT, OR ANY THIRD PARTY
|
|
241
|
+
* SOFTWARE, APPLICATIONS, OR SERVICES IN CONJUNCTION WITH THE SDK (OR ANY PART
|
|
242
|
+
* THEREOF), HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT,
|
|
243
|
+
* OR OTHERWISE) AND EVEN IF REALSEE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
244
|
+
* DAMAGES. IN NO EVENT WILL REALSEE’S TOTAL LIABILITY TO YOU FOR ALL DAMAGES
|
|
245
|
+
* EXCEED ONE HUNDRED DOLLARS ($100.00). THE FOREGOING LIMITATIONS WILL APPLY EVEN
|
|
246
|
+
* IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. THE LIMITATIONS
|
|
247
|
+
* CONTAINED IN SECTION 7 AND THIS SECTION 8 ARE A FUNDAMENTAL PART OF THE BASIS OF
|
|
248
|
+
* REALSEE’S BARGAIN HEREUNDER, AND REALSEE WOULD NOT ENTER INTO THIS AGREEMENT OR
|
|
249
|
+
* PROVIDE YOU WITH ACCESS TO THE SDK ABSENT SUCH LIMITATIONS.
|
|
250
|
+
|
|
251
|
+
* 9. INDEMNIFICATION.
|
|
252
|
+
|
|
253
|
+
* To the extent permitted by applicable law, You agree to indemnify, defend and
|
|
254
|
+
* hold harmless Realsee, its affiliates and each of their directors, officers,
|
|
255
|
+
* employees, independent contractors, and agents (each a “Realsee Indemnified
|
|
256
|
+
* Party”) from any and all claims, losses, liabilities, damages, expenses, and
|
|
257
|
+
* costs (including without limitation attorneys’ fees and court costs) incurred by
|
|
258
|
+
* a Realsee Indemnified Party as a result of: (i) Your non-compliance with any
|
|
259
|
+
* terms of this Agreement; (ii) Your use of the SDK (or any part thereof); or
|
|
260
|
+
* (iii) Your use of any Integrated Product, including any claim that Integrated
|
|
261
|
+
* Product infringes the copyright, trademark, trade secret or other intellectual
|
|
262
|
+
* property right of a third party.
|
|
263
|
+
|
|
264
|
+
* 10. ACKNOWLEDGEMENTS.
|
|
265
|
+
|
|
266
|
+
* Portions of the SDK may utilize or include third party software and other
|
|
267
|
+
* copyrighted material. Acknowledgments, licensing terms, and disclaimers for such
|
|
268
|
+
* material are contained in Documentation for the SDK or may otherwise accompany
|
|
269
|
+
* such material, and Your use of such materials governed by their respective
|
|
270
|
+
* terms. In the event of conflict between the terms of this Agreement and an
|
|
271
|
+
* applicable open source or third party agreement, the open source or third party
|
|
272
|
+
* agreement will control solely with respect to the open source software or third
|
|
273
|
+
* party software. Moreover, You shall not subject any items (including not limited
|
|
274
|
+
* to source code, object code, and any software) included in the SDK to any open
|
|
275
|
+
* source license.
|
|
276
|
+
|
|
277
|
+
* 11. NON-BLOCKING OF REALSEE DEVELOPMENT.
|
|
278
|
+
|
|
279
|
+
* You acknowledge that Realsee is currently developing or may develop technologies
|
|
280
|
+
* and products in the future that have or may have design and/or functionality
|
|
281
|
+
* similar to Integrated Product that You may develop based on Your license herein.
|
|
282
|
+
* Nothing in this Agreement shall impair, limit or curtail Realsee's right to
|
|
283
|
+
* continue with its development, maintenance and/or distribution of Realsee's
|
|
284
|
+
* technology or products.
|
|
285
|
+
|
|
286
|
+
* 12. GENERAL.
|
|
287
|
+
|
|
288
|
+
* 12.1 Export Control. You may not use or otherwise export or re-export the SDK
|
|
289
|
+
* (or any part thereof) except as authorized by United States law and the laws of
|
|
290
|
+
* the jurisdiction(s) in which the SDK (or any part thereof) was obtained. In
|
|
291
|
+
* particular, but without limitation, the SDK may not be exported or re-exported
|
|
292
|
+
* (i) into any U.S. embargoed countries or (ii) to anyone on the U.S. Treasury
|
|
293
|
+
* Department's list of Specially Designated Nationals or the U.S. Department of
|
|
294
|
+
* Commerce Denied Person's List or Entity List. By using the SDK (or any part
|
|
295
|
+
* thereof), You represent and warrant that You are not located in any such country
|
|
296
|
+
* or on any such list.
|
|
297
|
+
|
|
298
|
+
* 12.2 Governing Law and Dispute Resolution.
|
|
299
|
+
|
|
300
|
+
* This Agreement shall be governed by the laws of the Hong Kong Special
|
|
301
|
+
* Administrative Region of the People's Republic of China, without regard to its
|
|
302
|
+
* conflict of laws principles. Any dispute arising out of or in connection with
|
|
303
|
+
* this Agreement, including its existence, validity, interpretation, performance,
|
|
304
|
+
* breach, or termination, shall first be submitted to thirty (30) days of good
|
|
305
|
+
* faith consultation, and if unresolved, to final and binding arbitration
|
|
306
|
+
* administered by the HKIAC in Hong Kong in English under the HKIAC Administered
|
|
307
|
+
* Arbitration Rules in force at the time of submission, with one (1) arbitrator
|
|
308
|
+
* unless the amount in dispute exceeds USD 1,000,000, in which case three (3)
|
|
309
|
+
* arbitrators shall be appointed. Either party may seek interim or injunctive
|
|
310
|
+
* relief from any court of competent jurisdiction notwithstanding the foregoing.
|
|
311
|
+
|
|
312
|
+
* 12.3 Severability. If any provision of this Agreement is held by a court of
|
|
313
|
+
* competent jurisdiction to be unenforceable for any reason, the remaining
|
|
314
|
+
* provisions hereof will be unaffected and remain in full force and effect.
|
|
315
|
+
|
|
316
|
+
* 12.4 Modifications. Realsee reserves the right, from time to time, with or
|
|
317
|
+
* without notice to You, to make revisions to this Agreement in our sole and
|
|
318
|
+
* absolute discretion. The most current version of this Agreement will supersede
|
|
319
|
+
* all previous versions and shall be made available on the website where the SDK
|
|
320
|
+
* is made available, or by such other means as Realsee may determine in its
|
|
321
|
+
* discretion. Any modified versions of this Agreement hereto shall take effect
|
|
322
|
+
* from the time that it is made available. You shall be responsible for regularly
|
|
323
|
+
* checking for notice of any such modifications. You agree that Your continued use
|
|
324
|
+
* of the SDK constitutes Your agreement to the modified Agreement.
|
|
325
|
+
|
|
326
|
+
* 12.5 Relationship of the Parties. This Agreement will not be construed as
|
|
327
|
+
* creating an agency, partnership, joint venture, fiduciary duty, or any other
|
|
328
|
+
* form of legal association between You and Realsee, and You will not represent to
|
|
329
|
+
* the contrary, whether expressly, by implication, appearance, or otherwise.
|
|
330
|
+
|
|
331
|
+
* 12.6 Entire Agreement; Governing Language. This Agreement constitutes the entire
|
|
332
|
+
* agreement between You and Realsee with respect to the use of the SDK licensed
|
|
333
|
+
* hereunder and supersedes all prior understandings regarding such subject matter.
|
|
334
|
+
* No amendment to or modification of this Agreement will be binding unless in
|
|
335
|
+
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
|
+
* Agreement and all related documents shall be drafted in English.
|
|
337
|
+
|
|
338
|
+
*/import{d as isSHDegree,l as SH_UINT32_PER_SPLAT,r as SH_BYTES_PER_SPLAT,s as SH_COEFFS,u as SPZ_SH_BYTES}from"./pbmGaussianSplattingObject.mjs";import{d as noop,i as ROTATE_X_MATRIX_INVERSE,n as getMemoryUsage,u as internalFetcher}from"./memoryUsage.mjs";import{__awaiter}from"tslib";function assertDegree(degree){if(!isSHDegree(degree))throw RangeError(`[sh-core] SH 阶数必须为 1、2 或 3,收到 ${degree}`)}function encodeUnchecked(x,invScale){if(!Number.isFinite(x))return 128;let q=Math.round(x*invScale)+128;return q<0?0:q>255?255:q}function packSpzSH(src,numSplats,fileDegree,outDegree){if(assertDegree(fileDegree),assertDegree(outDegree),outDegree>fileDegree)throw RangeError(`[sh-core] 输出阶数 ${outDegree} 高于文件阶数 ${fileDegree}`);let stride=SPZ_SH_BYTES[fileDegree];if(!(Number.isInteger(numSplats)&&numSplats>=0)||src.length<numSplats*stride)throw RangeError(`[sh-core] SPZ SH 数据截断:需要 ${numSplats*stride} 字节,实际 ${src.length}`);let bpp=SH_BYTES_PER_SPLAT[outDegree],upp=SH_UINT32_PER_SPLAT[outDegree],out=new Uint32Array(numSplats*upp);for(let s=0;s<numSplats;s++){let base=s*stride,dst=s*upp;for(let i=0;i<bpp;i++)out[dst+(i>>2)]|=src[base+i]<<(i&3)*8}return out}function quantizeAndPackSH(coeffs,numSplats,degree){assertDegree(degree);let bpp=SH_BYTES_PER_SPLAT[degree];if(!(Number.isInteger(numSplats)&&numSplats>=0)||coeffs.length!==numSplats*bpp)throw RangeError(`[sh-core] 系数长度 ${coeffs.length} 与 ${numSplats} × ${bpp} 不一致`);let maxAbs=0;for(let i=0;i<coeffs.length;i++){let v=coeffs[i];if(Number.isFinite(v)){let a=v<0?-v:v;a>maxAbs&&(maxAbs=a)}}let shMax=maxAbs>0?maxAbs*128/127:1,inv=128/shMax,upp=SH_UINT32_PER_SPLAT[degree],out=new Uint32Array(numSplats*upp);for(let s=0;s<numSplats;s++){let src=s*bpp,dst=s*upp;for(let i=0;i<bpp;i++)out[dst+(i>>2)]|=encodeUnchecked(coeffs[src+i],inv)<<(i&3)*8}return{packed:out,shMax}}var jsContent='(function(){function e(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function t(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function n(e){return function(){var n=this,r=arguments;return new Promise(function(i,a){var o=e.apply(n,r);function s(e){t(o,i,a,s,c,`next`,e)}function c(e){t(o,i,a,s,c,`throw`,e)}s(void 0)})}}function r(){return i.apply(this,arguments)}function i(){return i=n(function*(e={}){var t,r=e,i=!1,a=!0,o=self.location.href;if(i||a){try{new URL(`.`,o).href}catch(e){}(function(){var e=n(function*(e){var t=yield fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)});return function(t){return e.apply(this,arguments)}})()}console.log.bind(console),console.error.bind(console);var s=!1;function c(e){for(var t=0,n=e.length,r=new Uint8Array(n),i;t<n;++t)i=e.charCodeAt(t),r[t]=~i>>8&i;return r}var l,u,d=!1;function f(){var e=N.buffer;new Int8Array(e),new Int16Array(e),r.HEAPU8=u=new Uint8Array(e),new Uint16Array(e),new Int32Array(e),r.HEAPU32=new Uint32Array(e),r.HEAPF32=new Float32Array(e),new Float64Array(e),new BigInt64Array(e),new BigUint64Array(e)}function p(){if(r.preRun)for(typeof r.preRun==`function`&&(r.preRun=[r.preRun]);r.preRun.length;)E(r.preRun.shift());S(T)}function m(){d=!0,L.c()}function h(){if(r.postRun)for(typeof r.postRun==`function`&&(r.postRun=[r.postRun]);r.postRun.length;)w(r.postRun.shift());S(C)}var g;function _(){return c(`\\0asm\\0\\0\\0&\\`\\`}}\\`}\\`\\0\\`\\v\\0\\`\\0\\0\\x07aa\\0\\0\\b\\x07\\0\\0\\x07\\bA\\v\\x07b\\0c\\0\\x07d\\0e\\0f\\0\\f\n;\\x07T~@A\\b(\\0" \\0B\\x07|Bøÿÿÿ|"BÿÿÿÿX@ §"\\0?\\0AtM\\r \\0\\0\\r\\vA\\bA06\\0A\\vA\\b \\x006\\0 \\v\\0 \\0 Atr\\vr \\0¼"Aÿÿÿq!@ AvAÿq"E\\r\\0 Að\\0M@ ArAñ\\0 kv!\\f\\v AK@Aø!A\\0!\\f\\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 \\r8\\0 j-\\0\\0 $j-\\0\\0A\\btr %j-\\0\\0Atr &j-\\0\\0Atr6\\f *\\0! \'*\\0! "*\\0"\\f \\f !*\\0"\\v \\v #*\\0" *\\0"\\r \\r"C\\0\\0\\0\\0^@ \\f "!\\f \\r !\\r ! \\v !\\v\\v \\r \\f" \\v "" " C\\0\\0? \\v \\v" \\f \\f"" " \\r \\v" \\f "" " C\\0\\0@ \\v \\f"\\x1B \\r ""\\f \\f"\\f "\\v \\v"\\v C\\0\\0? \\r \\r" "\\r \\r"\\r C\\0\\0@6 C\\0\\0? " " " " \\x1B " "C\\0\\0@ \\f \\f \\v \\v \\r \\rC\\0\\0@6 A\\x006 \\f \\v \\r C\\0\\0@ C\\0\\0@6 \\0Aj!\\0\\f\\v\\v\\v\\0\\v\\v \\0A\\b\\v`)}function v(e){return e}function y(e,t){var n,r=v(e);return n=new WebAssembly.Module(r),[new WebAssembly.Instance(n,t),n]}function b(){return{a:F}}function x(){function e(e,t){return L=e.exports,P(L),f(),L}var t=b();return r.instantiateWasm?new Promise((n,i)=>{r.instantiateWasm(t,(t,r)=>{n(e(t,r))})}):(g!=null||(g=_()),e(y(g,t)[0]))}for(var S=e=>{for(;e.length>0;)e.shift()(r)},C=[],w=e=>C.push(e),T=[],E=e=>T.push(e),D=()=>2147483648,O=(e,t)=>Math.ceil(e/t)*t,k=e=>{var t=(e-N.buffer.byteLength+65535)/65536|0;try{return N.grow(t),f(),1}catch(e){}},A=e=>{var t=u.length;e>>>=0;var n=D();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),k(Math.min(n,O(Math.max(e,i),65536))))return!0}return!1},j=new Uint8Array(123),M=25;M>=0;--M)j[48+M]=52+M,j[65+M]=M,j[97+M]=26+M;if(j[43]=62,j[47]=63,r.noExitRuntime&&r.noExitRuntime,r.print&&r.print,r.printErr&&r.printErr,r.wasmBinary&&r.wasmBinary,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.preInit)for(typeof r.preInit==`function`&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.shift()();var N;function P(e){r._pack=e.d,r._malloc=e.e,r._free=e.f,N=e.b,e.__indirect_function_table}var F={a:A};function I(){p();function e(){var e;r.calledRun=!0,!s&&(m(),l==null||l(r),(e=r.onRuntimeInitialized)==null||e.call(r),h())}r.setStatus?(r.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>r.setStatus(``),1),e()},1)):e()}var L=x();return I(),t=d?r:new Promise((e,t)=>{l=e}),t}),i.apply(this,arguments)}let a=[0,3,8,15],o=[0,9,24,45],s=[0,4,8,12],c=[0,9,24,45];function l(e){return e===1||e===2||e===3}function u(e){if(!l(e))throw RangeError(`[sh-core] SH 阶数必须为 1、2 或 3,收到 ${e}`)}function d(e,t){if(!Number.isFinite(e))return 128;let n=Math.round(e*t)+128;return n<0?0:n>255?255:n}function f(e,t,n,r){if(u(n),u(r),r>n)throw RangeError(`[sh-core] 输出阶数 ${r} 高于文件阶数 ${n}`);let i=c[n];if(!(Number.isInteger(t)&&t>=0)||e.length<t*i)throw RangeError(`[sh-core] SPZ SH 数据截断:需要 ${t*i} 字节,实际 ${e.length}`);let a=o[r],l=s[r],d=new Uint32Array(t*l);for(let n=0;n<t;n++){let t=n*i,r=n*l;for(let n=0;n<a;n++)d[r+(n>>2)]|=e[t+n]<<(n&3)*8}return d}function p(e,t,n){u(n);let r=o[n];if(!(Number.isInteger(t)&&t>=0)||e.length!==t*r)throw RangeError(`[sh-core] 系数长度 ${e.length} 与 ${t} × ${r} 不一致`);let i=0;for(let t=0;t<e.length;t++){let n=e[t];if(Number.isFinite(n)){let e=n<0?-n:n;e>i&&(i=e)}}let a=i>0?i*128/127:1,c=128/a,l=s[n],f=new Uint32Array(t*l);for(let n=0;n<t;n++){let t=n*r,i=n*l;for(let n=0;n<r;n++)f[i+(n>>2)]|=d(e[t+n],c)<<(n&3)*8}return{packed:f,shMax:a}}let m=.28209479177387814,h=m/.15;function g(e){if(!Number.isFinite(e))return 0;let t=Math.round(((e-.5)/h+.5)*255);return t<0?0:t>255?255:t}function _(e){return(e/255-.5)*h+.5}let v=new Float32Array(1),y=new Uint32Array(v.buffer),b=typeof Float16Array<`u`,x=b?new Float16Array(1):null,S=b?new Uint16Array(x.buffer):new Uint16Array(1);function C(e){if(b&&x)return S[0]=e,x[0];let t=e>>15&1,n=e>>10&31,r=e&1023,i;if(n===0)if(r===0)i=t<<31;else{let e=r,n=-14;for(;!(e&1024);)e<<=1,n--;e&=1023;let a=n+127,o=e<<13;i=t<<31|a<<23|o}else if(n===31)i=r===0?t<<31|2139095040:t<<31|2143289344;else{let e=n-15+127,a=r<<13;i=t<<31|e<<23|a}return y[0]=i,v[0]}var w=class{constructor({fileBytes:e}){this.fileBytes=e,this.chunks=[],this.totalBytes=0;let t=new DecompressionStream(`gzip`),n=new Blob([e]).stream().pipeThrough(t);this.reader=n.getReader()}read(t){return e(this,void 0,void 0,function*(){for(;this.totalBytes<t;){let{value:e,done:t}=yield this.reader.read();if(t)break;this.chunks.push(e),this.totalBytes+=e.length}if(this.totalBytes<t)throw Error(`Unexpected EOF: needed ${t}, got ${this.totalBytes}`);let e=new Uint8Array(this.totalBytes),n=0;for(let t of this.chunks)e.set(t,n),n+=t.length;let r=e.subarray(0,t);return this.chunks=[e.subarray(t)],this.totalBytes-=t,r})}},T=class{constructor({fileBytes:e}){this.version=-1,this.numSplats=0,this.shDegree=0,this.fractionalBits=0,this.flags=0,this.flagAntiAlias=!1,this.reserved=0,this.headerParsed=!1,this.parsed=!1,this.fileBytes=e instanceof ArrayBuffer?new Uint8Array(e):e,this.reader=new w({fileBytes:this.fileBytes})}parseHeader(){return e(this,void 0,void 0,function*(){if(this.headerParsed)throw Error(`SPZ file header already parsed`);let e=this.fileBytes;if(!(e.length>=2&&e[0]===31&&e[1]===139)){if(e.length>=8&&e[0]===78&&e[1]===71&&e[2]===83&&e[3]===80){let t=new DataView(e.buffer,e.byteOffset,8).getUint32(4,!0);throw Error(`Unsupported SPZ version: ${t} (ZSTD based SPZ is not supported, please export SPZ v3)`)}throw Error(`Invalid SPZ file: not gzip compressed`)}let t=new DataView((yield this.reader.read(16)).buffer);if(t.getUint32(0,!0)!==1347635022)throw Error(`Invalid SPZ file`);if(this.version=t.getUint32(4,!0),this.version<1||this.version>3)throw Error(`Unsupported SPZ version: ${this.version}`);this.numSplats=t.getUint32(8,!0),this.shDegree=t.getUint8(12),this.fractionalBits=t.getUint8(13),this.flags=t.getUint8(14),this.flagAntiAlias=(this.flags&1)!=0,this.reserved=t.getUint8(15),this.headerParsed=!0,this.parsed=!1})}parseSplats(t,n,r,i,a,o){return e(this,void 0,void 0,function*(){if(!this.headerParsed)throw Error(`SPZ file header must be parsed first`);if(this.parsed)throw Error(`SPZ file already parsed`);if(this.parsed=!0,this.version===1){let e=yield this.reader.read(this.numSplats*3*2),n=new Uint16Array(e.buffer);for(let e=0;e<this.numSplats;e++){let r=e*3;t==null||t(e,C(n[r]),C(n[r+1]),C(n[r+2]))}}else if(this.version===2||this.version===3){let e=1<<this.fractionalBits,n=yield this.reader.read(this.numSplats*3*3);for(let r=0;r<this.numSplats;r++){let i=r*9,a=((n[i+2]<<24|n[i+1]<<16|n[i]<<8)>>8)/e,o=((n[i+5]<<24|n[i+4]<<16|n[i+3]<<8)>>8)/e,s=((n[i+8]<<24|n[i+7]<<16|n[i+6]<<8)>>8)/e;t==null||t(r,a,o,s)}}{let e=yield this.reader.read(this.numSplats);for(let t=0;t<this.numSplats;t++)n==null||n(t,e[t]/255)}{let e=yield this.reader.read(this.numSplats*3);for(let t=0;t<this.numSplats;t++){let n=t*3;r==null||r(t,_(e[n]),_(e[n+1]),_(e[n+2]))}}{let e=yield this.reader.read(this.numSplats*3);for(let t=0;t<this.numSplats;t++){let n=t*3;i==null||i(t,Math.exp(e[n]/16-10),Math.exp(e[n+1]/16-10),Math.exp(e[n+2]/16-10))}}if(this.version===3){let e=1/Math.sqrt(2),t=yield this.reader.read(this.numSplats*4);for(let n=0;n<this.numSplats;n++){let r=n*4,i=[0,0,0,0],o=[t[r],t[r+1],t[r+2],t[r+3]],s=o[0]+(o[1]<<8)+(o[2]<<16)+(o[3]<<24),c=s>>>30,l=s,u=0;for(let t=3;t>=0;--t)if(t!==c){let n=l&511,r=l>>>9&1;l>>>=10,i[t]=n/511*e,i[t]=r===0?i[t]:-i[t],u+=i[t]*i[t]}i[c]=Math.sqrt(Math.max(1-u,0)),a==null||a(n,i[0],i[1],i[2],i[3])}}else{let e=yield this.reader.read(this.numSplats*3);for(let t=0;t<this.numSplats;t++){let n=t*3,r=e[n]/127.5-1,i=e[n+1]/127.5-1,o=e[n+2]/127.5-1,s=Math.sqrt(Math.max(0,1-r*r-i*i-o*o));a==null||a(t,r,i,o,s)}}o&&this.shDegree>=1&&this.shDegree<=3&&o(yield this.reader.read(this.numSplats*c[this.shDegree]))})}};function E(t){return e(this,void 0,void 0,function*(){let e=new T({fileBytes:t});yield e.parseHeader();let n=e.numSplats,r=new Float32Array(n*3),i=new Uint8Array(n*4),a=new Float32Array(n*3),o=new Float32Array(n*4),s=e.shDegree>=1&&e.shDegree<=3?e.shDegree:0,c=Math.min(s,2),l;return yield e.parseSplats((e,t,n,i)=>{r[e*3]=t,r[e*3+1]=n,r[e*3+2]=i},(e,t)=>{i[e*4+3]=Math.round(t*255)},(e,t,n,r)=>{i[e*4]=g(t),i[e*4+1]=g(n),i[e*4+2]=g(r)},(e,t,n,r)=>{a[e*3]=t,a[e*3+1]=n,a[e*3+2]=r},(e,t,n,r,i)=>{o[e*4]=i,o[e*4+1]=t,o[e*4+2]=n,o[e*4+3]=r},e=>{c>0&&(l=f(e,n,s,c))}),{numPoints:n,shDegree:l?c:0,flagAntiAlias:e.flagAntiAlias,positions:r,colors:i,scales:a,rotations:o,shPacked:l,shMax:1}})}let D={float:{code:0,size:4},float32:{code:0,size:4},double:{code:1,size:8},float64:{code:1,size:8},uchar:{code:2,size:1},uint8:{code:2,size:1},char:{code:3,size:1},int8:{code:3,size:1},ushort:{code:4,size:2},uint16:{code:4,size:2},short:{code:5,size:2},int16:{code:5,size:2},uint:{code:6,size:4},uint32:{code:6,size:4},int:{code:7,size:4},int32:{code:7,size:4}},O=[`x`,`y`,`z`,`f_dc_0`,`f_dc_1`,`f_dc_2`,`opacity`,`scale_0`,`scale_1`,`scale_2`,`rot_0`,`rot_1`,`rot_2`,`rot_3`];function k(e,t,n){switch(n){case 0:return e.getFloat32(t,!0);case 1:return e.getFloat64(t,!0);case 2:return e.getUint8(t);case 3:return e.getInt8(t);case 4:return e.getUint16(t,!0);case 5:return e.getInt16(t,!0);case 6:return e.getUint32(t,!0);default:return e.getInt32(t,!0)}}function A(e){var t;if(e.length<4||e[0]!==112||e[1]!==108||e[2]!==121||e[3]!==10&&e[3]!==13)throw Error(`Not a PLY file`);let n=Math.min(e.length,1048576),r=-1;for(let t=0;t+10<=n;t++){if(t>0&&e[t-1]!==10)continue;let n=!0;for(let r=0;r<10;r++)if(e[t+r]!==`end_header`.charCodeAt(r)){n=!1;break}if(n){r=t;break}}if(r<0)throw Error(`Invalid PLY header`);let i=r+10;if(e[i]===13&&i++,e[i]!==10)throw Error(`Invalid PLY header`);i++;let a=``;for(let t=0;t<r;t++)a+=String.fromCharCode(e[t]);let o=``,s=[],c=null;for(let e of a.split(/\\r?\\n/)){let n=e.trim().split(/\\s+/);switch(n[0]){case`format`:o=(t=n[1])==null?``:t;break;case`element`:c={name:n[1],count:parseInt(n[2],10)||0,stride:0,properties:[]},s.push(c);break;case`property`:if(!c)break;if(n[1]===`list`)c.properties.push({name:n[4],type:`list`,offset:-1}),c.stride=-1;else{let e=D[n[1]];if(!e)throw Error(`Unsupported PLY property type: ${n[1]}`);c.properties.push({name:n[2],type:n[1],offset:c.stride}),c.stride>=0&&(c.stride+=e.size)}break;default:break}}return{format:o,elements:s,dataOffset:i}}function j(e){let t=A(e),{format:n,elements:r}=t;if(n!==`binary_little_endian`)throw Error(`Unsupported PLY format: ${n}`);if(r.some(e=>e.name===`chunk`))throw Error(`Compressed PLY is not supported`);let i=r.findIndex(e=>e.name===`vertex`);if(i<0)throw Error(`Not a 3DGS PLY: missing vertex`);for(let e=0;e<=i;e++){let t=r[e].properties.find(e=>e.type===`list`);if(t)throw Error(`List properties are not supported: ${r[e].name}.${t.name}`)}let a=r[i];for(let e of O)if(!a.properties.some(t=>t.name===e))throw Error(`Not a 3DGS PLY: missing ${e}`);return t}function M(e){let t=new Set(e.properties.map(e=>e.name)),n=0;for(;t.has(`f_rest_${n}`);)n++;switch(n){case 0:return 0;case 9:return 1;case 24:return 2;case 45:return 3;default:return console.warn(`[gaussianPly] unexpected f_rest count ${n}, SH ignored`),0}}function N(e){let t=j(e),n=t.elements.findIndex(e=>e.name===`vertex`),r=t.elements[n],i=t.dataOffset;for(let e=0;e<n;e++)i+=t.elements[e].count*t.elements[e].stride;let s=r.count,c=r.stride;if(e.byteLength-i<s*c)throw Error(`Unexpected end of PLY data`);let l=M(r),u=a[l],d=Math.min(l,2),f=a[d],p=o[d],h=new Map;for(let e of r.properties)h.set(e.name,e);let _=e=>h.get(e).offset,v=e=>D[h.get(e).type].code,y=new Int32Array(O.length),b=new Int32Array(O.length);O.forEach((e,t)=>{y[t]=_(e),b[t]=v(e)});let x=new Int32Array(f*3),S=new Int32Array(f*3);for(let e=0;e<f;e++)for(let t=0;t<3;t++){let n=`f_rest_${t*u+e}`;x[e*3+t]=_(n),S[e*3+t]=v(n)}let C=!0;for(let e=0;e<b.length;e++)b[e]!==0&&(C=!1);for(let e=0;e<S.length;e++)S[e]!==0&&(C=!1);let w=new Float32Array(s*3),T=new Uint8Array(s*4),E=new Float32Array(s*3),A=new Float32Array(s*4),N=p>0?new Float32Array(s*p):void 0,P=new DataView(e.buffer,e.byteOffset,e.byteLength),F=C?(e,t)=>P.getFloat32(e,!0):(e,t)=>k(P,e,t),I=e=>{let t=Math.fround(e);return Number.isFinite(t)?t:0};for(let e=0;e<s;e++){let t=i+e*c,n=F(t+y[0],b[0]),r=F(t+y[1],b[1]),a=F(t+y[2],b[2]),o=F(t+y[3],b[3]),s=F(t+y[4],b[4]),l=F(t+y[5],b[5]),u=F(t+y[6],b[6]),d=F(t+y[7],b[7]),f=F(t+y[8],b[8]),h=F(t+y[9],b[9]),_=F(t+y[10],b[10]),v=F(t+y[11],b[11]),C=F(t+y[12],b[12]),D=F(t+y[13],b[13]),O=e*3;w[O]=I(n),w[O+1]=I(r),w[O+2]=I(a);let k=e*4;T[k]=g(.5+m*o),T[k+1]=g(.5+m*s),T[k+2]=g(.5+m*l);let j=Math.round(255/(1+Math.exp(-u)));T[k+3]=Number.isFinite(j)?j:0,E[O]=I(Math.exp(d)),E[O+1]=I(Math.exp(f)),E[O+2]=I(Math.exp(h)),_=Math.fround(_),v=Math.fround(v),C=Math.fround(C),D=Math.fround(D);let M=Math.sqrt(_*_+v*v+C*C+D*D);if(!Number.isFinite(M)||M===0?(_=1,v=0,C=0,D=0):(_/=M,v/=M,C/=M,D/=M),A[k]=_,A[k+1]=v,A[k+2]=C,A[k+3]=D,N){let n=e*p;for(let e=0;e<p;e++)N[n+e]=I(F(t+x[e],S[e]))}}return{numPoints:s,shBands:l,shDegree:d,positions:w,colors:T,scales:E,rotations:A,shCoeffs:N}}let P,F=!1;function I(){return e(this,void 0,void 0,function*(){if(!P){for(;F;)yield new Promise(e=>setTimeout(e,0));if(!P){F=!0;try{P=yield r()}finally{F=!1}}}})}let L=0,R=0,z=0,B=0,V=0,H=0,U=0,W=0,G=0,K=0;function q(e){let t=Math.pow(2,Math.ceil(Math.log2(Math.max(1,e))));t<=L||(L>0&&(P._free(R),P._free(z),P._free(B),P._free(V),P._free(H),P._free(U),P._free(W),P._free(G),P._free(K)),L=t,R=P._malloc(3*t*4),z=P._malloc(4*t*4),B=P._malloc(3*t*4),V=P._malloc(4*t),H=P._malloc(t),U=P._malloc(8*t*4),W=P._malloc(3*t*4),G=P._malloc(4*t*4),K=P._malloc(3*t*4))}function J(e,t,n,r,i){q(e);let a=new Uint8Array(e);P.HEAPF32.set(t,R/4),P.HEAPF32.set(n,z/4),P.HEAPF32.set(r,B/4),P.HEAPU8.set(i,V),P.HEAPU8.set(a,H),P._pack(!1,e,R,z,B,V,H,U,W,G,K);let o=new Uint32Array(P.HEAPU32.buffer,U,e*8);return new Uint32Array(o.slice().buffer)}typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope&&(self.onmessage=t=>e(void 0,void 0,void 0,function*(){var e,n;let{requestId:r,fileBytes:i,kind:a=`spz`}=t.data;if(!(i===void 0||r===void 0)){if(a===`gaussian-ply`){try{let e=N(new Uint8Array(i)),t,n=1;if(e.shCoeffs&&e.shDegree>0){let r=p(e.shCoeffs,e.numPoints,e.shDegree);t=r.packed,n=r.shMax}yield I();let a=J(e.numPoints,e.positions,e.rotations,e.scales,e.colors),o={numPoints:e.numPoints,shBands:e.shBands,shDegree:t?e.shDegree:0,packedData:a,shPacked:t,shMax:n},s=[a.buffer];t&&s.push(t.buffer),self.postMessage({requestId:r,decoded:o},s)}catch(t){self.postMessage({requestId:r,error:(e=t==null?void 0:t.message)==null?String(t):e})}return}if(a!==`spz`){self.postMessage({requestId:r,error:`Unknown decode kind: ${String(a)}`});return}try{let e=yield E(new Uint8Array(i));yield I();let t=J(e.numPoints,e.positions,e.rotations,e.scales,e.colors),n=Object.assign(Object.assign({},e),{packedData:t}),a=[t.buffer,e.positions.buffer,e.colors.buffer,e.scales.buffer,e.rotations.buffer];e.shPacked&&a.push(e.shPacked.buffer),self.postMessage({requestId:r,decoded:n},a)}catch(e){self.postMessage({requestId:r,error:(n=e==null?void 0:e.message)==null?String(e):n})}}}))})();',blob=typeof self<`u`&&self.Blob&&new Blob([`(self.URL || self.webkitURL).revokeObjectURL(self.location.href);`,jsContent],{type:`text/javascript;charset=utf-8`});function WorkerWrapper(options){let objURL;try{if(objURL=blob&&(self.URL||self.webkitURL).createObjectURL(blob),!objURL)throw``;let worker=new Worker(objURL,{name:options==null?void 0:options.name});return worker.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(objURL)}),worker}catch(e){return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(jsContent),{name:options==null?void 0:options.name})}}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){e(n);return}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,`next`,n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,`throw`,n)}_next(void 0)})}}function createDataModule(){return _createDataModule.apply(this,arguments)}function _createDataModule(){return _createDataModule=_asyncToGenerator(function*(moduleArg={}){var moduleRtn,Module=moduleArg,ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!0,_scriptName=import.meta.url;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{new URL(`.`,_scriptName).href}catch(_unused){}(function(){var _ref=_asyncToGenerator(function*(url){var response=yield fetch(url,{credentials:`same-origin`});if(response.ok)return response.arrayBuffer();throw Error(response.status+` : `+response.url)});return function(_x){return _ref.apply(this,arguments)}})()}console.log.bind(console),console.error.bind(console);var ABORT=!1;function binaryDecode(bin){for(var i=0,l=bin.length,o=new Uint8Array(l),c;i<l;++i)c=bin.charCodeAt(i),o[i]=~c>>8&c;return o}var readyPromiseResolve,HEAPU8,runtimeInitialized=!1;function updateMemoryViews(){var b=wasmMemory.buffer;new Int8Array(b),new Int16Array(b),Module.HEAPU8=HEAPU8=new Uint8Array(b),new Uint16Array(b),new Int32Array(b),Module.HEAPU32=new Uint32Array(b),Module.HEAPF32=new Float32Array(b),new Float64Array(b),new BigInt64Array(b),new BigUint64Array(b)}function preRun(){if(Module.preRun)for(typeof Module.preRun==`function`&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=!0,wasmExports.c()}function postRun(){if(Module.postRun)for(typeof Module.postRun==`function`&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}var wasmBinaryFile;function findWasmBinary(){return binaryDecode(`\0asm\0\0\0&\`\`}}\`}\`\0\`\v\0\`\0\0\x07aa\0\0\b\x07\0\0\x07\bA\v\x07b\0c\0\x07d\0e\0f\0\f
|
|
339
|
+
;\x07T~@A\b(\0" \0B\x07|Bøÿÿÿ|"BÿÿÿÿX@ §"\0?\0AtM\r \0\0\r\vA\bA06\0A\vA\b \x006\0 \v\0 \0 Atr\vr \0¼"Aÿÿÿq!@ AvAÿq"E\r\0 Að\0M@ ArAñ\0 kv!\f\v AK@Aø!A\0!\f\v A
|
|
340
|
+
tA\x07k!\v AvAqr A\rvr\vß\v\b@ \0E\r\0 \0A\bk" \0Ak(\0"Axq"\0j!@ Aq\r\0 AqE\r (\0"k"A\b(\0I\r \0 j!\0@@@A\b(\0 G@ (\f! AÿM@ (\b"G\rA\bA\b(\0A~ Avwq6\0\f\v (!\x07 G@ (\b" 6\f 6\b\f\v (" Aj ("E\r Aj\v!@ ! "Aj! ("\r\0 Aj! ("\r\0\v A\x006\0\f\v ("AqAG\rA\b \x006\0 A~q6 \0Ar6 \x006\0\v 6\f 6\b\f\vA\0!\v \x07E\r\0@ ("At"(¸
|
|
341
|
+
F@ A¸
|
|
342
|
+
j 6\0 \rA\bA\b(\0A~ wq6\0\f\v@ \x07(F@ \x07 6\f\v \x07 6\v E\r\v \x076 ("@ 6 6\v ("E\r\0 6 6\v O\r\0 ("AqE\r\0@@@@ AqE@A\xA0\b(\0 F@A\xA0\b 6\0A\bA\b(\0 \0j"\x006\0 \0Ar6 A\b(\0G\rA\bA\x006\0A\bA\x006\0\vA\b(\0"\x07 F@A\b 6\0A\bA\b(\0 \0j"\x006\0 \0Ar6 \0 j \x006\0\v Axq \0j!\0 (\f!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0 6\b 6\f \x006\f 6\b\f\vA! \x07Aÿÿÿ\x07M@ \x07A& \x07A\bvg"\0kvAq \0AtrA>s!\v 6 B\x007 AtA¸
|
|
355
|
+
j!\0@@A\b(\0"A t"qE@A\b r6\0 \0 6\0\f\v \x07A AvkA\0 AG\x1Bt! \0(\0!@ "\0(Axq \x07F\r Av! At! \0 Aqj"("\r\0\v 6\v \x006 6\f 6\b\f\v \0(\b" 6\f \0 6\b A\x006 \x006\f 6\b\v \bA\bj!\0\f\v@ \bE\r\0@ ("At"(¸
|
|
356
|
+
F@ A¸
|
|
357
|
+
j \x006\0 \0\rA\b \x07A~ wq"\x076\0\f\v@ \b(F@ \b \x006\f\v \b \x006\v \0E\r\v \0 \b6 ("@ \0 6 \x006\v ("E\r\0 \0 6 \x006\v@ AM@ j"\0Ar6 \0 j"\0 \0(Ar6\f\v Ar6 j" Ar6 j 6\0 AÿM@ AøqA°\bj!\0A\b(\0"A Avt"qE@A\b r6\0 \0\f\v \0(\b\v! \0 6\b 6\f \x006\f 6\b\f\vA!\0 Aÿÿÿ\x07M@ A& A\bvg"\0kvAq \0AtrA>s!\0\v \x006 B\x007 \0AtA¸
|
|
358
|
+
j!@@ \x07A \0t"qE@A\b \x07r6\0 6\0 6\f\v A \0AvkA\0 \0AG\x1Bt!\0 (\0!@ "(Axq F\r \0Av! \0At!\0 Aqj"\x07("\r\0\v \x07 6 6\v 6\f 6\b\f\v (\b"\0 6\f 6\b A\x006 6\f \x006\b\v A\bj!\0\f\v@ E\r\0@ ("At"(¸
|
|
359
|
+
F@ A¸
|
|
360
|
+
j \x006\0 \0\rA\b \vA~ wq6\0\f\v@ (F@ \x006\f\v \x006\v \0E\r\v \0 6 ("@ \0 6 \x006\v ("E\r\0 \0 6 \x006\v@ AM@ j"\0Ar6 \0 j"\0 \0(Ar6\f\v Ar6 j" Ar6 j 6\0 \b@ \bAxqA°\bj!\0A\b(\0!A \bAvt"\x07 qE@A\b \x07r6\0 \0\f\v \0(\b\v! \0 6\b 6\f \x006\f 6\b\vA\b 6\0A\b 6\0\v A\bj!\0\v
|
|
361
|
+
Aj$\0 \0\v}\vA\0!\0@ \0 FE@ \0A\fl"Aj"j*\0!\f A\bj"j*\0!\v \bj j*\0"\r8\0 \b j \v8\0 \b j \f8\0 \0At"j j"#*\x008\0 \0At"Ar"$At" j j" *\x008\0 Ar"%At"!j !j"!*\x008\0 Ar"&At""j "j""*\x008\0
|
|
362
|
+
j j"'*\x008\0
|
|
363
|
+
j j"*\x008\0
|
|
364
|
+
j j*\0"8\0 \x07 \0Atj" \v8\b \f8 \r8\0 j-\0\0 $j-\0\0A\btr %j-\0\0Atr &j-\0\0Atr6\f *\0! '*\0! "*\0"\f \f !*\0"\v \v #*\0" *\0"\r \r"C\0\0\0\0^@ \f "!\f \r !\r ! \v !\v\v \r \f" \v "" " C\0\0? \v \v" \f \f"" " \r \v" \f "" " C\0\0@ \v \f"\x1B \r ""\f \f"\f "\v \v"\v C\0\0? \r \r" "\r \r"\r C\0\0@6 C\0\0? " " " " \x1B " "C\0\0@ \f \f \v \v \r \rC\0\0@6 A\x006 \f \v \r C\0\0@ C\0\0@6 \0Aj!\0\f\v\v\v\0\v\v \0A\b\v`)}function getBinarySync(file){return file}function instantiateSync(file,info){var module,binary=getBinarySync(file);return module=new WebAssembly.Module(binary),[new WebAssembly.Instance(module,info),module]}function getWasmImports(){return{a:wasmImports}}function createWasm(){function receiveInstance(instance,module){return wasmExports=instance.exports,assignWasmExports(wasmExports),updateMemoryViews(),wasmExports}var info=getWasmImports();return Module.instantiateWasm?new Promise((resolve,reject)=>{Module.instantiateWasm(info,(inst,mod)=>{resolve(receiveInstance(inst,mod))})}):(wasmBinaryFile!=null||(wasmBinaryFile=findWasmBinary()),receiveInstance(instantiateSync(wasmBinaryFile,info)[0]))}for(var callRuntimeCallbacks=callbacks=>{for(;callbacks.length>0;)callbacks.shift()(Module)},onPostRuns=[],addOnPostRun=cb=>onPostRuns.push(cb),onPreRuns=[],addOnPreRun=cb=>onPreRuns.push(cb),getHeapMax=()=>2147483648,alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment,growMemory=size=>{var pages=(size-wasmMemory.buffer.byteLength+65535)/65536|0;try{return wasmMemory.grow(pages),updateMemoryViews(),1}catch(e){}},_emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize)return!1;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);if(overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296),growMemory(Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536))))return!0}return!1},base64ReverseLookup=new Uint8Array(123),i=25;i>=0;--i)base64ReverseLookup[48+i]=52+i,base64ReverseLookup[65+i]=i,base64ReverseLookup[97+i]=26+i;if(base64ReverseLookup[43]=62,base64ReverseLookup[47]=63,Module.noExitRuntime&&Module.noExitRuntime,Module.print&&Module.print,Module.printErr&&Module.printErr,Module.wasmBinary&&Module.wasmBinary,Module.arguments&&Module.arguments,Module.thisProgram&&Module.thisProgram,Module.preInit)for(typeof Module.preInit==`function`&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.shift()();var wasmMemory;function assignWasmExports(wasmExports){Module._pack=wasmExports.d,Module._malloc=wasmExports.e,Module._free=wasmExports.f,wasmMemory=wasmExports.b,wasmExports.__indirect_function_table}var wasmImports={a:_emscripten_resize_heap};function run(){preRun();function doRun(){var _Module$onRuntimeInit;Module.calledRun=!0,!ABORT&&(initRuntime(),readyPromiseResolve==null||readyPromiseResolve(Module),(_Module$onRuntimeInit=Module.onRuntimeInitialized)==null||_Module$onRuntimeInit.call(Module),postRun())}Module.setStatus?(Module.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>Module.setStatus(``),1),doRun()},1)):doRun()}var wasmExports=createWasm();return run(),moduleRtn=runtimeInitialized?Module:new Promise((resolve,reject)=>{readyPromiseResolve=resolve}),moduleRtn}),_createDataModule.apply(this,arguments)}var SH_C0=.28209479177387814,SPZ_COLOR_SCALE=SH_C0/.15;function encodeSpzColor(c){if(!Number.isFinite(c))return 0;let v=Math.round(((c-.5)/SPZ_COLOR_SCALE+.5)*255);return v<0?0:v>255?255:v}function decodeSpzColor(byte){return(byte/255-.5)*SPZ_COLOR_SCALE+.5}var f32buffer=new Float32Array(1),u32buffer=new Uint32Array(f32buffer.buffer),supportsFloat16Array=typeof Float16Array<`u`,f16buffer=supportsFloat16Array?new Float16Array(1):null,u16buffer=supportsFloat16Array?new Uint16Array(f16buffer.buffer):new Uint16Array(1);function fromHalf(h){if(supportsFloat16Array&&f16buffer)return u16buffer[0]=h,f16buffer[0];let sign=h>>15&1,exp=h>>10&31,frac=h&1023,f32bits;if(exp===0)if(frac===0)f32bits=sign<<31;else{let mant=frac,e=-14;for(;!(mant&1024);)mant<<=1,e--;mant&=1023;let newExp=e+127,newFrac=mant<<13;f32bits=sign<<31|newExp<<23|newFrac}else if(exp===31)f32bits=frac===0?sign<<31|2139095040:sign<<31|2143289344;else{let newExp=exp-15+127,newFrac=frac<<13;f32bits=sign<<31|newExp<<23|newFrac}return u32buffer[0]=f32bits,f32buffer[0]}var GunzipReader=class{constructor({fileBytes}){this.fileBytes=fileBytes,this.chunks=[],this.totalBytes=0;let ds=new DecompressionStream(`gzip`),decompressionStream=new Blob([fileBytes]).stream().pipeThrough(ds);this.reader=decompressionStream.getReader()}read(numBytes){return __awaiter(this,void 0,void 0,function*(){for(;this.totalBytes<numBytes;){let{value:chunk,done:readerDone}=yield this.reader.read();if(readerDone)break;this.chunks.push(chunk),this.totalBytes+=chunk.length}if(this.totalBytes<numBytes)throw Error(`Unexpected EOF: needed ${numBytes}, got ${this.totalBytes}`);let allBytes=new Uint8Array(this.totalBytes),outOffset=0;for(let chunk of this.chunks)allBytes.set(chunk,outOffset),outOffset+=chunk.length;let result=allBytes.subarray(0,numBytes);return this.chunks=[allBytes.subarray(numBytes)],this.totalBytes-=numBytes,result})}},SpzReader=class{constructor({fileBytes}){this.version=-1,this.numSplats=0,this.shDegree=0,this.fractionalBits=0,this.flags=0,this.flagAntiAlias=!1,this.reserved=0,this.headerParsed=!1,this.parsed=!1,this.fileBytes=fileBytes instanceof ArrayBuffer?new Uint8Array(fileBytes):fileBytes,this.reader=new GunzipReader({fileBytes:this.fileBytes})}parseHeader(){return __awaiter(this,void 0,void 0,function*(){if(this.headerParsed)throw Error(`SPZ file header already parsed`);let b=this.fileBytes;if(!(b.length>=2&&b[0]===31&&b[1]===139)){if(b.length>=8&&b[0]===78&&b[1]===71&&b[2]===83&&b[3]===80){let version=new DataView(b.buffer,b.byteOffset,8).getUint32(4,!0);throw Error(`Unsupported SPZ version: ${version} (ZSTD based SPZ is not supported, please export SPZ v3)`)}throw Error(`Invalid SPZ file: not gzip compressed`)}let header=new DataView((yield this.reader.read(16)).buffer);if(header.getUint32(0,!0)!==1347635022)throw Error(`Invalid SPZ file`);if(this.version=header.getUint32(4,!0),this.version<1||this.version>3)throw Error(`Unsupported SPZ version: ${this.version}`);this.numSplats=header.getUint32(8,!0),this.shDegree=header.getUint8(12),this.fractionalBits=header.getUint8(13),this.flags=header.getUint8(14),this.flagAntiAlias=(this.flags&1)!=0,this.reserved=header.getUint8(15),this.headerParsed=!0,this.parsed=!1})}parseSplats(centerCallback,alphaCallback,rgbCallback,scalesCallback,quatCallback,shBytesCallback){return __awaiter(this,void 0,void 0,function*(){if(!this.headerParsed)throw Error(`SPZ file header must be parsed first`);if(this.parsed)throw Error(`SPZ file already parsed`);if(this.parsed=!0,this.version===1){let centerBytes=yield this.reader.read(this.numSplats*3*2),centerUint16=new Uint16Array(centerBytes.buffer);for(let i=0;i<this.numSplats;i++){let i3=i*3;centerCallback==null||centerCallback(i,fromHalf(centerUint16[i3]),fromHalf(centerUint16[i3+1]),fromHalf(centerUint16[i3+2]))}}else if(this.version===2||this.version===3){let fixed=1<<this.fractionalBits,centerBytes=yield this.reader.read(this.numSplats*3*3);for(let i=0;i<this.numSplats;i++){let i9=i*9,x=((centerBytes[i9+2]<<24|centerBytes[i9+1]<<16|centerBytes[i9]<<8)>>8)/fixed,y=((centerBytes[i9+5]<<24|centerBytes[i9+4]<<16|centerBytes[i9+3]<<8)>>8)/fixed,z=((centerBytes[i9+8]<<24|centerBytes[i9+7]<<16|centerBytes[i9+6]<<8)>>8)/fixed;centerCallback==null||centerCallback(i,x,y,z)}}{let bytes=yield this.reader.read(this.numSplats);for(let i=0;i<this.numSplats;i++)alphaCallback==null||alphaCallback(i,bytes[i]/255)}{let rgbBytes=yield this.reader.read(this.numSplats*3);for(let i=0;i<this.numSplats;i++){let i3=i*3;rgbCallback==null||rgbCallback(i,decodeSpzColor(rgbBytes[i3]),decodeSpzColor(rgbBytes[i3+1]),decodeSpzColor(rgbBytes[i3+2]))}}{let scalesBytes=yield this.reader.read(this.numSplats*3);for(let i=0;i<this.numSplats;i++){let i3=i*3;scalesCallback==null||scalesCallback(i,Math.exp(scalesBytes[i3]/16-10),Math.exp(scalesBytes[i3+1]/16-10),Math.exp(scalesBytes[i3+2]/16-10))}}if(this.version===3){let maxValue=1/Math.sqrt(2),quatBytes=yield this.reader.read(this.numSplats*4);for(let i=0;i<this.numSplats;i++){let i3=i*4,quaternion=[0,0,0,0],values=[quatBytes[i3],quatBytes[i3+1],quatBytes[i3+2],quatBytes[i3+3]],combinedValues=values[0]+(values[1]<<8)+(values[2]<<16)+(values[3]<<24),largestIndex=combinedValues>>>30,remainingValues=combinedValues,sumSquares=0;for(let j=3;j>=0;--j)if(j!==largestIndex){let value=remainingValues&511,sign=remainingValues>>>9&1;remainingValues>>>=10,quaternion[j]=value/511*maxValue,quaternion[j]=sign===0?quaternion[j]:-quaternion[j],sumSquares+=quaternion[j]*quaternion[j]}quaternion[largestIndex]=Math.sqrt(Math.max(1-sumSquares,0)),quatCallback==null||quatCallback(i,quaternion[0],quaternion[1],quaternion[2],quaternion[3])}}else{let quatBytes=yield this.reader.read(this.numSplats*3);for(let i=0;i<this.numSplats;i++){let i3=i*3,quatX=quatBytes[i3]/127.5-1,quatY=quatBytes[i3+1]/127.5-1,quatZ=quatBytes[i3+2]/127.5-1,quatW=Math.sqrt(Math.max(0,1-quatX*quatX-quatY*quatY-quatZ*quatZ));quatCallback==null||quatCallback(i,quatX,quatY,quatZ,quatW)}}shBytesCallback&&this.shDegree>=1&&this.shDegree<=3&&shBytesCallback(yield this.reader.read(this.numSplats*SPZ_SH_BYTES[this.shDegree]))})}};function decodeSpz(fileBytes){return __awaiter(this,void 0,void 0,function*(){let spz=new SpzReader({fileBytes});yield spz.parseHeader();let numPoints=spz.numSplats,positions=new Float32Array(numPoints*3),colors=new Uint8Array(numPoints*4),scales=new Float32Array(numPoints*3),rotations=new Float32Array(numPoints*4),fileDegree=spz.shDegree>=1&&spz.shDegree<=3?spz.shDegree:0,shDegree=Math.min(fileDegree,2),shPacked;return yield spz.parseSplats((index,x,y,z)=>{positions[index*3]=x,positions[index*3+1]=y,positions[index*3+2]=z},(index,alpha)=>{colors[index*4+3]=Math.round(alpha*255)},(index,r,g,b)=>{colors[index*4]=encodeSpzColor(r),colors[index*4+1]=encodeSpzColor(g),colors[index*4+2]=encodeSpzColor(b)},(index,sx,sy,sz)=>{scales[index*3]=sx,scales[index*3+1]=sy,scales[index*3+2]=sz},(index,qx,qy,qz,qw)=>{rotations[index*4]=qw,rotations[index*4+1]=qx,rotations[index*4+2]=qy,rotations[index*4+3]=qz},shBytes=>{shDegree>0&&(shPacked=packSpzSH(shBytes,numPoints,fileDegree,shDegree))}),{numPoints,shDegree:shPacked?shDegree:0,flagAntiAlias:spz.flagAntiAlias,positions,colors,scales,rotations,shPacked,shMax:1}})}var T_F32=0,T_F64=1,T_U8=2,T_I8=3,T_U16=4,T_I16=5,T_U32=6,T_I32=7,SCALAR_TYPES={float:{code:T_F32,size:4},float32:{code:T_F32,size:4},double:{code:T_F64,size:8},float64:{code:T_F64,size:8},uchar:{code:T_U8,size:1},uint8:{code:T_U8,size:1},char:{code:T_I8,size:1},int8:{code:T_I8,size:1},ushort:{code:T_U16,size:2},uint16:{code:T_U16,size:2},short:{code:T_I16,size:2},int16:{code:T_I16,size:2},uint:{code:T_U32,size:4},uint32:{code:T_U32,size:4},int:{code:T_I32,size:4},int32:{code:T_I32,size:4}},GAUSSIAN_PLY_REQUIRED_PROPERTIES=[`x`,`y`,`z`,`f_dc_0`,`f_dc_1`,`f_dc_2`,`opacity`,`scale_0`,`scale_1`,`scale_2`,`rot_0`,`rot_1`,`rot_2`,`rot_3`],MAX_HEADER_BYTES=1<<20,END_HEADER=`end_header`;function readScalar(view,at,code){switch(code){case T_F32:return view.getFloat32(at,!0);case T_F64:return view.getFloat64(at,!0);case T_U8:return view.getUint8(at);case T_I8:return view.getInt8(at);case T_U16:return view.getUint16(at,!0);case T_I16:return view.getInt16(at,!0);case T_U32:return view.getUint32(at,!0);default:return view.getInt32(at,!0)}}function readGaussianPlyHeader(bytes){var _a;if(bytes.length<4||bytes[0]!==112||bytes[1]!==108||bytes[2]!==121||bytes[3]!==10&&bytes[3]!==13)throw Error(`Not a PLY file`);let limit=Math.min(bytes.length,MAX_HEADER_BYTES),endPos=-1;for(let i=0;i+10<=limit;i++){if(i>0&&bytes[i-1]!==10)continue;let match=!0;for(let j=0;j<10;j++)if(bytes[i+j]!==END_HEADER.charCodeAt(j)){match=!1;break}if(match){endPos=i;break}}if(endPos<0)throw Error(`Invalid PLY header`);let dataOffset=endPos+10;if(bytes[dataOffset]===13&&dataOffset++,bytes[dataOffset]!==10)throw Error(`Invalid PLY header`);dataOffset++;let headerText=``;for(let i=0;i<endPos;i++)headerText+=String.fromCharCode(bytes[i]);let format=``,elements=[],current=null;for(let rawLine of headerText.split(/\r?\n/)){let tokens=rawLine.trim().split(/\s+/);switch(tokens[0]){case`format`:format=(_a=tokens[1])==null?``:_a;break;case`element`:current={name:tokens[1],count:parseInt(tokens[2],10)||0,stride:0,properties:[]},elements.push(current);break;case`property`:if(!current)break;if(tokens[1]===`list`)current.properties.push({name:tokens[4],type:`list`,offset:-1}),current.stride=-1;else{let t=SCALAR_TYPES[tokens[1]];if(!t)throw Error(`Unsupported PLY property type: ${tokens[1]}`);current.properties.push({name:tokens[2],type:tokens[1],offset:current.stride}),current.stride>=0&&(current.stride+=t.size)}break;default:break}}return{format,elements,dataOffset}}function parseGaussianPlyHeader(bytes){let header=readGaussianPlyHeader(bytes),{format,elements}=header;if(format!==`binary_little_endian`)throw Error(`Unsupported PLY format: ${format}`);if(elements.some(e=>e.name===`chunk`))throw Error(`Compressed PLY is not supported`);let vertexIndex=elements.findIndex(e=>e.name===`vertex`);if(vertexIndex<0)throw Error(`Not a 3DGS PLY: missing vertex`);for(let i=0;i<=vertexIndex;i++){let listProp=elements[i].properties.find(p=>p.type===`list`);if(listProp)throw Error(`List properties are not supported: ${elements[i].name}.${listProp.name}`)}let vertex=elements[vertexIndex];for(let name of GAUSSIAN_PLY_REQUIRED_PROPERTIES)if(!vertex.properties.some(p=>p.name===name))throw Error(`Not a 3DGS PLY: missing ${name}`);return header}function detectPlyKind(bytes){let header;try{header=readGaussianPlyHeader(bytes)}catch(_a){return`generic`}if(header.elements.some(e=>e.name===`chunk`))return`gaussian-compressed`;let vertex=header.elements.find(e=>e.name===`vertex`);if(!vertex)return`generic`;let names=new Set(vertex.properties.map(p=>p.name));return GAUSSIAN_PLY_REQUIRED_PROPERTIES.every(n=>names.has(n))?`gaussian`:`generic`}function inferShBands(vertex){let names=new Set(vertex.properties.map(p=>p.name)),n=0;for(;names.has(`f_rest_${n}`);)n++;switch(n){case 0:return 0;case 9:return 1;case 24:return 2;case 45:return 3;default:return console.warn(`[gaussianPly] unexpected f_rest count ${n}, SH ignored`),0}}function decodeGaussianPly(bytes){let header=parseGaussianPlyHeader(bytes),vertexIndex=header.elements.findIndex(e=>e.name===`vertex`),vertex=header.elements[vertexIndex],vertexStart=header.dataOffset;for(let i=0;i<vertexIndex;i++)vertexStart+=header.elements[i].count*header.elements[i].stride;let n=vertex.count,stride=vertex.stride;if(bytes.byteLength-vertexStart<n*stride)throw Error(`Unexpected end of PLY data`);let shBands=inferShBands(vertex),K=SH_COEFFS[shBands],shDegree=Math.min(shBands,2),usedCoeffs=SH_COEFFS[shDegree],shPerSplat=SH_BYTES_PER_SPLAT[shDegree],propMap=new Map;for(let p of vertex.properties)propMap.set(p.name,p);let offOf=name=>propMap.get(name).offset,codeOf=name=>SCALAR_TYPES[propMap.get(name).type].code,reqOffsets=new Int32Array(GAUSSIAN_PLY_REQUIRED_PROPERTIES.length),reqCodes=new Int32Array(GAUSSIAN_PLY_REQUIRED_PROPERTIES.length);GAUSSIAN_PLY_REQUIRED_PROPERTIES.forEach((name,i)=>{reqOffsets[i]=offOf(name),reqCodes[i]=codeOf(name)});let shOffsets=new Int32Array(usedCoeffs*3),shCodes=new Int32Array(usedCoeffs*3);for(let k=0;k<usedCoeffs;k++)for(let c=0;c<3;c++){let name=`f_rest_${c*K+k}`;shOffsets[k*3+c]=offOf(name),shCodes[k*3+c]=codeOf(name)}let allFloat=!0;for(let i=0;i<reqCodes.length;i++)reqCodes[i]!==T_F32&&(allFloat=!1);for(let i=0;i<shCodes.length;i++)shCodes[i]!==T_F32&&(allFloat=!1);let positions=new Float32Array(n*3),colors=new Uint8Array(n*4),scales=new Float32Array(n*3),rotations=new Float32Array(n*4),shCoeffs=shPerSplat>0?new Float32Array(n*shPerSplat):void 0,view=new DataView(bytes.buffer,bytes.byteOffset,bytes.byteLength),read=allFloat?(at,_code)=>view.getFloat32(at,!0):(at,code)=>readScalar(view,at,code),finiteOr0=v=>{let f=Math.fround(v);return Number.isFinite(f)?f:0};for(let i=0;i<n;i++){let base=vertexStart+i*stride,x=read(base+reqOffsets[0],reqCodes[0]),y=read(base+reqOffsets[1],reqCodes[1]),z=read(base+reqOffsets[2],reqCodes[2]),dc0=read(base+reqOffsets[3],reqCodes[3]),dc1=read(base+reqOffsets[4],reqCodes[4]),dc2=read(base+reqOffsets[5],reqCodes[5]),opacity=read(base+reqOffsets[6],reqCodes[6]),s0=read(base+reqOffsets[7],reqCodes[7]),s1=read(base+reqOffsets[8],reqCodes[8]),s2=read(base+reqOffsets[9],reqCodes[9]),qw=read(base+reqOffsets[10],reqCodes[10]),qx=read(base+reqOffsets[11],reqCodes[11]),qy=read(base+reqOffsets[12],reqCodes[12]),qz=read(base+reqOffsets[13],reqCodes[13]),i3=i*3;positions[i3]=finiteOr0(x),positions[i3+1]=finiteOr0(y),positions[i3+2]=finiteOr0(z);let i4=i*4;colors[i4]=encodeSpzColor(.5+SH_C0*dc0),colors[i4+1]=encodeSpzColor(.5+SH_C0*dc1),colors[i4+2]=encodeSpzColor(.5+SH_C0*dc2);let a=Math.round(255/(1+Math.exp(-opacity)));colors[i4+3]=Number.isFinite(a)?a:0,scales[i3]=finiteOr0(Math.exp(s0)),scales[i3+1]=finiteOr0(Math.exp(s1)),scales[i3+2]=finiteOr0(Math.exp(s2)),qw=Math.fround(qw),qx=Math.fround(qx),qy=Math.fround(qy),qz=Math.fround(qz);let len=Math.sqrt(qw*qw+qx*qx+qy*qy+qz*qz);if(!Number.isFinite(len)||len===0?(qw=1,qx=0,qy=0,qz=0):(qw/=len,qx/=len,qy/=len,qz/=len),rotations[i4]=qw,rotations[i4+1]=qx,rotations[i4+2]=qy,rotations[i4+3]=qz,shCoeffs){let o=i*shPerSplat;for(let j=0;j<shPerSplat;j++)shCoeffs[o+j]=finiteOr0(read(base+shOffsets[j],shCodes[j]))}}return{numPoints:n,shBands,shDegree,positions,colors,scales,rotations,shCoeffs}}var wasmModule,wasmLoading=!1;function ensureWasm(){return __awaiter(this,void 0,void 0,function*(){if(!wasmModule){for(;wasmLoading;)yield new Promise(r=>setTimeout(r,0));if(!wasmModule){wasmLoading=!0;try{wasmModule=yield createDataModule()}finally{wasmLoading=!1}}}})}var allocatedCount=0,positionsPtr=0,rotationsPtr=0,scalesPtr=0,colorsPtr=0,selectionPtr=0,dataPtr=0,worldPositionsPtr=0,worldRotationsPtr=0,worldScalesPtr=0;function ensureWasmBuffers(vertexCount){let target=Math.pow(2,Math.ceil(Math.log2(Math.max(1,vertexCount))));target<=allocatedCount||(allocatedCount>0&&(wasmModule._free(positionsPtr),wasmModule._free(rotationsPtr),wasmModule._free(scalesPtr),wasmModule._free(colorsPtr),wasmModule._free(selectionPtr),wasmModule._free(dataPtr),wasmModule._free(worldPositionsPtr),wasmModule._free(worldRotationsPtr),wasmModule._free(worldScalesPtr)),allocatedCount=target,positionsPtr=wasmModule._malloc(3*target*4),rotationsPtr=wasmModule._malloc(4*target*4),scalesPtr=wasmModule._malloc(3*target*4),colorsPtr=wasmModule._malloc(4*target),selectionPtr=wasmModule._malloc(target),dataPtr=wasmModule._malloc(8*target*4),worldPositionsPtr=wasmModule._malloc(3*target*4),worldRotationsPtr=wasmModule._malloc(4*target*4),worldScalesPtr=wasmModule._malloc(3*target*4))}function packDecoded(numPoints,positions,rotations,scales,colors){ensureWasmBuffers(numPoints);let selection=new Uint8Array(numPoints);wasmModule.HEAPF32.set(positions,positionsPtr/4),wasmModule.HEAPF32.set(rotations,rotationsPtr/4),wasmModule.HEAPF32.set(scales,scalesPtr/4),wasmModule.HEAPU8.set(colors,colorsPtr),wasmModule.HEAPU8.set(selection,selectionPtr),wasmModule._pack(!1,numPoints,positionsPtr,rotationsPtr,scalesPtr,colorsPtr,selectionPtr,dataPtr,worldPositionsPtr,worldRotationsPtr,worldScalesPtr);let out=new Uint32Array(wasmModule.HEAPU32.buffer,dataPtr,numPoints*8);return new Uint32Array(out.slice().buffer)}typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope&&(self.onmessage=e=>__awaiter(void 0,void 0,void 0,function*(){var _a,_b;let{requestId,fileBytes,kind=`spz`}=e.data;if(!(fileBytes===void 0||requestId===void 0)){if(kind===`gaussian-ply`){try{let decoded=decodeGaussianPly(new Uint8Array(fileBytes)),shPacked,shMax=1;if(decoded.shCoeffs&&decoded.shDegree>0){let q=quantizeAndPackSH(decoded.shCoeffs,decoded.numPoints,decoded.shDegree);shPacked=q.packed,shMax=q.shMax}yield ensureWasm();let packedData=packDecoded(decoded.numPoints,decoded.positions,decoded.rotations,decoded.scales,decoded.colors),result={numPoints:decoded.numPoints,shBands:decoded.shBands,shDegree:shPacked?decoded.shDegree:0,packedData,shPacked,shMax},transfer=[packedData.buffer];shPacked&&transfer.push(shPacked.buffer),self.postMessage({requestId,decoded:result},transfer)}catch(error){self.postMessage({requestId,error:(_a=error==null?void 0:error.message)==null?String(error):_a})}return}if(kind!==`spz`){self.postMessage({requestId,error:`Unknown decode kind: ${String(kind)}`});return}try{let decoded=yield decodeSpz(new Uint8Array(fileBytes));yield ensureWasm();let packedData=packDecoded(decoded.numPoints,decoded.positions,decoded.rotations,decoded.scales,decoded.colors),result=Object.assign(Object.assign({},decoded),{packedData}),transfer=[packedData.buffer,decoded.positions.buffer,decoded.colors.buffer,decoded.scales.buffer,decoded.rotations.buffer];decoded.shPacked&&transfer.push(decoded.shPacked.buffer),self.postMessage({requestId,decoded:result},transfer)}catch(error){self.postMessage({requestId,error:(_b=error==null?void 0:error.message)==null?String(error):_b})}}}));var sharedWorker=null,nextRequestId=1,pendingRequests=new Map;function getWorker(){if(!sharedWorker){let worker=new WorkerWrapper;worker.onmessage=e=>{var _a;let{requestId,decoded,error}=(_a=e.data)==null?{}:_a,pending=pendingRequests.get(requestId);pending&&(pendingRequests.delete(requestId),error?pending.reject(Error(error)):pending.resolve(decoded))},worker.onerror=e=>{let err=Error(`Decode worker error: ${e.message||`unknown`}`);for(let pending of pendingRequests.values())pending.reject(err);pendingRequests.clear(),worker.terminate(),sharedWorker===worker&&(sharedWorker=null)},sharedWorker=worker}return sharedWorker}function decodeInWorker(kind,bytes,transfer=!1){let worker=getWorker(),requestId=nextRequestId++,buffer=transfer&&bytes.byteOffset===0&&bytes.byteLength===bytes.buffer.byteLength&&bytes.buffer instanceof ArrayBuffer?bytes.buffer:bytes.slice().buffer;return new Promise((resolve,reject)=>{pendingRequests.set(requestId,{resolve,reject}),worker.postMessage({requestId,kind,fileBytes:buffer},[buffer])})}function parseSpz(fileBytes){return __awaiter(this,void 0,void 0,function*(){let decoded=yield decodeInWorker(`spz`,fileBytes instanceof ArrayBuffer?new Uint8Array(fileBytes):fileBytes,!1),{PBMGaussianSplattingObject}=yield import(`./pbmGaussianSplattingObject.mjs`).then(n=>n.n);return new PBMGaussianSplattingObject({numPoints:decoded.numPoints,positions:decoded.positions,colors:decoded.colors,scales:decoded.scales,rotations:decoded.rotations,packedData:decoded.packedData,shPacked:decoded.shPacked,shDegree:decoded.shDegree,shMax:decoded.shMax,antiAliased:decoded.flagAntiAlias})})}function loadSpz(url,options={}){var _a,_b,_c,_d;let modelUpAxis=(_a=options.modelUpAxis)==null?`Y`:_a,upAxis=(_b=options.upAxis)==null?`Z`:_b,fetcher=(_c=options.fetcher)==null?internalFetcher:_c,onDownloadProgress=(_d=options.onDownloadProgress)==null?noop:_d,byteLength=0;return Promise.resolve().then(()=>fetcher.ajax(url,{responseType:`arraybuffer`},void 0,void 0,onDownloadProgress)).then(response=>(byteLength=response.body.byteLength,response.body)).then(arrayBuffer=>parseSpz(new Uint8Array(arrayBuffer))).then(pbmGSObject=>(modelUpAxis===`Z`&&(pbmGSObject.applyMatrix4(ROTATE_X_MATRIX_INVERSE),pbmGSObject.updateMatrix(),pbmGSObject.updateMatrixWorld(!0),pbmGSObject.transformChanged=!0),{type:`spz`,modelUpAxis,upAxis,uri:url,byteLength,memoryUsage:getMemoryUsage(pbmGSObject),scene:pbmGSObject,textures:[],animations:[],dispose:()=>pbmGSObject.dispose()}))}export{decodeInWorker,detectPlyKind,loadSpz,parseSpz};
|
|
@@ -109,6 +109,12 @@ declare class PanoramaController extends PanoramaLikeController implements Requi
|
|
|
109
109
|
}, userAction: boolean): boolean;
|
|
110
110
|
/** 更新模型 */
|
|
111
111
|
updateModel(modelScene: ModelScene): void;
|
|
112
|
+
/**
|
|
113
|
+
* 同步点位 Mesh 的 HDR 提亮倍数
|
|
114
|
+
* @description 开启 HDR(`parameter.useHDR`)时,使用 `parameter.maxDisplayBoost` 提亮 rgb,否则为 1。
|
|
115
|
+
* 各 Mesh 内部对相同值做了去重,每帧调用无额外开销。
|
|
116
|
+
*/
|
|
117
|
+
protected syncPanoMeshHDRBoost(): void;
|
|
112
118
|
/** 时间迭代 */
|
|
113
119
|
updateTime(time: number, deltaTime: number, ...args: any[]): void;
|
|
114
120
|
/** 获取目标姿态 */
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 修复 WebGPURenderer 降级到 WebGL 后端时,`MinEquation`/`MaxEquation` 两个混合方程
|
|
3
|
+
* 触发 `WebGL: INVALID_ENUM: blendEquationSeparate: invalid mode` 的问题。
|
|
4
|
+
*
|
|
5
|
+
* 根因:
|
|
6
|
+
* three r183 `src/renderers/webgl-fallback/utils/WebGLState.js` 内部的 `equationToGL`
|
|
7
|
+
* 查表只收录了 `AddEquation`/`SubtractEquation`/`ReverseSubtractEquation` 三项,遗漏了
|
|
8
|
+
* `MinEquation`/`MaxEquation`(对比经典 `src/renderers/webgl/WebGLState.js`,后者是完整的,
|
|
9
|
+
* 包含 `equationToGL[MinEquation] = gl.MIN` / `equationToGL[MaxEquation] = gl.MAX`,说明
|
|
10
|
+
* `MIN`/`MAX` 混合方程本身是 WebGL2 原生支持的,这纯粹是新 WebGL fallback 后端的遗漏,
|
|
11
|
+
* 不是 WebGL 本身的能力限制)。
|
|
12
|
+
*
|
|
13
|
+
* 当材质设置 `blending = CustomBlending` 且 `blendEquation`/`blendEquationAlpha` 为
|
|
14
|
+
* `MinEquation`/`MaxEquation` 时(如 `WordPassPlugin` 的线段材质,用 MAX 混合实现拐角重叠
|
|
15
|
+
* 处取更亮值、避免暗缺口/过曝的效果),`equationToGL[blendEquation]` 查表得到 `undefined`,
|
|
16
|
+
* 继而 `gl.blendEquationSeparate(undefined, undefined)` 被判定为非法枚举值。
|
|
17
|
+
*
|
|
18
|
+
* 修复:实例级包装 `backend.gl.blendEquationSeparate`,只在接收到 `undefined` 参数时介入、
|
|
19
|
+
* 转换为正确的 `gl.MIN`/`gl.MAX`;其余合法调用原样透传,不受影响。
|
|
20
|
+
*
|
|
21
|
+
* 局限性(当前项目未触发,记录以备将来扩展时参考):
|
|
22
|
+
* - 只覆盖标准 `gl.blendEquationSeparate`,不覆盖 MRT(多渲染目标)场景下
|
|
23
|
+
* `OES_draw_buffers_indexed` 扩展的 `blendEquationSeparateiOES` 同类查表逻辑
|
|
24
|
+
* (`_setMRTBlendingIndex` 内部),因为该扩展对象不挂在 `gl` 本身上。本项目目前未使用 MRT
|
|
25
|
+
* (未见 `mrtNode`/`setMRT` 相关代码),不会触发这条路径;一旦引入 MRT 且material 也用
|
|
26
|
+
* `MinEquation`/`MaxEquation`,需要额外给 `backend.drawBuffersIndexedExt` 打同样的补丁。
|
|
27
|
+
* - 本修复无法区分 three.js 两个被遗漏的常量分别对应的语义,只能依据"查表失败只在用了
|
|
28
|
+
* `MinEquation`/`MaxEquation` 时发生"这一前提,统一尝试先按 `MaxEquation` 处理(当前仓库
|
|
29
|
+
* 内仅 `WordPassPlugin` 用到 `MaxEquation`,没有 `MinEquation` 用例);一旦引入
|
|
30
|
+
* `MinEquation` 用法,必须改成基于调用参数顺序/其它上下文精确区分两者,否则会把
|
|
31
|
+
* `MinEquation` 也错误映射成 `gl.MAX`。
|
|
32
|
+
*
|
|
33
|
+
* WebGPU 后端、经典 WebGLRenderer 下均为空操作。
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* 仅当后端为 WebGL 且存在 `gl.blendEquationSeparate` 时,安装实例级补丁;其余情况什么都不做。
|
|
37
|
+
* @param backend `renderer.backend`,需在 `init()` 完成之后传入
|
|
38
|
+
* @returns 是否实际安装了补丁
|
|
39
|
+
*/
|
|
40
|
+
declare function installWebGLBlendEquationFix(backend: unknown): boolean;
|
|
41
|
+
export { installWebGLBlendEquationFix };
|