@woosh/meep-engine 3.43.0 → 3.44.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 (287) hide show
  1. package/editor/prototypeEditorShell.d.ts.map +1 -1
  2. package/editor/prototypeEditorShell.js +4 -2
  3. package/package.json +1 -1
  4. package/src/engine/Clock.d.ts +15 -0
  5. package/src/engine/Clock.d.ts.map +1 -1
  6. package/src/engine/Clock.js +29 -5
  7. package/src/engine/Engine.d.ts.map +1 -1
  8. package/src/engine/Engine.js +11 -19
  9. package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts +57 -0
  10. package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts.map +1 -0
  11. package/src/engine/graphics/ecs/mesh-v2/MeshSkin.js +84 -0
  12. package/src/engine/graphics3/AnimationGraphSystem.d.ts +23 -13
  13. package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
  14. package/src/engine/graphics3/AnimationGraphSystem.js +61 -64
  15. package/src/engine/graphics3/AnimationSystem.d.ts +24 -15
  16. package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
  17. package/src/engine/graphics3/AnimationSystem.js +67 -61
  18. package/src/engine/graphics3/MeshSkinSystem.d.ts +56 -0
  19. package/src/engine/graphics3/MeshSkinSystem.d.ts.map +1 -0
  20. package/src/engine/graphics3/MeshSkinSystem.js +317 -0
  21. package/src/engine/graphics3/MeshSystem.d.ts +15 -35
  22. package/src/engine/graphics3/MeshSystem.d.ts.map +1 -1
  23. package/src/engine/graphics3/MeshSystem.js +21 -298
  24. package/src/engine/graphics3/RowChains.d.ts +76 -0
  25. package/src/engine/graphics3/RowChains.d.ts.map +1 -0
  26. package/src/engine/graphics3/RowChains.js +347 -0
  27. package/src/engine/graphics3/ShadedGeometrySystem.d.ts +6 -0
  28. package/src/engine/graphics3/ShadedGeometrySystem.d.ts.map +1 -1
  29. package/src/engine/graphics3/ShadedGeometrySystem.js +329 -309
  30. package/src/engine/graphics3/animation/AnimationClips.d.ts +56 -0
  31. package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -0
  32. package/src/engine/graphics3/animation/AnimationClips.js +79 -0
  33. package/src/engine/graphics3/animation/ClipListPlayer.d.ts +13 -14
  34. package/src/engine/graphics3/animation/ClipListPlayer.d.ts.map +1 -1
  35. package/src/engine/graphics3/animation/ClipListPlayer.js +262 -263
  36. package/src/engine/graphics3/animation/write_clip_playback.d.ts +3 -3
  37. package/src/engine/graphics3/animation/write_clip_playback.js +4 -4
  38. package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts +5 -0
  39. package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts.map +1 -1
  40. package/src/engine/graphics3/pose/query_entity_node_world_pose.js +80 -75
  41. package/src/engine/graphics3/prefab/PrefabInstance.d.ts +4 -24
  42. package/src/engine/graphics3/prefab/PrefabInstance.d.ts.map +1 -1
  43. package/src/engine/graphics3/prefab/PrefabInstance.js +60 -80
  44. package/src/engine/graphics3/prefab/prefab_instantiate.d.ts +16 -3
  45. package/src/engine/graphics3/prefab/prefab_instantiate.d.ts.map +1 -1
  46. package/src/engine/graphics3/prefab/prefab_instantiate.js +49 -12
  47. package/src/engine/graphics3/prefab/prefab_place.d.ts +31 -17
  48. package/src/engine/graphics3/prefab/prefab_place.d.ts.map +1 -1
  49. package/src/engine/graphics3/prefab/prefab_place.js +175 -130
  50. package/src/engine/graphics3/register_clips.d.ts +64 -0
  51. package/src/engine/graphics3/register_clips.d.ts.map +1 -0
  52. package/src/engine/graphics3/register_clips.js +114 -0
  53. package/src/engine/physics/cloth/MEASUREMENTS.md +795 -0
  54. package/src/engine/physics/cloth/PLAN.md +339 -9
  55. package/src/engine/physics/cloth/build/ClothProxy.d.ts +113 -61
  56. package/src/engine/physics/cloth/build/ClothProxy.d.ts.map +1 -1
  57. package/src/engine/physics/cloth/build/ClothProxy.js +142 -77
  58. package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts +22 -0
  59. package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts.map +1 -0
  60. package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +75 -0
  61. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +43 -30
  62. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
  63. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +357 -284
  64. package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts +62 -0
  65. package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -0
  66. package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +280 -0
  67. package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts +1 -1
  68. package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +1 -1
  69. package/src/engine/physics/cloth/ecs/Cloth.d.ts +17 -9
  70. package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
  71. package/src/engine/physics/cloth/ecs/Cloth.js +220 -212
  72. package/src/engine/physics/cloth/ecs/ClothDynamicsFlags.js +6 -0
  73. package/src/engine/physics/cloth/ecs/ClothHold.d.ts +91 -0
  74. package/src/engine/physics/cloth/ecs/ClothHold.d.ts.map +1 -0
  75. package/src/engine/physics/cloth/ecs/ClothHold.js +103 -0
  76. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +254 -48
  77. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  78. package/src/engine/physics/cloth/ecs/ClothInstance.js +277 -47
  79. package/src/engine/physics/cloth/ecs/ClothPin.d.ts +73 -0
  80. package/src/engine/physics/cloth/ecs/ClothPin.d.ts.map +1 -0
  81. package/src/engine/physics/cloth/ecs/ClothPin.js +92 -0
  82. package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts +36 -0
  83. package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts.map +1 -0
  84. package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.js +61 -0
  85. package/src/engine/physics/cloth/ecs/ClothRig.d.ts +23 -17
  86. package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -1
  87. package/src/engine/physics/cloth/ecs/ClothRig.js +29 -27
  88. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +12 -14
  89. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  90. package/src/engine/physics/cloth/ecs/ClothSystem.js +20 -15
  91. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +57 -36
  92. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
  93. package/src/engine/physics/cloth/ecs/ClothWorld.js +816 -179
  94. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +12 -13
  95. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
  96. package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +20 -14
  97. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts +63 -11
  98. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
  99. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +321 -84
  100. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +9 -7
  101. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
  102. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +9 -7
  103. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +3 -3
  104. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +30 -30
  105. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +37 -0
  106. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -0
  107. package/src/engine/physics/cloth/ecs/cloth_geodesic.js +142 -0
  108. package/src/engine/physics/cloth/ecs/cloth_holds.d.ts +97 -0
  109. package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -0
  110. package/src/engine/physics/cloth/ecs/cloth_holds.js +608 -0
  111. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts +2 -2
  112. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
  113. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +160 -9
  114. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +17 -22
  115. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
  116. package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +55 -117
  117. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +21 -6
  118. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
  119. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +44 -15
  120. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +5 -0
  121. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
  122. package/src/engine/physics/cloth/ecs/cloth_write_back.js +60 -16
  123. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -1
  124. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +65 -58
  125. package/src/engine/physics/cloth/playground/collide_main.js +1 -1
  126. package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -1
  127. package/src/engine/physics/cloth/playground/garment_build.js +17 -5
  128. package/src/engine/physics/cloth/playground/garment_main.js +1 -1
  129. package/src/engine/physics/cloth/playground/rig_build.d.ts.map +1 -1
  130. package/src/engine/physics/cloth/playground/rig_build.js +302 -296
  131. package/src/engine/physics/cloth/solver/ClothState.d.ts +45 -7
  132. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  133. package/src/engine/physics/cloth/solver/ClothState.js +63 -7
  134. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +6 -1
  135. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
  136. package/src/engine/physics/cloth/solver/cloth_contact_find.js +7 -2
  137. package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts +114 -0
  138. package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -0
  139. package/src/engine/physics/cloth/solver/cloth_hold_line.js +362 -0
  140. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +6 -2
  141. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
  142. package/src/engine/physics/cloth/solver/cloth_self_find.js +13 -13
  143. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +24 -12
  144. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
  145. package/src/engine/physics/cloth/solver/cloth_solver_constants.js +24 -12
  146. package/src/engine/physics/cloth/solver/cloth_step.d.ts +16 -0
  147. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  148. package/src/engine/physics/cloth/solver/cloth_step.js +183 -20
  149. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +1 -0
  150. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
  151. package/src/engine/physics/cloth/solver/cloth_step_instance.js +10 -3
  152. package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts +1 -1
  153. package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts.map +1 -1
  154. package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.js +353 -346
  155. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts +7 -5
  156. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -1
  157. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +7 -5
  158. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +9 -9
  159. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
  160. package/src/engine/physics/cloth/wind/cloth_sample_air.js +26 -26
  161. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  162. package/src/engine/simulation/Ticker.d.ts +13 -0
  163. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  164. package/src/engine/simulation/Ticker.js +43 -8
  165. package/src/shade/RENDERER_CONTRACT.md +8 -2
  166. package/src/shade/playground/mesh_row_ceiling/main.js +2 -1
  167. package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
  168. package/src/shade/playground/skinned_blas_refit/main.js +11 -19
  169. package/src/shade/playground/skinned_blas_refit/place_character.d.ts +6 -3
  170. package/src/shade/playground/skinned_blas_refit/place_character.d.ts.map +1 -1
  171. package/src/shade/playground/skinned_blas_refit/place_character.js +90 -90
  172. package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
  173. package/src/shade/playground/skinned_mesh_soup/main.js +502 -509
  174. package/src/shade/playground/texture_encode/README.md +129 -109
  175. package/src/shade/playground/texture_encode/main.js +1430 -1430
  176. package/src/shade/renderer/animation/GPUAnimationManager.d.ts +45 -14
  177. package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
  178. package/src/shade/renderer/animation/GPUAnimationManager.js +316 -64
  179. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +5 -0
  180. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  181. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +11 -1
  182. package/src/shade/renderer/geometry/BoxGeometry.d.ts +1 -11
  183. package/src/shade/renderer/geometry/BoxGeometry.d.ts.map +1 -1
  184. package/src/shade/renderer/geometry/BoxGeometry.js +6 -13
  185. package/src/shade/renderer/geometry/CapsuleGeometry.d.ts +19 -0
  186. package/src/shade/renderer/geometry/CapsuleGeometry.d.ts.map +1 -0
  187. package/src/shade/renderer/geometry/CapsuleGeometry.js +24 -0
  188. package/src/shade/renderer/geometry/ConeGeometry.d.ts +20 -0
  189. package/src/shade/renderer/geometry/ConeGeometry.d.ts.map +1 -0
  190. package/src/shade/renderer/geometry/ConeGeometry.js +33 -0
  191. package/src/shade/renderer/geometry/CylinderGeometry.d.ts +21 -0
  192. package/src/shade/renderer/geometry/CylinderGeometry.d.ts.map +1 -0
  193. package/src/shade/renderer/geometry/CylinderGeometry.js +35 -0
  194. package/src/shade/renderer/geometry/PlaneGeometry.d.ts +17 -0
  195. package/src/shade/renderer/geometry/PlaneGeometry.d.ts.map +1 -0
  196. package/src/shade/renderer/geometry/PlaneGeometry.js +22 -0
  197. package/src/shade/renderer/geometry/TorusGeometry.d.ts +18 -0
  198. package/src/shade/renderer/geometry/TorusGeometry.d.ts.map +1 -0
  199. package/src/shade/renderer/geometry/TorusGeometry.js +23 -0
  200. package/src/shade/renderer/geometry/UVSphereGeometry.d.ts +21 -0
  201. package/src/shade/renderer/geometry/UVSphereGeometry.d.ts.map +1 -0
  202. package/src/shade/renderer/geometry/UVSphereGeometry.js +34 -0
  203. package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts +19 -0
  204. package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts.map +1 -0
  205. package/src/shade/renderer/geometry/primitives/make_capsule_geometry.js +205 -0
  206. package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts +21 -0
  207. package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts.map +1 -0
  208. package/src/shade/renderer/geometry/primitives/make_cone_geometry.js +36 -0
  209. package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts +1 -1
  210. package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts.map +1 -1
  211. package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.js +44 -9
  212. package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts +20 -0
  213. package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts.map +1 -0
  214. package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.js +190 -0
  215. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
  216. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +7 -2
  217. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts +26 -8
  218. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts.map +1 -1
  219. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js +56 -39
  220. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts +7 -0
  221. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts.map +1 -1
  222. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.js +46 -4
  223. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.d.ts.map +1 -1
  224. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.js +4 -2
  225. package/src/shade/renderer/gpu_primitive/sort/defs.d.ts +2 -2
  226. package/src/shade/renderer/gpu_primitive/sort/defs.js +79 -79
  227. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +1 -1
  228. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
  229. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +7 -3
  230. package/src/shade/renderer/particles/GPUParticleSystem.js +1 -1
  231. package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +4 -3
  232. package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
  233. package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +200 -194
  234. package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
  235. package/src/shade/renderer/particles/graph_particles.js +6 -2
  236. package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
  237. package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +334 -329
  238. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  239. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +7 -2
  240. package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts.map +1 -1
  241. package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.js +16 -4
  242. package/src/shade/renderer/texture/COMPRESSED_TEXTURE_PLAN_2026_09_01.md +2444 -2345
  243. package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.d.ts.map +1 -1
  244. package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.js +312 -310
  245. package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts +3 -3
  246. package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts.map +1 -1
  247. package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.js +383 -375
  248. package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.d.ts.map +1 -1
  249. package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.js +349 -346
  250. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts +58 -0
  251. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts.map +1 -0
  252. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.js +536 -0
  253. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts +21 -7
  254. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts.map +1 -1
  255. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.js +291 -327
  256. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts +25 -0
  257. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts.map +1 -0
  258. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.js +99 -0
  259. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts +5 -3
  260. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts.map +1 -1
  261. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.js +47 -71
  262. package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts +10 -0
  263. package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts.map +1 -0
  264. package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.js +50 -0
  265. package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts +4 -5
  266. package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts.map +1 -1
  267. package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.js +7 -8
  268. package/src/shade/renderer/water/chunk_water_transport.d.ts.map +1 -1
  269. package/src/shade/renderer/water/chunk_water_transport.js +7 -5
  270. package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts.map +1 -1
  271. package/src/shade/renderer/water/medium/GPUWaterBodies.js +8 -2
  272. package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts +3 -2
  273. package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts.map +1 -1
  274. package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.js +3 -2
  275. package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
  276. package/src/shade/renderer/water/shader_water.js +3 -1
  277. package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts.map +1 -1
  278. package/src/shade/renderer/water/surface/GPUWaterSurface.js +3 -1
  279. package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts.map +1 -1
  280. package/src/shade/renderer/water/surface/graph_water_tessellation.js +11 -4
  281. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
  282. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +37 -20
  283. package/src/shade/wgsl/validate_wgsl_source.d.ts.map +1 -1
  284. package/src/shade/wgsl/validate_wgsl_source.js +74 -3
  285. package/src/engine/graphics3/register_instance_animation.d.ts +0 -114
  286. package/src/engine/graphics3/register_instance_animation.d.ts.map +0 -1
  287. package/src/engine/graphics3/register_instance_animation.js +0 -201
