@woosh/meep-engine 3.24.0 → 3.25.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 (322) hide show
  1. package/package.json +1 -1
  2. package/src/engine/graphics3/PickingSystem.d.ts +3 -3
  3. package/src/engine/graphics3/PickingSystem.d.ts.map +1 -1
  4. package/src/engine/graphics3/PickingSystem.js +52 -55
  5. package/src/engine/graphics3/shader_picking_gather.d.ts +40 -0
  6. package/src/engine/graphics3/shader_picking_gather.d.ts.map +1 -0
  7. package/src/engine/graphics3/shader_picking_gather.js +120 -0
  8. package/src/engine/physics/cloth/MEASUREMENTS.md +1050 -0
  9. package/src/engine/physics/cloth/PLAN.md +411 -49
  10. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts +52 -0
  11. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts.map +1 -0
  12. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.js +70 -0
  13. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts +12 -3
  14. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
  15. package/src/engine/physics/cloth/ecs/ClothDynamics.js +340 -331
  16. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +36 -22
  17. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  18. package/src/engine/physics/cloth/ecs/ClothInstance.js +38 -23
  19. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts +84 -0
  20. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts.map +1 -0
  21. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.js +141 -0
  22. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +51 -82
  23. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  24. package/src/engine/physics/cloth/ecs/ClothSystem.js +81 -869
  25. package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts +48 -0
  26. package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts.map +1 -0
  27. package/src/engine/physics/cloth/ecs/ClothWorkerCore.js +107 -0
  28. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +286 -0
  29. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -0
  30. package/src/engine/physics/cloth/ecs/ClothWorld.js +1104 -0
  31. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +182 -0
  32. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -0
  33. package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +562 -0
  34. package/src/engine/physics/cloth/ecs/cloth.worker.d.ts +2 -0
  35. package/src/engine/physics/cloth/ecs/cloth.worker.d.ts.map +1 -0
  36. package/src/engine/physics/cloth/ecs/cloth.worker.js +12 -0
  37. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
  38. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +2 -1
  39. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +58 -0
  40. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
  41. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +341 -271
  42. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +20 -2
  43. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
  44. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +39 -15
  45. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts +29 -0
  46. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts.map +1 -0
  47. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.js +78 -0
  48. package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts +17 -0
  49. package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts.map +1 -0
  50. package/src/engine/physics/cloth/ecs/makeClothWorker.js +18 -0
  51. package/src/engine/physics/cloth/playground/README.md +73 -2
  52. package/src/engine/physics/cloth/playground/wind.html +166 -0
  53. package/src/engine/physics/cloth/playground/wind_build.d.ts +81 -0
  54. package/src/engine/physics/cloth/playground/wind_build.d.ts.map +1 -0
  55. package/src/engine/physics/cloth/playground/wind_build.js +141 -0
  56. package/src/engine/physics/cloth/playground/wind_main.d.ts +2 -0
  57. package/src/engine/physics/cloth/playground/wind_main.d.ts.map +1 -0
  58. package/src/engine/physics/cloth/playground/wind_main.js +681 -0
  59. package/src/engine/physics/cloth/solver/ClothState.d.ts +134 -79
  60. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  61. package/src/engine/physics/cloth/solver/ClothState.js +273 -12
  62. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +33 -0
  63. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
  64. package/src/engine/physics/cloth/solver/cloth_solver_constants.js +34 -0
  65. package/src/engine/physics/cloth/solver/cloth_step.d.ts +21 -2
  66. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  67. package/src/engine/physics/cloth/solver/cloth_step.js +173 -4
  68. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +40 -0
  69. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -0
  70. package/src/engine/physics/cloth/solver/cloth_step_instance.js +284 -0
  71. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts +107 -0
  72. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts.map +1 -0
  73. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.js +263 -0
  74. package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +88 -0
  75. package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts.map +1 -0
  76. package/src/engine/physics/cloth/wind/AbstractClothWind.js +100 -0
  77. package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts +85 -0
  78. package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts.map +1 -0
  79. package/src/engine/physics/cloth/wind/ClothAmbientWind.js +182 -0
  80. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +79 -0
  81. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -0
  82. package/src/engine/physics/cloth/wind/ClothFluidWind.js +210 -0
  83. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +101 -0
  84. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -0
  85. package/src/engine/physics/cloth/wind/cloth_sample_air.js +290 -0
  86. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  87. package/src/shade/device/mock/texture_copy.d.ts.map +1 -1
  88. package/src/shade/device/mock/texture_copy.js +28 -0
  89. package/src/shade/playground/vgeo_runtime/README.md +94 -0
  90. package/src/shade/playground/vgeo_runtime/index.html +62 -0
  91. package/src/shade/playground/vgeo_runtime/main.d.ts +2 -0
  92. package/src/shade/playground/vgeo_runtime/main.d.ts.map +1 -0
  93. package/src/shade/playground/vgeo_runtime/main.js +399 -0
  94. package/src/shade/playground/vgeo_viewer/sample_asset.js +1 -1
  95. package/src/shade/renderer/camera/Camera.d.ts +14 -0
  96. package/src/shade/renderer/camera/Camera.d.ts.map +1 -1
  97. package/src/shade/renderer/camera/Camera.js +7 -1
  98. package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.d.ts.map +1 -1
  99. package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.js +16 -1
  100. package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
  101. package/src/shade/renderer/geometry/GPUGeometryManager.js +29 -9
  102. package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts +10 -0
  103. package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts.map +1 -1
  104. package/src/shade/renderer/geometry/GPUGeometryMetadata.js +13 -0
  105. package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +46 -18
  106. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +70 -22
  107. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +97 -19
  108. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +12 -2
  109. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
  110. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +14 -3
  111. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts +2 -2
  112. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts.map +1 -1
  113. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.js +124 -6
  114. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts +22 -0
  115. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts.map +1 -0
  116. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.js +53 -0
  117. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts +8 -1
  118. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts.map +1 -1
  119. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.js +8 -1
  120. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts +16 -0
  121. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts.map +1 -0
  122. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.js +15 -0
  123. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +54 -0
  124. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts.map +1 -0
  125. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +53 -0
  126. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts +13 -2
  127. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts.map +1 -1
  128. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.js +14 -2
  129. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts +100 -0
  130. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts.map +1 -1
  131. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.js +113 -0
  132. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.d.ts.map +1 -1
  133. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.js +5 -0
  134. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts.map +1 -1
  135. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.js +108 -0
  136. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
  137. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +23 -0
  138. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
  139. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +40 -0
  140. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +228 -0
  141. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -0
  142. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +932 -0
  143. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +176 -0
  144. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -0
  145. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +425 -0
  146. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +241 -0
  147. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +574 -0
  148. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +120 -0
  149. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -0
  150. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +674 -0
  151. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts +287 -0
  152. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts.map +1 -0
  153. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.js +976 -0
  154. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +42 -0
  155. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -0
  156. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +96 -0
  157. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts +16 -0
  158. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts.map +1 -0
  159. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.js +15 -0
  160. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts +19 -0
  161. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -0
  162. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +83 -0
  163. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts +9 -0
  164. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts.map +1 -0
  165. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.js +8 -0
  166. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +19 -0
  167. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -0
  168. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +160 -0
  169. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts +3 -0
  170. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -0
  171. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +255 -0
  172. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts +3 -0
  173. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts.map +1 -0
  174. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.js +80 -0
  175. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts +3 -0
  176. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -0
  177. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +144 -0
  178. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts +3 -0
  179. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -0
  180. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +530 -0
  181. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +39 -0
  182. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -0
  183. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +54 -0
  184. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +41 -0
  185. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -0
  186. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +56 -0
  187. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts +49 -0
  188. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -0
  189. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +328 -0
  190. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts +10 -0
  191. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts.map +1 -0
  192. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.js +51 -0
  193. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts +13 -0
  194. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts.map +1 -0
  195. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.js +12 -0
  196. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts +17 -0
  197. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts.map +1 -0
  198. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.js +99 -0
  199. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts +9 -0
  200. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts.map +1 -0
  201. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.js +8 -0
  202. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts +7 -0
  203. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts.map +1 -0
  204. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +27 -0
  205. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts +14 -0
  206. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts.map +1 -0
  207. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.js +13 -0
  208. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts +7 -0
  209. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts.map +1 -0
  210. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.js +35 -0
  211. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts +9 -0
  212. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts.map +1 -0
  213. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.js +8 -0
  214. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts +15 -0
  215. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts.map +1 -0
  216. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.js +14 -0
  217. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts +7 -0
  218. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts.map +1 -0
  219. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.js +36 -0
  220. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts +10 -0
  221. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts.map +1 -0
  222. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.js +9 -0
  223. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +11 -0
  224. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts.map +1 -0
  225. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +54 -0
  226. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts +9 -0
  227. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts.map +1 -0
  228. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.js +8 -0
  229. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts +11 -0
  230. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts.map +1 -0
  231. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.js +10 -0
  232. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts +7 -0
  233. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts.map +1 -0
  234. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.js +30 -0
  235. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts +9 -0
  236. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts.map +1 -0
  237. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.js +8 -0
  238. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts +13 -0
  239. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts.map +1 -0
  240. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.js +12 -0
  241. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts +14 -0
  242. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts.map +1 -0
  243. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.js +13 -0
  244. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts +11 -0
  245. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts.map +1 -0
  246. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.js +61 -0
  247. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts +9 -0
  248. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts.map +1 -0
  249. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.js +8 -0
  250. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts +13 -0
  251. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts.map +1 -0
  252. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.js +12 -0
  253. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts +9 -0
  254. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts.map +1 -0
  255. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.js +8 -0
  256. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts +20 -0
  257. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts.map +1 -0
  258. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.js +19 -0
  259. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts +23 -0
  260. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts.map +1 -0
  261. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js +70 -0
  262. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts +18 -0
  263. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts.map +1 -0
  264. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.js +25 -0
  265. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts +35 -0
  266. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts.map +1 -0
  267. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.js +41 -0
  268. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts +32 -0
  269. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts.map +1 -0
  270. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js +138 -0
  271. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  272. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  273. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  274. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +9 -0
  275. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
  276. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +12 -1
  277. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  278. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +12 -1
  279. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  280. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +10 -0
  281. package/src/shade/renderer/scene/GPUSceneContext.d.ts +18 -0
  282. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  283. package/src/shade/renderer/scene/GPUSceneContext.js +647 -594
  284. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
  285. package/src/shade/renderer/scene/rows/GPUSceneRows.js +22 -0
  286. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts +35 -0
  287. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts.map +1 -0
  288. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.js +91 -0
  289. package/src/engine/graphics3/instantiate_scene_bundle.d.ts +0 -54
  290. package/src/engine/graphics3/instantiate_scene_bundle.d.ts.map +0 -1
  291. package/src/engine/graphics3/shade_node_to_entity_composition.d.ts +0 -39
  292. package/src/engine/graphics3/shade_node_to_entity_composition.d.ts.map +0 -1
  293. package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts +0 -35
  294. package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts.map +0 -1
  295. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts +0 -96
  296. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts.map +0 -1
  297. package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts +0 -20
  298. package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts.map +0 -1
  299. package/src/shade/renderer/animation/skin_bind_transform.d.ts +0 -25
  300. package/src/shade/renderer/animation/skin_bind_transform.d.ts.map +0 -1
  301. package/src/shade/renderer/animation/skin_frame_defect.d.ts +0 -34
  302. package/src/shade/renderer/animation/skin_frame_defect.d.ts.map +0 -1
  303. package/src/shade/renderer/animation/skin_joint_matrix.d.ts +0 -24
  304. package/src/shade/renderer/animation/skin_joint_matrix.d.ts.map +0 -1
  305. package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts +0 -70
  306. package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts.map +0 -1
  307. package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts +0 -96
  308. package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts.map +0 -1
  309. package/src/shade/renderer/scene/InstanceBatch.d.ts +0 -92
  310. package/src/shade/renderer/scene/InstanceBatch.d.ts.map +0 -1
  311. package/src/shade/renderer/scene/Mesh.d.ts +0 -55
  312. package/src/shade/renderer/scene/Mesh.d.ts.map +0 -1
  313. package/src/shade/renderer/scene/Node3D.d.ts +0 -159
  314. package/src/shade/renderer/scene/Node3D.d.ts.map +0 -1
  315. package/src/shade/renderer/scene/Node3DDirtyList.d.ts +0 -59
  316. package/src/shade/renderer/scene/Node3DDirtyList.d.ts.map +0 -1
  317. package/src/shade/renderer/scene/SceneNodeBinding.d.ts +0 -52
  318. package/src/shade/renderer/scene/SceneNodeBinding.d.ts.map +0 -1
  319. package/src/shade/renderer/scene/SkinnedMesh.d.ts +0 -27
  320. package/src/shade/renderer/scene/SkinnedMesh.d.ts.map +0 -1
  321. package/src/shade/renderer/scene/TransformAuthority.d.ts +0 -19
  322. package/src/shade/renderer/scene/TransformAuthority.d.ts.map +0 -1
