@woosh/meep-engine 3.23.0 → 3.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (812) hide show
  1. package/editor/entity_world_bounds.d.ts +9 -3
  2. package/editor/entity_world_bounds.d.ts.map +1 -1
  3. package/editor/entity_world_bounds.js +61 -4
  4. package/package.json +1 -1
  5. package/src/core/binary/allocator/OffsetAllocator.d.ts +40 -2
  6. package/src/core/binary/allocator/OffsetAllocator.d.ts.map +1 -1
  7. package/src/core/binary/allocator/OffsetAllocator.js +124 -29
  8. package/src/core/collection/map/u32_index.d.ts +83 -0
  9. package/src/core/collection/map/u32_index.d.ts.map +1 -0
  10. package/src/core/collection/map/u32_index.js +247 -0
  11. package/src/engine/asset/loaders/GLTFSceneBundleAssetLoader.d.ts +2 -2
  12. package/src/engine/asset/loaders/GLTFSceneBundleAssetLoader.js +2 -2
  13. package/src/engine/asset/loaders/USDSceneBundleAssetLoader.d.ts +1 -2
  14. package/src/engine/asset/loaders/USDSceneBundleAssetLoader.d.ts.map +1 -1
  15. package/src/engine/asset/loaders/USDSceneBundleAssetLoader.js +4 -12
  16. package/src/engine/ecs/gpu/GPUStateAuthority.d.ts +55 -0
  17. package/src/engine/ecs/gpu/GPUStateAuthority.d.ts.map +1 -0
  18. package/src/engine/ecs/gpu/GPUStateAuthority.js +72 -0
  19. package/src/engine/ecs/gpu/GPUStateAuthorityFlags.d.ts +40 -0
  20. package/src/engine/ecs/gpu/GPUStateAuthorityFlags.d.ts.map +1 -0
  21. package/src/engine/ecs/gpu/GPUStateAuthorityFlags.js +79 -0
  22. package/src/engine/ecs/gpu/gpu_authority_assert_cpu.d.ts +18 -0
  23. package/src/engine/ecs/gpu/gpu_authority_assert_cpu.d.ts.map +1 -0
  24. package/src/engine/ecs/gpu/gpu_authority_assert_cpu.js +27 -0
  25. package/src/engine/ecs/gpu/gpu_authority_declare.d.ts +23 -0
  26. package/src/engine/ecs/gpu/gpu_authority_declare.d.ts.map +1 -0
  27. package/src/engine/ecs/gpu/gpu_authority_declare.js +39 -0
  28. package/src/engine/ecs/gpu/gpu_authority_grant.d.ts +15 -0
  29. package/src/engine/ecs/gpu/gpu_authority_grant.d.ts.map +1 -0
  30. package/src/engine/ecs/gpu/gpu_authority_grant.js +38 -0
  31. package/src/engine/ecs/gpu/gpu_authority_has.d.ts +18 -0
  32. package/src/engine/ecs/gpu/gpu_authority_has.d.ts.map +1 -0
  33. package/src/engine/ecs/gpu/gpu_authority_has.js +28 -0
  34. package/src/engine/ecs/gpu/gpu_authority_revoke.d.ts +24 -0
  35. package/src/engine/ecs/gpu/gpu_authority_revoke.d.ts.map +1 -0
  36. package/src/engine/ecs/gpu/gpu_authority_revoke.js +49 -0
  37. package/src/engine/ecs/ik/IKProblem.d.ts +14 -0
  38. package/src/engine/ecs/ik/IKProblem.d.ts.map +1 -1
  39. package/src/engine/ecs/ik/IKProblem.js +16 -0
  40. package/src/engine/ecs/ik/InverseKinematicsSystem.d.ts.map +1 -1
  41. package/src/engine/ecs/ik/InverseKinematicsSystem.js +19 -0
  42. package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.js +2 -2
  43. package/src/engine/ecs/ik/TwoBoneInverseKinematicsSolver.js +2 -2
  44. package/src/engine/ecs/ik/ik_bone_chain.d.ts +11 -2
  45. package/src/engine/ecs/ik/ik_bone_chain.d.ts.map +1 -1
  46. package/src/engine/ecs/ik/ik_bone_chain.js +47 -2
  47. package/src/engine/ecs/ik/ik_write_local_rotation.d.ts.map +1 -1
  48. package/src/engine/ecs/ik/ik_write_local_rotation.js +6 -0
  49. package/src/engine/ecs/speaker/VoiceSystem.d.ts.map +1 -1
  50. package/src/engine/ecs/speaker/VoiceSystem.js +6 -0
  51. package/src/engine/ecs/transform/T64WorldCache.d.ts +50 -0
  52. package/src/engine/ecs/transform/T64WorldCache.d.ts.map +1 -0
  53. package/src/engine/ecs/transform/T64WorldCache.js +139 -0
  54. package/src/engine/ecs/transform/t64_evaluate_world.d.ts +31 -0
  55. package/src/engine/ecs/transform/t64_evaluate_world.d.ts.map +1 -0
  56. package/src/engine/ecs/transform/t64_evaluate_world.js +126 -0
  57. package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.d.ts +8 -0
  58. package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.d.ts.map +1 -1
  59. package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.js +59 -30
  60. package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts.map +1 -1
  61. package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.js +4 -11
  62. package/src/engine/graphics/ecs/mesh-v2/SHADED_GEOMETRY_EVENT_CHANGE.d.ts +14 -0
  63. package/src/engine/graphics/ecs/mesh-v2/SHADED_GEOMETRY_EVENT_CHANGE.d.ts.map +1 -0
  64. package/src/engine/graphics/ecs/mesh-v2/SHADED_GEOMETRY_EVENT_CHANGE.js +13 -0
  65. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.d.ts +2 -14
  66. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.d.ts.map +1 -1
  67. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.js +11 -21
  68. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometryFlags.d.ts +1 -0
  69. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometryFlags.js +7 -0
  70. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshHighlightSystem.d.ts +5 -6
  71. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshHighlightSystem.d.ts.map +1 -1
  72. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshHighlightSystem.js +13 -11
  73. package/src/engine/graphics/ecs/mesh-v2/shaded_geometry_announce_change.d.ts +14 -0
  74. package/src/engine/graphics/ecs/mesh-v2/shaded_geometry_announce_change.d.ts.map +1 -0
  75. package/src/engine/graphics/ecs/mesh-v2/shaded_geometry_announce_change.js +21 -0
  76. package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts +1 -1
  77. package/src/engine/graphics/ecs/particles/ParticleEffect.js +1 -1
  78. package/src/engine/graphics/sh3/path_tracer/populate_path_traced_scene_from_ecd.d.ts +1 -1
  79. package/src/engine/graphics/sh3/path_tracer/populate_path_traced_scene_from_ecd.js +1 -1
  80. package/src/engine/graphics3/AnimationGraphSystem.js +3 -3
  81. package/src/engine/graphics3/AnimationSystem.js +2 -2
  82. package/src/engine/graphics3/DebugDrawSystem.d.ts.map +1 -1
  83. package/src/engine/graphics3/DebugDrawSystem.js +2 -4
  84. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +34 -27
  85. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  86. package/src/engine/graphics3/GPUParticleEmitterSystem.js +185 -85
  87. package/src/engine/graphics3/HighlightOutlineSystem.d.ts +4 -3
  88. package/src/engine/graphics3/HighlightOutlineSystem.d.ts.map +1 -1
  89. package/src/engine/graphics3/HighlightOutlineSystem.js +7 -9
  90. package/src/engine/graphics3/LightSystem.d.ts +7 -5
  91. package/src/engine/graphics3/LightSystem.d.ts.map +1 -1
  92. package/src/engine/graphics3/LightSystem.js +36 -22
  93. package/src/engine/graphics3/MeshSystem.d.ts +43 -39
  94. package/src/engine/graphics3/MeshSystem.d.ts.map +1 -1
  95. package/src/engine/graphics3/MeshSystem.js +324 -331
  96. package/src/engine/graphics3/PathDisplaySystem.d.ts.map +1 -1
  97. package/src/engine/graphics3/PathDisplaySystem.js +2 -4
  98. package/src/engine/graphics3/PickingQuery.d.ts +15 -21
  99. package/src/engine/graphics3/PickingQuery.d.ts.map +1 -1
  100. package/src/engine/graphics3/PickingQuery.js +21 -25
  101. package/src/engine/graphics3/PickingSystem.d.ts +60 -31
  102. package/src/engine/graphics3/PickingSystem.d.ts.map +1 -1
  103. package/src/engine/graphics3/PickingSystem.js +413 -273
  104. package/src/engine/graphics3/ShadedGeometrySystem.d.ts +22 -12
  105. package/src/engine/graphics3/ShadedGeometrySystem.d.ts.map +1 -1
  106. package/src/engine/graphics3/ShadedGeometrySystem.js +309 -174
  107. package/src/engine/graphics3/TerrainSystem.d.ts +19 -11
  108. package/src/engine/graphics3/TerrainSystem.d.ts.map +1 -1
  109. package/src/engine/graphics3/TerrainSystem.js +102 -53
  110. package/src/engine/graphics3/TooltipComponentSystem.d.ts.map +1 -1
  111. package/src/engine/graphics3/TooltipComponentSystem.js +2 -14
  112. package/src/engine/graphics3/Trail3DSystem.d.ts.map +1 -1
  113. package/src/engine/graphics3/Trail3DSystem.js +2 -4
  114. package/src/engine/graphics3/animation/ClipListPlayer.d.ts +4 -4
  115. package/src/engine/graphics3/animation/ClipListPlayer.d.ts.map +1 -1
  116. package/src/engine/graphics3/animation/ClipListPlayer.js +2 -2
  117. package/src/engine/graphics3/highlight/pack_highlight_table.d.ts +9 -11
  118. package/src/engine/graphics3/highlight/pack_highlight_table.d.ts.map +1 -1
  119. package/src/engine/graphics3/highlight/pack_highlight_table.js +11 -18
  120. package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts +4 -3
  121. package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts.map +1 -1
  122. package/src/engine/graphics3/pose/query_entity_node_world_pose.js +75 -74
  123. package/src/engine/graphics3/prefab/Prefab.d.ts +130 -0
  124. package/src/engine/graphics3/prefab/Prefab.d.ts.map +1 -0
  125. package/src/engine/graphics3/prefab/Prefab.js +162 -0
  126. package/src/engine/graphics3/prefab/PrefabInstance.d.ts +72 -0
  127. package/src/engine/graphics3/prefab/PrefabInstance.d.ts.map +1 -0
  128. package/src/engine/graphics3/prefab/PrefabInstance.js +80 -0
  129. package/src/engine/graphics3/prefab/prefab_compile.d.ts +23 -0
  130. package/src/engine/graphics3/prefab/prefab_compile.d.ts.map +1 -0
  131. package/src/engine/graphics3/prefab/prefab_compile.js +334 -0
  132. package/src/engine/graphics3/prefab/prefab_instantiate.d.ts +46 -0
  133. package/src/engine/graphics3/prefab/prefab_instantiate.d.ts.map +1 -0
  134. package/src/engine/graphics3/prefab/prefab_instantiate.js +230 -0
  135. package/src/engine/graphics3/prefab/prefab_normalize_skin_frames.d.ts +70 -0
  136. package/src/engine/graphics3/prefab/prefab_normalize_skin_frames.d.ts.map +1 -0
  137. package/src/engine/graphics3/prefab/prefab_normalize_skin_frames.js +210 -0
  138. package/src/engine/graphics3/prefab/prefab_place.d.ts +60 -0
  139. package/src/engine/graphics3/prefab/prefab_place.d.ts.map +1 -0
  140. package/src/engine/graphics3/prefab/prefab_place.js +130 -0
  141. package/src/engine/graphics3/prefab/prefab_skin_clip_scale_conflicts.d.ts +60 -0
  142. package/src/engine/graphics3/prefab/prefab_skin_clip_scale_conflicts.d.ts.map +1 -0
  143. package/src/engine/graphics3/prefab/prefab_skin_clip_scale_conflicts.js +128 -0
  144. package/src/engine/graphics3/prefab/prefab_skin_frame.d.ts +40 -0
  145. package/src/engine/graphics3/prefab/prefab_skin_frame.d.ts.map +1 -0
  146. package/src/engine/graphics3/prefab/prefab_skin_frame.js +116 -0
  147. package/src/engine/graphics3/preview/make_model_preview_scene.d.ts +16 -14
  148. package/src/engine/graphics3/preview/make_model_preview_scene.d.ts.map +1 -1
  149. package/src/engine/graphics3/preview/make_model_preview_scene.js +126 -154
  150. package/src/engine/graphics3/preview/make_model_thumbnail.js +1 -1
  151. package/src/engine/graphics3/register_instance_animation.d.ts +6 -6
  152. package/src/engine/graphics3/register_instance_animation.d.ts.map +1 -1
  153. package/src/engine/graphics3/register_instance_animation.js +4 -4
  154. package/src/engine/graphics3/shade_bundle_bounds.d.ts +2 -6
  155. package/src/engine/graphics3/shade_bundle_bounds.d.ts.map +1 -1
  156. package/src/engine/graphics3/shade_bundle_bounds.js +47 -55
  157. package/src/engine/graphics3/shader_picking_gather.d.ts +40 -0
  158. package/src/engine/graphics3/shader_picking_gather.d.ts.map +1 -0
  159. package/src/engine/graphics3/shader_picking_gather.js +120 -0
  160. package/src/engine/graphics3/terrain/pack_terrain_row_table.d.ts +11 -18
  161. package/src/engine/graphics3/terrain/pack_terrain_row_table.d.ts.map +1 -1
  162. package/src/engine/graphics3/terrain/pack_terrain_row_table.js +48 -53
  163. package/src/engine/physics/cloth/MEASUREMENTS.md +1050 -0
  164. package/src/engine/physics/cloth/PLAN.md +411 -49
  165. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +17 -2
  166. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
  167. package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +284 -256
  168. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts +52 -0
  169. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts.map +1 -0
  170. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.js +70 -0
  171. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts +12 -3
  172. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
  173. package/src/engine/physics/cloth/ecs/ClothDynamics.js +340 -331
  174. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +49 -37
  175. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  176. package/src/engine/physics/cloth/ecs/ClothInstance.js +50 -37
  177. package/src/engine/physics/cloth/ecs/ClothRig.d.ts +7 -8
  178. package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -1
  179. package/src/engine/physics/cloth/ecs/ClothRig.js +7 -8
  180. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts +84 -0
  181. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts.map +1 -0
  182. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.js +141 -0
  183. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +51 -81
  184. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  185. package/src/engine/physics/cloth/ecs/ClothSystem.js +81 -870
  186. package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts +48 -0
  187. package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts.map +1 -0
  188. package/src/engine/physics/cloth/ecs/ClothWorkerCore.js +107 -0
  189. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +286 -0
  190. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -0
  191. package/src/engine/physics/cloth/ecs/ClothWorld.js +1104 -0
  192. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +182 -0
  193. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -0
  194. package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +562 -0
  195. package/src/engine/physics/cloth/ecs/cloth.worker.d.ts +2 -0
  196. package/src/engine/physics/cloth/ecs/cloth.worker.d.ts.map +1 -0
  197. package/src/engine/physics/cloth/ecs/cloth.worker.js +12 -0
  198. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
  199. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +2 -1
  200. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +58 -0
  201. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
  202. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +341 -271
  203. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +20 -2
  204. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
  205. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +39 -15
  206. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +19 -23
  207. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
  208. package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +201 -199
  209. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
  210. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +8 -0
  211. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts +29 -0
  212. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts.map +1 -0
  213. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.js +78 -0
  214. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts +18 -34
  215. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -1
  216. package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +58 -115
  217. package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts +17 -0
  218. package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts.map +1 -0
  219. package/src/engine/physics/cloth/ecs/makeClothWorker.js +18 -0
  220. package/src/engine/physics/cloth/playground/README.md +84 -13
  221. package/src/engine/physics/cloth/playground/garment_build.d.ts +0 -1
  222. package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -1
  223. package/src/engine/physics/cloth/playground/garment_build.js +64 -58
  224. package/src/engine/physics/cloth/playground/garment_main.js +59 -33
  225. package/src/engine/physics/cloth/playground/wind.html +166 -0
  226. package/src/engine/physics/cloth/playground/wind_build.d.ts +81 -0
  227. package/src/engine/physics/cloth/playground/wind_build.d.ts.map +1 -0
  228. package/src/engine/physics/cloth/playground/wind_build.js +141 -0
  229. package/src/engine/physics/cloth/playground/wind_main.d.ts +2 -0
  230. package/src/engine/physics/cloth/playground/wind_main.d.ts.map +1 -0
  231. package/src/engine/physics/cloth/playground/wind_main.js +681 -0
  232. package/src/engine/physics/cloth/solver/ClothState.d.ts +134 -79
  233. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  234. package/src/engine/physics/cloth/solver/ClothState.js +273 -12
  235. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +33 -0
  236. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
  237. package/src/engine/physics/cloth/solver/cloth_solver_constants.js +34 -0
  238. package/src/engine/physics/cloth/solver/cloth_step.d.ts +21 -2
  239. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  240. package/src/engine/physics/cloth/solver/cloth_step.js +173 -4
  241. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +40 -0
  242. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -0
  243. package/src/engine/physics/cloth/solver/cloth_step_instance.js +284 -0
  244. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts +107 -0
  245. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts.map +1 -0
  246. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.js +263 -0
  247. package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +88 -0
  248. package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts.map +1 -0
  249. package/src/engine/physics/cloth/wind/AbstractClothWind.js +100 -0
  250. package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts +85 -0
  251. package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts.map +1 -0
  252. package/src/engine/physics/cloth/wind/ClothAmbientWind.js +182 -0
  253. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +79 -0
  254. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -0
  255. package/src/engine/physics/cloth/wind/ClothFluidWind.js +210 -0
  256. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +101 -0
  257. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -0
  258. package/src/engine/physics/cloth/wind/cloth_sample_air.js +290 -0
  259. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  260. package/src/shade/RENDERER_CONTRACT.md +85 -53
  261. package/src/shade/device/ShadeGPUCommandContext.d.ts +23 -0
  262. package/src/shade/device/ShadeGPUCommandContext.d.ts.map +1 -1
  263. package/src/shade/device/ShadeGPUCommandContext.js +36 -0
  264. package/src/shade/device/mock/texture_copy.d.ts.map +1 -1
  265. package/src/shade/device/mock/texture_copy.js +28 -0
  266. package/src/shade/playground/add_random_meshes.d.ts +4 -4
  267. package/src/shade/playground/add_random_meshes.d.ts.map +1 -1
  268. package/src/shade/playground/add_random_meshes.js +20 -16
  269. package/src/shade/playground/avboit/main.d.ts +1 -0
  270. package/src/shade/playground/avboit/main.d.ts.map +1 -1
  271. package/src/shade/playground/avboit/main.js +916 -875
  272. package/src/shade/playground/basis_textures/main.d.ts.map +1 -1
  273. package/src/shade/playground/basis_textures/main.js +22 -8
  274. package/src/shade/playground/basis_textures/texture_inventory.d.ts +2 -2
  275. package/src/shade/playground/basis_textures/texture_inventory.d.ts.map +1 -1
  276. package/src/shade/playground/basis_textures/texture_inventory.js +6 -7
  277. package/src/shade/playground/ground_seam/main.d.ts.map +1 -1
  278. package/src/shade/playground/ground_seam/main.js +13 -4
  279. package/src/shade/playground/ground_seam/make_ground.d.ts +13 -4
  280. package/src/shade/playground/ground_seam/make_ground.d.ts.map +1 -1
  281. package/src/shade/playground/ground_seam/make_ground.js +21 -16
  282. package/src/shade/playground/particle_ecs/bonfire_editor.js +3 -3
  283. package/src/shade/playground/particle_system/main.js +11 -10
  284. package/src/shade/playground/particle_system/particle_prototype.d.ts +15 -10
  285. package/src/shade/playground/particle_system/particle_prototype.d.ts.map +1 -1
  286. package/src/shade/playground/particle_system/particle_prototype.js +56 -15
  287. package/src/shade/playground/particle_system/particle_scene.d.ts +68 -28
  288. package/src/shade/playground/particle_system/particle_scene.d.ts.map +1 -1
  289. package/src/shade/playground/particle_system/particle_scene.js +149 -53
  290. package/src/shade/playground/readback_crossover/index.html +41 -0
  291. package/src/shade/playground/readback_crossover/main.d.ts +2 -0
  292. package/src/shade/playground/readback_crossover/main.d.ts.map +1 -0
  293. package/src/shade/playground/readback_crossover/main.js +372 -0
  294. package/src/shade/playground/skinned_blas_refit/README.md +11 -7
  295. package/src/shade/playground/skinned_blas_refit/add_floor.d.ts +13 -44
  296. package/src/shade/playground/skinned_blas_refit/add_floor.d.ts.map +1 -1
  297. package/src/shade/playground/skinned_blas_refit/add_floor.js +19 -59
  298. package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
  299. package/src/shade/playground/skinned_blas_refit/main.js +67 -58
  300. package/src/shade/playground/skinned_blas_refit/place_character.d.ts +40 -54
  301. package/src/shade/playground/skinned_blas_refit/place_character.d.ts.map +1 -1
  302. package/src/shade/playground/skinned_blas_refit/place_character.js +47 -74
  303. package/src/shade/playground/skinned_blas_refit/sweep_views.d.ts +3 -3
  304. package/src/shade/playground/skinned_blas_refit/sweep_views.d.ts.map +1 -1
  305. package/src/shade/playground/skinned_blas_refit/sweep_views.js +4 -3
  306. package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.d.ts +3 -3
  307. package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.d.ts.map +1 -1
  308. package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.js +11 -4
  309. package/src/shade/playground/skinned_blas_refit/verify_instance_bounds.d.ts.map +1 -1
  310. package/src/shade/playground/skinned_blas_refit/verify_instance_bounds.js +38 -9
  311. package/src/shade/playground/skinned_blas_refit/verify_skinned_blas_refit.d.ts +3 -3
  312. package/src/shade/playground/skinned_blas_refit/verify_skinned_blas_refit.d.ts.map +1 -1
  313. package/src/shade/playground/skinned_blas_refit/verify_skinned_blas_refit.js +9 -6
  314. package/src/shade/playground/skinned_blas_refit/verify_traversal_reachability.d.ts +3 -3
  315. package/src/shade/playground/skinned_blas_refit/verify_traversal_reachability.d.ts.map +1 -1
  316. package/src/shade/playground/skinned_blas_refit/verify_traversal_reachability.js +3 -3
  317. package/src/shade/playground/skinned_mesh_soup/README.md +6 -6
  318. package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
  319. package/src/shade/playground/skinned_mesh_soup/main.js +44 -102
  320. package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.d.ts +5 -5
  321. package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.d.ts.map +1 -1
  322. package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.js +42 -33
  323. package/src/shade/playground/sponza_path_trace/main.d.ts +1 -0
  324. package/src/shade/playground/sponza_path_trace/main.d.ts.map +1 -1
  325. package/src/shade/playground/sponza_path_trace/main.js +393 -363
  326. package/src/shade/playground/ssr_reprojection/main.js +11 -9
  327. package/src/shade/playground/ssr_reprojection/scene.d.ts +15 -4
  328. package/src/shade/playground/ssr_reprojection/scene.d.ts.map +1 -1
  329. package/src/shade/playground/ssr_reprojection/scene.js +32 -11
  330. package/src/shade/playground/ssr_variance/main.js +1 -1
  331. package/src/shade/playground/ssr_variance/scene.d.ts +10 -4
  332. package/src/shade/playground/ssr_variance/scene.d.ts.map +1 -1
  333. package/src/shade/playground/ssr_variance/scene.js +39 -15
  334. package/src/shade/playground/vgeo_runtime/README.md +94 -0
  335. package/src/shade/playground/vgeo_runtime/index.html +62 -0
  336. package/src/shade/playground/vgeo_runtime/main.d.ts +2 -0
  337. package/src/shade/playground/vgeo_runtime/main.d.ts.map +1 -0
  338. package/src/shade/playground/vgeo_runtime/main.js +399 -0
  339. package/src/shade/playground/vgeo_viewer/main.js +6 -2
  340. package/src/shade/playground/vgeo_viewer/sample_asset.js +1 -1
  341. package/src/shade/playground/volumetrics_froxel/main.d.ts.map +1 -1
  342. package/src/shade/playground/volumetrics_froxel/main.js +936 -922
  343. package/src/shade/renderer/GraphicsContext.d.ts +7 -0
  344. package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
  345. package/src/shade/renderer/GraphicsContext.js +11 -0
  346. package/src/shade/renderer/Renderer.d.ts +3 -2
  347. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  348. package/src/shade/renderer/Renderer.js +3 -2
  349. package/src/shade/renderer/animation/GPUAnimationManager.d.ts +39 -47
  350. package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
  351. package/src/shade/renderer/animation/GPUAnimationManager.js +319 -256
  352. package/src/shade/renderer/animation/ShadeAnimationChannel.d.ts +26 -22
  353. package/src/shade/renderer/animation/ShadeAnimationChannel.d.ts.map +1 -1
  354. package/src/shade/renderer/animation/ShadeAnimationChannel.js +28 -23
  355. package/src/shade/renderer/animation/ShadeAnimationClip.d.ts +14 -6
  356. package/src/shade/renderer/animation/ShadeAnimationClip.d.ts.map +1 -1
  357. package/src/shade/renderer/animation/ShadeAnimationClip.js +20 -8
  358. package/src/shade/renderer/animation/Skin.d.ts +19 -19
  359. package/src/shade/renderer/animation/Skin.d.ts.map +1 -1
  360. package/src/shade/renderer/animation/Skin.js +15 -13
  361. package/src/shade/renderer/animation/pose/pose_evaluate_local.d.ts +6 -5
  362. package/src/shade/renderer/animation/pose/pose_evaluate_local.d.ts.map +1 -1
  363. package/src/shade/renderer/animation/pose/pose_evaluate_local.js +9 -9
  364. package/src/shade/renderer/animation/skin_clip_scale_conflicts.d.ts +5 -59
  365. package/src/shade/renderer/animation/skin_clip_scale_conflicts.d.ts.map +1 -1
  366. package/src/shade/renderer/animation/skin_clip_scale_conflicts.js +8 -132
  367. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +65 -62
  368. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  369. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +148 -194
  370. package/src/shade/renderer/animation/skinning/SKINNING_BINDING_STRUCT.d.ts.map +1 -1
  371. package/src/shade/renderer/animation/skinning/SKINNING_BINDING_STRUCT.js +4 -7
  372. package/src/shade/renderer/animation/skinning/chunk_skin_blend_mesh_local.d.ts +2 -2
  373. package/src/shade/renderer/animation/skinning/chunk_skin_blend_mesh_local.js +2 -2
  374. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.d.ts +74 -0
  375. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.d.ts.map +1 -0
  376. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.js +240 -0
  377. package/src/shade/renderer/buffer/table/GPUDatabase.d.ts +14 -0
  378. package/src/shade/renderer/buffer/table/GPUDatabase.d.ts.map +1 -1
  379. package/src/shade/renderer/buffer/table/GPUDatabase.js +64 -6
  380. package/src/shade/renderer/buffer/table/GPUDatabaseReadback.d.ts +190 -0
  381. package/src/shade/renderer/buffer/table/GPUDatabaseReadback.d.ts.map +1 -0
  382. package/src/shade/renderer/buffer/table/GPUDatabaseReadback.js +1323 -0
  383. package/src/shade/renderer/buffer/table/GPUPageMetadata.d.ts +10 -0
  384. package/src/shade/renderer/buffer/table/GPUPageMetadata.d.ts.map +1 -1
  385. package/src/shade/renderer/buffer/table/GPUPageMetadata.js +12 -0
  386. package/src/shade/renderer/buffer/table/GPUReadbackStatus.d.ts +15 -0
  387. package/src/shade/renderer/buffer/table/GPUReadbackStatus.d.ts.map +1 -0
  388. package/src/shade/renderer/buffer/table/GPUReadbackStatus.js +34 -0
  389. package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts +75 -7
  390. package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts.map +1 -1
  391. package/src/shade/renderer/buffer/table/GPUTypedTable.js +518 -135
  392. package/src/shade/renderer/buffer/table/GPU_TABLE_GATHER_DESCRIPTOR_WORDS.d.ts +19 -0
  393. package/src/shade/renderer/buffer/table/GPU_TABLE_GATHER_DESCRIPTOR_WORDS.d.ts.map +1 -0
  394. package/src/shade/renderer/buffer/table/GPU_TABLE_GATHER_DESCRIPTOR_WORDS.js +18 -0
  395. package/src/shade/renderer/buffer/table/WordViews.d.ts +39 -0
  396. package/src/shade/renderer/buffer/table/WordViews.d.ts.map +1 -0
  397. package/src/shade/renderer/buffer/table/WordViews.js +62 -0
  398. package/src/shade/renderer/buffer/table/gpu_table_gather_shader.d.ts +27 -0
  399. package/src/shade/renderer/buffer/table/gpu_table_gather_shader.d.ts.map +1 -0
  400. package/src/shade/renderer/buffer/table/gpu_table_gather_shader.js +117 -0
  401. package/src/shade/renderer/buffer/table/serde/generate_record_writer.d.ts +121 -0
  402. package/src/shade/renderer/buffer/table/serde/generate_record_writer.d.ts.map +1 -0
  403. package/src/shade/renderer/buffer/table/serde/generate_record_writer.js +395 -0
  404. package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.d.ts.map +1 -1
  405. package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.js +70 -20
  406. package/src/shade/renderer/camera/Camera.d.ts +14 -0
  407. package/src/shade/renderer/camera/Camera.d.ts.map +1 -1
  408. package/src/shade/renderer/camera/Camera.js +7 -1
  409. package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.js +1 -1
  410. package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.d.ts.map +1 -1
  411. package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.js +16 -1
  412. package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
  413. package/src/shade/renderer/geometry/GPUGeometryManager.js +29 -9
  414. package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts +10 -0
  415. package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts.map +1 -1
  416. package/src/shade/renderer/geometry/GPUGeometryMetadata.js +13 -0
  417. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
  418. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +6 -5
  419. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts +3 -3
  420. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts.map +1 -1
  421. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.js +15 -11
  422. package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +46 -18
  423. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +70 -22
  424. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +97 -19
  425. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +12 -2
  426. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
  427. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +14 -3
  428. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts +2 -2
  429. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts.map +1 -1
  430. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.js +124 -6
  431. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts +22 -0
  432. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts.map +1 -0
  433. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.js +53 -0
  434. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts +8 -1
  435. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts.map +1 -1
  436. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.js +8 -1
  437. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts +16 -0
  438. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts.map +1 -0
  439. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.js +15 -0
  440. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +54 -0
  441. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts.map +1 -0
  442. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +53 -0
  443. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts +13 -2
  444. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts.map +1 -1
  445. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.js +14 -2
  446. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts +100 -0
  447. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts.map +1 -1
  448. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.js +113 -0
  449. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.d.ts.map +1 -1
  450. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.js +5 -0
  451. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts.map +1 -1
  452. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.js +108 -0
  453. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
  454. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +23 -0
  455. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
  456. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +40 -0
  457. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +228 -0
  458. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -0
  459. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +932 -0
  460. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +176 -0
  461. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -0
  462. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +425 -0
  463. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +241 -0
  464. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +574 -0
  465. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +120 -0
  466. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -0
  467. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +674 -0
  468. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts +287 -0
  469. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts.map +1 -0
  470. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.js +976 -0
  471. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +42 -0
  472. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -0
  473. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +96 -0
  474. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts +16 -0
  475. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts.map +1 -0
  476. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.js +15 -0
  477. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts +19 -0
  478. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -0
  479. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +83 -0
  480. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts +9 -0
  481. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts.map +1 -0
  482. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.js +8 -0
  483. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +19 -0
  484. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -0
  485. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +160 -0
  486. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts +3 -0
  487. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -0
  488. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +255 -0
  489. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts +3 -0
  490. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts.map +1 -0
  491. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.js +80 -0
  492. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts +3 -0
  493. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -0
  494. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +144 -0
  495. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts +3 -0
  496. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -0
  497. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +530 -0
  498. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +39 -0
  499. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -0
  500. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +54 -0
  501. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +41 -0
  502. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -0
  503. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +56 -0
  504. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts +49 -0
  505. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -0
  506. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +328 -0
  507. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts +10 -0
  508. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts.map +1 -0
  509. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.js +51 -0
  510. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts +13 -0
  511. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts.map +1 -0
  512. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.js +12 -0
  513. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts +17 -0
  514. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts.map +1 -0
  515. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.js +99 -0
  516. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts +9 -0
  517. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts.map +1 -0
  518. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.js +8 -0
  519. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts +7 -0
  520. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts.map +1 -0
  521. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +27 -0
  522. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts +14 -0
  523. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts.map +1 -0
  524. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.js +13 -0
  525. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts +7 -0
  526. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts.map +1 -0
  527. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.js +35 -0
  528. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts +9 -0
  529. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts.map +1 -0
  530. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.js +8 -0
  531. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts +15 -0
  532. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts.map +1 -0
  533. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.js +14 -0
  534. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts +7 -0
  535. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts.map +1 -0
  536. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.js +36 -0
  537. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts +10 -0
  538. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts.map +1 -0
  539. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.js +9 -0
  540. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +11 -0
  541. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts.map +1 -0
  542. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +54 -0
  543. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts +9 -0
  544. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts.map +1 -0
  545. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.js +8 -0
  546. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts +11 -0
  547. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts.map +1 -0
  548. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.js +10 -0
  549. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts +7 -0
  550. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts.map +1 -0
  551. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.js +30 -0
  552. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts +9 -0
  553. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts.map +1 -0
  554. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.js +8 -0
  555. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts +13 -0
  556. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts.map +1 -0
  557. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.js +12 -0
  558. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts +14 -0
  559. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts.map +1 -0
  560. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.js +13 -0
  561. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts +11 -0
  562. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts.map +1 -0
  563. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.js +61 -0
  564. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts +9 -0
  565. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts.map +1 -0
  566. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.js +8 -0
  567. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts +13 -0
  568. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts.map +1 -0
  569. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.js +12 -0
  570. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts +9 -0
  571. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts.map +1 -0
  572. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.js +8 -0
  573. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts +20 -0
  574. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts.map +1 -0
  575. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.js +19 -0
  576. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts +23 -0
  577. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts.map +1 -0
  578. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js +70 -0
  579. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts +18 -0
  580. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts.map +1 -0
  581. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.js +25 -0
  582. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts +35 -0
  583. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts.map +1 -0
  584. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.js +41 -0
  585. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts +32 -0
  586. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts.map +1 -0
  587. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js +138 -0
  588. package/src/shade/renderer/global_illumination/brick4/cpu/brick4_bake_for_scene.d.ts +1 -1
  589. package/src/shade/renderer/global_illumination/brick4/cpu/brick4_bake_for_scene.js +4 -4
  590. package/src/shade/renderer/global_illumination/brick4/cpu/brick4_generate_tree_from_scene.d.ts +1 -3
  591. package/src/shade/renderer/global_illumination/brick4/cpu/brick4_generate_tree_from_scene.d.ts.map +1 -1
  592. package/src/shade/renderer/global_illumination/brick4/cpu/brick4_generate_tree_from_scene.js +5 -4
  593. package/src/shade/renderer/global_illumination/brick4/gpu/bake/brick4_bake_basic.js +1 -1
  594. package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.d.ts.map +1 -1
  595. package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.js +1 -4
  596. package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.d.ts +8 -3
  597. package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.d.ts.map +1 -1
  598. package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.js +19 -14
  599. package/src/shade/renderer/global_illumination/lpv/placement/graph_generate_probe_locations.d.ts.map +1 -1
  600. package/src/shade/renderer/global_illumination/lpv/placement/graph_generate_probe_locations.js +9 -1
  601. package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.d.ts +3 -3
  602. package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.d.ts.map +1 -1
  603. package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.js +12 -5
  604. package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.js +1 -1
  605. package/src/shade/renderer/light/GPULightCollection.d.ts +29 -0
  606. package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
  607. package/src/shade/renderer/light/GPULightCollection.js +444 -329
  608. package/src/shade/renderer/light/LIGHT_DATABASE_SPEC.d.ts.map +1 -1
  609. package/src/shade/renderer/light/LIGHT_DATABASE_SPEC.js +7 -1
  610. package/src/shade/renderer/light/LightCollection.d.ts +29 -1
  611. package/src/shade/renderer/light/LightCollection.d.ts.map +1 -1
  612. package/src/shade/renderer/light/LightCollection.js +50 -1
  613. package/src/shade/renderer/light/make_sunlight.js +2 -2
  614. package/src/shade/renderer/light/model/Light.d.ts +29 -2
  615. package/src/shade/renderer/light/model/Light.d.ts.map +1 -1
  616. package/src/shade/renderer/light/model/Light.js +30 -2
  617. package/src/shade/renderer/light/model/io/light_record_directional.d.ts +3 -1
  618. package/src/shade/renderer/light/model/io/light_record_directional.d.ts.map +1 -1
  619. package/src/shade/renderer/light/model/io/light_record_directional.js +8 -5
  620. package/src/shade/renderer/light/model/io/light_record_point.d.ts +3 -1
  621. package/src/shade/renderer/light/model/io/light_record_point.d.ts.map +1 -1
  622. package/src/shade/renderer/light/model/io/light_record_point.js +5 -2
  623. package/src/shade/renderer/light/model/io/light_record_spot.d.ts +4 -1
  624. package/src/shade/renderer/light/model/io/light_record_spot.d.ts.map +1 -1
  625. package/src/shade/renderer/light/model/io/light_record_spot.js +10 -6
  626. package/src/shade/renderer/light/place_light.d.ts +16 -0
  627. package/src/shade/renderer/light/place_light.d.ts.map +1 -0
  628. package/src/shade/renderer/light/place_light.js +36 -0
  629. package/src/shade/renderer/light/shader_refresh_light_poses.d.ts +44 -0
  630. package/src/shade/renderer/light/shader_refresh_light_poses.d.ts.map +1 -0
  631. package/src/shade/renderer/light/shader_refresh_light_poses.js +154 -0
  632. package/src/shade/renderer/lightmap/GPULightMap.js +1 -1
  633. package/src/shade/renderer/lightmap/bake/raster/graph_draw_lightmap_viz_buffer.d.ts.map +1 -1
  634. package/src/shade/renderer/lightmap/bake/raster/graph_draw_lightmap_viz_buffer.js +12 -14
  635. package/src/shade/renderer/loader/SceneBundle.d.ts +53 -28
  636. package/src/shade/renderer/loader/SceneBundle.d.ts.map +1 -1
  637. package/src/shade/renderer/loader/SceneBundle.js +111 -56
  638. package/src/shade/renderer/loader/SceneNode.d.ts +81 -0
  639. package/src/shade/renderer/loader/SceneNode.d.ts.map +1 -0
  640. package/src/shade/renderer/loader/SceneNode.js +114 -0
  641. package/src/shade/renderer/loader/gltf/load_gltf.d.ts +3 -2
  642. package/src/shade/renderer/loader/gltf/load_gltf.d.ts.map +1 -1
  643. package/src/shade/renderer/loader/gltf/load_gltf.js +110 -142
  644. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  645. package/src/shade/renderer/loader/usd/UsdExtensionRegistry.d.ts +4 -4
  646. package/src/shade/renderer/loader/usd/UsdExtensionRegistry.d.ts.map +1 -1
  647. package/src/shade/renderer/loader/usd/UsdExtensionRegistry.js +2 -2
  648. package/src/shade/renderer/loader/usd/load_usd.d.ts +3 -2
  649. package/src/shade/renderer/loader/usd/load_usd.d.ts.map +1 -1
  650. package/src/shade/renderer/loader/usd/load_usd.js +4 -5
  651. package/src/shade/renderer/loader/usd/usd_build_scene.d.ts +3 -3
  652. package/src/shade/renderer/loader/usd/usd_build_scene.d.ts.map +1 -1
  653. package/src/shade/renderer/loader/usd/usd_build_scene.js +47 -55
  654. package/src/shade/renderer/material/GPUMaterialManager.js +1 -1
  655. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts +5 -4
  656. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
  657. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +8 -15
  658. package/src/shade/renderer/object_property/shader_refresh_all_mesh_bounds.d.ts +15 -13
  659. package/src/shade/renderer/object_property/shader_refresh_all_mesh_bounds.d.ts.map +1 -1
  660. package/src/shade/renderer/object_property/shader_refresh_all_mesh_bounds.js +40 -21
  661. package/src/shade/renderer/particles/DESIGN.md +53 -50
  662. package/src/shade/renderer/particles/GPUParticleSystem.d.ts +31 -17
  663. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  664. package/src/shade/renderer/particles/GPUParticleSystem.js +54 -91
  665. package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts +12 -11
  666. package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts.map +1 -1
  667. package/src/shade/renderer/particles/runtime/EmitterRegistry.js +12 -11
  668. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts +13 -19
  669. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts.map +1 -1
  670. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.js +19 -25
  671. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +34 -24
  672. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
  673. package/src/shade/renderer/particles/runtime/ParticleEmitter.js +53 -40
  674. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +1 -1
  675. package/src/shade/renderer/path_tracer/graph_path_trace_scene.js +1 -1
  676. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  677. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  678. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +9 -0
  679. package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.d.ts.map +1 -1
  680. package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.js +2 -1
  681. package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_scene_meshes_cull_and_classify_buckets.d.ts.map +1 -1
  682. package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_scene_meshes_cull_and_classify_buckets.js +5 -2
  683. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
  684. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +13 -2
  685. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +1 -1
  686. package/src/shade/renderer/rasterize/native/graph_rasterize_meshes_alpha_tested.js +1 -1
  687. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +1 -1
  688. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  689. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +12 -1
  690. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  691. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +10 -0
  692. package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.js +1 -1
  693. package/src/shade/renderer/scene/DynamicMesh.d.ts +13 -4
  694. package/src/shade/renderer/scene/DynamicMesh.d.ts.map +1 -1
  695. package/src/shade/renderer/scene/DynamicMesh.js +14 -4
  696. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +38 -18
  697. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
  698. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +112 -60
  699. package/src/shade/renderer/scene/GPUSceneContext.d.ts +69 -44
  700. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  701. package/src/shade/renderer/scene/GPUSceneContext.js +244 -525
  702. package/src/shade/renderer/scene/NODE3D_STRUCT.d.ts +5 -5
  703. package/src/shade/renderer/scene/NODE3D_STRUCT.js +5 -5
  704. package/src/shade/renderer/scene/Scene.d.ts +18 -60
  705. package/src/shade/renderer/scene/Scene.d.ts.map +1 -1
  706. package/src/shade/renderer/scene/Scene.js +53 -146
  707. package/src/shade/renderer/scene/bvh/StaticSceneBVH.d.ts +24 -3
  708. package/src/shade/renderer/scene/bvh/StaticSceneBVH.d.ts.map +1 -1
  709. package/src/shade/renderer/scene/bvh/StaticSceneBVH.js +53 -13
  710. package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.d.ts +5 -6
  711. package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.d.ts.map +1 -1
  712. package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.js +5 -6
  713. package/src/shade/renderer/scene/optimization/scene_optimize.d.ts +10 -2
  714. package/src/shade/renderer/scene/optimization/scene_optimize.d.ts.map +1 -1
  715. package/src/shade/renderer/scene/optimization/scene_optimize.js +266 -230
  716. package/src/shade/renderer/scene/rows/GPUEntityBoundsReadback.d.ts +53 -0
  717. package/src/shade/renderer/scene/rows/GPUEntityBoundsReadback.d.ts.map +1 -0
  718. package/src/shade/renderer/scene/rows/GPUEntityBoundsReadback.js +144 -0
  719. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +227 -0
  720. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -0
  721. package/src/shade/renderer/scene/rows/GPUSceneRows.js +1158 -0
  722. package/src/shade/renderer/scene/rows/place_primitive.d.ts +48 -0
  723. package/src/shade/renderer/scene/rows/place_primitive.d.ts.map +1 -0
  724. package/src/shade/renderer/scene/rows/place_primitive.js +98 -0
  725. package/src/shade/renderer/scene/serialization/deserialize_scene.d.ts +10 -8
  726. package/src/shade/renderer/scene/serialization/deserialize_scene.d.ts.map +1 -1
  727. package/src/shade/renderer/scene/serialization/deserialize_scene.js +24 -27
  728. package/src/shade/renderer/scene/serialization/serialize_scene.d.ts +9 -2
  729. package/src/shade/renderer/scene/serialization/serialize_scene.d.ts.map +1 -1
  730. package/src/shade/renderer/scene/serialization/serialize_scene.js +25 -4
  731. package/src/shade/renderer/scene/verify_gpu_tlas_build.js +2 -2
  732. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts +35 -0
  733. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts.map +1 -0
  734. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.js +91 -0
  735. package/src/shade/renderer/shader/chunk/light/DIRECTIONAL_LIGHT_STRUCT.d.ts.map +1 -1
  736. package/src/shade/renderer/shader/chunk/light/DIRECTIONAL_LIGHT_STRUCT.js +5 -0
  737. package/src/shade/renderer/shader/chunk/light/POINT_LIGHT_STRUCT.d.ts.map +1 -1
  738. package/src/shade/renderer/shader/chunk/light/POINT_LIGHT_STRUCT.js +5 -0
  739. package/src/shade/renderer/shader/chunk/light/SPOT_LIGHT_STRUCT.d.ts.map +1 -1
  740. package/src/shade/renderer/shader/chunk/light/SPOT_LIGHT_STRUCT.js +5 -0
  741. package/src/shade/renderer/shadow/map/DirectionalLightShadowmap.d.ts +39 -0
  742. package/src/shade/renderer/shadow/map/DirectionalLightShadowmap.d.ts.map +1 -1
  743. package/src/shade/renderer/shadow/map/DirectionalLightShadowmap.js +112 -64
  744. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts +7 -0
  745. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  746. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +1541 -1352
  747. package/src/shade/renderer/shadow/map/PointLightShadowmap.js +1 -1
  748. package/src/shade/renderer/shadow/map/SpotLightShadowmap.js +1 -1
  749. package/src/shade/renderer/shadow/map/TetrahedronPointLightShadowmap.js +1 -1
  750. package/src/shade/renderer/shadow/map/csm/CSM_CASTER_RANGE_STRUCT.d.ts +29 -0
  751. package/src/shade/renderer/shadow/map/csm/CSM_CASTER_RANGE_STRUCT.d.ts.map +1 -0
  752. package/src/shade/renderer/shadow/map/csm/CSM_CASTER_RANGE_STRUCT.js +43 -0
  753. package/src/shade/renderer/shadow/map/csm/SHADOWMAP_CSM_CASTER_RANGE_MARGIN_FRACTION.d.ts +13 -0
  754. package/src/shade/renderer/shadow/map/csm/SHADOWMAP_CSM_CASTER_RANGE_MARGIN_FRACTION.d.ts.map +1 -0
  755. package/src/shade/renderer/shadow/map/csm/SHADOWMAP_CSM_CASTER_RANGE_MARGIN_FRACTION.js +12 -0
  756. package/src/shade/renderer/shadow/map/csm/shader/shader_csm_caster_range.d.ts +49 -0
  757. package/src/shade/renderer/shadow/map/csm/shader/shader_csm_caster_range.d.ts.map +1 -0
  758. package/src/shade/renderer/shadow/map/csm/shader/shader_csm_caster_range.js +194 -0
  759. package/src/shade/renderer/shadow/map/csm_debug_draw_preview.js +1 -1
  760. package/src/shade/renderer/shadow/map/shadowmap_update_score.js +1 -1
  761. package/src/shade/renderer/shadow/ray/RTXShadows.js +1 -1
  762. package/src/shade/renderer/shadow/ray/staged/trace/graph_trace_rays.js +1 -1
  763. package/src/shade/renderer/shadow/sdf/cascade/CascadedSceneSDF.d.ts.map +1 -1
  764. package/src/shade/renderer/shadow/sdf/cascade/CascadedSceneSDF.js +3 -1
  765. package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.js +8 -8
  766. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
  767. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +4 -3
  768. package/src/engine/graphics3/instantiate_scene_bundle.d.ts +0 -54
  769. package/src/engine/graphics3/instantiate_scene_bundle.d.ts.map +0 -1
  770. package/src/engine/graphics3/instantiate_scene_bundle.js +0 -164
  771. package/src/engine/graphics3/shade_node_to_entity_composition.d.ts +0 -39
  772. package/src/engine/graphics3/shade_node_to_entity_composition.d.ts.map +0 -1
  773. package/src/engine/graphics3/shade_node_to_entity_composition.js +0 -88
  774. package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts +0 -35
  775. package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts.map +0 -1
  776. package/src/shade/renderer/animation/compute_skin_world_bounds.js +0 -146
  777. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts +0 -96
  778. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts.map +0 -1
  779. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.js +0 -531
  780. package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts +0 -20
  781. package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts.map +0 -1
  782. package/src/shade/renderer/animation/pose/pose_evaluate_world.js +0 -76
  783. package/src/shade/renderer/animation/skin_bind_transform.d.ts +0 -25
  784. package/src/shade/renderer/animation/skin_bind_transform.d.ts.map +0 -1
  785. package/src/shade/renderer/animation/skin_bind_transform.js +0 -33
  786. package/src/shade/renderer/animation/skin_frame_defect.d.ts +0 -34
  787. package/src/shade/renderer/animation/skin_frame_defect.d.ts.map +0 -1
  788. package/src/shade/renderer/animation/skin_frame_defect.js +0 -132
  789. package/src/shade/renderer/animation/skin_joint_matrix.d.ts +0 -24
  790. package/src/shade/renderer/animation/skin_joint_matrix.d.ts.map +0 -1
  791. package/src/shade/renderer/animation/skin_joint_matrix.js +0 -46
  792. package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts +0 -70
  793. package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts.map +0 -1
  794. package/src/shade/renderer/animation/skin_normalize_mesh_frame.js +0 -216
  795. package/src/shade/renderer/scene/InstanceBatch.d.ts +0 -92
  796. package/src/shade/renderer/scene/InstanceBatch.d.ts.map +0 -1
  797. package/src/shade/renderer/scene/InstanceBatch.js +0 -235
  798. package/src/shade/renderer/scene/Mesh.d.ts +0 -55
  799. package/src/shade/renderer/scene/Mesh.d.ts.map +0 -1
  800. package/src/shade/renderer/scene/Mesh.js +0 -168
  801. package/src/shade/renderer/scene/Node3D.d.ts +0 -140
  802. package/src/shade/renderer/scene/Node3D.d.ts.map +0 -1
  803. package/src/shade/renderer/scene/Node3D.js +0 -263
  804. package/src/shade/renderer/scene/SceneNodeBinding.d.ts +0 -52
  805. package/src/shade/renderer/scene/SceneNodeBinding.d.ts.map +0 -1
  806. package/src/shade/renderer/scene/SceneNodeBinding.js +0 -56
  807. package/src/shade/renderer/scene/SkinnedMesh.d.ts +0 -110
  808. package/src/shade/renderer/scene/SkinnedMesh.d.ts.map +0 -1
  809. package/src/shade/renderer/scene/SkinnedMesh.js +0 -170
  810. package/src/shade/renderer/scene/TransformAuthority.d.ts +0 -19
  811. package/src/shade/renderer/scene/TransformAuthority.d.ts.map +0 -1
  812. package/src/shade/renderer/scene/TransformAuthority.js +0 -33
