@realsee/five-webgpu 1.0.0-alpha.1 → 1.0.0-alpha.10

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.
Files changed (628) hide show
  1. package/README.md +9 -9
  2. package/_virtual/_rolldown/runtime.js +255 -0
  3. package/ai_guides/README.md +2 -2
  4. package/ai_guides/api.md +9 -8
  5. package/ai_guides/features/camera-animation.md +1 -1
  6. package/ai_guides/features/clipper.md +1 -1
  7. package/ai_guides/features/coordinate-system.md +1 -1
  8. package/ai_guides/features/event.md +1 -2
  9. package/ai_guides/features/five.md +81 -12
  10. package/ai_guides/features/gesture.md +3 -3
  11. package/ai_guides/features/get-screen-pixels.md +1 -1
  12. package/ai_guides/features/image-options.md +3 -3
  13. package/ai_guides/features/load-external-model.md +15 -15
  14. package/ai_guides/features/load-progress.md +2 -2
  15. package/ai_guides/features/material.md +35 -8
  16. package/ai_guides/features/mode.md +28 -31
  17. package/ai_guides/features/model.md +1 -1
  18. package/ai_guides/features/pano-filter.md +3 -3
  19. package/ai_guides/features/pano-tile.md +2 -2
  20. package/ai_guides/features/raycast.md +1 -1
  21. package/ai_guides/features/screen-project.md +1 -1
  22. package/ai_guides/features/state.md +3 -3
  23. package/ai_guides/features/ultra-hdr.md +41 -32
  24. package/ai_guides/features/work.md +2 -2
  25. package/ai_guides/quick-start.md +3 -3
  26. package/ai_guides/release_notes/6.6.md +2 -2
  27. package/ai_guides/release_notes/6.7.md +1 -1
  28. package/ai_guides/release_notes/6.8.md +3 -3
  29. package/ai_guides/support.md +0 -4
  30. package/docs/assets/hierarchy.js +1 -1
  31. package/docs/assets/navigation.js +1 -1
  32. package/docs/assets/search.js +1 -1
  33. package/docs/classes/index.AdaptiveLuminancePass.html +1 -1
  34. package/docs/classes/index.BoundingMesh.html +1 -1
  35. package/docs/classes/index.Camera.html +1 -1
  36. package/docs/classes/index.EffectComposer.html +1 -1
  37. package/docs/classes/index.EyeDomeLightingPass.html +1 -1
  38. package/docs/classes/index.Five.html +77 -68
  39. package/docs/classes/index.FivePass.html +1 -1
  40. package/docs/classes/index.FiveRenderer.html +2 -2
  41. package/docs/classes/index.FlowingFireworks3DPass.html +7 -3
  42. package/docs/classes/index.FlowingLight2DPass.html +6 -3
  43. package/docs/classes/index.FlowingLight3DPass.html +6 -3
  44. package/docs/classes/index.GaussianBlurPass.html +1 -1
  45. package/docs/classes/index.InternalWebGPURenderer.html +17 -3
  46. package/docs/classes/index.Model.html +1 -1
  47. package/docs/classes/index.ModelScene.html +1 -1
  48. package/docs/classes/index.NetworkSubscribe.html +1 -1
  49. package/docs/classes/index.PBMCustomNode.html +57 -0
  50. package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +9 -6
  51. package/docs/classes/index.PBMGaussianSplattingObject.html +18 -4
  52. package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +41 -11
  53. package/docs/classes/index.PBMGroup.html +1 -1
  54. package/docs/classes/index.PBMMesh.html +1 -1
  55. package/docs/classes/index.PBMMeshBasicMaterial.html +19 -6
  56. package/docs/classes/index.PBMMeshBasicNodeMaterial.html +31 -8
  57. package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +19 -6
  58. package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +31 -8
  59. package/docs/classes/index.PBMMeshPhongMaterial.html +19 -6
  60. package/docs/classes/index.PBMMeshPhongNodeMaterial.html +31 -8
  61. package/docs/classes/index.PBMMeshPhysicalMaterial.html +19 -6
  62. package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +31 -8
  63. package/docs/classes/index.PBMPanoFilter.html +8 -8
  64. package/docs/classes/index.PBMPointCloud.html +6 -7
  65. package/docs/classes/index.PBMPointCloudMaterial.html +83 -0
  66. package/docs/classes/index.PBMSkinnedMesh.html +1 -1
  67. package/docs/classes/index.PBMUpdateable.html +1 -1
  68. package/docs/classes/index.PanoCircleMesh.html +1 -1
  69. package/docs/classes/index.PanoCircleMeshCustom.html +5 -5
  70. package/docs/classes/index.PanoCircleMeshSolid.html +1 -1
  71. package/docs/classes/index.Parameter.html +61 -53
  72. package/docs/classes/index.Scene.html +1 -1
  73. package/docs/classes/index.Subscribe.html +1 -1
  74. package/docs/classes/index.TextureLoader.html +4 -1
  75. package/docs/classes/index.Tile3D.html +23 -21
  76. package/docs/classes/index.TileNode.html +1 -1
  77. package/docs/classes/index.Tileset.html +4 -4
  78. package/docs/classes/index.TrajectoryNode.html +3 -3
  79. package/docs/classes/index.Work.html +20 -18
  80. package/docs/classes/index.WorkResolvedObserver.html +22 -22
  81. package/docs/classes/index.XRButton.html +3 -0
  82. package/docs/documents/README.html +2 -2
  83. package/docs/documents/api.html +11 -10
  84. package/docs/documents/features_camera-animation.html +1 -1
  85. package/docs/documents/features_clipper.html +1 -1
  86. package/docs/documents/features_coordinate-system.html +1 -1
  87. package/docs/documents/features_event.html +1 -2
  88. package/docs/documents/features_five.html +53 -11
  89. package/docs/documents/features_gesture.html +3 -3
  90. package/docs/documents/features_get-screen-pixels.html +1 -1
  91. package/docs/documents/features_image-options.html +3 -3
  92. package/docs/documents/features_load-external-model.html +13 -13
  93. package/docs/documents/features_load-progress.html +1 -1
  94. package/docs/documents/features_material.html +20 -9
  95. package/docs/documents/features_mode.html +30 -15
  96. package/docs/documents/features_model.html +1 -1
  97. package/docs/documents/features_pano-filter.html +3 -3
  98. package/docs/documents/features_pano-tile.html +2 -2
  99. package/docs/documents/features_raycast.html +1 -1
  100. package/docs/documents/features_screen-project.html +1 -1
  101. package/docs/documents/features_state.html +2 -2
  102. package/docs/documents/features_ultra-hdr.html +50 -44
  103. package/docs/documents/features_work.html +2 -2
  104. package/docs/documents/quick-start.html +2 -2
  105. package/docs/documents/release_notes_6.6.html +2 -2
  106. package/docs/documents/release_notes_6.7.html +1 -1
  107. package/docs/documents/release_notes_6.8.html +3 -3
  108. package/docs/documents/support.html +1 -3
  109. package/docs/functions/index.customNodesCacheKey.html +3 -0
  110. package/docs/functions/index.parseWork.html +1 -1
  111. package/docs/functions/index.workToJson.html +1 -1
  112. package/docs/hierarchy.html +1 -1
  113. package/docs/index.html +2 -2
  114. package/docs/interfaces/index.AddableObject.html +1 -1
  115. package/docs/interfaces/index.AjaxOptions.html +1 -1
  116. package/docs/interfaces/index.BaseEvent.html +2 -2
  117. package/docs/interfaces/index.Clock.html +24 -0
  118. package/docs/interfaces/index.DeviceProfile.html +8 -0
  119. package/docs/interfaces/index.EventCallback.html +49 -47
  120. package/docs/interfaces/index.FiveInitArgs.html +65 -41
  121. package/docs/interfaces/index.GainmapCfgData.html +15 -0
  122. package/docs/interfaces/index.GestureEvent.html +2 -2
  123. package/docs/interfaces/index.IPBMMaterial.html +18 -5
  124. package/docs/interfaces/index.ImageOptions.html +1 -1
  125. package/docs/interfaces/index.IntersectEvent.html +2 -2
  126. package/docs/interfaces/index.IntersectMesh.html +1 -1
  127. package/docs/interfaces/index.IntersectMeshInterface.html +1 -1
  128. package/docs/interfaces/index.Intersection.html +1 -1
  129. package/docs/interfaces/index.LoosePanoWork.html +2 -2
  130. package/docs/interfaces/index.LooseWork.html +2 -2
  131. package/docs/interfaces/index.LooseWorkInitial.html +2 -2
  132. package/docs/interfaces/index.LooseWorkModel.html +2 -2
  133. package/docs/interfaces/index.LooseWorkObserver.html +2 -2
  134. package/docs/interfaces/index.LooseWorkPanorama.html +4 -3
  135. package/docs/interfaces/index.LooseWorkWithExtrinsics.html +15 -9
  136. package/docs/interfaces/index.ModeChangeEvent.html +2 -2
  137. package/docs/interfaces/index.ModelControllerCustomInitArgs.html +1 -1
  138. package/docs/interfaces/index.ModelEvent.html +2 -2
  139. package/docs/interfaces/index.ModelSceneEvent.html +2 -2
  140. package/docs/interfaces/index.ModelTileEvent.html +2 -2
  141. package/docs/interfaces/index.MovePanoOptions.html +1 -1
  142. package/docs/interfaces/index.NetworkAbortError.html +1 -1
  143. package/docs/interfaces/index.NetworkFirbiddenError.html +1 -1
  144. package/docs/interfaces/index.NetworkOptions.html +1 -1
  145. package/docs/interfaces/index.NetworkProxyError.html +1 -1
  146. package/docs/interfaces/index.NetworkResourceEvent.html +2 -2
  147. package/docs/interfaces/index.NetworkResponseError.html +1 -1
  148. package/docs/interfaces/index.NetworkTimeoutError.html +1 -1
  149. package/docs/interfaces/index.ObjectEvent.html +2 -2
  150. package/docs/interfaces/index.PBMClipperParameter.html +2 -2
  151. package/docs/interfaces/index.PBMCustomNodeContext.html +87 -0
  152. package/docs/interfaces/index.PBMCustomNodeOptions.html +10 -0
  153. package/docs/interfaces/index.PBMCustomNodePanoContext.html +20 -0
  154. package/docs/interfaces/index.PBMCustomNodeSlots.html +31 -0
  155. package/docs/interfaces/index.PBMGaussianSplattingNodeMaterialOptions.html +4 -0
  156. package/docs/interfaces/index.PBMPanoDepth.html +5 -5
  157. package/docs/interfaces/index.PBMPanoFilterValue.html +2 -2
  158. package/docs/interfaces/index.PBMPanoGainmap.html +6 -0
  159. package/docs/interfaces/index.PBMPanoPicture.html +9 -8
  160. package/docs/interfaces/index.PBMRefinedScreen.html +2 -2
  161. package/docs/interfaces/index.PanoCircleMeshCustomOptions.html +2 -2
  162. package/docs/interfaces/index.PanoCircleMeshInterface.html +1 -1
  163. package/docs/interfaces/index.PanoEvent.html +2 -2
  164. package/docs/interfaces/index.PanoPrepareEvent.html +15 -0
  165. package/docs/interfaces/index.PanoTextureEvent.html +2 -2
  166. package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +9 -9
  167. package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +1 -1
  168. package/docs/interfaces/index.ParameterMaterialValue.html +46 -38
  169. package/docs/interfaces/index.ParameterTilesetValue.html +15 -15
  170. package/docs/interfaces/index.ParameterValue.html +60 -52
  171. package/docs/interfaces/index.Pose.html +1 -1
  172. package/docs/interfaces/index.RenderEvent.html +2 -2
  173. package/docs/interfaces/index.ResolvedParameterValue.html +60 -52
  174. package/docs/interfaces/index.SplatData.html +10 -5
  175. package/docs/interfaces/index.State.html +1 -1
  176. package/docs/interfaces/index.StateEvent.html +2 -2
  177. package/docs/interfaces/index.TextureOptions.html +1 -1
  178. package/docs/interfaces/index.TilesetOptions.html +7 -2
  179. package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
  180. package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +37 -0
  181. package/docs/interfaces/index.ViewLayer.html +23 -21
  182. package/docs/interfaces/index.WorkCubeHdrGainmapImage.html +10 -0
  183. package/docs/interfaces/index.WorkCubeImage.html +5 -9
  184. package/docs/interfaces/index.WorkImage.html +8 -12
  185. package/docs/interfaces/index.WorkInitial.html +8 -8
  186. package/docs/interfaces/index.WorkModel.html +8 -8
  187. package/docs/interfaces/index.WorkModelLayer.html +6 -6
  188. package/docs/interfaces/index.WorkObserver.html +23 -23
  189. package/docs/interfaces/index.WorkPanoramaJson.html +3 -2
  190. package/docs/interfaces/index.WorkTile.html +8 -12
  191. package/docs/interfaces/index.WorksEvent.html +2 -2
  192. package/docs/interfaces/index.XRControllerEvent.html +2 -2
  193. package/docs/interfaces/index.XRGestureEvent.html +2 -2
  194. package/docs/interfaces/index.XRPanoramaControllerCustomInitArgs.html +52 -0
  195. package/docs/interfaces/index.XRSessionEvent.html +2 -2
  196. package/docs/modules/index.html +1 -1
  197. package/docs/types/index.ControllerCustomInitTypes.html +4 -2
  198. package/docs/types/index.ControllerEventTypes.html +25 -23
  199. package/docs/types/index.DeviceProfileOverride.html +5 -0
  200. package/docs/types/index.EventTypes.html +26 -26
  201. package/docs/types/index.FlowingFireworks3DPassLine.html +5 -2
  202. package/docs/types/index.FlowingLight2DPassLine.html +4 -2
  203. package/docs/types/index.FlowingLight3DPassLine.html +7 -2
  204. package/docs/types/index.FlowingLightLineInput.html +12 -0
  205. package/docs/types/index.Mode.html +6 -3
  206. package/docs/types/index.OutputTextureDataType.html +1 -1
  207. package/docs/types/index.PBMColorStyle.html +1 -1
  208. package/docs/types/index.PBMCustomNodeTargetType.html +2 -0
  209. package/docs/types/index.PBMPointBack.html +1 -1
  210. package/docs/types/index.PBMPointShape.html +1 -1
  211. package/docs/types/index.PBMPointSize.html +1 -1
  212. package/docs/types/index.PBMRoofStyle.html +6 -0
  213. package/docs/types/index.ParseOptions.html +14 -8
  214. package/docs/types/index.XRMachineType.html +7 -0
  215. package/docs/variables/index.GSPLAT_PIPELINE_AUTO.html +2 -0
  216. package/docs/variables/index.GSPLAT_PIPELINE_RASTER_CPU_SORT.html +2 -0
  217. package/docs/variables/index.GSPLAT_PIPELINE_RASTER_GPU_SORT.html +2 -0
  218. package/docs/variables/index.PBMVertexMarkFlag.html +4 -0
  219. package/docs/variables/index.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
  220. package/docs/variables/index.controllersDefaultInitArgs.html +1 -1
  221. package/five/application/controllers.d.ts +8 -0
  222. package/five/application/events.d.ts +1 -1
  223. package/five/application/five.d.ts +15 -1
  224. package/five/application/fiveInitArgs.d.ts +32 -1
  225. package/five/application/mode.d.ts +8 -1
  226. package/five/cardboard/helper.d.ts +2 -0
  227. package/five/cardboard/index.d.ts +13 -0
  228. package/five/cardboard/sensor.d.ts +158 -0
  229. package/five/controllers/base.d.ts +3 -0
  230. package/five/controllers/events.d.ts +5 -3
  231. package/five/controllers/panorama.d.ts +2 -2
  232. package/five/controllers/vrPanorama.d.ts +56 -0
  233. package/five/controllers/xrPanorama.d.ts +506 -0
  234. package/five/core/internalWebGPURenderer.d.ts +23 -1
  235. package/five/core/panoVideo.d.ts +4 -1
  236. package/five/core/tiling.d.ts +40 -9
  237. package/five/core/webglAsyncReadFix.d.ts +25 -0
  238. package/five/gaussian-splatting/gpu-sort/prefixSumKernel.d.ts +65 -0
  239. package/five/gaussian-splatting/gpu-sort/radixSortModule.d.ts +128 -0
  240. package/five/gaussian-splatting/gpu-sort/shaders/radixHistogram.d.ts +2 -0
  241. package/five/gaussian-splatting/gpu-sort/shaders/radixReorder.d.ts +2 -0
  242. package/five/gaussian-splatting/gpu-sort/shaders/sortKeygen.d.ts +2 -0
  243. package/five/gaussian-splatting/gpu-sort/sortAdapter.d.ts +234 -0
  244. package/five/gaussian-splatting/layerRegistry.d.ts +17 -0
  245. package/five/gaussian-splatting/pipelines/cpuSortPipeline.d.ts +159 -0
  246. package/five/gaussian-splatting/pipelines/gpuSortPipeline.d.ts +98 -0
  247. package/five/gaussian-splatting/pipelines/gsplatPipeline.d.ts +104 -0
  248. package/five/gaussian-splatting/pipelines/pipelineMode.d.ts +42 -0
  249. package/five/gaussian-splatting/pipelines/sortThrottle.d.ts +45 -0
  250. package/five/gaussian-splatting/shStore.d.ts +22 -0
  251. package/five/gaussian-splatting/splatAssembler.d.ts +69 -0
  252. package/five/gaussian-splatting/transformStore.d.ts +37 -0
  253. package/five/gaussian-splatting/wasm/sort.d.ts +4 -3
  254. package/five/index.d.ts +8 -2
  255. package/five/index.js +403 -343
  256. package/five/index.mjs +9531 -4900
  257. package/five/meshes/panoCircleMeshCustom.d.ts +1 -0
  258. package/five/model/index.d.ts +3 -2
  259. package/five/model/loaders/spz.d.ts +50 -2
  260. package/five/model/materials/nodes/pbmMeshBasicNodeMaterial.d.ts +2 -0
  261. package/five/model/materials/nodes/pbmMeshPanoOnlyNodeMaterial.d.ts +2 -0
  262. package/five/model/materials/nodes/pbmMeshPhongNodeMaterial.d.ts +2 -0
  263. package/five/model/materials/nodes/pbmMeshPhysicalNodeMaterial.d.ts +2 -0
  264. package/five/model/materials/pbmGaussianSplattingNodeMaterial.d.ts +12 -5
  265. package/five/model/materials/pbmMaterial.d.ts +288 -6
  266. package/five/model/materials/pbmMeshMaterial.d.ts +0 -9
  267. package/five/model/materials/pbmPointCloudNodeMaterial.d.ts +1 -1
  268. package/five/model/materials/tsl/defines.d.ts +8 -2
  269. package/five/model/materials/tsl/outputBuilder.d.ts +8 -15
  270. package/five/model/materials/tsl/panoColor.d.ts +8 -2
  271. package/five/model/materials/tsl/utils.d.ts +13 -0
  272. package/five/model/objects/pbmGaussianSplattingObject.d.ts +30 -4
  273. package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +113 -48
  274. package/five/model/objects/pbmPointCloud.d.ts +0 -1
  275. package/five/model/objects/pbmPointCloudObject.d.ts +1 -1
  276. package/five/model/parameter.d.ts +20 -5
  277. package/five/model/tile3d/index.d.ts +2 -0
  278. package/five/model/tile3d/tileset.d.ts +5 -0
  279. package/five/model/tile3d/trajectory-content.d.ts +53 -0
  280. package/five/renderer/compute-renderers/binned/binned-core.d.ts +46 -0
  281. package/five/renderer/compute-renderers/binned/binned-pipelines.d.ts +10 -0
  282. package/five/renderer/compute-renderers/binned/shaders/args-builder.d.ts +2 -0
  283. package/five/renderer/compute-renderers/binned/shaders/classify.d.ts +2 -0
  284. package/five/renderer/compute-renderers/binned/shaders/coop.d.ts +2 -0
  285. package/five/renderer/compute-renderers/pointcloud-compute-renderer.d.ts +14 -38
  286. package/five/renderer/compute-renderers/shaders/lib/color.d.ts +2 -0
  287. package/five/renderer/compute-renderers/shaders/lib/cull.d.ts +2 -0
  288. package/five/renderer/compute-renderers/shaders/lib/encode.d.ts +2 -0
  289. package/five/renderer/compute-renderers/shaders/lib/point-setup.d.ts +2 -0
  290. package/five/renderer/compute-renderers/shaders/lib/point-size.d.ts +2 -0
  291. package/five/renderer/compute-renderers/shaders/lib/raster.d.ts +2 -0
  292. package/five/renderer/compute-renderers/shaders/lib/size-class.d.ts +2 -0
  293. package/five/renderer/compute-renderers/shaders/lib/tile-bindings.d.ts +2 -0
  294. package/five/renderer/compute-renderers/uniform-layout.d.ts +23 -0
  295. package/five/renderer/five-renderer.d.ts +2 -0
  296. package/five/renderer/index.d.ts +1 -1
  297. package/five/renderer/postprocessing/index.d.ts +1 -1
  298. package/five/renderer/postprocessing/passes/flowing-fireworks-3d-pass.d.ts +23 -0
  299. package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +2 -0
  300. package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +23 -0
  301. package/five/renderer/postprocessing/passes/pass.js +255 -0
  302. package/five/renderer/postprocessing/passes/pass.mjs +255 -0
  303. package/five/renderer/tools/full-screen-quad.js +255 -0
  304. package/five/renderer/tools/full-screen-quad.mjs +255 -0
  305. package/five/texture/loader.d.ts +6 -0
  306. package/five/types/cube.d.ts +0 -1
  307. package/five/utils/calculateThreeMouse.js +255 -0
  308. package/five/utils/calculateThreeMouse.mjs +255 -0
  309. package/five/utils/detector.d.ts +11 -1
  310. package/five/utils/distance.js +255 -0
  311. package/five/utils/distance.mjs +255 -0
  312. package/five/utils/error.d.ts +1 -0
  313. package/five/utils/event.d.ts +26 -3
  314. package/five/utils/gainmap-data.d.ts +23 -0
  315. package/five/utils/isNil.js +255 -0
  316. package/five/utils/isNil.mjs +255 -0
  317. package/five/utils/ktx2.d.ts +3 -3
  318. package/five/utils/uuid.js +255 -0
  319. package/five/utils/uuid.mjs +255 -0
  320. package/five/webxr/XRControllerModelFactory.d.ts +55 -0
  321. package/five/webxr/buttonStateMachine.d.ts +31 -0
  322. package/five/webxr/deviceProfile.d.ts +70 -0
  323. package/five/webxr/inputSourceTracker.d.ts +59 -0
  324. package/five/webxr/referenceSpace.d.ts +60 -0
  325. package/five/webxr/renderTargetBridge.d.ts +45 -0
  326. package/five/webxr/xrButton.d.ts +4 -0
  327. package/five/webxr/xrManager.d.ts +174 -0
  328. package/five/work/index.d.ts +1 -1
  329. package/five/work/looseWorkType.d.ts +2 -1
  330. package/five/work/work.d.ts +30 -7
  331. package/five/work/workJsonType.d.ts +2 -1
  332. package/gltf-loader/gltf-object.d.ts +17 -0
  333. package/gltf-loader/index.d.ts +45 -0
  334. package/gltf-loader/index.js +255 -0
  335. package/gltf-loader/index.mjs +302 -0
  336. package/line/circle_png.d.ts +1 -0
  337. package/line/index.d.ts +49 -0
  338. package/line/index.js +255 -0
  339. package/line/index.mjs +340 -0
  340. package/llms.txt +1 -1
  341. package/package.json +34 -5
  342. package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
  343. package/plugins/BackgroundPlugin/Controller.js +276 -0
  344. package/plugins/BackgroundPlugin/Controller.mjs +276 -0
  345. package/plugins/BackgroundPlugin/index.d.ts +5 -0
  346. package/plugins/BackgroundPlugin/index.js +255 -0
  347. package/plugins/BackgroundPlugin/index.mjs +255 -0
  348. package/plugins/BackgroundPlugin/typings.d.ts +44 -0
  349. package/plugins/BasePlugin/index.d.ts +1 -1
  350. package/plugins/BasePlugin/index.js +255 -0
  351. package/plugins/BasePlugin/index.mjs +255 -0
  352. package/plugins/CSS2DPlugin/Controller.d.ts +59 -0
  353. package/plugins/CSS2DPlugin/Controller.js +255 -0
  354. package/plugins/CSS2DPlugin/Controller.mjs +255 -0
  355. package/plugins/CSS2DPlugin/index.d.ts +5 -0
  356. package/plugins/CSS2DPlugin/index.js +255 -0
  357. package/plugins/CSS2DPlugin/index.mjs +255 -0
  358. package/plugins/CSS2DPlugin/style.css_raw.js +275 -0
  359. package/plugins/CSS2DPlugin/style.css_raw.mjs +275 -0
  360. package/plugins/CSS2DPlugin/typing.d.ts +31 -0
  361. package/plugins/CSS3DPlugin/Controller.d.ts +64 -0
  362. package/plugins/CSS3DPlugin/Controller.js +255 -0
  363. package/plugins/CSS3DPlugin/Controller.mjs +255 -0
  364. package/plugins/CSS3DPlugin/index.d.ts +5 -0
  365. package/plugins/CSS3DPlugin/index.js +255 -0
  366. package/plugins/CSS3DPlugin/index.mjs +255 -0
  367. package/plugins/CSS3DPlugin/style.css_raw.js +274 -0
  368. package/plugins/CSS3DPlugin/style.css_raw.mjs +274 -0
  369. package/plugins/CSS3DPlugin/typing.d.ts +33 -0
  370. package/plugins/FloorplanPlugin/Controller.d.ts +100 -0
  371. package/plugins/FloorplanPlugin/Controller.js +255 -0
  372. package/plugins/FloorplanPlugin/Controller.mjs +255 -0
  373. package/plugins/FloorplanPlugin/index.d.ts +6 -0
  374. package/plugins/FloorplanPlugin/index.js +255 -0
  375. package/plugins/FloorplanPlugin/index.mjs +255 -0
  376. package/plugins/FloorplanPlugin/render/assets.d.ts +9 -0
  377. package/plugins/FloorplanPlugin/render/assets.js +255 -0
  378. package/plugins/FloorplanPlugin/render/assets.mjs +255 -0
  379. package/plugins/FloorplanPlugin/render/index.d.ts +35 -0
  380. package/plugins/FloorplanPlugin/render/index.js +255 -0
  381. package/plugins/FloorplanPlugin/render/index.mjs +255 -0
  382. package/plugins/FloorplanPlugin/render/isPointInPolygon.d.ts +5 -0
  383. package/plugins/FloorplanPlugin/render/isPointInPolygon.js +255 -0
  384. package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +255 -0
  385. package/plugins/FloorplanPlugin/render/renderFloor.d.ts +22 -0
  386. package/plugins/FloorplanPlugin/render/renderFloor.js +255 -0
  387. package/plugins/FloorplanPlugin/render/renderFloor.mjs +255 -0
  388. package/plugins/FloorplanPlugin/render/roomLabelVisibility.d.ts +10 -0
  389. package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +255 -0
  390. package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +255 -0
  391. package/plugins/FloorplanPlugin/render/style.css_raw.js +585 -0
  392. package/plugins/FloorplanPlugin/render/style.css_raw.mjs +585 -0
  393. package/plugins/FloorplanPlugin/typing.d.ts +156 -0
  394. package/plugins/FloorplanPlugin/typings/floorplanData.d.ts +112 -0
  395. package/plugins/FloorplanPlugin/typings/floorplanJson.d.ts +167 -0
  396. package/plugins/FloorplanPlugin/typings/floorplanServerData.d.ts +78 -0
  397. package/plugins/FloorplanPlugin/typings/index.d.ts +3 -0
  398. package/plugins/FloorplanPlugin/utils/changeMode.d.ts +5 -0
  399. package/plugins/FloorplanPlugin/utils/changeMode.js +255 -0
  400. package/plugins/FloorplanPlugin/utils/changeMode.mjs +255 -0
  401. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.d.ts +6 -0
  402. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +255 -0
  403. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +255 -0
  404. package/plugins/FloorplanPlugin/utils/correctFiveState.d.ts +11 -0
  405. package/plugins/FloorplanPlugin/utils/correctFiveState.js +255 -0
  406. package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +255 -0
  407. package/plugins/FloorplanPlugin/utils/equal.d.ts +9 -0
  408. package/plugins/FloorplanPlugin/utils/equal.js +255 -0
  409. package/plugins/FloorplanPlugin/utils/equal.mjs +255 -0
  410. package/plugins/FloorplanPlugin/utils/filter.d.ts +8 -0
  411. package/plugins/FloorplanPlugin/utils/filter.js +255 -0
  412. package/plugins/FloorplanPlugin/utils/filter.mjs +255 -0
  413. package/plugins/FloorplanPlugin/utils/fiveModelLoad.d.ts +6 -0
  414. package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +255 -0
  415. package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +255 -0
  416. package/plugins/FloorplanPlugin/utils/formatData.d.ts +6 -0
  417. package/plugins/FloorplanPlugin/utils/formatData.js +255 -0
  418. package/plugins/FloorplanPlugin/utils/formatData.mjs +255 -0
  419. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.d.ts +20 -0
  420. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +255 -0
  421. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +255 -0
  422. package/plugins/FloorplanPlugin/utils/formatPosition.d.ts +33 -0
  423. package/plugins/FloorplanPlugin/utils/formatPosition.js +255 -0
  424. package/plugins/FloorplanPlugin/utils/formatPosition.mjs +255 -0
  425. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.d.ts +6 -0
  426. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +255 -0
  427. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +255 -0
  428. package/plugins/FloorplanPlugin/utils/getPxmm.d.ts +19 -0
  429. package/plugins/FloorplanPlugin/utils/getPxmm.js +255 -0
  430. package/plugins/FloorplanPlugin/utils/getPxmm.mjs +255 -0
  431. package/plugins/FloorplanPlugin/utils/isTruelyObject.d.ts +4 -0
  432. package/plugins/FloorplanPlugin/utils/isTruelyObject.js +255 -0
  433. package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +255 -0
  434. package/plugins/FloorplanPlugin/utils/nearlyEqual.d.ts +8 -0
  435. package/plugins/FloorplanPlugin/utils/nearlyEqual.js +255 -0
  436. package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +255 -0
  437. package/plugins/FloorplanPlugin/utils/polylabel.d.ts +8 -0
  438. package/plugins/FloorplanPlugin/utils/polylabel.js +255 -0
  439. package/plugins/FloorplanPlugin/utils/polylabel.mjs +255 -0
  440. package/plugins/FloorplanPlugin/utils/to.d.ts +5 -0
  441. package/plugins/FloorplanPlugin/utils/to.js +255 -0
  442. package/plugins/FloorplanPlugin/utils/to.mjs +255 -0
  443. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +1 -1
  444. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +255 -0
  445. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +255 -0
  446. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +1 -1
  447. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +255 -0
  448. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +255 -0
  449. package/plugins/Object3DHelperPlugin/Controller.d.ts +99 -0
  450. package/plugins/Object3DHelperPlugin/Controller.js +255 -0
  451. package/plugins/Object3DHelperPlugin/Controller.mjs +255 -0
  452. package/plugins/Object3DHelperPlugin/Controllers/BaseController.d.ts +139 -0
  453. package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +255 -0
  454. package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +255 -0
  455. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.d.ts +16 -0
  456. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +255 -0
  457. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +255 -0
  458. package/plugins/Object3DHelperPlugin/Controllers/MoveController.d.ts +66 -0
  459. package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +255 -0
  460. package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +255 -0
  461. package/plugins/Object3DHelperPlugin/Controllers/RotateController.d.ts +61 -0
  462. package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +255 -0
  463. package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +255 -0
  464. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.d.ts +17 -0
  465. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +255 -0
  466. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +255 -0
  467. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.d.ts +97 -0
  468. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +255 -0
  469. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +255 -0
  470. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.d.ts +16 -0
  471. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +255 -0
  472. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +255 -0
  473. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.d.ts +37 -0
  474. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +255 -0
  475. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +255 -0
  476. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.d.ts +93 -0
  477. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +255 -0
  478. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +255 -0
  479. package/plugins/Object3DHelperPlugin/constant.d.ts +27 -0
  480. package/plugins/Object3DHelperPlugin/constant.js +255 -0
  481. package/plugins/Object3DHelperPlugin/constant.mjs +255 -0
  482. package/plugins/Object3DHelperPlugin/index.d.ts +6 -0
  483. package/plugins/Object3DHelperPlugin/index.js +255 -0
  484. package/plugins/Object3DHelperPlugin/index.mjs +255 -0
  485. package/plugins/Object3DHelperPlugin/typing.d.ts +143 -0
  486. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.d.ts +22 -0
  487. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +255 -0
  488. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +255 -0
  489. package/plugins/Object3DHelperPlugin/utils/CenterHandle.d.ts +23 -0
  490. package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +255 -0
  491. package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +255 -0
  492. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.d.ts +19 -0
  493. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +255 -0
  494. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +255 -0
  495. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.d.ts +5 -0
  496. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +255 -0
  497. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +255 -0
  498. package/plugins/Object3DHelperPlugin/utils/cameraHooks.d.ts +3 -0
  499. package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +255 -0
  500. package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +255 -0
  501. package/plugins/Object3DHelperPlugin/utils/direction.d.ts +14 -0
  502. package/plugins/Object3DHelperPlugin/utils/direction.js +255 -0
  503. package/plugins/Object3DHelperPlugin/utils/direction.mjs +255 -0
  504. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.d.ts +5 -0
  505. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +255 -0
  506. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +255 -0
  507. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.d.ts +8 -0
  508. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +255 -0
  509. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +255 -0
  510. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.d.ts +8 -0
  511. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +255 -0
  512. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +255 -0
  513. package/plugins/Object3DHelperPlugin/utils/solidGuide.d.ts +27 -0
  514. package/plugins/Object3DHelperPlugin/utils/solidGuide.js +255 -0
  515. package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +255 -0
  516. package/plugins/Object3DHelperPlugin/utils/tipsDom.d.ts +8 -0
  517. package/plugins/Object3DHelperPlugin/utils/tipsDom.js +255 -0
  518. package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +255 -0
  519. package/plugins/PanoAnimePlugin/Controller.d.ts +49 -0
  520. package/plugins/PanoAnimePlugin/Controller.js +255 -0
  521. package/plugins/PanoAnimePlugin/Controller.mjs +255 -0
  522. package/plugins/PanoAnimePlugin/index.d.ts +5 -0
  523. package/plugins/PanoAnimePlugin/index.js +255 -0
  524. package/plugins/PanoAnimePlugin/index.mjs +255 -0
  525. package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
  526. package/plugins/WordPassPlugin/Controller.d.ts +62 -0
  527. package/plugins/WordPassPlugin/Controller.js +255 -0
  528. package/plugins/WordPassPlugin/Controller.mjs +255 -0
  529. package/plugins/WordPassPlugin/hersheyFont.d.ts +11 -0
  530. package/plugins/WordPassPlugin/hersheyFont.js +255 -0
  531. package/plugins/WordPassPlugin/hersheyFont.mjs +255 -0
  532. package/plugins/WordPassPlugin/index.d.ts +7 -0
  533. package/plugins/WordPassPlugin/index.js +255 -0
  534. package/plugins/WordPassPlugin/index.mjs +255 -0
  535. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.d.ts +82 -0
  536. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +256 -0
  537. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +256 -0
  538. package/plugins/WordPassPlugin/typing.d.ts +109 -0
  539. package/plugins/WordPassPlugin/word-pass.d.ts +172 -0
  540. package/plugins/WordPassPlugin/word-pass.js +255 -0
  541. package/plugins/WordPassPlugin/word-pass.mjs +255 -0
  542. package/plugins/index.d.ts +8 -0
  543. package/plugins/index.js +3 -3
  544. package/plugins/index.mjs +3 -287
  545. package/plugins/thirdParty/CSS2DRenderer.d.ts +37 -0
  546. package/plugins/thirdParty/CSS2DRenderer.js +255 -0
  547. package/plugins/thirdParty/CSS2DRenderer.mjs +255 -0
  548. package/plugins/thirdParty/CSS3DRenderer.d.ts +45 -0
  549. package/plugins/thirdParty/CSS3DRenderer.js +255 -0
  550. package/plugins/thirdParty/CSS3DRenderer.mjs +255 -0
  551. package/plugins/thirdParty/OrbitControls.d.ts +78 -0
  552. package/plugins/thirdParty/doctorstrange-model.d.ts +92 -0
  553. package/plugins/thirdParty/doctorstrange-model.js +610 -0
  554. package/plugins/thirdParty/doctorstrange-model.mjs +610 -0
  555. package/plugins/thirdParty/domevents.d.ts +36 -0
  556. package/plugins/thirdParty/domevents.js +255 -0
  557. package/plugins/thirdParty/domevents.mjs +255 -0
  558. package/plugins/utils/absoluteUrl.js +255 -0
  559. package/plugins/utils/absoluteUrl.mjs +255 -0
  560. package/plugins/utils/calculatePath.d.ts +3 -0
  561. package/plugins/utils/calculatePath.js +255 -0
  562. package/plugins/utils/calculatePath.mjs +255 -0
  563. package/plugins/utils/clamp.d.ts +2 -0
  564. package/plugins/utils/clamp.js +255 -0
  565. package/plugins/utils/clamp.mjs +255 -0
  566. package/plugins/utils/uuid.d.ts +2 -0
  567. package/plugins/utils/uuid.js +255 -0
  568. package/plugins/utils/uuid.mjs +255 -0
  569. package/react/context.d.ts +1 -1
  570. package/react/createProvider.d.ts +1 -1
  571. package/react/fiveApp.d.ts +1 -1
  572. package/react/hooks/unsafe__useFiveInstance.d.ts +1 -1
  573. package/react/hooks/useFiveAction.d.ts +1 -1
  574. package/react/hooks/useFiveCurrentObserver.d.ts +1 -1
  575. package/react/hooks/useFiveCurrentState.d.ts +1 -1
  576. package/react/hooks/useFiveEventCallback.d.ts +1 -1
  577. package/react/hooks/useFiveModelEffect.d.ts +1 -1
  578. package/react/hooks/useFiveModelIntersectRaycaster.d.ts +1 -1
  579. package/react/hooks/useFivePlugin.d.ts +1 -1
  580. package/react/hooks/useFiveSceneEffect.d.ts +1 -1
  581. package/react/hooks/useFiveState.d.ts +1 -1
  582. package/react/hooks/useFiveWork.d.ts +1 -1
  583. package/react/index.js +3 -3
  584. package/react/index.mjs +3 -3
  585. package/react/withFive.d.ts +1 -1
  586. package/sticker/geometry.d.ts +3 -0
  587. package/sticker/index.d.ts +68 -0
  588. package/sticker/index.js +255 -0
  589. package/sticker/index.mjs +358 -0
  590. package/umd/five-gltf-loader.js +255 -0
  591. package/umd/five-line.js +322 -0
  592. package/umd/five-plugins.js +817 -3
  593. package/umd/five-react.js +3 -3
  594. package/umd/five-sticker.js +255 -0
  595. package/umd/five-vfx.js +323 -0
  596. package/umd/five.js +472 -412
  597. package/vfx/airflow/airflow.d.ts +18 -0
  598. package/vfx/common/simplex-noise.d.ts +2 -0
  599. package/vfx/frame/frame.d.ts +27 -0
  600. package/vfx/index.d.ts +7 -0
  601. package/vfx/index.js +255 -0
  602. package/vfx/index.mjs +738 -0
  603. package/vfx/particle/instance.d.ts +36 -0
  604. package/vfx/particle/particle.d.ts +119 -0
  605. package/vfx/particle/utils.d.ts +11 -0
  606. package/vfx/particle-gpu/particle.d.ts +75 -0
  607. package/vfx/particle-gpu/utils.d.ts +11 -0
  608. package/vfx/spotLight/spotLight.d.ts +15 -0
  609. package/work-downloader/components/model-3d-tile.d.ts +2 -0
  610. package/work-downloader/components/model.d.ts +3 -0
  611. package/work-downloader/components/observer.d.ts +9 -0
  612. package/work-downloader/download.d.ts +16 -0
  613. package/work-downloader/index.d.ts +2 -0
  614. package/work-downloader/index.js +255 -0
  615. package/work-downloader/index.mjs +595 -0
  616. package/work-downloader/type.d.ts +28 -0
  617. package/work-downloader/utils/download-to-file.d.ts +1 -0
  618. package/work-downloader/utils/image-processing.d.ts +7 -0
  619. package/work-downloader/utils/join-url.d.ts +2 -0
  620. package/work-downloader/utils/log.d.ts +1 -0
  621. package/work-downloader/utils/relative-url.d.ts +1 -0
  622. package/docs/interfaces/index.PBMHDRConfig.html +0 -12
  623. package/five/gaussian-splatting/util/renderData.d.ts +0 -66
  624. package/five/gaussian-splatting/worker/dataWorker.d.ts +0 -1
  625. package/five/three-version-check.d.ts +0 -1
  626. package/five/utils/hdr-data.d.ts +0 -13
  627. package/five/utils/shaderContentFix.d.ts +0 -7
  628. /package/five/{renderer/compute-renderers/shaders/rasterize.d.ts → gaussian-splatting/gpu-sort/shaders/prefixSum.d.ts} +0 -0
