@woosh/meep-engine 3.42.0 → 3.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/editor/prototypeEditorShell.d.ts.map +1 -1
  2. package/editor/prototypeEditorShell.js +4 -2
  3. package/package.json +91 -96
  4. package/src/engine/Clock.d.ts +15 -0
  5. package/src/engine/Clock.d.ts.map +1 -1
  6. package/src/engine/Clock.js +29 -5
  7. package/src/engine/Engine.d.ts.map +1 -1
  8. package/src/engine/Engine.js +11 -19
  9. package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts +57 -0
  10. package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts.map +1 -0
  11. package/src/engine/graphics/ecs/mesh-v2/MeshSkin.js +84 -0
  12. package/src/engine/graphics3/AnimationGraphSystem.d.ts +23 -13
  13. package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
  14. package/src/engine/graphics3/AnimationGraphSystem.js +61 -64
  15. package/src/engine/graphics3/AnimationSystem.d.ts +24 -15
  16. package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
  17. package/src/engine/graphics3/AnimationSystem.js +67 -61
  18. package/src/engine/graphics3/MeshSkinSystem.d.ts +56 -0
  19. package/src/engine/graphics3/MeshSkinSystem.d.ts.map +1 -0
  20. package/src/engine/graphics3/MeshSkinSystem.js +317 -0
  21. package/src/engine/graphics3/MeshSystem.d.ts +15 -35
  22. package/src/engine/graphics3/MeshSystem.d.ts.map +1 -1
  23. package/src/engine/graphics3/MeshSystem.js +21 -298
  24. package/src/engine/graphics3/RowChains.d.ts +76 -0
  25. package/src/engine/graphics3/RowChains.d.ts.map +1 -0
  26. package/src/engine/graphics3/RowChains.js +347 -0
  27. package/src/engine/graphics3/ShadedGeometrySystem.d.ts +6 -0
  28. package/src/engine/graphics3/ShadedGeometrySystem.d.ts.map +1 -1
  29. package/src/engine/graphics3/ShadedGeometrySystem.js +329 -309
  30. package/src/engine/graphics3/animation/AnimationClips.d.ts +56 -0
  31. package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -0
  32. package/src/engine/graphics3/animation/AnimationClips.js +79 -0
  33. package/src/engine/graphics3/animation/ClipListPlayer.d.ts +13 -14
  34. package/src/engine/graphics3/animation/ClipListPlayer.d.ts.map +1 -1
  35. package/src/engine/graphics3/animation/ClipListPlayer.js +262 -263
  36. package/src/engine/graphics3/animation/write_clip_playback.d.ts +3 -3
  37. package/src/engine/graphics3/animation/write_clip_playback.js +4 -4
  38. package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts +5 -0
  39. package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts.map +1 -1
  40. package/src/engine/graphics3/pose/query_entity_node_world_pose.js +80 -75
  41. package/src/engine/graphics3/prefab/PrefabInstance.d.ts +4 -24
  42. package/src/engine/graphics3/prefab/PrefabInstance.d.ts.map +1 -1
  43. package/src/engine/graphics3/prefab/PrefabInstance.js +60 -80
  44. package/src/engine/graphics3/prefab/prefab_instantiate.d.ts +16 -3
  45. package/src/engine/graphics3/prefab/prefab_instantiate.d.ts.map +1 -1
  46. package/src/engine/graphics3/prefab/prefab_instantiate.js +49 -12
  47. package/src/engine/graphics3/prefab/prefab_place.d.ts +31 -17
  48. package/src/engine/graphics3/prefab/prefab_place.d.ts.map +1 -1
  49. package/src/engine/graphics3/prefab/prefab_place.js +175 -130
  50. package/src/engine/graphics3/register_clips.d.ts +64 -0
  51. package/src/engine/graphics3/register_clips.d.ts.map +1 -0
  52. package/src/engine/graphics3/register_clips.js +114 -0
  53. package/src/engine/physics/cloth/MEASUREMENTS.md +795 -0
  54. package/src/engine/physics/cloth/PLAN.md +339 -9
  55. package/src/engine/physics/cloth/build/ClothProxy.d.ts +113 -61
  56. package/src/engine/physics/cloth/build/ClothProxy.d.ts.map +1 -1
  57. package/src/engine/physics/cloth/build/ClothProxy.js +142 -77
  58. package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts +22 -0
  59. package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts.map +1 -0
  60. package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +75 -0
  61. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +43 -30
  62. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
  63. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +357 -284
  64. package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts +62 -0
  65. package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -0
  66. package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +280 -0
  67. package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts +1 -1
  68. package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +1 -1
  69. package/src/engine/physics/cloth/ecs/Cloth.d.ts +17 -9
  70. package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
  71. package/src/engine/physics/cloth/ecs/Cloth.js +220 -212
  72. package/src/engine/physics/cloth/ecs/ClothDynamicsFlags.js +6 -0
  73. package/src/engine/physics/cloth/ecs/ClothHold.d.ts +91 -0
  74. package/src/engine/physics/cloth/ecs/ClothHold.d.ts.map +1 -0
  75. package/src/engine/physics/cloth/ecs/ClothHold.js +103 -0
  76. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +254 -48
  77. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  78. package/src/engine/physics/cloth/ecs/ClothInstance.js +277 -47
  79. package/src/engine/physics/cloth/ecs/ClothPin.d.ts +73 -0
  80. package/src/engine/physics/cloth/ecs/ClothPin.d.ts.map +1 -0
  81. package/src/engine/physics/cloth/ecs/ClothPin.js +92 -0
  82. package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts +36 -0
  83. package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts.map +1 -0
  84. package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.js +61 -0
  85. package/src/engine/physics/cloth/ecs/ClothRig.d.ts +23 -17
  86. package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -1
  87. package/src/engine/physics/cloth/ecs/ClothRig.js +29 -27
  88. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +12 -14
  89. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  90. package/src/engine/physics/cloth/ecs/ClothSystem.js +20 -15
  91. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +57 -36
  92. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
  93. package/src/engine/physics/cloth/ecs/ClothWorld.js +816 -179
  94. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +12 -13
  95. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
  96. package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +20 -14
  97. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts +63 -11
  98. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
  99. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +321 -84
  100. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +9 -7
  101. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
  102. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +9 -7
  103. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +3 -3
  104. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +30 -30
  105. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +37 -0
  106. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -0
  107. package/src/engine/physics/cloth/ecs/cloth_geodesic.js +142 -0
  108. package/src/engine/physics/cloth/ecs/cloth_holds.d.ts +97 -0
  109. package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -0
  110. package/src/engine/physics/cloth/ecs/cloth_holds.js +608 -0
  111. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts +2 -2
  112. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
  113. package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +160 -9
  114. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +17 -22
  115. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
  116. package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +55 -117
  117. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +21 -6
  118. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
  119. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +44 -15
  120. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +5 -0
  121. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
  122. package/src/engine/physics/cloth/ecs/cloth_write_back.js +60 -16
  123. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -1
  124. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +65 -58
  125. package/src/engine/physics/cloth/playground/collide_main.js +1 -1
  126. package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -1
  127. package/src/engine/physics/cloth/playground/garment_build.js +17 -5
  128. package/src/engine/physics/cloth/playground/garment_main.js +1 -1
  129. package/src/engine/physics/cloth/playground/rig_build.d.ts.map +1 -1
  130. package/src/engine/physics/cloth/playground/rig_build.js +302 -296
  131. package/src/engine/physics/cloth/solver/ClothState.d.ts +45 -7
  132. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  133. package/src/engine/physics/cloth/solver/ClothState.js +63 -7
  134. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +6 -1
  135. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
  136. package/src/engine/physics/cloth/solver/cloth_contact_find.js +7 -2
  137. package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts +114 -0
  138. package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -0
  139. package/src/engine/physics/cloth/solver/cloth_hold_line.js +362 -0
  140. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +6 -2
  141. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
  142. package/src/engine/physics/cloth/solver/cloth_self_find.js +13 -13
  143. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +24 -12
  144. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
  145. package/src/engine/physics/cloth/solver/cloth_solver_constants.js +24 -12
  146. package/src/engine/physics/cloth/solver/cloth_step.d.ts +16 -0
  147. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  148. package/src/engine/physics/cloth/solver/cloth_step.js +183 -20
  149. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +1 -0
  150. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
  151. package/src/engine/physics/cloth/solver/cloth_step_instance.js +10 -3
  152. package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts +1 -1
  153. package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts.map +1 -1
  154. package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.js +353 -346
  155. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts +7 -5
  156. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -1
  157. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +7 -5
  158. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +9 -9
  159. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
  160. package/src/engine/physics/cloth/wind/cloth_sample_air.js +26 -26
  161. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  162. package/src/engine/simulation/Ticker.d.ts +13 -0
  163. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  164. package/src/engine/simulation/Ticker.js +43 -8
  165. package/src/shade/RENDERER_CONTRACT.md +8 -2
  166. package/src/shade/playground/mesh_row_ceiling/main.js +2 -1
  167. package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
  168. package/src/shade/playground/skinned_blas_refit/main.js +11 -19
  169. package/src/shade/playground/skinned_blas_refit/place_character.d.ts +6 -3
  170. package/src/shade/playground/skinned_blas_refit/place_character.d.ts.map +1 -1
  171. package/src/shade/playground/skinned_blas_refit/place_character.js +90 -90
  172. package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
  173. package/src/shade/playground/skinned_mesh_soup/main.js +502 -509
  174. package/src/shade/playground/texture_encode/README.md +129 -109
  175. package/src/shade/playground/texture_encode/main.js +1430 -1430
  176. package/src/shade/playground/vgeo_runtime/README.md +5 -4
  177. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  178. package/src/shade/renderer/Renderer.js +6 -5
  179. package/src/shade/renderer/animation/GPUAnimationManager.d.ts +45 -14
  180. package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
  181. package/src/shade/renderer/animation/GPUAnimationManager.js +316 -64
  182. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +5 -0
  183. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  184. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +11 -1
  185. package/src/shade/renderer/atmosphere/GPUSky.d.ts +12 -0
  186. package/src/shade/renderer/atmosphere/GPUSky.d.ts.map +1 -1
  187. package/src/shade/renderer/atmosphere/GPUSky.js +162 -147
  188. package/src/shade/renderer/geometry/BoxGeometry.d.ts +1 -11
  189. package/src/shade/renderer/geometry/BoxGeometry.d.ts.map +1 -1
  190. package/src/shade/renderer/geometry/BoxGeometry.js +6 -13
  191. package/src/shade/renderer/geometry/CapsuleGeometry.d.ts +19 -0
  192. package/src/shade/renderer/geometry/CapsuleGeometry.d.ts.map +1 -0
  193. package/src/shade/renderer/geometry/CapsuleGeometry.js +24 -0
  194. package/src/shade/renderer/geometry/ConeGeometry.d.ts +20 -0
  195. package/src/shade/renderer/geometry/ConeGeometry.d.ts.map +1 -0
  196. package/src/shade/renderer/geometry/ConeGeometry.js +33 -0
  197. package/src/shade/renderer/geometry/CylinderGeometry.d.ts +21 -0
  198. package/src/shade/renderer/geometry/CylinderGeometry.d.ts.map +1 -0
  199. package/src/shade/renderer/geometry/CylinderGeometry.js +35 -0
  200. package/src/shade/renderer/geometry/PlaneGeometry.d.ts +17 -0
  201. package/src/shade/renderer/geometry/PlaneGeometry.d.ts.map +1 -0
  202. package/src/shade/renderer/geometry/PlaneGeometry.js +22 -0
  203. package/src/shade/renderer/geometry/TorusGeometry.d.ts +18 -0
  204. package/src/shade/renderer/geometry/TorusGeometry.d.ts.map +1 -0
  205. package/src/shade/renderer/geometry/TorusGeometry.js +23 -0
  206. package/src/shade/renderer/geometry/UVSphereGeometry.d.ts +21 -0
  207. package/src/shade/renderer/geometry/UVSphereGeometry.d.ts.map +1 -0
  208. package/src/shade/renderer/geometry/UVSphereGeometry.js +34 -0
  209. package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts +19 -0
  210. package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts.map +1 -0
  211. package/src/shade/renderer/geometry/primitives/make_capsule_geometry.js +205 -0
  212. package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts +21 -0
  213. package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts.map +1 -0
  214. package/src/shade/renderer/geometry/primitives/make_cone_geometry.js +36 -0
  215. package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts +1 -1
  216. package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts.map +1 -1
  217. package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.js +44 -9
  218. package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts +20 -0
  219. package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts.map +1 -0
  220. package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.js +190 -0
  221. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
  222. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +7 -2
  223. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts +26 -8
  224. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts.map +1 -1
  225. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js +56 -39
  226. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts +7 -0
  227. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts.map +1 -1
  228. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.js +46 -4
  229. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.d.ts.map +1 -1
  230. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.js +4 -2
  231. package/src/shade/renderer/gpu_primitive/sort/defs.d.ts +2 -2
  232. package/src/shade/renderer/gpu_primitive/sort/defs.js +79 -79
  233. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +1 -1
  234. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
  235. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +7 -3
  236. package/src/shade/renderer/lightmap/bake/shader_lightmap_denoise_sh.d.ts.map +1 -1
  237. package/src/shade/renderer/lightmap/bake/shader_lightmap_denoise_sh.js +10 -3
  238. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  239. package/src/shade/renderer/particles/DESIGN.md +13 -9
  240. package/src/shade/renderer/particles/GPUParticleSystem.js +1 -1
  241. package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +4 -3
  242. package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
  243. package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +200 -194
  244. package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
  245. package/src/shade/renderer/particles/graph_particles.js +6 -2
  246. package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts +1 -1
  247. package/src/shade/renderer/particles/shaders/chunk_particle_lighting.js +1 -1
  248. package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
  249. package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +334 -329
  250. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  251. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  252. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +7 -2
  253. package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts.map +1 -1
  254. package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.js +16 -4
  255. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +3 -2
  256. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
  257. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +3 -2
  258. package/src/shade/renderer/scene/GPUSceneContext.d.ts +9 -1
  259. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  260. package/src/shade/renderer/scene/GPUSceneContext.js +23 -1
  261. package/src/shade/renderer/texture/COMPRESSED_TEXTURE_PLAN_2026_09_01.md +2444 -2345
  262. package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.d.ts.map +1 -1
  263. package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.js +312 -310
  264. package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts +3 -3
  265. package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts.map +1 -1
  266. package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.js +383 -375
  267. package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.d.ts.map +1 -1
  268. package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.js +349 -346
  269. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts +58 -0
  270. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts.map +1 -0
  271. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.js +536 -0
  272. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts +21 -7
  273. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts.map +1 -1
  274. package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.js +291 -327
  275. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts +25 -0
  276. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts.map +1 -0
  277. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.js +99 -0
  278. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts +5 -3
  279. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts.map +1 -1
  280. package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.js +47 -71
  281. package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts +10 -0
  282. package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts.map +1 -0
  283. package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.js +50 -0
  284. package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts +4 -5
  285. package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts.map +1 -1
  286. package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.js +7 -8
  287. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +4 -1
  288. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
  289. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +74 -3
  290. package/src/shade/renderer/volumetrics/NOTES.md +1023 -957
  291. package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts +5 -4
  292. package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts.map +1 -1
  293. package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.js +5 -4
  294. package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts +1 -1
  295. package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.js +1 -1
  296. package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts +1 -1
  297. package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.js +1 -1
  298. package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts +41 -0
  299. package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts.map +1 -0
  300. package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.js +112 -0
  301. package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts +9 -23
  302. package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
  303. package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +18 -126
  304. package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.d.ts +22 -0
  305. package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.d.ts.map +1 -0
  306. package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.js +228 -0
  307. package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
  308. package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +0 -53
  309. package/src/shade/renderer/water/chunk_water_transport.d.ts.map +1 -1
  310. package/src/shade/renderer/water/chunk_water_transport.js +7 -5
  311. package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts.map +1 -1
  312. package/src/shade/renderer/water/medium/GPUWaterBodies.js +8 -2
  313. package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts +3 -2
  314. package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts.map +1 -1
  315. package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.js +3 -2
  316. package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
  317. package/src/shade/renderer/water/shader_water.js +3 -1
  318. package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts.map +1 -1
  319. package/src/shade/renderer/water/surface/GPUWaterSurface.js +3 -1
  320. package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +4 -3
  321. package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts.map +1 -1
  322. package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +17 -7
  323. package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts.map +1 -1
  324. package/src/shade/renderer/water/surface/graph_water_tessellation.js +11 -4
  325. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
  326. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +93 -30
  327. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts.map +1 -1
  328. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js +13 -5
  329. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts +29 -8
  330. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
  331. package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +155 -30
  332. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts +6 -1
  333. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -1
  334. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +157 -39
  335. package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts +91 -21
  336. package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts.map +1 -1
  337. package/src/shade/renderer/water/surface/particles/shader_water_particles.js +442 -70
  338. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +11 -3
  339. package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
  340. package/src/shade/wgsl/emulator/WGSLLanguageCore.js +3 -0
  341. package/src/shade/wgsl/validate_wgsl_source.d.ts.map +1 -1
  342. package/src/shade/wgsl/validate_wgsl_source.js +74 -3
  343. package/src/engine/graphics3/register_instance_animation.d.ts +0 -114
  344. package/src/engine/graphics3/register_instance_animation.d.ts.map +0 -1
  345. package/src/engine/graphics3/register_instance_animation.js +0 -201
