@woosh/meep-engine 3.44.0 → 3.46.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 (447) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/package.json +1 -1
  3. package/src/core/assert.d.ts.map +1 -1
  4. package/src/core/assert.js +5 -1
  5. package/src/core/binary/hash/XXH128Hash.d.ts +1 -37
  6. package/src/core/binary/hash/XXH128Hash.d.ts.map +1 -1
  7. package/src/core/binary/hash/XXH128Hash.js +4 -55
  8. package/src/core/binary/hash/XXH3_SECRET.d.ts +1 -12
  9. package/src/core/binary/hash/XXH3_SECRET.d.ts.map +1 -1
  10. package/src/core/binary/hash/XXH3_SECRET.js +4 -25
  11. package/src/core/binary/hash/crc32.d.ts +1 -15
  12. package/src/core/binary/hash/crc32.d.ts.map +1 -1
  13. package/src/core/binary/hash/crc32.js +4 -96
  14. package/src/core/binary/hash/xxh3_128.d.ts +1 -9
  15. package/src/core/binary/hash/xxh3_128.d.ts.map +1 -1
  16. package/src/core/binary/hash/xxh3_128.js +4 -341
  17. package/src/core/binary/hash/xxh3_64.d.ts +1 -8
  18. package/src/core/binary/hash/xxh3_64.d.ts.map +1 -1
  19. package/src/core/binary/hash/xxh3_64.js +4 -241
  20. package/src/core/binary/hash/xxh3_common.d.ts +1 -223
  21. package/src/core/binary/hash/xxh3_common.d.ts.map +1 -1
  22. package/src/core/binary/hash/xxh3_common.js +90 -476
  23. package/src/core/collection/array/array_sort_insertion_ascending.d.ts +19 -0
  24. package/src/core/collection/array/array_sort_insertion_ascending.d.ts.map +1 -0
  25. package/src/core/collection/array/array_sort_insertion_ascending.js +31 -0
  26. package/src/core/collection/array/combine_hash.d.ts +6 -0
  27. package/src/core/collection/array/combine_hash.d.ts.map +1 -1
  28. package/src/core/collection/array/combine_hash.js +6 -0
  29. package/src/core/function/FunctionCompiler.js +2 -2
  30. package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.d.ts +27 -0
  31. package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.d.ts.map +1 -0
  32. package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.js +39 -0
  33. package/src/core/geom/3d/aabb/aabb3_from_v3_array.d.ts.map +1 -1
  34. package/src/core/geom/3d/aabb/aabb3_from_v3_array.js +4 -1
  35. package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts +2 -2
  36. package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts.map +1 -1
  37. package/src/core/geom/3d/aabb/aabb3_transform_oriented.js +1 -1
  38. package/src/core/geom/3d/mat4/m4_multiply.d.ts +3 -0
  39. package/src/core/geom/3d/mat4/m4_multiply.d.ts.map +1 -1
  40. package/src/core/geom/3d/mat4/m4_multiply.js +3 -0
  41. package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts +30 -0
  42. package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts.map +1 -0
  43. package/src/core/geom/3d/mat4/m4_multiply_f64.js +106 -0
  44. package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.d.ts +21 -0
  45. package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.d.ts.map +1 -0
  46. package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.js +36 -0
  47. package/src/core/geom/3d/pose/pose3_apply_point_array.d.ts +25 -0
  48. package/src/core/geom/3d/pose/pose3_apply_point_array.d.ts.map +1 -0
  49. package/src/core/geom/3d/pose/pose3_apply_point_array.js +40 -0
  50. package/src/core/geom/3d/pose/pose3_compose_array.d.ts +28 -0
  51. package/src/core/geom/3d/pose/pose3_compose_array.d.ts.map +1 -0
  52. package/src/core/geom/3d/pose/pose3_compose_array.js +41 -0
  53. package/src/core/geom/3d/pose/pose3_to_local_array.d.ts +29 -0
  54. package/src/core/geom/3d/pose/pose3_to_local_array.d.ts.map +1 -0
  55. package/src/core/geom/3d/pose/pose3_to_local_array.js +42 -0
  56. package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.d.ts +28 -0
  57. package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.d.ts.map +1 -0
  58. package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.js +66 -0
  59. package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.d.ts +22 -0
  60. package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.d.ts.map +1 -0
  61. package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.js +30 -0
  62. package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.d.ts +23 -0
  63. package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.d.ts.map +1 -0
  64. package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.js +31 -0
  65. package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.d.ts +26 -0
  66. package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.d.ts.map +1 -0
  67. package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.js +46 -0
  68. package/src/core/geom/ConicRay.js +2 -2
  69. package/src/core/geom/Vector4.d.ts.map +1 -1
  70. package/src/core/geom/Vector4.js +8 -5
  71. package/src/core/geom/vec3/v3_distance_array.d.ts +11 -0
  72. package/src/core/geom/vec3/v3_distance_array.d.ts.map +1 -0
  73. package/src/core/geom/vec3/v3_distance_array.js +19 -0
  74. package/src/core/geom/vec3/v3_normalize_array_checked.d.ts +23 -0
  75. package/src/core/geom/vec3/v3_normalize_array_checked.d.ts.map +1 -0
  76. package/src/core/geom/vec3/v3_normalize_array_checked.js +49 -0
  77. package/src/core/geom/vec3/v3_reject_array.d.ts +15 -0
  78. package/src/core/geom/vec3/v3_reject_array.d.ts.map +1 -0
  79. package/src/core/geom/vec3/v3_reject_array.js +32 -0
  80. package/src/core/graph/csr/csr_build_incidence.d.ts +26 -0
  81. package/src/core/graph/csr/csr_build_incidence.d.ts.map +1 -0
  82. package/src/core/graph/csr/csr_build_incidence.js +71 -0
  83. package/src/core/graph/csr/csr_graph_color_greedy.d.ts +25 -0
  84. package/src/core/graph/csr/csr_graph_color_greedy.d.ts.map +1 -0
  85. package/src/core/graph/csr/csr_graph_color_greedy.js +83 -0
  86. package/src/core/graph/csr/csr_graph_validate_coloring.d.ts +15 -0
  87. package/src/core/graph/csr/csr_graph_validate_coloring.d.ts.map +1 -0
  88. package/src/core/graph/csr/csr_graph_validate_coloring.js +33 -0
  89. package/src/core/math/hash/XXH128Hash.d.ts +38 -0
  90. package/src/core/math/hash/XXH128Hash.d.ts.map +1 -0
  91. package/src/core/math/hash/XXH128Hash.js +55 -0
  92. package/src/core/math/hash/XXH3_SECRET.d.ts +13 -0
  93. package/src/core/math/hash/XXH3_SECRET.d.ts.map +1 -0
  94. package/src/core/math/hash/XXH3_SECRET.js +25 -0
  95. package/src/core/math/hash/crc32.d.ts +16 -0
  96. package/src/core/math/hash/crc32.d.ts.map +1 -0
  97. package/src/core/math/hash/crc32.js +96 -0
  98. package/src/core/math/hash/xxh3_128.d.ts +10 -0
  99. package/src/core/math/hash/xxh3_128.d.ts.map +1 -0
  100. package/src/core/math/hash/xxh3_128.js +341 -0
  101. package/src/core/math/hash/xxh3_64.d.ts +9 -0
  102. package/src/core/math/hash/xxh3_64.d.ts.map +1 -0
  103. package/src/core/math/hash/xxh3_64.js +241 -0
  104. package/src/core/math/hash/xxh3_common.d.ts +224 -0
  105. package/src/core/math/hash/xxh3_common.d.ts.map +1 -0
  106. package/src/core/math/hash/xxh3_common.js +476 -0
  107. package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.d.ts +26 -0
  108. package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.d.ts.map +1 -0
  109. package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.js +71 -0
  110. package/src/core/math/lookup/ParameterLookupTable.js +2 -2
  111. package/src/core/math/max2_exact.d.ts +15 -0
  112. package/src/core/math/max2_exact.d.ts.map +1 -0
  113. package/src/core/math/max2_exact.js +30 -0
  114. package/src/core/math/min2_exact.d.ts +20 -0
  115. package/src/core/math/min2_exact.d.ts.map +1 -0
  116. package/src/core/math/min2_exact.js +35 -0
  117. package/src/core/model/node-graph/node/NodeInstancePortReference.js +2 -2
  118. package/src/core/model/reactive/model/ReactiveBinaryExpression.js +2 -2
  119. package/src/core/model/reactive/model/terminal/ReactiveReference.js +2 -2
  120. package/src/engine/asset/AssetDescription.js +2 -2
  121. package/src/engine/ecs/animation/Animation.js +2 -2
  122. package/src/engine/ecs/animation/AnimationClip.d.ts.map +1 -1
  123. package/src/engine/ecs/animation/AnimationClip.js +7 -5
  124. package/src/engine/ecs/gui/GUIElement.d.ts.map +1 -1
  125. package/src/engine/ecs/gui/GUIElement.js +7 -5
  126. package/src/engine/ecs/gui/hud/HeadsUpDisplay.js +2 -2
  127. package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
  128. package/src/engine/ecs/gui/position/ViewportPosition.js +11 -7
  129. package/src/engine/ecs/ik/IKGoalSystem.d.ts.map +1 -1
  130. package/src/engine/ecs/ik/IKGoalSystem.js +3 -19
  131. package/src/engine/ecs/parent/parent_entity_model_of.d.ts +17 -0
  132. package/src/engine/ecs/parent/parent_entity_model_of.d.ts.map +1 -0
  133. package/src/engine/ecs/parent/parent_entity_model_of.js +26 -0
  134. package/src/engine/ecs/transform/Transform64.d.ts +1 -1
  135. package/src/engine/ecs/transform/Transform64.d.ts.map +1 -1
  136. package/src/engine/ecs/transform/Transform64.js +5 -4
  137. package/src/engine/ecs/transform/t64_read_pose_array.d.ts +15 -0
  138. package/src/engine/ecs/transform/t64_read_pose_array.d.ts.map +1 -0
  139. package/src/engine/ecs/transform/t64_read_pose_array.js +24 -0
  140. package/src/engine/graphics/ecs/animation/animator/AnimationClip.d.ts.map +1 -1
  141. package/src/engine/graphics/ecs/animation/animator/AnimationClip.js +8 -5
  142. package/src/engine/graphics/ecs/animation/animator/AnimationClipDefinition.js +2 -2
  143. package/src/engine/graphics/ecs/animation/animator/AnimationNotification.js +2 -2
  144. package/src/engine/graphics/ecs/animation/animator/AnimationNotificationDefinition.js +2 -2
  145. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationGraphDefinition.js +2 -2
  146. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationStateDefinition.js +2 -2
  147. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.d.ts.map +1 -1
  148. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.js +8 -5
  149. package/src/engine/graphics/ecs/decal/v2/Decal.d.ts.map +1 -1
  150. package/src/engine/graphics/ecs/decal/v2/Decal.js +9 -8
  151. package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.d.ts +2 -0
  152. package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.d.ts.map +1 -1
  153. package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.js +10 -21
  154. package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.d.ts.map +1 -1
  155. package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.js +9 -6
  156. package/src/engine/graphics3/AnimationGraphSystem.d.ts +5 -0
  157. package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
  158. package/src/engine/graphics3/AnimationGraphSystem.js +48 -2
  159. package/src/engine/graphics3/AnimationSystem.d.ts +5 -0
  160. package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
  161. package/src/engine/graphics3/AnimationSystem.js +47 -2
  162. package/src/engine/graphics3/ParticipatingMedia.js +204 -204
  163. package/src/engine/graphics3/animation/AnimationClips.d.ts +5 -0
  164. package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -1
  165. package/src/engine/graphics3/animation/AnimationClips.js +5 -0
  166. package/src/engine/graphics3/register_clips.d.ts +29 -0
  167. package/src/engine/graphics3/register_clips.d.ts.map +1 -1
  168. package/src/engine/graphics3/register_clips.js +52 -0
  169. package/src/engine/grid/obstacle/GridObstacle.js +2 -2
  170. package/src/engine/intelligence/behavior/selector/WeightedElement.js +2 -2
  171. package/src/engine/interpolation/Interpolated.js +2 -2
  172. package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts +9 -0
  173. package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts.map +1 -1
  174. package/src/engine/physics/broadphase/compute_fat_world_aabb.js +3 -1
  175. package/src/engine/physics/cloth/PLAN.md +10 -8
  176. package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts +22 -0
  177. package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts.map +1 -1
  178. package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +51 -19
  179. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
  180. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +16 -2
  181. package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -1
  182. package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +19 -24
  183. package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +7 -0
  184. package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -1
  185. package/src/engine/physics/cloth/collider/ClothColliderIndex.js +85 -67
  186. package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts.map +1 -1
  187. package/src/engine/physics/cloth/collider/cloth_collider_bounds.js +19 -101
  188. package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts +2 -5
  189. package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts.map +1 -1
  190. package/src/engine/physics/cloth/collider/cloth_collider_pack.js +7 -15
  191. package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -1
  192. package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +16 -61
  193. package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
  194. package/src/engine/physics/cloth/ecs/Cloth.js +7 -5
  195. package/src/engine/physics/cloth/ecs/ClothCollider.d.ts.map +1 -1
  196. package/src/engine/physics/cloth/ecs/ClothCollider.js +7 -5
  197. package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts +0 -1
  198. package/src/engine/physics/cloth/ecs/ClothColliderFlags.js +6 -19
  199. package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts +1 -2
  200. package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts.map +1 -1
  201. package/src/engine/physics/cloth/ecs/ClothColliderSystem.js +3 -12
  202. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
  203. package/src/engine/physics/cloth/ecs/ClothDynamics.js +20 -11
  204. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
  205. package/src/engine/physics/cloth/ecs/ClothWorld.js +40 -130
  206. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
  207. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +17 -58
  208. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
  209. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +3 -3
  210. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
  211. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +44 -104
  212. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -1
  213. package/src/engine/physics/cloth/ecs/cloth_geodesic.js +6 -13
  214. package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -1
  215. package/src/engine/physics/cloth/ecs/cloth_holds.js +15 -40
  216. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
  217. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +45 -79
  218. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
  219. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +7 -27
  220. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
  221. package/src/engine/physics/cloth/ecs/cloth_write_back.js +30 -62
  222. package/src/engine/physics/cloth/playground/cloth_playground_build.d.ts.map +1 -1
  223. package/src/engine/physics/cloth/playground/cloth_playground_build.js +2 -3
  224. package/src/engine/physics/cloth/playground/collide_main.js +2 -28
  225. package/src/engine/physics/cloth/playground/garment_main.js +4 -19
  226. package/src/engine/physics/cloth/playground/main.js +6 -48
  227. package/src/engine/physics/cloth/playground/rig_main.js +947 -955
  228. package/src/engine/physics/cloth/playground/wind_main.js +8 -7
  229. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  230. package/src/engine/physics/cloth/solver/ClothState.js +16 -76
  231. package/src/engine/physics/cloth/solver/cloth_color_particles.d.ts +10 -8
  232. package/src/engine/physics/cloth/solver/cloth_color_particles.d.ts.map +1 -1
  233. package/src/engine/physics/cloth/solver/cloth_color_particles.js +30 -102
  234. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
  235. package/src/engine/physics/cloth/solver/cloth_contact_find.js +3 -2
  236. package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -1
  237. package/src/engine/physics/cloth/solver/cloth_hold_line.js +2 -14
  238. package/src/engine/physics/cloth/solver/cloth_kinetic_energy.d.ts +21 -0
  239. package/src/engine/physics/cloth/solver/cloth_kinetic_energy.d.ts.map +1 -0
  240. package/src/engine/physics/cloth/solver/cloth_kinetic_energy.js +45 -0
  241. package/src/engine/physics/cloth/solver/cloth_particle_coupling.d.ts +32 -0
  242. package/src/engine/physics/cloth/solver/cloth_particle_coupling.d.ts.map +1 -0
  243. package/src/engine/physics/cloth/solver/cloth_particle_coupling.js +133 -0
  244. package/src/engine/physics/cloth/solver/cloth_particle_of_source.d.ts +16 -0
  245. package/src/engine/physics/cloth/solver/cloth_particle_of_source.d.ts.map +1 -0
  246. package/src/engine/physics/cloth/solver/cloth_particle_of_source.js +19 -0
  247. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
  248. package/src/engine/physics/cloth/solver/cloth_self_find.js +6 -55
  249. package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts.map +1 -1
  250. package/src/engine/physics/cloth/solver/cloth_solve_vertex.js +30 -65
  251. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  252. package/src/engine/physics/cloth/solver/cloth_step.js +6 -28
  253. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
  254. package/src/engine/physics/cloth/solver/cloth_step_instance.js +2 -3
  255. package/src/engine/physics/cloth/solver/cloth_stretch_residual.d.ts +21 -0
  256. package/src/engine/physics/cloth/solver/cloth_stretch_residual.d.ts.map +1 -0
  257. package/src/engine/physics/cloth/solver/cloth_stretch_residual.js +54 -0
  258. package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.d.ts +15 -0
  259. package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.d.ts.map +1 -1
  260. package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.js +28 -0
  261. package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.d.ts +30 -0
  262. package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.d.ts.map +1 -0
  263. package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.js +56 -0
  264. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
  265. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +3 -17
  266. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +2 -1
  267. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -1
  268. package/src/engine/physics/cloth/wind/ClothFluidWind.js +7 -25
  269. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +3 -1
  270. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
  271. package/src/engine/physics/cloth/wind/cloth_sample_air.js +40 -62
  272. package/src/engine/physics/ecs/ContactProbeSystem.d.ts.map +1 -1
  273. package/src/engine/physics/ecs/ContactProbeSystem.js +2 -18
  274. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  275. package/src/engine/physics/ecs/PhysicsSystem.js +9 -50
  276. package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
  277. package/src/engine/physics/fluid/FluidField.js +7 -5
  278. package/src/engine/physics/fluid/ecs/FluidComponent.d.ts.map +1 -1
  279. package/src/engine/physics/fluid/ecs/FluidComponent.js +19 -11
  280. package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.d.ts +24 -0
  281. package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.d.ts.map +1 -0
  282. package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.js +42 -0
  283. package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.d.ts +25 -0
  284. package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.d.ts.map +1 -0
  285. package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.js +40 -0
  286. package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts +2 -2
  287. package/src/engine/physics/fluid/effector/AbstractFluidEffector.js +2 -2
  288. package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts.map +1 -1
  289. package/src/engine/physics/fluid/effector/GlobalFluidEffector.js +11 -7
  290. package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts.map +1 -1
  291. package/src/engine/physics/fluid/effector/ImpulseFluidEffector.js +11 -7
  292. package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts.map +1 -1
  293. package/src/engine/physics/fluid/effector/WakeFluidEffector.js +16 -9
  294. package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.d.ts.map +1 -1
  295. package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.js +40 -90
  296. package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -1
  297. package/src/engine/physics/narrowphase/capsule_contacts.js +3 -5
  298. package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.d.ts.map +1 -1
  299. package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.js +2 -14
  300. package/src/engine/physics/narrowphase/hull_sphere_contact.d.ts.map +1 -1
  301. package/src/engine/physics/narrowphase/hull_sphere_contact.js +2 -5
  302. package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -1
  303. package/src/engine/physics/narrowphase/narrowphase_step.js +13 -32
  304. package/src/engine/physics/narrowphase/sphere_box_contact.d.ts.map +1 -1
  305. package/src/engine/physics/narrowphase/sphere_box_contact.js +2 -5
  306. package/src/engine/sound/ecs/audio/AudioEmitter.d.ts.map +1 -1
  307. package/src/engine/sound/ecs/audio/AudioEmitter.js +12 -7
  308. package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts.map +1 -1
  309. package/src/engine/sound/ecs/trigger/AudioEventTrigger.js +192 -191
  310. package/src/engine/sound/simulation/core/AcousticMedium.js +2 -2
  311. package/src/engine/sound/simulation/definition/AcousticDirectivity.js +2 -2
  312. package/src/engine/sound/simulation/definition/AcousticMaterial.d.ts.map +1 -1
  313. package/src/engine/sound/simulation/definition/AcousticMaterial.js +11 -7
  314. package/src/engine/sound/sopra/definition/BusDefinition.d.ts.map +1 -1
  315. package/src/engine/sound/sopra/definition/BusDefinition.js +5 -4
  316. package/src/engine/sound/sopra/definition/DuckingRule.d.ts.map +1 -1
  317. package/src/engine/sound/sopra/definition/DuckingRule.js +7 -5
  318. package/src/engine/sound/sopra/definition/EventDescription.d.ts.map +1 -1
  319. package/src/engine/sound/sopra/definition/EventDescription.js +23 -13
  320. package/src/engine/sound/sopra/definition/MixerSnapshot.js +2 -2
  321. package/src/engine/sound/sopra/definition/ParameterDefinition.d.ts.map +1 -1
  322. package/src/engine/sound/sopra/definition/ParameterDefinition.js +7 -5
  323. package/src/engine/sound/sopra/definition/clip/AbstractAudioClip.js +2 -2
  324. package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.d.ts.map +1 -1
  325. package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.js +4 -3
  326. package/src/engine/sound/sopra/definition/clip/ContainerAudioClip.js +2 -2
  327. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.js +3 -3
  328. package/src/engine/sound/sopra/definition/clip/SampleAudioClip.d.ts.map +1 -1
  329. package/src/engine/sound/sopra/definition/clip/SampleAudioClip.js +16 -9
  330. package/src/engine/sound/sopra/definition/clip/SilenceAudioClip.js +2 -2
  331. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts +1 -1
  332. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts.map +1 -1
  333. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.js +2 -2
  334. package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts.map +1 -1
  335. package/src/engine/sound/sopra/definition/effect/CompressorEffect.js +7 -5
  336. package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts.map +1 -1
  337. package/src/engine/sound/sopra/definition/effect/EqEffect.js +8 -5
  338. package/src/engine/sound/sopra/definition/effect/ReverbEffect.js +2 -2
  339. package/src/engine/sound/sopra/legacy/SoundEmitter.d.ts.map +1 -1
  340. package/src/engine/sound/sopra/legacy/SoundEmitter.js +357 -352
  341. package/src/engine/sound/sopra/legacy/SoundTrack.d.ts.map +1 -1
  342. package/src/engine/sound/sopra/legacy/SoundTrack.js +281 -278
  343. package/src/format/image/png/PNGReader.js +644 -644
  344. package/src/format/image/png/crc32.d.ts +1 -1
  345. package/src/format/image/png/crc32.js +7 -8
  346. package/src/format/texture/basis/transcode/etc1s_to_astc.d.ts.map +1 -1
  347. package/src/format/texture/basis/transcode/etc1s_to_astc.js +2 -1
  348. package/src/shade/descriptor/binding/BindGroupLayoutDescriptor.js +2 -2
  349. package/src/shade/descriptor/binding/BindGroupLayoutEntry.d.ts.map +1 -1
  350. package/src/shade/descriptor/binding/BindGroupLayoutEntry.js +12 -8
  351. package/src/shade/descriptor/binding/StorageTextureBindingLayout.js +2 -2
  352. package/src/shade/descriptor/binding/TextureBindingLayout.js +2 -2
  353. package/src/shade/descriptor/blend/BlendComponent.js +2 -2
  354. package/src/shade/descriptor/pipeline/PipelineDescriptorBase.js +2 -2
  355. package/src/shade/descriptor/pipeline/PipelineLayoutDescriptor.js +2 -2
  356. package/src/shade/descriptor/pipeline/ProgrammableStage.js +2 -2
  357. package/src/shade/descriptor/pipeline/compute/ComputePipelineDescriptor.js +2 -2
  358. package/src/shade/descriptor/pipeline/render/ColorTargetState.js +2 -2
  359. package/src/shade/descriptor/pipeline/render/FragmentState.js +2 -2
  360. package/src/shade/descriptor/pipeline/render/PrimitiveState.js +2 -2
  361. package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.d.ts.map +1 -1
  362. package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js +8 -5
  363. package/src/shade/descriptor/pipeline/render/VertexAttribute.js +2 -2
  364. package/src/shade/descriptor/texture/SamplerDescriptor.d.ts.map +1 -1
  365. package/src/shade/descriptor/texture/SamplerDescriptor.js +20 -12
  366. package/src/shade/descriptor/texture/TextureDescriptor.d.ts.map +1 -1
  367. package/src/shade/descriptor/texture/TextureDescriptor.js +11 -7
  368. package/src/shade/device/graph/BufferResourceDescriptor.d.ts.map +1 -1
  369. package/src/shade/device/graph/BufferResourceDescriptor.js +196 -193
  370. package/src/shade/device/graph/TextureResourceDescriptor.d.ts.map +1 -1
  371. package/src/shade/device/graph/TextureResourceDescriptor.js +178 -173
  372. package/src/shade/device/timing/profile/sgpt_read_header.js +1 -1
  373. package/src/shade/device/timing/profile/sgpt_read_records.js +1 -1
  374. package/src/shade/device/timing/profile/sgpt_write_header.js +1 -1
  375. package/src/shade/device/timing/profile/sgpt_write_record.js +1 -1
  376. package/src/shade/playground/image_decode_bench/main.js +2 -1
  377. package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.d.ts.map +1 -1
  378. package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.js +2 -1
  379. package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.d.ts.map +1 -1
  380. package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.js +2 -1
  381. package/src/shade/playground/ssr_variance/statistics.d.ts.map +1 -1
  382. package/src/shade/playground/ssr_variance/statistics.js +2 -1
  383. package/src/shade/playground/texture_encode/main.d.ts.map +1 -1
  384. package/src/shade/playground/texture_encode/main.js +2 -1
  385. package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
  386. package/src/shade/playground/volumetrics_froxel/measure.js +2 -1
  387. package/src/shade/renderer/binding/BufferBinding.js +2 -2
  388. package/src/shade/renderer/buffer/table/gpu_database_check_links.d.ts.map +1 -1
  389. package/src/shade/renderer/buffer/table/gpu_database_check_links.js +2 -1
  390. package/src/shade/renderer/camera/Camera.js +2 -2
  391. package/src/shade/renderer/geometry/Attribute.js +2 -2
  392. package/src/shade/renderer/geometry/Geometry.js +2 -2
  393. package/src/shade/renderer/geometry/geometry_deduplicate_vertices.js +2 -2
  394. package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +2 -2
  395. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts.map +1 -1
  396. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +3 -2
  397. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.d.ts.map +1 -1
  398. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.js +2 -1
  399. package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.d.ts.map +1 -1
  400. package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.js +2 -1
  401. package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.d.ts.map +1 -1
  402. package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.js +2 -1
  403. package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.d.ts.map +1 -1
  404. package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.js +3 -2
  405. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.d.ts.map +1 -1
  406. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.js +2 -1
  407. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.d.ts.map +1 -1
  408. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.js +2 -1
  409. package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_asset_id.js +13 -13
  410. package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_directory_block_checksum.js +41 -41
  411. package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_frame_checksum.js +41 -41
  412. package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_header_checksum.js +25 -25
  413. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
  414. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +3 -2
  415. package/src/shade/renderer/material/StandardShadeMaterial.d.ts.map +1 -1
  416. package/src/shade/renderer/material/StandardShadeMaterial.js +13 -8
  417. package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.d.ts.map +1 -1
  418. package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.js +3 -2
  419. package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.d.ts.map +1 -1
  420. package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.js +14 -5
  421. package/src/shade/renderer/scene/optimization/sampler2d_from_image_bitmap.js +1 -1
  422. package/src/shade/renderer/shader/type/WGSLStructField.js +2 -2
  423. package/src/shade/renderer/shader/type/WebGPUArray.js +2 -2
  424. package/src/shade/renderer/shader/type/WebGPUStruct.d.ts.map +1 -1
  425. package/src/shade/renderer/shader/type/WebGPUStruct.js +9 -6
  426. package/src/shade/renderer/texture/ShadeTexture.d.ts.map +1 -1
  427. package/src/shade/renderer/texture/ShadeTexture.js +17 -10
  428. package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +2 -2
  429. package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +4 -4
  430. package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +6 -6
  431. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
  432. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +46 -55
  433. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts +3 -3
  434. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts.map +1 -1
  435. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js +14 -4
  436. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts +10 -1
  437. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
  438. package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +82 -40
  439. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts +4 -1
  440. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -1
  441. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +8 -4
  442. package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts +98 -86
  443. package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts.map +1 -1
  444. package/src/shade/renderer/water/surface/particles/shader_water_particles.js +440 -298
  445. package/src/view/common/HTMLElementCacheKey.d.ts.map +1 -1
  446. package/src/view/common/HTMLElementCacheKey.js +4 -3
  447. package/src/view/minimap/MinimapMarker.js +2 -2
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
3
3
  import { round_up } from "../../../../core/math/round_up.js";
