@vgai/engine 0.5.22 → 0.5.24

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 (303) hide show
  1. package/README.md +6 -3
  2. package/dist/adapter/adapter-module.d.ts.map +1 -1
  3. package/dist/adapter/adapter-module.js +2 -4
  4. package/dist/adapter/adapter-surface.d.ts +1 -1
  5. package/dist/adapter/adapter-surface.js +1 -1
  6. package/dist/adapter/authoring.d.ts +19 -21
  7. package/dist/adapter/authoring.d.ts.map +1 -1
  8. package/dist/adapter/authoring.js +2 -2
  9. package/dist/adapter/binding.d.ts +341 -0
  10. package/dist/adapter/binding.d.ts.map +1 -0
  11. package/dist/adapter/binding.js +148 -0
  12. package/dist/adapter/colyseus-networking-adapter.d.ts.map +1 -1
  13. package/dist/adapter/colyseus-networking-adapter.js +23 -4
  14. package/dist/adapter/entrypoint-selection-readers.d.ts +24 -0
  15. package/dist/adapter/entrypoint-selection-readers.d.ts.map +1 -0
  16. package/dist/adapter/entrypoint-selection-readers.js +63 -0
  17. package/dist/adapter/entrypoint-selection-source.d.ts.map +1 -1
  18. package/dist/adapter/entrypoint-selection-source.js +1 -44
  19. package/dist/adapter/finders/scenes-from-entrypoint-selection.d.ts.map +1 -1
  20. package/dist/adapter/finders/scenes-from-entrypoint-selection.js +1 -52
  21. package/dist/adapter/host-context.d.ts +46 -15
  22. package/dist/adapter/host-context.d.ts.map +1 -1
  23. package/dist/adapter/host-context.js +2 -9
  24. package/dist/adapter/index.d.ts +11 -12
  25. package/dist/adapter/index.d.ts.map +1 -1
  26. package/dist/adapter/index.js +9 -10
  27. package/dist/adapter/ingest/game-contract-seams.d.ts +5 -0
  28. package/dist/adapter/ingest/game-contract-seams.d.ts.map +1 -1
  29. package/dist/adapter/ingest/game-contract-seams.js +1 -0
  30. package/dist/adapter/ingest/game-contract.d.ts +22 -3
  31. package/dist/adapter/ingest/game-contract.d.ts.map +1 -1
  32. package/dist/adapter/ingest/game-contract.js +0 -3
  33. package/dist/adapter/ingest/scene-capture.d.ts +19 -23
  34. package/dist/adapter/ingest/scene-capture.d.ts.map +1 -1
  35. package/dist/adapter/ingest/scene-capture.js +143 -17
  36. package/dist/adapter/ingest/visible-capture-window.d.ts +34 -0
  37. package/dist/adapter/ingest/visible-capture-window.d.ts.map +1 -1
  38. package/dist/adapter/native-debug-module.d.ts +40 -5
  39. package/dist/adapter/native-debug-module.d.ts.map +1 -1
  40. package/dist/adapter/native-debug-module.js +36 -9
  41. package/dist/adapter/rapier-physics-adapter.d.ts +31 -1
  42. package/dist/adapter/rapier-physics-adapter.d.ts.map +1 -1
  43. package/dist/adapter/rapier-physics-adapter.js +50 -36
  44. package/dist/adapter/renderer-config.d.ts +2 -2
  45. package/dist/adapter/renderer-config.js +2 -2
  46. package/dist/adapter/root-adapter.d.ts +7 -7
  47. package/dist/adapter/root-adapter.js +4 -4
  48. package/dist/adapter/system-adapter.d.ts +45 -7
  49. package/dist/adapter/system-adapter.d.ts.map +1 -1
  50. package/dist/adapter/system-seam-contract.d.ts +3 -3
  51. package/dist/adapter/system-seam-contract.js +3 -3
  52. package/dist/adapter/system-slot.d.ts +168 -0
  53. package/dist/adapter/system-slot.d.ts.map +1 -0
  54. package/dist/adapter/system-slot.js +229 -0
  55. package/dist/adapter/transform.d.ts +11 -1
  56. package/dist/adapter/transform.d.ts.map +1 -1
  57. package/dist/ai/navigation.d.ts +17 -1
  58. package/dist/ai/navigation.d.ts.map +1 -1
  59. package/dist/ai/navigation.js +26 -5
  60. package/dist/animation/anim-graph-types.d.ts +11 -3
  61. package/dist/animation/anim-graph-types.d.ts.map +1 -1
  62. package/dist/animation/theatre-clock-binding.d.ts +4 -4
  63. package/dist/animation/theatre-clock-binding.js +4 -4
  64. package/dist/animation/xstate-animation-binding.d.ts.map +1 -1
  65. package/dist/animation/xstate-animation-binding.js +2 -2
  66. package/dist/animation/xstate-animation-meta.d.ts +13 -0
  67. package/dist/animation/xstate-animation-meta.d.ts.map +1 -1
  68. package/dist/animation/xstate-animation-meta.js +14 -0
  69. package/dist/asset-formats/index.d.ts +4 -7
  70. package/dist/asset-formats/index.d.ts.map +1 -1
  71. package/dist/asset-formats/index.js +4 -7
  72. package/dist/asset-formats/render-env.d.ts +5 -8
  73. package/dist/asset-formats/render-env.d.ts.map +1 -1
  74. package/dist/asset-formats/render-env.js +3 -6
  75. package/dist/asset-parse-error.d.ts +2 -5
  76. package/dist/asset-parse-error.d.ts.map +1 -1
  77. package/dist/asset-parse-error.js +2 -5
  78. package/dist/audio/bus-mixer.d.ts +101 -0
  79. package/dist/audio/bus-mixer.d.ts.map +1 -0
  80. package/dist/audio/bus-mixer.js +115 -0
  81. package/dist/core/frame-pacing.d.ts +1 -1
  82. package/dist/core/frame-pacing.js +2 -2
  83. package/dist/core/game-loop.d.ts +1 -3
  84. package/dist/core/game-loop.d.ts.map +1 -1
  85. package/dist/core/game-loop.js +1 -3
  86. package/dist/core/seeded-random.d.ts +1 -1
  87. package/dist/core/sim-clock.d.ts +5 -6
  88. package/dist/core/sim-clock.d.ts.map +1 -1
  89. package/dist/core/sim-clock.js +4 -5
  90. package/dist/core/types.d.ts +1 -3
  91. package/dist/core/types.d.ts.map +1 -1
  92. package/dist/defaults.d.ts +6 -14
  93. package/dist/defaults.d.ts.map +1 -1
  94. package/dist/defaults.js +6 -14
  95. package/dist/dev/register-render-vitals.d.ts +1 -4
  96. package/dist/dev/register-render-vitals.d.ts.map +1 -1
  97. package/dist/dev/register-render-vitals.js +1 -4
  98. package/dist/dev/render-debug-adapter.d.ts +2 -3
  99. package/dist/dev/render-debug-adapter.d.ts.map +1 -1
  100. package/dist/dev/render-debug-adapter.js +2 -3
  101. package/dist/dev/render-vitals.d.ts +3 -3
  102. package/dist/dev/render-vitals.js +3 -3
  103. package/dist/dev/webgl-frame-capture.d.ts +1 -1
  104. package/dist/dev/webgl-frame-capture.js +1 -1
  105. package/dist/index.d.ts +2 -5
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +2 -4
  108. package/dist/input/host-pointer.d.ts +122 -0
  109. package/dist/input/host-pointer.d.ts.map +1 -0
  110. package/dist/input/host-pointer.js +160 -0
  111. package/dist/input/input-manager.d.ts +18 -5
  112. package/dist/input/input-manager.d.ts.map +1 -1
  113. package/dist/input/input-manager.js +33 -13
  114. package/dist/input/rebind-controller.d.ts.map +1 -1
  115. package/dist/input/rebind-controller.js +6 -8
  116. package/dist/input/schema.d.ts.map +1 -1
  117. package/dist/input/schema.js +56 -28
  118. package/dist/manifest/filename.d.ts.map +1 -1
  119. package/dist/manifest/filename.js +8 -12
  120. package/dist/manifest/load.d.ts +10 -10
  121. package/dist/manifest/load.d.ts.map +1 -1
  122. package/dist/manifest/load.js +9 -6
  123. package/dist/manifest/schema.d.ts +17 -21
  124. package/dist/manifest/schema.d.ts.map +1 -1
  125. package/dist/manifest/schema.js +45 -35
  126. package/dist/physics/collider-dimensions.d.ts +8 -12
  127. package/dist/physics/collider-dimensions.d.ts.map +1 -1
  128. package/dist/physics/collider-dimensions.js +8 -12
  129. package/dist/pixi/scene-capture.d.ts +11 -13
  130. package/dist/pixi/scene-capture.d.ts.map +1 -1
  131. package/dist/react/world-state.d.ts +1 -1
  132. package/dist/react/world-state.d.ts.map +1 -1
  133. package/dist/render/light-camera-factory.d.ts +5 -7
  134. package/dist/render/light-camera-factory.d.ts.map +1 -1
  135. package/dist/render/light-camera-factory.js +8 -11
  136. package/dist/render/material-factory.js +1 -1
  137. package/dist/render/render-batch-system.d.ts.map +1 -1
  138. package/dist/render/render-features.d.ts +17 -6
  139. package/dist/render/render-features.d.ts.map +1 -1
  140. package/dist/render/render-features.js +0 -28
  141. package/dist/runtime/create-runtime.d.ts +34 -25
  142. package/dist/runtime/create-runtime.d.ts.map +1 -1
  143. package/dist/runtime/create-runtime.js +218 -93
  144. package/dist/runtime/debug-bridge.d.ts +12 -0
  145. package/dist/runtime/debug-bridge.d.ts.map +1 -1
  146. package/dist/runtime/debug-bridge.js +4 -0
  147. package/dist/runtime/debug-registry.d.ts +95 -8
  148. package/dist/runtime/debug-registry.d.ts.map +1 -1
  149. package/dist/runtime/debug-registry.js +24 -3
  150. package/dist/runtime/dev-build.d.ts +2 -2
  151. package/dist/runtime/dev-build.js +2 -2
  152. package/dist/runtime/game-input-seams.d.ts +2 -2
  153. package/dist/runtime/game-input-seams.d.ts.map +1 -1
  154. package/dist/runtime/game.d.ts +102 -41
  155. package/dist/runtime/game.d.ts.map +1 -1
  156. package/dist/runtime/game.js +80 -54
  157. package/dist/runtime/mount-game.d.ts +0 -16
  158. package/dist/runtime/mount-game.d.ts.map +1 -1
  159. package/dist/runtime/mount-game.js +8 -39
  160. package/dist/runtime/mount-manifest.d.ts +22 -14
  161. package/dist/runtime/mount-manifest.d.ts.map +1 -1
  162. package/dist/runtime/mount-manifest.js +18 -18
  163. package/dist/runtime/playtest.d.ts +22 -0
  164. package/dist/runtime/playtest.d.ts.map +1 -0
  165. package/dist/runtime/playtest.js +12 -0
  166. package/dist/runtime/run-ticks-settled.d.ts +34 -0
  167. package/dist/runtime/run-ticks-settled.d.ts.map +1 -0
  168. package/dist/runtime/run-ticks-settled.js +59 -0
  169. package/dist/runtime/state-bridge.d.ts +2 -3
  170. package/dist/runtime/state-bridge.d.ts.map +1 -1
  171. package/dist/runtime/state-bridge.js +1 -0
  172. package/dist/setup/setup-audio.d.ts +12 -0
  173. package/dist/setup/setup-audio.d.ts.map +1 -1
  174. package/dist/setup/setup-audio.js +9 -10
  175. package/dist/setup/setup-renderer.d.ts +2 -25
  176. package/dist/setup/setup-renderer.d.ts.map +1 -1
  177. package/dist/setup/setup-renderer.js +2 -31
  178. package/dist/world3d-react/r3f-root-factory.d.ts +7 -7
  179. package/dist/world3d-react/r3f-root-factory.js +7 -7
  180. package/dist/world3d-react/rapier-physics-bridge.d.ts +9 -8
  181. package/dist/world3d-react/rapier-physics-bridge.d.ts.map +1 -1
  182. package/dist/world3d-react/rapier-physics-bridge.js +100 -48
  183. package/package.json +1 -1
  184. package/schemas/engine-capabilities.json +16 -14
  185. package/schemas/vgai-project.schema.json +35 -26
  186. package/src/adapter/adapter-module.ts +2 -4
  187. package/src/adapter/adapter-surface.ts +1 -1
  188. package/src/adapter/authoring.ts +19 -21
  189. package/src/adapter/binding.ts +468 -0
  190. package/src/adapter/colyseus-networking-adapter.ts +20 -5
  191. package/src/adapter/entrypoint-selection-readers.ts +66 -0
  192. package/src/adapter/entrypoint-selection-source.ts +1 -40
  193. package/src/adapter/finders/scenes-from-entrypoint-selection.ts +1 -48
  194. package/src/adapter/host-context.ts +45 -15
  195. package/src/adapter/index.ts +23 -11
  196. package/src/adapter/ingest/game-contract-seams.ts +1 -0
  197. package/src/adapter/ingest/game-contract.ts +22 -3
  198. package/src/adapter/ingest/scene-capture.ts +190 -39
  199. package/src/adapter/ingest/visible-capture-window.ts +35 -0
  200. package/src/adapter/native-debug-module.ts +66 -9
  201. package/src/adapter/rapier-physics-adapter.ts +76 -20
  202. package/src/adapter/renderer-config.ts +2 -2
  203. package/src/adapter/root-adapter.ts +7 -7
  204. package/src/adapter/system-adapter.ts +43 -8
  205. package/src/adapter/system-seam-contract.ts +3 -3
  206. package/src/adapter/system-slot.ts +291 -0
  207. package/src/adapter/transform.ts +18 -1
  208. package/src/ai/navigation.ts +30 -3
  209. package/src/animation/anim-graph-types.ts +11 -3
  210. package/src/animation/theatre-clock-binding.ts +4 -4
  211. package/src/animation/xstate-animation-binding.ts +2 -2
  212. package/src/animation/xstate-animation-meta.ts +16 -0
  213. package/src/asset-formats/index.ts +4 -7
  214. package/src/asset-formats/render-env.ts +3 -6
  215. package/src/asset-parse-error.ts +2 -5
  216. package/src/audio/bus-mixer.ts +161 -0
  217. package/src/core/frame-pacing.ts +2 -2
  218. package/src/core/game-loop.ts +1 -3
  219. package/src/core/seeded-random.ts +1 -1
  220. package/src/core/sim-clock.ts +5 -6
  221. package/src/core/types.ts +1 -3
  222. package/src/defaults.ts +6 -14
  223. package/src/dev/register-render-vitals.ts +1 -4
  224. package/src/dev/render-debug-adapter.ts +2 -3
  225. package/src/dev/render-vitals.ts +3 -3
  226. package/src/dev/webgl-frame-capture.ts +1 -1
  227. package/src/index.ts +2 -5
  228. package/src/input/host-pointer.ts +230 -0
  229. package/src/input/input-manager.ts +34 -13
  230. package/src/input/input-types.ts +1 -1
  231. package/src/input/rebind-controller.ts +6 -8
  232. package/src/input/schema.ts +216 -188
  233. package/src/manifest/filename.ts +8 -12
  234. package/src/manifest/load.ts +17 -13
  235. package/src/manifest/schema.ts +55 -47
  236. package/src/physics/collider-dimensions.ts +8 -12
  237. package/src/pixi/scene-capture.ts +12 -15
  238. package/src/react/world-state.tsx +1 -1
  239. package/src/render/light-camera-factory.ts +8 -11
  240. package/src/render/material-factory.ts +1 -1
  241. package/src/render/render-batch-system.ts +14 -6
  242. package/src/render/render-features.ts +17 -35
  243. package/src/runtime/create-runtime.ts +270 -108
  244. package/src/runtime/debug-bridge.ts +16 -0
  245. package/src/runtime/debug-registry.ts +121 -8
  246. package/src/runtime/dev-build.ts +2 -2
  247. package/src/runtime/game-input-seams.ts +2 -2
  248. package/src/runtime/game.ts +180 -80
  249. package/src/runtime/mount-game.ts +8 -56
  250. package/src/runtime/mount-manifest.ts +43 -34
  251. package/src/runtime/playtest.ts +22 -0
  252. package/src/runtime/run-ticks-settled.ts +72 -0
  253. package/src/runtime/state-bridge.ts +3 -3
  254. package/src/setup/setup-audio.ts +21 -11
  255. package/src/setup/setup-renderer.ts +2 -61
  256. package/src/world3d-react/r3f-root-factory.tsx +7 -7
  257. package/src/world3d-react/rapier-physics-bridge.tsx +107 -50
  258. package/dist/adapter/setup-three-root-adapter.d.ts +0 -86
  259. package/dist/adapter/setup-three-root-adapter.d.ts.map +0 -1
  260. package/dist/adapter/setup-three-root-adapter.js +0 -908
  261. package/dist/animation/clip-map.d.ts +0 -12
  262. package/dist/animation/clip-map.d.ts.map +0 -1
  263. package/dist/animation/clip-map.js +0 -31
  264. package/dist/asset-registry.d.ts +0 -38
  265. package/dist/asset-registry.d.ts.map +0 -1
  266. package/dist/asset-registry.js +0 -66
  267. package/dist/canvas-react/engine-bridge.d.ts +0 -45
  268. package/dist/canvas-react/engine-bridge.d.ts.map +0 -1
  269. package/dist/canvas-react/engine-bridge.js +0 -45
  270. package/dist/canvas-react/pixi-react-adapter.d.ts +0 -77
  271. package/dist/canvas-react/pixi-react-adapter.d.ts.map +0 -1
  272. package/dist/canvas-react/pixi-react-adapter.js +0 -294
  273. package/dist/canvas-react/world-context.d.ts +0 -98
  274. package/dist/canvas-react/world-context.d.ts.map +0 -1
  275. package/dist/canvas-react/world-context.js +0 -173
  276. package/dist/dev/debug-draw.d.ts +0 -24
  277. package/dist/dev/debug-draw.d.ts.map +0 -1
  278. package/dist/dev/debug-draw.js +0 -73
  279. package/dist/render/auto-batcher.d.ts +0 -34
  280. package/dist/render/auto-batcher.d.ts.map +0 -1
  281. package/dist/render/auto-batcher.js +0 -140
  282. package/dist/render/lod.d.ts +0 -13
  283. package/dist/render/lod.d.ts.map +0 -1
  284. package/dist/render/lod.js +0 -16
  285. package/dist/runtime/types.d.ts +0 -303
  286. package/dist/runtime/types.d.ts.map +0 -1
  287. package/dist/runtime/types.js +0 -1
  288. package/dist/world3d-react/engine-bridge.d.ts +0 -47
  289. package/dist/world3d-react/engine-bridge.d.ts.map +0 -1
  290. package/dist/world3d-react/engine-bridge.js +0 -73
  291. package/dist/world3d-react/r3f-adapter.d.ts +0 -58
  292. package/dist/world3d-react/r3f-adapter.d.ts.map +0 -1
  293. package/dist/world3d-react/r3f-adapter.js +0 -634
  294. package/dist/world3d-react/world-context.d.ts +0 -182
  295. package/dist/world3d-react/world-context.d.ts.map +0 -1
  296. package/dist/world3d-react/world-context.js +0 -235
  297. package/src/adapter/setup-three-root-adapter.ts +0 -1032
  298. package/src/animation/clip-map.ts +0 -34
  299. package/src/asset-registry.ts +0 -89
  300. package/src/dev/debug-draw.ts +0 -80
  301. package/src/render/auto-batcher.ts +0 -168
  302. package/src/render/lod.ts +0 -17
  303. package/src/runtime/types.ts +0 -328
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapter/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,4BAA4B,EAC5B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,aAAa,EACb,QAAQ,EACR,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,E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,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapter/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,4BAA4B,EAC5B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,aAAa,EACb,QAAQ,EACR,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL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,eAAe,EACf,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B;8DAC8D;AAC9D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -1,29 +1,28 @@
1
1
  /**
2
2
  * Adapter interfaces — the seams the engine host and the editor DEPEND ON.
3
3
  *
4
- * host → RootAdapter ← { SetupThreeRootAdapter, IngestRootAdapter, … }
4
+ * host → RootAdapter ← { r3fRootFactory-built adapters, IngestRootAdapter, … }
5
5
  * editor → AuthoringAdapter ← { LiveThreeAuthoringAdapter, ReactRootAuthoringAdapter, … }
6
6
  * game → SystemAdapters (physics/networking/navigation/audio/camera/debug)
7
7
  *
8
8
  * The first-party Rapier/Colyseus stack is ONE implementer of these
9
- * interfaces, not the engine's vocabulary..
9
+ * interfaces, not the engine's vocabulary.
10
10
  *
11
11
  * **This module is TYPE-ONLY, and must stay that way (P-6).** It used to
12
- * value-export its own implementers — `SetupThreeRootAdapter`/`fromSetup`,
13
- * `createRapierPhysicsAdapter`, `createColyseusNetworkingAdapter`,
14
- * `createNavigationAdapter` — so `import type { AuthoringAdapter } from
15
- * '@engine/adapter'` was the only thing keeping the three/Rapier/Colyseus/
16
- * `.vscn` stack out of a Pixi or React consumer's module graph. A seam that
17
- * ships its implementers is not a seam. Import an implementer from its OWN
18
- * path instead:
12
+ * value-export its own implementers — `createRapierPhysicsAdapter`,
13
+ * `createColyseusNetworkingAdapter`, `createNavigationAdapter` — so
14
+ * `import type { AuthoringAdapter } from '@engine/adapter'` was the only
15
+ * thing keeping the three/Rapier/Colyseus stack out of a Pixi or React
16
+ * consumer's module graph. A seam that ships its implementers is not a
17
+ * seam. Import an implementer from its OWN path instead:
19
18
  *
20
- * `@engine/adapter/setup-three-root-adapter` SetupThreeRootAdapter, fromSetup
21
19
  * `@engine/adapter/rapier-physics-adapter` createRapierPhysicsAdapter
22
20
  * `@engine/adapter/colyseus-networking-adapter` createColyseusNetworkingAdapter
23
21
  * `@engine/adapter/first-party-systems` createNavigationAdapter
24
22
  */
