@vgai/engine 0.5.0 → 0.5.2

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 (538) hide show
  1. package/package.json +1 -1
  2. package/schemas/engine-capabilities.json +4 -4
  3. package/schemas/vgai-game.schema.json +2 -2
  4. package/src/adapter/authoring.ts +42 -0
  5. package/src/adapter/index.ts +3 -0
  6. package/src/adapter/ingest/overlay-apply.ts +50 -6
  7. package/src/adapter/ingest/scene-capture.ts +51 -2
  8. package/src/adapter/vgai-scene-game-adapter.ts +24 -0
  9. package/src/manifest/schema.ts +7 -3
  10. package/src/runtime/create-runtime.ts +97 -0
  11. package/src/runtime/game.ts +11 -1
  12. package/src/scene/asset-ref-check.ts +1 -1
  13. package/src/scene/scene-loader.ts +2 -2
  14. package/src/scene/user-data.ts +18 -0
  15. package/src/world3d-react/behavior.tsx +19 -11
  16. package/src/world3d-react/r3f-adapter.tsx +8 -0
  17. package/dist/adapter/adapter-surface.d.ts +0 -30
  18. package/dist/adapter/adapter-surface.d.ts.map +0 -1
  19. package/dist/adapter/adapter-surface.js +0 -18
  20. package/dist/adapter/authoring.d.ts +0 -461
  21. package/dist/adapter/authoring.d.ts.map +0 -1
  22. package/dist/adapter/authoring.js +0 -22
  23. package/dist/adapter/colyseus-networking-adapter.d.ts +0 -43
  24. package/dist/adapter/colyseus-networking-adapter.d.ts.map +0 -1
  25. package/dist/adapter/colyseus-networking-adapter.js +0 -38
  26. package/dist/adapter/first-party-systems.d.ts +0 -38
  27. package/dist/adapter/first-party-systems.d.ts.map +0 -1
  28. package/dist/adapter/first-party-systems.js +0 -77
  29. package/dist/adapter/game-adapter.d.ts +0 -133
  30. package/dist/adapter/game-adapter.d.ts.map +0 -1
  31. package/dist/adapter/game-adapter.js +0 -10
  32. package/dist/adapter/host-context.d.ts +0 -71
  33. package/dist/adapter/host-context.d.ts.map +0 -1
  34. package/dist/adapter/host-context.js +0 -16
  35. package/dist/adapter/index.d.ts +0 -22
  36. package/dist/adapter/index.d.ts.map +0 -1
  37. package/dist/adapter/index.js +0 -15
  38. package/dist/adapter/ingest/game-contract.d.ts +0 -53
  39. package/dist/adapter/ingest/game-contract.d.ts.map +0 -1
  40. package/dist/adapter/ingest/game-contract.js +0 -30
  41. package/dist/adapter/ingest/overlay-applier.d.ts +0 -118
  42. package/dist/adapter/ingest/overlay-applier.d.ts.map +0 -1
  43. package/dist/adapter/ingest/overlay-applier.js +0 -132
  44. package/dist/adapter/ingest/overlay-apply.d.ts +0 -60
  45. package/dist/adapter/ingest/overlay-apply.d.ts.map +0 -1
  46. package/dist/adapter/ingest/overlay-apply.js +0 -101
  47. package/dist/adapter/ingest/overlay-file.d.ts +0 -79
  48. package/dist/adapter/ingest/overlay-file.d.ts.map +0 -1
  49. package/dist/adapter/ingest/overlay-file.js +0 -66
  50. package/dist/adapter/ingest/overlay-report.d.ts +0 -113
  51. package/dist/adapter/ingest/overlay-report.d.ts.map +0 -1
  52. package/dist/adapter/ingest/overlay-report.js +0 -103
  53. package/dist/adapter/ingest/scene-capture.d.ts +0 -97
  54. package/dist/adapter/ingest/scene-capture.d.ts.map +0 -1
  55. package/dist/adapter/ingest/scene-capture.js +0 -248
  56. package/dist/adapter/ingest/upstream-pin.d.ts +0 -47
  57. package/dist/adapter/ingest/upstream-pin.d.ts.map +0 -1
  58. package/dist/adapter/ingest/upstream-pin.js +0 -50
  59. package/dist/adapter/loop-gate-report.d.ts +0 -34
  60. package/dist/adapter/loop-gate-report.d.ts.map +0 -1
  61. package/dist/adapter/loop-gate-report.js +0 -37
  62. package/dist/adapter/rapier-physics-adapter.d.ts +0 -12
  63. package/dist/adapter/rapier-physics-adapter.d.ts.map +0 -1
  64. package/dist/adapter/rapier-physics-adapter.js +0 -46
  65. package/dist/adapter/system-adapter.d.ts +0 -206
  66. package/dist/adapter/system-adapter.d.ts.map +0 -1
  67. package/dist/adapter/system-adapter.js +0 -13
  68. package/dist/adapter/transform.d.ts +0 -18
  69. package/dist/adapter/transform.d.ts.map +0 -1
  70. package/dist/adapter/transform.js +0 -1
  71. package/dist/adapter/vgai-scene-game-adapter.d.ts +0 -108
  72. package/dist/adapter/vgai-scene-game-adapter.d.ts.map +0 -1
  73. package/dist/adapter/vgai-scene-game-adapter.js +0 -762
  74. package/dist/ai/navigation.d.ts +0 -64
  75. package/dist/ai/navigation.d.ts.map +0 -1
  76. package/dist/ai/navigation.js +0 -133
  77. package/dist/animation/anim-graph-types.d.ts +0 -25
  78. package/dist/animation/anim-graph-types.d.ts.map +0 -1
  79. package/dist/animation/anim-graph-types.js +0 -1
  80. package/dist/animation/animation-clock.d.ts +0 -213
  81. package/dist/animation/animation-clock.d.ts.map +0 -1
  82. package/dist/animation/animation-clock.js +0 -301
  83. package/dist/animation/blend-node.d.ts +0 -22
  84. package/dist/animation/blend-node.d.ts.map +0 -1
  85. package/dist/animation/blend-node.js +0 -97
  86. package/dist/animation/camera-ownership.d.ts +0 -250
  87. package/dist/animation/camera-ownership.d.ts.map +0 -1
  88. package/dist/animation/camera-ownership.js +0 -169
  89. package/dist/animation/cinematic-cues.d.ts +0 -200
  90. package/dist/animation/cinematic-cues.d.ts.map +0 -1
  91. package/dist/animation/cinematic-cues.js +0 -213
  92. package/dist/animation/clip-map.d.ts +0 -12
  93. package/dist/animation/clip-map.d.ts.map +0 -1
  94. package/dist/animation/clip-map.js +0 -37
  95. package/dist/animation/gsap-registration.d.ts +0 -119
  96. package/dist/animation/gsap-registration.d.ts.map +0 -1
  97. package/dist/animation/gsap-registration.js +0 -92
  98. package/dist/animation/theatre-clock-binding.d.ts +0 -89
  99. package/dist/animation/theatre-clock-binding.d.ts.map +0 -1
  100. package/dist/animation/theatre-clock-binding.js +0 -29
  101. package/dist/animation/theatre-director.d.ts +0 -242
  102. package/dist/animation/theatre-director.d.ts.map +0 -1
  103. package/dist/animation/theatre-director.js +0 -235
  104. package/dist/animation/theatre-object-binding.d.ts +0 -305
  105. package/dist/animation/theatre-object-binding.d.ts.map +0 -1
  106. package/dist/animation/theatre-object-binding.js +0 -351
  107. package/dist/animation/xstate-animation-binding.d.ts +0 -56
  108. package/dist/animation/xstate-animation-binding.d.ts.map +0 -1
  109. package/dist/animation/xstate-animation-binding.js +0 -331
  110. package/dist/animation/xstate-animation-meta.d.ts +0 -266
  111. package/dist/animation/xstate-animation-meta.d.ts.map +0 -1
  112. package/dist/animation/xstate-animation-meta.js +0 -252
  113. package/dist/assets.d.ts +0 -26
  114. package/dist/assets.d.ts.map +0 -1
  115. package/dist/assets.js +0 -55
  116. package/dist/audio/index.d.ts +0 -4
  117. package/dist/audio/index.d.ts.map +0 -1
  118. package/dist/audio/index.js +0 -24
  119. package/dist/audio/tone-clock-binding.d.ts +0 -75
  120. package/dist/audio/tone-clock-binding.d.ts.map +0 -1
  121. package/dist/audio/tone-clock-binding.js +0 -29
  122. package/dist/audio/tone-context.d.ts +0 -114
  123. package/dist/audio/tone-context.d.ts.map +0 -1
  124. package/dist/audio/tone-context.js +0 -39
  125. package/dist/audio/tone-offline-render.d.ts +0 -90
  126. package/dist/audio/tone-offline-render.d.ts.map +0 -1
  127. package/dist/audio/tone-offline-render.js +0 -56
  128. package/dist/audio/wav-encode.d.ts +0 -38
  129. package/dist/audio/wav-encode.d.ts.map +0 -1
  130. package/dist/audio/wav-encode.js +0 -97
  131. package/dist/character/cloth-sim.d.ts +0 -179
  132. package/dist/character/cloth-sim.d.ts.map +0 -1
  133. package/dist/character/cloth-sim.js +0 -334
  134. package/dist/character/spring-chain.d.ts +0 -135
  135. package/dist/character/spring-chain.d.ts.map +0 -1
  136. package/dist/character/spring-chain.js +0 -165
  137. package/dist/core/game-loop.d.ts +0 -42
  138. package/dist/core/game-loop.d.ts.map +0 -1
  139. package/dist/core/game-loop.js +0 -167
  140. package/dist/core/seeded-random.d.ts +0 -69
  141. package/dist/core/seeded-random.d.ts.map +0 -1
  142. package/dist/core/seeded-random.js +0 -121
  143. package/dist/core/system-runner.d.ts +0 -120
  144. package/dist/core/system-runner.d.ts.map +0 -1
  145. package/dist/core/system-runner.js +0 -297
  146. package/dist/core/types.d.ts +0 -92
  147. package/dist/core/types.d.ts.map +0 -1
  148. package/dist/core/types.js +0 -25
  149. package/dist/data/data-asset.d.ts +0 -101
  150. package/dist/data/data-asset.d.ts.map +0 -1
  151. package/dist/data/data-asset.js +0 -122
  152. package/dist/data/data-check-core.d.ts +0 -110
  153. package/dist/data/data-check-core.d.ts.map +0 -1
  154. package/dist/data/data-check-core.js +0 -178
  155. package/dist/data/data-ref.d.ts +0 -79
  156. package/dist/data/data-ref.d.ts.map +0 -1
  157. package/dist/data/data-ref.js +0 -130
  158. package/dist/data/vite-plugin-data.d.ts +0 -79
  159. package/dist/data/vite-plugin-data.d.ts.map +0 -1
  160. package/dist/data/vite-plugin-data.js +0 -217
  161. package/dist/dev/console-bridge.d.ts +0 -22
  162. package/dist/dev/console-bridge.d.ts.map +0 -1
  163. package/dist/dev/console-bridge.js +0 -71
  164. package/dist/dev/debug-draw.d.ts +0 -24
  165. package/dist/dev/debug-draw.d.ts.map +0 -1
  166. package/dist/dev/debug-draw.js +0 -73
  167. package/dist/dev/logger.d.ts +0 -30
  168. package/dist/dev/logger.d.ts.map +0 -1
  169. package/dist/dev/logger.js +0 -90
  170. package/dist/dev/performance-profiler.d.ts +0 -60
  171. package/dist/dev/performance-profiler.d.ts.map +0 -1
  172. package/dist/dev/performance-profiler.js +0 -181
  173. package/dist/dev/webgl-gpu-timer.d.ts +0 -8
  174. package/dist/dev/webgl-gpu-timer.d.ts.map +0 -1
  175. package/dist/dev/webgl-gpu-timer.js +0 -52
  176. package/dist/ecs/component-manager.d.ts +0 -205
  177. package/dist/ecs/component-manager.d.ts.map +0 -1
  178. package/dist/ecs/component-manager.js +0 -706
  179. package/dist/ecs/game-component.d.ts +0 -146
  180. package/dist/ecs/game-component.d.ts.map +0 -1
  181. package/dist/ecs/game-component.js +0 -141
  182. package/dist/ecs/hmr-swap-report.d.ts +0 -53
  183. package/dist/ecs/hmr-swap-report.d.ts.map +0 -1
  184. package/dist/ecs/hmr-swap-report.js +0 -55
  185. package/dist/humanoid/bake.operation.d.ts +0 -119
  186. package/dist/humanoid/bake.operation.d.ts.map +0 -1
  187. package/dist/humanoid/bake.operation.js +0 -228
  188. package/dist/humanoid/body.d.ts +0 -101
  189. package/dist/humanoid/body.d.ts.map +0 -1
  190. package/dist/humanoid/body.js +0 -530
  191. package/dist/humanoid/clips.d.ts +0 -62
  192. package/dist/humanoid/clips.d.ts.map +0 -1
  193. package/dist/humanoid/clips.js +0 -121
  194. package/dist/humanoid/compose.d.ts +0 -75
  195. package/dist/humanoid/compose.d.ts.map +0 -1
  196. package/dist/humanoid/compose.js +0 -176
  197. package/dist/humanoid/generate.d.ts +0 -92
  198. package/dist/humanoid/generate.d.ts.map +0 -1
  199. package/dist/humanoid/generate.js +0 -124
  200. package/dist/humanoid/index.d.ts +0 -24
  201. package/dist/humanoid/index.d.ts.map +0 -1
  202. package/dist/humanoid/index.js +0 -18
  203. package/dist/humanoid/schema.d.ts +0 -35
  204. package/dist/humanoid/schema.d.ts.map +0 -1
  205. package/dist/humanoid/schema.js +0 -87
  206. package/dist/humanoid/skeleton.d.ts +0 -103
  207. package/dist/humanoid/skeleton.d.ts.map +0 -1
  208. package/dist/humanoid/skeleton.js +0 -289
  209. package/dist/index.d.ts +0 -37
  210. package/dist/index.d.ts.map +0 -1
  211. package/dist/index.js +0 -30
  212. package/dist/input/input-manager.d.ts +0 -945
  213. package/dist/input/input-manager.d.ts.map +0 -1
  214. package/dist/input/input-manager.js +0 -2207
  215. package/dist/input/input-types.d.ts +0 -174
  216. package/dist/input/input-types.d.ts.map +0 -1
  217. package/dist/input/input-types.js +0 -1
  218. package/dist/input/prompt-labels.d.ts +0 -21
  219. package/dist/input/prompt-labels.d.ts.map +0 -1
  220. package/dist/input/prompt-labels.js +0 -121
  221. package/dist/input/rebind-controller.d.ts +0 -59
  222. package/dist/input/rebind-controller.d.ts.map +0 -1
  223. package/dist/input/rebind-controller.js +0 -85
  224. package/dist/input/schema.d.ts +0 -16
  225. package/dist/input/schema.d.ts.map +0 -1
  226. package/dist/input/schema.js +0 -228
  227. package/dist/loader.d.ts +0 -43
  228. package/dist/loader.d.ts.map +0 -1
  229. package/dist/loader.js +0 -59
  230. package/dist/manifest/index.d.ts +0 -5
  231. package/dist/manifest/index.d.ts.map +0 -1
  232. package/dist/manifest/index.js +0 -8
  233. package/dist/manifest/load-file.d.ts +0 -4
  234. package/dist/manifest/load-file.d.ts.map +0 -1
  235. package/dist/manifest/load-file.js +0 -14
  236. package/dist/manifest/load.d.ts +0 -144
  237. package/dist/manifest/load.d.ts.map +0 -1
  238. package/dist/manifest/load.js +0 -273
  239. package/dist/manifest/schema.d.ts +0 -230
  240. package/dist/manifest/schema.d.ts.map +0 -1
  241. package/dist/manifest/schema.js +0 -394
  242. package/dist/physics/collision-system.d.ts +0 -41
  243. package/dist/physics/collision-system.d.ts.map +0 -1
  244. package/dist/physics/collision-system.js +0 -64
  245. package/dist/physics/physics-registry.d.ts +0 -45
  246. package/dist/physics/physics-registry.d.ts.map +0 -1
  247. package/dist/physics/physics-registry.js +0 -65
  248. package/dist/physics/transform-writer.d.ts +0 -16
  249. package/dist/physics/transform-writer.d.ts.map +0 -1
  250. package/dist/physics/transform-writer.js +0 -38
  251. package/dist/physics/trigger-dispatch.d.ts +0 -24
  252. package/dist/physics/trigger-dispatch.d.ts.map +0 -1
  253. package/dist/physics/trigger-dispatch.js +0 -80
  254. package/dist/react/game-state.d.ts +0 -156
  255. package/dist/react/game-state.d.ts.map +0 -1
  256. package/dist/react/game-state.js +0 -222
  257. package/dist/react/root-adapter.d.ts +0 -11
  258. package/dist/react/root-adapter.d.ts.map +0 -1
  259. package/dist/react/root-adapter.js +0 -41
  260. package/dist/react/unmanaged-root-detector.d.ts +0 -12
  261. package/dist/react/unmanaged-root-detector.d.ts.map +0 -1
  262. package/dist/react/unmanaged-root-detector.js +0 -45
  263. package/dist/react/use-data.d.ts +0 -60
  264. package/dist/react/use-data.d.ts.map +0 -1
  265. package/dist/react/use-data.js +0 -101
  266. package/dist/react/use-selection.d.ts +0 -75
  267. package/dist/react/use-selection.d.ts.map +0 -1
  268. package/dist/react/use-selection.js +0 -90
  269. package/dist/render/auto-batcher.d.ts +0 -34
  270. package/dist/render/auto-batcher.d.ts.map +0 -1
  271. package/dist/render/auto-batcher.js +0 -140
  272. package/dist/render/render-batch-system.d.ts +0 -33
  273. package/dist/render/render-batch-system.d.ts.map +0 -1
  274. package/dist/render/render-batch-system.js +0 -230
  275. package/dist/render/render-features.d.ts +0 -47
  276. package/dist/render/render-features.d.ts.map +0 -1
  277. package/dist/render/render-features.js +0 -105
  278. package/dist/render/render-settings.d.ts +0 -36
  279. package/dist/render/render-settings.d.ts.map +0 -1
  280. package/dist/render/render-settings.js +0 -51
  281. package/dist/runtime/create-runtime.d.ts +0 -249
  282. package/dist/runtime/create-runtime.d.ts.map +0 -1
  283. package/dist/runtime/create-runtime.js +0 -641
  284. package/dist/runtime/debug-bridge.d.ts +0 -257
  285. package/dist/runtime/debug-bridge.d.ts.map +0 -1
  286. package/dist/runtime/debug-bridge.js +0 -224
  287. package/dist/runtime/debug-registry.d.ts +0 -288
  288. package/dist/runtime/debug-registry.d.ts.map +0 -1
  289. package/dist/runtime/debug-registry.js +0 -513
  290. package/dist/runtime/frame-selector-cache.d.ts +0 -41
  291. package/dist/runtime/frame-selector-cache.d.ts.map +0 -1
  292. package/dist/runtime/frame-selector-cache.js +0 -65
  293. package/dist/runtime/game.d.ts +0 -496
  294. package/dist/runtime/game.d.ts.map +0 -1
  295. package/dist/runtime/game.js +0 -741
  296. package/dist/runtime/gameplay-rng-trap.d.ts +0 -48
  297. package/dist/runtime/gameplay-rng-trap.d.ts.map +0 -1
  298. package/dist/runtime/gameplay-rng-trap.js +0 -96
  299. package/dist/runtime/input-router.d.ts +0 -78
  300. package/dist/runtime/input-router.d.ts.map +0 -1
  301. package/dist/runtime/input-router.js +0 -171
  302. package/dist/runtime/mount-game.d.ts +0 -129
  303. package/dist/runtime/mount-game.d.ts.map +0 -1
  304. package/dist/runtime/mount-game.js +0 -152
  305. package/dist/runtime/mount-manifest.d.ts +0 -173
  306. package/dist/runtime/mount-manifest.d.ts.map +0 -1
  307. package/dist/runtime/mount-manifest.js +0 -297
  308. package/dist/runtime/render-audio-control.d.ts +0 -110
  309. package/dist/runtime/render-audio-control.d.ts.map +0 -1
  310. package/dist/runtime/render-audio-control.js +0 -111
  311. package/dist/runtime/render-control.d.ts +0 -291
  312. package/dist/runtime/render-control.d.ts.map +0 -1
  313. package/dist/runtime/render-control.js +0 -264
  314. package/dist/runtime/render-seed.d.ts +0 -57
  315. package/dist/runtime/render-seed.d.ts.map +0 -1
  316. package/dist/runtime/render-seed.js +0 -74
  317. package/dist/runtime/state-bridge.d.ts +0 -61
  318. package/dist/runtime/state-bridge.d.ts.map +0 -1
  319. package/dist/runtime/state-bridge.js +0 -63
  320. package/dist/runtime/types.d.ts +0 -253
  321. package/dist/runtime/types.d.ts.map +0 -1
  322. package/dist/runtime/types.js +0 -1
  323. package/dist/scene/asset-loaders.d.ts +0 -79
  324. package/dist/scene/asset-loaders.d.ts.map +0 -1
  325. package/dist/scene/asset-loaders.js +0 -141
  326. package/dist/scene/asset-paths.d.ts +0 -11
  327. package/dist/scene/asset-paths.d.ts.map +0 -1
  328. package/dist/scene/asset-paths.js +0 -108
  329. package/dist/scene/asset-ref-check.d.ts +0 -88
  330. package/dist/scene/asset-ref-check.d.ts.map +0 -1
  331. package/dist/scene/asset-ref-check.js +0 -214
  332. package/dist/scene/asset-registry.d.ts +0 -38
  333. package/dist/scene/asset-registry.d.ts.map +0 -1
  334. package/dist/scene/asset-registry.js +0 -66
  335. package/dist/scene/collider-dimensions.d.ts +0 -63
  336. package/dist/scene/collider-dimensions.d.ts.map +0 -1
  337. package/dist/scene/collider-dimensions.js +0 -98
  338. package/dist/scene/component-registry.d.ts +0 -22
  339. package/dist/scene/component-registry.d.ts.map +0 -1
  340. package/dist/scene/component-registry.js +0 -37
  341. package/dist/scene/defaults.d.ts +0 -252
  342. package/dist/scene/defaults.d.ts.map +0 -1
  343. package/dist/scene/defaults.js +0 -151
  344. package/dist/scene/geometries/index.d.ts +0 -8
  345. package/dist/scene/geometries/index.d.ts.map +0 -1
  346. package/dist/scene/geometries/index.js +0 -7
  347. package/dist/scene/geometries/terrain.d.ts +0 -2
  348. package/dist/scene/geometries/terrain.d.ts.map +0 -1
  349. package/dist/scene/geometries/terrain.js +0 -37
  350. package/dist/scene/geometry-registry.d.ts +0 -24
  351. package/dist/scene/geometry-registry.d.ts.map +0 -1
  352. package/dist/scene/geometry-registry.js +0 -20
  353. package/dist/scene/instance-registry.d.ts +0 -36
  354. package/dist/scene/instance-registry.d.ts.map +0 -1
  355. package/dist/scene/instance-registry.js +0 -55
  356. package/dist/scene/instancers/grid.d.ts +0 -2
  357. package/dist/scene/instancers/grid.d.ts.map +0 -1
  358. package/dist/scene/instancers/grid.js +0 -36
  359. package/dist/scene/instancers/index.d.ts +0 -8
  360. package/dist/scene/instancers/index.d.ts.map +0 -1
  361. package/dist/scene/instancers/index.js +0 -7
  362. package/dist/scene/light-camera-factory.d.ts +0 -23
  363. package/dist/scene/light-camera-factory.d.ts.map +0 -1
  364. package/dist/scene/light-camera-factory.js +0 -68
  365. package/dist/scene/material-factory.d.ts +0 -17
  366. package/dist/scene/material-factory.d.ts.map +0 -1
  367. package/dist/scene/material-factory.js +0 -197
  368. package/dist/scene/material-registry.d.ts +0 -40
  369. package/dist/scene/material-registry.d.ts.map +0 -1
  370. package/dist/scene/material-registry.js +0 -44
  371. package/dist/scene/materials/index.d.ts +0 -8
  372. package/dist/scene/materials/index.d.ts.map +0 -1
  373. package/dist/scene/materials/index.js +0 -7
  374. package/dist/scene/materials/water.d.ts +0 -2
  375. package/dist/scene/materials/water.d.ts.map +0 -1
  376. package/dist/scene/materials/water.js +0 -54
  377. package/dist/scene/parse.d.ts +0 -23
  378. package/dist/scene/parse.d.ts.map +0 -1
  379. package/dist/scene/parse.js +0 -179
  380. package/dist/scene/particles-factory.d.ts +0 -33
  381. package/dist/scene/particles-factory.d.ts.map +0 -1
  382. package/dist/scene/particles-factory.js +0 -282
  383. package/dist/scene/scene-apply.d.ts +0 -109
  384. package/dist/scene/scene-apply.d.ts.map +0 -1
  385. package/dist/scene/scene-apply.js +0 -370
  386. package/dist/scene/scene-diff-schema.d.ts +0 -285
  387. package/dist/scene/scene-diff-schema.d.ts.map +0 -1
  388. package/dist/scene/scene-diff-schema.js +0 -92
  389. package/dist/scene/scene-diff-types.d.ts +0 -40
  390. package/dist/scene/scene-diff-types.d.ts.map +0 -1
  391. package/dist/scene/scene-diff-types.js +0 -14
  392. package/dist/scene/scene-loader.d.ts +0 -167
  393. package/dist/scene/scene-loader.d.ts.map +0 -1
  394. package/dist/scene/scene-loader.js +0 -1211
  395. package/dist/scene/scene-query.d.ts +0 -11
  396. package/dist/scene/scene-query.d.ts.map +0 -1
  397. package/dist/scene/scene-query.js +0 -63
  398. package/dist/scene/scene-types.d.ts +0 -10
  399. package/dist/scene/scene-types.d.ts.map +0 -1
  400. package/dist/scene/scene-types.js +0 -8
  401. package/dist/scene/scene-version.d.ts +0 -26
  402. package/dist/scene/scene-version.d.ts.map +0 -1
  403. package/dist/scene/scene-version.js +0 -34
  404. package/dist/scene/schema/animation.d.ts +0 -8
  405. package/dist/scene/schema/animation.d.ts.map +0 -1
  406. package/dist/scene/schema/animation.js +0 -42
  407. package/dist/scene/schema/audio.d.ts +0 -13
  408. package/dist/scene/schema/audio.d.ts.map +0 -1
  409. package/dist/scene/schema/audio.js +0 -22
  410. package/dist/scene/schema/camera.d.ts +0 -28
  411. package/dist/scene/schema/camera.d.ts.map +0 -1
  412. package/dist/scene/schema/camera.js +0 -17
  413. package/dist/scene/schema/collider.d.ts +0 -40
  414. package/dist/scene/schema/collider.d.ts.map +0 -1
  415. package/dist/scene/schema/collider.js +0 -55
  416. package/dist/scene/schema/entity-ref.d.ts +0 -31
  417. package/dist/scene/schema/entity-ref.d.ts.map +0 -1
  418. package/dist/scene/schema/entity-ref.js +0 -61
  419. package/dist/scene/schema/entity.d.ts +0 -1036
  420. package/dist/scene/schema/entity.d.ts.map +0 -1
  421. package/dist/scene/schema/entity.js +0 -153
  422. package/dist/scene/schema/environment.d.ts +0 -425
  423. package/dist/scene/schema/environment.d.ts.map +0 -1
  424. package/dist/scene/schema/environment.js +0 -357
  425. package/dist/scene/schema/index.d.ts +0 -37
  426. package/dist/scene/schema/index.d.ts.map +0 -1
  427. package/dist/scene/schema/index.js +0 -19
  428. package/dist/scene/schema/instances.d.ts +0 -14
  429. package/dist/scene/schema/instances.d.ts.map +0 -1
  430. package/dist/scene/schema/instances.js +0 -28
  431. package/dist/scene/schema/joint.d.ts +0 -23
  432. package/dist/scene/schema/joint.d.ts.map +0 -1
  433. package/dist/scene/schema/joint.js +0 -23
  434. package/dist/scene/schema/light.d.ts +0 -38
  435. package/dist/scene/schema/light.d.ts.map +0 -1
  436. package/dist/scene/schema/light.js +0 -26
  437. package/dist/scene/schema/material.d.ts +0 -199
  438. package/dist/scene/schema/material.d.ts.map +0 -1
  439. package/dist/scene/schema/material.js +0 -103
  440. package/dist/scene/schema/mesh.d.ts +0 -48
  441. package/dist/scene/schema/mesh.d.ts.map +0 -1
  442. package/dist/scene/schema/mesh.js +0 -82
  443. package/dist/scene/schema/particles.d.ts +0 -2178
  444. package/dist/scene/schema/particles.d.ts.map +0 -1
  445. package/dist/scene/schema/particles.js +0 -321
  446. package/dist/scene/schema/physics.d.ts +0 -56
  447. package/dist/scene/schema/physics.d.ts.map +0 -1
  448. package/dist/scene/schema/physics.js +0 -37
  449. package/dist/scene/schema/scene-file.d.ts +0 -303
  450. package/dist/scene/schema/scene-file.d.ts.map +0 -1
  451. package/dist/scene/schema/scene-file.js +0 -256
  452. package/dist/scene/schema/shadow.d.ts +0 -28
  453. package/dist/scene/schema/shadow.d.ts.map +0 -1
  454. package/dist/scene/schema/shadow.js +0 -20
  455. package/dist/scene/schema/spline.d.ts +0 -25
  456. package/dist/scene/schema/spline.d.ts.map +0 -1
  457. package/dist/scene/schema/spline.js +0 -15
  458. package/dist/scene/schema/tuples.d.ts +0 -12
  459. package/dist/scene/schema/tuples.d.ts.map +0 -1
  460. package/dist/scene/schema/tuples.js +0 -14
  461. package/dist/scene/user-data.d.ts +0 -185
  462. package/dist/scene/user-data.d.ts.map +0 -1
  463. package/dist/scene/user-data.js +0 -144
  464. package/dist/setup/setup-audio.d.ts +0 -20
  465. package/dist/setup/setup-audio.d.ts.map +0 -1
  466. package/dist/setup/setup-audio.js +0 -41
  467. package/dist/setup/setup-particles.d.ts +0 -17
  468. package/dist/setup/setup-particles.d.ts.map +0 -1
  469. package/dist/setup/setup-particles.js +0 -16
  470. package/dist/setup/setup-physics.d.ts +0 -25
  471. package/dist/setup/setup-physics.d.ts.map +0 -1
  472. package/dist/setup/setup-physics.js +0 -51
  473. package/dist/setup/setup-renderer.d.ts +0 -69
  474. package/dist/setup/setup-renderer.d.ts.map +0 -1
  475. package/dist/setup/setup-renderer.js +0 -363
  476. package/dist/tools/define-tool.d.ts +0 -130
  477. package/dist/tools/define-tool.d.ts.map +0 -1
  478. package/dist/tools/define-tool.js +0 -96
  479. package/dist/world2d/authoring-2d.d.ts +0 -80
  480. package/dist/world2d/authoring-2d.d.ts.map +0 -1
  481. package/dist/world2d/authoring-2d.js +0 -195
  482. package/dist/world2d/capture-to-scene2d.d.ts +0 -5
  483. package/dist/world2d/capture-to-scene2d.d.ts.map +0 -1
  484. package/dist/world2d/capture-to-scene2d.js +0 -49
  485. package/dist/world2d/collision-2d.d.ts +0 -52
  486. package/dist/world2d/collision-2d.d.ts.map +0 -1
  487. package/dist/world2d/collision-2d.js +0 -70
  488. package/dist/world2d/components-2d.d.ts +0 -47
  489. package/dist/world2d/components-2d.d.ts.map +0 -1
  490. package/dist/world2d/components-2d.js +0 -77
  491. package/dist/world2d/index.d.ts +0 -34
  492. package/dist/world2d/index.d.ts.map +0 -1
  493. package/dist/world2d/index.js +0 -32
  494. package/dist/world2d/ingest-iframe-2d.d.ts +0 -82
  495. package/dist/world2d/ingest-iframe-2d.d.ts.map +0 -1
  496. package/dist/world2d/ingest-iframe-2d.js +0 -166
  497. package/dist/world2d/ingest2d.d.ts +0 -97
  498. package/dist/world2d/ingest2d.d.ts.map +0 -1
  499. package/dist/world2d/ingest2d.js +0 -40
  500. package/dist/world2d/physics2d-registry.d.ts +0 -24
  501. package/dist/world2d/physics2d-registry.d.ts.map +0 -1
  502. package/dist/world2d/physics2d-registry.js +0 -38
  503. package/dist/world2d/pixi-game-adapter.d.ts +0 -107
  504. package/dist/world2d/pixi-game-adapter.d.ts.map +0 -1
  505. package/dist/world2d/pixi-game-adapter.js +0 -210
  506. package/dist/world2d/pixi-surface.d.ts +0 -39
  507. package/dist/world2d/pixi-surface.d.ts.map +0 -1
  508. package/dist/world2d/pixi-surface.js +0 -47
  509. package/dist/world2d/scene-capture-2d.d.ts +0 -43
  510. package/dist/world2d/scene-capture-2d.d.ts.map +0 -1
  511. package/dist/world2d/scene-capture-2d.js +0 -92
  512. package/dist/world2d/scene2d-loader.d.ts +0 -27
  513. package/dist/world2d/scene2d-loader.d.ts.map +0 -1
  514. package/dist/world2d/scene2d-loader.js +0 -275
  515. package/dist/world2d/schema/entity2d.d.ts +0 -102
  516. package/dist/world2d/schema/entity2d.d.ts.map +0 -1
  517. package/dist/world2d/schema/entity2d.js +0 -119
  518. package/dist/world2d/schema/physics2d.d.ts +0 -46
  519. package/dist/world2d/schema/physics2d.d.ts.map +0 -1
  520. package/dist/world2d/schema/physics2d.js +0 -45
  521. package/dist/world2d/schema/sprite.d.ts +0 -42
  522. package/dist/world2d/schema/sprite.d.ts.map +0 -1
  523. package/dist/world2d/schema/sprite.js +0 -63
  524. package/dist/world2d/schema/tilemap.d.ts +0 -15
  525. package/dist/world2d/schema/tilemap.d.ts.map +0 -1
  526. package/dist/world2d/schema/tilemap.js +0 -19
  527. package/dist/world2d/schema/tuples2d.d.ts +0 -20
  528. package/dist/world2d/schema/tuples2d.d.ts.map +0 -1
  529. package/dist/world2d/schema/tuples2d.js +0 -19
  530. package/dist/world2d/system-adapters-2d.d.ts +0 -16
  531. package/dist/world2d/system-adapters-2d.d.ts.map +0 -1
  532. package/dist/world2d/system-adapters-2d.js +0 -37
  533. package/dist/world2d/transform-writer-2d.d.ts +0 -16
  534. package/dist/world2d/transform-writer-2d.d.ts.map +0 -1
  535. package/dist/world2d/transform-writer-2d.js +0 -22
  536. package/dist/world2d/types.d.ts +0 -59
  537. package/dist/world2d/types.d.ts.map +0 -1
  538. package/dist/world2d/types.js +0 -1
