@woosh/meep-engine 3.22.0 → 3.23.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 (267) hide show
  1. package/package.json +1 -1
  2. package/src/core/geom/3d/hash-grid/PointHashGrid3.d.ts +118 -0
  3. package/src/core/geom/3d/hash-grid/PointHashGrid3.d.ts.map +1 -0
  4. package/src/core/geom/3d/hash-grid/PointHashGrid3.js +283 -0
  5. package/src/core/geom/3d/shape/BoxShape3D.d.ts.map +1 -1
  6. package/src/core/geom/3d/shape/BoxShape3D.js +6 -17
  7. package/src/core/geom/3d/shape/CapsuleShape3D.d.ts.map +1 -1
  8. package/src/core/geom/3d/shape/CapsuleShape3D.js +3 -14
  9. package/src/core/geom/3d/shape/CylinderShape3D.d.ts.map +1 -1
  10. package/src/core/geom/3d/shape/CylinderShape3D.js +3 -21
  11. package/src/core/geom/3d/shape/PlaneShape3D.d.ts +105 -0
  12. package/src/core/geom/3d/shape/PlaneShape3D.d.ts.map +1 -0
  13. package/src/core/geom/3d/shape/PlaneShape3D.js +251 -0
  14. package/src/core/geom/3d/shape/SphereShape3D.js +3 -3
  15. package/src/core/geom/3d/shape/json/shape_to_type.d.ts.map +1 -1
  16. package/src/core/geom/3d/shape/json/shape_to_type.js +3 -0
  17. package/src/core/geom/3d/shape/json/type_adapters.d.ts +14 -0
  18. package/src/core/geom/3d/shape/json/type_adapters.d.ts.map +1 -1
  19. package/src/core/geom/3d/shape/json/type_adapters.js +15 -0
  20. package/src/core/geom/3d/shape/sdf/sdf3_box.d.ts +51 -0
  21. package/src/core/geom/3d/shape/sdf/sdf3_box.d.ts.map +1 -0
  22. package/src/core/geom/3d/shape/sdf/sdf3_box.js +113 -0
  23. package/src/core/geom/3d/shape/sdf/sdf3_capsule.d.ts +46 -0
  24. package/src/core/geom/3d/shape/sdf/sdf3_capsule.d.ts.map +1 -0
  25. package/src/core/geom/3d/shape/sdf/sdf3_capsule.js +82 -0
  26. package/src/core/geom/3d/shape/sdf/sdf3_cylinder.d.ts +60 -0
  27. package/src/core/geom/3d/shape/sdf/sdf3_cylinder.d.ts.map +1 -0
  28. package/src/core/geom/3d/shape/sdf/sdf3_cylinder.js +126 -0
  29. package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.d.ts +50 -0
  30. package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.d.ts.map +1 -0
  31. package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.js +53 -0
  32. package/src/core/geom/3d/shape/sdf/sdf3_plane.d.ts +52 -0
  33. package/src/core/geom/3d/shape/sdf/sdf3_plane.d.ts.map +1 -0
  34. package/src/core/geom/3d/shape/sdf/sdf3_plane.js +61 -0
  35. package/src/core/geom/3d/shape/sdf/sdf3_sphere.d.ts +41 -0
  36. package/src/core/geom/3d/shape/sdf/sdf3_sphere.d.ts.map +1 -0
  37. package/src/core/geom/3d/shape/sdf/sdf3_sphere.js +71 -0
  38. package/src/core/process/ConcurrencyGate.d.ts +103 -0
  39. package/src/core/process/ConcurrencyGate.d.ts.map +1 -0
  40. package/src/core/process/ConcurrencyGate.js +207 -0
  41. package/src/engine/asset/AssetManager.d.ts +10 -0
  42. package/src/engine/asset/AssetManager.d.ts.map +1 -1
  43. package/src/engine/asset/AssetManager.js +10 -0
  44. package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +30 -13
  45. package/src/engine/graphics3/pose/collect_entity_playbacks.d.ts +26 -0
  46. package/src/engine/graphics3/pose/collect_entity_playbacks.d.ts.map +1 -0
  47. package/src/engine/graphics3/pose/collect_entity_playbacks.js +40 -0
  48. package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts.map +1 -1
  49. package/src/engine/graphics3/pose/query_entity_node_world_pose.js +74 -101
  50. package/src/engine/physics/cloth/MEASUREMENTS.md +1287 -4
  51. package/src/engine/physics/cloth/PLAN.md +1967 -1581
  52. package/src/engine/physics/cloth/build/ClothProxy.d.ts +147 -0
  53. package/src/engine/physics/cloth/build/ClothProxy.d.ts.map +1 -0
  54. package/src/engine/physics/cloth/build/ClothProxy.js +207 -0
  55. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +70 -0
  56. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -0
  57. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +256 -0
  58. package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +176 -0
  59. package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -0
  60. package/src/engine/physics/cloth/collider/ClothColliderIndex.js +435 -0
  61. package/src/engine/physics/cloth/collider/ClothColliderKind.d.ts +12 -0
  62. package/src/engine/physics/cloth/collider/ClothColliderKind.d.ts.map +1 -0
  63. package/src/engine/physics/cloth/collider/ClothColliderKind.js +38 -0
  64. package/src/engine/physics/cloth/collider/ClothColliderRecord.d.ts +120 -0
  65. package/src/engine/physics/cloth/collider/ClothColliderRecord.d.ts.map +1 -0
  66. package/src/engine/physics/cloth/collider/ClothColliderRecord.js +137 -0
  67. package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts +25 -0
  68. package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts.map +1 -0
  69. package/src/engine/physics/cloth/collider/cloth_collider_bounds.js +190 -0
  70. package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts +44 -0
  71. package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts.map +1 -0
  72. package/src/engine/physics/cloth/collider/cloth_collider_pack.js +173 -0
  73. package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts +94 -0
  74. package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -0
  75. package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +275 -0
  76. package/src/engine/physics/cloth/ecs/ClothCollider.d.ts +126 -0
  77. package/src/engine/physics/cloth/ecs/ClothCollider.d.ts.map +1 -0
  78. package/src/engine/physics/cloth/ecs/ClothCollider.js +199 -0
  79. package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts +9 -0
  80. package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts.map +1 -0
  81. package/src/engine/physics/cloth/ecs/ClothColliderFlags.js +32 -0
  82. package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts +114 -0
  83. package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts.map +1 -0
  84. package/src/engine/physics/cloth/ecs/ClothColliderSystem.js +243 -0
  85. package/src/engine/physics/cloth/ecs/ClothDynamicsFlags.js +66 -57
  86. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +109 -1
  87. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  88. package/src/engine/physics/cloth/ecs/ClothInstance.js +479 -363
  89. package/src/engine/physics/cloth/ecs/ClothRig.d.ts +95 -0
  90. package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -0
  91. package/src/engine/physics/cloth/ecs/ClothRig.js +140 -0
  92. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +30 -1
  93. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  94. package/src/engine/physics/cloth/ecs/ClothSystem.js +1021 -773
  95. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts +90 -0
  96. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -0
  97. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +374 -0
  98. package/src/engine/physics/cloth/ecs/cloth_dynamics_library.d.ts +32 -3
  99. package/src/engine/physics/cloth/ecs/cloth_dynamics_library.d.ts.map +1 -1
  100. package/src/engine/physics/cloth/ecs/cloth_dynamics_library.js +283 -254
  101. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +59 -0
  102. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -0
  103. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +328 -0
  104. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts +13 -0
  105. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -0
  106. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +288 -0
  107. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +58 -0
  108. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -0
  109. package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +199 -0
  110. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +8 -63
  111. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
  112. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +317 -645
  113. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +61 -0
  114. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
  115. package/src/engine/physics/cloth/ecs/cloth_write_back.js +212 -449
  116. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts +49 -0
  117. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -0
  118. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +115 -0
  119. package/src/engine/physics/cloth/playground/README.md +155 -1
  120. package/src/engine/physics/cloth/playground/collide.html +178 -0
  121. package/src/engine/physics/cloth/playground/collide_build.d.ts +95 -0
  122. package/src/engine/physics/cloth/playground/collide_build.d.ts.map +1 -0
  123. package/src/engine/physics/cloth/playground/collide_build.js +315 -0
  124. package/src/engine/physics/cloth/playground/collide_main.d.ts +2 -0
  125. package/src/engine/physics/cloth/playground/collide_main.d.ts.map +1 -0
  126. package/src/engine/physics/cloth/playground/collide_main.js +720 -0
  127. package/src/engine/physics/cloth/playground/garment.html +182 -0
  128. package/src/engine/physics/cloth/playground/garment_build.d.ts +78 -0
  129. package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -0
  130. package/src/engine/physics/cloth/playground/garment_build.js +359 -0
  131. package/src/engine/physics/cloth/playground/garment_main.d.ts +2 -0
  132. package/src/engine/physics/cloth/playground/garment_main.d.ts.map +1 -0
  133. package/src/engine/physics/cloth/playground/garment_main.js +633 -0
  134. package/src/engine/physics/cloth/solver/ClothState.d.ts +208 -5
  135. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  136. package/src/engine/physics/cloth/solver/ClothState.js +302 -8
  137. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +87 -0
  138. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -0
  139. package/src/engine/physics/cloth/solver/cloth_contact_find.js +343 -0
  140. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +112 -0
  141. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -0
  142. package/src/engine/physics/cloth/solver/cloth_self_find.js +448 -0
  143. package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts +4 -1
  144. package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts.map +1 -1
  145. package/src/engine/physics/cloth/solver/cloth_solve_vertex.js +16 -1
  146. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +112 -5
  147. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
  148. package/src/engine/physics/cloth/solver/cloth_solver_constants.js +117 -6
  149. package/src/engine/physics/cloth/solver/cloth_step.d.ts +40 -9
  150. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  151. package/src/engine/physics/cloth/solver/cloth_step.js +122 -10
  152. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +95 -0
  153. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -0
  154. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +285 -0
  155. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +129 -0
  156. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -0
  157. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +501 -0
  158. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts +75 -0
  159. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -0
  160. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +202 -0
  161. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  162. package/src/shade/playground/vgeo_viewer/README.md +18 -0
  163. package/src/shade/playground/vgeo_viewer/main.js +87 -50
  164. package/src/shade/renderer/buffer/table/GPUDatabase.d.ts.map +1 -1
  165. package/src/shade/renderer/buffer/table/GPUDatabase.js +191 -62
  166. package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts +94 -2
  167. package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts.map +1 -1
  168. package/src/shade/renderer/buffer/table/GPUTypedTable.js +414 -2
  169. package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.d.ts +14 -0
  170. package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.d.ts.map +1 -0
  171. package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.js +13 -0
  172. package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.d.ts +17 -0
  173. package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.d.ts.map +1 -0
  174. package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.js +116 -0
  175. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +9 -4
  176. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
  177. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +843 -734
  178. package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts +12 -0
  179. package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts.map +1 -1
  180. package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.js +13 -0
  181. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts +17 -0
  182. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts.map +1 -1
  183. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.js +185 -30
  184. package/src/shade/renderer/geometry/virtual/MICRON_COMPARISON_2026_08_20.md +17 -0
  185. package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +141 -24
  186. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +204 -64
  187. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +110 -10
  188. package/src/shade/renderer/geometry/virtual/VK_LOD_CLUSTERS_COMPARISON_2026_08_20.md +19 -0
  189. package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.d.ts +19 -6
  190. package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.d.ts.map +1 -1
  191. package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.js +26 -7
  192. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts +173 -14
  193. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts.map +1 -1
  194. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.js +458 -51
  195. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts +49 -13
  196. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts.map +1 -1
  197. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js +52 -14
  198. package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.d.ts +20 -0
  199. package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.d.ts.map +1 -0
  200. package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.js +19 -0
  201. package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.d.ts +27 -0
  202. package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.d.ts.map +1 -0
  203. package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.js +48 -0
  204. package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.d.ts +29 -0
  205. package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.d.ts.map +1 -0
  206. package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.js +60 -0
  207. package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.d.ts +8 -1
  208. package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.d.ts.map +1 -1
  209. package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.js +32 -2
  210. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts +258 -0
  211. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts.map +1 -0
  212. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.js +723 -0
  213. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts +49 -0
  214. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts.map +1 -0
  215. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.js +50 -0
  216. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  217. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  218. package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.d.ts +3 -0
  219. package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.d.ts.map +1 -1
  220. package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.js +121 -21
  221. package/src/shade/renderer/texture/virtual/README.md +6 -4
  222. package/src/shade/renderer/texture/virtual/VirtualTextureManager.d.ts.map +1 -1
  223. package/src/shade/renderer/texture/virtual/VirtualTextureManager.js +7 -0
  224. package/src/shade/renderer/texture/virtual/source/VTSourceTiled.d.ts +3 -3
  225. package/src/shade/renderer/texture/virtual/source/VTSourceTiled.js +3 -3
  226. package/src/engine/ecs/system/SystemExecutionPhase.d.ts +0 -9
  227. package/src/engine/ecs/system/SystemExecutionPhase.d.ts.map +0 -1
  228. package/src/engine/graphics/texture/virtual/NOTES.md +0 -128
  229. package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.d.ts +0 -6
  230. package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.d.ts.map +0 -1
  231. package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.js +0 -5
  232. package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts +0 -49
  233. package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts.map +0 -1
  234. package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.js +0 -264
  235. package/src/engine/graphics/texture/virtual/VirtualTextureUsage.d.ts +0 -44
  236. package/src/engine/graphics/texture/virtual/VirtualTextureUsage.d.ts.map +0 -1
  237. package/src/engine/graphics/texture/virtual/VirtualTextureUsage.js +0 -228
  238. package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.d.ts +0 -3
  239. package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.d.ts.map +0 -1
  240. package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.js +0 -73
  241. package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.d.ts +0 -14
  242. package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.d.ts.map +0 -1
  243. package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.js +0 -85
  244. package/src/engine/graphics/texture/virtual/debug/UsageDebugView.d.ts +0 -12
  245. package/src/engine/graphics/texture/virtual/debug/UsageDebugView.d.ts.map +0 -1
  246. package/src/engine/graphics/texture/virtual/debug/UsageDebugView.js +0 -63
  247. package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.d.ts +0 -12
  248. package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.d.ts.map +0 -1
  249. package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.js +0 -243
  250. package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.d.ts +0 -30
  251. package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.d.ts.map +0 -1
  252. package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.js +0 -39
  253. package/src/engine/graphics/texture/virtual/tile/compose_finger_print.d.ts +0 -9
  254. package/src/engine/graphics/texture/virtual/tile/compose_finger_print.d.ts.map +0 -1
  255. package/src/engine/graphics/texture/virtual/tile/compose_finger_print.js +0 -24
  256. package/src/engine/graphics/texture/virtual/tile/compose_tile_address.d.ts +0 -9
  257. package/src/engine/graphics/texture/virtual/tile/compose_tile_address.d.ts.map +0 -1
  258. package/src/engine/graphics/texture/virtual/tile/compose_tile_address.js +0 -26
  259. package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.d.ts +0 -11
  260. package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.d.ts.map +0 -1
  261. package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.js +0 -12
  262. package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.d.ts +0 -7
  263. package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.d.ts.map +0 -1
  264. package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.js +0 -16
  265. package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.d.ts +0 -7
  266. package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.d.ts.map +0 -1
  267. package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.js +0 -35