25
23
  export { AUTHORING_PROVIDER_KEYS, emptyWriteAnchorKindCounts, measureAuthoringProviders, WRITE_ANCHOR_KINDS, } from './authoring';
26
24
  export { AUTHORING_ADAPTER_SHAPE, AUTHORING_PROVIDER_SHAPES, HIERARCHY_PROVIDER_SHAPE, } from './authoring-seam-contract';
25
+ export { createRootBinding } from './binding';
27
26
  export { MOUNTED_CANVAS_SURFACE_SHAPE, MOUNTED_DOM_SURFACE_SHAPE, MOUNTED_ROOT_BASE_SHAPE, MOUNTED_THREE_SURFACE_SHAPE, ROOT_ADAPTER_SHAPE, ROOT_STATE_OBSERVER_SHAPE, } from './root-seam-contract';
28
27
  export { defineSeamShape, gradeSeamCarrier, gradeSeamEvidence, inspectSeamShape, SEAM_PROOF_STAGES, SeamEvidenceLedger, seamStageAtLeast, } from './seam-evidence';
29
28
  /** The two narrowings of the tagged `SystemAdapters['physics']` union — see
@@ -59,6 +59,11 @@ export declare const GAME_LIFECYCLE_SHAPE: {
59
59
  readonly kind: "function";
60
60
  readonly required: "effect";
61
61
  };
62
+ readonly dispose: {
63
+ readonly optional: true;
64
+ readonly kind: "function";
65
+ readonly required: "effect";
66
+ };
62
67
  };
63
68
  export declare const GAME_SCENES_SHAPE: {
64
69
  readonly list: {
@@ -1 +1 @@
1
- {"version":3,"file":"game-contract-seams.d.ts","sourceRoot":"","sources":["../../../src/adapter/ingest/game-contract-seams.ts"],"names":[],"mappings":"AAAA;;sEAEsE;AAgBtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;CAI/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;CAI5B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAG3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAIpC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;CAIrC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOrC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAGlC,CAAC"}
1
+ {"version":3,"file":"game-contract-seams.d.ts","sourceRoot":"","sources":["../../../src/adapter/ingest/game-contract-seams.ts"],"names":[],"mappings":"AAAA;;sEAEsE;AAgBtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;CAK/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;CAI5B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAG3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAIpC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;CAIrC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOrC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAGlC,CAAC"}
@@ -16,6 +16,7 @@ export const GAME_LIFECYCLE_SHAPE = defineSeamShape()({
16
16
  start: { optional: true, kind: 'function', required: 'effect' },
17
17
  pause: { optional: true, kind: 'function', required: 'effect' },
18
18
  resume: { optional: true, kind: 'function', required: 'effect' },
19
+ dispose: { optional: true, kind: 'function', required: 'effect' },
19
20
  });
20
21
  export const GAME_SCENES_SHAPE = defineSeamShape()({
21
22
  list: { optional: false, kind: 'function', required: 'operation' },
@@ -14,9 +14,6 @@
14
14
  * implementation of this contract. An ingested game climbs the same ladder
15
15
  * endpoint by endpoint: capture infers what it can (the scene), the game
16
16
  * declares what inference can't reach (its DOM root, its session lifecycle).
17
- *
18
- * Origin (root), F17+F21 (lifecycle), WO-SYS1 (systems), WO-SYS2
19
- * (`systems.systemAdapters`).
20
17
  */
