@vgai/engine 0.5.0-canary.20260719.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (527) 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 +461 -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 +43 -0
  8. package/dist/adapter/colyseus-networking-adapter.d.ts.map +1 -0
  9. package/dist/adapter/colyseus-networking-adapter.js +38 -0
  10. package/dist/adapter/first-party-systems.d.ts +38 -0
  11. package/dist/adapter/first-party-systems.d.ts.map +1 -0
  12. package/dist/adapter/first-party-systems.js +77 -0
  13. package/dist/adapter/game-adapter.d.ts +133 -0
  14. package/dist/adapter/game-adapter.d.ts.map +1 -0
  15. package/dist/adapter/game-adapter.js +10 -0
  16. package/dist/adapter/host-context.d.ts +71 -0
  17. package/dist/adapter/host-context.d.ts.map +1 -0
  18. package/dist/adapter/host-context.js +16 -0
  19. package/dist/adapter/index.d.ts +22 -0
  20. package/dist/adapter/index.d.ts.map +1 -0
  21. package/dist/adapter/index.js +15 -0
  22. package/dist/adapter/ingest/game-contract.d.ts +53 -0
  23. package/dist/adapter/ingest/game-contract.d.ts.map +1 -0
  24. package/dist/adapter/ingest/game-contract.js +30 -0
  25. package/dist/adapter/ingest/overlay-applier.d.ts +118 -0
  26. package/dist/adapter/ingest/overlay-applier.d.ts.map +1 -0
  27. package/dist/adapter/ingest/overlay-applier.js +132 -0
  28. package/dist/adapter/ingest/overlay-apply.d.ts +60 -0
  29. package/dist/adapter/ingest/overlay-apply.d.ts.map +1 -0
  30. package/dist/adapter/ingest/overlay-apply.js +101 -0
  31. package/dist/adapter/ingest/overlay-file.d.ts +79 -0
  32. package/dist/adapter/ingest/overlay-file.d.ts.map +1 -0
  33. package/dist/adapter/ingest/overlay-file.js +66 -0
  34. package/dist/adapter/ingest/overlay-report.d.ts +113 -0
  35. package/dist/adapter/ingest/overlay-report.d.ts.map +1 -0
  36. package/dist/adapter/ingest/overlay-report.js +103 -0
  37. package/dist/adapter/ingest/scene-capture.d.ts +97 -0
  38. package/dist/adapter/ingest/scene-capture.d.ts.map +1 -0
  39. package/dist/adapter/ingest/scene-capture.js +248 -0
  40. package/dist/adapter/ingest/upstream-pin.d.ts +47 -0
  41. package/dist/adapter/ingest/upstream-pin.d.ts.map +1 -0
  42. package/dist/adapter/ingest/upstream-pin.js +50 -0
  43. package/dist/adapter/loop-gate-report.d.ts +34 -0
  44. package/dist/adapter/loop-gate-report.d.ts.map +1 -0
  45. package/dist/adapter/loop-gate-report.js +37 -0
  46. package/dist/adapter/rapier-physics-adapter.d.ts +12 -0
  47. package/dist/adapter/rapier-physics-adapter.d.ts.map +1 -0
  48. package/dist/adapter/rapier-physics-adapter.js +46 -0
  49. package/dist/adapter/system-adapter.d.ts +206 -0
  50. package/dist/adapter/system-adapter.d.ts.map +1 -0
  51. package/dist/adapter/system-adapter.js +13 -0
  52. package/dist/adapter/transform.d.ts +18 -0
  53. package/dist/adapter/transform.d.ts.map +1 -0
  54. package/dist/adapter/transform.js +1 -0
  55. package/dist/adapter/vgai-scene-game-adapter.d.ts +108 -0
  56. package/dist/adapter/vgai-scene-game-adapter.d.ts.map +1 -0
  57. package/dist/adapter/vgai-scene-game-adapter.js +762 -0
  58. package/dist/ai/navigation.d.ts +64 -0
  59. package/dist/ai/navigation.d.ts.map +1 -0
  60. package/dist/ai/navigation.js +133 -0
  61. package/dist/animation/anim-graph-types.d.ts +25 -0
  62. package/dist/animation/anim-graph-types.d.ts.map +1 -0
  63. package/dist/animation/anim-graph-types.js +1 -0
  64. package/dist/animation/animation-clock.d.ts +213 -0
  65. package/dist/animation/animation-clock.d.ts.map +1 -0
  66. package/dist/animation/animation-clock.js +301 -0
  67. package/dist/animation/blend-node.d.ts +22 -0
  68. package/dist/animation/blend-node.d.ts.map +1 -0
  69. package/dist/animation/blend-node.js +97 -0
  70. package/dist/animation/camera-ownership.d.ts +250 -0
  71. package/dist/animation/camera-ownership.d.ts.map +1 -0
  72. package/dist/animation/camera-ownership.js +169 -0
  73. package/dist/animation/cinematic-cues.d.ts +200 -0
  74. package/dist/animation/cinematic-cues.d.ts.map +1 -0
  75. package/dist/animation/cinematic-cues.js +213 -0
  76. package/dist/animation/clip-map.d.ts +12 -0
  77. package/dist/animation/clip-map.d.ts.map +1 -0
  78. package/dist/animation/clip-map.js +37 -0
  79. package/dist/animation/gsap-registration.d.ts +119 -0
  80. package/dist/animation/gsap-registration.d.ts.map +1 -0
  81. package/dist/animation/gsap-registration.js +92 -0
  82. package/dist/animation/theatre-clock-binding.d.ts +89 -0
  83. package/dist/animation/theatre-clock-binding.d.ts.map +1 -0
  84. package/dist/animation/theatre-clock-binding.js +29 -0
  85. package/dist/animation/theatre-director.d.ts +242 -0
  86. package/dist/animation/theatre-director.d.ts.map +1 -0
  87. package/dist/animation/theatre-director.js +235 -0
  88. package/dist/animation/theatre-object-binding.d.ts +305 -0
  89. package/dist/animation/theatre-object-binding.d.ts.map +1 -0
  90. package/dist/animation/theatre-object-binding.js +351 -0
  91. package/dist/animation/xstate-animation-binding.d.ts +56 -0
  92. package/dist/animation/xstate-animation-binding.d.ts.map +1 -0
  93. package/dist/animation/xstate-animation-binding.js +331 -0
  94. package/dist/animation/xstate-animation-meta.d.ts +266 -0
  95. package/dist/animation/xstate-animation-meta.d.ts.map +1 -0
  96. package/dist/animation/xstate-animation-meta.js +252 -0
  97. package/dist/assets.d.ts +26 -0
  98. package/dist/assets.d.ts.map +1 -0
  99. package/dist/assets.js +55 -0
  100. package/dist/audio/index.d.ts +4 -0
  101. package/dist/audio/index.d.ts.map +1 -0
  102. package/dist/audio/index.js +24 -0
  103. package/dist/audio/tone-clock-binding.d.ts +75 -0
  104. package/dist/audio/tone-clock-binding.d.ts.map +1 -0
  105. package/dist/audio/tone-clock-binding.js +29 -0
  106. package/dist/audio/tone-context.d.ts +114 -0
  107. package/dist/audio/tone-context.d.ts.map +1 -0
  108. package/dist/audio/tone-context.js +39 -0
  109. package/dist/audio/tone-offline-render.d.ts +90 -0
  110. package/dist/audio/tone-offline-render.d.ts.map +1 -0
  111. package/dist/audio/tone-offline-render.js +56 -0
  112. package/dist/audio/wav-encode.d.ts +38 -0
  113. package/dist/audio/wav-encode.d.ts.map +1 -0
  114. package/dist/audio/wav-encode.js +97 -0
  115. package/dist/character/cloth-sim.d.ts +179 -0
  116. package/dist/character/cloth-sim.d.ts.map +1 -0
  117. package/dist/character/cloth-sim.js +334 -0
  118. package/dist/character/spring-chain.d.ts +135 -0
  119. package/dist/character/spring-chain.d.ts.map +1 -0
  120. package/dist/character/spring-chain.js +165 -0
  121. package/dist/core/game-loop.d.ts +42 -0
  122. package/dist/core/game-loop.d.ts.map +1 -0
  123. package/dist/core/game-loop.js +167 -0
  124. package/dist/core/seeded-random.d.ts +69 -0
  125. package/dist/core/seeded-random.d.ts.map +1 -0
  126. package/dist/core/seeded-random.js +121 -0
  127. package/dist/core/system-runner.d.ts +120 -0
  128. package/dist/core/system-runner.d.ts.map +1 -0
  129. package/dist/core/system-runner.js +297 -0
  130. package/dist/core/types.d.ts +92 -0
  131. package/dist/core/types.d.ts.map +1 -0
  132. package/dist/core/types.js +25 -0
  133. package/dist/data/data-asset.d.ts +101 -0
  134. package/dist/data/data-asset.d.ts.map +1 -0
  135. package/dist/data/data-asset.js +122 -0
  136. package/dist/data/data-check-core.d.ts +110 -0
  137. package/dist/data/data-check-core.d.ts.map +1 -0
  138. package/dist/data/data-check-core.js +178 -0
  139. package/dist/data/data-ref.d.ts +79 -0
  140. package/dist/data/data-ref.d.ts.map +1 -0
  141. package/dist/data/data-ref.js +130 -0
  142. package/dist/data/vite-plugin-data.d.ts +79 -0
  143. package/dist/data/vite-plugin-data.d.ts.map +1 -0
  144. package/dist/data/vite-plugin-data.js +217 -0
  145. package/dist/dev/console-bridge.d.ts +22 -0
  146. package/dist/dev/console-bridge.d.ts.map +1 -0
  147. package/dist/dev/console-bridge.js +71 -0
  148. package/dist/dev/debug-draw.d.ts +24 -0
  149. package/dist/dev/debug-draw.d.ts.map +1 -0
  150. package/dist/dev/debug-draw.js +73 -0
  151. package/dist/dev/logger.d.ts +30 -0
  152. package/dist/dev/logger.d.ts.map +1 -0
  153. package/dist/dev/logger.js +90 -0
  154. package/dist/dev/performance-profiler.d.ts +60 -0
  155. package/dist/dev/performance-profiler.d.ts.map +1 -0
  156. package/dist/dev/performance-profiler.js +181 -0
  157. package/dist/dev/webgl-gpu-timer.d.ts +8 -0
  158. package/dist/dev/webgl-gpu-timer.d.ts.map +1 -0
  159. package/dist/dev/webgl-gpu-timer.js +52 -0
  160. package/dist/ecs/component-manager.d.ts +205 -0
  161. package/dist/ecs/component-manager.d.ts.map +1 -0
  162. package/dist/ecs/component-manager.js +706 -0
  163. package/dist/ecs/game-component.d.ts +146 -0
  164. package/dist/ecs/game-component.d.ts.map +1 -0
  165. package/dist/ecs/game-component.js +141 -0
  166. package/dist/ecs/hmr-swap-report.d.ts +53 -0
  167. package/dist/ecs/hmr-swap-report.d.ts.map +1 -0
  168. package/dist/ecs/hmr-swap-report.js +55 -0
  169. package/dist/humanoid/bake.operation.d.ts +119 -0
  170. package/dist/humanoid/bake.operation.d.ts.map +1 -0
  171. package/dist/humanoid/bake.operation.js +228 -0
  172. package/dist/humanoid/body.d.ts +101 -0
  173. package/dist/humanoid/body.d.ts.map +1 -0
  174. package/dist/humanoid/body.js +530 -0
  175. package/dist/humanoid/clips.d.ts +62 -0
  176. package/dist/humanoid/clips.d.ts.map +1 -0
  177. package/dist/humanoid/clips.js +121 -0
  178. package/dist/humanoid/compose.d.ts +75 -0
  179. package/dist/humanoid/compose.d.ts.map +1 -0
  180. package/dist/humanoid/compose.js +176 -0
  181. package/dist/humanoid/generate.d.ts +92 -0
  182. package/dist/humanoid/generate.d.ts.map +1 -0
  183. package/dist/humanoid/generate.js +124 -0
  184. package/dist/humanoid/index.d.ts +24 -0
  185. package/dist/humanoid/index.d.ts.map +1 -0
  186. package/dist/humanoid/index.js +18 -0
  187. package/dist/humanoid/schema.d.ts +35 -0
  188. package/dist/humanoid/schema.d.ts.map +1 -0
  189. package/dist/humanoid/schema.js +87 -0
  190. package/dist/humanoid/skeleton.d.ts +103 -0
  191. package/dist/humanoid/skeleton.d.ts.map +1 -0
  192. package/dist/humanoid/skeleton.js +289 -0
  193. package/dist/index.d.ts +37 -0
  194. package/dist/index.d.ts.map +1 -0
  195. package/dist/index.js +30 -0
  196. package/dist/input/input-manager.d.ts +945 -0
  197. package/dist/input/input-manager.d.ts.map +1 -0
  198. package/dist/input/input-manager.js +2207 -0
  199. package/dist/input/input-types.d.ts +174 -0
  200. package/dist/input/input-types.d.ts.map +1 -0
  201. package/dist/input/input-types.js +1 -0
  202. package/dist/input/prompt-labels.d.ts +21 -0
  203. package/dist/input/prompt-labels.d.ts.map +1 -0
  204. package/dist/input/prompt-labels.js +121 -0
  205. package/dist/input/rebind-controller.d.ts +59 -0
  206. package/dist/input/rebind-controller.d.ts.map +1 -0
  207. package/dist/input/rebind-controller.js +85 -0
  208. package/dist/input/schema.d.ts +16 -0
  209. package/dist/input/schema.d.ts.map +1 -0
  210. package/dist/input/schema.js +228 -0
  211. package/dist/loader.d.ts +43 -0
  212. package/dist/loader.d.ts.map +1 -0
  213. package/dist/loader.js +59 -0
  214. package/dist/manifest/index.d.ts +5 -0
  215. package/dist/manifest/index.d.ts.map +1 -0
  216. package/dist/manifest/index.js +8 -0
  217. package/dist/manifest/load-file.d.ts +4 -0
  218. package/dist/manifest/load-file.d.ts.map +1 -0
  219. package/dist/manifest/load-file.js +14 -0
  220. package/dist/manifest/load.d.ts +144 -0
  221. package/dist/manifest/load.d.ts.map +1 -0
  222. package/dist/manifest/load.js +273 -0
  223. package/dist/manifest/schema.d.ts +230 -0
  224. package/dist/manifest/schema.d.ts.map +1 -0
  225. package/dist/manifest/schema.js +394 -0
  226. package/dist/physics/collision-system.d.ts +41 -0
  227. package/dist/physics/collision-system.d.ts.map +1 -0
  228. package/dist/physics/collision-system.js +64 -0
  229. package/dist/physics/physics-registry.d.ts +45 -0
  230. package/dist/physics/physics-registry.d.ts.map +1 -0
  231. package/dist/physics/physics-registry.js +65 -0
  232. package/dist/physics/transform-writer.d.ts +16 -0
  233. package/dist/physics/transform-writer.d.ts.map +1 -0
  234. package/dist/physics/transform-writer.js +38 -0
  235. package/dist/physics/trigger-dispatch.d.ts +24 -0
  236. package/dist/physics/trigger-dispatch.d.ts.map +1 -0
  237. package/dist/physics/trigger-dispatch.js +80 -0
  238. package/dist/react/game-state.d.ts +156 -0
  239. package/dist/react/game-state.d.ts.map +1 -0
  240. package/dist/react/game-state.js +222 -0
  241. package/dist/react/root-adapter.d.ts +11 -0
  242. package/dist/react/root-adapter.d.ts.map +1 -0
  243. package/dist/react/root-adapter.js +41 -0
  244. package/dist/react/unmanaged-root-detector.d.ts +12 -0
  245. package/dist/react/unmanaged-root-detector.d.ts.map +1 -0
  246. package/dist/react/unmanaged-root-detector.js +45 -0
  247. package/dist/react/use-data.d.ts +60 -0
  248. package/dist/react/use-data.d.ts.map +1 -0
  249. package/dist/react/use-data.js +101 -0
  250. package/dist/react/use-selection.d.ts +75 -0
  251. package/dist/react/use-selection.d.ts.map +1 -0
  252. package/dist/react/use-selection.js +90 -0
  253. package/dist/render/auto-batcher.d.ts +34 -0
  254. package/dist/render/auto-batcher.d.ts.map +1 -0
  255. package/dist/render/auto-batcher.js +140 -0
  256. package/dist/render/render-batch-system.d.ts +33 -0
  257. package/dist/render/render-batch-system.d.ts.map +1 -0
  258. package/dist/render/render-batch-system.js +230 -0
  259. package/dist/render/render-features.d.ts +47 -0
  260. package/dist/render/render-features.d.ts.map +1 -0
  261. package/dist/render/render-features.js +105 -0
  262. package/dist/render/render-settings.d.ts +36 -0
  263. package/dist/render/render-settings.d.ts.map +1 -0
  264. package/dist/render/render-settings.js +51 -0
  265. package/dist/runtime/create-runtime.d.ts +249 -0
  266. package/dist/runtime/create-runtime.d.ts.map +1 -0
  267. package/dist/runtime/create-runtime.js +641 -0
  268. package/dist/runtime/debug-bridge.d.ts +257 -0
  269. package/dist/runtime/debug-bridge.d.ts.map +1 -0
  270. package/dist/runtime/debug-bridge.js +224 -0
  271. package/dist/runtime/debug-registry.d.ts +288 -0
  272. package/dist/runtime/debug-registry.d.ts.map +1 -0
  273. package/dist/runtime/debug-registry.js +513 -0
  274. package/dist/runtime/frame-selector-cache.d.ts +41 -0
  275. package/dist/runtime/frame-selector-cache.d.ts.map +1 -0
  276. package/dist/runtime/frame-selector-cache.js +65 -0
  277. package/dist/runtime/game.d.ts +496 -0
  278. package/dist/runtime/game.d.ts.map +1 -0
  279. package/dist/runtime/game.js +741 -0
  280. package/dist/runtime/gameplay-rng-trap.d.ts +48 -0
  281. package/dist/runtime/gameplay-rng-trap.d.ts.map +1 -0
  282. package/dist/runtime/gameplay-rng-trap.js +96 -0
  283. package/dist/runtime/input-router.d.ts +78 -0
  284. package/dist/runtime/input-router.d.ts.map +1 -0
  285. package/dist/runtime/input-router.js +171 -0
  286. package/dist/runtime/mount-game.d.ts +129 -0
  287. package/dist/runtime/mount-game.d.ts.map +1 -0
  288. package/dist/runtime/mount-game.js +152 -0
  289. package/dist/runtime/mount-manifest.d.ts +173 -0
  290. package/dist/runtime/mount-manifest.d.ts.map +1 -0
  291. package/dist/runtime/mount-manifest.js +297 -0
  292. package/dist/runtime/render-audio-control.d.ts +110 -0
  293. package/dist/runtime/render-audio-control.d.ts.map +1 -0
  294. package/dist/runtime/render-audio-control.js +111 -0
  295. package/dist/runtime/render-control.d.ts +291 -0
  296. package/dist/runtime/render-control.d.ts.map +1 -0
  297. package/dist/runtime/render-control.js +264 -0
  298. package/dist/runtime/render-seed.d.ts +57 -0
  299. package/dist/runtime/render-seed.d.ts.map +1 -0
  300. package/dist/runtime/render-seed.js +74 -0
  301. package/dist/runtime/state-bridge.d.ts +61 -0
  302. package/dist/runtime/state-bridge.d.ts.map +1 -0
  303. package/dist/runtime/state-bridge.js +63 -0
  304. package/dist/runtime/types.d.ts +253 -0
  305. package/dist/runtime/types.d.ts.map +1 -0
  306. package/dist/runtime/types.js +1 -0
  307. package/dist/scene/asset-loaders.d.ts +79 -0
  308. package/dist/scene/asset-loaders.d.ts.map +1 -0
  309. package/dist/scene/asset-loaders.js +141 -0
  310. package/dist/scene/asset-paths.d.ts +11 -0
  311. package/dist/scene/asset-paths.d.ts.map +1 -0
  312. package/dist/scene/asset-paths.js +108 -0
  313. package/dist/scene/asset-ref-check.d.ts +88 -0
  314. package/dist/scene/asset-ref-check.d.ts.map +1 -0
  315. package/dist/scene/asset-ref-check.js +214 -0
  316. package/dist/scene/asset-registry.d.ts +38 -0
  317. package/dist/scene/asset-registry.d.ts.map +1 -0
  318. package/dist/scene/asset-registry.js +66 -0
  319. package/dist/scene/collider-dimensions.d.ts +63 -0
  320. package/dist/scene/collider-dimensions.d.ts.map +1 -0
  321. package/dist/scene/collider-dimensions.js +98 -0
  322. package/dist/scene/component-registry.d.ts +22 -0
  323. package/dist/scene/component-registry.d.ts.map +1 -0
  324. package/dist/scene/component-registry.js +37 -0
  325. package/dist/scene/defaults.d.ts +252 -0
  326. package/dist/scene/defaults.d.ts.map +1 -0
  327. package/dist/scene/defaults.js +151 -0
  328. package/dist/scene/geometries/index.d.ts +8 -0
  329. package/dist/scene/geometries/index.d.ts.map +1 -0
  330. package/dist/scene/geometries/index.js +7 -0
  331. package/dist/scene/geometries/terrain.d.ts +2 -0
  332. package/dist/scene/geometries/terrain.d.ts.map +1 -0
  333. package/dist/scene/geometries/terrain.js +37 -0
  334. package/dist/scene/geometry-registry.d.ts +24 -0
  335. package/dist/scene/geometry-registry.d.ts.map +1 -0
  336. package/dist/scene/geometry-registry.js +20 -0
  337. package/dist/scene/instance-registry.d.ts +36 -0
  338. package/dist/scene/instance-registry.d.ts.map +1 -0
  339. package/dist/scene/instance-registry.js +55 -0
  340. package/dist/scene/instancers/grid.d.ts +2 -0
  341. package/dist/scene/instancers/grid.d.ts.map +1 -0
  342. package/dist/scene/instancers/grid.js +36 -0
  343. package/dist/scene/instancers/index.d.ts +8 -0
  344. package/dist/scene/instancers/index.d.ts.map +1 -0
  345. package/dist/scene/instancers/index.js +7 -0
  346. package/dist/scene/light-camera-factory.d.ts +23 -0
  347. package/dist/scene/light-camera-factory.d.ts.map +1 -0
  348. package/dist/scene/light-camera-factory.js +68 -0
  349. package/dist/scene/material-factory.d.ts +17 -0
  350. package/dist/scene/material-factory.d.ts.map +1 -0
  351. package/dist/scene/material-factory.js +197 -0
  352. package/dist/scene/material-registry.d.ts +40 -0
  353. package/dist/scene/material-registry.d.ts.map +1 -0
  354. package/dist/scene/material-registry.js +44 -0
  355. package/dist/scene/materials/index.d.ts +8 -0
  356. package/dist/scene/materials/index.d.ts.map +1 -0
  357. package/dist/scene/materials/index.js +7 -0
  358. package/dist/scene/materials/water.d.ts +2 -0
  359. package/dist/scene/materials/water.d.ts.map +1 -0
  360. package/dist/scene/materials/water.js +54 -0
  361. package/dist/scene/parse.d.ts +23 -0
  362. package/dist/scene/parse.d.ts.map +1 -0
  363. package/dist/scene/parse.js +179 -0
  364. package/dist/scene/particles-factory.d.ts +33 -0
  365. package/dist/scene/particles-factory.d.ts.map +1 -0
  366. package/dist/scene/particles-factory.js +282 -0
  367. package/dist/scene/scene-apply.d.ts +109 -0
  368. package/dist/scene/scene-apply.d.ts.map +1 -0
  369. package/dist/scene/scene-apply.js +370 -0
  370. package/dist/scene/scene-diff-schema.d.ts +285 -0
  371. package/dist/scene/scene-diff-schema.d.ts.map +1 -0
  372. package/dist/scene/scene-diff-schema.js +92 -0
  373. package/dist/scene/scene-diff-types.d.ts +40 -0
  374. package/dist/scene/scene-diff-types.d.ts.map +1 -0
  375. package/dist/scene/scene-diff-types.js +14 -0
  376. package/dist/scene/scene-loader.d.ts +167 -0
  377. package/dist/scene/scene-loader.d.ts.map +1 -0
  378. package/dist/scene/scene-loader.js +1211 -0
  379. package/dist/scene/scene-query.d.ts +11 -0
  380. package/dist/scene/scene-query.d.ts.map +1 -0
  381. package/dist/scene/scene-query.js +63 -0
  382. package/dist/scene/scene-types.d.ts +10 -0
  383. package/dist/scene/scene-types.d.ts.map +1 -0
  384. package/dist/scene/scene-types.js +8 -0
  385. package/dist/scene/scene-version.d.ts +26 -0
  386. package/dist/scene/scene-version.d.ts.map +1 -0
  387. package/dist/scene/scene-version.js +34 -0
  388. package/dist/scene/schema/animation.d.ts +8 -0
  389. package/dist/scene/schema/animation.d.ts.map +1 -0
  390. package/dist/scene/schema/animation.js +42 -0
  391. package/dist/scene/schema/audio.d.ts +13 -0
  392. package/dist/scene/schema/audio.d.ts.map +1 -0
  393. package/dist/scene/schema/audio.js +22 -0
  394. package/dist/scene/schema/camera.d.ts +28 -0
  395. package/dist/scene/schema/camera.d.ts.map +1 -0
  396. package/dist/scene/schema/camera.js +17 -0
  397. package/dist/scene/schema/collider.d.ts +40 -0
  398. package/dist/scene/schema/collider.d.ts.map +1 -0
  399. package/dist/scene/schema/collider.js +55 -0
  400. package/dist/scene/schema/entity-ref.d.ts +31 -0
  401. package/dist/scene/schema/entity-ref.d.ts.map +1 -0
  402. package/dist/scene/schema/entity-ref.js +61 -0
  403. package/dist/scene/schema/entity.d.ts +1036 -0
  404. package/dist/scene/schema/entity.d.ts.map +1 -0
  405. package/dist/scene/schema/entity.js +153 -0
  406. package/dist/scene/schema/environment.d.ts +425 -0
  407. package/dist/scene/schema/environment.d.ts.map +1 -0
  408. package/dist/scene/schema/environment.js +357 -0
  409. package/dist/scene/schema/index.d.ts +37 -0
  410. package/dist/scene/schema/index.d.ts.map +1 -0
  411. package/dist/scene/schema/index.js +19 -0
  412. package/dist/scene/schema/instances.d.ts +14 -0
  413. package/dist/scene/schema/instances.d.ts.map +1 -0
  414. package/dist/scene/schema/instances.js +28 -0
  415. package/dist/scene/schema/joint.d.ts +23 -0
  416. package/dist/scene/schema/joint.d.ts.map +1 -0
  417. package/dist/scene/schema/joint.js +23 -0
  418. package/dist/scene/schema/light.d.ts +38 -0
  419. package/dist/scene/schema/light.d.ts.map +1 -0
  420. package/dist/scene/schema/light.js +26 -0
  421. package/dist/scene/schema/material.d.ts +199 -0
  422. package/dist/scene/schema/material.d.ts.map +1 -0
  423. package/dist/scene/schema/material.js +103 -0
  424. package/dist/scene/schema/mesh.d.ts +48 -0
  425. package/dist/scene/schema/mesh.d.ts.map +1 -0
  426. package/dist/scene/schema/mesh.js +82 -0
  427. package/dist/scene/schema/particles.d.ts +2178 -0
  428. package/dist/scene/schema/particles.d.ts.map +1 -0
  429. package/dist/scene/schema/particles.js +321 -0
  430. package/dist/scene/schema/physics.d.ts +56 -0
  431. package/dist/scene/schema/physics.d.ts.map +1 -0
  432. package/dist/scene/schema/physics.js +37 -0
  433. package/dist/scene/schema/scene-file.d.ts +303 -0
  434. package/dist/scene/schema/scene-file.d.ts.map +1 -0
  435. package/dist/scene/schema/scene-file.js +256 -0
  436. package/dist/scene/schema/shadow.d.ts +28 -0
  437. package/dist/scene/schema/shadow.d.ts.map +1 -0
  438. package/dist/scene/schema/shadow.js +20 -0
  439. package/dist/scene/schema/spline.d.ts +25 -0
  440. package/dist/scene/schema/spline.d.ts.map +1 -0
  441. package/dist/scene/schema/spline.js +15 -0
  442. package/dist/scene/schema/tuples.d.ts +12 -0
  443. package/dist/scene/schema/tuples.d.ts.map +1 -0
  444. package/dist/scene/schema/tuples.js +14 -0
  445. package/dist/scene/user-data.d.ts +185 -0
  446. package/dist/scene/user-data.d.ts.map +1 -0
  447. package/dist/scene/user-data.js +144 -0
  448. package/dist/setup/setup-audio.d.ts +20 -0
  449. package/dist/setup/setup-audio.d.ts.map +1 -0
  450. package/dist/setup/setup-audio.js +41 -0
  451. package/dist/setup/setup-particles.d.ts +17 -0
  452. package/dist/setup/setup-particles.d.ts.map +1 -0
  453. package/dist/setup/setup-particles.js +16 -0
  454. package/dist/setup/setup-physics.d.ts +25 -0
  455. package/dist/setup/setup-physics.d.ts.map +1 -0
  456. package/dist/setup/setup-physics.js +51 -0
  457. package/dist/setup/setup-renderer.d.ts +69 -0
  458. package/dist/setup/setup-renderer.d.ts.map +1 -0
  459. package/dist/setup/setup-renderer.js +363 -0
  460. package/dist/tools/define-tool.d.ts +130 -0
  461. package/dist/tools/define-tool.d.ts.map +1 -0
  462. package/dist/tools/define-tool.js +96 -0
  463. package/dist/world2d/authoring-2d.d.ts +80 -0
  464. package/dist/world2d/authoring-2d.d.ts.map +1 -0
  465. package/dist/world2d/authoring-2d.js +195 -0
  466. package/dist/world2d/capture-to-scene2d.d.ts +5 -0
  467. package/dist/world2d/capture-to-scene2d.d.ts.map +1 -0
  468. package/dist/world2d/capture-to-scene2d.js +49 -0
  469. package/dist/world2d/collision-2d.d.ts +52 -0
  470. package/dist/world2d/collision-2d.d.ts.map +1 -0
  471. package/dist/world2d/collision-2d.js +70 -0
  472. package/dist/world2d/components-2d.d.ts +47 -0
  473. package/dist/world2d/components-2d.d.ts.map +1 -0
  474. package/dist/world2d/components-2d.js +77 -0
  475. package/dist/world2d/index.d.ts +34 -0
  476. package/dist/world2d/index.d.ts.map +1 -0
  477. package/dist/world2d/index.js +32 -0
  478. package/dist/world2d/ingest-iframe-2d.d.ts +82 -0
  479. package/dist/world2d/ingest-iframe-2d.d.ts.map +1 -0
  480. package/dist/world2d/ingest-iframe-2d.js +166 -0
  481. package/dist/world2d/ingest2d.d.ts +97 -0
  482. package/dist/world2d/ingest2d.d.ts.map +1 -0
  483. package/dist/world2d/ingest2d.js +40 -0
  484. package/dist/world2d/physics2d-registry.d.ts +24 -0
  485. package/dist/world2d/physics2d-registry.d.ts.map +1 -0
  486. package/dist/world2d/physics2d-registry.js +38 -0
  487. package/dist/world2d/pixi-game-adapter.d.ts +107 -0
  488. package/dist/world2d/pixi-game-adapter.d.ts.map +1 -0
  489. package/dist/world2d/pixi-game-adapter.js +210 -0
  490. package/dist/world2d/pixi-surface.d.ts +39 -0
  491. package/dist/world2d/pixi-surface.d.ts.map +1 -0
  492. package/dist/world2d/pixi-surface.js +47 -0
  493. package/dist/world2d/scene-capture-2d.d.ts +43 -0
  494. package/dist/world2d/scene-capture-2d.d.ts.map +1 -0
  495. package/dist/world2d/scene-capture-2d.js +92 -0
  496. package/dist/world2d/scene2d-loader.d.ts +27 -0
  497. package/dist/world2d/scene2d-loader.d.ts.map +1 -0
  498. package/dist/world2d/scene2d-loader.js +275 -0
  499. package/dist/world2d/schema/entity2d.d.ts +102 -0
  500. package/dist/world2d/schema/entity2d.d.ts.map +1 -0
  501. package/dist/world2d/schema/entity2d.js +119 -0
  502. package/dist/world2d/schema/physics2d.d.ts +46 -0
  503. package/dist/world2d/schema/physics2d.d.ts.map +1 -0
  504. package/dist/world2d/schema/physics2d.js +45 -0
  505. package/dist/world2d/schema/sprite.d.ts +42 -0
  506. package/dist/world2d/schema/sprite.d.ts.map +1 -0
  507. package/dist/world2d/schema/sprite.js +63 -0
  508. package/dist/world2d/schema/tilemap.d.ts +15 -0
  509. package/dist/world2d/schema/tilemap.d.ts.map +1 -0
  510. package/dist/world2d/schema/tilemap.js +19 -0
  511. package/dist/world2d/schema/tuples2d.d.ts +20 -0
  512. package/dist/world2d/schema/tuples2d.d.ts.map +1 -0
  513. package/dist/world2d/schema/tuples2d.js +19 -0
  514. package/dist/world2d/system-adapters-2d.d.ts +16 -0
  515. package/dist/world2d/system-adapters-2d.d.ts.map +1 -0
  516. package/dist/world2d/system-adapters-2d.js +37 -0
  517. package/dist/world2d/transform-writer-2d.d.ts +16 -0
  518. package/dist/world2d/transform-writer-2d.d.ts.map +1 -0
  519. package/dist/world2d/transform-writer-2d.js +22 -0
  520. package/dist/world2d/types.d.ts +59 -0
  521. package/dist/world2d/types.d.ts.map +1 -0
  522. package/dist/world2d/types.js +1 -0
  523. package/package.json +1 -1
  524. package/schemas/vgai-game.schema.json +63 -0
  525. package/src/manifest/load.ts +7 -0
  526. package/src/manifest/schema.ts +58 -0
  527. package/src/world3d-react/r3f-adapter.tsx +8 -8
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Authorable body-type parameters for the procedural humanoid generator
3
+ * (`generateHumanoid`). Same posture as the other engine Zod schemas: every
4
+ * field carries `.describe()`, and the object is `.strict()` so a typo'd
5
+ * param fails loudly at parse instead of silently generating the default
6
+ * body.
7
+ *
8
+ * These params are a CODE-API schema (validated by `generateHumanoid` the
9
+ * way `GameComponent.schema` params are), not a fetched-file format — they
10
+ * are deliberately NOT wired into `scripts/generate-schema.ts`, whose six
11
+ * outputs are all on-disk file formats. If a scene-authorable humanoid
12
+ * entity lands later, that wiring (plus a consumption-map entry) happens
13
+ * then.
14
+ *
15
+ * All multipliers are relative to the reference rig (the vendored Mixamo
16
+ * soldier's proportions, ~1.83 m). 1 = reference. The generator keeps feet
17
+ * grounded and skin weights correct across the whole documented range.
18
+ */
19
+ import { z } from 'zod';
20
+ export declare const HumanoidParamsSchema: z.ZodObject<{
21
+ height: z.ZodOptional<z.ZodNumber>;
22
+ legLength: z.ZodDefault<z.ZodNumber>;
23
+ armLength: z.ZodDefault<z.ZodNumber>;
24
+ torsoLength: z.ZodDefault<z.ZodNumber>;
25
+ shoulderWidth: z.ZodDefault<z.ZodNumber>;
26
+ hipWidth: z.ZodDefault<z.ZodNumber>;
27
+ headSize: z.ZodDefault<z.ZodNumber>;
28
+ limbThickness: z.ZodDefault<z.ZodNumber>;
29
+ torsoGirth: z.ZodDefault<z.ZodNumber>;
30
+ }, z.core.$strict>;
31
+ /** Authorable input shape — every field optional. */
32
+ export type HumanoidParams = z.input<typeof HumanoidParamsSchema>;
33
+ /** Post-parse shape — defaults applied (only `height` stays optional). */
34
+ export type ResolvedHumanoidParams = z.output<typeof HumanoidParamsSchema>;
35
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/humanoid/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;kBAiFtB,CAAC;AAEZ,qDAAqD;AACrD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,0EAA0E;AAC1E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Authorable body-type parameters for the procedural humanoid generator
3
+ * (`generateHumanoid`). Same posture as the other engine Zod schemas: every
4
+ * field carries `.describe()`, and the object is `.strict()` so a typo'd
5
+ * param fails loudly at parse instead of silently generating the default
6
+ * body.
7
+ *
8
+ * These params are a CODE-API schema (validated by `generateHumanoid` the
9
+ * way `GameComponent.schema` params are), not a fetched-file format — they
10
+ * are deliberately NOT wired into `scripts/generate-schema.ts`, whose six
11
+ * outputs are all on-disk file formats. If a scene-authorable humanoid
12
+ * entity lands later, that wiring (plus a consumption-map entry) happens
13
+ * then.
14
+ *
15
+ * All multipliers are relative to the reference rig (the vendored Mixamo
16
+ * soldier's proportions, ~1.83 m). 1 = reference. The generator keeps feet
17
+ * grounded and skin weights correct across the whole documented range.
18
+ */
19
+ import { z } from 'zod';
20
+ export const HumanoidParamsSchema = z
21
+ .object({
22
+ height: z
23
+ .number()
24
+ .min(0.3)
25
+ .max(4)
26
+ .optional()
27
+ .describe('Target standing height in metres, measured to the crown of the head. Omit to keep ' +
28
+ 'the natural height implied by the proportion multipliers (the reference rig is ' +
29
+ '~1.83 m). All body dimensions scale uniformly to hit this, so proportions are ' +
30
+ 'controlled by the multipliers and overall size by this one number.'),
31
+ legLength: z
32
+ .number()
33
+ .min(0.5)
34
+ .max(2)
35
+ .default(1)
36
+ .describe('Thigh + shin length multiplier (1 = reference). The pelvis rest height follows ' +
37
+ 'automatically so the feet stay grounded — long legs raise the hips, short legs ' +
38
+ 'lower them.'),
39
+ armLength: z
40
+ .number()
41
+ .min(0.5)
42
+ .max(2)
43
+ .default(1)
44
+ .describe('Upper-arm + forearm length multiplier (1 = reference).'),
45
+ torsoLength: z
46
+ .number()
47
+ .min(0.5)
48
+ .max(2)
49
+ .default(1)
50
+ .describe('Spine + neck length multiplier (1 = reference) — a longer or shorter trunk.'),
51
+ shoulderWidth: z
52
+ .number()
53
+ .min(0.5)
54
+ .max(2)
55
+ .default(1)
56
+ .describe('Shoulder breadth multiplier (1 = reference): scales the lateral shoulder-root offsets ' +
57
+ 'and the clavicles.'),
58
+ hipWidth: z
59
+ .number()
60
+ .min(0.5)
61
+ .max(2)
62
+ .default(1)
63
+ .describe('Hip/pelvis breadth multiplier (1 = reference): scales the lateral upper-leg root ' +
64
+ 'offsets and the pelvis block width.'),
65
+ headSize: z
66
+ .number()
67
+ .min(0.5)
68
+ .max(2)
69
+ .default(1)
70
+ .describe('Head + neck size multiplier (1 = reference). Larger heads read younger/stylized — ' +
71
+ 'child-proportioned characters pair headSize ≈ 1.3–1.6 with a small height.'),
72
+ limbThickness: z
73
+ .number()
74
+ .min(0.4)
75
+ .max(2.5)
76
+ .default(1)
77
+ .describe('Arm and leg capsule radius multiplier (1 = reference) — slim (≈0.7) to heavyset ' +
78
+ '(≈1.5). Feet keep their reference radius so ground contact never sinks.'),
79
+ torsoGirth: z
80
+ .number()
81
+ .min(0.4)
82
+ .max(2.5)
83
+ .default(1)
84
+ .describe('Torso/pelvis bulk multiplier (1 = reference): scales the torso capsule radii and the ' +
85
+ 'pelvis block depth — the main "build" control (slim vs heavy trunk).'),
86
+ })
87
+ .strict();
@@ -0,0 +1,103 @@
1
+ /**
2
+ * The engine's STANDARD humanoid skeleton — Mixamo naming + the Mixamo rest
3
+ * pose — built at runtime ENTIRELY from `THREE.Bone` (no imported mesh, no
4
+ * loader). Promoted from the accepted Phase-1 feasibility PoC
5
+ * (`packages/engine/e2e/humanoid-skin-proof/`), which proved that a skeleton
6
+ * with these names and this rest pose plays standard Mixamo-named clips.
7
+ *
8
+ * Naming standard: **Mixamo** (`mixamorigHips`, `mixamorigSpine`, …) — the
9
+ * de-facto interchange standard for free humanoid clip libraries, and the
10
+ * naming of the repo's vendored clip source
11
+ * (`examples/rts/public/models/Soldier.glb`). Names are the
12
+ * post-`PropertyBinding.sanitizeNodeName` form (`mixamorig:Hips` →
13
+ * `mixamorigHips`), i.e. the names GLTFLoader gives clip tracks;
14
+ * `humanoid/clips.ts` maps the other spellings (`mixamorig:` / `mixamorig_` /
15
+ * bare) onto these.
16
+ *
17
+ * Rest pose: the reference rig's own T-pose. The table below is pure DATA —
18
+ * per-bone local translation (cm, the rig's native Mixamo unit) + local rest
19
+ * quaternion — extracted ONCE from Soldier.glb's node hierarchy (see the
20
+ * provenance note above the table). At runtime nothing is loaded:
21
+ * `buildHumanoidSkeleton` composes plain `THREE.Bone`s from this table.
22
+ *
23
+ * Body-type parameterization: `scaleSkeletonDef` rescales the table's
24
+ * translations (never the rest rotations) from authored `HumanoidParams` —
25
+ * per-segment length multipliers, lateral width multipliers, and a final
26
+ * uniform height normalization — then re-grounds the hips so the feet keep
27
+ * the reference rig's ground clearance. See that function's comment for the
28
+ * exact clip-compatibility contract this preserves.
29
+ */
30
+ import * as THREE from 'three';
31
+ import type { ResolvedHumanoidParams } from './schema';
32
+ /** One bone: sanitized Mixamo name, parent row index (-1 = root), local
33
+ * rest translation [x,y,z] in the rig's native cm units, local rest
34
+ * quaternion [x,y,z,w]. */
35
+ export type BoneDef = readonly [
36
+ name: string,
37
+ parentIndex: number,
38
+ translation: readonly [number, number, number],
39
+ rotation: readonly [number, number, number, number]
40
+ ];
41
+ export declare const MIXAMO_SKELETON_DEF: readonly BoneDef[];
42
+ /** The hierarchy root bone's canonical name. */
43
+ export declare const HUMANOID_HIPS_BONE = "mixamorigHips";
44
+ /** The source rig's armature transform ("Character" node in Soldier.glb):
45
+ * Mixamo exports Z-up centimetres; this maps the rig into the scene's
46
+ * Y-up metres. Applied to the Group the root bone is parented under. */
47
+ export declare const ARMATURE_ROTATION_X: number;
48
+ export declare const ARMATURE_SCALE = 0.01;
49
+ export interface BuiltSkeleton {
50
+ /** `mixamorigHips` — the hierarchy root. */
51
+ root: THREE.Bone;
52
+ /** All bones in `MIXAMO_SKELETON_DEF` row order (this order defines skinIndex values). */
53
+ bones: THREE.Bone[];
54
+ byName: Map<string, THREE.Bone>;
55
+ }
56
+ /** Build the standard humanoid bone hierarchy from the pure-data table —
57
+ * plain `THREE.Bone`s wired parent→child with the source rest pose. */
58
+ export declare function buildHumanoidSkeleton(defs?: readonly BoneDef[]): BuiltSkeleton;
59
+ /** Wrap a built bone hierarchy in the standard armature group (the Z-up-cm →
60
+ * Y-up-m transform every def-table translation is authored against). */
61
+ export declare function createArmatureGroup(rig: BuiltSkeleton): THREE.Group;
62
+ export interface ScaledSkeletonDef {
63
+ /** The rescaled bone table — feed to `buildHumanoidSkeleton`. */
64
+ defs: readonly BoneDef[];
65
+ /** The uniform factor applied to EVERY dimension at the end (1 when
66
+ * `params.height` is omitted). Body geometry radii must scale by this
67
+ * so proportions survive the height normalization. */
68
+ heightFactor: number;
69
+ /** Realized standing height, metres, measured to the head-top joint plus
70
+ * `crownPadding` (the body's head-capsule radius). */
71
+ height: number;
72
+ /** |scaled hips rest translation| / |reference hips rest translation| —
73
+ * the factor `clips.ts` multiplies hips `.position` tracks by, so root
74
+ * motion authored for the reference rig lands at this rig's hip height. */
75
+ hipsPositionScale: number;
76
+ }
77
+ /**
78
+ * Rescale the reference skeleton table for a body type.
79
+ *
80
+ * Order of operations (all in the table's native Z-up cm space):
81
+ * 1. Per-group segment-length / lateral-width multipliers (never the hips
82
+ * row, never any rest rotation).
83
+ * 2. Re-ground: shift the hips rest translation so the lowest foot joint
84
+ * keeps the REFERENCE rig's ground clearance (longer legs raise the
85
+ * pelvis, shorter legs lower it — feet never float or sink).
86
+ * 3. Height normalization: if `params.height` is set, uniformly scale every
87
+ * translation so head-top + `crownPadding` lands exactly on it.
88
+ *
89
+ * With all-default params every step is an exact no-op (multiplies by 1.0,
90
+ * adds 0.0), so the default rig is bit-identical to the reference table —
91
+ * that is what keeps the Phase-1 PoC fixture's committed render valid.
92
+ *
93
+ * CLIP COMPATIBILITY (the reviewer-flagged trap): animation clips carry
94
+ * per-bone `.position` tracks baked for the SOURCE rig's segment lengths.
95
+ * Played raw on a rescaled skeleton they would snap limbs back to source
96
+ * proportions. The contract here is split with `clips.ts`: this function
97
+ * only rescales REST translations and reports `hipsPositionScale`;
98
+ * `retargetClipToHumanoid` drops every non-hips translation track (bones
99
+ * keep these rest translations) and remaps the hips track by that factor —
100
+ * the standard humanoid-retarget policy.
101
+ */
102
+ export declare function scaleSkeletonDef(params: ResolvedHumanoidParams, crownPadding: number): ScaledSkeletonDef;
103
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/humanoid/skeleton.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD;;4BAE4B;AAC5B,MAAM,MAAM,OAAO,GAAG,SAAS;IAC7B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAC9C,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;CACpD,CAAC;AAiBF,eAAO,MAAM,mBAAmB,EAAE,SAAS,OAAO,EAkEjD,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD;;yEAEyE;AACzE,eAAO,MAAM,mBAAmB,QAAe,CAAC;AAChD,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;IACjB,0FAA0F;IAC1F,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACjC;AAED;wEACwE;AACxE,wBAAgB,qBAAqB,CACnC,IAAI,GAAE,SAAS,OAAO,EAAwB,GAC7C,aAAa,CAcf;AAED;yEACyE;AACzE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,KAAK,CAAC,KAAK,CAOnE;AAuED,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;IACzB;;2DAEuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB;2DACuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf;;gFAE4E;IAC5E,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,sBAAsB,EAC9B,YAAY,EAAE,MAAM,GACnB,iBAAiB,CAyDnB"}
@@ -0,0 +1,289 @@
1
+ /**
2
+ * The engine's STANDARD humanoid skeleton — Mixamo naming + the Mixamo rest
3
+ * pose — built at runtime ENTIRELY from `THREE.Bone` (no imported mesh, no
4
+ * loader). Promoted from the accepted Phase-1 feasibility PoC
5
+ * (`packages/engine/e2e/humanoid-skin-proof/`), which proved that a skeleton
6
+ * with these names and this rest pose plays standard Mixamo-named clips.
7
+ *
8
+ * Naming standard: **Mixamo** (`mixamorigHips`, `mixamorigSpine`, …) — the
9
+ * de-facto interchange standard for free humanoid clip libraries, and the
10
+ * naming of the repo's vendored clip source
11
+ * (`examples/rts/public/models/Soldier.glb`). Names are the
12
+ * post-`PropertyBinding.sanitizeNodeName` form (`mixamorig:Hips` →
13
+ * `mixamorigHips`), i.e. the names GLTFLoader gives clip tracks;
14
+ * `humanoid/clips.ts` maps the other spellings (`mixamorig:` / `mixamorig_` /
15
+ * bare) onto these.
16
+ *
17
+ * Rest pose: the reference rig's own T-pose. The table below is pure DATA —
18
+ * per-bone local translation (cm, the rig's native Mixamo unit) + local rest
19
+ * quaternion — extracted ONCE from Soldier.glb's node hierarchy (see the
20
+ * provenance note above the table). At runtime nothing is loaded:
21
+ * `buildHumanoidSkeleton` composes plain `THREE.Bone`s from this table.
22
+ *
23
+ * Body-type parameterization: `scaleSkeletonDef` rescales the table's
24
+ * translations (never the rest rotations) from authored `HumanoidParams` —
25
+ * per-segment length multipliers, lateral width multipliers, and a final
26
+ * uniform height normalization — then re-grounds the hips so the feet keep
27
+ * the reference rig's ground clearance. See that function's comment for the
28
+ * exact clip-compatibility contract this preserves.
29
+ */
30
+ import * as THREE from 'three';
31
+ /**
32
+ * Provenance: generated from `examples/rts/public/models/Soldier.glb`
33
+ * (the three.js example Mixamo soldier vendored by the RTS example) by
34
+ * parsing the GLB JSON chunk and walking `skins[0].joints[0]`'s node
35
+ * subtree — 65 bones, covering all 52 nodes the GLB's Idle/Run/TPose/Walk
36
+ * clips animate. Extraction (node):
37
+ *
38
+ * const json = JSON.parse(glb.slice(20, 20 + glb.readUInt32LE(12)));
39
+ * walk(hipsNode, n => [name(n).replace(/[\[\]\.:\/]/g, ''), parentRow,
40
+ * n.translation ?? [0,0,0], n.rotation ?? [0,0,0,1]]);
41
+ */
42
+ // The rig's ±90° rest rotations serialize as ~0.7071 in the GLB; Math.SQRT1_2
43
+ // is the exact intent.
44
+ const R2 = Math.SQRT1_2;
45
+ export const MIXAMO_SKELETON_DEF = [
46
+ ['mixamorigHips', -1, [-0.1602, 1.147488, 106.130768], [0, R2, R2, 0]],
47
+ ['mixamorigSpine', 0, [-0.038121, 9.490517, -1.392063], [0, 0, 0, 1]],
48
+ ['mixamorigSpine1', 1, [-0.044231, 11.072289, -1.624071], [0, 0, 0, 1]],
49
+ ['mixamorigSpine2', 2, [-0.050549, 12.654045, -1.856082], [0, 0, 0, 1]],
50
+ ['mixamorigNeck', 3, [-0.056868, 14.235764, -2.088092], [0, 0, 0, 1]],
51
+ ['mixamorigHead', 4, [0, 3.280212, 0.313332], [0, 0, 0, 1]],
52
+ ['mixamorigHeadTop_End', 5, [0, 25.653503, 2.450463], [0, 0, 0, 1]],
53
+ ['mixamorigLeftShoulder', 3, [6.728773, 11.756622, -2.05846], [R2, R2, 0, 0]],
54
+ ['mixamorigLeftArm', 7, [-3.178758, 14.094679, -0.059263], [0, 0, 0, 1]],
55
+ ['mixamorigLeftForeArm', 8, [0.000015, 23.160294, 0], [0, 0, 0, 1]],
56
+ ['mixamorigLeftHand', 9, [0.000036, 24.07176, 0.000015], [0, 0, 0, 1]],
57
+ ['mixamorigLeftHandThumb1', 10, [-1.925056, 4.173385, -1.510903], [0, 0, 0, 1]],
58
+ ['mixamorigLeftHandThumb2', 11, [-1.730873, 2.998001, -1.730855], [0, 0, 0, 1]],
59
+ ['mixamorigLeftHandThumb3', 12, [-2.106666, 3.648872, -2.106638], [0, 0, 0, 1]],
60
+ ['mixamorigLeftHandThumb4', 13, [-1.712988, 2.967014, -1.712967], [0, 0, 0, 1]],
61
+ ['mixamorigLeftHandIndex1', 10, [-0.395972, 14.669356, -2.855875], [0, 0, 0, 1]],
62
+ ['mixamorigLeftHandIndex2', 15, [-0.000021, 3.24861, -0.000036], [0, 0, 0, 1]],
63
+ ['mixamorigLeftHandIndex3', 16, [0.000013, 2.659588, -0.000042], [0, 0, 0, 1]],
64
+ ['mixamorigLeftHandIndex4', 17, [0.000012, 3.633183, -0.00002], [0, 0, 0, 1]],
65
+ ['mixamorigLeftHandMiddle1', 10, [0.000009, 14.409812, -0.000004], [0, 0, 0, 1]],
66
+ ['mixamorigLeftHandMiddle2', 19, [-0.000006, 3.25907, -0.000035], [0, 0, 0, 1]],
67
+ ['mixamorigLeftHandMiddle3', 20, [-0.000003, 2.639858, -0.000025], [0, 0, 0, 1]],
68
+ ['mixamorigLeftHandMiddle4', 21, [-0.000006, 3.673858, -0.000035], [0, 0, 0, 1]],
69
+ ['mixamorigLeftHandRing1', 10, [0.318856, 13.191451, 3.305259], [0, 0, 0, 1]],
70
+ ['mixamorigLeftHandRing2', 23, [-0.000007, 2.717635, -0.000018], [0, 0, 0, 1]],
71
+ ['mixamorigLeftHandRing3', 24, [0.000012, 2.134457, 0.000041], [0, 0, 0, 1]],
72
+ ['mixamorigLeftHandRing4', 25, [0, 2.786875, -0.000016], [0, 0, 0, 1]],
73
+ ['mixamorigLeftHandPinky1', 10, [-0.521934, 11.636352, 5.613723], [0, 0, 0, 1]],
74
+ ['mixamorigLeftHandPinky2', 27, [-0.000007, 1.559371, 0], [0.000002, -0.000002, 0, 1]],
75
+ ['mixamorigLeftHandPinky3', 28, [0.000001, 1.540605, -0.000013], [-0.000002, 0.000002, 0, 1]],
76
+ ['mixamorigLeftHandPinky4', 29, [-0.000003, 1.668713, 0], [-0.000002, 0.000002, 0.000005, 1]],
77
+ ['mixamorigRightShoulder', 3, [-6.823778, 11.756622, -2.117723], [0, 0, R2, R2]],
78
+ ['mixamorigRightArm', 31, [-3.183563, 14.057526, -0.05926], [0, 0, 0, 1]],
79
+ ['mixamorigRightForeArm', 32, [0, 23.1602, 0], [0, 0, 0, 1]],
80
+ ['mixamorigRightHand', 33, [-0.000015, 24.14341, -0.000017], [0, 0, 0, 1]],
81
+ ['mixamorigRightHandThumb1', 34, [-2.027328, 4.192596, 1.472372], [0, 0, 0, 1]],
82
+ ['mixamorigRightHandThumb2', 35, [-1.747421, 3.026642, 1.747453], [0, 0, 0, 1]],
83
+ ['mixamorigRightHandThumb3', 36, [-2.123373, 3.677785, 2.1234], [0, 0, 0, 1]],
84
+ ['mixamorigRightHandThumb4', 37, [-1.693868, 2.933862, 1.693906], [0, 0, 0, 1]],
85
+ ['mixamorigRightHandIndex1', 34, [-0.40802, 14.636856, 3.083014], [0, 0, 0, 1]],
86
+ ['mixamorigRightHandIndex2', 39, [0, 3.21624, 0.000026], [0, 0, 0, 1]],
87
+ ['mixamorigRightHandIndex3', 40, [0.000015, 2.638268, 0.000045], [0, 0, 0, 1]],
88
+ ['mixamorigRightHandIndex4', 41, [0, 3.65332, 0.000027], [0, 0, 0, 1]],
89
+ ['mixamorigRightHandMiddle1', 34, [0.000031, 14.530449, -0.000024], [0, 0, 0, 1]],
90
+ ['mixamorigRightHandMiddle2', 43, [0, 3.12674, 0], [0, 0, 0, 1]],
91
+ ['mixamorigRightHandMiddle3', 44, [0.000008, 2.672478, 0.000014], [0, 0, 0, 1]],
92
+ ['mixamorigRightHandMiddle4', 45, [-0.042618, 3.130852, 0.057592], [0, 0, 0, 1]],
93
+ ['mixamorigRightHandRing1', 34, [0.19577, 12.771111, -2.96601], [0, 0, 0, 1]],
94
+ ['mixamorigRightHandRing2', 47, [0.000015, 2.512802, -0.000039], [0, 0, 0, 1]],
95
+ ['mixamorigRightHandRing3', 48, [-0.000015, 2.197067, 0.000041], [0, 0, 0, 1]],
96
+ ['mixamorigRightHandRing4', 49, [0, 3.068436, 0], [0, 0, 0, 1]],
97
+ ['mixamorigRightHandPinky1', 34, [-0.461517, 11.750786, -5.650592], [0, 0, 0, 1]],
98
+ ['mixamorigRightHandPinky2', 51, [-0.000015, 1.67952, 0.000027], [0, 0, 0, 1]],
99
+ ['mixamorigRightHandPinky3', 52, [0, 1.364082, 0.000023], [0, 0, 0, 1]],
100
+ ['mixamorigRightHandPinky4', 53, [0, 1.668221, 0.000039], [0, 0, 0, 1]],
101
+ ['mixamorigLeftUpLeg', 0, [9.618273, -5.272293, -1.010886], [1, 0, 0, 0]],
102
+ ['mixamorigLeftLeg', 55, [0.116409, 43.344528, -1.323286], [0, 0, 0, 1]],
103
+ ['mixamorigLeftFoot', 56, [-0.102314, 44.292152, 4.219776], [-R2, 0, 0, R2]],
104
+ ['mixamorigLeftToeBase', 57, [2.599463, 15.813891, 11.814322], [0, 0, 0, 1]],
105
+ ['mixamorigLeftToe_End', 58, [1.22305, 7.973637, -0.044495], [0, 0, 0, 1]],
106
+ ['mixamorigRightUpLeg', 0, [-9.940967, -5.27272, -1.211655], [1, 0, 0, 0]],
107
+ ['mixamorigRightLeg', 60, [-0.103974, 43.304852, -2.031704], [0, 0, 0, 1]],
108
+ ['mixamorigRightFoot', 61, [0.117103, 44.331413, 4.727186], [-R2, 0, 0, R2]],
109
+ ['mixamorigRightToeBase', 62, [-2.599469, 15.99981, 11.814546], [0, 0, 0, 1]],
110
+ ['mixamorigRightToe_End', 63, [-1.223054, 7.92706, -0.044394], [0, 0, 0, 1]],
111
+ ];
112
+ /** The hierarchy root bone's canonical name. */
113
+ export const HUMANOID_HIPS_BONE = 'mixamorigHips';
114
+ /** The source rig's armature transform ("Character" node in Soldier.glb):
115
+ * Mixamo exports Z-up centimetres; this maps the rig into the scene's
116
+ * Y-up metres. Applied to the Group the root bone is parented under. */
117
+ export const ARMATURE_ROTATION_X = -Math.PI / 2;
118
+ export const ARMATURE_SCALE = 0.01;
119
+ /** Build the standard humanoid bone hierarchy from the pure-data table —
120
+ * plain `THREE.Bone`s wired parent→child with the source rest pose. */
121
+ export function buildHumanoidSkeleton(defs = MIXAMO_SKELETON_DEF) {
122
+ const bones = [];
123
+ const byName = new Map();
124
+ for (const [name, parentIndex, t, r] of defs) {
125
+ const bone = new THREE.Bone();
126
+ bone.name = name;
127
+ bone.position.set(t[0], t[1], t[2]);
128
+ bone.quaternion.set(r[0], r[1], r[2], r[3]);
129
+ bones.push(bone);
130
+ byName.set(name, bone);
131
+ // Non-null: the table is topologically ordered (parents precede children).
132
+ if (parentIndex >= 0)
133
+ bones[parentIndex].add(bone);
134
+ }
135
+ return { root: bones[0], bones, byName };
136
+ }
137
+ /** Wrap a built bone hierarchy in the standard armature group (the Z-up-cm →
138
+ * Y-up-m transform every def-table translation is authored against). */
139
+ export function createArmatureGroup(rig) {
140
+ const armature = new THREE.Group();
141
+ armature.name = 'Armature';
142
+ armature.rotation.x = ARMATURE_ROTATION_X;
143
+ armature.scale.setScalar(ARMATURE_SCALE);
144
+ armature.add(rig.root);
145
+ return armature;
146
+ }
147
+ // --- Body-type scaling -----------------------------------------------------
148
+ /** Segment-length groups: each named bone's LOCAL TRANSLATION (= the length of
149
+ * the segment ending at that bone) scales by the group's multiplier. Rest
150
+ * rotations are never touched — clips own rotations at play time. */
151
+ const TORSO_LENGTH_BONES = new Set([
152
+ 'mixamorigSpine',
153
+ 'mixamorigSpine1',
154
+ 'mixamorigSpine2',
155
+ 'mixamorigNeck',
156
+ 'mixamorigHead',
157
+ ]);
158
+ const HEAD_LENGTH_BONES = new Set(['mixamorigHeadTop_End']);
159
+ const ARM_LENGTH_BONES = new Set([
160
+ 'mixamorigLeftForeArm',
161
+ 'mixamorigLeftHand',
162
+ 'mixamorigRightForeArm',
163
+ 'mixamorigRightHand',
164
+ ]);
165
+ const LEG_LENGTH_BONES = new Set([
166
+ 'mixamorigLeftLeg',
167
+ 'mixamorigLeftFoot',
168
+ 'mixamorigRightLeg',
169
+ 'mixamorigRightFoot',
170
+ ]);
171
+ /** Clavicles (Shoulder→Arm): mostly lateral in the T-pose — whole-vector
172
+ * scaled by shoulderWidth. */
173
+ const CLAVICLE_BONES = new Set(['mixamorigLeftArm', 'mixamorigRightArm']);
174
+ /** Shoulder roots off Spine2: X is lateral in the spine frame. */
175
+ const SHOULDER_X_BONES = new Set(['mixamorigLeftShoulder', 'mixamorigRightShoulder']);
176
+ /** Upper-leg roots off Hips: X is lateral in the hips frame. */
177
+ const HIP_X_BONES = new Set(['mixamorigLeftUpLeg', 'mixamorigRightUpLeg']);
178
+ /** Joints whose lowest world-Y point defines the rig's ground clearance. */
179
+ const GROUND_JOINTS = [
180
+ 'mixamorigLeftFoot',
181
+ 'mixamorigRightFoot',
182
+ 'mixamorigLeftToeBase',
183
+ 'mixamorigRightToeBase',
184
+ 'mixamorigLeftToe_End',
185
+ 'mixamorigRightToe_End',
186
+ ];
187
+ /** Build the defs under a throwaway armature and read rest-pose world heights. */
188
+ function measureSkeleton(defs) {
189
+ const rig = buildHumanoidSkeleton(defs);
190
+ const armature = createArmatureGroup(rig);
191
+ armature.updateMatrixWorld(true);
192
+ const p = new THREE.Vector3();
193
+ let minFootY = Number.POSITIVE_INFINITY;
194
+ for (const name of GROUND_JOINTS) {
195
+ const bone = rig.byName.get(name);
196
+ if (!bone)
197
+ throw new Error(`humanoid: skeleton def is missing ground joint '${name}'`);
198
+ p.setFromMatrixPosition(bone.matrixWorld);
199
+ if (p.y < minFootY)
200
+ minFootY = p.y;
201
+ }
202
+ const headTop = rig.byName.get('mixamorigHeadTop_End');
203
+ if (!headTop)
204
+ throw new Error("humanoid: skeleton def is missing 'mixamorigHeadTop_End'");
205
+ p.setFromMatrixPosition(headTop.matrixWorld);
206
+ return { minFootY, headTopY: p.y };
207
+ }
208
+ /**
209
+ * Rescale the reference skeleton table for a body type.
210
+ *
211
+ * Order of operations (all in the table's native Z-up cm space):
212
+ * 1. Per-group segment-length / lateral-width multipliers (never the hips
213
+ * row, never any rest rotation).
214
+ * 2. Re-ground: shift the hips rest translation so the lowest foot joint
215
+ * keeps the REFERENCE rig's ground clearance (longer legs raise the
216
+ * pelvis, shorter legs lower it — feet never float or sink).
217
+ * 3. Height normalization: if `params.height` is set, uniformly scale every
218
+ * translation so head-top + `crownPadding` lands exactly on it.
219
+ *
220
+ * With all-default params every step is an exact no-op (multiplies by 1.0,
221
+ * adds 0.0), so the default rig is bit-identical to the reference table —
222
+ * that is what keeps the Phase-1 PoC fixture's committed render valid.
223
+ *
224
+ * CLIP COMPATIBILITY (the reviewer-flagged trap): animation clips carry
225
+ * per-bone `.position` tracks baked for the SOURCE rig's segment lengths.
226
+ * Played raw on a rescaled skeleton they would snap limbs back to source
227
+ * proportions. The contract here is split with `clips.ts`: this function
228
+ * only rescales REST translations and reports `hipsPositionScale`;
229
+ * `retargetClipToHumanoid` drops every non-hips translation track (bones
230
+ * keep these rest translations) and remaps the hips track by that factor —
231
+ * the standard humanoid-retarget policy.
232
+ */
233
+ export function scaleSkeletonDef(params, crownPadding) {
234
+ const base = MIXAMO_SKELETON_DEF;
235
+ const groupFactor = (name) => {
236
+ if (TORSO_LENGTH_BONES.has(name))
237
+ return params.torsoLength;
238
+ if (HEAD_LENGTH_BONES.has(name))
239
+ return params.headSize;
240
+ if (ARM_LENGTH_BONES.has(name))
241
+ return params.armLength;
242
+ if (LEG_LENGTH_BONES.has(name))
243
+ return params.legLength;
244
+ if (CLAVICLE_BONES.has(name))
245
+ return params.shoulderWidth;
246
+ return 1;
247
+ };
248
+ const scaled = base.map(([name, parent, t, r]) => {
249
+ const k = groupFactor(name);
250
+ let [x, y, z] = [t[0] * k, t[1] * k, t[2] * k];
251
+ if (SHOULDER_X_BONES.has(name))
252
+ x = t[0] * params.shoulderWidth;
253
+ if (HIP_X_BONES.has(name))
254
+ x = t[0] * params.hipWidth;
255
+ return [name, parent, [x, y, z], r];
256
+ });
257
+ // 2. Re-ground the hips against the reference clearance.
258
+ const reference = measureSkeleton(base);
259
+ const current = measureSkeleton(scaled);
260
+ const groundDeltaM = reference.minFootY - current.minFootY;
261
+ const hips = scaled[0];
262
+ const hipsT = [
263
+ hips[2][0],
264
+ hips[2][1],
265
+ hips[2][2] + groundDeltaM / ARMATURE_SCALE,
266
+ ];
267
+ scaled[0] = [hips[0], hips[1], hipsT, hips[3]];
268
+ // 3. Height normalization.
269
+ const naturalHeight = current.headTopY + groundDeltaM + crownPadding;
270
+ const heightFactor = params.height !== undefined ? params.height / naturalHeight : 1;
271
+ const finalDefs = heightFactor === 1
272
+ ? scaled
273
+ : scaled.map(([name, parent, t, r]) => [
274
+ name,
275
+ parent,
276
+ [t[0] * heightFactor, t[1] * heightFactor, t[2] * heightFactor],
277
+ r,
278
+ ]);
279
+ const baseHips = base[0][2];
280
+ const finalHips = finalDefs[0][2];
281
+ const hipsPositionScale = Math.hypot(finalHips[0], finalHips[1], finalHips[2]) /
282
+ Math.hypot(baseHips[0], baseHips[1], baseHips[2]);
283
+ return {
284
+ defs: finalDefs,
285
+ heightFactor,
286
+ height: naturalHeight * heightFactor,
287
+ hipsPositionScale,
288
+ };
289
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * `@vgai/engine`'s package `"."` entry — what `import '@vgai/engine'`
3
+ * resolves to.
4
+ *
5
+ * This is a SMALL, CURATED barrel, not a re-export-everything convenience
6
+ * import. The engine's own doctrine (CLAUDE.md: "the engine code in
7
+ * `packages/engine/src/` is meant to be read and edited directly — it is
8
+ * not a black-box library") means subpath imports
9
+ * (`@vgai/engine/<path>`, matching this package's `"./*"` exports entry)
10
+ * remain the primary way to reach engine internals — reach for a subpath
11
+ * first. This barrel exists only so the package's bare-name entry point is
12
+ * HONEST (resolves to something real and useful) instead of dangling; it
13
+ * covers just the handful of symbols a game/consumer needs to author a
14
+ * first-party `setup()` and mount it, plus the scene/manifest file
15
+ * entry points. Keep it small when extending it — prefer a new subpath
16
+ * export over growing this file into a firehose.
17
+ *
18
+ * Groups (import order below is alphabetical-by-specifier, per the repo's
19
+ * biome `organizeImports` rule, not by group — see this list instead):
20
+ * - game setup contract: `GameContext`/`GameCleanup`/`GameSetupFn`, `fromSetup`
21
+ * - component model: `GameComponent`, `AdapterSurface`
22
+ * - manifest-driven mount: `mountManifestWorlds` + its option/result types
23
+ * - scene file entry point: `parseSceneFile`/`parsePrefabFile`
24
+ * - game manifest (vgai.game.json) entry point: `loadGameManifest`
25
+ */
26
+ export type { AdapterSurface } from './adapter/adapter-surface';
27
+ export { fromSetup } from './adapter/vgai-scene-game-adapter';
28
+ export { GameComponent } from './ecs/game-component';
29
+ export type { AdapterRoot, GameManifest, ResolvedAdapter, ResolvedAdapterRoot, ResolvedGameManifest, RootAdapter, } from './manifest';
30
+ export { CAPABILITY_CEILINGS, DEFAULT_SERVER_MODULE, loadGameManifest } from './manifest';
31
+ export type { GameSession } from './runtime/create-runtime';
32
+ export type { MountEntry, MountedManifestSession, MountManifestOptions, } from './runtime/mount-manifest';
33
+ export { mountManifestWorlds } from './runtime/mount-manifest';
34
+ export type { GameCleanup, GameContext, GameSetupFn } from './runtime/types';
35
+ export { parsePrefabFile, parseSceneFile, SceneParseError } from './scene/parse';
36
+ export type { PrefabFile, SceneFile } from './scene/schema';
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EACV,WAAW,EACX,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC1F,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,YAAY,EACV,UAAU,EACV,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACjF,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * `@vgai/engine`'s package `"."` entry — what `import '@vgai/engine'`
3
+ * resolves to.
4
+ *
5
+ * This is a SMALL, CURATED barrel, not a re-export-everything convenience
6
+ * import. The engine's own doctrine (CLAUDE.md: "the engine code in
7
+ * `packages/engine/src/` is meant to be read and edited directly — it is
8
+ * not a black-box library") means subpath imports
9
+ * (`@vgai/engine/<path>`, matching this package's `"./*"` exports entry)
10
+ * remain the primary way to reach engine internals — reach for a subpath
11
+ * first. This barrel exists only so the package's bare-name entry point is
12
+ * HONEST (resolves to something real and useful) instead of dangling; it
13
+ * covers just the handful of symbols a game/consumer needs to author a
14
+ * first-party `setup()` and mount it, plus the scene/manifest file
15
+ * entry points. Keep it small when extending it — prefer a new subpath
16
+ * export over growing this file into a firehose.
17
+ *
18
+ * Groups (import order below is alphabetical-by-specifier, per the repo's
19
+ * biome `organizeImports` rule, not by group — see this list instead):
20
+ * - game setup contract: `GameContext`/`GameCleanup`/`GameSetupFn`, `fromSetup`
21
+ * - component model: `GameComponent`, `AdapterSurface`
22
+ * - manifest-driven mount: `mountManifestWorlds` + its option/result types
23
+ * - scene file entry point: `parseSceneFile`/`parsePrefabFile`
24
+ * - game manifest (vgai.game.json) entry point: `loadGameManifest`
25
+ */
26
+ export { fromSetup } from './adapter/vgai-scene-game-adapter';
27
+ export { GameComponent } from './ecs/game-component';
28
+ export { CAPABILITY_CEILINGS, DEFAULT_SERVER_MODULE, loadGameManifest } from './manifest';
29
+ export { mountManifestWorlds } from './runtime/mount-manifest';
30
+ export { parsePrefabFile, parseSceneFile, SceneParseError } from './scene/parse';