@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
@@ -6,10 +6,10 @@
6
6
  *
7
7
  * @param {number} distanceMin
8
8
  * @param {number} distanceMax
9
- * @param {function(distance:number, min:number, max:number):number} falloff
9
+ * @param {(distance: number, min: number, max: number) => number} falloff
10
10
  * @param {number} [sampleCount] number of keyframes (>= 2)
11
11
  * @returns {AnimationCurve}
12
12
  */
13
- export function buildAttenuationCurve(distanceMin: number, distanceMax: number, falloff: any, sampleCount?: number): AnimationCurve;
13
+ export function buildAttenuationCurve(distanceMin: number, distanceMax: number, falloff: (distance: number, min: number, max: number) => number, sampleCount?: number): AnimationCurve;
14
14
  import { AnimationCurve } from "../../../animation/curve/AnimationCurve.js";
15
15
  //# sourceMappingURL=buildAttenuationCurve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildAttenuationCurve.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/sopra/util/buildAttenuationCurve.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,mDANW,MAAM,eACN,MAAM,8BAEN,MAAM,GACJ,cAAc,CA0B1B;+BAvC8B,4CAA4C"}
1
+ {"version":3,"file":"buildAttenuationCurve.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/sopra/util/buildAttenuationCurve.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,mDANW,MAAM,eACN,MAAM,sBACK,MAAM,OAAO,MAAM,OAAO,MAAM,KAAK,MAAM,gBACtD,MAAM,GACJ,cAAc,CA0B1B;+BAvC8B,4CAA4C"}
@@ -1,40 +1,40 @@
1
- import { AnimationCurve } from "../../../animation/curve/AnimationCurve.js";
2
- import { Keyframe } from "../../../animation/curve/Keyframe.js";
3
-
4
- /**
5
- * Author a distance→gain attenuation {@link AnimationCurve} by sampling a falloff function at evenly
6
- * spaced distances between `distanceMin` and `distanceMax`. Lets the physically-based legacy falloffs
7
- * (`interpolate_irradiance_linear/logarithmic/smith`) be reused to build attenuation presets that
8
- * match the old engine at the sampled distances (D4), while the runtime just evaluates the curve.
9
- *
10
- * @param {number} distanceMin
11
- * @param {number} distanceMax
12
- * @param {function(distance:number, min:number, max:number):number} falloff
13
- * @param {number} [sampleCount] number of keyframes (>= 2)
14
- * @returns {AnimationCurve}
15
- */
16
- export function buildAttenuationCurve(distanceMin, distanceMax, falloff, sampleCount = 8) {
17
- // A degenerate range (max <= min) has no falloff region to sample: every keyframe would land at
18
- // the same distance, so alignAllTangents would divide by a zero time-delta and emit NaN tangents
19
- // (which serialize to JSON null). Fall back to a finite flat-1 (no-attenuation) curve.
20
- if (distanceMax <= distanceMin) {
21
- return AnimationCurve.constant(0, 1, 1);
22
- }
23
-
24
- const n = Math.max(2, sampleCount);
25
-
26
- const curve = new AnimationCurve();
27
-
28
- for (let i = 0; i < n; i++) {
29
- const t = i / (n - 1);
30
- const distance = distanceMin + (distanceMax - distanceMin) * t;
31
- const gain = falloff(distance, distanceMin, distanceMax);
32
-
33
- curve.add(Keyframe.from(distance, gain));
34
- }
35
-
36
- // smooth the segments between samples
37
- curve.alignAllTangents();
38
-
39
- return curve;
40
- }
1
+ import { AnimationCurve } from "../../../animation/curve/AnimationCurve.js";
2
+ import { Keyframe } from "../../../animation/curve/Keyframe.js";
3
+
4
+ /**
5
+ * Author a distance→gain attenuation {@link AnimationCurve} by sampling a falloff function at evenly
6
+ * spaced distances between `distanceMin` and `distanceMax`. Lets the physically-based legacy falloffs
7
+ * (`interpolate_irradiance_linear/logarithmic/smith`) be reused to build attenuation presets that
8
+ * match the old engine at the sampled distances (D4), while the runtime just evaluates the curve.
9
+ *
10
+ * @param {number} distanceMin
11
+ * @param {number} distanceMax
12
+ * @param {(distance: number, min: number, max: number) => number} falloff
13
+ * @param {number} [sampleCount] number of keyframes (>= 2)
14
+ * @returns {AnimationCurve}
15
+ */
16
+ export function buildAttenuationCurve(distanceMin, distanceMax, falloff, sampleCount = 8) {
17
+ // A degenerate range (max <= min) has no falloff region to sample: every keyframe would land at
18
+ // the same distance, so alignAllTangents would divide by a zero time-delta and emit NaN tangents
19
+ // (which serialize to JSON null). Fall back to a finite flat-1 (no-attenuation) curve.
20
+ if (distanceMax <= distanceMin) {
21
+ return AnimationCurve.constant(0, 1, 1);
22
+ }
23
+
24
+ const n = Math.max(2, sampleCount);
25
+
26
+ const curve = new AnimationCurve();
27
+
28
+ for (let i = 0; i < n; i++) {
29
+ const t = i / (n - 1);
30
+ const distance = distanceMin + (distanceMax - distanceMin) * t;
31
+ const gain = falloff(distance, distanceMin, distanceMax);
32
+
33
+ curve.add(Keyframe.from(distance, gain));
34
+ }
35
+
36
+ // smooth the segments between samples
37
+ curve.alignAllTangents();
38
+
39
+ return curve;
40
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"GUIEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/ui/GUIEngine.js"],"names":[],"mappings":";AA4BA;IACI,mBAAqB;IAErB;;;OAGG;IACH,eAFU,gBAAc,IAAI,CAEP;IAErB;;;OAGG;IACH,eAAc;IAEd;;;OAGG;IACH,eAFU,eAAe,eAAe,CAAC,CAEX;IAE9B;;;OAGG;IACH,UAFU,cAAc,CAEQ;IAEhC;;;OAGG;IACH,cAFU,iBAAiB,CAEyB;IAGpD;;;OAGG;IACH,QAFU,MAAM,CAEM;IAEtB,gBAOG;IAEH;;;OAGG;IACH,KAFU,SAAS,CAEG;IAEtB;;;OAGG;IACH,QAFU,cAAc,CAEuB;IAG/C;;;OAGG;IACH,cAFU,eAAa,IAAI,CAEP;IAqBpB;;;;;;OAMG;IACH,mDANW,OAAO,GAIL,MAAM,CAoClB;IAED;;;;;;OAMG;IACH,0CALW,IAAI,GAGF,eAAe,CA+D3B;IAED;;;;;;OAMG;IACH,iEALW,MAAM,GAGJ,QAAQ,GAAG,CAAC,CA0DxB;IAED;;;;OAIG;IACH,mCAJW,MAAM,gBAWhB;IAED;;;;;OAKG;IACH,iCAJW,MAAM,gBAUhB;IAED;;;;;;;;OAQG;IACH,gEAPW,IAAI,gBA0Dd;IAED;;;;OAIG;IACH,kCAFY,eAAe,CAgB1B;IAED;;OAEG;IACH,yBAFa,eAAe,GAAC,IAAI,CAkBhC;IAED;;;OAGG;IACH,8BAKC;IAED;;;OAGG;IACH,wCA0DC;IAED,2BAYC;CACJ;iBAjgBgB,oCAAoC;gCAyBrB,4BAA4B;+BAf7B,sCAAsC;kCAFnC,yCAAyC;mBAexD,yBAAyB;sBAjBtB,kCAAkC;0BAG9B,qCAAqC;2BAPpC,oCAAoC;mBAiB5C,kBAAkB;iBAPpB,oBAAoB;gCATqB,uCAAuC"}
1
+ {"version":3,"file":"GUIEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/ui/GUIEngine.js"],"names":[],"mappings":";AA4BA;IACI,mBAAqB;IAErB;;;OAGG;IACH,eAFU,gBAAc,IAAI,CAEP;IAErB;;;OAGG;IACH,eAAc;IAEd;;;OAGG;IACH,eAFU,eAAe,eAAe,CAAC,CAEX;IAE9B;;;OAGG;IACH,UAFU,cAAc,CAEQ;IAEhC;;;OAGG;IACH,cAFU,iBAAiB,CAEyB;IAGpD;;;OAGG;IACH,QAFU,MAAM,CAEM;IAEtB,gBAOG;IAEH;;;OAGG;IACH,KAFU,SAAS,CAEG;IAEtB;;;OAGG;IACH,QAFU,cAAc,CAEuB;IAG/C;;;OAGG;IACH,cAFU,eAAa,IAAI,CAEP;IAqBpB;;;;;;OAMG;IACH,mDANW,OAAO,GAIL,MAAM,CAoClB;IAED;;;;;;OAMG;IACH,0CALW,IAAI,GAGF,eAAe,CA+D3B;IAED;;;;;;OAMG;IACH,iEALW,MAAM,GAGJ,QAAQ,GAAG,CAAC,CA0DxB;IAED;;;;OAIG;IACH,mCAJW,MAAM,gBAWhB;IAED;;;;;OAKG;IACH,iCAJW,MAAM,gBAUhB;IAED;;;;;;;;OAQG;IACH,gEAPW,IAAI,gBA0Dd;IAED;;;;OAIG;IACH,kCAFY,eAAe,CAgB1B;IAED;;OAEG;IACH,yBAFa,eAAe,GAAC,IAAI,CAkBhC;IAED;;;OAGG;IACH,8BAKC;IAED;;;OAGG;IACH,wCAiEC;IAED,2BAYC;CACJ;iBAxgBgB,oCAAoC;gCAyBrB,4BAA4B;+BAf7B,sCAAsC;kCAFnC,yCAAyC;mBAexD,yBAAyB;sBAjBtB,kCAAkC;0BAG9B,qCAAqC;2BAPpC,oCAAoC;mBAiB5C,kBAAkB;iBAPpB,oBAAoB;gCATqB,uCAAuC"}
@@ -478,7 +478,14 @@ class GUIEngine {
478
478
  return `cursor-${cursorName}`;
479
479
  }
