@realsee/five-webgpu 1.0.0-alpha.12 → 1.0.0-alpha.14
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 +41 -32
- package/docs/classes/index.FivePass.html +1 -1
- package/docs/classes/index.FiveRenderer.html +7 -2
- 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 -5
- 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 +9 -9
- package/docs/classes/index.PBMGaussianSplattingObject.html +49 -11
- package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +71 -16
- 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 +1 -1
- package/docs/classes/index.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/index.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/index.Parameter.html +24 -22
- package/docs/classes/index.Scene.html +1 -1
- package/docs/classes/index.Subscribe.html +1 -1
- package/docs/classes/index.Tile3D.html +22 -22
- package/docs/classes/index.TileNode.html +2 -2
- 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.DeviceProfile.html +2 -2
- 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.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.PBMGaussianSplattingNodeMaterialOptions.html +3 -3
- package/docs/interfaces/index.PanoCircleMeshInterface.html +1 -1
- 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 +8 -6
- package/docs/interfaces/index.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/index.ParameterValue.html +21 -19
- package/docs/interfaces/index.Pose.html +1 -1
- package/docs/interfaces/index.RenderEvent.html +1 -1
- package/docs/interfaces/index.ResolvedParameterValue.html +22 -20
- package/docs/interfaces/index.SplatData.html +10 -6
- 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.Tile3DOptions.html +2 -2
- package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ViewLayer.html +22 -22
- 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 +13 -0
- 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/xrPanorama.d.ts +13 -0
- package/five/core/internalWebGPURenderer.d.ts +0 -3
- package/five/core/panoVideo.d.ts +2 -0
- package/five/core/webglBlendEquationFix.d.ts +41 -0
- package/five/gaussian-splatting/arena/splatArena.d.ts +227 -0
- package/five/gaussian-splatting/cullConstants.d.ts +68 -0
- package/five/gaussian-splatting/hybridConstants.d.ts +60 -0
- package/five/gaussian-splatting/instancePacking.d.ts +46 -0
- package/five/gaussian-splatting/mirrors/layoutMirror.d.ts +44 -0
- package/five/gaussian-splatting/mirrors/mirrorBuffer.d.ts +72 -0
- package/five/gaussian-splatting/mirrors/mirrorSet.d.ts +17 -0
- package/five/gaussian-splatting/mirrors/objectParamsMirror.d.ts +35 -0
- package/five/gaussian-splatting/mirrors/transformMirror.d.ts +26 -0
- package/five/gaussian-splatting/pipelines/gpuSortPipeline.d.ts +5 -31
- package/five/gaussian-splatting/pipelines/pipelineMode.d.ts +1 -2
- package/five/gaussian-splatting/sh-core/codec.d.ts +13 -0
- package/five/gaussian-splatting/sh-core/constants.d.ts +29 -0
- package/five/gaussian-splatting/sh-core/index.d.ts +4 -0
- package/five/gaussian-splatting/sh-core/rebakePolicy.d.ts +20 -0
- package/five/gaussian-splatting/sh-core/texelRange.d.ts +18 -0
- package/five/gaussian-splatting/shAssembler.d.ts +14 -0
- package/five/gaussian-splatting/shBakeScheduler.d.ts +26 -0
- package/five/gaussian-splatting/shBaker.d.ts +44 -0
- package/five/gaussian-splatting/shTileResource.d.ts +22 -0
- package/five/gaussian-splatting/splatAssembler.d.ts +1 -1
- package/five/gaussian-splatting/transformStore.d.ts +2 -2
- package/five/gaussian-splatting/worker/decodeWorker.d.ts +72 -0
- package/five/index.d.ts +0 -1
- package/five/index.js +138 -640
- package/five/index.mjs +229 -29261
- 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/ply.d.ts +22 -6
- package/five/model/loaders/spz.d.ts +9 -49
- package/five/model/loaders/spz.worker.d.ts +37 -0
- package/five/model/materials/pbmGaussianSplattingNodeMaterial.d.ts +6 -12
- package/five/model/objects/pbmGaussianSplattingObject.d.ts +91 -6
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +357 -15
- package/five/model/parameter.d.ts +4 -0
- package/five/renderer/compute-renderers/binned/binned-core.d.ts +45 -2
- package/five/renderer/compute-renderers/binned/binned-pipelines.d.ts +82 -1
- package/five/renderer/compute-renderers/color-space.d.ts +13 -0
- package/five/renderer/compute-renderers/composite-pipelines.d.ts +36 -0
- package/five/renderer/compute-renderers/frame-plan.d.ts +166 -0
- package/five/renderer/compute-renderers/gsplat-hybrid-renderer.d.ts +386 -0
- package/five/renderer/compute-renderers/pointcloud-compute-renderer.d.ts +101 -16
- package/five/renderer/compute-renderers/shaders/composite-blend.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/gsplatHybridIndirect.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/gsplatProjector.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/gsplatQuad.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/write-additive.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/write-blend.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/write-opaque.d.ts +2 -0
- package/five/renderer/compute-renderers/tile-uniform-writer.d.ts +70 -0
- package/five/renderer/compute-renderers/transparency-buffers.d.ts +59 -0
- package/five/renderer/compute-renderers/transparency-math.d.ts +70 -0
- package/five/renderer/compute-renderers/transparency-settings.d.ts +24 -0
- package/five/renderer/compute-renderers/uniform-layout.d.ts +11 -2
- package/five/renderer/five-renderer.d.ts +28 -3
- 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/videoTextureBridge.d.ts +152 -0
- package/five/thirdparty/sha256.d.ts +149 -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/work.d.ts +0 -7
- package/five/work/workJsonType.d.ts +0 -2
- 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.d.ts +6 -0
- 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.d.ts +7 -0
- package/sticker/index.js +46 -3
- package/sticker/index.mjs +43 -103
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +3 -3
- package/umd/five-react.js +2 -2
- package/umd/five-sticker.js +46 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five.js +216 -179
- 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 -1
- package/five/certificates/hardware.d.ts +0 -1
- package/five/gaussian-splatting/shStore.d.ts +0 -22
- package/five/thirdparty/jsrsasign.d.ts +0 -753
- package/five/work/keychain.d.ts +0 -5
- package/five/work/verify.d.ts +0 -7
- package/five/work/workVerify.d.ts +0 -2
- /package/five/{work/_ALLOW_HOST.d.ts → renderer/compute-renderers/shaders/composite-additive.d.ts} +0 -0
|
@@ -1,35 +1,12 @@
|
|
|
1
1
|
import * as THREE from 'three/webgpu';
|
|
2
2
|
import { GSplatPipeline, type PipelineFrameParams, type PipelineIndexSource } from './gsplatPipeline';
|
|
3
|
-
/**
|
|
4
|
-
* GPU 排序管线(Pipeline_Mode = `RASTER_GPU_SORT`)
|
|
5
|
-
*
|
|
6
|
-
* 组合 `SortAdapter` + `RadixSortModule`:一次 `requestSort` 在**同一帧内**完成
|
|
7
|
-
* Distance_Range 计算 → keygen → radix sort → Order_Texture 写入(Requirement 12.1 / 12.2),
|
|
8
|
-
* 结果经 Order_Texture 供材质顶点阶段 `textureLoad` 取点。
|
|
9
|
-
*
|
|
10
|
-
* 与 CPU 管线的关键差异:
|
|
11
|
-
* - 排序是**同步生效**的(本帧 submit、本帧绘制读取),因此没有 generation 配对、没有
|
|
12
|
-
* Reorder_CPU、没有 `splatIndex` 上传(Requirement 12.4);
|
|
13
|
-
* - 因为同帧生效,也就**不需要主动请求额外的 Render_Frame**(Requirement 12.3)——
|
|
14
|
-
* `CpuSortPipeline` 那个 `onNeedsRender` 回调在这里没有对应物;
|
|
15
|
-
* - Data_Texture 必须在排序前就位,这由 Render_Mesh 把 `assembler.assemble()` 提前到排序之前
|
|
16
|
-
* 保证(Requirement 12.5)。
|
|
17
|
-
*
|
|
18
|
-
* 不可用性(`unusable`)汇聚三个来源,经 `checkLimits` 统一走「解析为 `RASTER_CPU_SORT` →
|
|
19
|
-
* 下一帧 `syncPipelineMode` 切换」这条降级路径(Requirement 15.4 / 16.1 / 16.3),
|
|
20
|
-
* 本类内部不写单独的降级分支。
|
|
21
|
-
*/
|
|
22
3
|
export declare class GpuSortPipeline extends GSplatPipeline {
|
|
23
4
|
/** 原生设备。取不到(非 WebGPU 后端)时管线直接进入失败态。 */
|
|
24
5
|
private readonly device;
|
|
25
|
-
/** 3DGS ↔
|
|
6
|
+
/** 3DGS ↔ 通用排序模块的对接层。构造失败或已 dispose 后为 null。 */
|
|
26
7
|
private sortAdapter;
|
|
27
|
-
/** compute pipeline(keygen / radix sort / prefix sum
|
|
8
|
+
/** compute pipeline(keygen / radix sort / prefix sum)创建失败。 */
|
|
28
9
|
private _pipelineCreateFailed;
|
|
29
|
-
/** `GPUDevice` 触发 lost 事件(Requirement 16.3)。 */
|
|
30
|
-
private _deviceLost;
|
|
31
|
-
/** `dispose()` 之后忽略迟到的 `device.lost` 回调,避免在已释放对象上写状态。 */
|
|
32
|
-
private _disposed;
|
|
33
10
|
/** 是否已产出过至少一次有效排序结果(Order_Texture 已写入)。 */
|
|
34
11
|
private _hasSorted;
|
|
35
12
|
/** 最近一次成功排序时的 Total_Points(= Order_Texture 当前承载的点数)。 */
|
|
@@ -45,9 +22,8 @@ export declare class GpuSortPipeline extends GSplatPipeline {
|
|
|
45
22
|
* 管线是否已不可用。为真时 `checkLimits` 返回「GPU 管线已失效」,
|
|
46
23
|
* 下一帧的 `syncPipelineMode` 把模式解析为 `RASTER_CPU_SORT` 并完成切换。
|
|
47
24
|
*
|
|
48
|
-
*
|
|
49
|
-
* - `_pipelineCreateFailed`:compute pipeline
|
|
50
|
-
* - `_deviceLost`:`GPUDevice` 丢失(Requirement 16.3)
|
|
25
|
+
* 两个来源:
|
|
26
|
+
* - `_pipelineCreateFailed`:compute pipeline 创建失败
|
|
51
27
|
* - `sortAdapter.unusable`:keygen dispatch 规模超设备单维上限。keygen shader 只用 `gid.x`
|
|
52
28
|
* 编址,无法像排序模块那样退化为 2D dispatch,其承载上限(约 1677 万点)低于
|
|
53
29
|
* `checkLimits` 按 2D dispatch 允许的规模,所以这一项必须由本 getter 补上——
|
|
@@ -61,7 +37,7 @@ export declare class GpuSortPipeline extends GSplatPipeline {
|
|
|
61
37
|
* `min(本帧点数, 最近一次排序的点数)` 是一层保护:若布局在排序后变大而本帧尚未重排,
|
|
62
38
|
* 多出来的实例在 Order_Texture 里没有对应条目,不绘制它们比绘制越界读到的 0 更正确。
|
|
63
39
|
*
|
|
64
|
-
* 返回 0
|
|
40
|
+
* 返回 0 的情形:管线不可用、尚无有效排序结果
|
|
65
41
|
* (Requirement 8.10,含刚切换到本管线的那几帧)、Total_Points 为 0(Requirement 16.5)。
|
|
66
42
|
*/
|
|
67
43
|
get instanceCount(): number;
|
|
@@ -92,7 +68,5 @@ export declare class GpuSortPipeline extends GSplatPipeline {
|
|
|
92
68
|
frameUpdate(ctx: PipelineFrameParams): void;
|
|
93
69
|
/** 释放全部 GPU 资源:`SortAdapter`(含 Key_Buffer、uniform、Order_Texture、排序模块)与占位纹理。 */
|
|
94
70
|
dispose(): void;
|
|
95
|
-
/** 释放 `SortAdapter` 并清零排序状态,使 `instanceCount` 立即回到 0。 */
|
|
96
|
-
private releaseAdapter;
|
|
97
71
|
private ensurePlaceholderTexture;
|
|
98
72
|
}
|
|
@@ -20,8 +20,7 @@ export interface GSplatPipelineUsability {
|
|
|
20
20
|
*
|
|
21
21
|
* @param device 已就绪的 `GPUDevice`
|
|
22
22
|
* @param totalPoints 当前场景的 Total_Points
|
|
23
|
-
* @param activePipeline 当前生效的管线(可选)。其 `unusable`
|
|
24
|
-
* 创建失败或 device lost)一并视为不可用,使运行期失败复用同一条降级路径。
|
|
23
|
+
* @param activePipeline 当前生效的管线(可选)。其 `unusable` 为真时一并视为不可用。
|
|
25
24
|
* @returns 不可用时返回可读的原因字符串,可用时返回 `null`
|
|
26
25
|
*/
|
|
27
26
|
export declare function checkLimits(device: GPUDevice, totalPoints: number, activePipeline?: GSplatPipelineUsability | null): string | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPZ:把文件 SH 段直接打包为 outDegree 布局,不经 float;超出 outDegree 的高阶字节被跳过。
|
|
3
|
+
*/
|
|
4
|
+
export declare function packSpzSH(src: Uint8Array, numSplats: number, fileDegree: number, outDegree: number): Uint32Array;
|
|
5
|
+
/**
|
|
6
|
+
* PLY:float 系数(N × SH_BYTES_PER_SPLAT[degree])量化并打包。
|
|
7
|
+
*
|
|
8
|
+
* shMax 取 `max|x| * 128 / 127`,使最大正值也落在可表示范围 `[-shMax, shMax * 127 / 128]` 内。
|
|
9
|
+
*/
|
|
10
|
+
export declare function quantizeAndPackSH(coeffs: Float32Array, numSplats: number, degree: number): {
|
|
11
|
+
packed: Uint32Array;
|
|
12
|
+
shMax: number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SH 布局常量与基函数常数。
|
|
3
|
+
*
|
|
4
|
+
* sh-core 只依赖 TypeScript 标准库,不 import three / WebGL / WebGPU,以便 five-webgpu 复用。
|
|
5
|
+
*/
|
|
6
|
+
/** 渲染端支持的最高 SH 阶数,改为 3 即启用 3 阶 */
|
|
7
|
+
export declare const MAX_RENDER_SH_DEGREE: 2 | 3;
|
|
8
|
+
/** 每通道累计 SH 系数个数,下标为阶数(0..3) */
|
|
9
|
+
export declare const SH_COEFFS: readonly [0, 3, 8, 15];
|
|
10
|
+
/** 每 splat 有效字节数(= SH_COEFFS * 3,每系数每通道 1 字节) */
|
|
11
|
+
export declare const SH_BYTES_PER_SPLAT: readonly [0, 9, 24, 45];
|
|
12
|
+
/** 每 splat 占用的 RGBA32UI texel 数(= ceil(bytes / 16)) */
|
|
13
|
+
export declare const SH_TEXELS_PER_SPLAT: readonly [0, 1, 2, 3];
|
|
14
|
+
/** 每 splat 占用的 uint32 个数(= texel * 4) */
|
|
15
|
+
export declare const SH_UINT32_PER_SPLAT: readonly [0, 4, 8, 12];
|
|
16
|
+
/** SPZ 文件内每 splat SH 字节数(按文件阶数,3 阶也计入,用于步长) */
|
|
17
|
+
export declare const SPZ_SH_BYTES: readonly [0, 9, 24, 45];
|
|
18
|
+
export declare const SH_C1 = 0.4886025;
|
|
19
|
+
/** 2 阶基函数常数,对应 xy, yz, (2zz-xx-yy), xz, (xx-yy) */
|
|
20
|
+
export declare const SH_C2: readonly [1.0925484, -1.0925484, 0.3153916, -1.0925484, 0.5462742];
|
|
21
|
+
/**
|
|
22
|
+
* 3 阶基函数常数,对应
|
|
23
|
+
* y(3xx-yy), xyz, y(4zz-xx-yy), z(2zz-3xx-3yy), x(4zz-xx-yy), z(xx-yy), x(xx-3yy)
|
|
24
|
+
*/
|
|
25
|
+
export declare const SH_C3: readonly [-0.5900435899266435, 2.890611442640554, -0.4570457994644658, 0.3731763325901154, -0.4570457994644658, 1.445305721320277, -0.5900435899266435];
|
|
26
|
+
export type SHDegree = 1 | 2 | 3;
|
|
27
|
+
export declare function isSHDegree(d: number): d is SHDegree;
|
|
28
|
+
/** 生成 SH 常数的 GLSL 声明,供 shader 注入 */
|
|
29
|
+
export declare function shConstantsGLSL(): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SH 烘焙颜色的重算判定(纯函数)。
|
|
3
|
+
*
|
|
4
|
+
* 判据:相机在 tile 局部坐标系下相对上次烘焙位置(anchor)的位移
|
|
5
|
+
* 超过 `tan(angle) * max(1, tileDistance)` 时需要重算。
|
|
6
|
+
* 即"视角变化超过 angle 度",远处的 tile 需要更大的位移才会重算。
|
|
7
|
+
*/
|
|
8
|
+
export interface Vec3Like {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
z: number;
|
|
12
|
+
}
|
|
13
|
+
/** 默认重算阈值角度(度) */
|
|
14
|
+
export declare const DEFAULT_REBAKE_ANGLE = 10;
|
|
15
|
+
/**
|
|
16
|
+
* 是否需要重新烘焙。任一输入非法时返回 true(颜色正确性优先于省掉一次烘焙)。
|
|
17
|
+
*/
|
|
18
|
+
export declare function needsRebake(camLocal: Vec3Like, anchor: Vec3Like, tileDistance: number, angleDeg: number): boolean;
|
|
19
|
+
/** 合法(有限且位于 [0, 90))则原样返回,否则返回 null */
|
|
20
|
+
export declare function sanitizeRebakeAngle(angleDeg: number): number | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** 区域 [startTexel, endTexel) 在宽 width 的纹理中覆盖的行 [y0, y1) */
|
|
2
|
+
export declare function texelRows(startTexel: number, endTexel: number, width: number): {
|
|
3
|
+
y0: number;
|
|
4
|
+
y1: number;
|
|
5
|
+
};
|
|
6
|
+
export interface ScissorRect {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
w: number;
|
|
10
|
+
h: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 传给 three `setScissor` 的参数(逻辑像素)。
|
|
14
|
+
* three 会把 scissor 乘以 dpr 再逐项 floor,而目标纹理是 texel 空间、与 dpr 无关,
|
|
15
|
+
* 因此先按 dpr 反算,再外扩 ceil(2 / dpr) + 1 行列,保证实际裁剪框覆盖所需范围。
|
|
16
|
+
* scissor 只是性能优化,正确性由片元 discard 保证。
|
|
17
|
+
*/
|
|
18
|
+
export declare function dprSafeScissor(y0: number, y1: number, width: number, dpr: number): ScissorRect;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PBMGaussianSplattingObject } from '../model/objects/pbmGaussianSplattingObject';
|
|
2
|
+
import { SHTileResource } from './shTileResource';
|
|
3
|
+
/**
|
|
4
|
+
* per-tile SH 资源的增量管理:新加入的对象创建并上传一次,持续存在的对象原样复用,
|
|
5
|
+
* 移出的对象释放。不组装跨对象的 SH 大纹理,由 SHBaker 按 tile 直接读取。
|
|
6
|
+
*/
|
|
7
|
+
export declare class SHAssembler {
|
|
8
|
+
private map;
|
|
9
|
+
private disposed;
|
|
10
|
+
sync(objects: readonly PBMGaussianSplattingObject[], appliedDegree: number): void;
|
|
11
|
+
get(object: PBMGaussianSplattingObject): SHTileResource | undefined;
|
|
12
|
+
clear(): void;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as THREE from 'three/webgpu';
|
|
2
|
+
import type { PBMGaussianSplattingObject } from '../model/objects/pbmGaussianSplattingObject';
|
|
3
|
+
import type { SHAssembler } from './shAssembler';
|
|
4
|
+
import type { BakeJob } from './shBaker';
|
|
5
|
+
/** 一个 tile 在当前渲染路径下的全局点区间 */
|
|
6
|
+
export interface BakeEntry {
|
|
7
|
+
object: PBMGaussianSplattingObject;
|
|
8
|
+
/** 全局点起点(Fallback:regions.start;Compute:layout.startPoint) */
|
|
9
|
+
start: number;
|
|
10
|
+
count: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 决定每帧哪些 tile 需要重新烘焙 SH 颜色。
|
|
14
|
+
* 强制条件:新 tile、起点变化、阶数变化、matrixWorld 变化、forceAll(目标重分配 / 路径切换);
|
|
15
|
+
* 其余由 needsRebake(相机局部位移超过 tan(angle) * max(1, distance))判定。
|
|
16
|
+
* 每 tile 每帧一次矩阵求逆,开销只与 tile 数线性相关。
|
|
17
|
+
*/
|
|
18
|
+
export declare class SHBakeScheduler {
|
|
19
|
+
rebakeAngle: number;
|
|
20
|
+
private states;
|
|
21
|
+
private warnedMissing;
|
|
22
|
+
plan(entries: readonly BakeEntry[], sh: SHAssembler, cameraWorld: THREE.Vector3, appliedDegree: number, forceAll: boolean, out: BakeJob[]): void;
|
|
23
|
+
/** 丢弃已移出场景的对象状态 */
|
|
24
|
+
prune(alive: ReadonlySet<PBMGaussianSplattingObject>): void;
|
|
25
|
+
clear(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as THREE from 'three/webgpu';
|
|
2
|
+
import type { PBMGaussianSplattingObject } from '../model/objects/pbmGaussianSplattingObject';
|
|
3
|
+
import type { SHTileResource } from './shTileResource';
|
|
4
|
+
/** 烘焙纹理宽度(1 texel / splat) */
|
|
5
|
+
export declare const BAKE_WIDTH = 2048;
|
|
6
|
+
export interface BakeJob {
|
|
7
|
+
object: PBMGaussianSplattingObject;
|
|
8
|
+
/** 当前渲染路径下的全局点起点 */
|
|
9
|
+
start: number;
|
|
10
|
+
count: number;
|
|
11
|
+
res: SHTileResource;
|
|
12
|
+
/** 相机在 tile 局部坐标系下的位置 */
|
|
13
|
+
camLocal: THREE.Vector3;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* SH 预烘焙:把每个 job 对应 tile 的每个 splat 的 `max(DC + SH(dir), 0)` 以 half 精度写入
|
|
17
|
+
* 烘焙纹理(RGBA16F,宽 2048,1 texel / splat,按当前渲染路径的全局点索引寻址)。
|
|
18
|
+
* 每个 job 一次 `renderer.render`(共享材质换参数,原因见 SHBakeMaterial 注释)。
|
|
19
|
+
*/
|
|
20
|
+
export declare class SHBaker {
|
|
21
|
+
private target;
|
|
22
|
+
private targetHeight;
|
|
23
|
+
private readonly scene;
|
|
24
|
+
private readonly camera;
|
|
25
|
+
private readonly geometry;
|
|
26
|
+
private readonly placeholder;
|
|
27
|
+
private readonly passes;
|
|
28
|
+
private disposed;
|
|
29
|
+
constructor();
|
|
30
|
+
get texture(): THREE.Texture | null;
|
|
31
|
+
/**
|
|
32
|
+
* 保证容量(高度只增不减)。
|
|
33
|
+
* @returns reallocated 为 true 表示目标被重新分配(旧内容丢失,需全部重烘焙);ok 为 false 表示超出最大纹理尺寸
|
|
34
|
+
*/
|
|
35
|
+
ensureCapacity(totalPoints: number, maxTextureSize: number): {
|
|
36
|
+
reallocated: boolean;
|
|
37
|
+
ok: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** 释放烘焙目标(appliedDegree 变为 0 时调用) */
|
|
40
|
+
releaseTarget(): void;
|
|
41
|
+
bake(renderer: THREE.WebGPURenderer, jobs: readonly BakeJob[], degree: number): void;
|
|
42
|
+
dispose(): void;
|
|
43
|
+
private getPass;
|
|
44
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as THREE from 'three/webgpu';
|
|
2
|
+
import type { PBMGaussianSplattingObject } from '../model/objects/pbmGaussianSplattingObject';
|
|
3
|
+
import { type SHDegree } from './sh-core';
|
|
4
|
+
/**
|
|
5
|
+
* 单个 tile 的常驻 GPU 资源:
|
|
6
|
+
* - `base`:packedData(中心 + DC 颜色 + 协方差),2 texel / splat;
|
|
7
|
+
* - `sh`:shPacked(sh-core 布局的 8 位量化 SH),SH_TEXELS_PER_SPLAT[degree] texel / splat。
|
|
8
|
+
* 加入时上传一次,之后常驻直到对象移出,与渲染路径无关。
|
|
9
|
+
*/
|
|
10
|
+
export declare class SHTileResource {
|
|
11
|
+
readonly base: THREE.DataTexture;
|
|
12
|
+
readonly sh: THREE.DataTexture;
|
|
13
|
+
readonly degree: SHDegree;
|
|
14
|
+
readonly texelsPerSplat: number;
|
|
15
|
+
readonly shMax: number;
|
|
16
|
+
readonly count: number;
|
|
17
|
+
readonly baseWidth: number;
|
|
18
|
+
readonly shWidth: number;
|
|
19
|
+
private disposed;
|
|
20
|
+
constructor(object: PBMGaussianSplattingObject);
|
|
21
|
+
dispose(): void;
|
|
22
|
+
}
|
|
@@ -38,7 +38,7 @@ export declare class SplatAssembler {
|
|
|
38
38
|
* - 新增对象:新建 region;
|
|
39
39
|
* - 移除对象:删除 region。
|
|
40
40
|
*
|
|
41
|
-
* regionList 顺序严格按传入 objects 顺序(须与 TransformStore
|
|
41
|
+
* regionList 顺序严格按传入 objects 顺序(须与 TransformStore 布局一致),
|
|
42
42
|
* 并按累积 count 计算各区域连续 `start` 偏移。
|
|
43
43
|
*/
|
|
44
44
|
sync(objects: readonly PBMGaussianSplattingObject[], resolveIndices: (obj: PBMGaussianSplattingObject) => {
|
|
@@ -28,9 +28,9 @@ export declare class TransformStore {
|
|
|
28
28
|
get transforms(): Float32Array;
|
|
29
29
|
/** 按对象顺序分配 transformIndex,写入每对象矩阵 + selected + 预算 inverse,并重建纹理。 */
|
|
30
30
|
sync(objects: readonly PBMGaussianSplattingObject[]): void;
|
|
31
|
-
/** 单对象 transform / selected
|
|
31
|
+
/** 单对象 transform / selected / 低通参数变化:就地更新两套表示 + 标记纹理整张重传。 */
|
|
32
32
|
updateOne(object: PBMGaussianSplattingObject): void;
|
|
33
|
-
/** 把第 i 个对象的 matrixWorld / selected / inverse 写入 GPU 数据与排序数据两处。 */
|
|
33
|
+
/** 把第 i 个对象的 matrixWorld / selected / 低通参数 / inverse 写入 GPU 数据与排序数据两处。 */
|
|
34
34
|
private writeObject;
|
|
35
35
|
private rebuildTexture;
|
|
36
36
|
dispose(): void;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** DC 颜色 → SPZ 8bit 编码(不先截断到 [0,1],SH 叠加在未截断的颜色上),非有限值返回 0 */
|
|
2
|
+
export declare function encodeSpzColor(c: number): number;
|
|
3
|
+
/** SPZ 8bit 编码 → DC 颜色 */
|
|
4
|
+
export declare function decodeSpzColor(byte: number): number;
|
|
5
|
+
/** Convert a float16 stored as a uint16 number back to a float32 */
|
|
6
|
+
export declare function fromHalf(h: number): number;
|
|
7
|
+
export interface DecodedSpz {
|
|
8
|
+
numPoints: number;
|
|
9
|
+
shDegree: number;
|
|
10
|
+
/**
|
|
11
|
+
* SPZ header flags 的 bit0(FLAG_ANTIALIASED)。
|
|
12
|
+
* true 表示这份数据在训练期启用了 Mip-Splatting / gsplat 的抗锯齿模式
|
|
13
|
+
* (rasterize_mode="antialiased"):其 opacity 是在「渲染端会做 2D 低通 +
|
|
14
|
+
* opacity 补偿」的前提下拟合出来的,因此渲染端必须做同样的补偿才能得到
|
|
15
|
+
* 正确亮度;若不做补偿,远景 splat 会偏亮。
|
|
16
|
+
* false 表示原始 3DGS 训练,渲染端应改用纯 dilation(不补偿 opacity)。
|
|
17
|
+
*/
|
|
18
|
+
flagAntiAlias: boolean;
|
|
19
|
+
positions: Float32Array;
|
|
20
|
+
colors: Uint8Array;
|
|
21
|
+
scales: Float32Array;
|
|
22
|
+
rotations: Float32Array;
|
|
23
|
+
/** 量化打包后的 SH(sh-core 布局,SH_UINT32_PER_SPLAT[shDegree] uint32/splat),shDegree 为 0 时缺省 */
|
|
24
|
+
shPacked?: Uint32Array;
|
|
25
|
+
/** SH 量化范围,SPZ 恒为 1 */
|
|
26
|
+
shMax: number;
|
|
27
|
+
/** worker 中 pack 好的 GPU 数据(8 uint32/splat),主线程构造 PBMGSObject 后可直接用于上传 */
|
|
28
|
+
packedData?: Uint32Array;
|
|
29
|
+
}
|
|
30
|
+
/** 解码 SPZ 字节流为原始属性数组(gunzip + 逐字段解析) */
|
|
31
|
+
export declare function decodeSpz(fileBytes: Uint8Array | ArrayBuffer): Promise<DecodedSpz>;
|
|
32
|
+
export interface DecodedGaussianPly {
|
|
33
|
+
numPoints: number;
|
|
34
|
+
/** 文件实际 SH 阶数 */
|
|
35
|
+
shBands: 0 | 1 | 2 | 3;
|
|
36
|
+
/** min(shBands, MAX_RENDER_SH_DEGREE) */
|
|
37
|
+
shDegree: number;
|
|
38
|
+
positions: Float32Array;
|
|
39
|
+
/** rgb 为 SPZ 编码,a = round(sigmoid(opacity) * 255) */
|
|
40
|
+
colors: Uint8Array;
|
|
41
|
+
scales: Float32Array;
|
|
42
|
+
/** w, x, y, z,已归一化 */
|
|
43
|
+
rotations: Float32Array;
|
|
44
|
+
/**
|
|
45
|
+
* SH_BYTES_PER_SPLAT[shDegree] float/splat,coeff-major(sh[k*3 + c]),shDegree 为 0 时缺省;
|
|
46
|
+
* 非有限值已置 0;由 worker 交给 sh-core 的 quantizeAndPackSH 量化打包
|
|
47
|
+
*/
|
|
48
|
+
shCoeffs?: Float32Array;
|
|
49
|
+
}
|
|
50
|
+
export type PlyKind = 'gaussian' | 'gaussian-compressed' | 'generic';
|
|
51
|
+
/**
|
|
52
|
+
* 只看 header 判断 PLY 应按哪种方式渲染:
|
|
53
|
+
* - 含 `chunk` element(supersplat compressed PLY)→ 'gaussian-compressed'
|
|
54
|
+
* - vertex 含全部 3DGS 必需属性(x/y/z、f_dc_0..2、opacity、scale_0..2、rot_0..3)→ 'gaussian'
|
|
55
|
+
* - 其它(普通点云 / 网格,或 header 无法解析)→ 'generic'
|
|
56
|
+
* 不做格式(ascii / 大端)校验:3DGS 的格式问题由解码器给出明确错误。
|
|
57
|
+
*/
|
|
58
|
+
export declare function detectPlyKind(bytes: Uint8Array): PlyKind;
|
|
59
|
+
/** 解码 3DGS PLY 为 Five 内部属性数组 */
|
|
60
|
+
export declare function decodeGaussianPly(bytes: Uint8Array): DecodedGaussianPly;
|
|
61
|
+
export type DecodeKind = 'spz' | 'gaussian-ply';
|
|
62
|
+
/** Worker 回传的 3DGS PLY 解码结果(只含构造 PBMGSObject 所需数据) */
|
|
63
|
+
export interface DecodedGaussianPlyPacked {
|
|
64
|
+
numPoints: number;
|
|
65
|
+
shBands: number;
|
|
66
|
+
shDegree: number;
|
|
67
|
+
packedData: Uint32Array;
|
|
68
|
+
/** 量化打包后的 SH(sh-core 布局),shDegree 为 0 时缺省 */
|
|
69
|
+
shPacked?: Uint32Array;
|
|
70
|
+
/** SH 量化范围(quantizeAndPackSH 输出),无 SH 时为 1 */
|
|
71
|
+
shMax: number;
|
|
72
|
+
}
|