@@ -88,7 +88,7 @@ export class WorkerClothSystem extends WorkerSystem {
88
88
  max_cloth_count?: number;
89
89
  });
90
90
  dependencies: (typeof Transform64 | typeof Cloth)[];
91
- components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof TransformAttachment> | ResourceAccessSpecification<typeof ClothCollider> | ResourceAccessSpecification<typeof Cloth> | ResourceAccessSpecification<typeof ClothExclude> | ResourceAccessSpecification<typeof ClothRig>)[];
91
+ components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof TransformAttachment> | ResourceAccessSpecification<typeof GPUStateAuthority> | ResourceAccessSpecification<typeof ParentEntity> | ResourceAccessSpecification<typeof ClothCollider> | ResourceAccessSpecification<typeof Cloth> | ResourceAccessSpecification<typeof ClothExclude> | ResourceAccessSpecification<typeof ClothRig> | ResourceAccessSpecification<typeof ClothPin>)[];
92
92
  /**
93
93
  * The cloths, and everything about stepping one that is not arithmetic.
94
94
  * Shared with {@link ClothSystem}, which is what makes the two systems one
@@ -121,18 +121,6 @@ export class WorkerClothSystem extends WorkerSystem {
121
121
  * @returns {ClothInstance[]}
122
122
  */
