@woosh/meep-engine 3.32.0 → 3.34.0

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 (465) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/editor/Editor.d.ts.map +1 -1
  3. package/editor/Editor.js +0 -3
  4. package/editor/ecs/component/prototypeObjectEditor.js +1 -165
  5. package/editor/ecs/component/registerBasicTypeEditors.d.ts.map +1 -1
  6. package/editor/ecs/component/registerBasicTypeEditors.js +0 -5
  7. package/editor/ecs/component/registerEngineComponentEditors.d.ts.map +1 -1
  8. package/editor/ecs/component/registerEngineComponentEditors.js +0 -20
  9. package/editor/process/SymbolicDisplayProcess.d.ts.map +1 -1
  10. package/editor/process/SymbolicDisplayProcess.js +100 -106
  11. package/editor/prototypeEditorShell.d.ts.map +1 -1
  12. package/editor/prototypeEditorShell.js +190 -186
  13. package/editor/templates/entity_templates.d.ts.map +1 -1
  14. package/editor/templates/entity_templates.js +10 -27
  15. package/editor/view/makeEntityDecorators.js +2 -2
  16. package/package.json +1 -1
  17. package/src/core/collection/table/RowFirstTable.d.ts +8 -0
  18. package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
  19. package/src/core/collection/table/RowFirstTable.js +40 -11
  20. package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.d.ts +3 -3
  21. package/src/core/geom/3d/aabb/MovingBoundingBox.d.ts.map +1 -0
  22. package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.js +5 -5
  23. package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts +3 -0
  24. package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts.map +1 -0
  25. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGBA_LUT_HEATMAP_IR.js +1 -1
  26. package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts +6 -0
  27. package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts.map +1 -0
  28. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_INFERNO.js +1 -1
  29. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.d.ts +1 -1
  30. package/src/core/math/lookup/RGB_LUT_TURBO.d.ts.map +1 -0
  31. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.js +1 -1
  32. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.d.ts +1 -1
  33. package/src/core/math/lookup/RGB_LUT_VIRIDIS.d.ts.map +1 -0
  34. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.js +1 -1
  35. package/src/engine/animation/AnimatedActions.d.ts.map +1 -1
  36. package/src/engine/animation/AnimatedActions.js +2 -4
  37. package/src/engine/animation/AnimationUtils.d.ts +1 -17
  38. package/src/engine/animation/AnimationUtils.d.ts.map +1 -1
  39. package/src/engine/animation/AnimationUtils.js +138 -246
  40. package/src/engine/ecs/EntityManager.d.ts +1 -1
  41. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  42. package/src/engine/ecs/EntityManager.js +2 -2
  43. package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +268 -275
  44. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
  45. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +0 -10
  46. package/src/engine/graphics/geometry/distribute_points_on_indexed_triangles.d.ts.map +1 -0
  47. package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.js +3 -3
  48. package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.d.ts +1 -1
  49. package/src/engine/graphics/texture/sampler/lut_to_sampler.d.ts.map +1 -0
  50. package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.js +1 -1
  51. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +0 -3
  52. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  53. package/src/engine/graphics3/GPUParticleEmitterSystem.js +0 -3
  54. package/src/engine/network/NetworkSession.d.ts +1 -1
  55. package/src/engine/network/NetworkSession.js +1 -1
  56. package/src/engine/physics/cloth/MEASUREMENTS.md +115 -0
  57. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
  58. package/src/engine/physics/cloth/solver/cloth_contact_find.js +2 -0
  59. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +9 -0
  60. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
  61. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +30 -7
  62. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  63. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
  64. package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +12 -2
  65. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +11 -2
  66. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
  67. package/src/engine/sound/ecs/audio/LiveEmitterSet.js +14 -7
  68. package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts +6 -15
  69. package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts.map +1 -1
  70. package/src/engine/sound/ecs/audio/SpatialAudioIndex.js +161 -174
  71. package/src/shade/device/mock/SoftwareGPUBuffer.d.ts +5 -3
  72. package/src/shade/device/mock/SoftwareGPUBuffer.d.ts.map +1 -1
  73. package/src/shade/device/mock/SoftwareGPUBuffer.js +32 -3
  74. package/src/shade/device/mock/SoftwareGPURenderPassEncoder.d.ts +20 -3
  75. package/src/shade/device/mock/SoftwareGPURenderPassEncoder.d.ts.map +1 -1
  76. package/src/shade/device/mock/SoftwareGPURenderPassEncoder.js +21 -3
  77. package/src/shade/playground/caldera/main.js +73 -60
  78. package/src/shade/playground/vgeo_runtime/main.js +25 -77
  79. package/src/shade/playground/vgeo_scene/main.js +2231 -2217
  80. package/src/shade/renderer/GraphicsContext.d.ts +18 -0
  81. package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
  82. package/src/shade/renderer/GraphicsContext.js +63 -40
  83. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  84. package/src/shade/renderer/Renderer.js +38 -0
  85. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +8 -0
  86. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  87. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +21 -0
  88. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.d.ts +6 -5
  89. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.d.ts.map +1 -1
  90. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.js +241 -240
  91. package/src/shade/renderer/buffer/GPUBufferStagingAllocator.d.ts +51 -0
  92. package/src/shade/renderer/buffer/GPUBufferStagingAllocator.d.ts.map +1 -1
  93. package/src/shade/renderer/buffer/GPUBufferStagingAllocator.js +214 -28
  94. package/src/shade/renderer/dynamic/DynamicMeshAVBOITChannel.d.ts +2 -1
  95. package/src/shade/renderer/dynamic/DynamicMeshAVBOITChannel.d.ts.map +1 -1
  96. package/src/shade/renderer/dynamic/DynamicMeshAVBOITChannel.js +19 -17
  97. package/src/shade/renderer/dynamic/GPUDynamicMeshDrawList.d.ts +70 -0
  98. package/src/shade/renderer/dynamic/GPUDynamicMeshDrawList.d.ts.map +1 -0
  99. package/src/shade/renderer/dynamic/GPUDynamicMeshDrawList.js +257 -0
  100. package/src/shade/renderer/dynamic/GPUDynamicMeshRenderer.d.ts.map +1 -1
  101. package/src/shade/renderer/dynamic/GPUDynamicMeshRenderer.js +19 -34
  102. package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.d.ts +6 -20
  103. package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.d.ts.map +1 -1
  104. package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.js +42 -36
  105. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.d.ts +2 -1
  106. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.d.ts.map +1 -1
  107. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.js +4 -3
  108. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_vertex.d.ts +4 -3
  109. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_vertex.d.ts.map +1 -1
  110. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_vertex.js +7 -4
  111. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.d.ts +14 -15
  112. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.d.ts.map +1 -1
  113. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.js +49 -83
  114. package/src/shade/renderer/dynamic/shader_dynamic_mesh.d.ts +19 -3
  115. package/src/shade/renderer/dynamic/shader_dynamic_mesh.d.ts.map +1 -1
  116. package/src/shade/renderer/dynamic/shader_dynamic_mesh.js +26 -6
  117. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.d.ts +2 -1
  118. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.d.ts.map +1 -1
  119. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.js +12 -6
  120. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.d.ts +3 -2
  121. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.d.ts.map +1 -1
  122. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.js +21 -13
  123. package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +1 -1
  124. package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
  125. package/src/shade/renderer/geometry/GPUGeometryManager.js +9 -10
  126. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +5 -0
  127. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
  128. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +11 -0
  129. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +12 -0
  130. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -1
  131. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +25 -0
  132. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +115 -101
  133. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  134. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +282 -140
  135. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +30 -0
  136. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +4 -1
  137. package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +536 -0
  138. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +6 -2
  139. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
  140. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +68 -19
  141. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts +2 -1
  142. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
  143. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +17 -1
  144. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts +4 -0
  145. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
  146. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +42 -12
  147. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +93 -12
  148. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
  149. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +166 -20
  150. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -1
  151. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +30 -7
  152. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
  153. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +12 -5
  154. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -1
  155. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +2 -2
  156. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
  157. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +23 -13
  158. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.d.ts.map +1 -1
  159. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.js +1 -2
  160. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
  161. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +1 -2
  162. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
  163. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +10 -6
  164. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +45 -17
  165. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -1
  166. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +61 -19
  167. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +8 -11
  168. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -1
  169. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +9 -16
  170. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
  171. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +25 -10
  172. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +10 -8
  173. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +1 -0
  174. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +19 -7
  175. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts +4 -2
  176. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts.map +1 -1
  177. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.js +4 -2
  178. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts +4 -0
  179. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts.map +1 -1
  180. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.js +7 -0
  181. package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts.map +1 -1
  182. package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.js +1 -0
  183. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  184. package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
  185. package/src/shade/renderer/material/GPUMaterialManager.js +2 -0
  186. package/src/shade/renderer/particles/DESIGN.md +4 -10
  187. package/src/shade/renderer/particles/ParticleConstants.d.ts +1 -3
  188. package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
  189. package/src/shade/renderer/particles/ParticleConstants.js +1 -3
  190. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts +3 -4
  191. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
  192. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +3 -4
  193. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  194. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts +45 -0
  195. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts.map +1 -0
  196. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.js +99 -0
  197. package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts +4 -4
  198. package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.js +36 -36
  199. package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts +15 -0
  200. package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts.map +1 -0
  201. package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.js +103 -0
  202. package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts +3 -0
  203. package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts.map +1 -1
  204. package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.js +6 -1
  205. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts +26 -0
  206. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts.map +1 -0
  207. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.js +91 -0
  208. package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts +22 -0
  209. package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts.map +1 -0
  210. package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.js +102 -0
  211. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts +2 -1
  212. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
  213. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +28 -24
  214. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_LEDGER.md +20 -0
  215. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  216. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +32 -28
  217. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  218. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +9 -105
  219. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +5 -0
  220. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
  221. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +11 -0
  222. package/src/shade/renderer/scene/GPUSceneContext.d.ts +11 -3
  223. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  224. package/src/shade/renderer/scene/GPUSceneContext.js +93 -21
  225. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +4 -1
  226. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
  227. package/src/shade/renderer/scene/rows/GPUSceneRows.js +5 -23
  228. package/src/shade/renderer/shader/type/serde/write_gpu_typed_buffer.d.ts.map +1 -1
  229. package/src/shade/renderer/shader/type/serde/write_gpu_typed_buffer.js +8 -1
  230. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  231. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +63 -0
  232. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts +12 -0
  233. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts.map +1 -0
  234. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.js +11 -0
  235. package/src/shade/renderer/shadow/map/Shadowmap.d.ts +15 -0
  236. package/src/shade/renderer/shadow/map/Shadowmap.d.ts.map +1 -1
  237. package/src/shade/renderer/shadow/map/Shadowmap.js +17 -0
  238. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts +25 -0
  239. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts.map +1 -0
  240. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.js +22 -0
  241. package/src/shade/renderer/shadow/map/shadowmap_update_score.d.ts.map +1 -1
  242. package/src/shade/renderer/shadow/map/shadowmap_update_score.js +5 -2
  243. package/src/shade/renderer/texture/TextureManager.d.ts +2 -1
  244. package/src/shade/renderer/texture/TextureManager.d.ts.map +1 -1
  245. package/src/shade/renderer/texture/TextureManager.js +4 -1
  246. package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +1 -1
  247. package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts +9 -1
  248. package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts.map +1 -1
  249. package/src/shade/renderer/util/Uint32BufferSamplingStats.js +55 -5
  250. package/src/shade/renderer/view/ViewManager.d.ts +7 -1
  251. package/src/shade/renderer/view/ViewManager.d.ts.map +1 -1
  252. package/src/shade/renderer/view/ViewManager.js +17 -1
  253. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
  254. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +1 -0
  255. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +0 -20
  256. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +0 -1
  257. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +0 -35
  258. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +0 -12
  259. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +0 -1
  260. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.js +0 -17
  261. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts +0 -14
  262. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts.map +0 -1
  263. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.js +0 -18
  264. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +0 -52
  265. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts.map +0 -1
  266. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.js +0 -58
  267. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +0 -47
  268. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +0 -1
  269. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.js +0 -58
  270. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +0 -16
  271. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts.map +0 -1
  272. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.js +0 -21
  273. package/editor/particles/rebuildParticleEmitter.d.ts +0 -11
  274. package/editor/particles/rebuildParticleEmitter.d.ts.map +0 -1
  275. package/editor/particles/rebuildParticleEmitter.js +0 -31
  276. package/editor/process/ParticleEmitterRebuildProcess.d.ts +0 -66
  277. package/editor/process/ParticleEmitterRebuildProcess.d.ts.map +0 -1
  278. package/editor/process/ParticleEmitterRebuildProcess.js +0 -217
  279. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts +0 -18
  280. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts.map +0 -1
  281. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.js +0 -140
  282. package/src/engine/animation/removeEntityGenericEffect.d.ts +0 -18
  283. package/src/engine/animation/removeEntityGenericEffect.d.ts.map +0 -1
  284. package/src/engine/animation/removeEntityGenericEffect.js +0 -160
  285. package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts +0 -16
  286. package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts.map +0 -1
  287. package/src/engine/animation/removeEntityWithMeshParticlesEffect.js +0 -194
  288. package/src/engine/graphics/ecs/sprite/Sprite.d.ts +0 -12
  289. package/src/engine/graphics/ecs/sprite/Sprite.d.ts.map +0 -1
  290. package/src/engine/graphics/ecs/sprite/Sprite.js +0 -11
  291. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts +0 -8
  292. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +0 -1
  293. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +0 -141
  294. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts.map +0 -1
  295. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts +0 -61
  296. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts.map +0 -1
  297. package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +0 -229
  298. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts +0 -6
  299. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts.map +0 -1
  300. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.js +0 -8
  301. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts +0 -7
  302. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts.map +0 -1
  303. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.js +0 -9
  304. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts +0 -13
  305. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts.map +0 -1
  306. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.js +0 -12
  307. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts +0 -3
  308. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts.map +0 -1
  309. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.js +0 -84
  310. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +0 -285
  311. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +0 -1
  312. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +0 -1201
  313. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts +0 -19
  314. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts.map +0 -1
  315. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js +0 -67
  316. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts +0 -197
  317. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts.map +0 -1
  318. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +0 -398
  319. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts +0 -5
  320. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts.map +0 -1
  321. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.js +0 -4
  322. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts +0 -162
  323. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts.map +0 -1
  324. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +0 -472
  325. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts +0 -10
  326. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts.map +0 -1
  327. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.js +0 -37
  328. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts +0 -9
  329. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts.map +0 -1
  330. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.js +0 -25
  331. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts +0 -19
  332. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +0 -1
  333. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.js +0 -28
  334. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts +0 -19
  335. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts.map +0 -1
  336. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.js +0 -162
  337. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts +0 -5
  338. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts.map +0 -1
  339. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.js +0 -103
  340. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts +0 -8
  341. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts.map +0 -1
  342. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.js +0 -28
  343. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts +0 -2
  344. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts.map +0 -1
  345. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +0 -2
  346. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts +0 -2
  347. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts.map +0 -1
  348. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.js +0 -2
  349. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts +0 -60
  350. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts.map +0 -1
  351. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.js +0 -128
  352. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts +0 -47
  353. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +0 -1
  354. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.js +0 -77
  355. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +0 -45
  356. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +0 -1
  357. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.js +0 -93
  358. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts +0 -95
  359. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +0 -1
  360. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.js +0 -239
  361. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts +0 -3
  362. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts.map +0 -1
  363. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts +0 -6
  364. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts.map +0 -1
  365. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_TURBO.d.ts.map +0 -1
  366. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_VIRIDIS.d.ts.map +0 -1
  367. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts +0 -13
  368. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts.map +0 -1
  369. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.js +0 -28
  370. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts +0 -9
  371. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts.map +0 -1
  372. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.js +0 -24
  373. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts +0 -13
  374. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts.map +0 -1
  375. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.js +0 -27
  376. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts +0 -33
  377. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts.map +0 -1
  378. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.js +0 -80
  379. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +0 -49
  380. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +0 -1
  381. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +0 -135
  382. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts +0 -7
  383. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts.map +0 -1
  384. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.js +0 -14
  385. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts +0 -41
  386. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts.map +0 -1
  387. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.js +0 -59
  388. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts +0 -4
  389. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts.map +0 -1
  390. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.js +0 -56
  391. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts +0 -4
  392. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts.map +0 -1
  393. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.js +0 -84
  394. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts +0 -4
  395. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts.map +0 -1
  396. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js +0 -80
  397. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts +0 -29
  398. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts.map +0 -1
  399. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js +0 -43
  400. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts +0 -5
  401. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts.map +0 -1
  402. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.js +0 -104
  403. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts +0 -9
  404. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts.map +0 -1
  405. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.js +0 -11
  406. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts +0 -9
  407. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts.map +0 -1
  408. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.js +0 -64
  409. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts +0 -9
  410. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts.map +0 -1
  411. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js +0 -172
  412. package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.d.ts.map +0 -1
  413. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts +0 -20
  414. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +0 -1
  415. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +0 -84
  416. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts +0 -81
  417. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts.map +0 -1
  418. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.js +0 -200
  419. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts +0 -6
  420. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts.map +0 -1
  421. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.js +0 -8
  422. package/src/engine/graphics/particles/particular/engine/utils/volume/lut_to_sampler.d.ts.map +0 -1
  423. package/src/engine/graphics/particles/particular/group/Operation.d.ts +0 -20
  424. package/src/engine/graphics/particles/particular/group/Operation.d.ts.map +0 -1
  425. package/src/engine/graphics/particles/particular/group/Operation.js +0 -20
  426. package/src/engine/graphics/particles/particular/group/OperationType.d.ts +0 -7
  427. package/src/engine/graphics/particles/particular/group/OperationType.d.ts.map +0 -1
  428. package/src/engine/graphics/particles/particular/group/OperationType.js +0 -9
  429. package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts +0 -27
  430. package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts.map +0 -1
  431. package/src/engine/graphics/particles/particular/group/ParticleAttribute.js +0 -27
  432. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts +0 -8
  433. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts.map +0 -1
  434. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.js +0 -11
  435. package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts +0 -7
  436. package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts.map +0 -1
  437. package/src/engine/graphics/particles/particular/group/ParticleDataType.js +0 -10
  438. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts +0 -24
  439. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts.map +0 -1
  440. package/src/engine/graphics/particles/particular/group/ParticleSpecification.js +0 -48
  441. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts +0 -7
  442. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts.map +0 -1
  443. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.js +0 -20
  444. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts +0 -6
  445. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts.map +0 -1
  446. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +0 -162
  447. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts +0 -8
  448. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts.map +0 -1
  449. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.js +0 -19
  450. package/src/engine/graphics3/ParticleEmitterSystem.d.ts +0 -77
  451. package/src/engine/graphics3/ParticleEmitterSystem.d.ts.map +0 -1
  452. package/src/engine/graphics3/ParticleEmitterSystem.js +0 -307
  453. package/src/engine/graphics3/ParticleEmitterSystem3.d.ts +0 -10
  454. package/src/engine/graphics3/ParticleEmitterSystem3.d.ts.map +0 -1
  455. package/src/engine/graphics3/ParticleEmitterSystem3.js +0 -10
  456. package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts +0 -61
  457. package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts.map +0 -1
  458. package/src/engine/graphics3/particles/GPUParticularRenderer.js +0 -627
  459. package/src/engine/graphics3/particles/particle_gpu_records.d.ts +0 -85
  460. package/src/engine/graphics3/particles/particle_gpu_records.d.ts.map +0 -1
  461. package/src/engine/graphics3/particles/particle_gpu_records.js +0 -227
  462. package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts +0 -35
  463. package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts.map +0 -1
  464. package/src/shade/renderer/particles/shaders/shader_particle_render.js +0 -135
  465. /package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.d.ts +0 -0
