@woosh/meep-engine 3.60.3 → 3.60.5

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 (514) hide show
  1. package/CHANGELOG.md +2602 -0
  2. package/CONTRIBUTING.md +7 -0
  3. package/MIGRATION_2_TO_3.md +136 -0
  4. package/SECURITY.md +4 -0
  5. package/editor/EditorCameraNavigation.d.ts +2 -1
  6. package/editor/EditorCameraNavigation.d.ts.map +1 -1
  7. package/editor/EditorCameraNavigation.js +51 -57
  8. package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts +3 -0
  9. package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts.map +1 -1
  10. package/editor/ecs/component/editors/ecs/Trail3DEditor.js +6 -0
  11. package/package.json +6 -2
  12. package/src/engine/EngineHarness.d.ts +3 -9
  13. package/src/engine/EngineHarness.d.ts.map +1 -1
  14. package/src/engine/EngineHarness.js +6 -8
  15. package/src/engine/graphics/camera/makeOrbitalCameraController.d.ts +9 -6
  16. package/src/engine/graphics/camera/makeOrbitalCameraController.d.ts.map +1 -1
  17. package/src/engine/graphics/camera/makeOrbitalCameraController.js +44 -71
  18. package/src/engine/graphics/camera/orbital/MomentumAxis.d.ts +64 -0
  19. package/src/engine/graphics/camera/orbital/MomentumAxis.d.ts.map +1 -0
  20. package/src/engine/graphics/camera/orbital/MomentumAxis.js +187 -0
  21. package/src/engine/graphics/camera/orbital/OrbitalCameraRig.d.ts +86 -0
  22. package/src/engine/graphics/camera/orbital/OrbitalCameraRig.d.ts.map +1 -0
  23. package/src/engine/graphics/camera/orbital/OrbitalCameraRig.js +319 -0
  24. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts +34 -10
  25. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts.map +1 -1
  26. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.js +116 -30
  27. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts +1 -7
  28. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts.map +1 -1
  29. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.js +1 -37
  30. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometryFlags.js +1 -2
  31. package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.d.ts +14 -0
  32. package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.d.ts.map +1 -0
  33. package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.js +22 -0
  34. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +19 -3
  35. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
  36. package/src/engine/graphics/ecs/trail3d/Trail3D.js +31 -4
  37. package/src/engine/graphics/ecs/trail3d/advance_trail.js +1 -1
  38. package/src/engine/graphics/ecs/water/Water.d.ts +8 -0
  39. package/src/engine/graphics/ecs/water/Water.d.ts.map +1 -1
  40. package/src/engine/graphics/ecs/water/Water.js +8 -0
  41. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts +5 -5
  42. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts.map +1 -1
  43. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.js +6 -6
  44. package/src/engine/graphics3/WaterSystem.d.ts.map +1 -1
  45. package/src/engine/graphics3/WaterSystem.js +731 -734
  46. package/src/engine/graphics3/decal/DecalTileShader.d.ts +61 -0
  47. package/src/engine/graphics3/decal/DecalTileShader.d.ts.map +1 -0
  48. package/src/engine/graphics3/decal/DecalTileShader.js +138 -0
  49. package/src/engine/graphics3/decal/GPUDecalRenderer.d.ts +10 -4
  50. package/src/engine/graphics3/decal/GPUDecalRenderer.d.ts.map +1 -1
  51. package/src/engine/graphics3/decal/GPUDecalRenderer.js +149 -44
  52. package/src/engine/graphics3/decal/chunk_decal_tile_vertex.d.ts +25 -0
  53. package/src/engine/graphics3/decal/chunk_decal_tile_vertex.d.ts.map +1 -0
  54. package/src/engine/graphics3/decal/chunk_decal_tile_vertex.js +55 -0
  55. package/src/engine/graphics3/decal/graph_gather_decal_tiles.d.ts +22 -0
  56. package/src/engine/graphics3/decal/graph_gather_decal_tiles.d.ts.map +1 -0
  57. package/src/engine/graphics3/decal/graph_gather_decal_tiles.js +70 -0
  58. package/src/engine/graphics3/decal/shader_decal_composite.d.ts +7 -5
  59. package/src/engine/graphics3/decal/shader_decal_composite.d.ts.map +1 -1
  60. package/src/engine/graphics3/decal/shader_decal_composite.js +48 -44
  61. package/src/engine/graphics3/decal/shader_decal_tile_copy.d.ts +12 -0
  62. package/src/engine/graphics3/decal/shader_decal_tile_copy.d.ts.map +1 -0
  63. package/src/engine/graphics3/decal/shader_decal_tile_copy.js +78 -0
  64. package/src/engine/graphics3/decal/shader_gather_decal_tiles.d.ts +11 -0
  65. package/src/engine/graphics3/decal/shader_gather_decal_tiles.d.ts.map +1 -0
  66. package/src/engine/graphics3/decal/shader_gather_decal_tiles.js +80 -0
  67. package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts +10 -0
  68. package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts.map +1 -1
  69. package/src/engine/graphics3/trail/trail_tube_write_geometry.js +13 -1
  70. package/src/engine/input/devices/mouse/MouseEventButtons.d.ts +13 -0
  71. package/src/engine/input/devices/mouse/MouseEventButtons.d.ts.map +1 -0
  72. package/src/engine/input/devices/mouse/MouseEventButtons.js +23 -0
  73. package/src/engine/input/ecs/controllers/KeyboardCameraController.d.ts +4 -0
  74. package/src/engine/input/ecs/controllers/KeyboardCameraController.d.ts.map +1 -1
  75. package/src/engine/input/ecs/controllers/KeyboardCameraController.js +9 -45
  76. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +2 -2
  77. package/src/engine/physics/cloth/ecs/cloth_geodesic.js +2 -2
  78. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  79. package/src/shade/playground/probe_clipmap/README.md +1 -0
  80. package/src/shade/playground/probe_clipmap/index.html +5 -0
  81. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  82. package/src/shade/playground/probe_clipmap/main.js +16 -2
  83. package/src/shade/playground/vgeo_scene/README.md +1 -1
  84. package/src/shade/playground/water_refraction/README.md +5 -6
  85. package/src/shade/playground/water_refraction/index.html +1 -1
  86. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  87. package/src/shade/renderer/Renderer.js +7 -5
  88. package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.d.ts +4 -6
  89. package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.d.ts.map +1 -1
  90. package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.js +34 -36
  91. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts +1 -1
  92. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts.map +1 -1
  93. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.js +162 -163
  94. package/src/shade/renderer/atmosphere/compute_mie_absorption.d.ts +1 -1
  95. package/src/shade/renderer/atmosphere/compute_mie_absorption.js +1 -1
  96. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.js +1 -1
  97. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.js +1 -1
  98. package/src/shade/renderer/atmosphere/shader_multiscatter_lut.js +164 -164
  99. package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.js +1 -1
  100. package/src/shade/renderer/camera/orbital/OrbitalCameraController.d.ts +40 -80
  101. package/src/shade/renderer/camera/orbital/OrbitalCameraController.d.ts.map +1 -1
  102. package/src/shade/renderer/camera/orbital/OrbitalCameraController.js +197 -147
  103. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  104. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  105. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
  106. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  107. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  108. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +4 -4
  109. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +4 -4
  110. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +2 -1
  111. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +1 -1
  112. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +18 -1
  113. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +2 -2
  114. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts +1 -1
  115. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.js +1 -1
  116. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +4 -5
  117. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts.map +1 -1
  118. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.js +6 -7
  119. package/src/shade/renderer/geometry/virtual/proxy/vgeo_to_proxy_mesh.d.ts +31 -0
  120. package/src/shade/renderer/geometry/virtual/proxy/vgeo_to_proxy_mesh.d.ts.map +1 -0
  121. package/src/shade/renderer/geometry/virtual/proxy/vgeo_to_proxy_mesh.js +343 -0
  122. package/src/shade/renderer/geometry/virtual/runtime/vgeo_meshlet_metadata_write.d.ts +17 -0
  123. package/src/shade/renderer/geometry/virtual/runtime/vgeo_meshlet_metadata_write.d.ts.map +1 -0
  124. package/src/shade/renderer/geometry/virtual/runtime/vgeo_meshlet_metadata_write.js +29 -0
  125. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts.map +1 -1
  126. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js +7 -13
  127. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  128. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +2 -8
  129. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +5 -5
  130. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
  131. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +10 -10
  132. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +12 -0
  133. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  134. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +22 -0
  135. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +4 -4
  136. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  137. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +50 -13
  138. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +6 -0
  139. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
  140. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +7 -0
  141. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts +13 -0
  142. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts.map +1 -0
  143. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js +13 -0
  144. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +17 -0
  145. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
  146. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +20 -0
  147. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts +5 -15
  148. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts.map +1 -1
  149. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.js +6 -34
  150. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.d.ts +18 -0
  151. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.d.ts.map +1 -0
  152. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.js +42 -0
  153. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
  154. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +5 -4
  155. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +4 -0
  156. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
  157. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +13 -2
  158. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts +52 -0
  159. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts.map +1 -0
  160. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.js +250 -0
  161. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts.map +1 -1
  162. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js +1 -7
  163. package/src/shade/renderer/hiz/HZBFootprint.d.ts +14 -0
  164. package/src/shade/renderer/hiz/HZBFootprint.d.ts.map +1 -0
  165. package/src/shade/renderer/hiz/HZBFootprint.js +16 -0
  166. package/src/shade/renderer/hiz/HZB_FOOTPRINT_X.d.ts +10 -0
  167. package/src/shade/renderer/hiz/HZB_FOOTPRINT_X.d.ts.map +1 -0
  168. package/src/shade/renderer/hiz/HZB_FOOTPRINT_X.js +11 -0
  169. package/src/shade/renderer/hiz/HZB_FOOTPRINT_Y.d.ts +10 -0
  170. package/src/shade/renderer/hiz/HZB_FOOTPRINT_Y.d.ts.map +1 -0
  171. package/src/shade/renderer/hiz/HZB_FOOTPRINT_Y.js +11 -0
  172. package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts +0 -7
  173. package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts.map +1 -1
  174. package/src/shade/renderer/hiz/HierarchicalZBuffer.js +405 -350
  175. package/src/shade/renderer/hiz/chunk_hzb_footprint_x.d.ts +12 -0
  176. package/src/shade/renderer/hiz/chunk_hzb_footprint_x.d.ts.map +1 -0
  177. package/src/shade/renderer/hiz/chunk_hzb_footprint_x.js +27 -0
  178. package/src/shade/renderer/hiz/chunk_hzb_footprint_y.d.ts +12 -0
  179. package/src/shade/renderer/hiz/chunk_hzb_footprint_y.d.ts.map +1 -0
  180. package/src/shade/renderer/hiz/chunk_hzb_footprint_y.js +27 -0
  181. package/src/shade/renderer/hiz/hzb_footprint_texels.d.ts +14 -0
  182. package/src/shade/renderer/hiz/hzb_footprint_texels.d.ts.map +1 -0
  183. package/src/shade/renderer/hiz/hzb_footprint_texels.js +34 -0
  184. package/src/shade/renderer/hiz/shader_hzb_reduce_any.d.ts +0 -5
  185. package/src/shade/renderer/hiz/shader_hzb_reduce_any.d.ts.map +1 -1
  186. package/src/shade/renderer/hiz/shader_hzb_reduce_any.js +37 -57
  187. package/src/shade/renderer/hiz/shader_hzb_reduce_mip0.d.ts +11 -0
  188. package/src/shade/renderer/hiz/shader_hzb_reduce_mip0.d.ts.map +1 -0
  189. package/src/shade/renderer/hiz/{shader_hzb_reduce_mip0_clip.js → shader_hzb_reduce_mip0.js} +120 -111
  190. package/src/shade/renderer/light/environment/environment_level_1_blur_plan.d.ts +39 -0
  191. package/src/shade/renderer/light/environment/environment_level_1_blur_plan.d.ts.map +1 -0
  192. package/src/shade/renderer/light/environment/environment_level_1_blur_plan.js +119 -0
  193. package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts +15 -7
  194. package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts.map +1 -1
  195. package/src/shade/renderer/light/environment/execute_filter_environment_map.js +66 -83
  196. package/src/shade/renderer/light/environment/graph_filter_environment_map.d.ts.map +1 -1
  197. package/src/shade/renderer/light/environment/graph_filter_environment_map.js +15 -6
  198. package/src/shade/renderer/light/environment/shader_blur_environment_map.d.ts +3 -0
  199. package/src/shade/renderer/light/environment/shader_blur_environment_map.d.ts.map +1 -0
  200. package/src/shade/renderer/light/environment/shader_blur_environment_map.js +111 -0
  201. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.d.ts +3 -0
  202. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.d.ts.map +1 -0
  203. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +128 -0
  204. package/src/shade/renderer/light/environment/shader_downsample_environment_map.d.ts.map +1 -1
  205. package/src/shade/renderer/light/environment/shader_downsample_environment_map.js +0 -1
  206. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  207. package/src/shade/renderer/material/GPUMaterialManager.d.ts +7 -0
  208. package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
  209. package/src/shade/renderer/material/GPUMaterialManager.js +11 -0
  210. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts +12 -12
  211. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
  212. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +17 -118
  213. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -3
  214. package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
  215. package/src/shade/renderer/postprocess/nss/NSS.js +1 -3
  216. package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.d.ts +5 -6
  217. package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.d.ts.map +1 -1
  218. package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.js +9 -10
  219. package/src/shade/renderer/postprocess/nss/shader_nss_extract_feedback.d.ts.map +1 -1
  220. package/src/shade/renderer/postprocess/nss/shader_nss_extract_feedback.js +48 -49
  221. package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.d.ts.map +1 -1
  222. package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.js +12 -16
  223. package/src/shade/renderer/postprocess/nss/shader_nss_preprocess.js +246 -246
  224. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts +1 -2
  225. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts.map +1 -1
  226. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.js +34 -35
  227. package/src/shade/renderer/shader/chunk/atmosphere/C_MIE_SCATTERING_DECLARATION.d.ts +2 -2
  228. package/src/shade/renderer/shader/chunk/atmosphere/C_MIE_SCATTERING_DECLARATION.js +2 -2
  229. package/src/shade/renderer/shader/chunk/atmosphere/chunk_compute_extinction.js +1 -1
  230. package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.d.ts +1 -1
  231. package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.js +1 -1
  232. package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.d.ts +3 -3
  233. package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.js +3 -3
  234. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +9 -10
  235. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts.map +1 -1
  236. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +9 -10
  237. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +4 -4
  238. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +5 -5
  239. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts +1 -2
  240. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts.map +1 -1
  241. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.js +1 -2
  242. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts +14 -1
  243. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts.map +1 -1
  244. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.js +19 -6
  245. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts +10 -1
  246. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts.map +1 -1
  247. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.js +14 -6
  248. package/src/shade/renderer/shader/chunk/random/murmur/chunk_murmur3_vec3u.d.ts +1 -1
  249. package/src/shade/renderer/shader/chunk/random/murmur/chunk_murmur3_vec3u.js +1 -1
  250. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  251. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +7 -2
  252. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.d.ts +2 -3
  253. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.d.ts.map +1 -1
  254. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.js +7 -8
  255. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.d.ts +1 -1
  256. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.js +12 -12
  257. package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts +2 -2
  258. package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts.map +1 -1
  259. package/src/shade/renderer/shadow/vsm/VSMPageManager.js +3 -4
  260. package/src/shade/renderer/water/GPUWaterRenderer.d.ts +0 -6
  261. package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
  262. package/src/shade/renderer/water/GPUWaterRenderer.js +12 -17
  263. package/src/shade/renderer/water/medium/graph_water_meshlets.d.ts +35 -0
  264. package/src/shade/renderer/water/medium/graph_water_meshlets.d.ts.map +1 -0
  265. package/src/shade/renderer/water/medium/graph_water_meshlets.js +89 -0
  266. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
  267. package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
  268. package/src/shade/renderer/water/shader_water.js +22 -13
  269. package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
  270. package/src/shade/renderer/water/shader_water_avboit.js +7 -7
  271. package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts +1 -1
  272. package/src/shade/renderer/water/surface/graph_water_tessellation.js +1 -1
  273. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +9 -1
  274. package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +0 -19
  275. package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
  276. package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +2 -52
  277. package/editor/REWORK_PLAN_2026_08.md +0 -692
  278. package/src/CODEC_LAYOUT_VERIFICATION.md +0 -419
  279. package/src/CORRECTNESS_HUNT_2026_07_24.md +0 -142
  280. package/src/DUPLICATION_AUDIT_2026_08_07/00_core_reuse_surface.md +0 -738
  281. package/src/DUPLICATION_AUDIT_2026_08_07/A_core_math_geom.md +0 -79
  282. package/src/DUPLICATION_AUDIT_2026_08_07/B_core_data.md +0 -93
  283. package/src/DUPLICATION_AUDIT_2026_08_07/C_gfx_render.md +0 -80
  284. package/src/DUPLICATION_AUDIT_2026_08_07/D_gfx_features.md +0 -164
  285. package/src/DUPLICATION_AUDIT_2026_08_07/E_physics.md +0 -69
  286. package/src/DUPLICATION_AUDIT_2026_08_07/F_sound.md +0 -110
  287. package/src/DUPLICATION_AUDIT_2026_08_07/G_net_save.md +0 -129
  288. package/src/DUPLICATION_AUDIT_2026_08_07/H_engine_misc.md +0 -72
  289. package/src/DUPLICATION_AUDIT_2026_08_07/I_generation_view.md +0 -74
  290. package/src/DUPLICATION_AUDIT_2026_08_07/K_crosscutting.md +0 -169
  291. package/src/DUPLICATION_AUDIT_2026_08_07.md +0 -254
  292. package/src/DUPLICATION_AUDIT_REMEDIATION.md +0 -250
  293. package/src/DUPLICATION_REVIEW_2026_10_24.md +0 -1072
  294. package/src/REVIEW_2026_08_06/adv-core.md +0 -511
  295. package/src/REVIEW_2026_08_06/adv-gfx.md +0 -480
  296. package/src/REVIEW_2026_08_06/adv-view.md +0 -446
  297. package/src/REVIEW_2026_08_06/api-core.md +0 -296
  298. package/src/REVIEW_2026_08_06/api-engine.md +0 -195
  299. package/src/REVIEW_2026_08_06/bvh-phys-sound-net.md +0 -507
  300. package/src/REVIEW_2026_08_06/core-binary.md +0 -348
  301. package/src/REVIEW_2026_08_06/core-collection.md +0 -376
  302. package/src/REVIEW_2026_08_06/core-math.md +0 -221
  303. package/src/REVIEW_2026_08_06/core-process.md +0 -266
  304. package/src/REVIEW_2026_08_06/core-science.md +0 -223
  305. package/src/REVIEW_2026_08_06/engine-ai-nav.md +0 -279
  306. package/src/REVIEW_2026_08_06/engine-animation.md +0 -167
  307. package/src/REVIEW_2026_08_06/engine-asset.md +0 -166
  308. package/src/REVIEW_2026_08_06/engine-ecs.md +0 -920
  309. package/src/REVIEW_2026_08_06/engine-input.md +0 -197
  310. package/src/REVIEW_2026_08_06/engine-misc.md +0 -248
  311. package/src/REVIEW_2026_08_06/engine-terrain.md +0 -52
  312. package/src/REVIEW_2026_08_06/generation.md +0 -176
  313. package/src/REVIEW_2026_08_06/geom-2d.md +0 -434
  314. package/src/REVIEW_2026_08_06/geom-3d.md +0 -117
  315. package/src/REVIEW_2026_08_06/gfx-gi.md +0 -143
  316. package/src/REVIEW_2026_08_06/gfx-render.md +0 -740
  317. package/src/REVIEW_2026_08_06/gfx-texture.md +0 -690
  318. package/src/REVIEW_2026_08_06/prior-criticals.md +0 -49
  319. package/src/REVIEW_2026_08_06/prior-highs.md +0 -138
  320. package/src/REVIEW_2026_08_06/test-gaps.md +0 -364
  321. package/src/REVIEW_2026_08_06/view.md +0 -667
  322. package/src/REVIEW_2026_08_06.md +0 -610
  323. package/src/core/binary/lz4/LZ4_HIGH_COMPRESSION_PLAN_2026_09_14.md +0 -542
  324. package/src/core/bvh2/bvh3/NOTES.md +0 -2
  325. package/src/core/bvh8/NOTES.md +0 -63
  326. package/src/core/cache/wtinylfu/benchmark/CacheWTinylfu.bench.md +0 -243
  327. package/src/core/color/COLOR_FIX_PLAN_2026_08_28.md +0 -417
  328. package/src/core/color/COLOR_REVIEW_2026_08_28.md +0 -779
  329. package/src/core/geom/2d/polygon/TRIANGULATION_DESIGN.md +0 -433
  330. package/src/core/geom/3d/atlas/ATLAS_PORT_PLAN.md +0 -486
  331. package/src/core/geom/3d/atlas/BFF_PLAN.md +0 -174
  332. package/src/core/geom/3d/atlas/REVIEW_02.md +0 -392
  333. package/src/core/geom/3d/gjk/GJK_REVIEW_NOTES.md +0 -146
  334. package/src/core/geom/3d/gjk/NOTES.md +0 -8
  335. package/src/core/geom/3d/topology/TOPO_MESH_RETIREMENT_PLAN.md +0 -135
  336. package/src/core/geom/GEOMETRY_REVIEW_002_API_ISSUES.md +0 -381
  337. package/src/core/geom/GEOMETRY_REVIEW_002_NAMING.md +0 -684
  338. package/src/core/geom/MANIFOLD_COMPARISON_2026_08_01.md +0 -554
  339. package/src/core/model/reactive/evaluation/PREDICATE_APPLICABILITY_PROPOSAL.md +0 -446
  340. package/src/engine/REVIEW_2026_07_03.md +0 -211
  341. package/src/engine/asset/loaders/image/IMAGE_CODEC_REVIEW_2026_08_28.md +0 -815
  342. package/src/engine/control/first-person/DESIGN.md +0 -658
  343. package/src/engine/control/first-person/DESIGN_COLLISION.md +0 -382
  344. package/src/engine/control/first-person/DESIGN_EXTENSIONS.md +0 -563
  345. package/src/engine/control/first-person/TODO.md +0 -160
  346. package/src/engine/ecs/ASYNC_SYSTEMS_PROPOSAL.md +0 -531
  347. package/src/engine/ecs/HIERARCHY_REVIEW.md +0 -717
  348. package/src/engine/ecs/async/WORKER_SYSTEM_PLAN.md +0 -262
  349. package/src/engine/ecs/ik/PLAN.md +0 -179
  350. package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +0 -272
  351. package/src/engine/ecs/storage/binary/object-v2/DESIGN.md +0 -199
  352. package/src/engine/ecs/transform/TRANSFORM64_MIGRATION_PLAN_2026_09_04.md +0 -521
  353. package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +0 -463
  354. package/src/engine/graphics/ecs/camera/pp/NOTES.md +0 -48
  355. package/src/engine/graphics/render/frame_graph/CORRECTNESS_FIXES_2026_09_04.md +0 -659
  356. package/src/engine/graphics/render/frame_graph/FRAME_GRAPH_RECOMMENDATIONS.md +0 -235
  357. package/src/engine/graphics/sh3/path_tracer/REVIEW_001_ACTION_PLAN.md +0 -490
  358. package/src/engine/graphics/texture/sampler/compare/FLIP_IMPLEMENTATION_PLAN.md +0 -466
  359. package/src/engine/input/GAMEPAD_API_PROPOSAL.md +0 -717
  360. package/src/engine/input/ecs/ism/ISM_DESIGN.md +0 -1523
  361. package/src/engine/input/ecs/ism/ISM_IMPLEMENTATION_PLAN.md +0 -627
  362. package/src/engine/navigation/mesh/OVERLAPPING_SURFACES_2026_08_25.md +0 -661
  363. package/src/engine/navigation/mesh/PATHFINDING_PLAN.md +0 -229
  364. package/src/engine/network/CONGESTION_CONTROL.md +0 -87
  365. package/src/engine/network/MESSAGE_TRANSPORT.md +0 -364
  366. package/src/engine/network/SMOOTHNESS_DESIGN.md +0 -400
  367. package/src/engine/physics/cloth/MEASUREMENTS.md +0 -5304
  368. package/src/engine/physics/cloth/PLAN.md +0 -3056
  369. package/src/engine/physics/fluid/GPU_FLUID_CASCADES_PROPOSAL_2026_10_16.md +0 -1382
  370. package/src/engine/physics/fluid/REVIEW_02_PLAN.md +0 -243
  371. package/src/engine/physics/fluid/solver/NOTES.md +0 -46
  372. package/src/engine/sound/SOUND_EMITTER_RETIREMENT_PLAN.md +0 -536
  373. package/src/engine/sound/simulation/IMPLEMENTATION_PLAN.md +0 -432
  374. package/src/engine/sound/simulation/PROBE_PLACEMENT.md +0 -250
  375. package/src/engine/sound/simulation/PROBE_TRANSFER_RESEARCH.md +0 -322
  376. package/src/engine/sound/simulation/REFLECTION_IR_PLAN.md +0 -261
  377. package/src/engine/sound/simulation/VISIBILITY_GRAPH_PLAN.md +0 -121
  378. package/src/engine/sound/sopra/IMPLEMENTATION_PLAN.md +0 -999
  379. package/src/format/image/avif/DECISIONS.md +0 -545
  380. package/src/format/image/jpeg/NOTES.md +0 -3
  381. package/src/format/scene/gltf/MESHOPT_COMPRESSION_PLAN.md +0 -814
  382. package/src/generation/COORDINATES.md +0 -54
  383. package/src/generation/REVIEW_01_ACTION_PLAN.md +0 -628
  384. package/src/generation/foliage/ANNUAL_SHOOTS_BRIEF_2026_10_25.md +0 -220
  385. package/src/generation/foliage/CROWN_FILLING_BRIEF_2026_10_26.md +0 -172
  386. package/src/generation/foliage/CROWN_FULLNESS_BRIEF_2026_10_26.md +0 -86
  387. package/src/generation/foliage/FOLIAGE_DESIGN.md +0 -547
  388. package/src/generation/foliage/FOLIAGE_PLAN.md +0 -198
  389. package/src/generation/foliage/LEAF_ARCHITECTURE_BRIEF_2026_10_26.md +0 -158
  390. package/src/generation/foliage/LOD_REWORK_BRIEF_2026_10_27.md +0 -521
  391. package/src/generation/foliage/REAL_TIME_TREES_BRIEF_2026_10_27.md +0 -86
  392. package/src/generation/foliage/SELF_ORGANIZING_FRAMEWORK_BRIEF_2026_10_26.md +0 -347
  393. package/src/generation/foliage/SHOOT_SYSTEMS_ALL_SPECIES_BRIEF_2026_10_26.md +0 -248
  394. package/src/generation/foliage/SPEEDTREE_COMPARISON_2026_10_24.md +0 -694
  395. package/src/generation/foliage/TWO_FRONT_ENDS_BRIEF_2026_10_28.md +0 -552
  396. package/src/shade/RENDERER_CONTRACT.md +0 -697
  397. package/src/shade/SHADER_F16_PROPOSAL_2026_10_24.md +0 -263
  398. package/src/shade/device/IMMEDIATE_DATA_PLAN_2026_08_28.md +0 -569
  399. package/src/shade/device/PASS_ENCODER_PROPOSAL_2026_08_31.md +0 -755
  400. package/src/shade/device/mock/EXTENSION_PROPOSAL_2026_08_22.md +0 -458
  401. package/src/shade/device/mock/IMPLEMENTATION_PLAN.md +0 -255
  402. package/src/shade/device/mock/REVIEW_2026_08_22.md +0 -527
  403. package/src/shade/device/timing/GPU_PROFILER_PROPOSAL_2026_08_28.md +0 -894
  404. package/src/shade/device/timing/profile/SGPT_FORMAT.md +0 -345
  405. package/src/shade/renderer/NOTES.md +0 -78
  406. package/src/shade/renderer/PLAN.md +0 -8
  407. package/src/shade/renderer/animation/ADDITIVE_BLENDING_PLAN.md +0 -145
  408. package/src/shade/renderer/animation/SKINNING_FRAME_PLAN.md +0 -357
  409. package/src/shade/renderer/atmosphere/NOTES.md +0 -6
  410. package/src/shade/renderer/camera/orbital/MomentumAxis.d.ts +0 -76
  411. package/src/shade/renderer/camera/orbital/MomentumAxis.d.ts.map +0 -1
  412. package/src/shade/renderer/camera/orbital/MomentumAxis.js +0 -164
  413. package/src/shade/renderer/camera/orbital/OrbitalCameraConfig.d.ts +0 -45
  414. package/src/shade/renderer/camera/orbital/OrbitalCameraConfig.d.ts.map +0 -1
  415. package/src/shade/renderer/camera/orbital/OrbitalCameraConfig.js +0 -66
  416. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.d.ts +0 -98
  417. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.d.ts.map +0 -1
  418. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.js +0 -184
  419. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.d.ts +0 -175
  420. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.d.ts.map +0 -1
  421. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.js +0 -411
  422. package/src/shade/renderer/camera/orbital/README.md +0 -81
  423. package/src/shade/renderer/camera/orbital/index.d.ts +0 -6
  424. package/src/shade/renderer/camera/orbital/index.d.ts.map +0 -1
  425. package/src/shade/renderer/camera/orbital/index.js +0 -9
  426. package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +0 -964
  427. package/src/shade/renderer/fluid/GPU_FLUID_OCCUPANCY_AND_SOTA_REVIEW_2026_10_26.md +0 -361
  428. package/src/shade/renderer/geometry/bvh/BLAS_REFIT_BATCH_PLAN.md +0 -619
  429. package/src/shade/renderer/geometry/meshlet/COMPACTION_PLAN_2026_09_16.md +0 -674
  430. package/src/shade/renderer/geometry/sdf/NOTES.md +0 -6
  431. package/src/shade/renderer/geometry/virtual/ATTRIBUTE_PLAN_2026_09_18.md +0 -540
  432. package/src/shade/renderer/geometry/virtual/MICRON_COMPARISON_2026_08_20.md +0 -305
  433. package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +0 -913
  434. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +0 -787
  435. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +0 -483
  436. package/src/shade/renderer/geometry/virtual/VK_LOD_CLUSTERS_COMPARISON_2026_08_20.md +0 -301
  437. package/src/shade/renderer/geometry/virtual/WEDGE_PLAN_2026_09_18.md +0 -448
  438. package/src/shade/renderer/geometry/virtual/runtime/CULL_PLAN_2026_09_16.md +0 -385
  439. package/src/shade/renderer/geometry/virtual/runtime/CUT_PLAN_2026_09_14.md +0 -656
  440. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +0 -308
  441. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +0 -657
  442. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +0 -551
  443. package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +0 -536
  444. package/src/shade/renderer/global_illumination/lpv/NOTES.md +0 -3
  445. package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +0 -4225
  446. package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_RAYS_VARIABLE_AND_SORTED_SCOPE_2026_10_30.md +0 -410
  447. package/src/shade/renderer/global_illumination/sharc/NOTES.md +0 -8
  448. package/src/shade/renderer/gpu_primitive/bvh/GPU_BVH_BUILD_PLAN.md +0 -1369
  449. package/src/shade/renderer/gpu_primitive/bvh/PHASE1_HANDOVER.md +0 -202
  450. package/src/shade/renderer/gpu_primitive/indirect/NOTES.md +0 -94
  451. package/src/shade/renderer/hiz/NOTES.md +0 -3
  452. package/src/shade/renderer/hiz/shader_hzb_reduce_mip0_clip.d.ts +0 -8
  453. package/src/shade/renderer/hiz/shader_hzb_reduce_mip0_clip.d.ts.map +0 -1
  454. package/src/shade/renderer/light/cluster/NOTES.md +0 -11
  455. package/src/shade/renderer/light/cluster/PROPOSAL_ALGORITHM_2026_10_16.md +0 -524
  456. package/src/shade/renderer/light/cluster/PROPOSAL_HIERARCHICAL_2026_10_16.md +0 -1101
  457. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts +0 -13
  458. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts.map +0 -1
  459. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.js +0 -198
  460. package/src/shade/renderer/material/resident/shader_resident_texture_means.d.ts +0 -24
  461. package/src/shade/renderer/material/resident/shader_resident_texture_means.d.ts.map +0 -1
  462. package/src/shade/renderer/material/resident/shader_resident_texture_means.js +0 -120
  463. package/src/shade/renderer/particles/DESIGN.md +0 -1011
  464. package/src/shade/renderer/particles/EMITTER_GLOBAL_STATE_PLAN_2026_10_29.md +0 -283
  465. package/src/shade/renderer/particles/ORIENTATION_PLAN_2026_10_15.md +0 -453
  466. package/src/shade/renderer/path_tracer/PATH_TRACED_MEDIA_PLAN_2026_10_02.md +0 -520
  467. package/src/shade/renderer/postprocess/bloom/NOTES.md +0 -6
  468. package/src/shade/renderer/postprocess/fsr/NOTES.md +0 -4
  469. package/src/shade/renderer/postprocess/gtao/NOTES.md +0 -6
  470. package/src/shade/renderer/postprocess/nss/NOTES.md +0 -339
  471. package/src/shade/renderer/postprocess/perspective/NOTES.md +0 -3
  472. package/src/shade/renderer/postprocess/sscs/NOTES.md +0 -5
  473. package/src/shade/renderer/postprocess/ssr/NOTES.md +0 -14
  474. package/src/shade/renderer/postprocess/ssr/REPROJECTION_PROPOSAL.md +0 -286
  475. package/src/shade/renderer/postprocess/ssr/prefilter/NOTES.md +0 -39
  476. package/src/shade/renderer/postprocess/taa/NOTES.md +0 -11
  477. package/src/shade/renderer/postprocess/upscale-dither/NOTES.md +0 -78
  478. package/src/shade/renderer/postprocess/vrs/NOTES.md +0 -4
  479. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_LEDGER.md +0 -1218
  480. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_PLAN_2026_09_03.md +0 -600
  481. package/src/shade/renderer/restir/reservoir/NOTES.md +0 -6
  482. package/src/shade/renderer/shader/chunk/atmosphere/NOTES.md +0 -6
  483. package/src/shade/renderer/shader/chunk/brdf/FRESNEL_BRIEF_2026_10_16.md +0 -394
  484. package/src/shade/renderer/shader/chunk/color/tonemap/ACES_TONE_MAPPING_BRIEF_2026_10_17.md +0 -160
  485. package/src/shade/renderer/shader/chunk/color/tonemap/HDR_TONE_MAPPING_FORMS_BRIEF_2026_10_16.md +0 -322
  486. package/src/shade/renderer/shader/chunk/color/tonemap/SDR_TONE_MAPPING_BRIEF_2026_10_16.md +0 -247
  487. package/src/shade/renderer/shader/chunk/fsr/NOTES.md +0 -3
  488. package/src/shade/renderer/shader/chunk/fsr/spd/NOTES.md +0 -4
  489. package/src/shade/renderer/shader/chunk/geometry/ray/NOTES.md +0 -4
  490. package/src/shade/renderer/shader/chunk/material/MULTISCATTER.md +0 -159
  491. package/src/shade/renderer/shader/chunk/mboit/NOTES.md +0 -38
  492. package/src/shade/renderer/shader/chunk/spherical_harmonics/l1i/NOTES.md +0 -3
  493. package/src/shade/renderer/shader/chunk/spherical_harmonics/sampling/NOTES.md +0 -8
  494. package/src/shade/renderer/shader/compiler/SHADER_SWITCH_PROPOSAL_2026_10_16.md +0 -932
  495. package/src/shade/renderer/shadow/contact/FINDINGS.md +0 -413
  496. package/src/shade/renderer/shadow/map/csm/NOTES.md +0 -5
  497. package/src/shade/renderer/shadow/ray/NOTES.md +0 -31
  498. package/src/shade/renderer/shadow/sdf/NOTES.md +0 -9
  499. package/src/shade/renderer/shadow/sdf/brixelizer/NOTES.md +0 -5
  500. package/src/shade/renderer/shadow/sdf/cascade/NOTES.md +0 -9
  501. package/src/shade/renderer/shadow/vsm/NOTES.md +0 -12
  502. package/src/shade/renderer/shadow/vsm/PLAN.md +0 -442
  503. package/src/shade/renderer/shadow/vsm/REVIEW_LEDGER.md +0 -43
  504. package/src/shade/renderer/texture/COMPRESSED_TEXTURE_PLAN_2026_09_01.md +0 -2444
  505. package/src/shade/renderer/texture/mipmaps/NOTES.md +0 -4
  506. package/src/shade/renderer/volumetrics/NOTES.md +0 -1329
  507. package/src/shade/renderer/volumetrics/VOLUMETRIC_NOISE_PLAN_2026_10_15.md +0 -336
  508. package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts +0 -23
  509. package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts.map +0 -1
  510. package/src/shade/renderer/water/medium/GPUWaterBodies.js +0 -75
  511. package/src/shade/wgsl/NOTES.md +0 -4
  512. package/src/view/elements/progress/segmented/segment_frame_transform.d.ts +0 -15
  513. package/src/view/elements/progress/segmented/segment_frame_transform.d.ts.map +0 -1
  514. package/src/view/elements/progress/segmented/segment_frame_transform.js +0 -69
