@woosh/meep-engine 2.168.1 → 2.169.1

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 (624) hide show
  1. package/README.md +2 -2
  2. package/build/bundle-worker-image-decoder.js +1 -1
  3. package/editor/process/symbolic/make3DSymbolicDisplay.js +1 -1
  4. package/editor/view/ecs/EntityList.js +1 -1
  5. package/editor/view/ecs/components/particles/ParticleLayerController.js +1 -1
  6. package/editor/view/makeEntityDecorators.js +1 -1
  7. package/package.json +1 -1
  8. package/src/REVIEW_2026_08_06/adv-core.md +511 -0
  9. package/src/REVIEW_2026_08_06/adv-gfx.md +480 -0
  10. package/src/REVIEW_2026_08_06/adv-view.md +446 -0
  11. package/src/REVIEW_2026_08_06/api-core.md +296 -0
  12. package/src/REVIEW_2026_08_06/api-engine.md +195 -0
  13. package/src/REVIEW_2026_08_06/bvh-phys-sound-net.md +507 -0
  14. package/src/REVIEW_2026_08_06/core-binary.md +348 -0
  15. package/src/REVIEW_2026_08_06/core-collection.md +376 -0
  16. package/src/REVIEW_2026_08_06/core-math.md +221 -0
  17. package/src/REVIEW_2026_08_06/core-process.md +266 -0
  18. package/src/REVIEW_2026_08_06/core-science.md +223 -0
  19. package/src/REVIEW_2026_08_06/engine-ai-nav.md +279 -0
  20. package/src/REVIEW_2026_08_06/engine-animation.md +167 -0
  21. package/src/REVIEW_2026_08_06/engine-asset.md +166 -0
  22. package/src/REVIEW_2026_08_06/engine-ecs.md +920 -0
  23. package/src/REVIEW_2026_08_06/engine-input.md +197 -0
  24. package/src/REVIEW_2026_08_06/engine-misc.md +248 -0
  25. package/src/REVIEW_2026_08_06/engine-terrain.md +52 -0
  26. package/src/REVIEW_2026_08_06/generation.md +176 -0
  27. package/src/REVIEW_2026_08_06/geom-2d.md +434 -0
  28. package/src/REVIEW_2026_08_06/geom-3d.md +117 -0
  29. package/src/REVIEW_2026_08_06/gfx-gi.md +143 -0
  30. package/src/REVIEW_2026_08_06/gfx-render.md +740 -0
  31. package/src/REVIEW_2026_08_06/gfx-texture.md +690 -0
  32. package/src/REVIEW_2026_08_06/prior-criticals.md +49 -0
  33. package/src/REVIEW_2026_08_06/prior-highs.md +138 -0
  34. package/src/REVIEW_2026_08_06/test-gaps.md +364 -0
  35. package/src/REVIEW_2026_08_06/view.md +667 -0
  36. package/src/REVIEW_2026_08_06.md +610 -0
  37. package/src/core/IdPool.d.ts +2 -2
  38. package/src/core/IdPool.d.ts.map +1 -1
  39. package/src/core/IdPool.js +1 -1
  40. package/src/core/binary/32BitEncoder.d.ts +2 -3
  41. package/src/core/binary/32BitEncoder.d.ts.map +1 -1
  42. package/src/core/binary/32BitEncoder.js +1 -1
  43. package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
  44. package/src/core/binary/BinaryBuffer.js +12 -1
  45. package/src/core/binary/BitImage2.d.ts +5 -1
  46. package/src/core/binary/BitImage2.d.ts.map +1 -1
  47. package/src/core/binary/BitImage2.js +5 -1
  48. package/src/core/bvh2/bvh3/BVH.d.ts +2 -2
  49. package/src/core/bvh2/bvh3/BVH.d.ts.map +1 -1
  50. package/src/core/bvh2/bvh3/BVH.js +1 -1
  51. package/src/core/bvh2/bvh3/query/bvh_query_user_data_nearest_to_point_filtered.d.ts +2 -2
  52. package/src/core/bvh2/bvh3/query/bvh_query_user_data_nearest_to_point_filtered.d.ts.map +1 -1
  53. package/src/core/bvh2/bvh3/query/bvh_query_user_data_nearest_to_point_filtered.js +86 -86
  54. package/src/core/bvh2/traversal/aabb3_detailed_volume_intersection_callback_based.d.ts +2 -2
  55. package/src/core/bvh2/traversal/aabb3_detailed_volume_intersection_callback_based.d.ts.map +1 -1
  56. package/src/core/bvh2/traversal/aabb3_detailed_volume_intersection_callback_based.js +1 -1
  57. package/src/core/bvh8/build/NodeProxy.d.ts.map +1 -1
  58. package/src/core/bvh8/build/NodeProxy.js +314 -308
  59. package/src/core/cache/Cache.d.ts +4 -4
  60. package/src/core/cache/Cache.d.ts.map +1 -1
  61. package/src/core/cache/Cache.js +3 -3
  62. package/src/core/cache/LoadingCache.d.ts +1 -1
  63. package/src/core/cache/LoadingCache.js +2 -2
  64. package/src/core/cache/wtinylfu/CacheWTinylfu.d.ts +2 -2
  65. package/src/core/cache/wtinylfu/CacheWTinylfu.js +2 -2
  66. package/src/core/collection/array/array_index_by_equality.d.ts +2 -2
  67. package/src/core/collection/array/array_index_by_equality.d.ts.map +1 -1
  68. package/src/core/collection/array/array_index_by_equality.js +1 -1
  69. package/src/core/collection/array/array_pick_best_element.d.ts +2 -2
  70. package/src/core/collection/array/array_pick_best_element.d.ts.map +1 -1
  71. package/src/core/collection/array/array_pick_best_element.js +1 -1
  72. package/src/core/collection/array/array_pick_best_elements.d.ts +2 -2
  73. package/src/core/collection/array/array_pick_best_elements.d.ts.map +1 -1
  74. package/src/core/collection/array/array_pick_best_elements.js +1 -1
  75. package/src/core/collection/array/array_set_diff.d.ts +2 -3
  76. package/src/core/collection/array/array_set_diff.d.ts.map +1 -1
  77. package/src/core/collection/array/array_set_diff.js +1 -1
  78. package/src/core/collection/array/array_set_diff_sorting.d.ts +2 -2
  79. package/src/core/collection/array/array_set_diff_sorting.d.ts.map +1 -1
  80. package/src/core/collection/array/array_set_diff_sorting.js +1 -1
  81. package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts +2 -1
  82. package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts.map +1 -1
  83. package/src/core/collection/heap/BinaryHeap.d.ts +2 -2
  84. package/src/core/collection/heap/BinaryHeap.d.ts.map +1 -1
  85. package/src/core/collection/heap/BinaryHeap.js +1 -1
  86. package/src/core/collection/list/List.d.ts +32 -17
  87. package/src/core/collection/list/List.d.ts.map +1 -1
  88. package/src/core/collection/list/List.js +43 -9
  89. package/src/core/collection/list/SortedListProjection.d.ts.map +1 -1
  90. package/src/core/collection/list/SortedListProjection.js +4 -1
  91. package/src/core/collection/map/BiMap.d.ts +25 -2
  92. package/src/core/collection/map/BiMap.d.ts.map +1 -1
  93. package/src/core/collection/map/BiMap.js +57 -3
  94. package/src/core/collection/map/HashMap.d.ts +2 -2
  95. package/src/core/collection/map/HashMap.d.ts.map +1 -1
  96. package/src/core/collection/map/HashMap.js +1 -1
  97. package/src/core/collection/set/ArraySet.d.ts +2 -2
  98. package/src/core/collection/set/ArraySet.d.ts.map +1 -1
  99. package/src/core/collection/set/ArraySet.js +1 -1
  100. package/src/core/collection/table/RowFirstTable.d.ts +2 -2
  101. package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
  102. package/src/core/collection/table/RowFirstTable.js +1 -1
  103. package/src/core/collection/table/RowFirstTableSpec.js +4 -4
  104. package/src/core/debug/matchers/IsAnything.d.ts.map +1 -1
  105. package/src/core/debug/matchers/IsAnything.js +5 -1
  106. package/src/core/events/signal/Signal.d.ts.map +1 -1
  107. package/src/core/events/signal/Signal.js +3 -1
  108. package/src/core/fsm/simple/SimpleStateMachineDescription.d.ts +2 -2
  109. package/src/core/fsm/simple/SimpleStateMachineDescription.d.ts.map +1 -1
  110. package/src/core/fsm/simple/SimpleStateMachineDescription.js +1 -1
  111. package/src/core/geom/2d/bvh/BVH2D.d.ts +2 -2
  112. package/src/core/geom/2d/bvh/BVH2D.d.ts.map +1 -1
  113. package/src/core/geom/2d/bvh/BVH2D.js +1 -1
  114. package/src/core/geom/2d/polygon/TRIANGULATION_DESIGN.md +433 -0
  115. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts +31 -0
  116. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts.map +1 -0
  117. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.js +84 -0
  118. package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts +24 -2
  119. package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts.map +1 -1
  120. package/src/core/geom/2d/polygon/polygon2_signed_area.js +52 -34
  121. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts +28 -0
  122. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts.map +1 -0
  123. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.js +86 -0
  124. package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts +40 -0
  125. package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts.map +1 -0
  126. package/src/core/geom/2d/polygon/polygon2_triangulate.js +1280 -0
  127. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts +28 -0
  128. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts.map +1 -0
  129. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.js +77 -0
  130. package/src/core/geom/2d/quad-tree/qt_match_data_by_circle.d.ts +2 -2
  131. package/src/core/geom/2d/quad-tree/qt_match_data_by_circle.d.ts.map +1 -1
  132. package/src/core/geom/2d/quad-tree/qt_match_data_by_circle.js +1 -1
  133. package/src/core/geom/2d/quad-tree/qt_query_data_raycast.d.ts +2 -2
  134. package/src/core/geom/2d/quad-tree/qt_query_data_raycast.d.ts.map +1 -1
  135. package/src/core/geom/2d/quad-tree/qt_query_data_raycast.js +1 -1
  136. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts +6 -3
  137. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts.map +1 -1
  138. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.js +26 -13
  139. package/src/core/geom/2d/triangle/tri2_signed_area.d.ts +17 -1
  140. package/src/core/geom/2d/triangle/tri2_signed_area.d.ts.map +1 -1
  141. package/src/core/geom/2d/triangle/tri2_signed_area.js +35 -23
  142. package/src/core/geom/2d/v2_morton_encode.d.ts +20 -0
  143. package/src/core/geom/2d/v2_morton_encode.d.ts.map +1 -0
  144. package/src/core/geom/2d/v2_morton_encode.js +23 -0
  145. package/src/core/geom/3d/aabb/AABB3.d.ts +2 -2
  146. package/src/core/geom/3d/aabb/AABB3.d.ts.map +1 -1
  147. package/src/core/geom/3d/aabb/AABB3.js +1 -1
  148. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts.map +1 -1
  149. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.js +4 -1
  150. package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts +27 -0
  151. package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts.map +1 -0
  152. package/src/core/geom/3d/polygon/polygon3_compute_normal.js +60 -0
  153. package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts +34 -0
  154. package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts.map +1 -0
  155. package/src/core/geom/3d/polygon/polygon3_triangulate.js +94 -0
  156. package/src/core/geom/3d/quaternion/quat3_multiply.d.ts +8 -2
  157. package/src/core/geom/3d/quaternion/quat3_multiply.d.ts.map +1 -1
  158. package/src/core/geom/3d/quaternion/quat3_multiply.js +8 -2
  159. package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
  160. package/src/core/geom/3d/shape/ConvexHullShape3D.js +32 -2
  161. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts +2 -2
  162. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts.map +1 -1
  163. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +1 -1
  164. package/src/core/geom/3d/tetrahedra/delaunay/debug/push_boundary_with_validation.d.ts +2 -5
  165. package/src/core/geom/3d/tetrahedra/delaunay/debug/push_boundary_with_validation.d.ts.map +1 -1
  166. package/src/core/geom/3d/tetrahedra/delaunay/debug/push_boundary_with_validation.js +1 -1
  167. package/src/core/geom/3d/tetrahedra/delaunay/debug/validate_cavity_boundary.d.ts +2 -2
  168. package/src/core/geom/3d/tetrahedra/delaunay/debug/validate_cavity_boundary.d.ts.map +1 -1
  169. package/src/core/geom/3d/tetrahedra/delaunay/debug/validate_cavity_boundary.js +1 -1
  170. package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.d.ts +2 -3
  171. package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.d.ts.map +1 -1
  172. package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.js +69 -69
  173. package/src/core/geom/3d/tetrahedra/validate_tetrahedron_neighbourhood.d.ts +2 -3
  174. package/src/core/geom/3d/tetrahedra/validate_tetrahedron_neighbourhood.d.ts.map +1 -1
  175. package/src/core/geom/3d/tetrahedra/validate_tetrahedron_neighbourhood.js +50 -50
  176. package/src/core/geom/3d/topology/struct/TopoEdge.d.ts +2 -2
  177. package/src/core/geom/3d/topology/struct/TopoEdge.d.ts.map +1 -1
  178. package/src/core/geom/3d/topology/struct/TopoEdge.js +1 -1
  179. package/src/core/geom/3d/topology/struct/TopoMesh.d.ts +2 -3
  180. package/src/core/geom/3d/topology/struct/TopoMesh.d.ts.map +1 -1
  181. package/src/core/geom/3d/topology/struct/TopoMesh.js +1 -1
  182. package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts +2 -2
  183. package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts.map +1 -1
  184. package/src/core/geom/3d/topology/struct/TopoTriangle.js +1 -1
  185. package/src/core/geom/3d/topology/struct/TopoVertex.d.ts +2 -2
  186. package/src/core/geom/3d/topology/struct/TopoVertex.d.ts.map +1 -1
  187. package/src/core/geom/3d/topology/struct/TopoVertex.js +1 -1
  188. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts +23 -6
  189. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts.map +1 -1
  190. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.js +268 -124
  191. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts +17 -0
  192. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts.map +1 -0
  193. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.js +44 -0
  194. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts +20 -0
  195. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts.map +1 -0
  196. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.js +40 -0
  197. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts +19 -0
  198. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts.map +1 -0
  199. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.js +34 -0
  200. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts +22 -0
  201. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts.map +1 -0
  202. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.js +37 -0
  203. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts +87 -0
  204. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts.map +1 -0
  205. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.js +599 -0
  206. package/src/core/geom/3d/topology/util/mesh_flood_fill.d.ts +1 -1
  207. package/src/core/geom/3d/topology/util/mesh_flood_fill.js +1 -1
  208. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts +32 -0
  209. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts.map +1 -1
  210. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.js +66 -7
  211. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts +22 -1
  212. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts.map +1 -1
  213. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.js +83 -38
  214. package/src/core/geom/3d/util/aabb3_emit_point_grid.d.ts +2 -2
  215. package/src/core/geom/3d/util/aabb3_emit_point_grid.d.ts.map +1 -1
  216. package/src/core/geom/3d/util/aabb3_emit_point_grid.js +1 -1
  217. package/src/core/geom/MANIFOLD_COMPARISON_2026_08_01.md +554 -0
  218. package/src/core/geom/Quaternion.d.ts +2 -2
  219. package/src/core/geom/Quaternion.d.ts.map +1 -1
  220. package/src/core/geom/Quaternion.js +1 -1
  221. package/src/core/geom/Vector1.d.ts +2 -2
  222. package/src/core/geom/Vector1.d.ts.map +1 -1
  223. package/src/core/geom/Vector1.js +1 -1
  224. package/src/core/geom/packing/max-rect/find_best_container.d.ts +2 -2
  225. package/src/core/geom/packing/max-rect/find_best_container.d.ts.map +1 -1
  226. package/src/core/geom/packing/max-rect/find_best_container.js +1 -1
  227. package/src/core/geom/vec3/v3_cotangent.d.ts +6 -2
  228. package/src/core/geom/vec3/v3_cotangent.d.ts.map +1 -1
  229. package/src/core/geom/vec3/v3_cotangent.js +6 -2
  230. package/src/core/geom/vec3/v3_cross.d.ts +6 -2
  231. package/src/core/geom/vec3/v3_cross.d.ts.map +1 -1
  232. package/src/core/geom/vec3/v3_cross.js +6 -2
  233. package/src/core/geom/vec3/v3_lerp.d.ts +1 -1
  234. package/src/core/geom/vec3/v3_lerp.js +1 -1
  235. package/src/core/geom/vec3/v3_multiply.d.ts +6 -2
  236. package/src/core/geom/vec3/v3_multiply.d.ts.map +1 -1
  237. package/src/core/geom/vec3/v3_multiply.js +6 -2
  238. package/src/core/geom/vec3/v3_subtract.d.ts +6 -2
  239. package/src/core/geom/vec3/v3_subtract.d.ts.map +1 -1
  240. package/src/core/geom/vec3/v3_subtract.js +6 -2
  241. package/src/core/json/abstractJSONSerializer.d.ts +2 -2
  242. package/src/core/json/abstractJSONSerializer.d.ts.map +1 -1
  243. package/src/core/json/abstractJSONSerializer.js +1 -1
  244. package/src/core/lang/reactive/AbstractCachingParser.d.ts +2 -3
  245. package/src/core/lang/reactive/AbstractCachingParser.d.ts.map +1 -1
  246. package/src/core/lang/reactive/AbstractCachingParser.js +1 -1
  247. package/src/core/localization/Localization.d.ts +2 -2
  248. package/src/core/localization/Localization.d.ts.map +1 -1
  249. package/src/core/localization/Localization.js +2 -2
  250. package/src/core/math/noise/create_simplex_noise_2d.d.ts +2 -2
  251. package/src/core/math/noise/create_simplex_noise_2d.d.ts.map +1 -1
  252. package/src/core/math/noise/create_simplex_noise_2d.js +1 -1
  253. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD.js +1 -1
  254. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts +3 -3
  255. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts.map +1 -1
  256. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.js +2 -2
  257. package/src/core/math/random/randomSeed.d.ts +13 -0
  258. package/src/core/math/random/randomSeed.d.ts.map +1 -0
  259. package/src/core/math/random/randomSeed.js +16 -0
  260. package/src/core/math/random/seededRandom_Mulberry32.d.ts +3 -2
  261. package/src/core/math/random/seededRandom_Mulberry32.d.ts.map +1 -1
  262. package/src/core/math/random/seededRandom_Mulberry32.js +1 -1
  263. package/src/core/math/spline/spline3_hermite_apply_transform.d.ts +50 -0
  264. package/src/core/math/spline/spline3_hermite_apply_transform.d.ts.map +1 -0
  265. package/src/core/math/spline/spline3_hermite_apply_transform.js +107 -0
  266. package/src/core/math/spline/spline3_hermite_reverse.d.ts +34 -0
  267. package/src/core/math/spline/spline3_hermite_reverse.d.ts.map +1 -0
  268. package/src/core/math/spline/spline3_hermite_reverse.js +49 -0
  269. package/src/core/math/statistics/hammersley_sequence.d.ts +17 -4
  270. package/src/core/math/statistics/hammersley_sequence.d.ts.map +1 -1
  271. package/src/core/math/statistics/hammersley_sequence.js +25 -16
  272. package/src/core/model/ModuleRegistry.d.ts +2 -2
  273. package/src/core/model/ModuleRegistry.d.ts.map +1 -1
  274. package/src/core/model/ModuleRegistry.js +1 -1
  275. package/src/core/model/node-graph/json/serializeNodeGraphToJSON.d.ts +1 -1
  276. package/src/core/model/node-graph/json/serializeNodeGraphToJSON.js +2 -2
  277. package/src/core/model/object/objectDeepEquals.d.ts +2 -2
  278. package/src/core/model/object/objectDeepEquals.d.ts.map +1 -1
  279. package/src/core/model/object/objectDeepEquals.js +1 -1
  280. package/src/core/model/reactive/model/ReactiveExpression.d.ts +2 -2
  281. package/src/core/model/reactive/model/ReactiveExpression.d.ts.map +1 -1
  282. package/src/core/model/reactive/model/ReactiveExpression.js +1 -1
  283. package/src/core/model/validate_enum_schema.d.ts +2 -3
  284. package/src/core/model/validate_enum_schema.d.ts.map +1 -1
  285. package/src/core/model/validate_enum_schema.js +1 -1
  286. package/src/core/process/Future.d.ts +3 -3
  287. package/src/core/process/Future.d.ts.map +1 -1
  288. package/src/core/process/Future.js +13 -1
  289. package/src/core/process/PromiseWatcher.d.ts.map +1 -1
  290. package/src/core/process/PromiseWatcher.js +9 -2
  291. package/src/core/process/executor/ConcurrentExecutor.d.ts.map +1 -1
  292. package/src/core/process/executor/ConcurrentExecutor.js +12 -2
  293. package/src/core/process/task/Task.d.ts +3 -3
  294. package/src/core/process/task/Task.d.ts.map +1 -1
  295. package/src/core/process/task/Task.js +2 -2
  296. package/src/core/process/task/util/countTask.d.ts +2 -2
  297. package/src/core/process/task/util/countTask.d.ts.map +1 -1
  298. package/src/core/process/task/util/countTask.js +1 -1
  299. package/src/core/process/task/util/randomCountTask.d.ts +2 -2
  300. package/src/core/process/task/util/randomCountTask.d.ts.map +1 -1
  301. package/src/core/process/task/util/randomCountTask.js +1 -1
  302. package/src/core/process/worker/WorkerProxy.d.ts.map +1 -1
  303. package/src/core/process/worker/WorkerProxy.js +5 -2
  304. package/src/core/process/worker/extractTransferables.d.ts.map +1 -1
  305. package/src/core/process/worker/extractTransferables.js +4 -1
  306. package/src/engine/Engine.d.ts +12 -12
  307. package/src/engine/Engine.d.ts.map +1 -1
  308. package/src/engine/Engine.js +149 -10
  309. package/src/engine/animation/Animations.d.ts +4 -4
  310. package/src/engine/animation/Animations.d.ts.map +1 -1
  311. package/src/engine/animation/Animations.js +2 -2
  312. package/src/engine/animation/EntityAnimation.d.ts +5 -5
  313. package/src/engine/animation/EntityAnimation.d.ts.map +1 -1
  314. package/src/engine/animation/EntityAnimation.js +2 -2
  315. package/src/engine/animation/TransitionFunctions.d.ts +1 -4
  316. package/src/engine/animation/TransitionFunctions.d.ts.map +1 -1
  317. package/src/engine/animation/TransitionFunctions.js +1 -1
  318. package/src/engine/animation/Tween.d.ts +4 -4
  319. package/src/engine/animation/Tween.d.ts.map +1 -1
  320. package/src/engine/animation/Tween.js +2 -2
  321. package/src/engine/asset/AssetManager.d.ts +6 -6
  322. package/src/engine/asset/AssetManager.d.ts.map +1 -1
  323. package/src/engine/asset/AssetManager.js +1411 -1411
  324. package/src/engine/asset/AssetRequest.d.ts +4 -4
  325. package/src/engine/asset/AssetRequest.d.ts.map +1 -1
  326. package/src/engine/asset/AssetRequest.js +3 -3
  327. package/src/engine/asset/loaders/ArrayBufferLoader.d.ts.map +1 -1
  328. package/src/engine/asset/loaders/ArrayBufferLoader.js +7 -0
  329. package/src/engine/asset/loaders/AssetLoader.d.ts +3 -3
  330. package/src/engine/asset/loaders/AssetLoader.d.ts.map +1 -1
  331. package/src/engine/asset/loaders/AssetLoader.js +2 -2
  332. package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +0 -10
  333. package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -1
  334. package/src/engine/ecs/EntityComponentDataset.d.ts +6 -6
  335. package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
  336. package/src/engine/ecs/EntityComponentDataset.js +3 -3
  337. package/src/engine/ecs/EntityManager.d.ts +4 -4
  338. package/src/engine/ecs/EntityManager.js +4 -4
  339. package/src/engine/ecs/EntityObserver.d.ts +3 -3
  340. package/src/engine/ecs/EntityObserver.d.ts.map +1 -1
  341. package/src/engine/ecs/EntityObserver.js +2 -2
  342. package/src/engine/ecs/System.d.ts +4 -4
  343. package/src/engine/ecs/System.d.ts.map +1 -1
  344. package/src/engine/ecs/System.js +2 -2
  345. package/src/engine/ecs/dynamic_actions/DynamicActorSystem.d.ts +2 -3
  346. package/src/engine/ecs/dynamic_actions/DynamicActorSystem.d.ts.map +1 -1
  347. package/src/engine/ecs/dynamic_actions/DynamicActorSystem.js +1 -1
  348. package/src/engine/ecs/grid/pick.d.ts +4 -2
  349. package/src/engine/ecs/grid/pick.d.ts.map +1 -1
  350. package/src/engine/ecs/grid/pick.js +1 -1
  351. package/src/engine/ecs/parent/EntityNode.d.ts +4 -4
  352. package/src/engine/ecs/parent/EntityNode.d.ts.map +1 -1
  353. package/src/engine/ecs/parent/EntityNode.js +2 -2
  354. package/src/engine/ecs/speaker/lines/sets/LineSetDescription.d.ts.map +1 -1
  355. package/src/engine/ecs/speaker/lines/sets/LineSetDescription.js +3 -1
  356. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts +2 -2
  357. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts.map +1 -1
  358. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +1 -1
  359. package/src/engine/ecs/storage/binary/collection/BinaryCollectionHeaderCodec.d.ts +1 -2
  360. package/src/engine/ecs/storage/binary/collection/BinaryCollectionHeaderCodec.d.ts.map +1 -1
  361. package/src/engine/ecs/systems/AnimationSystem.d.ts +0 -5
  362. package/src/engine/ecs/systems/AnimationSystem.d.ts.map +1 -1
  363. package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts +2 -2
  364. package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts.map +1 -1
  365. package/src/engine/ecs/terrain/ecs/TerrainSystem.js +5 -2
  366. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +34 -5
  367. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
  368. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +87 -26
  369. package/src/engine/ecs/terrain/util/obtainTerrain.d.ts +2 -3
  370. package/src/engine/ecs/terrain/util/obtainTerrain.d.ts.map +1 -1
  371. package/src/engine/ecs/terrain/util/obtainTerrain.js +1 -1
  372. package/src/engine/ecs/util/hideEntityGracefully.js +2 -2
  373. package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +446 -0
  374. package/src/engine/graphics/FrameRunner.d.ts +2 -2
  375. package/src/engine/graphics/FrameRunner.d.ts.map +1 -1
  376. package/src/engine/graphics/FrameRunner.js +1 -1
  377. package/src/engine/graphics/GraphicsEngine.d.ts +60 -9
  378. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  379. package/src/engine/graphics/GraphicsEngine.js +197 -25
  380. package/src/engine/graphics/camera/CameraShake.d.ts +6 -6
  381. package/src/engine/graphics/camera/CameraShake.d.ts.map +1 -1
  382. package/src/engine/graphics/context/WebGLContextFailureReason.d.ts +9 -0
  383. package/src/engine/graphics/context/WebGLContextFailureReason.d.ts.map +1 -0
  384. package/src/engine/graphics/context/WebGLContextFailureReason.js +17 -0
  385. package/src/engine/graphics/context/WebGLContextMonitor.d.ts +106 -0
  386. package/src/engine/graphics/context/WebGLContextMonitor.d.ts.map +1 -0
  387. package/src/engine/graphics/context/WebGLContextMonitor.js +341 -0
  388. package/src/engine/graphics/context/WebGLContextState.d.ts +14 -0
  389. package/src/engine/graphics/context/WebGLContextState.d.ts.map +1 -0
  390. package/src/engine/graphics/context/WebGLContextState.js +24 -0
  391. package/src/engine/graphics/context/testWebGLContextLoss.d.ts +2 -0
  392. package/src/engine/graphics/context/testWebGLContextLoss.d.ts.map +1 -0
  393. package/src/engine/graphics/context/testWebGLContextLoss.js +696 -0
  394. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts +2 -2
  395. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
  396. package/src/engine/graphics/ecs/camera/CameraSystem.js +1 -1
  397. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts.map +1 -1
  398. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.js +68 -32
  399. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts +14 -0
  400. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts.map +1 -0
  401. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.js +41 -0
  402. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.d.ts +2 -3
  403. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.d.ts.map +1 -1
  404. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -2
  405. package/src/engine/graphics/ecs/light/three/ThreeLightCache.d.ts +1 -1
  406. package/src/engine/graphics/ecs/light/three/ThreeLightCache.js +1 -1
  407. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts +4 -5
  408. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
  409. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +7 -2
  410. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +1 -1
  411. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
  412. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +2 -1
  413. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +1 -1
  414. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts.map +1 -1
  415. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.js +3 -5
  416. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.d.ts.map +1 -1
  417. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js +3 -2
  418. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.d.ts.map +1 -1
  419. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +3 -1
  420. package/src/engine/graphics/geometry/computeBoundingSphereFromVertexData.d.ts +2 -2
  421. package/src/engine/graphics/geometry/computeBoundingSphereFromVertexData.js +1 -1
  422. package/src/engine/graphics/geometry/computeMeshSurfaceArea.js +1 -1
  423. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts +2 -2
  424. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts.map +1 -1
  425. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +1 -1
  426. package/src/engine/graphics/geometry/ribbon/Ribbon.d.ts +2 -2
  427. package/src/engine/graphics/geometry/ribbon/Ribbon.d.ts.map +1 -1
  428. package/src/engine/graphics/geometry/ribbon/Ribbon.js +1 -1
  429. package/src/engine/graphics/load_and_set_cubemap_v0.d.ts +5 -0
  430. package/src/engine/graphics/load_and_set_cubemap_v0.d.ts.map +1 -1
  431. package/src/engine/graphics/load_and_set_cubemap_v0.js +26 -21
  432. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +2 -2
  433. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
  434. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +1 -1
  435. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts +2 -2
  436. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts.map +1 -1
  437. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.js +1 -1
  438. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts +2 -2
  439. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +1 -1
  440. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +1 -1
  441. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
  442. package/src/engine/graphics/particles/particular/group/ParticleGroup.js +19 -8
  443. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +1 -1
  444. package/src/engine/graphics/render/RendererPool.d.ts +4 -4
  445. package/src/engine/graphics/render/RendererPool.d.ts.map +1 -1
  446. package/src/engine/graphics/render/RendererPool.js +2 -2
  447. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +5 -4
  448. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
  449. package/src/engine/graphics/render/frame_graph/FrameGraph.js +2 -2
  450. package/src/engine/graphics/render/layers/RenderLayer.d.ts +2 -2
  451. package/src/engine/graphics/render/layers/RenderLayer.d.ts.map +1 -1
  452. package/src/engine/graphics/render/layers/RenderLayer.js +1 -1
  453. package/src/engine/graphics/render/layers/RenderLayerUtils.js +1 -1
  454. package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts +3 -1
  455. package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts.map +1 -1
  456. package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.js +681 -681
  457. package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.d.ts +2 -2
  458. package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.d.ts.map +1 -1
  459. package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.js +145 -145
  460. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts +2 -1
  461. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
  462. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.d.ts.map +1 -1
  463. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +10 -3
  464. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
  465. package/src/engine/graphics/texture/atlas/TextureAtlas.js +4 -1
  466. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.d.ts.map +1 -1
  467. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js +11 -0
  468. package/src/engine/graphics/texture/cubemap/load_environment_map.d.ts.map +1 -1
  469. package/src/engine/graphics/texture/cubemap/load_environment_map.js +5 -2
  470. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +2 -2
  471. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
  472. package/src/engine/graphics/texture/sampler/Sampler2D.js +1 -1
  473. package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.d.ts.map +1 -1
  474. package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js +26 -18
  475. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts +15 -2
  476. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts.map +1 -1
  477. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js +29 -3
  478. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts +14 -1
  479. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts.map +1 -1
  480. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +148 -171
  481. package/src/engine/graphics/texture/sampler/sampler2d_combine.d.ts +2 -2
  482. package/src/engine/graphics/texture/sampler/sampler2d_combine.d.ts.map +1 -1
  483. package/src/engine/graphics/texture/sampler/sampler2d_combine.js +1 -1
  484. package/src/engine/graphics/texture/sampler/sampler2d_paint.js +1 -1
  485. package/src/engine/graphics/texture/sampler/util/bitSet2Sampler2D.js +2 -2
  486. package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts +1 -1
  487. package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.js +2 -2
  488. package/src/engine/grid/obstacle/GridObstacle.d.ts +2 -2
  489. package/src/engine/grid/obstacle/GridObstacle.d.ts.map +1 -1
  490. package/src/engine/grid/obstacle/GridObstacle.js +1 -1
  491. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.d.ts.map +1 -1
  492. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +10 -3
  493. package/src/engine/intelligence/behavior/ecs/BehaviorComponent.d.ts +2 -2
  494. package/src/engine/intelligence/behavior/ecs/BehaviorComponent.d.ts.map +1 -1
  495. package/src/engine/intelligence/behavior/ecs/BehaviorComponent.js +1 -1
  496. package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts +3 -3
  497. package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts.map +1 -1
  498. package/src/engine/intelligence/behavior/primitive/ActionBehavior.js +1 -1
  499. package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts +2 -1
  500. package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts.map +1 -1
  501. package/src/engine/intelligence/blackboard/Blackboard.d.ts +4 -4
  502. package/src/engine/intelligence/blackboard/Blackboard.d.ts.map +1 -1
  503. package/src/engine/intelligence/blackboard/Blackboard.js +2 -2
  504. package/src/engine/intelligence/mcts/MonteCarlo.d.ts +17 -15
  505. package/src/engine/intelligence/mcts/MonteCarlo.d.ts.map +1 -1
  506. package/src/engine/intelligence/mcts/MonteCarlo.js +345 -345
  507. package/src/engine/intelligence/mcts/StateNode.d.ts +2 -2
  508. package/src/engine/intelligence/mcts/StateNode.d.ts.map +1 -1
  509. package/src/engine/intelligence/mcts/StateNode.js +364 -364
  510. package/src/engine/intelligence/optimization/RandomOptimizer.d.ts +3 -3
  511. package/src/engine/intelligence/optimization/RandomOptimizer.d.ts.map +1 -1
  512. package/src/engine/intelligence/optimization/RandomOptimizer.js +2 -2
  513. package/src/engine/intelligence/optimization/optimize_cyclic_sequence_pairwise.d.ts +2 -2
  514. package/src/engine/intelligence/optimization/optimize_cyclic_sequence_pairwise.d.ts.map +1 -1
  515. package/src/engine/intelligence/optimization/optimize_cyclic_sequence_pairwise.js +1 -1
  516. package/src/engine/knowledge/database/StaticKnowledgeDataTable.d.ts +4 -5
  517. package/src/engine/knowledge/database/StaticKnowledgeDataTable.d.ts.map +1 -1
  518. package/src/engine/knowledge/database/StaticKnowledgeDataTable.js +2 -2
  519. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts +14 -0
  520. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts.map +1 -0
  521. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.js +38 -0
  522. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts +0 -5
  523. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
  524. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
  525. package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +433 -425
  526. package/src/engine/physics/constraint/solve_constraints.d.ts +4 -1
  527. package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
  528. package/src/engine/physics/constraint/solve_constraints.js +38 -13
  529. package/src/engine/physics/contact/ManifoldStore.d.ts +15 -3
  530. package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
  531. package/src/engine/physics/contact/ManifoldStore.js +15 -3
  532. package/src/engine/physics/ecs/Joint.d.ts +7 -4
  533. package/src/engine/physics/ecs/Joint.d.ts.map +1 -1
  534. package/src/engine/physics/ecs/Joint.js +7 -4
  535. package/src/engine/physics/ecs/PhysicsSystem.d.ts +14 -0
  536. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  537. package/src/engine/physics/ecs/PhysicsSystem.js +16 -0
  538. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -8
  539. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts.map +1 -1
  540. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -7
  541. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts.map +1 -1
  542. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts +15 -7
  543. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
  544. package/src/engine/physics/narrowphase/convex_convex_manifold.js +33 -10
  545. package/src/engine/physics/narrowphase/refine_ray_concave.d.ts +6 -2
  546. package/src/engine/physics/narrowphase/refine_ray_concave.d.ts.map +1 -1
  547. package/src/engine/physics/narrowphase/refine_ray_concave.js +6 -2
  548. package/src/engine/physics/narrowphase/refine_ray_hit.d.ts +6 -2
  549. package/src/engine/physics/narrowphase/refine_ray_hit.d.ts.map +1 -1
  550. package/src/engine/physics/narrowphase/refine_ray_hit.js +6 -2
  551. package/src/engine/physics/queries/raycast.d.ts.map +1 -1
  552. package/src/engine/physics/queries/raycast.js +11 -4
  553. package/src/engine/save/GameStateLoader.d.ts +2 -2
  554. package/src/engine/save/GameStateLoader.d.ts.map +1 -1
  555. package/src/engine/save/GameStateLoader.js +1 -1
  556. package/src/engine/save/Storage.d.ts +4 -4
  557. package/src/engine/save/Storage.d.ts.map +1 -1
  558. package/src/engine/save/Storage.js +2 -2
  559. package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
  560. package/src/engine/save/storage/IndexedDBStorage.js +24 -5
  561. package/src/engine/simulation/Ticker.d.ts +12 -0
  562. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  563. package/src/engine/simulation/Ticker.js +18 -0
  564. package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
  565. package/src/engine/sound/simulation/AcousticSimulator.js +9 -1
  566. package/src/engine/sound/simulation/core/VolumeField.d.ts +6 -2
  567. package/src/engine/sound/simulation/core/VolumeField.d.ts.map +1 -1
  568. package/src/engine/sound/simulation/core/VolumeField.js +6 -2
  569. package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts +6 -2
  570. package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts.map +1 -1
  571. package/src/engine/sound/simulation/probe/AcousticProbeField.js +6 -2
  572. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts +6 -2
  573. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts.map +1 -1
  574. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.js +6 -2
  575. package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts +3 -1
  576. package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts.map +1 -1
  577. package/src/engine/sound/simulation/probe/bakeProbeReflectors.js +3 -1
  578. package/src/engine/sound/simulation/prototypeAcousticSolver.js +1652 -1652
  579. package/src/engine/sound/sopra/util/buildAttenuationCurve.d.ts +2 -2
  580. package/src/engine/sound/sopra/util/buildAttenuationCurve.d.ts.map +1 -1
  581. package/src/engine/sound/sopra/util/buildAttenuationCurve.js +40 -40
  582. package/src/engine/ui/GUIEngine.d.ts.map +1 -1
  583. package/src/engine/ui/GUIEngine.js +8 -1
  584. package/src/engine/ui/notification/NotificationManager.d.ts +5 -5
  585. package/src/engine/ui/notification/NotificationManager.d.ts.map +1 -1
  586. package/src/engine/ui/notification/NotificationManager.js +4 -4
  587. package/src/engine/ui/tiles2d/TileGrid.d.ts +2 -2
  588. package/src/engine/ui/tiles2d/TileGrid.d.ts.map +1 -1
  589. package/src/engine/ui/tiles2d/TileGrid.js +1 -1
  590. package/src/generation/filtering/numeric/complex/CellFilterSimplexNoise.d.ts +1 -1
  591. package/src/generation/filtering/numeric/complex/CellFilterSimplexNoise.js +1 -1
  592. package/src/generation/grid/generation/road/GridTaskGenerateRoads.js +2 -2
  593. package/src/generation/grid/generation/util/buildPathFromDistanceMap.d.ts +1 -1
  594. package/src/generation/grid/generation/util/buildPathFromDistanceMap.js +1 -1
  595. package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts +2 -1
  596. package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts.map +1 -1
  597. package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts +2 -1
  598. package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts.map +1 -1
  599. package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.d.ts +2 -1
  600. package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.d.ts.map +1 -1
  601. package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.d.ts +4 -3
  602. package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.d.ts.map +1 -1
  603. package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.js +1 -1
  604. package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.d.ts +2 -1
  605. package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.d.ts.map +1 -1
  606. package/src/generation/theme/TerrainTheme.d.ts.map +1 -1
  607. package/src/generation/theme/TerrainTheme.js +2 -1
  608. package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
  609. package/src/generation/theme/ThemeEngine.js +6 -5
  610. package/src/view/ViewGroup.d.ts.map +1 -1
  611. package/src/view/ViewGroup.js +9 -7
  612. package/src/view/common/VirtualListView.d.ts +1 -1
  613. package/src/view/common/VirtualListView.js +1 -1
  614. package/src/view/graphics/WebGLContextFailureView.d.ts +19 -0
  615. package/src/view/graphics/WebGLContextFailureView.d.ts.map +1 -0
  616. package/src/view/graphics/WebGLContextFailureView.js +76 -0
  617. package/src/view/minimap/Minimap.d.ts +8 -0
  618. package/src/view/minimap/Minimap.d.ts.map +1 -1
  619. package/src/view/minimap/Minimap.js +16 -3
  620. package/src/view/minimap/dom/MinimapMarkerView.d.ts.map +1 -1
  621. package/src/view/minimap/dom/MinimapMarkerView.js +3 -1
  622. package/src/view/tooltip/gml/compiler/GMLReferenceCompiler.d.ts +2 -2
  623. package/src/view/tooltip/gml/compiler/GMLReferenceCompiler.d.ts.map +1 -1
  624. package/src/view/tooltip/gml/compiler/GMLReferenceCompiler.js +1 -1
