@forgeax/engine-runtime 0.0.0-dev.8d955ade1c79

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 (1017) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +165 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/__tests__/active-camera.unit.test.d.ts +2 -0
  5. package/dist/__tests__/active-camera.unit.test.d.ts.map +1 -0
  6. package/dist/__tests__/animation-graph-add.unit.test.d.ts +2 -0
  7. package/dist/__tests__/animation-graph-add.unit.test.d.ts.map +1 -0
  8. package/dist/__tests__/animation-graph-asset-union.test-d.d.ts +2 -0
  9. package/dist/__tests__/animation-graph-asset-union.test-d.d.ts.map +1 -0
  10. package/dist/__tests__/animation-graph-blend.unit.test.d.ts +2 -0
  11. package/dist/__tests__/animation-graph-blend.unit.test.d.ts.map +1 -0
  12. package/dist/__tests__/animation-graph-build.unit.test.d.ts +2 -0
  13. package/dist/__tests__/animation-graph-build.unit.test.d.ts.map +1 -0
  14. package/dist/__tests__/animation-graph-clip-missing.unit.test.d.ts +2 -0
  15. package/dist/__tests__/animation-graph-clip-missing.unit.test.d.ts.map +1 -0
  16. package/dist/__tests__/animation-graph-clip.unit.test.d.ts +2 -0
  17. package/dist/__tests__/animation-graph-clip.unit.test.d.ts.map +1 -0
  18. package/dist/__tests__/animation-graph-collect-roundtrip.test.d.ts +2 -0
  19. package/dist/__tests__/animation-graph-collect-roundtrip.test.d.ts.map +1 -0
  20. package/dist/__tests__/animation-graph-default-path.integration.test.d.ts +2 -0
  21. package/dist/__tests__/animation-graph-default-path.integration.test.d.ts.map +1 -0
  22. package/dist/__tests__/animation-graph-describe.unit.test.d.ts +2 -0
  23. package/dist/__tests__/animation-graph-describe.unit.test.d.ts.map +1 -0
  24. package/dist/__tests__/animation-graph-errors.unit.test.d.ts +2 -0
  25. package/dist/__tests__/animation-graph-errors.unit.test.d.ts.map +1 -0
  26. package/dist/__tests__/animation-graph-nesting.unit.test.d.ts +2 -0
  27. package/dist/__tests__/animation-graph-nesting.unit.test.d.ts.map +1 -0
  28. package/dist/__tests__/animation-graph-orthogonal-weight.unit.test.d.ts +2 -0
  29. package/dist/__tests__/animation-graph-orthogonal-weight.unit.test.d.ts.map +1 -0
  30. package/dist/__tests__/animation-graph-serialize.unit.test.d.ts +2 -0
  31. package/dist/__tests__/animation-graph-serialize.unit.test.d.ts.map +1 -0
  32. package/dist/__tests__/animation-graph-slot-fill.unit.test.d.ts +2 -0
  33. package/dist/__tests__/animation-graph-slot-fill.unit.test.d.ts.map +1 -0
  34. package/dist/__tests__/animation-nslot.unit.test.d.ts +2 -0
  35. package/dist/__tests__/animation-nslot.unit.test.d.ts.map +1 -0
  36. package/dist/__tests__/animation-slot-length-guard.unit.test.d.ts +2 -0
  37. package/dist/__tests__/animation-slot-length-guard.unit.test.d.ts.map +1 -0
  38. package/dist/__tests__/append-injection.test.d.ts +2 -0
  39. package/dist/__tests__/append-injection.test.d.ts.map +1 -0
  40. package/dist/__tests__/asi-world-baseline-export.unit.test.d.ts +2 -0
  41. package/dist/__tests__/asi-world-baseline-export.unit.test.d.ts.map +1 -0
  42. package/dist/__tests__/asi-world-ci-config.unit.test.d.ts +2 -0
  43. package/dist/__tests__/asi-world-ci-config.unit.test.d.ts.map +1 -0
  44. package/dist/__tests__/asi-world-smoke.unit.test.d.ts +2 -0
  45. package/dist/__tests__/asi-world-smoke.unit.test.d.ts.map +1 -0
  46. package/dist/__tests__/asset-brand-and-name-retirement.test.d.ts +2 -0
  47. package/dist/__tests__/asset-brand-and-name-retirement.test.d.ts.map +1 -0
  48. package/dist/__tests__/asset-error-exhaustive.test-d.d.ts +11 -0
  49. package/dist/__tests__/asset-error-exhaustive.test-d.d.ts.map +1 -0
  50. package/dist/__tests__/asset-registry-guid-reverse.test.d.ts +2 -0
  51. package/dist/__tests__/asset-registry-guid-reverse.test.d.ts.map +1 -0
  52. package/dist/__tests__/asset-registry-hdr-equirect.test.d.ts +2 -0
  53. package/dist/__tests__/asset-registry-hdr-equirect.test.d.ts.map +1 -0
  54. package/dist/__tests__/asset-registry-mesh-pack-payload.dawn.test.d.ts +2 -0
  55. package/dist/__tests__/asset-registry-mesh-pack-payload.dawn.test.d.ts.map +1 -0
  56. package/dist/__tests__/asset-registry-mounts.test.d.ts +2 -0
  57. package/dist/__tests__/asset-registry-mounts.test.d.ts.map +1 -0
  58. package/dist/__tests__/asset-registry-scene.test-d.d.ts +2 -0
  59. package/dist/__tests__/asset-registry-scene.test-d.d.ts.map +1 -0
  60. package/dist/__tests__/asset-registry.browser.test.d.ts +2 -0
  61. package/dist/__tests__/asset-registry.browser.test.d.ts.map +1 -0
  62. package/dist/__tests__/asset-registry.dawn.test.d.ts +2 -0
  63. package/dist/__tests__/asset-registry.dawn.test.d.ts.map +1 -0
  64. package/dist/__tests__/asset-registry.listCatalog.test.d.ts +2 -0
  65. package/dist/__tests__/asset-registry.listCatalog.test.d.ts.map +1 -0
  66. package/dist/__tests__/asset-registry.mesh-bin.test.d.ts +2 -0
  67. package/dist/__tests__/asset-registry.mesh-bin.test.d.ts.map +1 -0
  68. package/dist/__tests__/asset-registry.pack-cache.test.d.ts +2 -0
  69. package/dist/__tests__/asset-registry.pack-cache.test.d.ts.map +1 -0
  70. package/dist/__tests__/asset-registry.raw-container-failfast.test.d.ts +2 -0
  71. package/dist/__tests__/asset-registry.raw-container-failfast.test.d.ts.map +1 -0
  72. package/dist/__tests__/asset-registry.recursive.spec.d.ts +2 -0
  73. package/dist/__tests__/asset-registry.recursive.spec.d.ts.map +1 -0
  74. package/dist/__tests__/asset-registry.unit.test.d.ts +2 -0
  75. package/dist/__tests__/asset-registry.unit.test.d.ts.map +1 -0
  76. package/dist/__tests__/asset.unit.test.d.ts +2 -0
  77. package/dist/__tests__/asset.unit.test.d.ts.map +1 -0
  78. package/dist/__tests__/audio-load-by-guid.unit.test.d.ts +2 -0
  79. package/dist/__tests__/audio-load-by-guid.unit.test.d.ts.map +1 -0
  80. package/dist/__tests__/backend-selection.integration.test.d.ts +2 -0
  81. package/dist/__tests__/backend-selection.integration.test.d.ts.map +1 -0
  82. package/dist/__tests__/basis-catalog-dispatch.integration.test.d.ts +2 -0
  83. package/dist/__tests__/basis-catalog-dispatch.integration.test.d.ts.map +1 -0
  84. package/dist/__tests__/bind-group-cache-keying.test.d.ts +2 -0
  85. package/dist/__tests__/bind-group-cache-keying.test.d.ts.map +1 -0
  86. package/dist/__tests__/block-upload-math.unit.test.d.ts +2 -0
  87. package/dist/__tests__/block-upload-math.unit.test.d.ts.map +1 -0
  88. package/dist/__tests__/builtin-asset-registry.unit.test.d.ts +2 -0
  89. package/dist/__tests__/builtin-asset-registry.unit.test.d.ts.map +1 -0
  90. package/dist/__tests__/builtin-shader-register-e2e.test.d.ts +2 -0
  91. package/dist/__tests__/builtin-shader-register-e2e.test.d.ts.map +1 -0
  92. package/dist/__tests__/cache-false-eviction.test.d.ts +2 -0
  93. package/dist/__tests__/cache-false-eviction.test.d.ts.map +1 -0
  94. package/dist/__tests__/cache-isolation-matrix.test.d.ts +2 -0
  95. package/dist/__tests__/cache-isolation-matrix.test.d.ts.map +1 -0
  96. package/dist/__tests__/camera-clear-snapshot-equivalence.unit.test.d.ts +2 -0
  97. package/dist/__tests__/camera-clear-snapshot-equivalence.unit.test.d.ts.map +1 -0
  98. package/dist/__tests__/clamp-to-last.e2e.browser.test.d.ts +2 -0
  99. package/dist/__tests__/clamp-to-last.e2e.browser.test.d.ts.map +1 -0
  100. package/dist/__tests__/clamp-to-last.e2e.dawn.test.d.ts +2 -0
  101. package/dist/__tests__/clamp-to-last.e2e.dawn.test.d.ts.map +1 -0
  102. package/dist/__tests__/collect-scene-asset.test.d.ts +2 -0
  103. package/dist/__tests__/collect-scene-asset.test.d.ts.map +1 -0
  104. package/dist/__tests__/collect-scene-mount-collapse.test.d.ts +2 -0
  105. package/dist/__tests__/collect-scene-mount-collapse.test.d.ts.map +1 -0
  106. package/dist/__tests__/collect-subtree.unit.test.d.ts +2 -0
  107. package/dist/__tests__/collect-subtree.unit.test.d.ts.map +1 -0
  108. package/dist/__tests__/collect-transient-children-absent.test.d.ts +2 -0
  109. package/dist/__tests__/collect-transient-children-absent.test.d.ts.map +1 -0
  110. package/dist/__tests__/collect-transient-roundtrip.test.d.ts +2 -0
  111. package/dist/__tests__/collect-transient-roundtrip.test.d.ts.map +1 -0
  112. package/dist/__tests__/collect-transient-skip.test.d.ts +2 -0
  113. package/dist/__tests__/collect-transient-skip.test.d.ts.map +1 -0
  114. package/dist/__tests__/components.test-d.d.ts +2 -0
  115. package/dist/__tests__/components.test-d.d.ts.map +1 -0
  116. package/dist/__tests__/components.unit.test.d.ts +2 -0
  117. package/dist/__tests__/components.unit.test.d.ts.map +1 -0
  118. package/dist/__tests__/composite-skybox-cross-world.browser.test.d.ts +2 -0
  119. package/dist/__tests__/composite-skybox-cross-world.browser.test.d.ts.map +1 -0
  120. package/dist/__tests__/compressed-texture-physical-extent.integration.test.d.ts +2 -0
  121. package/dist/__tests__/compressed-texture-physical-extent.integration.test.d.ts.map +1 -0
  122. package/dist/__tests__/create-renderer-assembly.integration.test.d.ts +2 -0
  123. package/dist/__tests__/create-renderer-assembly.integration.test.d.ts.map +1 -0
  124. package/dist/__tests__/createRenderer-dispose.test.d.ts +2 -0
  125. package/dist/__tests__/createRenderer-dispose.test.d.ts.map +1 -0
  126. package/dist/__tests__/createRenderer-requiredFeatures.unit.test.d.ts +2 -0
  127. package/dist/__tests__/createRenderer-requiredFeatures.unit.test.d.ts.map +1 -0
  128. package/dist/__tests__/createRenderer.browser-no-webgpu.test.d.ts +2 -0
  129. package/dist/__tests__/createRenderer.browser-no-webgpu.test.d.ts.map +1 -0
  130. package/dist/__tests__/createRenderer.unit.test.d.ts +2 -0
  131. package/dist/__tests__/createRenderer.unit.test.d.ts.map +1 -0
  132. package/dist/__tests__/dawn/hello-sprite-nineslice-section.dawn.test.d.ts +2 -0
  133. package/dist/__tests__/dawn/hello-sprite-nineslice-section.dawn.test.d.ts.map +1 -0
  134. package/dist/__tests__/dawn/ibl-compose.dawn.test.d.ts +2 -0
  135. package/dist/__tests__/dawn/ibl-compose.dawn.test.d.ts.map +1 -0
  136. package/dist/__tests__/dawn/ibl-modules-compose.dawn.test.d.ts +2 -0
  137. package/dist/__tests__/dawn/ibl-modules-compose.dawn.test.d.ts.map +1 -0
  138. package/dist/__tests__/dawn/ibl-precompute-readback.dawn.test.d.ts +2 -0
  139. package/dist/__tests__/dawn/ibl-precompute-readback.dawn.test.d.ts.map +1 -0
  140. package/dist/__tests__/dawn/instances-per-instance-pbr.dawn.test.d.ts +2 -0
  141. package/dist/__tests__/dawn/instances-per-instance-pbr.dawn.test.d.ts.map +1 -0
  142. package/dist/__tests__/dawn/instances-shadow.dawn.test.d.ts +2 -0
  143. package/dist/__tests__/dawn/instances-shadow.dawn.test.d.ts.map +1 -0
  144. package/dist/__tests__/dawn/instances-uniform-fallback.dawn.test.d.ts +2 -0
  145. package/dist/__tests__/dawn/instances-uniform-fallback.dawn.test.d.ts.map +1 -0
  146. package/dist/__tests__/dawn/material-alpha.dawn.test.d.ts +2 -0
  147. package/dist/__tests__/dawn/material-alpha.dawn.test.d.ts.map +1 -0
  148. package/dist/__tests__/dawn/material-cooked-fixture.dawn.test.d.ts +2 -0
  149. package/dist/__tests__/dawn/material-cooked-fixture.dawn.test.d.ts.map +1 -0
  150. package/dist/__tests__/dawn/mesh-ssbo-normal-matrix.dawn.test.d.ts +2 -0
  151. package/dist/__tests__/dawn/mesh-ssbo-normal-matrix.dawn.test.d.ts.map +1 -0
  152. package/dist/__tests__/dawn/mesh-update-dawn.test.d.ts +2 -0
  153. package/dist/__tests__/dawn/mesh-update-dawn.test.d.ts.map +1 -0
  154. package/dist/__tests__/dawn/mipmap-srgb-linear.dawn.test.d.ts +2 -0
  155. package/dist/__tests__/dawn/mipmap-srgb-linear.dawn.test.d.ts.map +1 -0
  156. package/dist/__tests__/dawn/per-entity-material-texture-isolation.dawn.test.d.ts +2 -0
  157. package/dist/__tests__/dawn/per-entity-material-texture-isolation.dawn.test.d.ts.map +1 -0
  158. package/dist/__tests__/dawn/sprite-nineslice-mesh-bind.dawn.test.d.ts +2 -0
  159. package/dist/__tests__/dawn/sprite-nineslice-mesh-bind.dawn.test.d.ts.map +1 -0
  160. package/dist/__tests__/dawn/tonemap.dawn.test.d.ts +2 -0
  161. package/dist/__tests__/dawn/tonemap.dawn.test.d.ts.map +1 -0
  162. package/dist/__tests__/dawn/upload-texture.dawn.test.d.ts +2 -0
  163. package/dist/__tests__/dawn/upload-texture.dawn.test.d.ts.map +1 -0
  164. package/dist/__tests__/dawn/user-handle-mesh-render.dawn.test.d.ts +2 -0
  165. package/dist/__tests__/dawn/user-handle-mesh-render.dawn.test.d.ts.map +1 -0
  166. package/dist/__tests__/dawn/user-mesh-upload.dawn.test.d.ts +2 -0
  167. package/dist/__tests__/dawn/user-mesh-upload.dawn.test.d.ts.map +1 -0
  168. package/dist/__tests__/dawn/zero-manifest-mesh-fail.dawn.test.d.ts +2 -0
  169. package/dist/__tests__/dawn/zero-manifest-mesh-fail.dawn.test.d.ts.map +1 -0
  170. package/dist/__tests__/dawn/zero-manifest-ready.dawn.test.d.ts +2 -0
  171. package/dist/__tests__/dawn/zero-manifest-ready.dawn.test.d.ts.map +1 -0
  172. package/dist/__tests__/demo-sortscope-migration.unit.test.d.ts +2 -0
  173. package/dist/__tests__/demo-sortscope-migration.unit.test.d.ts.map +1 -0
  174. package/dist/__tests__/derive-bgl-integration.test.d.ts +2 -0
  175. package/dist/__tests__/derive-bgl-integration.test.d.ts.map +1 -0
  176. package/dist/__tests__/derive-render-data-skin.unit.test.d.ts +2 -0
  177. package/dist/__tests__/derive-render-data-skin.unit.test.d.ts.map +1 -0
  178. package/dist/__tests__/draw-published.d.ts +5 -0
  179. package/dist/__tests__/draw-published.d.ts.map +1 -0
  180. package/dist/__tests__/dynamic-texture-store.unit.test.d.ts +2 -0
  181. package/dist/__tests__/dynamic-texture-store.unit.test.d.ts.map +1 -0
  182. package/dist/__tests__/environment-error-exhaustive.test-d.d.ts +8 -0
  183. package/dist/__tests__/environment-error-exhaustive.test-d.d.ts.map +1 -0
  184. package/dist/__tests__/equirect-bc6h.integration.test.d.ts +2 -0
  185. package/dist/__tests__/equirect-bc6h.integration.test.d.ts.map +1 -0
  186. package/dist/__tests__/error-exhaustive.test.d.ts +2 -0
  187. package/dist/__tests__/error-exhaustive.test.d.ts.map +1 -0
  188. package/dist/__tests__/errors.unit.test.d.ts +2 -0
  189. package/dist/__tests__/errors.unit.test.d.ts.map +1 -0
  190. package/dist/__tests__/extract-frames-graceful-degradation.test.d.ts +2 -0
  191. package/dist/__tests__/extract-frames-graceful-degradation.test.d.ts.map +1 -0
  192. package/dist/__tests__/extract-frames-merge.test.d.ts +2 -0
  193. package/dist/__tests__/extract-frames-merge.test.d.ts.map +1 -0
  194. package/dist/__tests__/extract-frames-reset.test.d.ts +2 -0
  195. package/dist/__tests__/extract-frames-reset.test.d.ts.map +1 -0
  196. package/dist/__tests__/extract-record-no-hardcoded-texture-fields.test.d.ts +2 -0
  197. package/dist/__tests__/extract-record-no-hardcoded-texture-fields.test.d.ts.map +1 -0
  198. package/dist/__tests__/extract-skin-mismatch.unit.test.d.ts +2 -0
  199. package/dist/__tests__/extract-skin-mismatch.unit.test.d.ts.map +1 -0
  200. package/dist/__tests__/fetch-binary-decompress.test.d.ts +2 -0
  201. package/dist/__tests__/fetch-binary-decompress.test.d.ts.map +1 -0
  202. package/dist/__tests__/four-path-compression.integration.test.d.ts +2 -0
  203. package/dist/__tests__/four-path-compression.integration.test.d.ts.map +1 -0
  204. package/dist/__tests__/frame-targets-shadow-regression.unit.test.d.ts +2 -0
  205. package/dist/__tests__/frame-targets-shadow-regression.unit.test.d.ts.map +1 -0
  206. package/dist/__tests__/fullscreen-feature-host.dawn.test.d.ts +2 -0
  207. package/dist/__tests__/fullscreen-feature-host.dawn.test.d.ts.map +1 -0
  208. package/dist/__tests__/fullscreen-post-bgl-depth.test.d.ts +2 -0
  209. package/dist/__tests__/fullscreen-post-bgl-depth.test.d.ts.map +1 -0
  210. package/dist/__tests__/fullscreen-post-depth-params-arity.test.d.ts +2 -0
  211. package/dist/__tests__/fullscreen-post-depth-params-arity.test.d.ts.map +1 -0
  212. package/dist/__tests__/fullscreen-post-process-pass.dawn.test.d.ts +2 -0
  213. package/dist/__tests__/fullscreen-post-process-pass.dawn.test.d.ts.map +1 -0
  214. package/dist/__tests__/fullscreen-post-process-pass.unit.test.d.ts +2 -0
  215. package/dist/__tests__/fullscreen-post-process-pass.unit.test.d.ts.map +1 -0
  216. package/dist/__tests__/fxaa-pixel-diff.dawn.test.d.ts +2 -0
  217. package/dist/__tests__/fxaa-pixel-diff.dawn.test.d.ts.map +1 -0
  218. package/dist/__tests__/fxaa-validation-and-resize.dawn.test.d.ts +2 -0
  219. package/dist/__tests__/fxaa-validation-and-resize.dawn.test.d.ts.map +1 -0
  220. package/dist/__tests__/fxaa-zero-overhead.dawn.test.d.ts +2 -0
  221. package/dist/__tests__/fxaa-zero-overhead.dawn.test.d.ts.map +1 -0
  222. package/dist/__tests__/geometry.unit.test.d.ts +2 -0
  223. package/dist/__tests__/geometry.unit.test.d.ts.map +1 -0
  224. package/dist/__tests__/glyph-tilemap-worldid.test.d.ts +2 -0
  225. package/dist/__tests__/glyph-tilemap-worldid.test.d.ts.map +1 -0
  226. package/dist/__tests__/gpu-resource-cow-survivor.test.d.ts +2 -0
  227. package/dist/__tests__/gpu-resource-cow-survivor.test.d.ts.map +1 -0
  228. package/dist/__tests__/guid-for-asset.unit.test.d.ts +2 -0
  229. package/dist/__tests__/guid-for-asset.unit.test.d.ts.map +1 -0
  230. package/dist/__tests__/handle-migration.test.d.ts +2 -0
  231. package/dist/__tests__/handle-migration.test.d.ts.map +1 -0
  232. package/dist/__tests__/hello-tilemap-smoke-upgrade.unit.test.d.ts +2 -0
  233. package/dist/__tests__/hello-tilemap-smoke-upgrade.unit.test.d.ts.map +1 -0
  234. package/dist/__tests__/helpers/mock-shader-registry.d.ts +11 -0
  235. package/dist/__tests__/helpers/mock-shader-registry.d.ts.map +1 -0
  236. package/dist/__tests__/helpers/register-runtime-components.d.ts +4 -0
  237. package/dist/__tests__/helpers/register-runtime-components.d.ts.map +1 -0
  238. package/dist/__tests__/helpers/register-scene-components.d.ts +4 -0
  239. package/dist/__tests__/helpers/register-scene-components.d.ts.map +1 -0
  240. package/dist/__tests__/helpers/tilemap-assets.d.ts +6 -0
  241. package/dist/__tests__/helpers/tilemap-assets.d.ts.map +1 -0
  242. package/dist/__tests__/host-custom-kind-contract.test-d.d.ts +2 -0
  243. package/dist/__tests__/host-custom-kind-contract.test-d.d.ts.map +1 -0
  244. package/dist/__tests__/host-custom-kind-contract.test.d.ts +2 -0
  245. package/dist/__tests__/host-custom-kind-contract.test.d.ts.map +1 -0
  246. package/dist/__tests__/inspect-name.test.d.ts +2 -0
  247. package/dist/__tests__/inspect-name.test.d.ts.map +1 -0
  248. package/dist/__tests__/instances.test-d.d.ts +2 -0
  249. package/dist/__tests__/instances.test-d.d.ts.map +1 -0
  250. package/dist/__tests__/instantiate-mount-deferred-wiring.test.d.ts +2 -0
  251. package/dist/__tests__/instantiate-mount-deferred-wiring.test.d.ts.map +1 -0
  252. package/dist/__tests__/light-attenuation-formula.test.d.ts +2 -0
  253. package/dist/__tests__/light-attenuation-formula.test.d.ts.map +1 -0
  254. package/dist/__tests__/light-casters-9-light.browser.test.d.ts +2 -0
  255. package/dist/__tests__/light-casters-9-light.browser.test.d.ts.map +1 -0
  256. package/dist/__tests__/light-gpu-byte-neutral.unit.test.d.ts +2 -0
  257. package/dist/__tests__/light-gpu-byte-neutral.unit.test.d.ts.map +1 -0
  258. package/dist/__tests__/light-snapshot.test-d.d.ts +2 -0
  259. package/dist/__tests__/light-snapshot.test-d.d.ts.map +1 -0
  260. package/dist/__tests__/lights-vec-negative.unit.test.d.ts +2 -0
  261. package/dist/__tests__/lights-vec-negative.unit.test.d.ts.map +1 -0
  262. package/dist/__tests__/lights.unit.test.d.ts +2 -0
  263. package/dist/__tests__/lights.unit.test.d.ts.map +1 -0
  264. package/dist/__tests__/loadbyguid-payload.unit.test.d.ts +2 -0
  265. package/dist/__tests__/loadbyguid-payload.unit.test.d.ts.map +1 -0
  266. package/dist/__tests__/loadbyguid-texture-intern.unit.test.d.ts +2 -0
  267. package/dist/__tests__/loadbyguid-texture-intern.unit.test.d.ts.map +1 -0
  268. package/dist/__tests__/loader-extract-graceful.test.d.ts +2 -0
  269. package/dist/__tests__/loader-extract-graceful.test.d.ts.map +1 -0
  270. package/dist/__tests__/loader-name-survival.test.d.ts +2 -0
  271. package/dist/__tests__/loader-name-survival.test.d.ts.map +1 -0
  272. package/dist/__tests__/m3-vec-negative.unit.test.d.ts +2 -0
  273. package/dist/__tests__/m3-vec-negative.unit.test.d.ts.map +1 -0
  274. package/dist/__tests__/m5-browser-dawn-sweep.integration.test.d.ts +2 -0
  275. package/dist/__tests__/m5-browser-dawn-sweep.integration.test.d.ts.map +1 -0
  276. package/dist/__tests__/material-texture-uv-scale.unit.test.d.ts +2 -0
  277. package/dist/__tests__/material-texture-uv-scale.unit.test.d.ts.map +1 -0
  278. package/dist/__tests__/materials.unit.test.d.ts +2 -0
  279. package/dist/__tests__/materials.unit.test.d.ts.map +1 -0
  280. package/dist/__tests__/mesh-bin-contract.test.d.ts +2 -0
  281. package/dist/__tests__/mesh-bin-contract.test.d.ts.map +1 -0
  282. package/dist/__tests__/mesh-bin-skin-roundtrip.unit.test.d.ts +2 -0
  283. package/dist/__tests__/mesh-bin-skin-roundtrip.unit.test.d.ts.map +1 -0
  284. package/dist/__tests__/mesh-bin.test.d.ts +2 -0
  285. package/dist/__tests__/mesh-bin.test.d.ts.map +1 -0
  286. package/dist/__tests__/mesh-loader-skin-contract.unit.test.d.ts +2 -0
  287. package/dist/__tests__/mesh-loader-skin-contract.unit.test.d.ts.map +1 -0
  288. package/dist/__tests__/mesh-ssbo-grow.unit.test.d.ts +2 -0
  289. package/dist/__tests__/mesh-ssbo-grow.unit.test.d.ts.map +1 -0
  290. package/dist/__tests__/mip-gate.unit.test.d.ts +2 -0
  291. package/dist/__tests__/mip-gate.unit.test.d.ts.map +1 -0
  292. package/dist/__tests__/msaa-sprite-pixel-diff.dawn.test.d.ts +2 -0
  293. package/dist/__tests__/msaa-sprite-pixel-diff.dawn.test.d.ts.map +1 -0
  294. package/dist/__tests__/multi-uv-8set.e2e.dawn.test.d.ts +2 -0
  295. package/dist/__tests__/multi-uv-8set.e2e.dawn.test.d.ts.map +1 -0
  296. package/dist/__tests__/name.unit.test.d.ts +2 -0
  297. package/dist/__tests__/name.unit.test.d.ts.map +1 -0
  298. package/dist/__tests__/new-kind-refs-contract.test.d.ts +2 -0
  299. package/dist/__tests__/new-kind-refs-contract.test.d.ts.map +1 -0
  300. package/dist/__tests__/package-promotion.test.d.ts +2 -0
  301. package/dist/__tests__/package-promotion.test.d.ts.map +1 -0
  302. package/dist/__tests__/package-rename.test.d.ts +2 -0
  303. package/dist/__tests__/package-rename.test.d.ts.map +1 -0
  304. package/dist/__tests__/pass-selector.unit.test.d.ts +2 -0
  305. package/dist/__tests__/pass-selector.unit.test.d.ts.map +1 -0
  306. package/dist/__tests__/pbr-pipeline.unit.test.d.ts +2 -0
  307. package/dist/__tests__/pbr-pipeline.unit.test.d.ts.map +1 -0
  308. package/dist/__tests__/pipeline-builder-msaa.unit.test.d.ts +2 -0
  309. package/dist/__tests__/pipeline-builder-msaa.unit.test.d.ts.map +1 -0
  310. package/dist/__tests__/pipeline-cache-keying.unit.test.d.ts +2 -0
  311. package/dist/__tests__/pipeline-cache-keying.unit.test.d.ts.map +1 -0
  312. package/dist/__tests__/pipeline-spec.test.d.ts +2 -0
  313. package/dist/__tests__/pipeline-spec.test.d.ts.map +1 -0
  314. package/dist/__tests__/pipeline.unit.test.d.ts +2 -0
  315. package/dist/__tests__/pipeline.unit.test.d.ts.map +1 -0
  316. package/dist/__tests__/point-light-shadow.browser.test.d.ts +2 -0
  317. package/dist/__tests__/point-light-shadow.browser.test.d.ts.map +1 -0
  318. package/dist/__tests__/point-light-shadow.dawn.test.d.ts +2 -0
  319. package/dist/__tests__/point-light-shadow.dawn.test.d.ts.map +1 -0
  320. package/dist/__tests__/point-light-shadow.unit.test.d.ts +2 -0
  321. package/dist/__tests__/point-light-shadow.unit.test.d.ts.map +1 -0
  322. package/dist/__tests__/post-process-error-codes.unit.test.d.ts +2 -0
  323. package/dist/__tests__/post-process-error-codes.unit.test.d.ts.map +1 -0
  324. package/dist/__tests__/post-process-params-component.unit.test.d.ts +2 -0
  325. package/dist/__tests__/post-process-params-component.unit.test.d.ts.map +1 -0
  326. package/dist/__tests__/post-process-params-extract.unit.test.d.ts +2 -0
  327. package/dist/__tests__/post-process-params-extract.unit.test.d.ts.map +1 -0
  328. package/dist/__tests__/postprocess-camera-consistency.test.d.ts +2 -0
  329. package/dist/__tests__/postprocess-camera-consistency.test.d.ts.map +1 -0
  330. package/dist/__tests__/profiler-assembly.integration.test.d.ts +2 -0
  331. package/dist/__tests__/profiler-assembly.integration.test.d.ts.map +1 -0
  332. package/dist/__tests__/propagate-transforms.dawn.test.d.ts +2 -0
  333. package/dist/__tests__/propagate-transforms.dawn.test.d.ts.map +1 -0
  334. package/dist/__tests__/record-worldid-isolation.test.d.ts +2 -0
  335. package/dist/__tests__/record-worldid-isolation.test.d.ts.map +1 -0
  336. package/dist/__tests__/recover-error-exhaustive.test-d.d.ts +11 -0
  337. package/dist/__tests__/recover-error-exhaustive.test-d.d.ts.map +1 -0
  338. package/dist/__tests__/render-error-exhaustive.test-d.d.ts +11 -0
  339. package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +1 -0
  340. package/dist/__tests__/render-feature-assembly.test-d.d.ts +2 -0
  341. package/dist/__tests__/render-feature-assembly.test-d.d.ts.map +1 -0
  342. package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts +2 -0
  343. package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts.map +1 -0
  344. package/dist/__tests__/render-feature-prepared-graphics.browser.test.d.ts +2 -0
  345. package/dist/__tests__/render-feature-prepared-graphics.browser.test.d.ts.map +1 -0
  346. package/dist/__tests__/render-feature-prepared-graphics.dawn.test.d.ts +2 -0
  347. package/dist/__tests__/render-feature-prepared-graphics.dawn.test.d.ts.map +1 -0
  348. package/dist/__tests__/render-feature-prepared-graphics.fixture.d.ts +10 -0
  349. package/dist/__tests__/render-feature-prepared-graphics.fixture.d.ts.map +1 -0
  350. package/dist/__tests__/render-feature-prepared-graphics.integration.test.d.ts +2 -0
  351. package/dist/__tests__/render-feature-prepared-graphics.integration.test.d.ts.map +1 -0
  352. package/dist/__tests__/render-feature-prepared-graphics.regression.integration.test.d.ts +2 -0
  353. package/dist/__tests__/render-feature-prepared-graphics.regression.integration.test.d.ts.map +1 -0
  354. package/dist/__tests__/render-feature-recover.integration.test.d.ts +2 -0
  355. package/dist/__tests__/render-feature-recover.integration.test.d.ts.map +1 -0
  356. package/dist/__tests__/render-feature-runtime-surface.test-d.d.ts +2 -0
  357. package/dist/__tests__/render-feature-runtime-surface.test-d.d.ts.map +1 -0
  358. package/dist/__tests__/render-schema-consumer.integration.test.d.ts +2 -0
  359. package/dist/__tests__/render-schema-consumer.integration.test.d.ts.map +1 -0
  360. package/dist/__tests__/render-schema-owner-boundary.unit.test.d.ts +2 -0
  361. package/dist/__tests__/render-schema-owner-boundary.unit.test.d.ts.map +1 -0
  362. package/dist/__tests__/render-system-cross-world-overlay-queue.test.d.ts +2 -0
  363. package/dist/__tests__/render-system-cross-world-overlay-queue.test.d.ts.map +1 -0
  364. package/dist/__tests__/render-system-extract-dispatch-ordering.test.d.ts +2 -0
  365. package/dist/__tests__/render-system-extract-dispatch-ordering.test.d.ts.map +1 -0
  366. package/dist/__tests__/render-system-extract.test.d.ts +2 -0
  367. package/dist/__tests__/render-system-extract.test.d.ts.map +1 -0
  368. package/dist/__tests__/render-system-extract.unit.test.d.ts +2 -0
  369. package/dist/__tests__/render-system-extract.unit.test.d.ts.map +1 -0
  370. package/dist/__tests__/render-system-fold-bucket.unit.test.d.ts +2 -0
  371. package/dist/__tests__/render-system-fold-bucket.unit.test.d.ts.map +1 -0
  372. package/dist/__tests__/render-system-fold-fallback.unit.test.d.ts +2 -0
  373. package/dist/__tests__/render-system-fold-fallback.unit.test.d.ts.map +1 -0
  374. package/dist/__tests__/render-system-fold-material.unit.test.d.ts +2 -0
  375. package/dist/__tests__/render-system-fold-material.unit.test.d.ts.map +1 -0
  376. package/dist/__tests__/render-system-fold-metrics.unit.test.d.ts +2 -0
  377. package/dist/__tests__/render-system-fold-metrics.unit.test.d.ts.map +1 -0
  378. package/dist/__tests__/render-system-fold-modegate.unit.test.d.ts +2 -0
  379. package/dist/__tests__/render-system-fold-modegate.unit.test.d.ts.map +1 -0
  380. package/dist/__tests__/render-system-fold-scene-instances.unit.test.d.ts +2 -0
  381. package/dist/__tests__/render-system-fold-scene-instances.unit.test.d.ts.map +1 -0
  382. package/dist/__tests__/render-system-fold.dawn.test.d.ts +2 -0
  383. package/dist/__tests__/render-system-fold.dawn.test.d.ts.map +1 -0
  384. package/dist/__tests__/render-system-mega.test.d.ts +2 -0
  385. package/dist/__tests__/render-system-mega.test.d.ts.map +1 -0
  386. package/dist/__tests__/render-system-owner-split-contract.test.d.ts +2 -0
  387. package/dist/__tests__/render-system-owner-split-contract.test.d.ts.map +1 -0
  388. package/dist/__tests__/render-system-record-multi-material-textureview.test.d.ts +2 -0
  389. package/dist/__tests__/render-system-record-multi-material-textureview.test.d.ts.map +1 -0
  390. package/dist/__tests__/render-system-record-per-submesh-transparency.test.d.ts +2 -0
  391. package/dist/__tests__/render-system-record-per-submesh-transparency.test.d.ts.map +1 -0
  392. package/dist/__tests__/render-system-record.test.d.ts +2 -0
  393. package/dist/__tests__/render-system-record.test.d.ts.map +1 -0
  394. package/dist/__tests__/render-system-record.unit.test.d.ts +2 -0
  395. package/dist/__tests__/render-system-record.unit.test.d.ts.map +1 -0
  396. package/dist/__tests__/render-system-skin-bg.unit.test.d.ts +2 -0
  397. package/dist/__tests__/render-system-skin-bg.unit.test.d.ts.map +1 -0
  398. package/dist/__tests__/renderer-consumer.test-d.d.ts +2 -0
  399. package/dist/__tests__/renderer-consumer.test-d.d.ts.map +1 -0
  400. package/dist/__tests__/renderer-health.unit.test.d.ts +2 -0
  401. package/dist/__tests__/renderer-health.unit.test.d.ts.map +1 -0
  402. package/dist/__tests__/renderer-lifecycle.integration.test.d.ts +2 -0
  403. package/dist/__tests__/renderer-lifecycle.integration.test.d.ts.map +1 -0
  404. package/dist/__tests__/renderer-recover.unit.test.d.ts +2 -0
  405. package/dist/__tests__/renderer-recover.unit.test.d.ts.map +1 -0
  406. package/dist/__tests__/renderer-result.test-d.d.ts +2 -0
  407. package/dist/__tests__/renderer-result.test-d.d.ts.map +1 -0
  408. package/dist/__tests__/renderer-surface.unit.test.d.ts +2 -0
  409. package/dist/__tests__/renderer-surface.unit.test.d.ts.map +1 -0
  410. package/dist/__tests__/renderer-test-utils.d.ts +10 -0
  411. package/dist/__tests__/renderer-test-utils.d.ts.map +1 -0
  412. package/dist/__tests__/renderer.test-d.d.ts +2 -0
  413. package/dist/__tests__/renderer.test-d.d.ts.map +1 -0
  414. package/dist/__tests__/resolve-asset-handle-err.test.d.ts +2 -0
  415. package/dist/__tests__/resolve-asset-handle-err.test.d.ts.map +1 -0
  416. package/dist/__tests__/resolve-asset-handle.unit.test.d.ts +2 -0
  417. package/dist/__tests__/resolve-asset-handle.unit.test.d.ts.map +1 -0
  418. package/dist/__tests__/resolve-depth-only-view.test.d.ts +2 -0
  419. package/dist/__tests__/resolve-depth-only-view.test.d.ts.map +1 -0
  420. package/dist/__tests__/resolveName-fallback.test.d.ts +2 -0
  421. package/dist/__tests__/resolveName-fallback.test.d.ts.map +1 -0
  422. package/dist/__tests__/resolveName-null-package.test.d.ts +2 -0
  423. package/dist/__tests__/resolveName-null-package.test.d.ts.map +1 -0
  424. package/dist/__tests__/resolveName-unified-entry.test.d.ts +2 -0
  425. package/dist/__tests__/resolveName-unified-entry.test.d.ts.map +1 -0
  426. package/dist/__tests__/resolveName.test.d.ts +2 -0
  427. package/dist/__tests__/resolveName.test.d.ts.map +1 -0
  428. package/dist/__tests__/rhi-null-command-flow.unit.test.d.ts +2 -0
  429. package/dist/__tests__/rhi-null-command-flow.unit.test.d.ts.map +1 -0
  430. package/dist/__tests__/rhi-null-noop-behavior.unit.test.d.ts +2 -0
  431. package/dist/__tests__/rhi-null-noop-behavior.unit.test.d.ts.map +1 -0
  432. package/dist/__tests__/rhi-null-renderer-lifecycle.unit.test.d.ts +2 -0
  433. package/dist/__tests__/rhi-null-renderer-lifecycle.unit.test.d.ts.map +1 -0
  434. package/dist/__tests__/roots-to-scene-asset.test.d.ts +2 -0
  435. package/dist/__tests__/roots-to-scene-asset.test.d.ts.map +1 -0
  436. package/dist/__tests__/roundtrip-primitive.test.d.ts +2 -0
  437. package/dist/__tests__/roundtrip-primitive.test.d.ts.map +1 -0
  438. package/dist/__tests__/runtime-authority-scan.unit.test.d.ts +2 -0
  439. package/dist/__tests__/runtime-authority-scan.unit.test.d.ts.map +1 -0
  440. package/dist/__tests__/runtime-domain-residue.unit.test.d.ts +2 -0
  441. package/dist/__tests__/runtime-domain-residue.unit.test.d.ts.map +1 -0
  442. package/dist/__tests__/scene-bare-guid-refs-instantiate.test.d.ts +2 -0
  443. package/dist/__tests__/scene-bare-guid-refs-instantiate.test.d.ts.map +1 -0
  444. package/dist/__tests__/scene-equirect-roundtrip.test.d.ts +2 -0
  445. package/dist/__tests__/scene-equirect-roundtrip.test.d.ts.map +1 -0
  446. package/dist/__tests__/scene-instance-authoring.integration.test.d.ts +2 -0
  447. package/dist/__tests__/scene-instance-authoring.integration.test.d.ts.map +1 -0
  448. package/dist/__tests__/scene-instance-bridge.integration.test.d.ts +2 -0
  449. package/dist/__tests__/scene-instance-bridge.integration.test.d.ts.map +1 -0
  450. package/dist/__tests__/scene-instance-component.test.d.ts +2 -0
  451. package/dist/__tests__/scene-instance-component.test.d.ts.map +1 -0
  452. package/dist/__tests__/scene-instantiate-cycle-runtime.test.d.ts +2 -0
  453. package/dist/__tests__/scene-instantiate-cycle-runtime.test.d.ts.map +1 -0
  454. package/dist/__tests__/scene-mount-fixed-point.test.d.ts +2 -0
  455. package/dist/__tests__/scene-mount-fixed-point.test.d.ts.map +1 -0
  456. package/dist/__tests__/scene-mount-roundtrip.test.d.ts +2 -0
  457. package/dist/__tests__/scene-mount-roundtrip.test.d.ts.map +1 -0
  458. package/dist/__tests__/scene-mount-wrapper-roundtrip.test.d.ts +2 -0
  459. package/dist/__tests__/scene-mount-wrapper-roundtrip.test.d.ts.map +1 -0
  460. package/dist/__tests__/scene-sugar-instantiate.test.d.ts +2 -0
  461. package/dist/__tests__/scene-sugar-instantiate.test.d.ts.map +1 -0
  462. package/dist/__tests__/serialize-mounts-roundtrip.test.d.ts +2 -0
  463. package/dist/__tests__/serialize-mounts-roundtrip.test.d.ts.map +1 -0
  464. package/dist/__tests__/serialize-scene-asset.test.d.ts +2 -0
  465. package/dist/__tests__/serialize-scene-asset.test.d.ts.map +1 -0
  466. package/dist/__tests__/shadow-caster-empty-schema.test.d.ts +2 -0
  467. package/dist/__tests__/shadow-caster-empty-schema.test.d.ts.map +1 -0
  468. package/dist/__tests__/shadow-csm-atlas.test.d.ts +2 -0
  469. package/dist/__tests__/shadow-csm-atlas.test.d.ts.map +1 -0
  470. package/dist/__tests__/shadow-csm-blend.dawn.test.d.ts +2 -0
  471. package/dist/__tests__/shadow-csm-blend.dawn.test.d.ts.map +1 -0
  472. package/dist/__tests__/shadow-csm-cascade-loadop.test.d.ts +2 -0
  473. package/dist/__tests__/shadow-csm-cascade-loadop.test.d.ts.map +1 -0
  474. package/dist/__tests__/shadow-csm-component.test.d.ts +2 -0
  475. package/dist/__tests__/shadow-csm-component.test.d.ts.map +1 -0
  476. package/dist/__tests__/shadow-csm-extract.test.d.ts +2 -0
  477. package/dist/__tests__/shadow-csm-extract.test.d.ts.map +1 -0
  478. package/dist/__tests__/shadow-csm-orthoz.test.d.ts +2 -0
  479. package/dist/__tests__/shadow-csm-orthoz.test.d.ts.map +1 -0
  480. package/dist/__tests__/shadow-csm-runtime-vary.dawn.test.d.ts +2 -0
  481. package/dist/__tests__/shadow-csm-runtime-vary.dawn.test.d.ts.map +1 -0
  482. package/dist/__tests__/shadow-csm-shader.dawn.test.d.ts +2 -0
  483. package/dist/__tests__/shadow-csm-shader.dawn.test.d.ts.map +1 -0
  484. package/dist/__tests__/shadow-csm-tile-consistency.test.d.ts +2 -0
  485. package/dist/__tests__/shadow-csm-tile-consistency.test.d.ts.map +1 -0
  486. package/dist/__tests__/shadow-csm-ubo.dawn.test.d.ts +2 -0
  487. package/dist/__tests__/shadow-csm-ubo.dawn.test.d.ts.map +1 -0
  488. package/dist/__tests__/shadow-csm-ubo.test.d.ts +2 -0
  489. package/dist/__tests__/shadow-csm-ubo.test.d.ts.map +1 -0
  490. package/dist/__tests__/shadow-csm-viewport.browser.test.d.ts +2 -0
  491. package/dist/__tests__/shadow-csm-viewport.browser.test.d.ts.map +1 -0
  492. package/dist/__tests__/shadow-fields-observable.dawn.test.d.ts +2 -0
  493. package/dist/__tests__/shadow-fields-observable.dawn.test.d.ts.map +1 -0
  494. package/dist/__tests__/shadow-m1.dawn.test.d.ts +2 -0
  495. package/dist/__tests__/shadow-m1.dawn.test.d.ts.map +1 -0
  496. package/dist/__tests__/shadow-mesh-ssbo-order.test.d.ts +2 -0
  497. package/dist/__tests__/shadow-mesh-ssbo-order.test.d.ts.map +1 -0
  498. package/dist/__tests__/skin-error-exhaustive.test-d.d.ts +11 -0
  499. package/dist/__tests__/skin-error-exhaustive.test-d.d.ts.map +1 -0
  500. package/dist/__tests__/skin-errors.unit.test.d.ts +2 -0
  501. package/dist/__tests__/skin-errors.unit.test.d.ts.map +1 -0
  502. package/dist/__tests__/skin-extract-getarrayview-count.unit.test.d.ts +2 -0
  503. package/dist/__tests__/skin-extract-getarrayview-count.unit.test.d.ts.map +1 -0
  504. package/dist/__tests__/skin-parented-double-transform.test.d.ts +14 -0
  505. package/dist/__tests__/skin-parented-double-transform.test.d.ts.map +1 -0
  506. package/dist/__tests__/skylight-lazy-projection.test.d.ts +2 -0
  507. package/dist/__tests__/skylight-lazy-projection.test.d.ts.map +1 -0
  508. package/dist/__tests__/sparse-tag-scene-roundtrip.test.d.ts +2 -0
  509. package/dist/__tests__/sparse-tag-scene-roundtrip.test.d.ts.map +1 -0
  510. package/dist/__tests__/sprite-cullmode-flip.dawn.test.d.ts +2 -0
  511. package/dist/__tests__/sprite-cullmode-flip.dawn.test.d.ts.map +1 -0
  512. package/dist/__tests__/sprite-lit-bgl-byte-identical.test.d.ts +2 -0
  513. package/dist/__tests__/sprite-lit-bgl-byte-identical.test.d.ts.map +1 -0
  514. package/dist/__tests__/sprite-lit-extract-branch.test.d.ts +2 -0
  515. package/dist/__tests__/sprite-lit-extract-branch.test.d.ts.map +1 -0
  516. package/dist/__tests__/sprite-lit-pipeline-cache-key.test.d.ts +2 -0
  517. package/dist/__tests__/sprite-lit-pipeline-cache-key.test.d.ts.map +1 -0
  518. package/dist/__tests__/sprite-param-values.test-d.d.ts +2 -0
  519. package/dist/__tests__/sprite-param-values.test-d.d.ts.map +1 -0
  520. package/dist/__tests__/ssao-bgl.test.d.ts +2 -0
  521. package/dist/__tests__/ssao-bgl.test.d.ts.map +1 -0
  522. package/dist/__tests__/ssao-buffers.test.d.ts +2 -0
  523. package/dist/__tests__/ssao-buffers.test.d.ts.map +1 -0
  524. package/dist/__tests__/ssao-data.test.d.ts +2 -0
  525. package/dist/__tests__/ssao-data.test.d.ts.map +1 -0
  526. package/dist/__tests__/ssao-errors.test.d.ts +2 -0
  527. package/dist/__tests__/ssao-errors.test.d.ts.map +1 -0
  528. package/dist/__tests__/ssao-manifest.test.d.ts +2 -0
  529. package/dist/__tests__/ssao-manifest.test.d.ts.map +1 -0
  530. package/dist/__tests__/ssao-passes.test.d.ts +2 -0
  531. package/dist/__tests__/ssao-passes.test.d.ts.map +1 -0
  532. package/dist/__tests__/ssao-pipelines.test.d.ts +2 -0
  533. package/dist/__tests__/ssao-pipelines.test.d.ts.map +1 -0
  534. package/dist/__tests__/ssao-uniform-layout.test.d.ts +2 -0
  535. package/dist/__tests__/ssao-uniform-layout.test.d.ts.map +1 -0
  536. package/dist/__tests__/static-rig.integration.test.d.ts +2 -0
  537. package/dist/__tests__/static-rig.integration.test.d.ts.map +1 -0
  538. package/dist/__tests__/stencil-outline-pixel.dawn.test.d.ts +2 -0
  539. package/dist/__tests__/stencil-outline-pixel.dawn.test.d.ts.map +1 -0
  540. package/dist/__tests__/swap-chain-format.unit.test.d.ts +2 -0
  541. package/dist/__tests__/swap-chain-format.unit.test.d.ts.map +1 -0
  542. package/dist/__tests__/systems.unit.test.d.ts +2 -0
  543. package/dist/__tests__/systems.unit.test.d.ts.map +1 -0
  544. package/dist/__tests__/template-game-default-api-contract.test.d.ts +2 -0
  545. package/dist/__tests__/template-game-default-api-contract.test.d.ts.map +1 -0
  546. package/dist/__tests__/text.unit.test.d.ts +2 -0
  547. package/dist/__tests__/text.unit.test.d.ts.map +1 -0
  548. package/dist/__tests__/tilemap-childed-despawn.test.d.ts +2 -0
  549. package/dist/__tests__/tilemap-childed-despawn.test.d.ts.map +1 -0
  550. package/dist/__tests__/tilemap-chunk-extract.overhang-bounds.test.d.ts +2 -0
  551. package/dist/__tests__/tilemap-chunk-extract.overhang-bounds.test.d.ts.map +1 -0
  552. package/dist/__tests__/tilemap-chunk-extract.propagate-order.test.d.ts +2 -0
  553. package/dist/__tests__/tilemap-chunk-extract.propagate-order.test.d.ts.map +1 -0
  554. package/dist/__tests__/tilemap-chunk-extract.terrain-rewrite.unit.test.d.ts +2 -0
  555. package/dist/__tests__/tilemap-chunk-extract.terrain-rewrite.unit.test.d.ts.map +1 -0
  556. package/dist/__tests__/tilemap-chunk-extract.test.d.ts +2 -0
  557. package/dist/__tests__/tilemap-chunk-extract.test.d.ts.map +1 -0
  558. package/dist/__tests__/tilemap-chunk-extract.unit.test.d.ts +2 -0
  559. package/dist/__tests__/tilemap-chunk-extract.unit.test.d.ts.map +1 -0
  560. package/dist/__tests__/tilemap-chunk-y-sort-bench.unit.test.d.ts +2 -0
  561. package/dist/__tests__/tilemap-chunk-y-sort-bench.unit.test.d.ts.map +1 -0
  562. package/dist/__tests__/tilemap-dirty-rebuild.test.d.ts +2 -0
  563. package/dist/__tests__/tilemap-dirty-rebuild.test.d.ts.map +1 -0
  564. package/dist/__tests__/tilemap-material-cache.test.d.ts +2 -0
  565. package/dist/__tests__/tilemap-material-cache.test.d.ts.map +1 -0
  566. package/dist/__tests__/tilemap-multi-atlas.test.d.ts +2 -0
  567. package/dist/__tests__/tilemap-multi-atlas.test.d.ts.map +1 -0
  568. package/dist/__tests__/tilemap-owner-boundary.unit.test.d.ts +2 -0
  569. package/dist/__tests__/tilemap-owner-boundary.unit.test.d.ts.map +1 -0
  570. package/dist/__tests__/tilemap-region-pack.test.d.ts +2 -0
  571. package/dist/__tests__/tilemap-region-pack.test.d.ts.map +1 -0
  572. package/dist/__tests__/tilemap-spawn-flip-pivot.test.d.ts +2 -0
  573. package/dist/__tests__/tilemap-spawn-flip-pivot.test.d.ts.map +1 -0
  574. package/dist/__tests__/tilemap-uv-inset.test.d.ts +2 -0
  575. package/dist/__tests__/tilemap-uv-inset.test.d.ts.map +1 -0
  576. package/dist/__tests__/tilemap-validate.test.d.ts +2 -0
  577. package/dist/__tests__/tilemap-validate.test.d.ts.map +1 -0
  578. package/dist/__tests__/tileset-asset-validate.test.d.ts +2 -0
  579. package/dist/__tests__/tileset-asset-validate.test.d.ts.map +1 -0
  580. package/dist/__tests__/transcode-fallback.unit.test.d.ts +2 -0
  581. package/dist/__tests__/transcode-fallback.unit.test.d.ts.map +1 -0
  582. package/dist/__tests__/transform-hierarchy-pixel-diff.dawn.test.d.ts +2 -0
  583. package/dist/__tests__/transform-hierarchy-pixel-diff.dawn.test.d.ts.map +1 -0
  584. package/dist/__tests__/transient-fields-collect.test.d.ts +2 -0
  585. package/dist/__tests__/transient-fields-collect.test.d.ts.map +1 -0
  586. package/dist/__tests__/transient-runtime-behavior.test.d.ts +2 -0
  587. package/dist/__tests__/transient-runtime-behavior.test.d.ts.map +1 -0
  588. package/dist/__tests__/transitional-authoring.integration.test.d.ts +2 -0
  589. package/dist/__tests__/transitional-authoring.integration.test.d.ts.map +1 -0
  590. package/dist/__tests__/transparent-sort-tilemap-sprite-interleave.test.d.ts +2 -0
  591. package/dist/__tests__/transparent-sort-tilemap-sprite-interleave.test.d.ts.map +1 -0
  592. package/dist/__tests__/variant-selection.unit.test.d.ts +2 -0
  593. package/dist/__tests__/variant-selection.unit.test.d.ts.map +1 -0
  594. package/dist/__tests__/vertex-attribute-layout.test.d.ts +2 -0
  595. package/dist/__tests__/vertex-attribute-layout.test.d.ts.map +1 -0
  596. package/dist/__tests__/video-extract-bindgroup.dawn.test.d.ts +2 -0
  597. package/dist/__tests__/video-extract-bindgroup.dawn.test.d.ts.map +1 -0
  598. package/dist/__tests__/video-loader-consumption.test.d.ts +2 -0
  599. package/dist/__tests__/video-loader-consumption.test.d.ts.map +1 -0
  600. package/dist/__tests__/video-loader-smoke.dawn.test.d.ts +2 -0
  601. package/dist/__tests__/video-loader-smoke.dawn.test.d.ts.map +1 -0
  602. package/dist/__tests__/view-ubo-layout.browser.test.d.ts +2 -0
  603. package/dist/__tests__/view-ubo-layout.browser.test.d.ts.map +1 -0
  604. package/dist/__tests__/world-entity-key.test.d.ts +2 -0
  605. package/dist/__tests__/world-entity-key.test.d.ts.map +1 -0
  606. package/dist/__tests__/world-scene-despawn.test.d.ts +2 -0
  607. package/dist/__tests__/world-scene-despawn.test.d.ts.map +1 -0
  608. package/dist/__tests__/world-scene-instantiate.test.d.ts +2 -0
  609. package/dist/__tests__/world-scene-instantiate.test.d.ts.map +1 -0
  610. package/dist/__tests__/world-scene-nested.test.d.ts +2 -0
  611. package/dist/__tests__/world-scene-nested.test.d.ts.map +1 -0
  612. package/dist/__tests__/world-scene-override.test.d.ts +2 -0
  613. package/dist/__tests__/world-scene-override.test.d.ts.map +1 -0
  614. package/dist/__tests__/zero-compression-zero-load.integration.test.d.ts +2 -0
  615. package/dist/__tests__/zero-compression-zero-load.integration.test.d.ts.map +1 -0
  616. package/dist/asset-contributions.d.ts +3 -0
  617. package/dist/asset-contributions.d.ts.map +1 -0
  618. package/dist/backend-selection.d.ts +13 -0
  619. package/dist/backend-selection.d.ts.map +1 -0
  620. package/dist/collect-scene-asset.d.ts +19 -0
  621. package/dist/collect-scene-asset.d.ts.map +1 -0
  622. package/dist/components/__tests__/camera.test-d.d.ts +2 -0
  623. package/dist/components/__tests__/camera.test-d.d.ts.map +1 -0
  624. package/dist/components/__tests__/camera.test.d.ts +2 -0
  625. package/dist/components/__tests__/camera.test.d.ts.map +1 -0
  626. package/dist/components/__tests__/child-of.test.d.ts +2 -0
  627. package/dist/components/__tests__/child-of.test.d.ts.map +1 -0
  628. package/dist/components/__tests__/sprite-animation.test-d.d.ts +2 -0
  629. package/dist/components/__tests__/sprite-animation.test-d.d.ts.map +1 -0
  630. package/dist/components/__tests__/sprite-instances.unit.test.d.ts +2 -0
  631. package/dist/components/__tests__/sprite-instances.unit.test.d.ts.map +1 -0
  632. package/dist/components/__tests__/sprite-region-override.test-d.d.ts +2 -0
  633. package/dist/components/__tests__/sprite-region-override.test-d.d.ts.map +1 -0
  634. package/dist/components/__tests__/tile-layer.test-d.d.ts +2 -0
  635. package/dist/components/__tests__/tile-layer.test-d.d.ts.map +1 -0
  636. package/dist/components/__tests__/tile-layer.unit.test.d.ts +2 -0
  637. package/dist/components/__tests__/tile-layer.unit.test.d.ts.map +1 -0
  638. package/dist/components/__tests__/tilemap.test-d.d.ts +2 -0
  639. package/dist/components/__tests__/tilemap.test-d.d.ts.map +1 -0
  640. package/dist/components/__tests__/transform-vec-schema.test.d.ts +2 -0
  641. package/dist/components/__tests__/transform-vec-schema.test.d.ts.map +1 -0
  642. package/dist/create-renderer-env-classify.d.ts +21 -0
  643. package/dist/create-renderer-env-classify.d.ts.map +1 -0
  644. package/dist/createRenderer.d.ts +15 -0
  645. package/dist/createRenderer.d.ts.map +1 -0
  646. package/dist/dev-import-transport.d.ts +24 -0
  647. package/dist/dev-import-transport.d.ts.map +1 -0
  648. package/dist/errors/environment.d.ts +2 -0
  649. package/dist/errors/environment.d.ts.map +1 -0
  650. package/dist/index.d.ts +218 -0
  651. package/dist/index.d.ts.map +1 -0
  652. package/dist/index.mjs +813 -0
  653. package/dist/index.mjs.map +1 -0
  654. package/dist/renderer-host.d.ts +9 -0
  655. package/dist/renderer-host.d.ts.map +1 -0
  656. package/dist/renderer-host.mjs +62 -0
  657. package/dist/renderer-host.mjs.map +1 -0
  658. package/dist/scene-instances/__tests__/post-spawn-resolve-joints.unit.test.d.ts +2 -0
  659. package/dist/scene-instances/__tests__/post-spawn-resolve-joints.unit.test.d.ts.map +1 -0
  660. package/dist/scene-instances/index.d.ts +2 -0
  661. package/dist/scene-instances/index.d.ts.map +1 -0
  662. package/dist/scene-utils/mount-override-fold.d.ts +15 -0
  663. package/dist/scene-utils/mount-override-fold.d.ts.map +1 -0
  664. package/dist/sprite-param-values.d.ts +62 -0
  665. package/dist/sprite-param-values.d.ts.map +1 -0
  666. package/dist/systems/__tests__/_xorshift.d.ts +28 -0
  667. package/dist/systems/__tests__/_xorshift.d.ts.map +1 -0
  668. package/dist/systems/__tests__/argsort-in-place.test.d.ts +2 -0
  669. package/dist/systems/__tests__/argsort-in-place.test.d.ts.map +1 -0
  670. package/dist/systems/__tests__/transparent-sort.bench.d.ts +2 -0
  671. package/dist/systems/__tests__/transparent-sort.bench.d.ts.map +1 -0
  672. package/dist/systems/sprite-animation-tick.d.ts +50 -0
  673. package/dist/systems/sprite-animation-tick.d.ts.map +1 -0
  674. package/dist/systems/tonemap.d.ts +27 -0
  675. package/dist/systems/tonemap.d.ts.map +1 -0
  676. package/dist/systems/transparent-sort.d.ts +50 -0
  677. package/dist/systems/transparent-sort.d.ts.map +1 -0
  678. package/dist/tilemap-register-validate.d.ts +21 -0
  679. package/dist/tilemap-register-validate.d.ts.map +1 -0
  680. package/package.json +101 -0
  681. package/src/__tests__/active-camera.unit.test.ts +203 -0
  682. package/src/__tests__/animation-graph-add.unit.test.ts +67 -0
  683. package/src/__tests__/animation-graph-asset-union.test-d.ts +83 -0
  684. package/src/__tests__/animation-graph-blend.unit.test.ts +66 -0
  685. package/src/__tests__/animation-graph-build.unit.test.ts +100 -0
  686. package/src/__tests__/animation-graph-clip-missing.unit.test.ts +62 -0
  687. package/src/__tests__/animation-graph-clip.unit.test.ts +77 -0
  688. package/src/__tests__/animation-graph-collect-roundtrip.test.ts +213 -0
  689. package/src/__tests__/animation-graph-default-path.integration.test.ts +65 -0
  690. package/src/__tests__/animation-graph-describe.unit.test.ts +68 -0
  691. package/src/__tests__/animation-graph-errors.unit.test.ts +75 -0
  692. package/src/__tests__/animation-graph-nesting.unit.test.ts +84 -0
  693. package/src/__tests__/animation-graph-orthogonal-weight.unit.test.ts +98 -0
  694. package/src/__tests__/animation-graph-serialize.unit.test.ts +171 -0
  695. package/src/__tests__/animation-graph-slot-fill.unit.test.ts +95 -0
  696. package/src/__tests__/animation-nslot.unit.test.ts +63 -0
  697. package/src/__tests__/animation-slot-length-guard.unit.test.ts +81 -0
  698. package/src/__tests__/append-injection.test.ts +105 -0
  699. package/src/__tests__/asi-world-baseline-export.unit.test.ts +173 -0
  700. package/src/__tests__/asi-world-ci-config.unit.test.ts +186 -0
  701. package/src/__tests__/asi-world-smoke.unit.test.ts +192 -0
  702. package/src/__tests__/asset-brand-and-name-retirement.test.ts +102 -0
  703. package/src/__tests__/asset-error-exhaustive.test-d.ts +62 -0
  704. package/src/__tests__/asset-registry-guid-reverse.test.ts +608 -0
  705. package/src/__tests__/asset-registry-hdr-equirect.test.ts +78 -0
  706. package/src/__tests__/asset-registry-mesh-pack-payload.dawn.test.ts +232 -0
  707. package/src/__tests__/asset-registry-mounts.test.ts +806 -0
  708. package/src/__tests__/asset-registry-scene.test-d.ts +49 -0
  709. package/src/__tests__/asset-registry.browser.test.ts +81 -0
  710. package/src/__tests__/asset-registry.dawn.test.ts +94 -0
  711. package/src/__tests__/asset-registry.listCatalog.test.ts +170 -0
  712. package/src/__tests__/asset-registry.mesh-bin.test.ts +316 -0
  713. package/src/__tests__/asset-registry.pack-cache.test.ts +969 -0
  714. package/src/__tests__/asset-registry.raw-container-failfast.test.ts +225 -0
  715. package/src/__tests__/asset-registry.recursive.spec.ts +1397 -0
  716. package/src/__tests__/asset-registry.unit.test.ts +1030 -0
  717. package/src/__tests__/asset.unit.test.ts +7107 -0
  718. package/src/__tests__/audio-load-by-guid.unit.test.ts +126 -0
  719. package/src/__tests__/backend-selection.integration.test.ts +11 -0
  720. package/src/__tests__/basis-catalog-dispatch.integration.test.ts +320 -0
  721. package/src/__tests__/bind-group-cache-keying.test.ts +295 -0
  722. package/src/__tests__/block-upload-math.unit.test.ts +192 -0
  723. package/src/__tests__/builtin-asset-registry.unit.test.ts +112 -0
  724. package/src/__tests__/builtin-shader-register-e2e.test.ts +151 -0
  725. package/src/__tests__/cache-false-eviction.test.ts +127 -0
  726. package/src/__tests__/cache-isolation-matrix.test.ts +183 -0
  727. package/src/__tests__/camera-clear-snapshot-equivalence.unit.test.ts +75 -0
  728. package/src/__tests__/clamp-to-last.e2e.browser.test.ts +193 -0
  729. package/src/__tests__/clamp-to-last.e2e.dawn.test.ts +325 -0
  730. package/src/__tests__/collect-scene-asset.test.ts +873 -0
  731. package/src/__tests__/collect-scene-mount-collapse.test.ts +391 -0
  732. package/src/__tests__/collect-subtree.unit.test.ts +75 -0
  733. package/src/__tests__/collect-transient-children-absent.test.ts +168 -0
  734. package/src/__tests__/collect-transient-roundtrip.test.ts +269 -0
  735. package/src/__tests__/collect-transient-skip.test.ts +176 -0
  736. package/src/__tests__/components.test-d.ts +231 -0
  737. package/src/__tests__/components.unit.test.ts +2666 -0
  738. package/src/__tests__/composite-skybox-cross-world.browser.test.ts +410 -0
  739. package/src/__tests__/compressed-texture-physical-extent.integration.test.ts +139 -0
  740. package/src/__tests__/create-renderer-assembly.integration.test.ts +55 -0
  741. package/src/__tests__/createRenderer-dispose.test.ts +49 -0
  742. package/src/__tests__/createRenderer-requiredFeatures.unit.test.ts +134 -0
  743. package/src/__tests__/createRenderer.browser-no-webgpu.test.ts +54 -0
  744. package/src/__tests__/createRenderer.unit.test.ts +231 -0
  745. package/src/__tests__/dawn/hello-sprite-nineslice-section.dawn.test.ts +357 -0
  746. package/src/__tests__/dawn/ibl-compose.dawn.test.ts +151 -0
  747. package/src/__tests__/dawn/ibl-modules-compose.dawn.test.ts +223 -0
  748. package/src/__tests__/dawn/ibl-precompute-readback.dawn.test.ts +250 -0
  749. package/src/__tests__/dawn/instances-per-instance-pbr.dawn.test.ts +631 -0
  750. package/src/__tests__/dawn/instances-shadow.dawn.test.ts +454 -0
  751. package/src/__tests__/dawn/instances-uniform-fallback.dawn.test.ts +312 -0
  752. package/src/__tests__/dawn/material-alpha.dawn.test.ts +296 -0
  753. package/src/__tests__/dawn/material-cooked-fixture.dawn.test.ts +79 -0
  754. package/src/__tests__/dawn/mesh-ssbo-normal-matrix.dawn.test.ts +106 -0
  755. package/src/__tests__/dawn/mesh-update-dawn.test.ts +250 -0
  756. package/src/__tests__/dawn/mipmap-srgb-linear.dawn.test.ts +124 -0
  757. package/src/__tests__/dawn/per-entity-material-texture-isolation.dawn.test.ts +555 -0
  758. package/src/__tests__/dawn/sprite-nineslice-mesh-bind.dawn.test.ts +235 -0
  759. package/src/__tests__/dawn/tonemap.dawn.test.ts +107 -0
  760. package/src/__tests__/dawn/upload-texture.dawn.test.ts +198 -0
  761. package/src/__tests__/dawn/user-handle-mesh-render.dawn.test.ts +289 -0
  762. package/src/__tests__/dawn/user-mesh-upload.dawn.test.ts +209 -0
  763. package/src/__tests__/dawn/zero-manifest-mesh-fail.dawn.test.ts +119 -0
  764. package/src/__tests__/dawn/zero-manifest-ready.dawn.test.ts +98 -0
  765. package/src/__tests__/demo-sortscope-migration.unit.test.ts +115 -0
  766. package/src/__tests__/derive-bgl-integration.test.ts +388 -0
  767. package/src/__tests__/derive-render-data-skin.unit.test.ts +90 -0
  768. package/src/__tests__/draw-published.ts +17 -0
  769. package/src/__tests__/dynamic-texture-store.unit.test.ts +190 -0
  770. package/src/__tests__/environment-error-exhaustive.test-d.ts +28 -0
  771. package/src/__tests__/equirect-bc6h.integration.test.ts +158 -0
  772. package/src/__tests__/error-exhaustive.test.ts +220 -0
  773. package/src/__tests__/errors.unit.test.ts +1227 -0
  774. package/src/__tests__/extract-frames-graceful-degradation.test.ts +294 -0
  775. package/src/__tests__/extract-frames-merge.test.ts +656 -0
  776. package/src/__tests__/extract-frames-reset.test.ts +158 -0
  777. package/src/__tests__/extract-record-no-hardcoded-texture-fields.test.ts +81 -0
  778. package/src/__tests__/extract-skin-mismatch.unit.test.ts +322 -0
  779. package/src/__tests__/fetch-binary-decompress.test.ts +356 -0
  780. package/src/__tests__/four-path-compression.integration.test.ts +395 -0
  781. package/src/__tests__/frame-targets-shadow-regression.unit.test.ts +28 -0
  782. package/src/__tests__/fullscreen-feature-host.dawn.test.ts +80 -0
  783. package/src/__tests__/fullscreen-post-bgl-depth.test.ts +133 -0
  784. package/src/__tests__/fullscreen-post-depth-params-arity.test.ts +84 -0
  785. package/src/__tests__/fullscreen-post-process-pass.dawn.test.ts +336 -0
  786. package/src/__tests__/fullscreen-post-process-pass.unit.test.ts +109 -0
  787. package/src/__tests__/fxaa-pixel-diff.dawn.test.ts +303 -0
  788. package/src/__tests__/fxaa-validation-and-resize.dawn.test.ts +369 -0
  789. package/src/__tests__/fxaa-zero-overhead.dawn.test.ts +258 -0
  790. package/src/__tests__/geometry.unit.test.ts +2631 -0
  791. package/src/__tests__/glyph-tilemap-worldid.test.ts +146 -0
  792. package/src/__tests__/gpu-resource-cow-survivor.test.ts +390 -0
  793. package/src/__tests__/guid-for-asset.unit.test.ts +102 -0
  794. package/src/__tests__/handle-migration.test.ts +136 -0
  795. package/src/__tests__/hello-tilemap-smoke-upgrade.unit.test.ts +147 -0
  796. package/src/__tests__/helpers/mock-shader-registry.ts +139 -0
  797. package/src/__tests__/helpers/register-runtime-components.ts +71 -0
  798. package/src/__tests__/helpers/register-scene-components.ts +10 -0
  799. package/src/__tests__/helpers/tilemap-assets.ts +29 -0
  800. package/src/__tests__/host-custom-kind-contract.test-d.ts +47 -0
  801. package/src/__tests__/host-custom-kind-contract.test.ts +578 -0
  802. package/src/__tests__/inspect-name.test.ts +139 -0
  803. package/src/__tests__/instances.test-d.ts +61 -0
  804. package/src/__tests__/instantiate-mount-deferred-wiring.test.ts +112 -0
  805. package/src/__tests__/light-attenuation-formula.test.ts +171 -0
  806. package/src/__tests__/light-casters-9-light.browser.test.ts +877 -0
  807. package/src/__tests__/light-gpu-byte-neutral.unit.test.ts +160 -0
  808. package/src/__tests__/light-snapshot.test-d.ts +84 -0
  809. package/src/__tests__/lights-vec-negative.unit.test.ts +52 -0
  810. package/src/__tests__/lights.unit.test.ts +2456 -0
  811. package/src/__tests__/loadbyguid-payload.unit.test.ts +117 -0
  812. package/src/__tests__/loadbyguid-texture-intern.unit.test.ts +213 -0
  813. package/src/__tests__/loader-extract-graceful.test.ts +146 -0
  814. package/src/__tests__/loader-name-survival.test.ts +213 -0
  815. package/src/__tests__/m3-vec-negative.unit.test.ts +46 -0
  816. package/src/__tests__/m5-browser-dawn-sweep.integration.test.ts +8 -0
  817. package/src/__tests__/material-texture-uv-scale.unit.test.ts +119 -0
  818. package/src/__tests__/materials.unit.test.ts +254 -0
  819. package/src/__tests__/mesh-bin-contract.test.ts +28 -0
  820. package/src/__tests__/mesh-bin-skin-roundtrip.unit.test.ts +149 -0
  821. package/src/__tests__/mesh-bin.test.ts +38 -0
  822. package/src/__tests__/mesh-loader-skin-contract.unit.test.ts +120 -0
  823. package/src/__tests__/mesh-ssbo-grow.unit.test.ts +244 -0
  824. package/src/__tests__/mip-gate.unit.test.ts +79 -0
  825. package/src/__tests__/msaa-sprite-pixel-diff.dawn.test.ts +367 -0
  826. package/src/__tests__/multi-uv-8set.e2e.dawn.test.ts +296 -0
  827. package/src/__tests__/name.unit.test.ts +123 -0
  828. package/src/__tests__/new-kind-refs-contract.test.ts +132 -0
  829. package/src/__tests__/node-shims.d.ts +31 -0
  830. package/src/__tests__/package-promotion.test.ts +88 -0
  831. package/src/__tests__/package-rename.test.ts +103 -0
  832. package/src/__tests__/pass-selector.unit.test.ts +102 -0
  833. package/src/__tests__/pbr-pipeline.unit.test.ts +200 -0
  834. package/src/__tests__/pipeline-builder-msaa.unit.test.ts +221 -0
  835. package/src/__tests__/pipeline-cache-keying.unit.test.ts +313 -0
  836. package/src/__tests__/pipeline-spec.test.ts +900 -0
  837. package/src/__tests__/pipeline.unit.test.ts +5435 -0
  838. package/src/__tests__/point-light-shadow.browser.test.ts +278 -0
  839. package/src/__tests__/point-light-shadow.dawn.test.ts +813 -0
  840. package/src/__tests__/point-light-shadow.unit.test.ts +675 -0
  841. package/src/__tests__/post-process-error-codes.unit.test.ts +161 -0
  842. package/src/__tests__/post-process-params-component.unit.test.ts +153 -0
  843. package/src/__tests__/post-process-params-extract.unit.test.ts +97 -0
  844. package/src/__tests__/postprocess-camera-consistency.test.ts +375 -0
  845. package/src/__tests__/profiler-assembly.integration.test.ts +74 -0
  846. package/src/__tests__/propagate-transforms.dawn.test.ts +254 -0
  847. package/src/__tests__/record-worldid-isolation.test.ts +225 -0
  848. package/src/__tests__/recover-error-exhaustive.test-d.ts +35 -0
  849. package/src/__tests__/render-error-exhaustive.test-d.ts +291 -0
  850. package/src/__tests__/render-feature-assembly.test-d.ts +39 -0
  851. package/src/__tests__/render-feature-prepared-graphics-docs.unit.test.ts +126 -0
  852. package/src/__tests__/render-feature-prepared-graphics.browser.test.ts +88 -0
  853. package/src/__tests__/render-feature-prepared-graphics.dawn.test.ts +115 -0
  854. package/src/__tests__/render-feature-prepared-graphics.fixture.ts +104 -0
  855. package/src/__tests__/render-feature-prepared-graphics.integration.test.ts +56 -0
  856. package/src/__tests__/render-feature-prepared-graphics.regression.integration.test.ts +104 -0
  857. package/src/__tests__/render-feature-recover.integration.test.ts +102 -0
  858. package/src/__tests__/render-feature-runtime-surface.test-d.ts +42 -0
  859. package/src/__tests__/render-schema-consumer.integration.test.ts +32 -0
  860. package/src/__tests__/render-schema-owner-boundary.unit.test.ts +22 -0
  861. package/src/__tests__/render-system-cross-world-overlay-queue.test.ts +172 -0
  862. package/src/__tests__/render-system-extract-dispatch-ordering.test.ts +307 -0
  863. package/src/__tests__/render-system-extract.test.ts +1384 -0
  864. package/src/__tests__/render-system-extract.unit.test.ts +360 -0
  865. package/src/__tests__/render-system-fold-bucket.unit.test.ts +286 -0
  866. package/src/__tests__/render-system-fold-fallback.unit.test.ts +151 -0
  867. package/src/__tests__/render-system-fold-material.unit.test.ts +143 -0
  868. package/src/__tests__/render-system-fold-metrics.unit.test.ts +170 -0
  869. package/src/__tests__/render-system-fold-modegate.unit.test.ts +166 -0
  870. package/src/__tests__/render-system-fold-scene-instances.unit.test.ts +51 -0
  871. package/src/__tests__/render-system-fold.dawn.test.ts +308 -0
  872. package/src/__tests__/render-system-mega.test.ts +1680 -0
  873. package/src/__tests__/render-system-owner-split-contract.test.ts +178 -0
  874. package/src/__tests__/render-system-record-multi-material-textureview.test.ts +698 -0
  875. package/src/__tests__/render-system-record-per-submesh-transparency.test.ts +458 -0
  876. package/src/__tests__/render-system-record.test.ts +1668 -0
  877. package/src/__tests__/render-system-record.unit.test.ts +269 -0
  878. package/src/__tests__/render-system-skin-bg.unit.test.ts +143 -0
  879. package/src/__tests__/renderer-consumer.test-d.ts +18 -0
  880. package/src/__tests__/renderer-health.unit.test.ts +45 -0
  881. package/src/__tests__/renderer-lifecycle.integration.test.ts +42 -0
  882. package/src/__tests__/renderer-recover.unit.test.ts +55 -0
  883. package/src/__tests__/renderer-result.test-d.ts +36 -0
  884. package/src/__tests__/renderer-surface.unit.test.ts +414 -0
  885. package/src/__tests__/renderer-test-utils.ts +56 -0
  886. package/src/__tests__/renderer.test-d.ts +61 -0
  887. package/src/__tests__/resolve-asset-handle-err.test.ts +111 -0
  888. package/src/__tests__/resolve-asset-handle.unit.test.ts +64 -0
  889. package/src/__tests__/resolve-depth-only-view.test.ts +173 -0
  890. package/src/__tests__/resolveName-fallback.test.ts +64 -0
  891. package/src/__tests__/resolveName-null-package.test.ts +38 -0
  892. package/src/__tests__/resolveName-unified-entry.test.ts +65 -0
  893. package/src/__tests__/resolveName.test.ts +64 -0
  894. package/src/__tests__/rhi-null-command-flow.unit.test.ts +69 -0
  895. package/src/__tests__/rhi-null-noop-behavior.unit.test.ts +196 -0
  896. package/src/__tests__/rhi-null-renderer-lifecycle.unit.test.ts +54 -0
  897. package/src/__tests__/roots-to-scene-asset.test.ts +711 -0
  898. package/src/__tests__/roundtrip-primitive.test.ts +351 -0
  899. package/src/__tests__/runtime-authority-scan.unit.test.ts +19 -0
  900. package/src/__tests__/runtime-domain-residue.unit.test.ts +13 -0
  901. package/src/__tests__/scene-bare-guid-refs-instantiate.test.ts +123 -0
  902. package/src/__tests__/scene-equirect-roundtrip.test.ts +120 -0
  903. package/src/__tests__/scene-instance-authoring.integration.test.ts +8 -0
  904. package/src/__tests__/scene-instance-bridge.integration.test.ts +8 -0
  905. package/src/__tests__/scene-instance-component.test.ts +45 -0
  906. package/src/__tests__/scene-instantiate-cycle-runtime.test.ts +66 -0
  907. package/src/__tests__/scene-mount-fixed-point.test.ts +257 -0
  908. package/src/__tests__/scene-mount-roundtrip.test.ts +987 -0
  909. package/src/__tests__/scene-mount-wrapper-roundtrip.test.ts +202 -0
  910. package/src/__tests__/scene-sugar-instantiate.test.ts +324 -0
  911. package/src/__tests__/serialize-mounts-roundtrip.test.ts +533 -0
  912. package/src/__tests__/serialize-scene-asset.test.ts +533 -0
  913. package/src/__tests__/shadow-caster-empty-schema.test.ts +83 -0
  914. package/src/__tests__/shadow-csm-atlas.test.ts +178 -0
  915. package/src/__tests__/shadow-csm-blend.dawn.test.ts +230 -0
  916. package/src/__tests__/shadow-csm-cascade-loadop.test.ts +354 -0
  917. package/src/__tests__/shadow-csm-component.test.ts +284 -0
  918. package/src/__tests__/shadow-csm-extract.test.ts +236 -0
  919. package/src/__tests__/shadow-csm-orthoz.test.ts +137 -0
  920. package/src/__tests__/shadow-csm-runtime-vary.dawn.test.ts +203 -0
  921. package/src/__tests__/shadow-csm-shader.dawn.test.ts +358 -0
  922. package/src/__tests__/shadow-csm-tile-consistency.test.ts +425 -0
  923. package/src/__tests__/shadow-csm-ubo.dawn.test.ts +252 -0
  924. package/src/__tests__/shadow-csm-ubo.test.ts +278 -0
  925. package/src/__tests__/shadow-csm-viewport.browser.test.ts +85 -0
  926. package/src/__tests__/shadow-fields-observable.dawn.test.ts +626 -0
  927. package/src/__tests__/shadow-m1.dawn.test.ts +104 -0
  928. package/src/__tests__/shadow-mesh-ssbo-order.test.ts +48 -0
  929. package/src/__tests__/skin-error-exhaustive.test-d.ts +74 -0
  930. package/src/__tests__/skin-errors.unit.test.ts +10 -0
  931. package/src/__tests__/skin-extract-getarrayview-count.unit.test.ts +25 -0
  932. package/src/__tests__/skin-parented-double-transform.test.ts +268 -0
  933. package/src/__tests__/skylight-lazy-projection.test.ts +380 -0
  934. package/src/__tests__/sparse-tag-scene-roundtrip.test.ts +43 -0
  935. package/src/__tests__/sprite-cullmode-flip.dawn.test.ts +453 -0
  936. package/src/__tests__/sprite-lit-bgl-byte-identical.test.ts +142 -0
  937. package/src/__tests__/sprite-lit-extract-branch.test.ts +117 -0
  938. package/src/__tests__/sprite-lit-pipeline-cache-key.test.ts +123 -0
  939. package/src/__tests__/sprite-param-values.test-d.ts +104 -0
  940. package/src/__tests__/ssao-bgl.test.ts +354 -0
  941. package/src/__tests__/ssao-buffers.test.ts +211 -0
  942. package/src/__tests__/ssao-data.test.ts +121 -0
  943. package/src/__tests__/ssao-errors.test.ts +162 -0
  944. package/src/__tests__/ssao-manifest.test.ts +109 -0
  945. package/src/__tests__/ssao-passes.test.ts +905 -0
  946. package/src/__tests__/ssao-pipelines.test.ts +275 -0
  947. package/src/__tests__/ssao-uniform-layout.test.ts +180 -0
  948. package/src/__tests__/static-rig.integration.test.ts +9 -0
  949. package/src/__tests__/stencil-outline-pixel.dawn.test.ts +303 -0
  950. package/src/__tests__/swap-chain-format.unit.test.ts +115 -0
  951. package/src/__tests__/systems.unit.test.ts +9167 -0
  952. package/src/__tests__/template-game-default-api-contract.test.ts +362 -0
  953. package/src/__tests__/text.unit.test.ts +489 -0
  954. package/src/__tests__/tilemap-childed-despawn.test.ts +462 -0
  955. package/src/__tests__/tilemap-chunk-extract.overhang-bounds.test.ts +310 -0
  956. package/src/__tests__/tilemap-chunk-extract.propagate-order.test.ts +81 -0
  957. package/src/__tests__/tilemap-chunk-extract.terrain-rewrite.unit.test.ts +424 -0
  958. package/src/__tests__/tilemap-chunk-extract.test.ts +232 -0
  959. package/src/__tests__/tilemap-chunk-extract.unit.test.ts +383 -0
  960. package/src/__tests__/tilemap-chunk-y-sort-bench.unit.test.ts +109 -0
  961. package/src/__tests__/tilemap-dirty-rebuild.test.ts +296 -0
  962. package/src/__tests__/tilemap-material-cache.test.ts +132 -0
  963. package/src/__tests__/tilemap-multi-atlas.test.ts +217 -0
  964. package/src/__tests__/tilemap-owner-boundary.unit.test.ts +66 -0
  965. package/src/__tests__/tilemap-region-pack.test.ts +149 -0
  966. package/src/__tests__/tilemap-spawn-flip-pivot.test.ts +270 -0
  967. package/src/__tests__/tilemap-uv-inset.test.ts +201 -0
  968. package/src/__tests__/tilemap-validate.test.ts +201 -0
  969. package/src/__tests__/tileset-asset-validate.test.ts +638 -0
  970. package/src/__tests__/transcode-fallback.unit.test.ts +207 -0
  971. package/src/__tests__/transform-hierarchy-pixel-diff.dawn.test.ts +282 -0
  972. package/src/__tests__/transient-fields-collect.test.ts +210 -0
  973. package/src/__tests__/transient-runtime-behavior.test.ts +227 -0
  974. package/src/__tests__/transitional-authoring.integration.test.ts +7 -0
  975. package/src/__tests__/transparent-sort-tilemap-sprite-interleave.test.ts +227 -0
  976. package/src/__tests__/variant-selection.unit.test.ts +21 -0
  977. package/src/__tests__/vertex-attribute-layout.test.ts +324 -0
  978. package/src/__tests__/video-extract-bindgroup.dawn.test.ts +403 -0
  979. package/src/__tests__/video-loader-consumption.test.ts +86 -0
  980. package/src/__tests__/video-loader-smoke.dawn.test.ts +60 -0
  981. package/src/__tests__/view-ubo-layout.browser.test.ts +161 -0
  982. package/src/__tests__/world-entity-key.test.ts +92 -0
  983. package/src/__tests__/world-scene-despawn.test.ts +132 -0
  984. package/src/__tests__/world-scene-instantiate.test.ts +194 -0
  985. package/src/__tests__/world-scene-nested.test.ts +230 -0
  986. package/src/__tests__/world-scene-override.test.ts +199 -0
  987. package/src/__tests__/zero-compression-zero-load.integration.test.ts +107 -0
  988. package/src/asset-contributions.ts +48 -0
  989. package/src/backend-selection.ts +69 -0
  990. package/src/collect-scene-asset.ts +701 -0
  991. package/src/components/__tests__/camera.test-d.ts +57 -0
  992. package/src/components/__tests__/camera.test.ts +95 -0
  993. package/src/components/__tests__/child-of.test.ts +35 -0
  994. package/src/components/__tests__/sprite-animation.test-d.ts +160 -0
  995. package/src/components/__tests__/sprite-instances.unit.test.ts +108 -0
  996. package/src/components/__tests__/sprite-region-override.test-d.ts +101 -0
  997. package/src/components/__tests__/tile-layer.test-d.ts +33 -0
  998. package/src/components/__tests__/tile-layer.unit.test.ts +125 -0
  999. package/src/components/__tests__/tilemap.test-d.ts +35 -0
  1000. package/src/components/__tests__/transform-vec-schema.test.ts +121 -0
  1001. package/src/create-renderer-env-classify.ts +110 -0
  1002. package/src/createRenderer.ts +49 -0
  1003. package/src/dev-import-transport.ts +97 -0
  1004. package/src/errors/environment.ts +6 -0
  1005. package/src/index.ts +380 -0
  1006. package/src/renderer-host.ts +33 -0
  1007. package/src/scene-instances/__tests__/post-spawn-resolve-joints.unit.test.ts +183 -0
  1008. package/src/scene-instances/index.ts +4 -0
  1009. package/src/scene-utils/mount-override-fold.ts +213 -0
  1010. package/src/sprite-param-values.ts +61 -0
  1011. package/src/systems/__tests__/_xorshift.ts +83 -0
  1012. package/src/systems/__tests__/argsort-in-place.test.ts +155 -0
  1013. package/src/systems/__tests__/transparent-sort.bench.ts +218 -0
  1014. package/src/systems/sprite-animation-tick.ts +302 -0
  1015. package/src/systems/tonemap.ts +68 -0
  1016. package/src/systems/transparent-sort.ts +434 -0
  1017. package/src/tilemap-register-validate.ts +100 -0
