@woosh/meep-engine 2.165.0 → 2.165.2

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 (205) hide show
  1. package/README.md +137 -108
  2. package/build/bundle-worker-image-decoder.js +1 -1
  3. package/package.json +1 -1
  4. package/samples/generation/SampleGenerator0.js +3 -3
  5. package/samples/generation/filters/SampleGroundMoistureFilter.js +63 -56
  6. package/samples/generation/filters/SampleNoise20_0.js +6 -1
  7. package/samples/generation/themes/SampleTheme0.js +47 -47
  8. package/src/core/color/YCoCg/rgb_to_ycocg.d.ts +17 -0
  9. package/src/core/color/YCoCg/rgb_to_ycocg.d.ts.map +1 -0
  10. package/src/core/color/YCoCg/rgb_to_ycocg.js +20 -0
  11. package/src/core/color/YCoCg/ycocg_to_rgb.d.ts +14 -0
  12. package/src/core/color/YCoCg/ycocg_to_rgb.d.ts.map +1 -0
  13. package/src/core/color/YCoCg/ycocg_to_rgb.js +17 -0
  14. package/src/engine/REVIEW_2026_07_03.md +211 -0
  15. package/src/engine/animation/curve/actionProcessorOperations/curveActions.d.ts.map +1 -1
  16. package/src/engine/animation/curve/actionProcessorOperations/curveActions.js +3 -2
  17. package/src/engine/animation/curve/compression/sample_animation_curve_to_float_array.js +1 -1
  18. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts.map +1 -1
  19. package/src/engine/animation/keyed2/AnimationTrackPlayback.js +3 -1
  20. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.js +2 -2
  21. package/src/engine/asset/preloader/AssetPreloader.d.ts.map +1 -1
  22. package/src/engine/asset/preloader/AssetPreloader.js +6 -0
  23. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts.map +1 -1
  24. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js +5 -2
  25. package/src/engine/ecs/Entity.js +1 -1
  26. package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
  27. package/src/engine/ecs/EntityComponentDataset.js +1 -0
  28. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  29. package/src/engine/ecs/EntityManager.js +12 -8
  30. package/src/engine/ecs/EntityObserver.js +1 -1
  31. package/src/engine/ecs/System.d.ts.map +1 -1
  32. package/src/engine/ecs/System.js +4 -0
  33. package/src/engine/ecs/animation/AnimationClip.js +1 -1
  34. package/src/engine/ecs/attachment/AttachmentSystem.js +2 -2
  35. package/src/engine/ecs/attachment/TransformAttachmentBinding.d.ts.map +1 -1
  36. package/src/engine/ecs/attachment/TransformAttachmentBinding.js +11 -0
  37. package/src/engine/ecs/fow/FogOfWar.js +2 -2
  38. package/src/engine/ecs/fow/shader/screenSpaceFogOfWarShader.d.ts.map +1 -1
  39. package/src/engine/ecs/fow/shader/screenSpaceFogOfWarShader.js +27 -9
  40. package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.js +1 -1
  41. package/src/engine/ecs/gui/position/ViewportPosition.d.ts +3 -1
  42. package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
  43. package/src/engine/ecs/gui/position/ViewportPosition.js +4 -1
  44. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts +10 -0
  45. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts.map +1 -1
  46. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.js +43 -0
  47. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.d.ts +93 -0
  48. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.d.ts.map +1 -0
  49. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.js +315 -0
  50. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.d.ts +48 -0
  51. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.d.ts.map +1 -0
  52. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.js +331 -0
  53. package/src/engine/ecs/storage/binary/object-v2/DESIGN.md +199 -0
  54. package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.d.ts +53 -0
  55. package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.d.ts.map +1 -0
  56. package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.js +57 -0
  57. package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.d.ts +53 -0
  58. package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.d.ts.map +1 -0
  59. package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.js +56 -0
  60. package/src/engine/ecs/storage/binary/object-v2/README.md +110 -0
  61. package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.d.ts +13 -0
  62. package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.d.ts.map +1 -0
  63. package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.js +48 -0
  64. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts +29 -0
  65. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts.map +1 -0
  66. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.js +44 -0
  67. package/src/engine/ecs/system_validate_class.d.ts.map +1 -1
  68. package/src/engine/ecs/system_validate_class.js +9 -2
  69. package/src/engine/graphics/camera/makeScreenScissorFrustum.d.ts.map +1 -1
  70. package/src/engine/graphics/camera/makeScreenScissorFrustum.js +11 -10
  71. package/src/engine/graphics/canvas/canvas2d_draw_linear_scale.d.ts.map +1 -1
  72. package/src/engine/graphics/canvas/canvas2d_draw_linear_scale.js +3 -1
  73. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.d.ts +1 -1
  74. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.d.ts.map +1 -1
  75. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.js +2 -2
  76. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/writeAnimationGraphDefinitionToJSON.d.ts.map +1 -1
  77. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/writeAnimationGraphDefinitionToJSON.js +2 -0
  78. package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
  79. package/src/engine/graphics/ecs/camera/Camera.js +4 -0
  80. package/src/engine/graphics/ecs/camera/auto_set_camera_clipping_planes.d.ts.map +1 -1
  81. package/src/engine/graphics/ecs/camera/auto_set_camera_clipping_planes.js +7 -2
  82. package/src/engine/graphics/ecs/camera/set_camera_aspect_ratio.js +1 -1
  83. package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts.map +1 -1
  84. package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.js +4 -1
  85. package/src/engine/graphics/ecs/light/binding/LightBinding.js +2 -2
  86. package/src/engine/graphics/ecs/mesh/MeshSystem.js +1 -1
  87. package/src/engine/graphics/ecs/mesh/SkeletonUtils.js +1 -1
  88. package/src/engine/graphics/ecs/mesh-v2/sg_hierarchy_compute_bounding_box_via_parent_entity.js +1 -1
  89. package/src/engine/graphics/ecs/water/WaterSystem.d.ts +6 -0
  90. package/src/engine/graphics/ecs/water/WaterSystem.d.ts.map +1 -1
  91. package/src/engine/graphics/ecs/water/WaterSystem.js +12 -1
  92. package/src/engine/graphics/geometry/buffered/ensureGeometryBoundingSphere.js +1 -1
  93. package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.d.ts.map +1 -1
  94. package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.js +0 -15
  95. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +10 -10
  96. package/src/engine/graphics/geometry/optimization/merge/merge_geometry_hierarchy.js +1 -1
  97. package/src/engine/graphics/material/SplatMaterial.js +1 -1
  98. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
  99. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +3 -2
  100. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +1 -1
  101. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
  102. package/src/engine/graphics/particles/particular/group/ParticleGroup.js +3 -2
  103. package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.js +1 -1
  104. package/src/engine/graphics/sh3/gi/material/MaterialTransformer.d.ts +1 -8
  105. package/src/engine/graphics/sh3/gi/material/MaterialTransformer.d.ts.map +1 -1
  106. package/src/engine/graphics/sh3/gi/material/MaterialTransformer.js +2 -14
  107. package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.d.ts +9 -0
  108. package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.d.ts.map +1 -0
  109. package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.js +14 -0
  110. package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts.map +1 -1
  111. package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.js +4 -1
  112. package/src/engine/graphics/sh3/lpg/LightProbeGrid.d.ts +69 -0
  113. package/src/engine/graphics/sh3/lpg/LightProbeGrid.d.ts.map +1 -0
  114. package/src/engine/graphics/sh3/lpg/LightProbeGrid.js +173 -0
  115. package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.d.ts +24 -0
  116. package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.d.ts.map +1 -0
  117. package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.js +88 -0
  118. package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.d.ts +20 -0
  119. package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.d.ts.map +1 -0
  120. package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.js +79 -0
  121. package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.d.ts +11 -0
  122. package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.d.ts.map +1 -0
  123. package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.js +84 -0
  124. package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.d.ts +29 -0
  125. package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.d.ts.map +1 -0
  126. package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.js +160 -0
  127. package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.d.ts +23 -0
  128. package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.d.ts.map +1 -0
  129. package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.js +228 -0
  130. package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.d.ts +2 -0
  131. package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.d.ts.map +1 -0
  132. package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.js +24 -0
  133. package/src/engine/graphics/sh3/lpg/material/common.d.ts +3 -0
  134. package/src/engine/graphics/sh3/lpg/material/common.d.ts.map +1 -0
  135. package/src/engine/graphics/sh3/lpg/material/common.js +73 -0
  136. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.d.ts +6 -0
  137. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.d.ts.map +1 -0
  138. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.js +42 -0
  139. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.d.ts +6 -0
  140. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.d.ts.map +1 -0
  141. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.js +49 -0
  142. package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.d.ts +9 -0
  143. package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.d.ts.map +1 -0
  144. package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.js +12 -0
  145. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.d.ts +6 -0
  146. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.d.ts.map +1 -0
  147. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.js +30 -0
  148. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.d.ts +6 -0
  149. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.d.ts.map +1 -0
  150. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.js +41 -0
  151. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.d.ts +3 -0
  152. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.d.ts.map +1 -0
  153. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.js +15 -0
  154. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.d.ts +3 -0
  155. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.d.ts.map +1 -0
  156. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.js +9 -0
  157. package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.d.ts +9 -0
  158. package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.d.ts.map +1 -0
  159. package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.js +12 -0
  160. package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts +20 -0
  161. package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts.map +1 -0
  162. package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.js +59 -0
  163. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.d.ts.map +1 -1
  164. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.js +8 -0
  165. package/src/engine/graphics/sh3/prototypeLightProbeGrid.d.ts +2 -0
  166. package/src/engine/graphics/sh3/prototypeLightProbeGrid.d.ts.map +1 -0
  167. package/src/engine/graphics/sh3/prototypeLightProbeGrid.js +170 -0
  168. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +1 -1
  169. package/src/engine/graphics/texture/atlas/CachingTextureAtlas.js +1 -1
  170. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +1 -1
  171. package/src/engine/graphics/texture/sampler/sampler2d_copy_with_margins.js +3 -3
  172. package/src/engine/graphics/util/build_max_height_pyramid.d.ts.map +1 -1
  173. package/src/engine/graphics/util/build_max_height_pyramid.js +5 -2
  174. package/src/engine/grid/transform2grid/Transform2GridPositionSystem.js +1 -1
  175. package/src/engine/input/ecs/components/InputBinding.d.ts +7 -1
  176. package/src/engine/input/ecs/components/InputBinding.d.ts.map +1 -1
  177. package/src/engine/input/ecs/components/InputBinding.js +8 -1
  178. package/src/engine/input/ecs/systems/InputControllerSystem.js +1 -1
  179. package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts +2 -1
  180. package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts.map +1 -1
  181. package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.js +6 -2
  182. package/src/engine/intelligence/behavior/selector/WeightedElement.js +1 -1
  183. package/src/engine/knowledge/database/StaticKnowledgeDatabase.d.ts.map +1 -1
  184. package/src/engine/knowledge/database/StaticKnowledgeDatabase.js +2 -4
  185. package/src/engine/logging/elastic/ElasticSearchLogger.d.ts +1 -2
  186. package/src/engine/logging/elastic/ElasticSearchLogger.d.ts.map +1 -1
  187. package/src/engine/logging/elastic/ElasticSearchLogger.js +14 -10
  188. package/src/engine/navigation/ecs/path_following/PathFollower.js +1 -1
  189. package/src/engine/navigation/grid/find_path_on_grid_astar.d.ts.map +1 -1
  190. package/src/engine/navigation/grid/find_path_on_grid_astar.js +5 -2
  191. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +1 -1
  192. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
  193. package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +17 -0
  194. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  195. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
  196. package/src/engine/scene/SceneManager.d.ts.map +1 -1
  197. package/src/engine/scene/SceneManager.js +4 -2
  198. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  199. package/src/engine/simulation/Ticker.js +9 -0
  200. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.d.ts.map +1 -1
  201. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +6 -1
  202. package/src/engine/sound/material/concrete/json/serializeSoundMaterialToJSON.js +1 -1
  203. package/src/generation/theme/ThemeEngine.d.ts +9 -0
  204. package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
  205. package/src/generation/theme/ThemeEngine.js +37 -2
