@woosh/meep-engine 3.40.0 → 3.42.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 (539) hide show
  1. package/build/bundle-worker-image-decoder.js +1 -1
  2. package/build/bundle-worker-terrain.js +1 -1
  3. package/editor/selection/editor_pick.d.ts.map +1 -1
  4. package/editor/selection/editor_pick.js +2 -1
  5. package/editor/tools/TransformToolV2.d.ts.map +1 -1
  6. package/editor/tools/TransformToolV2.js +7 -1
  7. package/editor/tools/engine/ToolEngine.d.ts.map +1 -1
  8. package/editor/tools/engine/ToolEngine.js +10 -0
  9. package/editor/tools/v2/TransformControls.d.ts.map +1 -1
  10. package/editor/tools/v2/TransformControls.js +7 -20
  11. package/editor/tools/v2/handle/gizmo_drag_plane.d.ts.map +1 -1
  12. package/editor/tools/v2/handle/gizmo_drag_plane.js +4 -0
  13. package/editor/view/ecs/EntityEditor.d.ts.map +1 -1
  14. package/editor/view/ecs/EntityEditor.js +3 -1
  15. package/editor/view/node-graph/NodeGraphView.d.ts.map +1 -1
  16. package/editor/view/node-graph/NodeGraphView.js +28 -12
  17. package/package.json +1 -1
  18. package/samples/engine/first-scene/index.html +4 -1
  19. package/samples/engine/first-scene/main.js +14 -9
  20. package/src/core/binary/utf8/utf8_decode.js +3 -3
  21. package/src/core/bvh2/binary/2/bvh32_query_user_data_ray.d.ts.map +1 -1
  22. package/src/core/bvh2/binary/2/bvh32_query_user_data_ray.js +112 -113
  23. package/src/core/bvh2/bvh3/ebvh_nodes_sort_sah_local4.js +2 -2
  24. package/src/core/cache/wtinylfu/benchmark/CacheWTinylfu.bench.md +14 -14
  25. package/src/core/collection/RingBuffer.d.ts.map +1 -1
  26. package/src/core/collection/RingBuffer.js +4 -0
  27. package/src/core/collection/array/array_contains_duplicates.d.ts.map +1 -1
  28. package/src/core/collection/array/array_contains_duplicates.js +2 -1
  29. package/src/core/collection/array/array_copy.d.ts.map +1 -1
  30. package/src/core/collection/array/array_copy.js +23 -0
  31. package/src/core/collection/array/typed/sparse_typed_array_hash.d.ts +2 -2
  32. package/src/core/collection/array/typed/sparse_typed_array_hash.d.ts.map +1 -1
  33. package/src/core/collection/array/typed/sparse_typed_array_hash.js +9 -8
  34. package/src/core/collection/array/typed/uint16_array_hash.d.ts +2 -2
  35. package/src/core/collection/array/typed/uint16_array_hash.js +4 -4
  36. package/src/core/collection/array/typed/uint8_array_hash.d.ts +2 -2
  37. package/src/core/collection/array/typed/uint8_array_hash.js +4 -4
  38. package/src/core/collection/array/weightedRandomFromArray.d.ts +1 -0
  39. package/src/core/collection/array/weightedRandomFromArray.d.ts.map +1 -1
  40. package/src/core/collection/array/weightedRandomFromArray.js +9 -1
  41. package/src/core/collection/heap/BinaryHeap.d.ts.map +1 -1
  42. package/src/core/collection/heap/BinaryHeap.js +4 -0
  43. package/src/core/collection/list/List.d.ts.map +1 -1
  44. package/src/core/collection/list/List.js +4 -2
  45. package/src/core/collection/set/ArraySet.js +1 -1
  46. package/src/core/collection/set/HashSet.d.ts +1 -1
  47. package/src/core/collection/set/HashSet.d.ts.map +1 -1
  48. package/src/core/collection/set/HashSet.js +4 -2
  49. package/src/core/debug/matchers/IsEqual.js +1 -1
  50. package/src/core/debug/matchers/IsIterableContaining.d.ts.map +1 -1
  51. package/src/core/debug/matchers/IsIterableContaining.js +61 -74
  52. package/src/core/events/signal/SignalBinding.js +101 -101
  53. package/src/core/function/extractFunctionBody.js +13 -13
  54. package/src/core/function/objectsEqual.d.ts.map +1 -1
  55. package/src/core/function/objectsEqual.js +15 -14
  56. package/src/core/geom/3d/frustum/frustum3_compute_closest_point.d.ts.map +1 -1
  57. package/src/core/geom/3d/frustum/frustum3_compute_closest_point.js +207 -172
  58. package/src/core/geom/3d/gjk/gjk_epa_penetration.d.ts.map +1 -1
  59. package/src/core/geom/3d/gjk/gjk_epa_penetration.js +5 -4
  60. package/src/core/geom/3d/line/line3_compute_segment_point_distance_eikonal.d.ts.map +1 -1
  61. package/src/core/geom/3d/line/line3_compute_segment_point_distance_eikonal.js +8 -2
  62. package/src/core/geom/3d/quaternion/swing_twist_clamp.d.ts +24 -0
  63. package/src/core/geom/3d/quaternion/swing_twist_clamp.d.ts.map +1 -0
  64. package/src/core/geom/3d/quaternion/swing_twist_clamp.js +62 -0
  65. package/src/core/geom/3d/quaternion/swing_twist_compose.d.ts +15 -0
  66. package/src/core/geom/3d/quaternion/swing_twist_compose.d.ts.map +1 -0
  67. package/src/core/geom/3d/quaternion/swing_twist_compose.js +36 -0
  68. package/src/core/geom/3d/quaternion/swing_twist_error.d.ts +39 -0
  69. package/src/core/geom/3d/quaternion/swing_twist_error.d.ts.map +1 -0
  70. package/src/core/geom/3d/quaternion/swing_twist_error.js +85 -0
  71. package/src/core/geom/3d/triangle/tri3_ray_intersection.d.ts +20 -0
  72. package/src/core/geom/3d/triangle/tri3_ray_intersection.d.ts.map +1 -1
  73. package/src/core/geom/3d/triangle/tri3_ray_intersection.js +182 -0
  74. package/src/core/geom/vec3/v3_rigid_align_paired_unit_vectors.d.ts +11 -6
  75. package/src/core/geom/vec3/v3_rigid_align_paired_unit_vectors.d.ts.map +1 -1
  76. package/src/core/geom/vec3/v3_rigid_align_paired_unit_vectors.js +27 -13
  77. package/src/core/math/linalg/eigen/matrix_symmetric_4x4_eigen.d.ts +25 -0
  78. package/src/core/math/linalg/eigen/matrix_symmetric_4x4_eigen.d.ts.map +1 -0
  79. package/src/core/math/linalg/eigen/matrix_symmetric_4x4_eigen.js +166 -0
  80. package/src/core/math/linalg/eigen/matrix_top_eigenvector_power_iteration.d.ts +5 -3
  81. package/src/core/math/linalg/eigen/matrix_top_eigenvector_power_iteration.d.ts.map +1 -1
  82. package/src/core/math/linalg/eigen/matrix_top_eigenvector_power_iteration.js +5 -3
  83. package/src/core/math/noise/curl_noise_3dt.d.ts.map +1 -1
  84. package/src/core/math/noise/curl_noise_3dt.js +20 -10
  85. package/src/core/math/noise/sdnoise.d.ts +16 -5
  86. package/src/core/math/noise/sdnoise.d.ts.map +1 -1
  87. package/src/core/math/noise/sdnoise.js +43 -9
  88. package/src/core/math/spline/spline3_hermite_nearest_point.d.ts +16 -1
  89. package/src/core/math/spline/spline3_hermite_nearest_point.d.ts.map +1 -1
  90. package/src/core/math/spline/spline3_hermite_nearest_point.js +44 -3
  91. package/src/engine/Engine.d.ts.map +1 -1
  92. package/src/engine/Engine.js +6 -2
  93. package/src/engine/animation/curve/AnimationCurve.d.ts +3 -0
  94. package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
  95. package/src/engine/animation/curve/AnimationCurve.js +6 -1
  96. package/src/engine/control/first-person/FirstPersonPlayerController.d.ts +9 -0
  97. package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -1
  98. package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts +26 -0
  99. package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts.map +1 -1
  100. package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.js +2 -0
  101. package/src/engine/control/first-person/abilities/AbilitySet.d.ts.map +1 -1
  102. package/src/engine/control/first-person/abilities/AbilitySet.js +9 -0
  103. package/src/engine/control/first-person/abilities/LedgeGrab.d.ts.map +1 -1
  104. package/src/engine/control/first-person/abilities/LedgeGrab.js +6 -0
  105. package/src/engine/control/first-person/abilities/Slide.d.ts.map +1 -1
  106. package/src/engine/control/first-person/abilities/Slide.js +1 -0
  107. package/src/engine/control/first-person/abilities/WallRun.d.ts +4 -1
  108. package/src/engine/control/first-person/abilities/WallRun.d.ts.map +1 -1
  109. package/src/engine/control/first-person/abilities/WallRun.js +13 -1
  110. package/src/engine/control/first-person/mastery/SlideInitiationTimingEvaluator.d.ts +1 -1
  111. package/src/engine/control/first-person/mastery/SlideInitiationTimingEvaluator.d.ts.map +1 -1
  112. package/src/engine/control/first-person/mastery/SlideInitiationTimingEvaluator.js +6 -5
  113. package/src/engine/control/first-person/mastery/StrideTimingJumpEvaluator.d.ts +3 -3
  114. package/src/engine/control/first-person/mastery/StrideTimingJumpEvaluator.d.ts.map +1 -1
  115. package/src/engine/control/first-person/mastery/StrideTimingJumpEvaluator.js +9 -8
  116. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts.map +1 -1
  117. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js +13 -4
  118. package/src/engine/ecs/EntityManager.d.ts +9 -1
  119. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  120. package/src/engine/ecs/EntityManager.js +44 -42
  121. package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.d.ts.map +1 -1
  122. package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js +2 -1
  123. package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.d.ts.map +1 -1
  124. package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.js +1 -0
  125. package/src/engine/ecs/fow/FogOfWarRevealerSystem.d.ts.map +1 -1
  126. package/src/engine/ecs/fow/FogOfWarRevealerSystem.js +3 -0
  127. package/src/engine/ecs/gpu/GPUStateAuthority.d.ts +20 -0
  128. package/src/engine/ecs/gpu/GPUStateAuthority.d.ts.map +1 -1
  129. package/src/engine/ecs/gpu/GPUStateAuthority.js +21 -0
  130. package/src/engine/ecs/gpu/GPU_AUTHORITY_EVENT_HOLD_CHANGE.d.ts +13 -0
  131. package/src/engine/ecs/gpu/GPU_AUTHORITY_EVENT_HOLD_CHANGE.d.ts.map +1 -0
  132. package/src/engine/ecs/gpu/GPU_AUTHORITY_EVENT_HOLD_CHANGE.js +12 -0
  133. package/src/engine/ecs/gpu/gpu_authority_grant.d.ts +6 -0
  134. package/src/engine/ecs/gpu/gpu_authority_grant.d.ts.map +1 -1
  135. package/src/engine/ecs/gpu/gpu_authority_grant.js +7 -1
  136. package/src/engine/ecs/gpu/gpu_authority_held.d.ts +14 -0
  137. package/src/engine/ecs/gpu/gpu_authority_held.d.ts.map +1 -0
  138. package/src/engine/ecs/gpu/gpu_authority_held.js +23 -0
  139. package/src/engine/ecs/gpu/gpu_authority_hold.d.ts +23 -0
  140. package/src/engine/ecs/gpu/gpu_authority_hold.d.ts.map +1 -0
  141. package/src/engine/ecs/gpu/gpu_authority_hold.js +41 -0
  142. package/src/engine/ecs/gpu/gpu_authority_unhold.d.ts +14 -0
  143. package/src/engine/ecs/gpu/gpu_authority_unhold.d.ts.map +1 -0
  144. package/src/engine/ecs/gpu/gpu_authority_unhold.js +32 -0
  145. package/src/engine/ecs/ik/IKGoal.d.ts +59 -0
  146. package/src/engine/ecs/ik/IKGoal.d.ts.map +1 -0
  147. package/src/engine/ecs/ik/IKGoal.js +83 -0
  148. package/src/engine/ecs/ik/IKGoalSystem.d.ts +75 -0
  149. package/src/engine/ecs/ik/IKGoalSystem.d.ts.map +1 -0
  150. package/src/engine/ecs/ik/IKGoalSystem.js +1456 -0
  151. package/src/engine/ecs/ik/PLAN.md +179 -0
  152. package/src/engine/ecs/parent/EntityNode.js +3 -3
  153. package/src/engine/ecs/speaker/VoiceSystem.d.ts +2 -2
  154. package/src/engine/ecs/speaker/VoiceSystem.d.ts.map +1 -1
  155. package/src/engine/ecs/speaker/VoiceSystem.js +4 -0
  156. package/src/engine/ecs/storage/BinaryBufferDeSerializer.js +5 -5
  157. package/src/engine/ecs/storage/BinaryBufferSerializer.d.ts.map +1 -1
  158. package/src/engine/ecs/storage/BinaryBufferSerializer.js +4 -5
  159. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts.map +1 -1
  160. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.js +3 -2
  161. package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +7 -3
  162. package/src/engine/ecs/storage/binary/object/BinaryObjectSerializationAdapter2.js +1 -1
  163. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.d.ts.map +1 -1
  164. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.js +8 -1
  165. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
  166. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +9 -2
  167. package/src/engine/ecs/system/orderSystemsByDeclaredAccess.d.ts +33 -0
  168. package/src/engine/ecs/system/orderSystemsByDeclaredAccess.d.ts.map +1 -0
  169. package/src/engine/ecs/system/orderSystemsByDeclaredAccess.js +282 -0
  170. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts.map +1 -1
  171. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.js +5 -2
  172. package/src/engine/ecs/terrain/ecs/layers/TerrainLayers.d.ts.map +1 -1
  173. package/src/engine/ecs/terrain/ecs/layers/TerrainLayers.js +3 -0
  174. package/src/engine/ecs/terrain/ecs/splat/SplatMapping.d.ts.map +1 -1
  175. package/src/engine/ecs/terrain/ecs/splat/SplatMapping.js +1 -0
  176. package/src/engine/ecs/terrain/overlay/TerrainOverlay.js +1 -1
  177. package/src/engine/ecs/terrain/tiles/TerrainTile.d.ts.map +1 -1
  178. package/src/engine/ecs/terrain/tiles/TerrainTile.js +13 -1
  179. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
  180. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +1 -0
  181. package/src/engine/ecs/transform/T64WorldCache.js +139 -139
  182. package/src/engine/ecs/transform/t64_evaluate_local.d.ts +25 -0
  183. package/src/engine/ecs/transform/t64_evaluate_local.d.ts.map +1 -0
  184. package/src/engine/ecs/transform/t64_evaluate_local.js +35 -0
  185. package/src/engine/ecs/transform/t64_evaluate_world.d.ts +5 -3
  186. package/src/engine/ecs/transform/t64_evaluate_world.d.ts.map +1 -1
  187. package/src/engine/ecs/transform/t64_evaluate_world.js +128 -126
  188. package/src/engine/graphics/ecs/light/LightSerializationAdapter.d.ts.map +1 -1
  189. package/src/engine/graphics/ecs/light/LightSerializationAdapter.js +13 -1
  190. package/src/engine/graphics/ecs/light/LightSerializationUpgrader_0_1.d.ts +5 -0
  191. package/src/engine/graphics/ecs/light/LightSerializationUpgrader_0_1.d.ts.map +1 -0
  192. package/src/engine/graphics/ecs/light/LightSerializationUpgrader_0_1.js +27 -0
  193. package/src/engine/graphics/ecs/water/Water.d.ts +11 -0
  194. package/src/engine/graphics/ecs/water/Water.d.ts.map +1 -1
  195. package/src/engine/graphics/ecs/water/Water.js +17 -0
  196. package/src/engine/graphics/ecs/water/WaterSerializationAdapter.d.ts.map +1 -1
  197. package/src/engine/graphics/ecs/water/WaterSerializationAdapter.js +3 -1
  198. package/src/engine/graphics/ecs/water/WaterSerializationUpgrader_4_5.d.ts +9 -0
  199. package/src/engine/graphics/ecs/water/WaterSerializationUpgrader_4_5.d.ts.map +1 -0
  200. package/src/engine/graphics/ecs/water/WaterSerializationUpgrader_4_5.js +24 -0
  201. package/src/engine/graphics/ecs/water/WaterWaves.d.ts +30 -9
  202. package/src/engine/graphics/ecs/water/WaterWaves.d.ts.map +1 -1
  203. package/src/engine/graphics/ecs/water/WaterWaves.js +41 -9
  204. package/src/engine/graphics/ecs/water/WaterWavesSerializationAdapter.d.ts.map +1 -1
  205. package/src/engine/graphics/ecs/water/WaterWavesSerializationAdapter.js +30 -26
  206. package/src/engine/graphics/ecs/water/WaterWavesSerializationUpgrader_0_1.d.ts +6 -0
  207. package/src/engine/graphics/ecs/water/WaterWavesSerializationUpgrader_0_1.d.ts.map +1 -0
  208. package/src/engine/graphics/ecs/water/WaterWavesSerializationUpgrader_0_1.js +22 -0
  209. package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_raycast.d.ts.map +1 -1
  210. package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_raycast.js +3 -5
  211. package/src/engine/graphics/texture/3d/scs3d_sample_linear3.d.ts +20 -0
  212. package/src/engine/graphics/texture/3d/scs3d_sample_linear3.d.ts.map +1 -1
  213. package/src/engine/graphics/texture/3d/scs3d_sample_linear3.js +36 -0
  214. package/src/engine/graphics3/AnimationGraphSystem.d.ts +2 -0
  215. package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
  216. package/src/engine/graphics3/AnimationGraphSystem.js +337 -329
  217. package/src/engine/graphics3/AnimationSystem.d.ts +2 -0
  218. package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
  219. package/src/engine/graphics3/AnimationSystem.js +360 -352
  220. package/src/engine/graphics3/WaterSystem.d.ts +12 -3
  221. package/src/engine/graphics3/WaterSystem.d.ts.map +1 -1
  222. package/src/engine/graphics3/WaterSystem.js +78 -46
  223. package/src/engine/input/devices/PointerDevice.d.ts.map +1 -1
  224. package/src/engine/input/devices/PointerDevice.js +29 -4
  225. package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts +1 -0
  226. package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts.map +1 -1
  227. package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.js +14 -3
  228. package/src/engine/physics/cloth/MEASUREMENTS.md +130 -0
  229. package/src/engine/physics/cloth/PLAN.md +16 -1
  230. package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts +5 -6
  231. package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts.map +1 -1
  232. package/src/engine/physics/cloth/ecs/ClothColliderSystem.js +5 -6
  233. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +4 -7
  234. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  235. package/src/engine/physics/cloth/ecs/ClothInstance.js +4 -7
  236. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +4 -3
  237. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  238. package/src/engine/physics/cloth/ecs/ClothSystem.js +4 -3
  239. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
  240. package/src/engine/physics/cloth/ecs/ClothWorld.js +10 -0
  241. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +24 -24
  242. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
  243. package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +46 -43
  244. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +1 -1
  245. package/src/engine/physics/cloth/ecs/cloth_write_back.js +1 -1
  246. package/src/engine/physics/constraint/solve_constraints.d.ts +0 -35
  247. package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
  248. package/src/engine/physics/constraint/solve_constraints.js +1 -83
  249. package/src/engine/physics/ecs/ContactProbe.d.ts +73 -0
  250. package/src/engine/physics/ecs/ContactProbe.d.ts.map +1 -0
  251. package/src/engine/physics/ecs/ContactProbe.js +103 -0
  252. package/src/engine/physics/ecs/ContactProbeSystem.d.ts +44 -0
  253. package/src/engine/physics/ecs/ContactProbeSystem.d.ts.map +1 -0
  254. package/src/engine/physics/ecs/ContactProbeSystem.js +397 -0
  255. package/src/engine/physics/fluid/ecs/FluidComponent.d.ts +1 -1
  256. package/src/engine/physics/fluid/ecs/FluidComponent.js +1 -1
  257. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  258. package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_velocity.d.ts.map +1 -1
  259. package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_velocity.js +12 -3
  260. package/src/engine/physics/fluid/solver/v3_grid_advect_sl_velocity.d.ts.map +1 -1
  261. package/src/engine/physics/fluid/solver/v3_grid_advect_sl_velocity.js +8 -2
  262. package/src/engine/physics/fluid/solver/v3_grid_sample_scalar_masked.d.ts +19 -0
  263. package/src/engine/physics/fluid/solver/v3_grid_sample_scalar_masked.d.ts.map +1 -1
  264. package/src/engine/physics/fluid/solver/v3_grid_sample_scalar_masked.js +41 -2
  265. package/src/engine/physics/fluid/solver/v3_mac_advect_scalar.d.ts.map +1 -1
  266. package/src/engine/physics/fluid/solver/v3_mac_advect_scalar.js +9 -3
  267. package/src/engine/physics/fluid/solver/v3_mac_advect_sl_velocity.d.ts.map +1 -1
  268. package/src/engine/physics/fluid/solver/v3_mac_advect_sl_velocity.js +26 -10
  269. package/src/engine/physics/inverse_kinematics/frame_fabrik/FrameFabrikProblem.d.ts +205 -0
  270. package/src/engine/physics/inverse_kinematics/frame_fabrik/FrameFabrikProblem.d.ts.map +1 -0
  271. package/src/engine/physics/inverse_kinematics/frame_fabrik/FrameFabrikProblem.js +245 -0
  272. package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_limit_from_joint.d.ts +21 -0
  273. package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_limit_from_joint.d.ts.map +1 -0
  274. package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_limit_from_joint.js +63 -0
  275. package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.d.ts +33 -0
  276. package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.d.ts.map +1 -0
  277. package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.js +874 -0
  278. package/src/engine/physics/inverse_kinematics/joint_hinge_mid_axis.d.ts +27 -0
  279. package/src/engine/physics/inverse_kinematics/joint_hinge_mid_axis.d.ts.map +1 -0
  280. package/src/engine/physics/inverse_kinematics/joint_hinge_mid_axis.js +77 -0
  281. package/src/engine/physics/inverse_kinematics/two_bone_path_solve.d.ts +36 -0
  282. package/src/engine/physics/inverse_kinematics/two_bone_path_solve.d.ts.map +1 -0
  283. package/src/engine/physics/inverse_kinematics/two_bone_path_solve.js +97 -0
  284. package/src/engine/physics/inverse_kinematics/two_joint_ik.d.ts +33 -11
  285. package/src/engine/physics/inverse_kinematics/two_joint_ik.d.ts.map +1 -1
  286. package/src/engine/physics/inverse_kinematics/two_joint_ik.js +158 -67
  287. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.d.ts +3 -6
  288. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.d.ts.map +1 -1
  289. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.js +22 -9
  290. package/src/engine/ui/DraggableAspect.d.ts +5 -1
  291. package/src/engine/ui/DraggableAspect.d.ts.map +1 -1
  292. package/src/engine/ui/DraggableAspect.js +61 -4
  293. package/src/format/image/avif/heif/ItemProperty.d.ts +1 -1
  294. package/src/format/image/avif/heif/ItemProperty.js +1 -1
  295. package/src/format/image/png/chunk/png_chunk_decode_iTXt.d.ts.map +1 -1
  296. package/src/format/image/png/chunk/png_chunk_decode_iTXt.js +17 -6
  297. package/src/shade/device/mock/SoftwareGPUDevice.d.ts +2 -4
  298. package/src/shade/device/mock/SoftwareGPUDevice.d.ts.map +1 -1
  299. package/src/shade/device/mock/SoftwareGPUDevice.js +20 -13
  300. package/src/shade/playground/skinned_blas_refit/sweep_views.d.ts.map +1 -1
  301. package/src/shade/playground/skinned_blas_refit/sweep_views.js +2 -1
  302. package/src/shade/playground/water_refraction/README.md +10 -11
  303. package/src/shade/playground/water_refraction/main.js +9 -8
  304. package/src/shade/playground/water_refraction/world.js +1 -1
  305. package/src/shade/playground/water_surface/README.md +43 -0
  306. package/src/shade/playground/water_surface/index.html +30 -0
  307. package/src/shade/playground/water_surface/main.d.ts +2 -0
  308. package/src/shade/playground/water_surface/main.d.ts.map +1 -0
  309. package/src/shade/playground/water_surface/main.js +154 -0
  310. package/src/shade/playground/water_surface/world.d.ts +44 -0
  311. package/src/shade/playground/water_surface/world.d.ts.map +1 -0
  312. package/src/shade/playground/water_surface/world.js +160 -0
  313. package/src/shade/renderer/animation/ANIMATION_TRACK_BINDING_STRUCT.d.ts.map +1 -1
  314. package/src/shade/renderer/animation/ANIMATION_TRACK_BINDING_STRUCT.js +10 -1
  315. package/src/shade/renderer/animation/GPUAnimationManager.d.ts +10 -4
  316. package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
  317. package/src/shade/renderer/animation/GPUAnimationManager.js +251 -23
  318. package/src/shade/renderer/animation/POSE_ACCUMULATOR_LAYOUT.d.ts +12 -4
  319. package/src/shade/renderer/animation/POSE_ACCUMULATOR_LAYOUT.d.ts.map +1 -1
  320. package/src/shade/renderer/animation/POSE_ACCUMULATOR_LAYOUT.js +12 -4
  321. package/src/shade/renderer/animation/chunk_pose_accumulator.d.ts.map +1 -1
  322. package/src/shade/renderer/animation/chunk_pose_accumulator.js +14 -1
  323. package/src/shade/renderer/animation/pose/PoseChannelIndex.d.ts +78 -0
  324. package/src/shade/renderer/animation/pose/PoseChannelIndex.d.ts.map +1 -0
  325. package/src/shade/renderer/animation/pose/PoseChannelIndex.js +274 -0
  326. package/src/shade/renderer/animation/pose/PosePlayback.d.ts +40 -3
  327. package/src/shade/renderer/animation/pose/PosePlayback.d.ts.map +1 -1
  328. package/src/shade/renderer/animation/pose/PosePlayback.js +77 -3
  329. package/src/shade/renderer/animation/pose/pose_evaluate_local.d.ts +21 -3
  330. package/src/shade/renderer/animation/pose/pose_evaluate_local.d.ts.map +1 -1
  331. package/src/shade/renderer/animation/pose/pose_evaluate_local.js +79 -11
  332. package/src/shade/renderer/animation/shader_animation_apply.js +1 -1
  333. package/src/shade/renderer/animation/shader_animation_pose_resolve.d.ts +3 -2
  334. package/src/shade/renderer/animation/shader_animation_pose_resolve.d.ts.map +1 -1
  335. package/src/shade/renderer/animation/shader_animation_pose_resolve.js +187 -176
  336. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  337. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +5 -0
  338. package/src/shade/renderer/binding/BufferBinding.js +2 -2
  339. package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts.map +1 -1
  340. package/src/shade/renderer/buffer/table/GPUTypedTable.js +5 -3
  341. package/src/shade/renderer/buffer/table/GPUTypedTableDescriptor.d.ts +10 -3
  342. package/src/shade/renderer/buffer/table/GPUTypedTableDescriptor.d.ts.map +1 -1
  343. package/src/shade/renderer/buffer/table/GPUTypedTableDescriptor.js +17 -9
  344. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.d.ts +3 -0
  345. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.d.ts.map +1 -1
  346. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.js +16 -0
  347. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.d.ts +2 -0
  348. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.d.ts.map +1 -1
  349. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.js +11 -0
  350. package/src/shade/renderer/geometry/meshlet/build/meshoptimizer/geometry_to_meshlets_meshoptimizer.d.ts +1 -1
  351. package/src/shade/renderer/geometry/meshlet/build/meshoptimizer/geometry_to_meshlets_meshoptimizer.d.ts.map +1 -1
  352. package/src/shade/renderer/geometry/meshlet/build/meshoptimizer/geometry_to_meshlets_meshoptimizer.js +9 -3
  353. package/src/shade/renderer/geometry/util/geometry_simplify_redundant_topology.d.ts.map +1 -1
  354. package/src/shade/renderer/geometry/util/geometry_simplify_redundant_topology.js +2 -2
  355. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
  356. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +85 -0
  357. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  358. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +12 -6
  359. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
  360. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +7 -0
  361. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts.map +1 -1
  362. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.js +3 -1
  363. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  364. package/src/shade/renderer/object_property/chunk_write_object_property.d.ts +3 -1
  365. package/src/shade/renderer/object_property/chunk_write_object_property.d.ts.map +1 -1
  366. package/src/shade/renderer/object_property/chunk_write_object_property.js +5 -2
  367. package/src/shade/renderer/object_property/chunk_write_object_property_node3d.d.ts +4 -0
  368. package/src/shade/renderer/object_property/chunk_write_object_property_node3d.d.ts.map +1 -1
  369. package/src/shade/renderer/object_property/chunk_write_object_property_node3d.js +6 -1
  370. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  371. package/src/shade/renderer/scene/SCENE_DATABASE_SPEC.js +2 -1
  372. package/src/shade/renderer/scene/optimization/geometry/geometry_deduplicate.d.ts +1 -1
  373. package/src/shade/renderer/scene/optimization/geometry/geometry_deduplicate.d.ts.map +1 -1
  374. package/src/shade/renderer/scene/optimization/geometry/geometry_deduplicate.js +135 -73
  375. package/src/shade/renderer/scene/optimization/geometry/internal/cover_greedy.d.ts +7 -0
  376. package/src/shade/renderer/scene/optimization/geometry/internal/cover_greedy.d.ts.map +1 -1
  377. package/src/shade/renderer/scene/optimization/geometry/internal/cover_greedy.js +29 -1
  378. package/src/shade/renderer/scene/optimization/geometry/internal/face_neighbourhood_hash.d.ts +19 -0
  379. package/src/shade/renderer/scene/optimization/geometry/internal/face_neighbourhood_hash.d.ts.map +1 -0
  380. package/src/shade/renderer/scene/optimization/geometry/internal/face_neighbourhood_hash.js +167 -0
  381. package/src/shade/renderer/scene/optimization/geometry/internal/neighbourhood_anchor_index.d.ts +25 -0
  382. package/src/shade/renderer/scene/optimization/geometry/internal/neighbourhood_anchor_index.d.ts.map +1 -0
  383. package/src/shade/renderer/scene/optimization/geometry/internal/neighbourhood_anchor_index.js +124 -0
  384. package/src/shade/renderer/scene/optimization/geometry/internal/seed_correspondence_from_face_pair.d.ts +19 -0
  385. package/src/shade/renderer/scene/optimization/geometry/internal/seed_correspondence_from_face_pair.d.ts.map +1 -0
  386. package/src/shade/renderer/scene/optimization/geometry/internal/seed_correspondence_from_face_pair.js +48 -0
  387. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +17 -1
  388. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
  389. package/src/shade/renderer/scene/rows/GPUSceneRows.js +29 -3
  390. package/src/shade/renderer/shader/chunk/math/fft/chunk_fft128_inverse.d.ts +13 -0
  391. package/src/shade/renderer/shader/chunk/math/fft/chunk_fft128_inverse.d.ts.map +1 -0
  392. package/src/shade/renderer/shader/chunk/math/fft/chunk_fft128_inverse.js +42 -0
  393. package/src/shade/renderer/shader/chunk/math/fft/chunk_fft128x4_inverse_workgroup.d.ts +15 -0
  394. package/src/shade/renderer/shader/chunk/math/fft/chunk_fft128x4_inverse_workgroup.d.ts.map +1 -0
  395. package/src/shade/renderer/shader/chunk/math/fft/chunk_fft128x4_inverse_workgroup.js +39 -0
  396. package/src/shade/renderer/shader/resource/ShaderResourceSetDescriptor.d.ts.map +1 -1
  397. package/src/shade/renderer/shader/resource/ShaderResourceSetDescriptor.js +2 -0
  398. package/src/shade/renderer/water/GPUWaterRenderer.d.ts +15 -0
  399. package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
  400. package/src/shade/renderer/water/GPUWaterRenderer.js +110 -30
  401. package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts +16 -8
  402. package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts.map +1 -1
  403. package/src/shade/renderer/water/medium/GPUWaterBodies.js +31 -26
  404. package/src/shade/renderer/water/medium/shader_water_meshlets.d.ts +0 -1
  405. package/src/shade/renderer/water/medium/shader_water_meshlets.d.ts.map +1 -1
  406. package/src/shade/renderer/water/medium/shader_water_meshlets.js +1 -39
  407. package/src/shade/renderer/water/shader_water.d.ts +0 -1
  408. package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
  409. package/src/shade/renderer/water/shader_water.js +201 -72
  410. package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts +70 -0
  411. package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts.map +1 -0
  412. package/src/shade/renderer/water/surface/GPUWaterSurface.js +199 -0
  413. package/src/shade/renderer/water/surface/WATER_WAVE_RECORD_STRUCT.d.ts +5 -2
  414. package/src/shade/renderer/water/surface/WATER_WAVE_RECORD_STRUCT.d.ts.map +1 -1
  415. package/src/shade/renderer/water/surface/WATER_WAVE_RECORD_STRUCT.js +32 -12
  416. package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +22 -0
  417. package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts.map +1 -0
  418. package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +217 -0
  419. package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts +65 -11
  420. package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts.map +1 -1
  421. package/src/shade/renderer/water/surface/graph_water_tessellation.js +163 -28
  422. package/src/shade/renderer/water/surface/lod/WATER_LOD.d.ts +51 -0
  423. package/src/shade/renderer/water/surface/lod/WATER_LOD.d.ts.map +1 -0
  424. package/src/shade/renderer/water/surface/lod/WATER_LOD.js +95 -0
  425. package/src/shade/renderer/water/surface/lod/chunk_water_lod.d.ts +10 -0
  426. package/src/shade/renderer/water/surface/lod/chunk_water_lod.d.ts.map +1 -0
  427. package/src/shade/renderer/water/surface/lod/chunk_water_lod.js +127 -0
  428. package/src/shade/renderer/water/surface/lod/chunk_water_lod_cell.d.ts +17 -0
  429. package/src/shade/renderer/water/surface/lod/chunk_water_lod_cell.d.ts.map +1 -0
  430. package/src/shade/renderer/water/surface/lod/chunk_water_lod_cell.js +246 -0
  431. package/src/shade/renderer/water/surface/lod/shader_water_lod.d.ts +118 -0
  432. package/src/shade/renderer/water/surface/lod/shader_water_lod.d.ts.map +1 -0
  433. package/src/shade/renderer/water/surface/lod/shader_water_lod.js +727 -0
  434. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts +60 -0
  435. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -0
  436. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +228 -0
  437. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts +17 -0
  438. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts.map +1 -0
  439. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js +49 -0
  440. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts +22 -0
  441. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -0
  442. package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +143 -0
  443. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts +15 -0
  444. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -0
  445. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +121 -0
  446. package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts +83 -0
  447. package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts.map +1 -0
  448. package/src/shade/renderer/water/surface/particles/shader_water_particles.js +502 -0
  449. package/src/shade/renderer/water/surface/shader_water_cull.d.ts +42 -0
  450. package/src/shade/renderer/water/surface/shader_water_cull.d.ts.map +1 -0
  451. package/src/shade/renderer/water/surface/shader_water_cull.js +269 -0
  452. package/src/shade/renderer/water/surface/shader_water_waves_combine.d.ts +15 -0
  453. package/src/shade/renderer/water/surface/shader_water_waves_combine.d.ts.map +1 -0
  454. package/src/shade/renderer/water/surface/shader_water_waves_combine.js +73 -0
  455. package/src/shade/renderer/water/surface/shader_water_waves_derive.d.ts +11 -0
  456. package/src/shade/renderer/water/surface/shader_water_waves_derive.d.ts.map +1 -0
  457. package/src/shade/renderer/water/surface/shader_water_waves_derive.js +78 -0
  458. package/src/shade/renderer/water/surface/spectrum/GPUWaterSpectrum.d.ts +35 -0
  459. package/src/shade/renderer/water/surface/spectrum/GPUWaterSpectrum.d.ts.map +1 -0
  460. package/src/shade/renderer/water/surface/spectrum/GPUWaterSpectrum.js +103 -0
  461. package/src/shade/renderer/water/surface/spectrum/WATER_BAND_STATE.d.ts +22 -0
  462. package/src/shade/renderer/water/surface/spectrum/WATER_BAND_STATE.d.ts.map +1 -0
  463. package/src/shade/renderer/water/surface/spectrum/WATER_BAND_STATE.js +57 -0
  464. package/src/shade/renderer/water/surface/spectrum/WATER_SPECTRUM.d.ts +22 -0
  465. package/src/shade/renderer/water/surface/spectrum/WATER_SPECTRUM.d.ts.map +1 -0
  466. package/src/shade/renderer/water/surface/spectrum/WATER_SPECTRUM.js +25 -0
  467. package/src/shade/renderer/water/surface/spectrum/chunk_water_jonswap.d.ts +14 -0
  468. package/src/shade/renderer/water/surface/spectrum/chunk_water_jonswap.d.ts.map +1 -0
  469. package/src/shade/renderer/water/surface/spectrum/chunk_water_jonswap.js +48 -0
  470. package/src/shade/renderer/water/surface/spectrum/chunk_water_spectrum.d.ts +23 -0
  471. package/src/shade/renderer/water/surface/spectrum/chunk_water_spectrum.d.ts.map +1 -0
  472. package/src/shade/renderer/water/surface/spectrum/chunk_water_spectrum.js +169 -0
  473. package/src/shade/renderer/water/surface/spectrum/shader_water_spectrum.d.ts +26 -0
  474. package/src/shade/renderer/water/surface/spectrum/shader_water_spectrum.d.ts.map +1 -0
  475. package/src/shade/renderer/water/surface/spectrum/shader_water_spectrum.js +161 -0
  476. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
  477. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +18 -6
  478. package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
  479. package/src/shade/wgsl/emulator/WGSLLanguageCore.js +11 -3
  480. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts +0 -28
  481. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts.map +0 -1
  482. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.js +0 -86
  483. package/src/engine/ecs/ik/IKConstraint.d.ts +0 -52
  484. package/src/engine/ecs/ik/IKConstraint.d.ts.map +0 -1
  485. package/src/engine/ecs/ik/IKConstraint.js +0 -95
  486. package/src/engine/ecs/ik/IKProblem.d.ts +0 -45
  487. package/src/engine/ecs/ik/IKProblem.d.ts.map +0 -1
  488. package/src/engine/ecs/ik/IKProblem.js +0 -58
  489. package/src/engine/ecs/ik/IKSolver.d.ts +0 -8
  490. package/src/engine/ecs/ik/IKSolver.d.ts.map +0 -1
  491. package/src/engine/ecs/ik/IKSolver.js +0 -9
  492. package/src/engine/ecs/ik/InverseKinematics.d.ts +0 -48
  493. package/src/engine/ecs/ik/InverseKinematics.d.ts.map +0 -1
  494. package/src/engine/ecs/ik/InverseKinematics.js +0 -119
  495. package/src/engine/ecs/ik/InverseKinematicsSerializationAdapter.d.ts +0 -19
  496. package/src/engine/ecs/ik/InverseKinematicsSerializationAdapter.d.ts.map +0 -1
  497. package/src/engine/ecs/ik/InverseKinematicsSerializationAdapter.js +0 -72
  498. package/src/engine/ecs/ik/InverseKinematicsSystem.d.ts +0 -54
  499. package/src/engine/ecs/ik/InverseKinematicsSystem.d.ts.map +0 -1
  500. package/src/engine/ecs/ik/InverseKinematicsSystem.js +0 -212
  501. package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.d.ts +0 -8
  502. package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.d.ts.map +0 -1
  503. package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.js +0 -153
  504. package/src/engine/ecs/ik/TwoBoneInverseKinematicsSolver.d.ts +0 -5
  505. package/src/engine/ecs/ik/TwoBoneInverseKinematicsSolver.d.ts.map +0 -1
  506. package/src/engine/ecs/ik/TwoBoneInverseKinematicsSolver.js +0 -120
  507. package/src/engine/ecs/ik/ik_bone_chain.d.ts +0 -64
  508. package/src/engine/ecs/ik/ik_bone_chain.d.ts.map +0 -1
  509. package/src/engine/ecs/ik/ik_bone_chain.js +0 -142
  510. package/src/engine/ecs/ik/ik_probe_terrain_contact.d.ts +0 -42
  511. package/src/engine/ecs/ik/ik_probe_terrain_contact.d.ts.map +0 -1
  512. package/src/engine/ecs/ik/ik_probe_terrain_contact.js +0 -123
  513. package/src/engine/ecs/ik/ik_write_local_rotation.d.ts +0 -18
  514. package/src/engine/ecs/ik/ik_write_local_rotation.d.ts.map +0 -1
  515. package/src/engine/ecs/ik/ik_write_local_rotation.js +0 -32
  516. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts +0 -29
  517. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts.map +0 -1
  518. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.js +0 -44
  519. package/src/shade/renderer/water/medium/shader_water_bodies_derive.d.ts +0 -4
  520. package/src/shade/renderer/water/medium/shader_water_bodies_derive.d.ts.map +0 -1
  521. package/src/shade/renderer/water/medium/shader_water_bodies_derive.js +0 -32
  522. package/src/shade/renderer/water/surface/GPUWaterWaveSimulation.d.ts +0 -25
  523. package/src/shade/renderer/water/surface/GPUWaterWaveSimulation.d.ts.map +0 -1
  524. package/src/shade/renderer/water/surface/GPUWaterWaveSimulation.js +0 -128
  525. package/src/shade/renderer/water/surface/chunk_water_tessellation.d.ts +0 -9
  526. package/src/shade/renderer/water/surface/chunk_water_tessellation.d.ts.map +0 -1
  527. package/src/shade/renderer/water/surface/chunk_water_tessellation.js +0 -144
  528. package/src/shade/renderer/water/surface/chunk_water_wave.d.ts +0 -13
  529. package/src/shade/renderer/water/surface/chunk_water_wave.d.ts.map +0 -1
  530. package/src/shade/renderer/water/surface/chunk_water_wave.js +0 -40
  531. package/src/shade/renderer/water/surface/shader_water_tiles.d.ts +0 -4
  532. package/src/shade/renderer/water/surface/shader_water_tiles.d.ts.map +0 -1
  533. package/src/shade/renderer/water/surface/shader_water_tiles.js +0 -123
  534. package/src/shade/renderer/water/surface/shader_water_wave_batch.d.ts +0 -6
  535. package/src/shade/renderer/water/surface/shader_water_wave_batch.d.ts.map +0 -1
  536. package/src/shade/renderer/water/surface/shader_water_wave_batch.js +0 -85
  537. package/src/shade/renderer/water/surface/shader_water_wave_domain.d.ts +0 -6
  538. package/src/shade/renderer/water/surface/shader_water_wave_domain.d.ts.map +0 -1
  539. package/src/shade/renderer/water/surface/shader_water_wave_domain.js +0 -83
