@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
@@ -3,18 +3,19 @@ import { ResourceAccessKind } from "../../core/model/ResourceAccessKind.js";
3
3
  import { ResourceAccessSpecification } from "../../core/model/ResourceAccessSpecification.js";
4
4
  import { PosePlayback } from "../../shade/renderer/animation/pose/PosePlayback.js";
5
5
  import { System } from "../ecs/System.js";
6
- import { SGMesh } from "../graphics/ecs/mesh-v2/aggregate/SGMesh.js";
6
+ import { AnimationClips } from "./animation/AnimationClips.js";
7
7
  import { AnimationGraphController } from "./animation/AnimationGraphController.js";
8
8
  import { write_graph_playback } from "./animation/write_graph_playback.js";
9
- import {
10
- register_instance_clips,
11
- unregister_instance_clips
12
- } from "./register_instance_animation.js";
9
+ import { register_clips, unregister_clips } from "./register_clips.js";
13
10
 
14
11
  /**
15
12
  * Drives every entity's {@link AnimationGraphController}: runs its clock, and tells the renderer
16
13
  * what its clips weigh and where they are playing.
17
14
  *
15
+ * **The clips are the entity's {@link AnimationClips}.** An entity is driven while it carries both
16
+ * components, whoever put them there — a model `MeshSystem` loaded, or a rig built in code. New
17
+ * clips are a new component, which this system sees as the entity leaving and coming back.
18
+ *
18
19
  * **It is the CPU that plays the animation and the GPU that draws it.** Shade can advance a clip
19
20
  * itself, and this never asks it to — `AnimationClipFlags.Playing` is left clear and every audible
20
21
  * clip's time is written down each frame from the controller's own clock. That is I-4: the pose
@@ -23,7 +24,7 @@ import {
23
24
  *
24
25
  * **Nothing here is culled.** The legacy system skipped entities smaller than 32 px², which let
25
26
  * camera framing decide whether a footstep effect or an ability release ever happened. The clock and
26
- * its notifications are gameplay and run for every entity whose model has arrived; what may be
27
+ * its notifications are gameplay and run for every entity whose clips have arrived; what may be
27
28
  * culled is drawing, and drawing is Shade's to cull.
28
29
  */