4
4
  import { CodeChunk } from "../compiler/CodeChunk.js";
5
5
  import { f32, u32, vec4f, vec4u } from "./WEBGPU_WGSL_PRIMITIVE_TYPES.js";
@@ -61,7 +61,7 @@ export class WebGPUArray extends WebGPUType {
61
61
  }
62
62
 
63
63
  hash() {
64
- return combine_hash(
64
+ return hash_mix2(
65
65
  this.type.hash(),
66
66
  this.count
67
67
  );
@@ -1 +1 @@
1
- {"version":3,"file":"WebGPUStruct.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shader/type/WebGPUStruct.js"],"names":[],"mappings":"AA0BA;;;;GAIG;AACH;IAiNI;;;;;;;;;;;;;;OAcG;IACH,8BAHW,MAAM,GACL,YAAY,CAiCvB;IAED;;;;OAIG;IACH,6BAHc,eAAe,KACjB,YAAY,CAiBvB;IA1QD;;;OAGG;IACH,uBAEC;IAVD,kBAEC;IAUD;;;OAGG;IACH,iBAFU,eAAe,EAAE,CAEf;IAmBZ;;;;OAIG;IACH,YAHW,YAAY,GACV,IAAI,CAwBhB;IAED;;;OAGG;IACH,SAFY,YAAY,CAUvB;IAED;;;;;;;;OAQG;IACH,kBAJa,MAAM,CA+BlB;IAED;;;;;;OAMG;IACH,QAFa,IAAI,CAoChB;IAED,4BAYC;IAqGD;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAKnB;IAGD;;;;;OAKG;IACH,gBAJW,MAAM,GACL,eAAe,CAa1B;IA8GL;;;OAGG;IACH,mBAFU,OAAO,CAEc;;CAN9B;2BArb0B,iBAAiB;gCAEZ,sBAAsB"}
1
+ {"version":3,"file":"WebGPUStruct.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shader/type/WebGPUStruct.js"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH;IAmNI;;;;;;;;;;;;;;OAcG;IACH,8BAHW,MAAM,GACL,YAAY,CAiCvB;IAED;;;;OAIG;IACH,6BAHc,eAAe,KACjB,YAAY,CAiBvB;IA5QD;;;OAGG;IACH,uBAEC;IAVD,kBAEC;IAUD;;;OAGG;IACH,iBAFU,eAAe,EAAE,CAEf;IAmBZ;;;;OAIG;IACH,YAHW,YAAY,GACV,IAAI,CAwBhB;IAED;;;OAGG;IACH,SAFY,YAAY,CAUvB;IAED;;;;;;;;OAQG;IACH,kBAJa,MAAM,CA+BlB;IAED;;;;;;OAMG;IACH,QAFa,IAAI,CAoChB;IAED,4BAYC;IAuGD;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAKnB;IAGD;;;;;OAKG;IACH,gBAJW,MAAM,GACL,eAAe,CAa1B;IA8GL;;;OAGG;IACH,mBAFU,OAAO,CAEc;;CAN9B;2BAvb0B,iBAAiB;gCAEZ,sBAAsB"}
@@ -1,6 +1,7 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
2
  import LineBuilder from "../../../../core/codegen/LineBuilder.js";
3
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
3
+ import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
4
+ import { hash_mix3 } from "../../../../core/math/hash/hash_mix3.js";
4
5
  import { isArrayEqual } from "../../../../core/collection/array/isArrayEqual.js";
5
6
  import { round_up } from "../../../../core/math/round_up.js";
6
7
  import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
@@ -210,11 +211,13 @@ export class WebGPUStruct extends WebGPUType {
210
211
  }
211
212
 
212
213
  hash() {
213
- return combine_hash(
214
- computeStringHash(this.name),
215
- this.#size,
216
- this.#align,
217
- this.fields.length,
214
+ return hash_mix2(
215
+ hash_mix3(
216
+ computeStringHash(this.name),
217
+ this.#size,
218
+ this.#align
219
+ ),
220
+ this.fields.length
218
221
  );
219
222
  }
220
223
 
@@ -1 +1 @@
1
- {"version":3,"file":"ShadeTexture.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/texture/ShadeTexture.js"],"names":[],"mappings":"AAcA;IA4GI;;;;OAIG;IACH,oBAHW,UAAU,GACR,YAAY,CAiBxB;IA/HD,cAAW;IAOX;;;OAGG;IACH,8BAEC;IAED;;;;;;;;;;;;;OAaG;IACH,aAFU,UAAU,GAAC,MAAM,GAAC,IAAI,CAEb;IAEnB;;;OAGG;IACH,yDAEC;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,iBAAiB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,iBAAiB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,iBAAiB,SACxB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,iBAAiB,GACtB,OAAO,CAInB;IAED,cAAsB;IAEtB,kBAAqC;IACrC,kBAAqC;IAErC;;;OAGG;IACH,cAFU,iBAAiB,CAEa;IAExC,cAA+B;IAC/B,cAA+B;IAC/B,cAA+B;IAE/B;;;OAGG;IACH,YAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,wBAFU,iBAAiB,GAAC,MAAM,CAEgB;IAwBlD,eAWC;IAED;;;;OAIG;IACH,cAHW,YAAY,GACV,OAAO,CAYnB;;CACJ;yBArKY,OAAO,wBAAwB,EAAE,UAAU;yBAC3C,OAAO,iBAAiB,EAAE,UAAU;kCANf,wBAAwB;kCACxB,wBAAwB"}
1
+ {"version":3,"file":"ShadeTexture.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/texture/ShadeTexture.js"],"names":[],"mappings":"AAeA;IA4GI;;;;OAIG;IACH,oBAHW,UAAU,GACR,YAAY,CAiBxB;IA/HD,cAAW;IAOX;;;OAGG;IACH,8BAEC;IAED;;;;;;;;;;;;;OAaG;IACH,aAFU,UAAU,GAAC,MAAM,GAAC,IAAI,CAEb;IAEnB;;;OAGG;IACH,yDAEC;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,iBAAiB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,iBAAiB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,iBAAiB,SACxB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,iBAAiB,GACtB,OAAO,CAInB;IAED,cAAsB;IAEtB,kBAAqC;IACrC,kBAAqC;IAErC;;;OAGG;IACH,cAFU,iBAAiB,CAEa;IAExC,cAA+B;IAC/B,cAA+B;IAC/B,cAA+B;IAE/B;;;OAGG;IACH,YAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,wBAFU,iBAAiB,GAAC,MAAM,CAEgB;IAwBlD,eAiBC;IAED;;;;OAIG;IACH,cAHW,YAAY,GACV,OAAO,CAYnB;;CACJ;yBA3KY,OAAO,wBAAwB,EAAE,UAAU;yBAC3C,OAAO,iBAAiB,EAAE,UAAU;kCANf,wBAAwB;kCACxB,wBAAwB"}
@@ -1,5 +1,6 @@
1
1
  import { assert } from "../../../core/assert.js";
2
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix2 } from "../../../core/math/hash/hash_mix2.js";
3
+ import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
3
4
  import { optional_hash } from "../../../core/model/object/optional_hash.js";