@@ -0,0 +1,29 @@
1
+ /**
2
+ * First word of the `index`-th cloth's parameter block.
3
+ *
4
+ * @param {number} index
5
+ * @returns {number}
6
+ */
7
+ export function cloth_command_offset(index: number): number;
8
+ /**
9
+ * Size the command region for a ceiling on simultaneously stepped cloths. The
10
+ * region is allocated once at startup and cannot grow, which is what makes that
11
+ * ceiling a constructor argument rather than something discovered at runtime.
12
+ *
13
+ * @param {number} max_cloth_count
14
+ * @returns {number} `Float64` words
15
+ */
16
+ export function cloth_command_word_count(max_cloth_count: number): number;
17
+ /**
18
+ * Header words of the command region.
19
+ */
20
+ export type ClothCommand = number;
21
+ export namespace ClothCommand {
22
+ let CLOTH_COUNT: number;
23
+ }
24
+ /**
25
+ * Command words consumed before the first cloth's block.
26
+ * @type {number}
27
+ */
28
+ export const CLOTH_COMMAND_HEADER_WORDS: number;
29
+ //# sourceMappingURL=cloth_worker_protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloth_worker_protocol.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_worker_protocol.js"],"names":[],"mappings":"AAyDA;;;;;GAKG;AACH,4CAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;GAOG;AACH,0DAHW,MAAM,GACJ,MAAM,CAIlB;;;;2BAnCS,MAAM;;;;AAShB;;;GAGG;AACH,yCAFU,MAAM,CAE4B"}
@@ -0,0 +1,78 @@
1
+ import { CLOTH_STEP_PARAM_STRIDE } from "../solver/cloth_step_instance.js";
2
+
3
+ /**
4
+ * # The command region, and what is *not* in it
5
+ *
6
+ * Layout of the {@link WorkerSystem} command region used by
7
+ * {@link WorkerClothSystem}: a count, then one {@link ClothStepParam} block per
8
+ * cloth to step this tick.
9
+ *
10
+ * §12 asks for exactly this shape — "the command region names which instances
11
+ * are live this step, so sleeping (P5) and culled (§12.1) instances cost nothing
12
+ * but their absence from a list" — and for `ClothDynamics` to travel with it,
13
+ * "written every step … cheaper than tracking dirtiness, and it keeps
14
+ * `cloth.dynamics.slack = 0.2` working live". Both hold. What changed on the way
15
+ * to being built is that the per-cloth words are not a serialization of
16
+ * `ClothDynamics` but the **step's own parameter block** — `dt`, local gravity, a
17
+ * retention, a clamp — because a cloth's dynamics have already been mapped
18
+ * through `cloth_dynamics_map.js` by the time the step can use them, and mapping
19
+ * them on the far side would be a second copy of that mapping with no way to
20
+ * prove it agreed. `MEASUREMENTS.md` §38.
21
+ *
22
+ * The consequence is the useful one: the same block the worker reads is the
23
+ * block {@link ClothSystem} fills in a private scratch array, so the two systems
24
+ * do not agree on the numbers, they *share* them.
25
+ *
26
+ * ## What travels on the cold plane instead
27
+ *
28
+ * A cloth's `ClothState` — the particles, the rows, the duals, the collider
29
+ * table, the pair list. That is a `SharedArrayBuffer` per cloth, registered once
30
+ * when the cloth seeds and again whenever a re-seed replaces it, and nothing of
31
+ * it is ever copied: the worker cuts its own views over the same bytes
32
+ * (`ClothState.fromSharedDescriptor`). §12 asked for one buffer for the whole
33
+ * cloth world; `MEASUREMENTS.md` §39 is why it is one per cloth.
34
+ *
35
+ * @author Alex Goldring
36
+ * @copyright Company Named Limited (c) 2026
37
+ */
38
+
39
+ /**
40
+ * Header words of the command region.
41
+ *
42
+ * @readonly
43
+ * @enum {number}
44
+ */
45
+ export const ClothCommand = {
46
+ /**
47
+ * How many {@link ClothStepParam} blocks follow.
48
+ */
49
+ CLOTH_COUNT: 0
50
+ };
51
+
52
+ /**
53
+ * Command words consumed before the first cloth's block.
54
+ * @type {number}
55
+ */
56
+ export const CLOTH_COMMAND_HEADER_WORDS = 1;
57
+
58
+ /**
59
+ * First word of the `index`-th cloth's parameter block.
60
+ *
61
+ * @param {number} index
62
+ * @returns {number}
63
+ */
64
+ export function cloth_command_offset(index) {
65
+ return CLOTH_COMMAND_HEADER_WORDS + index * CLOTH_STEP_PARAM_STRIDE;
66
+ }
67
+
68
+ /**
69
+ * Size the command region for a ceiling on simultaneously stepped cloths. The
70
+ * region is allocated once at startup and cannot grow, which is what makes that
71
+ * ceiling a constructor argument rather than something discovered at runtime.
72
+ *
73
+ * @param {number} max_cloth_count
74
+ * @returns {number} `Float64` words
75
+ */
76
+ export function cloth_command_word_count(max_cloth_count) {
77
+ return cloth_command_offset(max_cloth_count);
78
+ }
@@ -1,49 +1,33 @@
1
1
  /**
2
2
  * # Putting the answer back onto a skinned model's joints — §11.2
3
3
  *
4
- * The same reconstruction the entity path uses, written onto `Node3D`s instead
5
- * of onto entities. **Cloth moves joints; it does not produce vertices** — the
6
- * mapping from a simulated joint to a render vertex already exists in this
7
- * engine and it is the skin, so the existing skinning pass does the rest,
8
- * including bounds refresh and BLAS refit that a bespoke vertex-deformation
9
- * path would have to reimplement.
4
+ * The same reconstruction the entity path uses, written onto the joint entities' offsets.
5
+ * **Cloth moves joints; it does not produce vertices** — the mapping from a simulated joint to a
6
+ * render vertex already exists in this engine and it is the skin, so the existing skinning pass
7
+ * does the rest, including bounds refresh and BLAS refit that a bespoke vertex-deformation path
8
+ * would have to reimplement.
10
9
  *
11
- * ## `transform_local` is the output, and `transform_global` is written too
10
+ * ## The offset is the output
12
11
  *
13
- * `transform_local` is a joint's own truth and the handle §11.2 names. It is
14
- * also *passive*: a `Node3D` does not track its components, and nothing
15
- * downstream sees a change until `updateMatrices` runs — which recurses into
16
- * every descendant, so calling it on the anchor would recompose the whole
17
- * character every fixed step to move a cape.
12
+ * A joint's `TransformAttachment` offset is its own truth and the handle §11.2 names: it is what
13
+ * the joint's row holds, and the GPU composes the world from it under the anchor's animated
14
+ * row. Writing it is announced on the joint, which is what carries it to the row — the model
15
+ * marks the row on that announcement — and what lets the attachment system recompose the CPU's
16
+ * copy of the world below it. That copy is composed under the anchor as the CPU knows it, which
17
+ * for a GPU-driven anchor is its rest pose: what the simulation may read about a cape joint is
18
+ * its offset, or an exact evaluation, never that composed world.
18
19
  *
19
- * So this pass composes the cloth subtree's `transform_global` itself, which
20
- * costs nothing because the pose is already in hand, and bumps each joint's
21
- * version through `needsUpdate` so the renderer uploads the row. Nothing above
22
- * the anchor is touched and nothing below the garment is walked.
23
- *
24
- * `transform_global` is derived, so writing it is only ever a shortcut for the
25
- * recomposition it saves — and it is a *correct* shortcut only because this
26
- * pass has the anchor's world pose and the whole chain under it. Anything that
27
- * moves the anchor without telling cloth invalidates it, which is the same
28
- * contract every consumer of a derived transform already has.
29
- *
30
- * ## What is not here
31
- *
32
- * No announcement, and no pruned boundary. The entity path has both because its
33
- * subtree is an entity hierarchy with other things hanging off it; a proxy's
34
- * joint list is closed by construction, and a socket parented to a cape joint
35
- * follows it through the ordinary node hierarchy.
20
+ * Nothing above the anchor is touched: the anchor is the character's, animated by its clips,
21
+ * and this pass hangs a cape from it.
36
22
  *
37
23
  * @author Alex Goldring
38
24
  * @copyright Company Named Limited (c) 2026
39
25
  */