@@ -1,11 +0,0 @@
1
- import type * as THREE from 'three';
2
- /** All objects in the graph carrying the given tag (depth-first, document order). */
3
- export declare function queryByTag(root: THREE.Object3D, tag: string): THREE.Object3D[];
4
- /** All objects in the graph with the given name (depth-first, document order). */
5
- export declare function queryByName(root: THREE.Object3D, name: string): THREE.Object3D[];
6
- /**
7
- * All objects in the graph that have the named component attached
8
- * (depth-first, document order).
9
- */
10
- export declare function queryByComponent(root: THREE.Object3D, componentName: string): THREE.Object3D[];
11
- //# sourceMappingURL=scene-query.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scene-query.d.ts","sourceRoot":"","sources":["../../src/scene/scene-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAkCpC,qFAAqF;AACrF,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAM9E;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAMhF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAM9F"}
@@ -1,63 +0,0 @@
1
- import { getUserData } from './user-data';
2
- /**
3
- * Runtime queries over a loaded THREE scene graph (P1.6d).
4
- *
5
- * The scene's `tags` schema field is documented as "for runtime queries" but,
6
- * until now, no query existed. These helpers walk a THREE.Object3D graph and
7
- * read entity metadata off `userData`, so gameplay code can find objects by tag,
8
- * name, or attached component without bookkeeping its own indexes.
9
- *
10
- * Canonical metadata locations (in priority order):
11
- * - tags: `userData['tags']` (string[]) — falls back to `userData['entity'].tags`
12
- * - name: `Object3D.name`
13
- * - components: `userData['components']` (record or string[]) — falls back to
14
- * `userData['entity'].components` (record keyed by component name)
15
- */
16
- function getTags(obj) {
17
- const direct = getUserData(obj, 'tags');
18
- if (Array.isArray(direct))
19
- return direct;
20
- const fromDef = getUserData(obj, 'entity')?.tags;
21
- return Array.isArray(fromDef) ? fromDef : [];
22
- }
23
- function getComponentNames(obj) {
24
- const direct = getUserData(obj, 'components');
25
- if (Array.isArray(direct))
26
- return direct;
27
- if (direct && typeof direct === 'object')
28
- return Object.keys(direct);
29
- const fromDef = getUserData(obj, 'entity')?.components;
30
- if (fromDef && typeof fromDef === 'object')
31
- return Object.keys(fromDef);
32
- return [];
33
- }
34
- /** All objects in the graph carrying the given tag (depth-first, document order). */
35
- export function queryByTag(root, tag) {
36
- const matches = [];
37
- root.traverse((obj) => {
38
- if (getTags(obj).includes(tag))
39
- matches.push(obj);
40
- });
41
- return matches;
42
- }
43
- /** All objects in the graph with the given name (depth-first, document order). */
44
- export function queryByName(root, name) {
45
- const matches = [];
46
- root.traverse((obj) => {
47
- if (obj.name === name)
48
- matches.push(obj);
49
- });
50
- return matches;
51
- }
52
- /**
53
- * All objects in the graph that have the named component attached
54
- * (depth-first, document order).
55
- */
56
- export function queryByComponent(root, componentName) {
57
- const matches = [];
58
- root.traverse((obj) => {
59
- if (getComponentNames(obj).includes(componentName))
60
- matches.push(obj);
61
- });
62
- return matches;
63
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Scene file types — derived from Zod schemas (single source of truth).
3
- *
4
- * Raw types for the .vscn.json file format. Both the editor and the runtime
5
- * loader work with these directly, applying DEFAULTS (./defaults.ts) for omitted
6
- * fields — DEFAULTS is the single source of truth for default values.
7
- */
8
- export type { InstancesFile, MaterialFile, PrefabFile, SceneAnimation, SceneAudio, SceneCamera, SceneCollider, SceneEntity, SceneEnvironment, SceneFile, SceneJoint, SceneLight, SceneMaterial, SceneMesh, SceneNavigation, SceneParticles, ScenePhysics, ScenePhysicsSettings, ScenePostProcessing, SceneSpline, SceneToneMapping, } from './schema';
9
- export { mergePrefabInstance } from './schema';
10
- //# sourceMappingURL=scene-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scene-types.d.ts","sourceRoot":"","sources":["../../src/scene/scene-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,UAAU,EACV,WAAW,EACX,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Scene file types — derived from Zod schemas (single source of truth).
3
- *
4
- * Raw types for the .vscn.json file format. Both the editor and the runtime
5
- * loader work with these directly, applying DEFAULTS (./defaults.ts) for omitted
6
- * fields — DEFAULTS is the single source of truth for default values.
7
- */
8
- export { mergePrefabInstance } from './schema';
@@ -1,26 +0,0 @@
1
- /**
2
- * The scene/prefab file format `version` range this engine checkout can
3
- * load (T2.3/D3 §1.E, docs/ENGINE-UPGRADE-DESIGN.md). `[min, max]` — today
4
- * `[1, 1]`: every shipped `.vscn.json`/`.prefab.json` is version 1, and no
5
- * migration machinery exists yet (a future format bump widens `max`, and a
6
- * future engine that drops support for `1` would raise `min`).
7
- *
8
- * Deliberately NOT in `./schema/` (that directory's byte contents are
9
- * pinned by `packages/engine/schemas/engine-capabilities.json`'s
10
- * `schemaDirHash`, refreshed only by `scripts/capabilities-hash.ts` — this
11
- * slice does not run that script). This is also why the check below is a
12
- * POST-Zod-parse function here in `scene/`, not a Zod refinement inside
13
- * `SceneFileSchema`/`PrefabFileSchema`: the generated `vscn.schema.json`/
14
- * `prefab.schema.json` stay byte-identical (the `version` field itself is
15
- * still just `z.number()`).
16
- */
17
- export declare const SUPPORTED_SCENE_VERSION_RANGE: readonly [number, number];
18
- /**
19
- * Throw if `version` falls outside `SUPPORTED_SCENE_VERSION_RANGE`; silently
20
- * accept in-range versions. `fileKind` only changes the error message's noun
21
- * (`.vscn.json` and `.prefab.json` share this single version axis — verified
22
- * both schemas declare their own `version: z.number()` field, not a shared
23
- * ref, but the same counter/semantics per docs/ENGINE-UPGRADE-DESIGN.md).
24
- */
25
- export declare function checkSceneVersionInRange(version: number, fileKind?: 'scene' | 'prefab'): void;
26
- //# sourceMappingURL=scene-version.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scene-version.d.ts","sourceRoot":"","sources":["../../src/scene/scene-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC;AAE/E;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,OAAO,GAAG,QAAkB,GACrC,IAAI,CAWN"}
@@ -1,34 +0,0 @@
1
- /**
2
- * The scene/prefab file format `version` range this engine checkout can
3
- * load (T2.3/D3 §1.E, docs/ENGINE-UPGRADE-DESIGN.md). `[min, max]` — today
4
- * `[1, 1]`: every shipped `.vscn.json`/`.prefab.json` is version 1, and no
5
- * migration machinery exists yet (a future format bump widens `max`, and a
6
- * future engine that drops support for `1` would raise `min`).
7
- *
8
- * Deliberately NOT in `./schema/` (that directory's byte contents are
9
- * pinned by `packages/engine/schemas/engine-capabilities.json`'s
10
- * `schemaDirHash`, refreshed only by `scripts/capabilities-hash.ts` — this
11
- * slice does not run that script). This is also why the check below is a
12
- * POST-Zod-parse function here in `scene/`, not a Zod refinement inside
13
- * `SceneFileSchema`/`PrefabFileSchema`: the generated `vscn.schema.json`/
14
- * `prefab.schema.json` stay byte-identical (the `version` field itself is
15
- * still just `z.number()`).
16
- */
17
- export const SUPPORTED_SCENE_VERSION_RANGE = [1, 1];
18
- /**
19
- * Throw if `version` falls outside `SUPPORTED_SCENE_VERSION_RANGE`; silently
20
- * accept in-range versions. `fileKind` only changes the error message's noun
21
- * (`.vscn.json` and `.prefab.json` share this single version axis — verified
22
- * both schemas declare their own `version: z.number()` field, not a shared
23
- * ref, but the same counter/semantics per docs/ENGINE-UPGRADE-DESIGN.md).
24
- */
25
- export function checkSceneVersionInRange(version, fileKind = 'scene') {
26
- const [min, max] = SUPPORTED_SCENE_VERSION_RANGE;
27
- if (version >= min && version <= max)
28
- return;
29
- const cause = version > max
30
- ? `the engine checkout is older than this ${fileKind}`
31
- : `this ${fileKind} predates the oldest supported format version`;
32
- throw new Error(`${fileKind} version ${version} is outside the supported range [${min}, ${max}] — ` +
33
- `${cause}; see docs/ENGINE-UPGRADE-DESIGN.md`);
34
- }
@@ -1,8 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const SceneAnimationSchema: z.ZodObject<{
3
- autoplay: z.ZodOptional<z.ZodString>;
4
- loop: z.ZodOptional<z.ZodBoolean>;
5
- clipAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6
- }, z.core.$strip>;
7
- export type SceneAnimation = z.infer<typeof SceneAnimationSchema>;
8
- //# sourceMappingURL=animation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../src/scene/schema/animation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkCxB,eAAO,MAAM,oBAAoB;;;;iBASc,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,42 +0,0 @@
1
- import { z } from 'zod';
2
- // ---------------------------------------------------------------------------
3
- // D8 — declarative property tracks (formerly F5,
4
- // docs/VSCN-STRUCTURAL-GAPS-DESIGN.md) were REMOVED: Theatre
5
- // (`@theatre/core`) is the sole authored continuous-animation source (spec
6
- // §3.2, §10 D2-D4/D8). `PropertyTrackSchema`/`PropertyTrackRunner` and the
7
- // `tracks` field are deleted, not deprecated-in-place — see
8
- // packages/engine/src/scene/parse.ts (`assertNoRemovedPropertyTracks`) for
9
- // the loud migration-error guard that rejects any `.vscn`/`.prefab.json`
10
- // still authoring `animation.tracks`, since Zod would otherwise silently
11
- // strip an unrecognized field rather than failing loudly (Global AC §6).
12
- //
13
- // E5 — the AnimGraph state-machine runtime, `.animgraph.json` format, and
14
- // every consumer were removed (spec §3.3, §11 E5; XState + native Three
15
- // `AnimationMixer` replace it — see `xstate-animation-binding.ts`). The
16
- // `animGraph` field is deleted outright, not deprecated-in-place, for the
17
- // same reason as `tracks` above: Zod's default object mode would otherwise
18
- // silently STRIP an authored `animation.animGraph` rather than reporting it,
19
- // violating Global AC §6 ("Removed formats fail with a concise migration/
20
- // removal error rather than being partially read"). The raw-JSON guard
21
- // (`assertNoRemovedAnimGraph` in packages/engine/src/scene/parse.ts) rejects
22
- // any `.vscn`/`.prefab.json` still authoring it before Zod ever parses the
23
- // data — see packages/engine/test/anim-graph-removed.test.ts.
24
- //
25
- // `parameters` is deleted alongside `animGraph`, though it isn't itself named
26
- // in the spec/removal-inventory: its ONLY documented purpose was seeding an
27
- // `AnimGraph`'s initial parameter values (its only readers were
28
- // `scene-loader.ts`'s former animGraph branch, the editor's entity-factory.ts,
29
- // and AnimationSection.tsx's parameter-row UI — all deleted with the runtime).
30
- // Leaving it declared with zero remaining readers would violate this repo's
31
- // "no schema field without a runtime reader" policy (CLAUDE.md).
32
- // ---------------------------------------------------------------------------
33
- export const SceneAnimationSchema = z
34
- .object({
35
- autoplay: z.string().optional().describe('Clip name to play automatically on load'),
36
- loop: z.boolean().optional().describe('Whether the autoplay clip should loop'),
37
- clipAliases: z
38
- .record(z.string(), z.string())
39
- .optional()
40
- .describe('Map raw GLTF clip names to clean names'),
41
- })
42
- .describe('Animation playback configuration');
@@ -1,13 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const SceneAudioSchema: z.ZodObject<{
3
- src: z.ZodOptional<z.ZodString>;
4
- spatial: z.ZodOptional<z.ZodBoolean>;
5
- volume: z.ZodOptional<z.ZodNumber>;
6
- refDistance: z.ZodOptional<z.ZodNumber>;
7
- rolloffFactor: z.ZodOptional<z.ZodNumber>;
8
- maxDistance: z.ZodOptional<z.ZodNumber>;
9
- loop: z.ZodOptional<z.ZodBoolean>;
10
- autoplay: z.ZodOptional<z.ZodBoolean>;
11
- }, z.core.$strip>;
12
- export type SceneAudio = z.infer<typeof SceneAudioSchema>;
13
- //# sourceMappingURL=audio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../../src/scene/schema/audio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;iBAoBY,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -1,22 +0,0 @@
1
- import { z } from 'zod';
2
- export const SceneAudioSchema = z
3
- .object({
4
- src: z.string().optional().describe('Path to audio file (WAV, MP3, OGG)'),
5
- spatial: z.boolean().optional().describe('Enable 3D spatial audio (positional sound)'),
6
- volume: z.number().optional().describe('Playback volume 0–1'),
7
- refDistance: z
8
- .number()
9
- .optional()
10
- .describe('Distance at which volume starts to attenuate (spatial only)'),
11
- rolloffFactor: z
12
- .number()
13
- .optional()
14
- .describe('How quickly volume attenuates with distance (spatial only)'),
15
- maxDistance: z
16
- .number()
17
- .optional()
18
- .describe('Maximum distance at which sound is audible (spatial only)'),
19
- loop: z.boolean().optional().describe('Whether the audio should loop'),
20
- autoplay: z.boolean().optional().describe('Start playing automatically when the scene loads'),
21
- })
22
- .describe('Audio source configuration');
@@ -1,28 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const SceneCameraSchema: z.ZodObject<{
3
- type: z.ZodEnum<{
4
- perspective: "perspective";
5
- orthographic: "orthographic";
6
- }>;
7
- fov: z.ZodOptional<z.ZodNumber>;
8
- near: z.ZodOptional<z.ZodNumber>;
9
- far: z.ZodOptional<z.ZodNumber>;
10
- orthoSize: z.ZodOptional<z.ZodNumber>;
11
- width: z.ZodOptional<z.ZodNumber>;
12
- height: z.ZodOptional<z.ZodNumber>;
13
- }, z.core.$strip>;
14
- /** Partial schema for prefab instance overrides (type not required). */
15
- export declare const SceneCameraOverrideSchema: z.ZodObject<{
16
- type: z.ZodOptional<z.ZodEnum<{
17
- perspective: "perspective";
18
- orthographic: "orthographic";
19
- }>>;
20
- fov: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
21
- near: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
22
- far: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
23
- orthoSize: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
24
- width: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
25
- height: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
26
- }, z.core.$strip>;
27
- export type SceneCamera = z.infer<typeof SceneCameraSchema>;
28
- //# sourceMappingURL=camera.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../../src/scene/schema/camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;iBAaK,CAAC;AAEpC,wEAAwE;AACxE,eAAO,MAAM,yBAAyB;;;;;;;;;;;iBAA8B,CAAC;AAErE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,17 +0,0 @@
1
- import { z } from 'zod';
2
- export const SceneCameraSchema = z
3
- .object({
4
- type: z.enum(['perspective', 'orthographic']).describe('Camera projection type'),
5
- fov: z.number().optional().describe('Vertical field of view in degrees (perspective only)'),
6
- near: z.number().optional().describe('Near clipping plane distance'),
7
- far: z.number().optional().describe('Far clipping plane distance'),
8
- orthoSize: z
9
- .number()
10
- .optional()
11
- .describe('Half-height of the orthographic frustum (orthographic only)'),
12
- width: z.number().optional().describe('Render width in pixels. Defaults to viewport width'),
13
- height: z.number().optional().describe('Render height in pixels. Defaults to viewport height'),
14
- })
15
- .describe('Camera configuration');
16
- /** Partial schema for prefab instance overrides (type not required). */
17
- export const SceneCameraOverrideSchema = SceneCameraSchema.partial();
@@ -1,40 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const SceneColliderSchema: z.ZodObject<{
3
- type: z.ZodEnum<{
4
- cuboid: "cuboid";
5
- ball: "ball";
6
- capsule: "capsule";
7
- trimesh: "trimesh";
8
- }>;
9
- halfExtents: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
10
- radius: z.ZodOptional<z.ZodNumber>;
11
- halfHeight: z.ZodOptional<z.ZodNumber>;
12
- friction: z.ZodOptional<z.ZodNumber>;
13
- restitution: z.ZodOptional<z.ZodNumber>;
14
- density: z.ZodOptional<z.ZodNumber>;
15
- offset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
16
- isSensor: z.ZodOptional<z.ZodBoolean>;
17
- collisionGroups: z.ZodOptional<z.ZodNumber>;
18
- collisionFilter: z.ZodOptional<z.ZodNumber>;
19
- }, z.core.$strip>;
20
- /** Partial schema for prefab instance overrides (type not required). */
21
- export declare const SceneColliderOverrideSchema: z.ZodObject<{
22
- type: z.ZodOptional<z.ZodEnum<{
23
- cuboid: "cuboid";
24
- ball: "ball";
25
- capsule: "capsule";
26
- trimesh: "trimesh";
27
- }>>;
28
- halfExtents: z.ZodOptional<z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
29
- radius: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
30
- halfHeight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
31
- friction: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
32
- restitution: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
33
- density: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
34
- offset: z.ZodOptional<z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
35
- isSensor: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
36
- collisionGroups: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
37
- collisionFilter: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
38
- }, z.core.$strip>;
39
- export type SceneCollider = z.infer<typeof SceneColliderSchema>;
40
- //# sourceMappingURL=collider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collider.d.ts","sourceRoot":"","sources":["../../../src/scene/schema/collider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;iBA4DoB,CAAC;AAErD,wEAAwE;AACxE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;iBAAgC,CAAC;AAEzE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -1,55 +0,0 @@
1
- import { z } from 'zod';
2
- import { Vec3Schema } from './tuples';
3
- export const SceneColliderSchema = z
4
- .object({
5
- type: z
6
- .enum(['cuboid', 'ball', 'capsule', 'trimesh'])
7
- .describe("Collider shape type. T1.2: every shape scales with the entity's composed world scale " +
8
- "(self × ancestors) — for trimesh this means the entity's own mesh geometry vertices " +
9
- 'are pre-scaled per-axis before building the Rapier trimesh, so it matches whatever ' +
10
- "size ends up on screen; it does not require the collider's own dimension fields."),
11
- halfExtents: Vec3Schema.optional().describe("Half-size [x, y, z] for cuboid colliders, in the ENTITY'S OWN LOCAL units. T1.2: " +
12
- "scales with the entity — the actual Rapier collider is this value times the entity's " +
13
- 'composed world scale (self × every transformed ancestor), per axis, baked in once at ' +
14
- "load time (Rapier has no live notion of an Object3D's scale)."),
15
- radius: z
16
- .number()
17
- .optional()
18
- .describe("Radius for ball and capsule colliders, in the ENTITY'S OWN LOCAL units. T1.2: scales " +
19
- "with the entity's composed world scale, which MUST be uniform on the collider's round " +
20
- 'axes (ball: all of x/y/z; capsule: x and z) — a non-uniform scale there throws a loud ' +
21
- 'load error (Rapier balls/capsules cannot represent an ellipse).'),
22
- halfHeight: z
23
- .number()
24
- .optional()
25
- .describe("Half-height for capsule colliders, in the entity's own local units, along the capsule's " +
26
- "axis (Y). T1.2: scales by the entity's composed world scale on that axis."),
27
- friction: z.number().optional().describe('Surface friction coefficient'),
28
- restitution: z
29
- .number()
30
- .optional()
31
- .describe('Bounciness coefficient (0 = no bounce, 1 = perfect bounce)'),
32
- density: z
33
- .number()
34
- .optional()
35
- .describe('Mass density. Used to compute mass from collider volume'),
36
- offset: Vec3Schema.optional().describe("Translation offset relative to body origin, in the ENTITY'S OWN LOCAL units. T1.2/R1c: " +
37
- "scales with the entity's composed world scale (self × every transformed ancestor), " +
38
- 'per axis, the same way halfExtents/radius/halfHeight do — an unscaled offset would ' +
39
- "silently drift away from the entity's visual anchor point under any non-1 scale."),
40
- isSensor: z
41
- .boolean()
42
- .optional()
43
- .describe('When true, detects overlaps without physical blocking (trigger volume)'),
44
- collisionGroups: z
45
- .number()
46
- .optional()
47
- .describe('Bitmask: collision layers this collider belongs to (max 16 bits)'),
48
- collisionFilter: z
49
- .number()
50
- .optional()
51
- .describe('Bitmask: collision layers this collider interacts with (max 16 bits)'),
52
- })
53
- .describe('Physics collider shape and properties');
54
- /** Partial schema for prefab instance overrides (type not required). */
55
- export const SceneColliderOverrideSchema = SceneColliderSchema.partial();
@@ -1,31 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * F6 (`docs/VSCN-STRUCTURAL-GAPS-DESIGN.md`) — a first-class, reusable
4
- * reference from one entity to another, for a `GameComponent`'s own static
5
- * Zod schema (e.g. `target: EntityRefSchema` — "this button opens THAT
6
- * door"). A branded string: on disk (and through generic component-data
7
- * validation) it is a plain string id, but a component field typed
8
- * `EntityRef` is compile-time distinct from an arbitrary `string` field, so a
9
- * bare label can't be assigned where a ref is expected.
10
- *
11
- * Resolution is a runtime concern, not a schema one: `scene-loader.ts`'s
12
- * `resolveEntityRefs` (the post-spawn pass, modeled on `joint.target`'s
13
- * existing resolution) rewrites the field from the authored string id to the
14
- * live `THREE.Object3D` — through the SAME `idMap` `createSceneJoints`
15
- * already uses, no new registry (G3) — before the referencing component's
16
- * `init()` runs.
17
- */
18
- export declare const EntityRefSchema: z.core.$ZodBranded<z.ZodString, "EntityRef", "out">;
19
- export type EntityRef = z.infer<typeof EntityRefSchema>;
20
- /**
21
- * Is `schema` an {@link EntityRefSchema} field — including when wrapped by
22
- * `.optional()`, `.default(...)`, or `.nullable()` (the common ways a
23
- * component author would declare an optional ref)? Unwraps those via zod 4's
24
- * internal `_def.innerType` (there is no public reflection API for this —
25
- * `packages/editor/src/components/inspectors/zod-fields.ts` uses the same
26
- * mechanism to introspect component schemas for the inspector) down to the
27
- * core schema, then checks it against the registered `EntityRefSchema`
28
- * instance by reference.
29
- */
30
- export declare function isEntityRefSchema(schema: z.core.$ZodType): boolean;
31
- //# sourceMappingURL=entity-ref.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-ref.d.ts","sourceRoot":"","sources":["../../../src/scene/schema/entity-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,qDAOzB,CAAC;AAEJ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AA8BxD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAUlE"}
@@ -1,61 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * F6 (`docs/VSCN-STRUCTURAL-GAPS-DESIGN.md`) — a first-class, reusable
4
- * reference from one entity to another, for a `GameComponent`'s own static
5
- * Zod schema (e.g. `target: EntityRefSchema` — "this button opens THAT
6
- * door"). A branded string: on disk (and through generic component-data
7
- * validation) it is a plain string id, but a component field typed
8
- * `EntityRef` is compile-time distinct from an arbitrary `string` field, so a
9
- * bare label can't be assigned where a ref is expected.
10
- *
11
- * Resolution is a runtime concern, not a schema one: `scene-loader.ts`'s
12
- * `resolveEntityRefs` (the post-spawn pass, modeled on `joint.target`'s
13
- * existing resolution) rewrites the field from the authored string id to the
14
- * live `THREE.Object3D` — through the SAME `idMap` `createSceneJoints`
15
- * already uses, no new registry (G3) — before the referencing component's
16
- * `init()` runs.
17
- */
18
- export const EntityRefSchema = z
19
- .string()
20
- .brand()
21
- .describe('A reference to another entity by its authored id. On disk it is a plain string id; the ' +
22
- 'scene loader resolves it to the live THREE.Object3D (WorldNode-as-truth) before the ' +
23
- "referencing component's init() runs. A ref to a missing id is a loud load error.");
24
- /**
25
- * Identity registry of the `EntityRefSchema` object (there is exactly one —
26
- * this module's export), used by {@link isEntityRefSchema}.
27
- *
28
- * Why identity rather than a Zod "type name" check: zod 4's `.brand()` is a
29
- * type-only cast (see zod's own source — `inst.brand = () => inst`), not a
30
- * distinct wrapper class runtime code could switch on. A branded schema is,
31
- * at runtime, just the underlying `ZodString` (here, after `.describe()`
32
- * clones it once more — see zod's `check()`/`clone()`). So "is this an
33
- * EntityRef field" can only be answered by reference identity against the
34
- * one schema object every ref field is declared with — which is exactly
35
- * what we want anyway: a look-alike `z.string()` field must NOT count.
36
- */
37
- const ENTITY_REF_SCHEMAS = new WeakSet();
38
- ENTITY_REF_SCHEMAS.add(EntityRefSchema);
39
- /**
40
- * Is `schema` an {@link EntityRefSchema} field — including when wrapped by
41
- * `.optional()`, `.default(...)`, or `.nullable()` (the common ways a
42
- * component author would declare an optional ref)? Unwraps those via zod 4's
43
- * internal `_def.innerType` (there is no public reflection API for this —
44
- * `packages/editor/src/components/inspectors/zod-fields.ts` uses the same
45
- * mechanism to introspect component schemas for the inspector) down to the
46
- * core schema, then checks it against the registered `EntityRefSchema`
47
- * instance by reference.
48
- */
49
- export function isEntityRefSchema(schema) {
50
- let cur = schema;
51
- while (cur) {
52
- if (ENTITY_REF_SCHEMAS.has(cur))
53
- return true;
54
- const inner = cur._def
55
- ?.innerType;
56
- if (!inner)
57
- return false;
58
- cur = inner;
59
- }
60
- return false;
61
- }