@@ -0,0 +1,95 @@
1
+ /**
2
+ * # Simulate a skinned model's joints instead of the entity subtree
3
+ *
4
+ * Add this beside a {@link Cloth} and the particle set stops being the entity's
5
+ * transform subtree and becomes the **joints of the skinned model the entity is
6
+ * showing**. That is the whole of the component's job, and there is no mode
7
+ * enum anywhere: `Cloth` alone simulates the subtree, `Cloth` + `ClothRig`
8
+ * simulates a rig, and component presence does the work a discriminator field
9
+ * would do badly (§3.1).
10
+ *
11
+ * ```js
12
+ * character.add(Cloth.from(CLOTH_SILK));
13
+ * character.add(ClothRig.from(cape_proxy));
14
+ * ```
15
+ *
16
+ * ## Why there are two cases at all
17
+ *
18
+ * Because the engine has two hierarchies and that is a decision rather than an
19
+ * accident. `shade_node_to_entity_composition` expands a loaded model into
20
+ * entities and gives a `ShadedGeometry` to every node that draws — except a
21
+ * skinned one, which contributes its transform and its name and no geometry,
22
+ * because its vertices deform against a skeleton the renderer owns and the GPU
23
+ * poses. Making those joints entities is a design this program does not do
24
+ * (D47). A rope prop is entities all the way down; a character's cape is not,
25
+ * and never will be.
26
+ *
27
+ * ## A proxy object, not a path
28
+ *
29
+ * {@link proxy} holds a built {@link ClothProxy}, following the convention the
30
+ * engine already uses for a component that points at a built, shared, immutable
31
+ * asset: `Collider#shape` holds an `AbstractShape3D` and is documented as *not*
32
+ * serialised because shapes are shared assets the pipeline wires up;
33
+ * `ParticleEffect` holds a `ParticleLayout` and a `ParticleProgram` the same
34
+ * way. What serialises is the proxy's identity and the skin ordinal.
35
+ *
36
+ * @author Alex Goldring
37
+ * @copyright Company Named Limited (c) 2026
38
+ */
39
+ export class ClothRig {
40
+ /**
41
+ * @param {ClothProxy} [proxy]
42
+ * @param {object} [spec]
43
+ * @param {number} [spec.skin]
44
+ * @returns {ClothRig}
45
+ */
46
+ static from(proxy?: ClothProxy, spec?: {
47
+ skin?: number;
48
+ }): ClothRig;
49
+ /**
50
+ * The built proxy: which joints, how they connect, and their bind pose.
51
+ * Shared and immutable — see the class docblock for the convention.
52
+ * @type {ClothProxy|null}
53
+ */
54
+ proxy: ClothProxy | null;
55
+ /**
56
+ * Which of the instance's skins the proxy's joint indices are into.
57
+ *
58
+ * A model with a body and a separate cape mesh has two skins, and a proxy
59
+ * built against one of them addresses nothing in the other. The ordinal is
60
+ * the asset's own and it is what a build writes down beside the indices.
61
+ * @type {number}
62
+ */
63
+ skin: number;
64
+ /**
65
+ * @param {ClothRig} other
66
+ * @returns {boolean}
67
+ */
68
+ equals(other: ClothRig): boolean;
69
+ /**
70
+ * @returns {number}
71
+ */
72
+ hash(): number;
73
+ /**
74
+ * The proxy is **not** serialised, for the same reason `Collider#shape` is
75
+ * not: it is a shared, immutable asset the pipeline wires up, and a copy per
76
+ * placement would be a copy of a build artefact.
77
+ */
78
+ toJSON(): {
79
+ skin: number;
80
+ };
81
+ /**
82
+ * @param {object} json
83
+ */
84
+ fromJSON({ skin }: object): void;
85
+ toString(): string;
86
+ /**
87
+ * @readonly
88
+ * @type {boolean}
89
+ */
90
+ readonly isClothRig: boolean;
91
+ }
92
+ export namespace ClothRig {
93
+ let typeName: string;
94
+ }
95
+ //# sourceMappingURL=ClothRig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClothRig.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothRig.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH;IAmBI;;;;;OAKG;IACH;QAHyB,IAAI,GAAlB,MAAM;QACJ,QAAQ,CAkBpB;IAvCD;;;;OAIG;IACH,OAFU,aAAW,IAAI,CAEZ;IAEb;;;;;;;OAOG;IACH,MAFU,MAAM,CAEP;IA0BT;;;OAGG;IACH,cAHW,QAAQ,GACN,OAAO,CAenB;IAED;;OAEG;IACH,QAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH;;MAIC;IAED;;OAEG;IACH,mBAFW,MAAM,QAIhB;IAED,mBAEC;IAGL;;;OAGG;IACH,qBAFU,OAAO,CAEY;CAN5B"}
@@ -0,0 +1,140 @@
1
+ import { assert } from "../../../../core/assert.js";
2
+ import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
3
+
4
+ /**
5
+ * # Simulate a skinned model's joints instead of the entity subtree
6
+ *
7
+ * Add this beside a {@link Cloth} and the particle set stops being the entity's
8
+ * transform subtree and becomes the **joints of the skinned model the entity is
9
+ * showing**. That is the whole of the component's job, and there is no mode
10
+ * enum anywhere: `Cloth` alone simulates the subtree, `Cloth` + `ClothRig`
11
+ * simulates a rig, and component presence does the work a discriminator field
12
+ * would do badly (§3.1).
13
+ *
14
+ * ```js
15
+ * character.add(Cloth.from(CLOTH_SILK));
16
+ * character.add(ClothRig.from(cape_proxy));
17
+ * ```
18
+ *
19
+ * ## Why there are two cases at all
20
+ *
21
+ * Because the engine has two hierarchies and that is a decision rather than an
22
+ * accident. `shade_node_to_entity_composition` expands a loaded model into
23
+ * entities and gives a `ShadedGeometry` to every node that draws — except a
24
+ * skinned one, which contributes its transform and its name and no geometry,
25
+ * because its vertices deform against a skeleton the renderer owns and the GPU
26
+ * poses. Making those joints entities is a design this program does not do
27
+ * (D47). A rope prop is entities all the way down; a character's cape is not,
28
+ * and never will be.
29
+ *
30
+ * ## A proxy object, not a path
31
+ *
32
+ * {@link proxy} holds a built {@link ClothProxy}, following the convention the
33
+ * engine already uses for a component that points at a built, shared, immutable
34
+ * asset: `Collider#shape` holds an `AbstractShape3D` and is documented as *not*
35
+ * serialised because shapes are shared assets the pipeline wires up;
36
+ * `ParticleEffect` holds a `ParticleLayout` and a `ParticleProgram` the same
37
+ * way. What serialises is the proxy's identity and the skin ordinal.
38
+ *
39
+ * @author Alex Goldring
40
+ * @copyright Company Named Limited (c) 2026
41
+ */
42
+ export class ClothRig {
43
+
44
+ /**
45
+ * The built proxy: which joints, how they connect, and their bind pose.
46
+ * Shared and immutable — see the class docblock for the convention.
47
+ * @type {ClothProxy|null}
48
+ */
49
+ proxy = null;
50
+
51
+ /**
52
+ * Which of the instance's skins the proxy's joint indices are into.
53
+ *
54
+ * A model with a body and a separate cape mesh has two skins, and a proxy
55
+ * built against one of them addresses nothing in the other. The ordinal is
56
+ * the asset's own and it is what a build writes down beside the indices.
57
+ * @type {number}
58
+ */
59
+ skin = 0;
60
+
61
+ /**
62
+ * @param {ClothProxy} [proxy]
63
+ * @param {object} [spec]
64
+ * @param {number} [spec.skin]
65
+ * @returns {ClothRig}
66
+ */
67
+ static from(proxy = undefined, spec = {}) {
68
+ const r = new ClothRig();
69
+
70
+ if (proxy !== undefined) {
71
+ assert.ok(proxy.isClothProxy === true, 'proxy must be a ClothProxy');
72
+
73
+ r.proxy = proxy;
74
+ }
75
+
76
+ const { skin = r.skin } = spec;
77
+
78
+ assert.isNonNegativeInteger(skin, 'skin');
79
+
80
+ r.skin = skin;
81
+
82
+ return r;
83
+ }
84
+
85
+ /**
86
+ * @param {ClothRig} other
87
+ * @returns {boolean}
88
+ */
89
+ equals(other) {
90
+ if (other === this) {
91
+ return true;
92
+ }
93
+
94
+ if (other === null || other === undefined || other.isClothRig !== true) {
95
+ return false;
96
+ }
97
+
98
+ // Proxies are shared immutable assets, so identity is the comparison —
99
+ // the same one `Collider#shape` gets when the pipeline hands out one
100
+ // instance per asset.
101
+ return this.proxy === other.proxy && this.skin === other.skin;
102
+ }
103
+
104
+ /**
105
+ * @returns {number}
106
+ */
107
+ hash() {
108
+ return hash_mix2(this.proxy === null ? 0 : 1, this.skin);
109
+ }
110
+
111
+ /**
112
+ * The proxy is **not** serialised, for the same reason `Collider#shape` is
113
+ * not: it is a shared, immutable asset the pipeline wires up, and a copy per
114
+ * placement would be a copy of a build artefact.
115
+ */
116
+ toJSON() {
117
+ return {
118
+ skin: this.skin
119
+ };
120
+ }
121
+
122
+ /**
123
+ * @param {object} json
124
+ */
125
+ fromJSON({ skin = 0 }) {
126
+ this.skin = skin;
127
+ }
128
+
129
+ toString() {
130
+ return `ClothRig{skin: ${this.skin}, proxy: ${this.proxy === null ? 'null' : this.proxy.name}}`;
131
+ }
132
+ }
133
+
134
+ /**
135
+ * @readonly
136
+ * @type {boolean}
137
+ */
138
+ ClothRig.prototype.isClothRig = true;
139
+
140
+ ClothRig.typeName = "ClothRig";
@@ -66,7 +66,7 @@
66
66
  export class ClothSystem extends System<any> {
67
67
  constructor();
68
68
  dependencies: (typeof Transform64 | typeof Cloth)[];
69
- components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof TransformAttachment> | ResourceAccessSpecification<typeof Cloth> | ResourceAccessSpecification<typeof ClothExclude>)[];
69
+ components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof TransformAttachment> | ResourceAccessSpecification<typeof ClothCollider> | ResourceAccessSpecification<typeof Cloth> | ResourceAccessSpecification<typeof ClothExclude> | ResourceAccessSpecification<typeof ClothRig>)[];
70
70
  /**
71
71
  * World gravity, m/s². Rotated into each cloth's local frame per step.
72
72
  * @type {Float64Array}
@@ -88,6 +88,33 @@ export class ClothSystem extends System<any> {
88
88
  * @private
89
89
  */
