@woosh/meep-engine 2.169.6 → 2.170.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1552) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/editor/Editor.d.ts +161 -65
  3. package/editor/Editor.d.ts.map +1 -1
  4. package/editor/Editor.js +669 -794
  5. package/editor/EditorCameraNavigation.d.ts +21 -0
  6. package/editor/EditorCameraNavigation.d.ts.map +1 -0
  7. package/editor/EditorCameraNavigation.js +191 -0
  8. package/editor/EditorKeyMap.d.ts +28 -0
  9. package/editor/EditorKeyMap.d.ts.map +1 -0
  10. package/editor/EditorKeyMap.js +182 -0
  11. package/editor/REWORK_PLAN_2026_08.md +692 -0
  12. package/editor/SelectionVisualizer.d.ts +48 -19
  13. package/editor/SelectionVisualizer.d.ts.map +1 -1
  14. package/editor/SelectionVisualizer.js +163 -156
  15. package/editor/actions/concrete/ActionUpdateTexture.d.ts +11 -11
  16. package/editor/actions/concrete/ArrayCopyAction.d.ts +19 -19
  17. package/editor/actions/concrete/ArrayCopyAction.d.ts.map +1 -1
  18. package/editor/actions/concrete/ArrayCopyAction.js +7 -7
  19. package/editor/actions/concrete/ComponentAddAction.d.ts +14 -14
  20. package/editor/actions/concrete/ComponentAddAction.d.ts.map +1 -1
  21. package/editor/actions/concrete/ComponentAddAction.js +6 -5
  22. package/editor/actions/concrete/ComponentRemoveAction.d.ts +10 -10
  23. package/editor/actions/concrete/ComponentRemoveAction.d.ts.map +1 -1
  24. package/editor/actions/concrete/ComponentRemoveAction.js +10 -12
  25. package/editor/actions/concrete/EntityCreateAction.d.ts +17 -17
  26. package/editor/actions/concrete/EntityCreateAction.d.ts.map +1 -1
  27. package/editor/actions/concrete/EntityCreateAction.js +11 -14
  28. package/editor/actions/concrete/EntityRemoveAction.d.ts +10 -10
  29. package/editor/actions/concrete/EntityRemoveAction.d.ts.map +1 -1
  30. package/editor/actions/concrete/EntityRemoveAction.js +2 -1
  31. package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts +46 -46
  32. package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts +37 -37
  33. package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts.map +1 -1
  34. package/editor/actions/concrete/ModifyPatchTextureArray2DAction.js +3 -1
  35. package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts +22 -22
  36. package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts.map +1 -1
  37. package/editor/actions/concrete/PaintTerrainOverlayAction.js +3 -3
  38. package/editor/actions/concrete/PatchTerrainHeightAction.d.ts +31 -18
  39. package/editor/actions/concrete/PatchTerrainHeightAction.d.ts.map +1 -1
  40. package/editor/actions/concrete/PatchTerrainHeightAction.js +28 -9
  41. package/editor/actions/concrete/SelectionAddAction.d.ts +18 -18
  42. package/editor/actions/concrete/SelectionAddAction.d.ts.map +1 -1
  43. package/editor/actions/concrete/SelectionAddAction.js +2 -1
  44. package/editor/actions/concrete/SelectionClearAction.d.ts +8 -8
  45. package/editor/actions/concrete/SelectionClearAction.d.ts.map +1 -1
  46. package/editor/actions/concrete/SelectionClearAction.js +1 -4
  47. package/editor/actions/concrete/SelectionRemoveAction.d.ts +9 -9
  48. package/editor/actions/concrete/SelectionRemoveAction.d.ts.map +1 -1
  49. package/editor/actions/concrete/SelectionRemoveAction.js +2 -1
  50. package/editor/actions/concrete/TransformModifyAction.d.ts +16 -16
  51. package/editor/actions/concrete/TransformModifyAction.d.ts.map +1 -1
  52. package/editor/actions/concrete/TransformModifyAction.js +8 -8
  53. package/editor/actions/concrete/WriteGridValueAction.d.ts +13 -14
  54. package/editor/actions/concrete/WriteGridValueAction.d.ts.map +1 -1
  55. package/editor/actions/concrete/WriteGridValueAction.js +3 -3
  56. package/editor/camera/camera_framing.d.ts +30 -0
  57. package/editor/camera/camera_framing.d.ts.map +1 -0
  58. package/editor/camera/camera_framing.js +98 -0
  59. package/editor/clipboard.d.ts +19 -0
  60. package/editor/clipboard.d.ts.map +1 -0
  61. package/editor/clipboard.js +184 -0
  62. package/editor/ecs/EditorEntity.d.ts +15 -15
  63. package/editor/ecs/EditorEntitySystem.d.ts +7 -7
  64. package/editor/ecs/EditorEntitySystem.d.ts.map +1 -1
  65. package/editor/ecs/EditorEntitySystem.js +1 -6
  66. package/editor/ecs/component/FieldDescriptor.d.ts +26 -26
  67. package/editor/ecs/component/FieldDescriptor.d.ts.map +1 -1
  68. package/editor/ecs/component/FieldDescriptor.js +20 -22
  69. package/editor/ecs/component/FieldValueAdapter.d.ts +6 -6
  70. package/editor/ecs/component/FieldValueAdapter.d.ts.map +1 -1
  71. package/editor/ecs/component/FieldValueAdapter.js +2 -5
  72. package/editor/ecs/component/TypeEditor.d.ts +24 -24
  73. package/editor/ecs/component/createFieldEditor.d.ts +8 -8
  74. package/editor/ecs/component/createObjectEditor.d.ts +13 -13
  75. package/editor/ecs/component/editors/ColorEditor.d.ts +6 -6
  76. package/editor/ecs/component/editors/HTMLElementEditor.d.ts +6 -6
  77. package/editor/ecs/component/editors/HTMLElementEditor.d.ts.map +1 -1
  78. package/editor/ecs/component/editors/ImagePathEditor.d.ts +6 -6
  79. package/editor/ecs/component/editors/LargeStringEditor.d.ts +15 -15
  80. package/editor/ecs/component/editors/NumericIntervalEditor.d.ts +6 -6
  81. package/editor/ecs/component/editors/NumericIntervalEditor.d.ts.map +1 -1
  82. package/editor/ecs/component/editors/ObservedBooleanEditor.d.ts +6 -6
  83. package/editor/ecs/component/editors/ObservedEnumEditor.d.ts +6 -6
  84. package/editor/ecs/component/editors/ObservedIntegerEditor.d.ts +6 -6
  85. package/editor/ecs/component/editors/ObservedIntegerEditor.d.ts.map +1 -1
  86. package/editor/ecs/component/editors/ObservedStringEditor.d.ts +6 -6
  87. package/editor/ecs/component/editors/ObservedStringEditor.d.ts.map +1 -1
  88. package/editor/ecs/component/editors/Sampler2DEditor.d.ts +6 -6
  89. package/editor/ecs/component/editors/collection/ListEditor.d.ts +7 -7
  90. package/editor/ecs/component/editors/common/BitFlagsEditor.d.ts +11 -11
  91. package/editor/ecs/component/editors/common/EnumEditor.d.ts +7 -7
  92. package/editor/ecs/component/editors/common/makeV3_editor.d.ts +14 -14
  93. package/editor/ecs/component/editors/common/makeV3_editor.d.ts.map +1 -1
  94. package/editor/ecs/component/editors/common/noEditor.d.ts +2 -2
  95. package/editor/ecs/component/editors/common/two_way_sync.d.ts +22 -0
  96. package/editor/ecs/component/editors/common/two_way_sync.d.ts.map +1 -0
  97. package/editor/ecs/component/editors/ecs/GridObstacleEditor.d.ts +6 -6
  98. package/editor/ecs/component/editors/ecs/GridObstacleEditor.js +1 -1
  99. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +19 -66
  100. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +1 -1
  101. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +35 -239
  102. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +11 -11
  103. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +1 -1
  104. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.js +17 -17
  105. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts +13 -13
  106. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +51 -51
  107. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.js +1 -1
  108. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +46 -47
  109. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +1 -1
  110. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +15 -15
  111. package/editor/ecs/component/editors/ecs/Trail2DEditor.d.ts +29 -29
  112. package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts +42 -0
  113. package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts.map +1 -0
  114. package/editor/ecs/component/editors/ecs/TransformEditor.d.ts +19 -19
  115. package/editor/ecs/component/editors/ecs/buildGridObstaclePreview.d.ts +8 -0
  116. package/editor/ecs/component/editors/ecs/buildGridObstaclePreview.d.ts.map +1 -0
  117. package/editor/ecs/component/editors/ecs/buildGridObstaclePreview.js +19 -0
  118. package/editor/ecs/component/editors/ecs/terrain/SplatMappingEditor.d.ts +18 -18
  119. package/editor/ecs/component/editors/ecs/terrain/TerrainEditor.d.ts +38 -38
  120. package/editor/ecs/component/editors/ecs/terrain/TerrainLayerEditor.d.ts +15 -15
  121. package/editor/ecs/component/editors/ecs/terrain/TerrainLayersEditor.d.ts +18 -18
  122. package/editor/ecs/component/editors/ecs/terrain/TerrainOverlayEditor.d.ts +17 -17
  123. package/editor/ecs/component/editors/geom/QuaternionEditor.d.ts +5 -5
  124. package/editor/ecs/component/editors/geom/QuaternionEditor.d.ts.map +1 -1
  125. package/editor/ecs/component/editors/geom/Vector1Editor.d.ts +6 -6
  126. package/editor/ecs/component/editors/geom/Vector1Editor.d.ts.map +1 -1
  127. package/editor/ecs/component/editors/geom/Vector2Editor.d.ts +5 -5
  128. package/editor/ecs/component/editors/geom/Vector3Editor.d.ts +5 -5
  129. package/editor/ecs/component/editors/geom/Vector4Editor.d.ts +5 -5
  130. package/editor/ecs/component/editors/primitive/ArrayEditor.d.ts +7 -7
  131. package/editor/ecs/component/editors/primitive/BooleanEditor.d.ts +6 -6
  132. package/editor/ecs/component/editors/primitive/FunctionEditor.d.ts +6 -6
  133. package/editor/ecs/component/editors/primitive/NumberEditor.d.ts +7 -7
  134. package/editor/ecs/component/editors/primitive/NumberEditor.d.ts.map +1 -1
  135. package/editor/ecs/component/editors/primitive/ObjectEditor.d.ts +5 -5
  136. package/editor/ecs/component/editors/primitive/StringEditor.d.ts +6 -6
  137. package/editor/ecs/component/editors/three/BufferGeometryEditor.d.ts +6 -6
  138. package/editor/ecs/component/editors/three/MaterialEditor.d.ts +6 -6
  139. package/editor/ecs/component/editors/three/MeshEditor.d.ts +6 -6
  140. package/editor/ecs/component/editors/three/TextureEditor.d.ts +6 -6
  141. package/editor/ecs/component/findNearestRegisteredType.d.ts +7 -7
  142. package/editor/ecs/component/registerEngineComponentEditors.d.ts +8 -0
  143. package/editor/ecs/component/registerEngineComponentEditors.d.ts.map +1 -0
  144. package/editor/ecs/component/registerEngineComponentEditors.js +85 -0
  145. package/editor/enableEditor.d.ts +13 -13
  146. package/editor/enableEditor.d.ts.map +1 -1
  147. package/editor/enableEditor.js +14 -4
  148. package/editor/library/MeshLibrary.d.ts +12 -12
  149. package/editor/library/MeshLibrary.d.ts.map +1 -1
  150. package/editor/library/MeshLibrary.js +4 -7
  151. package/editor/particles/lut_ops.d.ts +34 -0
  152. package/editor/particles/lut_ops.d.ts.map +1 -0
  153. package/editor/particles/lut_ops.js +148 -0
  154. package/editor/particles/particleEditEvents.d.ts +11 -0
  155. package/editor/particles/particleEditEvents.d.ts.map +1 -0
  156. package/editor/particles/particleEditEvents.js +12 -0
  157. package/editor/particles/rebuildParticleEmitter.d.ts +11 -0
  158. package/editor/particles/rebuildParticleEmitter.d.ts.map +1 -0
  159. package/editor/particles/rebuildParticleEmitter.js +49 -0
  160. package/editor/persistence/EditorLayoutStore.d.ts +30 -0
  161. package/editor/persistence/EditorLayoutStore.d.ts.map +1 -0
  162. package/editor/persistence/EditorLayoutStore.js +71 -0
  163. package/editor/persistence/SceneMetadata.d.ts +38 -0
  164. package/editor/persistence/SceneMetadata.d.ts.map +1 -0
  165. package/editor/persistence/SceneMetadata.js +52 -0
  166. package/editor/persistence/SceneSlotManager.d.ts +40 -0
  167. package/editor/persistence/SceneSlotManager.d.ts.map +1 -0
  168. package/editor/persistence/SceneSlotManager.js +144 -0
  169. package/editor/persistence/buildNewSceneDataset.d.ts +10 -0
  170. package/editor/persistence/buildNewSceneDataset.d.ts.map +1 -0
  171. package/editor/persistence/buildNewSceneDataset.js +67 -0
  172. package/editor/persistence/files.d.ts +24 -0
  173. package/editor/persistence/files.d.ts.map +1 -0
  174. package/editor/persistence/files.js +68 -0
  175. package/editor/persistence/scene_import.d.ts +45 -0
  176. package/editor/persistence/scene_import.d.ts.map +1 -0
  177. package/editor/persistence/scene_import.js +143 -0
  178. package/editor/persistence/scene_serialization.d.ts +36 -0
  179. package/editor/persistence/scene_serialization.d.ts.map +1 -0
  180. package/editor/persistence/scene_serialization.js +79 -0
  181. package/editor/persistence/string_buffer_codec.d.ts +20 -0
  182. package/editor/persistence/string_buffer_codec.d.ts.map +1 -0
  183. package/editor/persistence/string_buffer_codec.js +41 -0
  184. package/editor/process/DisableGameUIProcess.d.ts +7 -7
  185. package/editor/process/DisableGameUIProcess.d.ts.map +1 -1
  186. package/editor/process/DisableGameUIProcess.js +1 -5
  187. package/editor/process/EditorProcess.d.ts +18 -18
  188. package/editor/process/GridDisplayProcess.d.ts +16 -0
  189. package/editor/process/GridDisplayProcess.d.ts.map +1 -0
  190. package/editor/process/GridDisplayProcess.js +53 -0
  191. package/editor/process/ObstacleGridDisplayProcess.d.ts +12 -12
  192. package/editor/process/ObstacleGridDisplayProcess.d.ts.map +1 -1
  193. package/editor/process/ObstacleGridDisplayProcess.js +7 -9
  194. package/editor/process/ParticleEmitterRebuildProcess.d.ts +66 -0
  195. package/editor/process/ParticleEmitterRebuildProcess.d.ts.map +1 -0
  196. package/editor/process/ParticleEmitterRebuildProcess.js +217 -0
  197. package/editor/process/ProcessEngine.d.ts +29 -29
  198. package/editor/process/ProcessEngine.d.ts.map +1 -1
  199. package/editor/process/ProcessEngine.js +11 -4
  200. package/editor/process/SymbolicDisplayProcess.d.ts +18 -18
  201. package/editor/process/SymbolicDisplayProcess.js +2 -2
  202. package/editor/process/symbolic/ComponentSymbolicDisplay.d.ts +10 -10
  203. package/editor/process/symbolic/SymbolicDisplayInternalAPI.d.ts +67 -64
  204. package/editor/process/symbolic/SymbolicDisplayInternalAPI.d.ts.map +1 -1
  205. package/editor/process/symbolic/SymbolicDisplayInternalAPI.js +42 -45
  206. package/editor/process/symbolic/buildThreeJSHelperEntity.d.ts +8 -8
  207. package/editor/process/symbolic/make3DSymbolicDisplay.d.ts +9 -9
  208. package/editor/process/symbolic/makeCameraSymbolicDisplay.d.ts +6 -6
  209. package/editor/process/symbolic/makeGridPositionSymbolDisplay.d.ts +5 -5
  210. package/editor/process/symbolic/makeHelperBoxGeometry.d.ts +2 -2
  211. package/editor/process/symbolic/makeHelperSphereGeometry.d.ts +8 -8
  212. package/editor/process/symbolic/makeLightSymbolicDisplay.d.ts +6 -6
  213. package/editor/process/symbolic/makeParticleEmitterSymbolicDisplay.d.ts +5 -5
  214. package/editor/process/symbolic/makeParticleEmitterSymbolicDisplay.d.ts.map +1 -1
  215. package/editor/process/symbolic/makeParticleEmitterSymbolicDisplay.js +21 -1
  216. package/editor/process/symbolic/makePathSymbolicDisplay.d.ts +6 -6
  217. package/editor/process/symbolic/makePositionedIconDisplaySymbol.d.ts +8 -8
  218. package/editor/process/symbolic/makePositionedIconDisplaySymbol.d.ts.map +1 -1
  219. package/editor/process/symbolic/makePositionedIconDisplaySymbol.js +3 -0
  220. package/editor/process/symbolic/makeSocketsSymbolicDisplay.d.ts +6 -6
  221. package/editor/process/symbolic/makeSolidArrowGeometry.d.ts +25 -25
  222. package/editor/process/symbolic/makeSoundEmitterSymbolicDisplay.d.ts +5 -5
  223. package/editor/process/symbolic/synchronizeTransform.d.ts +11 -11
  224. package/editor/prototypeEditorShell.js +102 -0
  225. package/editor/style/controls.scss +168 -0
  226. package/editor/style/editor.scss +313 -0
  227. package/editor/style/inspector.scss +223 -0
  228. package/editor/templates/entity_templates.d.ts +19 -0
  229. package/editor/templates/entity_templates.d.ts.map +1 -0
  230. package/editor/templates/entity_templates.js +167 -0
  231. package/editor/tools/GridPaintTool.d.ts +17 -16
  232. package/editor/tools/GridPaintTool.d.ts.map +1 -1
  233. package/editor/tools/GridPaintTool.js +13 -14
  234. package/editor/tools/SelectionTool.d.ts +25 -26
  235. package/editor/tools/SelectionTool.d.ts.map +1 -1
  236. package/editor/tools/SelectionTool.js +46 -13
  237. package/editor/tools/TransformToolV2.d.ts +76 -0
  238. package/editor/tools/TransformToolV2.d.ts.map +1 -0
  239. package/editor/tools/TransformToolV2.js +396 -0
  240. package/editor/tools/engine/Tool.d.ts +87 -63
  241. package/editor/tools/engine/Tool.d.ts.map +1 -1
  242. package/editor/tools/engine/Tool.js +72 -28
  243. package/editor/tools/engine/ToolEngine.d.ts +21 -22
  244. package/editor/tools/engine/ToolEngine.d.ts.map +1 -1
  245. package/editor/tools/engine/ToolEngine.js +52 -54
  246. package/editor/tools/engine/ToolState.d.ts +6 -6
  247. package/editor/tools/paint/TerrainHeightPaintTool.d.ts +17 -17
  248. package/editor/tools/paint/TerrainHeightPaintTool.d.ts.map +1 -1
  249. package/editor/tools/paint/TerrainHeightPaintTool.js +12 -7
  250. package/editor/tools/paint/TerrainPaintTool.d.ts +81 -30
  251. package/editor/tools/paint/TerrainPaintTool.d.ts.map +1 -1
  252. package/editor/tools/paint/TerrainPaintTool.js +58 -21
  253. package/editor/tools/paint/TerrainTexturePaintTool.d.ts +18 -17
  254. package/editor/tools/paint/TerrainTexturePaintTool.d.ts.map +1 -1
  255. package/editor/tools/paint/TerrainTexturePaintTool.js +75 -12
  256. package/editor/tools/v2/BlenderCameraOrientationGizmo.js +24 -26
  257. package/editor/tools/v2/GizmoNode.d.ts.map +1 -1
  258. package/editor/tools/v2/GizmoNode.js +14 -13
  259. package/editor/tools/v2/TransformControls.d.ts.map +1 -1
  260. package/editor/tools/v2/TransformControls.js +18 -45
  261. package/editor/tools/v2/TransformControlsGizmo.d.ts.map +1 -1
  262. package/editor/tools/v2/TransformControlsGizmo.js +3 -6
  263. package/editor/tools/v2/TransformControlsPlane.d.ts.map +1 -1
  264. package/editor/tools/v2/TransformControlsPlane.js +3 -5
  265. package/editor/tools/v2/TransformMode.d.ts +6 -6
  266. package/editor/view/ecs/ComponentControlView.d.ts +23 -23
  267. package/editor/view/ecs/ComponentControlView.d.ts.map +1 -1
  268. package/editor/view/ecs/ComponentControlView.js +4 -4
  269. package/editor/view/ecs/EntityEditor.d.ts +24 -29
  270. package/editor/view/ecs/EntityEditor.d.ts.map +1 -1
  271. package/editor/view/ecs/EntityEditor.js +34 -10
  272. package/editor/view/ecs/EntityList.js +2 -3
  273. package/editor/view/ecs/HierarchicalEntityListView.d.ts +24 -7
  274. package/editor/view/ecs/HierarchicalEntityListView.d.ts.map +1 -1
  275. package/editor/view/ecs/HierarchicalEntityListView.js +339 -191
  276. package/editor/view/ecs/components/DatGuiController.js +2 -216
  277. package/editor/view/ecs/components/color/GaugeView.d.ts +12 -12
  278. package/editor/view/ecs/components/common/AutoCanvasView.d.ts +29 -19
  279. package/editor/view/ecs/components/common/AutoCanvasView.d.ts.map +1 -1
  280. package/editor/view/ecs/components/common/LineView.d.ts +11 -11
  281. package/editor/view/ecs/components/common/LineView.d.ts.map +1 -1
  282. package/editor/view/ecs/components/common/LineView.js +2 -1
  283. package/editor/view/ecs/components/common/NumberController.d.ts +17 -17
  284. package/editor/view/ecs/components/common/TextController.d.ts +21 -0
  285. package/editor/view/ecs/components/common/TextController.d.ts.map +1 -0
  286. package/editor/view/library/MeshLibraryView.d.ts +17 -0
  287. package/editor/view/library/MeshLibraryView.d.ts.map +1 -0
  288. package/editor/view/library/MeshLibraryView.js +35 -20
  289. package/editor/view/node-graph/NodeGraphCamera.d.ts +48 -0
  290. package/editor/view/node-graph/NodeGraphCamera.d.ts.map +1 -0
  291. package/editor/view/node-graph/NodeGraphCamera.js +88 -90
  292. package/editor/view/node-graph/NodeGraphEditorView.d.ts +25 -2
  293. package/editor/view/node-graph/NodeGraphEditorView.d.ts.map +1 -1
  294. package/editor/view/node-graph/NodeGraphSelection.d.ts +56 -0
  295. package/editor/view/node-graph/NodeGraphSelection.d.ts.map +1 -0
  296. package/editor/view/node-graph/NodeGraphView.d.ts +35 -18
  297. package/editor/view/node-graph/NodeGraphView.d.ts.map +1 -1
  298. package/editor/view/node-graph/NodeGraphView.js +666 -669
  299. package/editor/view/node-graph/NodeView.d.ts +3 -2
  300. package/editor/view/node-graph/NodeView.d.ts.map +1 -1
  301. package/editor/view/node-graph/PortView.d.ts +2 -2
  302. package/editor/view/node-graph/PortView.d.ts.map +1 -1
  303. package/editor/view/node-graph/PortView.js +2 -2
  304. package/editor/view/node-graph/actions/ConnectionCreateAction.d.ts +34 -0
  305. package/editor/view/node-graph/actions/ConnectionCreateAction.d.ts.map +1 -0
  306. package/editor/view/node-graph/actions/ConnectionCreateAction.js +53 -53
  307. package/editor/view/node-graph/actions/ConnectionDeleteAction.d.ts +26 -0
  308. package/editor/view/node-graph/actions/ConnectionDeleteAction.d.ts.map +1 -0
  309. package/editor/view/node-graph/actions/NodeDeleteAction.d.ts +47 -0
  310. package/editor/view/node-graph/actions/NodeDeleteAction.d.ts.map +1 -0
  311. package/editor/view/node-graph/actions/NodeDeleteAction.js +88 -88
  312. package/editor/view/node-graph/actions/NodeParameterSetAction.d.ts +34 -0
  313. package/editor/view/node-graph/actions/NodeParameterSetAction.d.ts.map +1 -0
  314. package/editor/view/node-graph/actions/NodeParameterSetAction.js +52 -52
  315. package/editor/view/node-graph/actions/NodesMoveAction.d.ts +38 -0
  316. package/editor/view/node-graph/actions/NodesMoveAction.d.ts.map +1 -0
  317. package/editor/view/node-graph/actions/SelectionSetAction.d.ts +38 -0
  318. package/editor/view/node-graph/actions/SelectionSetAction.d.ts.map +1 -0
  319. package/editor/view/node-graph/actions/SelectionSetAction.js +60 -60
  320. package/editor/view/node-graph/connection_wire_geometry.d.ts +46 -0
  321. package/editor/view/node-graph/connection_wire_geometry.d.ts.map +1 -0
  322. package/editor/view/particles/ColorLutGradientView.d.ts +19 -0
  323. package/editor/view/particles/ColorLutGradientView.d.ts.map +1 -0
  324. package/editor/view/particles/ColorLutGradientView.js +291 -0
  325. package/editor/view/particles/ScalarLutCurveView.d.ts +19 -0
  326. package/editor/view/particles/ScalarLutCurveView.d.ts.map +1 -0
  327. package/editor/view/particles/ScalarLutCurveView.js +279 -0
  328. package/editor/view/prepareMeshLibrary.d.ts +7 -0
  329. package/editor/view/prepareMeshLibrary.d.ts.map +1 -0
  330. package/editor/view/prepareMeshLibrary.js +34 -14
  331. package/editor/view/shell/EditorShellView.d.ts +18 -0
  332. package/editor/view/shell/EditorShellView.d.ts.map +1 -0
  333. package/editor/view/shell/EditorShellView.js +442 -0
  334. package/editor/view/shell/SceneTreePanelView.d.ts +17 -0
  335. package/editor/view/shell/SceneTreePanelView.d.ts.map +1 -0
  336. package/editor/view/shell/SceneTreePanelView.js +119 -0
  337. package/editor/view/shell/ViewportPanelView.d.ts +18 -0
  338. package/editor/view/shell/ViewportPanelView.d.ts.map +1 -0
  339. package/editor/view/shell/ViewportPanelView.js +64 -0
  340. package/editor/view/tools/ToolSettingsView.d.ts +21 -10
  341. package/editor/view/tools/ToolSettingsView.d.ts.map +1 -1
  342. package/editor/view/tools/ToolSettingsView.js +114 -100
  343. package/editor/view/tools/ToolView.d.ts +12 -12
  344. package/editor/view/v2/SplitView.js +2 -104
  345. package/package.json +7 -1
  346. package/samples/terrain/editor.js +9 -13
  347. package/src/core/binary/BitSet.d.ts.map +1 -1
  348. package/src/core/binary/BitSet.js +7 -7
  349. package/src/core/binary/type/Field.d.ts +2 -2
  350. package/src/core/binary/type/Field.d.ts.map +1 -1
  351. package/src/core/binary/type/Field.js +3 -2
  352. package/src/core/binary/type/Type.d.ts +5 -5
  353. package/src/core/binary/type/Type.d.ts.map +1 -1
  354. package/src/core/binary/type/Type.js +18 -15
  355. package/src/core/binary/type/TypeBuilder.d.ts +1 -1
  356. package/src/core/binary/type/TypeBuilder.d.ts.map +1 -1
  357. package/src/core/binary/type/TypeBuilder.js +2 -1
  358. package/src/core/binary/type/TypeRegistry.d.ts.map +1 -1
  359. package/src/core/binary/type/TypeRegistry.js +1 -3
  360. package/src/core/cache/Cache.d.ts +8 -8
  361. package/src/core/cache/Cache.d.ts.map +1 -1
  362. package/src/core/cache/Cache.js +14 -15
  363. package/src/core/cache/CacheV2.d.ts.map +1 -1
  364. package/src/core/cache/CacheV2.js +15 -20
  365. package/src/core/cache/LoadingCache.d.ts.map +1 -1
  366. package/src/core/cache/LoadingCache.js +3 -2
  367. package/src/core/collection/CuckooFilter.d.ts +23 -23
  368. package/src/core/collection/CuckooFilter.d.ts.map +1 -1
  369. package/src/core/collection/CuckooFilter.js +27 -26
  370. package/src/core/collection/PairUint32Map.d.ts +1 -1
  371. package/src/core/collection/PairUint32Map.d.ts.map +1 -1
  372. package/src/core/collection/PairUint32Map.js +322 -321
  373. package/src/core/collection/RingBuffer.d.ts +5 -5
  374. package/src/core/collection/RingBuffer.d.ts.map +1 -1
  375. package/src/core/collection/RingBuffer.js +18 -18
  376. package/src/core/collection/Uint32Map.d.ts +5 -5
  377. package/src/core/collection/Uint32Map.d.ts.map +1 -1
  378. package/src/core/collection/Uint32Map.js +346 -345
  379. package/src/core/collection/Uint32MinHeap.d.ts +4 -4
  380. package/src/core/collection/Uint32MinHeap.d.ts.map +1 -1
  381. package/src/core/collection/Uint32MinHeap.js +109 -109
  382. package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts.map +1 -1
  383. package/src/core/collection/array/iterator/ArrayIteratorRandom.js +3 -8
  384. package/src/core/collection/heap/FibonacciHeap.d.ts +6 -6
  385. package/src/core/collection/heap/FibonacciHeap.d.ts.map +1 -1
  386. package/src/core/collection/heap/FibonacciHeap.js +586 -586
  387. package/src/core/collection/heap/IndexedFloatMaxHeap.d.ts +1 -1
  388. package/src/core/collection/heap/IndexedFloatMaxHeap.d.ts.map +1 -1
  389. package/src/core/collection/heap/IndexedFloatMaxHeap.js +261 -261
  390. package/src/core/collection/heap/IndexedFloatMinHeap.d.ts +1 -1
  391. package/src/core/collection/heap/IndexedFloatMinHeap.d.ts.map +1 -1
  392. package/src/core/collection/heap/IndexedFloatMinHeap.js +268 -268
  393. package/src/core/collection/heap/Uint32Heap.d.ts +6 -6
  394. package/src/core/collection/heap/Uint32Heap.d.ts.map +1 -1
  395. package/src/core/collection/heap/Uint32Heap.js +7 -7
  396. package/src/core/collection/heap/Uint32Heap4.d.ts +6 -6
  397. package/src/core/collection/heap/Uint32Heap4.d.ts.map +1 -1
  398. package/src/core/collection/heap/Uint32Heap4.js +490 -490
  399. package/src/core/collection/list/FilteredListProjection.d.ts +7 -7
  400. package/src/core/collection/list/FilteredListProjection.d.ts.map +1 -1
  401. package/src/core/collection/list/FilteredListProjection.js +12 -12
  402. package/src/core/collection/list/SortedListProjection.d.ts +2 -2
  403. package/src/core/collection/list/SortedListProjection.d.ts.map +1 -1
  404. package/src/core/collection/list/SortedListProjection.js +6 -6
  405. package/src/core/collection/table/RowFirstTable.d.ts +5 -5
  406. package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
  407. package/src/core/collection/table/RowFirstTable.js +6 -7
  408. package/src/core/collection/table/RowFirstTableSpec.d.ts +10 -2
  409. package/src/core/collection/table/RowFirstTableSpec.d.ts.map +1 -1
  410. package/src/core/collection/table/RowFirstTableSpec.js +10 -1
  411. package/src/core/function/FunctionCompiler.d.ts.map +1 -1
  412. package/src/core/function/FunctionCompiler.js +13 -15
  413. package/src/core/geom/3d/shape/BoxShape3D.d.ts.map +1 -1
  414. package/src/core/geom/3d/shape/BoxShape3D.js +171 -175
  415. package/src/core/geom/3d/shape/CapsuleShape3D.d.ts.map +1 -1
  416. package/src/core/geom/3d/shape/CapsuleShape3D.js +238 -242
  417. package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
  418. package/src/core/geom/3d/shape/ConvexHullShape3D.js +43 -44
  419. package/src/core/geom/3d/shape/CylinderShape3D.d.ts.map +1 -1
  420. package/src/core/geom/3d/shape/CylinderShape3D.js +220 -224
  421. package/src/core/geom/3d/shape/HeightMapShape3D.d.ts.map +1 -1
  422. package/src/core/geom/3d/shape/HeightMapShape3D.js +58 -61
  423. package/src/core/geom/3d/shape/MeshShape3D.d.ts.map +1 -1
  424. package/src/core/geom/3d/shape/MeshShape3D.js +76 -80
  425. package/src/core/geom/3d/shape/PosedShape3D.d.ts.map +1 -1
  426. package/src/core/geom/3d/shape/PosedShape3D.js +160 -159
  427. package/src/core/geom/3d/shape/SphereShape3D.d.ts.map +1 -1
  428. package/src/core/geom/3d/shape/SphereShape3D.js +143 -146
  429. package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
  430. package/src/core/geom/3d/shape/TransformedShape3D.js +20 -24
  431. package/src/core/geom/3d/shape/Triangle3D.d.ts.map +1 -1
  432. package/src/core/geom/3d/shape/Triangle3D.js +293 -297
  433. package/src/core/geom/3d/shape/UnionShape3D.d.ts.map +1 -1
  434. package/src/core/geom/3d/shape/UnionShape3D.js +15 -19
  435. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts +15 -15
  436. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts.map +1 -1
  437. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +21 -21
  438. package/src/core/geom/3d/topology/simplify/EdgeCollapseCandidate.d.ts.map +1 -1
  439. package/src/core/geom/3d/topology/simplify/EdgeCollapseCandidate.js +36 -36
  440. package/src/core/geom/packing/max-rect/MaxRectanglesPacker.d.ts +6 -6
  441. package/src/core/geom/packing/max-rect/MaxRectanglesPacker.d.ts.map +1 -1
  442. package/src/core/geom/packing/max-rect/MaxRectanglesPacker.js +8 -8
  443. package/src/core/graph/layout/Connection.d.ts +2 -2
  444. package/src/core/graph/layout/Connection.d.ts.map +1 -1
  445. package/src/core/graph/layout/Connection.js +6 -6
  446. package/src/core/graph/metis/native/MetisGraph.d.ts.map +1 -1
  447. package/src/core/graph/metis/native/MetisGraph.js +232 -231
  448. package/src/core/graph/metis/native/bisection/BisectionScratch.d.ts +3 -3
  449. package/src/core/graph/metis/native/bisection/BisectionScratch.d.ts.map +1 -1
  450. package/src/core/graph/metis/native/bisection/BisectionScratch.js +104 -103
  451. package/src/core/localization/Localization.d.ts.map +1 -1
  452. package/src/core/localization/Localization.js +35 -37
  453. package/src/core/model/BooleanVector3.d.ts +1 -1
  454. package/src/core/model/BooleanVector3.d.ts.map +1 -1
  455. package/src/core/model/BooleanVector3.js +2 -2
  456. package/src/core/model/ObservedValue.d.ts +2 -2
  457. package/src/core/model/ObservedValue.d.ts.map +1 -1
  458. package/src/core/model/ObservedValue.js +8 -6
  459. package/src/core/model/object/ImmutableObjectPool.d.ts +5 -5
  460. package/src/core/model/object/ImmutableObjectPool.d.ts.map +1 -1
  461. package/src/core/model/object/ImmutableObjectPool.js +6 -7
  462. package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.d.ts +5 -5
  463. package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.d.ts.map +1 -1
  464. package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.js +93 -96
  465. package/src/core/model/reactive/model/terminal/ReactiveReference.d.ts +4 -4
  466. package/src/core/model/reactive/model/terminal/ReactiveReference.d.ts.map +1 -1
  467. package/src/core/model/reactive/model/terminal/ReactiveReference.js +6 -6
  468. package/src/core/model/stat/LinearModifier.d.ts +10 -10
  469. package/src/core/model/stat/LinearModifier.d.ts.map +1 -1
  470. package/src/core/model/stat/LinearModifier.js +12 -12
  471. package/src/core/process/Future.d.ts +1 -1
  472. package/src/core/process/Future.d.ts.map +1 -1
  473. package/src/core/process/Future.js +6 -7
  474. package/src/core/process/action/AsynchronousActionSequence.d.ts +5 -5
  475. package/src/core/process/action/AsynchronousActionSequence.d.ts.map +1 -1
  476. package/src/core/process/action/AsynchronousActionSequence.js +9 -9
  477. package/src/core/process/executor/profile/ConcurrentExecutorProfiler.d.ts.map +1 -1
  478. package/src/core/process/executor/profile/ConcurrentExecutorProfiler.js +19 -20
  479. package/src/core/process/filter/MutableFilter.d.ts.map +1 -1
  480. package/src/core/process/filter/MutableFilter.js +1 -6
  481. package/src/core/process/task/RemainingTimeEstimator.d.ts +1 -1
  482. package/src/core/process/task/RemainingTimeEstimator.d.ts.map +1 -1
  483. package/src/core/process/task/RemainingTimeEstimator.js +2 -1
  484. package/src/core/process/undo/ActionProcessor.d.ts +36 -17
  485. package/src/core/process/undo/ActionProcessor.d.ts.map +1 -1
  486. package/src/core/process/undo/ActionProcessor.js +131 -136
  487. package/src/core/science/units/UnitMatrix.d.ts.map +1 -1
  488. package/src/core/science/units/UnitMatrix.js +249 -251
  489. package/src/engine/EngineHarness.d.ts +5 -5
  490. package/src/engine/EngineHarness.d.ts.map +1 -1
  491. package/src/engine/EngineHarness.js +6 -6
  492. package/src/engine/achievements/Achievement.d.ts.map +1 -1
  493. package/src/engine/achievements/Achievement.js +35 -35
  494. package/src/engine/achievements/AchievementManager.d.ts.map +1 -1
  495. package/src/engine/achievements/AchievementManager.js +33 -35
  496. package/src/engine/achievements/gateway/StorageAchievementGateway.d.ts +1 -1
  497. package/src/engine/achievements/gateway/StorageAchievementGateway.d.ts.map +1 -1
  498. package/src/engine/achievements/gateway/StorageAchievementGateway.js +2 -2
  499. package/src/engine/animation/EntityAnimation.d.ts +5 -5
  500. package/src/engine/animation/EntityAnimation.d.ts.map +1 -1
  501. package/src/engine/animation/EntityAnimation.js +6 -6
  502. package/src/engine/animation/curve/editor/CurveEditorView.d.ts +2 -2
  503. package/src/engine/animation/curve/editor/CurveEditorView.d.ts.map +1 -1
  504. package/src/engine/animation/curve/editor/CurveEditorView.js +3 -3
  505. package/src/engine/animation/curve/editor/DragHandler.d.ts +1 -1
  506. package/src/engine/animation/curve/editor/DragHandler.d.ts.map +1 -1
  507. package/src/engine/animation/curve/editor/DragHandler.js +2 -2
  508. package/src/engine/animation/curve/editor/OperationRouter.d.ts +1 -1
  509. package/src/engine/animation/curve/editor/OperationRouter.d.ts.map +1 -1
  510. package/src/engine/animation/curve/editor/OperationRouter.js +2 -2
  511. package/src/engine/animation/keyed2/AnimationTrack.d.ts +10 -10
  512. package/src/engine/animation/keyed2/AnimationTrack.d.ts.map +1 -1
  513. package/src/engine/animation/keyed2/AnimationTrack.js +27 -27
  514. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts +4 -4
  515. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts.map +1 -1
  516. package/src/engine/animation/keyed2/AnimationTrackPlayback.js +6 -9
  517. package/src/engine/asset/Asset.d.ts +10 -10
  518. package/src/engine/asset/Asset.d.ts.map +1 -1
  519. package/src/engine/asset/Asset.js +13 -14
  520. package/src/engine/asset/AssetRequest.d.ts +14 -14
  521. package/src/engine/asset/AssetRequest.d.ts.map +1 -1
  522. package/src/engine/asset/AssetRequest.js +18 -18
  523. package/src/engine/asset/PendingAsset.d.ts +5 -5
  524. package/src/engine/asset/PendingAsset.d.ts.map +1 -1
  525. package/src/engine/asset/PendingAsset.js +108 -108
  526. package/src/engine/asset/loaders/GLTFAssetLoader.d.ts +2 -2
  527. package/src/engine/asset/loaders/GLTFAssetLoader.d.ts.map +1 -1
  528. package/src/engine/asset/loaders/GLTFAssetLoader.js +16 -18
  529. package/src/engine/asset/loaders/JavascriptAssetLoader.d.ts.map +1 -1
  530. package/src/engine/asset/loaders/JavascriptAssetLoader.js +30 -31
  531. package/src/engine/asset/loaders/gltf/extensions/MSFT_texture_dds.d.ts.map +1 -1
  532. package/src/engine/asset/loaders/gltf/extensions/MSFT_texture_dds.js +2 -2
  533. package/src/engine/asset/loaders/material/StaticMaterialCache.d.ts.map +1 -1
  534. package/src/engine/asset/loaders/material/StaticMaterialCache.js +9 -12
  535. package/src/engine/control/StatefulController.d.ts +4 -4
  536. package/src/engine/control/StatefulController.d.ts.map +1 -1
  537. package/src/engine/control/StatefulController.js +6 -6
  538. package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -1
  539. package/src/engine/control/first-person/FirstPersonPlayerController.js +31 -33
  540. package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -1
  541. package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.js +2052 -2028
  542. package/src/engine/control/first-person/abilities/Ability.d.ts.map +1 -1
  543. package/src/engine/control/first-person/abilities/Ability.js +117 -119
  544. package/src/engine/control/first-person/abilities/AbilitySet.d.ts.map +1 -1
  545. package/src/engine/control/first-person/abilities/AbilitySet.js +183 -185
  546. package/src/engine/control/first-person/abilities/LedgeGrab.d.ts.map +1 -1
  547. package/src/engine/control/first-person/abilities/LedgeGrab.js +404 -405
  548. package/src/engine/control/first-person/abilities/Mantle.d.ts.map +1 -1
  549. package/src/engine/control/first-person/abilities/Mantle.js +24 -23
  550. package/src/engine/control/first-person/abilities/ScrambleUp.d.ts.map +1 -1
  551. package/src/engine/control/first-person/abilities/ScrambleUp.js +181 -182
  552. package/src/engine/control/first-person/abilities/Slide.d.ts.map +1 -1
  553. package/src/engine/control/first-person/abilities/Slide.js +164 -166
  554. package/src/engine/control/first-person/abilities/WallJump.d.ts.map +1 -1
  555. package/src/engine/control/first-person/abilities/WallJump.js +136 -139
  556. package/src/engine/control/first-person/abilities/WallRun.d.ts.map +1 -1
  557. package/src/engine/control/first-person/abilities/WallRun.js +7 -9
  558. package/src/engine/control/first-person/collision/KinematicMover.d.ts +7 -13
  559. package/src/engine/control/first-person/collision/KinematicMover.d.ts.map +1 -1
  560. package/src/engine/control/first-person/collision/KinematicMover.js +11 -10
  561. package/src/engine/control/first-person/composer/EyeOffsetStack.d.ts.map +1 -1
  562. package/src/engine/control/first-person/composer/EyeOffsetStack.js +58 -60
  563. package/src/engine/control/first-person/mastery/BreathRhythmEvaluator.d.ts +2 -2
  564. package/src/engine/control/first-person/mastery/BreathRhythmEvaluator.d.ts.map +1 -1
  565. package/src/engine/control/first-person/mastery/BreathRhythmEvaluator.js +133 -133
  566. package/src/engine/control/first-person/mastery/FootAsymmetryTurnEvaluator.d.ts.map +1 -1
  567. package/src/engine/control/first-person/mastery/FootAsymmetryTurnEvaluator.js +106 -109
  568. package/src/engine/control/first-person/mastery/MasteryEvaluator.d.ts.map +1 -1
  569. package/src/engine/control/first-person/mastery/MasteryEvaluator.js +43 -45
  570. package/src/engine/control/first-person/mastery/MasteryScore.d.ts +6 -6
  571. package/src/engine/control/first-person/mastery/MasteryScore.d.ts.map +1 -1
  572. package/src/engine/control/first-person/mastery/MasteryScore.js +100 -100
  573. package/src/engine/control/first-person/mastery/MasterySet.d.ts.map +1 -1
  574. package/src/engine/control/first-person/mastery/MasterySet.js +84 -86
  575. package/src/engine/control/first-person/mastery/SlideInitiationTimingEvaluator.d.ts.map +1 -1
  576. package/src/engine/control/first-person/mastery/SlideInitiationTimingEvaluator.js +80 -83
  577. package/src/engine/control/first-person/mastery/StrideTimingJumpEvaluator.d.ts.map +1 -1
  578. package/src/engine/control/first-person/mastery/StrideTimingJumpEvaluator.js +106 -109
  579. package/src/engine/control/first-person/sensors/FirstPersonSensors.d.ts.map +1 -1
  580. package/src/engine/control/first-person/sensors/FirstPersonSensors.js +45 -40
  581. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts.map +1 -1
  582. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js +35 -39
  583. package/src/engine/development/performance/monitor/PeriodicConsolePrinter.d.ts +1 -1
  584. package/src/engine/development/performance/monitor/PeriodicConsolePrinter.d.ts.map +1 -1
  585. package/src/engine/development/performance/monitor/PeriodicConsolePrinter.js +2 -2
  586. package/src/engine/ecs/ASYNC_SYSTEMS_PROPOSAL.md +531 -0
  587. package/src/engine/ecs/EntityManager.d.ts +16 -0
  588. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  589. package/src/engine/ecs/EntityManager.js +81 -0
  590. package/src/engine/ecs/animation/Animation.d.ts.map +1 -1
  591. package/src/engine/ecs/animation/Animation.js +8 -8
  592. package/src/engine/ecs/async/SystemWorkerHost.d.ts +98 -0
  593. package/src/engine/ecs/async/SystemWorkerHost.d.ts.map +1 -0
  594. package/src/engine/ecs/async/SystemWorkerHost.js +329 -0
  595. package/src/engine/ecs/async/SystemWorkerLoopback.d.ts +80 -0
  596. package/src/engine/ecs/async/SystemWorkerLoopback.d.ts.map +1 -0
  597. package/src/engine/ecs/async/SystemWorkerLoopback.js +143 -0
  598. package/src/engine/ecs/async/WORKER_SYSTEM_PLAN.md +246 -0
  599. package/src/engine/ecs/async/WorkerSystem.d.ts +173 -0
  600. package/src/engine/ecs/async/WorkerSystem.d.ts.map +1 -0
  601. package/src/engine/ecs/async/WorkerSystem.js +702 -0
  602. package/src/engine/ecs/async/WorkerSystemProtocol.d.ts +62 -0
  603. package/src/engine/ecs/async/WorkerSystemProtocol.d.ts.map +1 -0
  604. package/src/engine/ecs/async/WorkerSystemProtocol.js +150 -0
  605. package/src/engine/ecs/binding/EntityProxyScope.d.ts.map +1 -1
  606. package/src/engine/ecs/binding/EntityProxyScope.js +11 -12
  607. package/src/engine/ecs/components/PropertySet.d.ts.map +1 -1
  608. package/src/engine/ecs/components/PropertySet.js +2 -2
  609. package/src/engine/ecs/components/TagSerializationUpgrader_0_1.d.ts.map +1 -1
  610. package/src/engine/ecs/components/TagSerializationUpgrader_0_1.js +2 -6
  611. package/src/engine/ecs/components/Timer.d.ts +7 -7
  612. package/src/engine/ecs/components/Timer.d.ts.map +1 -1
  613. package/src/engine/ecs/components/Timer.js +18 -18
  614. package/src/engine/ecs/dynamic_actions/DataScope.d.ts.map +1 -1
  615. package/src/engine/ecs/dynamic_actions/DataScope.js +6 -8
  616. package/src/engine/ecs/evaluation/PointFitnessBinary.d.ts.map +1 -1
  617. package/src/engine/ecs/evaluation/PointFitnessBinary.js +10 -13
  618. package/src/engine/ecs/evaluation/PointFitnessConstant.d.ts.map +1 -1
  619. package/src/engine/ecs/evaluation/PointFitnessConstant.js +5 -9
  620. package/src/engine/ecs/evaluation/world/ReadTerrainLayerWeightPointFitness.d.ts.map +1 -1
  621. package/src/engine/ecs/evaluation/world/ReadTerrainLayerWeightPointFitness.js +5 -9
  622. package/src/engine/ecs/fow/FogOfWarRevealerSystem.d.ts.map +1 -1
  623. package/src/engine/ecs/fow/FogOfWarRevealerSystem.js +6 -8
  624. package/src/engine/ecs/fow/FogOfWarSystem.d.ts +2 -2
  625. package/src/engine/ecs/fow/FogOfWarSystem.d.ts.map +1 -1
  626. package/src/engine/ecs/fow/FogOfWarSystem.js +5 -6
  627. package/src/engine/ecs/fow/FogOfWarVisibilityPredicate.d.ts.map +1 -1
  628. package/src/engine/ecs/fow/FogOfWarVisibilityPredicate.js +11 -14
  629. package/src/engine/ecs/fow/serialization/FogOfWarSerializationUpdater_0_1.d.ts.map +1 -1
  630. package/src/engine/ecs/fow/serialization/FogOfWarSerializationUpdater_0_1.js +2 -6
  631. package/src/engine/ecs/gui/position/ViewportPositionSystem.d.ts.map +1 -1
  632. package/src/engine/ecs/gui/position/ViewportPositionSystem.js +5 -6
  633. package/src/engine/ecs/gui/view/LocalizedLabelViewEntity.d.ts.map +1 -1
  634. package/src/engine/ecs/gui/view/LocalizedLabelViewEntity.js +2 -2
  635. package/src/engine/ecs/parent/ChildEntities.d.ts.map +1 -1
  636. package/src/engine/ecs/parent/ChildEntities.js +6 -8
  637. package/src/engine/ecs/parent/FaceEditor.d.ts.map +1 -1
  638. package/src/engine/ecs/parent/FaceEditor.js +42 -41
  639. package/src/engine/ecs/parent/ParentEntity.d.ts.map +1 -1
  640. package/src/engine/ecs/parent/ParentEntity.js +4 -9
  641. package/src/engine/ecs/parent/ParentEntitySystem.d.ts.map +1 -1
  642. package/src/engine/ecs/parent/ParentEntitySystem.js +2 -2
  643. package/src/engine/ecs/sockets/AttachmentSocket.d.ts.map +1 -1
  644. package/src/engine/ecs/sockets/AttachmentSocket.js +12 -14
  645. package/src/engine/ecs/sockets/AttachmentSockets.d.ts.map +1 -1
  646. package/src/engine/ecs/sockets/AttachmentSockets.js +5 -7
  647. package/src/engine/ecs/sockets/BoneAttachmentSocket.d.ts.map +1 -1
  648. package/src/engine/ecs/sockets/BoneAttachmentSocket.js +1 -5
  649. package/src/engine/ecs/speaker/VoiceSystem.d.ts +5 -5
  650. package/src/engine/ecs/speaker/VoiceSystem.d.ts.map +1 -1
  651. package/src/engine/ecs/speaker/VoiceSystem.js +42 -45
  652. package/src/engine/ecs/storage/binary/object/BinaryObjectSerializationAdapter.d.ts.map +1 -1
  653. package/src/engine/ecs/storage/binary/object/BinaryObjectSerializationAdapter.js +17 -19
  654. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts +11 -0
  655. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -0
  656. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +260 -0
  657. package/src/engine/ecs/system/AbstractContextSystem.d.ts +8 -8
  658. package/src/engine/ecs/system/AbstractContextSystem.d.ts.map +1 -1
  659. package/src/engine/ecs/system/AbstractContextSystem.js +14 -14
  660. package/src/engine/ecs/systems/AnimationSystem.d.ts.map +1 -1
  661. package/src/engine/ecs/systems/AnimationSystem.js +2 -2
  662. package/src/engine/ecs/systems/ScriptSystem.d.ts.map +1 -1
  663. package/src/engine/ecs/systems/ScriptSystem.js +3 -6
  664. package/src/engine/ecs/terrain/ecs/Terrain.d.ts +27 -27
  665. package/src/engine/ecs/terrain/ecs/Terrain.d.ts.map +1 -1
  666. package/src/engine/ecs/terrain/ecs/Terrain.js +35 -38
  667. package/src/engine/ecs/terrain/ecs/layers/TerrainLayers.d.ts.map +1 -1
  668. package/src/engine/ecs/terrain/ecs/layers/TerrainLayers.js +11 -13
  669. package/src/engine/ecs/terrain/ecs/makeTerrainWorkerProxy.d.ts.map +1 -1
  670. package/src/engine/ecs/terrain/ecs/makeTerrainWorkerProxy.js +4 -2
  671. package/src/engine/ecs/terrain/ecs/splat/SplatMapping.d.ts +5 -5
  672. package/src/engine/ecs/terrain/ecs/splat/SplatMapping.d.ts.map +1 -1
  673. package/src/engine/ecs/terrain/ecs/splat/SplatMapping.js +6 -7
  674. package/src/engine/ecs/terrain/overlay/TerrainOverlay.d.ts +9 -9
  675. package/src/engine/ecs/terrain/overlay/TerrainOverlay.d.ts.map +1 -1
  676. package/src/engine/ecs/terrain/overlay/TerrainOverlay.js +13 -12
  677. package/src/engine/ecs/terrain/serialization/TerrainSerializationUpgrader_0_1.d.ts.map +1 -1
  678. package/src/engine/ecs/terrain/serialization/TerrainSerializationUpgrader_0_1.js +2 -6
  679. package/src/engine/ecs/terrain/serialization/TerrainSerializationUpgrader_1_2.d.ts.map +1 -1
  680. package/src/engine/ecs/terrain/serialization/TerrainSerializationUpgrader_1_2.js +2 -6
  681. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +44 -3
  682. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
  683. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +81 -17
  684. package/src/engine/ecs/terrain/util/obtainTerrain.d.ts.map +1 -1
  685. package/src/engine/ecs/terrain/util/obtainTerrain.js +2 -0
  686. package/src/engine/ecs/tooltip/TooltipComponentSystem.d.ts +20 -20
  687. package/src/engine/ecs/tooltip/TooltipComponentSystem.d.ts.map +1 -1
  688. package/src/engine/ecs/tooltip/TooltipComponentSystem.js +36 -38
  689. package/src/engine/ecs/transform/TransformSerializationUpgrader_0_1.d.ts.map +1 -1
  690. package/src/engine/ecs/transform/TransformSerializationUpgrader_0_1.js +2 -6
  691. package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.d.ts.map +1 -1
  692. package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.js +34 -41
  693. package/src/engine/graphics/camera/CameraShake.d.ts.map +1 -1
  694. package/src/engine/graphics/camera/CameraShake.js +12 -16
  695. package/src/engine/graphics/camera/CameraShakeBehavior.d.ts +2 -2
  696. package/src/engine/graphics/camera/CameraShakeBehavior.d.ts.map +1 -1
  697. package/src/engine/graphics/camera/CameraShakeBehavior.js +3 -4
  698. package/src/engine/graphics/camera/CameraShakeTraumaBehavior.d.ts +2 -2
  699. package/src/engine/graphics/camera/CameraShakeTraumaBehavior.d.ts.map +1 -1
  700. package/src/engine/graphics/camera/CameraShakeTraumaBehavior.js +3 -5
  701. package/src/engine/graphics/composit/CompositLayer.d.ts.map +1 -1
  702. package/src/engine/graphics/composit/CompositLayer.js +6 -6
  703. package/src/engine/graphics/composit/LayerCompositer.d.ts.map +1 -1
  704. package/src/engine/graphics/composit/LayerCompositer.js +17 -19
  705. package/src/engine/graphics/debug/VisualSymbolLine.d.ts.map +1 -1
  706. package/src/engine/graphics/debug/VisualSymbolLine.js +11 -13
  707. package/src/engine/graphics/ecs/animation/AnimationControllerSystem.d.ts.map +1 -1
  708. package/src/engine/graphics/ecs/animation/AnimationControllerSystem.js +2 -5
  709. package/src/engine/graphics/ecs/animation/AnimationRule.d.ts +2 -2
  710. package/src/engine/graphics/ecs/animation/AnimationRule.d.ts.map +1 -1
  711. package/src/engine/graphics/ecs/animation/AnimationRule.js +3 -2
  712. package/src/engine/graphics/ecs/animation/animator/AnimationClip.d.ts.map +1 -1
  713. package/src/engine/graphics/ecs/animation/animator/AnimationClip.js +20 -22
  714. package/src/engine/graphics/ecs/animation/animator/AnimationClipDefinition.d.ts.map +1 -1
  715. package/src/engine/graphics/ecs/animation/animator/AnimationClipDefinition.js +23 -25
  716. package/src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.d.ts +4 -4
  717. package/src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.d.ts.map +1 -1
  718. package/src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.js +32 -33
  719. package/src/engine/graphics/ecs/animation/animator/AnimationNotification.d.ts.map +1 -1
  720. package/src/engine/graphics/ecs/animation/animator/AnimationNotification.js +10 -12
  721. package/src/engine/graphics/ecs/animation/animator/AnimationNotificationDefinition.d.ts.map +1 -1
  722. package/src/engine/graphics/ecs/animation/animator/AnimationNotificationDefinition.js +10 -12
  723. package/src/engine/graphics/ecs/animation/animator/blending/BlendSpace.d.ts +1 -1
  724. package/src/engine/graphics/ecs/animation/animator/blending/BlendSpace.d.ts.map +1 -1
  725. package/src/engine/graphics/ecs/animation/animator/blending/BlendSpace.js +10 -12
  726. package/src/engine/graphics/ecs/animation/animator/blending/BlendSpaceDefinition.d.ts.map +1 -1
  727. package/src/engine/graphics/ecs/animation/animator/blending/BlendSpaceDefinition.js +5 -7
  728. package/src/engine/graphics/ecs/animation/animator/blending/BlendSpacePoint.d.ts.map +1 -1
  729. package/src/engine/graphics/ecs/animation/animator/blending/BlendSpacePoint.js +10 -12
  730. package/src/engine/graphics/ecs/animation/animator/blending/BlendState.d.ts.map +1 -1
  731. package/src/engine/graphics/ecs/animation/animator/blending/BlendState.js +5 -7
  732. package/src/engine/graphics/ecs/animation/animator/blending/BlendStateDatabase.d.ts.map +1 -1
  733. package/src/engine/graphics/ecs/animation/animator/blending/BlendStateDatabase.js +18 -21
  734. package/src/engine/graphics/ecs/animation/animator/graph/AnimationGraph.d.ts.map +1 -1
  735. package/src/engine/graphics/ecs/animation/animator/graph/AnimationGraph.js +75 -77
  736. package/src/engine/graphics/ecs/animation/animator/graph/AnimationState.d.ts.map +1 -1
  737. package/src/engine/graphics/ecs/animation/animator/graph/AnimationState.js +35 -38
  738. package/src/engine/graphics/ecs/animation/animator/graph/AnimationTransition.d.ts.map +1 -1
  739. package/src/engine/graphics/ecs/animation/animator/graph/AnimationTransition.js +30 -32
  740. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationStateDefinition.d.ts.map +1 -1
  741. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationStateDefinition.js +31 -33
  742. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.d.ts.map +1 -1
  743. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.js +20 -23
  744. package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
  745. package/src/engine/graphics/ecs/camera/Camera.js +45 -47
  746. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts +1 -1
  747. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
  748. package/src/engine/graphics/ecs/camera/CameraSystem.js +8 -9
  749. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts.map +1 -1
  750. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.js +37 -41
  751. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts.map +1 -1
  752. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.js +8 -10
  753. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSerializationUpgrader_0_1.d.ts.map +1 -1
  754. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSerializationUpgrader_0_1.js +2 -6
  755. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts.map +1 -1
  756. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.js +5 -10
  757. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.d.ts.map +1 -1
  758. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.js +20 -25
  759. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.d.ts.map +1 -1
  760. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -2
  761. package/src/engine/graphics/ecs/highlight/HighlightSerializationUpgrader_0_1.d.ts.map +1 -1
  762. package/src/engine/graphics/ecs/highlight/HighlightSerializationUpgrader_0_1.js +2 -6
  763. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.d.ts.map +1 -1
  764. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.js +23 -25
  765. package/src/engine/graphics/ecs/highlight/renderer/HighlightRenderElement.d.ts.map +1 -1
  766. package/src/engine/graphics/ecs/highlight/renderer/HighlightRenderElement.js +13 -16
  767. package/src/engine/graphics/ecs/highlight/renderer/HighlightRenderGroup.d.ts.map +1 -1
  768. package/src/engine/graphics/ecs/highlight/renderer/HighlightRenderGroup.js +5 -7
  769. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.d.ts +12 -12
  770. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.d.ts.map +1 -1
  771. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.js +54 -57
  772. package/src/engine/graphics/ecs/highlight/system/HighlightSystemBase.js +205 -205
  773. package/src/engine/graphics/ecs/light/Light.d.ts.map +1 -1
  774. package/src/engine/graphics/ecs/light/Light.js +59 -65
  775. package/src/engine/graphics/ecs/light/LightSystem.d.ts +16 -16
  776. package/src/engine/graphics/ecs/light/LightSystem.d.ts.map +1 -1
  777. package/src/engine/graphics/ecs/light/LightSystem.js +23 -25
  778. package/src/engine/graphics/ecs/light/binding/LightBinding.d.ts.map +1 -1
  779. package/src/engine/graphics/ecs/light/binding/LightBinding.js +13 -14
  780. package/src/engine/graphics/ecs/light/binding/fp/FPLightBinding.d.ts.map +1 -1
  781. package/src/engine/graphics/ecs/light/binding/fp/FPLightBinding.js +11 -15
  782. package/src/engine/graphics/ecs/light/shadow/ShadowMap.d.ts.map +1 -1
  783. package/src/engine/graphics/ecs/light/shadow/ShadowMap.js +5 -9
  784. package/src/engine/graphics/ecs/light/three/ThreeLightCache.d.ts.map +1 -1
  785. package/src/engine/graphics/ecs/light/three/ThreeLightCache.js +20 -22
  786. package/src/engine/graphics/ecs/mesh/Mesh.d.ts.map +1 -1
  787. package/src/engine/graphics/ecs/mesh/Mesh.js +35 -37
  788. package/src/engine/graphics/ecs/mesh/MeshSystem.d.ts +15 -15
  789. package/src/engine/graphics/ecs/mesh/MeshSystem.d.ts.map +1 -1
  790. package/src/engine/graphics/ecs/mesh/MeshSystem.js +21 -22
  791. package/src/engine/graphics/ecs/mesh/skeleton/BoneMapping.d.ts.map +1 -1
  792. package/src/engine/graphics/ecs/mesh/skeleton/BoneMapping.js +1 -3
  793. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.d.ts.map +1 -1
  794. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.js +51 -52
  795. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts +6 -6
  796. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
  797. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +37 -37
  798. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationControllerSystem.d.ts +1 -1
  799. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationControllerSystem.d.ts.map +1 -1
  800. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationControllerSystem.js +9 -11
  801. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshHighlightSystem.d.ts.map +1 -1
  802. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshHighlightSystem.js +1 -5
  803. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.d.ts +10 -10
  804. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.d.ts.map +1 -1
  805. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.js +22 -22
  806. package/src/engine/graphics/ecs/mesh-v2/render/SGThreeObjectCache.d.ts.map +1 -1
  807. package/src/engine/graphics/ecs/mesh-v2/render/SGThreeObjectCache.js +6 -8
  808. package/src/engine/graphics/ecs/mesh-v2/render/ShadedGeometryRendererContext.d.ts.map +1 -1
  809. package/src/engine/graphics/ecs/mesh-v2/render/ShadedGeometryRendererContext.js +8 -10
  810. package/src/engine/graphics/ecs/mesh-v2/render/adapters/AbstractRenderAdapter.d.ts.map +1 -1
  811. package/src/engine/graphics/ecs/mesh-v2/render/adapters/AbstractRenderAdapter.js +12 -15
  812. package/src/engine/graphics/ecs/mesh-v2/render/adapters/GenericRendererAdapter.d.ts.map +1 -1
  813. package/src/engine/graphics/ecs/mesh-v2/render/adapters/GenericRendererAdapter.js +6 -10
  814. package/src/engine/graphics/ecs/mesh-v2/render/optimization/RuntimeDrawMethodOptimizer.d.ts.map +1 -1
  815. package/src/engine/graphics/ecs/mesh-v2/render/optimization/RuntimeDrawMethodOptimizer.js +12 -15
  816. package/src/engine/graphics/ecs/path/PathDisplay.d.ts.map +1 -1
  817. package/src/engine/graphics/ecs/path/PathDisplay.js +5 -7
  818. package/src/engine/graphics/ecs/path/PathDisplaySpec.d.ts.map +1 -1
  819. package/src/engine/graphics/ecs/path/PathDisplaySpec.js +10 -12
  820. package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts +6 -6
  821. package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts.map +1 -1
  822. package/src/engine/graphics/ecs/path/PathDisplaySystem.js +12 -17
  823. package/src/engine/graphics/ecs/path/entity/EntityPath.d.ts.map +1 -1
  824. package/src/engine/graphics/ecs/path/entity/EntityPath.js +15 -17
  825. package/src/engine/graphics/ecs/path/entity/EntityPathMarker.d.ts.map +1 -1
  826. package/src/engine/graphics/ecs/path/entity/EntityPathMarker.js +15 -17
  827. package/src/engine/graphics/ecs/path/entity/EntityPathMarkerDefinition.d.ts.map +1 -1
  828. package/src/engine/graphics/ecs/path/entity/EntityPathMarkerDefinition.js +15 -17
  829. package/src/engine/graphics/ecs/path/entity/EntityPathStyle.d.ts.map +1 -1
  830. package/src/engine/graphics/ecs/path/entity/EntityPathStyle.js +20 -23
  831. package/src/engine/graphics/ecs/path/highlight/PathDisplayHighlightSystem.d.ts.map +1 -1
  832. package/src/engine/graphics/ecs/path/highlight/PathDisplayHighlightSystem.js +1 -5
  833. package/src/engine/graphics/ecs/path/ribbon/RibbonPathBuilder.d.ts.map +1 -1
  834. package/src/engine/graphics/ecs/path/ribbon/RibbonPathBuilder.js +15 -17
  835. package/src/engine/graphics/ecs/path/ribbon/RibbonPathStyle.d.ts.map +1 -1
  836. package/src/engine/graphics/ecs/path/ribbon/RibbonPathStyle.js +15 -17
  837. package/src/engine/graphics/ecs/path/tube/MatcapMaterialDefinition.d.ts.map +1 -1
  838. package/src/engine/graphics/ecs/path/tube/MatcapMaterialDefinition.js +5 -7
  839. package/src/engine/graphics/ecs/path/tube/StandardMaterialDefinition.d.ts.map +1 -1
  840. package/src/engine/graphics/ecs/path/tube/StandardMaterialDefinition.js +2 -4
  841. package/src/engine/graphics/ecs/path/tube/TubePathStyle.d.ts.map +1 -1
  842. package/src/engine/graphics/ecs/path/tube/TubePathStyle.js +84 -86
  843. package/src/engine/graphics/ecs/path/tube/build/StreamGeometryBuilder.d.ts.map +1 -1
  844. package/src/engine/graphics/ecs/path/tube/build/StreamGeometryBuilder.js +37 -36
  845. package/src/engine/graphics/ecs/path/tube/build/TubePathBuilder.d.ts.map +1 -1
  846. package/src/engine/graphics/ecs/path/tube/build/TubePathBuilder.js +23 -25
  847. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +1 -1
  848. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +2 -3
  849. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +5 -5
  850. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
  851. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +6 -9
  852. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +4 -4
  853. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts.map +1 -1
  854. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.js +5 -5
  855. package/src/engine/graphics/ecs/water/WaterSerializationUpgrader_0_1.d.ts.map +1 -1
  856. package/src/engine/graphics/ecs/water/WaterSerializationUpgrader_0_1.js +2 -6
  857. package/src/engine/graphics/ecs/water/WaterSystem.d.ts +1 -1
  858. package/src/engine/graphics/ecs/water/WaterSystem.d.ts.map +1 -1
  859. package/src/engine/graphics/ecs/water/WaterSystem.js +13 -15
  860. package/src/engine/graphics/geometry/MikkT/MikkTSpace.d.ts.map +1 -1
  861. package/src/engine/graphics/geometry/MikkT/MikkTSpace.js +97 -95
  862. package/src/engine/graphics/geometry/MikkT/SSubGroup.d.ts.map +1 -1
  863. package/src/engine/graphics/geometry/MikkT/SSubGroup.js +10 -12
  864. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts.map +1 -1
  865. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +103 -110
  866. package/src/engine/graphics/geometry/optimization/geometry_optimize_uv_tension.d.ts +18 -3
  867. package/src/engine/graphics/geometry/optimization/geometry_optimize_uv_tension.d.ts.map +1 -1
  868. package/src/engine/graphics/geometry/optimization/geometry_optimize_uv_tension.js +135 -85
  869. package/src/engine/graphics/geometry/optimization/merge/merge_geometry_hierarchy.d.ts.map +1 -1
  870. package/src/engine/graphics/geometry/optimization/merge/merge_geometry_hierarchy.js +3 -5
  871. package/src/engine/graphics/geometry/ribbon/Quad.d.ts +2 -2
  872. package/src/engine/graphics/geometry/ribbon/Quad.d.ts.map +1 -1
  873. package/src/engine/graphics/geometry/ribbon/Quad.js +17 -17
  874. package/src/engine/graphics/material/manager/ManagedMaterial.d.ts +6 -6
  875. package/src/engine/graphics/material/manager/ManagedMaterial.d.ts.map +1 -1
  876. package/src/engine/graphics/material/manager/ManagedMaterial.js +20 -20
  877. package/src/engine/graphics/material/optimization/MaterialDescriptor.d.ts.map +1 -1
  878. package/src/engine/graphics/material/optimization/MaterialDescriptor.js +11 -14
  879. package/src/engine/graphics/material/optimization/MaterialOptimizationContext.d.ts.map +1 -1
  880. package/src/engine/graphics/material/optimization/MaterialOptimizationContext.js +20 -23
  881. package/src/engine/graphics/material/optimization/UvContext.d.ts.map +1 -1
  882. package/src/engine/graphics/material/optimization/UvContext.js +10 -12
  883. package/src/engine/graphics/particles/node-based/editor/ParticleSpecificationEditorView.d.ts.map +1 -1
  884. package/src/engine/graphics/particles/node-based/editor/ParticleSpecificationEditorView.js +23 -23
  885. package/src/engine/graphics/particles/node-based/rendering/AbstractParticleRenderer.d.ts.map +1 -1
  886. package/src/engine/graphics/particles/node-based/rendering/AbstractParticleRenderer.js +5 -7
  887. package/src/engine/graphics/particles/node-based/rendering/billboard/BillboardParticleRenderer.d.ts +11 -11
  888. package/src/engine/graphics/particles/node-based/rendering/billboard/BillboardParticleRenderer.d.ts.map +1 -1
  889. package/src/engine/graphics/particles/node-based/rendering/billboard/BillboardParticleRenderer.js +21 -23
  890. package/src/engine/graphics/particles/node-based/simulation/EmitterAttributeData.d.ts.map +1 -1
  891. package/src/engine/graphics/particles/node-based/simulation/EmitterAttributeData.js +17 -19
  892. package/src/engine/graphics/particles/node-based/simulation/GLDataBuffer.d.ts.map +1 -1
  893. package/src/engine/graphics/particles/node-based/simulation/GLDataBuffer.js +25 -27
  894. package/src/engine/graphics/particles/node-based/simulation/GLSLSimulationShader.d.ts.map +1 -1
  895. package/src/engine/graphics/particles/node-based/simulation/GLSLSimulationShader.js +12 -16
  896. package/src/engine/graphics/particles/node-based/simulation/TransformFeedback.d.ts.map +1 -1
  897. package/src/engine/graphics/particles/node-based/simulation/TransformFeedback.js +64 -67
  898. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts +3 -0
  899. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts.map +1 -1
  900. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.js +36 -39
  901. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts.map +1 -1
  902. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.js +2 -6
  903. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts.map +1 -1
  904. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.js +5 -7
  905. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +10 -10
  906. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +1 -1
  907. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +12 -12
  908. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts.map +1 -1
  909. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.js +35 -37
  910. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts.map +1 -1
  911. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js +1 -5
  912. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts.map +1 -1
  913. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js +11 -12
  914. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts.map +1 -1
  915. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.js +199 -201
  916. package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.d.ts +11 -11
  917. package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.d.ts.map +1 -1
  918. package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.js +13 -13
  919. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts +6 -6
  920. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
  921. package/src/engine/graphics/particles/particular/group/ParticleGroup.js +33 -34
  922. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts.map +1 -1
  923. package/src/engine/graphics/particles/particular/group/ParticleSpecification.js +2 -8
  924. package/src/engine/graphics/render/Lines.d.ts.map +1 -1
  925. package/src/engine/graphics/render/Lines.js +2 -2
  926. package/src/engine/graphics/render/buffer/FrameBufferManager.d.ts.map +1 -1
  927. package/src/engine/graphics/render/buffer/FrameBufferManager.js +20 -22
  928. package/src/engine/graphics/render/buffer/simple-fx/DepthLimitedBlur.d.ts +2 -2
  929. package/src/engine/graphics/render/buffer/simple-fx/DepthLimitedBlur.d.ts.map +1 -1
  930. package/src/engine/graphics/render/buffer/simple-fx/DepthLimitedBlur.js +16 -19
  931. package/src/engine/graphics/render/buffer/simple-fx/SimplePostProcessEffect.d.ts.map +1 -1
  932. package/src/engine/graphics/render/buffer/simple-fx/SimplePostProcessEffect.js +5 -8
  933. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts +2 -2
  934. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts.map +1 -1
  935. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js +37 -38
  936. package/src/engine/graphics/render/buffer/slot/ProgramSlotValue.d.ts +5 -5
  937. package/src/engine/graphics/render/buffer/slot/ProgramSlotValue.d.ts.map +1 -1
  938. package/src/engine/graphics/render/buffer/slot/ProgramSlotValue.js +8 -6
  939. package/src/engine/graphics/render/buffer/slot/ProgramValueSlotDefinition.d.ts +5 -5
  940. package/src/engine/graphics/render/buffer/slot/ProgramValueSlotDefinition.d.ts.map +1 -1
  941. package/src/engine/graphics/render/buffer/slot/ProgramValueSlotDefinition.js +6 -6
  942. package/src/engine/graphics/render/buffer/slot/parameter/ProgramValueSlotParameterSet.d.ts.map +1 -1
  943. package/src/engine/graphics/render/buffer/slot/parameter/ProgramValueSlotParameterSet.js +11 -13
  944. package/src/engine/graphics/render/forward_plus/LightManager.d.ts +6 -6
  945. package/src/engine/graphics/render/forward_plus/LightManager.d.ts.map +1 -1
  946. package/src/engine/graphics/render/forward_plus/LightManager.js +15 -18
  947. package/src/engine/graphics/render/forward_plus/LightRenderMetadata.d.ts +5 -5
  948. package/src/engine/graphics/render/forward_plus/LightRenderMetadata.d.ts.map +1 -1
  949. package/src/engine/graphics/render/forward_plus/LightRenderMetadata.js +7 -8
  950. package/src/engine/graphics/render/forward_plus/model/Decal.d.ts +1 -1
  951. package/src/engine/graphics/render/forward_plus/model/Decal.d.ts.map +1 -1
  952. package/src/engine/graphics/render/forward_plus/model/Decal.js +22 -22
  953. package/src/engine/graphics/render/gizmo/GizmoShapeRenderingInterface.d.ts.map +1 -1
  954. package/src/engine/graphics/render/gizmo/GizmoShapeRenderingInterface.js +8 -8
  955. package/src/engine/graphics/render/layers/RenderLayerManager.d.ts.map +1 -1
  956. package/src/engine/graphics/render/layers/RenderLayerManager.js +10 -12
  957. package/src/engine/graphics/render/layers/RenderLayerManagerState.d.ts.map +1 -1
  958. package/src/engine/graphics/render/layers/RenderLayerManagerState.js +5 -9
  959. package/src/engine/graphics/render/layers/RenderLayerState.d.ts.map +1 -1
  960. package/src/engine/graphics/render/layers/RenderLayerState.js +5 -7
  961. package/src/engine/graphics/render/utils/ThreeBypassRenderer.d.ts.map +1 -1
  962. package/src/engine/graphics/render/utils/ThreeBypassRenderer.js +6 -9
  963. package/src/engine/graphics/render/view/CameraView.d.ts.map +1 -1
  964. package/src/engine/graphics/render/view/CameraView.js +56 -59
  965. package/src/engine/graphics/render/view/CameraViewManager.d.ts.map +1 -1
  966. package/src/engine/graphics/render/view/CameraViewManager.js +18 -20
  967. package/src/engine/graphics/render/visibility/IncrementalDeltaSet.d.ts +6 -6
  968. package/src/engine/graphics/render/visibility/IncrementalDeltaSet.d.ts.map +1 -1
  969. package/src/engine/graphics/render/visibility/IncrementalDeltaSet.js +40 -39
  970. package/src/engine/graphics/render/visibility/VisibilityComputer.d.ts.map +1 -1
  971. package/src/engine/graphics/render/visibility/VisibilityComputer.js +19 -22
  972. package/src/engine/graphics/render/visibility/VisibilityFilter.d.ts +5 -5
  973. package/src/engine/graphics/render/visibility/VisibilityFilter.d.ts.map +1 -1
  974. package/src/engine/graphics/render/visibility/VisibilityFilter.js +6 -6
  975. package/src/engine/graphics/render/visibility/hiz/buffer/HierarchicalZBuffer.d.ts.map +1 -1
  976. package/src/engine/graphics/render/visibility/hiz/buffer/HierarchicalZBuffer.js +40 -43
  977. package/src/engine/graphics/render/visibility/hiz/query/BatchOcclusionQuery.d.ts +1 -1
  978. package/src/engine/graphics/render/visibility/hiz/query/BatchOcclusionQuery.d.ts.map +1 -1
  979. package/src/engine/graphics/render/visibility/hiz/query/BatchOcclusionQuery.js +2 -2
  980. package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.d.ts.map +1 -1
  981. package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.js +7 -9
  982. package/src/engine/graphics/sh3/path_tracer/BufferedGeometryBVH.d.ts.map +1 -1
  983. package/src/engine/graphics/sh3/path_tracer/BufferedGeometryBVH.js +24 -28
  984. package/src/engine/graphics/shadows/ShadowMapRenderer.d.ts.map +1 -1
  985. package/src/engine/graphics/shadows/ShadowMapRenderer.js +11 -15
  986. package/src/engine/graphics/texture/AttributeDataTexture.d.ts +11 -11
  987. package/src/engine/graphics/texture/AttributeDataTexture.d.ts.map +1 -1
  988. package/src/engine/graphics/texture/AttributeDataTexture.js +14 -14
  989. package/src/engine/graphics/texture/TextureBackedMemoryRegion.d.ts +6 -6
  990. package/src/engine/graphics/texture/TextureBackedMemoryRegion.d.ts.map +1 -1
  991. package/src/engine/graphics/texture/TextureBackedMemoryRegion.js +33 -32
  992. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.d.ts.map +1 -1
  993. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +12 -12
  994. package/src/engine/graphics/texture/atlas/CachingTextureAtlas.d.ts.map +1 -1
  995. package/src/engine/graphics/texture/atlas/CachingTextureAtlas.js +17 -20
  996. package/src/engine/graphics/texture/atlas/ReferencedTextureAtlas.d.ts +1 -1
  997. package/src/engine/graphics/texture/atlas/ReferencedTextureAtlas.d.ts.map +1 -1
  998. package/src/engine/graphics/texture/atlas/ReferencedTextureAtlas.js +14 -14
  999. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts +10 -10
  1000. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
  1001. package/src/engine/graphics/texture/atlas/TextureAtlas.js +13 -14
  1002. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.d.ts.map +1 -1
  1003. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js +49 -49
  1004. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +5 -5
  1005. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
  1006. package/src/engine/graphics/texture/sampler/Sampler2D.js +6 -6
  1007. package/src/engine/graphics/trail/tube/TubeX.d.ts +6 -6
  1008. package/src/engine/graphics/trail/tube/TubeX.d.ts.map +1 -1
  1009. package/src/engine/graphics/trail/tube/TubeX.js +3 -3
  1010. package/src/engine/graphics/trail/x/RibbonX.d.ts.map +1 -1
  1011. package/src/engine/graphics/trail/x/RibbonX.js +36 -39
  1012. package/src/engine/grid/area/AreaTrigger.d.ts +1 -1
  1013. package/src/engine/grid/area/AreaTrigger.d.ts.map +1 -1
  1014. package/src/engine/grid/area/AreaTrigger.js +8 -7
  1015. package/src/engine/grid/area/TriggerAction.d.ts.map +1 -1
  1016. package/src/engine/grid/area/TriggerAction.js +2 -4
  1017. package/src/engine/grid/grid2transform/GridPosition2TransformSerializationUpgrader_0_1.d.ts.map +1 -1
  1018. package/src/engine/grid/grid2transform/GridPosition2TransformSerializationUpgrader_0_1.js +3 -6
  1019. package/src/engine/grid/grid2transform/GridPosition2TransformSystem.d.ts +3 -3
  1020. package/src/engine/grid/grid2transform/GridPosition2TransformSystem.d.ts.map +1 -1
  1021. package/src/engine/grid/grid2transform/GridPosition2TransformSystem.js +6 -9
  1022. package/src/engine/grid/position/GridPositionSerializationUpdater_0_1.d.ts.map +1 -1
  1023. package/src/engine/grid/position/GridPositionSerializationUpdater_0_1.js +2 -6
  1024. package/src/engine/grid/position/GridPositionSystem.d.ts.map +1 -1
  1025. package/src/engine/grid/position/GridPositionSystem.js +7 -11
  1026. package/src/engine/grid/transform2grid/Transform2GridPositionSystem.d.ts.map +1 -1
  1027. package/src/engine/grid/transform2grid/Transform2GridPositionSystem.js +32 -40
  1028. package/src/engine/input/devices/PointerDevice.d.ts +8 -0
  1029. package/src/engine/input/devices/PointerDevice.d.ts.map +1 -1
  1030. package/src/engine/input/devices/PointerDevice.js +10 -4
  1031. package/src/engine/input/ecs/systems/InputControllerSystem.d.ts.map +1 -1
  1032. package/src/engine/input/ecs/systems/InputControllerSystem.js +9 -13
  1033. package/src/engine/input/ecs/systems/InputSystem.d.ts +1 -1
  1034. package/src/engine/input/ecs/systems/InputSystem.d.ts.map +1 -1
  1035. package/src/engine/input/ecs/systems/InputSystem.js +8 -8
  1036. package/src/engine/intelligence/behavior/SelectorBehavior.d.ts.map +1 -1
  1037. package/src/engine/intelligence/behavior/SelectorBehavior.js +13 -17
  1038. package/src/engine/intelligence/behavior/composite/ParallelBehavior.d.ts +10 -10
  1039. package/src/engine/intelligence/behavior/composite/ParallelBehavior.d.ts.map +1 -1
  1040. package/src/engine/intelligence/behavior/composite/ParallelBehavior.js +12 -11
  1041. package/src/engine/intelligence/behavior/composite/ParallelBehaviorSerializationAdapter.d.ts.map +1 -1
  1042. package/src/engine/intelligence/behavior/composite/ParallelBehaviorSerializationAdapter.js +2 -6
  1043. package/src/engine/intelligence/behavior/composite/SequenceBehavior.d.ts.map +1 -1
  1044. package/src/engine/intelligence/behavior/composite/SequenceBehavior.js +19 -22
  1045. package/src/engine/intelligence/behavior/composite/SequenceBehaviorSerializationAdapter.d.ts.map +1 -1
  1046. package/src/engine/intelligence/behavior/composite/SequenceBehaviorSerializationAdapter.js +2 -6
  1047. package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.d.ts.map +1 -1
  1048. package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.js +6 -10
  1049. package/src/engine/intelligence/behavior/decorator/InvertStatusBehaviorSerializationAdapter.d.ts.map +1 -1
  1050. package/src/engine/intelligence/behavior/decorator/InvertStatusBehaviorSerializationAdapter.js +2 -6
  1051. package/src/engine/intelligence/behavior/decorator/RepeatBehavior.d.ts +5 -5
  1052. package/src/engine/intelligence/behavior/decorator/RepeatBehavior.d.ts.map +1 -1
  1053. package/src/engine/intelligence/behavior/decorator/RepeatBehavior.js +7 -7
  1054. package/src/engine/intelligence/behavior/decorator/RepeatBehaviorSerializationAdapter.d.ts.map +1 -1
  1055. package/src/engine/intelligence/behavior/decorator/RepeatBehaviorSerializationAdapter.js +2 -6
  1056. package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.d.ts +2 -2
  1057. package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.d.ts.map +1 -1
  1058. package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.js +7 -7
  1059. package/src/engine/intelligence/behavior/ecs/BehaviorSystem.d.ts.map +1 -1
  1060. package/src/engine/intelligence/behavior/ecs/BehaviorSystem.js +3 -5
  1061. package/src/engine/intelligence/behavior/primitive/PromiseBehavior.d.ts +2 -2
  1062. package/src/engine/intelligence/behavior/primitive/PromiseBehavior.d.ts.map +1 -1
  1063. package/src/engine/intelligence/behavior/primitive/PromiseBehavior.js +3 -4
  1064. package/src/engine/intelligence/behavior/util/RotationBehavior.d.ts.map +1 -1
  1065. package/src/engine/intelligence/behavior/util/RotationBehavior.js +8 -13
  1066. package/src/engine/intelligence/blackboard/Blackboard.d.ts.map +1 -1
  1067. package/src/engine/intelligence/blackboard/Blackboard.js +14 -14
  1068. package/src/engine/intelligence/blackboard/BlackboardDynamicStorageAdapter.d.ts.map +1 -1
  1069. package/src/engine/intelligence/blackboard/BlackboardDynamicStorageAdapter.js +52 -55
  1070. package/src/engine/intelligence/blackboard/BlackboardStack.d.ts.map +1 -1
  1071. package/src/engine/intelligence/blackboard/BlackboardStack.js +12 -16
  1072. package/src/engine/intelligence/blackboard/BlackboardValue.d.ts.map +1 -1
  1073. package/src/engine/intelligence/blackboard/BlackboardValue.js +6 -5
  1074. package/src/engine/intelligence/controller/graph/StateGraph.d.ts +1 -1
  1075. package/src/engine/intelligence/controller/graph/StateGraph.d.ts.map +1 -1
  1076. package/src/engine/intelligence/controller/graph/StateGraph.js +2 -2
  1077. package/src/engine/intelligence/controller/graph/StateGraphDescription.js +6 -8
  1078. package/src/engine/intelligence/controller/graph/StateGraphSystem.d.ts.map +1 -1
  1079. package/src/engine/intelligence/controller/graph/StateGraphSystem.js +1 -5
  1080. package/src/engine/intelligence/mcts/MoveEdge.d.ts.map +1 -1
  1081. package/src/engine/intelligence/mcts/MoveEdge.js +5 -8
  1082. package/src/engine/intelligence/resource/ResourceAllocationBid.d.ts +5 -5
  1083. package/src/engine/intelligence/resource/ResourceAllocationBid.d.ts.map +1 -1
  1084. package/src/engine/intelligence/resource/ResourceAllocationBid.js +6 -6
  1085. package/src/engine/interpolation/InterpolationLog.d.ts.map +1 -1
  1086. package/src/engine/interpolation/InterpolationLog.js +564 -583
  1087. package/src/engine/interpolation/InterpolationSystem.d.ts.map +1 -1
  1088. package/src/engine/interpolation/InterpolationSystem.js +232 -233
  1089. package/src/engine/knowledge/database/StaticKnowledgeDataTableDescriptor.d.ts.map +1 -1
  1090. package/src/engine/knowledge/database/StaticKnowledgeDataTableDescriptor.js +17 -20
  1091. package/src/engine/logging/elastic/ElasticSearchLogger.d.ts +6 -6
  1092. package/src/engine/logging/elastic/ElasticSearchLogger.d.ts.map +1 -1
  1093. package/src/engine/logging/elastic/ElasticSearchLogger.js +31 -32
  1094. package/src/engine/metrics/ProxyMetricsGateway.d.ts.map +1 -1
  1095. package/src/engine/metrics/ProxyMetricsGateway.js +5 -9
  1096. package/src/engine/navigation/ecs/components/Path.d.ts.map +1 -1
  1097. package/src/engine/navigation/ecs/components/Path.js +30 -32
  1098. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_0_1.d.ts.map +1 -1
  1099. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_0_1.js +2 -6
  1100. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_1_2.d.ts.map +1 -1
  1101. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_1_2.js +2 -6
  1102. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts.map +1 -1
  1103. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.js +34 -38
  1104. package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_0_1.d.ts.map +1 -1
  1105. package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_0_1.js +2 -6
  1106. package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_1_2.d.ts.map +1 -1
  1107. package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_1_2.js +2 -6
  1108. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
  1109. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.js +12 -17
  1110. package/src/engine/network/NetworkSession.d.ts.map +1 -1
  1111. package/src/engine/network/NetworkSession.js +2037 -2036
  1112. package/src/engine/network/PriorityFetch.d.ts +6 -6
  1113. package/src/engine/network/PriorityFetch.d.ts.map +1 -1
  1114. package/src/engine/network/PriorityFetch.js +14 -14
  1115. package/src/engine/network/diagnostics/BandwidthMeter.d.ts.map +1 -1
  1116. package/src/engine/network/diagnostics/BandwidthMeter.js +150 -155
  1117. package/src/engine/network/diagnostics/ReplayLog.d.ts +2 -2
  1118. package/src/engine/network/diagnostics/ReplayLog.d.ts.map +1 -1
  1119. package/src/engine/network/diagnostics/ReplayLog.js +132 -137
  1120. package/src/engine/network/diagnostics/SyncTest.d.ts.map +1 -1
  1121. package/src/engine/network/diagnostics/SyncTest.js +146 -151
  1122. package/src/engine/network/orchestrator/NetworkPeer.d.ts.map +1 -1
  1123. package/src/engine/network/orchestrator/NetworkPeer.js +1202 -1209
  1124. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts +4 -4
  1125. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
  1126. package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +8 -10
  1127. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +7 -7
  1128. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
  1129. package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +643 -654
  1130. package/src/engine/network/replication/Replicator.d.ts +24 -24
  1131. package/src/engine/network/replication/Replicator.d.ts.map +1 -1
  1132. package/src/engine/network/replication/Replicator.js +405 -410
  1133. package/src/engine/network/sim/ReplicatedComponentRegistry.d.ts.map +1 -1
  1134. package/src/engine/network/sim/ReplicatedComponentRegistry.js +133 -140
  1135. package/src/engine/network/sim/RewindEngine.d.ts.map +1 -1
  1136. package/src/engine/network/sim/RewindEngine.js +179 -182
  1137. package/src/engine/network/sim/SimActionExecutor.d.ts +34 -34
  1138. package/src/engine/network/sim/SimActionExecutor.d.ts.map +1 -1
  1139. package/src/engine/network/sim/SimActionExecutor.js +305 -306
  1140. package/src/engine/network/sim/SimActionRegistry.d.ts.map +1 -1
  1141. package/src/engine/network/sim/SimActionRegistry.js +121 -128
  1142. package/src/engine/network/sim/SmoothingState.d.ts.map +1 -1
  1143. package/src/engine/network/sim/SmoothingState.js +220 -222
  1144. package/src/engine/network/sim/SpeculationLog.d.ts.map +1 -1
  1145. package/src/engine/network/sim/SpeculationLog.js +79 -84
  1146. package/src/engine/network/state/Baseline.d.ts.map +1 -1
  1147. package/src/engine/network/state/Baseline.js +78 -83
  1148. package/src/engine/network/state/ChangedEntitySet.d.ts.map +1 -1
  1149. package/src/engine/network/state/ChangedEntitySet.js +253 -256
  1150. package/src/engine/network/state/MutationLedger.d.ts.map +1 -1
  1151. package/src/engine/network/state/MutationLedger.js +179 -182
  1152. package/src/engine/network/state/ReplicationSlotTable.d.ts.map +1 -1
  1153. package/src/engine/network/state/ReplicationSlotTable.js +206 -211
  1154. package/src/engine/network/time/AdaptiveRenderDelay.d.ts.map +1 -1
  1155. package/src/engine/network/time/AdaptiveRenderDelay.js +250 -258
  1156. package/src/engine/network/time/JitterBuffer.d.ts.map +1 -1
  1157. package/src/engine/network/time/JitterBuffer.js +113 -116
  1158. package/src/engine/network/time/TimeSync.d.ts.map +1 -1
  1159. package/src/engine/network/time/TimeSync.js +145 -152
  1160. package/src/engine/network/transport/LoopbackTransport.d.ts.map +1 -1
  1161. package/src/engine/network/transport/LoopbackTransport.js +165 -173
  1162. package/src/engine/network/transport/ReliableCommandPipeline.d.ts.map +1 -1
  1163. package/src/engine/network/transport/ReliableCommandPipeline.js +315 -320
  1164. package/src/engine/network/transport/adapters/SimulatedTransport.d.ts.map +1 -1
  1165. package/src/engine/network/transport/adapters/SimulatedTransport.js +235 -241
  1166. package/src/engine/network/transport/adapters/WebSocketTransport.d.ts.map +1 -1
  1167. package/src/engine/network/transport/adapters/WebSocketTransport.js +154 -154
  1168. package/src/engine/network/transport/adapters/WebTransportTransport.d.ts.map +1 -1
  1169. package/src/engine/network/transport/adapters/WebTransportTransport.js +195 -199
  1170. package/src/engine/network/transport/fragments/FragmentAssembler.d.ts.map +1 -1
  1171. package/src/engine/network/transport/fragments/FragmentAssembler.js +286 -291
  1172. package/src/engine/network/transport/fragments/FragmentRetention.d.ts.map +1 -1
  1173. package/src/engine/network/transport/fragments/FragmentRetention.js +191 -194
  1174. package/src/engine/physics/body/BodyStorage.d.ts +2 -2
  1175. package/src/engine/physics/body/BodyStorage.d.ts.map +1 -1
  1176. package/src/engine/physics/body/BodyStorage.js +406 -406
  1177. package/src/engine/physics/body/SolverBodyState.d.ts +8 -8
  1178. package/src/engine/physics/body/SolverBodyState.d.ts.map +1 -1
  1179. package/src/engine/physics/body/SolverBodyState.js +10 -10
  1180. package/src/engine/physics/broadphase/PairList.d.ts +1 -1
  1181. package/src/engine/physics/broadphase/PairList.d.ts.map +1 -1
  1182. package/src/engine/physics/broadphase/PairList.js +98 -97
  1183. package/src/engine/physics/contact/ManifoldStore.d.ts +2 -2
  1184. package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
  1185. package/src/engine/physics/contact/ManifoldStore.js +3 -4
  1186. package/src/engine/physics/ecs/ColliderObserverSystem.d.ts +2 -2
  1187. package/src/engine/physics/ecs/ColliderObserverSystem.d.ts.map +1 -1
  1188. package/src/engine/physics/ecs/ColliderObserverSystem.js +102 -103
  1189. package/src/engine/physics/ecs/PhysicsSystem.d.ts +2 -2
  1190. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  1191. package/src/engine/physics/ecs/PhysicsSystem.js +248 -249
  1192. package/src/engine/physics/events/ContactEventBuffer.d.ts +1 -1
  1193. package/src/engine/physics/events/ContactEventBuffer.d.ts.map +1 -1
  1194. package/src/engine/physics/events/ContactEventBuffer.js +2 -1
  1195. package/src/engine/physics/fluid/FluidField.d.ts +54 -0
  1196. package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
  1197. package/src/engine/physics/fluid/FluidField.js +198 -15
  1198. package/src/engine/physics/fluid/FluidSimulator.d.ts.map +1 -1
  1199. package/src/engine/physics/fluid/FluidSimulator.js +14 -4
  1200. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  1201. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +0 -45
  1202. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts.map +1 -1
  1203. package/src/engine/physics/fluid/ecs/FluidSystem.js +8 -144
  1204. package/src/engine/physics/fluid/ecs/FluidWorkerCore.d.ts +43 -0
  1205. package/src/engine/physics/fluid/ecs/FluidWorkerCore.d.ts.map +1 -0
  1206. package/src/engine/physics/fluid/ecs/FluidWorkerCore.js +123 -0
  1207. package/src/engine/physics/fluid/ecs/WorkerFluidSystem.d.ts +119 -0
  1208. package/src/engine/physics/fluid/ecs/WorkerFluidSystem.d.ts.map +1 -0
  1209. package/src/engine/physics/fluid/ecs/WorkerFluidSystem.js +395 -0
  1210. package/src/engine/physics/fluid/ecs/fluid.worker.d.ts +2 -0
  1211. package/src/engine/physics/fluid/ecs/fluid.worker.d.ts.map +1 -0
  1212. package/src/engine/physics/fluid/ecs/fluid.worker.js +12 -0
  1213. package/src/engine/physics/fluid/ecs/fluid_build_world_to_grid.d.ts +20 -0
  1214. package/src/engine/physics/fluid/ecs/fluid_build_world_to_grid.d.ts.map +1 -0
  1215. package/src/engine/physics/fluid/ecs/fluid_build_world_to_grid.js +32 -0
  1216. package/src/engine/physics/fluid/ecs/fluid_gather_visible_effectors.d.ts +22 -0
  1217. package/src/engine/physics/fluid/ecs/fluid_gather_visible_effectors.d.ts.map +1 -0
  1218. package/src/engine/physics/fluid/ecs/fluid_gather_visible_effectors.js +47 -0
  1219. package/src/engine/physics/fluid/ecs/fluid_reanchor_field.d.ts +28 -0
  1220. package/src/engine/physics/fluid/ecs/fluid_reanchor_field.d.ts.map +1 -0
  1221. package/src/engine/physics/fluid/ecs/fluid_reanchor_field.js +85 -0
  1222. package/src/engine/physics/fluid/ecs/fluid_sync_effectors_from_transform.d.ts +11 -0
  1223. package/src/engine/physics/fluid/ecs/fluid_sync_effectors_from_transform.d.ts.map +1 -0
  1224. package/src/engine/physics/fluid/ecs/fluid_sync_effectors_from_transform.js +16 -0
  1225. package/src/engine/physics/fluid/ecs/fluid_worker_protocol.d.ts +51 -0
  1226. package/src/engine/physics/fluid/ecs/fluid_worker_protocol.d.ts.map +1 -0
  1227. package/src/engine/physics/fluid/ecs/fluid_worker_protocol.js +111 -0
  1228. package/src/engine/physics/fluid/ecs/makeFluidWorker.d.ts +17 -0
  1229. package/src/engine/physics/fluid/ecs/makeFluidWorker.d.ts.map +1 -0
  1230. package/src/engine/physics/fluid/ecs/makeFluidWorker.js +18 -0
  1231. package/src/engine/physics/island/IslandBuilder.d.ts.map +1 -1
  1232. package/src/engine/physics/island/IslandBuilder.js +84 -86
  1233. package/src/engine/physics/mls-mpm/MLS_MPM.d.ts.map +1 -1
  1234. package/src/engine/physics/mls-mpm/MLS_MPM.js +24 -26
  1235. package/src/engine/physics/queries/PhysicsSurfacePoint.d.ts.map +1 -1
  1236. package/src/engine/physics/queries/PhysicsSurfacePoint.js +98 -100
  1237. package/src/engine/physics/vehicle/RaycastVehicle.d.ts +6 -6
  1238. package/src/engine/physics/vehicle/RaycastVehicle.d.ts.map +1 -1
  1239. package/src/engine/physics/vehicle/RaycastVehicle.js +357 -344
  1240. package/src/engine/plugin/PluginReferenceContext.d.ts +12 -12
  1241. package/src/engine/plugin/PluginReferenceContext.d.ts.map +1 -1
  1242. package/src/engine/plugin/PluginReferenceContext.js +24 -25
  1243. package/src/engine/scene/Scene.d.ts +5 -5
  1244. package/src/engine/scene/Scene.d.ts.map +1 -1
  1245. package/src/engine/scene/Scene.js +24 -23
  1246. package/src/engine/scene/SceneManager.d.ts +5 -5
  1247. package/src/engine/scene/SceneManager.d.ts.map +1 -1
  1248. package/src/engine/scene/SceneManager.js +13 -14
  1249. package/src/engine/sound/SoundEngine.d.ts +2 -2
  1250. package/src/engine/sound/SoundEngine.d.ts.map +1 -1
  1251. package/src/engine/sound/SoundEngine.js +7 -8
  1252. package/src/engine/sound/asset/SoundAssetPlaybackSpec.d.ts.map +1 -1
  1253. package/src/engine/sound/asset/SoundAssetPlaybackSpec.js +16 -20
  1254. package/src/engine/sound/ecs/SoundController.d.ts.map +1 -1
  1255. package/src/engine/sound/ecs/SoundController.js +37 -33
  1256. package/src/engine/sound/ecs/SoundControllerSystem.d.ts.map +1 -1
  1257. package/src/engine/sound/ecs/SoundControllerSystem.js +5 -11
  1258. package/src/engine/sound/ecs/SoundListener.d.ts.map +1 -1
  1259. package/src/engine/sound/ecs/SoundListener.js +4 -6
  1260. package/src/engine/sound/ecs/SoundListenerSystem.d.ts +6 -6
  1261. package/src/engine/sound/ecs/SoundListenerSystem.d.ts.map +1 -1
  1262. package/src/engine/sound/ecs/SoundListenerSystem.js +22 -23
  1263. package/src/engine/sound/ecs/audio/AudioEmitter.d.ts +10 -4
  1264. package/src/engine/sound/ecs/audio/AudioEmitter.d.ts.map +1 -1
  1265. package/src/engine/sound/ecs/audio/AudioEmitter.js +131 -122
  1266. package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.d.ts +34 -0
  1267. package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.d.ts.map +1 -0
  1268. package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.js +68 -0
  1269. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts +6 -6
  1270. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
  1271. package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +314 -316
  1272. package/src/engine/sound/ecs/emitter/SoundEmitterComponentContext.d.ts.map +1 -1
  1273. package/src/engine/sound/ecs/emitter/SoundEmitterComponentContext.js +31 -1
  1274. package/src/engine/sound/ecs/emitter/SoundEmitterSerializationUpgrader_0_1.d.ts.map +1 -1
  1275. package/src/engine/sound/ecs/emitter/SoundEmitterSerializationUpgrader_0_1.js +2 -6
  1276. package/src/engine/sound/ecs/emitter/SoundEmitterSerializationUpgrader_1_2.d.ts.map +1 -1
  1277. package/src/engine/sound/ecs/emitter/SoundEmitterSerializationUpgrader_1_2.js +2 -6
  1278. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.d.ts +5 -5
  1279. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.d.ts.map +1 -1
  1280. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +159 -159
  1281. package/src/engine/sound/material/concrete/RandomSoundMaterial.d.ts.map +1 -1
  1282. package/src/engine/sound/material/concrete/RandomSoundMaterial.js +5 -9
  1283. package/src/engine/sound/material/concrete/SingleSoundMaterial.d.ts.map +1 -1
  1284. package/src/engine/sound/material/concrete/SingleSoundMaterial.js +1 -6
  1285. package/src/engine/sound/material/concrete/SoundMaterialComposition.d.ts.map +1 -1
  1286. package/src/engine/sound/material/concrete/SoundMaterialComposition.js +18 -21
  1287. package/src/engine/sound/material/detector/terrain/TerrainSoundMaterialSurfaceDetector.d.ts.map +1 -1
  1288. package/src/engine/sound/material/detector/terrain/TerrainSoundMaterialSurfaceDetector.js +13 -15
  1289. package/src/engine/sound/simulation/core/OccluderBody.d.ts +12 -12
  1290. package/src/engine/sound/simulation/core/OccluderBody.d.ts.map +1 -1
  1291. package/src/engine/sound/simulation/core/OccluderBody.js +74 -74
  1292. package/src/engine/sound/simulation/prototypeAcousticSolver.js +5 -4
  1293. package/src/engine/sound/sopra/definition/SopraPanningModel.d.ts +7 -3
  1294. package/src/engine/sound/sopra/definition/SopraPanningModel.d.ts.map +1 -1
  1295. package/src/engine/sound/sopra/definition/SopraPanningModel.js +34 -20
  1296. package/src/engine/sound/sopra/legacy/soundEmitterToEventDescription.d.ts +15 -0
  1297. package/src/engine/sound/sopra/legacy/soundEmitterToEventDescription.d.ts.map +1 -1
  1298. package/src/engine/sound/sopra/legacy/soundEmitterToEventDescription.js +122 -106
  1299. package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
  1300. package/src/engine/sound/sopra/runtime/EventInstance.js +852 -815
  1301. package/src/engine/sound/sopra/util/buildAttenuationCurve.d.ts +20 -6
  1302. package/src/engine/sound/sopra/util/buildAttenuationCurve.d.ts.map +1 -1
  1303. package/src/engine/sound/sopra/util/buildAttenuationCurve.js +56 -21
  1304. package/src/engine/ui/bindings/DomElementBinding.d.ts.map +1 -1
  1305. package/src/engine/ui/bindings/DomElementBinding.js +15 -18
  1306. package/src/engine/ui/bindings/DomElementBindingDescription.d.ts.map +1 -1
  1307. package/src/engine/ui/bindings/DomElementBindingDescription.js +10 -14
  1308. package/src/engine/ui/bindings/DomElementProcessor.d.ts.map +1 -1
  1309. package/src/engine/ui/bindings/DomElementProcessor.js +5 -7
  1310. package/src/engine/ui/bindings/DomElementProcessorManager.d.ts.map +1 -1
  1311. package/src/engine/ui/bindings/DomElementProcessorManager.js +26 -26
  1312. package/src/engine/ui/bindings/processors/DomElementProcessorTilt3D.d.ts.map +1 -1
  1313. package/src/engine/ui/bindings/processors/DomElementProcessorTilt3D.js +15 -19
  1314. package/src/engine/ui/cursor/CursorCoalescence.d.ts.map +1 -1
  1315. package/src/engine/ui/cursor/CursorCoalescence.js +11 -14
  1316. package/src/engine/ui/modal/ModalStack.d.ts.map +1 -1
  1317. package/src/engine/ui/modal/ModalStack.js +19 -22
  1318. package/src/engine/ui/notification/AnimatedObjectEmitter.d.ts +4 -4
  1319. package/src/engine/ui/notification/AnimatedObjectEmitter.d.ts.map +1 -1
  1320. package/src/engine/ui/notification/AnimatedObjectEmitter.js +68 -70
  1321. package/src/engine/ui/notification/NotificationManager.d.ts +4 -4
  1322. package/src/engine/ui/notification/NotificationManager.d.ts.map +1 -1
  1323. package/src/engine/ui/notification/NotificationManager.js +27 -29
  1324. package/src/engine/ui/notification/ViewEmitter.d.ts.map +1 -1
  1325. package/src/engine/ui/notification/ViewEmitter.js +2 -2
  1326. package/src/engine/ui/scene/SceneGUIContext.d.ts.map +1 -1
  1327. package/src/engine/ui/scene/SceneGUIContext.js +20 -22
  1328. package/src/engine/ui/tiles2d/TileMoveProgram.d.ts.map +1 -1
  1329. package/src/engine/ui/tiles2d/TileMoveProgram.js +5 -7
  1330. package/src/generation/GraphGenerationRule.d.ts.map +1 -1
  1331. package/src/generation/GraphGenerationRule.js +10 -14
  1332. package/src/generation/GridGeneratorConfig.d.ts.map +1 -1
  1333. package/src/generation/GridGeneratorConfig.js +15 -19
  1334. package/src/generation/filtering/CellFilterCellMatcher.d.ts.map +1 -1
  1335. package/src/generation/filtering/CellFilterCellMatcher.js +5 -9
  1336. package/src/generation/filtering/numeric/complex/CellFilterAngleToNormal.d.ts.map +1 -1
  1337. package/src/generation/filtering/numeric/complex/CellFilterAngleToNormal.js +11 -15
  1338. package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainObstacle.d.ts.map +1 -1
  1339. package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainObstacle.js +11 -15
  1340. package/src/generation/grid/actions/ContinuousGridCellActionWriteObstacle.d.ts +10 -10
  1341. package/src/generation/grid/actions/ContinuousGridCellActionWriteObstacle.d.ts.map +1 -1
  1342. package/src/generation/grid/actions/ContinuousGridCellActionWriteObstacle.js +20 -19
  1343. package/src/generation/markers/matcher/MarkerNodeMatcherByType.d.ts.map +1 -1
  1344. package/src/generation/markers/matcher/MarkerNodeMatcherByType.js +5 -9
  1345. package/src/generation/placement/action/random/CellActionSelectRandom.d.ts.map +1 -1
  1346. package/src/generation/placement/action/random/CellActionSelectRandom.js +11 -16
  1347. package/src/view/ViewGroup.d.ts.map +1 -1
  1348. package/src/view/ViewGroup.js +11 -14
  1349. package/src/view/common/HTMLElementCacheKey.d.ts.map +1 -1
  1350. package/src/view/common/HTMLElementCacheKey.js +21 -24
  1351. package/src/view/common/TabbedView.d.ts +56 -26
  1352. package/src/view/common/TabbedView.d.ts.map +1 -1
  1353. package/src/view/common/TabbedView.js +128 -30
  1354. package/src/view/common/dnd/DragAndDropContext.d.ts.map +1 -1
  1355. package/src/view/common/dnd/DragAndDropContext.js +11 -12
  1356. package/src/view/common/dnd/Draggable.d.ts +5 -5
  1357. package/src/view/common/dnd/Draggable.d.ts.map +1 -1
  1358. package/src/view/common/dnd/Draggable.js +6 -6
  1359. package/src/view/controller/GuiController.d.ts +1 -1
  1360. package/src/view/controller/GuiController.d.ts.map +1 -1
  1361. package/src/view/controller/GuiController.js +3 -3
  1362. package/src/view/controller/controls/BooleanVector3Control.d.ts.map +1 -1
  1363. package/src/view/controller/controls/BooleanVector3Control.js +2 -2
  1364. package/src/view/controller/controls/NumericIntervalControl.d.ts +1 -1
  1365. package/src/view/controller/controls/NumericIntervalControl.d.ts.map +1 -1
  1366. package/src/view/controller/controls/NumericIntervalControl.js +90 -90
  1367. package/src/view/controller/controls/Vector2Control.d.ts +1 -1
  1368. package/src/view/controller/controls/Vector2Control.d.ts.map +1 -1
  1369. package/src/view/controller/controls/Vector2Control.js +83 -83
  1370. package/src/view/controller/controls/Vector3Control.d.ts +1 -1
  1371. package/src/view/controller/controls/Vector3Control.d.ts.map +1 -1
  1372. package/src/view/controller/controls/Vector3Control.js +90 -90
  1373. package/{editor/view/ecs/components → src/view/controller/dat}/DatGuiController.d.ts +45 -45
  1374. package/src/view/controller/dat/DatGuiController.d.ts.map +1 -0
  1375. package/src/view/controller/dat/DatGuiController.js +216 -0
  1376. package/src/view/currency/CompositeCurrencyLabelView.d.ts.map +1 -1
  1377. package/src/view/currency/CompositeCurrencyLabelView.js +2 -2
  1378. package/src/view/currency/CurrencyDenominationLabelView.d.ts.map +1 -1
  1379. package/src/view/currency/CurrencyDenominationLabelView.js +2 -3
  1380. package/src/view/currency/CurrencyDenominationSpec.d.ts.map +1 -1
  1381. package/src/view/currency/CurrencyDenominationSpec.js +11 -12
  1382. package/src/view/currency/CurrencyDisplaySpec.d.ts.map +1 -1
  1383. package/src/view/currency/CurrencyDisplaySpec.js +5 -9
  1384. package/src/view/elements/ColorPickerView.js +1 -1
  1385. package/src/view/elements/EmptyView.js +1 -1
  1386. package/src/view/elements/MeshPreview.d.ts +1 -1
  1387. package/src/view/elements/MeshPreview.d.ts.map +1 -1
  1388. package/src/view/elements/MeshPreview.js +4 -10
  1389. package/{editor/view/ecs/components/particles/ColorParameterLUTController.d.ts → src/view/elements/drawCheckers.d.ts} +13 -14
  1390. package/src/view/elements/drawCheckers.d.ts.map +1 -0
  1391. package/src/view/elements/drawCheckers.js +33 -0
  1392. package/src/view/elements/progress/segmented/SegmentDefinition.d.ts.map +1 -1
  1393. package/src/view/elements/progress/segmented/SegmentDefinition.js +1 -3
  1394. package/src/view/elements/radial/RadialMenu.d.ts.map +1 -1
  1395. package/src/view/elements/radial/RadialMenu.js +18 -19
  1396. package/src/view/elements/radial/RadialMenuElementDefinition.d.ts.map +1 -1
  1397. package/src/view/elements/radial/RadialMenuElementDefinition.js +95 -87
  1398. package/src/view/elements/radial/RadialText.d.ts +3 -3
  1399. package/src/view/elements/radial/RadialText.d.ts.map +1 -1
  1400. package/src/view/elements/radial/RadialText.js +19 -22
  1401. package/src/view/elements/tiles2d/Tile.d.ts +1 -1
  1402. package/src/view/elements/tiles2d/Tile.d.ts.map +1 -1
  1403. package/src/view/elements/tiles2d/Tile.js +2 -2
  1404. package/src/view/elements/tiles2d/TileGrid.d.ts.map +1 -1
  1405. package/src/view/elements/tiles2d/TileGrid.js +1 -4
  1406. package/src/view/game/achievements/AchievementNotificationView.d.ts.map +1 -1
  1407. package/src/view/game/achievements/AchievementNotificationView.js +2 -3
  1408. package/src/view/interaction/InteractionCommandSet.d.ts.map +1 -1
  1409. package/src/view/interaction/InteractionCommandSet.js +5 -7
  1410. package/src/view/layout/DockDragOverlayView.d.ts +24 -0
  1411. package/src/view/layout/DockDragOverlayView.d.ts.map +1 -0
  1412. package/src/view/layout/DockDragOverlayView.js +63 -0
  1413. package/src/view/layout/DockDropPlan.d.ts +46 -0
  1414. package/src/view/layout/DockDropPlan.d.ts.map +1 -0
  1415. package/src/view/layout/DockDropPlan.js +53 -0
  1416. package/src/view/layout/DockGroupNode.d.ts +29 -0
  1417. package/src/view/layout/DockGroupNode.d.ts.map +1 -0
  1418. package/src/view/layout/DockGroupNode.js +38 -0
  1419. package/src/view/layout/DockLayoutView.d.ts +125 -0
  1420. package/src/view/layout/DockLayoutView.d.ts.map +1 -0
  1421. package/src/view/layout/DockLayoutView.js +1193 -0
  1422. package/src/view/layout/DockPanel.d.ts +38 -0
  1423. package/src/view/layout/DockPanel.d.ts.map +1 -0
  1424. package/src/view/layout/DockPanel.js +51 -0
  1425. package/src/view/layout/DockSide.d.ts +48 -0
  1426. package/src/view/layout/DockSide.d.ts.map +1 -0
  1427. package/src/view/layout/DockSide.js +88 -0
  1428. package/src/view/layout/DockSplitNode.d.ts +59 -0
  1429. package/src/view/layout/DockSplitNode.d.ts.map +1 -0
  1430. package/src/view/layout/DockSplitNode.js +78 -0
  1431. package/src/view/layout/DrawerView.d.ts +53 -0
  1432. package/src/view/layout/DrawerView.d.ts.map +1 -0
  1433. package/src/view/layout/DrawerView.js +163 -0
  1434. package/src/view/layout/FloatingPanelView.d.ts +38 -0
  1435. package/src/view/layout/FloatingPanelView.d.ts.map +1 -0
  1436. package/src/view/layout/FloatingPanelView.js +251 -0
  1437. package/src/view/layout/SplitView.d.ts +73 -0
  1438. package/src/view/layout/SplitView.d.ts.map +1 -0
  1439. package/src/view/layout/SplitView.js +365 -0
  1440. package/src/view/layout/layout.scss +236 -0
  1441. package/src/view/layout/show_popup_menu.d.ts +19 -0
  1442. package/src/view/layout/show_popup_menu.d.ts.map +1 -0
  1443. package/src/view/layout/show_popup_menu.js +81 -0
  1444. package/src/view/minimap/Minimap.d.ts.map +1 -1
  1445. package/src/view/minimap/Minimap.js +2 -6
  1446. package/src/view/minimap/dom/MinimapMarkerView.d.ts.map +1 -1
  1447. package/src/view/minimap/dom/MinimapMarkerView.js +2 -3
  1448. package/src/view/minimap/gl/MarkerGL.d.ts +6 -6
  1449. package/src/view/minimap/gl/MarkerGL.d.ts.map +1 -1
  1450. package/src/view/minimap/gl/MarkerGL.js +8 -9
  1451. package/src/view/minimap/gl/MinimapFogOfWar.d.ts +7 -7
  1452. package/src/view/minimap/gl/MinimapFogOfWar.d.ts.map +1 -1
  1453. package/src/view/minimap/gl/MinimapFogOfWar.js +10 -12
  1454. package/src/view/minimap/gl/MinimapWorldGL.d.ts +15 -15
  1455. package/src/view/minimap/gl/MinimapWorldGL.d.ts.map +1 -1
  1456. package/src/view/minimap/gl/MinimapWorldGL.js +18 -16
  1457. package/src/view/minimap/gl/MinimapWorldLayer.d.ts.map +1 -1
  1458. package/src/view/minimap/gl/MinimapWorldLayer.js +4 -8
  1459. package/src/view/tooltip/DomTooltipManager.d.ts +6 -6
  1460. package/src/view/tooltip/DomTooltipManager.d.ts.map +1 -1
  1461. package/src/view/tooltip/DomTooltipManager.js +21 -22
  1462. package/src/view/tooltip/TooltipManager.d.ts.map +1 -1
  1463. package/src/view/tooltip/TooltipManager.js +6 -8
  1464. package/src/view/tooltip/TooltipView.d.ts +1 -1
  1465. package/src/view/tooltip/TooltipView.d.ts.map +1 -1
  1466. package/src/view/tooltip/TooltipView.js +3 -4
  1467. package/src/view/tooltip/VisualTip.d.ts +5 -5
  1468. package/src/view/tooltip/VisualTip.d.ts.map +1 -1
  1469. package/src/view/tooltip/VisualTip.js +6 -7
  1470. package/src/view/tooltip/gml/GMLEngine.d.ts.map +1 -1
  1471. package/src/view/tooltip/gml/GMLEngine.js +57 -63
  1472. package/src/view/util/DomSizeObserver.d.ts +6 -6
  1473. package/src/view/util/DomSizeObserver.d.ts.map +1 -1
  1474. package/src/view/util/DomSizeObserver.js +27 -20
  1475. package/editor/actions/concrete/PatchTerrainTextureAction.js +0 -153
  1476. package/editor/ecs/component/editors/ecs/MinimapMarkerEditor.d.ts +0 -14
  1477. package/editor/ecs/component/editors/ecs/MinimapMarkerEditor.d.ts.map +0 -1
  1478. package/editor/process/symbolic/makeStoryTriggerSetAreaDisplay.js +0 -114
  1479. package/editor/tools/TopDownCameraControlTool.d.ts +0 -13
  1480. package/editor/tools/TopDownCameraControlTool.d.ts.map +0 -1
  1481. package/editor/tools/TopDownCameraControlTool.js +0 -56
  1482. package/editor/tools/TransformTool.js +0 -385
  1483. package/editor/tools/paint/prototypeTerrainEditor.js +0 -135
  1484. package/editor/view/EditorView.d.ts +0 -39
  1485. package/editor/view/EditorView.d.ts.map +0 -1
  1486. package/editor/view/EditorView.js +0 -304
  1487. package/editor/view/ecs/ComponentControlFactory.d.ts +0 -19
  1488. package/editor/view/ecs/ComponentControlFactory.d.ts.map +0 -1
  1489. package/editor/view/ecs/ComponentControlFactory.js +0 -45
  1490. package/editor/view/ecs/EntityList.d.ts +0 -22
  1491. package/editor/view/ecs/EntityList.d.ts.map +0 -1
  1492. package/editor/view/ecs/HierarchicalEntityListView.module.scss +0 -13
  1493. package/editor/view/ecs/components/BlackboardController.js +0 -50
  1494. package/editor/view/ecs/components/DatGuiController.d.ts.map +0 -1
  1495. package/editor/view/ecs/components/FogOfWarController.js +0 -78
  1496. package/editor/view/ecs/components/FogOfWarRevealerController.js +0 -44
  1497. package/editor/view/ecs/components/GeneratedArmyController.js +0 -42
  1498. package/editor/view/ecs/components/GridObstacleController.d.ts +0 -14
  1499. package/editor/view/ecs/components/GridObstacleController.d.ts.map +0 -1
  1500. package/editor/view/ecs/components/GridObstacleController.js +0 -72
  1501. package/editor/view/ecs/components/GridPositionController.js +0 -40
  1502. package/editor/view/ecs/components/HeadsUpDisplayController.js +0 -30
  1503. package/editor/view/ecs/components/HighlightController.js +0 -47
  1504. package/editor/view/ecs/components/MeshController.js +0 -122
  1505. package/editor/view/ecs/components/PathFollowerController.js +0 -87
  1506. package/editor/view/ecs/components/TagController.js +0 -80
  1507. package/editor/view/ecs/components/TerrainController.js +0 -215
  1508. package/editor/view/ecs/components/TransformController.js +0 -97
  1509. package/editor/view/ecs/components/UnitShopController.js +0 -112
  1510. package/editor/view/ecs/components/army/ArmyController.js +0 -130
  1511. package/editor/view/ecs/components/gui/GUIElementController.js +0 -117
  1512. package/editor/view/ecs/components/items/ItemContainerController.js +0 -132
  1513. package/editor/view/ecs/components/items/ItemContainerController.stories.js +0 -50
  1514. package/editor/view/ecs/components/items/ItemController.js +0 -52
  1515. package/editor/view/ecs/components/particles/ColorParameterLUTController.d.ts.map +0 -1
  1516. package/editor/view/ecs/components/particles/ColorParameterLUTController.js +0 -444
  1517. package/editor/view/ecs/components/particles/ParameterTrackController.js +0 -51
  1518. package/editor/view/ecs/components/particles/ParticleEmitterController.js +0 -213
  1519. package/editor/view/ecs/components/particles/ParticleLayerController.js +0 -213
  1520. package/editor/view/ecs/components/particles/ScalarParameterLUTController.js +0 -401
  1521. package/editor/view/ecs/components/sockets/AttachmentSocketsController.js +0 -51
  1522. package/editor/view/ecs/components/sound/SoundEmitterController.js +0 -137
  1523. package/editor/view/ecs/components/story/StoryTriggerSetController.js +0 -214
  1524. package/editor/view/ecs/components/unit/AuraController.js +0 -45
  1525. package/editor/view/makeEntityDecorators.d.ts +0 -6
  1526. package/editor/view/makeEntityDecorators.d.ts.map +0 -1
  1527. package/editor/view/v2/SplitView.d.ts +0 -17
  1528. package/editor/view/v2/SplitView.d.ts.map +0 -1
  1529. package/editor/view/v2/ViewManagementSystem.js +0 -0
  1530. package/editor/view/v2/prototypeEditor.js +0 -127
  1531. package/src/engine/graphics/ecs/sprite/prototypeSpriteSystem.d.ts +0 -2
  1532. package/src/engine/graphics/ecs/sprite/prototypeSpriteSystem.d.ts.map +0 -1
  1533. package/src/engine/graphics/ecs/sprite/prototypeSpriteSystem.js +0 -1570
  1534. package/src/engine/graphics/three/TransfromControls.js +0 -1495
  1535. package/src/view/controller/controls_v2/AbstractPropertyBinding.d.ts +0 -8
  1536. package/src/view/controller/controls_v2/AbstractPropertyBinding.d.ts.map +0 -1
  1537. package/src/view/controller/controls_v2/AbstractPropertyBinding.ts +0 -10
  1538. package/src/view/controller/controls_v2/Controller.d.ts +0 -21
  1539. package/src/view/controller/controls_v2/Controller.d.ts.map +0 -1
  1540. package/src/view/controller/controls_v2/Controller.ts +0 -32
  1541. package/src/view/controller/controls_v2/IPropertyBinding.d.ts +0 -5
  1542. package/src/view/controller/controls_v2/IPropertyBinding.d.ts.map +0 -1
  1543. package/src/view/controller/controls_v2/IPropertyBinding.ts +0 -6
  1544. package/src/view/controller/controls_v2/PrimitivePropertyBinding.d.ts +0 -6
  1545. package/src/view/controller/controls_v2/PrimitivePropertyBinding.d.ts.map +0 -1
  1546. package/src/view/controller/controls_v2/PrimitivePropertyBinding.ts +0 -12
  1547. package/src/view/controller/controls_v2/SliderController.d.ts +0 -6
  1548. package/src/view/controller/controls_v2/SliderController.d.ts.map +0 -1
  1549. package/src/view/controller/controls_v2/SliderController.ts +0 -10
  1550. package/src/view/elements/button/ButtonView.stories.d.ts +0 -2
  1551. package/src/view/elements/button/ButtonView.stories.d.ts.map +0 -1
  1552. package/src/view/elements/button/ButtonView.stories.js +0 -14