@@ -1,67 +1,67 @@
1
- import { Theme } from "../../../src/generation/theme/Theme.js";
2
- import { TerrainTheme } from "../../../src/generation/theme/TerrainTheme.js";
3
- import { TerrainLayerRule } from "../../../src/generation/theme/TerrainLayerRule.js";
4
- import { MarkerProcessingRule } from "../../../src/generation/markers/actions/MarkerProcessingRule.js";
5
- import { MarkerNodeMatcherByType } from "../../../src/generation/markers/matcher/MarkerNodeMatcherByType.js";
6
- import {
7
- MarkerNodeActionEntityPlacement
8
- } from "../../../src/generation/markers/actions/MarkerNodeActionEntityPlacement.js";
1
+ import { MirMarkerTypes } from "../../../../generator/MirMarkerTypes.js";
2
+ import GeneratedArmy from "../../../../model/game/ecs/component/generator/army/GeneratedArmy.js";
3
+ import Vector2 from "../../../src/core/geom/Vector2js";
4
+ import Vector3 from "../../../src/core/geom/Vector3js";
5
+ import { PI_HALF } from "../../../src/core/math/PI_HALF.js";
6
+ import Tag from "../../../src/engine/ecs/components/Tagjs";
9
7
  import { EntityBlueprint } from "../../../src/engine/ecs/EntityBlueprint.js";
10
- import Mesh from "../../../src/engine/graphics/ecs/mesh/Mesh.js";
8
+ import GUIElement from "../../../src/engine/ecs/gui/GUIElementjs";
9
+ import HeadsUpDisplay from "../../../src/engine/ecs/gui/hud/HeadsUpDisplay.js";
10
+ import ViewportPosition from "../../../src/engine/ecs/gui/position/ViewportPosition.js";
11
+ import ClingToTerrain from "../../../src/engine/ecs/terrain/ecs/cling/ClingToTerrain.js";
11
12
  import { Transform } from "../../../src/engine/ecs/transform/Transform.js";
13
+ import Mesh from "../../../src/engine/graphics/ecs/mesh/Mesh.js";
14
+ import { ParticleEmitter } from "../../../src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterjs";
12
15
  import GridPosition from "../../../src/engine/grid/position/GridPosition.js";
13
- import { matcher_tag_not_traversable } from "../rules/matcher_tag_not_traversable.js";
14
- import { CellMatcherLayerBitMaskTest } from "../../../src/generation/rules/CellMatcherLayerBitMaskTest.js";
15
- import { GridTags } from "../grid/GridTags.js";
16
+ import { SoundEmitter } from "../../../src/engine/sound/ecs/emitter/SoundEmitter.js";
16
17
  import { CellFilterCellMatcher } from "../../../src/generation/filtering/CellFilterCellMatcher.js";
17
- import { CellFilterSimplexNoise } from "../../../src/generation/filtering/numeric/complex/CellFilterSimplexNoise.js";
18
+ import { CellFilterCache } from "../../../src/generation/filtering/numeric/CellFilterCache.js";
19
+ import { CellFilterLiteralFloat } from "../../../src/generation/filtering/numeric/CellFilterLiteralFloat.js";
20
+ import { CellFilterAngleToNormal } from "../../../src/generation/filtering/numeric/complex/CellFilterAngleToNormal.js";
18
21
  import { CellFilterFXAA } from "../../../src/generation/filtering/numeric/complex/CellFilterFXAA.js";
22
+ import { CellFilterGaussianBlur } from "../../../src/generation/filtering/numeric/complex/CellFilterGaussianBlur.js";
23
+ import { CellFilterSimplexNoise } from "../../../src/generation/filtering/numeric/complex/CellFilterSimplexNoise.js";
24
+ import { CellFilterAdd } from "../../../src/generation/filtering/numeric/math/algebra/CellFilterAdd.js";
19
25
  import { CellFilterMultiply } from "../../../src/generation/filtering/numeric/math/algebra/CellFilterMultiply.js";
26
+ import { CellFilterNegate } from "../../../src/generation/filtering/numeric/math/algebra/CellFilterNegate.js";
27
+ import { CellFilterClamp } from "../../../src/generation/filtering/numeric/math/CellFilterClamp.js";
28
+ import { CellFilterInverseLerp } from "../../../src/generation/filtering/numeric/math/CellFilterInverseLerp.js";
20
29
  import { CellFilterLerp } from "../../../src/generation/filtering/numeric/math/CellFilterLerp.js";
21
- import { CellFilterLiteralFloat } from "../../../src/generation/filtering/numeric/CellFilterLiteralFloat.js";
22
- import Tag from "../../../src/engine/ecs/components/Tagjs";
23
- import HeadsUpDisplay from "../../../src/engine/ecs/gui/hud/HeadsUpDisplay.js";
24
- import ViewportPosition from "../../../src/engine/ecs/gui/position/ViewportPosition.js";
25
- import GUIElement from "../../../src/engine/ecs/gui/GUIElementjs";
30
+ import { CellFilterOneMinus } from "../../../src/generation/filtering/numeric/math/CellFilterOneMinus.js";
31
+ import { CellFilterSmoothStep } from "../../../src/generation/filtering/numeric/math/CellFilterSmoothStep.js";
26
32
  import {
27
- MarkerNodeTransformerYRotateByFilterGradient
28
- } from "../../../src/generation/markers/transform/MarkerNodeTransformerYRotateByFilterGradient.js";
29
- import { CellFilterGaussianBlur } from "../../../src/generation/filtering/numeric/complex/CellFilterGaussianBlur.js";
30
- import { CellProcessingRule } from "../../../src/generation/theme/cell/CellProcessingRule.js";
33
+ CellFilterSampleLayerLinear
34
+ } from "../../../src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js";
31
35
  import {
32
36
  ContinuousGridCellActionSetTerrainHeight
33
37
  } from "../../../src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.js";
34
- import { MirGridLayers } from "../grid/MirGridLayers.js";
35
38
  import {
36
- CellFilterSampleLayerLinear
37
- } from "../../../src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js";
38
- import ClingToTerrain from "../../../src/engine/ecs/terrain/ecs/cling/ClingToTerrain.js";
39
+ MarkerNodeActionEntityPlacement
40
+ } from "../../../src/generation/markers/actions/MarkerNodeActionEntityPlacement.js";
41
+ import { MarkerProcessingRule } from "../../../src/generation/markers/actions/MarkerProcessingRule.js";
39
42
  import {
40
- MarkerNodeTransformerYRotateByFilter
41
- } from "../../../src/generation/markers/transform/MarkerNodeTransformerYRotateByFilter.js";
42
- import { CellFilterAngleToNormal } from "../../../src/generation/filtering/numeric/complex/CellFilterAngleToNormal.js";
43
- import Vector3 from "../../../src/core/geom/Vector3js";
44
- import { CellFilterClamp } from "../../../src/generation/filtering/numeric/math/CellFilterClamp.js";
45
- import { CellFilterOneMinus } from "../../../src/generation/filtering/numeric/math/CellFilterOneMinus.js";
46
- import { CellFilterSmoothStep } from "../../../src/generation/filtering/numeric/math/CellFilterSmoothStep.js";
47
- import { CellFilterInverseLerp } from "../../../src/generation/filtering/numeric/math/CellFilterInverseLerp.js";
48
- import { CellFilterAdd } from "../../../src/generation/filtering/numeric/math/algebra/CellFilterAdd.js";
49
- import { CellFilterNegate } from "../../../src/generation/filtering/numeric/math/algebra/CellFilterNegate.js";
43
+ MarkerNodeActionSelectWeighted
44
+ } from "../../../src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.js";
50
45
  import {
51
46
  MarkerNodeActionWeightedElement
52
47
  } from "../../../src/generation/markers/actions/probability/MarkerNodeActionWeightedElement.js";