21
18
  import type { AudioAdapter, CameraAdapter, NavigationAdapter, NetworkingAdapter, PhysicsCarrier, RenderDebugAdapter } from '../system-adapter';
22
19
  /**
@@ -35,6 +32,28 @@ export interface VgaiGameLifecycle {
35
32
  start?(): void;
36
33
  pause?(): void;
37
34
  resume?(): void;
35
+ /**
36
+ * END this session: unmount the game's root, stop its frame loop, release
37
+ * what its boot created. The host calls it FIRST at ingest teardown, before
38
+ * its own reclamation — the game's own way out always outranks the host's.
39
+ *
40
+ * Why this slot exists (measured on racing-game): a self-booting R3F game's
41
+ * fiber loop is not the host's to stop — the game never calls
42
+ * `renderer.setAnimationLoop` (the loop-gate's own warning says it cannot
43
+ * hold it) and fiber is a shared bare dependency the realm scheduler does
44
+ * not wrap — so after teardown the DEAD mount's `useFrame` kept ticking
45
+ * against React-nulled refs, one `TypeError` per frame (~490 per walk)
46
+ * until the page reloaded. Only the code that created the root can end it,
47
+ * and for a vendored game that code is the host-added entry shim, which
48
+ * publishes the unmount for the contract shim to declare here.
49
+ *
50
+ * A game that declares nothing keeps today's behavior — host-side
51
+ * reclamation only, with its loop's ungovernability remaining the
52
+ * loop-gate's named standing warning. A CANVAS ingest whose module-scope
53
+ * `Application` survives teardown BY DESIGN (the warm-remount contract —
54
+ * see `resolve-three.ts`'s `remountEpochs` doc) simply does not declare it.
55
+ */
56
+ dispose?(): void;
38
57
  }
