@vgai/engine 0.5.5 → 0.5.6

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 (446) hide show
  1. package/dist/adapter/adapter-surface.d.ts +30 -0
  2. package/dist/adapter/adapter-surface.d.ts.map +1 -0
  3. package/dist/adapter/adapter-surface.js +18 -0
  4. package/dist/adapter/authoring.d.ts +597 -0
  5. package/dist/adapter/authoring.d.ts.map +1 -0
  6. package/dist/adapter/authoring.js +22 -0
  7. package/dist/adapter/colyseus-networking-adapter.d.ts +77 -0
  8. package/dist/adapter/colyseus-networking-adapter.d.ts.map +1 -0
  9. package/dist/adapter/colyseus-networking-adapter.js +76 -0
  10. package/dist/adapter/first-party-systems.d.ts +23 -0
  11. package/dist/adapter/first-party-systems.d.ts.map +1 -0
  12. package/dist/adapter/first-party-systems.js +196 -0
  13. package/dist/adapter/host-context.d.ts +194 -0
  14. package/dist/adapter/host-context.d.ts.map +1 -0
  15. package/dist/adapter/host-context.js +80 -0
  16. package/dist/adapter/index.d.ts +33 -0
  17. package/dist/adapter/index.d.ts.map +1 -0
  18. package/dist/adapter/index.js +25 -0
  19. package/dist/adapter/ingest/game-contract.d.ts +53 -0
  20. package/dist/adapter/ingest/game-contract.d.ts.map +1 -0
  21. package/dist/adapter/ingest/game-contract.js +30 -0
  22. package/dist/adapter/ingest/scene-capture.d.ts +121 -0
  23. package/dist/adapter/ingest/scene-capture.d.ts.map +1 -0
  24. package/dist/adapter/ingest/scene-capture.js +270 -0
  25. package/dist/adapter/ingest/structural-ids.d.ts +64 -0
  26. package/dist/adapter/ingest/structural-ids.d.ts.map +1 -0
  27. package/dist/adapter/ingest/structural-ids.js +110 -0
  28. package/dist/adapter/ingest/upstream-pin.d.ts +44 -0
  29. package/dist/adapter/ingest/upstream-pin.d.ts.map +1 -0
  30. package/dist/adapter/ingest/upstream-pin.js +47 -0
  31. package/dist/adapter/loop-gate-report.d.ts +34 -0
  32. package/dist/adapter/loop-gate-report.d.ts.map +1 -0
  33. package/dist/adapter/loop-gate-report.js +37 -0
  34. package/dist/adapter/rapier-physics-adapter.d.ts +69 -0
  35. package/dist/adapter/rapier-physics-adapter.d.ts.map +1 -0
  36. package/dist/adapter/rapier-physics-adapter.js +135 -0
  37. package/dist/adapter/root-adapter.d.ts +195 -0
  38. package/dist/adapter/root-adapter.d.ts.map +1 -0
  39. package/dist/adapter/root-adapter.js +25 -0
  40. package/dist/adapter/setup-three-root-adapter.d.ts +87 -0
  41. package/dist/adapter/setup-three-root-adapter.d.ts.map +1 -0
  42. package/dist/adapter/setup-three-root-adapter.js +791 -0
  43. package/dist/adapter/system-adapter.d.ts +453 -0
  44. package/dist/adapter/system-adapter.d.ts.map +1 -0
  45. package/dist/adapter/system-adapter.js +13 -0
  46. package/dist/adapter/transform.d.ts +18 -0
  47. package/dist/adapter/transform.d.ts.map +1 -0
  48. package/dist/adapter/transform.js +1 -0
  49. package/dist/ai/navigation.d.ts +78 -0
  50. package/dist/ai/navigation.d.ts.map +1 -0
  51. package/dist/ai/navigation.js +152 -0
  52. package/dist/animation/anim-graph-types.d.ts +25 -0
  53. package/dist/animation/anim-graph-types.d.ts.map +1 -0
  54. package/dist/animation/anim-graph-types.js +1 -0
  55. package/dist/animation/animation-clock.d.ts +213 -0
  56. package/dist/animation/animation-clock.d.ts.map +1 -0
  57. package/dist/animation/animation-clock.js +301 -0
  58. package/dist/animation/blend-node.d.ts +22 -0
  59. package/dist/animation/blend-node.d.ts.map +1 -0
  60. package/dist/animation/blend-node.js +97 -0
  61. package/dist/animation/camera-ownership.d.ts +249 -0
  62. package/dist/animation/camera-ownership.d.ts.map +1 -0
  63. package/dist/animation/camera-ownership.js +169 -0
  64. package/dist/animation/cinematic-cues.d.ts +200 -0
  65. package/dist/animation/cinematic-cues.d.ts.map +1 -0
  66. package/dist/animation/cinematic-cues.js +213 -0
  67. package/dist/animation/clip-map.d.ts +12 -0
  68. package/dist/animation/clip-map.d.ts.map +1 -0
  69. package/dist/animation/clip-map.js +31 -0
  70. package/dist/animation/cubic-spline-interpolant.d.ts +54 -0
  71. package/dist/animation/cubic-spline-interpolant.d.ts.map +1 -0
  72. package/dist/animation/cubic-spline-interpolant.js +111 -0
  73. package/dist/animation/theatre-clock-binding.d.ts +89 -0
  74. package/dist/animation/theatre-clock-binding.d.ts.map +1 -0
  75. package/dist/animation/theatre-clock-binding.js +29 -0
  76. package/dist/animation/theatre-director.d.ts +277 -0
  77. package/dist/animation/theatre-director.d.ts.map +1 -0
  78. package/dist/animation/theatre-director.js +248 -0
  79. package/dist/animation/theatre-object-binding.d.ts +305 -0
  80. package/dist/animation/theatre-object-binding.d.ts.map +1 -0
  81. package/dist/animation/theatre-object-binding.js +351 -0
  82. package/dist/animation/xstate-animation-binding.d.ts +119 -0
  83. package/dist/animation/xstate-animation-binding.d.ts.map +1 -0
  84. package/dist/animation/xstate-animation-binding.js +349 -0
  85. package/dist/animation/xstate-animation-meta.d.ts +266 -0
  86. package/dist/animation/xstate-animation-meta.d.ts.map +1 -0
  87. package/dist/animation/xstate-animation-meta.js +252 -0
  88. package/dist/asset-formats/camera.d.ts +15 -0
  89. package/dist/asset-formats/camera.d.ts.map +1 -0
  90. package/dist/asset-formats/camera.js +15 -0
  91. package/dist/asset-formats/collider.d.ts +21 -0
  92. package/dist/asset-formats/collider.d.ts.map +1 -0
  93. package/dist/asset-formats/collider.js +53 -0
  94. package/dist/asset-formats/index.d.ts +46 -0
  95. package/dist/asset-formats/index.d.ts.map +1 -0
  96. package/dist/asset-formats/index.js +36 -0
  97. package/dist/asset-formats/instances.d.ts +17 -0
  98. package/dist/asset-formats/instances.d.ts.map +1 -0
  99. package/dist/asset-formats/instances.js +31 -0
  100. package/dist/asset-formats/light.d.ts +21 -0
  101. package/dist/asset-formats/light.d.ts.map +1 -0
  102. package/dist/asset-formats/light.js +35 -0
  103. package/dist/asset-formats/material.d.ts +129 -0
  104. package/dist/asset-formats/material.d.ts.map +1 -0
  105. package/dist/asset-formats/material.js +88 -0
  106. package/dist/asset-formats/mesh.d.ts +22 -0
  107. package/dist/asset-formats/mesh.d.ts.map +1 -0
  108. package/dist/asset-formats/mesh.js +64 -0
  109. package/dist/asset-formats/parse.d.ts +20 -0
  110. package/dist/asset-formats/parse.d.ts.map +1 -0
  111. package/dist/asset-formats/parse.js +34 -0
  112. package/dist/asset-formats/particles.d.ts +1390 -0
  113. package/dist/asset-formats/particles.d.ts.map +1 -0
  114. package/dist/asset-formats/particles.js +319 -0
  115. package/dist/asset-formats/render-env.d.ts +387 -0
  116. package/dist/asset-formats/render-env.d.ts.map +1 -0
  117. package/dist/asset-formats/render-env.js +300 -0
  118. package/dist/asset-formats/tuples.d.ts +12 -0
  119. package/dist/asset-formats/tuples.d.ts.map +1 -0
  120. package/dist/asset-formats/tuples.js +14 -0
  121. package/dist/asset-loaders.d.ts +97 -0
  122. package/dist/asset-loaders.d.ts.map +1 -0
  123. package/dist/asset-loaders.js +209 -0
  124. package/dist/asset-parse-error.d.ts +24 -0
  125. package/dist/asset-parse-error.d.ts.map +1 -0
  126. package/dist/asset-parse-error.js +29 -0
  127. package/dist/asset-registry.d.ts +38 -0
  128. package/dist/asset-registry.d.ts.map +1 -0
  129. package/dist/asset-registry.js +66 -0
  130. package/dist/assets.d.ts +26 -0
  131. package/dist/assets.d.ts.map +1 -0
  132. package/dist/assets.js +55 -0
  133. package/dist/audio/wav-encode.d.ts +38 -0
  134. package/dist/audio/wav-encode.d.ts.map +1 -0
  135. package/dist/audio/wav-encode.js +97 -0
  136. package/dist/canvas-react/engine-bridge.d.ts +45 -0
  137. package/dist/canvas-react/engine-bridge.d.ts.map +1 -0
  138. package/dist/canvas-react/engine-bridge.js +45 -0
  139. package/dist/canvas-react/index.d.ts +42 -0
  140. package/dist/canvas-react/index.d.ts.map +1 -0
  141. package/dist/canvas-react/index.js +41 -0
  142. package/dist/canvas-react/pixi-primitive.d.ts +85 -0
  143. package/dist/canvas-react/pixi-primitive.d.ts.map +1 -0
  144. package/dist/canvas-react/pixi-primitive.js +181 -0
  145. package/dist/canvas-react/pixi-react-adapter.d.ts +71 -0
  146. package/dist/canvas-react/pixi-react-adapter.d.ts.map +1 -0
  147. package/dist/canvas-react/pixi-react-adapter.js +229 -0
  148. package/dist/canvas-react/pixi-react-root-factory.d.ts +56 -0
  149. package/dist/canvas-react/pixi-react-root-factory.d.ts.map +1 -0
  150. package/dist/canvas-react/pixi-react-root-factory.js +73 -0
  151. package/dist/canvas-react/world-context.d.ts +88 -0
  152. package/dist/canvas-react/world-context.d.ts.map +1 -0
  153. package/dist/canvas-react/world-context.js +212 -0
  154. package/dist/config.d.ts +9 -0
  155. package/dist/config.d.ts.map +1 -0
  156. package/dist/config.js +8 -0
  157. package/dist/core/frame-pacing.d.ts +90 -0
  158. package/dist/core/frame-pacing.d.ts.map +1 -0
  159. package/dist/core/frame-pacing.js +89 -0
  160. package/dist/core/game-loop.d.ts +62 -0
  161. package/dist/core/game-loop.d.ts.map +1 -0
  162. package/dist/core/game-loop.js +189 -0
  163. package/dist/core/seeded-random.d.ts +69 -0
  164. package/dist/core/seeded-random.d.ts.map +1 -0
  165. package/dist/core/seeded-random.js +121 -0
  166. package/dist/core/sim-clock.d.ts +199 -0
  167. package/dist/core/sim-clock.d.ts.map +1 -0
  168. package/dist/core/sim-clock.js +291 -0
  169. package/dist/core/system-runner.d.ts +96 -0
  170. package/dist/core/system-runner.d.ts.map +1 -0
  171. package/dist/core/system-runner.js +253 -0
  172. package/dist/core/types.d.ts +111 -0
  173. package/dist/core/types.d.ts.map +1 -0
  174. package/dist/core/types.js +25 -0
  175. package/dist/data/data-asset.d.ts +101 -0
  176. package/dist/data/data-asset.d.ts.map +1 -0
  177. package/dist/data/data-asset.js +122 -0
  178. package/dist/data/data-check-core.d.ts +109 -0
  179. package/dist/data/data-check-core.d.ts.map +1 -0
  180. package/dist/data/data-check-core.js +177 -0
  181. package/dist/data/data-ref.d.ts +79 -0
  182. package/dist/data/data-ref.d.ts.map +1 -0
  183. package/dist/data/data-ref.js +130 -0
  184. package/dist/data/vite-plugin-data.d.ts +79 -0
  185. package/dist/data/vite-plugin-data.d.ts.map +1 -0
  186. package/dist/data/vite-plugin-data.js +217 -0
  187. package/dist/defaults.d.ts +233 -0
  188. package/dist/defaults.d.ts.map +1 -0
  189. package/dist/defaults.js +137 -0
  190. package/dist/dev/chrome-trace.d.ts +45 -0
  191. package/dist/dev/chrome-trace.d.ts.map +1 -0
  192. package/dist/dev/chrome-trace.js +114 -0
  193. package/dist/dev/console-bridge.d.ts +22 -0
  194. package/dist/dev/console-bridge.d.ts.map +1 -0
  195. package/dist/dev/console-bridge.js +71 -0
  196. package/dist/dev/debug-draw.d.ts +24 -0
  197. package/dist/dev/debug-draw.d.ts.map +1 -0
  198. package/dist/dev/debug-draw.js +73 -0
  199. package/dist/dev/instruments.d.ts +133 -0
  200. package/dist/dev/instruments.d.ts.map +1 -0
  201. package/dist/dev/instruments.js +231 -0
  202. package/dist/dev/logger.d.ts +30 -0
  203. package/dist/dev/logger.d.ts.map +1 -0
  204. package/dist/dev/logger.js +90 -0
  205. package/dist/dev/performance-profiler.d.ts +111 -0
  206. package/dist/dev/performance-profiler.d.ts.map +1 -0
  207. package/dist/dev/performance-profiler.js +215 -0
  208. package/dist/dev/render-debug-adapter.d.ts +57 -0
  209. package/dist/dev/render-debug-adapter.d.ts.map +1 -0
  210. package/dist/dev/render-debug-adapter.js +141 -0
  211. package/dist/dev/render-memory.d.ts +53 -0
  212. package/dist/dev/render-memory.d.ts.map +1 -0
  213. package/dist/dev/render-memory.js +190 -0
  214. package/dist/dev/webgl-frame-capture.d.ts +134 -0
  215. package/dist/dev/webgl-frame-capture.d.ts.map +1 -0
  216. package/dist/dev/webgl-frame-capture.js +270 -0
  217. package/dist/dev/webgl-gpu-timer.d.ts +8 -0
  218. package/dist/dev/webgl-gpu-timer.d.ts.map +1 -0
  219. package/dist/dev/webgl-gpu-timer.js +52 -0
  220. package/dist/ecs/scene-index.d.ts +179 -0
  221. package/dist/ecs/scene-index.d.ts.map +1 -0
  222. package/dist/ecs/scene-index.js +331 -0
  223. package/dist/ecs/scene-query.d.ts +6 -0
  224. package/dist/ecs/scene-query.d.ts.map +1 -0
  225. package/dist/ecs/scene-query.js +40 -0
  226. package/dist/ecs/user-data.d.ts +193 -0
  227. package/dist/ecs/user-data.d.ts.map +1 -0
  228. package/dist/ecs/user-data.js +145 -0
  229. package/dist/index.d.ts +35 -0
  230. package/dist/index.d.ts.map +1 -0
  231. package/dist/index.js +29 -0
  232. package/dist/input/input-manager.d.ts +944 -0
  233. package/dist/input/input-manager.d.ts.map +1 -0
  234. package/dist/input/input-manager.js +2209 -0
  235. package/dist/input/input-types.d.ts +174 -0
  236. package/dist/input/input-types.d.ts.map +1 -0
  237. package/dist/input/input-types.js +1 -0
  238. package/dist/input/prompt-labels.d.ts +21 -0
  239. package/dist/input/prompt-labels.d.ts.map +1 -0
  240. package/dist/input/prompt-labels.js +121 -0
  241. package/dist/input/rebind-controller.d.ts +59 -0
  242. package/dist/input/rebind-controller.d.ts.map +1 -0
  243. package/dist/input/rebind-controller.js +85 -0
  244. package/dist/input/schema.d.ts +16 -0
  245. package/dist/input/schema.d.ts.map +1 -0
  246. package/dist/input/schema.js +228 -0
  247. package/dist/loader.d.ts +76 -0
  248. package/dist/loader.d.ts.map +1 -0
  249. package/dist/loader.js +114 -0
  250. package/dist/manifest/editor-port.d.ts +53 -0
  251. package/dist/manifest/editor-port.d.ts.map +1 -0
  252. package/dist/manifest/editor-port.js +67 -0
  253. package/dist/manifest/filename.d.ts +14 -0
  254. package/dist/manifest/filename.d.ts.map +1 -0
  255. package/dist/manifest/filename.js +43 -0
  256. package/dist/manifest/index.d.ts +6 -0
  257. package/dist/manifest/index.d.ts.map +1 -0
  258. package/dist/manifest/index.js +9 -0
  259. package/dist/manifest/load-file.d.ts +7 -0
  260. package/dist/manifest/load-file.d.ts.map +1 -0
  261. package/dist/manifest/load-file.js +23 -0
  262. package/dist/manifest/load.d.ts +161 -0
  263. package/dist/manifest/load.d.ts.map +1 -0
  264. package/dist/manifest/load.js +269 -0
  265. package/dist/manifest/locate.d.ts +24 -0
  266. package/dist/manifest/locate.d.ts.map +1 -0
  267. package/dist/manifest/locate.js +48 -0
  268. package/dist/manifest/schema.d.ts +293 -0
  269. package/dist/manifest/schema.d.ts.map +1 -0
  270. package/dist/manifest/schema.js +633 -0
  271. package/dist/physics/collider-dimensions.d.ts +63 -0
  272. package/dist/physics/collider-dimensions.d.ts.map +1 -0
  273. package/dist/physics/collider-dimensions.js +98 -0
  274. package/dist/physics/collision-system.d.ts +41 -0
  275. package/dist/physics/collision-system.d.ts.map +1 -0
  276. package/dist/physics/collision-system.js +64 -0
  277. package/dist/physics/physics-registry.d.ts +45 -0
  278. package/dist/physics/physics-registry.d.ts.map +1 -0
  279. package/dist/physics/physics-registry.js +65 -0
  280. package/dist/physics/transform-writer.d.ts +16 -0
  281. package/dist/physics/transform-writer.d.ts.map +1 -0
  282. package/dist/physics/transform-writer.js +38 -0
  283. package/dist/pixi/authoring.d.ts +93 -0
  284. package/dist/pixi/authoring.d.ts.map +1 -0
  285. package/dist/pixi/authoring.js +207 -0
  286. package/dist/pixi/index.d.ts +16 -0
  287. package/dist/pixi/index.d.ts.map +1 -0
  288. package/dist/pixi/index.js +15 -0
  289. package/dist/pixi/ingest-iframe.d.ts +82 -0
  290. package/dist/pixi/ingest-iframe.d.ts.map +1 -0
  291. package/dist/pixi/ingest-iframe.js +166 -0
  292. package/dist/pixi/ingest.d.ts +97 -0
  293. package/dist/pixi/ingest.d.ts.map +1 -0
  294. package/dist/pixi/ingest.js +40 -0
  295. package/dist/pixi/physics-registry.d.ts +24 -0
  296. package/dist/pixi/physics-registry.d.ts.map +1 -0
  297. package/dist/pixi/physics-registry.js +38 -0
  298. package/dist/pixi/scene-capture.d.ts +43 -0
  299. package/dist/pixi/scene-capture.d.ts.map +1 -0
  300. package/dist/pixi/scene-capture.js +92 -0
  301. package/dist/pixi/system-adapters.d.ts +16 -0
  302. package/dist/pixi/system-adapters.d.ts.map +1 -0
  303. package/dist/pixi/system-adapters.js +37 -0
  304. package/dist/react/unmanaged-root-detector.d.ts +18 -0
  305. package/dist/react/unmanaged-root-detector.d.ts.map +1 -0
  306. package/dist/react/unmanaged-root-detector.js +70 -0
  307. package/dist/react/use-data.d.ts +60 -0
  308. package/dist/react/use-data.d.ts.map +1 -0
  309. package/dist/react/use-data.js +101 -0
  310. package/dist/react/use-selection.d.ts +54 -0
  311. package/dist/react/use-selection.d.ts.map +1 -0
  312. package/dist/react/use-selection.js +71 -0
  313. package/dist/react/world-state.d.ts +154 -0
  314. package/dist/react/world-state.d.ts.map +1 -0
  315. package/dist/react/world-state.js +220 -0
  316. package/dist/render/auto-batcher.d.ts +34 -0
  317. package/dist/render/auto-batcher.d.ts.map +1 -0
  318. package/dist/render/auto-batcher.js +140 -0
  319. package/dist/render/instance-mesh.d.ts +5 -0
  320. package/dist/render/instance-mesh.d.ts.map +1 -0
  321. package/dist/render/instance-mesh.js +19 -0
  322. package/dist/render/light-camera-factory.d.ts +24 -0
  323. package/dist/render/light-camera-factory.d.ts.map +1 -0
  324. package/dist/render/light-camera-factory.js +71 -0
  325. package/dist/render/lod.d.ts +13 -0
  326. package/dist/render/lod.d.ts.map +1 -0
  327. package/dist/render/lod.js +16 -0
  328. package/dist/render/material-factory.d.ts +15 -0
  329. package/dist/render/material-factory.d.ts.map +1 -0
  330. package/dist/render/material-factory.js +186 -0
  331. package/dist/render/mesh-shadow.d.ts +11 -0
  332. package/dist/render/mesh-shadow.d.ts.map +1 -0
  333. package/dist/render/mesh-shadow.js +19 -0
  334. package/dist/render/particles-factory.d.ts +99 -0
  335. package/dist/render/particles-factory.d.ts.map +1 -0
  336. package/dist/render/particles-factory.js +361 -0
  337. package/dist/render/render-batch-system.d.ts +33 -0
  338. package/dist/render/render-batch-system.d.ts.map +1 -0
  339. package/dist/render/render-batch-system.js +223 -0
  340. package/dist/render/render-features.d.ts +47 -0
  341. package/dist/render/render-features.d.ts.map +1 -0
  342. package/dist/render/render-features.js +105 -0
  343. package/dist/render/render-settings.d.ts +35 -0
  344. package/dist/render/render-settings.d.ts.map +1 -0
  345. package/dist/render/render-settings.js +51 -0
  346. package/dist/render/spark-renderer-lifecycle.d.ts +18 -0
  347. package/dist/render/spark-renderer-lifecycle.d.ts.map +1 -0
  348. package/dist/render/spark-renderer-lifecycle.js +57 -0
  349. package/dist/render/viewport-shading.d.ts +17 -0
  350. package/dist/render/viewport-shading.d.ts.map +1 -0
  351. package/dist/render/viewport-shading.js +87 -0
  352. package/dist/runtime/create-runtime.d.ts +259 -0
  353. package/dist/runtime/create-runtime.d.ts.map +1 -0
  354. package/dist/runtime/create-runtime.js +666 -0
  355. package/dist/runtime/debug-bridge.d.ts +288 -0
  356. package/dist/runtime/debug-bridge.d.ts.map +1 -0
  357. package/dist/runtime/debug-bridge.js +277 -0
  358. package/dist/runtime/debug-registry.d.ts +287 -0
  359. package/dist/runtime/debug-registry.d.ts.map +1 -0
  360. package/dist/runtime/debug-registry.js +528 -0
  361. package/dist/runtime/dev-layers.d.ts +34 -0
  362. package/dist/runtime/dev-layers.d.ts.map +1 -0
  363. package/dist/runtime/dev-layers.js +40 -0
  364. package/dist/runtime/frame-selector-cache.d.ts +41 -0
  365. package/dist/runtime/frame-selector-cache.d.ts.map +1 -0
  366. package/dist/runtime/frame-selector-cache.js +65 -0
  367. package/dist/runtime/game.d.ts +576 -0
  368. package/dist/runtime/game.d.ts.map +1 -0
  369. package/dist/runtime/game.js +1003 -0
  370. package/dist/runtime/gameplay-rng-trap.d.ts +47 -0
  371. package/dist/runtime/gameplay-rng-trap.d.ts.map +1 -0
  372. package/dist/runtime/gameplay-rng-trap.js +95 -0
  373. package/dist/runtime/input-router.d.ts +78 -0
  374. package/dist/runtime/input-router.d.ts.map +1 -0
  375. package/dist/runtime/input-router.js +171 -0
  376. package/dist/runtime/mount-game.d.ts +126 -0
  377. package/dist/runtime/mount-game.d.ts.map +1 -0
  378. package/dist/runtime/mount-game.js +159 -0
  379. package/dist/runtime/mount-manifest.d.ts +174 -0
  380. package/dist/runtime/mount-manifest.d.ts.map +1 -0
  381. package/dist/runtime/mount-manifest.js +304 -0
  382. package/dist/runtime/presentation.d.ts +85 -0
  383. package/dist/runtime/presentation.d.ts.map +1 -0
  384. package/dist/runtime/presentation.js +92 -0
  385. package/dist/runtime/render-audio-control.d.ts +126 -0
  386. package/dist/runtime/render-audio-control.d.ts.map +1 -0
  387. package/dist/runtime/render-audio-control.js +116 -0
  388. package/dist/runtime/render-control.d.ts +347 -0
  389. package/dist/runtime/render-control.d.ts.map +1 -0
  390. package/dist/runtime/render-control.js +317 -0
  391. package/dist/runtime/render-seed.d.ts +56 -0
  392. package/dist/runtime/render-seed.d.ts.map +1 -0
  393. package/dist/runtime/render-seed.js +73 -0
  394. package/dist/runtime/state-bridge.d.ts +60 -0
  395. package/dist/runtime/state-bridge.d.ts.map +1 -0
  396. package/dist/runtime/state-bridge.js +62 -0
  397. package/dist/runtime/types.d.ts +285 -0
  398. package/dist/runtime/types.d.ts.map +1 -0
  399. package/dist/runtime/types.js +1 -0
  400. package/dist/runtime/unexported-game-trap.d.ts +36 -0
  401. package/dist/runtime/unexported-game-trap.d.ts.map +1 -0
  402. package/dist/runtime/unexported-game-trap.js +80 -0
  403. package/dist/setup/setup-audio.d.ts +20 -0
  404. package/dist/setup/setup-audio.d.ts.map +1 -0
  405. package/dist/setup/setup-audio.js +41 -0
  406. package/dist/setup/setup-particles.d.ts +17 -0
  407. package/dist/setup/setup-particles.d.ts.map +1 -0
  408. package/dist/setup/setup-particles.js +16 -0
  409. package/dist/setup/setup-physics.d.ts +25 -0
  410. package/dist/setup/setup-physics.d.ts.map +1 -0
  411. package/dist/setup/setup-physics.js +51 -0
  412. package/dist/setup/setup-renderer.d.ts +82 -0
  413. package/dist/setup/setup-renderer.d.ts.map +1 -0
  414. package/dist/setup/setup-renderer.js +381 -0
  415. package/dist/world3d-react/engine-bridge.d.ts +47 -0
  416. package/dist/world3d-react/engine-bridge.d.ts.map +1 -0
  417. package/dist/world3d-react/engine-bridge.js +48 -0
  418. package/dist/world3d-react/index.d.ts +47 -0
  419. package/dist/world3d-react/index.d.ts.map +1 -0
  420. package/dist/world3d-react/index.js +46 -0
  421. package/dist/world3d-react/r3f-adapter.d.ts +51 -0
  422. package/dist/world3d-react/r3f-adapter.d.ts.map +1 -0
  423. package/dist/world3d-react/r3f-adapter.js +368 -0
  424. package/dist/world3d-react/r3f-root-factory.d.ts +62 -0
  425. package/dist/world3d-react/r3f-root-factory.d.ts.map +1 -0
  426. package/dist/world3d-react/r3f-root-factory.js +79 -0
  427. package/dist/world3d-react/rapier-physics-bridge.d.ts +76 -0
  428. package/dist/world3d-react/rapier-physics-bridge.d.ts.map +1 -0
  429. package/dist/world3d-react/rapier-physics-bridge.js +120 -0
  430. package/dist/world3d-react/renderer-config.d.ts +58 -0
  431. package/dist/world3d-react/renderer-config.d.ts.map +1 -0
  432. package/dist/world3d-react/renderer-config.js +96 -0
  433. package/dist/world3d-react/world-context.d.ts +123 -0
  434. package/dist/world3d-react/world-context.d.ts.map +1 -0
  435. package/dist/world3d-react/world-context.js +204 -0
  436. package/dist-config/config.js +303 -0
  437. package/dist-config/config.js.map +7 -0
  438. package/package.json +14 -3
  439. package/src/adapter/rapier-physics-adapter.ts +77 -34
  440. package/src/config.ts +8 -0
  441. package/src/core/frame-pacing.ts +26 -0
  442. package/src/core/game-loop.ts +4 -3
  443. package/src/dev/instruments.ts +302 -0
  444. package/src/setup/setup-renderer.ts +2 -0
  445. package/src/world3d-react/index.ts +9 -0
  446. package/src/world3d-react/rapier-physics-bridge.tsx +137 -0
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Pure, react-free frame-version cache (T7.4 slice 1).
3
+ * `useWorldState` (`packages/editor/template/src/
4
+ * ui/game-state.tsx`) is a thin `useSyncExternalStore` wrapper
5
+ * around this: `getSnapshot` re-runs the selector once per `frameVersion`
6
+ * bump (`GameStateBridge`, `runtime/state-bridge.ts`), caches by version,
7
+ * and returns the PREVIOUS reference when `equals` holds against the fresh
8
+ * result — that reference stability is what lets `useSyncExternalStore`
9
+ * (and thus React) bail out of a re-render.
10
+ *
11
+ * Extracted to its own react-free module (no react import here, or anywhere
12
+ * under `runtime/`) so this cache/equality logic — the part of the hook
13
+ * that has real branching to get wrong — is unit-testable headlessly under
14
+ * `packages/engine/test/`, without needing a react test harness (none
15
+ * exists in this repo today; see `test/frame-selector-cache.test.ts`).
16
+ */
17
+ /**
18
+ * One-level shallow-equality helper (own enumerable keys, `Object.is` per
19
+ * value) — the opt-in equality for selectors that return a fresh
20
+ * object/array/tuple every call. Two non-object values fall back to
21
+ * `Object.is`; a non-object compared against an object is never equal.
22
+ */
23
+ export function shallow(a, b) {
24
+ if (Object.is(a, b))
25
+ return true;
26
+ if (typeof a !== 'object' || a === null || typeof b !== 'object' || b === null) {
27
+ return false;
28
+ }
29
+ const aKeys = Object.keys(a);
30
+ const bKeys = Object.keys(b);
31
+ if (aKeys.length !== bKeys.length)
32
+ return false;
33
+ const bRecord = b;
34
+ for (const key of aKeys) {
35
+ if (!Object.is(a[key], bRecord[key]))
36
+ return false;
37
+ }
38
+ return true;
39
+ }
40
+ /** Construct a fresh per-subscriber cache. One per `useWorldState` call site
41
+ * (a fresh cache each mount — see the hook). */
42
+ export function createFrameSelectorCache(equals = Object.is) {
43
+ let hasValue = false;
44
+ let cachedVersion = -1;
45
+ let cachedValue;
46
+ return {
47
+ get(frameVersion, compute) {
48
+ if (hasValue && frameVersion === cachedVersion) {
49
+ return cachedValue;
50
+ }
51
+ const next = compute();
52
+ if (hasValue && equals(cachedValue, next)) {
53
+ // Bail-out: keep the PREVIOUS reference, but remember we're current
54
+ // as of this frameVersion so a repeat call at the same version
55
+ // doesn't even re-run `compute`.
56
+ cachedVersion = frameVersion;
57
+ return cachedValue;
58
+ }
59
+ cachedValue = next;
60
+ cachedVersion = frameVersion;
61
+ hasValue = true;
62
+ return cachedValue;
63
+ },
64
+ };
65
+ }
@@ -0,0 +1,576 @@
1
+ /**
2
+ * Game root — T7.1 slice 1 ("introduce Game internally") + slice 2 ("world
3
+ * registry + ordered frame algorithm"), extended in T7.3 slice 1 with real
4
+ * `'canvas'`-kind `RootInstance` support (`stage`/`physics2d`, a real
5
+ * `pixiStage()`) so a canvas adapter can register its world onto a real `Game`
6
+ * instead of driving its own loop, and in T7.3 slice 2 with a
7
+ * construction-time stage check (symmetric with the three/scene check).
8
+ * T6.2 slice 1 adds real `'react'`-kind
9
+ * `RootInstance` support (`container`, a real `reactRoot()`) — the DOM-root
10
+ * world surface `runtime/create-runtime.ts`'s roots path now mounts, with
11
+ * `physics`/`collisions`/`camera`/`frame` `undefined` for them exactly
12
+ * like an opaque/foreign mount.
13
+ *
14
+ * (D6), particularly §4 (the frame algorithm) and §8 stage 2, for the full
15
+ * target shape. This file holds the Game/ RootInstance shell, the NEW
16
+ * game-scoped `SystemRunner`, and the host-facing `runFrame` frame executor.
17
+ * The public surface is NOT frozen yet — do not add these exports to a
18
+ * barrel/index; only the in-scope runtime/adapter files import this module
19
+ * directly. The `gpu` per-world cache is the one remaining slice-1 omission.
20
+ */
21
+ import type * as PIXI from 'pixi.js';
22
+ import type * as THREE from 'three';
23
+ import type { AdapterSurface as AdapterSurfaceLeaf } from '../adapter/adapter-surface';
24
+ import type { MountedRoot } from '../adapter/root-adapter';
25
+ import type { MountedSetupThreeRoot } from '../adapter/setup-three-root-adapter';
26
+ import type { SystemAdapters } from '../adapter/system-adapter';
27
+ import type { AssetCache } from '../assets';
28
+ import type { createGameLoop } from '../core/game-loop';
29
+ import { type SystemRunner } from '../core/system-runner';
30
+ import { type SystemPhaseName } from '../core/types';
31
+ import { type PerformanceProfiler } from '../dev/performance-profiler';
32
+ import { InputManager } from '../input/input-manager';
33
+ import type { CollisionSystem } from '../physics/collision-system';
34
+ import type { PhysicsRegistry } from '../physics/physics-registry';
35
+ import type { Physics2DRegistry } from '../pixi/physics-registry';
36
+ import type { AudioContext as GameAudio } from '../setup/setup-audio';
37
+ import { type RunTicksOptions } from './debug-registry';
38
+ import { type GameStateBridge } from './state-bridge';
39
+ import type { GameContext, PlaytestContext } from './types';
40
+ /** The one loop type — `createGameLoop`'s return shape (fixed-step sim,
41
+ * display-rate presentation since WO-P13). */
42
+ export type GameLoop = ReturnType<typeof createGameLoop>;
43
+ /**
44
+ * Game-level play-state control surface (D10, T7.6): pause/resume/step as ONE
45
+ * control surface on the running game, with PER-WORLD `pausable` semantics
46
+ * (`RootInstance.pausable`) — a menu/HUD world declaring `pausable: false` keeps
47
+ * ticking (input, physics) while every `pausable: true` world
48
+ * freezes. A paused-and-pausable world's `render` phase still runs (with `dt`
49
+ * forced to `0`, so time-based render effects — e.g. a post-processing pass with
50
+ * its own internal clock — don't silently keep animating under a "frozen" scene)
51
+ * — simulation freezes, the screen does not go black. WO-P13 changed only the
52
+ * CADENCE of that: once per display frame under a host that drives
53
+ * `runRenderFrame`, once per substep under one that still renders inside
54
+ * `runFrame`. `GameLoop.timeScale` (unaffected by this) remains the orthogonal
55
+ * "speed up/slow down" axis — pausing never touches it, so the host's
56
+ * accumulator/rAF loop keeps ticking at its normal cadence, which is what makes
57
+ * "paused still renders" possible (the previous `GameSession.pause()`
58
+ * implementation set `loop.timeScale = 0`, which starves the accumulator — and,
59
+ * before WO-P13, stopped rendering with it; that was the bug this control
60
+ * surface replaces, not a compatible behavior to keep).
61
+ */
62
+ export interface PlayState {
63
+ /** Whether the game is currently paused (game-level — see the per-world
64
+ * `pausable` caveat above: a `pausable: false` world ignores this). */
65
+ readonly paused: boolean;
66
+ /**
67
+ * Freeze every `pausable` world's simulation (idempotent — a second call
68
+ * while already paused is a no-op) and, for every `pausable`, self-driven
69
+ * (`drivesOwnLoop`) world, invoke its loop-gate capability
70
+ * (`mounted.setPaused(true)`) — reporting loudly, once per world, when that
71
+ * capability is absent (an honest "cannot gate" instead of a silent no-op).
72
+ * Also silences every `pausable` world's audio via its
73
+ * `SystemAdapters.audio` (absent ⇒ the same loud, once-only report).
74
+ */
75
+ pause(): void;
76
+ /** Resume every `pausable` world — the inverse of `pause()`, same
77
+ * idempotency and loop-gate/audio fan-out (no re-reporting; a world that
78
+ * couldn't be gated on pause simply never was, so resume has nothing to
79
+ * undo for it). */
80
+ resume(): void;
81
+ /**
82
+ * Advance exactly the currently-FROZEN roots by one fixed substep: the
83
+ * `pausable`, host-driven (`!drivesOwnLoop`) roots while `paused` is
84
+ * true. While NOT paused this is a whole-call no-op — under D10 the loop
85
+ * never stops, so every non-frozen world is already being ticked; an
86
+ * unconditional extra tick was the §7.1-2 double-tick bug (probe4). A
87
+ * `pausable`, self-driven world that was actually gated by `pause()`
88
+ * (adapter has `setPaused`) steps via its own loop-gate `step()`
89
+ * capability instead (absent ⇒ the same loud report as `pause()`); a
90
+ * self-driven world the gate couldn't reach is still running and is left
91
+ * alone. `dt` defaults to the engine's fixed timestep (1/60s — every real
92
+ * host constructs its loop with this value; see `create-runtime.ts`).
93
+ */
94
+ step(dt?: number): void;
95
+ }
96
+ /**
97
+ * The kinds of render surface a world can be. `'three'` and `'canvas'`
98
+ * roots are both real; `'react'` is named
99
+ * here so the type is already shaped for T7.4 and no caller has to widen a
100
+ * union later.
101
+ *
102
+ * Re-exported from `adapter/adapter-surface.ts` (T7.5) — moved there so
103
+ * `adapter/root-adapter.ts`'s kind-tagged `MountedRoot` types can name it
104
+ * without an import cycle back to this file. This re-export keeps every
105
+ * existing `import type { AdapterSurface } from '../runtime/game'` call site
106
+ * (`ecs/behavior.ts`, `ecs/component-manager.ts`) compiling unchanged.
107
+ */
108
+ export type AdapterSurface = AdapterSurfaceLeaf;
109
+ /**
110
+ * A world's per-phase frame hooks (T7.1 slice 2).
111
+ * Populated on a `RootInstance` only for first-party mounts — an opaque/
112
+ * foreign mount has no phase-partitioned entry point, so it stays
113
+ * `undefined` and the Game's frame executor (`GameInternal.runFrame`) falls
114
+ * back to calling its single `mounted.update(dt)` once per substep instead.
115
+ */
116
+ export interface RootFrameHooks {
117
+ /** Run this world's engine systems + component ticks + world-bound game
118
+ * systems for one phase. For a first-party world this delegates to the
119
+ * SAME `SystemRunner.runPhase` its (legacy) `mounted.update` uses. */
120
+ runPhase(phase: SystemPhaseName, dt: number): void;
121
+ /** Run once per substep, after ALL phases have run for ALL roots this
122
+ * substep (mirrors where `mounted.update`'s post-`systems.run` work sat
123
+ * today — e.g. `input.endFrame()`). Optional: a world may have nothing
124
+ * to do here. */
125
+ endFrame?(): void;
126
+ }
127
+ /**
128
+ * A single world instance: the unit of adaptation.
129
+ * Slice-1 subset — `gpu` (per-world GPU resource cache, §6.2) is omitted
130
+ * until the slice that builds it.
131
+ */
132
+ export interface RootInstance {
133
+ /** Manifest id (T3.1). Slice 1 always registers exactly one: `'main'`. */
134
+ readonly id: string;
135
+ readonly kind: AdapterSurface;
136
+ /** Per-world play/pause semantics (D10, T7.6). Slice 1 always `true`. */
137
+ readonly pausable: boolean;
138
+ /** The RootAdapter that produced `mounted` — first-party or external.
139
+ * Deliberately narrower than `RootAdapter<K>` (T7.5): this field is only
140
+ * ever read for `.id` (`Game.registerRoot`'s diagnostic message below) —
141
+ * never re-invoked — and `RootAdapter<K>`'s `mount` signature legitimately
142
+ * differs per kind's host CONTEXT (`HostContextFor<K>`, P-8: a canvas
143
+ * adapter's `CanvasHostContext`, a react adapter's `DomHostContext`, vs a
144
+ * three adapter's `ThreeHostContext`), so requiring the FULL interface here
145
+ * would force each registration site to name its own `K` for no behavioral
146
+ * gain — see `AdapterHandle` below. */
147
+ readonly adapter: AdapterHandle;
148
+ /** The live mounted surface — one of `MountedRoot`'s kind-tagged shapes
149
+ * (T7.5; `MountedThreeRoot` for a three world, `MountedPixiRoot` for
150
+ * canvas, `MountedReactRoot` for react). */
151
+ readonly mounted: MountedRoot;
152
+ /** Kind-narrowed accessor: throws a descriptive error when this world is
153
+ * not a three world. */
154
+ threeScene(): THREE.Scene;
155
+ /** Kind-narrowed accessor for canvas roots (T7.3): returns the stage
156
+ * passed to `createRootInstance` for a `'canvas'`-kind world. Throws
157
+ * descriptively for a non-pixijs world, or a canvas world built without
158
+ * a `stage` (see `RootInstanceInit.stage`). */
159
+ pixiStage(): PIXI.Container;
160
+ /** Kind-narrowed accessor for react roots (T6.2 slice 1): returns the
161
+ * DOM-root layer `<div>` the host mounted this world's react tree into
162
+ * (the SAME element passed as `container` to `createRootInstance` —
163
+ * identity matters, mirroring `threeScene()`/`pixiStage()`'s "same
164
+ * instance the adapter mounted" contract). Throws descriptively for a
165
+ * non-react world, or a react world built without a `container` (see
166
+ * `RootInstanceInit.container`). */
167
+ reactRoot(): HTMLElement;
168
+ /** Present only when the world's mount is first-party (Rapier3D for
169
+ * three roots). */
170
+ readonly physics?: PhysicsRegistry | undefined;
171
+ readonly collisions?: CollisionSystem | undefined;
172
+ /** Present only when the world's mount owns a Rapier-2D world — the 2D
173
+ * analog of `physics` above. Kept as a separate field (not folded into
174
+ * `physics` as a union) so 3D call sites keep their non-union
175
+ * `PhysicsRegistry` typing unchanged. */
176
+ readonly physics2d?: Physics2DRegistry | undefined;
177
+ /** Kind-typed via `mounted` in T7.5; `unknown` here deliberately. */
178
+ readonly camera?: unknown;
179
+ /** Phase-partitioned frame entry point (T7.1 slice 2) — present only for
180
+ * first-party mounts. `undefined` for an opaque/foreign mount, which
181
+ * `GameInternal.runFrame` drives via its single `mounted.update` call
182
+ * instead (unless it `drivesOwnLoop`, in which case it isn't ticked at
183
+ * all — see `runFrame`). */
184
+ readonly frame?: RootFrameHooks | undefined;
185
+ }
186
+ /**
187
+ * Minimal identity surface `RootInstance.adapter` needs (T7.5) — see that
188
+ * field's doc comment for why it's narrower than `RootAdapter<K>`. Any real
189
+ * adapter object (a NAMED type, not a fresh object literal) — `RootAdapter<K>`,
190
+ * `Pixi2DRootAdapter`, `ReactRootAdapter`, or a project's own custom adapter —
191
+ * satisfies this trivially (extra members beyond `id` are always fine for a
192
+ * non-literal source); a bare `{ id, mount }` object literal built INLINE at
193
+ * a `createRootInstance`/`registerXRoot` call site needs an intermediate
194
+ * `const` (excess-property checking only special-cases fresh literals).
195
+ */
196
+ export interface AdapterHandle {
197
+ readonly id: string;
198
+ }
199
+ /** Inputs to {@link createRootInstance}. */
200
+ export interface RootInstanceInit {
201
+ readonly id: string;
202
+ readonly kind: AdapterSurface;
203
+ /** Defaults to `true` (D10's per-world default). */
204
+ readonly pausable?: boolean;
205
+ readonly adapter: AdapterHandle;
206
+ readonly mounted: MountedRoot;
207
+ /** Required when `kind === 'three'` — backs `threeScene()`. */
208
+ readonly scene?: THREE.Scene | undefined;
209
+ /** Required when `kind === 'canvas'` — backs `pixiStage()` (T7.3 slice 2,
210
+ * symmetric with `scene` for three above). */
211
+ readonly stage?: PIXI.Container | undefined;
212
+ /** Required when `kind === 'dom'` — backs `reactRoot()` (T6.2 slice 1,
213
+ * symmetric with `scene`/`stage` above): the DOM-root layer `<div>` this
214
+ * world's react tree is mounted into. */
215
+ readonly container?: HTMLElement | undefined;
216
+ readonly physics?: PhysicsRegistry | undefined;
217
+ readonly collisions?: CollisionSystem | undefined;
218
+ readonly physics2d?: Physics2DRegistry | undefined;
219
+ readonly camera?: unknown;
220
+ readonly frame?: RootFrameHooks | undefined;
221
+ }
222
+ /**
223
+ * Build a `RootInstance` whose kind-narrowed accessors throw descriptively
224
+ * on kind mismatch. This is the one place that builds
225
+ * `threeScene`/`pixiStage`, so every world (however it's constructed, in this
226
+ * slice or later ones) gets identical throw behavior.
227
+ */
228
+ export declare function createRootInstance(init: RootInstanceInit): RootInstance;
229
+ /**
230
+ * Type guard for whether a `MountedThreeRoot` is a first-party
231
+ * `SetupThreeRootAdapter` mount (has a live `GameContext` at `.ctx`). Used to
232
+ * decide whether a world's `physics`/`collisions`/`camera` (and, on `Game`,
233
+ * `input`/`audio`) can be populated from it — an external
234
+ * adapter's mount has none of these first-party handles.
235
+ *
236
+ * Checks the `firstParty: true` brand (checklist item 1), NOT `'ctx' in
237
+ * mounted` — a foreign mount may carry an unrelated `ctx` key, so a
238
+ * structural `'ctx' in mounted` check would misfire. The probe is a plain property read, not an
239
+ * `instanceof`/value import of `setup-three-root-adapter.ts` — the
240
+ * `MountedSetupThreeRoot` import above stays type-only.
241
+ */
242
+ export declare function isFirstPartyMounted(mounted: MountedRoot): mounted is MountedSetupThreeRoot;
243
+ /**
244
+ * One world's half of a debris disposal, as {@link disposeDebrisSubtree} needs
245
+ * it. A first-party `GameContext` satisfies this structurally.
246
+ *
247
+ * `physics`/`rapierWorld` are OPTIONAL: an owner that builds no first-party
248
+ * Rapier runtime (an R3F world) carries neither, and {@link
249
+ * disposeDebrisSubtree} reads them behind `readRapierHandles` rather than
250
+ * unconditionally.
251
+ */
252
+ export interface DebrisOwner {
253
+ readonly physics?: GameContext['physics'];
254
+ readonly rapierWorld?: GameContext['rapierWorld'];
255
+ }
256
+ /**
257
+ * P3 — what `SimClock.disposeAfter` actually does. `core/sim-clock.ts` knows
258
+ * only *when*; this is the *what*, and it lives here because it is the runtime
259
+ * that knows about Rapier and shared geometry.
260
+ *
261
+ * The order mirrors `adapter/setup-three-root-adapter.ts`'s world teardown for
262
+ * ONE subtree. Within the physics step,
263
+ * `rapierWorld.removeRigidBody(body)` comes BEFORE `physics.remove(node)`: the
264
+ * registry's `remove()` only drops index entries, so reversing the two leaks
265
+ * the Rapier body.
266
+ *
267
+ * `owners` is every world that could own part of the subtree — `createGame`
268
+ * passes all of its first-party three roots as their `GameContext`, a bare
269
+ * adapter mount passes its own ctx. `physics.get` is a no-op for a node the
270
+ * owner does not own, so offering the subtree to each is safe.
271
+ *
272
+ * Safe on an object already removed or already disposed: `removeFromParent` on
273
+ * a parentless `Object3D` is a no-op and three's `dispose()` calls are
274
+ * idempotent.
275
+ */
276
+ export declare function disposeDebrisSubtree(obj: THREE.Object3D, owners: ReadonlyArray<DebrisOwner>): void;
277
+ /**
278
+ * The Game root. Owns the one loop, the raw-asset
279
+ * cache, the world registry, and (T7.1 slice 2) the game-scoped
280
+ * `SystemRunner`. `input`/`audio` remain slice-1 late
281
+ * additions: they delegate to the default world's first-party mount so
282
+ * existing single-world call sites keep working; hoisting them to true
283
+ * Game ownership (the target shape) is a later slice's
284
+ * work, not this one's.
285
+ */
286
+ export interface Game {
287
+ readonly loop: GameLoop;
288
+ readonly assets: AssetCache;
289
+ /** Host identity for this private play run or coordinated Team Test. */
290
+ readonly playtest?: PlaytestContext | null;
291
+ /** Per-game diagnostic store. Disabled by default; the editor enables it on demand. */
292
+ readonly profiler: PerformanceProfiler;
293
+ /**
294
+ * The game-scoped `SystemRunner` (T7.1 slice 2) — a
295
+ * NEW bucket, separate from any world's own runner. Within each phase,
296
+ * `GameInternal.runFrame` runs THIS runner's `runPhase` first, before any
297
+ * world's engine systems/component ticks/world-bound game systems (e.g.
298
+ * `ctx.systems.add`, which stays world-bound to the default world — see
299
+ * `runtime/types.ts`). Empty for every existing game (nothing registers
300
+ * against it yet), so `runFrame`'s behavior for a single-world game is
301
+ * unchanged by its presence.
302
+ */
303
+ readonly systems: SystemRunner;
304
+ /** Declaration-ordered. Slice 1 registers exactly one (the default
305
+ * three world) — this is the SAME array reference `registerRoot`
306
+ * mutates, not a snapshot, so holders (e.g. `GameContext.roots`) observe
307
+ * later registrations. */
308
+ readonly roots: ReadonlyArray<RootInstance>;
309
+ world(id: string): RootInstance | null;
310
+ /** First three world, else first world. Throws descriptively when no
311
+ * world has been registered yet. */
312
+ readonly defaultRoot: RootInstance;
313
+ /**
314
+ * Game-scoped aggregation of every world's `SystemAdapters` (§7.1-3:
315
+ * "`registerSystemAdapter` is game-scoped" — the recorded decision this
316
+ * getter finally implements; probe1). Each mounted world builds its OWN
317
+ * `mounted.systems` object (a game registers capabilities like `networking`
318
+ * from ITS OWN `setup()`, via `ctx.registerSystemAdapter`, per-world) —
319
+ * this merges every world's `mounted.systems` into ONE `SystemAdapters`, in
320
+ * `roots` REGISTRATION order, first registration wins per key. A later
321
+ * world registering the SAME kind (e.g. two roots both exposing
322
+ * `networking`) does not override the first — instead this warns ONCE per
323
+ * (game instance, key) naming both world ids, matching this file's `[game]
324
+ * world "<id>" …` console idiom (see `registerRoot` below). NOT to be
325
+ * confused with `Game.systems` (the game-scoped `SystemRunner` bucket, an
326
+ * entirely different concept — see that field's doc comment) — this name
327
+ * was deliberately chosen not to collide with it.
328
+ *
329
+ * A plain getter (recomputed on every read, not cached) so a LATER
330
+ * `registerRoot` call (or a world's setup registering a NEW adapter kind
331
+ * after this was first read) is always reflected — only the COLLISION
332
+ * warning is deduped (once per key, for the lifetime of this `Game`).
333
+ * Includes every world regardless of first-party-ness — `mounted.systems`
334
+ * is a capability any adapter (first-party or foreign) may expose.
335
+ */
336
+ readonly systemAdapters: SystemAdapters;
337
+ /** Subscribe when a mounted root registers or replaces a system adapter. */
338
+ subscribeSystemAdapters?(listener: () => void): () => void;
339
+ /** The one game-owned `InputManager`, shared by every first-party root. */
340
+ readonly input: InputManager;
341
+ /** Delegates to the default world's first-party audio context. Throws
342
+ * when the default world is not a first-party mount. */
343
+ readonly audio: GameAudio;
344
+ /**
345
+ * Frame-versioned state bridge (T7.4 slice 1). Bumped once per completed
346
+ * `runFrame`, after all phases of all roots and all `endFrame` hooks (see
347
+ * `runFrame`'s tail below). This is the ONE subscription surface
348
+ * `useWorldState` (`@vgai/engine/react/world-state`) — or any other
349
+ * frame-versioned consumer — subscribes to; `state-bridge.ts` itself has no
350
+ * react import, matching the rest of `runtime/`.
351
+ */
352
+ readonly state: GameStateBridge;
353
+ /** Game-level play-state control surface (D10, T7.6) — see {@link PlayState}. */
354
+ readonly play: PlayState;
355
+ /**
356
+ * WO-P13 — the interpolation alpha the most recent display frame presented
357
+ * at: `accumulator / fixedDt`, in `[0, 1]`. `0` means "exactly on the last
358
+ * completed fixed state", `0.5` means "halfway to the next one".
359
+ *
360
+ * Read it to interpolate your own transforms between the last two fixed
361
+ * states; it is the same number `onRenderStep` hands its callbacks, exposed
362
+ * here for code that renders from somewhere other than a callback. Stays
363
+ * `0` for a Game whose host never wired a display-rate render pass (see
364
+ * {@link onRenderStep}).
365
+ */
366
+ readonly renderAlpha: number;
367
+ /**
368
+ * WO-P13 — the `RenderStepped`-shaped host: register a callback that runs
369
+ * ONCE PER DISPLAY FRAME, before that frame's `preRender`/`render` phases,
370
+ * with `(alpha, displayDt)`.
371
+ *
372
+ * This is the seam for presentation-only work whose natural rate is the
373
+ * monitor's, not the simulation's — camera polish/smoothing, procedural
374
+ * sway, a cosmetic bob. It is NOT a gameplay hook: it can fire twice
375
+ * between two fixed substeps (120 Hz display, 60 Hz sim) and zero times
376
+ * across a `runTicks` fast-forward, so anything that must be deterministic
377
+ * belongs in a fixed phase (`ctx.systems.add`, a `useFrame` hook, a
378
+ * `useFrame`) instead.
379
+ *
380
+ * Reached from game code as `ctx.game?.onRenderStep(...)`. Returns an
381
+ * unsubscribe function; pass `opts.signal` to unsubscribe with the same
382
+ * `AbortSignal` a `setup()` already uses for its listeners and sim timers
383
+ * (`core/sim-clock.ts`'s ownership section — cancelling what you registered
384
+ * is the game's job, and a stale render-step closure is the same hazard
385
+ * class as a stale event listener).
386
+ *
387
+ * Silent-no-op honesty: a callback registered on a Game whose host wired no
388
+ * display-rate render pass (a bare test harness, a `drivesOwnLoop`-only
389
+ * mount, an `externalDrive` capture page) never fires, because nothing
390
+ * drives it. That is the same shape as `ctx.clock` on a Game-less mount.
391
+ */
392
+ onRenderStep(fn: (alpha: number, displayDt: number) => void, opts?: {
393
+ signal?: AbortSignal | undefined;
394
+ }): () => void;
395
+ }
396
+ /**
397
+ * Host-internal extension of {@link Game}: adds `registerRoot` (the host's
398
+ * wiring surface for populating the world registry) and `runFrame` (the
399
+ * frame executor). NEITHER is part of the game-facing `Game` surface —
400
+ * games never call either directly; the host loop
401
+ * (`createGameRuntime`) and `GameSession.step()` are the only callers of
402
+ * `runFrame`.
403
+ */
404
+ export interface GameInternal extends Game {
405
+ /** Host-side signal used by root contexts after `registerSystemAdapter`. */
406
+ notifySystemAdaptersChanged(): void;
407
+ /** Append a world in declaration order. Throws on a duplicate id. */
408
+ registerRoot(world: RootInstance): void;
409
+ /**
410
+ * Run ONE fixed substep across every phase and every world:
411
+ *
412
+ * ```
413
+ * for phase in PHASE_ORDER:
414
+ * game.systems.runPhase(phase, dt) // game-scoped, first
415
+ * for world in roots (declaration order):
416
+ * if world.mounted.drivesOwnLoop: continue
417
+ * world.frame?.runPhase(phase, dt)
418
+ * for world in roots: // after ALL phases
419
+ * if world.mounted.drivesOwnLoop: continue
420
+ * if world.frame: world.frame.endFrame?.()
421
+ * else: world.mounted.update?.(dt) // opaque world fallback
422
+ * ```
423
+ *
424
+ * For today's single first-party world this is byte-identical to the
425
+ * legacy `mounted.update(dt)` (`game.systems` is empty; the one world's
426
+ * `frame.runPhase` delegates to the SAME `SystemRunner.runPhase` its
427
+ * `update` used; `endFrame` is the same `postFrame` call). A
428
+ * `drivesOwnLoop` world is never ticked here at all — matching its
429
+ * exclusion from the legacy `!mountedRef.drivesOwnLoop` guard. An opaque
430
+ * host-driven world (no `frame`) gets exactly one `update(dt)` call per
431
+ * substep, after the phase loop — unchanged cadence from today.
432
+ *
433
+ * D10/T7.6 play-state addendum: when `Game.play.paused` is true, every
434
+ * `pausable` (and non-`drivesOwnLoop`) world skips every phase EXCEPT
435
+ * `render` (still called, every substep, with `dt` forced to `0`) and skips
436
+ * its `endFrame`/opaque-`update` call entirely — a `pausable: false` world
437
+ * is completely unaffected. `opts.ignorePause` runs this call as if nothing
438
+ * were paused, regardless of the live `paused` flag; kept for external
439
+ * byte-compatibility (no first-party caller passes it today — grep finds
440
+ * none) but is no longer how `Game.play.step()` works (§7.1-2 fix,
441
+ * probe4: the old `ignorePause` full-frame re-run double-ticked every
442
+ * already-running `pausable: false` world, since D10's ordinary loop never
443
+ * stops ticking them). `Game.play.step()` now drives this function via the
444
+ * internal-only `onlyFrozen` mode instead (see `runFrameImpl` — not part of
445
+ * this public, host-facing signature): it ticks EXACTLY the currently
446
+ * frozen set (host-driven, `pausable`, and `paused`) through every phase +
447
+ * `endFrame` with the real `dt` (not the render-phase's forced `0`), and
448
+ * touches no other world at all — a natural no-op while not paused, since
449
+ * the frozen set is then empty.
450
+ *
451
+ * WO-P13 addendum: `opts.skipRenderPhases` omits `preRender`+`render` from
452
+ * the pass — every other phase, and `endFrame`, run exactly as always. A
453
+ * host that drives presentation at DISPLAY rate sets it on every substep
454
+ * and calls {@link runRenderFrame} once per real frame instead
455
+ * (`create-runtime.ts`). A host that does
456
+ * not set it keeps the pre-WO-P13 shape verbatim — which is why
457
+ * `externalDrive` capture (`render-control.ts`'s `simulateSubsteps`, which
458
+ * calls `runFrame(fixedDt)` with no opts) is frame-exact and unchanged.
459
+ * `runTicks` sets it per tick for its `render: 'none' | 'last'` modes.
460
+ */
461
+ runFrame(dt: number, opts?: {
462
+ ignorePause?: boolean;
463
+ skipRenderPhases?: boolean;
464
+ }): void;
465
+ /**
466
+ * WO-P13 — run ONE display frame's presentation pass: the registered
467
+ * `onRenderStep` callbacks, then the `preRender` and `render` phases across
468
+ * game-scoped systems and every host-driven world, in the same
469
+ * game-systems-then-worlds order {@link runFrame} uses.
470
+ *
471
+ * ```
472
+ * for cb in onRenderStep callbacks: cb(alpha, displayDt)
473
+ * for phase in [preRender, render]:
474
+ * game.systems.runPhase(phase, displayDt)
475
+ * for world in roots (declaration order):
476
+ * if world.mounted.drivesOwnLoop: continue
477
+ * world.frame?.runPhase(phase, frozen ? 0 : displayDt)
478
+ * ```
479
+ *
480
+ * Advances NOTHING: no `tick`, no `simT`, no sim-clock flush, no state-bridge
481
+ * bump, no `endFrame`. It is presentation only, which is what makes calling
482
+ * it at a rate the simulation does not share safe in the first place.
483
+ *
484
+ * D10's pause rule carries over unchanged in substance: a frozen world
485
+ * (paused + `pausable`) still RENDERS — that is what keeps a paused editor
486
+ * viewport painted — but with `dt` forced to `0`, so no time-based render
487
+ * effect animates a frozen scene. What changes is only the cadence: once per
488
+ * display frame instead of once per fixed substep.
489
+ */
490
+ runRenderFrame(alpha: number, displayDt: number): void;
491
+ /**
492
+ * D15/T-D15.3-.4 — a deterministic fast-forward primitive: synchronously
493
+ * call the SAME per-tick pipeline `runFrame` uses, `n` times in a tight
494
+ * loop, with `dt` fixed to the host loop's own fixed timestep
495
+ * (`this.loop.fixedDt` — `core/game-loop.ts`). This generalizes
496
+ * `render-control.ts`'s proven `VgaiRenderHarness. simulateSubsteps` from
497
+ * the capture-only door (`?vgai-render=1`) to a Game-level primitive every
498
+ * door can reach (the bridge's `window.__vgai.runTicks`, the editor relay's
499
+ * `run-ticks` case → `play.runTicks`) — `simulateSubsteps` itself is
500
+ * UNTOUCHED by this addition (it may later delegate to this method; not
501
+ * this unit's job).
502
+ *
503
+ * Semantics:
504
+ * - **Decoupled from wall clock and the accumulator.** `runTicks` drives
505
+ * `runFrame` DIRECTLY — it never goes through `GameLoop`'s own
506
+ * accumulator/spiral-of-death drop path, so `n` ticks always advance
507
+ * `tick`/`simT` by exactly `n`/`n * fixedDt`, on any hardware, regardless
508
+ * of how slow or fast the call actually took wall-clock-wise. Single-
509
+ * threaded-burst note: because JS has one thread, this synchronous burst
510
+ * can never interleave with a real rAF frame — but if the host's own
511
+ * loop is still running (`loop.start()`), wall-clock time keeps accruing
512
+ * in ITS accumulator while this call executes; the NEXT rAF frame after
513
+ * the burst sees that gap and the loop's existing `maxAccumulator` clamp
514
+ * absorbs it exactly as it would absorb any other slow-frame gap (up to
515
+ * 8 substeps, additional time dropped) — `runTicks` does not need to
516
+ * (and does not) touch the accumulator itself to make this safe.
517
+ * - **`opts.render`** (default `'last'`): `'last'` skips the `preRender`/
518
+ * `render` phases for ticks `0..n-2` and runs the full phase list
519
+ * (including `preRender`/`render`) on the final tick only — the GGPO
520
+ * tick-without-render pattern. `'all'` renders every tick. `'none'`
521
+ * never renders, not even the last tick. `tick`/`simT`/
522
+ * `stateBridge.bump()`/the debug event ring advance identically on
523
+ * EVERY tick regardless of `render` — only the paint-affecting phases
524
+ * are skipped, so state watchers (`useWorldState`, debug state providers)
525
+ * stay correct even when fast-forwarding with no visible output.
526
+ * - **Refuses while paused.** Throws a structured `DebugError`
527
+ * (`code: 'RUN_TICKS_PAUSED'`) if `Game.play.paused` is true —
528
+ * `Game.play.step()` owns stepping the frozen set; `runTicks` is a
529
+ * running-game primitive, not a paused-world stepper, and silently
530
+ * no-op-ing or silently ignoring pause would violate the "byte-identical
531
+ * across doors" contract this primitive exists to provide.
532
+ * - **Does not bypass the input focus gate.** Every tick's `input` phase
533
+ * runs through the SAME `InputManager` every other call to `runFrame`
534
+ * does — a gated virtual actuation (page unfocused, Game tab inactive)
535
+ * still reports `{delivered: false, reason}` exactly as it would under
536
+ * normal play; `runTicks` has no special-cased "force focus" behavior.
537
+ */
538
+ runTicks(n: number, opts?: RunTicksOptions): void;
539
+ /**
540
+ * ADAPTER-MOUNT surface, not game-facing: an adapter's `mount()` calls
541
+ * this (via `host.game` — the classic `SetupThreeRootAdapter` and the R3F
542
+ * `createR3FRootContext` both do) to load the game-owned input map ONCE,
543
+ * even when several roots ask for the same path; competing paths throw
544
+ * (input is game-owned, so roots cannot load competing maps). GAME code
545
+ * never calls this — a project's map loads automatically at mount from
546
+ * the conventional `/inputmaps/default.inputmap.json` (or the adapter's
547
+ * configured `inputMapPath`); runtime additions go through
548
+ * `ctx.input.registerAction` instead.
549
+ */
550
+ loadInputMap(path: string): Promise<void>;
551
+ /** Release game-owned resources after every mounted root has disposed. */
552
+ dispose(): void;
553
+ }
554
+ /**
555
+ * Construct the (host-internal) Game shell. Callers: `createGameRuntime`
556
+ * builds this BEFORE mounting its one adapter, then registers the default
557
+ * three world once mount resolves (see `registerThreeRoot` in
558
+ * `create-runtime.ts`).
559
+ */
560
+ export declare function createGame(opts: {
561
+ loop: GameLoop;
562
+ assets: AssetCache;
563
+ playtest?: PlaytestContext | null | undefined;
564
+ /** D15 (T-D15.1) — the root seed `ctx.random` boots from, on every world
565
+ * mounted onto this Game. Defaults to `DEFAULT_SEEDED_RANDOM_SEED` (a
566
+ * fixed, non-wall-clock constant — `ctx.random` is always reproducible
567
+ * on its own terms, whether or not the project's manifest DECLARES that
568
+ * reproducibility as a contract). The manifest-aware boot path
569
+ * (`mount-manifest.ts`'s `mountManifestRoots`) is what actually resolves
570
+ * `manifest.determinism.defaultSeed`/`?vgai-seed=`/explicit config and
571
+ * passes the result here, BEFORE any world's `mount()`/`setup()` runs —
572
+ * `createGameRuntime` always constructs the Game (this call) first (see
573
+ * this function's own doc comment below). */
574
+ seed?: number | undefined;
575
+ }): GameInternal;
576
+ //# sourceMappingURL=game.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"game.d.ts","sourceRoot":"","sources":["../../src/runtime/game.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,KAAK,KAAK,IAAI,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOxD,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAA4B,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElG,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BA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