48
+ import { MarkerNodeMatcherByType } from "../../../src/generation/markers/matcher/MarkerNodeMatcherByType.js";
53
49
  import {
54
- MarkerNodeActionSelectWeighted
55
- } from "../../../src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.js";
56
- import { ParticleEmitter } from "../../../src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterjs";
57
- import { CellFilterCache } from "../../../src/generation/filtering/numeric/CellFilterCache.js";
58
- import { SoundEmitter } from "../../../src/engine/sound/ecs/emitter/SoundEmitter.js";
59
- import { SampleGroundMoistureFilter } from "../filters/SampleGroundMoistureFilter.js";
60
- import GeneratedArmy from "../../../../model/game/ecs/component/generator/army/GeneratedArmy.js";
61
- import { MirMarkerTypes } from "../../../../generator/MirMarkerTypes.js";
50
+ MarkerNodeTransformerYRotateByFilter
51
+ } from "../../../src/generation/markers/transform/MarkerNodeTransformerYRotateByFilter.js";
52
+ import {
53
+ MarkerNodeTransformerYRotateByFilterGradient
54
+ } from "../../../src/generation/markers/transform/MarkerNodeTransformerYRotateByFilterGradient.js";
55
+ import { CellMatcherLayerBitMaskTest } from "../../../src/generation/rules/CellMatcherLayerBitMaskTest.js";
56
+ import { CellProcessingRule } from "../../../src/generation/theme/cell/CellProcessingRule.js";
62
57
  import { TerrainLayerDescription } from "../../../src/generation/theme/TerrainLayerDescription.js";
63
- import Vector2 from "../../../src/core/geom/Vector2js";
64
- import { PI_HALF } from "../../../src/core/math/PI_HALF.js";
58
+ import { TerrainLayerRule } from "../../../src/generation/theme/TerrainLayerRule.js";
59
+ import { TerrainTheme } from "../../../src/generation/theme/TerrainTheme.js";
60
+ import { Theme } from "../../../src/generation/theme/Theme.js";
61
+ import { SampleGroundMoistureFilter } from "../filters/SampleGroundMoistureFilter.js";
62
+ import { GridTags } from "../grid/GridTags.js";
63
+ import { MirGridLayers } from "../grid/MirGridLayers.js";
64
+ import { matcher_tag_not_traversable } from "../rules/matcher_tag_not_traversable.js";
65
65
 
66
66
  export const SampleTheme0 = new Theme();
67
67
 