@@ -17,23 +17,33 @@
17
17
  *
18
18
  * ## The local frame
19
19
  *
20
- * Particle positions live in the **anchor's own frame** — rigid, so translation
20
+ * Particle positions live in the **cloth's own frame** — rigid, so translation
21
21
  * and rotation but not scale, following the same convention the colliders use.
22
22
  * That is what makes §7 P7's inertia model natural (a cloth that feels none of
23
- * its anchor's motion is one whose local coordinates simply do not change) and,
23
+ * its frame's motion is one whose local coordinates simply do not change) and,
24
24
  * as a consequence rather than as a goal, what makes `Float32` positions ample:
25
25
  * the coordinates are garment-sized rather than world-sized.
26
26
  *
27
- * The anchor is node 0, particle `particle_of_node[0]`, sits at the local
28
- * origin, and is pinned. §11.1's "the anchor entity itself is the fixed set" is
29
- * that sentence.
27
+ * The frame is what the cloth **rides**: the entity carrying the `Cloth` for a
28
+ * subtree, the joint its proxy names for a rig. It is not what holds the cloth.
29
+ *
30
+ * ## What holds it
31
+ *
32
+ * Nothing, unless something says so. A {@link ClothPin} on any entity holds the
33
+ * particles it names, and a held particle is kinematic: it follows its holder
34
+ * at the offset it had when the hold began ({@link holds}). A cloth has as many
35
+ * holds as name it, and a cloth with none falls. Every quantity that used to be
36
+ * measured from "the anchor" — the tether, the slack profile, the animated pose
37
+ * the slack is measured against, `reach` — is measured from the nearest held
38
+ * particle instead, which for a rope hung from its own top is the same thing.
30
39
  *