480
480
 
481
- const classList = engine.graphics.domElement.classList;
481
+ const graphics = engine.graphics;
482
+
483
+ if (graphics === null) {
484
+ // headless: there is no canvas to carry the cursor class
485
+ return;
486
+ }
487
+
488
+ const classList = graphics.domElement.classList;
482
489
 
483
490
  if (typeof oldValue === 'string') {
484
491
  classList.remove(className(oldValue));
@@ -40,10 +40,10 @@ export class NotificationManager {
40
40
  /**
41
41
  *
42
42
  * @param {string} channel
43
- * @param {function(log:NotificationLog):View} initializer
44
- * @param {function(timeDelta:number)} [updateFunction]
43
+ * @param {(log: NotificationLog) => View} initializer
44
+ * @param {(timeDelta: number) => void} [updateFunction]
45
45
  */
46
- addDisplay(channel: string, initializer: any, updateFunction: any): void;
46
+ addDisplay(channel: string, initializer: (log: NotificationLog) => View, updateFunction?: (timeDelta: number) => void): void;
47
47
  /**
48
48
  *
49
49
  * @param {string} channel
@@ -69,8 +69,8 @@ declare class LogDisplay {
69
69
  /**
70
70
  *
71
71
  * @param {NotificationLog} log
72
- * @param {function(log:NotificationLog)} initializer
73
- * @param {function(timeDelta:number)} [updateFunction]
72
+ * @param {(log: NotificationLog) => void} initializer
73
+ * @param {(timeDelta: number) => void} [updateFunction]
74
74
  */
75
75
  constructor({ log, initializer, updateFunction }: NotificationLog);
76
76
  needsUpdate: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationManager.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ui/notification/NotificationManager.js"],"names":[],"mappings":"AAqDA;IAEQ;;;OAGG;IACH,UAFU,IAAI,MAAM,EAAE,eAAe,CAAC,CAEb;IAEzB;;;OAGG;IACH,UAFU,KAAK,UAAU,CAAC,CAEA;IAE1B;;;;OAIG;IACH,oBAA4B;IAE5B;;;OAGG;IACH,KAFU,yBAAuB,IAAI,CAEtB;IAGnB;;;OAGG;IACH,uBAFW,MAAM,QAchB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,eAAe,GAAC,SAAS,CAIrC;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,UAAU,EAAE,CAMxB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,+CAmBhB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,qDAuFhB;IAED;;;;OAIG;IACH,8BAHW,YAAY,WACZ,MAAM,QAahB;IAED;;;OAGG;IACH,gBAFW,MAAM,QAchB;CACJ;4BApQ2B,iCAAiC;iBAP5C,uCAAuC;AAUxD;IACI;;;;;OAKG;IACH,kDAJW,eAAe,EAsBzB;IAZG,qBAA0C;IAE1C,uBAAuC;IAEvC,SAAc;IACd,iBAA8B;IAE9B;;;OAGG;IACH,WAFU,MAAM,CAEE;IAGtB;;;OAGG;IACH,kBAFW,MAAM,QAMhB;IAED,mBAEC;CACJ"}
1
+ {"version":3,"file":"NotificationManager.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ui/notification/NotificationManager.js"],"names":[],"mappings":"AAqDA;IAEQ;;;OAGG;IACH,UAFU,IAAI,MAAM,EAAE,eAAe,CAAC,CAEb;IAEzB;;;OAGG;IACH,UAFU,KAAK,UAAU,CAAC,CAEA;IAE1B;;;;OAIG;IACH,oBAA4B;IAE5B;;;OAGG;IACH,KAFU,yBAAuB,IAAI,CAEtB;IAGnB;;;OAGG;IACH,uBAFW,MAAM,QAchB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,eAAe,GAAC,SAAS,CAIrC;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,UAAU,EAAE,CAMxB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,qBACA,eAAe,wCACT,MAAM,KAAK,IAAI,QAiBrC;IAED;;;;;OAKG;IACH,2BAJW,MAAM,qDAuFhB;IAED;;;;OAIG;IACH,8BAHW,YAAY,WACZ,MAAM,QAahB;IAED;;;OAGG;IACH,gBAFW,MAAM,QAchB;CACJ;4BApQ2B,iCAAiC;iBAP5C,uCAAuC;AAUxD;IACI;;;;;OAKG;IACH,kDAJW,eAAe,EAsBzB;IAZG,qBAA0C;IAE1C,uBAAuC;IAEvC,SAAc;IACd,iBAA8B;IAE9B;;;OAGG;IACH,WAFU,MAAM,CAEE;IAGtB;;;OAGG;IACH,kBAFW,MAAM,QAMhB;IAED,mBAEC;CACJ"}
@@ -13,8 +13,8 @@ class LogDisplay {
13
13
  /**
14
14
  *
15
15
  * @param {NotificationLog} log
16
- * @param {function(log:NotificationLog)} initializer
17
- * @param {function(timeDelta:number)} [updateFunction]
16
+ * @param {(log: NotificationLog) => void} initializer
17
+ * @param {(timeDelta: number) => void} [updateFunction]
18
18
  */
19
19
  constructor({
20
20
  log,
@@ -120,8 +120,8 @@ export class NotificationManager {
120
120
  /**
121
121
  *
122
122
  * @param {string} channel
123
- * @param {function(log:NotificationLog):View} initializer
124
- * @param {function(timeDelta:number)} [updateFunction]
123
+ * @param {(log: NotificationLog) => View} initializer
124
+ * @param {(timeDelta: number) => void} [updateFunction]
125
125
  */
126
126
  addDisplay(channel, initializer, updateFunction) {
127
127
  assert.isString(channel, 'channel');
@@ -57,9 +57,9 @@ declare class TileGrid {
57
57
  *
58
58
  * @param {number} tileWidth
59
59
  * @param {number} tileHeight
60
- * @param {function(x:number, y:number):*} visitor
60
+ * @param {(x: number, y: number) => *} visitor
61
61
  */
62
- computePossibleTilePositions(tileWidth: number, tileHeight: number, visitor: any): void;
62
+ computePossibleTilePositions(tileWidth: number, tileHeight: number, visitor: (x: number, y: number) => any): void;
63
63
  /**
64
64
  *
65
65
  * @param {Rectangle} tile
@@ -1 +1 @@
1
- {"version":3,"file":"TileGrid.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ui/tiles2d/TileGrid.js"],"names":[],"mappings":";AAIA;IACI;;;;;OAKG;IACH,mBAJW,MAAM,UACN,MAAM,EAgBhB;IAXG,cAAsC;IACtC;;;OAGG;IACH,OAFU,eAAe,CAEF;IACvB;;;OAGG;IACH,UAFU,OAAO,CAE0B;IAG/C;;;OAGG;IACH,wBAFY,MAAM,CAgBjB;IAED;;;;OAIG;IACH,sCAFa,gBAAgB,CAQ5B;IAED;;;;;;;;OAQG;IACH,+BAPW,WAAW,KACX,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAuBlB;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAInB;IAED;;;;;;OAMG;IACH,yBALW,OAAO,KACP,MAAM,KACN,MAAM,GACJ,OAAO,CAsBnB;IAED;;;;;OAKG;IACH,wCAJW,MAAM,cACN,MAAM,sBAehB;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,cAFW,gBAAiB,QAI3B;CACJ;oBAlKmB,+BAA+B;iBAFlC,uCAAuC;oBACpC,+BAA+B"}
1
+ {"version":3,"file":"TileGrid.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ui/tiles2d/TileGrid.js"],"names":[],"mappings":";AAIA;IACI;;;;;OAKG;IACH,mBAJW,MAAM,UACN,MAAM,EAgBhB;IAXG,cAAsC;IACtC;;;OAGG;IACH,OAFU,eAAe,CAEF;IACvB;;;OAGG;IACH,UAFU,OAAO,CAE0B;IAG/C;;;OAGG;IACH,wBAFY,MAAM,CAgBjB;IAED;;;;OAIG;IACH,sCAFa,gBAAgB,CAQ5B;IAED;;;;;;;;OAQG;IACH,+BAPW,WAAW,KACX,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAuBlB;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAInB;IAED;;;;;;OAMG;IACH,yBALW,OAAO,KACP,MAAM,KACN,MAAM,GACJ,OAAO,CAsBnB;IAED;;;;;OAKG;IACH,wCAJW,MAAM,cACN,MAAM,eACF,MAAM,KAAK,MAAM,gBAc/B;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,cAFW,gBAAiB,QAI3B;CACJ;oBAlKmB,+BAA+B;iBAFlC,uCAAuC;oBACpC,+BAA+B"}
@@ -131,7 +131,7 @@ class TileGrid {
131
131
  *
132
132
  * @param {number} tileWidth
133
133
  * @param {number} tileHeight
134
- * @param {function(x:number, y:number):*} visitor
134
+ * @param {(x: number, y: number) => *} visitor
135
135
  */
136
136
  computePossibleTilePositions(tileWidth, tileHeight, visitor) {
137
137
 
@@ -19,7 +19,7 @@ export class CellFilterSimplexNoise extends CellFilter {
19
19
  static from(scale_x: number, scale_y: number, seed?: number): CellFilterSimplexNoise;
20
20
  /**
21
21
  * @private
22
- * @type {function(x:number,y:number):number}
22
+ * @type {(x: number, y: number) => number}
23
23
  */
24
24
  private noise;
25
25
  /**
@@ -10,7 +10,7 @@ export class CellFilterSimplexNoise extends CellFilter {
10
10
 
11
11
  /**
12
12
  * @private
13
- * @type {function(x:number,y:number):number}
13
+ * @type {(x: number, y: number) => number}
14
14
  */
15
15
  noise = null;
16
16
 
@@ -49,7 +49,7 @@ function findMarkerNodeByPosition(array, x, y) {
49
49
  * @param {number[]} neighbourhoodMask
50
50
  * @param {MarkerNode[]} group
51
51
  * @param {PathEndPoint} targetEndpoint
52
- * @param {function(index:number):number} heuristic
52
+ * @param {(index: number) => number} heuristic
53
53
  * @param {RoadConnectionNetwork} network
54
54
  */
55
55
  function createPathToTargetEndpoint(
@@ -95,7 +95,7 @@ function createPathToTargetEndpoint(
95
95
  * @param {MarkerNode[]} nodes
96
96
  * @param {number[]} distances
97
97
  * @param {number[]} neighbourhoodMask
98
- * @param {function(index:number):number} heuristic
98
+ * @param {(index: number) => number} heuristic
99
99
  * @param {GridData} grid
100
100
  * @param {CellMatcher} traversable
101
101
  * @param {RoadConnection[]} result
@@ -6,7 +6,7 @@
6
6
  * @param {number} x
7
7
  * @param {number} y
8
8
  * @param {number[]} neighbourhoodMask
9
- * @param {function(index:number):number} heuristic
9
+ * @param {(index: number) => number} heuristic
10
10
  * @returns {number[]} Sequence of indices
11
11
  */
12
12
  export function buildPathFromDistanceMap({ distances, width, height, x, y, neighbourhoodMask, heuristic }: number[]): number[];
@@ -8,7 +8,7 @@ import { returnZero } from "../../../../core/function/returnZero.js";
8
8
  * @param {number} x
9
9
  * @param {number} y
10
10
  * @param {number[]} neighbourhoodMask
11
- * @param {function(index:number):number} heuristic
11
+ * @param {(index: number) => number} heuristic
12
12
  * @returns {number[]} Sequence of indices
13
13
  */
14
14
  export function buildPathFromDistanceMap(
@@ -2,7 +2,8 @@ export class MarkerNodeEntityProcessorRandomRotation extends MarkerNodeEntityPro
2
2
  static from(): MarkerNodeEntityProcessorRandomRotation;
3
3
  __seed: number;
4
4
  __random: (() => number) | {
5
- setCurrentSeed: (arg0: v) => number;
5
+ setCurrentSeed: (v: number) => void;
6
+ getCurrentSeed: () => number;
6
7
  };
7
8
  initialize(data: any, ecd: any, seed: any): void;
8
9
  execute(entity: any, node: any, data: any, ecd: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerNodeEntityProcessorRandomRotation.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.js"],"names":[],"mappings":"AAIA;IAKI,uDAEC;IALD,eAAW;IACX;;MAA2B;IAM3B,iDAEC;IAED,2DAQC;CACJ;0CA1ByC,gCAAgC"}
1
+ {"version":3,"file":"MarkerNodeEntityProcessorRandomRotation.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.js"],"names":[],"mappings":"AAIA;IAKI,uDAEC;IALD,eAAW;IACX;;;MAA2B;IAM3B,iDAEC;IAED,2DAQC;CACJ;0CA1ByC,gCAAgC"}
@@ -11,7 +11,8 @@ export class MarkerNodeActionSelectWeighted extends MarkerNodeAction {
11
11
  */
12
12
  elements: MarkerNodeActionWeightedElement[];
13
13
  __random: (() => number) | {
14
- setCurrentSeed: (arg0: v) => number;
14
+ setCurrentSeed: (v: number) => void;
15
+ getCurrentSeed: () => number;
15
16
  };
16
17
  initialize(grid: any, ecd: any, seed: any): void;
17
18
  execute(grid: any, ecd: any, node: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerNodeActionSelectWeighted.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.js"],"names":[],"mappings":"AAWA;IAUI;;;;OAIG;IACH,sBAFW,iCAAiC,GAD/B,8BAA8B,CAW1C;IArBD;;;OAGG;IACH,UAFU,iCAAiC,CAE7B;IAEd;;MAA2B;IAiB3B,iDAiBC;IAED,8CAgDC;CACJ;iCAtGgC,wBAAwB"}
1
+ {"version":3,"file":"MarkerNodeActionSelectWeighted.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.js"],"names":[],"mappings":"AAWA;IAUI;;;;OAIG;IACH,sBAFW,iCAAiC,GAD/B,8BAA8B,CAW1C;IArBD;;;OAGG;IACH,UAFU,iCAAiC,CAE7B;IAEd;;;MAA2B;IAiB3B,iDAiBC;IAED,8CAgDC;CACJ;iCAtGgC,wBAAwB"}
@@ -2,7 +2,8 @@ export class MarkerNodeTransformRotateRandom extends MarkerNodeTransformer {
2
2
  static from(seed?: number): MarkerNodeTransformRotateRandom;
3
3
  seed: number;
4
4
  random: (() => number) | {
5
- setCurrentSeed: (arg0: v) => number;
5
+ setCurrentSeed: (v: number) => void;
6
+ getCurrentSeed: () => number;
6
7
  };
7
8
  initialize(grid: any, seed: any): void;
8
9
  transform(node: any, grid: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerNodeTransformRotateRandom.d.ts","sourceRoot":"","sources":["../../../../../src/generation/markers/transform/MarkerNodeTransformRotateRandom.js"],"names":[],"mappings":"AAGA;IAMI,4DAMC;IAVD,aAAS;IAET;;MAAyB;IAUzB,uCAEC;IAED,qCAMC;CACJ;sCA3BqC,4BAA4B"}
1
+ {"version":3,"file":"MarkerNodeTransformRotateRandom.d.ts","sourceRoot":"","sources":["../../../../../src/generation/markers/transform/MarkerNodeTransformRotateRandom.js"],"names":[],"mappings":"AAGA;IAMI,4DAMC;IAVD,aAAS;IAET;;;MAAyB;IAUzB,uCAEC;IAED,qCAMC;CACJ;sCA3BqC,4BAA4B"}
@@ -2,10 +2,10 @@ export class MarkerNodeTransformerRecordPropertyClosure extends MarkerNodeTransf
2
2
  /**
3
3
  *
4
4
  * @param {string} propertyName
5
- * @param {function(node:MarkerNode, random:function, grid:GridData):*} value
5
+ * @param {(node: MarkerNode, random: function, grid: GridData) => *} value
6
6
  * @returns {MarkerNodeTransformerRecordPropertyClosure}
7
7
  */
8
- static from(propertyName: string, value: any): MarkerNodeTransformerRecordPropertyClosure;
8
+ static from(propertyName: string, value: (node: MarkerNode, random: Function, grid: GridData) => any): MarkerNodeTransformerRecordPropertyClosure;
9
9
  /**
10
10
  *
11
11
  * @type {function}
@@ -17,7 +17,8 @@ export class MarkerNodeTransformerRecordPropertyClosure extends MarkerNodeTransf
17
17
  */
18
18
  propertyName: string;
19
19
  random: (() => number) | {
20
- setCurrentSeed: (arg0: v) => number;
20
+ setCurrentSeed: (v: number) => void;
21
+ getCurrentSeed: () => number;
21
22
  };
22
23
  initialize(grid: any, seed: any): void;
23
24
  transform(node: any, grid: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerNodeTransformerRecordPropertyClosure.d.ts","sourceRoot":"","sources":["../../../../../src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.js"],"names":[],"mappings":"AAIA;IAgBI;;;;;OAKG;IACH,0BAJW,MAAM,eAEJ,0CAA0C,CAYtD;IA9BD;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,cAFU,MAAM,CAEI;IAEpB;;MAAyB;IAqBzB,uCAEC;IAGD,qCAQC;CACJ;sCAnDqC,4BAA4B"}
1
+ {"version":3,"file":"MarkerNodeTransformerRecordPropertyClosure.d.ts","sourceRoot":"","sources":["../../../../../src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.js"],"names":[],"mappings":"AAIA;IAgBI;;;;;OAKG;IACH,0BAJW,MAAM,uEAEJ,0CAA0C,CAYtD;IA9BD;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,cAFU,MAAM,CAEI;IAEpB;;;MAAyB;IAqBzB,uCAEC;IAGD,qCAQC;CACJ;sCAnDqC,4BAA4B"}
@@ -21,7 +21,7 @@ export class MarkerNodeTransformerRecordPropertyClosure extends MarkerNodeTransf
21
21
  /**
22
22
  *
23
23
  * @param {string} propertyName
24
- * @param {function(node:MarkerNode, random:function, grid:GridData):*} value
24
+ * @param {(node: MarkerNode, random: function, grid: GridData) => *} value
25
25
  * @returns {MarkerNodeTransformerRecordPropertyClosure}
26
26
  */
27
27
  static from(propertyName, value) {
@@ -22,7 +22,8 @@ export class MarkerNodeTransformerRecordUniqueRandomEnum extends MarkerNodeTrans
22
22
  */
23
23
  propertyName: string;
24
24
  random: (() => number) | {
25
- setCurrentSeed: (arg0: v) => number;
25
+ setCurrentSeed: (v: number) => void;
26
+ getCurrentSeed: () => number;
26
27
  };
27
28
  initialize(grid: any, seed: any): void;
28
29
  transform(node: any, grid: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerNodeTransformerRecordUniqueRandomEnum.d.ts","sourceRoot":"","sources":["../../../../../src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.js"],"names":[],"mappings":"AAKA;IAuBI;;;;;OAKG;IACH,0BAJW,MAAM,SACN,GAAG,GACD,2CAA2C,CAYvD;IArCD;;;OAGG;IACH,OAFU,GAAG,CAEF;IAEX;;;OAGG;IACH,QAFU,GAAG,CAED;IAEZ;;;OAGG;IACH,cAFU,MAAM,CAEI;IAEpB;;MAAyB;IAsBzB,uCAKC;IAGD,qCAkBC;CACJ;sCAvEqC,4BAA4B"}
1
+ {"version":3,"file":"MarkerNodeTransformerRecordUniqueRandomEnum.d.ts","sourceRoot":"","sources":["../../../../../src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.js"],"names":[],"mappings":"AAKA;IAuBI;;;;;OAKG;IACH,0BAJW,MAAM,SACN,GAAG,GACD,2CAA2C,CAYvD;IArCD;;;OAGG;IACH,OAFU,GAAG,CAEF;IAEX;;;OAGG;IACH,QAFU,GAAG,CAED;IAEZ;;;OAGG;IACH,cAFU,MAAM,CAEI;IAEpB;;;MAAyB;IAsBzB,uCAKC;IAGD,qCAkBC;CACJ;sCAvEqC,4BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"TerrainTheme.d.ts","sourceRoot":"","sources":["../../../../src/generation/theme/TerrainTheme.js"],"names":[],"mappings":"AAGA;IACI;;;OAGG;IACH,OAFU,kBAAkB,CAEjB;IAGX;;;;OAIG;IACH,iCAFW,MAAM,QAkBhB;CACJ"}
1
+ {"version":3,"file":"TerrainTheme.d.ts","sourceRoot":"","sources":["../../../../src/generation/theme/TerrainTheme.js"],"names":[],"mappings":"AAIA;IACI;;;OAGG;IACH,OAFU,kBAAkB,CAEjB;IAGX;;;;OAIG;IACH,iCAFW,MAAM,QAkBhB;CACJ"}
@@ -1,4 +1,5 @@
1
1
  import { assert } from "../../core/assert.js";
2
+ import { randomSeed } from "../../core/math/random/randomSeed.js";
2
3
  import { seededRandom } from "../../core/math/random/seededRandom.js";
3
4
 
4
5
  export class TerrainTheme {
@@ -26,7 +27,7 @@ export class TerrainTheme {
26
27
  for (let i = 0; i < n; i++) {
27
28
  const rule = rules[i];
28
29
 
29
- const ruleSeed = random();
30
+ const ruleSeed = randomSeed(random);
30
31
 
31
32
  rule.filter.initialize(grid, ruleSeed);
32
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeEngine.d.ts","sourceRoot":"","sources":["../../../../src/generation/theme/ThemeEngine.js"],"names":[],"mappings":"AAoFA;IAEI;;;OAGG;IACH,OAFU,uBAAuB,CAEN;IAE3B;;;OAGG;IACH,uBAFqB,MAAM,CAEF;IAEzB;;;;OAIG;IACH,uBAAsB;IAEtB,2BAEC;IAED;;;OAGG;IACH,sBAEC;IAED;;;OAGG;IACH,mBAEC;IAED;;;OAGG;IACH,4BAUC;IAED;;;;;;OAMG;IACH,4BALW,WAAW,KACX,MAAM,KACN,MAAM,GACJ,MAAM,CA8BlB;IAED;;;;;;OAMG;IACH,oEAHW,MAAM,GACJ,IAAI,CAmChB;IAED;;;;;OAKG;IACH,sDAFa,SAAS,CAgLrB;IAED;;;;;;OAMG;IACH,+DAHW,MAAM,GACJ,IAAI,GAAC,SAAS,CA2G1B;IAED;;;;OAIG;IACH,kEAqCC;IAED;;;;;;;;;;;;;OAaG;IACH,iCAFa,IAAI,CA+BhB;IAED;;;;OAIG;IACH,uCAHa,SAAS,CAYrB;IAED;;;;;OAKG;IACH,oDAFa,SAAS,CA6DrB;CACJ;6BA5qB4B,8CAA8C;iBAM1D,iCAAiC;sBAC5B,sCAAsC"}
1
+ {"version":3,"file":"ThemeEngine.d.ts","sourceRoot":"","sources":["../../../../src/generation/theme/ThemeEngine.js"],"names":[],"mappings":"AAqFA;IAEI;;;OAGG;IACH,OAFU,uBAAuB,CAEN;IAE3B;;;OAGG;IACH,uBAFqB,MAAM,CAEF;IAEzB;;;;OAIG;IACH,uBAAsB;IAEtB,2BAEC;IAED;;;OAGG;IACH,sBAEC;IAED;;;OAGG;IACH,mBAEC;IAED;;;OAGG;IACH,4BAUC;IAED;;;;;;OAMG;IACH,4BALW,WAAW,KACX,MAAM,KACN,MAAM,GACJ,MAAM,CA8BlB;IAED;;;;;;OAMG;IACH,oEAHW,MAAM,GACJ,IAAI,CAmChB;IAED;;;;;OAKG;IACH,sDAFa,SAAS,CAgLrB;IAED;;;;;;OAMG;IACH,+DAHW,MAAM,GACJ,IAAI,GAAC,SAAS,CA2G1B;IAED;;;;OAIG;IACH,kEAqCC;IAED;;;;;;;;;;;;;OAaG;IACH,iCAFa,IAAI,CA+BhB;IAED;;;;OAIG;IACH,uCAHa,SAAS,CAYrB;IAED;;;;;OAKG;IACH,oDAFa,SAAS,CA6DrB;CACJ;6BA7qB4B,8CAA8C;iBAO1D,iCAAiC;sBAC5B,sCAAsC"}
@@ -4,6 +4,7 @@ import { HashMap } from "../../core/collection/map/HashMap.js";
4
4
  import { QuadTreeNode } from "../../core/geom/2d/quad-tree/QuadTreeNode.js";
5
5
  import { randomFloatBetween } from "../../core/math/random/randomFloatBetween.js";
6
6
  import { randomIntegerBetween } from "../../core/math/random/randomIntegerBetween.js";
7
+ import { randomSeed } from "../../core/math/random/randomSeed.js";
7
8
  import { seededRandom } from "../../core/math/random/seededRandom.js";
8
9
  import { number_compare_ascending } from "../../core/primitives/numbers/number_compare_ascending.js";
9
10
  import Future from "../../core/process/Future.js";
@@ -185,6 +186,8 @@ export class ThemeEngine {
185
186
  */
186
187
  initializeThemes(grid, ecd, seed) {
187
188
 
189
+ const random = seededRandom(seed);
190
+
188
191
  return actionTask(() => {
189
192
  /**
190
193
  *
@@ -209,9 +212,7 @@ export class ThemeEngine {
209
212
  if (themes.indexOf(theme) === -1) {
210
213
  themes.push(theme);
211
214
 
212
- const seed = this.random();
213
-
214
- theme.initialize(grid, ecd, seed);
215
+ theme.initialize(grid, ecd, randomSeed(random));
215
216
  }
216
217
  }
217
218
 
@@ -628,9 +629,9 @@ export class ThemeEngine {
628
629
  apply(grid, ecd) {
629
630
  const terrain = obtainTerrain(ecd);
630
631
 
631
- const tInitializeThemes = this.initializeThemes(grid, ecd, this.random());
632
+ const tInitializeThemes = this.initializeThemes(grid, ecd, randomSeed(this.random));
632
633
 
633
- const tNodes = this.applyNodes(grid, ecd);
634
+ const tNodes = this.applyNodes(grid, ecd, randomSeed(this.random));
634
635
 
635
636
  const tCells = this.applyCellRules(grid, ecd);
636
637
 
@@ -1 +1 @@
1
- {"version":3,"file":"ViewGroup.d.ts","sourceRoot":"","sources":["../../../src/view/ViewGroup.js"],"names":[],"mappings":"AAAA;IAEQ;;;OAGG;IACH,iBAAyB;IAGzB;;;OAGG;IACH,kBAAqB;IAGzB;;;OAGG;IACH,sBAMC;IAED;;;OAGG;IACH,4BAYC;IAED;;;OAGG;IACH,+BAqBC;IAED,mBAeC;CACJ"}
1
+ {"version":3,"file":"ViewGroup.d.ts","sourceRoot":"","sources":["../../../src/view/ViewGroup.js"],"names":[],"mappings":"AAAA;IAEQ;;;OAGG;IACH,iBAAyB;IAGzB;;;OAGG;IACH,kBAAqB;IAGzB;;;OAGG;IACH,sBAMC;IAED;;;OAGG;IACH,4BAYC;IAED;;;OAGG;IACH,+BAqBC;IAED,mBAiBC;CACJ"}
@@ -31,7 +31,7 @@ export class ViewGroup {
31
31
  * @param {View} view
32
32
  */
33
33
  remove(view) {
34
- const removedElement = this.elements.remove(view);
34
+ const removedElement = this.elements.delete(view);
35
35
 
36
36
  if (removedElement) {
37
37
  if (this.container !== null) {
@@ -72,17 +72,19 @@ export class ViewGroup {
72
72
  }
73
73
 
74
74
  disconnect() {
75
- const iterator = this.elements.values();
75
+ const container = this.container;
76
76
 
77
- const views = Array.from(iterator);
77
+ if (container === null) {
78
+ return;
79
+ }
80
+
81
+ const views = Array.from(this.elements.values());
78
82
 
79
83
  const l = views.length;
80
84
 
81
85
  for (let i = 0; i < l; i++) {
82
-
83
- const view = views[i];
84
-
85
- this.container.addChild(view);
86
+ // detach: this is the inverse of connect(), which adds them
87
+ container.removeChild(views[i]);
86
88
  }
87
89
 
88
90
  this.container = null;
@@ -10,7 +10,7 @@ declare class VirtualListView extends View {
10
10
  * @param {List.<T>} list
11
11
  * @param {number} [lineSize=20]
12
12
  * @param {number} [lineSpacing=0]
13
- * @param {function(element:T, index:number):View} elementFactory
13
+ * @param {(element: T, index: number) => View} elementFactory
14
14
  * @param classList
15
15
  * @param {number} [cacheSize=1000]
16
16
  * @param {AlignmentOption} [verticalAlignment]
@@ -20,7 +20,7 @@ class VirtualListView extends View {
20
20
  * @param {List.<T>} list
21
21
  * @param {number} [lineSize=20]
22
22
  * @param {number} [lineSpacing=0]
23
- * @param {function(element:T, index:number):View} elementFactory
23
+ * @param {(element: T, index: number) => View} elementFactory
24
24
  * @param classList
25
25
  * @param {number} [cacheSize=1000]
26
26
  * @param {AlignmentOption} [verticalAlignment]
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Shown when WebGL context recovery has been abandoned, so the player sees an explanation instead of a
3
+ * black canvas.
4
+ *
5
+ * Strings are supplied by the caller. They default to English because this view exists precisely for the
6
+ * case where the renderer is dead, which is not a good moment to depend on the localization pipeline
7
+ * having the keys; an application that has them should pass localized strings in.
8
+ */
9
+ export class WebGLContextFailureView extends EmptyView {
10
+ /**
11
+ * @param {string} [title]
12
+ * @param {string} [text]
13
+ * @param {string} [action_label]
14
+ * @param {function} [action] invoked when the button is pressed, defaults to reloading the page
15
+ */
16
+ constructor({ title, text, action_label, action }?: string);
17
+ }
18
+ import EmptyView from "../elements/EmptyView.js";
19
+ //# sourceMappingURL=WebGLContextFailureView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebGLContextFailureView.d.ts","sourceRoot":"","sources":["../../../../src/view/graphics/WebGLContextFailureView.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH;IACI;;;;;OAKG;IACH,oDALW,MAAM,EA4DhB;CACJ;sBA1EqB,0BAA0B"}
@@ -0,0 +1,76 @@
1
+ import ButtonView from "../elements/button/ButtonView.js";
2
+ import EmptyView from "../elements/EmptyView.js";
3
+ import LabelView from "../common/LabelView.js";
4
+
5
+ /**
6
+ * Shown when WebGL context recovery has been abandoned, so the player sees an explanation instead of a
7
+ * black canvas.
8
+ *
9
+ * Strings are supplied by the caller. They default to English because this view exists precisely for the
10
+ * case where the renderer is dead, which is not a good moment to depend on the localization pipeline
11
+ * having the keys; an application that has them should pass localized strings in.
12
+ */
13
+ export class WebGLContextFailureView extends EmptyView {
14
+ /**
15
+ * @param {string} [title]
16
+ * @param {string} [text]
17
+ * @param {string} [action_label]
18
+ * @param {function} [action] invoked when the button is pressed, defaults to reloading the page
19
+ */
20
+ constructor({
21
+ title = 'Graphics device lost',
22
+ text = 'The graphics device stopped responding and could not be recovered. Reloading should fix it.',
23
+ action_label = 'Reload',
24
+ action = () => window.location.reload()
25
+ } = {}) {
26
+ super({
27
+ classList: ['webgl-context-failure-view'],
28
+ css: {
29
+ position: 'absolute',
30
+ left: 0,
31
+ top: 0,
32
+ width: '100%',
33
+ height: '100%',
34
+ display: 'flex',
35
+ flexDirection: 'column',
36
+ alignItems: 'center',
37
+ justifyContent: 'center',
38
+ // the canvas underneath holds whatever was on screen when the device died, dim it out
39
+ backgroundColor: 'rgba(0,0,0,0.82)',
40
+ color: '#f0f0f0',
41
+ fontFamily: 'sans-serif',
42
+ textAlign: 'center',
43
+ pointerEvents: 'auto',
44
+ zIndex: 1000
45
+ }
46
+ });
47
+
48
+ this.addChild(new LabelView(title, {
49
+ classList: ['title'],
50
+ css: {
51
+ fontSize: '1.6em',
52
+ marginBottom: '0.6em'
53
+ }
54
+ }));
55
+
56
+ this.addChild(new LabelView(text, {
57
+ classList: ['text'],
58
+ css: {
59
+ maxWidth: '30em',
60
+ marginBottom: '1.4em',
61
+ lineHeight: '1.4'
62
+ }
63
+ }));
64
+
65
+ this.addChild(new ButtonView({
66
+ action,
67
+ name: action_label,
68
+ classList: ['action'],
69
+ css: {
70
+ cursor: 'pointer',
71
+ padding: '0.5em 1.5em',
72
+ border: '1px solid #f0f0f0'
73
+ }
74
+ }));
75
+ }
76
+ }
@@ -21,6 +21,14 @@ declare class MinimapView extends View {
21
21
  __cameraViews: MinimapCameraView[];
22
22
  cameraObserver: EntityObserver;
23
23
  pointer: PointerDevice;
24
+ /**
25
+ * Detaches every camera view and forgets it.
26
+ *
27
+ * Called from {@link unlink}, where the observer teardown has usually
28
+ * emptied the list already, but it is also the only way for a caller to
29
+ * reset the view: leaving the entries behind would let a later camera
30
+ * removal detach a child that is no longer attached.
31
+ */
24
32
  clear(): void;
25
33
  }
26
34
  import View from "../View.js";