@@ -1,174 +1,161 @@
1
- import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
2
- import { BvhClient } from "../../../../core/bvh2/bvh3/BvhClient.js";
3
- import { BVHQueryIntersectsSphere } from "../../../../core/bvh2/bvh3/query/BVHQueryIntersectsSphere.js";
4
- import { bvh_query_user_data_generic } from "../../../../core/bvh2/bvh3/query/bvh_query_user_data_generic.js";
5
-
6
- /**
7
- * Spatial broadphase for 3D audio emitters (P5.1, cull-only).
8
- *
9
- * Holds a dynamic BVH whose leaves are each emitter's AUDIBLE region — an axis-aligned box of
10
- * half-extent `event.distanceMax` centred on the emitter. So "which emitters can possibly be heard
11
- * from point P" is one O(log n + k) BVH point-query instead of an O(n) scan over every emitter. This
12
- * is the registered/dormant tier: a registered emitter is a record plus one BVH leaf — no
13
- * `EventInstance`, no WebAudio nodes, no per-frame work. Promoting in-range emitters to live instances
14
- * (voice slots, stealing, fades) is layered on top later; this class only answers the cull.
15
- *
16
- * Leaf bounds track the emitter REACTIVELY: each leaf subscribes to its position's `onChanged`, so a
17
- * still emitter costs nothing per frame and a moving one refits only when it actually moves. (meep is
18
- * fully dynamic — there is no static/dynamic distinction and no per-tick refit loop.)
19
- *
20
- * The cull is conservative: the leaf is a cube of half-extent `distanceMax`, so its corners admit a
21
- * few emitters whose true (spherical) distance slightly exceeds `distanceMax`. That is correct
22
- * broadphase behaviour — the exact distance test belongs to the narrowphase (the live instance).
23
- */
24
- export class SpatialAudioIndex {
25
-
26
- /**
27
- * @type {BVH}
28
- */
29
- #bvh = new BVH();
30
-
31
- /**
32
- * entity id -> { entity, event, position, bvhClient, onMove }
33
- * @type {Map<number, {entity:number, event:EventDescription, position:Vector3, bvhClient:BvhClient, onMove:function}>}
34
- */
35
- #records = new Map();
36
-
37
- /**
38
- * Reused point-query. The sphere `[x, y, z, radius]` is mutated in place each query; radius stays 0,
39
- * so the test is "listener point inside the leaf AABB".
40
- * @type {number[]}
41
- */
42
- #querySphere = [0, 0, 0, 0];
43
-
44
- /**
45
- * @type {BVHQueryIntersectsSphere}
46
- */
47
- #query = BVHQueryIntersectsSphere.from(this.#querySphere);
48
-
49
- /**
50
- * @returns {number} number of registered emitters
51
- */
52
- get size() {
53
- return this.#records.size;
54
- }
55
-
56
- /**
57
- * @param {number} entity
58
- * @returns {boolean}
59
- */
60
- has(entity) {
61
- return this.#records.has(entity);
62
- }
63
-
64
- /**
65
- * Register an emitter: insert a BVH leaf sized to its audible region and start tracking its
66
- * position. The entity id is the leaf's user data (so queries return entity ids).
67
- *
68
- * @param {number} entity non-negative integer id
69
- * @param {EventDescription} event read for `distanceMax` (and retained for later promotion)
70
- * @param {Float64Array} position shared translation view over the entity's transform. It has no
71
- * signals, so the owner calls {@link refresh} when the entity moves.
72
- */
73
- add(entity, event, position) {
74
- if (this.#records.has(entity)) {
75
- throw new Error(`SpatialAudioIndex: entity ${entity} already registered`);
76
- }
77
-
78
- const bvhClient = new BvhClient();
79
-
80
- const record = { entity, event, position, bvhClient, onMove: null };
81
-
82
- this.#writeBounds(record); // size the leaf AABB before linking (resize no-ops the write pre-link)
83
- bvhClient.link(this.#bvh, entity); // user_data = entity id
84
-
85
- this.#records.set(entity, record);
86
- }
87
-
88
- /**
89
- * Unregister an emitter: stop tracking its position and drop its BVH leaf. No-op for an unknown
90
- * entity.
91
- * @param {number} entity
92
- */
93
- remove(entity) {
94
- const record = this.#records.get(entity);
95
-
96
- if (record === undefined) {
97
- return;
98
- }
99
-
100
- record.bvhClient.unlink();
101
-
102
- this.#records.delete(entity);
103
- }
104
-
105
- /**
106
- * Refit a record's leaf to `position ± distanceMax`. Called once at registration and again
107
- * (reactively) whenever the position changes.
108
- * @param {{event:EventDescription, position:Vector3, bvhClient:BvhClient}} record
109
- */
110
- #writeBounds(record) {
111
- const p = record.position;
112
- const d = record.event.distanceMax;
113
-
114
- record.bvhClient.resize(
115
- p[0] - d, p[1] - d, p[2] - d,
116
- p[0] + d, p[1] + d, p[2] + d
117
- );
118
- }
119
-
120
- /**
121
- * Write the entity ids whose audible region contains `listenerPosition` into `out` (starting at
122
- * `out_offset`) and return how many — every emitter that can possibly be heard from there (a
123
- * conservative superset; see the class note), in unspecified order. Allocation-free: `out` is a
124
- * caller-owned reusable buffer, grown as needed (never shrunk), so only `out[out_offset .. out_offset
125
- * + count)` is meaningful — entries elsewhere may be stale from a prior query and must be ignored.
126
- *
127
- * @param {number[]} out caller-owned result buffer, reused across calls (grows, never shrinks)
128
- * @param {number} out_offset index in `out` to start writing at
129
- * @param {Vector3} listenerPosition
130
- * @returns {number} number of matches written to `out`
131
- */
132
- queryAudible(out, out_offset, listenerPosition) {
133
- this.#querySphere[0] = listenerPosition[0];
134
- this.#querySphere[1] = listenerPosition[1];
135
- this.#querySphere[2] = listenerPosition[2];
136
- // radius stays 0 -> point-in-AABB
137
-
138
- return bvh_query_user_data_generic(out, out_offset, this.#bvh, this.#bvh.root, this.#query);
139
- }
140
- /**
141
- * Re-fit the entity's leaf to its current pose.
142
- *
143
- * The translation this index holds is a live view over the transform's buffer, so it is already
144
- * up to date - what it cannot do is announce itself. The owner calls this when the dataset says
145
- * the transform changed.
146
- *
147
- * @param {number} entity
148
- */
149
- /**
150
- * Re-fit every leaf.
151
- *
152
- * The translations are live views over their transforms, so the data is already current - what
153
- * is stale is the leaf AABB in the BVH. One pass per tick costs what the per-move refits cost
154
- * before, and it is what the emitters' own "next tick re-attenuates" behaviour expects.
155
- *
156
- * @returns {void}
157
- */
158
- refresh_all() {
159
- for (const record of this.#records.values()) {
160
- this.#writeBounds(record);
161
- }
162
- }
163
-
164
- refresh(entity) {
165
- const record = this.#records.get(entity);
166
-
167
- if (record === undefined) {
168
- return;
169
- }
170
-
171
- this.#writeBounds(record);
172
- }
173
-
174
- }
1
+ import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
2
+ import { BvhClient } from "../../../../core/bvh2/bvh3/BvhClient.js";
3
+ import { BVHQueryIntersectsSphere } from "../../../../core/bvh2/bvh3/query/BVHQueryIntersectsSphere.js";
4
+ import { bvh_query_user_data_generic } from "../../../../core/bvh2/bvh3/query/bvh_query_user_data_generic.js";
5
+
6
+ /**
7
+ * Spatial broadphase for 3D audio emitters (P5.1, cull-only).
8
+ *
9
+ * Holds a dynamic BVH whose leaves are each emitter's AUDIBLE region — an axis-aligned box of
10
+ * half-extent `event.distanceMax` centred on the emitter. So "which emitters can possibly be heard
11
+ * from point P" is one O(log n + k) BVH point-query instead of an O(n) scan over every emitter. This
12
+ * is the registered/dormant tier: a registered emitter is a record plus one BVH leaf — no
13
+ * `EventInstance`, no WebAudio nodes, no per-frame work. Promoting in-range emitters to live instances
14
+ * (voice slots, stealing, fades) is layered on top later; this class only answers the cull.
15
+ *
16
+ * Leaf bounds track the emitter on demand: a position is a live view with no signal of its own, so the
17
+ * owner calls {@link refresh} for an entity when the dataset announces its transform changed. A still
18
+ * emitter costs nothing per frame and a moving one refits only when it actually moves. (meep is fully
19
+ * dynamic — there is no static/dynamic distinction and no per-tick refit loop.)
20
+ *
21
+ * The cull is conservative: the leaf is a cube of half-extent `distanceMax`, so its corners admit a
22
+ * few emitters whose true (spherical) distance slightly exceeds `distanceMax`. That is correct
23
+ * broadphase behaviour — the exact distance test belongs to the narrowphase (the live instance).
24
+ */
25
+ export class SpatialAudioIndex {
26
+
27
+ /**
28
+ * @type {BVH}
29
+ */
30
+ #bvh = new BVH();
31
+
32
+ /**
33
+ * entity id -> { entity, event, position, bvhClient }
34
+ * @type {Map<number, {entity:number, event:EventDescription, position:Float64Array, bvhClient:BvhClient}>}
35
+ */
36
+ #records = new Map();
37
+
38
+ /**
39
+ * Reused point-query. The sphere `[x, y, z, radius]` is mutated in place each query; radius stays 0,
40
+ * so the test is "listener point inside the leaf AABB".
41
+ * @type {number[]}
42
+ */
43
+ #querySphere = [0, 0, 0, 0];
44
+
45
+ /**
46
+ * @type {BVHQueryIntersectsSphere}
47
+ */
48
+ #query = BVHQueryIntersectsSphere.from(this.#querySphere);
49
+
50
+ /**
51
+ * @returns {number} number of registered emitters
52
+ */
53
+ get size() {
54
+ return this.#records.size;
55
+ }
56
+
57
+ /**
58
+ * @param {number} entity
59
+ * @returns {boolean}
60
+ */
61
+ has(entity) {
62
+ return this.#records.has(entity);
63
+ }
64
+
65
+ /**
66
+ * Register an emitter: insert a BVH leaf sized to its audible region and start tracking its
67
+ * position. The entity id is the leaf's user data (so queries return entity ids).
68
+ *
69
+ * @param {number} entity non-negative integer id
70
+ * @param {EventDescription} event read for `distanceMax` (and retained for later promotion)
71
+ * @param {Float64Array} position shared translation view over the entity's transform. It has no
72
+ * signals, so the owner calls {@link refresh} when the entity moves.
73
+ */
74
+ add(entity, event, position) {
75
+ if (this.#records.has(entity)) {
76
+ throw new Error(`SpatialAudioIndex: entity ${entity} already registered`);
77
+ }
78
+
79
+ const bvhClient = new BvhClient();
80
+
81
+ const record = { entity, event, position, bvhClient };
82
+
83
+ this.#writeBounds(record); // size the leaf AABB before linking (resize no-ops the write pre-link)
84
+ bvhClient.link(this.#bvh, entity); // user_data = entity id
85
+
86
+ this.#records.set(entity, record);
87
+ }
88
+
89
+ /**
90
+ * Unregister an emitter: stop tracking its position and drop its BVH leaf. No-op for an unknown
91
+ * entity.
92
+ * @param {number} entity
93
+ */
94
+ remove(entity) {
95
+ const record = this.#records.get(entity);
96
+
97
+ if (record === undefined) {
98
+ return;
99
+ }
100
+
101
+ record.bvhClient.unlink();
102
+
103
+ this.#records.delete(entity);
104
+ }
105
+
106
+ /**
107
+ * Refit a record's leaf to `position ± distanceMax`. Called once at registration and again from
108
+ * {@link refresh} whenever the owner reports a move.
109
+ * @param {{event:EventDescription, position:Float64Array, bvhClient:BvhClient}} record
110
+ */
111
+ #writeBounds(record) {
112
+ const p = record.position;
113
+ const d = record.event.distanceMax;
114
+
115
+ record.bvhClient.resize(
116
+ p[0] - d, p[1] - d, p[2] - d,
117
+ p[0] + d, p[1] + d, p[2] + d
118
+ );
119
+ }
120
+
121
+ /**
122
+ * Write the entity ids whose audible region contains `listenerPosition` into `out` (starting at
123
+ * `out_offset`) and return how many — every emitter that can possibly be heard from there (a
124
+ * conservative superset; see the class note), in unspecified order. Allocation-free: `out` is a
125
+ * caller-owned reusable buffer, grown as needed (never shrunk), so only `out[out_offset .. out_offset
126
+ * + count)` is meaningful — entries elsewhere may be stale from a prior query and must be ignored.
127
+ *
128
+ * @param {number[]} out caller-owned result buffer, reused across calls (grows, never shrinks)
129
+ * @param {number} out_offset index in `out` to start writing at
130
+ * @param {Vector3} listenerPosition
131
+ * @returns {number} number of matches written to `out`
132
+ */
133
+ queryAudible(out, out_offset, listenerPosition) {
134
+ this.#querySphere[0] = listenerPosition[0];
135
+ this.#querySphere[1] = listenerPosition[1];
136
+ this.#querySphere[2] = listenerPosition[2];
137
+ // radius stays 0 -> point-in-AABB
138
+
139
+ return bvh_query_user_data_generic(out, out_offset, this.#bvh, this.#bvh.root, this.#query);
140
+ }
141
+
142
+ /**
143
+ * Re-fit the entity's leaf to its current pose. No-op for an unknown entity.
144
+ *
145
+ * The translation this index holds is a live view over the transform's buffer, so it is already
146
+ * up to date - what it cannot do is announce itself. The owner calls this when the dataset says
147
+ * the transform changed.
148
+ *
149
+ * @param {number} entity
150
+ */
151
+ refresh(entity) {
152
+ const record = this.#records.get(entity);
153
+
154
+ if (record === undefined) {
155
+ return;
156
+ }
157
+
158
+ this.#writeBounds(record);
159
+ }
160
+
161
+ }
@@ -80,7 +80,8 @@ export class SoftwareGPUBuffer extends SoftwareGPUObjectBase implements GPUBuffe
80
80
  * @param {number} [offset]
81
81
  * @param {number} [size] defaults to the rest of the buffer
82
82
  * @returns {Promise<undefined>} rejects with an `OperationError` for a range this device will
83
- * not map, and raises the matching validation error on the device
83
+ * not map, and raises the matching validation error on the device; rejects with an `AbortError`,
84
+ * and raises nothing, when the buffer is unmapped or destroyed before the mapping resolves
84
85
  */
85
86
  mapAsync(mode: GPUMapModeFlags, offset?: number, size?: number): Promise<undefined>;
86
87
  /**
@@ -103,7 +104,7 @@ export class SoftwareGPUBuffer extends SoftwareGPUObjectBase implements GPUBuffe
103
104
  /**
104
105
  * End the mapping: every range handed out is written back into the buffer and then detached, so
105
106
  * a caller holding one sees the zero-length buffer a browser gives it rather than a stale view
106
- * that still appears to work.
107
+ * that still appears to work. A mapping still in flight is abandoned — see {@link mapAsync}.
107
108
  */
108
109
  unmap(): void;
109
110
  /**
@@ -112,7 +113,8 @@ export class SoftwareGPUBuffer extends SoftwareGPUObjectBase implements GPUBuffe
112
113
  * careful.
113
114
  *
114
115
  * An outstanding mapping goes with it: WebGPU detaches every mapped range when the buffer is
115
- * destroyed, so a range that kept working would hide a use-after-destroy.
116
+ * destroyed, so a range that kept working would hide a use-after-destroy. So does one still in
117
+ * flight, which is rejected with an `AbortError` — see {@link mapAsync}.
116
118
  */
117
119
  destroy(): void;
118
120
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"SoftwareGPUBuffer.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/mock/SoftwareGPUBuffer.js"],"names":[],"mappings":"AAkBA;;;;;;;GAOG;AAEH;;;GAGG;AACH,wEAFgB,SAAS;IAiJrB;;;;;;;OAOG;IACH,4EAFa,iBAAiB,CAI7B;IA5CD;;;;;OAKG;IACH,gFAFW,OAAO,EA4BjB;IAlID;;;OAGG;IACH,mBAEC;IAID;;;OAGG;IACH,8BAEC;IAQD;;;OAGG;IACH,kCAEC;IA4BD;;;;;;;;OAQG;IACH,wBAEC;IAID;;;;;;;;;;OAUG;IACH,uBAEC;IAID;;;OAGG;IACH,2BAEC;IA0HD;;;;;;;;;;;;OAYG;IACH,yCALW,MAAM,SACN,MAAM,GACJ,QAAQ,SAAS,CAAC,CAoB9B;IAsCD;;;;;;;;;;;;;;;OAeG;IACH,wBAPW,MAAM,SACN,MAAM,GAIJ,WAAW,CAgBvB;IAED;;;;OAIG;IACH,cAYC;IAED;;;;;;;OAOG;IACH,gBAiBC;IAGL;;;OAGG;IACH,8BAFU,OAAO,CAE8B;;CAN9C;;;;;;;;YA/Xa,MAAM;;;;UACN,MAAM;;;;UACN,WAAW;;sCAtBa,4BAA4B"}
1
+ {"version":3,"file":"SoftwareGPUBuffer.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/mock/SoftwareGPUBuffer.js"],"names":[],"mappings":"AAkBA;;;;;;;GAOG;AAEH;;;GAGG;AACH,wEAFgB,SAAS;IA2JrB;;;;;;;OAOG;IACH,4EAFa,iBAAiB,CAI7B;IA5CD;;;;;OAKG;IACH,gFAFW,OAAO,EA4BjB;IA5ID;;;OAGG;IACH,mBAEC;IAID;;;OAGG;IACH,8BAEC;IAQD;;;OAGG;IACH,kCAEC;IAsCD;;;;;;;;OAQG;IACH,wBAEC;IAID;;;;;;;;;;OAUG;IACH,uBAEC;IAID;;;OAGG;IACH,2BAEC;IA0HD;;;;;;;;;;;;;OAaG;IACH,yCANW,MAAM,SACN,MAAM,GACJ,QAAQ,SAAS,CAAC,CAkC9B;IAsCD;;;;;;;;;;;;;;;OAeG;IACH,wBAPW,MAAM,SACN,MAAM,GAIJ,WAAW,CAgBvB;IAED;;;;OAIG;IACH,cAcC;IAED;;;;;;;;OAQG;IACH,gBAmBC;IAGL;;;OAGG;IACH,8BAFU,OAAO,CAE8B;;CAN9C;;;;;;;;YA5Za,MAAM;;;;UACN,MAAM;;;;UACN,WAAW;;sCAtBa,4BAA4B"}
@@ -72,6 +72,16 @@ export class SoftwareGPUBuffer extends SoftwareGPUObjectBase {
72
72
  return this.#mapState;
73
73
  }