90
90
  private __attachments;
91
+ /**
92
+ * Where a skinned model instance comes from. Anything that answers
93
+ * `instance_of(entity)` with a `SceneBundleInstance` will do, and
94
+ * {@link MeshSystem} is what does in a running engine.
95
+ *
96
+ * Public and assignable because a garment's joints are a *rendering*
97
+ * structure and `MeshSystem` needs a graphics engine, a scene and a loader
98
+ * to exist — so a spec that wants joints without a renderer sets this
99
+ * instead, and gets exactly the interface the system uses.
100
+ *
101
+ * `null` means no rig can seed, which is the same additive shape the
102
+ * collider index has: a scene without one gets M1's cloth rather than an
103
+ * error.
104
+ * @type {{instance_of: function(number): (SceneBundleInstance|null)}|null}
105
+ */
106
+ models: {
107
+ instance_of: (arg0: number) => (SceneBundleInstance | null);
108
+ } | null;
109
+ /**
110
+ * The collider index's owner, or `null` when the manager has none — in
111
+ * which case cloth simply does not collide, which is exactly M1's
112
+ * behaviour and is what makes the collision layer additive rather than a
113
+ * new requirement on every scene.
114
+ * @type {ClothColliderSystem|null}
115
+ * @private
116
+ */
117
+ private __colliders;
91
118
  /**
92
119
  * @type {boolean}
93
120
  * @private
@@ -144,6 +171,8 @@ import { Transform64 } from "../../../ecs/transform/Transform64.js";
144
171
  import { Cloth } from "./Cloth.js";
145
172
  import { ResourceAccessSpecification } from "../../../../core/model/ResourceAccessSpecification.js";
146
173
  import { TransformAttachment } from "../../../ecs/transform-attachment/TransformAttachment.js";
174
+ import { ClothCollider } from "./ClothCollider.js";
147
175
  import { ClothExclude } from "./ClothExclude.js";
176
+ import { ClothRig } from "./ClothRig.js";
148
177
  import { ClothInstance } from "./ClothInstance.js";
149
178
  //# 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":"AA0CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH;;IAEI,oDAAoC;IAEpC,8NAKE;IAEF;;;OAGG;IACH,SAFU,YAAY,CAEoB;IAE1C;;;;OAIG;IACH,WAFU,aAAa,EAAE,CAEV;IAEf;;;OAGG;IACH,oBAAwB;IAExB;;;OAGG;IACH,sBAAqB;IAErB;;;OAGG;IACH,sBAAsB;IAEtB;;;OAGG;IACH,uCAFa,QAAQ,IAAI,CAAC,CASzB;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;;CA0PJ;uBA5esB,wBAAwB;4BAWxC,uCAAuC;sBAExB,YAAY;4CAdU,uDAAuD;oCAI5F,0DAA0D;6BAWpC,mBAAmB;8BAElB,oBAAoB"}
1
+ {"version":3,"file":"ClothSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothSystem.js"],"names":[],"mappings":"AA8DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;OAcG;IACH,QAFU;QAAC,WAAW,SAAW,MAAM,KAAG,CAAC,sBAAoB,IAAI,CAAC,CAAA;KAAC,GAAC,IAAI,CAE5D;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;uBA5tBsB,wBAAwB;4BAWxC,uCAAuC;sBAYxB,YAAY;4CAxBU,uDAAuD;oCAI5F,0DAA0D;8BAqBnC,oBAAoB;6BAErB,mBAAmB;yBAIvB,eAAe;8BADV,oBAAoB"}