@@ -0,0 +1,179 @@
1
+ # IK — trees, goals on bones, joints and contacts from physics
2
+
3
+ > Revision 5, 2026-10-06. **S1–S4 are implemented** (2026-10-06); S5 is later. What implementing
4
+ > it measured or decided beyond this text is in §9. The solver (§2) was accepted at revision 2. Revisions 3–5 settle the components, limits, contacts and clip-driven bones. Each
5
+ > revision went through an adversarial review. Numbers come from one-off probes outside the repo,
6
+ > and every stage re-pins what it relies on with a failing spec first.
7
+
8
+ ## 1. Where it stands (master `c01c0ebbd`)
9
+
10
+ - `physics/inverse_kinematics/fabrik/` solves one chain, and nothing calls it.
11
+ - The ECS IK (`2BIK`, `1BSA`) reads name-keyed `IKConstraint` lists on an `InverseKinematics`
12
+ component, and probes `Terrain` directly.
13
+ - **Holds** (`gpu_authority_hold`): a CPU writer takes a joint's `TransformAttachment`. The
14
+ animation manager mutes every clip binding that names the joint, and `t64_evaluate_world` /
15
+ `T64WorldCache` read the held offset. Cloth uses this.
16
+ - `two_joint_ik` takes the knee's hinge. The CPU pose twin matches the GPU resolve.
17
+
18
+ ## 2. Solver: frame FABRIK over a tree
19
+
20
+ **Unchanged.**
21
+ - Every solved joint is a frame: rigid offsets to its children, with its rotation fitted inward
22
+ (from its old position) and outward. With one child this is the paper's pull.
23
+ - Fits start from the carried rotation, so nothing drifts.
24
+ - A goal's path runs from its effector to its `chain_root`. A link carries the weight of the goals
25
+ whose path holds both ends, and a `chain_root` takes rotation, never position.
26
+ - The target is `lerp(carried, goal, w)`. Weight 0 gives the same pose as no goal, and the result is
27
+ continuous in `w`.
28
+ - Two-bone paths use `two_joint_ik`. Twist is held from the animated pose, and the effector's
29
+ rotation is slerped toward the goal after the solve.
30
+ - Worst error at 16 iterations is 0.005–1.34 mm across the probe cases. The paper's point branches
31
+ miss by 8–49 mm once written back.
32
+
33
+ ## 3. Components: on the bones, limits from physics
34
+
35
+ Data lives on the entity it describes, and the tree is the `TransformAttachment` hierarchy. Meep's
36
+ own rig setup puts these components on the bones when the instance is created.
37
+
38
+ **`IKGoal`, on the effector bone.**
39
+
40
+ | field | meaning |
41
+ |---|---|
42
+ | `target` | entity id. Its world pose is the goal. |
43
+ | `chain_root` | entity id, an ancestor-or-self of the effector: the highest bone this goal rotates |
44
+ | `position_weight`, `rotation_weight` | 0..1 |
45
+
46
+ - References are fixed while attached.
47
+ - The goal removes itself when its target or any joint on its path is destroyed, as
48
+ `TransformAttachment` does when its parent dies.
49
+ - A rejected goal holds nothing. Rejection is a real branch plus an assert, because asserts are
50
+ stripped in production. A goal is rejected for:
51
+ - a `chain_root` that is not an ancestor-or-self of the effector;
52
+ - a target hanging below its own path;
53
+ - a two-bone path whose knee has no bend side.
54
+ - A target hanging below *another* goal's joints in the same tree (a grip on a weapon held by the
55
+ other hand) is read from the solver's current frames on every iteration. Convergence is measured
56
+ in S4.
57
+ - Across groups, dependencies order the solves, and a cycle rejects both groups.
58
+
59
+ **Joint limits are the physics `Joint` on the bone.** Physics already has this as a 6-DOF
60
+ description (PhysX D6): per-axis `DofMode`, limits, `localBasisA/B`, and two entity ids.
61
+ - On a bone, `entityA` is the parent bone and `entityB` is the bone itself.
62
+ - Asserted at link:
63
+ - `entityA` equals `TransformAttachment.parent`;
64
+ - `localBasisA = rest_local · localBasisB`;
65
+ - `swingTwist` is on. Without it, physics measures angles as 2 sin(θ/2), so limits above 114.6°
66
+ never engage and physics and IK would disagree.
67
+ - **Hinge** (`asHinge`) gives the knee's `mid_axis`. Its bend side comes from asymmetric limits.
68
+ - **Cone-twist** gives twist on X and separate Y/Z swing, and IK clamps to the same box physics
69
+ allows.
70
+ - IK ignores anchors, linear DOFs, SPRING and MOTOR.
71
+ - **Shared maths.** `swing_twist_error*` moves from `physics/constraint/solve_constraints.js` to
72
+ `core/geom/3d/quaternion/`; the clamp is new.
73
+ - **Contract.** Physics simulates a `Joint` only when both sides have a body (or `JOINT_WORLD`).
74
+ Otherwise it is a kinematic limit. Nothing observes `Joint` today.
75
+
76
+ **Solver settings** (`max_iterations`, `tolerance`) belong to the system.
77
+
78
+ ## 4. Contacts come from physics
79
+
80
+ A foot is a joint, the ground is a collider, and contact points are physics' job. IK probes
81
+ nothing: today's terrain prober goes, and nothing here touches `Terrain` or `ClingToTerrain`.
82
+
83
+ - **A goal that should touch a surface** gets its target from a physics query: a ray or shape cast
84
+ (`PhysicsSystem.raycast`, `shapeCast`) from a reference the rig provides, returning a
85
+ `PhysicsSurfacePoint` (position, normal, entity).
86
+ - **The component lives in the physics package.** It is a generic contact-probe component that
87
+ places its entity at the hit and aligns it to the normal. It knows nothing about IK or feet, so
88
+ footsteps, decals and AI can use it too. Physics has no query component today;
89
+ `PhysicsSurfacePoint` was written with "a ground sensor" in mind.
90
+ - **Its contract:**
91
+ - it exact-evaluates a GPU-composed reference through `T64WorldCache`;
92
+ - it writes its own attachment offset;
93
+ - it skips the character's own colliders (same `ParentEntity` root);
94
+ - it runs in `update`, before IK;
95
+ - its reference must not be held by IK, or the target would chase IK's output (asserted by the
96
+ IK side, §3).
97
+ - Pelvis lowering comes later.
98
+
99
+ ## 5. Bones a clip drives: IK holds them
100
+
101
+ Downstream code (`t64_evaluate_world`, `T64WorldCache`, sockets, cloth anchors, the GPU hierarchy)
102
+ reads the held offset exactly as it reads cloth's, and never learns that IK exists.
103
+
104
+ - **Link:** hold `TransformAttachment` on every joint of the path, capture the offsets, and write the
105
+ evaluated base pose at once, so no frame shows the bind pose.
106
+ - **Every tick:** write each held joint's full local: translation, rotation and scale, since a hold
107
+ mutes every channel. The base comes from `pose_evaluate_local`, never from a held offset.
108
+ - **Unlink:** write the captured offset back, then unhold, guarded by `entityExists`.
109
+ - **One holder per joint:** IK on a cloth-held joint trips the existing assert.
110
+ - **Cost:** 37 / 127 / 531 µs per character per tick at 2 / 8 / 30 registered clips (34 levels),
111
+ because every level scans every channel of every clip.
112
+ - **Ordering:** IK declares what it reads, `Animation` and `AnimationGraphController`. The drivers
113
+ declare that they write them. With the scheduler fixed (below), IK then runs after the drivers.
114
+ Cloth needs no order against IK: it runs in `fixedUpdate` on the previous update's consistent
115
+ state.
116
+
117
+ ## 6. Prerequisites (separate tasks)
118
+
119
+ 1. **Holds: LANDED** (`84f2f7267`, `c01c0ebbd`). A clip that binds during a hold takes the rest the holder
120
+ leaves when the hold ends, and that offset reaches the row.
121
+ 2. **Pose evaluator:** index channels by target (the cost row above). Sockets and cloth gain too.
122
+ 3. **Scheduler:** a system that reads X and writes Y sorts before the writer of X. Measured with
123
+ synthetic components: Producer (X) and Consumer (X → Y) order as `Consumer > Producer` in both
124
+ registration orders. `system_execution_order.spec.js` covers only a pure reader. The fix stays
125
+ inside derived ordering.
126
+
127
+ ## 7. Stages
128
+
129
+ Each stage is red-then-green.
130
+
131
+ 1. **S1 Frame FABRIK:** a pure solver over typed arrays.
132
+ 2. **S2 Two-bone paths:** `two_joint_ik` with the hinge read from the `Joint`.
133
+ 3. **S3 Limits:** the shared swing-twist maths, the clamp, and `Joint` frames inside the passes.
134
+ 4. **S4 ECS, landing together:**
135
+ - `IKGoal` and its system (groups, holds, base evaluation, target reads, declarations);
136
+ - the physics contact-probe component;
137
+ - in the same change, `InverseKinematics`, `IKConstraint`, `2BIK`, `1BSA`, the terrain prober
138
+ and the adapter go (hard break).
139
+ 5. **S5 Later:** pelvis lowering, twist distribution, goal priority, pole goals.
140
+
141
+ ## 8. Sources
142
+
143
+ - [A] Aristidou, Chrysanthou, Lasenby, *Extending FABRIK with model constraints*, CAVW 2016
144
+ - [C] Aristidou, Lasenby, *FABRIK*, Graphical Models 73, 2011
145
+ - [D] Baerlocher, Boulic, *Parametrization and range of motion of the ball-and-socket joint*, 2001
146
+ - [G] UE 5.4 source: `Plugins/Experimental/FullBodyIK/Source/PBIK/`, `AnimNode_FootPlacement`
147
+ - [N] ozz-animation `ik_two_bone_job.h`, `samples/foot_ik/sample_foot_ik.cc`
148
+
149
+ ## 9. After implementation (2026-10-06)
150
+
151
+ Measured while implementing S1–S4, and decided with the owner where it changed anything.
152
+
153
+ - **The fit** is 8 steps of power iteration warm-started from the carried rotation: 110–130 ns a fit
154
+ against 610–790 ns for the exact Jacobi fit, which also turns the chest about its shoulder line
155
+ from rounding (a 40–175° bend at the chest joint, converged, where the warm start bends 0–54°).
156
+ - **The 0/0** of this mechanism is a target on the effector's parent, at any bone lengths: the parent
157
+ is fitted toward a child sitting on its old position. A target at a limb's top with equal bones is
158
+ finite and reached. A straight arm turned only at the shoulder, its target exactly on the elbow,
159
+ has no side to fold to and stays (finite); 1e-12 m off, it reaches.
160
+ - **An effector inside another goal's path** (a goal on the elbow under a goal on the hand) is one
161
+ more proposal in its joint's mean, weighted by its goal's weight (owner's decision; pinning it at
162
+ its target moved the pose 161 mm at weight 0). Weight 0 is no goal, 0.001 moves it 0.05 mm, and two
163
+ equal goals that disagree meet half way.
164
+ - **`FrameFabrikProblem` takes `base_local_rotation`**: a goal's root is limited against its
165
+ parent's fixed frame, which world rotations alone do not give.
166
+ - **A hinge alone on a longer path can lock**: the arc fits never twist the shoulder to bring an
167
+ elbow's hinge plane round, so a target off it left the arm straight, 350 / 334 mm short; a
168
+ cone-twist on the shoulder unlocks it (1.4 mm at 16 iterations, 0 at 64). Hinges also slow a grip
169
+ pair down: 65 / 220 mm at 16 iterations, 0 at 64. Two-bone paths are analytic and unaffected.
170
+ Stated, not fixed.
171
+ - **"Below its own path"** means the deepest posed bone the target hangs from is a bone of the goal's
172
+ own path. A grip on a weapon in the other hand hangs below the gripping hand's own chest too, but
173
+ the other arm's bones carry it, so it is read from the solver's frames. Known only with every goal,
174
+ so it is found when the groups are formed; a target below the effector itself is refused at link.
175
+ - **The contact probe** casts a sphere of `radius`, a ray at 0. It and IK both read and write
176
+ `TransformAttachment`, so declared access leaves them a cycle and the scheduler keeps their
177
+ registration order: the probe is registered first (owner's decision). That its reference must not
178
+ be held by a CPU writer is documented on `ContactProbe`, not asserted (owner's decision): IK cannot
179
+ check it without knowing the probe's component.
@@ -311,12 +311,12 @@ export class EntityNode {
311
311
  // wrote `parent` onto a detached instance. The node kept lifetime parentage with no
312
312
  // transform attachment, so it rendered at its raw Transform64 in world space.
313
313
  if (attachment === null) {
314
- attachment = this.__safe_get_attachment();
315
- } else {
316
- this_entity.add(attachment);
314
+ attachment = new TransformAttachment();
315
+ attachment.setFlag(TransformAttachmentFlags.Immediate);
317
316
  }
318
317
 
319
318
  attachment.parent = parent_entity_id;
319
+ this_entity.add(attachment);
320
320
  }
321
321
  }
322
322
 
@@ -9,7 +9,7 @@ export class VoiceSystem extends AbstractContextSystem<any> {
9
9
  font_size: number;
10
10
  });