@@ -5,7 +5,20 @@ import * as THREE from 'three/webgpu';
5
5
  export declare const rgb2hsv: THREE.TSL.FnNode<[number | THREE.Node], THREE.Node<"vec3">>;
6
6
  export declare const hsv2rgb: THREE.TSL.FnNode<[number | THREE.Node], THREE.Node<"vec3">>;
7
7
  export declare const unpackRGBAToDepth: THREE.TSL.FnNode<[number | THREE.Node], THREE.Node<"float">>;
8
+ /**
9
+ * 由 gainmap 值计算 HDR 增益系数
10
+ * @description 与 UltraHDR 规范一致:
11
+ * 1. gain 为数据(非颜色),取值 [0,1]
12
+ * 2. 解码 gamma:pow(gain, 1/gamma)(规范为 `log_recovery = pow(recovery, 1.0/map_gamma)`)
13
+ * 3. 在 log2 空间用 min/maxContentBoost 插值,再乘显示器容量权重
14
+ * 4. capacity 上下限相等(分母为 0)时权重取 0,避免 NaN
15
+ */
8
16
  export declare const hdrBoost: THREE.TSL.FnNode<[number | THREE.Node, number | THREE.Node, number | THREE.Node, number | THREE.Node, number | THREE.Node, number | THREE.Node, number | THREE.Node], THREE.Node<"vec3">>;