74
74
 
75
+ /**
76
+ * The mapping in flight, while {@link mapState} is `"pending"`: a token only that call holds.
77
+ * {@link unmap} and {@link destroy} drop it, which is how the call learns on resolving that the
78
+ * mapping it was making has been abandoned — WebGPU rejects it with an `AbortError` rather than
79
+ * mapping a buffer somebody has since unmapped or released.
80
+ *
81
+ * @type {Object|null}
82
+ */
83
+ #pending_map = null;
84
+
75
85
  /**
76
86
  * The mapped region, meaningful only while {@link mapState} is `"mapped"`.
77
87
  *
@@ -269,7 +279,8 @@ export class SoftwareGPUBuffer extends SoftwareGPUObjectBase {
269
279
  * @param {number} [offset]
270
280
  * @param {number} [size] defaults to the rest of the buffer
271
281
  * @returns {Promise<undefined>} rejects with an `OperationError` for a range this device will
272
- * not map, and raises the matching validation error on the device
282
+ * not map, and raises the matching validation error on the device; rejects with an `AbortError`,
283
+ * and raises nothing, when the buffer is unmapped or destroyed before the mapping resolves
273
284
  */
274
285
  async mapAsync(mode, offset = 0, size = this.#size - offset) {
275
286
  const refusal = this.#map_refusal(mode, offset, size);
@@ -278,12 +289,25 @@ export class SoftwareGPUBuffer extends SoftwareGPUObjectBase {
278
289
  throw this.#refuse_mapping(refusal);
279
290
  }
280
291
 
292
+ const pending = {};
293
+
294
+ this.#pending_map = pending;
281
295
  this.#mapState = "pending";
282
296
 
283
297
  // a real mapping completes on another turn, and host code is written around that — resolving
284
298
  // synchronously would let code that forgot to await appear to work
285
299
  await Promise.resolve();
286
300
 
301
+ if (this.#pending_map !== pending) {
302
+ // unmap() or destroy() got there first. Not a validation error: abandoning a mapping is
303
+ // legal, and the rejection is the whole of what the caller hears about it
304
+ throw new DOMException(
305
+ `mapAsync: buffer '${this.label}' was ${this.#destroyed ? 'destroyed' : 'unmapped'} before mapping was resolved`,
306
+ 'AbortError'
307
+ );
308
+ }
309
+
310
+ this.#pending_map = null;
287
311
  this.#mapState = "mapped";
288
312
  this.#map_offset = offset;
289
313
  this.#map_size = size;
@@ -361,9 +385,11 @@ export class SoftwareGPUBuffer extends SoftwareGPUObjectBase {
361
385
  /**
362
386
  * End the mapping: every range handed out is written back into the buffer and then detached, so
363
387
  * a caller holding one sees the zero-length buffer a browser gives it rather than a stale view
364
- * that still appears to work.
388
+ * that still appears to work. A mapping still in flight is abandoned — see {@link mapAsync}.
365
389
  */
366
390
  unmap() {
391
+ this.#pending_map = null;
392
+
367
393
  for (const range of this.#mapped_ranges) {
368
394
  array_buffer_copy(range.data, 0, this.#data, range.offset, range.size);
369
395
 
@@ -383,13 +409,16 @@ export class SoftwareGPUBuffer extends SoftwareGPUObjectBase {
383
409
  * careful.
384
410
  *
385
411
  * An outstanding mapping goes with it: WebGPU detaches every mapped range when the buffer is
386
- * destroyed, so a range that kept working would hide a use-after-destroy.
412
+ * destroyed, so a range that kept working would hide a use-after-destroy. So does one still in
413
+ * flight, which is rejected with an `AbortError` — see {@link mapAsync}.
387
414
  */
388
415
  destroy() {
389
416
  if (this.#destroyed) {
390
417
  return;
391
418
  }
392
419
 
420
+ this.#pending_map = null;
421
+
393
422
  for (const range of this.#mapped_ranges) {
394
423
  range.data.transfer();
395
424
  }
@@ -27,7 +27,11 @@ export class SoftwareGPURenderPassEncoder extends SoftwareGPUObjectBase implemen
27
27
  * `-1` rather than a number read out of a buffer nobody filled — the same admission
28
28
  * {@link SoftwareGPUComputePassEncoder#dispatchWorkgroupsIndirect} makes.
29
29
  *
30
- * @type {{pipeline: GPURenderPipeline|null, bind_groups: GPUBindGroup[], dynamic_offsets: number[][], vertex_buffers: object[], index_buffer: object|null, viewport: object|null, scissor: object|null, vertex_count: number, instance_count: number, indexed: boolean, indirect: boolean}[]}
30
+ * A direct draw also records where it starts — `first_vertex` and `first_instance`, or for an
31
+ * indexed one `first_index`, `base_vertex` and `first_instance` — with WebGPU's defaults of 0
32
+ * where they were left out. An indirect one records none of them: they are in the buffer too.
33
+ *
34
+ * @type {{pipeline: GPURenderPipeline|null, bind_groups: GPUBindGroup[], dynamic_offsets: number[][], vertex_buffers: object[], index_buffer: object|null, viewport: object|null, scissor: object|null, vertex_count: number, instance_count: number, first_vertex?: number, first_index?: number, base_vertex?: number, first_instance?: number, indexed: boolean, indirect: boolean}[]}
31
35
  */
32
36
  draws: {
33
37
  pipeline: GPURenderPipeline | null;
@@ -39,6 +43,10 @@ export class SoftwareGPURenderPassEncoder extends SoftwareGPUObjectBase implemen
39
43
  scissor: object | null;
40
44
  vertex_count: number;
41
45
  instance_count: number;
46
+ first_vertex?: number;
47
+ first_index?: number;
48
+ base_vertex?: number;
49
+ first_instance?: number;
42
50
  indexed: boolean;
43
51
  indirect: boolean;
44
52
  }[];
@@ -118,15 +126,24 @@ export class SoftwareGPURenderPassEncoder extends SoftwareGPUObjectBase implemen
118
126
  setStencilReference(reference: number): void;
119
127
  stencil_reference: number;
120
128
  /**
129
+ * Where the draw starts is recorded with its counts: a direct draw's `instance_index` counts from
130
+ * `first_instance`, and a draw that picks its row of a table through it names that row nowhere
131
+ * else.
132
+ *
121
133
  * @param {number} vertex_count
122
134
  * @param {number} [instance_count]
135
+ * @param {number} [first_vertex]
136
+ * @param {number} [first_instance]
123
137
  */
124
- draw(vertex_count: number, instance_count?: number): void;
138
+ draw(vertex_count: number, instance_count?: number, first_vertex?: number, first_instance?: number): void;
125
139
  /**
126
140
  * @param {number} index_count
127
141
  * @param {number} [instance_count]
142
+ * @param {number} [first_index]
143
+ * @param {number} [base_vertex]
144
+ * @param {number} [first_instance]
128
145
  */
129
- drawIndexed(index_count: number, instance_count?: number): void;
146
+ drawIndexed(index_count: number, instance_count?: number, first_index?: number, base_vertex?: number, first_instance?: number): void;
130
147
  /**
131
148
  * @param {GPUBuffer} indirect_buffer
132
149
  * @param {number} indirect_offset
@@ -1 +1 @@
1
- {"version":3,"file":"SoftwareGPURenderPassEncoder.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/mock/SoftwareGPURenderPassEncoder.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,mFAFgB,oBAAoB;IAmFhC;;;OAGG;IACH,sFAQC;IA5FD;;;;;;;;;OASG;IACH,OAFU;QAAC,QAAQ,EAAE,oBAAkB,IAAI,CAAC;QAAC,WAAW,EAAE,cAAc,CAAC;QAAC,eAAe,EAAE,MAAM,EAAE,EAAE,CAAC;QAAC,cAAc,EAAE,MAAM,EAAE,CAAC;QAAC,YAAY,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAC,EAAE,CAElR;IAEX;;;;;;OAMG;IACH,oCAAW;IAoDX;;;;OAIG;IACH,uBAEC;IAsBD;;OAEG;IACH,+CAIC;IAED;;;;;;;;OAQG;IACH,oBANW,MAAM,8CAEN,MAAM,EAAE,GAAC,WAAW,0BACpB,MAAM,2BACN,MAAM,QA0BhB;IAED;;;;;OAKG;IACH,4BALW,MAAM,QACN,WAAW,GAAC,eAAe,gBAC3B,MAAM,cACN,MAAM,QAUhB;IAED;;;;;OAKG;IACH,sBALW,MAAM,8BAEN,MAAM,SACN,MAAM,QAShB;IAED;;;;;OAKG;IACH,yEAHW,MAAM,SACN,MAAM,QAQhB;IAED;;;;;;;OAOG;IACH,eAPW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,aACN,MAAM,aACN,MAAM,QAMhB;IAED;;;;;OAKG;IACH,kBALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QAMhB;IAED;;OAEG;IACH,wCAIC;IADG,yBAA2B;IAG/B;;OAEG;IACH,+BAFW,MAAM,QAMhB;IADG,0BAAkC;IAwCtC;;;OAGG;IACH,mBAHW,MAAM,mBACN,MAAM,QAahB;IAED;;;OAGG;IACH,yBAHW,MAAM,mBACN,MAAM,QAahB;IAED;;;OAGG;IACH,0DAFW,MAAM,QAkBhB;IAED;;;OAGG;IACH,iEAFW,MAAM,QAiBhB;IAED;;OAEG;IACH,sBAFW,MAAM,QAIhB;IAED,sBAEC;IAED;;OAEG;IACH,yBAFW,MAAM,QAIhB;IAED,YAQC;IAGL;;;OAGG;IACH,yCAFU,OAAO,CAEoD;;CANpE;sCAzYqC,4BAA4B"}
1
+ {"version":3,"file":"SoftwareGPURenderPassEncoder.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/mock/SoftwareGPURenderPassEncoder.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,mFAFgB,oBAAoB;IAuFhC;;;OAGG;IACH,sFAQC;IAhGD;;;;;;;;;;;;;OAaG;IACH,OAFU;QAAC,QAAQ,EAAE,oBAAkB,IAAI,CAAC;QAAC,WAAW,EAAE,cAAc,CAAC;QAAC,eAAe,EAAE,MAAM,EAAE,EAAE,CAAC;QAAC,cAAc,EAAE,MAAM,EAAE,CAAC;QAAC,YAAY,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAC,EAAE,CAE9W;IAEX;;;;;;OAMG;IACH,oCAAW;IAoDX;;;;OAIG;IACH,uBAEC;IAsBD;;OAEG;IACH,+CAIC;IAED;;;;;;;;OAQG;IACH,oBANW,MAAM,8CAEN,MAAM,EAAE,GAAC,WAAW,0BACpB,MAAM,2BACN,MAAM,QA0BhB;IAED;;;;;OAKG;IACH,4BALW,MAAM,QACN,WAAW,GAAC,eAAe,gBAC3B,MAAM,cACN,MAAM,QAUhB;IAED;;;;;OAKG;IACH,sBALW,MAAM,8BAEN,MAAM,SACN,MAAM,QAShB;IAED;;;;;OAKG;IACH,yEAHW,MAAM,SACN,MAAM,QAQhB;IAED;;;;;;;OAOG;IACH,eAPW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,aACN,MAAM,aACN,MAAM,QAMhB;IAED;;;;;OAKG;IACH,kBALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QAMhB;IAED;;OAEG;IACH,wCAIC;IADG,yBAA2B;IAG/B;;OAEG;IACH,+BAFW,MAAM,QAMhB;IADG,0BAAkC;IAwCtC;;;;;;;;;OASG;IACH,mBALW,MAAM,mBACN,MAAM,iBACN,MAAM,mBACN,MAAM,QAehB;IAED;;;;;;OAMG;IACH,yBANW,MAAM,mBACN,MAAM,gBACN,MAAM,gBACN,MAAM,mBACN,MAAM,QAgBhB;IAED;;;OAGG;IACH,0DAFW,MAAM,QAkBhB;IAED;;;OAGG;IACH,iEAFW,MAAM,QAiBhB;IAED;;OAEG;IACH,sBAFW,MAAM,QAIhB;IAED,sBAEC;IAED;;OAEG;IACH,yBAFW,MAAM,QAIhB;IAED,YAQC;IAGL;;;OAGG;IACH,yCAFU,OAAO,CAEoD;;CANpE;sCA3ZqC,4BAA4B"}
@@ -28,7 +28,11 @@ export class SoftwareGPURenderPassEncoder extends SoftwareGPUObjectBase {
28
28
  * `-1` rather than a number read out of a buffer nobody filled — the same admission
29
29
  * {@link SoftwareGPUComputePassEncoder#dispatchWorkgroupsIndirect} makes.
30
30
  *
31
- * @type {{pipeline: GPURenderPipeline|null, bind_groups: GPUBindGroup[], dynamic_offsets: number[][], vertex_buffers: object[], index_buffer: object|null, viewport: object|null, scissor: object|null, vertex_count: number, instance_count: number, indexed: boolean, indirect: boolean}[]}
31
+ * A direct draw also records where it starts — `first_vertex` and `first_instance`, or for an
32
+ * indexed one `first_index`, `base_vertex` and `first_instance` — with WebGPU's defaults of 0
33
+ * where they were left out. An indirect one records none of them: they are in the buffer too.
34
+ *
35
+ * @type {{pipeline: GPURenderPipeline|null, bind_groups: GPUBindGroup[], dynamic_offsets: number[][], vertex_buffers: object[], index_buffer: object|null, viewport: object|null, scissor: object|null, vertex_count: number, instance_count: number, first_vertex?: number, first_index?: number, base_vertex?: number, first_instance?: number, indexed: boolean, indirect: boolean}[]}
32
36
  */
33
37
  draws = [];
34
38
 
@@ -291,10 +295,16 @@ export class SoftwareGPURenderPassEncoder extends SoftwareGPUObjectBase {
291
295
  }
292
296
 
293
297
  /**
298
+ * Where the draw starts is recorded with its counts: a direct draw's `instance_index` counts from
299
+ * `first_instance`, and a draw that picks its row of a table through it names that row nowhere
300
+ * else.
301
+ *
294
302
  * @param {number} vertex_count
295
303
  * @param {number} [instance_count]
304
+ * @param {number} [first_vertex]
305
+ * @param {number} [first_instance]
296
306
  */
297
- draw(vertex_count, instance_count = 1) {
307
+ draw(vertex_count, instance_count = 1, first_vertex = 0, first_instance = 0) {
298
308
  this.#assert_encoding();
299
309
  this.#validate_immediates();
300
310
 
@@ -302,6 +312,8 @@ export class SoftwareGPURenderPassEncoder extends SoftwareGPUObjectBase {
302
312
  ...this.#snapshot(),
303
313
  vertex_count,
304
314
  instance_count,
315
+ first_vertex,
316
+ first_instance,
305
317
  indexed: false,
306
318
  indirect: false,
307
319
  });
@@ -310,8 +322,11 @@ export class SoftwareGPURenderPassEncoder extends SoftwareGPUObjectBase {
310
322
  /**
311
323
  * @param {number} index_count
312
324
  * @param {number} [instance_count]
325
+ * @param {number} [first_index]
326
+ * @param {number} [base_vertex]
327
+ * @param {number} [first_instance]
313
328
  */
314
- drawIndexed(index_count, instance_count = 1) {
329
+ drawIndexed(index_count, instance_count = 1, first_index = 0, base_vertex = 0, first_instance = 0) {
315
330
  this.#assert_encoding();
316
331
  this.#validate_immediates();
317
332
 
@@ -319,6 +334,9 @@ export class SoftwareGPURenderPassEncoder extends SoftwareGPUObjectBase {
319
334
  ...this.#snapshot(),
320
335
  vertex_count: index_count,
321
336
  instance_count,
337
+ first_index,
338
+ base_vertex,
339
+ first_instance,
322
340
  indexed: true,
323
341
  indirect: false,
324
342
  });