11
11
  dependencies: (typeof Voice)[];
12
- components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof GUIElement> | ResourceAccessSpecification<typeof ViewportPosition> | ResourceAccessSpecification<typeof HeadsUpDisplay> | ResourceAccessSpecification<typeof TransformAttachment> | ResourceAccessSpecification<typeof SerializationMetadata> | ResourceAccessSpecification<typeof BehaviorComponent>)[];
12
+ components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof GUIElement> | ResourceAccessSpecification<typeof ViewportPosition> | ResourceAccessSpecification<typeof TransformAttachment> | ResourceAccessSpecification<typeof HeadsUpDisplay> | ResourceAccessSpecification<typeof SerializationMetadata> | ResourceAccessSpecification<typeof BehaviorComponent>)[];
13
13
  /**
14
14
  *
15
15
  * @type {Localization}
@@ -105,8 +105,8 @@ import { Transform64 } from "../transform/Transform64.js";
105
105
  import { ResourceAccessSpecification } from "../../../core/model/ResourceAccessSpecification.js";
106
106
  import GUIElement from "../gui/GUIElement.js";
107
107
  import ViewportPosition from "../gui/position/ViewportPosition.js";
108
- import HeadsUpDisplay from "../gui/hud/HeadsUpDisplay.js";
109
108
  import { TransformAttachment } from "../transform-attachment/TransformAttachment.js";
109
+ import HeadsUpDisplay from "../gui/hud/HeadsUpDisplay.js";
110
110
  import { SerializationMetadata } from "../components/SerializationMetadata.js";
111
111
  import { BehaviorComponent } from "../../intelligence/behavior/ecs/BehaviorComponent.js";
112
112
  //# sourceMappingURL=VoiceSystem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VoiceSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/speaker/VoiceSystem.js"],"names":[],"mappings":"AA0KA;IA2CI;;;;OAIG;IACH;;;OA8CC;IA7FD,+BAAuB;IACvB,gZAQE;IAEF;;;OAGG;IACH,0BAAmB;IAEnB;;;OAGG;IACH,eAAW;IAEX;;;OAGG;IACH,4BAAa;IAEb;;;OAGG;IACH,8BAAY;IAEZ;;;;OAIG;IACH,iCAAqC;IAajC;;;OAGG;IACH,eAAoB;IAEpB;;;;OAIG;IACH,kBAAkC;IAGlC;;;;OAIG;IACH,eAAkB;IAElB;;;;OAIG;IACH,oBAAgC;IAEhC;;;OAGG;IACH,oBAAqC;IAErC;;;;OAIG;IACH,gBAAoB;IAGxB;;;OAGG;IACH,kBAFY,MAAM,CAIjB;IAEF,2CAqBE;IAED;;;;;OAKG;IACH,uBAJW,MAAM,UACN,MAAM,SACN,KAAK,QAsBf;IAED;;;;;;OAMG;IACH,wBAoBC;IAED;;;;;OAKG;IACH,gBAJW,MAAM,WACN,MAAM,SACN,KAAK,QAiIf;CACJ;sCA5cqC,oCAAoC;sBAKpD,YAAY;4BAFN,6BAA6B;4CAxBb,oDAAoD;uBAkBzE,sBAAsB;6BAEhB,qCAAqC;2BADvC,8BAA8B;oCAIrB,gDAAgD;sCAR9C,wCAAwC;kCAP5C,sDAAsD"}
1
+ {"version":3,"file":"VoiceSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/speaker/VoiceSystem.js"],"names":[],"mappings":"AA0KA;IA2CI;;;;OAIG;IACH;;;OA8CC;IA7FD,+BAAuB;IACvB,gZAQE;IAEF;;;OAGG;IACH,0BAAmB;IAEnB;;;OAGG;IACH,eAAW;IAEX;;;OAGG;IACH,4BAAa;IAEb;;;OAGG;IACH,8BAAY;IAEZ;;;;OAIG;IACH,iCAAqC;IAajC;;;OAGG;IACH,eAAoB;IAEpB;;;;OAIG;IACH,kBAAkC;IAGlC;;;;OAIG;IACH,eAAkB;IAElB;;;;OAIG;IACH,oBAAgC;IAEhC;;;OAGG;IACH,oBAAqC;IAErC;;;;OAIG;IACH,gBAAoB;IAGxB;;;OAGG;IACH,kBAFY,MAAM,CAIjB;IAEF,2CAqBE;IAED;;;;;OAKG;IACH,uBAJW,MAAM,UACN,MAAM,SACN,KAAK,QA0Bf;IAED;;;;;;OAMG;IACH,wBAoBC;IAED;;;;;OAKG;IACH,gBAJW,MAAM,WACN,MAAM,SACN,KAAK,QAiIf;CACJ;sCAhdqC,oCAAoC;sBAKpD,YAAY;4BAFN,6BAA6B;4CAxBb,oDAAoD;uBAkBzE,sBAAsB;6BAEhB,qCAAqC;oCAG9B,gDAAgD;2BAJzD,8BAA8B;sCAJnB,wCAAwC;kCAP5C,sDAAsD"}
@@ -320,6 +320,10 @@ export class VoiceSystem extends AbstractContextSystem {
320
320
 
321
321
  const selected_line = weightedRandomFromArray(temp_lines, Math.random, this.__weigher.compute, this.__weigher, collected_count);
322
322
 
323
+ if (selected_line === undefined) {
324
+ return;
325
+ }
326
+
323
327
  this.sayLine(entity, selected_line.id, voice);
324
328
  }
325
329
 
@@ -113,11 +113,6 @@ function deserializeTask(
113
113
  function cycleFunction() {
114
114
  while (collectionDeSerializer.getElementIndex() >= collectionDeSerializer.getElementCount()) {
115
115
 
116
- //finished current type
117
- if (typesLeft === 0) {
118
- return TaskSignal.EndSuccess;
119
- }
120
-
121
116
  const previousClass = collectionDeSerializer.getElementClass();
122
117
 
123
118
  if (typesDecoded > 0) {
@@ -126,6 +121,11 @@ function deserializeTask(
126
121
  collectionDeSerializer.finalize();
127
122
  }
128
123
 
124
+ //finished current type
125
+ if (typesLeft === 0) {
126
+ return TaskSignal.EndSuccess;
127
+ }
128
+
129
129
  typesDecoded++;
130
130
 
131
131
  //start next type
@@ -1 +1 @@
1
- {"version":3,"file":"BinaryBufferSerializer.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/storage/BinaryBufferSerializer.js"],"names":[],"mappings":";AAmDA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACI;;;OAGG;IACH,sCAAgB;IAEhB;;;OAGG;IACH,QAFU,GAAG,GAAC,IAAI,CAEJ;IAEd;;;;OAIG;IACH,qEAmIC;CACJ"}
1
+ {"version":3,"file":"BinaryBufferSerializer.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/storage/BinaryBufferSerializer.js"],"names":[],"mappings":";AAkDA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACI;;;OAGG;IACH,sCAAgB;IAEhB;;;OAGG;IACH,QAFU,GAAG,GAAC,IAAI,CAEJ;IAEd;;;;OAIG;IACH,qEAmIC;CACJ"}
@@ -24,15 +24,14 @@ function isComponentClassSerializable(componentClass) {
24
24
  * @returns {boolean}
25
25
  */