4
5
  import { ShadeTextureFlags } from "./ShadeTextureFlags.js";
5
6
  import { TextureFilterType } from "./TextureFilterType.js";
@@ -143,15 +144,21 @@ export class ShadeTexture {
143
144
  }
144
145
 
145
146
  hash() {
146
- return combine_hash(
147
- optional_hash(this.#image),
148
- this.flags,
149
- this.minFilter,
150
- this.magFilter,
151
- this.mipmapFilter,
152
- this.wrapS,
153
- this.wrapT,
154
- this.wrapR,
147
+ return hash_mix2(
148
+ hash_mix3(
149
+ hash_mix3(
150
+ hash_mix3(
151
+ optional_hash(this.#image),
152
+ this.flags,
153
+ this.minFilter
154
+ ),
155
+ this.magFilter,
156
+ this.mipmapFilter
157
+ ),
158
+ this.wrapS,
159
+ this.wrapT
160
+ ),
161
+ this.wrapR
155
162
  );
156
163
  }
157
164
 
@@ -1,7 +1,7 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
2
  import { BinaryBuffer } from "../../../../core/binary/BinaryBuffer.js";
3
3
  import { platform_compute_endianness } from "../../../../core/binary/platform_compute_endianness.js";
4
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
4
+ import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
5
5
  import { HashMap } from "../../../../core/collection/map/HashMap.js";
6
6
  import { Deque } from "../../../../core/collection/queue/Deque.js";
7
7
  import { round_up } from "../../../../core/math/round_up.js";
@@ -69,7 +69,7 @@ class MipmapShaderKey {
69
69
  * @return {number}
70
70
  */
71
71
  hash() {
72
- return combine_hash(
72
+ return hash_mix2(
73
73
  computeStringHash(this.format),
74
74
  this.filter,
75
75
  )
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Most particle entries one point reads, over every level. Where a point would read more than
3
- * WATER_PARTICLE_CELL_SHARE, the bin pass thins its cells to about that many between them, the same packets in every
4
- * cell they reach, and where whole fronts would still crowd it past this, its cells keep no more than their part of
5
- * it. So a point reads all of its cells, short of a cell only one front reaches (~40 entries at most).
2
+ * Most particle entries one point reads, over every level. A front's run of particles in a cell is one entry, so a
3
+ * point reads about one a front that reaches it; where it would read more than WATER_PARTICLE_CROWD_KEEP, the keep
4
+ * pass dooms the flattest runs in its cells, which fade out while what is left of the budget still draws them, and
5
+ * cuts, whole, the fronts the budget cannot hold.
6
6
  */
7
7
  export const WATER_PARTICLE_GATHER_BUDGET: 64;
8
8
  /**
@@ -5,10 +5,10 @@ import { chunk_water_spectrum } from "./spectrum/chunk_water_spectrum.js";
5
5
  import { chunk_water_particle } from "./particles/chunk_water_particle.js";
6
6
 
7
7
  /**
8
- * Most particle entries one point reads, over every level. Where a point would read more than
9
- * WATER_PARTICLE_CELL_SHARE, the bin pass thins its cells to about that many between them, the same packets in every
10
- * cell they reach, and where whole fronts would still crowd it past this, its cells keep no more than their part of
11
- * it. So a point reads all of its cells, short of a cell only one front reaches (~40 entries at most).
8
+ * Most particle entries one point reads, over every level. A front's run of particles in a cell is one entry, so a
9
+ * point reads about one a front that reaches it; where it would read more than WATER_PARTICLE_CROWD_KEEP, the keep
10
+ * pass dooms the flattest runs in its cells, which fade out while what is left of the budget still draws them, and
11
+ * cuts, whole, the fronts the budget cannot hold.
12
12
  */
13
13
  export const WATER_PARTICLE_GATHER_BUDGET = 64;
14
14
 
@@ -133,8 +133,8 @@ fn water_surface_sum(wave: u32, p: vec2<f32>, footprint: f32) -> WaterSurfaceSum
133
133
  visited++;
134
134
  let entry = water_particle_entries[i];
135
135
  if (entry.key != key || any(entry.cell != cell)) { continue; }
136
- let field = water_particle_field(p - entry.position, entry.angle, entry.amplitude, entry.radius, entry.half_length,
137
- entry.dispersion, entry.distance, entry.phase);
136
+ let field = water_particle_run_field(p - entry.position, entry.angle, entry.amplitude, entry.radius, entry.half_length,
137
+ entry.dispersion, entry.distance, entry.phase, entry.run);
138
138
  // a packet is geometry while its wavelength spans eight samples, fading out by four
139
139
  let f = clamp(log2(entry.radius / (2.0 * footprint)), 0.0, 1.0);
140
140
  let rough = sqrt(1.0 - f * f);
@@ -1 +1 @@
1
- {"version":3,"file":"GPUWaterParticles.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/GPUWaterParticles.js"],"names":[],"mappings":"AAkCA,kHAAkH;AAClH,+CAAgD;AAUhD;;;;GAIG;AACH;IA0BI,uFAAuF;IACvF,yBAAuC;IACvC,kGAAkG;IAClG,yBAAuC;IACvC,uGAAuG;IACvG,6BAA+C;IAC/C,mEAAmE;IACnE,2BAAyD;IACzD,uBAAyC;IAEzC;;;;;;;;;;;OAWG;IACH,qCALW,MAAM,QACN,MAAM,UACK,OAAO,8CAA8C,EAAE,sBAAsB,KAAE,IAAI,GAAC,IAAI,CA6D7G;IAED,gBAgBC;IAED;;;;;;;;;;;;;;;OAeG;IACH;QATyG,KAAK,EAAnG,OAAO,iEAAiE,EAAE,UAAU;QACpE,KAAK,EAArB,MAAM;QACa,KAAK;QACL,QAAQ;QACR,SAAS;QACT,QAAQ;QACX,YAAY,EAA5B,MAAM;QACU,EAAE,EAAlB,MAAM;aAmGhB;;CACJ"}
1
+ {"version":3,"file":"GPUWaterParticles.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/GPUWaterParticles.js"],"names":[],"mappings":"AAkCA,kHAAkH;AAClH,+CAAgD;AAUhD;;;;GAIG;AACH;IAwBI,uFAAuF;IACvF,yBAAuC;IACvC,kGAAkG;IAClG,yBAAuC;IACvC,uGAAuG;IACvG,6BAA+C;IAC/C,mEAAmE;IACnE,2BAAyD;IACzD,uBAAyC;IAEzC;;;;;;;;;;;OAWG;IACH,qCALW,MAAM,QACN,MAAM,UACK,OAAO,8CAA8C,EAAE,sBAAsB,KAAE,IAAI,GAAC,IAAI,CA4D7G;IAED,gBAeC;IAED;;;;;;;;;;;;;;;OAeG;IACH;QATyG,KAAK,EAAnG,OAAO,iEAAiE,EAAE,UAAU;QACpE,KAAK,EAArB,MAAM;QACa,KAAK;QACL,QAAQ;QACR,SAAS;QACT,QAAQ;QACX,YAAY,EAA5B,MAAM;QACU,EAAE,EAAlB,MAAM;aA8FhB;;CACJ"}
@@ -14,15 +14,15 @@ import {
14
14
  shader_water_particles_bin,
15
15
  shader_water_particles_bounds,
16
16
  shader_water_particles_clear,
17
+ shader_water_particles_cut,
17
18
  shader_water_particles_emit,
18
19
  shader_water_particles_finalize,
19
- shader_water_particles_fronts,
20
- shader_water_particles_groups,
20
+ shader_water_particles_keep,
21
+ shader_water_particles_links,
22
+ shader_water_particles_mark,
21
23
  shader_water_particles_nest,
22
24
  shader_water_particles_rank,
23
- shader_water_particles_runs,
24
25
  shader_water_particles_scatter,
25
- shader_water_particles_share,
26
26
  shader_water_particles_split,
27
27
  shader_water_particles_total,
28
28
  shader_water_particles_update,
@@ -58,17 +58,15 @@ export class GPUWaterParticles {
58
58
  #children = null;
59
59
  #child_sums = null;
60
60
  #images = null;
61
- #fronts = null;
62
- #front_sums = null;
63
- #runs = null;
64
- #draw = null;
61
+ #links = null;
62
+ #reaches = null;
63
+ #shown = null;
65
64
  #buckets = null;
66
65
  #offsets = null;
67
66
  #slots = null;
68
67
  #bucket_amplitude = null;
69
- #bucket_weight = null;
68
+ #bucket_crowd = null;
70
69
  #bucket_nest = null;
71
- #visible = null;
72
70
  #staging = null;
73
71
  #entries = null;
74
72
  #body_bounds = null;
@@ -114,22 +112,21 @@ export class GPUWaterParticles {
114
112
  this.#child_sums = buffer('child sums', sums(capacity));
115
113
  // per particle the mirror image the step left beside it at the outline
116
114
  this.#images = buffer('images', capacity * WATER_PARTICLE_STRUCT.size);
117
- // per particle whether it starts a run, then the scanned run it is in; per run its first particle and its
118
- // share; per particle its run and how it is drawn
119
- this.#fronts = buffer('fronts', 16 + capacity * 4);
120
- this.#front_sums = buffer('front sums', sums(capacity));
121
- this.#runs = buffer('runs', capacity * 8);
122
- this.#draw = buffer('draw', capacity * 8);
115
+ // per particle its front's neighbours before and after it
116
+ this.#links = buffer('links', capacity * 8);
117
+ // per particle the cells its support overlaps this frame: its first, its level and spans
118
+ this.#reaches = buffer('reaches', capacity * 12);
119
+ // per particle whether its crowds draw it
120
+ this.#shown = buffer('shown', capacity * 4);
123
121
  // per bucket its entries, then the hash: table size and inclusive offsets
124
122
  this.#buckets = buffer('buckets', 16 + this.#table_limit * 4);
125
123
  this.#offsets = buffer('offsets', sums(this.#table_limit));
126
124
  this.#slots = buffer('slots', capacity * WATER_PARTICLE_CORNERS * 4);
127
125
  this.#bucket_amplitude = buffer('bucket amplitude', this.#table_limit * 4);
128
- // the summed steepness, the largest front and front complement entered, and the entries; then the most a point
129
- // under it reads, and its entries by key
130
- this.#bucket_weight = buffer('bucket weight', this.#table_limit * WATER_PARTICLE_CROWD_WORDS * 4);
126
+ // its runs by steepness class and in all; then the most a point under it reads at finer levels, the classes its
127
+ // points keep and draw, and a slot of the frame's table of cut fronts
128
+ this.#bucket_crowd = buffer('bucket crowd', this.#table_limit * WATER_PARTICLE_CROWD_WORDS * 4);
131
129
  this.#bucket_nest = buffer('bucket nest', this.#table_limit * WATER_PARTICLE_NEST_WORDS * 4);
132
- this.#visible = buffer('visible', capacity * 4);
133
130
  const entries = capacity * WATER_PARTICLE_CORNERS * WATER_PARTICLE_ENTRY_STRUCT.size;
134
131
  this.#staging = buffer('staging', entries);
135
132
  this.#entries = buffer('entries', entries);
@@ -157,16 +154,15 @@ export class GPUWaterParticles {
157
154
  }
158
155
 
159
156
  dispose() {
160
- for (const buffer of [...this.#particles, this.#children, this.#child_sums, this.#images, this.#fronts, this.#front_sums, this.#runs,
161
- this.#draw, this.#buckets, this.#offsets, this.#slots, this.#bucket_amplitude, this.#bucket_weight, this.#bucket_nest, this.#visible,
162
- this.#staging, this.#entries, this.#body_bounds, ...(this.#commands ?? [])]) {
157
+ for (const buffer of [...this.#particles, this.#children, this.#child_sums, this.#images, this.#links, this.#reaches, this.#shown, this.#buckets,
158
+ this.#offsets, this.#slots, this.#bucket_amplitude, this.#bucket_crowd, this.#bucket_nest, this.#staging, this.#entries, this.#body_bounds,
159
+ ...(this.#commands ?? [])]) {
163
160
  buffer?.destroy();
164
161
  }
165
162
  this.#particles = [];
166
163
  this.#children = this.#child_sums = this.#images = this.#buckets = this.#offsets = this.#slots = this.#bucket_amplitude = null;
167
164
  this.#staging = this.#entries = null;
168
- this.#fronts = this.#front_sums = this.#runs = this.#draw = null;
169
- this.#bucket_weight = this.#bucket_nest = this.#visible = null;
165
+ this.#links = this.#reaches = this.#shown = this.#bucket_crowd = this.#bucket_nest = null;
170
166
  this.#body_bounds = null;
171
167
  this.#commands = null;
172
168
  this.#device = null;
@@ -205,8 +201,6 @@ export class GPUWaterParticles {
205
201
  let child_sums = graph_import_buffer(graph, this.#child_sums, 'Water / particle child sums');
206
202
  let buckets = graph_import_buffer(graph, this.#buckets, 'Water / particle buckets');
207
203
  let offsets = graph_import_buffer(graph, this.#offsets, 'Water / particle offsets');
208
- let fronts = graph_import_buffer(graph, this.#fronts, 'Water / particle fronts');
209
- let front_sums = graph_import_buffer(graph, this.#front_sums, 'Water / particle front sums');
210
204
  const node = (name, execute, reads, writes) => {
211
205
  const data = {};
212
206
  const pass = graph.add(name, data, (d, resources, context) => execute(resources, context, d));
@@ -243,49 +237,46 @@ export class GPUWaterParticles {
243
237
  }, { child_sums }, {});
244
238
  }
245
239
 
246
- // Each front's run of particles, so that a whole one is drawn as the seven it was emitted as.
247
- fronts = node('Water / particles fronts', (resources, { encoder }) => {
240
+ // The frame's hash: each particle's neighbours round its front, so that a run of them is drawn as one; how crowded
241
+ // each cell is and so which runs it keeps, the steepest, dooming the rest and cutting, whole, the fronts the gather
242
+ // cannot read;
243
+ // then each drawn run entered into every cell its first particle's support overlaps, offsets, entries in order.
244
+ buckets = node('Water / particles bin', (resources, { encoder }) => {
248
245
  if (!stepping) {
249
246
  // the table size the last stepping frame chose for these particles
250
247
  shader_water_particles_finalize.dispatch({ encoder, bindings: { limits: { capacity, table_limit }, next, offsets: this.#buckets,
251
248
  table_command: command_table } });
252
249
  }
253
250
  build_indirect_compute_dispatch_command(64, encoder, next, 0, command_next, 0, true);
254
- encoder.copyBufferToBuffer(next, 0, this.#fronts, 0, 4);
255
- shader_water_particles_fronts.dispatchIndirect({ encoder, command: command_next, bindings: { next, fronts: this.#fronts } });
256
- }, {}, { fronts }).fronts;
257
- front_sums = graph_prefix_scan_csdldf({ graph, input: fronts, output: front_sums, element_max_count: capacity });
258
-
259
- // The frame's hash: how each particle is drawn, how crowded each cell is and so how much of each run its crowd
260
- // leaves drawn, then each packet drawn into the cells its support overlaps, offsets, entries in order.
261
- buckets = node('Water / particles bin', (resources, { encoder }) => {
262
- const draw = this.#draw, runs = this.#runs;
263
- shader_water_particles_runs.dispatchIndirect({ encoder, command: command_next, bindings: { next, fronts: this.#front_sums, runs } });
264
- shader_water_particles_groups.dispatchIndirect({ encoder, command: command_next, bindings: { next, fronts: this.#front_sums, runs, draw } });
251
+ const links = this.#links;
252
+ const reaches = this.#reaches;
253
+ shader_water_particles_links.dispatchIndirect({ encoder, command: command_next, bindings: { next, links, reaches } });
265
254
  shader_water_particles_clear.dispatchIndirect({ encoder, command: command_table, bindings: {
266
- buckets: this.#buckets, bucket_amplitude: this.#bucket_amplitude, bucket_weight: this.#bucket_weight,
267
- bucket_nest: this.#bucket_nest } });
268
- shader_water_particles_weigh.dispatchIndirect({ encoder, command: command_next, bindings: {
269
- next, activity, offsets: this.#buckets, draw, bucket_weight: this.#bucket_weight, body_bounds: this.#body_bounds } });
270
- shader_water_particles_nest.dispatchIndirect({ encoder, command: command_next, bindings: {
271
- next, activity, offsets: this.#buckets, draw, body_bounds: this.#body_bounds, bucket_weight: this.#bucket_weight,
255
+ buckets: this.#buckets, bucket_amplitude: this.#bucket_amplitude, bucket_crowd: this.#bucket_crowd,
272
256
  bucket_nest: this.#bucket_nest } });
273
- shader_water_particles_share.dispatchIndirect({ encoder, command: command_next, bindings: {
274
- next, activity, offsets: this.#buckets, bucket_weight: this.#bucket_weight, bucket_nest: this.#bucket_nest,
275
- body_bounds: this.#body_bounds, draw, runs } });
257
+ const crowd = { next, activity, offsets: this.#buckets, links, reaches, body_bounds: this.#body_bounds,
258
+ bucket_crowd: this.#bucket_crowd };
259
+ shader_water_particles_weigh.dispatchIndirect({ encoder, command: command_next, bindings: crowd });
260
+ shader_water_particles_nest.dispatchIndirect({ encoder, command: command_next, bindings: { ...crowd, bucket_nest: this.#bucket_nest } });
261
+ shader_water_particles_cut.dispatchIndirect({ encoder, command: command_next, bindings: { ...crowd, bucket_nest: this.#bucket_nest } });
262
+ const shown = this.#shown;
263
+ shader_water_particles_mark.dispatchIndirect({ encoder, command: command_next, bindings: {
264
+ next, activity, offsets: this.#buckets, reaches, bucket_nest: this.#bucket_nest } });
265
+ shader_water_particles_keep.dispatchIndirect({ encoder, command: command_next, bindings: {
266
+ next, activity, offsets: this.#buckets, reaches, bucket_nest: this.#bucket_nest, shown } });
276
267
  shader_water_particles_bin.dispatchIndirect({ encoder, command: command_next, bindings: {
277
268
  next, activity, buckets: this.#buckets, slots: this.#slots, bucket_amplitude: this.#bucket_amplitude,
278
- body_bounds: this.#body_bounds, draw, runs, visible: this.#visible } });
279
- }, { front_sums }, { buckets }).buckets;
269
+ body_bounds: this.#body_bounds, links, reaches, shown } });
270
+ }, {}, { buckets }).buckets;
280
271
  offsets = graph_prefix_scan_csdldf({ graph, input: buckets, output: offsets, element_max_count: table_limit });
281
272
  node('Water / particles order and bound', (resources, { encoder }) => {
282
- const bindings = { next, offsets: this.#offsets, slots: this.#slots, draw: this.#draw };
273
+ const bindings = { next, offsets: this.#offsets, slots: this.#slots, reaches: this.#reaches };
283
274
  shader_water_particles_scatter.dispatchIndirect({ encoder, command: command_next, bindings: { ...bindings,
284
- visible: this.#visible, staging: this.#staging } });
275
+ links: this.#links, shown: this.#shown, staging: this.#staging } });
285
276
  shader_water_particles_rank.dispatchIndirect({ encoder, command: command_next, bindings: { ...bindings,
286
277
  staging: this.#staging, entries: this.#entries } });
287
- shader_water_particles_bounds.dispatchIndirect({ encoder, command: command_next, bindings: { next, activity,
288
- offsets: this.#offsets, bucket_amplitude: this.#bucket_amplitude, draw: this.#draw, body_bounds: this.#body_bounds } });
278
+ shader_water_particles_bounds.dispatchIndirect({ encoder, command: command_next, bindings: { ...bindings, activity,
279
+ bucket_amplitude: this.#bucket_amplitude, body_bounds: this.#body_bounds } });
289
280
  }, { offsets }, {});
290
281
  }
291
282
  }
@@ -8,9 +8,9 @@
8
8
  */
9
9
  export const WATER_PARTICLE_STRUCT: WebGPUStruct;
10
10
  /**
11
- * A particle as one hash cell holds it for the surface sampler: everything its kernel needs at the frame's
12
- * time, and the cell it was entered for, since one particle is entered in every cell its support overlaps and
13
- * two cells may share a bucket.
11
+ * A run of a front's particles as one hash cell holds it for the surface sampler: everything its kernel needs at the
12
+ * frame's time, from the run's first particle, and the cell it was entered for, since a front is entered in every cell
13
+ * its support overlaps and two cells may share a bucket.
14
14
  */
15
15
  export const WATER_PARTICLE_ENTRY_STRUCT: WebGPUStruct;
16
16
  import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
@@ -1 +1 @@
1
- {"version":3,"file":"WATER_PARTICLE_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,iDAoBoB;AAEpB;;;;GAIG;AACH,uDAkByB;6BAvDI,sCAAsC"}
1
+ {"version":3,"file":"WATER_PARTICLE_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,iDAyBoB;AAEpB;;;;GAIG;AACH,uDAuByB;6BAjEI,sCAAsC"}
@@ -29,12 +29,17 @@ export const WATER_PARTICLE_STRUCT = WebGPUStruct.from({
29
29
  * image was emitted then, and it dies once the last of it has left too. 0 from emission.
30
30
  */
31
31
  reflected: u32,
32
+ /**
33
+ * 0, or once a crowd it cannot be drawn in has doomed it, the steepness |a|/r below which it dies: it fades from
34
+ * then on, as a packet below the drawing threshold does.
35
+ */
36
+ fading: f32,
32
37
  }, 'WaterParticle');
33
38
 
34
39
  /**
35
- * A particle as one hash cell holds it for the surface sampler: everything its kernel needs at the frame's
36
- * time, and the cell it was entered for, since one particle is entered in every cell its support overlaps and
37
- * two cells may share a bucket.
40
+ * A run of a front's particles as one hash cell holds it for the surface sampler: everything its kernel needs at the
41
+ * frame's time, from the run's first particle, and the cell it was entered for, since a front is entered in every cell
42
+ * its support overlaps and two cells may share a bucket.
38
43
  */
39
44
  export const WATER_PARTICLE_ENTRY_STRUCT = WebGPUStruct.from({
40
45
  position: vec2f,
@@ -48,10 +53,15 @@ export const WATER_PARTICLE_ENTRY_STRUCT = WebGPUStruct.from({
48
53
  phase: f32,
49
54
  /** water_waves row and level, as water_particle_key packs them */
50
55
  key: u32,
51
- /** Index of the particle, which orders a bucket. */
56
+ /** Index of the run's first particle, which orders a bucket. */
52
57
  source: u32,
53
58
  /** How far the particle stands from its front's centre, metres. */
54
59
  distance: f32,
55
60
  /** Half the length of its envelope across its front, metres. */
56
61
  half_length: f32,
62
+ /**
63
+ * The run of the front's particles it draws, from this one on, each β further round: their count, and which ends
64
+ * are open, tapering by the end particle's own window (chunk_water_particle's water_particle_run_profile).
65
+ */
66
+ run: u32,
57
67
  }, 'WaterParticleEntry');
@@ -19,6 +19,14 @@ export const WATER_PARTICLE_LEVEL0_CELL: number;
19
19
  * gathers at that speed and the peak falls as t^(−1/3), which no κ draws: up to 16% below r = 12 mm, 27% at 3 cm.
20
20
  */
21
21
  export const WATER_PARTICLE_STRETCH: number[];
22
+ /** Bits of a hash entry's run word that hold its count of particles; the two above them mark its open ends. */
23
+ export const WATER_PARTICLE_RUN_MEMBERS: 1073741823;
24
+ /** A run whose first particle has no neighbour of its front before it: it tapers there by that particle's window. */
25
+ export const WATER_PARTICLE_RUN_OPEN_START: 1073741824;
26
+ /** A run whose last particle has no neighbour of its front after it. */
27
+ export const WATER_PARTICLE_RUN_OPEN_END: 2147483648;
28
+ /** A particle drawn alone: a run of one, open at both ends, which is its own window. */
29
+ export const WATER_PARTICLE_LONE: number;
22
30
  /**
23
31
  * The physics of one wave particle as pure functions (WATER_SURFACE_SIMULATION_PLAN_2026_10_06.md §5).
24
32
  *
@@ -34,7 +42,8 @@ export const WATER_PARTICLE_STRETCH: number[];
34
42
  * The particles of a front are β apart in angle around its centre, and a packet's crests are arcs around that
35
43
  * centre; a cosine window of half-angle β is a partition of unity over them at every radius, so the front's
36
44
  * height is the packet's amplitude whatever the spacing, splitting a front changes none of it, and one front
37
- * adds at most two particles at any point.
45
+ * adds at most two particles at any point. So a run of neighbours alike in all but angle is drawn as one: height one
46
+ * over its particles and its own window past either end that has no neighbour, the same surface its windows sum to.
38
47
  *
39
48
  * @type {CodeChunk}
40
49
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_water_particle.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/chunk_water_particle.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,uCAAwC;AAKxC,yHAAyH;AACzH,gDAAkD;AAElD;;;;;;;;;;;;GAYG;AACH,8CAIE;AAKF;;;;;;;;;;;;;;;;;;GAkBG;AACH,mCAFU,SAAS,CAmN6G;0BA3QtG,uCAAuC"}
1
+ {"version":3,"file":"chunk_water_particle.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/chunk_water_particle.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,uCAAwC;AAKxC,yHAAyH;AACzH,gDAAkD;AAElD;;;;;;;;;;;;GAYG;AACH,8CAIE;AAKF,+GAA+G;AAC/G,oDAAqD;AAErD,qHAAqH;AACrH,uDAAwD;AAExD,wEAAwE;AACxE,qDAAsD;AAEtD,wFAAwF;AACxF,yCAA2G;AAE3G;;;;;;;;;;;;;;;;;;;GAmBG;AACH,mCAFU,SAAS,CAgP6G;0BArTtG,uCAAuC"}