@@ -0,0 +1,531 @@
1
+ # Asynchronous Systems — Design Proposal
2
+
3
+ **Status:** proposal, 2026-08-14
4
+ **Scope:** ECS `System`s whose work executes outside the main-thread tick — Web Workers and WebGPU — while keeping the authoring interface as small as possible.
5
+
6
+ > **What was actually built.** The design space was narrowed after this document
7
+ > to *shared memory* (`SharedArrayBuffer` + `Atomics`) rather than `postMessage`,
8
+ > and that variant is implemented and shipping — see
9
+ > [`async/WORKER_SYSTEM_PLAN.md`](async/WORKER_SYSTEM_PLAN.md), `async/WorkerSystem.js`,
10
+ > and its first consumer `physics/fluid/ecs/WorkerFluidSystem.js`.
11
+ >
12
+ > Three things changed versus the sketch below, all for the better:
13
+ >
14
+ > - **`AsyncPump` collapsed into four shared integers.** With shared memory the
15
+ > pump's whole bookkeeping — in-flight, capacity, completion — is the control
16
+ > header, so there is no separate object to own it.
17
+ > - **The gate became real, and load-bearing.** §7 deferred the fixed-latency
18
+ > contract as future work. Shared memory makes "is step T done?" a synchronous
19
+ > question, so `EntityManager` gained a fixed-step gate and the deterministic
20
+ > mode is the *only* mode rather than an upgrade path.
21
+ > - **Capacity is fixed at one, not configurable.** Under in-place mutation the
22
+ > main thread has nowhere to build a second step's input, so a deeper pipeline
23
+ > is a different design rather than a knob.
24
+ >
25
+ > The invariant that motivated the whole document is unchanged and is what the
26
+ > implementation enforces: **async transports, synchronous integration.**
27
+ >
28
+ > Everything below remains the reference for the parts not yet built — the
29
+ > `postMessage` transport (`WorkerChannel`/`WorkerHost`) and the WebGPU tier.
30
+
31
+ ---
32
+
33
+ ## 1. Summary
34
+
35
+ meep's `System` contract is already asynchronous where it needs to be for *lifecycle*: `startup`/`shutdown` return Promises, the `EntityManager` gates `RUNNING` on them, and entity linking only begins after startup resolves. What is missing is a story for *per-tick* asynchrony — systems whose computation is a round trip (postMessage → worker → response; submit → GPU → `mapAsync`) and therefore cannot complete inside the synchronous `simulate()` pass.
36
+
37
+ The proposal is deliberately **not** to make the tick asynchronous. `EntityManager.simulate` stays exactly as it is. Instead:
38
+
39
+ 1. **One invariant**: async continuations never touch the `EntityComponentDataset`. They only enqueue results. All dataset reads and writes happen inside the system's normal synchronous slot in the tick, in system order.
40
+ 2. **One primitive**: `AsyncPump` — bookkeeping for in-flight round trips. Each tick it *drains* completed results (applying them), then *launches* new work if capacity allows. It owns tick-stamping, dataset-epoch invalidation, entity-generation staleness, backpressure, and shutdown settling.
41
+ 3. **One convenience base**: `AsyncSystem extends System` — wires a pump to `update()` and exposes a three-method contract: `collect()` → `process(request)` (async, off-tick) → `apply(result, request)` (sync, on-tick). Systems that already extend another base (`AbstractContextSystem` etc.) use the pump directly; the base class is ten lines of sugar.
42
+ 4. **Two transports**, both just "things `process()` can await":
43
+ - `WorkerChannel`/`WorkerHost` — a modernized worker RPC (module workers, transferables in both directions, ready handshake, injectable port for tests), superseding the codegen `WorkerBuilder` path for new code.
44
+ - WebGPU — a `WebGPUDeviceSystem` that owns adapter/device, plus a `GpuReadbackRing` for the only genuinely async part (readback). GPU-resident compute that feeds rendering needs **no new machinery at all** — async `startup` for pipeline creation plus synchronous `queue.submit` in `update` already works today.
45
+
46
+ **Zero changes to `System`, `EntityManager`, or `EntityComponentDataset` are required.** Everything is additive library code under `engine/ecs/async/` (plus `core/process/worker/` for the channel). The execution-order scheduler keeps working unchanged, because an async system's dataset writes still happen inside its own `update` slot — `components_used` declarations remain truthful.
47
+
48
+ ---
49
+
50
+ ## 2. What exists today
51
+
52
+ Survey of the current codebase (paths relative to `meep/src/`).
53
+
54
+ ### 2.1 The System contract is already async where it matters
55
+
56
+ `engine/ecs/System.js` — `async startup(entityManager)` / `async shutdown(entityManager)`. `engine/ecs/EntityManager.js` (`startSystem`, ~line 682) asserts the returned thenable, arms a 5 s deadlock watchdog, and only sets `RUNNING` / attaches the `EntityObserver` / calls `handleDatasetAttached` after the promise resolves. The callback form was already deprecated in meep 2.128.0 in favor of `async`.
57
+
58
+ This means **spawning a worker, handshaking, requesting a GPU device, and compiling pipelines already have a correct home**: `startup`. Nothing new is needed for lifecycle.
59
+
60
+ ### 2.2 The tick is synchronous — and must stay so
61
+
62
+ `EntityManager.simulate` (~line 423): a lock-step fixed-update loop over all systems on a single shared accumulator (with `fixedStepTick`, the monotonic simulation tick id, incremented inside the loop), followed by the variable-rate `update` pass. Per-system try/catch, wall-clock runaway guard. Simulation and rendering run on **separate loops** (`engine/simulation/Ticker.js` drives `simulate`; `Engine.#animation_frame` drives `render`).
63
+
64
+ Two consequences worth stating explicitly, because the design leans on them:
65
+
66
+ - Because `simulate()` is one synchronous call, **promise continuations can never run between two systems within a pass**, nor between fixed steps. The JS microtask queue only drains when the stack empties.
67
+ - Continuations **can** run between `simulate` and `render`, and between frames. Today, any code that applies worker results inside a `.then(...)` mutates components at an uncontrolled point relative to both loops.
68
+
69
+ ### 2.3 Worker infrastructure exists, one generation old
70
+
71
+ `core/process/worker/`:
72
+
73
+ - `WorkerProxy` — RPC client over `{methodName, id, parameters}` / `{methodName, id, result|error}`. Queues requests while stopped, rejects everything on worker error (`FAILED` is terminal). `cancelRequest` throws "not implemented". **Transferables are only used on the response path** — requests always structured-clone.
74
+ - `WorkerBuilder` — builds the worker by **string-concatenating code** into a Blob URL (`codeToURL`), with an inlined duplicate of `extractTransferables`. Generated workers use `importScripts` (classic worker semantics) to load rollup bundles that are emitted as `format: 'esm'` — this works only because the entry scripts happen to export nothing.
75
+ - `OnDemandWorkerManager` — idle-termination wrapper (start on demand, stop after a grace period).
76
+
77
+ Consumers: PNG decode (`ThreadedImageDecoder`), terrain tile builds (`makeTerrainWorkerProxy`, one worker **per `Terrain` component**), and the deprecated `Metis` binding. A fourth worker entry (`sh3/lpv/worker/lpv_build_worker.js`) is dead/unfinished.
78
+
79
+ `SharedArrayBuffer` has a seam (`core/binary/makeArrayBuffer.js`, gated on `crossOriginIsolated`) but is never actually used with a worker. No `Atomics`, no `OffscreenCanvas`.
80
+
81
+ ### 2.4 The scheduler and its Promise bridge
82
+
83
+ `core/process/executor/ConcurrentExecutor.js` + `core/process/task/Task.js` — cooperative, single-threaded, time-sliced (`setTimeout`-driven, not frame-synced; `Engine.executor = new ConcurrentExecutor(1, 10)`). This is meep's answer to *main-thread* long-running work, and it is the dominant pattern: the lightmap baker, LPG builder, `ThemeEngine`, and `ShadedGeometrySystem`'s standing optimization/maintenance tasks all run as `Task`/`TaskGroup` cycles.
84
+
85
+ `promiseTask` (`core/process/task/util/promiseTask.js`) is the existing Promise→Task bridge — it polls with `TaskSignal.Yield` and discards the resolved value. It bridges *completion*, not *results*.
86
+
87
+ ### 2.5 Result-delivery precedents — the design in embryo
88
+
89
+ Two places already solve pieces of this problem, differently:
90
+
91
+ - **`AssetManager`** (`engine/asset/AssetManager.js`): async results are never delivered from whatever stack settled them. They go into `#response_queue`, drained by a `#response_processor` Task on the executor, with a microtask-deferred wake. This is precisely the "continuations only enqueue" invariant — applied to asset loads.
92
+ - **`TerrainTileManager.build`** (~line 748): the worker round trip resolves into a `.then` that hand-rolls three staleness guards — tile identity (`this.tiles[tile_index] !== tile`), a monotonic `tile.version`, and an `isBuildInProgress` flag — then mutates main-thread objects **directly in the promise callback**. It works, but every guard is bespoke, and delivery timing is uncontrolled (§2.2).
93
+
94
+ The proposal is essentially: take what `AssetManager` and `TerrainTileManager` each got right, and make it the standard, so the next bridged system doesn't reinvent either half.
95
+
96
+ ### 2.6 WebGPU: greenfield
97
+
98
+ There is **no WebGPU code** in `meep/src/` — no `navigator.gpu`, no WGSL, nothing. (The build already has a `.wgsl` raw-loader rule in the app webpack config, so shader imports are ready.) All existing GPU→CPU readback is synchronous WebGL (`readPixels`, `getBufferSubData`) inside utilities, not systems. WebGPU support is a clean-slate design, constrained only by three.js interop at the rendering seam.
99
+
100
+ ---
101
+
102
+ ## 3. Problem statement
103
+
104
+ Bridging a System to a Worker or a WebGPU queue means every tick-relevant computation becomes a **round trip with ≥ 1 frame of latency**. Concretely, an author today has to solve, per system, with no engine help:
105
+
106
+ 1. **When do results land?** Ad hoc `.then(apply)` mutates the dataset between `simulate` and `render`, or mid-frame relative to other systems' expectations. Nothing guarantees writes happen at the system's slot in execution order, so `components_used`-based ordering silently stops describing reality.
107
+ 2. **Is the result still valid?** Entities die, datasets get detached/attached (dataset switching is a supported scenario), systems get removed. The dataset has an entity **generation table** (`EntityComponentDataset.getEntityGeneration`) — ideal for this — but nothing uses it for async staleness; terrain invented three parallel guards instead.
108
+ 3. **Backpressure.** Nothing stops a system from launching a new request every tick while the previous one is still in flight. A slow worker turns into an unbounded queue (the network review found this exact failure mode in the pending-action log).
109
+ 4. **Cancellation/shutdown.** `WorkerProxy.cancelRequest` is unimplemented; nothing drains in-flight work at system shutdown; `Engine.stop()` has a standing `// TODO shutdown executor`.
110
+ 5. **Transport boilerplate.** Codegen workers, transferables on one path only, per-component worker instances, no ready handshake, no typed wrapper convention.
111
+
112
+ And for WebGPU specifically: no device ownership story, no readback pattern, no device-loss handling.
113
+
114
+ ---
115
+
116
+ ## 4. Design principles
117
+
118
+ 1. **The tick stays synchronous.** Determinism, ordering, and the mental model of `simulate` are load-bearing (physics determinism gate, network lockstep design). Async work is *pipelined around* the tick, never awaited inside it.
119
+ 2. **Continuations never touch the dataset.** The single rule that eliminates the whole "results land at random times" bug class. Continuations enqueue; ticks apply.
120
+ 3. **Composition first.** Systems already extend intermediate bases (`AbstractContextSystem`, `HighlightSystem`). The primitive must be an object a system *owns*, with the base class as optional sugar.
121
+ 4. **Zero core changes.** `System`/`EntityManager`/`EntityComponentDataset` are untouched in v1. Everything is additive library code. (This also keeps the door open for a job-graph scheduler later — §11.)
122
+ 5. **Uniform control flow.** One delivery order (launch order), one staleness mechanism (epoch + generation), one failure path (reject → discard + loud log). No auto-retry, no auto-restart, no "null means auto" modes.
123
+ 6. **Transports are just Promises.** The pump doesn't know about workers or GPUs. `process()` returns a Promise; where the work happens is the subclass's business. This is what makes Worker and WebGPU the *same* feature.
124
+ 7. **Fail loudly.** Rejections and dead workers surface with system names via `console.error`, matching `simulate`'s per-system error style. No silent catch.
125
+
126
+ ---
127
+
128
+ ## 5. Proposal
129
+
130
+ New package: `engine/ecs/async/`. Transport: `core/process/worker/v2/` (or sibling files; naming below is provisional).
131
+
132
+ ### 5.1 `AsyncPump` — the tick-integration primitive
133
+
134
+ Owns the in-flight set and the settled-but-unapplied queue. All bookkeeping, no policy about *what* the work is.
135
+
136
+ ```js
137
+ export class AsyncPump {
138
+
139
+ /** max round trips in flight; default 1 = coalescing pipeline */
140
+ capacity = 1;
141
+
142
+ #inflight = []; // [{request, context, epoch, settled, result, error}] in launch order
143
+ #epoch = 0;
144
+
145
+ /**
146
+ * Launch a round trip. `promise` must not touch the dataset in its
147
+ * continuations — the pump only records settlement.
148
+ * @param {Promise} promise
149
+ * @param {*} context opaque; returned to apply/discard (tick stamp, entity handles, ...)
150
+ */
151
+ launch(promise, context) { /* record; .then only sets settled/result flags */ }
152
+
153
+ /** @returns {boolean} capacity available for another launch */
154
+ get is_ready() { }
155
+
156
+ /**
157
+ * Deliver settled results IN LAUNCH ORDER to `apply(result, context)`.
158
+ * A settled head unblocks delivery; an unsettled head holds younger settled
159
+ * entries back (single-worker FIFO and mapAsync both settle in launch order
160
+ * anyway, so head-of-line blocking is theoretical for one transport).
161
+ * Entries from an older epoch, and rejected entries, go to
162
+ * `discard(context, error)` instead. Called from the system's update slot.
163
+ */
164
+ drain(apply, discard) { }
165
+
166
+ /** Invalidate everything currently in flight (dataset detached, reset). */
167
+ invalidate() { this.#epoch++; }
168
+
169
+ /**
170
+ * Stop accepting launches and resolve when all in-flight work settles
171
+ * (results are discarded — the dataset is already detached by the time
172
+ * shutdown runs, see §5.7). For use in System.shutdown.
173
+ * @returns {Promise<void>}
174
+ */
175
+ settle() { }
176
+ }
177
+ ```
178
+
179
+ Notes:
180
+
181
+ - **Launch-order delivery** is a deliberate choice over completion-order: it makes multi-request pipelines reason like FIFO queues, and it costs nothing for the two real transports (a single worker responds in request order; `mapAsync` resolves in submit order). One rule, no configuration.
182
+ - `capacity = 1` is the default and the most important policy: while a request is in flight, no new one launches; when it completes, the *next* launch snapshots *fresh* state. That is natural coalescing — the pattern `TerrainTileManager` approximates with `isBuildInProgress`, and the right default for "recompute X from current world state" workloads (path fields, GI, LODs).
183
+ - The pump is deliberately dumb: no request queue (pending work is regenerated from world state by the next `collect`), no retry, no timers.
184
+
185
+ ### 5.2 `AsyncSystem` — the convenience base
186
+
187
+ ```js
188
+ export class AsyncSystem extends System {
189
+
190
+ /** @readonly */
191
+ pump = new AsyncPump();
192
+
193
+ /**
194
+ * Build a request from current world state. Called only when the pump has
195
+ * capacity. Return undefined to launch nothing this tick.
196
+ * Runs on-tick: full dataset access.
197
+ * @returns {*} request
198
+ */
199
+ collect() { }
200
+
201
+ /**
202
+ * Perform the round trip. Runs OFF-tick: must not touch the dataset or
203
+ * entityManager. Typically: channel.request(...) or submit+mapAsync.
204
+ * @param {*} request
205
+ * @returns {Promise<*>} result
206
+ */
207
+ async process(request) { }
208
+
209
+ /**
210
+ * Integrate a completed result. Runs on-tick, inside this system's update
211
+ * slot, in execution order. Full dataset access. Validate entity handles
212
+ * here (§5.3).
213
+ * @param {*} result
214
+ * @param {*} request
215
+ */
216
+ apply(result, request) { }
217
+
218
+ /**
219
+ * A request whose result will never be applied: rejected, or invalidated
220
+ * by dataset detach. Default: log rejections, drop invalidations.
221
+ * @param {*} request
222
+ * @param {Error} [error]
223
+ */
224
+ discard(request, error) { }
225
+
226
+ update(dt) {
227
+ this.pump.drain(
228
+ (result, req) => this.apply(result, req),
229
+ (req, err) => this.discard(req, err),
230
+ );
231
+
232
+ if (this.pump.is_ready) {
233
+ const request = this.collect();
234
+ if (request !== undefined) {
235
+ this.pump.launch(this.process(request), request);
236
+ }
237
+ }
238
+ }
239
+
240
+ handleDatasetDetached(dataset) {
241
+ this.pump.invalidate();
242
+ }
243
+ }
244
+ ```
245
+
246
+ The authoring surface for a bridged system is **three methods** (`collect`/`process`/`apply`), all of which are independently testable — `process` doesn't need an ECS at all.
247
+
248
+ Systems that can't extend `AsyncSystem` (e.g. `AbstractContextSystem` descendants) own an `AsyncPump` directly and put the same six lines in their `update`. Systems with several independent streams own several pumps. Systems that want fixed-cadence launching call the drain/launch pair from `fixedUpdate` instead — the pump doesn't care.
249
+
250
+ Drain-then-launch order matters: results integrate first, so the subsequent `collect` sees post-apply state, and downstream systems in this tick's pass see the newly written components.
251
+
252
+ ### 5.3 Staleness: epochs and entity handles
253
+
254
+ Two mechanisms, two failure modes:
255
+
256
+ - **Dataset epoch** (pump-level, automatic): `handleDatasetDetached` bumps the epoch; anything launched under an older epoch drains to `discard`. Covers dataset switching, `clear()`-style resets (systems can call `invalidate()` manually), and shutdown.
257
+ - **Entity generation** (request-level, author's job, one helper): requests that reference entities stamp `(entity_id, generation)` pairs at `collect` time using the dataset's existing generation table. `apply` revalidates:
258
+
259
+ ```js
260
+ // engine/ecs/async/entity_handle_is_live.js
261
+ export function entity_handle_is_live(ecd, entity, generation) {
262
+ return ecd.entityExists(entity) && ecd.getEntityGeneration(entity) === generation;
263
+ }
264
+ ```
265
+
266
+ This replaces terrain's three bespoke guards with the mechanism the dataset already maintains. Per-request domain versions (like `tile.version`) remain domain logic when finer granularity is needed — the pump's `context` carries them.
267
+
268
+ Tick stamping: the pump records `entityManager.fixedStepTick` at launch time into the context (the base class does this), so `apply` always knows the age of what it is integrating — needed for interpolation-aware consumers and for the deterministic mode later (§7).
269
+
270
+ ### 5.4 `WorkerChannel` / `WorkerHost` — transport v2
271
+
272
+ A small, modern replacement for the `WorkerBuilder` codegen path. Real worker *files* instead of string concatenation — bundlers understand `new Worker(new URL(...), { type: 'module' })` statically (webpack 5 in the app today; the library's prebuilt-bundle path keeps working because the channel takes a factory).
273
+
274
+ ```js
275
+ // ---- main thread ----
276
+ const channel = await WorkerChannel.start(
277
+ () => new Worker(new URL('./path_field.worker.js', import.meta.url), { type: 'module' })
278
+ );
279
+
280
+ const reply = await channel.request('find_path', payload, [payload.buffer]); // transfers OUT
281
+ channel.notify('set_costs', costs, [costs.buffer]); // one-way
282
+ channel.on('progress', p => this.progress.set(p)); // worker-initiated
283
+ await channel.stop(); // settle in-flight, then terminate
284
+
285
+ // ---- path_field.worker.js ----
286
+ import { WorkerHost } from '.../worker/v2/WorkerHost.js';
287
+ import { find_path } from '../nav/find_path.js'; // plain engine imports — it's a module worker
288
+
289
+ WorkerHost.serve({
290
+ async find_path(payload) {
291
+ const data = find_path(payload);
292
+ return WorkerHost.result(data, [data.path.buffer]); // transfers BACK
293
+ },
294
+ set_costs(costs) { /* update local state */ },
295
+ });
296
+ ```
297
+
298
+ Contract:
299
+
300
+ - **Wire format** stays `{ id, name, payload }` / `{ id, result | error: {message, stack} }` — same spirit as `WorkerProxy`, plus `{ type: 'ready' }` handshake so `start()` resolves only when the worker booted (and boot errors reject startup instead of hanging until the 5 s watchdog).
301
+ - **Transferables both directions, always explicit.** Fixes the current request-path gap. `extractTransferables` remains available as an opt-in convenience for callers who want the recursive walk, but the default is explicit lists — moving a buffer the caller still needs is too easy to do by accident.
302
+ - **Transport-injectable**: the channel core operates on anything with `postMessage`/`message` events. `WorkerChannel.start(factory)` wraps a real `Worker`; tests construct it over a `MessageChannel` port pair (a real platform object, available in Node/Jest) with `WorkerHost.serve` on the other port — no mocks.
303
+ - **Failure**: worker `error`/`messageerror` rejects all in-flight and all future requests and fires `channel.on_dead`. No auto-restart — the owning system decides (usually: log loudly; recovery is `removeSystem`/`addSystem`, which the `EntityManager` already supports at runtime).
304
+ - **Typed wrappers over string calls**: systems wrap `channel.request('find_path', ...)` in real methods (as `makeTerrainWorkerProxy` already does), keeping string names confined to the transport seam.
305
+
306
+ The old `WorkerProxy`/`WorkerBuilder`/`OnDemandWorkerManager` stack stays — meep is a library, its consumers keep working. New code targets the channel; migrating image-decode/terrain is optional follow-up (§10). `OnDemandWorkerManager` remains the right tool for *shared utility* workers (decode pools); an `AsyncSystem`'s channel is instead owned 1:1 by the system, started in `startup`, stopped in `shutdown` — one worker per system, not per component (terrain's per-`Terrain` worker is a consolidation candidate when it migrates).
307
+
308
+ ### 5.5 Payloads: three tiers
309
+
310
+ The pump/channel don't care what a payload is; pick per system:
311
+
312
+ - **Tier 0 — structured clone.** POJOs / `toJSON` output. Right for prototyping and small requests (a path query). This is what everything uses today.
313
+ - **Tier 1 — binary + transfer.** Serialize into an `ArrayBuffer` (`core/binary/BinaryBuffer`), transfer it (zero-copy move), deserialize on the other side. For component-shaped data, the object-v2 serializer (`engine/ecs/storage/binary/object-v2/`) and the network package's per-component adapters (`engine/network/adapters/`) already define exactly this discipline — a worker mirror is "replication to a peer that happens to share your address space". Transferred buffers make a natural **ping-pong**: the worker sends the buffer back with the response, so steady-state runs allocation-free.
314
+ - **Tier 2 — SharedArrayBuffer.** For high-frequency bulk state (a physics mirror's transform block). `makeArrayBuffer(size, true)` already gates on `crossOriginIsolated`; the dev server and any host must send COOP/COEP headers. Explicitly **optional and last** — Tier 1 with ping-pong buffers covers most workloads without the deployment constraint, and no current code ships SAB.
315
+
316
+ ### 5.6 WebGPU
317
+
318
+ Three distinct shapes, only one of which needs the pump:
319
+
320
+ **a) Device ownership — `WebGPUDeviceSystem`.** One system owns the adapter/device:
321
+
322
+ ```js
323
+ class WebGPUDeviceSystem extends System {
324
+ /** @type {GPUDevice} */ device = null;
325
+
326
+ async startup(em) {
327
+ const adapter = await navigator.gpu.requestAdapter({ powerPreference: 'high-performance' });
328
+ this.device = await adapter.requestDevice({ /* limits/features */ });
329
+ this.device.lost.then(info => this.on_device_lost.send1(info)); // enqueue-only, like everything else
330
+ }
331
+ async shutdown(em) { this.device.destroy(); }
332
+ }
333
+ ```
334
+
335
+ Consumers resolve it in their own startup via the **existing** facility — no new dependency mechanism:
336
+
337
+ ```js
338
+ async startup(em) {
339
+ const gpu = await em.promiseSystemInState(WebGPUDeviceSystem, SystemState.RUNNING);
340
+ this.#pipeline = gpu.device.createComputePipeline({ ... });
341
+ }
342
+ ```
343
+
344
+ Device loss v1 = surface the signal and log; full restart-all-GPU-systems recovery mirrors the WebGL context-loss monitor work and is follow-up, not blocking.
345
+
346
+ **b) GPU-resident compute — needs nothing new.** A particle/skinning/fluid step whose results are consumed by rendering: `startup` (async) builds pipelines; `update`/`fixedUpdate` encode and `queue.submit()` — which is synchronous fire-and-forget. No readback, no pump, no core changes. This works **today** and the proposal's only contribution is writing the pattern down. (Interop caveat: sharing buffers with a three.js/WebGL renderer isn't possible — GPU-resident systems make sense once rendering itself has a WebGPU path, or when the system renders via its own WebGPU pass. Until then, GPU compute for the WebGL renderer must round-trip through the readback shape below.)
347
+
348
+ **c) Readback — the pump again.** Culling/picking/GPGPU queries where the CPU needs the numbers. The only async part of WebGPU is `mapAsync`; wrap the staging discipline once:
349
+
350
+ ```js
351
+ export class GpuReadbackRing {
352
+ constructor(device, { byte_size, depth = 3 }) { /* depth staging buffers */ }
353
+ get is_ready() { } // a free staging buffer exists
354
+ /** copy src into a free staging buffer inside the caller's encoder pass,
355
+ * returns a Promise<ArrayBuffer copy> that settles after mapAsync+copy+unmap */
356
+ read(encoder, src_buffer, byte_offset, byte_length) { }
357
+ }
358
+ ```
359
+
360
+ An occlusion-query system is then a plain `AsyncSystem`: `collect` gathers query AABBs, `process` encodes the compute pass + `ring.read(...)` + `queue.submit()` and awaits the mapped copy, `apply` writes visibility components. `capacity` = ring depth. `mapAsync` resolves in submit order, matching the pump's launch-order delivery exactly.
361
+
362
+ Worker + WebGPU compose for free: WebGPU is available inside workers, so a worker-side `process` may itself own a device (with `OffscreenCanvas` if it presents). Nothing in the design distinguishes the cases.
363
+
364
+ ### 5.7 Failure and shutdown semantics
365
+
366
+ - **Rejected round trip** → drains to `discard(request, error)`; default implementation `console.error`s with the system name (same voice as `simulate`'s per-system catch). No retry machinery: if the work is still wanted, the next tick's `collect` regenerates it from current state. Uniform flow, no hidden loops.
367
+ - **Dead worker** → all in-flight reject (flows through the same discard path), `on_dead` fires, system stays `RUNNING` but launches will reject immediately. Escalation is the owner's choice; the engine offers `removeSystem`/`addSystem` for a clean restart.
368
+ - **Shutdown ordering is already safe.** Both teardown paths (`EntityManager.shutdown` and `removeSystem`) detach the dataset / call `handleDatasetDetached` **before** invoking `System.shutdown` — so by the time an `AsyncSystem.shutdown` runs, the epoch is already bumped and nothing can be applied. Shutdown is therefore just:
369
+
370
+ ```js
371
+ async shutdown(em) {
372
+ await this.pump.settle(); // in-flight work resolves into discard
373
+ await this.#channel.stop(); // then tear down the transport
374
+ }
375
+ ```
376
+
377
+ A settle timeout (reusing the 5 s startup-watchdog convention, warn-not-kill) covers a hung worker.
378
+
379
+ ---
380
+
381
+ ## 6. Worked examples
382
+
383
+ ### 6.1 Path planning in a worker (capacity-1 coalescing)
384
+
385
+ ```js
386
+ class PathPlannerSystem extends AsyncSystem {
387
+ dependencies = [PathRequest, Transform];
388
+ components_used = [ResourceAccessSpecification.from(PathPlan, ResourceAccessKind.Create)];
389
+
390
+ #channel = null;
391
+ #dirty = []; // entities with un-serviced requests, maintained by link/unlink
392
+
393
+ async startup(em) {
394
+ this.#channel = await WorkerChannel.start(
395
+ () => new Worker(new URL('./path_planner.worker.js', import.meta.url), { type: 'module' })
396
+ );
397
+ }
398
+
399
+ async shutdown(em) {
400
+ await this.pump.settle();
401
+ await this.#channel.stop();
402
+ }
403
+
404
+ link(request, transform, entity) { this.#dirty.push(entity); }
405
+ unlink(request, transform, entity) { /* drop from #dirty */ }
406
+
407
+ collect() {
408
+ if (this.#dirty.length === 0) return undefined;
409
+
410
+ const ecd = this.entityManager.dataset;
411
+ const queries = this.#dirty.map(entity => ({
412
+ entity,
413
+ generation: ecd.getEntityGeneration(entity),
414
+ from: ecd.getComponent(entity, Transform).position.toJSON(),
415
+ to: ecd.getComponent(entity, PathRequest).target.toJSON(),
416
+ }));
417
+ this.#dirty.length = 0;
418
+ return { queries };
419
+ }
420
+
421
+ process(request) {
422
+ return this.#channel.request('plan', request);
423
+ }
424
+
425
+ apply(result, request) {
426
+ const ecd = this.entityManager.dataset;
427
+ for (const path of result.paths) {
428
+ if (!entity_handle_is_live(ecd, path.entity, path.generation)) continue; // died mid-flight
429
+ ecd.addComponentToEntity(path.entity, PathPlan.fromFlatArray(path.points));
430
+ }
431
+ }
432
+ }
433
+ ```
434
+
435
+ Behavior that falls out for free: while the worker chews on a batch, new requests pile into `#dirty`; the moment the pump frees up, the *next* batch snapshots all of them (coalescing); a slow worker means bigger batches, never a deeper queue; entities that died mid-flight are skipped by the generation check; shutdown drains cleanly.
436
+
437
+ ### 6.2 Terrain tiles, rebuilt on the primitives
438
+
439
+ Not a commitment to migrate — a demonstration that the bespoke guards collapse. `tile.version`/identity/`isBuildInProgress` become: epoch (dataset detach), `(entity, generation)` (terrain entity death), and `capacity` (in-flight limit). One system-owned channel replaces one worker per `Terrain` component. The result-application moves from a bare `.then` into `apply`, which lands at the system's slot instead of between `simulate` and `render`. Delivery of built geometry stays a transferred `ArrayBuffer` (Tier 1) exactly as today.
440
+
441
+ ### 6.3 GPU-resident compute needs nothing new
442
+
443
+ ```js
444
+ class GpuParticleSystem extends System {
445
+ async startup(em) {
446
+ const gpu = await em.promiseSystemInState(WebGPUDeviceSystem, SystemState.RUNNING);
447
+ this.#device = gpu.device;
448
+ this.#pipeline = this.#device.createComputePipeline({ /* WGSL via .wgsl import */ });
449
+ }
450
+
451
+ update(dt) {
452
+ const encoder = this.#device.createCommandEncoder();
453
+ // ... dispatchWorkgroups ...
454
+ this.#device.queue.submit([encoder.finish()]); // synchronous; done
455
+ }
456
+ }
457
+ ```
458
+
459
+ Included to make the point explicit: for the fire-and-forget half of WebGPU, the current `System` contract is already sufficient.
460
+
461
+ ### 6.4 Heavy domain mirror (physics-in-worker) — the pattern, not a commitment
462
+
463
+ For domains too big to snapshot per tick, the worker holds a **persistent mirror** and the protocol becomes *commands in, state out* — the same bet the network package already made (action-log replication, not snapshot diffs), with the same serialization discipline (`Replicator`-style per-component binary adapters, object-v2 for schema-ful payloads):
464
+
465
+ - `link`/`unlink` and component events accumulate a command list (spawn body, remove body, set gravity…).
466
+ - `collect` = drain the command list + the current `fixedStepTick` horizon; `process` = `channel.request('step', commands, transfers)`; the worker steps its world and returns packed transforms (Tier 1 ping-pong buffer, or Tier 2 SAB).
467
+ - `apply` = bulk-write `Transform`s for live entities.
468
+
469
+ **Flagged constraint:** the physics determinism gate (`determinism.spec.js`) and the network lockstep design mean a worker-side physics step may not ship on the default latency-tolerant pump — it needs the fixed-latency contract from §7. That is why this is an illustration of scale, not a v1 target.
470
+
471
+ ---
472
+
473
+ ## 7. Determinism
474
+
475
+ The default `AsyncSystem` is **latency-tolerant**: results apply at whatever tick they drain on, which depends on frame timing. That is correct for the large class of cosmetic/asset/derived-data workloads — terrain tiles, GI/probe updates, impostor and LOD bakes, occlusion results, path *suggestions*, audio probe refreshes — and wrong for anything inside the deterministic simulation envelope (lockstep-replicated state).
476
+
477
+ For sim-affecting async work, the contract has to be **fixed latency**: a request launched at fixed tick `T` applies at exactly tick `T + K`, and if the result hasn't arrived when the fixed loop reaches `T + K`, the simulation *waits* (the same shape as the network layer waiting on remote inputs; GGPO-style frame delay). That requires a small `EntityManager` hook (the fixed loop asking "may I advance past tick X?") and is deliberately **out of scope for v1** — but v1 is forward-compatible with it: requests already carry launch-tick stamps, and delivery is already launch-ordered. It becomes a `capacity`/`deadline` policy on the pump, not a redesign.
478
+
479
+ ---
480
+
481
+ ## 8. What does not change
482
+
483
+ - `System`, `EntityManager`, `EntityComponentDataset`: untouched. `simulate` stays synchronous; the noop-gate, try/catch, and runaway guard are unaffected.
484
+ - **Execution-order scheduling stays truthful.** Because an async system's writes happen inside its own `update` slot, its `components_used` declarations (e.g. `PathPlan: Create`) describe exactly when downstream systems see the data — the scheduler's scoring keeps working without knowing async exists.
485
+ - The `ConcurrentExecutor`/`Task` world is unaffected and remains the right tool for *main-thread* chunked work (lightmap bakes). `promiseTask` remains the bridge for awaiting a pump-less one-shot inside a task graph.
486
+ - Existing worker consumers keep running on `WorkerProxy` until individually migrated.
487
+
488
+ ---
489
+
490
+ ## 9. Testing plan
491
+
492
+ All black-box, no mocks beyond genuine platform boundaries:
493
+
494
+ - **`AsyncPump.spec.js`** — real Promises: launch-order delivery with out-of-order settlement, capacity gating, epoch invalidation routing to discard, rejection routing, `settle()` semantics, re-launch after settle refused.
495
+ - **`WorkerChannel.spec.js`** — channel over a real `MessageChannel` port pair (global in Node ≥ 15, available under Jest's node environment), `WorkerHost.serve` on the far port: request/response, transferable round trip (`ArrayBuffer.byteLength === 0` after transfer proves the move), error serialization, `on_dead` rejection sweep, ready handshake. Spawning a *real* `Worker` is covered by a browser harness prototype (`prototypeAsyncSystem.js` webpack entry), not Jest.
496
+ - **`AsyncSystem.spec.js`** — integration with a **real** `EntityManager` + `EntityComponentDataset`: results only ever apply during `simulate` (assert dataset untouched between simulate calls while promises settle), generation-check drops on entity removal, epoch drop on `detachDataset`, drain-then-launch ordering visible to a downstream system in the same pass, clean `settle` on `removeSystem`.
497
+ - **`GpuReadbackRing`** — behavioral spec over a stub device (WebGPU is a genuine platform boundary, like `MockAudioContext`); real-GPU verification via the browser harness.
498
+
499
+ ---
500
+
501
+ ## 10. Phasing
502
+
503
+ | Phase | Contents | Size (rough) |
504
+ |---|---|---|
505
+ | **P0** | `AsyncPump`, `AsyncSystem`, `entity_handle_is_live`, specs | ~300 LOC + specs |
506
+ | **P1** | `WorkerChannel`/`WorkerHost` (+ transferables both ways, handshake, injectable port), specs, browser harness with a real worker `AsyncSystem` | ~400 LOC + specs |
507
+ | **P2** | `WebGPUDeviceSystem`, `GpuReadbackRing`, `.wgsl` sample system in the harness | ~300 LOC |
508
+ | **P3** (opt) | Migrate `ThreadedImageDecoder`, then terrain, off `WorkerBuilder`; consolidate per-component terrain workers | migration |
509
+ | **P4** (opt) | Deterministic fixed-latency mode (fixed-loop gate in `EntityManager`); SAB tier for a physics mirror | design + core hook |
510
+
511
+ P0 is useful alone (any promise-shaped work source, including `fetch`-based systems). P1 and P2 are independent of each other.
512
+
513
+ ---
514
+
515
+ ## 11. Alternatives considered
516
+
517
+ - **`async update()` awaited by the manager.** Rejected. `simulate` would stall on the slowest system or require overlapping passes; per-system try/catch, the runaway guard, lock-step fixed ticks, and execution-order semantics all break; frame pacing becomes hostage to worker latency. The entire value of a worker is *not* waiting for it.
518
+ - **Fire-and-forget promises with `.then(apply)` (status quo).** This is what §2.5/§3 documents: uncontrolled delivery timing, bespoke staleness guards per site, no backpressure, no shutdown story. The proposal is this pattern with the sharp edges standardized away.
519
+ - **Full job-graph scheduler (Unity-DOTS-style)** — systems return handles, the manager tracks per-component access and inserts sync points. Attractive long-term (and `components_used` + `ResourceAccessKind` are exactly the metadata it needs), but it is a rewrite of `simulate`'s contract, far beyond "keep the interface simple". The pump neither blocks nor anticipates it wrongly: if a job graph ever lands, pumps become leaf nodes that publish at declared slots.
520
+ - **Running systems themselves inside workers (ECS-in-worker).** Moving the *dataset* across threads makes every component access a marshalling question and breaks the library's synchronous component API. The mirror pattern (§6.4) achieves the win — heavy domain off-thread — while the ECS stays single-threaded and simple.
521
+ - **SharedArrayBuffer-first transport.** Requires cross-origin isolation everywhere the game ships; ping-ponged transferables get most of the win with zero deployment constraints. SAB stays an opt-in tier.
522
+
523
+ ---
524
+
525
+ ## 12. Open questions
526
+
527
+ 1. **Naming.** `AsyncPump`/`AsyncSystem`/`WorkerChannel`/`WorkerHost` are provisional; `AsyncPipe`, `RoundTrip`, `BridgeSystem` were the runners-up.
528
+ 2. **Where worker entries get bundled for library consumers** — keep the meep rollup worker-entry convention (channel takes a URL/factory, so prebuilt bundles keep working), or document webpack-native `new URL` as the only supported path for apps?
529
+ 3. **Migration appetite** — is P3 (image decoder + terrain onto the channel) wanted soon, or do the old consumers ride `WorkerProxy` indefinitely?
530
+ 4. **Deterministic mode priority** — does the network lockstep roadmap need the §7 fixed-latency contract early enough to pull the `EntityManager` gate hook into P0–P2?
531
+ 5. **Device-loss policy for WebGPU** — signal-and-log (proposed v1) vs. automatic restart of GPU systems, mirroring the WebGL context-loss recovery work.
@@ -131,6 +131,21 @@ export class EntityManager {
131
131
  * @private
132
132
  */
133
133
  private updateExecutionOrder;
134
+ /**
135
+ * Register a gate consulted before each fixed step. Idempotent.
136
+ * @param {{may_advance: (next_tick: number) => boolean}} gate
137
+ * @see #fixed_step_gates
138
+ */
139
+ registerFixedStepGate(gate: {
140
+ may_advance: (next_tick: number) => boolean;
141
+ }): void;
142
+ /**
143
+ * @param {{may_advance: (next_tick: number) => boolean}} gate
144
+ * @returns {boolean} whether the gate was registered
145
+ */
146
+ unregisterFixedStepGate(gate: {
147
+ may_advance: (next_tick: number) => boolean;
148
+ }): boolean;
134
149
  /**
135
150
  * Get list of all components referenced by active systems
136
151
  * @returns {Class[]}
@@ -244,6 +259,7 @@ export class EntityManager {
244
259
  * @deprecated use lowercase spelling `detachDataset` instead
245
260
  */
246
261
  detachDataSet: () => void;
262
+ #private;
247
263
  }
248
264
  import { System } from "./System.js";
249
265
  import Signal from "../../core/events/signal/Signal.js";
@@ -1 +1 @@
1
- {"version":3,"file":"EntityManager.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityManager.js"],"names":[],"mappings":"iCAgBU,MAAM;;;;;;;;;AAiBhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IAEI;;;;OAIG;IACH,kBAFU,aAAQ,CAEL;IAEb;;;;;;OAMG;IACH,uCAA2B;IAE3B;;;;;OAKG;IACH,iCAA4B;IAE5B;;OAEG;IACH;;;QAGI;;WAEG;;;MAGL;IAEF;;;OAGG;IACH,OAFU,kBAAkB,CAEO;IAEnC;;;;;;;;;OASG;IACH,qBAFU,MAAM,CAEqB;IAErC;;;;;;;;OAQG;IACH,wCAFU,MAAM,CAE4B;IAE5C;;;;;;;;OAQG;IACH,eAFU,MAAM,CAEE;IAElB;;;;;OAKG;IACH,+BAA2B;IAE3B;;;;OAIG;IACH,SAFU,sBAAsB,CAEjB;IAEf;;;;;OAKG;IACH,uCAAsC;IAEtC;;;OAGG;IACH,6BAmFC;IAED;;;OAGG;IACH,uBAFa,OAAO,CAuBnB;IAED;;;;;OAKG;IACH,uBAJW,sBAAsB,QA4ChC;IAGD;;;OAGG;IACH,sBA2BC;IAED;;;;OAIG;IACH,qCAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,6CAgBC;IAED;;;;;OAKG;IACH,wCAHW,MAAM,GACJ,IAAI,aAAS,CAiBzB;IAGD;;;OAGG;IACH,6BAFW,MAAM,QA8EhB;IAED;;;;;;;;;OASG;IACH,qBAFa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,6CA6DC;IAED;;;;OAIG;IACH,mCAFa,QAAQ,OAAO,CAAC,CA2C5B;IAED;;;;;OAKG;IACH,mBAmCC;IAED;;;;;OAKG;IACH,oBAqFC;IAED;;;;;OAKG;IACH,kEAyEC;IAED;;;;OAIG;IACH,mCAFa,oBAAgB,CA0B5B;IAED;;;;OAIG;IACH,gDAHW,WAAW,GACT,oBAAgB,CA0B5B;IAED;;;;;OAKG;IACH,mEAoFC;IAGL;;OAEG;IACH,yBArtBe,sBAAsB,UAqtBA;IACrC;;OAEG;IACH,0BAAqC;CATpC;uBAh+BmC,aAAa;mBAR9B,oCAAoC;uCAMhB,6BAA6B;4BAEhC,aAAa"}
1
+ {"version":3,"file":"EntityManager.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityManager.js"],"names":[],"mappings":"iCAgBU,MAAM;;;;;;;;;AAiBhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IAEI;;;;OAIG;IACH,kBAFU,aAAQ,CAEL;IAEb;;;;;;OAMG;IACH,uCAA2B;IAE3B;;;;;OAKG;IACH,iCAA4B;IAE5B;;OAEG;IACH;;;QAGI;;WAEG;;;MAGL;IAEF;;;OAGG;IACH,OAFU,kBAAkB,CAEO;IAEnC;;;;;;;;;OASG;IACH,qBAFU,MAAM,CAEqB;IAErC;;;;;;;;OAQG;IACH,wCAFU,MAAM,CAE4B;IAE5C;;;;;;;;OAQG;IACH,eAFU,MAAM,CAEE;IAElB;;;;;OAKG;IACH,+BAA2B;IAE3B;;;;OAIG;IACH,SAFU,sBAAsB,CAEjB;IAuBf;;;;;OAKG;IACH,uCAAsC;IAEtC;;;OAGG;IACH,6BAmFC;IAED;;;;OAIG;IACH;iCAHqC,MAAM,KAAK,OAAO;aAatD;IAED;;;OAGG;IACH;iCAHqC,MAAM,KAAK,OAAO;QAC1C,OAAO,CAYnB;IAoBD;;;OAGG;IACH,uBAFa,OAAO,CAuBnB;IAED;;;;;OAKG;IACH,uBAJW,sBAAsB,QA4ChC;IAGD;;;OAGG;IACH,sBA2BC;IAED;;;;OAIG;IACH,qCAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,6CAgBC;IAED;;;;;OAKG;IACH,wCAHW,MAAM,GACJ,IAAI,aAAS,CAiBzB;IAGD;;;OAGG;IACH,6BAFW,MAAM,QAuFhB;IAED;;;;;;;;;OASG;IACH,qBAFa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,6CA6DC;IAED;;;;OAIG;IACH,mCAFa,QAAQ,OAAO,CAAC,CA2C5B;IAED;;;;;OAKG;IACH,mBAmCC;IAED;;;;;OAKG;IACH,oBAqFC;IAED;;;;;OAKG;IACH,kEAyEC;IAED;;;;OAIG;IACH,mCAFa,oBAAgB,CA0B5B;IAED;;;;OAIG;IACH,gDAHW,WAAW,GACT,oBAAgB,CA0B5B;IAED;;;;;OAKG;IACH,mEAoFC;IAGL;;OAEG;IACH,yBA9tBe,sBAAsB,UA8tBA;IACrC;;OAEG;IACH,0BAAqC;;CATpC;uBAjjCmC,aAAa;mBAR9B,oCAAoC;uCAMhB,6BAA6B;4BAEhC,aAAa"}