39
58
  /** One of the game's own scenes, as {@link VgaiGameScenes} lists it. `id` is the
40
59
  * game's OWN identifier for it — the string `current()` reports and `goTo()`
@@ -1 +1 @@
1
- {"version":3,"file":"game-contract.d.ts","sourceRoot":"","sources":["../../../src/adapter/ingest/game-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAG3B;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,IAAI,IAAI,CAAC;IACf,KAAK,CAAC,IAAI,IAAI,CAAC;IACf,MAAM,CAAC,IAAI,IAAI,CAAC;CACjB;AAED;;kDAEkD;AAClD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,IAAI,IAAI,aAAa,EAAE,CAAC;IACxB;;qBAEiB;IACjB,OAAO,IAAI,MAAM,GAAG,IAAI,CAAC;IACzB;;2DAEuD;IACvD,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CA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GAAG,IAAI,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GAAG,gBAAgB,CAU7F;AAED;8BAC8B;AAC9B,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GAC5C,uBAAuB,CAezB"}
@@ -14,9 +14,6 @@
14
14
  * implementation of this contract. An ingested game climbs the same ladder
15
15
  * endpoint by endpoint: capture infers what it can (the scene), the game
16
16
  * declares what inference can't reach (its DOM root, its session lifecycle).
17
- *
18
- * Origin (root), F17+F21 (lifecycle), WO-SYS1 (systems), WO-SYS2
19
- * (`systems.systemAdapters`).
20
17
  */
