@woosh/meep-engine 2.168.1 → 2.169.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/README.md +2 -2
  2. package/build/bundle-worker-image-decoder.js +1 -1
  3. package/package.json +1 -1
  4. package/src/REVIEW_2026_08_06/adv-core.md +511 -0
  5. package/src/REVIEW_2026_08_06/adv-gfx.md +480 -0
  6. package/src/REVIEW_2026_08_06/adv-view.md +446 -0
  7. package/src/REVIEW_2026_08_06/api-core.md +296 -0
  8. package/src/REVIEW_2026_08_06/api-engine.md +195 -0
  9. package/src/REVIEW_2026_08_06/bvh-phys-sound-net.md +507 -0
  10. package/src/REVIEW_2026_08_06/core-binary.md +348 -0
  11. package/src/REVIEW_2026_08_06/core-collection.md +376 -0
  12. package/src/REVIEW_2026_08_06/core-math.md +221 -0
  13. package/src/REVIEW_2026_08_06/core-process.md +266 -0
  14. package/src/REVIEW_2026_08_06/core-science.md +223 -0
  15. package/src/REVIEW_2026_08_06/engine-ai-nav.md +279 -0
  16. package/src/REVIEW_2026_08_06/engine-animation.md +167 -0
  17. package/src/REVIEW_2026_08_06/engine-asset.md +166 -0
  18. package/src/REVIEW_2026_08_06/engine-ecs.md +920 -0
  19. package/src/REVIEW_2026_08_06/engine-input.md +197 -0
  20. package/src/REVIEW_2026_08_06/engine-misc.md +248 -0
  21. package/src/REVIEW_2026_08_06/engine-terrain.md +52 -0
  22. package/src/REVIEW_2026_08_06/generation.md +176 -0
  23. package/src/REVIEW_2026_08_06/geom-2d.md +434 -0
  24. package/src/REVIEW_2026_08_06/geom-3d.md +117 -0
  25. package/src/REVIEW_2026_08_06/gfx-gi.md +143 -0
  26. package/src/REVIEW_2026_08_06/gfx-render.md +740 -0
  27. package/src/REVIEW_2026_08_06/gfx-texture.md +690 -0
  28. package/src/REVIEW_2026_08_06/prior-criticals.md +49 -0
  29. package/src/REVIEW_2026_08_06/prior-highs.md +138 -0
  30. package/src/REVIEW_2026_08_06/test-gaps.md +364 -0
  31. package/src/REVIEW_2026_08_06/view.md +667 -0
  32. package/src/REVIEW_2026_08_06.md +571 -0
  33. package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
  34. package/src/core/binary/BinaryBuffer.js +12 -1
  35. package/src/core/binary/BitImage2.d.ts +5 -1
  36. package/src/core/binary/BitImage2.d.ts.map +1 -1
  37. package/src/core/binary/BitImage2.js +5 -1
  38. package/src/core/bvh8/build/NodeProxy.d.ts.map +1 -1
  39. package/src/core/bvh8/build/NodeProxy.js +314 -308
  40. package/src/core/collection/list/List.d.ts +15 -0
  41. package/src/core/collection/list/List.d.ts.map +1 -1
  42. package/src/core/collection/list/List.js +34 -0
  43. package/src/core/collection/list/SortedListProjection.d.ts.map +1 -1
  44. package/src/core/collection/list/SortedListProjection.js +4 -1
  45. package/src/core/collection/map/BiMap.d.ts +25 -2
  46. package/src/core/collection/map/BiMap.d.ts.map +1 -1
  47. package/src/core/collection/map/BiMap.js +57 -3
  48. package/src/core/debug/matchers/IsAnything.d.ts.map +1 -1
  49. package/src/core/debug/matchers/IsAnything.js +5 -1
  50. package/src/core/events/signal/Signal.d.ts.map +1 -1
  51. package/src/core/events/signal/Signal.js +3 -1
  52. package/src/core/geom/2d/polygon/TRIANGULATION_DESIGN.md +433 -0
  53. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts +31 -0
  54. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts.map +1 -0
  55. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.js +84 -0
  56. package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts +24 -2
  57. package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts.map +1 -1
  58. package/src/core/geom/2d/polygon/polygon2_signed_area.js +52 -34
  59. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts +28 -0
  60. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts.map +1 -0
  61. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.js +86 -0
  62. package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts +40 -0
  63. package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts.map +1 -0
  64. package/src/core/geom/2d/polygon/polygon2_triangulate.js +1280 -0
  65. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts +28 -0
  66. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts.map +1 -0
  67. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.js +77 -0
  68. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts +6 -3
  69. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts.map +1 -1
  70. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.js +26 -13
  71. package/src/core/geom/2d/triangle/tri2_signed_area.d.ts +17 -1
  72. package/src/core/geom/2d/triangle/tri2_signed_area.d.ts.map +1 -1
  73. package/src/core/geom/2d/triangle/tri2_signed_area.js +35 -23
  74. package/src/core/geom/2d/v2_morton_encode.d.ts +20 -0
  75. package/src/core/geom/2d/v2_morton_encode.d.ts.map +1 -0
  76. package/src/core/geom/2d/v2_morton_encode.js +23 -0
  77. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts.map +1 -1
  78. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.js +4 -1
  79. package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts +27 -0
  80. package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts.map +1 -0
  81. package/src/core/geom/3d/polygon/polygon3_compute_normal.js +60 -0
  82. package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts +34 -0
  83. package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts.map +1 -0
  84. package/src/core/geom/3d/polygon/polygon3_triangulate.js +94 -0
  85. package/src/core/geom/3d/quaternion/quat3_multiply.d.ts +8 -2
  86. package/src/core/geom/3d/quaternion/quat3_multiply.d.ts.map +1 -1
  87. package/src/core/geom/3d/quaternion/quat3_multiply.js +8 -2
  88. package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
  89. package/src/core/geom/3d/shape/ConvexHullShape3D.js +32 -2
  90. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts +23 -6
  91. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts.map +1 -1
  92. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.js +268 -124
  93. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts +17 -0
  94. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts.map +1 -0
  95. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.js +44 -0
  96. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts +20 -0
  97. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts.map +1 -0
  98. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.js +40 -0
  99. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts +19 -0
  100. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts.map +1 -0
  101. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.js +34 -0
  102. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts +22 -0
  103. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts.map +1 -0
  104. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.js +37 -0
  105. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts +87 -0
  106. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts.map +1 -0
  107. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.js +599 -0
  108. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts +32 -0
  109. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts.map +1 -1
  110. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.js +66 -7
  111. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts +22 -1
  112. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts.map +1 -1
  113. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.js +83 -38
  114. package/src/core/geom/MANIFOLD_COMPARISON_2026_08_01.md +554 -0
  115. package/src/core/geom/vec3/v3_cotangent.d.ts +6 -2
  116. package/src/core/geom/vec3/v3_cotangent.d.ts.map +1 -1
  117. package/src/core/geom/vec3/v3_cotangent.js +6 -2
  118. package/src/core/geom/vec3/v3_cross.d.ts +6 -2
  119. package/src/core/geom/vec3/v3_cross.d.ts.map +1 -1
  120. package/src/core/geom/vec3/v3_cross.js +6 -2
  121. package/src/core/geom/vec3/v3_multiply.d.ts +6 -2
  122. package/src/core/geom/vec3/v3_multiply.d.ts.map +1 -1
  123. package/src/core/geom/vec3/v3_multiply.js +6 -2
  124. package/src/core/geom/vec3/v3_subtract.d.ts +6 -2
  125. package/src/core/geom/vec3/v3_subtract.d.ts.map +1 -1
  126. package/src/core/geom/vec3/v3_subtract.js +6 -2
  127. package/src/core/localization/Localization.js +1 -1
  128. package/src/core/math/random/randomSeed.d.ts +13 -0
  129. package/src/core/math/random/randomSeed.d.ts.map +1 -0
  130. package/src/core/math/random/randomSeed.js +16 -0
  131. package/src/core/math/spline/spline3_hermite_apply_transform.d.ts +50 -0
  132. package/src/core/math/spline/spline3_hermite_apply_transform.d.ts.map +1 -0
  133. package/src/core/math/spline/spline3_hermite_apply_transform.js +107 -0
  134. package/src/core/math/spline/spline3_hermite_reverse.d.ts +34 -0
  135. package/src/core/math/spline/spline3_hermite_reverse.d.ts.map +1 -0
  136. package/src/core/math/spline/spline3_hermite_reverse.js +49 -0
  137. package/src/core/math/statistics/hammersley_sequence.d.ts +17 -4
  138. package/src/core/math/statistics/hammersley_sequence.d.ts.map +1 -1
  139. package/src/core/math/statistics/hammersley_sequence.js +25 -16
  140. package/src/core/process/Future.d.ts.map +1 -1
  141. package/src/core/process/Future.js +12 -0
  142. package/src/core/process/PromiseWatcher.d.ts.map +1 -1
  143. package/src/core/process/PromiseWatcher.js +9 -2
  144. package/src/core/process/executor/ConcurrentExecutor.d.ts.map +1 -1
  145. package/src/core/process/executor/ConcurrentExecutor.js +12 -2
  146. package/src/core/process/worker/WorkerProxy.d.ts.map +1 -1
  147. package/src/core/process/worker/WorkerProxy.js +5 -2
  148. package/src/core/process/worker/extractTransferables.d.ts.map +1 -1
  149. package/src/core/process/worker/extractTransferables.js +4 -1
  150. package/src/engine/Engine.d.ts +12 -12
  151. package/src/engine/Engine.d.ts.map +1 -1
  152. package/src/engine/Engine.js +149 -10
  153. package/src/engine/asset/loaders/ArrayBufferLoader.d.ts.map +1 -1
  154. package/src/engine/asset/loaders/ArrayBufferLoader.js +7 -0
  155. package/src/engine/ecs/speaker/lines/sets/LineSetDescription.d.ts.map +1 -1
  156. package/src/engine/ecs/speaker/lines/sets/LineSetDescription.js +3 -1
  157. package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts.map +1 -1
  158. package/src/engine/ecs/terrain/ecs/TerrainSystem.js +4 -1
  159. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +29 -0
  160. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
  161. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +84 -23
  162. package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +446 -0
  163. package/src/engine/graphics/GraphicsEngine.d.ts +56 -7
  164. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  165. package/src/engine/graphics/GraphicsEngine.js +196 -24
  166. package/src/engine/graphics/context/WebGLContextFailureReason.d.ts +9 -0
  167. package/src/engine/graphics/context/WebGLContextFailureReason.d.ts.map +1 -0
  168. package/src/engine/graphics/context/WebGLContextFailureReason.js +17 -0
  169. package/src/engine/graphics/context/WebGLContextMonitor.d.ts +106 -0
  170. package/src/engine/graphics/context/WebGLContextMonitor.d.ts.map +1 -0
  171. package/src/engine/graphics/context/WebGLContextMonitor.js +341 -0
  172. package/src/engine/graphics/context/WebGLContextState.d.ts +14 -0
  173. package/src/engine/graphics/context/WebGLContextState.d.ts.map +1 -0
  174. package/src/engine/graphics/context/WebGLContextState.js +24 -0
  175. package/src/engine/graphics/context/testWebGLContextLoss.d.ts +2 -0
  176. package/src/engine/graphics/context/testWebGLContextLoss.d.ts.map +1 -0
  177. package/src/engine/graphics/context/testWebGLContextLoss.js +696 -0
  178. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts.map +1 -1
  179. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.js +68 -32
  180. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts +14 -0
  181. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts.map +1 -0
  182. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.js +41 -0
  183. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +1 -1
  184. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
  185. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +5 -0
  186. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +1 -1
  187. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
  188. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +2 -1
  189. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +1 -1
  190. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts.map +1 -1
  191. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.js +3 -5
  192. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.d.ts.map +1 -1
  193. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js +3 -2
  194. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.d.ts.map +1 -1
  195. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +3 -1
  196. package/src/engine/graphics/geometry/computeMeshSurfaceArea.js +1 -1
  197. package/src/engine/graphics/load_and_set_cubemap_v0.d.ts +5 -0
  198. package/src/engine/graphics/load_and_set_cubemap_v0.d.ts.map +1 -1
  199. package/src/engine/graphics/load_and_set_cubemap_v0.js +26 -21
  200. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
  201. package/src/engine/graphics/particles/particular/group/ParticleGroup.js +19 -8
  202. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +1 -1
  203. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.d.ts.map +1 -1
  204. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +10 -3
  205. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
  206. package/src/engine/graphics/texture/atlas/TextureAtlas.js +4 -1
  207. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.d.ts.map +1 -1
  208. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js +11 -0
  209. package/src/engine/graphics/texture/cubemap/load_environment_map.d.ts.map +1 -1
  210. package/src/engine/graphics/texture/cubemap/load_environment_map.js +5 -2
  211. package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.d.ts.map +1 -1
  212. package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js +26 -18
  213. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts +15 -2
  214. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts.map +1 -1
  215. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js +29 -3
  216. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts +11 -1
  217. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts.map +1 -1
  218. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +158 -171
  219. package/src/engine/graphics/texture/sampler/sampler2d_paint.js +1 -1
  220. package/src/engine/graphics/texture/sampler/util/bitSet2Sampler2D.js +2 -2
  221. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.d.ts.map +1 -1
  222. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +10 -3
  223. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts +14 -0
  224. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts.map +1 -0
  225. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.js +38 -0
  226. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
  227. package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +433 -425
  228. package/src/engine/physics/constraint/solve_constraints.d.ts +4 -1
  229. package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
  230. package/src/engine/physics/constraint/solve_constraints.js +38 -13
  231. package/src/engine/physics/contact/ManifoldStore.d.ts +15 -3
  232. package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
  233. package/src/engine/physics/contact/ManifoldStore.js +15 -3
  234. package/src/engine/physics/ecs/Joint.d.ts +7 -4
  235. package/src/engine/physics/ecs/Joint.d.ts.map +1 -1
  236. package/src/engine/physics/ecs/Joint.js +7 -4
  237. package/src/engine/physics/ecs/PhysicsSystem.d.ts +14 -0
  238. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  239. package/src/engine/physics/ecs/PhysicsSystem.js +16 -0
  240. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  241. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
  242. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts +15 -7
  243. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
  244. package/src/engine/physics/narrowphase/convex_convex_manifold.js +33 -10
  245. package/src/engine/physics/narrowphase/refine_ray_concave.d.ts +6 -2
  246. package/src/engine/physics/narrowphase/refine_ray_concave.d.ts.map +1 -1
  247. package/src/engine/physics/narrowphase/refine_ray_concave.js +6 -2
  248. package/src/engine/physics/narrowphase/refine_ray_hit.d.ts +6 -2
  249. package/src/engine/physics/narrowphase/refine_ray_hit.d.ts.map +1 -1
  250. package/src/engine/physics/narrowphase/refine_ray_hit.js +6 -2
  251. package/src/engine/physics/queries/raycast.d.ts.map +1 -1
  252. package/src/engine/physics/queries/raycast.js +11 -4
  253. package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
  254. package/src/engine/save/storage/IndexedDBStorage.js +21 -3
  255. package/src/engine/simulation/Ticker.d.ts +12 -0
  256. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  257. package/src/engine/simulation/Ticker.js +18 -0
  258. package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
  259. package/src/engine/sound/simulation/AcousticSimulator.js +9 -1
  260. package/src/engine/sound/simulation/core/VolumeField.d.ts +6 -2
  261. package/src/engine/sound/simulation/core/VolumeField.d.ts.map +1 -1
  262. package/src/engine/sound/simulation/core/VolumeField.js +6 -2
  263. package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts +6 -2
  264. package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts.map +1 -1
  265. package/src/engine/sound/simulation/probe/AcousticProbeField.js +6 -2
  266. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts +6 -2
  267. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts.map +1 -1
  268. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.js +6 -2
  269. package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts +3 -1
  270. package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts.map +1 -1
  271. package/src/engine/sound/simulation/probe/bakeProbeReflectors.js +3 -1
  272. package/src/engine/ui/GUIEngine.d.ts.map +1 -1
  273. package/src/engine/ui/GUIEngine.js +8 -1
  274. package/src/generation/theme/TerrainTheme.d.ts.map +1 -1
  275. package/src/generation/theme/TerrainTheme.js +2 -1
  276. package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
  277. package/src/generation/theme/ThemeEngine.js +6 -5
  278. package/src/view/ViewGroup.d.ts.map +1 -1
  279. package/src/view/ViewGroup.js +9 -7
  280. package/src/view/graphics/WebGLContextFailureView.d.ts +19 -0
  281. package/src/view/graphics/WebGLContextFailureView.d.ts.map +1 -0
  282. package/src/view/graphics/WebGLContextFailureView.js +76 -0
  283. package/src/view/minimap/Minimap.d.ts +8 -0
  284. package/src/view/minimap/Minimap.d.ts.map +1 -1
  285. package/src/view/minimap/Minimap.js +16 -3
  286. package/src/view/minimap/dom/MinimapMarkerView.d.ts.map +1 -1
  287. package/src/view/minimap/dom/MinimapMarkerView.js +3 -1