17
+ /**
18
+ * 应用 gainmap 偏移,得到最终 HDR 颜色
19
+ * @description 与 UltraHDR 规范一致:`(sdr + offsetSdr) * boost - offsetHdr`
20
+ */
21
+ export declare const hdrOffset: THREE.TSL.FnNode<[number | THREE.Node, number | THREE.Node, number | THREE.Node, number | THREE.Node], THREE.Node<"vec3">>;
9
22
  export declare const zoomVector: THREE.TSL.FnNode<[number | THREE.Node, number | THREE.Node, number | THREE.Node], THREE.Node<"vec3">>;
10
23
  /** 计算全景采样方向:用 mat4 矩阵右乘方向向量 (w=0) 得到旋转后的方向 */
11
24
  export declare const sampleDirection: THREE.TSL.FnNode<[number | THREE.Node, number | THREE.Node, number | THREE.Node, number | THREE.Node], THREE.Node<"vec3">>;
@@ -2,10 +2,17 @@ import * as THREE from "three/webgpu";
2
2
  import type { PBMClipperParameter } from "../materials/pbmMaterial";
3
3
  export interface SplatData {
4
4
  numPoints: number;
5
- positions: Float32Array;
6
- colors: Uint8Array;
7
- scales: Float32Array;
8
- rotations: Float32Array;
5
+ positions?: Float32Array;
6
+ colors?: Uint8Array;
7
+ scales?: Float32Array;
8
+ rotations?: Float32Array;
9
+ /**
10
+ * 预 pack 好的 GPU 数据(8 uint32/splat,2 texel RGBA32UI)。
11
+ * texel0: [0..2]=posX/Y/Z float32 位模式, [3]=R|G<<8|B<<16|A<<24;
12
+ * texel1: [4..6]=half 精度协方差上三角 6 分量, [7]=transformIndex<<16|layerIndex。
13
+ * 由 worker 内 WASM `_pack` 生成后回传(见 Task 1.2 / 3.1)。
14
+ */
15
+ packedData?: Uint32Array;
9
16
  sh1?: Float32Array;
10
17
  sh2?: Float32Array;
11
18
  sh3?: Float32Array;
@@ -25,6 +32,8 @@ export declare class PBMGaussianSplattingObject extends THREE.Points<THREE.Buffe
25
32
  usedSHDegree: number;
26
33
  gsViewLayerKey: string;
27
34
  gsClippers: readonly PBMClipperParameter[];
35
+ /** 加载时在 worker 中预 pack 好的 GPU 数据(8 uint32/splat) */
36
+ packedData: Uint32Array;
28
37
  private _selected;
29
38
  private _boundingBox;
30
39
  lastMatrixWorld: THREE.Matrix4 | null;
@@ -41,7 +50,24 @@ export declare class PBMGaussianSplattingObject extends THREE.Points<THREE.Buffe
41
50
  reattach(positions: ArrayBufferLike, rotations: ArrayBufferLike, scales: ArrayBufferLike, colors: ArrayBufferLike, selection: ArrayBufferLike): void;
42
51
  get selected(): boolean;
43
52
  set selected(selected: boolean);
53
+ /**
54
+ * 对象空间(未经任何变换)的 AABB,由 packedData / positions 的原始坐标构建。
55
+ *
56
+ * 直接返回内部实例以避免每次访问都分配,**调用方不得修改**。
57
+ * 与 `boundingBox` 的区别:后者已把 `position` 与 `scale` 烘进结果(但忽略旋转与父级变换),
58
+ * 因此不能再与 `matrixWorld` 组合使用;本 getter 才是可配合 `matrixWorld` 求世界空间角点的那一个,
59
+ * GPU 排序的 Distance_Range 计算依赖它。
60
+ */
61
+ get objectSpaceBoundingBox(): THREE.Box3;
44
62
  get boundingBox(): THREE.Box3;
63
+ /**
64
+ * 从 packedData 即时解码第 index 个 splat 的 3D 协方差矩阵(half-precision → float)。
65
+ * 用于 BVH 法线拟合——只在命中点按需解码。
66
+ * packedData texel1 布局:[4]=cov00|cov01(half2), [5]=cov02|cov11(half2), [6]=cov12|cov22(half2)。
67
+ * pack 端遵循 Cov4_Convention(协方差整体 ×4),此处除以 4 还原真实 Σ。
68
+ * 返回 6 个上三角分量 [s00, s01, s02, s11, s12, s22],数据不足时返回 null。
69
+ */
70
+ decodeCov3D(index: number): Float32Array | null;
45
71
  dispose(): void;
46
72
  raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
47
73
  }