40
26
  /**
41
- * Write one cloth's solved pose onto the joints it drives.
27
+ * Write the reconstructed pose onto the rig's joints.
42
28
  *
43
29
  * @param {ClothInstance} instance
44
- * @param {Transform64} anchor the anchor joint's **world** pose, evaluated by
45
- * the caller — see `ClothSystem` for why it is not read off the node
46
- * @returns {void}
30
+ * @param {EntityComponentDataset} ecd
47
31
  */
48
- export function cloth_write_back_rig(instance: ClothInstance, anchor: Transform64): void;
32
+ export function cloth_write_back_rig(instance: ClothInstance, ecd: EntityComponentDataset): void;
49
33
  //# sourceMappingURL=cloth_write_back_rig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloth_write_back_rig.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_write_back_rig.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;GAOG;AACH,oFAFa,IAAI,CA2DhB"}
1
+ {"version":3,"file":"cloth_write_back_rig.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_write_back_rig.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;GAKG;AACH,iGAqBC"}
@@ -1,115 +1,58 @@
1
- import { quat3_multiply } from "../../../../core/geom/3d/quaternion/quat3_multiply.js";
2
- import { v3_quaternion_apply } from "../../../../core/geom/vec3/v3_quaternion_apply.js";
3
- import {
4
- TRANSFORM64_ROTATION_OFFSET,
5
- TRANSFORM64_TRANSLATION_OFFSET
6
- } from "../../../ecs/transform/Transform64.js";
7
- import { cloth_reconstruct_pose } from "./cloth_reconstruct_pose.js";
8
- import { cloth_write_local_pose } from "./cloth_write_back.js";
9
-
10
- /**
11
- * # Putting the answer back onto a skinned model's joints — §11.2
12
- *
13
- * The same reconstruction the entity path uses, written onto `Node3D`s instead
14
- * of onto entities. **Cloth moves joints; it does not produce vertices** — the
15
- * mapping from a simulated joint to a render vertex already exists in this
16
- * engine and it is the skin, so the existing skinning pass does the rest,
17
- * including bounds refresh and BLAS refit that a bespoke vertex-deformation
18
- * path would have to reimplement.
19
- *
20
- * ## `transform_local` is the output, and `transform_global` is written too
21
- *
22
- * `transform_local` is a joint's own truth and the handle §11.2 names. It is
23
- * also *passive*: a `Node3D` does not track its components, and nothing
24
- * downstream sees a change until `updateMatrices` runs — which recurses into
25
- * every descendant, so calling it on the anchor would recompose the whole
26
- * character every fixed step to move a cape.
27
- *
28
- * So this pass composes the cloth subtree's `transform_global` itself, which
29
- * costs nothing because the pose is already in hand, and bumps each joint's
30
- * version through `needsUpdate` so the renderer uploads the row. Nothing above
31
- * the anchor is touched and nothing below the garment is walked.
32
- *
33
- * `transform_global` is derived, so writing it is only ever a shortcut for the
34
- * recomposition it saves — and it is a *correct* shortcut only because this
35
- * pass has the anchor's world pose and the whole chain under it. Anything that
36
- * moves the anchor without telling cloth invalidates it, which is the same
37
- * contract every consumer of a derived transform already has.
38
- *
39
- * ## What is not here
40
- *
41
- * No announcement, and no pruned boundary. The entity path has both because its
42
- * subtree is an entity hierarchy with other things hanging off it; a proxy's
43
- * joint list is closed by construction, and a socket parented to a cape joint
44
- * follows it through the ordinary node hierarchy.
45
- *
46
- * @author Alex Goldring
47
- * @copyright Company Named Limited (c) 2026
48
- */
49
-
50
- /**
51
- * Write one cloth's solved pose onto the joints it drives.
52
- *
53
- * @param {ClothInstance} instance
54
- * @param {Transform64} anchor the anchor joint's **world** pose, evaluated by
55
- * the caller — see `ClothSystem` for why it is not read off the node
56
- * @returns {void}
57
- */
58
- export function cloth_write_back_rig(instance, anchor) {
59
- cloth_reconstruct_pose(instance);
60
-
61
- const node_count = instance.node_count;
62
-
63
- const blended = instance.blended_position;
64
- const reconstructed = instance.blended_rotation;
65
-
66
- const ax = anchor[TRANSFORM64_TRANSLATION_OFFSET];
67
- const ay = anchor[TRANSFORM64_TRANSLATION_OFFSET + 1];
68
- const az = anchor[TRANSFORM64_TRANSLATION_OFFSET + 2];
69
-
70
- const aqx = anchor[TRANSFORM64_ROTATION_OFFSET];
71
- const aqy = anchor[TRANSFORM64_ROTATION_OFFSET + 1];
72
- const aqz = anchor[TRANSFORM64_ROTATION_OFFSET + 2];
73
- const aqw = anchor[TRANSFORM64_ROTATION_OFFSET + 3];
74
-
75
- const parent = instance.node_parent;
76
- const node_joint = instance.node_joint;
77
-
78
- for (let node = 1; node < node_count; node++) {
79
- const joint = node_joint[node];
80
-
81
- if (joint === undefined || joint === null) {
82
- continue;
83
- }
84
-
85
- cloth_write_local_pose(joint.transform_local, instance, node, parent[node]);
86
-
87
- const global = joint.transform_global;
88
-
89
- const n = node * 3;
90
-
91
- v3_quaternion_apply(
92
- global, TRANSFORM64_TRANSLATION_OFFSET,
93
- blended[n], blended[n + 1], blended[n + 2],
94
- aqx, aqy, aqz, aqw
95
- );
96
-
97
- global[TRANSFORM64_TRANSLATION_OFFSET] += ax;
98
- global[TRANSFORM64_TRANSLATION_OFFSET + 1] += ay;
99
- global[TRANSFORM64_TRANSLATION_OFFSET + 2] += az;
100
-
101
- quat3_multiply(
102
- global, TRANSFORM64_ROTATION_OFFSET,
103
- aqx, aqy, aqz, aqw,
104
- reconstructed[node * 4], reconstructed[node * 4 + 1],
105
- reconstructed[node * 4 + 2], reconstructed[node * 4 + 3]
106
- );
107
-
108
- global.updateMatrix();
109
-
110
- // The version is what the renderer compares against to decide whether
111
- // to upload the row, so a joint whose transform changed and whose
112
- // version did not is a joint that moved nowhere.
113
- joint.needsUpdate = true;
114
- }
115
- }
1
+ import { TRANSFORM_ATTACHMENT_EVENT_CHANGE } from "../../../ecs/transform-attachment/TRANSFORM_ATTACHMENT_EVENT_CHANGE.js";
2
+ import { cloth_reconstruct_pose } from "./cloth_reconstruct_pose.js";
3
+ import { cloth_write_local_pose } from "./cloth_write_back.js";
4
+
5
+ /**
6
+ * # Putting the answer back onto a skinned model's joints — §11.2
7
+ *
8
+ * The same reconstruction the entity path uses, written onto the joint entities' offsets.
9
+ * **Cloth moves joints; it does not produce vertices** — the mapping from a simulated joint to a
10
+ * render vertex already exists in this engine and it is the skin, so the existing skinning pass
11
+ * does the rest, including bounds refresh and BLAS refit that a bespoke vertex-deformation path
12
+ * would have to reimplement.
13
+ *
14
+ * ## The offset is the output
15
+ *
16
+ * A joint's `TransformAttachment` offset is its own truth and the handle §11.2 names: it is what
17
+ * the joint's row holds, and the GPU composes the world from it under the anchor's animated
18
+ * row. Writing it is announced on the joint, which is what carries it to the row — the model
19
+ * marks the row on that announcement — and what lets the attachment system recompose the CPU's
20
+ * copy of the world below it. That copy is composed under the anchor as the CPU knows it, which
21
+ * for a GPU-driven anchor is its rest pose: what the simulation may read about a cape joint is
22
+ * its offset, or an exact evaluation, never that composed world.
23
+ *
24
+ * Nothing above the anchor is touched: the anchor is the character's, animated by its clips,
25
+ * and this pass hangs a cape from it.
26
+ *
27
+ * @author Alex Goldring
28
+ * @copyright Company Named Limited (c) 2026
29
+ */
30
+
31
+ /**
32
+ * Write the reconstructed pose onto the rig's joints.
33
+ *
34
+ * @param {ClothInstance} instance
35
+ * @param {EntityComponentDataset} ecd
36
+ */
37
+ export function cloth_write_back_rig(instance, ecd) {
38
+ cloth_reconstruct_pose(instance);
39
+
40
+ const node_count = instance.node_count;
41
+
42
+ const parent = instance.node_parent;
43
+ const node_joint = instance.node_joint;
44
+ const node_attachment = instance.node_attachment;
45
+
46
+ for (let node = 1; node < node_count; node++) {
47
+ const joint = node_joint[node];
48
+ const attachment = node_attachment[node];
49
+
50
+ if (attachment === undefined || attachment === null || !ecd.entityExists(joint)) {
51
+ continue;
52
+ }
53
+
54
+ cloth_write_local_pose(attachment.transform, instance, node, parent[node]);
55
+
56
+ ecd.sendEvent(joint, TRANSFORM_ATTACHMENT_EVENT_CHANGE);
57
+ }
58
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Spawn the cloth solver worker.
3
+ *
4
+ * Isolated in its own module on purpose: `import.meta` is a syntax error under
5
+ * the CommonJS transform the test runner uses, so any module containing it
6
+ * cannot be imported by a spec — even transitively. Keeping the expression here
7
+ * lets {@link WorkerClothSystem} stay testable while application code gets a
8
+ * one-import default.
9
+ *
10
+ * The `new Worker(new URL(...), { type: "module" })` form is what webpack 5
11
+ * detects statically, so the worker is emitted as a real chunk with its full
12
+ * dependency graph rather than being assembled at runtime.
13
+ *
14
+ * @returns {Worker}
15
+ */
16
+ export function makeClothWorker(): Worker;
17
+ //# sourceMappingURL=makeClothWorker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeClothWorker.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/makeClothWorker.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,mCAFa,MAAM,CAIlB"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Spawn the cloth solver worker.
3
+ *
4
+ * Isolated in its own module on purpose: `import.meta` is a syntax error under
5
+ * the CommonJS transform the test runner uses, so any module containing it
6
+ * cannot be imported by a spec — even transitively. Keeping the expression here
7
+ * lets {@link WorkerClothSystem} stay testable while application code gets a
8
+ * one-import default.
9
+ *
10
+ * The `new Worker(new URL(...), { type: "module" })` form is what webpack 5
11
+ * detects statically, so the worker is emitted as a real chunk with its full
12
+ * dependency graph rather than being assembled at runtime.
13
+ *
14
+ * @returns {Worker}
15
+ */
16
+ export function makeClothWorker() {
17
+ return new Worker(new URL("./cloth.worker.js", import.meta.url), { type: "module" });
18
+ }
@@ -4,7 +4,7 @@
4
4
  npm run dev --workspace @woosh/meep-engine
5
5
  ```
6
6
 
7
- Four pages, one directory, one layer of the system each. (Vite takes the next
7
+ Five pages, one directory, one layer of the system each. (Vite takes the next
8
8
  free port if 5173 is busy — the terminal says which.)
9
9
 
10
10
  | | |
@@ -12,11 +12,17 @@ free port if 5173 is busy — the terminal says which.)
12
12
  | [`index.html`](./index.html) | **the solver, M0.** `cloth_step` over a `ClothState`, no ECS at all. |
13
13
  | [`rig.html`](./rig.html) | **the entity subtree, M1.** A real `EntityManager`, real entities, `ClothSystem` walking and writing back. |
14
14
  | [`collide.html`](./collide.html) | **collision, M2.** The solver again, with a packed collider table in the argument list. |
15
- | [`garment.html`](./garment.html) | **skinned garments, M3, and self-collision, M4.** A `Node3D` skeleton, a `Skin`, and a `Cloth` + `ClothRig` driving some of its joints. |
15
+ | [`garment.html`](./garment.html) | **skinned garments, M3, and self-collision, M4.** A skeleton of entities, a `Skin`, and a `Cloth` + `ClothRig` driving some of its joints. |
16
+ | [`wind.html`](./wind.html) | **wind, M6.** A banner hanging in a real `FluidSimulator`'s wake, reading it through `ClothFluidWind`. |
16
17
 
17
- Both are at
18
+ All are at
18
19
  `http://localhost:5173/src/engine/physics/cloth/playground/<page>`.
19
20
 
21
+ There is no M5 page, and that is deliberate: a `SharedArrayBuffer` needs a
22
+ cross-origin isolated page and `vite.config.mjs` sends no `COOP`/`COEP`
23
+ (`MEASUREMENTS.md` §44). The worker bridge is tested by
24
+ `SystemWorkerLoopback` instead, more precisely than a page could.
25
+
20
26
  ---
21
27
 
22
28
  # The solver page — `index.html`
@@ -260,14 +266,14 @@ does not fire in a hidden pane, so a driver calls `step_once` itself.
260
266
  ## What it is
261
267
 
262
268
  `rig.html` is a `Cloth` over an entity subtree; this is a `Cloth` + a `ClothRig`
263
- over a skinned model's **joints**. Every point on screen is a
264
- `Node3D.transform_global` — a joint of a `Skin`, not an entity — and it is where
265
- it is because the solver wrote its `transform_local` and this page composed the
266
- chain.
269
+ over a skinned model's **joints**. Every point on screen is a joint's
270
+ `Transform64` — an entity of the skeleton's prefab instance, named by a `Skin` —
271
+ and it is where it is because the solver wrote its attachment's local transform
272
+ and the attachment system composed the chain.
267
273
 
268
274
  `ClothSystem#models` takes a stub rather than a `MeshSystem` for the reason the
269
275
  field exists: a `MeshSystem` needs a graphics engine, a scene and a loader, and a
270
- garment's joints are a `Node3D` tree that needs none of the three. The stub
276
+ garment's joints are a prefab instance that needs none of the three. The stub
271
277
  answers exactly the one method the system calls.
272
278
 
273
279
  ## The garments
@@ -279,7 +285,7 @@ answers exactly the one method the system calls.
279
285
  - **coat tails** — three strips of nine in denim, which is the library entry that
280
286
  spends its two levers on particles rather than iterations.
281
287
  - **ponytail** — one chain of twelve off the neck. The rig path is the entity
282
- path with `Node3D`s in it, and a single chain is where that is most obviously
288
+ path over a skin's joints, and a single chain is where that is most obviously
283
289
  true.
284
290
  - **loincloth** — seven strips of five off the pelvis, and the one preset that
285
291
  spends most of its time against the leg colliders.
@@ -287,10 +293,10 @@ answers exactly the one method the system calls.
287
293
  ## The motion drives the character, and only the character
288
294
 
289
295
  The buttons write the **character's own bones**. The garment's joints are
290
- cloth's, and the seed says so: it claims `TransformAuthority.CPU` on every one of
291
- them, because a joint a clip drives is under GPU authority and its
292
- `transform_local` is not read by anything. Two writers of one row is the race the
293
- authority enum exists to prevent, and the claim is where a garment whose joints
296
+ cloth's, and the seed says so: it revokes the GPU's authority over the attachment
297
+ of every one of them, because a joint a clip drives is the GPU's and its local
298
+ transform is not read by anything. Two writers of one row is the race the
299
+ authority flags exist to prevent, and the claim is where a garment whose joints
294
300
  are *also* keyed shows up as an authoring error.
295
301
 
296
302
  **sprint** is §7 P7's own profile: a square wave in velocity, integrated. Written
@@ -337,3 +343,68 @@ has the numbers, because it cost an hour to diagnose the first time.
337
343
  step_once, draw, scene }`. `rebuild` returns a promise, because
338
344
  `EntityManager#startup` does and an entity created before it resolves is never