@@ -0,0 +1,711 @@
1
+ import * as SceneOwner from '@forgeax/engine-scene';
2
+
3
+ // M2 test -- rootsToSceneAsset forest entry + schema-derived field conversion
4
+ // (plan-strategy D-1/D-2/D-4/D-7/D-8).
5
+ //
6
+ // Coverage (by task):
7
+ // m2-t1: forest multi-root BFS closure + localId renumbering
8
+ // m2-t2: entity / array<entity> -> localId (AC-04/05)
9
+ // m2-t3: shared<> / array<shared<>> -> GUID, incl. fixed-size variant (AC-06/07)
10
+ // m2-t4: root ChildOf strip + cross-root closure refs (AC-09/10)
11
+ // m2-t5: out-of-bounds fail-fast + GUID unresolved fail-fast + exhaustive switch (AC-11/12/17)
12
+
13
+ import { AnimationPlayer } from '@forgeax/engine-animation';
14
+ import type { Asset } from '@forgeax/engine-assets-runtime';
15
+ import {
16
+ AssetRegistry,
17
+ resolveAssetHandle,
18
+ SceneCollectAssetGuidUnresolvedError,
19
+ SceneCollectEntityRefOutOfClosureError,
20
+ } from '@forgeax/engine-assets-runtime';
21
+ import { defineComponent, type EntityHandle, World } from '@forgeax/engine-ecs';
22
+ import { AssetGuid } from '@forgeax/engine-pack/guid';
23
+ import { SceneInstance } from '@forgeax/engine-render';
24
+ import { ChildOf } from '@forgeax/engine-scene';
25
+ import type { Handle, SceneAsset } from '@forgeax/engine-types';
26
+ import { describe, expect, it } from 'vitest';
27
+ import { rootsToSceneAsset, serializeSceneAssetToPack } from '../collect-scene-asset';
28
+ import { makeMockShaderRegistry } from './helpers/mock-shader-registry';
29
+ import { registerSceneComponents } from './helpers/register-scene-components';
30
+
31
+ function linkChildren(
32
+ world: World,
33
+ parent: EntityHandle,
34
+ children: readonly (EntityHandle | number)[],
35
+ ): void {
36
+ registerSceneComponents(world);
37
+ for (const child of children) {
38
+ const result = world.addComponent(child as EntityHandle, {
39
+ component: ChildOf,
40
+ data: { parent },
41
+ });
42
+ if (!result.ok) throw new Error(result.error.code);
43
+ }
44
+ }
45
+
46
+ // ═══════════════════════════════════════════════════════════════════════════════
47
+ // Helpers
48
+ // ═══════════════════════════════════════════════════════════════════════════════
49
+
50
+ function makeRegistry(): AssetRegistry {
51
+ return new AssetRegistry(makeMockShaderRegistry());
52
+ }
53
+
54
+ function makePayload(kind: Asset['kind']): Asset {
55
+ return { kind } as Asset;
56
+ }
57
+
58
+ // A marker component with no entity/shared fields -- safe for entity spawning.
59
+ const Tag = defineComponent('Tag', { value: 'f32' });
60
+
61
+ /** Spawn an entity with a component; return raw id. */
62
+ // biome-ignore lint/suspicious/noExplicitAny: test helper bridging typed component tokens to World.spawn
63
+ function s(w: World, comp: any, data: any): number {
64
+ registerSceneComponents(w, [comp]);
65
+ // biome-ignore lint/suspicious/noExplicitAny: test helper adapter for World.spawn overload
66
+ const r = w.spawn({ component: comp, data } as any);
67
+ if (!r.ok) throw new Error('spawn failed');
68
+ return r.value as number;
69
+ }
70
+
71
+ /** Spawn a tag-only entity (no entity ref fields). */
72
+ function stag(w: World, n: number): number {
73
+ return s(w, Tag, { value: n });
74
+ }
75
+
76
+ // Reusable ref components for entity-type fields.
77
+ const Test_EntityRef = defineComponent('Test_EntityRef', { target: 'entity' });
78
+ const Test_EntityArray = defineComponent('Test_EntityArray', { targets: 'array<entity>' });
79
+
80
+ // ═══════════════════════════════════════════════════════════════════════════════
81
+ // m2-t1: forest multi-root BFS closure + localId renumbering
82
+ // ═══════════════════════════════════════════════════════════════════════════════
83
+
84
+ describe('m2-t1: forest multi-root BFS closure + localId renumbering', () => {
85
+ it('3-root forest yields all entities in the closure', () => {
86
+ const world = new World();
87
+ const reg = makeRegistry();
88
+
89
+ const e0 = stag(world, 0);
90
+ const e1 = stag(world, 1);
91
+ const e2 = stag(world, 2);
92
+ const e3 = stag(world, 3);
93
+ const e4 = stag(world, 4);
94
+ const e5 = stag(world, 5);
95
+
96
+ // Tree A: e0 -> e1 -> e2
97
+ linkChildren(world, e0 as EntityHandle, [e1 as EntityHandle]);
98
+ linkChildren(world, e1 as EntityHandle, [e2 as EntityHandle]);
99
+ // Tree C: e4 -> e5
100
+ linkChildren(world, e4 as EntityHandle, [e5 as EntityHandle]);
101
+
102
+ const result = rootsToSceneAsset(reg, world, [
103
+ e0 as EntityHandle,
104
+ e3 as EntityHandle,
105
+ e4 as EntityHandle,
106
+ ]);
107
+ expect(result.ok).toBe(true);
108
+ if (!result.ok) return;
109
+ expect(result.value.entities).toHaveLength(6);
110
+ });
111
+
112
+ it('ancestor-descendant overlapping roots silently de-duplicate', () => {
113
+ const world = new World();
114
+ const reg = makeRegistry();
115
+ const e0 = stag(world, 0);
116
+ const e1 = stag(world, 1);
117
+ const e2 = stag(world, 2);
118
+ const e3 = stag(world, 3);
119
+ linkChildren(world, e0 as EntityHandle, [e1 as EntityHandle]);
120
+ linkChildren(world, e1 as EntityHandle, [e2 as EntityHandle]);
121
+ linkChildren(world, e2 as EntityHandle, [e3 as EntityHandle]);
122
+
123
+ const result = rootsToSceneAsset(reg, world, [e0 as EntityHandle, e1 as EntityHandle]);
124
+ expect(result.ok).toBe(true);
125
+ if (!result.ok) return;
126
+ expect(result.value.entities).toHaveLength(4);
127
+ });
128
+
129
+ it('localIds are 0..N-1 continuous in BFS order', () => {
130
+ const world = new World();
131
+ const reg = makeRegistry();
132
+ const e0 = stag(world, 0);
133
+ const e1 = stag(world, 1);
134
+ const e2 = stag(world, 2);
135
+ const e3 = stag(world, 3);
136
+ const e4 = stag(world, 4);
137
+ linkChildren(world, e0 as EntityHandle, [e1 as EntityHandle, e2 as EntityHandle]);
138
+ linkChildren(world, e1 as EntityHandle, [e3 as EntityHandle]);
139
+ linkChildren(world, e2 as EntityHandle, [e4 as EntityHandle]);
140
+
141
+ const result = rootsToSceneAsset(reg, world, [e0 as EntityHandle]);
142
+ expect(result.ok).toBe(true);
143
+ if (!result.ok) return;
144
+ const scene = result.value;
145
+ expect(scene.entities).toHaveLength(5);
146
+
147
+ const localIds = scene.entities.map((e) => e.localId as unknown as number);
148
+ expect(localIds).toEqual([0, 1, 2, 3, 4]);
149
+ });
150
+
151
+ it('empty roots produces empty SceneAsset (no error)', () => {
152
+ const world = new World();
153
+ const reg = makeRegistry();
154
+ const result = rootsToSceneAsset(reg, world, []);
155
+ expect(result.ok).toBe(true);
156
+ if (!result.ok) return;
157
+ expect(result.value.entities).toHaveLength(0);
158
+ });
159
+ });
160
+
161
+ // ═══════════════════════════════════════════════════════════════════════════════
162
+ // m2-t2: entity / array<entity> -> localId (AC-04/05)
163
+ // ═══════════════════════════════════════════════════════════════════════════════
164
+
165
+ describe('m2-t2: entity / array<entity> -> localId', () => {
166
+ it('entity field round-trips as localId, not raw handle', () => {
167
+ const world = new World();
168
+ const reg = makeRegistry();
169
+
170
+ const r0 = stag(world, 0);
171
+ const r1 = s(world, Test_EntityRef, { target: r0 });
172
+ linkChildren(world, r0 as EntityHandle, [r1 as EntityHandle]);
173
+
174
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
175
+ expect(result.ok).toBe(true);
176
+ if (!result.ok) return;
177
+ const scene = result.value;
178
+ expect(scene.entities).toHaveLength(2);
179
+
180
+ const e1 = scene.entities[1];
181
+ if (!e1) throw new Error('entity 1 missing');
182
+ const refComps = (e1.components as Record<string, Record<string, unknown>>).Test_EntityRef;
183
+ expect(refComps).toBeDefined();
184
+ if (!refComps) throw new Error('Test_EntityRef missing');
185
+ expect(refComps.target).toBeTypeOf('number');
186
+ expect(refComps.target).toBe(0);
187
+ });
188
+
189
+ it('array<entity> field round-trips each element as localId', () => {
190
+ const world = new World();
191
+ const reg = makeRegistry();
192
+
193
+ const r0 = stag(world, 0);
194
+ const r1 = stag(world, 1);
195
+ const r2 = stag(world, 2);
196
+ linkChildren(world, r0 as EntityHandle, [r1 as EntityHandle, r2 as EntityHandle]);
197
+ registerSceneComponents(world, [Test_EntityArray]);
198
+ world.addComponent(r0 as EntityHandle, {
199
+ component: Test_EntityArray,
200
+ // biome-ignore lint/suspicious/noExplicitAny: entity handle arrays typed as EntityHandle[]; data schema matches component definition
201
+ data: { targets: [r1 as EntityHandle, r2 as EntityHandle] } as any,
202
+ });
203
+
204
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
205
+ expect(result.ok).toBe(true);
206
+ if (!result.ok) return;
207
+ const scene = result.value;
208
+ expect(scene.entities).toHaveLength(3);
209
+
210
+ const rootEnt = scene.entities[0];
211
+ if (!rootEnt) throw new Error('entity 0 missing');
212
+ const elComps = (rootEnt.components as Record<string, Record<string, unknown>>)
213
+ .Test_EntityArray;
214
+ expect(elComps).toBeDefined();
215
+ if (!elComps) throw new Error('Test_EntityArray missing');
216
+ const targetsArr = elComps.targets as unknown[];
217
+ expect(Array.isArray(targetsArr)).toBe(true);
218
+ expect(targetsArr).toEqual([1, 2]);
219
+ });
220
+ });
221
+
222
+ // ═══════════════════════════════════════════════════════════════════════════════
223
+ // m2-t3: shared<> / array<shared<>> -> GUID, incl. fixed-size variant (AC-06/07)
224
+ // ═══════════════════════════════════════════════════════════════════════════════
225
+
226
+ describe('m2-t3: shared<> / array<shared<>> -> GUID', () => {
227
+ it('shared<> scalar field resolves to GUID string (no handleToGuid param)', () => {
228
+ const assetPayload = makePayload('skeleton');
229
+ const reg = makeRegistry();
230
+ const guid = AssetGuid.parse('d0000000-d000-0000-0000-000000000001');
231
+ if (!guid.ok) throw new Error('guid parse failed');
232
+ reg.catalog(guid.value, assetPayload);
233
+
234
+ const world = new World();
235
+ const handle = world.allocSharedRef('', assetPayload);
236
+
237
+ const Test_HasShared = defineComponent('Test_HasShared', {
238
+ ref: { type: 'shared<TestAsset>' },
239
+ // biome-ignore lint/suspicious/noExplicitAny: defineComponent generic constraint is too strict for complex schema types like shared<>
240
+ } as any);
241
+
242
+ const r0 = s(world, Test_HasShared, {
243
+ ref: handle,
244
+ // biome-ignore lint/suspicious/noExplicitAny: Handle<> branded type is not directly assignable to component data field for schema 'shared<>'
245
+ } as any);
246
+
247
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
248
+ expect(result.ok).toBe(true);
249
+ if (!result.ok) return;
250
+ const scene = result.value;
251
+ const ent0 = scene.entities[0];
252
+ if (!ent0) throw new Error('entity 0 missing');
253
+ const comps = (ent0.components as Record<string, Record<string, unknown>>).Test_HasShared;
254
+ expect(comps).toBeDefined();
255
+ if (!comps) throw new Error('Test_HasShared missing');
256
+ expect(comps.ref).toBeTypeOf('string');
257
+ expect(comps.ref).toBe(AssetGuid.format(guid.value));
258
+ });
259
+
260
+ it('array<shared<>> field resolves each element to GUID', () => {
261
+ const assetA = makePayload('skeleton');
262
+ const assetB = makePayload('equirect');
263
+ const reg = makeRegistry();
264
+ const guidA = AssetGuid.parse('d0000000-d000-0000-0000-000000000001');
265
+ const guidB = AssetGuid.parse('e0000000-e000-0000-0000-000000000001');
266
+ if (!guidA.ok || !guidB.ok) throw new Error('guid parse failed');
267
+ reg.catalog(guidA.value, assetA);
268
+ reg.catalog(guidB.value, assetB);
269
+
270
+ const world = new World();
271
+ const hA = world.allocSharedRef('', assetA);
272
+ const hB = world.allocSharedRef('', assetB);
273
+
274
+ const Test_HasSharedArray = defineComponent('Test_HasSharedArray', {
275
+ sources: { type: 'array<shared<TestAsset>>' },
276
+ // biome-ignore lint/suspicious/noExplicitAny: defineComponent constraint is too strict for complex schema types like array<shared<>>
277
+ } as any);
278
+
279
+ const r0 = s(world, Test_HasSharedArray, {
280
+ // biome-ignore lint/suspicious/noExplicitAny: Handle<> branded types require casting for component data assignment
281
+ sources: [hA as any, hB as any],
282
+ // biome-ignore lint/suspicious/noExplicitAny: test helper adapter for component spawn
283
+ } as any);
284
+
285
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
286
+ expect(result.ok).toBe(true);
287
+ if (!result.ok) return;
288
+ const scene = result.value;
289
+ const ent0 = scene.entities[0];
290
+ if (!ent0) throw new Error('entity 0 missing');
291
+ const comps = (ent0.components as Record<string, Record<string, unknown>>).Test_HasSharedArray;
292
+ expect(comps).toBeDefined();
293
+ if (!comps) throw new Error('Test_HasSharedArray missing');
294
+ const sources = comps.sources as unknown[];
295
+ expect(Array.isArray(sources)).toBe(true);
296
+ expect(sources).toHaveLength(2);
297
+ expect(sources[0]).toBe(AssetGuid.format(guidA.value));
298
+ expect(sources[1]).toBe(AssetGuid.format(guidB.value));
299
+ });
300
+
301
+ it('EMPTY array<shared<>> collects WITHOUT throwing (default-material fallback)', () => {
302
+ // Regression: the editor used to auto-mint a synthetic default MaterialAsset
303
+ // (allocSharedRef WITHOUT catalog) for MeshFilter-only entities, so on save
304
+ // this collect path hit `_guidForAsset === undefined` and threw
305
+ // SceneCollectAssetGuidUnresolvedError -> the whole save aborted. The fix
306
+ // attaches an EMPTY `materials: []` instead (engine's own default-material
307
+ // fallback paints it grey). An empty shared-array must serialize to `[]` with
308
+ // ZERO _guidForAsset calls -> no throw, save succeeds.
309
+ const reg = makeRegistry();
310
+ const world = new World();
311
+
312
+ const Test_HasSharedArray = defineComponent('Test_EmptyMaterials', {
313
+ sources: { type: 'array<shared<TestAsset>>' },
314
+ // biome-ignore lint/suspicious/noExplicitAny: defineComponent constraint is too strict for array<shared<>>
315
+ } as any);
316
+
317
+ // Empty array -- exactly what MeshRenderer{materials:[]} produces.
318
+ const r0 = s(world, Test_HasSharedArray, {
319
+ sources: [],
320
+ // biome-ignore lint/suspicious/noExplicitAny: test helper adapter for component spawn
321
+ } as any);
322
+
323
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
324
+ expect(result.ok).toBe(true);
325
+ if (!result.ok) return;
326
+ const ent0 = result.value.entities[0];
327
+ if (!ent0) throw new Error('entity 0 missing');
328
+ const comps = (ent0.components as Record<string, Record<string, unknown>>).Test_EmptyMaterials;
329
+ // An empty shared array serializes to [] (or the component is omitted when it
330
+ // has no other populated fields) -- either way, no unresolved-GUID throw.
331
+ if (comps !== undefined) {
332
+ expect(comps.sources as unknown[]).toEqual([]);
333
+ }
334
+ });
335
+
336
+ it('anti-vacuous: a NON-cataloged handle in the shared array DOES throw', () => {
337
+ // Guards the test above from passing vacuously: a shared-array element whose
338
+ // handle resolves to an UNcataloged asset (the old synthetic-mint situation)
339
+ // must still fail-fast with SceneCollectAssetGuidUnresolvedError.
340
+ const reg = makeRegistry();
341
+ const world = new World();
342
+ const uncataloged = makePayload('material');
343
+ // allocSharedRef WITHOUT reg.catalog(...) -- the exact old bug shape.
344
+ const h = world.allocSharedRef('', uncataloged);
345
+
346
+ const Test_HasSharedArray = defineComponent('Test_UncatMaterials', {
347
+ sources: { type: 'array<shared<TestAsset>>' },
348
+ // biome-ignore lint/suspicious/noExplicitAny: defineComponent constraint is too strict for array<shared<>>
349
+ } as any);
350
+ const r0 = s(world, Test_HasSharedArray, {
351
+ // biome-ignore lint/suspicious/noExplicitAny: Handle<> branded types require casting
352
+ sources: [h as any],
353
+ // biome-ignore lint/suspicious/noExplicitAny: test helper adapter for component spawn
354
+ } as any);
355
+
356
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
357
+ expect(result.ok).toBe(false);
358
+ if (!result.ok) {
359
+ expect(result.error).toBeInstanceOf(SceneCollectAssetGuidUnresolvedError);
360
+ }
361
+ });
362
+
363
+ it('fixed-size array<shared<T>,N> schema variant matches startsWith classifier', () => {
364
+ // Verify that classifyFieldSchema startsWith('array<shared<')
365
+ // covers fixed-size 'array<shared<T>,N>' variants (R-1 / D-2).
366
+ expect('array<shared<TestAsset>, 3>'.startsWith('array<shared<')).toBe(true);
367
+ expect('array<shared<TestAsset>>'.startsWith('array<shared<')).toBe(true);
368
+ expect('array<shared<>>'.startsWith('array<shared<')).toBe(true);
369
+ });
370
+
371
+ // NULL sentinel handle 0 -- an UNSET shared<T> field defaults to slot 0
372
+ // (ECS three-layer default). world.ts retain arms treat `!== 0` as the
373
+ // active-slot guard, so slot 0 is the documented "no asset here" sentinel.
374
+ // collect must NOT try to resolve it to a GUID (there is none) -- otherwise
375
+ // every entity carrying an unset shared field aborts the whole scene
376
+ // serialize (regression: feedback 2026-07-08-rootstosceneasset).
377
+ it('scalar shared<> field left at NULL sentinel (handle 0) is OMITTED, not an error', () => {
378
+ const reg = makeRegistry();
379
+ const world = new World();
380
+
381
+ const Test_UnsetScalar = defineComponent('Test_UnsetScalarShared', {
382
+ ref: { type: 'shared<TestAsset>' },
383
+ tag: { type: 'f32', default: 7 },
384
+ // biome-ignore lint/suspicious/noExplicitAny: defineComponent constraint is too strict for shared<>
385
+ } as any);
386
+
387
+ // Spawn WITHOUT setting `ref` -- it defaults to slot 0 (NULL sentinel).
388
+ const r0 = s(world, Test_UnsetScalar, { tag: 42 });
389
+
390
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
391
+ expect(result.ok).toBe(true);
392
+ if (!result.ok) return;
393
+ const ent0 = result.value.entities[0];
394
+ if (!ent0) throw new Error('entity 0 missing');
395
+ const comps = (ent0.components as Record<string, Record<string, unknown>>)
396
+ .Test_UnsetScalarShared;
397
+ if (!comps) throw new Error('Test_UnsetScalarShared missing');
398
+ // The unset shared scalar is omitted; other fields survive.
399
+ expect(comps.ref).toBeUndefined();
400
+ expect(comps.tag).toBe(42);
401
+ });
402
+
403
+ it('array<shared<T>,N> with NULL sentinel slots preserves POSITION (does not compact)', () => {
404
+ // Positional SoA (e.g. AnimationPlayer.clips = [h, 0, 0, 0]) -- a slot may
405
+ // be 0 while its paired arrays (times/weights) carry per-slot data at the
406
+ // same index. collect must keep the slot as numeric 0, not drop it, or the
407
+ // arrays desynchronize on reload.
408
+ const assetA = makePayload('skeleton');
409
+ const reg = makeRegistry();
410
+ const guidA = AssetGuid.parse('d0000000-d000-0000-0000-000000000009');
411
+ if (!guidA.ok) throw new Error('guid parse failed');
412
+ reg.catalog(guidA.value, assetA);
413
+
414
+ const world = new World();
415
+ const hA = world.allocSharedRef('', assetA);
416
+
417
+ // Fixed-size-4 array; only slot 2 is populated -> [0, 0, hA, 0].
418
+ const Test_SparseArray = defineComponent('Test_SparseSharedArray', {
419
+ slots: { type: 'array<shared<TestAsset>, 4>' },
420
+ // biome-ignore lint/suspicious/noExplicitAny: defineComponent constraint is too strict for array<shared<>,N>
421
+ } as any);
422
+
423
+ const r0 = s(world, Test_SparseArray, {
424
+ // biome-ignore lint/suspicious/noExplicitAny: short-prefix write pads tail with sentinel 0
425
+ slots: [0, 0, hA as any, 0],
426
+ // biome-ignore lint/suspicious/noExplicitAny: test helper adapter for component spawn
427
+ } as any);
428
+
429
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
430
+ expect(result.ok).toBe(true);
431
+ if (!result.ok) return;
432
+ const ent0 = result.value.entities[0];
433
+ if (!ent0) throw new Error('entity 0 missing');
434
+ const comps = (ent0.components as Record<string, Record<string, unknown>>)
435
+ .Test_SparseSharedArray;
436
+ if (!comps) throw new Error('Test_SparseSharedArray missing');
437
+ const slots = comps.slots as unknown[];
438
+ expect(Array.isArray(slots)).toBe(true);
439
+ // Position preserved: 4 slots, GUID only at index 2, sentinel 0 elsewhere.
440
+ expect(slots).toHaveLength(4);
441
+ expect(slots[0]).toBe(0);
442
+ expect(slots[1]).toBe(0);
443
+ expect(slots[2]).toBe(AssetGuid.format(guidA.value));
444
+ expect(slots[3]).toBe(0);
445
+ });
446
+ });
447
+
448
+ // ═══════════════════════════════════════════════════════════════════════════════
449
+ // m2-t4: root ChildOf strip + cross-root closure refs (AC-09/10)
450
+ // ═══════════════════════════════════════════════════════════════════════════════
451
+
452
+ describe('m2-t4: root ChildOf strip + cross-root closure refs', () => {
453
+ it('root entity ChildOf is stripped from output', () => {
454
+ const world = new World();
455
+ const reg = makeRegistry();
456
+ const parent = stag(world, 99);
457
+ const r0 = s(world, ChildOf, { parent: parent as EntityHandle });
458
+
459
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
460
+ expect(result.ok).toBe(true);
461
+ if (!result.ok) return;
462
+ const scene = result.value;
463
+ expect(scene.entities).toHaveLength(1);
464
+
465
+ const ent0 = scene.entities[0];
466
+ if (!ent0) throw new Error('entity missing');
467
+ const comps = ent0.components as Record<string, Record<string, unknown>>;
468
+ expect(comps.ChildOf).toBeUndefined();
469
+ });
470
+
471
+ it('cross-root but within-closure entity ref resolves to localId', () => {
472
+ const world = new World();
473
+ const reg = makeRegistry();
474
+ const aRoot = stag(world, 0);
475
+ const bRoot = stag(world, 1);
476
+ const aChild = s(world, Test_EntityRef, { target: bRoot });
477
+
478
+ linkChildren(world, aRoot as EntityHandle, [aChild as EntityHandle]);
479
+
480
+ const result = rootsToSceneAsset(reg, world, [aRoot as EntityHandle, bRoot as EntityHandle]);
481
+ expect(result.ok).toBe(true);
482
+ if (!result.ok) return;
483
+ const scene = result.value;
484
+ expect(scene.entities).toHaveLength(3);
485
+
486
+ const childEntity = scene.entities.find(
487
+ (e) =>
488
+ (e.components as Record<string, Record<string, unknown>>).Test_EntityRef?.target !==
489
+ undefined,
490
+ );
491
+ expect(childEntity).toBeDefined();
492
+ if (!childEntity) throw new Error('child entity missing');
493
+ const refVal = (childEntity.components as Record<string, Record<string, unknown>>)
494
+ .Test_EntityRef;
495
+ if (!refVal) throw new Error('Test_EntityRef missing');
496
+ expect(typeof refVal.target).toBe('number');
497
+ expect(refVal.target as number).toBeGreaterThanOrEqual(0);
498
+ expect(refVal.target as number).toBeLessThan(3);
499
+ });
500
+ });
501
+
502
+ // ═══════════════════════════════════════════════════════════════════════════════
503
+ // m2-t5: out-of-bounds + GUID unresolved fail-fast + exhaustive switch (AC-11/12/17)
504
+ // ═══════════════════════════════════════════════════════════════════════════════
505
+
506
+ describe('m2-t5: fail-fast error paths + exhaustive switch', () => {
507
+ it('entity ref outside closure -> err with code scene-collect-entity-ref-out-of-closure', () => {
508
+ const world = new World();
509
+ const reg = makeRegistry();
510
+ const external = stag(world, 99);
511
+ const r0 = s(world, Test_EntityRef, { target: external });
512
+
513
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
514
+ expect(result.ok).toBe(false);
515
+
516
+ if (!result.ok) {
517
+ expect(result.error.code).toBe('scene-collect-entity-ref-out-of-closure');
518
+ const err = result.error;
519
+ if (err instanceof SceneCollectEntityRefOutOfClosureError) {
520
+ expect(err.detail.entity).toBeTypeOf('number');
521
+ expect(err.detail.field).toBe('target');
522
+ expect(err.detail.target).toBeTypeOf('number');
523
+ }
524
+ }
525
+ });
526
+
527
+ it('GUID unresolved -> err with code scene-collect-asset-guid-unresolved', () => {
528
+ const assetPayload = makePayload('skeleton');
529
+ const reg = makeRegistry();
530
+ const world = new World();
531
+ const handle = world.allocSharedRef('', assetPayload);
532
+
533
+ const Test_SharedMiss = defineComponent('Test_SharedMiss', {
534
+ src: { type: 'shared<TestAsset>' },
535
+ // biome-ignore lint/suspicious/noExplicitAny: defineComponent constraint too strict for complex schema
536
+ } as any);
537
+
538
+ const r0 = s(world, Test_SharedMiss, {
539
+ // biome-ignore lint/suspicious/noExplicitAny: Handle branded type not assignable to component data
540
+ src: handle as any,
541
+ });
542
+
543
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
544
+ expect(result.ok).toBe(false);
545
+
546
+ if (!result.ok) {
547
+ expect(result.error.code).toBe('scene-collect-asset-guid-unresolved');
548
+ const err = result.error;
549
+ if (err instanceof SceneCollectAssetGuidUnresolvedError) {
550
+ expect(err.detail.field).toBe('src');
551
+ expect(err.detail.handle).toBeTypeOf('number');
552
+ }
553
+ }
554
+ });
555
+
556
+ it('exhaustive switch consumer path (AC-17): no default branch compiles', () => {
557
+ const world = new World();
558
+ const reg = makeRegistry();
559
+ const external = stag(world, 99);
560
+ const r0 = s(world, Test_EntityRef, { target: external });
561
+
562
+ const result = rootsToSceneAsset(reg, world, [r0 as EntityHandle]);
563
+ expect(result.ok).toBe(false);
564
+
565
+ if (!result.ok) {
566
+ switch (result.error.code) {
567
+ case 'scene-collect-entity-ref-out-of-closure': {
568
+ expect(typeof result.error.detail.entity).toBe('number');
569
+ break;
570
+ }
571
+ case 'scene-collect-asset-guid-unresolved': {
572
+ expect(typeof result.error.detail.handle).toBe('number');
573
+ break;
574
+ }
575
+ }
576
+ }
577
+ });
578
+ });
579
+
580
+ // ═══════════════════════════════════════════════════════════════════════════════
581
+ // w19 — AC-07: end-to-end round-trip value equivalence
582
+ //
583
+ // The runtime synthesis of D-2 (GUID domain closed in assets-runtime) + D-3
584
+ // (collect fold) + D-4 (add-or-patch value gate). Mount a GLB-like child scene
585
+ // under a parent, addComponent(AnimationPlayer, { clips: [clipHandle] }) on a
586
+ // live member, save (rootsToSceneAsset + serialize), reopen (parse + instantiate),
587
+ // and assert the reopened member holds AnimationPlayer whose clip is a VALID
588
+ // handle that resolveAssetHandle retrieves to the SAME clip asset (value
589
+ // equivalence, not merely length/presence).
590
+ // ═══════════════════════════════════════════════════════════════════════════════
591
+
592
+ const W19_CLIP = 'aa19aa19-1919-4191-8191-191919191919';
593
+ const W19_CHILD = 'bb19bb19-1919-4191-8191-191919191919';
594
+ const W19_PARENT = 'cc19cc19-1919-4191-8191-191919191919';
595
+ const W19_SAVED = 'dd19dd19-1919-4191-8191-191919191919';
596
+
597
+ function pgc(s: string): AssetGuid {
598
+ const r = AssetGuid.parse(s);
599
+ if (!r.ok) throw new Error(`bad GUID: ${s}`);
600
+ return r.value;
601
+ }
602
+
603
+ function accessParse(reg: AssetRegistry) {
604
+ const internal = reg as unknown as {
605
+ parseAssetPayload(kind: string, payload: Record<string, unknown>, refs?: string[]): unknown;
606
+ };
607
+ return (
608
+ kind: string,
609
+ payload: Record<string, unknown>,
610
+ refs?: readonly string[] | undefined,
611
+ ): SceneAsset => {
612
+ const r = internal.parseAssetPayload(kind, payload, refs as string[] | undefined);
613
+ if (r === undefined) throw new Error('parse returned undefined');
614
+ return r as SceneAsset;
615
+ };
616
+ }
617
+
618
+ function findMember(w: World, root: EntityHandle): EntityHandle {
619
+ for (const c of w.iterDescendants(root)) {
620
+ if (c === root) continue;
621
+ if (!w.get(c, SceneInstance).ok) continue;
622
+ const st = SceneOwner.worldGetSceneInstanceState(w, c);
623
+ if (!st.ok) continue;
624
+ for (const [member] of st.value.entityToLocalId) return member;
625
+ }
626
+ throw new Error('no mounted member');
627
+ }
628
+
629
+ describe('w19 — end-to-end round-trip value equivalence (AC-07)', () => {
630
+ it('mount + addComponent(AnimationPlayer) survives save/reopen with value-equal clip', () => {
631
+ const reg = makeRegistry();
632
+ const w = new World();
633
+ registerSceneComponents(w, [AnimationPlayer]);
634
+
635
+ // Catalogue the clip asset that the AnimationPlayer will reference.
636
+ const clipAsset = { kind: 'animation-clip', duration: 1.5 } as unknown as Asset;
637
+ reg.catalog(pgc(W19_CLIP), clipAsset);
638
+
639
+ // Child (GLB-like) scene + parent scene that mounts it.
640
+ const child: SceneAsset = {
641
+ kind: 'scene',
642
+ entities: [{ localId: 0 as never, components: { Transform: { pos: [1, 0, 0] } } }],
643
+ };
644
+ reg.catalog(pgc(W19_CHILD), child as Asset);
645
+ const parent: SceneAsset = {
646
+ kind: 'scene',
647
+ entities: [{ localId: 0 as never, components: { Transform: { pos: [0, 0, 0] } } }],
648
+ mounts: [{ localId: 1 as never, source: W19_CHILD, memberFirst: 2 as never, memberCount: 1 }],
649
+ };
650
+ reg.catalog(pgc(W19_PARENT), parent as Asset);
651
+
652
+ const inst = reg.instantiate(
653
+ w.allocSharedRef('SceneAsset', parent) as Handle<'SceneAsset', 'shared'>,
654
+ w,
655
+ );
656
+ expect(inst.ok).toBe(true);
657
+ if (!inst.ok) return;
658
+ const root = inst.value;
659
+
660
+ // addComponent AnimationPlayer with a handle pointing at the catalogued clip.
661
+ const clipH = w.allocSharedRef('AnimationClip', clipAsset);
662
+ const member = findMember(w, root);
663
+ const add = w.addComponent(member, {
664
+ component: AnimationPlayer,
665
+ data: { clips: [clipH] } as never,
666
+ });
667
+ expect(add.ok).toBe(true);
668
+
669
+ // Save: collect (fold) + serialize.
670
+ const collect = rootsToSceneAsset(reg, w, [root]);
671
+ expect(collect.ok).toBe(true);
672
+ if (!collect.ok) return;
673
+ const ser = serializeSceneAssetToPack(collect.value, w.components.entries(), W19_SAVED);
674
+ expect(ser.ok).toBe(true);
675
+ if (!ser.ok) return;
676
+
677
+ // Reopen: parse + catalog + instantiate.
678
+ const assets = ser.value.assets as Array<Record<string, unknown>>;
679
+ const a0 = assets[0];
680
+ if (!a0) throw new Error('no asset');
681
+ const parsed = accessParse(reg)(
682
+ 'scene',
683
+ a0.payload as Record<string, unknown>,
684
+ a0.refs as readonly string[] | undefined,
685
+ );
686
+ reg.catalog(pgc(W19_SAVED), parsed as Asset);
687
+ const inst2 = reg.instantiate(
688
+ w.allocSharedRef('SceneAsset', parsed) as Handle<'SceneAsset', 'shared'>,
689
+ w,
690
+ );
691
+ expect(inst2.ok).toBe(true);
692
+ if (!inst2.ok) return;
693
+ const root2 = inst2.value;
694
+
695
+ // Assert: reopened member holds AnimationPlayer with a valid, value-equal clip.
696
+ const member2 = findMember(w, root2);
697
+ const apRes = w.get(member2, AnimationPlayer);
698
+ expect(apRes.ok).toBe(true);
699
+ if (!apRes.ok) return;
700
+ const clips2 = Array.from((apRes.value as { clips: ArrayLike<number> }).clips);
701
+ // slot 0 is a valid (non-zero) handle.
702
+ expect(clips2[0]).toBeGreaterThan(0);
703
+ // resolveAssetHandle retrieves the SAME clip asset (value equivalence).
704
+ const resolved = resolveAssetHandle(w, clips2[0] as unknown as Handle<string, 'shared'>);
705
+ expect(resolved.ok).toBe(true);
706
+ if (!resolved.ok) return;
707
+ const retrieved = resolved.value as unknown as { kind: string; duration: number };
708
+ expect(retrieved.kind).toBe('animation-clip');
709
+ expect(retrieved.duration).toBe(1.5);
710
+ });
711
+ });