@@ -0,0 +1,296 @@
1
+ # API-GAP analysis — `meep/src/core`
2
+
3
+ Scope: `H:/git/moh/app/src/mir-engine/meep/src/core/`. Every path below is public API
4
+ (`package.json` exports `./src/*`, no barrels).
5
+
6
+ 18 items. 6 MAJOR, 12 MINOR. Two corrections to the lead's pre-findings are at the bottom,
7
+ along with the packages that came back clean.
8
+
9
+ ---
10
+
11
+ ### APIC-1 `BinaryBuffer.writeFloat64Array`
12
+ - **Severity**: MAJOR
13
+ - **Package**: core/binary
14
+ - **Test met**: A (and D — the spec file names the missing symbol)
15
+ - **Absent symbol**: `BinaryBuffer.prototype.writeFloat64Array(source, source_offset, length)`
16
+ - **Evidence**: `core/binary/BinaryBuffer.js:547` defines `readFloat64Array`. Every other bulk
17
+ reader has a matching bulk writer — `writeFloat16Array:574`, `writeFloat32Array:559`,
18
+ `writeInt8Array:689`, `writeInt16Array:707`, `writeInt32Array:725`, `writeUint8Array:756`,
19
+ `writeUint16Array:809`, `writeUint32Array:982`. Float64 is the single hole in an otherwise
20
+ complete 8×8 matrix. The repo's own test is literally named `test("writeFloat64Array", ...)`
21
+ (`core/binary/BinaryBuffer.spec.js:4`) and then hand-rolls the write as a
22
+ `for (…) buffer.writeFloat64(expected[i])` loop (lines 7–10) because the method does not exist.
23
+ `engine/graphics/texture/sampler/serialization/TextureBinaryBufferSerializer.js:68` reads
24
+ `Float64Array` through the bulk reader; the write side of that same switch has no bulk
25
+ counterpart to call.
26
+ - **Searched for**: `writeFloat64Array`, `readFloat64Array` across all of `src/` — three hits
27
+ total (reader, reader use, and the misnamed spec).
28
+
29
+ ### APIC-2 `Uint32Map` / `PairUint32Map` cannot be enumerated at all
30
+ - **Severity**: MAJOR
31
+ - **Package**: core/collection
32
+ - **Test met**: B + C
33
+ - **Absent symbol**: `Uint32Map.prototype.forEach` (and `keys()` / `values()` / `entries()` /
34
+ `[Symbol.iterator]`); same for `PairUint32Map`
35
+ - **Evidence**: `core/collection/Uint32Map.js:57` documents itself as "Non-allocating
36
+ `Map<uint32, uint32>`" and implements `get:126`, `set:174`, `has:165`, `delete:249`,
37
+ `clear:315`, `get size:109` — the whole Map contract *except* iteration. There is no way to
38
+ read back what is stored without touching the `__data` typed array. Sibling
39
+ `core/collection/map/HashMap.js` provides `[Symbol.iterator]:840`, `entries():873`,
40
+ `values():883`, `keys():894`, `forEach:769`. `core/collection/PairUint32Map.js:56` has the
41
+ identical shape and the identical hole. A user who inserts into these maps and later needs to
42
+ walk them must reach into internals or keep a parallel key list.
43
+ - **Searched for**: `forEach|Symbol.iterator|keys\(|values\(|entries\(` inside both files (0 hits).
44
+
45
+ ### APIC-3 `BiMap.delete`
46
+ - **Severity**: MAJOR
47
+ - **Package**: core/collection/map
48
+ - **Test met**: A + C
49
+ - **Absent symbol**: `BiMap.prototype.delete(key)` (also absent: `has`, `size`)
50
+ - **Evidence**: `core/collection/map/BiMap.js` is 47 lines: `add:24`, `getKeyByValue:34`,
51
+ `getValueByKey:43`, plus `BiMap.prototype.get = …getValueByKey` and
52
+ `BiMap.prototype.set = …add` at lines 46–47 — i.e. it deliberately presents the standard `Map`
53
+ surface. Insert exists, remove does not, so a mapping can never be retired. The only workaround
54
+ is to drive the two public `forward` / `backward` `Map`s by hand, which additionally requires
55
+ knowing that `add(key, value)` stores `forward.set(value, key)` (the fields are populated
56
+ inverted relative to their names) — that is exactly "reach into internals".
57
+ - **Searched for**: `delete|remove|unset|size|has` in `BiMap.js` (0 hits); `BiMap` across `src/`.
58
+
59
+ ### APIC-4 `CSRGraph` has an `arrayBuffer` getter and no way back
60
+ - **Severity**: MAJOR
61
+ - **Package**: core/graph/csr
62
+ - **Test met**: A + D
63
+ - **Absent symbol**: `CSRGraph.fromArrayBuffer(vertex_count, adjacency_length, buffer)`
64
+ (or a `set arrayBuffer(buffer)`)
65
+ - **Evidence**: `core/graph/csr/CSRGraph.js:112` exposes `get arrayBuffer()` whose JSDoc
66
+ (lines 107–111) states it is "Useful for fast bulk operations and for **passing the graph
67
+ between Web Workers via transfer**". Nothing in the class or package can adopt such a buffer on
68
+ the receiving side: the only factory is `static fromArrays(...)` at line 310, which takes four
69
+ separate `ArrayLike`s and **copies** into a freshly allocated buffer. The documented
70
+ worker-transfer workflow therefore cannot be completed with the public API — the receiver must
71
+ recompute the four sub-array offsets by hand (`(vertex_count + 1)`, `adjacency_length * 2`,
72
+ `vertex_count`) and rebuild the views. The peer container `core/collection/table/RowFirstTable.js`
73
+ gets this right: `set array_buffer(buffer)` at line 109, documented "Useful for deserialization".
74
+ - **Searched for**: `fromArrayBuffer|set arrayBuffer|array_buffer|adopt|wrap` in `CSRGraph.js`
75
+ and across `core/graph/`.
76
+
77
+ ### APIC-5 The indexed float heaps have no peek
78
+ - **Severity**: MAJOR
79
+ - **Package**: core/collection/heap
80
+ - **Test met**: B
81
+ - **Absent symbol**: `IndexedFloatMinHeap.prototype.peek_min` / `peek_score` / `get_score(id)`
82
+ (same on `IndexedFloatMaxHeap`: `peek_max` / `peek_score` / `get_score`)
83
+ - **Evidence**: `core/collection/heap/IndexedFloatMinHeap.js` exposes `size:64`, `clear:72`,
84
+ `contains:82`, `insert:174`, `pop_min:192`, `update:219`, `remove:238` — you can only see the
85
+ top by destroying it. Every peer heap in the same package offers a non-destructive read:
86
+ `Uint32Heap.js` has `top_id:242`, `peek_score:258`, `peek_min:266`, `get_score:413`;
87
+ `Uint32Heap4.js` has the same four; `FibonacciHeap.js` has `peek_score:140`, `peek_min:151`,
88
+ `get_score:511`; `BinaryHeap.js` has `peek:190`. The class's own header (line 23) says
89
+ "Storage layout mirrors meep's `Uint32Heap`", so it is explicitly a peer of the class it
90
+ diverges from, and its stated use case (line 9: "shortest-path / A* distance frontiers,
91
+ deadline queues") is the canonical peek-the-frontier workload. Workaround is `pop_min()` +
92
+ re-`insert()` (mutates, O(log n), and loses tie order) or reading `__data_float32`.
93
+ `is_empty()` and `insert_or_update()` are missing from the same two classes for the same reason.
94
+ - **Searched for**: `peek|top|min_score|get_score` in both IndexedFloat heap files (only a local
95
+ `const top_id` variable inside `pop_min`).
96
+
97
+ ### APIC-6 `ObservedInteger.process`
98
+ - **Severity**: MAJOR
99
+ - **Package**: core/model
100
+ - **Test met**: B
101
+ - **Absent symbol**: `ObservedInteger.prototype.process(f, thisArg)`
102
+ - **Evidence**: `process` is this family's "invoke now, then on every change" binder — the
103
+ standard way to attach UI to an observable. It exists on `ObservedValue.js:80`,
104
+ `ObservedBoolean.js:127`, `ObservedString.js:110` and `ObservedEnum.js:127`, with identical
105
+ bodies (`this.onChanged.add(f, thisArg); f.call(thisArg, v, v); return this;`).
106
+ `core/model/ObservedInteger.js` — the most commonly bound member of the family, and the one
107
+ with `onChanged` declared at line 10 — does not have it. Beyond the boilerplate, this breaks
108
+ polymorphic binder code: any helper that accepts "an observed value" and calls `.process()`
109
+ throws on `ObservedInteger`. `.process(` is used 32 times across `src/`.
110
+ - **Searched for**: `process` in `ObservedInteger.js` (0 hits, including the trailing
111
+ `prototype.` alias block at line 208).
112
+
113
+ ---
114
+
115
+ ### APIC-7 `Stack.size`
116
+ - **Severity**: MINOR
117
+ - **Package**: core/collection
118
+ - **Test met**: B
119
+ - **Absent symbol**: `Stack.prototype.size` (or `length`)
120
+ - **Evidence**: `core/collection/Stack.js:7` offers `asArray:26`, `isEmpty:34`, `remove:43`,
121
+ `push:58`, `pop:71`, `peek:89`, `clear:96` — no element count. Every sibling container has one:
122
+ `queue/Deque.js:200 size()`, `set/ArraySet.js:28 get size()`, `map/HashMap.js:254 get size()`,
123
+ `set/HashSet.js:33 get size()`, `heap/BinaryHeap.js:260 size()`, `Uint32MinHeap.js:42 get size()`.
124
+ Workaround `stack.asArray().length` copies the whole backing array.
125
+ - **Searched for**: `size|length|count|depth` in `Stack.js`.
126
+
127
+ ### APIC-8 `ArraySet.removeAll`
128
+ - **Severity**: MINOR
129
+ - **Package**: core/collection/set
130
+ - **Test met**: A
131
+ - **Absent symbol**: `ArraySet.prototype.removeAll(elements)`
132
+ - **Evidence**: `core/collection/set/ArraySet.js` has `add:57`, `remove:74`, `addAll:120` and
133
+ `setFromArray:132`, but no bulk removal — the `addAll`/`removeAll` pair is broken in one
134
+ direction. (`clear:110` removes everything, which is not the same operation.) `List`, the
135
+ analogous observable container, has both `addAll:297` and `removeAll:388`
136
+ (`core/collection/list/List.js`).
137
+ - **Searched for**: `removeAll|removeMany|deleteAll|subtract` in `ArraySet.js` and `core/collection/set/`.
138
+
139
+ ### APIC-9 `ArraySet[Symbol.iterator]` — further instances of the missing-iterator pattern
140
+ - **Severity**: MINOR
141
+ - **Package**: core/collection, core/binary
142
+ - **Test met**: B + C
143
+ - **Absent symbol**: `ArraySet.prototype[Symbol.iterator]` (same absence on `RingBuffer`,
144
+ `Uint32Map`, `PairUint32Map`, `BitSet`)
145
+ - **Evidence**: this is the lead's `List` finding recurring elsewhere. `set/HashSet.js:70` and
146
+ `map/HashMap.js:840` and `queue/Deque.js:416` are generators, so `for…of` and spread work on
147
+ those; `set/ArraySet.js` (has `forEach:160`, `asArray:170`) and `RingBuffer.js` (has
148
+ `forEach:222`, `contains:245`) are visibly iterable collections where `for…of` throws.
149
+ `binary/BitSet.js` exposes `nextSetBit:264` so iteration is at least expressible; the four
150
+ container classes above have no such escape hatch beyond `asArray()`.
151
+ - **Searched for**: `Symbol.iterator` across `core/collection/` and `core/binary/`.
152
+
153
+ ### APIC-10 `BitImage2` can set a bit but never clear one
154
+ - **Severity**: MINOR
155
+ - **Package**: core/binary
156
+ - **Test met**: A + B
157
+ - **Absent symbol**: `BitImage2.prototype.clear(x, y)`
158
+ - **Evidence**: `core/binary/BitImage2.js` has `get(x, y):34` and `set(x, y):44`, and the only
159
+ way to unset anything is `reset():49`, which zeroes the entire image. The sibling bit container
160
+ `core/binary/BitSet.js` has the full pair — `set(bit_index, value):385` and
161
+ `clear(bit_index):424`, plus `setRange`/`clearRange` and `getAndSet`/`getAndClear`. A 2D
162
+ occupancy mask that cannot retract a placement is a one-way structure.
163
+ - **Searched for**: `clear|unset|reset|toggle` in `BitImage2.js` (only `reset()` and a doc
164
+ mention of clearing `out`).
165
+
166
+ ### APIC-11 `BitSet.previousClearBit`
167
+ - **Severity**: MINOR
168
+ - **Package**: core/binary
169
+ - **Test met**: A
170
+ - **Absent symbol**: `BitSet.prototype.previousClearBit(from_index)`
171
+ - **Evidence**: `core/binary/BitSet.js` implements three of the four scan directions —
172
+ `previousSetBit:220`, `nextSetBit:264`, `nextClearBit:324`. The class is modelled on
173
+ `java.util.BitSet` (same `cardinality`, `getAndSet`, `nextSetBit`, `previousSetBit` naming),
174
+ which defines all four. Backwards free-slot search (allocators scanning down) has to be
175
+ hand-written.
176
+ - **Searched for**: `previousClearBit|prevClearBit|previous_clear` across `src/` (0 hits).
177
+
178
+ ### APIC-12 `Signal.send7`
179
+ - **Severity**: MINOR
180
+ - **Package**: core/events/signal
181
+ - **Test met**: A/B
182
+ - **Absent symbol**: `Signal.prototype.send7(a, b, c, d, e, f, g)`
183
+ - **Evidence**: `core/events/signal/Signal.js` defines the monomorphic fast-dispatch ladder
184
+ `send0:378`, `send1:430`, `send2:481`, `send3:532`, `send4:584`, `send5:637`, `send6:691`,
185
+ `send8:747` — 7 is skipped, 8 is present. The class doc at line 325 says the generic
186
+ `dispatch(...args)` is "always" slower and directs users to the `sendN` forms, so a 7-argument
187
+ signal is pushed onto the documented slow path for no reason.
188
+ - **Searched for**: `send7` across all of `src/` (0 hits).
189
+
190
+ ### APIC-13 `NumericInterval.intersect`
191
+ - **Severity**: MINOR
192
+ - **Package**: core/math/interval
193
+ - **Test met**: A
194
+ - **Absent symbol**: `NumericInterval.prototype.intersect(other)`
195
+ - **Evidence**: `core/math/interval/NumericInterval.js:209` implements `union(other)` (mutating,
196
+ min/max), plus `overlaps:223` and `contains:234` — the predicates for intersection are there but
197
+ the operation is not. This is the mirror image of the lead's `compute_set_intersection` /
198
+ no-union finding, in the same repo. The free functions next to it don't cover it either:
199
+ `overlap1D.js` returns the overlap *magnitude*, `separation1D.js` the gap, `intersects1D.js` a
200
+ boolean — none produce the intersecting interval.
201
+ - **Searched for**: `intersect` in `NumericInterval.js`; `interval_intersect|intersect1D|
202
+ intersection1D|clampToInterval` across `src/` (0 hits).
203
+
204
+ ### APIC-14 `string_strip_leading`
205
+ - **Severity**: MINOR
206
+ - **Package**: core/primitives/strings
207
+ - **Test met**: A
208
+ - **Absent symbol**: `string_strip_leading(string, leading_sequence)`
209
+ - **Evidence**: `core/primitives/strings/string_strip_trailing.js:7` exists (repeatedly strips a
210
+ suffix sequence). The prefix half does not. The package is otherwise scrupulous about pairing —
211
+ `insert_before.js`/`insert_after.js`, `insert_before_or_replace.js`/`insert_after_or_replace.js`
212
+ are all present.
213
+ - **Searched for**: `string_strip_leading|strip_leading|trimStart|strip_prefix` across `src/` (0 hits).
214
+
215
+ ### APIC-15 `de_interleave_3_bits`
216
+ - **Severity**: MINOR
217
+ - **Package**: core/binary
218
+ - **Test met**: A + B
219
+ - **Absent symbol**: `de_interleave_3_bits(interleaved)` (the compact-by-3 inverse of `split_by_3`)
220
+ - **Evidence**: a concrete instance of the lead's "Morton encode without decode" pattern.
221
+ `core/binary/split_by_2.js` (spread bits 2 apart) *does* have its inverse next to it —
222
+ `core/binary/de_interleave_2_bits.js`. `core/binary/split_by_3.js` (spread bits 3 apart, the
223
+ 3D Morton primitive) has none, so the 3D case is encode-only while the 2D case round-trips.
224
+ - **Searched for**: `de_interleave_3|compact_by_3|compact_by_2|morton.*decode|unmorton|demorton`
225
+ across `src/` (0 hits).
226
+
227
+ ### APIC-16 `core/path` decomposes paths but cannot compose one
228
+ - **Severity**: MINOR
229
+ - **Package**: core/path
230
+ - **Test met**: A
231
+ - **Absent symbol**: `path_join(...parts)` (and its usual companion `path_normalize`)
232
+ - **Evidence**: the package is a faithful subset of the standard path module —
233
+ `computePathBase.js` (basename), `computePathDirectory.js` (dirname),
234
+ `computeFileExtension.js` (extname), `computeFileName.js`, `PATH_SEPARATOR.js`,
235
+ `convertPathToURL.js`. Every function splits a path apart; none puts one back together, so
236
+ `dirname + child` (with duplicate-separator and `..`/`.` handling) is left to callers.
237
+ `convertPathToURL.js` already contains a private, ad-hoc version of that normalisation
238
+ (`replace(/\/+/g, '/')`, trailing-slash trimming) which is not exported.
239
+ - **Searched for**: `path_join|joinPath|combinePath|concatPath|path_combine|path_normalize|
240
+ normalizePath` across `src/` (0 hits).
241
+
242
+ ### APIC-17 `rgb2uint32` has no inverse
243
+ - **Severity**: MINOR
244
+ - **Package**: core/color
245
+ - **Test met**: A
246
+ - **Absent symbol**: `uint32_to_rgba(value)` (and a float-domain `uint24_to_rgb`)
247
+ - **Evidence**: `core/color/rgb2uint32.js:12` packs `(r, g, b, a)` given as 0..1 floats into a
248
+ 32-bit RGBA word. Nothing unpacks it. The nearest thing, `core/color/int2rgb.js:6`, handles only
249
+ 24-bit values (no alpha channel) and returns components as **0..255 integers**, whereas
250
+ `core/color/rgb2uint24.js:10` consumes **0..1 floats** — so `int2rgb(rgb2uint24(r, g, b))` does
251
+ not round-trip either. The rest of the colour package is rigorously paired
252
+ (`hex2rgb`/`rgb2hex`, `rgb_to_ycocg`/`ycocg_to_rgb`, `rgb_to_YCbCr_uint24`/`YCbCr_to_rgb_uint24`,
253
+ `kelvin_to_rgb`/`rgb_to_kelvin`, `rgb_to_rgbe9995`/`rgbe9995_to_rgb`, `toe`/`toe_inv`), which
254
+ makes this the outlier.
255
+ - **Searched for**: `uint322rgb|uint32_to_rgb|uint242rgb|uint24_to_rgb|int2rgba` across `src/`
256
+ (0 hits).
257
+
258
+ ### APIC-18 `core/geom/vec2` has no arithmetic free functions
259
+ - **Severity**: MINOR
260
+ - **Package**: core/geom/vec2
261
+ - **Test met**: B
262
+ - **Absent symbol**: `v2_add`, `v2_subtract`, `v2_scale` (also `v2_normalize` for scalar args,
263
+ `v2_lerp`)
264
+ - **Evidence**: the whole point of the `vN_*` free-function packages is component-wise math
265
+ without allocating a vector object. `core/geom/vec3/` provides `v3_add.js`, `v3_subtract.js`,
266
+ `v3_multiply.js`, `v3_multiply_scalar.js`, `v3_scale.js`, `v3_normalize_array.js`,
267
+ `v3_negate_array.js`, `v3_lerp` machinery and ~60 more. `core/geom/vec2/` contains only
268
+ `v2_angle_between`, `v2_array_normalize`, `v2_bearing_angle_towards`, `v2_cross_product`,
269
+ `v2_distance`, `v2_distance_sqr`, `v2_dot`, `v2_length`, `v2_length_sqr` and the two matrix3
270
+ multiplies — you can measure 2D vectors but not combine them. Falling back to `geom/Vector2.js`
271
+ (`add:369`, `sub:213`, `multiplyScalar:415`) means allocating the object the free functions
272
+ exist to avoid.
273
+ - **Searched for**: `export function v2_(add|sub|scale|lerp)` and `v2_add|v2_subtract|v2_scale`
274
+ across `src/` (0 hits).
275
+
276
+ ---
277
+
278
+ ## Corrections to the lead's pre-findings
279
+
280
+ - **`HashMap` DOES have `keys()`/`values()`/`entries()`** — `core/collection/map/HashMap.js:894`,
281
+ `:883`, `:873`, all generators delegating to `[Symbol.iterator]:840`. `HashSet.js:71` calls
282
+ `this.__map.keys()`, which would be broken otherwise. That item should be dropped.
283
+ - Near-miss worth recording: `ObservedString` looks like it is missing `toJSON`/`fromJSON`
284
+ relative to its siblings, but they are installed as prototype aliases at
285
+ `core/model/ObservedString.js:171-172`. Not a gap.
286
+
287
+ ## Packages that came back clean
288
+
289
+ `core/json` (resolvePath/resolvePathByArray/objectHasProperty/abstractJSONSerializer +
290
+ abstractJSONDeserializer are a complete pair set), `core/parser/simple` (token readers, no
291
+ inverse expected), `core/math/spline` (hermite↔bezier both ways, derivative/integral,
292
+ bounds/subdivide/reverse), `core/math/random`, `core/color/operations`
293
+ (darken/lighten, saturate/desaturate), `core/collection/table` (RowFirstTable +
294
+ serialize/deserialize pair), `core/graph/v2/Graph` (add/remove/has for both nodes and edges),
295
+ `core/binary` reinterpret/half-float/normalize families (all four/both directions present),
296
+ `core/binary/float/SmallFloat`, `core/collection/CuckooFilter` (insert/remove/mightContain).
@@ -0,0 +1,195 @@
1
+ # API-GAP analysis — `meep/src/engine`
2
+
3
+ Scope: `H:/git/moh/app/src/mir-engine/meep/src/engine/`, `@woosh/meep-engine` v2.168.1.
4
+ Question answered: *what would a competent game developer reach for and not find?*
5
+
6
+ Packages examined and found **complete** against the inclusion bar (no reportable gap):
7
+ `ecs/` (core: `EntityComponentDataset`, `EntityManager`, `Entity`, `System`, `EntityObserver`,
8
+ `EntityBlueprint`, `parent/`, `transform/`, `attachment/`), `asset/` (`AssetManager`),
9
+ `scene/` (`SceneManager`, `Scene`), `input/`, `graphics/` (`GraphicsEngine`, `Camera`,
10
+ `MaterialManager`, `LayerCompositer`, decals, particles, path tracer), `sound/sopra/`,
11
+ `animation/`, `physics/` apart from APIE-1, and the binary serialization stack
12
+ (`ecs/storage/binary/`, adapters + upgraders, both directions present).
13
+
14
+ Six items met the bar.
15
+
16
+ ---
17
+
18
+ ### APIE-1 `PhysicsSystem.setAngularVelocity`
19
+ - **Severity**: MAJOR
20
+ - **Package**: engine/physics
21
+ - **Test met**: B (sibling inconsistency), C (category contract)
22
+ - **Absent symbol / unreachable claim**: `PhysicsSystem.prototype.setAngularVelocity(rigidBody, v)`
23
+ - **Evidence**: `engine/physics/ecs/PhysicsSystem.js:1047` defines
24
+ `setLinearVelocity(rigidBody, v)` whose contract is *"Replace the linear velocity. **Wakes the
25
+ body if asleep.**"* Every other state mutator on the system honours the same contract and calls
26
+ `__wake_body`: `applyImpulse` (`:908`), `applyImpulseAt` (`:930`), `applyTorque` (`:979`),
27
+ `applyForceAt` (`:1003`), `applyForce` (`:1033`), `setPose` (`:1075`). There is no angular
28
+ counterpart to `setLinearVelocity`. `RigidBody.angularVelocity`
29
+ (`engine/physics/ecs/RigidBody.js:47`) is a public `Vector3`, so the only route is a direct
30
+ write — which silently skips the wake. A sleeping body is held out of the active list by
31
+ `storage.mark_sleeping` (`PhysicsSystem.js:1165`) and is never integrated, so
32
+ `body.angularVelocity.set(...)` on a settled body does nothing until something else wakes it.
33
+ This is an ordinary task: spawning a spinning projectile, applying an authoritative network
34
+ state, or scripting a rotating platform. `applyTorque` is not a substitute — it accumulates a
35
+ torque, it does not set a velocity, and inverting it requires the caller to reimplement the
36
+ inverse-inertia transform.
37
+ - **Searched for**: `setAngularVelocity`, `set_angular_velocity`, `setAngular`, `angularVelocity`
38
+ (whole `src/` tree, all files), `setSpin`, `setVelocity`. Only field reads/writes exist; no
39
+ method anywhere in `src/`.
40
+
41
+ ---
42
+
43
+ ### APIE-2 `Terrain.removeLayer`
44
+ - **Severity**: MAJOR
45
+ - **Package**: engine/ecs/terrain
46
+ - **Test met**: A (broken pair), B (sibling inconsistency)
47
+ - **Absent symbol / unreachable claim**: `Terrain.prototype.removeLayer(layer)`
48
+ - **Evidence**: `engine/ecs/terrain/ecs/Terrain.js:672` `addLayer(layer)` is the public way to add
49
+ a splat layer, and it does four things the layer store cannot: grows the splat
50
+ (`this.splat.addWeightLayer()`), rebuilds the array texture (`layers.buildTexture()`), streams
51
+ the layer's texture data, and re-derives the `SPLAT_LAYER_COUNT` shader define via
52
+ `updateMaterial()` (`:613`, `:627`). No `removeLayer` exists on `Terrain`.
53
+ The two lower levels both have their removal half — `TerrainLayers.removeLayer(layer)`
54
+ (`engine/ecs/terrain/ecs/layers/TerrainLayers.js:302`) and
55
+ `SplatMapping.removeWeightLayer(index)`
56
+ (`engine/ecs/terrain/ecs/splat/SplatMapping.js:398`) — so the asymmetry is only at the public
57
+ component level. A user editing terrain at runtime must call both internals in the right order
58
+ and then re-run `buildTexture()` + `updateMaterial()` by hand, or the array texture depth and
59
+ the `SPLAT_LAYER_COUNT` define desynchronise from the layer list.
60
+ - **Searched for**: `removeLayer`, `remove_layer`, `deleteLayer`, `dropLayer`, `eraseLayer`,
61
+ `removeWeightLayer` across all of `src/`.
62
+
63
+ ---
64
+
65
+ ### APIE-3 Navigation-mesh agent API
66
+ - **Severity**: MAJOR
67
+ - **Package**: engine/navigation
68
+ - **Test met**: C (category contract), D (documented but absent)
69
+ - **Absent symbol / unreachable claim**: any agent operation — `NavigationMeshAgent.setDestination`
70
+ / `.stop()` / `.update()` / a `NavigationMeshAgentSystem`. README: *"Pathfinding: A\* grid search
71
+ and a navigation mesh **with agents** and runtime obstacle carving."*
72
+ - **Evidence**: `engine/navigation/mesh/NavigationMeshAgent.js` is the whole file — an eleven-line
73
+ class with a single `radius = 0` field and **zero methods**. It is imported by nothing:
74
+ `grep -rn "NavigationMeshAgent" src/` returns only its own declaration. `NavigationMesh`
75
+ (`engine/navigation/mesh/NavigationMesh.js:42`) exposes exactly `build({...})` (`:62`) and
76
+ `find_path(output, sx,sy,sz, gx,gy,gz)` (`:108`) — a stateless point-to-point query. The agent
77
+ radius that actually matters is a *build* parameter (`agent_radius` at `NavigationMesh.js:63`),
78
+ not the field on `NavigationMeshAgent`. `engine/navigation/ecs/` contains only
79
+ `Path`/`PathFollower`/`PathFollowingSystem`, which follow an already-authored spline — they have
80
+ no navmesh binding, no replanning and no avoidance. So a developer gets a path polyline and must
81
+ write the agent (destination state, replanning, steering, local avoidance, arrival) themselves.
82
+ - **Searched for**: `NavigationMeshAgent`, `setDestination`, `set_destination`, `NavAgent`,
83
+ `AgentSystem`, `steering`, `avoidance`, `crowd`, `moveTo` across all of `src/`.
84
+
85
+ ---
86
+
87
+ ### APIE-4 Runtime navmesh obstacles
88
+ - **Severity**: MAJOR
89
+ - **Package**: engine/navigation
90
+ - **Test met**: D (documented but absent)
91
+ - **Absent symbol / unreachable claim**: `NavigationMesh.addObstacle` / `removeObstacle` /
92
+ `carve` / any incremental re-carve. README: *"a navigation mesh with agents and **runtime
93
+ obstacle carving**"*.
94
+ - **Evidence**: all carving happens inside the one-shot build. `navmesh_build_topology.js:194`
95
+ (*"Carve obstacle footprints, pre-dilated by the agent radius"*) and
96
+ `build/clip_soup_against_overhangs.js` derive obstacles implicitly from downward-facing faces of
97
+ the *source geometry*; there is no obstacle list, no obstacle primitive and no parameter for one
98
+ in `NavigationMesh.build({source, agent_radius, agent_height, agent_max_step_height,
99
+ agent_max_step_distance, agent_max_climb_angle, up})` (`NavigationMesh.js:62-70`). The only way
100
+ to reflect a door closing or a crate dropping is to mutate the source `BinaryTopology` and call
101
+ `build()` again, which re-runs erosion, overhang clipping, sliver-fill, simplification and a full
102
+ BVH rebuild (`bt_mesh_build_face_bvh`, `NavigationMesh.js:83`) for the entire mesh. That is a
103
+ level-build operation, not the dynamic-obstacle facility the claim describes.
104
+ - **Searched for**: `addObstacle`, `add_obstacle`, `removeObstacle`, `remove_obstacle`,
105
+ `NavMeshObstacle`, `carve`, `tile_cache`, `dtTileCache`, `obstacles` across all of `src/`.
106
+
107
+ ---
108
+
109
+ ### APIE-5 `engine/save` has no usable save-slot API
110
+ - **Severity**: MAJOR
111
+ - **Package**: engine/save
112
+ - **Test met**: C (category contract), D (documented but absent), A (write without delete)
113
+ - **Absent symbol / unreachable claim**: an importable save-game manager. `GameStateLoader` is the
114
+ package's only high-level entry point and it cannot be loaded from the published package.
115
+ - **Evidence**: `engine/save/GameStateLoader.js:1` is
116
+ `import { GameSaveStateMetadata } from "../../../../view/game/save/GameSaveStateMetadata.js";`
117
+ — four levels up from `src/engine/save/` lands *outside* the `meep` package root, in the host
118
+ application's tree. `package.json` `files` ships `src/**`, so this module is published but its
119
+ import specifier resolves to nothing for any third-party consumer: the module throws on load.
120
+ Every method also delegates to a plugin that does not exist in the engine —
121
+ `engine.plugins.getById('game-save-state-manager')` at `:29`, `:76`, `:126`, `:151`;
122
+ `grep -rn "game-save-state-manager\|GameSaveStateManager" src/` matches only this file's own
123
+ call sites and JSDoc. Separately, even taken at face value the surface is one-sided: `save`
124
+ (`:19`), `load` (`:68`), `exists` (`:144`), `count` (`:119`) — there is **no delete** and no
125
+ slot enumeration, although the `Storage` backend it sits on has both
126
+ (`Storage.remove` at `engine/save/Storage.js:86`, `Storage.list` at `:68`). What remains usable
127
+ is the raw key/value `Storage` tier (`InMemoryStorage`, `IndexedDBStorage`) — a developer must
128
+ build the save-slot layer themselves.
129
+ - **Searched for**: `GameSaveStateManager`, `GameSaveStateMetadata`, `game-save-state-manager`,
130
+ `SaveManager`, `SaveSlot`, `deleteSave`, `removeSave` across all of `src/`; also swept
131
+ `src/engine/` for other imports escaping the package root (only
132
+ `engine/animation/behavior/animateProperty.js:3` does the same, five levels up into
133
+ `model/game/story/...`).
134
+
135
+ ---
136
+
137
+ ### APIE-6 `SoundEngine.stop` / `suspendContext`
138
+ - **Severity**: MINOR
139
+ - **Package**: engine/sound
140
+ - **Test met**: A (broken pair), B (sibling inconsistency)
141
+ - **Absent symbol / unreachable claim**: `SoundEngine.prototype.stop()` /
142
+ `SoundEngine.prototype.suspendContext()`
143
+ - **Evidence**: `engine/sound/SoundEngine.js` (126 lines, the whole class) has `start()` (`:113`)
144
+ and `resumeContext()` (`:103`) and neither counterpart. Its sibling subsystem
145
+ `GraphicsEngine` has both halves — `start()` at `engine/graphics/GraphicsEngine.js:491` and
146
+ `stop()` at `:642`. The consequence shows at the top level: `Engine.start()`
147
+ (`engine/Engine.js:569`) starts graphics and calls `this.sound.start()` (`:584`), but
148
+ `Engine.stop()` (`:635`) tears down the ticker, entity manager, plugins, GUI and asset manager
149
+ and leaves audio running, because there is nothing to call. Suspending audio on tab-blur or a
150
+ pause menu is an ordinary requirement; the workaround —
151
+ `engine.sound.context.suspend()` on the raw WebAudio object — is easy but steps outside the
152
+ engine's own abstraction, and there is no `close()` to release the AudioContext at all.
153
+ - **Searched for**: `suspendContext`, `pauseContext`, `stopSound`, `stopAll`, `\.suspend\(`,
154
+ `context.close`, and `stop` within `engine/sound/` across all of `src/`.
155
+ (`SoundEmitter.stopAllTracks`/`fadeOutAllTracks` and `SopraEngine.stop(instance)` exist but are
156
+ per-emitter/per-instance, not engine-level.)
157
+
158
+ ---
159
+
160
+ ## README claims — reachable?
161
+
162
+ | Claim | Verdict |
163
+ |---|---|
164
+ | "component queries are instantaneous / query, filter, and iterate over millions of entities" | **REACHABLE** — `EntityComponentDataset.traverseEntities(classes, visitor)` (`ecs/EntityComponentDataset.js:1309`) for ad-hoc queries, plus incremental reactive matching via `EntityObserver` + `addObserver` (`:290`), which is what `System.link`/`unlink` is built on (`EntityManager.js:562`). |
165
+ | "The Hierarchy Problem: Solved" (scene-graph parent-child in pure ECS) | **REACHABLE** — `ParentEntity` + `TransformAttachment` components, driven by `ParentEntitySystem` and `TransformAttachmentSystem`; the child's `Transform` holds the composed world pose (`TransformAttachmentBinding.update`, `ecs/attachment/TransformAttachmentBinding.js:13`). Both directions are queryable: `ParentEntitySystem.findParentEntity/findChildrenOf/findRoot/isAncestorOf/traverse` (`ecs/parent/ParentEntitySystem.js:95-192`). `EntityNode` (`ecs/parent/EntityNode.js`) is the sugar layer with `parent`, `addChild`, `removeChild`, `children`, `root`, `traverse`. *(Note: `ecs/parent/ChildEntities.js` is declared and referenced by nothing — a dead leftover, not the mechanism.)* |
166
+ | "Tiered API Access: high-level abstraction AND low-level raw typed arrays" | **REACHABLE, with a caveat.** The typed-array tier is real where it is claimed to matter — physics runs an SoA body pool, `Transform.matrix` is a `Float32Array`, geometry/BVH/topology are typed-array backed, and query APIs are `(result, result_offset, …)`-first. But the **ECS component store itself is not typed arrays**: `EntityComponentDataset.components` is `Object[][]` and marked `@private` (`ecs/EntityComponentDataset.js:188`). The ECS low-level tier is index-based, not array-based (`computeComponentTypeIndex`, `getComponentByIndex`, `addComponentToEntityByIndex`, `traverseComponentsByIndex`). No absent symbol; the phrasing overstates the ECS half. |
167
+ | clustered forward+ with "unlimited lighting" | **REACHABLE** — `graphics/render/forward_plus/LightManager.js` + `plugin/`, driven by the ECS light components in `graphics/ecs/light/`. No hard light-count constant in the binning path; the light set is a cluster texture sized at runtime (`__build_cluster_texture`, `LightManager.js:418`). |
168
+ | "1,000,000+ GPU-driven decals" | **REACHABLE** — `Decal` component (`graphics/ecs/decal/v2/Decal.js`) + `FPDecalSystem` (`.../FPDecalSystem.js`, BVH-indexed with `queryOverlapFrustum` at `:306` and `raycast` at `:377`), consumed by `FP_SHADER_CHUNK_APPLY_DECALS`. No cap constant found. |
169
+ | terrain with "up to 256 layers" | **REACHABLE** — `Terrain.addLayer` (`ecs/terrain/ecs/Terrain.js:672`) → `TerrainLayers` array texture + `SplatMapping`; layer count is dynamic (`SPLAT_LAYER_COUNT` define, `Terrain.js:627`) with no cap constant in code. *(Removal is the gap — see APIE-2.)* |
170
+ | a path tracer | **REACHABLE** — `graphics/sh3/path_tracer/` : `PathTracer`, `PathTracedRenderer`, `PathTracedScene`, `populate_path_traced_scene_from_ecd.js`, over `BufferedGeometryBVH`. |
171
+ | deterministic rigid-body physics with CCD | **REACHABLE** — `physics/ecs/PhysicsSystem.js` (sequential impulse, warm start, island sleep/wake, `determinism.spec.js` as the standing gate). CCD is per-body opt-in and publicly switchable: `RigidBodyFlags.CCD` (`physics/ecs/RigidBodyFlags.js`) via `RigidBody.setFlag`, implemented in `physics/ccd/linear_sweep.js`. |
172
+ | raycast vehicle | **REACHABLE** — `physics/vehicle/RaycastVehicle.js`: `addWheel`, `setSteering`, `setDriveForce`, `setBrake`, `update`. *(No `removeWheel`, but wheels are a construction-time set — below the bar.)* |
173
+ | kinematic first-person character controller with stair/ramp handling | **REACHABLE** — `engine/control/first-person/`: `FirstPersonPlayerController` + `FirstPersonPlayerControllerSystem` + `collision/KinematicMover.js` (`stepHeight`, stair/ramp cases covered by `Stairs.spec.js`, `GymGrayBoxStop.spec.js`), plus an ability set (mantle, ledge grab, slide, wall-run). |
174
+ | Inverse Kinematics: FABRIK + analytic two-joint | **REACHABLE** — `physics/inverse_kinematics/fabrik/fabrik_solve.js`, `fabrik3d_solve_primitive.js`, `two_joint_ik.js`. |
175
+ | Fluids: MAC-grid Eulerian + MLS-MPM | **REACHABLE** — `physics/fluid/` (`FluidField`, `FluidSimulator`, `solver/`, `ecs/`, `effector/`) and `physics/mls-mpm/MLS_MPM.js`. |
176
+ | navigation: A\* grid search | **REACHABLE** — `navigation/grid/find_path_on_grid_astar.js`. |
177
+ | navigation: navmesh **with agents** | **NOT REACHABLE** — see APIE-3. `NavigationMeshAgent` is an empty stub; only stateless `NavigationMesh.find_path` exists. |
178
+ | navigation: **runtime obstacle carving** | **NOT REACHABLE** — see APIE-4. Carving is build-time only; no obstacle add/remove and no incremental rebuild. |
179
+ | Input: unified Touch / Mouse / Keyboard / **Gamepad**, event-driven AND query-based | **REACHABLE, both tiers.** Devices: `PointerDevice`, `KeyboardDevice`, `touch/TouchDevice`, `GamepadDevice` (full: hot-plug, stuck-input release, `main` stable handle, learned stick calibration, standard mapping). Event-driven = the `on.*` Signals; query-based = `pad.buttons[i].is_down`, `keys.w.is_down`, `pad.stickLeft.value`. Bindable declaratively through `input/ecs/ism/InputBinding` + `InputSystem` path resolution (e.g. `"gamepad/main/buttons/0/down"`). |
180
+ | Sound: events, mixer bus tree, RTPC, voice stealing, snapshots, ducking, serializable | **REACHABLE** — `sound/sopra/SopraEngine.js`: `setBuses`/`defaultBuses`, `playEvent`/`playOneShot`/`createInstance`/`stop`/`crossfade`, `defineParameter`/`setParameter`/`bindParameter`/`bindParameterToBusVolume`, `captureSnapshot`/`applySnapshot`, `addDucker`/`clearDuckers`, `setListener`; instances expose `seek`, `restart`, `fadeOutAndStop`, `stop`. Definitions live in `sound/sopra/definition/` with binary adapters. |
181
+ | Sound: opt-in acoustic simulation (occlusion, transmission, pathing, baked reverb probes) | **REACHABLE** — `sound/simulation/`: `AcousticSimulator`, `configureAcousticSimulation.js`, `probe/`, `render/`, `ecs/`. |
182
+ | Assets: web-first streaming, engine runs before assets load | **REACHABLE** — `asset/AssetManager.js`: `promise`/`get` with `progress` + scopes, `insertAsync`, `isPending`/`isLoaded`/`isFailed`, `remove`, `clear`, `registerLoader`/`unregisterLoader`, `registerTransformer`/`unregisterTransformer`, `startup`/`shutdown` with drain + abort. Symmetric throughout. |
183
+ | Serialization: binary with version upgrading | **REACHABLE** — `ecs/storage/BinaryBufferSerializer.js` / `BinaryBufferDeSerializer.js`, `ecs/storage/binary/BinarySerializationRegistry.js` (`registerAdapter`/`removeAdapter`, `registerUpgrader`, `getUpgradersChain`) and `executeBinaryClassUpgraderChain.js`. |
184
+
185
+ ---
186
+
187
+ ## Incidental (not an API gap, noted in passing)
188
+
189
+ `ecs/Entity.js:256` — `Entity.getComponentSafe` builds its error message with
190
+ `computeComponentClassName(klass)`, which is **not imported** in that file (imports are `assert`,
191
+ `Signal`, `EntityFlags`, `EntityReference`, `EventType`). The miss path throws
192
+ `ReferenceError: computeComponentClassName is not defined` instead of the intended
193
+ "Component of given class 'X' not found". The function exists at
194
+ `ecs/computeComponentClassName.js`; this is a one-line missing import, i.e. a defect rather than
195
+ a gap, so it is excluded from the numbered list.