26
26
  function isEntityTransient(entity, dataset, smComponentIndex, componentInstance) {
27
- if (smComponentIndex === -1) {
28
- return false;
29
- }
30
-
31
- //check component instance flag
27
+ //check component instance flag, it does not depend on SerializationMetadata
32
28
  if (componentInstance[COMPONENT_SERIALIZATION_TRANSIENT_FIELD] === true) {
33
29
  return true;
34
30
  }
35
31
 
32
+ if (smComponentIndex === -1) {
33
+ return false;
34
+ }
36
35
 
37
36
  /**
38
37
  *
@@ -1 +1 @@
1
- {"version":3,"file":"BinarySerializationRegistry.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/storage/binary/BinarySerializationRegistry.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH;;;;;GAKG;AACH;IAEI;;;;OAIG;IACH,2BAAsB;IACtB;;;;OAIG;IACH,6BAAwB;IAWxB;;;OAGG;IACH,2BAFW,qFAAiC,QAM3C;IAED;;;;;;OAMG;IACH,0HAJW,MAAM,GACJ,OAAO,CAyCnB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,sFAAgC,SAAS,CA2BrD;IAED;;;;;;;OAOG;IACH,+BAFa,MAAM,GAAC,SAAS,CAI5B;IAED;;;;OAIG;IACH,sBAHW,MAAM,GACJ,sFAAgC,SAAS,CAMrD;IAED;;;;;OAKG;IACH,4BAJW,MAAM,YACN,mBAAmB,GACjB,OAAO,CA6CnB;IAED;;;;;;OAMG;IACH,6BALW,MAAM,gBACN,MAAM,eACN,MAAM,GACJ,mBAAmB,EAAE,GAAC,IAAI,CA0DtC;IAIL;;;OAGG;IACH,wCAFU,OAAO,CAEkD;;CANlE;;kCArQY,OAAO,0BAA0B,EAAE,mBAAmB"}
1
+ {"version":3,"file":"BinarySerializationRegistry.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/storage/binary/BinarySerializationRegistry.js"],"names":[],"mappings":"AAIA;;;GAGG;AAEH;;;;;GAKG;AACH;IAEI;;;;OAIG;IACH,2BAAsB;IACtB;;;;OAIG;IACH,6BAAwB;IAWxB;;;OAGG;IACH,2BAFW,qFAAiC,QAM3C;IAED;;;;;;OAMG;IACH,0HAJW,MAAM,GACJ,OAAO,CAyCnB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,sFAAgC,SAAS,CA2BrD;IAED;;;;;;;OAOG;IACH,+BAFa,MAAM,GAAC,SAAS,CAI5B;IAED;;;;OAIG;IACH,sBAHW,MAAM,GACJ,sFAAgC,SAAS,CAMrD;IAED;;;;;OAKG;IACH,4BAJW,MAAM,YACN,mBAAmB,GACjB,OAAO,CA6CnB;IAED;;;;;;OAMG;IACH,6BALW,MAAM,gBACN,MAAM,eACN,MAAM,GACJ,mBAAmB,EAAE,GAAC,IAAI,CA0DtC;IAIL;;;OAGG;IACH,wCAFU,OAAO,CAEkD;;CANlE;;kCArQY,OAAO,0BAA0B,EAAE,mBAAmB"}
@@ -1,4 +1,5 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
+ import { EdgeDirectionType } from "../../../../core/graph/Edge.js";
2
3
  import { Graph } from "../../../../core/graph/v2/Graph.js";
3
4
 
4
5
  /**
@@ -190,9 +191,9 @@ export class BinarySerializationRegistry {
190
191
  }
191
192
 
192
193
  if (u.getStartVersion() === upgrader.getTargetVersion()) {
193
- classUpgraders.createEdge(u, upgrader);
194
+ classUpgraders.createEdge(upgrader, u, EdgeDirectionType.Forward);
194
195
  } else if (u.getTargetVersion() === upgrader.getStartVersion()) {
195
- classUpgraders.createEdge(upgrader, u);
196
+ classUpgraders.createEdge(u, upgrader, EdgeDirectionType.Forward);
196
197
  }
197
198
  });
198
199
 
@@ -57,8 +57,8 @@ threw, no save containing these behaviours can exist, so there is no data to sta
57
57
 
58
58
  ## Adapters still without a spec
59
59
 
60
- 29 files, of which `BinaryClassSerializationAdapter.js` (the base class) and
61
- `ObjectBasedClassSerializationAdapter.js` (a helper) are not adapters — so **27 real ones**. Every entry is an
60
+ 28 files, of which `BinaryClassSerializationAdapter.js` (the base class) and
61
+ `ObjectBasedClassSerializationAdapter.js` (a helper) are not adapters — so **26 real ones**. Every entry is an
62
62
  adapter nothing currently verifies.
63
63
 
64
64
  Sixteen of these are the ones whose `serialize` threw under the old harness. That is not a coincidence and it
@@ -71,7 +71,6 @@ fixture rather than a default instance. `FogOfWar` needs correctly-sized height
71
71
  | `Animation` | `engine/ecs/animation/AnimationSerializationAdapter.js` |
72
72
  | `FogOfWar` | `engine/ecs/fow/serialization/FogOfWarSerializationAdapter.js` |
73
73
  | `GUIElement` | `engine/ecs/gui/GUIElementSerializationAdapter.js` |
74
- | `InverseKinematics` | `engine/ecs/ik/InverseKinematicsSerializationAdapter.js` |
75
74
  | `Book` | `engine/ecs/storage/binary/BinaryClassSerializationAdapter.js` |
76
75
  | `?` | `engine/ecs/storage/binary/object/ObjectBasedClassSerializationAdapter.js` |
77
76
  | `Terrain` | `engine/ecs/terrain/serialization/TerrainSerializationAdapter.js` |
@@ -106,6 +105,11 @@ The per-upgrader spec should assert **the restored field values**, not the byte
106
105
  asserted. The byte count was a proxy it used because it had no idea what the values ought to be; a spec that
107
106
  names one upgrader does know, and should say so.
108
107
 
108
+ Upgraders added since carry that spec from the start. The first was IK's, which wrote a version 0 constraint
109
+ field by field, ran it through the chain the engine registry hands a load, and asserted every restored field;
110
+ it went with the component it upgraded (2026-10-06, a hard break: IK's goals live on bones, which are never
111
+ saved).
112
+
109
113
  ### Goldens to port
110
114
 
111
115
  ```js
@@ -413,7 +413,7 @@ export class BinaryObjectSerializationAdapter2 {
413
413
  // reference to the schema else-where
414
414
  const schema_address = buffer.readUintVar();
415
415
 
416
- record = this.#schema_table.getRecord(schema_address);
416
+ record = this.#schema_table.getSchemaAt(schema_address);
417
417
  }
418
418
 
419
419
  const typeName = record.typeName;
@@ -1 +1 @@
1
- {"version":3,"file":"BinaryObjectDeSerializer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;GAYG;AACH;IA4BI;;;OAGG;IACH,6EAGC;IAED;;OAEG;IACH,yDAKC;IAED;;OAEG;IACH,kDAEC;IAED;;;;;;OAMG;IACH,uBAHW,YAAY,KAwCtB;IA0BD;;;;;;OAMG;IACH,uBAHW,YAAY,OAgDtB;IAoFL;;;OAGG;IACH,qCAFU,OAAO,CAE4C;;CAN5D;;;;;;;cAvRa,MAAM;;;;aACN,MAAM;;;;aACN,kCAAgC,SAAS;;;;WACzC,WAAS,SAAS;;;;eAClB,qBAAqB,GAAC,IAAI;;;;uBAC1B,OAAO;;6BAjCQ,4CAA4C"}
1
+ {"version":3,"file":"BinaryObjectDeSerializer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;GAYG;AACH;IA4BI;;;OAGG;IACH,6EAGC;IAED;;OAEG;IACH,yDAKC;IAED;;OAEG;IACH,kDAEC;IAED;;;;;;OAMG;IACH,uBAHW,YAAY,KAwCtB;IA0BD;;;;;;OAMG;IACH,uBAHW,YAAY,OAgDtB;IA2FL;;;OAGG;IACH,qCAFU,OAAO,CAE4C;;CAN5D;;;;;;;cA9Ra,MAAM;;;;aACN,MAAM;;;;aACN,kCAAgC,SAAS;;;;WACzC,WAAS,SAAS;;;;eAClB,qBAAqB,GAAC,IAAI;;;;uBAC1B,OAAO;;6BAjCQ,4CAA4C"}
@@ -258,7 +258,14 @@ export class BinaryObjectDeSerializer {
258
258
  const names = this.#shapes[shapeIdx];
259
259
 
260
260
  for (let i = 0; i < names.length; i++) {
261
- target[names[i]] = this.readValue(buffer);
261
+ const name = names[i];
262
+ const value = this.readValue(buffer);
263
+ if (name === "__proto__") {
264
+ // This wire-format field is own data, not a prototype setter.
265
+ Object.defineProperty(target, name, { value, writable: true, enumerable: true, configurable: true });
266
+ } else {
267
+ target[name] = value;
268
+ }
262
269
  }
263
270
 
264
271
  return target;
@@ -1 +1 @@
1
- {"version":3,"file":"populateEngineSerializationRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/storage/populateEngineSerializationRegistry.js"],"names":[],"mappings":"AAoLA;;;;;;;;GAQG;AACH,iGA8GC"}
1
+ {"version":3,"file":"populateEngineSerializationRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/storage/populateEngineSerializationRegistry.js"],"names":[],"mappings":"AAwLA;;;;;;;;GAQG;AACH,iGAiHC"}
@@ -17,7 +17,6 @@ import { HeadsUpDisplaySerializationAdapter } from "../gui/hud/HeadsUpDisplaySer
17
17
  import {
18
18
  ViewportPositionSerializationAdapter
19
19
  } from "../gui/position/ViewportPositionSerializationAdapter.js";
20
- import { InverseKinematicsSerializationAdapter } from "../ik/InverseKinematicsSerializationAdapter.js";
21
20
  import { NameSerializationAdapter } from "../name/NameSerializationAdapter.js";
22
21
  import { TeamSerializationAdapter } from "../team/TeamSerializationAdapter.js";
23
22
  import ClingToTerrain from "../terrain/ecs/cling/ClingToTerrain.js";
@@ -81,6 +80,8 @@ import {
81
80
  HighlightSerializationUpgrader_0_1
82
81
  } from "../../graphics/ecs/highlight/HighlightSerializationUpgrader_0_1.js";
83
82
  import { LightSerializationAdapter } from "../../graphics/ecs/light/LightSerializationAdapter.js";
83
+ import { Light } from "../../graphics/ecs/light/Light.js";
84
+ import { LightSerializationUpgrader_0_1 } from "../../graphics/ecs/light/LightSerializationUpgrader_0_1.js";
84
85
  import {
85
86
  SGMeshSerializationAdapter
86
87
  } from "../../graphics/ecs/mesh-v2/aggregate/serialization/SGMeshSerializationAdapter.js";
@@ -90,8 +91,11 @@ import { WaterSerializationUpgrader_0_1 } from "../../graphics/ecs/water/WaterSe
90
91
  import { WaterSerializationUpgrader_1_2 } from "../../graphics/ecs/water/WaterSerializationUpgrader_1_2.js";
91
92
  import { WaterSerializationUpgrader_2_3 } from "../../graphics/ecs/water/WaterSerializationUpgrader_2_3.js";
92
93
  import { WaterSerializationUpgrader_3_4 } from "../../graphics/ecs/water/WaterSerializationUpgrader_3_4.js";
94
+ import { WaterSerializationUpgrader_4_5 } from "../../graphics/ecs/water/WaterSerializationUpgrader_4_5.js";
93
95
  import { MeshletGeometrySerializationAdapter } from "../../../shade/renderer/geometry/MeshletGeometrySerializationAdapter.js";
94
96
  import { WaterWavesSerializationAdapter } from "../../graphics/ecs/water/WaterWavesSerializationAdapter.js";
97
+ import { WaterWavesSerializationUpgrader_0_1 } from "../../graphics/ecs/water/WaterWavesSerializationUpgrader_0_1.js";
98
+ import WaterWaves from "../../graphics/ecs/water/WaterWaves.js";
95
99
  import { GridPosition2Transform } from "../../grid/grid2transform/GridPosition2Transform.js";
96
100
  import {
97
101
  GridPosition2TransformSerializationAdapter
@@ -237,7 +241,6 @@ export function populateEngineSerializationRegistry(registry) {
237
241
  new GUIElementSerializationAdapter(),
238
242
  new HeadsUpDisplaySerializationAdapter(),
239
243
  new BehaviorComponentSerializationAdapter(),
240
- new InverseKinematicsSerializationAdapter(),
241
244
  new TooltipComponentSerializationAdapter(),
242
245
  new DecalSerializationAdapter(),
243
246
  new PickableSerializationAdapter(),
@@ -273,6 +276,7 @@ export function populateEngineSerializationRegistry(registry) {
273
276
  registry.registerUpgrader(FogOfWar.typeName, new FogOfWarSerializationUpdater_0_1());
274
277
 
275
278
  registry.registerUpgrader(Camera.typeName, new CameraSerializationUpgrader_0_1());
279
+ registry.registerUpgrader(Light.typeName, new LightSerializationUpgrader_0_1());
276
280
 
277
281
  registry.registerUpgrader(Path.typeName, new PathSerializationUpgrader_0_1());
278
282
  registry.registerUpgrader(Path.typeName, new PathSerializationUpgrader_1_2());
@@ -290,6 +294,8 @@ export function populateEngineSerializationRegistry(registry) {
290
294
  registry.registerUpgrader(Water.typeName, new WaterSerializationUpgrader_1_2());
291
295
  registry.registerUpgrader(Water.typeName, new WaterSerializationUpgrader_2_3());
292
296
  registry.registerUpgrader(Water.typeName, new WaterSerializationUpgrader_3_4());
297
+ registry.registerUpgrader(Water.typeName, new WaterSerializationUpgrader_4_5());
298
+ registry.registerUpgrader(WaterWaves.typeName, new WaterWavesSerializationUpgrader_0_1());
293
299
 
294
300
  registry.registerUpgrader(SoundEmitter.typeName, new SoundEmitterSerializationUpgrader_0_1());
295
301
  registry.registerUpgrader(SoundEmitter.typeName, new SoundEmitterSerializationUpgrader_1_2());
@@ -297,4 +303,5 @@ export function populateEngineSerializationRegistry(registry) {
297
303
  registry.registerUpgrader(TopDownCameraController.typeName, new TopDownCameraControllerSerializationUpgrader_0_1());
298
304
 
299
305
  registry.registerUpgrader(ClingToTerrain.typeName, new ClingToTerrainSerializationUpgrader_0_1());
306
+
300
307
  }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Orders systems by what they declare they touch: a system that writes (or creates) a component
3
+ * runs before every other system that reads it, when the two run in the same pass.
4
+ *
5
+ * A pass is `fixedUpdate` or `update`. Every fixed step runs before the update pass whatever this
6
+ * order says, so a write in one pass and a read in the other orders nothing, and is not counted —
7
+ * counting it could only close a cycle out of edges that are each real. One order serves both
8
+ * passes, so a system in both carries its edges into both.
9
+ *
10
+ * Without a cycle the result is a topological order of those edges. Where they leave a choice, the
11
+ * system with the higher priority runs first, and of equal priorities the one earlier in `systems`.
12
+ *
13
+ * A cycle — two systems that both read and write one component is the common one — has no order
14
+ * that respects every edge. So the rule is stated over cycles: the next system to run is the
15
+ * highest priority (then earliest) of those that wait on nothing but their own cycle, and a system
16
+ * on no cycle that waits on nothing qualifies as its own. Running a member of a cycle drops its
17
+ * edges from the rest of that cycle and nothing else. A system that waits on a cycle from outside
18
+ * it never qualifies before the cycle has run, so the only edges dropped are edges on a cycle.
19
+ *
20
+ * A cycle and a system that waits on nothing compete on those same terms, so a cycle runs where
21
+ * its best member's priority puts it, never held back behind systems no edge relates to it. Where
22
+ * sorting by priority alone already respects every edge, the result is that sort; and the result
23
+ * depends on nothing but the declarations, the passes, the priorities and the order of `systems`.
24
+ *
25
+ * O(n²) per system placed, O(n³) in all; it runs when the set of running systems changes.
26
+ *
27
+ * @param {System[]} systems sorted in place, the first `system_count` of them
28
+ * @param {number} system_count
29
+ * @param {Float64Array|number[]} priorities one per system, in the order `systems` arrives in; higher runs earlier
30
+ */
31
+ export function orderSystemsByDeclaredAccess(systems: import("../System.js").System<any>[], system_count: number, priorities: Float64Array | number[]): void;
32
+ export type System = import("../System.js").System<any>;
33
+ //# sourceMappingURL=orderSystemsByDeclaredAccess.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orderSystemsByDeclaredAccess.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/system/orderSystemsByDeclaredAccess.js"],"names":[],"mappings":"AA8JA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,sDAJW,oCAAQ,gBACR,MAAM,cACN,YAAY,GAAC,MAAM,EAAE,QA+F/B"}