123
123
  get instances(): ClothInstance[];
124
- /**
125
- * @param {{instance_of: function(number): (PrefabInstance|null)}|null} value
126
- */
127
- set models(value: {
128
- instance_of: (arg0: number) => (PrefabInstance | null);
129
- });
130
- /**
131
- * @returns {{instance_of: function(number): (PrefabInstance|null)}|null}
132
- */
133
- get models(): {
134
- instance_of: (arg0: number) => (PrefabInstance | null);
135
- };
136
124
  /**
137
125
  * @param {EntityComponentDataset} dataset
138
126
  * @returns {void}
@@ -172,6 +160,14 @@ export class WorkerClothSystem extends WorkerSystem {
172
160
  * @returns {ClothInstance|undefined}
173
161
  */
174
162
  instanceOf(entity: number): ClothInstance | undefined;
163
+ /**
164
+ * Which particle of a cloth an entity is, for a {@link ClothPin} that has
165
+ * the entity in hand — see {@link ClothWorld#particle_of}.
166
+ * @param {number} cloth the entity carrying the `Cloth`
167
+ * @param {number} entity
168
+ * @returns {number} the particle, or `−1`
169
+ */
170
+ particle_of(cloth: number, entity: number): number;
175
171
  /**
176
172
  * @returns {boolean} whether cloth *particle state* may currently be read
177
173
  * from the main thread. False while a step is in flight. The poses
@@ -185,8 +181,11 @@ import { Transform64 } from "../../../ecs/transform/Transform64.js";
185
181
  import { Cloth } from "./Cloth.js";
186
182
  import { ResourceAccessSpecification } from "../../../../core/model/ResourceAccessSpecification.js";
187
183
  import { TransformAttachment } from "../../../ecs/transform-attachment/TransformAttachment.js";
184
+ import { GPUStateAuthority } from "../../../ecs/gpu/GPUStateAuthority.js";
185
+ import { ParentEntity } from "../../../ecs/parent/ParentEntity.js";
188
186
  import { ClothCollider } from "./ClothCollider.js";
189
187
  import { ClothExclude } from "./ClothExclude.js";
190
188
  import { ClothRig } from "./ClothRig.js";
189
+ import { ClothPin } from "./ClothPin.js";
191
190
  import { ClothWorld } from "./ClothWorld.js";
192
191
  //# sourceMappingURL=WorkerClothSystem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkerClothSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/WorkerClothSystem.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH;IAoEI;;;;;;;;OAQG;IACH;QAPiC,cAAc,EAApC,MAAM,MAAM;QAIK,eAAe,GAAhC,MAAM;OAYhB;IApFD,oDAAoC;IAEpC,iUAOE;IAEF;;;;;OAKG;IACH,OAFU,UAAU,CAEK;IA6EzB;;OAEG;IACH,iCAEC;IAbD;;;OAGG;IACH,4BAEC;IAoBD;;OAEG;IACH,qBAEC;IAhBD;;;;;;OAMG;IACH,gBAEC;IASD;;OAEG;IACH,iCAEC;IASD;;OAEG;IACH;4BAToC,MAAM,KAAG,CAAC,iBAAe,IAAI,CAAC;OAWjE;IAZD;;OAEG;IACH;4BAFoC,MAAM,KAAG,CAAC,iBAAe,IAAI,CAAC;MAIjE;IAiCD;;;OAGG;IACH,wDAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,wDAFa,IAAI,CAIhB;IAcD;;;;OAIG;IACH,YAJW,KAAK,aACL,WAAW,UACX,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAJW,KAAK,aACL,WAAW,UACX,MAAM,QAQhB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;;OAIG;IACH,aAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,gBAAc,SAAS,CAInC;IAED;;;;OAIG;IACH,iCAEC;;CAmOJ;6BA/jB4B,oCAAoC;4BAIrC,uCAAuC;sBAE7C,YAAY;4CAPU,uDAAuD;oCAI5F,0DAA0D;8BAInC,oBAAoB;6BACrB,mBAAmB;yBACvB,eAAe;2BACb,iBAAiB"}
1
+ {"version":3,"file":"WorkerClothSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/WorkerClothSystem.js"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH;IAyEI;;;;;;;;OAQG;IACH;QAPiC,cAAc,EAApC,MAAM,MAAM;QAIK,eAAe,GAAhC,MAAM;OAYhB;IAzFD,oDAAoC;IAEpC,2dAYE;IAEF;;;;;OAKG;IACH,OAFU,UAAU,CAEK;IA6EzB;;OAEG;IACH,iCAEC;IAbD;;;OAGG;IACH,4BAEC;IAoBD;;OAEG;IACH,qBAEC;IAhBD;;;;;;OAMG;IACH,gBAEC;IASD;;OAEG;IACH,iCAEC;IA2BD;;;OAGG;IACH,wDAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,wDAFa,IAAI,CAIhB;IAcD;;;;OAIG;IACH,YAJW,KAAK,aACL,WAAW,UACX,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAJW,KAAK,aACL,WAAW,UACX,MAAM,QAQhB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;;OAIG;IACH,aAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,gBAAc,SAAS,CAInC;IAED;;;;;;OAMG;IACH,mBAJW,MAAM,UACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,iCAEC;;CAmOJ;6BArkB4B,oCAAoC;4BAIrC,uCAAuC;sBAE7C,YAAY;4CAPU,uDAAuD;oCAI5F,0DAA0D;kCAQ/B,uCAAuC;6BAC5C,qCAAqC;8BALpC,oBAAoB;6BACrB,mBAAmB;yBAEvB,eAAe;yBADf,eAAe;2BAIb,iBAAiB"}
@@ -9,7 +9,10 @@ import { ClothStepParam } from "../solver/cloth_step_instance.js";
9
9
  import { Cloth } from "./Cloth.js";
10
10
  import { ClothCollider } from "./ClothCollider.js";
11
11
  import { ClothExclude } from "./ClothExclude.js";
12
+ import { ClothPin } from "./ClothPin.js";
12
13
  import { ClothRig } from "./ClothRig.js";
14
+ import { GPUStateAuthority } from "../../../ecs/gpu/GPUStateAuthority.js";
15
+ import { ParentEntity } from "../../../ecs/parent/ParentEntity.js";
13
16
  import { ClothWorld } from "./ClothWorld.js";
14
17
  import {
15
18
  ClothCommand,
@@ -109,7 +112,12 @@ export class WorkerClothSystem extends WorkerSystem {
109
112
  ResourceAccessSpecification.from(TransformAttachment, ResourceAccessKind.Read | ResourceAccessKind.Write),
110
113
  ResourceAccessSpecification.from(ClothExclude, ResourceAccessKind.Read),
111
114
  ResourceAccessSpecification.from(ClothCollider, ResourceAccessKind.Read),
112
- ResourceAccessSpecification.from(ClothRig, ResourceAccessKind.Read)
115
+ ResourceAccessSpecification.from(ClothRig, ResourceAccessKind.Read),
116
+ // What holds a cloth, and — to evaluate a holder a clip drives — the
117
+ // model it belongs to and who composes its transform.
118
+ ResourceAccessSpecification.from(ClothPin, ResourceAccessKind.Read),
119
+ ResourceAccessSpecification.from(ParentEntity, ResourceAccessKind.Read),
120
+ ResourceAccessSpecification.from(GPUStateAuthority, ResourceAccessKind.Read)
113
121
  ];
114
122
 
115
123
  /**
@@ -227,19 +235,6 @@ export class WorkerClothSystem extends WorkerSystem {
227
235
  return this.world.instances;
228
236
  }
229
237
 
230
- /**
231
- * @returns {{instance_of: function(number): (PrefabInstance|null)}|null}
232
- */
233
- get models() {
234
- return this.world.models;
235
- }
236
-
237
- /**
238
- * @param {{instance_of: function(number): (PrefabInstance|null)}|null} value
239
- */
240
- set models(value) {
241
- this.world.models = value;
242
- }
243
238
 
