@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
@@ -56,11 +56,13 @@ export function cloth_self_accumulate(accumulator: Float64Array, state: ClothSta
56
56
  *
57
57
  * A self-collision row carries nothing of the kind. What it holds apart is cloth
58
58
  * against cloth — grams, moving at the speed cloth moves relative to itself — and
59
- * a penalty at the top of the band produces newtons per millimetre against a
60
- * load of fractions of a newton. So it is a plain penalty with no multiplier, no
61
- * warm start and no identity across steps, which is also what makes a pair list
62
- * that is rebuilt from scratch every step affordable: there is nothing on a pair
63
- * worth carrying. `MEASUREMENTS.md` §33.
59
+ * at a quarter of the way up the band the penalty still produces 0.29 N per
60
+ * millimetre against a particle's weight of 0.2 N: a fold resting on a fold
61
+ * sinks into it by under a millimetre per particle it carries. So it is a plain
62
+ * penalty with no multiplier, no warm start and no identity across steps, which
63
+ * is also what makes a pair list that is rebuilt from scratch every step
64
+ * affordable: there is nothing on a pair worth carrying. `MEASUREMENTS.md` §33,
65
+ * and §65 for the stiffness.
64
66
  *
65
67
  * @author Alex Goldring
66
68
  * @copyright Company Named Limited (c) 2026
@@ -1 +1 @@
1
- {"version":3,"file":"cloth_self_row.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/physics/cloth/solver/constraint/cloth_self_row.js"],"names":[],"mappings":"AAoEA;;;;;;;;;;GAUG;AACH,4EAJW,MAAM,GAEJ,MAAM,CA4FlB;AAED;;;;;;GAMG;AACH,mDAJW,YAAY,+BAEZ,MAAM,QAyBhB;AA7LD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;;GAKG;AACH,iCAFU,MAAM,CAEuB"}
1
+ {"version":3,"file":"cloth_self_row.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/physics/cloth/solver/constraint/cloth_self_row.js"],"names":[],"mappings":"AAsEA;;;;;;;;;;GAUG;AACH,4EAJW,MAAM,GAEJ,MAAM,CA4FlB;AAED;;;;;;GAMG;AACH,mDAJW,YAAY,+BAEZ,MAAM,QAyBhB;AA/LD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH;;;;;GAKG;AACH,iCAFU,MAAM,CAEuB"}
@@ -48,11 +48,13 @@ import {
48
48
  *
49
49
  * A self-collision row carries nothing of the kind. What it holds apart is cloth
50
50
  * against cloth — grams, moving at the speed cloth moves relative to itself — and
51
- * a penalty at the top of the band produces newtons per millimetre against a
52
- * load of fractions of a newton. So it is a plain penalty with no multiplier, no
53
- * warm start and no identity across steps, which is also what makes a pair list
54
- * that is rebuilt from scratch every step affordable: there is nothing on a pair
55
- * worth carrying. `MEASUREMENTS.md` §33.
51
+ * at a quarter of the way up the band the penalty still produces 0.29 N per
52
+ * millimetre against a particle's weight of 0.2 N: a fold resting on a fold
53
+ * sinks into it by under a millimetre per particle it carries. So it is a plain
54
+ * penalty with no multiplier, no warm start and no identity across steps, which
55
+ * is also what makes a pair list that is rebuilt from scratch every step
56
+ * affordable: there is nothing on a pair worth carrying. `MEASUREMENTS.md` §33,
57
+ * and §65 for the stiffness.
56
58
  *
57
59
  * @author Alex Goldring
58
60
  * @copyright Company Named Limited (c) 2026
@@ -43,15 +43,15 @@
43
43
  *
44
44
  * @param {ClothState} state
45
45
  * @param {AbstractClothWind} wind
46
- * @param {Float64Array} anchor_translation the cloth frame's world origin
47
- * @param {Float64Array} anchor_rotation the cloth frame's world rotation, xyzw
46
+ * @param {Float64Array} frame_translation the cloth frame's world origin
47
+ * @param {Float64Array} frame_rotation the cloth frame's world rotation, xyzw
48
48
  * @param {Float64Array} [centre] written with the world-space air at the cloth's
49
49
  * own centre — what the sleep test compares against next step
50
50
  * @param {number} [time] seconds this cloth has stepped, the clock its gust is a
51
51
  * function of — see {@link AbstractClothWind}
52
52
  * @returns {boolean} whether the source was sampled per particle
53
53
  */
54
- export function cloth_sample_air(state: ClothState, wind: AbstractClothWind, anchor_translation: Float64Array, anchor_rotation: Float64Array, centre?: Float64Array, time?: number): boolean;
54
+ export function cloth_sample_air(state: ClothState, wind: AbstractClothWind, frame_translation: Float64Array, frame_rotation: Float64Array, centre?: Float64Array, time?: number): boolean;
55
55
  /**
56
56
  * Whether the air at the cloth's centre has moved far enough since the last step
57
57
  * that actually applied it to be worth waking for — §10's "sleep wakes on a wind
@@ -78,8 +78,8 @@ export function cloth_sample_air(state: ClothState, wind: AbstractClothWind, anc
78
78
  *
79
79
  * @param {ClothState} state
80
80
  * @param {AbstractClothWind} wind
81
- * @param {Float64Array} anchor_translation
82
- * @param {Float64Array} anchor_rotation
81
+ * @param {Float64Array} frame_translation
82
+ * @param {Float64Array} frame_rotation
83
83
  * @param {Float64Array} previous the air last applied to this cloth, world-space
84
84
  * @param {number} threshold m/s
85
85
  * @param {number} time seconds the cloth has stepped — the clock its gust is a
@@ -87,7 +87,7 @@ export function cloth_sample_air(state: ClothState, wind: AbstractClothWind, anc
87
87
  * have, because it has to be asking about the air that step would feel
88
88
  * @returns {boolean}
89
89
  */
90
- export function cloth_air_changed(state: ClothState, wind: AbstractClothWind, anchor_translation: Float64Array, anchor_rotation: Float64Array, previous: Float64Array, threshold: number, time: number): boolean;
90
+ export function cloth_air_changed(state: ClothState, wind: AbstractClothWind, frame_translation: Float64Array, frame_rotation: Float64Array, previous: Float64Array, threshold: number, time: number): boolean;
91
91
  /**
92
92
  * The cloth's world-space axis-aligned bounds.
93
93
  *
@@ -97,10 +97,10 @@ export function cloth_air_changed(state: ClothState, wind: AbstractClothWind, an
97
97
  * a rotated box is not a box.
98
98
  *
99
99
  * @param {ClothState} state
100
- * @param {Float64Array} anchor_translation
101
- * @param {Float64Array} anchor_rotation
100
+ * @param {Float64Array} frame_translation
101
+ * @param {Float64Array} frame_rotation
102
102
  * @param {Float64Array} out six words, min then max
103
103
  * @returns {void}
104
104
  */
105
- export function cloth_air_bounds(state: ClothState, anchor_translation: Float64Array, anchor_rotation: Float64Array, out: Float64Array): void;
105
+ export function cloth_air_bounds(state: ClothState, frame_translation: Float64Array, frame_rotation: Float64Array, out: Float64Array): void;
106
106
  //# sourceMappingURL=cloth_sample_air.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloth_sample_air.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/wind/cloth_sample_air.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;;GAaG;AACH,iGARW,YAAY,mBACZ,YAAY,WACZ,YAAY,SAEZ,MAAM,GAEJ,OAAO,CA8EnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,kGATW,YAAY,mBACZ,YAAY,YACZ,YAAY,aACZ,MAAM,QACN,MAAM,GAGJ,OAAO,CAsBnB;AAED;;;;;;;;;;;;;GAaG;AACH,wEALW,YAAY,mBACZ,YAAY,OACZ,YAAY,GACV,IAAI,CAoEhB"}
1
+ {"version":3,"file":"cloth_sample_air.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/wind/cloth_sample_air.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;;GAaG;AACH,gGARW,YAAY,kBACZ,YAAY,WACZ,YAAY,SAEZ,MAAM,GAEJ,OAAO,CA8EnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,iGATW,YAAY,kBACZ,YAAY,YACZ,YAAY,aACZ,MAAM,QACN,MAAM,GAGJ,OAAO,CAsBnB;AAED;;;;;;;;;;;;;GAaG;AACH,uEALW,YAAY,kBACZ,YAAY,OACZ,YAAY,GACV,IAAI,CAoEhB"}
@@ -47,15 +47,15 @@ import { v3_quaternion_apply_inverse } from "../../../../core/geom/vec3/v3_quate
47
47
  *
48
48
  * @param {ClothState} state
49
49
  * @param {AbstractClothWind} wind
50
- * @param {Float64Array} anchor_translation the cloth frame's world origin
51
- * @param {Float64Array} anchor_rotation the cloth frame's world rotation, xyzw
50
+ * @param {Float64Array} frame_translation the cloth frame's world origin
51
+ * @param {Float64Array} frame_rotation the cloth frame's world rotation, xyzw
52
52
  * @param {Float64Array} [centre] written with the world-space air at the cloth's
53
53
  * own centre — what the sleep test compares against next step
54
54
  * @param {number} [time] seconds this cloth has stepped, the clock its gust is a
55
55
  * function of — see {@link AbstractClothWind}
56
56
  * @returns {boolean} whether the source was sampled per particle
57
57
  */
58
- export function cloth_sample_air(state, wind, anchor_translation, anchor_rotation, centre = undefined, time = 0) {
58
+ export function cloth_sample_air(state, wind, frame_translation, frame_rotation, centre = undefined, time = 0) {
59
59
  const particle_count = state.particle_count;
60
60
 
61
61
  const air = state.air_velocity;
@@ -66,16 +66,16 @@ export function cloth_sample_air(state, wind, anchor_translation, anchor_rotatio
66
66
 
67
67
  const position = state.position;
68
68
 
69
- const anchor_x = anchor_translation[0];
70
- const anchor_y = anchor_translation[1];
71
- const anchor_z = anchor_translation[2];
69
+ const frame_x = frame_translation[0];
70
+ const frame_y = frame_translation[1];
71
+ const frame_z = frame_translation[2];
72
72
 
73
- const qx = anchor_rotation[0];
74
- const qy = anchor_rotation[1];
75
- const qz = anchor_rotation[2];
76
- const qw = anchor_rotation[3];
73
+ const qx = frame_rotation[0];
74
+ const qy = frame_rotation[1];
75
+ const qz = frame_rotation[2];
76
+ const qw = frame_rotation[3];
77
77
 
78
- cloth_air_bounds(state, anchor_translation, anchor_rotation, BOUNDS);
78
+ cloth_air_bounds(state, frame_translation, frame_rotation, BOUNDS);
79
79
 
80
80
  const varies = wind.varies(BOUNDS[0], BOUNDS[1], BOUNDS[2], BOUNDS[3], BOUNDS[4], BOUNDS[5]);
81
81
 
@@ -121,7 +121,7 @@ export function cloth_sample_air(state, wind, anchor_translation, anchor_rotatio
121
121
 
122
122
  v3_quaternion_apply(WORLD, 0, position[p], position[p + 1], position[p + 2], qx, qy, qz, qw);
123
123
 
124
- wind.sample(SAMPLE, WORLD[0] + anchor_x, WORLD[1] + anchor_y, WORLD[2] + anchor_z, time);
124
+ wind.sample(SAMPLE, WORLD[0] + frame_x, WORLD[1] + frame_y, WORLD[2] + frame_z, time);
125
125
 
126
126
  v3_quaternion_apply_inverse(LOCAL, 0, SAMPLE[0], SAMPLE[1], SAMPLE[2], qx, qy, qz, qw);
127
127
 
@@ -159,8 +159,8 @@ export function cloth_sample_air(state, wind, anchor_translation, anchor_rotatio
159
159
  *
160
160
  * @param {ClothState} state
161
161
  * @param {AbstractClothWind} wind
162
- * @param {Float64Array} anchor_translation
163
- * @param {Float64Array} anchor_rotation
162
+ * @param {Float64Array} frame_translation
163
+ * @param {Float64Array} frame_rotation
164
164
  * @param {Float64Array} previous the air last applied to this cloth, world-space
165
165
  * @param {number} threshold m/s
166
166
  * @param {number} time seconds the cloth has stepped — the clock its gust is a
@@ -168,12 +168,12 @@ export function cloth_sample_air(state, wind, anchor_translation, anchor_rotatio
168
168
  * have, because it has to be asking about the air that step would feel
169
169
  * @returns {boolean}
170
170
  */
171
- export function cloth_air_changed(state, wind, anchor_translation, anchor_rotation, previous, threshold, time) {
171
+ export function cloth_air_changed(state, wind, frame_translation, frame_rotation, previous, threshold, time) {
172
172
  if (state.particle_count === 0) {
173
173
  return false;
174
174
  }
175
175
 
176
- cloth_air_bounds(state, anchor_translation, anchor_rotation, BOUNDS);
176
+ cloth_air_bounds(state, frame_translation, frame_rotation, BOUNDS);
177
177
 
178
178
  wind.sample(
179
179
  SAMPLE,
@@ -199,12 +199,12 @@ export function cloth_air_changed(state, wind, anchor_translation, anchor_rotati
199
199
  * a rotated box is not a box.
200
200
  *
201
201
  * @param {ClothState} state
202
- * @param {Float64Array} anchor_translation
203
- * @param {Float64Array} anchor_rotation
202
+ * @param {Float64Array} frame_translation
203
+ * @param {Float64Array} frame_rotation
204
204
  * @param {Float64Array} out six words, min then max
205
205
  * @returns {void}
206
206
  */
207
- export function cloth_air_bounds(state, anchor_translation, anchor_rotation, out) {
207
+ export function cloth_air_bounds(state, frame_translation, frame_rotation, out) {
208
208
  const particle_count = state.particle_count;
209
209
 
210
210
  const position = state.position;
@@ -231,10 +231,10 @@ export function cloth_air_bounds(state, anchor_translation, anchor_rotation, out
231
231
  if (z > max_z) { max_z = z; }
232
232
  }
233
233
 
234
- const qx = anchor_rotation[0];
235
- const qy = anchor_rotation[1];
236
- const qz = anchor_rotation[2];
237
- const qw = anchor_rotation[3];
234
+ const qx = frame_rotation[0];
235
+ const qy = frame_rotation[1];
236
+ const qz = frame_rotation[2];
237
+ const qw = frame_rotation[3];
238
238
 
239
239
  let world_min_x = Infinity;
240
240
  let world_min_y = Infinity;
@@ -252,9 +252,9 @@ export function cloth_air_bounds(state, anchor_translation, anchor_rotation, out
252
252
  qx, qy, qz, qw
253
253
  );
254
254
 
255
- const x = WORLD[0] + anchor_translation[0];
256
- const y = WORLD[1] + anchor_translation[1];
257
- const z = WORLD[2] + anchor_translation[2];
255
+ const x = WORLD[0] + frame_translation[0];
256
+ const y = WORLD[1] + frame_translation[1];
257
+ const z = WORLD[2] + frame_translation[2];
258
258
 
259
259
  if (x < world_min_x) { world_min_x = x; }
260
260
  if (y < world_min_y) { world_min_y = y; }
@@ -66,11 +66,11 @@ export class FluidObstacleSystem extends System<any> {
66
66
  /**
67
67
  * @param {FluidComponent} fluid
68
68
  */
69
- static "__#429@#refresh_masks"(fluid: FluidComponent): void;
69
+ static "__#432@#refresh_masks"(fluid: FluidComponent): void;
70
70
  /**
71
71
  * @param {FluidComponent} fluid
72
72
  */
73
- static "__#429@#clear_field"(fluid: FluidComponent): void;
73
+ static "__#432@#clear_field"(fluid: FluidComponent): void;
74
74
  /**
75
75
  * Mark every cell of `fluid` whose centre lies within `inflation` of the
76
76
  * posed shape as solid. Iteration is clipped to the shape's world AABB
@@ -82,7 +82,7 @@ export class FluidObstacleSystem extends System<any> {
82
82
  * @param {number} inflation world-units SDF threshold
83
83
  * @param {Float64Array} point length-3 scratch
84
84
  */
85
- static "__#429@#voxelize"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array): void;
85
+ static "__#432@#voxelize"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array): void;
86
86
  /**
87
87
  * Write the obstacle's translation velocity onto every face of every cell
88
88
  * it voxelized — the moving-wall boundary condition. Runs AFTER the mask
@@ -102,7 +102,7 @@ export class FluidObstacleSystem extends System<any> {
102
102
  * @param {number} wvy
103
103
  * @param {number} wvz
104
104
  */
105
- static "__#429@#stamp_wall_velocity"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array, wvx: number, wvy: number, wvz: number): void;
105
+ static "__#432@#stamp_wall_velocity"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array, wvx: number, wvy: number, wvz: number): void;
106
106
  constructor();
107
107
  dependencies: (typeof FluidObstacle)[];
108
108
  components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof RigidBody> | ResourceAccessSpecification<typeof Collider> | ResourceAccessSpecification<typeof FluidComponent> | ResourceAccessSpecification<typeof FluidObstacle>)[];
@@ -4,6 +4,10 @@ export default Ticker;
4
4
  * Dispatches "tick" every animation frame or "maxDelay" time, whichever happens to be soonest
5
5
  * This is essentially the timing bus that all the simulation systems subscribe to for their step advancement
6
6
  *
7
+ * A tick taken in an animation frame runs inside that frame and is measured to the frame's timestamp,
8
+ * and {@link Ticker#onFrame} follows it, so whatever draws from `onFrame` draws the simulation as of
9
+ * that frame.
10
+ *
7
11
  *
8
12
  * @example
9
13
  * ticker.onTick.add(delta_s => {
@@ -40,6 +44,14 @@ declare class Ticker {
40
44
  * @type {Signal<number>}
41
45
  */
42
46
  readonly onTick: any;
47
+ /**
48
+ * Dispatched once per animation frame, after that frame's tick - or with none, while paused or
49
+ * suspended. The place to draw: the simulation is at the frame's timestamp here.
50
+ * Not dispatched for the {@link start}'s `maxTimeout` fallback ticks, which are not frames.
51
+ * @readonly
52
+ * @type {Signal}
53
+ */
54
+ readonly onFrame: Signal;
43
55
  /**
44
56
  * Whether the update loop is cycling. {@link Ticker#pause} and {@link Ticker#resume} require this,
45
57
  * they throw otherwise.
@@ -66,4 +78,5 @@ declare class Ticker {
66
78
  #private;
67
79
  }
68
80
  import Clock from '../Clock.js';
81
+ import Signal from "../../core/events/signal/Signal.js";
69
82
  //# sourceMappingURL=Ticker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Ticker.d.ts","sourceRoot":"","sources":["../../../../src/engine/simulation/Ticker.js"],"names":[],"mappings":";AAIA;;;;;;;;;;;;;;GAcG;AACH;IACI;;;OAGG;IACH,gBAFU,KAAK,CAEK;IAEpB;;;;;;;;;;;;OAYG;IACH,uBAFU,OAAO,CAEY;IAkC7B;;;;OAIG;IACH,qBAAsB;IA2BtB;;;;OAIG;IACH,yBAEC;IAED;;;;OAIG;IACH,yBAEC;IAuGD;;;;OAIG;IACH;QAF4B,UAAU,GAA3B,MAAM;aAkFhB;IAED,cAWC;IAED,eAaC;IAED,aAaC;;CACJ;kBA/ViB,aAAa"}
1
+ {"version":3,"file":"Ticker.d.ts","sourceRoot":"","sources":["../../../../src/engine/simulation/Ticker.js"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACI;;;OAGG;IACH,gBAFU,KAAK,CAEK;IAEpB;;;;;;;;;;;;OAYG;IACH,uBAFU,OAAO,CAEY;IAkC7B;;;;OAIG;IACH,qBAAsB;IAEtB;;;;;;OAMG;IACH,kBAFU,MAAM,CAEO;IA2BvB;;;;OAIG;IACH,yBAEC;IAED;;;;OAIG;IACH,yBAEC;IAuGD;;;;OAIG;IACH;QAF4B,UAAU,GAA3B,MAAM;aAuGhB;IAED,cAWC;IAED,eAaC;IAED,aAaC;;CACJ;kBAjYiB,aAAa;mBAFZ,oCAAoC"}
@@ -1,5 +1,6 @@
1
1
  import { assert } from "../../core/assert.js";
2
2
  import Signal from "../../core/events/signal/Signal.js";
3
+ import { current_time_in_seconds } from "../../core/time/current_time_in_seconds.js";
3
4
  import Clock from '../Clock.js';
4
5
 
5
6
  /**
@@ -7,6 +8,10 @@ import Clock from '../Clock.js';
7
8
  * Dispatches "tick" every animation frame or "maxDelay" time, whichever happens to be soonest
8
9
  * This is essentially the timing bus that all the simulation systems subscribe to for their step advancement
9
10
  *
11
+ * A tick taken in an animation frame runs inside that frame and is measured to the frame's timestamp,
12
+ * and {@link Ticker#onFrame} follows it, so whatever draws from `onFrame` draws the simulation as of
13
+ * that frame.
14
+ *
10
15
  *
11
16
  * @example
12
17
  * ticker.onTick.add(delta_s => {
@@ -78,6 +83,15 @@ class Ticker {
78
83
  */
79
84
  onTick = new Signal();
80
85
 
86
+ /**
87
+ * Dispatched once per animation frame, after that frame's tick - or with none, while paused or
88
+ * suspended. The place to draw: the simulation is at the frame's timestamp here.
89
+ * Not dispatched for the {@link start}'s `maxTimeout` fallback ticks, which are not frames.
90
+ * @readonly
91
+ * @type {Signal}
92
+ */
93
+ onFrame = new Signal();
94
+
81
95
  constructor() {
82
96
  this.clock.pause();
83
97
  }
@@ -242,12 +256,15 @@ class Ticker {
242
256
  const generation = this.#generation;
243
257
  const is_current = () => this.#generation === generation;
244
258
 
245
- const update = () => {
259
+ /**
260
+ * @param {number} time in seconds, on the {@link current_time_in_seconds} timeline
261
+ */
262
+ const update = (time) => {
246
263
  if (!this.#isRunning || this.#isSuspended) {
247
264
  return;
248
265
  }
249
266
 
250
- const delta = this.clock.getDelta();
267
+ const delta = this.clock.getDeltaAt(time);
251
268
 
252
269
  this.#last_tick_delta_s = delta;
253
270
 
@@ -261,28 +278,46 @@ class Ticker {
261
278
  return;
262
279
  }
263
280
 
264
- animate();
281
+ animate(current_time_in_seconds());
265
282
  }
266
283
 
267
- const animationFrameCallback = () => {
284
+ /**
285
+ * @param {number} timestamp the frame's, in milliseconds
286
+ */
287
+ const animationFrameCallback = (timestamp) => {
268
288
  clearTimeout(this.#timeoutHandle);
269
289
 
270
290
  if (!is_current()) {
271
291
  return;
272
292
  }
273
293
 
274
- //push tick beyond animation frame stack allowing draw to happen
275
- this.#timeoutHandle = setTimeout(animate, 0);
294
+ /*
295
+ Ticked here, on the frame's own timestamp, and before the frame is announced. This used to
296
+ be pushed to a setTimeout(0) "allowing draw to happen" first, which made every frame draw
297
+ the simulation as of the previous frame's timeout - and that fired whenever the previous
298
+ draw finished, so a steady motion was drawn at a different speed every frame.
299
+ */
300
+ animate(timestamp * 1e-3);
301
+
302
+ //a tick listener is allowed to stop us
303
+ if (!is_current()) {
304
+ return;
305
+ }
306
+
307
+ this.onFrame.send0();
276
308
  }
277
309
 
278
- const animate = () => {
310
+ /**
311
+ * @param {number} time in seconds, on the {@link current_time_in_seconds} timeline
312
+ */
313
+ const animate = (time) => {
279
314
  if (!is_current()) {
280
315
  return;
281
316
  }
282
317
 
283
318
  this.#animationFrameHandle = requestAnimationFrame(animationFrameCallback);
284
319
 
285
- update();
320
+ update(time);
286
321
 
287
322
  //update() dispatches onTick, and a listener is allowed to stop us from inside it
288
323
  if (!is_current()) {
@@ -258,9 +258,10 @@ geometry.getAttribute(StandardAttributes.Position).data // Float32Array
258
258
  geometry.index.data // Uint32Array
259
259
  ```
260
260
 
261
- Seven generators ship, all returning a `Geometry`, in `renderer/geometry/primitives/`:
261
+ Ten generators ship, all returning a `Geometry`, in `renderer/geometry/primitives/`:
262
262
  `make_box_geometry`, `make_plane_geometry`, `make_polyhedron_geometry`, `make_octahedron_geometry`,
263
- `make_torus_geometry`, `make_cylinder_geometry`, `make_torus_knot_geometry`.
263
+ `make_uv_sphere_geometry`, `make_capsule_geometry`, `make_cylinder_geometry`, `make_cone_geometry`,
264
+ `make_torus_geometry`, `make_torus_knot_geometry`.
264
265
 
265
266
  **`MeshletGeometry`** is the GPU form: triangles clustered into meshlets, attributes encoded, and a
266
267
  BVH over the clusters. This is what a mesh row names, and it is what buys cluster culling and a
@@ -273,6 +274,11 @@ const meshlets = meshlet_geometry_build_from_geometry(geometry);
273
274
  **That build is a precompute.** Do it once, when the content is created or loaded. If your vertices
274
275
  change every frame, you are on the wrong path — see §8.
275
276
 
277
+ Seven of the primitives also come ready built, as `MeshletGeometry` subclasses one per module in
278
+ `renderer/geometry/`: `BoxGeometry`, `PlaneGeometry`, `UVSphereGeometry`, `CapsuleGeometry`,
279
+ `CylinderGeometry`, `ConeGeometry` and `TorusGeometry`. Each constructor runs its generator and then
280
+ this build, so constructing one is the same precompute.
281
+
276
282
  ### Materials
277
283
 
278
284
  `ShadeMaterial` is the base: `transparency_mode`, `draw_mode` and `draw_side`.
@@ -3,7 +3,8 @@ import { EntityComponentDataset } from "../../../engine/ecs/EntityComponentDatas
3
3
  import { Transform64 } from "../../../engine/ecs/transform/Transform64.js";
4
4
  import { OrbitalCameraController } from "../../renderer/camera/OrbitalCameraController.js";
5
5
  import { PerspectiveCamera } from "../../renderer/camera/PerspectiveCamera.js";
6
- import { BoxGeometry, PlaneGeometry } from "../../renderer/geometry/BoxGeometry.js";
6
+ import { BoxGeometry } from "../../renderer/geometry/BoxGeometry.js";
7
+ import { PlaneGeometry } from "../../renderer/geometry/PlaneGeometry.js";
7
8
  import { make_sunlight } from "../../renderer/light/make_sunlight.js";
8
9
  import { place_light } from "../../renderer/light/place_light.js";
9
10
  import { StandardShadeMaterial } from "../../renderer/material/StandardShadeMaterial.js";
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/skinned_blas_refit/main.js"],"names":[],"mappings":"AAwQA;;;;;GAKG;AACH,yBAFa,QAAQ,IAAI,CAAC,CAoiBzB"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/skinned_blas_refit/main.js"],"names":[],"mappings":"AAgQA;;;;;GAKG;AACH,yBAFa,QAAQ,IAAI,CAAC,CAoiBzB"}
@@ -11,6 +11,8 @@ import { create_frame_loop } from "../../renderer/create_frame_loop.js";
11
11
  import { make_sunlight } from "../../renderer/light/make_sunlight.js";
12
12
  import { place_light } from "../../renderer/light/place_light.js";
13
13
  import { EntityComponentDataset } from "../../../engine/ecs/EntityComponentDataset.js";
14
+ import { MeshSkin } from "../../../engine/graphics/ecs/mesh-v2/MeshSkin.js";
15
+ import { AnimationClips } from "../../../engine/graphics3/animation/AnimationClips.js";
14
16
  import { prefab_compile } from "../../../engine/graphics3/prefab/prefab_compile.js";
15
17
  import { load_gltf } from "../../renderer/loader/gltf/load_gltf.js";
16
18
  import { row_of_entity } from "../../renderer/scene/rows/GPUSceneRows.js";
@@ -161,25 +163,15 @@ class FrameTimer {
161
163
  }
162
164
 
163
165
  /**
164
- * Every skinned mesh entity an instance's skins deform.
165
- *
166
- * Off the skins rather than by walking the entities: a skin already lists exactly the meshes that
167
- * bind to it, which is what `register_skin` uses, so this cannot disagree with what actually gets
168
- * deformed.
166
+ * Every mesh entity of an instance that a skin deforms: the ones carrying a `MeshSkin`, which is
167
+ * exactly what gets registered and bound.
169
168
  *
169
+ * @param {EntityComponentDataset} dataset
170
170
  * @param {PrefabInstance} instance
171
171
  * @returns {number[]}
172
172
  */
173
- function skinned_meshes_of(instance) {
174
- const meshes = new Set();
175
-
176
- for (const skin of instance.skins) {
177
- for (const mesh of skin.meshes) {
178
- meshes.add(mesh);
179
- }
180
- }
181
-
182
- return [...meshes];
173
+ function skinned_meshes_of(dataset, instance) {
174
+ return Array.from(instance.mesh_entities).filter(entity => dataset.getComponent(entity, MeshSkin) !== undefined);
183
175
  }
184
176
 
185
177
  /**
@@ -201,9 +193,9 @@ function add_dancer(scene_context, dataset, prefab, index, count) {
201
193
  // what has to move. See `place_character`.
202
194
  const { x, z } = grid_position(index, count, SPACING);
203
195
 
204
- const { instance } = place_character(scene_context, dataset, prefab, x, z);
196
+ const { root, instance } = place_character(scene_context, dataset, prefab, x, z);
205
197
 
206
- const meshes = skinned_meshes_of(instance);
198
+ const meshes = skinned_meshes_of(dataset, instance);
207
199
 
208
200
  if (meshes.length === 0) {
209
201
  throw new Error(`${CHARACTER_URL} has no skinned mesh — nothing here has a BLAS to refit`);
@@ -214,8 +206,8 @@ function add_dancer(scene_context, dataset, prefab, index, count) {
214
206
  // One clip, looping, at full weight. The pose accumulator sums every *bound* clip whatever its
215
207
  // weight, so binding the T-pose alongside the dance would blend the two rather than leave the
216
208
  // dance alone — only what should play is registered.
217
- const clip = instance.clips.find(candidate => /samba|dance/i.test(candidate.name ?? ''))
218
- ?? instance.clips[0];
209
+ const clips = dataset.getComponent(root, AnimationClips).clips;
210
+ const clip = clips.find(candidate => /samba|dance/i.test(candidate.name ?? '')) ?? clips[0];
219
211
 
220
212
  if (clip !== undefined) {
221
213
  const clip_id = animations.register_clip(clip);
@@ -19,7 +19,7 @@
19
19
  * primitives hold a row of the `meshes` table too, over a clone of their geometry when the mesh is
20
20
  * skinned, which is the region the skinning pass deforms and the BLAS refit follows.
21
21
  *
22
- * This is what `MeshSystem` and `ShadedGeometrySystem` do between them for a game; a playground
22
+ * This is what `MeshSystem`, `ShadedGeometrySystem` and `MeshSkinSystem` do between them for a game; a playground
23
23
  * has no systems, so `prefab_place` does the same by hand and in one place — this is it, at a
24
24
  * grid position.
25
25
  *
@@ -31,14 +31,17 @@
31
31
  * @param {object} [options]
32
32
  * @param {boolean} [options.register_animation] whether the instance's skins are registered; off
33
33
  * leaves a skinned mesh's clone undeformed, which is a question of its own
34
- * @returns {{root: number, instance: PrefabInstance, animation: InstanceAnimationRegistration|null}}
34
+ * @returns {{root: number, instance: PrefabInstance, skins: Array<{entity: number, skin_id: number}>|null}}
35
35
  */
36
36
  export function place_character(scene_context: GPUSceneContext, dataset: EntityComponentDataset, prefab: Prefab, x: number, z: number, { register_animation }?: {
37
37
  register_animation?: boolean;
38
38
  }): {
39
39
  root: number;
40
40
  instance: PrefabInstance;
41
- animation: InstanceAnimationRegistration | null;
41
+ skins: Array<{
42
+ entity: number;
43
+ skin_id: number;
44
+ }> | null;
42
45
  };
43
46
  /**
44
47
  * The source geometry a mesh entity draws — for a skinned one, what its clone is a clone of.
@@ -1 +1 @@
1
- {"version":3,"file":"place_character.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/skinned_blas_refit/place_character.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,oHAPW,MAAM,KACN,MAAM;IAEY,kBAAkB,GAApC,OAAO;IAEL;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,iBAAiB;IAAC,SAAS,EAAE,gCAA8B,IAAI,CAAA;CAAC,CAanG;AAED;;;;;;GAMG;AACH,qEAHW,MAAM,mBAShB;AAED;;;;;;;;;;;;GAYG;AACH,qCALW,MAAM,SACN,MAAM,WACN,MAAM,GACJ;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAUlC"}
1
+ {"version":3,"file":"place_character.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/skinned_blas_refit/place_character.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,oHAPW,MAAM,KACN,MAAM;IAEY,kBAAkB,GAApC,OAAO;IAEL;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,iBAAiB;IAAC,KAAK,EAAE,MAAM;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,GAAC,IAAI,CAAA;CAAC,CAa1G;AAED;;;;;;GAMG;AACH,qEAHW,MAAM,mBAShB;AAED;;;;;;;;;;;;GAYG;AACH,qCALW,MAAM,SACN,MAAM,WACN,MAAM,GACJ;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAUlC"}