29
30
  export class AnimationGraphSystem extends System {
@@ -33,32 +34,31 @@ export class AnimationGraphSystem extends System {
33
34
  #graphics;
34
35
 
35
36
  /**
36
- * The system that owns the scene, the model instances, and the ids the animation manager issued
37
- * for them.
37
+ * The scene whose GPU context issues the clip ids.
38
38
  *
39
- * @type {MeshSystem}
39
+ * @type {Scene}
40
40
  */
41
- #meshes;
41
+ #scene;
42
42
 
43
43
  /**
44
- * @type {Map<number, {controller: AnimationGraphController, instance: PrefabInstance|null, clip_registration: InstanceClipRegistration|null, slots: Int32Array, played_slots: Int32Array, clip_ids: Int32Array, weights: Float32Array, poses: PosePlayback[]}>}
44
+ * @type {Map<number, {controller: AnimationGraphController, clips: ShadeAnimationClip[], bound: boolean, clip_registration: ClipRegistration|null, slots: Int32Array, played_slots: Int32Array, clip_ids: Int32Array, weights: Float32Array, poses: PosePlayback[]}>}
45
45
  */
46
46
  #entries = new Map();
47
47
 
48
48
  /**
49
49
  * @param {GraphicsEngine} graphics
50
- * @param {MeshSystem} meshes
50
+ * @param {Scene} scene
51
51
  */
52
- constructor(graphics, meshes) {
52
+ constructor(graphics, scene) {
53
53
  super();
54
54
 
55
55
  assert.defined(graphics, 'graphics');
56
- assert.defined(meshes, 'meshes');
56
+ assert.equal(scene?.isScene, true, 'scene.isScene !== true');
57
57
 
58
58
  this.#graphics = graphics;
59
- this.#meshes = meshes;
59
+ this.#scene = scene;
60
60
 
61
- this.dependencies = [AnimationGraphController, SGMesh];
61
+ this.dependencies = [AnimationGraphController, AnimationClips];
62
62
 
63
63
  // this tick's clip times are this system's to set: whatever evaluates a pose from them
64
64
  // (exact queries, IK's base pose) reads AnimationGraphController and so runs after it
@@ -68,14 +68,20 @@ export class AnimationGraphSystem extends System {
68
68
  }
69
69
 
70
70
  /**
71
+ * Only noted here: the graph is bound to the clips by the next {@link update}. A link can happen
72
+ * anywhere the components are added — inside a model's spawn, for one `MeshSystem` loads — and a
73
+ * graph naming a clip the entity has not got throws, which belongs in this system's tick and not
74
+ * in whoever added the component.
75
+ *
71
76
  * @param {AnimationGraphController} controller
72
- * @param {SGMesh} model
77
+ * @param {AnimationClips} clips
73
78
  * @param {number} entity
74
79
  */
75
- link(controller, model, entity) {
80
+ link(controller, clips, entity) {
76
81
  this.#entries.set(entity, {
77
82
  controller,
78
- instance: null,
83
+ clips: clips.clips,
84
+ bound: false,
79
85
  clip_registration: null,
80
86
  slots: new Int32Array(0),
81
87
  played_slots: new Int32Array(0),
@@ -86,15 +92,15 @@ export class AnimationGraphSystem extends System {
86
92
  }
87
93
 
88
94
  /**
89
- * What the entity's model is playing, in the form the CPU pose evaluator takes: one entry per
90
- * clip **this graph names**, at the weight and the time the renderer has been given.
95
+ * What the entity is playing, in the form the CPU pose evaluator takes: one entry per clip
96
+ * **this graph names**, at the weight and the time the renderer has been given.
91
97
  *
92
98
  * **The clips the graph does not name are not here, because they are not registered** (D37).
93
99
  * The GPU's accumulator marks a joint dirty for every bound clip that writes to it, weight and
94
100
  * all — so a bound clip at weight zero resolves the joints only it drives to zero rather than
95
101
  * leaving them at rest. The answer is not to hand those clips to the evaluator so it can make
96
102
  * the same mistake; it is not to bind them. What the graph never names, nothing plays, and the
97
- * joints it alone would have driven stay where the model rests.
103
+ * joints it alone would have driven stay where they rest.
98
104
  *
99
105
  * A clip the graph names but is not currently playing **is** here, at weight zero, because it is
100
106
  * bound and the accumulator does see it.
@@ -105,16 +111,17 @@ export class AnimationGraphSystem extends System {
105
111
  * @param {PosePlayback[]} target appended to
106
112
  * @param {number} entity
107
113
  * @returns {boolean} whether this system is driving the entity — `false` for one with no
108
- * {@link AnimationGraphController}, and for one whose model has not arrived
114
+ * {@link AnimationGraphController} or no {@link AnimationClips}, and for one whose clips arrived
115
+ * since the last update
109
116
  */
110
117
  write_pose_playbacks(target, entity) {
111
118
  const entry = this.#entries.get(entity);
112
119
 
113
- if (entry === undefined || entry.instance === null) {
120
+ if (entry === undefined || !entry.bound) {
114
121
  return false;
115
122
  }
116
123
 
117
- const clips = entry.instance.clips;
124
+ const clips = entry.clips;
118
125
  const poses = entry.poses;
119
126
  const played = entry.played_slots;
120
127
 
@@ -136,7 +143,7 @@ export class AnimationGraphSystem extends System {
136
143
  const weight = weights[i];
137
144
 
138
145
  // assignment rather than accumulation, and it matters only where two of the graph's
139
- // clips are one clip of the model: the renderer is written to in this order too, so the
146
+ // clips are one clip of the entity: the renderer is written to in this order too, so the
140
147
  // last of them is what it holds
141
148
  pose.weight = weight;
142
149
 
@@ -155,10 +162,10 @@ export class AnimationGraphSystem extends System {
155
162
 
156
163
  /**
157
164
  * @param {AnimationGraphController} controller
158
- * @param {SGMesh} model
165
+ * @param {AnimationClips} clips
159
166
  * @param {number} entity
160
167
  */
161
- unlink(controller, model, entity) {
168
+ unlink(controller, clips, entity) {
162
169
  controller.unlink();
163
170
 
164
171
  const entry = this.#entries.get(entity);
@@ -186,7 +193,7 @@ export class AnimationGraphSystem extends System {
186
193
  * **An id may only be handed back to the manager that issued it.** A renderer restart replaces
187
194
  * the GPU scene context and voids every id it gave out, so a registration stamped with a context
188
195
  * that is no longer current is forgotten rather than returned — returning it would corrupt a
189
- * stranger's table. Same rule as {@link unregister_instance_animation}, same `===`.
196
+ * stranger's table. Same rule as {@link unregister_clips}, same `===`.
190
197
  *
191
198
  * @param {object} entry
192
199
  */
@@ -197,8 +204,8 @@ export class AnimationGraphSystem extends System {
197
204
  return;
198
205
  }
199
206
 
200
- if (registration.context === this.#graphics.scene_context(this.#meshes.scene)) {
201
- unregister_instance_clips(registration);
207
+ if (registration.context === this.#graphics.scene_context(this.#scene)) {
208
+ unregister_clips(registration);
202
209
  }
203
210
 
204
211
  entry.clip_registration = null;
@@ -210,22 +217,15 @@ export class AnimationGraphSystem extends System {
210
217
  update(time_delta_seconds) {
211
218
  const ecd = this.entityManager.dataset;
212
219
 
213
- const context = this.#graphics.scene_context(this.#meshes.scene);
220
+ const context = this.#graphics.scene_context(this.#scene);
214
221
 
215
222
  // No device — before the first start, and again after a stop. The clocks still run: a unit
216
223
  // that fires an ability while the renderer is being replaced still fires it.
217
224
  const manager = context === null ? null : context.animation_manager;
218
225
 
219
226
  for (const [entity, entry] of this.#entries) {
220
- const instance = this.#meshes.instance_of(entity);
221
-
222
- if (instance === null) {
223
- // the model has not arrived, and its clips are what say how long they run
224
- continue;
225
- }
226
-
227
- if (instance !== entry.instance) {
228
- this.#bind_model(entry, entity, instance, ecd);
227
+ if (!entry.bound) {
228
+ this.#bind_clips(entry, entity, ecd);
229
229
  }
230
230
 
231
231
  entry.controller.tick(time_delta_seconds);
@@ -240,7 +240,7 @@ export class AnimationGraphSystem extends System {
240
240
  noticed — in one comparison, without depending on when anything last ran.
241
241
  */
242
242
  if (entry.clip_registration === null || entry.clip_registration.context !== context) {
243
- this.#bind_gpu(entry, instance, context);
243
+ this.#bind_gpu(entry, context);
244
244
  }
245
245
 
246
246
  write_graph_playback(manager, entry.controller, entry.clip_ids, entry.weights);
@@ -248,15 +248,16 @@ export class AnimationGraphSystem extends System {
248
248
  }
249
249
 
250
250
  /**
251
- * Bind the graph to a model: work out which of the model's clips each of the graph's clips is,
252
- * how long each of them runs, and start the graph on that.
251
+ * Bind the graph to the entity's clips: work out which of them each of the graph's clips is, how
252
+ * long each of them runs, and start the graph on that.
253
253
  *
254
254
  * @param {object} entry
255
255
  * @param {number} entity
256
- * @param {PrefabInstance} instance
257
256
  * @param {EntityComponentDataset} ecd
258
257
  */
259
- #bind_model(entry, entity, instance, ecd) {
258
+ #bind_clips(entry, entity, ecd) {
259
+ const clips = entry.clips;
260
+
260
261
  const clip_index = entry.controller.def.clipIndex;
261
262
  const clip_count = clip_index.length;
262
263
 
@@ -266,26 +267,25 @@ export class AnimationGraphSystem extends System {
266
267
  for (let i = 0; i < clip_count; i++) {
267
268
  const name = clip_index[i].name;
268
269
 
269
- const slot = instance.clips.findIndex(clip => clip.name === name);
270
+ const slot = clips.findIndex(clip => clip.name === name);
270
271
 
271
272
  if (slot === -1) {
272
- throw new Error(`Animation clip '${name}' is not in the model`);
273
+ throw new Error(`Animation clip '${name}' is not among the clips of entity ${entity}`);
273
274
  }
274
275
 
275
276
  slots[i] = slot;
276
- durations[i] = instance.clips[slot].duration;
277
+ durations[i] = clips[slot].duration;
277
278
  }
278
279
 
279
280
  entry.controller.unlink();
280
281
  entry.controller.link(entity, ecd, durations);
281
282
 
282
- entry.instance = instance;
283
283
  entry.slots = slots;
284
284
 
285
285
  /*
286
- The distinct clips of the model this graph plays. Two states can name one clip — an idle a
287
- hurt returns to, say — and it is one row on the GPU either way, so it is one entry here:
288
- registered once, reported to the pose evaluator once.
286
+ The distinct clips this graph plays. Two states can name one clip — an idle a hurt returns
287
+ to, say — and it is one row on the GPU either way, so it is one entry here: registered once,
288
+ reported to the pose evaluator once.
289
289
  */
290
290
  const played = [];
291
291
 
@@ -299,28 +299,25 @@ export class AnimationGraphSystem extends System {
299
299
 
300
300
  entry.clip_ids = new Int32Array(clip_count);
301
301
  entry.weights = new Float32Array(clip_count).fill(-1);
302
- entry.poses = instance.clips.map(() => new PosePlayback());
302
+ entry.poses = clips.map(() => new PosePlayback());
303
303
 
304
- // ids the manager issued for the model that was here before name clips this one does not
305
- // have
306
- this.#release_clips(entry);
304
+ entry.bound = true;
307
305
  }
308
306
 
309
307
  /**
310
308
  * Make this graph's clips playable, and take up the ids that come back.
311
309
  *
312
310
  * **Only the clips the graph names are registered** (D37), so there is nothing to silence: a
313
- * clip of the model no state plays is never bound, never marks a joint, and leaves the joints
314
- * only it would have driven at rest. What this used to do instead — register everything and then
315
- * write a zero weight over the surplus — kept them bound, and a bound clip at weight zero
316
- * resolves its joints to zero rather than to the model's own pose.
311
+ * clip no state plays is never bound, never marks a joint, and leaves the joints only it would
312
+ * have driven at rest. What this used to do instead — register everything and then write a zero
313
+ * weight over the surplus — kept them bound, and a bound clip at weight zero resolves its joints
314
+ * to zero rather than to the rig's own pose.
317
315
  *
318
316
  * @param {object} entry
319
- * @param {PrefabInstance} instance
320
317
  * @param {GPUSceneContext} context
321
318
  */
322
- #bind_gpu(entry, instance, context) {
323
- const registration = register_instance_clips(context, instance, entry.played_slots);
319
+ #bind_gpu(entry, context) {
320
+ const registration = register_clips(context, entry.clips, entry.played_slots);
324
321
 
325
322
  const slots = entry.slots;
326
323
  const clip_ids = entry.clip_ids;
@@ -4,9 +4,13 @@
4
4
  *
5
5
  * The list path is what the game uses wherever there is no state machine — buildings, critters and
6
6
  * the strategy map's groups — and {@link ClipListPlayer} is what plays it. This is the ECS half:
7
- * which entity has which model, and when the ids the renderer issued for it stopped meaning
7
+ * which clips each entity has, and when the ids the renderer issued for them stopped meaning
8
8
  * anything.
9
9
  *
10
+ * **The clips are the entity's {@link AnimationClips}.** An entity is driven while it carries both
11
+ * components, whoever put them there — a model `MeshSystem` loaded, or a rig built in code. New
12
+ * clips are a new component, which this system sees as the entity leaving and coming back.
13
+ *
10
14
  * **It is the CPU that plays the animation and the GPU that draws it.** Shade can advance a clip
11
15
  * itself, and this never asks it to — `AnimationClipFlags.Playing` is left clear and every audible
12
16
  * clip's time is written down each frame from the player's own clock. That is I-4: the pose
@@ -20,31 +24,31 @@
20
24
  export class AnimationSystem extends System<any> {
21
25
  /**
22
26
  * @param {GraphicsEngine} graphics
23
- * @param {MeshSystem} meshes
27
+ * @param {Scene} scene
24
28
  */
25
- constructor(graphics: GraphicsEngine, meshes: MeshSystem);
26
- dependencies: (typeof SGMesh | typeof Animation)[];
29
+ constructor(graphics: GraphicsEngine, scene: Scene);
30
+ dependencies: (typeof Animation | typeof AnimationClips)[];
27
31
  components_used: ResourceAccessSpecification<typeof Animation>[];
28
32
  /**
29
33
  * What an entity is playing, and where each of them is.
30
34
  *
31
35
  * One entry per clip in the component's list, in the list's own order. Empty for an entity this
32
- * system is not driving — one that has left, or one whose model has not arrived, which is the
33
- * same wait the clip durations are on.
36
+ * system is not driving — one that has left, or one whose clips arrived since the last update.
34
37
  *
35
38
  * @param {number} entity
36
39
  * @returns {ClipPlayback[]}
37
40
  */
38
41
  playbacks_of(entity: number): ClipPlayback[];
39
42
  /**
40
- * What the entity's model is playing, in the form the CPU pose evaluator takes: one entry per
41
- * clip the model carries, at the weight and the time the renderer has been given.
43
+ * What the entity is playing, in the form the CPU pose evaluator takes: one entry per clip of its
44
+ * {@link AnimationClips} that the list names, at the weight and the time the renderer has been
45
+ * given.
42
46
  *
43
47
  * **Only the clips the list names are here, because they are the only ones registered** (D37).
44
48
  * The GPU's accumulator marks a joint dirty for every bound clip that writes to it, weight and
45
49
  * all — so a bound clip at weight zero resolves the joints only it drives to zero rather than
46
50
  * leaving them at rest. The answer is not to hand the surplus to the evaluator so it agrees with
47
- * a mistake; it is not to bind them, and then a clip of the model nothing names moves nothing.
51
+ * a mistake; it is not to bind them, and then a clip nothing names moves nothing.
48
52
  *
49
53
  * The entries are this system's own and are rewritten by the next call, which is what keeps a
50
54
  * query on a per-frame path from allocating.
@@ -52,27 +56,32 @@ export class AnimationSystem extends System<any> {
52
56
  * @param {PosePlayback[]} target appended to
53
57
  * @param {number} entity
54
58
  * @returns {boolean} whether this system is driving the entity — `false` for one with no
55
- * {@link Animation}, and for one whose model has not arrived
59
+ * {@link Animation} or no {@link AnimationClips}, and for one whose clips arrived since the last
60
+ * update
56
61
  */
57
62
  write_pose_playbacks(target: PosePlayback[], entity: number): boolean;
58
63
  /**
64
+ * Only noted here: the clips are taken up by the next {@link update}. A link can happen anywhere
65
+ * the components are added — inside a model's spawn, for one `MeshSystem` loads — and binding is
66
+ * this system's work, on its own tick.
67
+ *
59
68
  * @param {Animation} component
60
- * @param {SGMesh} model
69
+ * @param {AnimationClips} clips
61
70
  * @param {number} entity
62
71
  */
63
- link(component: Animation, model: SGMesh, entity: number): void;
72
+ link(component: Animation, clips: AnimationClips, entity: number): void;
64
73
  /**
65
74
  * @param {Animation} component
66
- * @param {SGMesh} model
75
+ * @param {AnimationClips} clips
67
76
  * @param {number} entity
68
77
  */
69
- unlink(component: Animation, model: SGMesh, entity: number): void;
78
+ unlink(component: Animation, clips: AnimationClips, entity: number): void;
70
79
  shutdown(entityManager: any): Promise<void>;
71
80
  #private;
72
81
  }
73
82
  import { System } from "../ecs/System.js";
74
- import { SGMesh } from "../graphics/ecs/mesh-v2/aggregate/SGMesh.js";
75
83
  import { Animation } from "../ecs/animation/Animation.js";
84
+ import { AnimationClips } from "./animation/AnimationClips.js";
76
85
  import { ResourceAccessSpecification } from "../../core/model/ResourceAccessSpecification.js";
77
86
  import { PosePlayback } from "../../shade/renderer/animation/pose/PosePlayback.js";
78
87
  //# sourceMappingURL=AnimationSystem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnimationSystem.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/AnimationSystem.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAmBI;;;OAGG;IACH,0DAgBC;IAPG,mDAAuC;IAIvC,iEAEC;IAGL;;;;;;;;;OASG;IACH,qBAHW,MAAM,GACJ,cAAc,CAU1B;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,6BALW,YAAY,EAAE,UACd,MAAM,GACJ,OAAO,CAwCnB;IAED;;;;OAIG;IACH,gBAJW,SAAS,SACT,MAAM,UACN,MAAM,QAWhB;IAED;;;;OAIG;IACH,kBAJW,SAAS,SACT,MAAM,UACN,MAAM,QAUhB;IAED,4CAMC;;CAsKJ;uBAlWsB,kBAAkB;uBAClB,6CAA6C;0BAF1C,+BAA+B;4CAFb,iDAAiD;6BAChE,qDAAqD"}
1
+ {"version":3,"file":"AnimationSystem.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/AnimationSystem.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IAkBI;;;OAGG;IACH,oDAgBC;IAPG,2DAA+C;IAI/C,iEAEC;IAGL;;;;;;;;OAQG;IACH,qBAHW,MAAM,GACJ,cAAc,CAU1B;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,6BANW,YAAY,EAAE,UACd,MAAM,GACJ,OAAO,CAyCnB;IAED;;;;;;;;OAQG;IACH,gBAJW,SAAS,SACT,cAAc,UACd,MAAM,QAYhB;IAED;;;;OAIG;IACH,kBAJW,SAAS,SACT,cAAc,UACd,MAAM,QAUhB;IAED,4CAMC;;CAsKJ;uBAxWsB,kBAAkB;0BADf,+BAA+B;+BAE1B,+BAA+B;4CAJlB,iDAAiD;6BAChE,qDAAqD"}