@@ -69,62 +69,70 @@ export function computeSignedDistanceField_Chamfer(source, distanceField, emptyV
69
69
  for (y = 0; y < height; y++) {
70
70
  for (x = 0; x < width; x++) {
71
71
 
72
- const v = getD(x, y);
72
+ // each candidate must be compared against the running minimum, not
73
+ // against the value the cell started with -- otherwise the *last*
74
+ // candidate that beat the original wins instead of the smallest.
75
+ // Accumulating and writing once is also fewer stores than before.
76
+ let best = getD(x, y);
73
77
 
74
78
  const v0 = getD(x - 1, y - 1) + d2;
75
79
 
76
- if (v0 < v) {
77
- setD(x, y, v0);
80
+ if (v0 < best) {
81
+ best = v0;
78
82
  }
79
83
 
80
84
  const v1 = getD(x, y - 1) + d1;
81
85
 
82
- if (v1 < v) {
83
- setD(x, y, v1);
86
+ if (v1 < best) {
87
+ best = v1;
84
88
  }
85
89
 
86
90
  const v2 = getD(x + 1, y - 1) + d2;
87
91
 
88
- if (v2 < v) {
89
- setD(x, y, v2);
92
+ if (v2 < best) {
93
+ best = v2;
90
94
  }
91
95
 
92
96
  const v3 = getD(x - 1, y) + d1;
93
97
 
94
- if (v3 < v) {
95
- setD(x, y, v3);
98
+ if (v3 < best) {
99
+ best = v3;
96
100
  }
101
+
102
+ setD(x, y, best);
97
103
  }
98
104
  }
99
105
 
100
106
  //second pass (backward)
101
107
  for (y = maxY; y >= 0; y--) {
102
108
  for (x = maxX; x >= 0; x--) {
103
- const v = getD(x, y);
109
+ let best = getD(x, y);
104
110
 
105
111
  const v0 = getD(x + 1, y) + d1;
106
112
 
107
- if (v0 < v) {
108
- setD(x, y, v0);
113
+ if (v0 < best) {
114
+ best = v0;
109
115
  }
110
116
 
111
117
  const v1 = getD(x - 1, y + 1) + d2;
112
118
 
113
- if (v1 < v) {
114
- setD(x, y, v1);
119
+ if (v1 < best) {
120
+ best = v1;
115
121
  }
116
122
 
117
123
  const v2 = getD(x, y + 1) + d1;
118
124
 
119
- if (v2 < v) {
120
- setD(x, y, v2);
125
+ if (v2 < best) {
126
+ best = v2;
121
127
  }
122
128
 
123
129
  const v3 = getD(x + 1, y + 1) + d2;
124
130
 
125
- if (v3 < v) {
126
- setD(x, y, v3);
131
+ if (v3 < best) {
132
+ best = v3;
127
133
  }
134
+
135
+ setD(x, y, best);
128
136
  }
129
137
  }
130
138
 
@@ -1,9 +1,22 @@
1
1
  /**
2
+ * Separable gaussian blur.
3
+ *
4
+ * `size` is the full footprint width in pixels: every output pixel is gathered
5
+ * from `[-size/2, +size/2]` around itself along each axis, at `sample_count`
6
+ * evenly spaced taps. `quality` scales the tap count, trading cost against
7
+ * sampling density; it leaves both the footprint and the standard deviation in
8
+ * pixels unchanged.
9
+ *
10
+ * Below `quality = 1` the taps are spaced more than a pixel apart, so detail
11
+ * finer than that spacing aliases — an isolated bright pixel gets smeared into
12
+ * a ring of tap-spaced echoes rather than a smooth falloff. On smooth input the
13
+ * result is indistinguishable from the fully sampled filter, which is what the
14
+ * setting is for; do not turn it down on input with isolated highlights.
2
15
  *
3
16
  * @param {Sampler2D} output
4
17
  * @param {Sampler2D} input
5
- * @param {number} size
6
- * @param {number} [quality]
18
+ * @param {number} size footprint width, in pixels
19
+ * @param {number} [quality] taps per pixel of footprint; 1 gives roughly one tap per pixel
7
20
  */
8
21
  export function sampler2d_blur_gaussian(output: Sampler2D, input: Sampler2D, size: number, quality?: number): void;
9
22
  import { Sampler2D } from "../Sampler2D.js";
@@ -1 +1 @@
1
- {"version":3,"file":"sampler2d_blur_gaussian.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,gDALW,SAAS,SACT,SAAS,QACT,MAAM,YACN,MAAM,QAoFhB;0BA9FyB,iBAAiB"}
1
+ {"version":3,"file":"sampler2d_blur_gaussian.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,gDALW,SAAS,SACT,SAAS,QACT,MAAM,YACN,MAAM,QAiGhB;0BAxHyB,iBAAiB"}
@@ -7,17 +7,43 @@ import { Sampler2D } from "../Sampler2D.js";
7
7
  let temp_data = new Float64Array(1);
8
8
 
9
9
  /**
10
+ * Separable gaussian blur.
11
+ *
12
+ * `size` is the full footprint width in pixels: every output pixel is gathered
13
+ * from `[-size/2, +size/2]` around itself along each axis, at `sample_count`
14
+ * evenly spaced taps. `quality` scales the tap count, trading cost against
15
+ * sampling density; it leaves both the footprint and the standard deviation in
16
+ * pixels unchanged.
17
+ *
18
+ * Below `quality = 1` the taps are spaced more than a pixel apart, so detail
19
+ * finer than that spacing aliases — an isolated bright pixel gets smeared into
20
+ * a ring of tap-spaced echoes rather than a smooth falloff. On smooth input the
21
+ * result is indistinguishable from the fully sampled filter, which is what the
22
+ * setting is for; do not turn it down on input with isolated highlights.
10
23
  *
11
24
  * @param {Sampler2D} output
12
25
  * @param {Sampler2D} input
13
- * @param {number} size
14
- * @param {number} [quality]
26
+ * @param {number} size footprint width, in pixels
27
+ * @param {number} [quality] taps per pixel of footprint; 1 gives roughly one tap per pixel
15
28
  */
16
29
  export function sampler2d_blur_gaussian(output, input, size, quality = 1) {
17
30
 
18
- const sigma = size * 3;
19
31
  const sample_count = max2(3, nextOdd(Math.round(size * quality)));
20
32
 
33
+ // `build_gaussian_kernel_1d` places taps one unit apart, so its sigma is in
34
+ // TAP units, whereas the footprint is in pixels -- the two are related by
35
+ // `local_u_scale` below. Working in tap units, the outermost tap sits at
36
+ // (sample_count - 1) / 2, and we want the kernel truncated there at three
37
+ // standard deviations: beyond 3 sigma a gaussian carries ~0.3% of its mass,
38
+ // so cutting it there is visually lossless while keeping the taps busy.
39
+ //
40
+ // This previously read `size * 3`, which is the same expression with the
41
+ // ratio inverted and the wrong unit. That put every tap inside ±(1/6) of a
42
+ // standard deviation, where a gaussian is flat: the outermost tap carried
43
+ // ~99% of the weight of the centre one, so the filter was a box blur and
44
+ // `size` had no influence on the shape of the falloff at all.
45
+ const sigma = (sample_count - 1) / 6;
46
+
21
47
  const kernel = new Float32Array(sample_count);
22
48
 
23
49
  build_gaussian_kernel_1d(kernel, sample_count, sigma);
@@ -1,5 +1,15 @@
1
1
  /**
2
- * Good for down-sampling
2
+ * Good for down-sampling.
3
+ *
4
+ * The kernel is separable and evaluated in destination-pixel units: a source
5
+ * texel's distance from the destination pixel's centre is divided by the
6
+ * scaling ratio, which is what stretches the filter's support to cover the
7
+ * whole footprint being averaged.
8
+ *
9
+ * Negative lobes are kept. They are the entire point of Lanczos -- discarding
10
+ * them removes the sharpening and, when every sample in the footprint happens
11
+ * to land in a negative lobe, leaves a zero weight sum and a NaN result.
12
+ *
3
13
  * @param {Sampler2D} source
4
14
  * @param {Sampler2D} destination
5
15
  * @param {number} [lobes]
@@ -1 +1 @@
1
- {"version":3,"file":"sampler2d_scale_down_lanczos.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js"],"names":[],"mappings":"AAkEA;;;;;GAKG;AACH,gGAFW,MAAM,QAoGhB"}
1
+ {"version":3,"file":"sampler2d_scale_down_lanczos.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;;GAeG;AACH,gGAFW,MAAM,QA8GhB"}
@@ -1,171 +1,158 @@
1
- import { max2 } from "../../../../../core/math/max2.js";
2
- import { min2 } from "../../../../../core/math/min2.js";
3
-
4
-
5
- /**
6
- * @see https://en.wikipedia.org/wiki/Lanczos_resampling
7
- * Calculate lanczos weight
8
- * @param {number} x
9
- * @param {number} lobes
10
- * @returns {number}
11
- */
12
- function lanczos(x, lobes) {
13
-
14
- /*
15
- // not needed in our case, as X is always positive
16
- if (x < 0) {
17
- x = -x;
18
- }
19
-
20
- */
21
-
22
- if (x > lobes) {
23
- return 0;
24
- }
25
-
26
- if (x < 1.1920929e-7) {
27
- return 1;
28
- }
29
-
30
- x *= Math.PI;
31
-
32
- const xx = x / lobes;
33
-
34
- return (Math.sin(x) / x) * Math.sin(xx) / (xx);
35
- }
36
-
37
- /**
38
- * Original formulation version from wiki
39
- * @see https://en.wikipedia.org/wiki/Lanczos_resampling
40
- * Calculate lanczos weight
41
- * @param {number} x
42
- * @param {number} lobes
43
- * @returns {number}
44
- */
45
- function lanczos_orig(x, lobes) {
46
-
47
- /*
48
- // not needed in our case, as X is always positive
49
- if (x < 0) {
50
- x = -x;
51
- }
52
-
53
- */
54
-
55
- if (x > lobes) {
56
- return 0;
57
- }
58
-
59
- if (x < 1.1920929e-7) {
60
- return 1;
61
- }
62
-
63
- return (lobes * Math.sin(Math.PI * x) * Math.sin(Math.PI * x / lobes)) / (Math.PI * Math.PI * x * x);
64
- }
65
-
66
-
67
- /**
68
- * Good for down-sampling
69
- * @param {Sampler2D} source
70
- * @param {Sampler2D} destination
71
- * @param {number} [lobes]
72
- */
73
- export function sampler2d_scale_down_lanczos(source, destination, lobes = 2) {
74
-
75
- const d_w = destination.width;
76
- const d_h = destination.height;
77
-
78
- const item_size = destination.itemSize;
79
-
80
- const source_width = source.width;
81
- const source_height = source.height;
82
-
83
- if (source_width < d_w || source_height < d_h) {
84
- throw new Error('Invalid scale, source is larger than destination in at least 1 dimension');
85
- }
86
-
87
- const source_data = source.data;
88
- const destination_data = destination.data;
89
-
90
- const ratio_x = source_width / d_w;
91
- const ratio_y = source_height / d_h;
92
-
93
- const rcp_ratio_y = 2 / ratio_y;
94
- const rcp_ratio_x = 2 / ratio_x;
95
-
96
-
97
- const range2_x = Math.ceil(ratio_x * lobes * 0.5);
98
- const range2_y = Math.ceil(ratio_y * lobes * 0.5);
99
-
100
- const sample = new Array(item_size);
101
-
102
- let v, u, i, j, k;
103
-
104
- for (v = 0; v < d_h; v++) {
105
-
106
- const center_y = (v + 0.5) * ratio_y;
107
- const i_center_y = Math.floor(center_y);
108
- //
109
- const source_y0 = max2(0, i_center_y - range2_y);
110
- const source_y1 = min2(i_center_y + range2_y, source_height - 1);
111
-
112
- for (u = 0; u < d_w; u++) {
113
- const center_x = (u + 0.5) * ratio_x;
114
- const i_center_x = Math.floor(center_x);
115
-
116
- const source_x0 = max2(i_center_x - range2_x, 0);
117
- const source_x1 = min2(i_center_x + range2_x, source_width - 1);
118
-
119
- let weight_sum = 0;
120
- // reset sample
121
- for (i = 0; i < item_size; i++) {
122
- sample[i] = 0;
123
- }
124
-
125
- for (j = source_y0; j <= source_y1; j++) {
126
-
127
- const f_y = (j - center_y);
128
-
129
- const f_y_rcp = f_y * rcp_ratio_y;
130
- const f_y_rcp2 = f_y_rcp * f_y_rcp;
131
-
132
- for (i = source_x0; i <= source_x1; i++) {
133
-
134
- const f_x = (i - center_x);
135
-
136
- const f_x_rcp = f_x * rcp_ratio_x;
137
- const f_x_rcp2 = f_x_rcp * f_x_rcp;
138
-
139
- const distance_from_center_sqr = f_x_rcp2 + f_y_rcp2;
140
- const distance_from_center = Math.sqrt(distance_from_center_sqr);
141
-
142
- const weight = lanczos(distance_from_center, lobes);
143
-
144
- if (weight <= 0) {
145
- continue;
146
- }
147
-
148
- weight_sum += weight;
149
-
150
- const source_texel_address = (j * source_width + i) * item_size;
151
-
152
- for (k = 0; k < item_size; k++) {
153
- sample[k] += weight * source_data[source_texel_address + k];
154
- }
155
-
156
- }
157
- }
158
-
159
-
160
- // dilute sample and write to destination
161
- const inv_z = 1 / weight_sum;
162
-
163
- const texel_address = (v * d_w + u) * item_size;
164
-
165
- for (i = 0; i < item_size; i++) {
166
- destination_data[texel_address + i] = sample[i] * inv_z;
167
- }
168
- }
169
- }
170
-
171
- }
1
+ import { max2 } from "../../../../../core/math/max2.js";
2
+ import { min2 } from "../../../../../core/math/min2.js";
3
+
4
+
5
+ /**
6
+ * @see https://en.wikipedia.org/wiki/Lanczos_resampling
7
+ * Calculate lanczos weight. `x` may be negative; the kernel is even.
8
+ * @param {number} x
9
+ * @param {number} lobes
10
+ * @returns {number}
11
+ */
12
+ function lanczos(x, lobes) {
13
+
14
+ if (x < 0) {
15
+ x = -x;
16
+ }
17
+
18
+ if (x >= lobes) {
19
+ return 0;
20
+ }
21
+
22
+ if (x < 1.1920929e-7) {
23
+ return 1;
24
+ }
25
+
26
+ const pix = x * Math.PI;
27
+
28
+ const pix_over_a = pix / lobes;
29
+
30
+ return (Math.sin(pix) / pix) * (Math.sin(pix_over_a) / pix_over_a);
31
+ }
32
+
33
+
34
+ /**
35
+ * Good for down-sampling.
36
+ *
37
+ * The kernel is separable and evaluated in destination-pixel units: a source
38
+ * texel's distance from the destination pixel's centre is divided by the
39
+ * scaling ratio, which is what stretches the filter's support to cover the
40
+ * whole footprint being averaged.
41
+ *
42
+ * Negative lobes are kept. They are the entire point of Lanczos -- discarding
43
+ * them removes the sharpening and, when every sample in the footprint happens
44
+ * to land in a negative lobe, leaves a zero weight sum and a NaN result.
45
+ *
46
+ * @param {Sampler2D} source
47
+ * @param {Sampler2D} destination
48
+ * @param {number} [lobes]
49
+ */
50
+ export function sampler2d_scale_down_lanczos(source, destination, lobes = 2) {
51
+
52
+ const d_w = destination.width;
53
+ const d_h = destination.height;
54
+
55
+ const item_size = destination.itemSize;
56
+
57
+ const source_width = source.width;
58
+ const source_height = source.height;
59
+
60
+ if (source_width < d_w || source_height < d_h) {
61
+ throw new Error('Invalid scale, source is larger than destination in at least 1 dimension');
62
+ }
63
+
64
+ const source_data = source.data;
65
+ const destination_data = destination.data;
66
+
67
+ const ratio_x = source_width / d_w;
68
+ const ratio_y = source_height / d_h;
69
+
70
+ const inv_ratio_x = 1 / ratio_x;
71
+ const inv_ratio_y = 1 / ratio_y;
72
+
73
+ // support of the kernel measured in source texels
74
+ const range_x = Math.ceil(lobes * ratio_x);
75
+ const range_y = Math.ceil(lobes * ratio_y);
76
+
77
+ const sample = new Array(item_size);
78
+
79
+ const weights_x = new Float64Array(range_x * 2 + 2);
80
+
81
+ for (let v = 0; v < d_h; v++) {
82
+
83
+ // centre of this destination pixel, expressed in source texels
84
+ const center_y = (v + 0.5) * ratio_y;
85
+
86
+ const source_y0 = max2(0, Math.floor(center_y - range_y));
87
+ const source_y1 = min2(Math.ceil(center_y + range_y), source_height - 1);
88
+
89
+ for (let u = 0; u < d_w; u++) {
90
+
91
+ const center_x = (u + 0.5) * ratio_x;
92
+
93
+ const source_x0 = max2(0, Math.floor(center_x - range_x));
94
+ const source_x1 = min2(Math.ceil(center_x + range_x), source_width - 1);
95
+
96
+ // horizontal weights are the same for every row of this column
97
+ for (let i = source_x0; i <= source_x1; i++) {
98
+ weights_x[i - source_x0] = lanczos((i + 0.5 - center_x) * inv_ratio_x, lobes);
99
+ }
100
+
101
+ let weight_sum = 0;
102
+
103
+ for (let i = 0; i < item_size; i++) {
104
+ sample[i] = 0;
105
+ }
106
+
107
+ for (let j = source_y0; j <= source_y1; j++) {
108
+
109
+ const weight_y = lanczos((j + 0.5 - center_y) * inv_ratio_y, lobes);
110
+
111
+ if (weight_y === 0) {
112
+ continue;
113
+ }
114
+
115
+ const row_address = j * source_width;
116
+
117
+ for (let i = source_x0; i <= source_x1; i++) {
118
+
119
+ const weight = weights_x[i - source_x0] * weight_y;
120
+
121
+ if (weight === 0) {
122
+ continue;
123
+ }
124
+
125
+ weight_sum += weight;
126
+
127
+ const source_texel_address = (row_address + i) * item_size;
128
+
129
+ for (let k = 0; k < item_size; k++) {
130
+ sample[k] += weight * source_data[source_texel_address + k];
131
+ }
132
+ }
133
+ }
134
+
135
+ const texel_address = (v * d_w + u) * item_size;
136
+
137
+ if (weight_sum === 0) {
138
+ // the footprint contributed nothing; copy the nearest texel
139
+ // rather than emitting NaN
140
+ const nearest = (min2(Math.floor(center_y), source_height - 1) * source_width
141
+ + min2(Math.floor(center_x), source_width - 1)) * item_size;
142
+
143
+ for (let i = 0; i < item_size; i++) {
144
+ destination_data[texel_address + i] = source_data[nearest + i];
145
+ }
146
+
147
+ continue;
148
+ }
149
+
150
+ const inv_z = 1 / weight_sum;
151
+
152
+ for (let i = 0; i < item_size; i++) {
153
+ destination_data[texel_address + i] = sample[i] * inv_z;
154
+ }
155
+ }
156
+ }
157
+
158
+ }
@@ -65,7 +65,7 @@ export function sampler2d_paint(
65
65
 
66
66
  destination.read(d_x, d_y, c0);
67
67
 
68
- const s_x = Math.round(x + sourceY);
68
+ const s_x = Math.round(x + sourceX);
69
69
  const s_y = Math.round(y + sourceY);
70
70
 
71
71
  source.read(s_x, s_y, c1);
@@ -32,9 +32,9 @@ export function bitSet2Sampler2D(source, target, vTrue, vFalse) {
32
32
  const flag = source.get(cellIndex);
33
33
 
34
34
  if (flag) {
35
- target.set(x, y, vTrue);
35
+ target.write(x, y, vTrue);
36
36
  } else {
37
- target.set(x, y, vFalse);
37
+ target.write(x, y, vFalse);
38
38
  }
39
39
  }
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TopDownCameraControllerHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/ecs/util/TopDownCameraControllerHelper.js"],"names":[],"mappings":";AA2CA,+GAmCC;mBA5EkB,wBAAwB"}
1
+ {"version":3,"file":"TopDownCameraControllerHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/ecs/util/TopDownCameraControllerHelper.js"],"names":[],"mappings":";AAkDA,+GAmCC;mBA5EkB,wBAAwB"}
@@ -1,4 +1,11 @@
1
- import { Group as ThreeGroup, Matrix4 as ThreeMatrix4, Mesh as ThreeMesh, MeshLambertMaterial } from 'three';
1
+ import {
2
+ CylinderGeometry as ThreeCylinderGeometry,
3
+ Group as ThreeGroup,
4
+ Matrix4 as ThreeMatrix4,
5
+ Mesh as ThreeMesh,
6
+ MeshLambertMaterial,
7
+ SphereGeometry as ThreeSphereGeometry
8
+ } from 'three';
2
9
  import Vector3 from '../../../../core/geom/Vector3.js';
3
10
  import Entity from '../../../ecs/Entity.js';
4
11
  import Renderable from '../../../ecs/renderable/Renderable.js';
@@ -42,8 +49,8 @@ const lookAt = (function () {
42
49
  return lookAt;
43
50
  })();
44
51
  const TopDownCameraControllerHelper = function (targetController, targetTransform, size) {
45
- const tMarkerFromGeometry = new CylinderGeometry(0, size * 0.5, size, 10, 1);
46
- const tMarkerToGeometry = new SphereGeometry(size / 2, 32, 32);
52
+ const tMarkerFromGeometry = new ThreeCylinderGeometry(0, size * 0.5, size, 10, 1);
53
+ const tMarkerToGeometry = new ThreeSphereGeometry(size / 2, 32, 32);
47
54
 
48
55
  const matrix4 = new ThreeMatrix4();
49
56
  matrix4.makeRotationX(-Math.PI / 2);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Version 3 did not change the wire layout -- it is byte-for-byte what
3
+ * {@link PathSerializationUpgrader_1_2} already emits, and what the current
4
+ * adapter reads. The bump was made without adding this step, which left every
5
+ * save written at version 2 or earlier with no path to the current version:
6
+ * the registry finds no chain and the component cannot be loaded at all.
7
+ *
8
+ * Carry the payload across unchanged.
9
+ */
10
+ export class PathSerializationUpgrader_2_3 extends BinaryClassUpgrader {
11
+ upgrade(source: any, target: any): void;
12
+ }
13
+ import { BinaryClassUpgrader } from "../../../ecs/storage/binary/BinaryClassUpgrader.js";
14
+ //# sourceMappingURL=PathSerializationUpgrader_2_3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PathSerializationUpgrader_2_3.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH;IAQI,wCAiBC;CACJ;oCArCmC,oDAAoD"}
@@ -0,0 +1,38 @@
1
+ import { BinaryClassUpgrader } from "../../../ecs/storage/binary/BinaryClassUpgrader.js";
2
+
3
+ /**
4
+ * Version 3 did not change the wire layout -- it is byte-for-byte what
5
+ * {@link PathSerializationUpgrader_1_2} already emits, and what the current
6
+ * adapter reads. The bump was made without adding this step, which left every
7
+ * save written at version 2 or earlier with no path to the current version:
8
+ * the registry finds no chain and the component cannot be loaded at all.
9
+ *
10
+ * Carry the payload across unchanged.
11
+ */
12
+ export class PathSerializationUpgrader_2_3 extends BinaryClassUpgrader {
13
+ constructor() {
14
+ super();
15
+
16
+ this.__startVersion = 2;
17
+ this.__targetVersion = 3;
18
+ }
19
+
20
+ upgrade(source, target) {
21
+ const interpolation = source.readUint8();
22
+
23
+ const numPoints = source.readUintVar();
24
+ const elementsPerPoint = source.readUintVar();
25
+
26
+ const point_data_size = numPoints * elementsPerPoint;
27
+ const point_data = new Float32Array(point_data_size);
28
+
29
+ source.readFloat32Array(point_data, 0, point_data_size);
30
+
31
+ target.writeUint8(interpolation);
32
+
33
+ target.writeUintVar(numPoints);
34
+ target.writeUintVar(elementsPerPoint);
35
+
36
+ target.writeFloat32Array(point_data, 0, point_data_size);
37
+ }
38
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ServerAuthoritativeClient.d.ts","sourceRoot":"","sources":["../../../../../src/engine/network/orchestrator/ServerAuthoritativeClient.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;IAOI;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2MApBW;QACV,KAAS,yBAAyB;QAClC,eAAmB,8BAA8B;QACjD,qBAAyB,EAAE,UAAU,CAAC;QACtC,cAAkB,EAAE,UAAU,CAAC;QAC/B,YAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,cAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,mBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,mBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,eAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,iBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,aAAiB,CAAC,EAAE,YAAY,CAAC;KAC9B,EAkMH;IA7KG,0BAA0B;IAC1B,MADW,WAAW,CASpB;IAEF,qCAAqC;IACrC,8BAAkB;IAClB,gCAAgC;IAChC,4BAAkC;IAClC,mCAAmC;IACnC,iCAAsC;IACtC,wBAAwB;IACxB,sBAAsC;IACtC,gCAAgC;IAChC,mCAAgD;IAEhD;;;;OAIG;IACH,YAFU,SAAS,CAKjB;IAEF,2BAA2B;IAC3B,eADW,YAAY,CAKrB;IAEF;;;;;OAKG;IACH,mBAFU,MAAM,CAE0B;IAO1C,qBAAqB;IACrB,iBADW,MAAM,CACO;IACxB,qBAAqB;IACrB,oBADW,MAAM,CACU;IAE3B;;;;;OAKG;IACH,eAFU,YAAY,CAEY;IAElC;;;;OAIG;IACH,mBAFU,MAAM,CAEW;IAE3B;;;;;;;;OAQG;IACH,iBAFU,MAAM,CAEU;IAO1B;;;;;;;;;OASG;IACH,WAFU,MAAM,CAEa;IAE7B;;;;;;;;;OASG;IACH,UAFU,MAAM,CAEY;IAE5B;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAFU,MAAM,CAEqB;IAErC;;;;;OAKG;IACH,kBAFU,MAAM,CAEoB;IAEpC;;;;;;;OAOG;IACH,mBAFU,MAAM,CAEqB;IAErC;;;;;;;;OAQG;IACH,kBAFU,MAAM,CAEoB;IAEpC;;;;OAIG;IACH,qBAFU,MAAM,CAEuB;IAQ3C;;;;OAIG;IACH,2BAHW,MAAM,aACN,MAAM,QAIhB;IAED;;;OAGG;IACH,gCAFW,MAAM,QAIhB;IAED;iCAC6B;IAC7B,qBADW,MAAM,6CAGhB;IAED;;;;;;;;;;OAUG;IACH,oBAFW,MAAM,QAahB;IAED;;;;;;;OAOG;IACH,qBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;OAMG;IACH,iBAHW,MAAM,gBAKhB;IAiFD;;;;;OAKG;IACH,oBAFW,MAAM,QAIhB;IAED;;;;OAIG;IACH,oBAFW,MAAM,QAIhB;;CACJ;4BAla2B,kBAAkB;0BAFpB,uBAAuB;6BADpB,wBAAwB;6BAExB,yBAAyB;mBAJnC,uCAAuC"}
1
+ {"version":3,"file":"ServerAuthoritativeClient.d.ts","sourceRoot":"","sources":["../../../../../src/engine/network/orchestrator/ServerAuthoritativeClient.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;IAeI;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2MApBW;QACV,KAAS,yBAAyB;QAClC,eAAmB,8BAA8B;QACjD,qBAAyB,EAAE,UAAU,CAAC;QACtC,cAAkB,EAAE,UAAU,CAAC;QAC/B,YAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,cAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,mBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,mBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,eAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,iBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,aAAiB,CAAC,EAAE,YAAY,CAAC;KAC9B,EAiMH;IA5KG,0BAA0B;IAC1B,MADW,WAAW,CASpB;IAEF,qCAAqC;IACrC,8BAAkB;IAClB,gCAAgC;IAChC,4BAAkC;IAClC,mCAAmC;IACnC,iCAAsC;IACtC,wBAAwB;IACxB,sBAAsC;IACtC,gCAAgC;IAChC,mCAAgD;IAEhD;;;;OAIG;IACH,YAFU,SAAS,CAKjB;IAEF,2BAA2B;IAC3B,eADW,YAAY,CAKrB;IAEF;;;;;OAKG;IACH,mBAFU,MAAM,CAE0B;IAM1C,qBAAqB;IACrB,iBADW,MAAM,CACO;IACxB,qBAAqB;IACrB,oBADW,MAAM,CACU;IAE3B;;;;;OAKG;IACH,eAFU,YAAY,CAEY;IAElC;;;;OAIG;IACH,mBAFU,MAAM,CAEW;IAE3B;;;;;;;;OAQG;IACH,iBAFU,MAAM,CAEU;IAO1B;;;;;;;;;OASG;IACH,WAFU,MAAM,CAEa;IAE7B;;;;;;;;;OASG;IACH,UAFU,MAAM,CAEY;IAE5B;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAFU,MAAM,CAEqB;IAErC;;;;;OAKG;IACH,kBAFU,MAAM,CAEoB;IAEpC;;;;;;;OAOG;IACH,mBAFU,MAAM,CAEqB;IAErC;;;;;;;;OAQG;IACH,kBAFU,MAAM,CAEoB;IAEpC;;;;OAIG;IACH,qBAFU,MAAM,CAEuB;IAQ3C;;;;OAIG;IACH,2BAHW,MAAM,aACN,MAAM,QAIhB;IAED;;;OAGG;IACH,gCAFW,MAAM,QAIhB;IAED;iCAC6B;IAC7B,qBADW,MAAM,6CAGhB;IAED;;;;;;;;;;OAUG;IACH,oBAFW,MAAM,QAahB;IAED;;;;;;;OAOG;IACH,qBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;OAMG;IACH,iBAHW,MAAM,gBAKhB;IAiFD;;;;;OAKG;IACH,oBAFW,MAAM,QAIhB;IAED;;;;OAIG;IACH,oBAFW,MAAM,QAIhB;;CACJ;4BAza2B,kBAAkB;0BAFpB,uBAAuB;6BADpB,wBAAwB;6BAExB,yBAAyB;mBAJnC,uCAAuC"}