@@ -1,73 +1,138 @@
1
1
  import * as THREE from 'three/webgpu';
2
- import { RenderData } from '../../gaussian-splatting/util/renderData';
3
2
  import { PBMGaussianSplattingNodeMaterial } from '../materials/pbmGaussianSplattingNodeMaterial';
4
3
  /**
5
4
  * 3DGS 渲染 Mesh(WebGPU / TSL 版)
6
5
  *
7
- * 与 five (WebGL2) 版本同构:
8
- * - 单一四边形几何 + splatIndex 实例属性(排序结果驱动)
9
- * - 双 slot(active/pending)+ 池复用纹理
10
- * - SortWorker 处理 radix-64K 排序
6
+ * 主循环用四个协作者准备数据:
7
+ * - `SplatAssembler`:per-object region 增量 diff + **CPU 拼装** 大数据纹理
8
+ * (把各对象 packedData 紧凑拷进 CPU 缓冲,写 transformIndex/layerIndex 到 texel1.w;
9
+ * 经 THREE.DataTexture 上传供主材质采样)
10
+ * - `TransformStore`:细粒度 transform 更新(9 texel/对象,含 CPU 预算 inverse)+ 排序用 20 float/对象
11
+ * - `LayerRegistry`:layerKey → 稳定 layerIndex
12
+ * - `SHStore`:按对象顺序连续写入 SH 纹理
11
13
  *
12
- * 唯一差异:将 `THREE.ShaderMaterial` 换成 `PBMGaussianSplattingNodeMaterial`(TSL)。
13
- * 所有「uniform.value = …」赋值改为「material.<field> = …」。
14
- * NUM_GS_CLIPPERS / NUM_GS_LAYERS / MAX_SH_DEGREE 的变更通过 `customProgramCacheKey`
15
- * + `material.needsUpdate = true` 触发管线重建。
14
+ * 布局三一致(Requirements 13.1 / 13.2):`SplatAssembler.regionList` 顺序 ≡ `TransformStore`
15
+ * 索引顺序 ≡ `SHStore` 写入顺序。四个协作者都从**同一有序 `objects` 数组、同一顺序**同步,
16
+ * 因此不会产生 transformIndex / SH 错位;`onBeforeRender` 中另加防御性一致性断言兜底。
17
+ *
18
+ * 排序:本类**不再自己排序**。排序、绘制索引来源与绘制实例数一律经 `GSplatPipeline` 抽象基类
19
+ * 消费(Requirement 10.2):
20
+ * - `RASTER_CPU_SORT`(`CpuSortPipeline`):wasm worker 排序 + Reorder_CPU,索引来自
21
+ * `splatIndex` 实例属性;
22
+ * - `RASTER_GPU_SORT`(`GpuSortPipeline`):GPU radix sort,索引来自 R32UI Order_Texture。
23
+ * 「本帧是否需要排序」由 `SortThrottle` 判定(相机小平移 / 小角度 / min-interval 门),
24
+ * 与管线实现无关,两条路径的节流行为完全一致。管线按 `pipelineMode` 解析结果整体切换,
25
+ * 本类不引用 Sort_Worker、排序模块或任何 WebGPU 资源。
26
+ *
27
+ * 大数据纹理:
28
+ * - `SplatAssembler` 在对象集合变化时在 **CPU** 端把各对象 packedData 紧凑拼进一张
29
+ * `rgba32uint` 大纹理缓冲(2 texel/splat,texel1.w = transformIndex<<16|layerIndex),
30
+ * 经 `THREE.DataTexture` 上传由主材质 `textureLoad` 采样(见 `assembler.dataTexture`)。
31
+ * 仅在 tile 集合变化时组装一次;相机移动帧不重组装。
32
+ * - per-splat 的 transformIndicesTexture / layerIndicesTexture 已折叠进大纹理 texel1.w,不再单独产出;
33
+ * `transformsTexture` 与 `shTexture` 由对应 store 直接提供,布局与既有材质一致。
16
34
  */