21
18
  import { GAME_SCENES_SHAPE } from './game-contract-seams';
22
19
  /**
@@ -31,7 +31,7 @@
31
31
  * classes. A game that bundles its own copy cannot be captured this way (the
32
32
  * module-identity gatekeeper).
33
33
  *
34
- * Wave 17 adds an OPTIONAL, ADDITIVE composer capture: a game rendering through
34
+ * There is an OPTIONAL, ADDITIVE composer capture: a game rendering through
35
35
  * its own three.js addon `EffectComposer`
36
36
  * (`three/examples/jsm/postprocessing/EffectComposer.js`) still trips the `render`
37
37
  * trap above (its `RenderPass` calls `renderer.render(scene,camera)` internally),
@@ -53,7 +53,7 @@
53
53
  * (`docs/f13-bloom-composer-proof/record-fixed.mjs`).
54
54
  */
55
55
  import type * as THREE from 'three';
56
- import { type VisibilityClock, type VisibleCaptureWindow } from './visible-capture-window';
56
+ import { type CaptureWaitOptions } from './visible-capture-window';
57
57
  /** The renderer operations the ingest host may lawfully use after capture.
58
58
  * WebGLRenderer supplies every member; DOM-backed Three addon renderers such as
59
59
  * CSS3DRenderer deliberately omit the WebGL-only lifecycle operations. */
@@ -184,30 +184,26 @@ export interface RenderPassHooks {
184
184
  after(): void;
185
185
  }
186
186
  /**
187
- * Options for {@link SceneCaptureHandle.waitForCapture}. Passing a bare number
188
- * is the same as `{ timeoutMs }` the shape every existing caller uses.
187
+ * Options for {@link SceneCaptureHandle.waitForCapture} declared with the
188
+ * window they configure (`visible-capture-window.ts`), because they configure
189
+ * the WAIT and not this surface, and re-exported here for the callers that
190
+ * look for them beside `waitForCapture`.
189
191
  */
190
- export interface CaptureWaitOptions {
191
- /** The capture window, in VISIBLE milliseconds (default 10s). */
192
- timeoutMs?: number | undefined;
193
- /** Injected in tests; defaults to the document's own visibility. */
194
- visibility?: VisibilityClock | undefined;
195
- /**
196
- * Called with a LIVE view of the wait when it begins, and with `null` the
197
- * moment it ends (captured, expired, or the window was cancelled).
198
- *
199
- * A wait parked on a hidden tab is otherwise indistinguishable from a hung
200
- * mount: nothing renders, nothing fails, and every door reports silence.
201
- * This is the seam the editor publishes to `vgai status` so the answer is
202
- * "waiting for the first visible frame — the tab is hidden", not a
203
- * countdown that is not running.
204
- */
205
- onWait?: ((wait: VisibleCaptureWindow | null) => void) | undefined;
206
- }
192
+ export type { CaptureWaitOptions };
193
+ /**
194
+ * WHICH interception yielded the captured renderer. Not decoration: every
195
+ * coverage row the host prints names the mechanism it reached the game
196
+ * through, and the two are materially different — a `shared-three` game runs
197
+ * on the host's very `three` instance, while a `devtools-observer` game runs
198
+ * its OWN pinned revision and only its renderer is shared.
199
+ */
200
+ export type CaptureMechanism = 'shared-three' | 'devtools-observer';
207
201
  /** Handle returned by {@link installSceneCapture}. */