31
40
  * @author Alex Goldring
32
41
  * @copyright Company Named Limited (c) 2026
33
42
  */
34
43
  export class ClothInstance {
35
44
  /**
36
- * The entity carrying the {@link Cloth} component — the anchor.
45
+ * The entity carrying the {@link Cloth} component. For a subtree cloth it is
46
+ * the root of the walk, node 0, and the cloth's frame.
37
47
  * @type {number}
38
48
  */
39
49
  entity: number;
@@ -42,10 +52,105 @@ export class ClothInstance {
42
52
  */
43
53
  cloth: Cloth | null;
44
54
  /**
45
- * The anchor's world transform, which is also the cloth's local frame.
55
+ * The world transform of the entity carrying the {@link Cloth} — a subtree
56
+ * cloth's frame.
46
57
  * @type {Transform64|null}
47
58
  */
48
59
  transform: Transform64 | null;
60
+ /**
61
+ * The entity whose pose is the cloth's frame: {@link entity} for a subtree,
62
+ * the joint the proxy names for a rig.
63
+ * @type {number}
64
+ */
65
+ frame_entity: number;
66
+ /**
67
+ * Whether cloth writes each node's pose. `0` for a node that is an entity
68
+ * cloth only reads: a subtree's root, which is its frame, and the bones a
69
+ * rig hangs from. Such a node is still a particle — something can hold it,
70
+ * and links run from it — but its output is somebody else's.
71
+ * @type {Uint8Array|null}
72
+ */
73
+ node_output: Uint8Array | null;
74
+ /**
75
+ * The pose, in the cloth's frame, of the entity behind each node with no
76
+ * output — translation then rotation, 7 per node, meaningless for the rest.
77
+ *
78
+ * A node's local transform is written against its parent **entity**, and
79
+ * when that parent is not cloth's to write, its pose is whatever its owner
80
+ * gave it, not where its particle happens to be. A subtree's root is the
81
+ * frame, so the identity; a rig's bone is evaluated each step, in
82
+ * `advance`, so that the write-back reads a snapshot taken at the same
83
+ * moment under either system.
84
+ * @type {Float64Array|null}
85
+ */
86
+ boundary_pose: Float64Array | null;
87
+ /**
88
+ * Every hold on this cloth, by holder entity ascending, as
89
+ * {@link ClothWorld} applied them. Shared with the world's registry, so the
90
+ * offsets a hold captured outlive a re-seed.
91
+ * @type {ClothHold[]}
92
+ */
93
+ holds: ClothHold[];
94
+ /**
95
+ * Which {@link holds} entry holds each node, `−1` for a free node.
96
+ * @type {Int32Array|null}
97
+ */
98
+ node_hold: Int32Array | null;
99
+ /**
100
+ * Where in its hold's particle list each held node is, `−1` for a free node.
101
+ * @type {Int32Array|null}
102
+ */
103
+ node_hold_slot: Int32Array | null;
104
+ /**
105
+ * The registry version {@link holds} was built from. A different one is a
106
+ * hold added or let go, and the next step re-derives everything a hold
107
+ * decides.
108
+ * @type {number}
109
+ */
110
+ holds_version: number;
111
+ /**
112
+ * The {@link holds_version} whose holds are written into {@link state}, or
113
+ * `−1` for a state that holds nothing yet — a fresh seed.
114
+ * @type {number}
115
+ */
116
+ holds_applied: number;
117
+ /**
118
+ * The held node each node's tether and slack are measured from — the
119
+ * nearest, along the fabric — or `−1` where nothing held is reachable.
120
+ * @type {Int32Array|null}
121
+ */
122
+ tether_source: Int32Array | null;
123
+ /**
124
+ * Where each held node is to be at the end of this step, in the cloth's
125
+ * frame, 3 per node. Written in `advance`.
126
+ * @type {Float64Array|null}
127
+ */
128
+ held_target: Float64Array | null;
129
+ /**
130
+ * `1` for a node whose tether began wider than `d_geo` — a hold taken
131
+ * where the fabric already was — and is still coming down to it.
132
+ * `cloth_holds.js` carries why a tether starts loose.
133
+ * @type {Uint8Array|null}
134
+ */
135
+ tether_loose: Uint8Array | null;
136
+ /**
137
+ * How many {@link tether_loose} nodes are left.
138
+ * @type {number}
139
+ */
140
+ tether_loose_count: number;
141
+ /**
142
+ * Whether what `cloth_hold_step` derives — the held targets, the animated
143
+ * pose, the leash offsets — has to be derived again even though no hold has
144
+ * moved in the frame: the holds have just changed, or the particles have
145
+ * just been put somewhere (a teleport).
146
+ * @type {boolean}
147
+ */
148
+ holds_dirty: boolean;
149
+ /**
150
+ * The furthest any held node is carried this step, metres.
151
+ * @type {number}
152
+ */
153
+ kinematic_travel: number;
49
154
  /**
50
155
  * `false` until the subtree has been walked. Seeding is deferred to the
51
156
  * first step rather than done at link, because a rope's links arrive as
@@ -63,12 +168,17 @@ export class ClothInstance {
63
168
  */
64
169
  node_count: number;
65
170
  /**
66
- * Entity per node, in walk order. Node 0 is the anchor.
171
+ * Entity per node, in walk order. Node 0 is the cloth's own entity.
67
172
  * @type {Int32Array|null}
68
173
  */
69
174
  node_entity: Int32Array | null;
70
175
  /**
71
- * Parent node index, `−1` for the anchor.
176
+ * Parent node index, `−1` for a root: a subtree's node 0, a bone a rig
177
+ * hangs from.
178
+ *
179
+ * The seeder's **tree**, which is what the write-back reconstructs
180
+ * orientation along and expresses local transforms against. The rows are
181
+ * built from {@link edge}, {@link skip} and {@link hinge} instead.
72
182
  * @type {Int32Array|null}
73
183
  */
74
184
  node_parent: Int32Array | null;
@@ -90,15 +200,15 @@ export class ClothInstance {
90
200
  */
91
201
  node_transform: Transform64[];
92
202
  /**
93
- * The joint entity each node drives. **Rig path only**, and node 0 is the
94
- * anchor joint, which is not simulated. A skinned model is a prefab spawned
203
+ * The joint entity of each node. **Rig path only**; a node with no
204
+ * {@link node_output} is a bone the garment hangs from, which cloth reads. A skinned model is a prefab spawned
95
205
  * as entities, so a joint is an entity carrying a `TransformAttachment`,
96
206
  * and that offset is the writable handle; {@link node_attachment} holds it.
97
207
  * @type {Int32Array|number[]}
98
208
  */
99
209
  node_joint: Int32Array | number[];
100
210
  /**
101
- * The anchor joint's **world** pose, evaluated on the CPU each step from the
211
+ * The frame joint's **world** pose, evaluated on the CPU each step from the
102
212
  * clips the entity is playing. **Rig path only.**
103
213
  *
104
214
  * Evaluated rather than read: a joint of an animated skeleton has granted
@@ -110,9 +220,9 @@ export class ClothInstance {
110
220
  * scabbard hangs from.
111
221
  * @type {Transform64}
112
222
  */
113
- anchor_pose: Transform64;
223
+ frame_pose: Transform64;
114
224
  /**
115
- * Live `TransformAttachment` per node; `null` for the anchor.
225
+ * Live `TransformAttachment` per node; `null` for a node with no output.
116
226
  *
117
227
  * **While a cloth is live this is its output, not its input.** The
118
228
  * write-back writes the local transform as well as the world one, so that a
@@ -182,33 +292,52 @@ export class ClothInstance {
182
292
  */
183
293
  particle_of_node: Int32Array | null;
184
294
  /**
185
- * Geodesic distance from the anchor to each node, metres — the sum of the
186
- * rest link lengths along the path, not the straight-line distance.
295
+ * Geodesic distance from each node to the nearest held node, metres — the
296
+ * rest lengths along the shortest path through the fabric, not the
297
+ * straight-line distance — and `Infinity` where nothing held is reachable.
187
298
  *
188
- * This one array drives the tether radius, the slack profile and the pin,
189
- * so the three cannot disagree (§3.4). The anchor's is zero, which is what
190
- * makes it the fixed set without a second mechanism saying so.
299
+ * This one array drives the tether radius and the slack profile, so the two
300
+ * cannot disagree (§3.4). A held node's is zero.
191
301
  * @type {Float32Array|null}
192
302
  */
193
303
  geodesic: Float32Array | null;
194
304
  /**
195
- * The animated pose in the cloth's local frame — position, 3 per node —
196
- * composed once at seed from {@link rest_local_position} down the walk.
197
- *
198
- * **Constant, and that is a property of the entity path rather than an
199
- * optimisation.** The subtree's authored pose is rigid relative to its
200
- * anchor, so expressed in the anchor's own frame it does not move; the only
201
- * thing that changes step to step is where that frame is. A subtree whose
202
- * links are themselves animated is not an M1 case — that is the rig path,
203
- * where the animated pose comes from the skeleton (§11.2) and is live.
305
+ * The rest pose in the cloth's frame — position, 3 per node — as the seeder
306
+ * found it: the authored subtree composed down from its root, or a rig's
307
+ * bind pose. Constant; what the rows' rest lengths are read from.
204
308
  * @type {Float32Array|null}
205
309
  */
206
- animated_position: Float32Array | null;
310
+ rest_position: Float32Array | null;
207
311
  /**
208
- * The animated pose's orientation in the cloth's local frame, 4 per node.
312
+ * The rest pose's orientation in the cloth's frame, 4 per node.
209
313
  * @type {Float32Array|null}
210
314
  */
211
- animated_rotation: Float32Array | null;
315
+ rest_rotation: Float32Array | null;
316
+ /**
317
+ * The animated pose in the cloth's frame — position, 3 per node — which is
318
+ * the **rest pose hung from what holds it**, rebuilt every step:
319
+ *
320
+ * s_i = x_p + R_p · (r_i − r_p)
321
+ *
322
+ * with `p` the nearest held node ({@link tether_source}), `x_p` where it
323
+ * is held this step and `R_p` how far its holder has turned in the frame
324
+ * since the hold began. A held node's is where it is held; a node nothing
325
+ * held reaches hangs from the frame, `s_i = r_i`.
326
+ *
327
+ * It is what the slack row is a leash to, what `blend = 0` shows and what a
328
+ * teleport resets to. §3.4's bound survives it exactly: `|s_i − x_p|` is the
329
+ * rest distance `|r_i − r_p|`, which is no more than `d_geo`, so with the
330
+ * tether a particle is never more than `2·d_geo` from its centre and
331
+ * `slack = 1` is still no leash at all. A cloth whose holders ride its frame
332
+ * has `s_i = r_i` for ever, which is the constant pose this used to be.
333
+ * @type {Float64Array|null}
334
+ */
335
+ animated_position: Float64Array | null;
336
+ /**
337
+ * The animated pose's orientation in the cloth's frame, 4 per node.
338
+ * @type {Float64Array|null}
339
+ */
340
+ animated_rotation: Float64Array | null;
212
341
  /**
213
342
  * The pose the write-back actually writes: the simulated position lerped
214
343
  * towards the animated one by {@link Cloth#blend}, in node order and in
@@ -234,36 +363,113 @@ export class ClothInstance {
234
363
  blended_rotation: Float64Array | null;
235
364
  /**
236
365
  * Leash row enforcing the slack bound for each node, `−1` where there is
237
- * none — the anchor, and any node whose `slack` reaches the bound at which
238
- * the row is provably inactive.
366
+ * none — a fabric whose `slack` reaches the bound at which the row is
367
+ * provably inactive. A node nothing holds has one of radius `Infinity`.
239
368
  * @type {Int32Array|null}
240
369
  */
241
370
  slack_row: Int32Array | null;
242
371
  /**
243
- * Leash row enforcing the tether bound for each node, `−1` for the anchor.
372
+ * Leash row enforcing the tether bound for each node — every node has one,
373
+ * of radius `Infinity` while nothing it can reach is held.
244
374
  * @type {Int32Array|null}
245
375
  */
246
376
  tether_row: Int32Array | null;
247
377
  /**
248
- * Stretch rows carrying the parent link of each node, `−1` for the anchor.
378
+ * The fabric: pairs of nodes joined by a hard stretch row, 2 per edge.
379
+ *
380
+ * **The particle graph, not the walk's tree.** A seeder hands over whatever
381
+ * joins its particles — a tree's parent links, a mesh's triangle edges — and
382
+ * `cloth_build_rows` builds the same rows from either. Nothing about the rows
383
+ * needs a parent, which is what lets a cloth be a sheet, or several pieces.
384
+ * @type {Int32Array|null}
385
+ */
386
+ edge: Int32Array | null;
387
+ /**
388
+ * A chain's bending model: pairs of nodes two links apart, joined by a soft
389
+ * stretch row at their authored distance (`cloth_seed_subtree.js` carries
390
+ * why a chain bends this way and a sheet does not), 2 per pair.
391
+ * @type {Int32Array|null}
392
+ */
393
+ skip: Int32Array | null;
394
+ /**
395
+ * A surface's bending model: four nodes per hinge — the shared edge, then
396
+ * the wing opposite it in each of its two triangles — which is
397
+ * `cloth_bend_row`'s stencil.
398
+ * @type {Int32Array|null}
399
+ */
400
+ hinge: Int32Array | null;
401
+ /**
402
+ * Rest length of each {@link edge}, metres, in double — what the geodesics
403
+ * are summed from.
404
+ * @type {Float64Array|null}
405
+ */
406
+ edge_length: Float64Array | null;
407
+ /**
408
+ * The edges touching each node, CSR — the geodesic search's adjacency.
409
+ * @type {{offset: Int32Array, edge: Int32Array}|null}
410
+ */
411
+ edge_incidence: {
412
+ offset: Int32Array;
413
+ edge: Int32Array;
414
+ } | null;
415
+ /**
416
+ * Each hold's turn in the frame since it began, 4 per entry of {@link holds},
417
+ * rebuilt every step.
418
+ * @type {Float64Array}
419
+ */
420
+ hold_turn: Float64Array;
421
+ /**
422
+ * Triangles over the nodes, 3 each, for a cloth with a surface — what a
423
+ * joint's orientation is read off when it has no chain to swing along.
424
+ * Empty for a chain.
425
+ * @type {Int32Array|null}
426
+ */
427
+ triangle: Int32Array | null;
428
+ /**
429
+ * CSR offsets into {@link surface_triangle}, `node_count + 1` entries, or
430
+ * `null` for a cloth with no triangles.
431
+ * @type {Int32Array|null}
432
+ */
433
+ surface_offset: Int32Array | null;
434
+ /**
435
+ * The triangles around each node, as indices into {@link triangle}.
436
+ * @type {Int32Array|null}
437
+ */
438
+ surface_triangle: Int32Array | null;
439
+ /**
440
+ * One neighbour per node, along an edge — the direction a surface node's
441
+ * twist is measured by.
442
+ * @type {Int32Array|null}
443
+ */
444
+ surface_neighbour: Int32Array | null;
445
+ /**
446
+ * Each hinge's effective inertia, kg — what its stiffness is a ratio of
447
+ * (`cloth_hinge_inertia`). Bend row `h` is hinge `h`.
448
+ * @type {Float32Array|null}
449
+ */
450
+ hinge_inertia: Float32Array | null;
451
+ /**
452
+ * Stretch row carrying each {@link edge}.
249
453
  * @type {Int32Array|null}
250
454
  */
251
- link_row: Int32Array | null;
455
+ edge_row: Int32Array | null;
252
456
  /**
253
- * Strain-limit rows on the same links, `−1` when the flag is clear.
457
+ * Strain-limit row on each {@link edge}, `−1` when the flag is clear.
254
458
  * @type {Int32Array|null}
255
459
  */
256
460
  strain_row: Int32Array | null;
257
461
  /**
258
- * Skip rows — the bending model for a chain, one per node that has a
259
- * grandparent. `−1` where there is none.
462
+ * Stretch row carrying each {@link skip} pair, `−1` when there is no bending
463
+ * to carry.
260
464
  * @type {Int32Array|null}
261
465
  */
262
466
  skip_row: Int32Array | null;
263
467
  /**
264
- * Largest {@link geodesic} in the cloth: how far this cloth can reach from
265
- * its anchor, and the length scale the anchor limits and the teleport
266
- * threshold are derived from.
468
+ * How far this cloth can reach from what it hangs from — the largest
469
+ * {@link geodesic}, with a node nothing held reaches counted at its rest
470
+ * distance from the frame's origin, which is what it hangs from instead —
471
+ * and the length scale the frame limits, the teleport threshold and the
472
+ * sleep window are derived from.
267
473
  * @type {number}
268
474
  */
269
475
  reach: number;
@@ -279,22 +485,22 @@ export class ClothInstance {
279
485
  */
280
486
  shortest_row: number;
281
487
  /**
282
- * The anchor's world translation as of the previous step, `[x, y, z]`.
488
+ * The frame's world translation as of the previous step, `[x, y, z]`.
283
489
  * @type {Float64Array}
284
490
  */
285
- anchor_translation: Float64Array;
491
+ frame_translation: Float64Array;
286
492
  /**
287
- * The anchor's world rotation as of the previous step, `[x, y, z, w]`.
493
+ * The frame's world rotation as of the previous step, `[x, y, z, w]`.
288
494
  * @type {Float64Array}
289
495
  */
290
- anchor_rotation: Float64Array;
496
+ frame_rotation: Float64Array;
291
497
  /**
292
- * `false` until the first step has recorded an anchor pose to compare
498
+ * `false` until the first step has recorded a frame pose to compare
293
499
  * against. The first step feels no inertia, which is correct: there is no
294
500
  * motion yet, only a starting place.
295
501
  * @type {boolean}
296
502
  */
297
- anchor_valid: boolean;
503
+ frame_valid: boolean;
298
504
  /**
299
505
  * What {@link Cloth#dynamics} looked like when the rows were last
300
506
  * parameterised. Compared rather than watched — a value object is cheap to
@@ -1 +1 @@
1
- {"version":3,"file":"ClothInstance.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothInstance.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;IAEI;;;OAGG;IACH,QAFU,MAAM,CAEJ;IAEZ;;OAEG;IACH,OAFU,QAAM,IAAI,CAEP;IAEb;;;OAGG;IACH,WAFU,WAAW,GAAC,IAAI,CAET;IAEjB;;;;;;OAMG;IACH,QAFU,OAAO,CAEF;IAEf;;OAEG;IACH,OAFU,aAAW,IAAI,CAEZ;IAEb;;OAEG;IACH,YAFU,MAAM,CAED;IAEf;;;OAGG;IACH,aAFU,UAAU,GAAC,IAAI,CAEN;IAEnB;;;OAGG;IACH,aAFU,UAAU,GAAC,IAAI,CAEN;IAEnB;;;;;;;;;OASG;IACH,KAFU,WAAS,IAAI,CAEZ;IAEX;;;;OAIG;IACH,gBAFU,WAAW,EAAE,CAEH;IAEpB;;;;;;OAMG;IACH,YAFU,UAAU,GAAC,MAAM,EAAE,CAEb;IAEhB;;;;;;;;;;;;OAYG;IACH,aAFU,WAAW,CAEW;IAEhC;;;;;;;;;;;OAWG;IACH,iBAFU,qBAAqB,CAEV;IAErB;;;;OAIG;IACH,qBAFU,YAAY,GAAC,IAAI,CAEA;IAE3B;;;OAGG;IACH,qBAFU,YAAY,GAAC,IAAI,CAEA;IAE3B;;;OAGG;IACH,mBAFU,UAAU,GAAC,IAAI,CAEA;IAEzB;;;OAGG;IACH,YAFU,UAAU,GAAC,IAAI,CAEP;IAElB;;;;;;;;;OASG;IACH,eAFU,UAAU,GAAC,IAAI,CAEJ;IAErB;;;OAGG;IACH,eAFU,UAAU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IAEnC;;;;;;;OAOG;IACH,iBAFU;QAAC,MAAM,EAAE,UAAU,CAAC;QAAC,OAAO,EAAE,UAAU,CAAA;KAAC,GAAC,IAAI,CAEjC;IAEvB;;;;;;;;;;OAUG;IACH,mBAFU,MAAM,CAEa;IAE7B;;;;;OAKG;IACH,YAFU,MAAM,CAED;IAEf;;;;;OAKG;IACH,eAFU,MAAM,CAEE;IAElB;;;;;OAKG;IACH,SAFU,OAAO,CAED;IAEhB;;;;;;;;;OASG;IACH,UAFU,YAAY,CAES;IAE/B;;;;;;OAMG;IACH,YAFU,OAAO,CAEE;IAEnB;;;;;;;;;;;;;;;;OAgBG;IACH,KAFU,MAAM,CAER;IAER;;;;;;;;;;;OAWG;IACH,eAFU,UAAU,CAEiC;IAErD;;OAEG;IACH,oBAFU,MAAM,CAEO;IAEvB;;;;OAIG;IACH,oBAFU,WAAW,CAEsC;IAE3D;;;;;OAKG;IACH,6BAFU,WAAW,CAE+C;IAEpE;;;;;;OAMG;IACH,cAFU,MAAM,CAEC;IAEjB;;;;;OAKG;IACH,aAFU,MAAM,EAAE,GAAC,IAAI,CAEJ;IAEnB;;;;;;;;;;OAUG;IACH,iBAFU,YAAY,GAAC,IAAI,CAEJ;IAEvB;;;;;OAKG;IACH,gBAFU,MAAM,CAEG;CACtB;4BAvjB2B,uCAAuC;8BAErC,oBAAoB"}
1
+ {"version":3,"file":"ClothInstance.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothInstance.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH;IAEI;;;;OAIG;IACH,QAFU,MAAM,CAEJ;IAEZ;;OAEG;IACH,OAFU,QAAM,IAAI,CAEP;IAEb;;;;OAIG;IACH,WAFU,WAAW,GAAC,IAAI,CAET;IAEjB;;;;OAIG;IACH,cAFU,MAAM,CAEE;IAElB;;;;;;OAMG;IACH,aAFU,UAAU,GAAC,IAAI,CAEN;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