@@ -1,627 +0,0 @@
1
- # ISM — implementation plan
2
-
3
- Companion to [`ISM_DESIGN.md`](ISM_DESIGN.md). The design says *what* is built and why; this says *in what
4
- order*, *how it is proved*, and *what happens to the systems it replaces*.
5
-
6
- ---
7
-
8
- ## 0. Definition of done
9
-
10
- 1. **DONE** — `InputMap` + `InputMapSystem` are registered in `makeMirEngineConfig` and carry real bindings
11
- in the game.
12
- 2. **DONE** — `Input` and `InputSystem` are `@deprecated` in JSDoc, with every consumer migrated (§5.4).
13
- 3. **HALF** — `InputController` / `InputControllerSystem` carry the JSDoc note narrowing them to pointer
14
- gestures and DOM-gated pointer buttons. Their **keyboard** bindings have NOT moved yet (§5.5).
15
- Pointer-button bindings stay wherever an `event.target` gate or a position payload is involved — design
16
- §6.3 makes those untranslatable, and §5.5's table marks each one.
17
- 4. **NOT STARTED** — `KeyboardCameraController` is to be deleted, and it has two consumers, not one (§5.3).
18
- **`EditorKeyMap` is not** deleted — see §5.1; retiring it needs a design addition this program does not
19
- contain.
20
- 5. **DONE** — `npm test` from `H:/git/moh` is green: 1968 files, 12,635 tests.
21
-
22
- Out of scope, per design §1.1 and design §13.4: pointer gestures, and the trigger DSL.
23
-
24
- ---
25
-
26
- ## 0.5 Status
27
-
28
- Updated as phases land, so this document says what is true rather than what was intended.
29
-
30
- | Phase | State | Notes |
31
- |---|---|---|
32
- | P1 value types and trigger algebra | **landed** | all nine trigger classes, `InputSourceTable`, `InputMap`/`InputLayer`/`InputBinding`/`InputCoordinateBinding` |
33
- | P2 devices and adapters | **landed** | four adapters; `ManualInputDevice`. No jsdom adapter spec yet — the hardware adapters are unexercised outside a browser |
34
- | P3 eager edge path | **landed** | dispatch, cascade, `BlockMatched`, `isActive`, re-entrancy deferral |
35
- | P4 sequences and holds | **landed** | 11 behavioural specs incl. the charge input |
36
- | P5 coordinates | **partial** | `Switches` and device channels, priority resolution, the latch. `InputCoordinateCompose` not built; pointer `move`/`wheel` untested outside a browser |
37
- | P6 directions | **not started** | `InputDirection` enum exists; `InputTriggerDirection` does not |
38
- | P7 `BlockAll` suppression | **landed** | 12 specs incl. un-suppression re-entry |
39
- | P8 serialization and recording | **not started** | `InputMap.serializable` is deliberately `false`; `InputMapSerializationAdapter` and `InputRecorder` are designed, not built |
40
- | P9 consumer migration | **partial** | registered in `makeMirEngineConfig`; all five `Input` consumers migrated and `Input`/`InputSystem` deprecated. `InputController`'s keyboard bindings have not moved |
41
- | P10 DSL | **not started** | deferred by design |
42
-
43
- 222 specs over the input package; 859 with `ecs` included.
44
-
45
- **Verified in a browser** — `prototypeInputMap.js`, loaded with
46
- `?entry=/src/mir-engine/meep/src/engine/input/ecs/ism/prototypeInputMap.js`, boots a real engine through
47
- `EngineHarness`, registers the three hardware adapters, and drives real DOM `KeyboardEvent`/`PointerEvent`/
48
- `WheelEvent`s at the element the engine mounts its devices on. Ten checks, all passing, covering what no node
49
- spec can reach:
50
-
51
- * a real keydown dispatching through the real `KeyboardDevice`;
52
- * browser-default suppression following the bound key set — a bound key is prevented, an unbound one is not,
53
- and unlinking the map stops the suppression;
54
- * chord arbitration, a pointer button, and a sequence completing across real key events;
55
- * a switch-composed coordinate read from real keys;
56
- * **the per-frame latch on a relative channel**, which has no vehicle at all in node: three wheel events
57
- between frames read 0 before the tick, 3 after it, 3 again for a second reader in the same frame, and 0 on
58
- the next — checked with the raw numbers, not just a boolean;
59
- * a `BlockAll` map zeroing a lower map's coordinate read, and the read returning to 1 once the modal closes.
60
-
61
- The last two were checked against a negative control - without the modal the same read is 1, so the check is
62
- not vacuous. No console errors during the run.
63
-
64
- ### Round two — reinvention audit
65
-
66
- The sponsor asked whether the subsystem re-implements anything meep already provides. Findings, with what
67
- was done:
68
-
69
- | Hand-rolled | meep already has | Outcome |
70
- |---|---|---|
71
- | `((r * 31) ^ h) \| 0` at 13 sites, plus `Math.round(x * 1000)` for floats | [`hash_mix2`](../../../../core/math/hash/hash_mix2.js), [`computeHashFloat`](../../../../core/primitives/numbers/computeHashFloat.js) | **Replaced.** `hash_mix2` exists precisely to stop this drift — its own docblock says the spelling is unified there "so the truncation cannot be forgotten". A third spelling was invented in a codebase that had already unified two. |
72
- | Plain arrays for layers, bindings, triggers, channels | [`List`](../../../../core/collection/list/List.js) | **Kept, now documented** — amendment 6 below. The deviation was undocumented, and its substitute for `List`'s change signals is where the `popLayer` defect lived. |
73
- | `InputSourceTable`'s nested `Map<string, Map<number, number>>` | [`HashMap`](../../../../core/collection/map/HashMap.js), keyed on `hash()`/`equals()` | **Kept.** The aggregate — dense first-seen index, reverse lookup, indices never recycled so recordings stay readable — has no core equivalent. Worth knowing that nothing in production calls `InputSource.hash()` as a result. |
74
- | `SwitchSubscription` + reference counting | [`SignalBinding`](../../../../core/events/signal/SignalBinding.js) | **Kept, justified.** The record *is* the allocation-free dispatch context; `SignalBinding` could only replace the add/remove pair, at two more objects per switch, and nothing in core does subscription refcounting. |
75
- | The `#deferred` closure queue | `core/process/task/*` | **Kept.** Task machinery is long-running cooperative scheduling — wrong shape for "apply this at the end of the current edge". |
76
- | The sequence matcher, rather than [`SimpleStateMachine`](../../../../core/fsm/simple/SimpleStateMachine.js) | — | **Kept, and the reasoning in design §5.6 verified.** One argument was missed and strengthens it: `advance()` needs a per-state selector registered on the description, which the rising-edge matcher does not fit at all. |
77
- | `CODE_TO_NAME` reverse-enum table | `objectKeyByValue` | **Kept.** Precomputed O(1) against a per-subscribe linear scan, for four lines. |
78
-
79
- Reused rather than reinvented, for balance: `InputDeviceSwitch`, `BitSet`, `Signal` context dispatch,
80
- `assert.*` including `assert.enum`, `computeStringHash`, `Vector1/2/3`, `gamepad_write_dpad_vector`,
81
- `GamepadDevice.main`, and the module-static scratch convention.
82
-
83
- ### Defects found by review, and closed
84
-
85
- All six were reproduced by the adversarial review of the implementation, and all six now have a regression
86
- spec. Recorded because the reasoning is worth keeping, not because anything is outstanding.
87
-
88
- 1. **Recompiling one map rebuilt every map**, discarding all their matcher state — so with several contexts
89
- live, a `bind()` anywhere reset everyone's half-matched sequences. Recompilation is now scoped to the maps
90
- whose revision actually changed.
91
- 2. **Nested edges coalesced.** `handleEdge` applied the state change eagerly but deferred the evaluation,
92
- which then re-read live state — so a press and release issued from inside an action handler cancelled out
93
- and fired nothing. That is the scripted-input case `ManualInputDevice` exists to serve. The state change
94
- now travels with its deferred evaluation.
95
- 3. **A throwing handler stranded its queued work.** The exception propagates out of the walk and is swallowed
96
- further up by `Signal`, so a drain placed after the `try/finally` never ran. A map linked from such a
97
- handler stayed dead permanently, because the deferred link was itself what would have subscribed to its
98
- switches — there was no later edge to recover on. The drain now lives inside the `finally`.
99
- 4. **A mid-dispatch `bind()` landed a tick late** rather than at the end of the current edge. Recompilation is
100
- now checked in the same `finally`.
101
- 5. **One `InputMap` on two entities** silently broke reads — the second link hijacked the single program slot,
102
- and unlinking either nulled it. Asserted at link, with the reasoning on the assert.
103
- 6. **`registerDevice` was not deferral-guarded**, so calling it from a handler recompiled mid-walk. Now
104
- deferred like `link` and `unlink`.
105
-
106
- ---
107
-
108
- ## 1. Testability is a design constraint, not a phase
109
-
110
- meep's position is black-box only — no call counts, no private-path assertions, no mocks, no spies. That is not
111
- something to bolt on at the end: it dictates three structural decisions, taken here rather than discovered
112
- later.
113
-
114
- ### 1.1 The driving seam is a real device, not a test double
115
-
116
- Every test needs to make a key go down. The obvious route — construct `KeyboardDevice` and dispatch synthetic
117
- DOM `KeyboardEvent`s — drags jsdom into every spec and tests the browser rather than the ISM.
118
-
119
- Instead, **`ManualInputDevice` ships as production code**: a device whose switches and coordinates are driven
120
- by method call rather than by hardware.
121
-
122
- ```js
123
- export class ManualInputDevice {
124
- /** @type {InputDeviceSwitch[]} */
125
- switches = [];
126
- /** @param {number} code @returns {InputDeviceSwitch} */
127
- getSwitch(code) { }
128
- /** @param {number} code @param {...number} components */
129
- setCoordinate(code, ...components) { }
130
- }
131
- ```
132
-
133
- It is not test scaffolding. It is the device behind three real features the design already names: **replay**
134
- (design §2.5 — a recorded trace is fed back through a `ManualInputDevice`), **scripted demos and tutorials**,
135
- and **AI- or network-driven input**. Tests use it because it is the real thing, which is exactly the property
136
- that makes them black-box.
137
-
138
- Its switches are real `InputDeviceSwitch` instances, so the ISM cannot tell it from `KeyboardDevice`, and the
139
- edge-detection and idempotence semantics under test are the production ones.
140
-
141
- Consequence for coverage: the three hardware adapters (`Keyboard`, `Pointer`, `Gamepad`) are thin — they map a
142
- code to a switch the device already owns. Their specs are small and jsdom-scoped (`@vitest-environment jsdom`,
143
- as `GamepadDevice.spec.js` already does); everything about *binding semantics* is tested through
144
- `ManualInputDevice` in plain node.
145
-
146
- ### 1.2 Time is advanced by `update(dt)`, never read from a clock
147
-
148
- Sequence windows and hold durations need a clock. If the system calls `performance.now()`, no spec can test a
149
- timeout without faking time — which is a mock by another name.
150
-
151
- **`InputMapSystem` owns `#time`, advanced only by `update(dt)`.** Edges arriving between ticks are stamped with
152
- the current `#time`, so every edge in a frame shares a timestamp. A spec drives time by calling
153
- `system.update(0.1)`, with no clock anywhere.
154
-
155
- Three consequences, stated because they are real:
156
-
157
- * **Window resolution is one frame.** No window in the design is sub-frame — the tightest is a
158
- fighting-game 0.15 s, or 9 frames at 60 Hz — so nothing is lost.
159
- * **Windows are in simulation time, not real time.** `EntityManager` passes the ticker's scaled delta, so at
160
- 0.25× speed a 0.2 s window lasts 0.8 s of wall clock, and a paused game freezes all windows. This
161
- **contradicts design §4.4**, which specified real time; §7 records the amendment and the argument. Slow
162
- motion stretching a reaction window is defensible; a testable system is not negotiable.
163
- * **`InputActionEvent.time` is simulation time since system startup**, and the recorder (P8) records `dt`
164
- per frame, which is what makes replay exact.
165
-
166
- ### 1.3 Everything observable is already observable
167
-
168
- No spec needs to reach inside. The full observation surface is the design's public one:
169
-
170
- | To observe | Use |
171
- |---|---|
172
- | an action fired | a real listener on a real `EntityComponentDataset` pushing names into an array |
173
- | level state | `map.isActive(action)` |
174
- | analog state | `map.axis2(v, action)` / `map.coordinate(...)` |
175
- | occlusion | the two above, on a lower map |
176
- | serialization | a real `BinaryBuffer`, round-tripped, then replayed against a recorded trace |
177
-
178
- A listener that appends to an array is a plain function, not a spy: nothing asserts *how many times* the ISM
179
- called anything, only which actions came out and in what order. Where existing specs in this package reach for
180
- `vi.fn()` (`GamepadDevice.spec.js`), these do not.
181
-
182
- ### 1.4 What is deliberately not asserted
183
-
184
- No spec inspects `InputMapProgram`, the intern table, `#held`, matcher slots, or trigger `satisfied` flags. If
185
- a behaviour cannot be reached through §1.3's surface, either it does not matter or the surface is wrong —
186
- both of which are answers, and neither is "add a white-box assertion".
187
-
188
- ---
189
-
190
- ## 2. File layout
191
-
192
- New code lives under `engine/input/ecs/ism/`, except three enums that are facts about devices and belong with
193
- them.
194
-
195
- ```
196
- engine/input/devices/
197
- mouse/MouseButtons.js new enum, MouseEvent.button ordinals
198
- PointerCoordinates.js new enum: position, move, wheel
199
- gamepad/GamepadCoordinates.js new enum: left_stick, right_stick, dpad
200
- ManualInputDevice.js section 1.1 - programmatically driven device
201
-
202
- engine/input/ecs/ism/
203
- InputBinding.js EXISTING, old {path,event}. Untouched until 5.3.
204
-
205
- InputSource.js {device, code}
206
- InputCoordinateSource.js {device, code, dimensions, kind}
207
- InputCoordinateKind.js Absolute | Delta | Normalized
208
- InputDirection.js 8 octants
209
- InputOcclusion.js Pass | BlockMatched | BlockAll
210
- InputActionEvent.js
211
-
212
- device/
213
- InputDeviceAdapter.js base
214
- KeyboardInputDeviceAdapter.js
215
- PointerInputDeviceAdapter.js
216
- GamepadInputDeviceAdapter.js
217
- ManualInputDeviceAdapter.js
218
-
219
- trigger/
220
- InputTrigger.js base: test(held), collectSources(out), satisfied
221
- InputTriggerType.js
222
- InputTriggerSwitch.js leaf over one InputSource
223
- InputTriggerKey.js typed constructor
224
- InputTriggerMouseButton.js typed constructor
225
- InputTriggerGamepadButton.js typed constructor
226
- InputTriggerDirection.js leaf over a coordinate channel
227
- InputTriggerChord.js AND
228
- InputTriggerRelease.js NOT
229
- InputTriggerHold.js child held for >= duration
230
- InputTriggerSequence.js ordered steps + window
231
-
232
- coordinate/
233
- InputCoordinateChannel.js base: read(result, offset), dimensions, collectSources
234
- InputCoordinateChannelType.js
235
- InputCoordinateGamepad.js
236
- InputCoordinatePointer.js
237
- InputCoordinateSwitches.js
238
- InputCoordinateCompose.js
239
-
240
- map/
241
- InputMap.js the component
242
- InputLayer.js
243
- InputBinding.js NEW {action, triggers} - the collision, resolved by directory
244
- InputCoordinateBinding.js {action, channels}
245
-
246
- InputMapSystem.js
247
- InputMapProgram.js compiled form, internal
248
- InputMapSerializationAdapter.js
249
- InputRecorder.js
250
- ```
251
-
252
- Placing the new `InputBinding` under `map/` resolves design section 14.2's filename collision outright: the old
253
- `ism/InputBinding.js` keeps its path and its importer (`components/Input.js`) until 5.3 deletes both.
254
-
255
- **No `.d.ts` files.** JSDoc only, per the package's standing position.
256
-
257
- ---
258
-
259
- ## 3. Phases
260
-
261
- Each phase lands with its specs green before the next starts. Phase numbers match design section 14.
262
-
263
- ### P1 — Value types and the trigger algebra
264
-
265
- `InputSource`, `InputCoordinateSource`, the enums, `InputTrigger` and the nine trigger classes, `InputMap` /
266
- `InputLayer` / `InputBinding` / `InputCoordinateBinding`.
267
-
268
- Triggers are pure here: `test(held)` takes a `BitSet` of interned indices, and interning belongs to the program
269
- (P3). To keep P1 testable alone, `collectSources` yields `InputSource` values and each leaf carries an `index`
270
- the program fills in — so a P1 spec builds a `BitSet` by hand and calls `test`. That is not white-box:
271
- `test(held)` is the published interface (design 4.1).
272
-
273
- **Gate — `trigger.spec.js`, `InputMap.spec.js`:**
274
- * `equals` / `hash` agree with structural equality on every trigger type, including nested.
275
- * `Chord.test` is AND; `Release.test` is NOT; both over held-sets built by hand.
276
- * `collectSources` returns every leaf source of a nested tree, deduplicated.
277
- * Layer cascade: `bind` on layer 0, `pushLayer().bind` on the same action; the resolved table has the top's
278
- triggers and not the base's. Two triggers in one layer both survive.
279
- * `unbind` on a top layer removes an inherited binding.
280
- * Binding one action as both a trigger action and a coordinate action is rejected.
281
-
282
- ### P2 — Devices and adapters
283
-
284
- The three enums, `ManualInputDevice`, `InputDeviceAdapter` and the four adapters.
285
-
286
- **Gate — `InputDeviceAdapter.spec.js` (node), `adapters.dom.spec.js` (jsdom):**
287
- * Totality: for every code in `KeyCodes` / `MouseButtons` / `GamepadButtons`, `getSwitch` returns a switch with
288
- no hardware present, and it reads up.
289
- * `GamepadInputDeviceAdapter` over a `GamepadDevice` with nothing connected resolves every standard button.
290
- * `ManualInputDevice` switches are real: press is idempotent, release after press fires once, `is_down` tracks.
291
- * Coordinate dimensions: pointer `wheel` is 3, `position` is 2, gamepad sticks are 2.
292
-
293
- ### P3 — The system: the eager edge path
294
-
295
- `InputMapSystem`, `InputMapProgram`, interning, compile, cascade resolution, `BlockMatched`, ECS dispatch,
296
- `isActive`. Switch / chord / release triggers only.
297
-
298
- **Gate — `InputMapSystem.spec.js`:**
299
- * An action fires **before any `update()` is called** — the latency requirement, as an executable test.
300
- * Press and release inside one frame both fire; two presses dispatch in press order.
301
- * `Ctrl` then `Z` fires only `undo`; `Z` then `Ctrl` fires both, in that order — design 4.6's stated
302
- condition, tested in both directions so the asymmetry is pinned rather than accidental.
303
- * `Release(Chord(a,b))` does not fire on the first edge touching `a` — the `satisfied` initialisation.
304
- * A map linked while a key is already held does not fire that key's press trigger.
305
- * A listener that removes its own entity, and one that rebinds its own map, both leave the walk intact and the
306
- next edge behaving.
307
- * `BlockMatched` above blocks a shared switch below and leaves an unrelated one alone.
308
- * `unlink` with a key held leaves nothing active and dispatches nothing further.
309
-
310
- ### P4 — Sequences and holds
311
-
312
- `InputTriggerSequence`, `InputTriggerHold`, matcher slots, synthetic maturity edges, window refresh and expiry.
313
-
314
- **Gate — `InputTriggerSequence.spec.js`, `InputTriggerHold.spec.js`:**
315
- * One long press of `A` does not satisfy both steps of `[A, A]`.
316
- * `[A,A,B]` fires on `A A A B`.
317
- * Holding `A` and tapping `B` twice fires `[A,B]` **once** — the post-fire re-entry.
318
- * A window expiry with the first step's key still held does not spuriously advance — the stale-snapshot bug.
319
- * `Ctrl+Shift+A > B` fires whether or not the modifiers are released first.
320
- * The window refreshes while the previous step still holds and expires only after it stops.
321
- * A hold matures on the tick that crosses its duration, not before; releasing early cancels it.
322
- * Charge — `[Hold(left, 2.0), right]` — fires after a 10 s hold, and expires on a return to neutral.
323
-
324
- ### P5 — Coordinates
325
-
326
- The channel classes, priority resolution, `Delta` accumulation and frame reset, the read accessors.
327
-
328
- **Gate — `InputCoordinate.spec.js`:**
329
- * `Switches` composes a 2-D channel from four switch triggers; both directions held reads zero.
330
- * A 3-D channel round-trips all three components.
331
- * Priority: an action bound to a gamepad stick and a switch channel reads the stick while deflected and the
332
- switches at rest.
333
- * `Delta` accumulates across two edges within a frame and reads zero after the tick.
334
-
335
- ### P6 — Directions
336
-
337
- `InputTriggerDirection`: threshold, hysteresis, exclusivity, release-before-press transition order.
338
-
339
- **Gate — `InputTriggerDirection.spec.js`:**
340
- * Exactly one of the eight directions is active for any deflected coordinate; none below threshold.
341
- * A transition releases the old direction before pressing the new one — observable as the ordering of two
342
- actions bound to those two directions.
343
- * `down, down-right, right` over a coordinate fires a quarter-circle sequence; **the same sequence over raw
344
- d-pad buttons does not** — the exclusivity claim, tested in both directions, because it is the one
345
- load-bearing assumption in design 5.4 the other cases would not catch.
346
- * Hysteresis: a coordinate oscillating inside the band does not chatter.
347
-
348
- ### P7 — `BlockAll` suppression
349
-
350
- Static per-map `suppressed`, recomputed on map-set / `order` / `occlusion` change; un-suppression re-entry.
351
-
352
- **Gate — `InputOcclusion.spec.js`:**
353
- * A `BlockAll` map above zeroes a lower map's `axis2` **and** `isActive`, not only its dispatch — the defect
354
- design revision 2 shipped.
355
- * A `BlockMatched` map above does **not** zero them.
356
- * A modal-consumed keystroke does not advance a lower map's sequence.
357
- * Un-suppressing re-enters sequences at 0: one half-matched before suppression does not complete on a single
358
- further step afterwards.
359
- * Suppression follows `order` changes made after link.
360
-
361
- ### P8 — Serialization and recording
362
-
363
- `InputMapSerializationAdapter`, `InputRecorder`.
364
-
365
- **Gate — `InputMapSerializationAdapter.spec.js`:**
366
- * Round-trip of a map with every trigger type nested at least two deep, both binding kinds, three layers and
367
- two devices; `equals` holds.
368
- * `order = 1000` survives — the `int16` fix.
369
- * A recorded trace replayed through a `ManualInputDevice` against the deserialized map produces the same
370
- dispatch sequence as the original. This is the end-to-end determinism gate, and the reason
371
- `ManualInputDevice` is production code rather than a fixture.
372
-
373
- ---
374
-
375
- ## 4. Deprecation
376
-
377
- **Applied.** JSDoc only — no runtime warnings, no shims, no behaviour change.
378
-
379
- | Target | Marking |
380
- |---|---|
381
- | [`Input`](../components/Input.js) | `@deprecated` — use `InputMap` |
382
- | [`InputSystem`](../systems/InputSystem.js) | `@deprecated` — use `InputMapSystem` |
383
- | [`ism/InputBinding.js`](InputBinding.js) | `@deprecated` — internal to `Input` |
384
- | [`InputController`](../components/InputController.js) | **Not** `@deprecated`. A JSDoc note narrowing it: pointer gestures only; keyboard and mouse-button bindings belong in `InputMap`. |
385
- | [`InputControllerSystem`](../systems/InputControllerSystem.js) | Same note. Its existing `Prefer to use InputSystem instead` line is wrong once `InputSystem` is deprecated and is replaced. |
386
- | [`components/InputBinding.js`](../components/InputBinding.js) | Unchanged — still `InputController`'s record. |
387
-
388
- `InputController` is deliberately **not** deprecated: it still owns every gesture binding (design section 1.1),
389
- and marking a class deprecated while it remains the only way to do something is a lie that the next reader
390
- has to disprove.
391
-
392
- Deletion of `Input` / `InputSystem` / `ism/InputBinding.js` is **not** in this program. Nothing consumes them
393
- any more, so nothing blocks it technically — they stay because an unreferenced export is public surface in
394
- this package, and removing one is a separate decision from replacing it.
395
-
396
- ---
397
-
398
- ## 5. Consumer migration
399
-
400
- > Rewritten after the adversarial review. Several claims in the first draft did not survive contact with the
401
- > source; section 8 lists what changed and why.
402
-
403
- ### 5.1 `EditorKeyMap` — BLOCKED, and not by a small thing
404
-
405
- The first draft claimed the editor's focus gate was "preserved by construction". **It is inverted.**
406
-
407
- Today `EditorKeyMap.attach()` listens on **`window`** (`EditorKeyMap.js:71`) and gates every handler with
408
- `isViewFocused` (`:12-31`), which passes when the game view is a descendant of `document.activeElement`. So
409
- hotkeys work with focus on `body`, and are suppressed while focus is in an editor text field.
410
-
411
- The ISM would instead see keys through the engine's `KeyboardDevice`, mounted on `this.viewStack.el`
412
- (`Engine.js:367`) — and `Editor.js:563` pushes **the entire editor GUI into that same view stack**. Two
413
- failures follow, in opposite directions:
414
-
415
- * Every editor panel, tree and **text input is inside the listening element**, so a keydown typed into a field
416
- reaches the device. `x` would delete the selected entities. Worse, `KeyboardDevice.js:112-118` calls
417
- `preventDefault()` for any bound key that has handlers, so typing `x` into a field would not even insert the
418
- character.
419
- * With focus on `body` — page load, or after a click that blurs — events target `body` and never reach a
420
- listener on a descendant, so every editor hotkey would be dead until the canvas is clicked.
421
-
422
- The ISM has no DOM awareness to express the old gate (design 6.3), so this is **unplanned design work, not a
423
- verification step**. Options, none free:
424
-
425
- 1. A second `KeyboardDevice` mounted on `gameView.el` with its own adapter under a distinct device id,
426
- driving only the editor and tool maps. Approximates today's gate; costs a device id in the binding format
427
- and a second `preventDefault` surface.
428
- 2. A focus predicate on `InputMap`, evaluated before dispatch. Cheap, but puts a DOM concept into a component
429
- the design deliberately keeps DOM-free.
430
- 3. Leave `EditorKeyMap` alone.
431
-
432
- **This program takes option 3.** The editor migration is deferred to its own change, where 1 or 2 can be
433
- designed properly. `EditorKeyMap` is therefore not deleted, and the definition of done says so.
434
-
435
- ### 5.2 Game input under the editor — a lever the ISM does not have
436
-
437
- `Editor.js:528` disables `InputControllerSystem` on attach, so no game binding fires while editing. That lever
438
- does not reach the ISM: `disableSystem` gates `update()`, and ISM dispatch is signal-driven and never passes
439
- through `update()`.
440
-
441
- So the moment 5.5 moves the strategy hotkeys, `i` would open the game inventory while the editor is open,
442
- `space` would recentre the game camera, and WASD would pan it.
443
-
444
- **The editor's own map must be `InputOcclusion.BlockAll`**, not the default. Tool maps sit above it and are
445
- unaffected; everything below goes inert, which is what `disableSystem` did. Worth stating loudly, because the
446
- design's own section 11 editor example uses the default.
447
-
448
- ### 5.3 `KeyboardCameraController` — deleted, two consumers not one
449
-
450
- Replaced by a coordinate binding plus a `Script`. Call sites:
451
-
452
- | Consumer | Note |
453
- |---|---|
454
- | `StrategyInteractionController.js:581` | the game's use |
455
- | `EngineHarness.js:29,340` | **engine package**, constructed whenever `cameraController: true`, the default. Missed by the first draft; deleting the file without this is an import-time break for every browser harness. |
456
-
457
- Two details the first draft got wrong:
458
-
459
- * **Eight keys, not four.** `registerToggle` binds arrows *and* WASD (`:64-67`). The design's section 11
460
- example binds only `a/d/w/s` and silently drops arrow-key panning.
461
- * **`'user-input'` goes to the camera entity**, not the map's. It is sent on `cameraController.entity`
462
- (`:54`), and its consumers are `WaitForEventBehavior`s targeting `activeCamera.entity`
463
- (`CameraFocusEntityStoryActionProcessor.js:44`) — the interrupt-camera-focus-on-input mechanic. An
464
- `InputMap` action dispatches on the map's own entity, so the map must be built **on the camera entity**, or
465
- the event re-forwarded explicitly. Getting this wrong stops keyboard pan cancelling story camera focus, and
466
- the surviving pointer path would keep working and mask it.
467
-
468
- ### 5.4 `Input` / `InputSystem` consumers — DONE
469
-
470
- Five, all of which moved:
471
-
472
- | File | Binding | Move |
473
- |---|---|---|
474
- | `OverlayPageGUI.js:233` | `keyboard/keys/escape/down` | direct, but see the arbitration note |
475
- | `CombatInteractionController.js:27,63` | `keyboard/keys/p/down`, `escape/down` | direct |
476
- | `StoryManager.js:422` | `keyboard/keys/space/down` | direct |
477
- | `StoryManager.js:421` | `pointer/on/tap` | **stays** on a small `InputController` — a tap is a gesture (fires on release, gated on 10 px and 1 s, `PointerDevice.js:20-40`), and translating it to a button press would advance dialogue on press and fire at the start of every drag |
478
- | `test/testAnimationGraph.js`, `test/testTalentPunisher.js` | keyboard | direct |
479
-
480
- **Escape arbitration, as it turned out.** `StrategyInteractionController`'s `escape` (`:512-517`) is an
481
- `InputController` binding, not an `Input` one, so it did **not** move in this slice — and the two systems do
482
- not see each other, so both still fire exactly as before. The conflict is real but deferred: it arrives when
483
- the scene moves. `OverlayPageGUI`'s map is already `order = 10` against the scene's implicit `0`, so the page
484
- that is open wins the key when that day comes.
485
-
486
- Once these move, nothing consumes `Input`. It is still **deprecated rather than deleted**, and the reason is
487
- the standing library policy — unreferenced exports are public surface — not a holdout. The first draft claimed
488
- a holdout that its own resolution had already removed.
489
-
490
- ### 5.5 `InputController` keyboard bindings
491
-
492
- Keyboard moves; gestures and DOM-gated buttons stay.
493
-
494
- | File | Moves to `InputMap` | Stays on `InputController` |
495
- |---|---|---|
496
- | `StrategyInteractionController.js` | keyboard pan (5.3), command keys — several are `/up` bindings (`:556-561`), i.e. `InputTriggerRelease` | `drag*`, `move`, `wheel`, `pinch*`, `tap`, **and `pointer/on/down` (`:295-352`)** |
497
- | `makeOrbitalCameraController.js` | — | `tap`, `down`, `drag`, `wheel` — stays entirely |
498
- | `CombatInteractionStateMachine.js` | **nothing** — the file has no keyboard bindings; `:123-277` are all pointer. Combat's `p` and `escape` live in `CombatInteractionController.js`, covered by 5.4 | `pointer/on/*` with their `event.target === graphics.domElement` gate |
499
- | `RadialContextMenu.js` | — | `move`, `up` — stays entirely |
500
- | `DevelopmentOptions.js:189` | — | `pointer/on/tap` — stays |
501
- | `editor/tools/v2/prototypeTransformControls.js` | `keyboard/keys/{w,e,r}/down` | — |
502
- | `prototype_first_person_controller.js` | WASD to one coordinate; space/shift/c become `isActive` reads | `pointer/on/move` |
503
- | `enableEditor.js:74` | `num_lock` toggle, direct device subscription — case by case | — |
504
-
505
- `priority` becomes `order`; `exclusive` becomes `InputOcclusion.BlockMatched`. Both translations are vacuous
506
- in practice: no shipping code sets either.
507
-
508
- ### 5.6 Registration
509
-
510
- * `makeMirEngineConfig.js` gains `new InputMapSystem([...adapters])`. The **component type registers
511
- implicitly** — `addSystem` calls `registerManyComponentTypes(system.referenced_components)`
512
- (`EntityManager.js:659`) — so no explicit component registration is needed.
513
- * The serialization adapter does **not** go here. `EngineConfiguration` has no adapter facility; engine
514
- components register in `populateEngineSerializationRegistry.js`, which the game funnels through via
515
- `GameBinarySerializationRegistry.js:53`. Only relevant once `InputMap.serializable` is turned on.
516
- * `EngineHarness.js` has no default system list — its config callback starts empty and `InputControllerSystem`
517
- is added lazily (`:441-443`). The ISM follows the same shape.
518
-
519
- **Every `InputMap` built by a controller carries `SerializationMetadata.Transient`**, as its `InputController`
520
- predecessors already do (`StrategyInteractionController.js:575`, `KeyboardCameraController.js:107`). This was
521
- belt-and-braces while the old components were `serializable = false`; it becomes load-bearing the moment
522
- `InputMap` serializes — see the JSDoc on `InputMap.serializable`.
523
-
524
- ---
525
-
526
- ## 6. Risks
527
-
528
- | | Risk | Mitigation |
529
- |---|---|---|
530
- | 1 | **Game input stays live under the editor** (5.2). Silent, and only visible as the game reacting while someone edits. | Editor map is `BlockAll`; a manual check with the editor open before the strategy hotkeys land. |
531
- | 2 | **`'user-input'` reach** (5.3). Regression is masked by the surviving pointer path. | Bind on the camera entity; check story camera focus is still interruptible by keyboard pan. |
532
- | 3 | **Escape arbitration** (5.4). Two handlers become one. | Explicit orders, stated above. |
533
- | 4 | **A parallel session is working on graphics.** | Every commit stages explicit paths. No `git add -A`, no `git add .`. |
534
- | 5 | **Three-repo submodule landing** (`moh` to `mir-engine` to `meep`). | Commit bottom-up: `meep`, then `mir-engine`, then `moh`. |
535
- | 6 | **Simulation-time windows** (1.2). A hold or sequence inside a PAUSE MENU can never mature, because the ticker is paused — and the pause menu is the design's own modal example. | Menus use plain presses. If a menu ever needs a hold, that is the trigger to reconsider 7.1. |
536
- | 7 | **Behaviour preservation in P9 has no automated gate.** "Existing specs stay green" proves nothing: none of the migrated behaviours has a spec. | Named manual checks per consumer, listed with the migration rather than assumed. |
537
-
538
- ---
539
-
540
- ## 7. Amendments to the design
541
-
542
- 1. **Sequence and hold timing is simulation time, advanced by `update(dt)`** — not real time stamped at edge
543
- arrival (design 4.4). Testability (1.2): a real-time clock cannot be driven from a spec without faking it.
544
- Consequences: one-frame window resolution, windows stretch under slow motion and freeze while paused
545
- (risk 6).
546
- 2. **`ManualInputDevice` is production code** (1.1) — the design's "network-driven replay source" is now a
547
- named, shipped class.
548
- 3. **The new `InputBinding` lives at `ism/map/InputBinding.js`** (2), resolving design 14.2's collision.
549
- 4. **Relative coordinate channels LATCH rather than reset.** Design 3.3/9.2 said the reset is "ordered early
550
- in the frame, so sibling systems read a completed sum". That is backwards: device events arrive *between*
551
- frames, so zeroing at the top of a frame destroys exactly what that frame should report. The adapter
552
- accumulates into one buffer and publishes into another once per frame (`latchDeltas`), which also makes the
553
- value independent of system execution order — every reader in a frame sees the same number.
554
- 5. **Evaluation state does not live on authored triggers.** Design 4.1 put `satisfied` on the trigger.
555
- Authored triggers are routinely shared between bindings (the design's own section 11 editor example reuses
556
- one `ctrl` across five chords), so the compiler takes a `clone()` per binding and state lives there.
557
- 6. **Authored collections are plain arrays, not `List`.** Design §9.1 sketched them as
558
- [`List`](../../../../core/collection/list/List.js), which is the codebase convention and which the old
559
- `Input` component used. They are arrays because nothing reads them on the edge path — the compiled program
560
- does — so `List`'s indirection buys nothing there, and its `equals`/`hash`/`toBinaryBuffer` are not needed
561
- while `InputMap.serializable` is false. **The cost is real and was paid once already:** `List` carries
562
- `on.added`/`on.removed`, and the hand-rolled substitute for that (revision counters) is where the
563
- `popLayer` defect lived. Revisit when serialization lands, where `List`'s binary methods would earn their
564
- place.
565
-
566
- 7. **Consumption gates dispatch, not evaluation.** A consumed trigger still updates `satisfied`. Skipping it
567
- leaves a stale edge: a map binding both a key and that key's release loses the release, because the press
568
- was consumed by the key binding and the release trigger never saw its own value change. Found by the P3
569
- gate, which is what the gate is for.
570
-
571
- ---
572
-
573
- ## 8. What the adversarial review changed
574
-
575
- The first draft was reviewed against the source. Everything below was verified before being changed.
576
-
577
- ### Blocked, and rescoped
578
-
579
- * **`EditorKeyMap` is no longer deleted** (5.1). The claim that the focus gate was "preserved by construction"
580
- was inverted: the editor GUI lives inside the element the engine's `KeyboardDevice` listens on, so migrating
581
- would make `x` delete entities while typing in a panel, and `preventDefault` would swallow the keystroke.
582
- Retiring it needs a design addition this program does not contain.
583
- * **Game input under the editor** (5.2) has no ISM equivalent of `disableSystem`, because ISM dispatch never
584
- passes through `update()`. The editor map must be `BlockAll`.
585
- * **Definition of done items 3 and 4** contradicted the plan's own tables: pointer-button bindings do not all
586
- move, and `EditorKeyMap` does not go. Both reworded.
587
-
588
- ### Facts corrected
589
-
590
- * `EngineHarness.js:29,340` is a second consumer of `KeyboardCameraController` (5.3). Deleting it without this
591
- is an import-time break for every browser harness.
592
- * `KeyboardCameraController` binds **eight** keys, not four (5.3).
593
- * `'user-input'` is sent on the **camera** entity, not the map's, and feeds story camera-focus interruption
594
- (5.3).
595
- * `CombatInteractionStateMachine.js` has **no keyboard bindings** (5.5). The first draft's row named work with
596
- no referent.
597
- * `StrategyInteractionController.js:295-352` binds `pointer/on/down`, which appeared in neither column (5.5).
598
- * `DevelopmentOptions.js:189` is a shipping `InputController` consumer that was missing from the inventory.
599
- * The serialization adapter registers in `populateEngineSerializationRegistry.js`, not `makeMirEngineConfig`
600
- (5.6). `EngineConfiguration` has no adapter facility.
601
- * `EngineHarness` has no default system list to add to (5.6), and no spec boots an engine — so the claim that
602
- registering there gives specs the system was wrong twice over.
603
- * The `Input` "holdout" did not exist: the draft's own resolution moved every consumer off it (5.4). The right
604
- reason not to delete is the library policy on public surface.
605
-
606
- ### Defects fixed in the implementation
607
-
608
- * **Delta channels latch rather than reset** (7.4) — the original ordering would have reported an empty frame
609
- to every reader.
610
- * **Evaluation state moved off authored triggers** (7.5) — sharing a trigger between bindings would have made
611
- them interfere.
612
- * **Consumption gates dispatch, not evaluation** (7.6) — found by the P3 gate.
613
- * **`InputMap.serializable` stays `false`** until the adapter lands *and* the Transient discipline is audited.
614
- A controller-built map that serialized would load as a ghost, win the order tie, and consume the switches
615
- its live twin binds — silent input death, one more ghost per save cycle.
616
-
617
- ### Gates added
618
-
619
- * Design case 20 (a map naming an unregistered device links and stays inert) and case 21 (`registerDevice`
620
- after link makes inert bindings live) were dropped from every gate; both move into P3, whose machinery they
621
- need. Case 21 exercises live recompile and `satisfied` re-initialisation.
622
- * P1's cascade items move to P3, where they are observable as *which action fires* rather than by inspecting
623
- compiler output.
624
- * The "reject binding one action as both kinds" item is dropped: it is an `assert.*`, which is stripped in
625
- production, and this codebase does not test that asserts throw.
626
- * Occlusion over direction-derived switches has no gate in either document. Added to P6.
627
- * P7 necessarily edits code landed in P3, P4 and P5. Stated, so those phases are not treated as frozen.