208
202
  export interface SceneCaptureHandle {
209
203
  /** The captured runtime, or null until the game renders its first frame. */
210
204
  readonly captured: CapturedRuntime | null;
205
+ /** How {@link captured} was reached; `null` while nothing is captured. */
206
+ readonly capturedVia: CaptureMechanism | null;
211
207
  /**
212
208
  * Install (or clear, with `null`) hooks bracketing every `render()` the
213
209
  * CAPTURED renderer makes. Set AFTER capture, because the consumer
@@ -233,7 +229,7 @@ export interface SceneCaptureHandle {
233
229
  * host can pause (set null) and resume (re-set it) the game's own loop. */
234
230
  getAnimationLoop(renderer: CapturedThreeRenderer): ((time: number) => void) | null;
235
231
  /**
236
- * Wave 17 (D-C3): resize every captured `EffectComposer` that renders
232
+ * Resize every captured `EffectComposer` that renders
237
233
  * through the captured renderer to `w`×`h`, matching its pixel ratio to
238
234
  * `renderer.getPixelRatio()` — the composer tracks whatever DPR policy the
239
235
  * host already applies to the renderer; no separate knob. A no-op when no
@@ -249,7 +245,7 @@ export interface SceneCaptureHandle {
249
245
  * Install the render accessor trap on `threeNamespace.WebGLRenderer.prototype`.
250
246
  * Pass the host's `three` module so the game (which shares it) is trapped.
251
247
  *
252
- * `effectComposerCtor` is OPTIONAL (Wave 17, D-C2): pass the host's
248
+ * `effectComposerCtor` is OPTIONAL: pass the host's
253
249
  * `EffectComposer` class (`three/examples/jsm/postprocessing/EffectComposer.js`)
254
250
  * to also trap composer construction/rendering on that shared addon, so
255
251
  * `resizeComposers()` can reach it. Omitting it (or a game never constructing
@@ -1 +1 @@
1
- {"version":3,"file":"scene-capture.d.ts","sourceRoot":"","sources":["../../../src/adapter/ingest/scene-capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC;;0EAE0E;AAC1E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5C,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK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B,EAAE,CAAC;AAEnC;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,mBAAmB,CAAC;AAEpE,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1C,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC9C;;;;;;OAMG;IACH,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;IACxD;;;;;;;;;OASG;IACH,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAChF,4EAA4E;IAC5E,YAAY,IAAI,MAAM,CAAC;IACvB;gFAC4E;IAC5E,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IACnF;;;;;;;;OAQG;IACH,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,yEAAyE;IACzE,SAAS,IAAI,IAAI,CAAC;CACnB;AA+ID;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,OAAO,EACvB,kBAAkB,CAAC,EAAE,OAAO,EAC5B,IAAI,CAAC,EAAE,mBAAmB,GACzB,kBAAkB,CAsZpB"}
@@ -31,7 +31,7 @@
31
31
  * classes. A game that bundles its own copy cannot be captured this way (the
32
32
  * module-identity gatekeeper).
33
33
  *
34
- * Wave 17 adds an OPTIONAL, ADDITIVE composer capture: a game rendering through
34
+ * There is an OPTIONAL, ADDITIVE composer capture: a game rendering through
35
35
  * its own three.js addon `EffectComposer`
36
36
  * (`three/examples/jsm/postprocessing/EffectComposer.js`) still trips the `render`
37
37
  * trap above (its `RenderPass` calls `renderer.render(scene,camera)` internally),
@@ -71,11 +71,105 @@ function objectId(value) {
71
71
  const uuid = typeof obj?.uuid === 'string' ? obj.uuid : '(no uuid)';
72
72
  return `${type}:${uuid}`;
73
73
  }
74
+ /**
75
+ * FOREIGN-INSTANCE CAPTURE — through three's own `__THREE_DEVTOOLS__` seam.
76
+ *
77
+ * The prototype trap above can only reach a game that resolves `three` to the
78
+ * host's instance ("the module-identity gatekeeper" in this file's header). A
79
+ * game vendored as a BUILT BUNDLE routinely does not: a webpack/CRA build
80
+ * inlines three outright, and a Vite build externalized to the game's own
81
+ * pinned `three-rNNN.module.js` loads a second ES module. Those games rendered
82
+ * a real picture the host could not see, and the mount failed by name.
83
+ *
84
+ * The canvas lane already answers this exact question and answers it the same
85
+ * way: `authoring/canvas-runtime-recognition.ts` recognizes Phaser and Babylon
86
+ * through THEIR OWN documented public registries (`Phaser.GAMES`,
87
+ * `BABYLON.Engine.Instances`) rather than by sharing a module instance. three's
88
+ * equivalent public registry is `__THREE_DEVTOOLS__`: every `WebGLRenderer`
89
+ * constructor since r118 ends with
90
+ *
91
+ * if ( typeof __THREE_DEVTOOLS__ !== 'undefined' )
92
+ * __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
93
+ *
94
+ * — a bare global lookup, so it is not affected by the game-globals lexical
95
+ * shadow, and it is present in every revision this repo vendors (r129, r155,
96
+ * r170) as well as the host's own r180. Setting that global before the game's
97
+ * modules evaluate therefore hands the host the game's renderer INSTANCE, and
98
+ * an own-property wrapper on that instance's `render` yields the identical
99
+ * `(scene, camera, renderer)` triple the prototype trap yields.
100
+ *
101
+ * This never changes what happens for a deduped game: such a renderer's own
102
+ * `render` assignment was already intercepted by the prototype setter, so
103
+ * `alreadyTrapped` skips it and there is exactly one interception per renderer.
104
+ *
105
+ * Returns its own teardown. If something else already installed
106
+ * `__THREE_DEVTOOLS__` (the real three.js devtools extension), we listen on it
107
+ * and leave it in place.
108
+ */
109
+ function observeForeignThreeRenderers(ports) {
110
+ const host = globalThis;
111
+ if (typeof EventTarget !== 'function')
112
+ return () => undefined;
113
+ const weInstalled = host.__THREE_DEVTOOLS__ === undefined;
114
+ if (weInstalled)
115
+ host.__THREE_DEVTOOLS__ = new EventTarget();
116
+ const target = host.__THREE_DEVTOOLS__;
117
+ if (!target)
118
+ return () => undefined;
119
+ const restores = [];
120
+ function wrapOwn(instance, key, value) {
121
+ const prior = instance[key];
122
+ Object.defineProperty(instance, key, {
123
+ configurable: true,
124
+ writable: true,
125
+ value,
126
+ });
127
+ restores.push(() => {
128
+ Object.defineProperty(instance, key, { configurable: true, writable: true, value: prior });
129
+ });
130
+ }
131
+ const listener = (event) => {
132
+ const detail = event.detail;
133
+ // `observe` also carries Scenes (r129/r155/r170 dispatch from the `Scene`
134
+ // constructor too). A renderer is the one that owns a canvas and a render
135
+ // method; anything else is not this observer's subject.
136
+ if (!detail || typeof detail !== 'object')
137
+ return;
138
+ if (typeof detail.render !== 'function' || !detail.domElement)
139
+ return;
140
+ if (ports.alreadyTrapped(detail))
141
+ return;
142
+ if (ports.isHostRenderer(detail))
143
+ return;
144
+ const realRender = detail.render;
145
+ wrapOwn(detail, 'render', function (...args) {
146
+ return ports.observeRender(detail, realRender, args);
147
+ });
148
+ const realSal = detail.setAnimationLoop;
149
+ if (typeof realSal === 'function') {
150
+ const sal = realSal;
151
+ wrapOwn(detail, 'setAnimationLoop', function (callback) {
152
+ if (typeof callback === 'function') {
153
+ ports.recordLoop(detail, callback);
154
+ }
155
+ return sal.call(detail, callback);
156
+ });
157
+ }
158
+ };
159
+ target.addEventListener('observe', listener);
160
+ return () => {
161
+ target.removeEventListener('observe', listener);
162
+ for (const restore of restores.splice(0))
163
+ restore();
164
+ if (weInstalled)
165
+ delete host.__THREE_DEVTOOLS__;
166
+ };
167
+ }
74
168
  /**
75
169
  * Install the render accessor trap on `threeNamespace.WebGLRenderer.prototype`.
76
170
  * Pass the host's `three` module so the game (which shares it) is trapped.
77
171
  *
78
- * `effectComposerCtor` is OPTIONAL (Wave 17, D-C2): pass the host's
172
+ * `effectComposerCtor` is OPTIONAL: pass the host's
79
173
  * `EffectComposer` class (`three/examples/jsm/postprocessing/EffectComposer.js`)
80
174
  * to also trap composer construction/rendering on that shared addon, so
81
175
  * `resizeComposers()` can reach it. Omitting it (or a game never constructing
@@ -145,14 +239,8 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
145
239
  get() {
146
240
  const self = this;
147
241
  return function setAnimationLoop(cb) {
148
- if (cb) {
149
- loopCallbacks.set(self, cb);
150
- loopedRenderers.add(self);
151
- // Hidden tabs park rAF. Play/eval still need a first frame, so when
152
- // a waiter is parked we drive the game's own loop once — the same
153
- // class of tick `waitSimTime` already uses for a hidden document.
154
- queueMicrotask(pumpHiddenLoops);
155
- }
242
+ if (cb)
243
+ recordAnimationLoop(self, cb);
156
244
  const real = self[REAL_SAL];
157
245
  return typeof real === 'function'
158
246
  ? real.call(self, cb)
@@ -166,8 +254,7 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
166
254
  * `after` runs in a `finally`, so a throwing game frame still restores
167
255
  * whatever the hook armed.
168
256
  */
169
- function forwardRender(self, args) {
170
- const real = self[REAL];
257
+ function bracketedRender(self, real, args) {
171
258
  const hooks = renderPassHooks;
172
259
  if (hooks === null || !captured || self !== captured.renderer) {
173
260
  return real.apply(self, args);
@@ -180,6 +267,18 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
180
267
  hooks.after();
181
268
  }
182
269
  }
270
+ function forwardRender(self, args) {
271
+ return bracketedRender(self, self[REAL], args);
272
+ }
273
+ /** Register a game's animation-loop callback, whichever trap saw it. */
274
+ function recordAnimationLoop(renderer, callback) {
275
+ loopCallbacks.set(renderer, callback);
276
+ loopedRenderers.add(renderer);
277
+ // Hidden tabs park rAF. Play/eval still need a first frame, so when a
278
+ // waiter is parked we drive the game's own loop once — the same class of
279
+ // tick `waitSimTime` already uses for a hidden document.
280
+ queueMicrotask(pumpHiddenLoops);
281
+ }
183
282
  /**
184
283
  * Commit to a world, DECLARATION FIRST.
185
284
  *
@@ -281,6 +380,20 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
281
380
  };
282
381
  },
283
382
  });
383
+ // A game that does NOT share the host's `three` never reaches the prototype
384
+ // trap above. three's own devtools seam reaches it anyway — see
385
+ // {@link observeForeignThreeRenderers}.
386
+ const foreignRenderers = new WeakSet();
387
+ const stopForeignObserver = observeForeignThreeRenderers({
388
+ alreadyTrapped: (renderer) => renderer[REAL] !== undefined,
389
+ isHostRenderer: (renderer) => opts?.isHostRenderer?.(renderer) === true,
390
+ observeRender: (self, real, args) => {
391
+ foreignRenderers.add(self);
392
+ observeRendererRender(self, args[0], args[1]);
393
+ return bracketedRender(self, real, args);
394
+ },
395
+ recordLoop: recordAnimationLoop,
396
+ });
284
397
  // DOM-backed Three renderers (CSS3DRenderer is the first) use a normal
285
398
  // prototype method rather than WebGLRenderer's constructor assignment. Trap
286
399
  // only classes explicitly supplied by the host, and restore each byte-for-byte.
@@ -309,7 +422,7 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
309
422
  rendererProto.render = priorRender;
310
423
  });
311
424
  }
312
- // ---- Wave 17 (D-C2): additive composer capture, only when a composer ctor
425
+ // ---- (D-C2): additive composer capture, only when a composer ctor
313
426
  // was passed. `EffectComposer` methods (including `render`) live on the
314
427
  // PROTOTYPE (a plain ES class — the constructor never does `this.render =
315
428
  // …`), so a direct method-wrapper suffices — no getter/setter indirection
@@ -334,7 +447,7 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
334
447
  };
335
448
  }
336
449
  // Extracted so `uninstall()`'s own cognitive complexity doesn't grow with
337
- // this additive Wave-17 restore step (biome's noExcessiveCognitiveComplexity).
450
+ // this additive restore step (biome's noExcessiveCognitiveComplexity).
338
451
  function restoreComposerTrap() {
339
452
  if (!composerProto)
340
453
  return;
@@ -347,6 +460,13 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
347
460
  get captured() {
348
461
  return captured;
349
462
  },
463
+ get capturedVia() {
464
+ if (!captured)
465
+ return null;
466
+ return foreignRenderers.has(captured.renderer)
467
+ ? 'devtools-observer'
468
+ : 'shared-three';
469
+ },
350
470
  getDrawCount() {
351
471
  return drawCount;
352
472
  },
@@ -392,8 +512,11 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
392
512
  opts.onWait?.(null);
393
513
  reject(new Error(`Scene capture timed out after ${timeoutMs}ms of VISIBLE time ` +
394
514
  `(${Math.round(captureWindow.elapsedHiddenMs())}ms browser-suspended, which is ` +
395
- 'not counted because no frame can be presented) — the game never rendered, ' +
396
- 'or it bundles its own (un-shared) copy of three.'));
515
+ 'not counted because no frame can be presented) — no three renderer of ANY ' +
516
+ "instance drew a scene: neither the host's own `three` (the shared prototype " +
517
+ "trap) nor a renderer announcing itself on three's `__THREE_DEVTOOLS__` seam, " +
518
+ 'which is what reaches a game that bundles its own copy. The game never ' +
519
+ 'rendered.'));
397
520
  },
398
521
  });
399
522
  const wrapped = (rt) => {
@@ -450,10 +573,13 @@ export function installSceneCapture(threeNamespace, effectComposerCtor, opts) {
450
573
  Object.defineProperty(proto, 'setAnimationLoop', priorSAL);
451
574
  else
452
575
  delete proto['setAnimationLoop'];
453
- // Wave 17: fully restore the composer addon's `render` (a plain
576
+ // Fully restore the composer addon's `render` (a plain
454
577
  // prototype method — no per-instance own-property to restore, unlike
455
578
  // the renderer/loop traps above).
456
579
  restoreComposerTrap();
580
+ // Stop listening on three's devtools seam and give every foreign
581
+ // renderer instance its own `render`/`setAnimationLoop` back.
582
+ stopForeignObserver();
457
583
  for (const restore of additionalRendererRestores)
458
584
  restore();
459
585
  },
@@ -115,6 +115,40 @@ export interface VisibleCaptureWindow {
115
115
  /** Stop the timer and drop the visibility listener. Idempotent. */
116
116
  cancel(): void;
117
117
  }
118
+ /**
119
+ * How a caller configures ONE such wait — the options both `waitForCapture`s
120
+ * take (`adapter/ingest/scene-capture.ts` on the three surface,
121
+ * `pixi/scene-capture.ts` on the canvas surface). Passing a bare number
122
+ * instead is `{ timeoutMs }`, the shape every existing caller uses.
123
+ *
124
+ * It lives HERE, with the window, rather than once per lane, because every
125
+ * field is a parameter of the mechanism above and none of them is a parameter
126
+ * of a surface: `timeoutMs` is {@link startVisibleCaptureWindow}'s `budgetMs`,
127
+ * `visibility` is its {@link VisibilityClock}, and `onWait` hands out the
128
+ * {@link VisibleCaptureWindow} it returns. The two lanes had identical copies
129
+ * of this — which is what a shape with no lane-specific field looks like when
130
+ * it is declared per lane — while both already imported those three names from
131
+ * this module. Genuinely per-surface shapes (`CapturedRuntime` vs
132
+ * `CapturedRuntime2D`: a three scene/renderer against a Pixi stage/app) stay in
133
+ * their own lanes and keep their own names.
134
+ */
135
+ export interface CaptureWaitOptions {
136
+ /** The capture window, in VISIBLE milliseconds (default 10s). */
137
+ timeoutMs?: number | undefined;
138
+ /** Injected in tests; defaults to the document's own visibility. */
139
+ visibility?: VisibilityClock | undefined;
140
+ /**
141
+ * Called with a LIVE view of the wait when it begins, and with `null` the
142
+ * moment it ends (captured, expired, or the window was cancelled).
143
+ *
144
+ * A wait parked on a hidden tab is otherwise indistinguishable from a hung
145
+ * mount: nothing renders, nothing fails, and every door reports silence.
146
+ * This is the seam the editor publishes to `vgai status` so the answer is
147
+ * "waiting for the first visible frame — the tab is hidden", not a countdown
148
+ * that is not running.
149
+ */
150
+ onWait?: ((wait: VisibleCaptureWindow | null) => void) | undefined;
151
+ }
118
152
  /**
119
153
  * Start a window that calls `onExpire` after `budgetMs` of VISIBLE time.
120
154
  * While browser frame presentation is suspended the timer is disarmed entirely
@@ -1 +1 @@
1
- {"version":3,"file":"visible-capture-window.d.ts","sourceRoot":"","sources":["../../../src/adapter/ingest/visible-capture-window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,eAAe;I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kB,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjF;AAED,sFAAsF;AACtF,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,gBAAgB,IAAI,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,eAAe,IAAI,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,IAAI,OAAO,CAAC;IACpB,wFAAwF;IACxF,WAAW,IAAI,OAAO,CAAC;IACvB,iEAAiE;IACjE,gBAAgB,IAAI,QAAQ,GAAG,WAAW,GAAG,gBAAgB,GAAG,IAAI,CAAC;IACrE,mEAAmE;IACnE,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,iDAAiD;IACjD,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACnD,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,GAAG,oBAAoB,CAuDvB"}
1
+ {"version":3,"file":"visible-capture-window.d.ts","sourceRoot":"","sources":["../../../src/adapter/ingest/visible-capture-window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,GAAG,IAAI,MAAM,CAAC;IACd,+EAA+E;IAC/E,MAAM,IAAI,OAAO,CAAC;IAClB;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,OAAO,CAAC;IACtB,6DAA6D;IAC7D,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,CAAC;IAC1B,yCAAyC;IACzC,gBAAgB,IAAI,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,eAAe,IAAI,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,IAAI,OAAO,CAAC;IACpB,wFAAwF;IACxF,WAAW,IAAI,OAAO,CAAC;IACvB,iEAAiE;IACjE,gBAAgB,IAAI,QAAQ,GAAG,WAAW,GAAG,gBAAgB,GAAG,IAAI,CAAC;IACrE,mEAAmE;IACnE,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,oEAAoE;IACpE,UAAU,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACzC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACpE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,iDAAiD;IACjD,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACnD,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,GAAG,oBAAoB,CAuDvB"}
@@ -13,7 +13,7 @@
13
13
  * copy of its stores.
14
14
  */
15
15
  import type { Game } from '../runtime/game';
16
- import { type ContractSurface } from './ingest/contract-system-adapters';
16
+ import { type ContractSurface, type ContractSystemEmptySlot } from './ingest/contract-system-adapters';
17
17
  import type { SystemAdapters } from './system-adapter';
18
18
  export declare const NATIVE_INPUT_VALUE_TYPES: readonly ["digital", "scalar", "vector2", "pointerDelta", "pointerPosition"];
19
19
  export type NativeInputValueType = (typeof NATIVE_INPUT_VALUE_TYPES)[number];
@@ -56,6 +56,15 @@ export interface NativeDebugModule {
56
56
  readonly events?: {
57
57
  readonly subscribe: (listener: (event: string, detail?: unknown) => void) => () => void;
58
58
  };
59
+ /**
60
+ * `false` while the app is intentionally BETWEEN worlds — a scene remount in flight (a
61
+ * `reload_current_scene`-style restart unmounts the running scene and the fresh one arrives
62
+ * on an ASYNC React commit). Session tick drivers (`runTicksWhenSettled`, behind both
63
+ * run-ticks doors) wait for `true` before each tick, so which tick first runs the fresh
64
+ * world is a function of the sim, never of wall timing between driver calls. Omitted =
65
+ * always settled.
66
+ */
67
+ readonly settled?: () => boolean;
59
68
  }
60
69
  export interface NativeDebugBinding {
61
70
  readonly rootId: string;
@@ -69,6 +78,18 @@ export declare function installNativeDebugBindings(game: Game, bindings: readonl
69
78
  export interface NativeSystemsBinding {
70
79
  readonly rootId: string;
71
80
  readonly slots: Readonly<Partial<SystemAdapters>>;
81
+ /**
82
+ * The slots this root's `systems` table answered with `absent(reason)` — the
83
+ * positive absences, in the game's own words.
84
+ *
85
+ * They are carried rather than dropped because they are the ONLY thing that
86
+ * can tell a coverage reader "this game has no networking" apart from "nobody
87
+ * ever looked". Nothing is installed for them (that would be the stub adapter
88
+ * `absent()`'s own comment forbids); they exist to be READ — through
89
+ * `binding.observation.entrySystems`, which is the product door the coverage
90
+ * table renders from.
91
+ */
92
+ readonly absent: readonly ContractSystemEmptySlot[];
72
93
  }
73
94
  /**
74
95
  * Read the single native `systems` export from an already-loaded root module.
@@ -76,10 +97,24 @@ export interface NativeSystemsBinding {
76
97
  * feeds the physics keying check (`PHYSICS_KEYING_BY_SURFACE`).
77
98
  */
78
99
  export declare function nativeSystemsBindingFromEntryModule(rootId: string, entryModule: unknown, surface?: ContractSurface | undefined): NativeSystemsBinding | null;
79
- /** Install every declared binding onto the mounted Game's game-scoped slot
80
- * table (`Game.installDeclaredSystemAdapters`), where the ordinary
81
- * `game.systemAdapters` merge picks them up ahead of any lingering component
82
- * registration for the same root. */
100
+ /**
101
+ * Install every declared binding onto the mounted Game's game-scoped slot
102
+ * table (`Game.installDeclaredSystemAdapters`), where the ordinary
103
+ * `game.systemAdapters` merge picks them up ahead of any lingering component
104
+ * registration for the same root.
105
+ *
106
+ * A root's ABSENCES travel the same call and install NOTHING — they are
107
+ * recorded, never bound, because the whole point of `absent()` is that no
108
+ * adapter exists to bind (see its comment: a marker, never a stub). They are
109
+ * recorded HERE rather than left on the binding alone so the answer is
110
+ * game-scoped, matching the registry every editor panel already reads: a
111
+ * `SystemAdapters` slot is filled by whichever root builds it, so "does this
112
+ * GAME have physics" cannot be answered one root at a time.
113
+ *
114
+ * A root that declares only absences therefore still calls through — skipping
115
+ * it on an empty `slots` map is what would drop exactly the games whose whole
116
+ * declaration is "I have none of these".
117
+ */
83
118
  export declare function installNativeSystemsBindings(game: Game, bindings: readonly NativeSystemsBinding[]): void;
84
119
  export {};
85
120
  //# sourceMappingURL=native-debug-module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-debug-module.d.ts","sourceRoot":"","sources":["../../src/adapter/native-debug-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,wBAAwB,8EAM3B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7E,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAA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