@@ -1061,7 +1061,7 @@ const filterAridArea = CellFilterClamp.from(
1061
1061
  CellFilterInverseLerp.from(
1062
1062
  CellFilterLiteralFloat.from(0.5),
1063
1063
  CellFilterLiteralFloat.from(0.1),
1064
- SampleGroundMoistureFilter
1064
+ SampleGroundMoistureFilter()
1065
1065
  ),
1066
1066
  CellFilterLiteralFloat.from(0),
1067
1067
  CellFilterLiteralFloat.from(1)
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Convert a linear RGB triple to YCoCg (luminance / chroma-orange / chroma-green).
3
+ *
4
+ * The transform is a plain linear map, so it is HDR-safe (works for values outside [0,1]) and, crucially,
5
+ * commutes with linear interpolation: lerp(ycocg(a), ycocg(b)) === ycocg(lerp(a, b)). That is what lets YCoCg data
6
+ * be hardware-filtered (bilinear / trilinear) exactly as if it were RGB, and reconstructed afterwards.
7
+ *
8
+ * Inverse of {@link ycocg_to_rgb}.
9
+ *
10
+ * @param {number[]|Float32Array|Float64Array} result Y, Co, Cg are written at result_offset, +1, +2
11
+ * @param {number} result_offset
12
+ * @param {number} r
13
+ * @param {number} g
14
+ * @param {number} b
15
+ */
16
+ export function rgb_to_ycocg(result: number[] | Float32Array | Float64Array, result_offset: number, r: number, g: number, b: number): void;
17
+ //# sourceMappingURL=rgb_to_ycocg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rgb_to_ycocg.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/YCoCg/rgb_to_ycocg.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,qCANW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBAClC,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAMhB"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Convert a linear RGB triple to YCoCg (luminance / chroma-orange / chroma-green).
3
+ *
4
+ * The transform is a plain linear map, so it is HDR-safe (works for values outside [0,1]) and, crucially,
5
+ * commutes with linear interpolation: lerp(ycocg(a), ycocg(b)) === ycocg(lerp(a, b)). That is what lets YCoCg data
6
+ * be hardware-filtered (bilinear / trilinear) exactly as if it were RGB, and reconstructed afterwards.
7
+ *
8
+ * Inverse of {@link ycocg_to_rgb}.
9
+ *
10
+ * @param {number[]|Float32Array|Float64Array} result Y, Co, Cg are written at result_offset, +1, +2
11
+ * @param {number} result_offset
12
+ * @param {number} r
13
+ * @param {number} g
14
+ * @param {number} b
15
+ */
16
+ export function rgb_to_ycocg(result, result_offset, r, g, b) {
17
+ result[result_offset] = 0.25 * r + 0.5 * g + 0.25 * b; // Y
18
+ result[result_offset + 1] = 0.5 * r - 0.5 * b; // Co
19
+ result[result_offset + 2] = -0.25 * r + 0.5 * g - 0.25 * b; // Cg
20
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Convert a YCoCg triple back to linear RGB.
3
+ *
4
+ * Inverse of {@link rgb_to_ycocg}. HDR-safe (no clamping), and being a plain linear map it commutes with linear
5
+ * interpolation, so filtering YCoCg data and reconstructing here matches filtering the original RGB.
6
+ *
7
+ * @param {number[]|Float32Array|Float64Array} result R, G, B are written at result_offset, +1, +2
8
+ * @param {number} result_offset
9
+ * @param {number} y
10
+ * @param {number} co
11
+ * @param {number} cg
12
+ */
13
+ export function ycocg_to_rgb(result: number[] | Float32Array | Float64Array, result_offset: number, y: number, co: number, cg: number): void;
14
+ //# sourceMappingURL=ycocg_to_rgb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ycocg_to_rgb.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/YCoCg/ycocg_to_rgb.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,qCANW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBAClC,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,QAMhB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Convert a YCoCg triple back to linear RGB.
3
+ *
4
+ * Inverse of {@link rgb_to_ycocg}. HDR-safe (no clamping), and being a plain linear map it commutes with linear
5
+ * interpolation, so filtering YCoCg data and reconstructing here matches filtering the original RGB.
6
+ *
7
+ * @param {number[]|Float32Array|Float64Array} result R, G, B are written at result_offset, +1, +2
8
+ * @param {number} result_offset
9
+ * @param {number} y
10
+ * @param {number} co
11
+ * @param {number} cg
12
+ */
13
+ export function ycocg_to_rgb(result, result_offset, y, co, cg) {
14
+ result[result_offset] = y + co - cg; // R
15
+ result[result_offset + 1] = y + cg; // G
16
+ result[result_offset + 2] = y - co - cg; // B
17
+ }
@@ -0,0 +1,211 @@
1
+ # Engine Package — Correctness Review (2026-07-03)
2
+
3
+ **Scope:** `app/src/mir-engine/meep/src/engine` — the full engine package (~222,000 LOC of reviewable source across 1,782 non-spec, non-prototype `.js` files, 27 top-level subsystems).
4
+
5
+ **Method:** Fanned-out review — ~26 specialist agents, each assigned a coherent subsystem with a strict *correctness-only* brief (no style, no nitpicks; `prototype*.js` out of scope; unreferenced exports treated as public library surface, not dead code; `assert.*` treated as stripped in production). Every finding requires a concrete failure scenario. The five highest-impact CRITICALs were re-verified by reading the actual source. This document is the synthesis.
6
+
7
+ ---
8
+
9
+ ## 1. Executive summary
10
+
11
+ The engine is **large, mature, and — in its heavily-exercised numerical cores — genuinely solid.** The recently-hardened subsystems held up under fresh scrutiny: **physics** (solver, narrowphase, fluid — 26k LOC) came back essentially clean (2 low-reach mediums in a 2D demo file and a near-parallel-capsule edge case); the **acoustic simulation core** (Steam-Audio-style sim + Sopra middleware) was verified line-by-line and is clean; the **network core** has had its four previously-known P0 security bugs **fixed** (malformed-packet crashes contained, pending-log bounded, RESUME_HELLO safe, inbound authorization now exists).
12
+
13
+ The defects concentrate in the **glue and lifecycle code** rather than the algorithms: ECS entity/observer lifecycle, ECS↔render/audio bindings, component copy/clone and JSON-vs-binary serialization, GPU/listener cleanup on teardown, and a long tail of one-character typos that survive because they sit on paths without a regression test. Many are trivial to fix; several corrupt data or crash on common paths.
14
+
15
+ ### Headline counts
16
+
17
+ | Severity | Count | Character |
18
+ |---|---:|---|
19
+ | **CRITICAL** | ~21 | Crash, data corruption, or wrong result on a common/default path (or a security hole). Mostly small, high-value fixes. |
20
+ | **HIGH** | ~61 | Wrong result or crash on a real path (often a specific-but-normal configuration). |
21
+ | **MEDIUM** | ~97 | Wrong result on an edge case, or a resource leak. |
22
+
23
+ > A large fraction of the CRITICAL/HIGH items are **one-line or few-line fixes** (a typo, a wrong axis, a `subscribe` that should be `unsubscribe`, a `floor` that should be `ceil`). The volume reflects *breadth of surface*, not systemic rot — the numerical cores are trustworthy; the seams between systems are where correctness leaks.
24
+
25
+ > **Correction (post-review verification):** an initial group of ~5 "re-entrancy" findings was adversarially re-verified against the actual call graph and largely withdrawn — see **§8**. JavaScript has no threaded concurrency, and *synchronous* re-entrancy (a callback calling back into the same function) turned out to have **no concrete triggering caller** for the ECS cases. The counts above already reflect the corrections (1 critical demoted, 3 highs dropped, 1 high reclassified to medium). The concrete, source-verified criticals below are unaffected.
26
+
27
+ ### Health by subsystem
28
+
29
+ | Subsystem | Verdict |
30
+ |---|---|
31
+ | physics (solver / narrowphase / fluid) | **Solid.** Cores clean; only a 2D-demo bounds bug + one capsule edge case. |
32
+ | sound (acoustic sim + Sopra) | **Solid.** Sim/render/serialization clean; a few edge-case runtime mediums. |
33
+ | network (core + transport) | **Good.** Prior P0s fixed; 1 residual auth-default HIGH, a few mediums. |
34
+ | interpolation, animation curve math | **Solid.** Easing/Hermite/binary-search correct; bugs are in serialization & playback wrapping. |
35
+ | **ecs (core)** | **Concern.** 1 critical (observer-lifecycle leak) + several high-severity lifecycle/serialization bugs. (A re-entrant-scratch "critical" was withdrawn on verification — see §8.) |
36
+ | **graphics (ecs bindings, texture, particles)** | **Concern.** Multiple criticals (atlas lookup, particle buffer, decal/light bindings). |
37
+ | **gameplay glue (control/input, attachment, grid, terrain/fow)** | **Concern.** Criticals in wall sensors, input sort, attachment queue, fog-of-war, terrain seams, grid rounding. |
38
+ | MikkTSpace tangent/weld | **Concern.** 2 criticals defeat tangent smoothing & vertex welding for real meshes. |
39
+ | asset loaders | **Concern.** Preloader hang + several decode/round-trip bugs. |
40
+
41
+ ---
42
+
43
+ ## 2. Recurring patterns (fix the class, not just the instance)
44
+
45
+ The same mistakes recur across unrelated subsystems. Each is worth a targeted sweep:
46
+
47
+ 1. **`copy()` / `clone()` drops fields.** `Camera.copy` (fov, clip planes), `GridPosition2Transform.copy` (flags), `Transform.copy` (propagates a cleared auto-update flag). Cloned entities silently revert to defaults. → *Audit every `copy()`/`clone()` against its field list; add round-trip tests.*
48
+ 2. **JSON vs binary (de)serialization diverge.** AnimationGraph state `name`/`tags` dropped; `startingSate` typo; POINT-light `distance` binary-only; `SerializationMetadata` flags truncated to 8 bits; `Team` sentinel aliasing; `ViewportPosition.resolveGuiCollisions` dropped; `AnimationClip.repeatCount` defaults to ∞ in JSON but 1 in the field; sound-material `type` always `undefined`. → *Every component needs a JSON↔binary↔field round-trip test.*
49
+ 3. **subscribe/unsubscribe asymmetry & wrong-signal binding.** Decal `unlink` re-subscribes instead of unsubscribing; `LightBinding` binds the scale handler to `rotation.onChanged`; `TransformAttachmentBinding` never watches its local transform; `ForwardPlusRenderingPlugin.shutdown` removes from the wrong signal; `WaterSystem.shutdown` dereferences a non-existent field. → *Every `link/startup` subscription must have a matching `unlink/shutdown` removal on the same signal.*
50
+ 4. **GPU / listener leaks on teardown.** `GraphicsEngine.stop`, `GUIEngine.shutdown`, `SceneManager.clear`, `DomElementProcessorManager.unlink`, `Water`/`CameraSystem.rebuild`, `set_environment_texture`, virtual-atlas eviction. → *Teardown paths need the same rigor as setup.*
51
+ 5. **Shared instance state reused across a sequential loop.** `SimulationStepCurlNoiseVelocity` reuses one step instance for every emitter and accumulates `this.time` per call → curl-noise animates ∝ emitter count. → *Derive phase from a per-emitter/global clock, not an accumulator on the shared step.* *(This is the one surviving instance of what was originally framed as a broader "shared-scratch re-entrancy" pattern; the ECS re-entrancy findings were withdrawn on verification — see §8.)*
52
+ 6. **Axis / plane-index confusion.** FogOfWar width/height swap; HUD `z *= scale.y`; frustum near/far indexed as `[0]`/`[5]` inconsistently; sensor right-vector sign; ortho `bottom - top`. → *Centralize frustum-plane index constants; unit-test coordinate transforms with non-square / non-uniform inputs.*
53
+ 7. **Array mutation during iteration / bad sort comparators.** `SGMeshSystem` splices while modulo-indexing; `ParticleGroup.deleteIndices` uses a lexicographic sort; `optimizeCommandQueue` and `InputControllerSystem` comparators are non-antisymmetric/typo'd; `InputControllerSystem.remove` splices index `-1`. → *Snapshot before mutating; always pass a numeric comparator.*
54
+ 8. **Log-and-fall-through (missing `return` after an error).** `SoundControllerSystem`, `SoundEmitterSystem`, `ParticleVolume.fromJSON`, terrain `obtainTileAtWorldPosition2D` log or warn, then dereference the thing they just reported missing.
55
+ 9. **Default-value divergence between field init and `fromJSON`.** `repeatCount` (1 vs ∞), `screenEdgeWidth` (10 vs 0).
56
+
57
+ ---
58
+
59
+ ## 3. Critical findings
60
+
61
+ Ranked by blast radius on common/default paths. **✔ = re-verified against source by the lead reviewer.**
62
+
63
+ | # | Subsystem | Location | Defect | One-line fix |
64
+ |---|---|---|---|---|
65
+ | C1 ✔ | ecs core | `ecs/EntityObserver.js:130` | `isConnected` returns `dataset === null` — **inverted**; `EntityManager.detachDataset` then skips `removeObserver` for every live observer → `System.unlink` never runs on detach → resources leak, re-attach double-links. | `return this.dataset !== null;` |
66
+ | C3 ✔ | grid | `grid/transform2grid/Transform2GridPositionSystem.js:56` | `Ceil` mode calls `v2.floor()` (copy-paste) → Ceil-mode entities placed in the **wrong grid cell**; pathing/occupancy read the wrong tile. | `v2.ceil();` |
67
+ | C4 ✔ | ecs attachment | `ecs/attachment/AttachmentSystem.js:80` | `clearAllWaitRecordsFor` shadows the param then tests `if (entity === entity)` (always true) → **wipes the entire attachment wait-queue** on any unlink. | Compare `waiting[i]` against the parameter. |
68
+ | C5 ✔ | graphics/ecs | `graphics/ecs/decal/v2/FPDecalSystem.js:216` | `unlink()` calls `transform.subscribe(...)` (should be `unsubscribe`) after nulling `__fp_decal` → next transform change calls `.setTransform` on `null` → **crash** + listener leak. | `transform.unsubscribe(...)` |
69
+ | C6 | control | `control/first-person/sensors/FirstPersonSensorsSystem.js:131` | Body-right vector is the **negation** of the controller's own convention → `wallLeft`/`wallRight` swapped → wall-run tilts the camera the wrong way, all wall logic mirrored. | `rx = -cos(yaw); rz = sin(yaw);` |
70
+ | C7 | input | `input/ecs/systems/InputControllerSystem.js:100` | Priority comparator reads `b.priotity` (typo; field doesn't exist) → `NaN` comparator → **non-deterministic input dispatch order**; exclusive bindings cut the wrong handler. | `b.priority - a.priority` + define the field. |
71
+ | C8 | particles | `particular/group/ParticleGroup.js:466` | `indices.sort()` (lexicographic) feeds a compaction that assumes ascending numeric order → with any index ≥ 10, **corrupts the particle buffer & reference maps**. | `indices.sort((a,b)=>a-b)` |
72
+ | C9 | particles | `particular/engine/emitter/ParticlePool.js:507` | `updateRange.count = n` (particles) not `n*itemSize` (elements) → only the first `1/itemSize` of particles get multi-component attribute updates uploaded (e.g. ¾ of colors stale). | `attribute.updateRange.count = n * itemSize;` |
73
+ | C10 | graphics texture | `graphics/texture/atlas/AtlasLookupTexture.js:80` | Writes patch **height into the width channel** (`size.y` twice, `size.x` never) → non-square atlas patches sample a wrong-width sub-rect → garbled sprites. | `data[address + 2] = size.x;` |
74
+ | C11 | graphics texture | `graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js:93` | `rcp_ratio_y = 2 / ratio_x` → non-uniform Lanczos downscale uses the wrong support in Y (ships broken; its spec is `describe.skip`). | `2 / ratio_y` |
75
+ | C12 | ecs fow | `ecs/fow/FogOfWar.js:562` | `rebuildSampler` swaps width/height → **transposed fog grid** for any non-square map; all reveal/conceal indexing uses the wrong stride and resize corrupts. | `samplerWidth = size.x+2; samplerHeight = size.y+2;` |
76
+ | C13 | ecs terrain | `ecs/terrain/tiles/TerrainTileManager.js:562` | Seam-stitch uses `floor(size/tileSize)` but tiles are created with `ceil` → partial edge tiles **never seam-stitched** → lighting crease on every non-multiple terrain boundary. | Use `ceil` in `stitchTile`. |
77
+ | C14 | asset | `preloader/AssetPreloader.js:291` | `assetLoadFailed` lacks the level-completion check `assetLoadSuccess` has → if a **failure is the last completion** in a level, `levelFinished` never fires → **the whole preload hangs**. | Dispatch `levelFinished` on `loaded+failed >= batch_size`. |
78
+ | C15 | navigation | `navigation/ecs/path_following/PathFollower.js:160` | `fromJSON` gates on `json.loop` but writes `json.active` into the Loop flag → a one-shot mover deserializes as looping → teleports to start forever, never fires `EndReached`. | `writeFlag(Loop, json.loop)` |
79
+ | C16 | animation | `animation/curve/actionProcessorOperations/curveActions.js:118` | `MoveKeyframeAction` aliases live curve keyframes to its undo snapshots then mutates them in place → **undo/redo corrupts the curve**. | Copy values into existing keyframes; don't reassign references. |
80
+ | C17 | geometry | `graphics/geometry/MikkT/BuildNeighborsFast.js:116` | Edge-neighbor pairing reads the wrong array slots (compares a vertex index against an edge number) → neighbors never found for real meshes → **per-face (faceted) tangents** → normal-map seams everywhere. | Read `temp_edge_B[0],[1],[2]`; drop the bogus flip. |
81
+ | C18 | geometry | `graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js:79` | Radix-sort insertion has an operator-precedence bug (`&0xff` masks the whole sum) → multi-byte vertex hashes mis-sorted → **vertex welding fails** (duplicates survive). | `pass*257 + ((key>>shift)&0xff)` |
82
+ | C19 | logging | `logging/elastic/ElasticSearchLogger.js:82` | Constructor sets `__timeout_ms` but the scheduler reads `__timeout` (undefined) → the timed flush is **never armed** → any session logging < 500 records loses **all** buffered logs on unload. | Unify the field name. |
83
+ | C20 | ecs core | `ecs/EntityComponentDataset.js:1886` | `dropData` clears `__entityEventListeners` but not `__entityAnyEventListeners`; entity ids recycle → a new entity inherits the **previous scene's** any-listeners with a dangling context → crash/corruption on fast scene swap. | Also clear `__entityAnyEventListeners`. |
84
+ | C21 ✔ | ecs core | `ecs/EntityManager.js:357` | `detachDataset` calls `system.handleDatasetAttached(dataset)` while tearing the dataset down (should be `handleDatasetDetached`) → dataset-switching systems re-run attach logic on detach. | `handleDatasetDetached(dataset)` |
85
+ | C22 | sound | `sound/material/concrete/json/serializeSoundMaterialToJSON.js:3` | Reads `typeName` off the prototype but it's a **static** on the constructor → always `undefined` → every composite sound-material serializes `type: undefined` → deserialize throws. | `material.constructor.typeName` |
86
+
87
+ > **`C2` is intentionally absent** — the original C2 (`traverseEntities` scratch re-entrancy) was demoted to a LOW latent-hazard on verification and moved to §8. Numbering C3–C22 is preserved for traceability with the working notes.
88
+
89
+ ---
90
+
91
+ ## 4. High-severity findings by subsystem
92
+
93
+ ### ECS core & lifecycle
94
+ - **`Entity.promiseEvent`** (`:327`): calls `removeEventListener(EntityRemoved, reject)` instead of `add` → the promise never rejects on entity removal → **awaiter hangs forever**.
95
+ - Binary entity-id delta encoding (`BinaryBufferSerializer.js:174`) relies on ascending traversal order guarded only by a stripped assert → silent corruption if order ever breaks.
96
+ - *(Two "re-entrant event dispatch / removeEntity" items previously listed here were withdrawn on verification — the dispatch path is deliberately recursion-safe, and no caller triggers the removeEntity hazard. See §8.)*
97
+
98
+ ### Graphics — ECS bindings
99
+ - **`LightBinding`** (`graphics/ecs/light/binding/LightBinding.js:51`): scale handler bound to `rotation.onChanged` → spot-light range goes stale on scale.
100
+ - **`WaterSystem.shutdown`** (`:61`): dereferences non-existent `graphicsEngine.size` → TypeError on teardown; real `preRender` hook leaked.
101
+ - **`auto_set_camera_clipping_planes`** (`:44,100`): reads `old_near/far` *after* overwriting them with the outer bounds → autoClip hysteresis never tightens → persistent z-fighting.
102
+ - **`set_camera_aspect_ratio`** (`:26`): ortho `h = bottom - top` (negative) → mirrored/inverted frustum on resize.
103
+ - **`ForwardPlusRenderingPlugin.shutdown`** (`:80`): unsubscribes from the wrong signal → `__prepare_for_render` keeps firing on **disposed** GPU textures.
104
+ - **`sg_hierarchy_compute_bounding_box_via_parent_entity`** (`:19`) & **`SGMeshSystem.update`** (`:281`): the former ignores its `entity` arg (empty AABB → wrong LPV probes); the latter splices its wait-queue while modulo-indexing → skips entities & dereferences `undefined`.
105
+
106
+ ### Graphics — texture / particles / geometry
107
+ - Managed atlases serve **stale, atlas-evicted patches** from a TTL-∞ loader cache (`ManagedTextureAtlas.js`); `CachingTextureAtlas.__evict_all` leaves index 0 behind (`:152`).
108
+ - `sampler2d_scale_down_linear` (`:53`) mis-indexes on non-integer ratios; `sampler2d_copy_with_margins` (`:124`) uses `width` for a vertical bound → non-square seams.
109
+ - *(MEDIUM)* Curl-noise simulation time advances **once per emitter** on a shared step instance → noise animates ∝ emitter count (`SimulationStepCurlNoiseVelocity.js:22`). *Shared-sequential-state (a per-emitter loop reusing one instance), not re-entrancy.*
110
+ - `ParticleEmitter` hash/equals disagree on flags; `ShaderManager` leaks a disposed emitter after a graveyard round-trip.
111
+ - `equal_attribute_structure` returns truthy `-1` on name mismatch → **merges incompatible geometries** (`merge_geometry_hierarchy.js:92`); `InstancedMeshGroup.build` retains stale per-instance colors on shrink+regrow.
112
+ - **`bvh32_geometry_nearest`** (`graphics/geometry/buffered/query/bvh32_geometry_nearest.js:188`): the denormalize block is **duplicated verbatim** → normalized (quantized-GLTF) vertex buffers are divided by 65535 **twice** → nearest-point/normal computed against a triangle collapsed to the origin.
113
+ - **`ensureGeometryBoundingSphere`** (`:15`): returns the stale `null` on the first (compute) call — assigns the sphere to the geometry but not the local it returns → `s.radius` TypeError for any caller using the documented return value.
114
+
115
+ ### Graphics — water is broken three ways
116
+ Water rendering is currently non-functional on the pinned three r136, via three independent defects — worth fixing as a unit:
117
+ 1. **`WaterShader.js`** (`:22,112,142`) references ShaderChunk symbols removed in r136 (`lights_pars`, `linear_to_gamma_fragment`) and the renamed `BRDF_Diffuse_Lambert` → **GLSL compile failure** → water surface throws / renders nothing.
118
+ 2. **`WaterSystem.shutdown`** (`:61`) dereferences a non-existent `graphicsEngine.size` → **TypeError on teardown**.
119
+ 3. **`Water`/`WaterSystem`** never dispose the per-terrain height `DataTexture`, plane geometry, or shader material → **GPU leak** on every water create/destroy.
120
+
121
+ ### Control / input
122
+ - `phaseCrossed` misses exactly-on-boundary landings → dropped footstep/breath events; `PointerDevice.observeTap` leaks a shared move handler under multi-touch; `InputControllerSystem.remove` splices `-1` (deletes an unrelated pending binding); `TouchDevice` never attaches its handlers (pinch is dead).
123
+
124
+ ### ECS gui / actions / terrain / parent
125
+ - `HeadsUpDisplaySystem` scales world-offset Z by `scale.y` (`:88`); `obtainTileAtWorldPosition2D` dereferences an out-of-bounds tile (crash in prod). *(A `DynamicActorSystem.match` re-entrancy item was withdrawn on verification — see §8.)*
126
+
127
+ ### Asset loaders
128
+ - 1-bit and sub-8-bit palette PNGs decode to garbage (wrong byte index + bit order); `SVGAssetLoader` hangs on any non-200; the worker image decoder **detaches a cached ArrayBuffer** asset's buffer → second request gets an empty/garbage image.
129
+
130
+ ### Animation / navigation / intelligence
131
+ - `AnimationTrackPlayback.advance` wraps with `%= timeEnd` (ignores `timeStart`) and re-fires `on.ended` **every frame** past the end; `estimatePathViaIterativeIntegral` never terminates (infinite loop); GLTF CUBICSPLINE tangents imported without `/Δt` denormalization; grid A* uses an **inadmissible** squared-distance heuristic → non-shortest paths; `OverrideContextBehavior` initializes its source twice (first with the wrong context); `ConditionalBehavior` abandons a running source without finalizing it (leak).
132
+
133
+ ### Root engine / UI / logging (supporting)
134
+ - **`Ticker.pause()`** doesn't pause the clock → `resume()` emits the whole paused span as one `delta` → variable-rate systems jump seconds in a frame; `Ticker.start()` discards the initial rAF handle → double-start isn't caught and `stop()` can't cancel it → a self-perpetuating "stopped" loop.
135
+ - **`SceneManager.clear()`** leaves the old scene's clock speed-modifiers applied (wrong sim speed next scene) + listener leak.
136
+ - **ElasticSearchLogger**: even once armed, it POSTs a JSON array (not NDJSON) → ES rejects everything; `@timestamp = performance.now()` → all docs land in 1970.
137
+ - `GraphicsEngine.stop()`/`GUIEngine.shutdown()`/`set_environment_texture` leak framebuffers/tickers/PMREM targets and viewport listeners.
138
+
139
+ ### Graphics GI (sh3)
140
+ - **LPV GI vertex shader walks the tetrahedral mesh in object space, not world space** (`gi/material/space_vertex/build_vertex_shader.js:18`) → any mesh with a non-identity model matrix gets **wrong or missing indirect light** — and this is the *default* GI resolution stage.
141
+ - Path-tracer material conversion never copies texture wrap mode → all baked/traced textures are force-clamped → tiled surfaces sample one stretched edge texel; tint is linearized twice (textured albedo ~7× too dark); emissive color/intensity dropped.
142
+
143
+ ### Network
144
+ - **`ServerAuthoritativeServer`** applies remote actions with **no inbound authorization by default** (`authorize` stays `null` = permissive) — only the higher-level `NetworkSession` Host wires ownership enforcement, so a game built directly on this public primitive lets any peer drive another's entities. *(The four prior P0s — parse-crash, RESUME_HELLO, unbounded pending, missing auth mechanism — are otherwise fixed.)*
145
+ - Receiver reassembly cap (64 KiB) is far below the sender's fragment capacity (~302 KiB) → large `INITIAL_SYNC`/`STATE_BURST` snapshots are **silently dropped** (client never gets initial state).
146
+
147
+ ---
148
+
149
+ ## 5. What is clean / solid (do not re-open)
150
+
151
+ - **Physics** — solver core (TGS split-impulse, friction cone, warm-start, soft-step, determinism), narrowphase (SAT/GJK/EPA, all primitive pairs), fluid MAC solver (staggered indexing, exact adjoint projection, MacCormack), and the physics↔ECS bridge (wake/sleep, ABA windows). Only 2 low-reach mediums.
152
+ - **Sound** — the acoustic simulator (energy trace, RT60/Sabine, air absorption, reflection-IR + FOA directional reverb, corner-leak pathing, probe-visibility recheck), all probe-graph indexing, and all 24 binary adapters verified clean.
153
+ - **Network** — seq/ack wrap math, quantization round-trip, slot tables, ledger repack, snapshot bounds-checking, time-sync — all correct; the parse boundary is hardened.
154
+ - **Animation/interpolation math** — Hermite/Bézier eval, easing, keyframe binary search (before/after/exact/duplicate), interpolation-log ring/bloom, pose nlerp shortest-arc.
155
+ - Most **serialization round-trips** are symmetric; the bugs are specific divergences (§2.2), not a broken framework.
156
+
157
+ ---
158
+
159
+ ## 6. Remediation plan
160
+
161
+ ### Phase 0 — Immediate (hours): trivial, high-value, data-loss / crash on common paths
162
+ These are one-line/few-line fixes; each has an unambiguous correct value. Land them first, each with a regression test.
163
+
164
+ `C1` isConnected · `C3` grid Ceil · `C4` attachment queue · `C5` decal unsubscribe · `C7` input priority typo · `C8` particle sort · `C9` particle itemSize · `C10` atlas lookup · `C11` lanczos ratio · `C14` preloader hang · `C15` path-follower loop flag · `C19` ES logger timer · `C21` detach hook · `C22` sound-material type · plus `HUD scale.z`, `LightBinding scale signal`, `Ticker.pause clock`.
165
+
166
+ ### Phase 1 — Short (days): correctness with slightly wider blast radius
167
+ - ECS lifecycle: `C20` any-listener clear on `dropData` (real id-recycling bug — **not** re-entrancy), and the `F5` curl-noise per-emitter time (§2.5).
168
+ - The two **MikkTSpace** criticals (`C17`, `C18`) — normal-mapped meshes render wrong until fixed; add a multi-triangle tangent-continuity + weld test.
169
+ - `C6` wall sensors, `C12` fog-of-war transpose, `C13` terrain seam — add **non-square / non-uniform** test fixtures (they hide behind square/identity inputs).
170
+ - Teardown-leak sweep (pattern §2.4): `GraphicsEngine.stop`, `GUIEngine.shutdown`, `SceneManager.clear`, `ForwardPlusRenderingPlugin.shutdown`, `WaterSystem`, `DomElementProcessorManager`.
171
+
172
+ ### Phase 2 — Medium (days–weeks): higher-effort or design-touching
173
+ - **LPV GI world-space fix** (verify against LPG chunk) — restores correct indirect lighting on transformed meshes.
174
+ - Path-tracer wrap-mode / gamma / emissive fixes — improve every bake.
175
+ - `AnimationTrackPlayback` loop/`ended` latching; asset PNG sub-8-bit decode; A* admissible heuristic.
176
+ - Network: default `ServerAuthoritativeServer.authorize`, reconcile the fragment-reassembly cap, investigate the flagged client action-log overwrite caveat.
177
+
178
+ ### Cross-cutting (do alongside)
179
+ 1. **Serialization round-trip test harness** — for every component, assert `field-init == fromJSON(toJSON()) == fromBinary(toBinary())`. This catches the entire §2.2 class at once.
180
+ 2. **`copy()`/`clone()` field audit** (§2.1) — mechanical grep + review.
181
+ 3. **subscribe/unsubscribe pairing lint** (§2.3) — every `startup/link` subscription needs a matching removal on the same signal.
182
+ 4. Prefer numeric comparators everywhere (`(a,b)=>a-b`); grep for bare `.sort()`.
183
+
184
+ ---
185
+
186
+ ## 7. Coverage & confidence
187
+
188
+ - **Reviewed:** all non-spec/non-prototype source across every subsystem. The five highest-impact CRITICALs were re-read and confirmed against source; agent reliability sampled at 5/5.
189
+ - **Verification pass:** the "re-entrancy" finding class was singled out for a dedicated adversarial re-check against the actual call graph (§8) — one instance was confirmed-but-not-reachable (demoted), three had no triggering caller (dropped), one was a mislabelled real bug (reclassified). This is the honest calibration: *concrete* findings (a wrong value on a direct code path) held up; *mechanism-only* findings that assumed a triggering caller did not.
190
+ - **Confidence markers:** each finding in the source reports carries Confirmed / Likely / Possible. "Latent" (public library surface with no in-repo caller) items are still real bugs — meep is a library — and are called out where relevant.
191
+ - **Excluded by design:** `prototype*.js` (internal tools), `*.spec.js`, hand-written `.d.ts`.
192
+ - **Gap-fill passes (complete, folded in):** shaders/shadows/geometry-buffered/bvh (3 HIGH — WaterShader r136 compile failure, `bvh32_geometry_nearest` double-denormalize, `ensureGeometryBoundingSphere` null-return; + a point-light VSM-shadow medium); render gizmo/view/AO (4 MEDIUM — AO `ShaderMaterial` leak on shutdown, stale `projectionMatrixInverse` after projection-modifier, `DepthLimitedBlur` dropped `format`, `NormalFrameBuffer` shared-material wrong-normals); sh3/lightmap (clean apart from 1 MEDIUM — T-junction shading-normal carry). **No new CRITICALs surfaced in any gap-fill.** The lightmap baker and the AO shader math were verified clean.
193
+
194
+ ---
195
+
196
+ ## 8. Corrections — the "re-entrancy" re-examination
197
+
198
+ The first synthesis of this review flagged ~5 findings under a "shared-scratch re-entrancy" banner. That framing was challenged and re-verified against the actual call graph. **Note on terminology:** JavaScript has no threaded/preemptive concurrency, but *synchronous* re-entrancy (a callback calling back into the same function on one call stack) is real — so the deciding question was never "can JS re-enter" but "does a concrete caller in this codebase actually re-enter these functions." Adversarial verification (instructed to *refute* each and to hunt for a real triggering caller):
199
+
200
+ | Finding | Was | Now | Verified reason |
201
+ |---|---|---|---|
202
+ | `traverseEntities` module-static scratch (`EntityComponentDataset.js:1331/1373`) | CRITICAL | **LOW (latent)** | Mechanism real (statics read after `visitor.apply`), but an exhaustive lexical + transitive search found **no** visitor that nests a `traverseEntities` call. `getComponent`/`hasComponent` are O(1) non-traversing; the only real nested traversal (`FluidObstacleSystem.js:140/174`) nests `traverseComponents`, which uses locals. Cheap optional hardening: use per-call locals like `traverseEntitiesExact` (`:1407/:1418`). |
203
+ | Event-dispatch proxy stack (`EntityComponentDataset.js:2139/2186`) | HIGH | **LOW** | The dispatcher is **deliberately recursion-safe** (comment at `:2126`): each nested dispatch reserves a disjoint region via a saved/restored pointer, so a handler that synchronously fires another event does **not** corrupt the outer dispatch. The only real residue: no `try/finally`, so a *throwing* handler skips the pointer restore (`:2176`) → a slow monotonic growth (leak) of `entityListenersProxy`, not corruption. Fix: wrap the handler loop in `try/finally`. |
204
+ | `removeEntity` reentrant component-add (`:980`) | HIGH | **dropped** | No production `ComponentRemoved` listeners exist, and no `System.unlink` adds a component to its own dying entity. No triggering caller — can't-happen. |
205
+ | `DynamicActorSystem.match` shared `DataScope` (`DynamicActorSystem.js:523`) | HIGH | **dropped** | `match()`'s only caller is the dataset event listener; all actions defer side-effects to `BehaviorSystem.update` (a separate call stack), and the synchronous build emits events only on transient non-`DynamicActor` entities. No synchronous re-entry path. (`requestBestActors`'s per-call scope exists for a different reason — it traverses all actors during a tick.) |
206
+ | Curl-noise `this.time` accumulation (`SimulationStepCurlNoiseVelocity.js:22`) | HIGH (mislabelled re-entrancy) | **MEDIUM (reclassified)** | A **real** bug but it is **shared-sequential-state**, not re-entrancy: one shared step instance is reused across a sequential per-emitter loop, so `this.time` advances ∝ emitter count. Kept in §2.5 / §4 with the correct label. |
207
+
208
+ **Net:** 1 critical demoted (latent), 3 highs dropped as can't-happen, 1 high reclassified to a real medium. This aligns with the project's convention against flagging conditions that cannot occur. The lesson applied going forward: a mechanism-only finding is not reported unless a concrete triggering caller is demonstrated.
209
+
210
+ ---
211
+ *Detailed per-finding failure scenarios and fixes are preserved in the review working notes; each table/section entry cites `file:line` for direct navigation.*
@@ -1 +1 @@
1
- {"version":3,"file":"curveActions.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/animation/curve/actionProcessorOperations/curveActions.js"],"names":[],"mappings":"AAKA;IACI;;;;;;;;;;OAUG;IACH,sIATW,cAAc,EAkBxB;IARG,cAAqB;IACrB,sBAAsC;IACtC,mBAAgC;IAChC,sBAAqC;IACrC,uBAAuC;IACvC,2BAA8C;IAC9C,yBAA4C;IAC5C,mBAAgC;CAEvC;AAED;IACI;;;;;OAKG;IACH,wDAHW,QAAQ,WACR,gBAAgB,EAc1B;IAVG,oBAA2C;IAC3C,0BAAuC;IAEvC,gCAA4B;IAE5B,0BAAsE;IACtE,oCAA0C;IAM9C,mCASC;IAED,oCAMC;CACJ;AAED;IACI;;;;OAIG;IACH,0BAHW,QAAQ,WACR,gBAAgB,EAO1B;IAHG,2BAA4C;IAE5C,gCAA4B;IAGhC,mCAIC;IAED,oCAKC;CACJ;AAED;IACI;;;;;;;OAOG;IACH,iCANW,cAAc,qBACd,cAAc,qBACd,cAAc,mBACd,cAAc,WACd,gBAAgB,EAW1B;IAPG,8BAAsC;IACtC,gCAAkD;IAElD,4BAAkC;IAClC,8BAA8C;IAE9C,gCAA4B;IAGhC,mCAMC;IAED,oCAMC;CACJ;AAED;IACI;;;;;;;OAOG;IACH,0BANW,QAAQ,0BACR,QAAQ,wBACR,QAAQ,0CAER,gBAAgB,EAU1B;IANG,sBAA+B;IAC/B,6BAAwD;IACxD,2BAAoD;IAEpD,gCAA4B;IAC5B,gCAAgD;IAGpD,mCAKC;IAED,oCAKC;CACJ;AAED;IACI;;;;;;OAMG;IACH,uHAFW,gBAAgB,EAU1B;IANG,gCAAiD;IACjD,wBAA8B;IAE9B,4BAAkC;IAElC,gCAA4B;IAGhC,mCAMC;IAED,oCAMC;CACJ;+BAxM4B,sBAAsB;uBAD9B,yCAAyC;yBAEvC,gBAAgB;iBACtB,0CAA0C"}
1
+ {"version":3,"file":"curveActions.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/animation/curve/actionProcessorOperations/curveActions.js"],"names":[],"mappings":"AAKA;IACI;;;;;;;;;;OAUG;IACH,sIATW,cAAc,EAkBxB;IARG,cAAqB;IACrB,sBAAsC;IACtC,mBAAgC;IAChC,sBAAqC;IACrC,uBAAuC;IACvC,2BAA8C;IAC9C,yBAA4C;IAC5C,mBAAgC;CAEvC;AAED;IACI;;;;;OAKG;IACH,wDAHW,QAAQ,WACR,gBAAgB,EAc1B;IAVG,oBAA2C;IAC3C,0BAAuC;IAEvC,gCAA4B;IAE5B,0BAAsE;IACtE,oCAA0C;IAM9C,mCASC;IAED,oCAMC;CACJ;AAED;IACI;;;;OAIG;IACH,0BAHW,QAAQ,WACR,gBAAgB,EAO1B;IAHG,2BAA4C;IAE5C,gCAA4B;IAGhC,mCAIC;IAED,oCAKC;CACJ;AAED;IACI;;;;;;;OAOG;IACH,iCANW,cAAc,qBACd,cAAc,qBACd,cAAc,mBACd,cAAc,WACd,gBAAgB,EAW1B;IAPG,8BAAsC;IACtC,gCAAkD;IAElD,4BAAkC;IAClC,8BAA8C;IAE9C,gCAA4B;IAGhC,mCAQC;IAED,oCAKC;CACJ;AAED;IACI;;;;;;;OAOG;IACH,0BANW,QAAQ,0BACR,QAAQ,wBACR,QAAQ,0CAER,gBAAgB,EAU1B;IANG,sBAA+B;IAC/B,6BAAwD;IACxD,2BAAoD;IAEpD,gCAA4B;IAC5B,gCAAgD;IAGpD,mCAKC;IAED,oCAKC;CACJ;AAED;IACI;;;;;;OAMG;IACH,uHAFW,gBAAgB,EAU1B;IANG,gCAAiD;IACjD,wBAA8B;IAE9B,4BAAkC;IAElC,gCAA4B;IAGhC,mCAMC;IAED,oCAMC;CACJ;+BAzM4B,sBAAsB;uBAD9B,yCAAyC;yBAEvC,gBAAgB;iBACtB,0CAA0C"}
@@ -117,7 +117,9 @@ export class MoveKeyframeAction extends Action {
117
117
 
118
118
  async apply(context){
119
119
  for (let i = 0; i < this.actionContext.refCurve.length; i++) {
120
- this.actionContext.refCurve.keys[i] = this.curveRefEnd.keys[i];
120
+ // copy the end values into the live keyframe in place; do NOT
121
+ // reassign the live curve's keyframe to the snapshot object, or
122
+ // later edits would mutate the undo snapshots (C16).
121
123
  this.actionContext.refCurve.keys[i].copy(this.curveValueEnd.keys[i]);
122
124
  }
123
125
  this.actionContext.fnHandleCurveUpdate();
@@ -125,7 +127,6 @@ export class MoveKeyframeAction extends Action {
125
127
 
126
128
  async revert(context){
127
129
  for (let i = 0; i < this.actionContext.refCurve.length; i++) {
128
- this.actionContext.refCurve.keys[i] = this.curveRefStart.keys[i];
129
130
  this.actionContext.refCurve.keys[i].copy(this.curveValueStart.keys[i]);
130
131
  }
131
132
  this.actionContext.fnHandleCurveUpdate();
@@ -12,7 +12,7 @@ export function sample_animation_curve_to_float_array(
12
12
  out,
13
13
  out_offset,
14
14
  curve,
15
- sample_count = out.length
15
+ sample_count = out.length - out_offset
16
16
  ) {
17
17
  const keyframes = curve.keys;
18
18
  const keyframe_count = keyframes.length;
@@ -1 +1 @@
1
- {"version":3,"file":"AnimationTrackPlayback.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/keyed2/AnimationTrackPlayback.js"],"names":[],"mappings":";AAGA;IACI;;;;;;;;OAQG;IACH,4EAuBC;IAtBG,sBAAkB;IAClB,cAA+B;IAE/B,oBAAoC;IACpC,kBAAgC;IAEhC,uBAAuB;IACvB,8BAA8B;IAE9B,uBAAuB;IACvB,sBAAsB;IAEtB,gBAAmB;IAEnB,4BAA0D;IAG1D;;MAEC;IAKL;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,gBAFa,QAAQ,IAAI,CAAC,CAUzB;IAED;;;OAGG;IACH,WAFW,OAAO,QAIjB;IAED,cAEC;IAED;;;OAGG;IACH,kBAFW,MAAM,QA2BhB;IAED;;;OAGG;IACH,cAFa,OAAO,CA2CnB;IAED;;;OAGG;IACH,mBAFW,MAAM,QA6BhB;IAED,eAOC;IAED;;;OAGG;IACH,0BAFW,MAAM,EAAE,QA2ClB;CACJ;mBA9OkB,uCAAuC"}
1
+ {"version":3,"file":"AnimationTrackPlayback.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/keyed2/AnimationTrackPlayback.js"],"names":[],"mappings":";AAGA;IACI;;;;;;;;OAQG;IACH,4EAuBC;IAtBG,sBAAkB;IAClB,cAA+B;IAE/B,oBAAoC;IACpC,kBAAgC;IAEhC,uBAAuB;IACvB,8BAA8B;IAE9B,uBAAuB;IACvB,sBAAsB;IAEtB,gBAAmB;IAEnB,4BAA0D;IAG1D;;MAEC;IAKL;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,gBAFa,QAAQ,IAAI,CAAC,CAUzB;IAED;;;OAGG;IACH,WAFW,OAAO,QAIjB;IAED,cAEC;IAED;;;OAGG;IACH,kBAFW,MAAM,QA2BhB;IAED;;;OAGG;IACH,cAFa,OAAO,CA2CnB;IAED;;;OAGG;IACH,mBAFW,MAAM,QA+BhB;IAED,eAOC;IAED;;;OAGG;IACH,0BAFW,MAAM,EAAE,QA2ClB;CACJ;mBAhPkB,uCAAuC"}
@@ -165,7 +165,9 @@ class AnimationTrackPlayback {
165
165
  if (this.__loop) {
166
166
  //loop back
167
167
  newPosition %= this.track.timeEnd;
168
- } else {
168
+ } else if (this.position < this.track.timeEnd) {
169
+ //fire ended only once, when we first cross the end
170
+ //(this.position is still the pre-advance position here)
169
171
  this.on.ended.dispatch();
170
172
  }
171
173
  }
@@ -23,9 +23,9 @@ export function png_filter_unFilterNone(
23
23
  ) {
24
24
  if (bit_depth === 1) {
25
25
  for (let x = 0; x < length; x++) {
26
- const q = x >>> 4;
26
+ const q = x >>> 3;
27
27
  const datum = data[q + scanline_address];
28
- const shift = ((x) & 0x7);
28
+ const shift = ((~x) & 0x7);
29
29
  const out_value = (datum >>> shift) & 0x1;
30
30
  output[output_offset + x] = out_value;
31
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AssetPreloader.d.ts","sourceRoot":"","sources":["../../../../../src/engine/asset/preloader/AssetPreloader.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;GAiBG;AACH;IAEI;;;OAGG;IACH,8BAEC;IA+BD;;;OAGG;IACH,0BAEC;IAED;;;OAGG;IACH,iBAFU,aAAa,EAAE,EAAE,CAEf;IAEZ;;OAEG;IACH;QACI;;WAEG;eADO,OAAO,aAAa,EAAC,MAAM,CAAC;QAGtC;;;;WAIG;kBADO,OAAO;YAAC,QAAO;gBAAC,OAAO,EAAC,MAAM,CAAC;gBAAC,KAAK,EAAC,MAAM,CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAA;aAAC,CAAA;SAAC,CAAC;QAG3E;;;WAGG;uBADO,MAAM;QAGhB;;WAEG;;QAEH;;WAEG;iBADO,OAAO;YAAC,KAAK,EAAC,MAAM,CAAC;YAAC,KAAK,EAAC,MAAM,CAAA;SAAC,EAAE,CAAC;QAGhD;;;WAGG;mBADO,OAAO,MAAM,CAAC;QAGxB;;;;WAIG;kBADO,OAAO,MAAM,EAAC,MAAM,CAAC;MAGjC;IAaF;;;;;;;OAOG;IACH,SANW,MAAM,QACN,MAAM,UACN,MAAM,aACN,MAAM,GACL,cAAc,CA0CzB;IAED;;;OAGG;IACH,aAFW;QAAC,GAAG,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,CAAC,EAAC,MAAM,CAAA;KAAC,EAAE,QAQpD;IA8HD;;;;OAIG;IACH,kCAFY,IAAI,CA6Ef;;CACJ;AAED;;;GAGG;AACH,wBAFU,cAAc,CAEgB;8BAtZV,oBAAoB;mBAL/B,uCAAuC"}
1
+ {"version":3,"file":"AssetPreloader.d.ts","sourceRoot":"","sources":["../../../../../src/engine/asset/preloader/AssetPreloader.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;GAiBG;AACH;IAEI;;;OAGG;IACH,8BAEC;IA+BD;;;OAGG;IACH,0BAEC;IAED;;;OAGG;IACH,iBAFU,aAAa,EAAE,EAAE,CAEf;IAEZ;;OAEG;IACH;QACI;;WAEG;eADO,OAAO,aAAa,EAAC,MAAM,CAAC;QAGtC;;;;WAIG;kBADO,OAAO;YAAC,QAAO;gBAAC,OAAO,EAAC,MAAM,CAAC;gBAAC,KAAK,EAAC,MAAM,CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAA;aAAC,CAAA;SAAC,CAAC;QAG3E;;;WAGG;uBADO,MAAM;QAGhB;;WAEG;;QAEH;;WAEG;iBADO,OAAO;YAAC,KAAK,EAAC,MAAM,CAAC;YAAC,KAAK,EAAC,MAAM,CAAA;SAAC,EAAE,CAAC;QAGhD;;;WAGG;mBADO,OAAO,MAAM,CAAC;QAGxB;;;;WAIG;kBADO,OAAO,MAAM,EAAC,MAAM,CAAC;MAGjC;IAaF;;;;;;;OAOG;IACH,SANW,MAAM,QACN,MAAM,UACN,MAAM,aACN,MAAM,GACL,cAAc,CA0CzB;IAED;;;OAGG;IACH,aAFW;QAAC,GAAG,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,CAAC,EAAC,MAAM,CAAA;KAAC,EAAE,QAQpD;IAoID;;;;OAIG;IACH,kCAFY,IAAI,CA6Ef;;CACJ;AAED;;;GAGG;AACH,wBAFU,cAAc,CAEgB;8BA5ZV,oBAAoB;mBAL/B,uCAAuC"}
@@ -294,6 +294,12 @@ export class AssetPreloader {
294
294
 
295
295
  this.on.error.dispatch(e);
296
296
 
297
+ //monitor completion (a failure counts toward the level batch, and
298
+ //may be the last completion in it — see assetLoadSuccess)
299
+ if ((batchElementLoadedCount + batchElementFailedCount) >= batch_size) {
300
+ this.on.levelFinished.dispatch(level);
301
+ }
302
+
297
303
  this.#try_finish();
298
304
  }
299
305
 
@@ -1 +1 @@
1
- {"version":3,"file":"FirstPersonSensorsSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACI,cAsCC;IAnCG,wEAA4D;IAE5D;;;;;OAKG;IACH,kBAFU,iCAAiC,GAAC,IAAI,CAEpB;IAE5B;;;;;OAKG;IACH,eAFU,aAAa,GAAC,IAAI,CAEH;IAEzB;;;;;;OAMG;IACH,mBAA4B;IAE5B;;;;;;OAMG;IACH,mBAA2C;IAG/C,2CAaC;IAED,2BAIC;IAED;;OAEG;IACH,2BAmFC;IAED;;;;;;OAMG;IACH,wBASC;IAED;;;;;;;;;;;OAWG;IACH,kBAiBC;CACJ;uBAhOsB,wBAAwB;0BACrB,qCAAqC;4CACnB,mCAAmC;kDAC7B,yCAAyC;8BAL7D,uCAAuC"}
1
+ {"version":3,"file":"FirstPersonSensorsSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACI,cAsCC;IAnCG,wEAA4D;IAE5D;;;;;OAKG;IACH,kBAFU,iCAAiC,GAAC,IAAI,CAEpB;IAE5B;;;;;OAKG;IACH,eAFU,aAAa,GAAC,IAAI,CAEH;IAEzB;;;;;;OAMG;IACH,mBAA4B;IAE5B;;;;;;OAMG;IACH,mBAA2C;IAG/C,2CAaC;IAED,2BAIC;IAED;;OAEG;IACH,2BAsFC;IAED;;;;;;OAMG;IACH,wBASC;IAED;;;;;;;;;;;OAWG;IACH,kBAiBC;CACJ;uBAnOsB,wBAAwB;0BACrB,qCAAqC;4CACnB,mCAAmC;kDAC7B,yCAAyC;8BAL7D,uCAAuC"}
@@ -129,8 +129,11 @@ export class FirstPersonSensorsSystem extends System {
129
129
  const yaw = runtime.bodyYaw;
130
130
  const fx = Math.sin(yaw);
131
131
  const fz = Math.cos(yaw);
132
- const rx = Math.cos(yaw);
133
- const rz = -Math.sin(yaw);
132
+ // Right axis must match the controller's convention (-cosYaw, sinYaw)
133
+ // used for strafing/lean, so wallLeft/wallRight agree with the
134
+ // player's own left/right (see FirstPersonPlayerControllerSystem).
135
+ const rx = -Math.cos(yaw);
136
+ const rz = Math.sin(yaw);
134
137
 
135
138
  const wallProbeDist = cfg.body.radius * 2 + 0.05; // just past the capsule
136
139
  const obstacleProbeDist = 1.2; // ~one stride
@@ -324,7 +324,7 @@ export class Entity {
324
324
 
325
325
 
326
326
  this.addEventListener(eventName, handle_event);
327
- this.removeEventListener(EventType.EntityRemoved, reject);
327
+ this.addEventListener(EventType.EntityRemoved, reject);
328
328
  });
329
329
  }
330
330
 
@@ -1 +1 @@
1
- {"version":3,"file":"EntityComponentDataset.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityComponentDataset.js"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"EntityComponentDataset.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityComponentDataset.js"],"names":[],"mappings":"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"}
@@ -1895,6 +1895,7 @@ export class EntityComponentDataset {
1895
1895
  this.entityCount = 0;
1896
1896
 
1897
1897
  this.__entityEventListeners = [];
1898
+ this.__entityAnyEventListeners = [];
1898
1899
  }
1899
1900
 
1900
1901
  /**