17
35
  declare class PBMGaussianSplattingRenderMesh extends THREE.Mesh<THREE.InstancedBufferGeometry, PBMGaussianSplattingNodeMaterial> {
18
36
  private gsSceneState;
19
- renderData: RenderData | null;
20
37
  needsRender: boolean;
21
- private sortWorker;
22
- private depthIndex;
23
- private splatIndexCapacity;
24
- private activeSlot;
25
- private pendingSlot;
26
- private rebuildGeneration;
38
+ private assembler;
39
+ private transformStore;
40
+ private layerRegistry;
41
+ private shStore;
42
+ /**
43
+ * 当前生效的排序管线。由 `syncPipelineMode` 按 Current_Pipeline_Mode 创建 / 重建,
44
+ * 尚未创建(首帧之前)时为 null。
45
+ */
46
+ private pipeline;
47
+ /** 排序节流器:判定本 Render_Frame 是否需要调用 `pipeline.requestSort`。 */
48
+ private throttle;
49
+ /** Requested_Pipeline_Mode(外部经 `pipelineMode` 写入,下一帧生效)。 */
50
+ private _requestedPipelineMode;
51
+ /**
52
+ * Current_Pipeline_Mode(`resolvePipelineMode` 的解析结果,永不为 `AUTO`)。
53
+ * 初值取 CPU 排序:管线未创建前对外报告最保守的取值。
54
+ */
55
+ private _activePipelineMode;
56
+ /**
57
+ * 创建当前 `pipeline` 时所用的渲染器。渲染器只能从 `onBeforeRender` 拿到,因此管线在首帧
58
+ * 才创建;若本 Mesh 被挂到另一个渲染器上(renderer 身份变化),管线持有的 device 资源不再
59
+ * 有效,需连同模式一起重建。
60
+ */
61
+ private _pipelineRenderer;
62
+ /**
63
+ * 传给管线的每帧参数。**跨帧复用同一个对象**(Requirement 10.7),每帧填字段后传入,
64
+ * 不在渲染循环里新建。`camera` 由每帧填充,构造时无值。
65
+ */
66
+ private _frameParams;
67
+ /**
68
+ * 大纹理待组装标记:tile 集合变化(rebuildScene)时置 true;onBeforeRender 中即调用
69
+ * `assembler.assemble()`(CPU 拼装 + DataTexture 上传)并清除。相机移动帧不置位(不重组装)。
70
+ */
71
+ private assemblePending;
27
72
  private forceClipperUniformRefresh;
28
- private incrementalUpdateInFlight;
29
- private freeSlotPool;
30
- private _scratchViewProj;
31
- private dataTexture;
32
- private transformsTexture;
33
- private transformIndicesTexture;
34
- private layerIndicesTexture;
35
- private shTexture;
36
73
  private usedSHDegree;
37
74
  constructor();
38
- private ensureSplatIndexCapacity;
39
- private getExpandedCapacity;
75
+ /**
76
+ * Requested_Pipeline_Mode(`GSPLAT_PIPELINE_*`)。写入后在**下一帧**由
77
+ * `syncPipelineMode` 解析并按需重建管线,便于开发期在同场景下对比两条管线
78
+ * (Requirement 13.2)。
79
+ */
80
+ get pipelineMode(): number;
81
+ set pipelineMode(value: number);
82
+ /** 实际生效的 Current_Pipeline_Mode(解析后的结果,永不为 `AUTO`)。 */
83
+ get currentPipelineMode(): number;
84
+ /** 平移增量阈值(世界单位):超过才重排。 */
85
+ get sortCameraDistance(): number;
86
+ set sortCameraDistance(value: number);
87
+ /** 姿态相似度阈值(|quat 点积|):低于才重排(0.99 ≈ 约 16° 内不重排)。 */
88
+ get sortCameraCoorient(): number;
89
+ set sortCameraCoorient(value: number);
90
+ /** 最小重排间隔(ms):即使脏也不超过此频率,0=不限。 */
91
+ get sortMinIntervalMs(): number;
92
+ set sortMinIntervalMs(value: number);
40
93
  private createGeometry;
41
94
  private createMaterial;
42
95
  private createDefaultLayerClipperRanges;
43
96
  private createDefaultClipperMatrices;
44
- private createTextures;
45
- private createSHTexture;
46
- /**
47
- * 设置球谐阶数
48
- * @param degree SH 阶数 (0, 1, 或 2)
49
- */
50
- private setMaxShDegree;
51
- private bindSlotTextures;
52
- private disposeSlot;
53
- private recycleSlot;
54
- private disposeTextures;
55
- private applyDepthIndex;
56
- private swapPendingToActive;
57
- private createSlot;
58
- private updateSlotTextures;
59
- private postSortData;
60
- private sortDataRebuilding;
61
- private requestSort;
62
- private syncTransformsForSlot;
63
97
  private collectObjects;
64
98
  private isSceneNeedsRebuild;
65
99
  private getClipperHash;
66
100
  private updateClipperCounts;
101
+ /**
102
+ * clipper uniforms 直接来自 `LayerRegistry`(不再依赖 RenderData)。layerKey 取值与
103
+ * LayerRegistry 一致(`gsViewLayerKey || uuid`),保证 layerIndex ↔ clipper 区间对齐。
104
+ */
67
105
  private updateClipperUniforms;
68
- private startPendingRebuild;
69
- private tryStartIncrementalUpdate;
70
- onBeforeRender: (_renderer: any, scene: THREE.Scene, camera: THREE.Camera, ..._rest: any[]) => void;
106
+ /**
107
+ * 场景变化时按**同一有序 objects**依次同步四个协作者,保证布局三一致:
108
+ * layerRegistry / transformStore 先行(assembler 的 resolveIndices 依赖二者的 indexOf/layerIndexOf),
109
+ * 再 assembler.sync(增量 diff + 连续 start 偏移,不触碰 GPU)→ shStore.sync;大纹理组装
110
+ * 延迟到 onBeforeRender 中的 assembler.assemble()。
111
+ */
112
+ private rebuildScene;
113
+ /**
114
+ * 防御性断言:regionList 顺序 ≡ objects 顺序 ≡ TransformStore 索引顺序(Requirements 13.1/13.2)。
115
+ * 四者由 rebuildScene 从同一 objects 同序同步,正常情况下恒成立;不成立即视为错误状态并告警。
116
+ */
117
+ private assertLayoutConsistency;
118
+ /** 把 store 产出的纹理与 SH 阶数同步到材质。 */
119
+ private syncMaterialTextures;
120
+ /**
121
+ * 每帧一次的 Pipeline_Mode 检查与管线切换(Requirement 8.2)。
122
+ *
123
+ * 之所以每帧检查而非首帧一次性初始化:`pipelineMode` 的运行时修改要在下一帧生效
124
+ * (Requirement 8.6 / 13.2),且 `totalPoints` 增长导致 limits 越界、或 GPU 管线运行期失效
125
+ * (compute pipeline 创建失败 / device lost,经 `unusable` 汇聚)时都要能自动降级。
126
+ * 所有降级情形统一归结为「`resolvePipelineMode` 返回 `RASTER_CPU_SORT`」后由本方法完成切换
127
+ * (Requirement 15.4),因此不存在第二条降级代码路径。
128
+ *
129
+ * 模式未变且管线已就绪时只做一次整数比较即返回,开销可忽略(Requirement 8.10)。
130
+ *
131
+ * @param renderer 本帧渲染器(由 `onBeforeRender` 传入,是取 `GPUDevice` 的唯一入口)
132
+ * @param totalPoints 当前布局的 Total_Points,用于按实际规模检查 limits
133
+ */
134
+ private syncPipelineMode;
135
+ onBeforeRender: (renderer: any, scene: THREE.Scene, camera: THREE.Camera, ..._rest: any[]) => void;
71
136
  dispose(): void;
72
137
  }