339
345
  linked.
346
+
347
+ ---
348
+
349
+ # The wind page — `wind.html`
350
+
351
+ ## What it is
352
+
353
+ §10's argument made watchable, and the word that matters is **simulated**. There
354
+ is no wind model on this page. There is a `FluidField`, a `FluidSimulator`, a
355
+ `GlobalFluidEffector` in its prevailing-wind regime, and a solid post standing in
356
+ the flow; the banner reads the result through exactly the `ClothFluidWind` and
357
+ `cloth_sample_air` a scene uses. The blue threads are the air on a horizontal
358
+ slice through the banner's waist, the red squares are the post.
359
+
360
+ The cloth is driven like the solver and collision pages — `cloth_step` in
361
+ process, no `EntityManager` — because what is being shown is the air rather than
362
+ the ECS wiring, and `ecs/cloth_wind.spec.js` covers that more precisely.
363
+
364
+ ## Three things to watch rather than read
365
+
366
+ - **Turn the flow to 90° on `ambient only`.** The banner goes limp at the same
367
+ wind speed: the *drag accel* readout falls from 43 m/s² to 0.08, and the mean
368
+ facing factor from 0.221 to 0.000. That is §10's normal-facing factor, and it
369
+ is the sharpest single result in M6.
370
+ - **Do the same on `fluid field + ambient`, and it does not go limp.** 0.216 at
371
+ 0°, 0.280 at 90°. A wake has velocity in every direction, so no orientation of
372
+ a banner is edge-on to one — which is something the simulation knows and a wind
373
+ zone could not have told it.
374
+ - **Take the post away.** The air at the banner goes from 6.0 m/s to 8.7. That
375
+ 31% deficit is the incompressible projection's answer to a solid standing in a
376
+ flow, and there is no authored falloff anywhere in it.
377
+
378
+ ## The readout
379
+
380
+ - **cloth step** — `cloth_wind_accelerate` plus `cloth_step`, against §17's 2 ms
381
+ bar. The wind's own share of it is about one per cent (`MEASUREMENTS.md` §49);
382
+ everything else on that bar is the solver.
383
+ - **fluid step** — the `FluidSimulator`, which at the default grid is several
384
+ times the cloth. It is on the page to be honest about where the frame goes: the
385
+ simulation is the expensive half and cloth is renting it.
386
+ - **air sample** and **sampled** — `cloth_sample_air`. Switch the source to
387
+ `ambient only` and watch it drop by a factor of twenty-five as "per particle"
388
+ becomes "once for the cloth". That is §10's "a cloth outside every fluid field's
389
+ bounds skips it entirely", and it is the reason the fallback is affordable.
390
+ - **drag accel, mean** — the external acceleration with gravity taken back out:
391
+ the facing factor as a number.
392
+
393
+ ## What it does not show
394
+
395
+ **A shedding street.** At the grids this page can afford the wake is a *steady*
396
+ velocity deficit — measured at 18, 26 and 34 cells across, with damping and
397
+ vorticity confinement at both ends of their range, the air behind the post varies
398
+ by under 0.03 m/s. The banner's free corner moves twelve times as far per step
399
+ with the post as without, and both of those are settled rather than fluttering.
400
+ That is the fluid solver's answer at this scale rather than the cloth's, and
401
+ `MEASUREMENTS.md` §51 records it so the page is not read as promising something
402
+ it does not do.
403
+
404
+ ## Notes
405
+
406
+ `globalThis.cloth_wind_playground` exposes `{ control, camera, rebuild,
407
+ step_once, refresh_post, cloth, tunnel, wind, air_centre, sampled_per_particle,
408
+ mean_drag, tripwire, timings }`. Changing `control.yaw` needs a `refresh_post()`
409
+ after it, because the post stands upstream along the flow and only moves when it
410
+ is asked to.
@@ -74,5 +74,4 @@ export type GarmentScene = {
74
74
  import { EntityComponentDataset } from "../../../ecs/EntityComponentDataset.js";
75
75
  import { ClothSystem } from "../ecs/ClothSystem.js";
76
76
  import { ClothColliderSystem } from "../ecs/ClothColliderSystem.js";
77
- import { Node3D } from "../../../../shade/renderer/scene/Node3D.js";
78
77
  //# sourceMappingURL=garment_build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"garment_build.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/playground/garment_build.js"],"names":[],"mappings":"AA2FA;;;GAGG;AACH,6FAHW,MAAM,GACJ,QAAQ,YAAY,CAAC,CA4EjC;AA8JD;;;;;;GAMG;AACH,8CAHW,MAAM,GACJ,IAAI,CA0BhB;AAhVD;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;;;IAqCE;;SAjDY,sBAAsB;WACtB,WAAW;eACX,mBAAmB;YACnB,MAAM;;;;UACN,MAAM;YACN,MAAM;;;;UACN,MAAM,EAAE;;;;WACR,MAAM,EAAE;;;;;UAER,MAAM,EAAE,EAAE;;uCA7Ce,wCAAwC;4BAcnD,uBAAuB;oCAHf,+BAA+B;uBAZ5C,4CAA4C"}
1
+ {"version":3,"file":"garment_build.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/playground/garment_build.js"],"names":[],"mappings":"AA8FA;;;GAGG;AACH,6FAHW,MAAM,GACJ,QAAQ,YAAY,CAAC,CA6EjC;AAiKD;;;;;;GAMG;AACH,8CAHW,MAAM,GACJ,IAAI,CAyBhB;AAnVD;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;;;IAqCE;;SAjDY,sBAAsB;WACtB,WAAW;eACX,mBAAmB;YACnB,MAAM;;;;;;;;;UAGN,QAAQ;;;;WACR,QAAQ;;;;;UAER,MAAM,EAAE,EAAE;;uCA7Ce,wCAAwC;4BAcnD,uBAAuB;oCAHf,+BAA+B"}