244
239
  /**
245
240
  * @returns {Worker}
@@ -341,6 +336,17 @@ export class WorkerClothSystem extends WorkerSystem {
341
336
  return this.world.instanceOf(entity);
342
337
  }
343
338
 
339
+ /**
340
+ * Which particle of a cloth an entity is, for a {@link ClothPin} that has
341
+ * the entity in hand — see {@link ClothWorld#particle_of}.
342
+ * @param {number} cloth the entity carrying the `Cloth`
343
+ * @param {number} entity
344
+ * @returns {number} the particle, or `−1`
345
+ */
346
+ particle_of(cloth, entity) {
347
+ return this.world.particle_of(cloth, entity);
348
+ }
349
+
344
350
  /**
345
351
  * @returns {boolean} whether cloth *particle state* may currently be read
346
352
  * from the main thread. False while a step is in flight. The poses
@@ -5,8 +5,52 @@
5
5
  */
6
6
  export function cloth_build_children(instance: ClothInstance): void;
7
7
  /**
8
- * Rows, geodesics and the `ClothState` itself, from a seeded
9
- * `node_parent` / `animated_position` pair.
8
+ * The particle graph of a tree: a fabric edge from every node to its parent,
9
+ * and a skip pair from every node to its grandparent.
10
+ *
11
+ * The skip pair is a chain's bending model (`cloth_seed_subtree.js` carries the
12
+ * argument), and it is part of the graph rather than something the row builder
13
+ * derives from a parent array, so that the row builder never needs one.
14
+ *
15
+ * @param {ClothInstance} instance with {@link ClothInstance#node_parent} set
16
+ * @returns {void}
17
+ */
18
+ export function cloth_tree_graph(instance: ClothInstance): void;
19
+ /**
20
+ * The triangles around each node, CSR, and one neighbour per node to measure a
21
+ * tangent by — what `cloth_reconstruct_pose` turns a sheet's joints with. A
22
+ * cloth with no triangles gets none.
23
+ *
24
+ * @param {ClothInstance} instance with {@link ClothInstance#triangle} and
25
+ * {@link ClothInstance#edge} set
26
+ * @returns {void}
27
+ */
28
+ export function cloth_build_surface(instance: ClothInstance): void;
29
+ /**
30
+ * How much a hinge resists, as a stiffness, for a fabric's `bend` ratio.
31
+ *
32
+ * The same rule the skip row follows: a ratio of the row's own effective
33
+ * inertia over the fixed step squared. A hinge's gradient on particle `k` is
34
+ * `w_k` along each axis, so its effective inertia is `1 / Σ (w_k² / m_k)` —
35
+ * `m / Σ w_k²` with one mass — and a hinge across a sliver, whose cotangents are
36
+ * large, is softer per unit `C` for exactly the reason its `C` is larger. A
37
+ * stiffness in newtons per metre, which is what Bergou's `6·modulus/A` is,
38
+ * would leave M0's dissipative band wherever the triangles are thin.
39
+ *
40
+ * @param {Float32Array} weight 4 per hinge
41
+ * @param {number} hinge
42
+ * @returns {number} the hinge's effective inertia, kg
43
+ */
44
+ export function cloth_hinge_inertia(weight: Float32Array, hinge: number): number;
45
+ /**
46
+ * Rows and the `ClothState` itself, from a seeded rest pose and the graph over
47
+ * it.
48
+ *
49
+ * **Nothing is held here.** Every particle is built free, with a tether row and
50
+ * — when the fabric is leashed at all — a slack row of radius `Infinity`, which
51
+ * say nothing until `cloth_apply_holds` points them at what the particle hangs
52
+ * from. The shape of the leash table is fixed by the particle count, so holding
53
+ * and letting go rewrite numbers in it rather than building it again.
10
54
  *
11
55
  * @param {ClothInstance} instance
12
56
  * @param {number} dt
@@ -53,12 +97,19 @@ export function cloth_dynamics_change_needs_reseed(before: ClothDynamics, after:
53
97
  * proxy's baked joint list — and what they do identically is everything after
54
98
  * that, because a row does not care what a node was made of.
55
99
  *
56
- * So the split is: a seeder produces `node_parent` and `animated_position`, and
57
- * {@link cloth_build_rows} turns those into geodesics, link rows, strain-limit
58
- * rows, skip rows, leashes and the `ClothState` itself. M3 moved this out of
59
- * `cloth_seed_subtree.js` unchanged rather than writing a second copy for the
60
- * rig path, which is the whole reason §11 could say "the solver is identical
61
- * either way; only seeding and write-back differ" and mean it.
100
+ * So the split is: a seeder produces the particles' rest pose and the **graph**
101
+ * joining them — {@link ClothInstance#edge}, {@link ClothInstance#skip},
102
+ * {@link ClothInstance#hinge} — and {@link cloth_build_rows} turns those into
103
+ * geodesics, fabric rows, strain-limit rows, bending rows, leashes and the
104
+ * `ClothState` itself. M3 moved this out of `cloth_seed_subtree.js` unchanged
105
+ * rather than writing a second copy for the rig path, which is the whole reason
106
+ * §11 could say "the solver is identical either way; only seeding and
107
+ * write-back differ" and mean it.
108
+ *
109
+ * The rows are built from a graph rather than from a parent array because a row
110
+ * is a pair or a quad and has no use for a parent. A tree hands over its parent
111
+ * links and its skip pairs ({@link cloth_tree_graph}); a mesh would hand over
112
+ * its edges and hinges; the rows below are the same code either way.
62
113
  *
63
114
  * @author Alex Goldring
64
115
  * @copyright Company Named Limited (c) 2026
@@ -73,9 +124,10 @@ export const CLOTH_PARTICLE_MASS: number;
73
124
  * Slack radius at `ClothDynamics#slack = 1`, as a multiple of `d_geo`.
74
125
  *
75
126
  * It is **2**, and that is a derivation rather than a taste. The tether row
76
- * already holds every particle within `d_geo` of the anchor, and the animated
77
- * position it is leashed to is itself within `d_geo` of the anchor — a chord is
78
- * never longer than the arc it subtends. By the triangle inequality the two can
127
+ * already holds every particle within `d_geo` of the held particle it hangs
128
+ * from, and the animated position it is leashed to is itself within `d_geo` of
129
+ * that particle — a chord is never longer than the arc it subtends, and the
130
+ * animated pose is the rest pose hung from it (`ClothInstance#animated_position`). By the triangle inequality the two can
79
131
  * therefore never be more than `2·d_geo` apart, so a slack radius of `2·d_geo`
80
132
  * is **provably inactive** and `slack = 1` means exactly "no leash" with no
81
133
  * sentinel value and no discontinuity to code around.
@@ -1 +1 @@
1
- {"version":3,"file":"cloth_build_rows.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_build_rows.js"],"names":[],"mappings":"AAuDA;;;;GAIG;AACH,+DAFa,IAAI,CAyBhB;AAID;;;;;;;GAOG;AACH,8DAHW,MAAM,GACJ,IAAI,CA6LhB;AAWD;;;;;;;;;;;;;;;;GAgBG;AACH,kEAHW,MAAM,GACJ,IAAI,CAoChB;AAED;;;;;;;;;;;GAWG;AACH,iGAFa,OAAO,CAkBnB;AAjXD;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;GAIG;AACH,kCAFU,MAAM,CAEwB;AAIxC;;;;;;;;;;;;;;;;GAgBG;AACH,gCAFU,MAAM,CAEmB"}
1
+ {"version":3,"file":"cloth_build_rows.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_build_rows.js"],"names":[],"mappings":"AAiEA;;;;GAIG;AACH,+DAFa,IAAI,CA6BhB;AAED;;;;;;;;;;GAUG;AACH,2DAFa,IAAI,CA6BhB;AAED;;;;;;;;GAQG;AACH,8DAFa,IAAI,CA2DhB;AAED;;;;;;;;;;;;;;GAcG;AACH,4CAJW,YAAY,SACZ,MAAM,GACJ,MAAM,CAYlB;AAkBD;;;;;;;;;;;;;GAaG;AACH,8DAHW,MAAM,GACJ,IAAI,CAoOhB;AAWD;;;;;;;;;;;;;;;;GAgBG;AACH,kEAHW,MAAM,GACJ,IAAI,CAiEhB;AAED;;;;;;;;;;;GAWG;AACH,iGAFa,OAAO,CAkBnB;AA5lBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;GAIG;AACH,kCAFU,MAAM,CAEwB;AAIxC;;;;;;;;;;;;;;;;;GAiBG;AACH,gCAFU,MAAM,CAEmB"}