73
138
  export { PBMGaussianSplattingRenderMesh };
@@ -60,7 +60,6 @@ export declare class PBMPointCloud extends THREE.Mesh<THREE.InstancedBufferGeome
60
60
  outlineGain: number;
61
61
  distanceGain: number;
62
62
  useAddBlend: boolean;
63
- vertexMarks: boolean;
64
63
  clippers: readonly PBMClipperParameter[];
65
64
  readonly modelBoundingMin: THREE.Vector3;
66
65
  readonly modelBoundingMax: THREE.Vector3;
@@ -42,7 +42,7 @@ export declare class PBMPointCloudObject extends THREE.Object3D {
42
42
  outlineGain: number;
43
43
  distanceGain: number;
44
44
  useAddBlend: boolean;
45
- vertexMarks: boolean;
45
+ vertexMarks: boolean | number;
46
46
  clippers: readonly PBMClipperParameter[];
47
47
  readonly modelBoundingMin: THREE.Vector3;
48
48
  readonly modelBoundingMax: THREE.Vector3;
@@ -1,14 +1,15 @@
1
1
  import * as THREE from 'three/webgpu';
2
- import { type PBMPanoPicture, type PBMPanoDepth, type PBMRefinedScreen, type PBMTransition, type PBMFloorStyle, type PBMColorStyle, type PBMClipperParameter, type PBMPanoFilter, type PBMPointShape, type PBMPointSize, type PBMPointBack } from './materials/pbmMaterial';
2
+ import { type PBMPanoPicture, type PBMPanoDepth, type PBMRefinedScreen, type PBMTransition, type PBMFloorStyle, type PBMRoofStyle, type PBMColorStyle, type PBMClipperParameter, type PBMPanoFilter, type PBMPointShape, type PBMPointSize, type PBMPointBack, type PBMCustomNode } from './materials/pbmMaterial';
3
3
  import type { TileRequestOrder } from './tile3d/types';
4
4
  import type { Camera } from '../core/camera';
5
5
  export interface ParameterMaterialValue {
6
6
  /**
7
- * 是否生效标注
8
- * 开启后,模型顶点上会预置 `_feature_id_rsmask` 标记。
9
- * _feature_id_rsmask=1,在俯视等特定视角下,引擎会自动隐藏被标记的顶点对应的 Mesh,从而实现“开盖”效果,让室内布局观测更加清晰、观感更好。
7
+ * 是否生效标注(按位掩码 PBMVertexMarkFlag)
8
+ * 开启后,模型顶点上会预置 `_feature_id_rsmask` 标记,可按位独立控制开盖(roof)与隐藏(hidden)。
9
+ * _feature_id_rsmask=1 对应 roof,在俯视等特定视角下引擎会自动隐藏被标记的顶点对应的 Mesh,从而实现“开盖”效果,让室内布局观测更加清晰、观感更好。
10
+ * 兼容旧的 boolean:true=全开(all),false=全关(none)。
10
11
  */
11
- vertexMarks: boolean;
12
+ vertexMarks: boolean | number;
12
13
  /** 起始点 */
13
14
  pano0: PBMPanoPicture | null;
14
15
  /** 结束点 */
@@ -31,6 +32,8 @@ export interface ParameterMaterialValue {
31
32
  opacity: number;
32
33
  /** 楼层样式 */
33
34
  floorStyle: PBMFloorStyle;
35
+ /** 屋顶样式(仅在 vertexMarks 为 true 时生效;AUTO 按视角渐切,HIDE 始终隐藏) */
36
+ roofStyle: PBMRoofStyle;
34
37
  /** 颜色样式 */
35
38
  colorStyle: PBMColorStyle;
36
39
  /** 模型颜色*/
@@ -78,6 +81,13 @@ export interface ParameterMaterialValue {
78
81
  /** 3dgs球谐阶数*/
79
82
  gaussianSplattingSHDegree: number;
80
83
  maxDisplayBoost: number;
84
+ /** 自定义节点列表(TSL Node 级别的材质扩展) */
85
+ customNodes: readonly PBMCustomNode[];
86
+ /**
87
+ * 自定义节点 uniform 的脏计数器(内部维护,无需手动设置)。
88
+ * 任一 customNode emit('update') 时自动递增,用于触发材质刷新。
89
+ */
90
+ customNodesVersion: number;
81
91
  }
82
92
  export interface ParameterTilesetValue {
83
93
  /** 模型显示最小细化层级 */
@@ -130,6 +140,11 @@ export declare class Parameter {
130
140
  resolveValue<K extends keyof ParameterValue>(name: K, ...values: Partial<ParameterValue>[]): ParameterValue[K];
131
141
  resolveValue(...baseValues: Partial<ParameterValue>[]): ResolvedParameterValue;
132
142
  private assignValue;
143
+ /**
144
+ * 递增 customNodesVersion 并 bump 参数版本,促使模型重新下发参数、
145
+ * 令 NodeMaterialObserver 检测到 customNodesVersion 变化而刷新(上传 customNode 的 uniform)。
146
+ */
147
+ private bumpCustomNodesVersion;
133
148
  set<T extends keyof ParameterValue>(name: T, value: ParameterValue[T]): this;
134
149
  set(values: Partial<ParameterValue>): this;
135
150
  reset(...names: (keyof ParameterValue)[]): this;
@@ -73,6 +73,8 @@ export declare class Tile3D extends THREE.Object3D {
73
73
  loadContent(tile: Tile): Promise<void>;
74
74
  unloadContent(tile: Tile): Promise<void>;
75
75
  loadAllTilesets(): Promise<void>;
76
+ loadTrajectory(trajectory: Trajectory): Promise<void>;
77
+ unloadTrajectory(trajectory: Trajectory): Promise<void>;
76
78
  intersectRaycaster(raycaster: THREE.Raycaster, target?: Intersection[]): Intersection[];
77
79
  update(renderer: THREE.WebGPURenderer, camera: Camera, modelScene: ModelScene, model: Model): boolean;
78
80
  dispose(): void;
@@ -12,6 +12,11 @@ export interface TilesetOptions {
12
12
  onTileLoad: (tile: Tile) => any;
13
13
  onTileUnload: (tile: Tile) => any;
14
14
  onTileError: (tile: Tile, error: Error) => any;
15
+ trajectoryLoader: (trajectory: Trajectory) => Promise<void>;
16
+ trajectoryUnloader: (trajectory: Trajectory) => Promise<void>;
17
+ onTrajectoryLoad: (trajectory: Trajectory) => any;
18
+ onTrajectoryUnload: (trajectory: Trajectory) => any;
19
+ onTrajectoryError: (trajectory: Trajectory, error: Error) => any;
15
20
  }
16
21
  export declare class Tileset {
17
22
  asset: {
@@ -0,0 +1,53 @@
1
+ import * as THREE from 'three/webgpu';
2
+ import type { Trajectory } from './trajectory';
3
+ import { Fetcher } from '../../utils/ajax';
4
+ /**
5
+ * 轨迹的两套自定义着色器原为 GLSL `ShaderMaterial`,WebGPURenderer 只支持 NodeMaterial
6
+ * (其它材质类型会被退化成空白 NodeMaterial),这里按 GLSL 逐层翻译为 TSL:
7
+ *
8
+ * 管道 TRAJECTOR_PIPE:
9
+ * vertex: `vUv = uv;` + `transformed += normalize(objectNormal) * displacementScalar`
10
+ * fragment: `if (mod(abs(vUv.x * totalLength + dashOffset), dashSize.x + dashSize.y) > dashSize.x) discard;`
11
+ * `vec4 diffuseColor = vec4(mix(diffuse, diffuse2, vUv.x), opacity);`
12
+ * 圆球 TRAJECTOR_SPHERE:
13
+ * vertex: `transformed += normalize(objectNormal) * displacementScalar`
14
+ * fragment: `vec4 diffuseColor = vec4(diffuse, opacity);`
15
+ *
16
+ * 说明:
17
+ * - 原 shader 里的 `<tonemapping_fragment>` / `<colorspace_fragment>` 由渲染器的 Output 通道统一处理
18
+ * (WebGPURenderer 把 tone mapping 与输出色彩空间放到独立的输出 pass),<fog_fragment> /
19
+ * `<premultiplied_alpha_fragment>` 对应 NodeMaterial 的 `fog` / `premultipliedAlpha` 属性(默认 fog 生效)。
20
+ * - 颜色不再调用 `convertSRGBToLinear()`:r152+ 的 `new THREE.Color(hex)` 已经按 sRGB 解释并转到线性工作空间,
21
+ * 再转换一次会变暗。
22
+ * - `uniform()` 生成的 uniform 节点保留 `.value` 读写,所以材质上挂的 `uniforms` 与 GLSL 版本用法一致
23
+ * (见 trajectory-node.ts 的 dashOffset 动画)。
24
+ */
25
+ declare function createPipeUniforms(): {
26
+ diffuse: THREE.UniformNode<"color", THREE.Color>;
27
+ diffuse2: THREE.UniformNode<"color", THREE.Color>;
28
+ opacity: THREE.UniformNode<"float", number>;
29
+ displacementScalar: THREE.UniformNode<"float", number>;
30
+ totalLength: THREE.UniformNode<"float", number>;
31
+ dashSize: THREE.UniformNode<"vec2", THREE.Vector2>;
32
+ dashOffset: THREE.UniformNode<"float", number>;
33
+ };
34
+ declare function createSphereUniforms(): {
35
+ diffuse: THREE.UniformNode<"color", THREE.Color>;
36
+ opacity: THREE.UniformNode<"float", number>;
37
+ displacementScalar: THREE.UniformNode<"float", number>;
38
+ };
39
+ export type TrajectoryPipeUniforms = ReturnType<typeof createPipeUniforms>;
40
+ export type TrajectorySphereUniforms = ReturnType<typeof createSphereUniforms>;
41
+ export type TrajectoryPipeMaterial = THREE.NodeMaterial & {
42
+ uniforms: TrajectoryPipeUniforms;
43
+ };
44
+ export type TrajectorySphereMaterial = THREE.NodeMaterial & {
45
+ uniforms: TrajectorySphereUniforms;
46
+ };
47
+ export declare function loadTrajectory<T extends Trajectory>(trajectory: T, options: {
48
+ fetcher: Fetcher;
49
+ search?: string;
50
+ renderer?: THREE.WebGPURenderer;
51
+ }): Promise<T>;
52
+ export declare function unloadTrajectory(trajectory: Trajectory): void;
53
+ export {};
@@ -0,0 +1,46 @@
1
+ /** 光栅参数(像素直径):≤ SMALL 单线程绘制,≤ LARGE 按点协作,更大按 8×8 子块协作 */
2
+ export declare const RASTER_CONFIG: {
3
+ readonly smallThreshold: 8;
4
+ readonly largeThreshold: 16;
5
+ /** 桶容量 = clamp(总点数 × ratio, min, max) */
6
+ readonly bucketRatio: 0.125;
7
+ readonly bucketMin: 16384;
8
+ readonly bucketMax: number;
9
+ /** 子块容量 = clamp(桶容量 × 169 × ratio, min, max) */
10
+ readonly subBlockRatio: 0.02;
11
+ readonly subBlockMin: number;
12
+ readonly subBlockMax: number;
13
+ };
14
+ /**
15
+ * 分桶协作光栅的 GPU 资源与命令编码。
16
+ * classify 按点尺寸分类:Small 直接绘制,Medium / Large 入桶;
17
+ * 随后 coop_medium 每个 workgroup 绘制一个点,coop_large 每个 workgroup 绘制一个 8×8 子块。
18
+ */
19
+ export declare class BinnedCore {
20
+ private readonly device;
21
+ private readonly frameUniformBuffer;
22
+ private readonly pipes;
23
+ private readonly counters;
24
+ private readonly args;
25
+ private buckets;
26
+ private subBlocks;
27
+ private bucketCap;
28
+ private subBlockCap;
29
+ private classifyBG;
30
+ private argsBG;
31
+ private coopBG;
32
+ private boundFramebuffer;
33
+ constructor(device: GPUDevice, tileBindGroupLayout: GPUBindGroupLayout, frameUniformBuffer: GPUBuffer);
34
+ get bucketCapacity(): number;
35
+ get subBlockCapacity(): number;
36
+ /** 每帧编码前调用:按点数调整容量(只增不减),并保证 bind group 引用当前 framebuffer */
37
+ prepare(totalPoints: number, framebuffer: GPUBuffer): void;
38
+ encodeClearCounters(encoder: GPUCommandEncoder): void;
39
+ /** 一个 tile 的分类 dispatch */
40
+ encodeClassify(pass: GPUComputePassEncoder, tileBindGroup: GPUBindGroup, pointCount: number): void;
41
+ /** 所有 tile 分类完成后:写 indirect 参数,再协作绘制 Medium / Large 点 */
42
+ encodeCoop(pass: GPUComputePassEncoder): void;
43
+ dispose(): void;
44
+ private allocate;
45
+ private createBindGroups;
46
+ }
@@ -0,0 +1,10 @@
1
+ export interface BinnedPipelines {
2
+ readonly classifyBGL: GPUBindGroupLayout;
3
+ readonly argsBGL: GPUBindGroupLayout;
4
+ readonly coopBGL: GPUBindGroupLayout;
5
+ readonly classifier: GPUComputePipeline;
6
+ readonly argsBuilder: GPUComputePipeline;
7
+ readonly coopMedium: GPUComputePipeline;
8
+ readonly coopLarge: GPUComputePipeline;
9
+ }
10
+ export declare function createBinnedPipelines(device: GPUDevice, tileBindGroupLayout: GPUBindGroupLayout): BinnedPipelines;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -3,12 +3,14 @@ import type { PBMPointCloud } from '../../model/objects/pbmPointCloud';
3
3
  /**
4
4
  * 基于 Compute Shader 的点云渲染器
5
5
  *
6
- * 渲染管线:清除 framebuffer → 计算着色器计算点云 → 全屏四边形显示。
6
+ * 渲染管线:清除 framebuffer → 分桶协作光栅点云 → 全屏四边形显示。
7
7
  * 从调用方接收 GPUDevice(不自行请求 adapter/device)。
8
8
  */
9
9
  export declare class PointCloudComputeRenderer {
10
10
  private device;
11
11
  private format;
12
+ /** 显示 pipeline 的 color target 格式,需与目标 RT 的 GPU 纹理格式一致 */
13
+ get colorFormat(): GPUTextureFormat;
12
14
  private width;
13
15
  private height;
14
16
  private pointBuffer;
@@ -18,44 +20,12 @@ export declare class PointCloudComputeRenderer {
18
20
  private frameUniformBuffer;
19
21
  private displayParamsBuffer;
20
22
  private clearPipeline;
21
- private rasterizePipeline;
22
23
  private fullscreenQuadPipeline;
24
+ private tileBindGroupLayout;
23
25
  private clearBindGroup;
24
26
  private rasterizeBindGroup;
25
27
  private displayBindGroup;
26
28
  private pointCount;
27
- private static readonly FRAME_UNIFORM_SIZE;
28
- private static readonly TILE_UNIFORM_SIZE;
29
- private static readonly OFFSET_VIEW_PROJ;
30
- private static readonly OFFSET_SCREEN_WIDTH;
31
- private static readonly OFFSET_SCREEN_HEIGHT;
32
- private static readonly OFFSET_POINT_SIZE_MODE;
33
- /** pointAttenPack: mix(-proj[2][3]), scale(2/proj[1][1]), pad, pad */
34
- private static readonly OFFSET_POINT_ATTEN_PACK;
35
- /** viewZRow: viewMatrix 第三行,用于 mvPosition.z */
36
- private static readonly OFFSET_VIEW_Z_ROW;
37
- private static readonly OFFSET_POINT_SCALE;
38
- private static readonly OFFSET_POINT_MIN_PIXEL;
39
- private static readonly OFFSET_POINT_MAX_PIXEL;
40
- private static readonly OFFSET_PIXEL_RATIO;
41
- private static readonly OFFSET_RESOLUTION_Y;
42
- private static readonly OFFSET_POINT_PIXEL_HARD_MAX;
43
- private static readonly OFFSET_POINT_SHAPE;
44
- /** 与 rasterize.wgsl FrameUniforms 连续布局一致(无 per-tile model/bbox) */
45
- private static readonly OFFSET_CAMERA_WORLD;
46
- private static readonly OFFSET_CAMERA_FORWARD;
47
- private static readonly OFFSET_CONSTANT_COLOR;
48
- private static readonly OFFSET_COLOR_GAIN;
49
- private static readonly OFFSET_STYLE_PACK;
50
- private static readonly OFFSET_FLOOR_PACK;
51
- private static readonly OFFSET_CLIP0_INV;
52
- private static readonly OFFSET_CLIP0_META;
53
- private static readonly OFFSET_CLIP1_INV;
54
- private static readonly OFFSET_CLIP1_META;
55
- private static readonly OFFSET_TILE_MODEL;
56
- private static readonly OFFSET_TILE_BBOX_MIN;
57
- private static readonly OFFSET_TILE_BBOX_MAX;
58
- private static readonly OFFSET_TILE_PACK;
59
29
  private readonly frameUniformScratch;
60
30
  private readonly tileUniformScratch;
61
31
  private readonly pointSizeUniformState;
@@ -64,8 +34,10 @@ export declare class PointCloudComputeRenderer {
64
34
  private gradientSampler;
65
35
  private fullscreenQuadPipelineAdditive;
66
36
  private ready;
67
- /** 同一 compute pass 内避免对 rasterize 管线重复 setPipeline(多 tile 连续 dispatch 时略减开销) */
68
- private lastBoundComputePipeline;
37
+ private binnedCore;
38
+ /** 本帧 viewProj,用于计算 tile mvp */
39
+ private readonly frameViewProj;
40
+ private readonly tileMvpScratch;
69
41
  /**
70
42
  * tile 级 GPU 资源缓存:用强引用 Map 而非 WeakMap,配合 PBMPointCloud.dispose
71
43
  * 派发的 'dispose' 事件主动销毁 buffer,确保 tile 卸载后内存立即归还。
@@ -93,6 +65,8 @@ export declare class PointCloudComputeRenderer {
93
65
  }, rasterResources?: {
94
66
  gradientView: GPUTextureView;
95
67
  }): void;
68
+ /** 每帧编码 tile 之前调用:按本帧总点数准备分桶资源 */
69
+ prepareFrame(totalPointCount: number): void;
96
70
  /**
97
71
  * 每帧调用一次:写入共享 frame uniform(viewProj、屏幕、点大小、相机、材质、裁切)。
98
72
  */
@@ -116,6 +90,8 @@ export declare class PointCloudComputeRenderer {
116
90
  /** 与 five vertex.glsl 中 ATTENUATION 分支一致,避免透视/正交 matrixLerp 时 clip.w 失真。 */
117
91
  private writePointAttenuationUniforms;
118
92
  private writeFrameUniformsDataView;
93
+ /** 写入尺寸分类阈值与桶容量 */
94
+ private writeRasterUniforms;
119
95
  private writeTileUniformsDataView;
120
96
  /**
121
97
  * 调整 framebuffer 大小并更新屏幕尺寸 uniform。
@@ -124,12 +100,12 @@ export declare class PointCloudComputeRenderer {
124
100
  resize(width: number, height: number): void;
125
101
  /** 写入 clear:可并入同一 compute pass,与其它 rasterize dispatch 一起提交。 */
126
102
  encodeFramebufferClear(computePass: GPUComputePassEncoder): void;
127
- /** 按当前 bindGroup / pointCount 追加一次 rasterize dispatch(需先 setPointCloud + writeTileUniform)。 */
103
+ /** 为当前 tile 追加一次分类 dispatch(需先 setPointCloud + writeTileUniform)。 */
128
104
  encodeRasterize(computePass: GPUComputePassEncoder): void;
129
105
  encodeFramebufferDisplay(renderPass: GPURenderPassEncoder, options?: {
130
106
  additive?: boolean;
131
107
  }): void;
132
- /** 单帧:clear + 多次 rasterize + display,一次 queue.submit(Potree 等多块场景同款思路)。 */
108
+ /** 单帧:clear + 各 tile 分类 + 协作光栅 + display,一次 queue.submit。 */
133
109
  submitMergedPointCloudFrame(colorTextureView: GPUTextureView, depthTextureView: GPUTextureView, rasterizeSteps: (computePass: GPUComputePassEncoder) => void, options?: {
134
110
  clear?: boolean;
135
111
  display?: boolean;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;