@@ -343,32 +343,27 @@ export class ClothInstance {
343
343
  */
344
344
  blend_seen: number;
345
345
  /**
346
- * The colliders overlapping this cloth this step, packed in **its own
347
- * frame** rather than the world's — the same layout `ClothColliderIndex`
348
- * uses, in `Float32` rather than `Float64` because a cloth-local coordinate
349
- * is garment-sized (§12).
346
+ * Whether {@link state}'s buffer must be a `SharedArrayBuffer`.
350
347
  *
351
- * Grown, never shrunk, and rewritten every step by
352
- * `cloth_gather_colliders`. It lives on the instance rather than inside
353
- * {@link state}'s buffer because its size is a property of the *world* — how
354
- * many colliders happen to be near this cloth right now — and `ClothState`'s
355
- * one allocation is sized from the cloth. §12 puts it in the shared buffer
356
- * when M5 needs it there.
357
- * @type {Float32Array|null}
358
- */
359
- collider_table: Float32Array | null;
360
- /**
361
- * The index handle behind each record in {@link collider_table}. A record
362
- * index is this step's; a handle is the collider's, and it is what a
363
- * transient contact's multiplier is warm-started on.
364
- * @type {Int32Array|null}
348
+ * Set by {@link WorkerClothSystem} when the instance is linked, and read by
349
+ * `cloth_build_rows` every time the state is built — which is at seed and
350
+ * again at every re-seed, so a cloth that gains a link or changes a
351
+ * `ClothDynamics` field the rows depend on comes back shared without
352
+ * anything having to remember to ask.
353
+ * @type {boolean}
365
354
  */
366
- collider_key: Int32Array | null;
355
+ shared_state: boolean;
367
356
  /**
368
- * Live records in {@link collider_table}.
369
- * @type {number}
357
+ * `true` once this cloth has said its collider table overflowed.
358
+ *
359
+ * M5 moved that table into {@link state}'s buffer — §12's own layout, and
360
+ * what lets a worker step the cloth without being told about a new array
361
+ * every time the broadphase returns more. A fixed region has a capacity, and
362
+ * a cloth that overlaps more colliders than `CLOTH_COLLIDER_SLOTS` drops the
363
+ * remainder; this is how it says so once rather than once a frame.
364
+ * @type {boolean}
370
365
  */
371
- collider_count: number;
366
+ collider_overflow_reported: boolean;
372
367
  /**
373
368
  * Which particle pairs a self-collision row must never be built on, because
374
369
  * a persistent row already governs them (§9). CSR, sorted, built at seed and
@@ -414,6 +409,25 @@ export class ClothInstance {
414
409
  * @type {boolean}
415
410
  */
416
411
  refused: boolean;
412
+ /**
413
+ * The air at the cloth's centre the last time a step applied it, world-space
414
+ * metres per second (§10).
415
+ *
416
+ * What §7 P5's "wake on a wind change" compares against. It is the last
417
+ * **applied** air rather than the last sampled one, so a gust that builds
418
+ * slowly still wakes a sleeping banner instead of being reset by every step
419
+ * that declined to act on it.
420
+ * @type {Float64Array}
421
+ */
422
+ air_seen: Float64Array;
423
+ /**
424
+ * Whether the last step sampled the air per particle rather than once for
425
+ * the whole cloth — that is, whether a fluid field actually reached it.
426
+ * Diagnostic, and the one the playground shows: it is the difference
427
+ * between §10's simulated wake and its ambient fallback.
428
+ * @type {boolean}
429
+ */
430
+ air_varies: boolean;
417
431
  /**
418
432
  * How many times this cloth has been re-seeded by a teleport. Diagnostic:
419
433
  * a cloth resetting every few seconds is being driven by something that
@@ -1 +1 @@
1
- {"version":3,"file":"ClothInstance.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothInstance.js"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"ClothInstance.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothInstance.js"],"names":[],"mappings":"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"}
@@ -391,34 +391,28 @@ export class ClothInstance {
391
391
  blend_seen = 1;
392
392
 
393
393
  /**
394
- * The colliders overlapping this cloth this step, packed in **its own
395
- * frame** rather than the world's — the same layout `ClothColliderIndex`
396
- * uses, in `Float32` rather than `Float64` because a cloth-local coordinate
397
- * is garment-sized (§12).
394
+ * Whether {@link state}'s buffer must be a `SharedArrayBuffer`.
398
395
  *
399
- * Grown, never shrunk, and rewritten every step by
400
- * `cloth_gather_colliders`. It lives on the instance rather than inside
401
- * {@link state}'s buffer because its size is a property of the *world* — how
402
- * many colliders happen to be near this cloth right now — and `ClothState`'s
403
- * one allocation is sized from the cloth. §12 puts it in the shared buffer
404
- * when M5 needs it there.
405
- * @type {Float32Array|null}
406
- */
407
- collider_table = null;
408
-
409
- /**
410
- * The index handle behind each record in {@link collider_table}. A record
411
- * index is this step's; a handle is the collider's, and it is what a
412
- * transient contact's multiplier is warm-started on.
413
- * @type {Int32Array|null}
396
+ * Set by {@link WorkerClothSystem} when the instance is linked, and read by
397
+ * `cloth_build_rows` every time the state is built — which is at seed and
398
+ * again at every re-seed, so a cloth that gains a link or changes a
399
+ * `ClothDynamics` field the rows depend on comes back shared without
400
+ * anything having to remember to ask.
401
+ * @type {boolean}
414
402
  */
415
- collider_key = null;
403
+ shared_state = false;
416
404
 
417
405
  /**
418
- * Live records in {@link collider_table}.
419
- * @type {number}
406
+ * `true` once this cloth has said its collider table overflowed.
407
+ *
408
+ * M5 moved that table into {@link state}'s buffer — §12's own layout, and
409
+ * what lets a worker step the cloth without being told about a new array
410
+ * every time the broadphase returns more. A fixed region has a capacity, and
411
+ * a cloth that overlaps more colliders than `CLOTH_COLLIDER_SLOTS` drops the
412
+ * remainder; this is how it says so once rather than once a frame.
413
+ * @type {boolean}
420
414
  */
421
- collider_count = 0;
415
+ collider_overflow_reported = false;
422
416
 
423
417
  /**
424
418
  * Which particle pairs a self-collision row must never be built on, because
@@ -467,6 +461,27 @@ export class ClothInstance {
467
461
  */
468
462
  refused = false;
469
463
 
464
+ /**
465
+ * The air at the cloth's centre the last time a step applied it, world-space
466
+ * metres per second (§10).
467
+ *
468
+ * What §7 P5's "wake on a wind change" compares against. It is the last
469
+ * **applied** air rather than the last sampled one, so a gust that builds
470
+ * slowly still wakes a sleeping banner instead of being reset by every step
471
+ * that declined to act on it.
472
+ * @type {Float64Array}
473
+ */
474
+ air_seen = new Float64Array(3);
475
+
476
+ /**
477
+ * Whether the last step sampled the air per particle rather than once for
478
+ * the whole cloth — that is, whether a fluid field actually reached it.
479
+ * Diagnostic, and the one the playground shows: it is the difference
480
+ * between §10's simulated wake and its ambient fallback.
481
+ * @type {boolean}
482
+ */
483
+ air_varies = false;
484
+
470
485
  /**
471
486
  * How many times this cloth has been re-seeded by a teleport. Diagnostic:
472
487
  * a cloth resetting every few seconds is being driven by something that
@@ -0,0 +1,84 @@
1
+ /**
2
+ * # Binary serialization for {@link Cloth}
3
+ *
4
+ * The component is authoring data and nothing else, so the whole of it is
5
+ * written: the {@link ClothDynamics} value object inline, then `blend`, `layer`,
6
+ * `mask` and `flags`. There is no transient field to exclude — the live binding
7
+ * between a component and a simulation is a {@link ClothInstance} owned by
8
+ * `ClothWorld`, and everything world-tied lives over there: the seeded topology,
9
+ * the `ClothState` buffer, and `blend_seen`, which is what the write-back last
10
+ * saw rather than what the author asked for. All of it is rebuilt on link, the
11
+ * same division `RigidBodySerializationAdapter` makes against `_bodyId`.
12
+ *
13
+ * ## The dynamics are written **by value**, and that is not the `Collider#shape`
14
+ * case
15
+ *
16
+ * §3.2 sets out the convention for a component pointing at a built, shared,
17
+ * immutable asset — `Collider#shape`, `ParticleEffect`'s layout and program,
18
+ * `ClothRig#proxy` — which is that the reference is *not* in the stream and the
19
+ * asset pipeline wires it up, because what has to be restored is the asset's
20
+ * **identity**. A `ClothDynamics` is not that. §3.3's library is "a set of
21
+ * points rather than a mechanism": an entry is frozen and shared as an
22
+ * allocation optimisation, not because anything downstream refers to it by
23
+ * name, and a cloth built from `CLOTH_SILK.clone()` with one field moved has no
24
+ * identity to restore at all. Ten scalars are 68 bytes; an identity story for
25
+ * them would cost more than the bytes and would have to invent a name for every
26
+ * `clone()`. So the values go in the stream and a loaded cloth is equal to the
27
+ * saved one under {@link Cloth#equals}, which compares dynamics field-wise.
28
+ *
29
+ * ## Deserialize replaces the dynamics rather than writing into them
30
+ *
31
+ * Library entries are frozen and the engine is modules, so writing a field on
32
+ * one **throws** (`ClothDynamics.spec.js` pins that). Deserializing in place
33
+ * into a `Cloth` that holds `CLOTH_ROPE` — a reset-to-snapshot restore over a
34
+ * live scene, not a hypothetical — would be exactly that write. So the adapter
35
+ * builds a fresh instance and hands it over, which is also what
36
+ * {@link Cloth#fromJSON} does and for the same reason. The two codecs agreeing
37
+ * on it matters beyond the throw: a scene that round-trips as JSON and a scene
38
+ * that round-trips as binary must not disagree about whether the loaded cloth
39
+ * shares its dynamics with anything.
40
+ *
41
+ * ## `layer` and `mask` are read back unsigned, unlike the `RigidBody` pair
42
+ *
43
+ * `RigidBodySerializationAdapter` normalises those two fields with `| 0`,
44
+ * because a `RigidBody`'s default mask is the signed `0xFFFFFFFF | 0 === -1`
45
+ * and reading the raw unsigned value would make a round-tripped body compare
46
+ * unequal to a fresh one. `Cloth`'s default is the **unsigned** `0xFFFFFFFF`,
47
+ * and `Cloth.from` asserts `isNonNegativeInteger` on it, so here the same `| 0`
48
+ * would be the bug rather than the fix: it would hand back a `-1` that fails
49
+ * the component's own stated contract and compares unequal under
50
+ * {@link Cloth#equals}. `readUint32` already returns the unsigned value, so the
51
+ * correct code is the code with nothing in it — which is precisely why this
52
+ * paragraph exists, since the surrounding adapters all carry the opposite
53
+ * normalisation and it reads like an omission.
54
+ *
55
+ * ## Version 0, and no upgrader
56
+ *
57
+ * `RigidBodySerializationUpgrader_0_1` exists because a v0 stream had already
58
+ * shipped when the sleep fields were added; a first version has no predecessor
59
+ * stream to upgrade from. Adding a field here is a bump to 1 plus an upgrader
60
+ * that writes that field's pre-upgrade default, and the exact-size assertion in
61
+ * the spec is what makes forgetting the bump fail rather than corrupt.
62
+ *
63
+ * @author Alex Goldring
64
+ * @copyright Company Named Limited (c) 2026
65
+ */
66
+ export class ClothSerializationAdapter extends BinaryClassSerializationAdapter<any> {
67
+ constructor();
68
+ klass: typeof Cloth;
69
+ /**
70
+ *
71
+ * @param {BinaryBuffer} buffer
72
+ * @param {Cloth} value
73
+ */
74
+ serialize(buffer: BinaryBuffer, value: Cloth): void;
75
+ /**
76
+ *
77
+ * @param {BinaryBuffer} buffer
78
+ * @param {Cloth} value
79
+ */
80
+ deserialize(buffer: BinaryBuffer, value: Cloth): void;
81
+ }
82
+ import { BinaryClassSerializationAdapter } from "../../../ecs/storage/binary/BinaryClassSerializationAdapter.js";
83
+ import { Cloth } from "./Cloth.js";
84
+ //# sourceMappingURL=ClothSerializationAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClothSerializationAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothSerializationAdapter.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH;;IAEI,oBAAc;IAGd;;;;OAIG;IACH,uCAFW,KAAK,QA2Bf;IAED;;;;OAIG;IACH,yCAFW,KAAK,QA8Bf;CACJ;gDA5I+C,gEAAgE;sBAC1F,YAAY"}
@@ -0,0 +1,141 @@
1
+ import { BinaryClassSerializationAdapter } from "../../../ecs/storage/binary/BinaryClassSerializationAdapter.js";
2
+ import { Cloth } from "./Cloth.js";
3
+ import { ClothDynamics } from "./ClothDynamics.js";
4
+
5
+ /**
6
+ * # Binary serialization for {@link Cloth}
7
+ *
8
+ * The component is authoring data and nothing else, so the whole of it is
9
+ * written: the {@link ClothDynamics} value object inline, then `blend`, `layer`,
10
+ * `mask` and `flags`. There is no transient field to exclude — the live binding
11
+ * between a component and a simulation is a {@link ClothInstance} owned by
12
+ * `ClothWorld`, and everything world-tied lives over there: the seeded topology,
13
+ * the `ClothState` buffer, and `blend_seen`, which is what the write-back last
14
+ * saw rather than what the author asked for. All of it is rebuilt on link, the
15
+ * same division `RigidBodySerializationAdapter` makes against `_bodyId`.
16
+ *
17
+ * ## The dynamics are written **by value**, and that is not the `Collider#shape`
18
+ * case
19
+ *
20
+ * §3.2 sets out the convention for a component pointing at a built, shared,
21
+ * immutable asset — `Collider#shape`, `ParticleEffect`'s layout and program,
22
+ * `ClothRig#proxy` — which is that the reference is *not* in the stream and the
23
+ * asset pipeline wires it up, because what has to be restored is the asset's
24
+ * **identity**. A `ClothDynamics` is not that. §3.3's library is "a set of
25
+ * points rather than a mechanism": an entry is frozen and shared as an
26
+ * allocation optimisation, not because anything downstream refers to it by
27
+ * name, and a cloth built from `CLOTH_SILK.clone()` with one field moved has no
28
+ * identity to restore at all. Ten scalars are 68 bytes; an identity story for
29
+ * them would cost more than the bytes and would have to invent a name for every
30
+ * `clone()`. So the values go in the stream and a loaded cloth is equal to the
31
+ * saved one under {@link Cloth#equals}, which compares dynamics field-wise.
32
+ *
33
+ * ## Deserialize replaces the dynamics rather than writing into them
34
+ *
35
+ * Library entries are frozen and the engine is modules, so writing a field on
36
+ * one **throws** (`ClothDynamics.spec.js` pins that). Deserializing in place
37
+ * into a `Cloth` that holds `CLOTH_ROPE` — a reset-to-snapshot restore over a
38
+ * live scene, not a hypothetical — would be exactly that write. So the adapter
39
+ * builds a fresh instance and hands it over, which is also what
40
+ * {@link Cloth#fromJSON} does and for the same reason. The two codecs agreeing
41
+ * on it matters beyond the throw: a scene that round-trips as JSON and a scene
42
+ * that round-trips as binary must not disagree about whether the loaded cloth
43
+ * shares its dynamics with anything.
44
+ *
45
+ * ## `layer` and `mask` are read back unsigned, unlike the `RigidBody` pair
46
+ *
47
+ * `RigidBodySerializationAdapter` normalises those two fields with `| 0`,
48
+ * because a `RigidBody`'s default mask is the signed `0xFFFFFFFF | 0 === -1`
49
+ * and reading the raw unsigned value would make a round-tripped body compare
50
+ * unequal to a fresh one. `Cloth`'s default is the **unsigned** `0xFFFFFFFF`,
51
+ * and `Cloth.from` asserts `isNonNegativeInteger` on it, so here the same `| 0`
52
+ * would be the bug rather than the fix: it would hand back a `-1` that fails
53
+ * the component's own stated contract and compares unequal under
54
+ * {@link Cloth#equals}. `readUint32` already returns the unsigned value, so the
55
+ * correct code is the code with nothing in it — which is precisely why this
56
+ * paragraph exists, since the surrounding adapters all carry the opposite
57
+ * normalisation and it reads like an omission.
58
+ *
59
+ * ## Version 0, and no upgrader
60
+ *
61
+ * `RigidBodySerializationUpgrader_0_1` exists because a v0 stream had already
62
+ * shipped when the sleep fields were added; a first version has no predecessor
63
+ * stream to upgrade from. Adding a field here is a bump to 1 plus an upgrader
64
+ * that writes that field's pre-upgrade default, and the exact-size assertion in
65
+ * the spec is what makes forgetting the bump fail rather than corrupt.
66
+ *
67
+ * @author Alex Goldring
68
+ * @copyright Company Named Limited (c) 2026
69
+ */
70
+ export class ClothSerializationAdapter extends BinaryClassSerializationAdapter {
71
+
72
+ klass = Cloth;
73
+ version = 0;
74
+
75
+ /**
76
+ *
77
+ * @param {BinaryBuffer} buffer
78
+ * @param {Cloth} value
79
+ */
80
+ serialize(buffer, value) {
81
+ const dynamics = value.dynamics;
82
+
83
+ buffer.writeFloat64(dynamics.stretch);
84
+ buffer.writeFloat64(dynamics.bend);
85
+ buffer.writeFloat64(dynamics.damping);
86
+ buffer.writeFloat64(dynamics.slack);
87
+ buffer.writeFloat64(dynamics.thickness);
88
+ buffer.writeFloat64(dynamics.inertia);
89
+ buffer.writeFloat64(dynamics.drag);
90
+
91
+ // A budget, not an enum: `assert.isPositiveInteger` is the whole of the
92
+ // component's contract on these two, so a u8 would be a silent clamp on
93
+ // a value the component considers legal. Four bytes each buys the
94
+ // absence of that.
95
+ buffer.writeUint32(dynamics.substeps);
96
+ buffer.writeUint32(dynamics.iterations);
97
+
98
+ buffer.writeUint32(dynamics.flags >>> 0);
99
+
100
+ buffer.writeFloat64(value.blend);
101
+
102
+ buffer.writeUint32(value.layer >>> 0);
103
+ buffer.writeUint32(value.mask >>> 0);
104
+ buffer.writeUint32(value.flags >>> 0);
105
+ }
106
+
107
+ /**
108
+ *
109
+ * @param {BinaryBuffer} buffer
110
+ * @param {Cloth} value
111
+ */
112
+ deserialize(buffer, value) {
113
+ // Fresh rather than in place: the target may hold a frozen library
114
+ // entry, and a loaded cloth always owns its dynamics — see the class
115
+ // docblock and Cloth#fromJSON.
116
+ const dynamics = new ClothDynamics();
117
+
118
+ dynamics.stretch = buffer.readFloat64();
119
+ dynamics.bend = buffer.readFloat64();
120
+ dynamics.damping = buffer.readFloat64();
121
+ dynamics.slack = buffer.readFloat64();
122
+ dynamics.thickness = buffer.readFloat64();
123
+ dynamics.inertia = buffer.readFloat64();
124
+ dynamics.drag = buffer.readFloat64();
125
+
126
+ dynamics.substeps = buffer.readUint32();
127
+ dynamics.iterations = buffer.readUint32();
128
+
129
+ dynamics.flags = buffer.readUint32();
130
+
131
+ value.dynamics = dynamics;
132
+
133
+ value.blend = buffer.readFloat64();
134
+
135
+ // Unsigned, deliberately — the `| 0` the RigidBody adapter applies
136
+ // would break this component's non-negative contract. Class docblock.
137
+ value.layer = buffer.readUint32();
138
+ value.mask = buffer.readUint32();
139
+ value.flags = buffer.readUint32();
140
+ }
141
+ }
@@ -1,12 +1,16 @@
1
1
  /**
2
- * # The system — gather, step, write back
2
+ * # The system — gather, step, write back, all on this thread
3
3
  *
4
- * One {@link ClothInstance} per {@link Cloth} component, stepped at the fixed
5
- * rate. Per step, per cloth: move the local frame with the anchor, point the
6
- * leash rows at where they measure from, step, and put the result back on the
7
- * subtree. The animated pose the leashes are measured against is not recomposed
8
- * per step — in the entity path it is constant in the anchor's own frame, and
9
- * `cloth_seed_subtree.js` bakes it.
4
+ * Every cloth in the scene stepped inline at the fixed rate. The work itself
5
+ * lives in {@link ClothWorld}, which this shares with {@link WorkerClothSystem}
6
+ * so that §12's "`ClothSystem` and `WorkerClothSystem` must produce bit-identical
7
+ * results" is a property of there being one copy rather than of two copies
8
+ * agreeing. What is left here is a `System`'s own surface — what it depends on,
9
+ * what it accesses, and the loop.
10
+ *
11
+ * This is the fallback where `SharedArrayBuffer` is unavailable, and it is **not
12
+ * a degraded mode**: it is the same solver over the same data in the same
13
+ * order, and the only thing the worker buys is which thread pays for it.
10
14
  *
11
15
  * ## Where in the frame this runs
12
16
  *
@@ -37,29 +41,6 @@
37
41
  * it before `TransformAttachmentSystem`, which is right: cloth writes the local
38
42
  * transforms and the attachment system is their reader.
39
43
  *
40
- * ## The local frame and the inertia model — §7 P7
41
- *
42
- * Particles live in the anchor's own frame. When the anchor moves, the cloth is
43
- * asked how much of that motion it would like to feel:
44
- * `ClothDynamics#inertia = 1` keeps every particle's **world** position and
45
- * velocity, so a cape trails a sprinting character; `0` keeps their **local**
46
- * ones, so the cloth rides the anchor as though it were standing still. The
47
- * blend between the two is a lerp in the local frame, which is all the frame
48
- * change is.
49
- *
50
- * The felt motion is limited before the blend, which is what makes "character
51
- * sprints, cape behaves" a default rather than a tuning exercise, and the limits
52
- * are derived from the cloth's own reach rather than authored.
53
- *
54
- * ## Teleport — §7 P6
55
- *
56
- * Anchor motion past a threshold is not locomotion and is not treated as any
57
- * amount of it. `ClothFlags.TeleportKeep` carries the shape across, which in a
58
- * local frame is literally doing nothing; the default re-seeds at the animated
59
- * pose with zero velocity and opens a stabilisation window in which the
60
- * velocity limit ramps back from nothing, so the first steps after a reset
61
- * cannot produce a whip.
62
- *
63
44
  * @author Alex Goldring
64
45
  * @copyright Company Named Limited (c) 2026
65
46
  */
@@ -68,59 +49,58 @@ export class ClothSystem extends System<any> {
68
49
  dependencies: (typeof Transform64 | typeof Cloth)[];
69
50
  components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof TransformAttachment> | ResourceAccessSpecification<typeof ClothCollider> | ResourceAccessSpecification<typeof Cloth> | ResourceAccessSpecification<typeof ClothExclude> | ResourceAccessSpecification<typeof ClothRig>)[];
70
51
  /**
71
- * World gravity, m/s². Rotated into each cloth's local frame per step.
52
+ * @type {ClothWorld}
53
+ */
54
+ world: ClothWorld;
55
+ /**
56
+ * One cloth's step parameters, reused for every cloth in turn because the
57
+ * step follows immediately.
58
+ *
59
+ * The same block {@link WorkerClothSystem} writes into the shared command
60
+ * region — one layout, written by one function, so the inline path and the
61
+ * worker path cannot be handed different numbers.
72
62
  * @type {Float64Array}
63
+ * @private
73
64
  */
74
- gravity: Float64Array;
65
+ private __params;
75
66
  /**
76
- * Live cloths, ordered so that an instance whose anchor sits inside another
77
- * instance's subtree steps after it.
78
- * @type {ClothInstance[]}
67
+ * @param {Float64Array} value
79
68
  */
80
- instances: ClothInstance[];
69
+ set gravity(value: Float64Array);
81
70
  /**
82
- * @type {Map<number, ClothInstance>}
83
- * @private
71
+ * World gravity, m/s². Rotated into each cloth's local frame per step.
72
+ * @returns {Float64Array}
84
73
  */
85
- private __by_entity;
74
+ get gravity(): Float64Array;
86
75
  /**
87
- * @type {TransformAttachmentSystem|null}
88
- * @private
76
+ * @param {AbstractClothWind|null} value
89
77
  */
90
- private __attachments;
78
+ set wind(value: any);
91
79
  /**
92
- * Where a skinned model instance comes from. Anything that answers
93
- * `instance_of(entity)` with a `PrefabInstance` — skins whose joints
94
- * are entities — will do, and {@link MeshSystem} is what does in a
95
- * running engine.
96
- *
97
- * Public and assignable because a garment's joints are a *rendering*
98
- * structure and `MeshSystem` needs a graphics engine, a scene and a loader
99
- * to exist — so a spec that wants joints without a renderer sets this
100
- * instead, and gets exactly the interface the system uses.
101
- *
102
- * `null` means no rig can seed, which is the same additive shape the
103
- * collider index has: a scene without one gets M1's cloth rather than an
104
- * error.
105
- * @type {{instance_of: function(number): (PrefabInstance|null)}|null}
80
+ * Where the air comes from — see {@link ClothWorld#wind}. `null` by default,
81
+ * which is a scene with no wind in it.
82
+ * @returns {AbstractClothWind|null}
106
83
  */
107
- models: {
108
- instance_of: (arg0: number) => (PrefabInstance | null);
109
- } | null;
84
+ get wind(): any;
110
85
  /**
111
- * The collider index's owner, or `null` when the manager has none — in
112
- * which case cloth simply does not collide, which is exactly M1's
113
- * behaviour and is what makes the collision layer additive rather than a
114
- * new requirement on every scene.
115
- * @type {ClothColliderSystem|null}
116
- * @private
86
+ * Live cloths, ordered so that an instance whose anchor sits inside another
87
+ * instance's subtree steps after it.
88
+ * @returns {ClothInstance[]}
117
89
  */
118
- private __colliders;
90
+ get instances(): ClothInstance[];
119
91
  /**
120
- * @type {boolean}
121
- * @private
92
+ * @param {{instance_of: function(number): (PrefabInstance|null)}|null} value
122
93
  */
123
- private __order_dirty;
94
+ set models(value: {
95
+ instance_of: (arg0: number) => (PrefabInstance | null);
96
+ });
97
+ /**
98
+ * Where a skinned model instance comes from — see {@link ClothWorld#models}.
99
+ * @returns {{instance_of: function(number): (PrefabInstance|null)}|null}
100
+ */
101
+ get models(): {
102
+ instance_of: (arg0: number) => (PrefabInstance | null);
103
+ };
124
104
  /**
125
105
  * @param {EntityManager} entityManager
126
106
  * @returns {Promise<void>}
@@ -140,22 +120,12 @@ export class ClothSystem extends System<any> {
140
120
  unlink(cloth: Cloth, transform: Transform64, entity: number): void;
141
121
  /**
142
122
  * Throw away a cloth's binding so the next step walks its subtree again.
143
- *
144
- * The walk is done once, because a rope's links do not come and go. When
145
- * they do — a chain gains a link, a rig is rebuilt — this is how you say so,
146
- * and it is the same contract `TransformAttachment#parent` already carries:
147
- * the structure is immutable while it is attached, and changing it is an
148
- * explicit act rather than something the engine polls for.
149
- *
150
123
  * @param {number} entity
151
124
  * @returns {void}
152
125
  */
153
126
  reseed(entity: number): void;
154
127
  /**
155
- * Wake a sleeping cloth. Anchor motion and a `ClothDynamics` change do this
156
- * on their own; a caller that has changed the world in some way the cloth
157
- * cannot see — M6's wind, for one — says so here.
158
- *
128
+ * Wake a sleeping cloth.
159
129
  * @param {number} entity
160
130
  * @returns {void}
161
131
  */
@@ -165,7 +135,6 @@ export class ClothSystem extends System<any> {
165
135
  * @returns {ClothInstance|undefined}
166
136
  */
167
137
  instanceOf(entity: number): ClothInstance | undefined;
168
- #private;
169
138
  }
170
139
  import { System } from "../../../ecs/System.js";
171
140
  import { Transform64 } from "../../../ecs/transform/Transform64.js";
@@ -175,5 +144,5 @@ import { TransformAttachment } from "../../../ecs/transform-attachment/Transform
175
144
  import { ClothCollider } from "./ClothCollider.js";
176
145
  import { ClothExclude } from "./ClothExclude.js";
177
146
  import { ClothRig } from "./ClothRig.js";
178
- import { ClothInstance } from "./ClothInstance.js";
147
+ import { ClothWorld } from "./ClothWorld.js";
179
148
  //# sourceMappingURL=ClothSystem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClothSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothSystem.js"],"names":[],"mappings":"AA4DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH;;IAEI,oDAAoC;IAEpC,iUAOE;IAEF;;;OAGG;IACH,SAFU,YAAY,CAEoB;IAE1C;;;;OAIG;IACH,WAFU,aAAa,EAAE,CAEV;IAEf;;;OAGG;IACH,oBAAwB;IAExB;;;OAGG;IACH,sBAAqB;IAErB;;;;;;;;;;;;;;;OAeG;IACH,QAFU;QAAC,WAAW,SAAW,MAAM,KAAG,CAAC,iBAAe,IAAI,CAAC,CAAA;KAAC,GAAC,IAAI,CAEvD;IAEd;;;;;;;OAOG;IACH,oBAAmB;IAEnB;;;OAGG;IACH,sBAAsB;IAEtB;;;OAGG;IACH,uCAFa,QAAQ,IAAI,CAAC,CAiBzB;IAED;;;;OAIG;IACH,YAJW,KAAK,aACL,WAAW,UACX,MAAM,QAahB;IAED;;;;OAIG;IACH,cAJW,KAAK,aACL,WAAW,UACX,MAAM,QAgBhB;IAED;;;;;;;;;;;OAWG;IACH,eAHW,MAAM,GACJ,IAAI,CAahB;IAED;;;;;;;OAOG;IACH,aAHW,MAAM,GACJ,IAAI,CAShB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,aAAa,GAAC,SAAS,CAInC;;CAibJ;uBA3tBsB,wBAAwB;4BAWxC,uCAAuC;sBAUxB,YAAY;4CAtBU,uDAAuD;oCAI5F,0DAA0D;8BAmBnC,oBAAoB;6BAErB,mBAAmB;yBAIvB,eAAe;8BADV,oBAAoB"}
1
+ {"version":3,"file":"ClothSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothSystem.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;;IAEI,oDAAoC;IAEpC,iUAOE;IAEF;;OAEG;IACH,OAFU,UAAU,CAEK;IAEzB;;;;;;;;;OASG;IACH,iBAAqD;IAUrD;;OAEG;IACH,iCAEC;IAbD;;;OAGG;IACH,4BAEC;IAkBD;;OAEG;IACH,qBAEC;IAdD;;;;OAIG;IACH,gBAEC;IASD;;;;OAIG;IACH,iCAEC;IAUD;;OAEG;IACH;4BAToC,MAAM,KAAG,CAAC,iBAAe,IAAI,CAAC;OAWjE;IAbD;;;OAGG;IACH;4BAFoC,MAAM,KAAG,CAAC,iBAAe,IAAI,CAAC;MAIjE;IASD;;;OAGG;IACH,uCAFa,QAAQ,IAAI,CAAC,CAIzB;IAED;;;;OAIG;IACH,YAJW,KAAK,aACL,WAAW,UACX,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAJW,KAAK,aACL,WAAW,UACX,MAAM,QAIhB;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;CAoCJ;uBArOsB,wBAAwB;4BAInB,uCAAuC;sBAE7C,YAAY;4CAPU,uDAAuD;oCAI5F,0DAA0D;8BAInC,oBAAoB;6BACrB,mBAAmB;yBACvB,eAAe;2BACb,iBAAiB"}