@forgeax/engine-render 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 (891) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +647 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/__tests__/authoring-path.unit.test.d.ts +2 -0
  5. package/dist/__tests__/authoring-path.unit.test.d.ts.map +1 -0
  6. package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts +2 -0
  7. package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts.map +1 -0
  8. package/dist/__tests__/callback-inference.test-d.d.ts +2 -0
  9. package/dist/__tests__/callback-inference.test-d.d.ts.map +1 -0
  10. package/dist/__tests__/cluster-binner.test.d.ts +2 -0
  11. package/dist/__tests__/cluster-binner.test.d.ts.map +1 -0
  12. package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts +2 -0
  13. package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts.map +1 -0
  14. package/dist/__tests__/construct-renderer-identity.unit.test.d.ts +2 -0
  15. package/dist/__tests__/construct-renderer-identity.unit.test.d.ts.map +1 -0
  16. package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts +2 -0
  17. package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts.map +1 -0
  18. package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts +2 -0
  19. package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts.map +1 -0
  20. package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts +2 -0
  21. package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts.map +1 -0
  22. package/dist/__tests__/direct-light-snapshot.unit.test.d.ts +2 -0
  23. package/dist/__tests__/direct-light-snapshot.unit.test.d.ts.map +1 -0
  24. package/dist/__tests__/factory-contract.integration.test.d.ts +2 -0
  25. package/dist/__tests__/factory-contract.integration.test.d.ts.map +1 -0
  26. package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts +2 -0
  27. package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts.map +1 -0
  28. package/dist/__tests__/frame-observation.contract.test.d.ts +2 -0
  29. package/dist/__tests__/frame-observation.contract.test.d.ts.map +1 -0
  30. package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts +2 -0
  31. package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts.map +1 -0
  32. package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts +2 -0
  33. package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts.map +1 -0
  34. package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts +6 -0
  35. package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts.map +1 -0
  36. package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts +2 -0
  37. package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts.map +1 -0
  38. package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts +2 -0
  39. package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts.map +1 -0
  40. package/dist/__tests__/gpu-driven-production.integration.test.d.ts +2 -0
  41. package/dist/__tests__/gpu-driven-production.integration.test.d.ts.map +1 -0
  42. package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts +2 -0
  43. package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts.map +1 -0
  44. package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts +18 -0
  45. package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts.map +1 -0
  46. package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts +2 -0
  47. package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts.map +1 -0
  48. package/dist/__tests__/gpu-driven-view-reference.d.ts +15 -0
  49. package/dist/__tests__/gpu-driven-view-reference.d.ts.map +1 -0
  50. package/dist/__tests__/gpu-driven-view.browser.test.d.ts +2 -0
  51. package/dist/__tests__/gpu-driven-view.browser.test.d.ts.map +1 -0
  52. package/dist/__tests__/gpu-driven-view.dawn.test.d.ts +2 -0
  53. package/dist/__tests__/gpu-driven-view.dawn.test.d.ts.map +1 -0
  54. package/dist/__tests__/gpu-driven-view.unit.test.d.ts +2 -0
  55. package/dist/__tests__/gpu-driven-view.unit.test.d.ts.map +1 -0
  56. package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts +2 -0
  57. package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts.map +1 -0
  58. package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts +7 -0
  59. package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts.map +1 -0
  60. package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts +2 -0
  61. package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts.map +1 -0
  62. package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts +2 -0
  63. package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts.map +1 -0
  64. package/dist/__tests__/gpu-scene-schema.unit.test.d.ts +2 -0
  65. package/dist/__tests__/gpu-scene-schema.unit.test.d.ts.map +1 -0
  66. package/dist/__tests__/gpu-scene.dawn.test.d.ts +2 -0
  67. package/dist/__tests__/gpu-scene.dawn.test.d.ts.map +1 -0
  68. package/dist/__tests__/gpu-scene.unit.test.d.ts +2 -0
  69. package/dist/__tests__/gpu-scene.unit.test.d.ts.map +1 -0
  70. package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts +2 -0
  71. package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts.map +1 -0
  72. package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts +2 -0
  73. package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts.map +1 -0
  74. package/dist/__tests__/injection-kind-owner.test-d.d.ts +2 -0
  75. package/dist/__tests__/injection-kind-owner.test-d.d.ts.map +1 -0
  76. package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts +2 -0
  77. package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts.map +1 -0
  78. package/dist/__tests__/light-buffer-layout.unit.test.d.ts +2 -0
  79. package/dist/__tests__/light-buffer-layout.unit.test.d.ts.map +1 -0
  80. package/dist/__tests__/material-contract-inventory.unit.test.d.ts +2 -0
  81. package/dist/__tests__/material-contract-inventory.unit.test.d.ts.map +1 -0
  82. package/dist/__tests__/material-cooked-projection.unit.test.d.ts +2 -0
  83. package/dist/__tests__/material-cooked-projection.unit.test.d.ts.map +1 -0
  84. package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts +2 -0
  85. package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts.map +1 -0
  86. package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts +2 -0
  87. package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts.map +1 -0
  88. package/dist/__tests__/material-stride-surface.unit.test.d.ts +2 -0
  89. package/dist/__tests__/material-stride-surface.unit.test.d.ts.map +1 -0
  90. package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts +2 -0
  91. package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts.map +1 -0
  92. package/dist/__tests__/mesh-material-bindings.unit.test.d.ts +2 -0
  93. package/dist/__tests__/mesh-material-bindings.unit.test.d.ts.map +1 -0
  94. package/dist/__tests__/mesh-stride-surface.unit.test.d.ts +2 -0
  95. package/dist/__tests__/mesh-stride-surface.unit.test.d.ts.map +1 -0
  96. package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts +2 -0
  97. package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts.map +1 -0
  98. package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts +2 -0
  99. package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts.map +1 -0
  100. package/dist/__tests__/morph-feature-plan.unit.test.d.ts +2 -0
  101. package/dist/__tests__/morph-feature-plan.unit.test.d.ts.map +1 -0
  102. package/dist/__tests__/morph-visual-evidence.integration.test.d.ts +2 -0
  103. package/dist/__tests__/morph-visual-evidence.integration.test.d.ts.map +1 -0
  104. package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts +2 -0
  105. package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts.map +1 -0
  106. package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts +2 -0
  107. package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts.map +1 -0
  108. package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts +2 -0
  109. package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts.map +1 -0
  110. package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts +2 -0
  111. package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts.map +1 -0
  112. package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts +2 -0
  113. package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts.map +1 -0
  114. package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts +2 -0
  115. package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts.map +1 -0
  116. package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts +2 -0
  117. package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts.map +1 -0
  118. package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts +2 -0
  119. package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts.map +1 -0
  120. package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts +2 -0
  121. package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts.map +1 -0
  122. package/dist/__tests__/prepared-graphics-store.unit.test.d.ts +2 -0
  123. package/dist/__tests__/prepared-graphics-store.unit.test.d.ts.map +1 -0
  124. package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts +2 -0
  125. package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts.map +1 -0
  126. package/dist/__tests__/profiler-default-off.test.d.ts +2 -0
  127. package/dist/__tests__/profiler-default-off.test.d.ts.map +1 -0
  128. package/dist/__tests__/profiler-phase-catalog.test.d.ts +2 -0
  129. package/dist/__tests__/profiler-phase-catalog.test.d.ts.map +1 -0
  130. package/dist/__tests__/profiler-phase-integration.test.d.ts +2 -0
  131. package/dist/__tests__/profiler-phase-integration.test.d.ts.map +1 -0
  132. package/dist/__tests__/profiler-phase-token.test.d.ts +2 -0
  133. package/dist/__tests__/profiler-phase-token.test.d.ts.map +1 -0
  134. package/dist/__tests__/public-surface.test-d.d.ts +2 -0
  135. package/dist/__tests__/public-surface.test-d.d.ts.map +1 -0
  136. package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts +2 -0
  137. package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts.map +1 -0
  138. package/dist/__tests__/render-error-code-owner.test-d.d.ts +2 -0
  139. package/dist/__tests__/render-error-code-owner.test-d.d.ts.map +1 -0
  140. package/dist/__tests__/render-error-detail-ssot.test-d.d.ts +2 -0
  141. package/dist/__tests__/render-error-detail-ssot.test-d.d.ts.map +1 -0
  142. package/dist/__tests__/render-error-exhaustive.test-d.d.ts +2 -0
  143. package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +1 -0
  144. package/dist/__tests__/render-feature-assembly.test-d.d.ts +2 -0
  145. package/dist/__tests__/render-feature-assembly.test-d.d.ts.map +1 -0
  146. package/dist/__tests__/render-feature-context.test-d.d.ts +2 -0
  147. package/dist/__tests__/render-feature-context.test-d.d.ts.map +1 -0
  148. package/dist/__tests__/render-feature-contract.test-d.d.ts +2 -0
  149. package/dist/__tests__/render-feature-contract.test-d.d.ts.map +1 -0
  150. package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts +2 -0
  151. package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts.map +1 -0
  152. package/dist/__tests__/render-feature-docs.unit.test.d.ts +2 -0
  153. package/dist/__tests__/render-feature-docs.unit.test.d.ts.map +1 -0
  154. package/dist/__tests__/render-feature-errors.unit.test.d.ts +2 -0
  155. package/dist/__tests__/render-feature-errors.unit.test.d.ts.map +1 -0
  156. package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts +2 -0
  157. package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts.map +1 -0
  158. package/dist/__tests__/render-feature-plan.test-d.d.ts +2 -0
  159. package/dist/__tests__/render-feature-plan.test-d.d.ts.map +1 -0
  160. package/dist/__tests__/render-feature-plan.unit.test.d.ts +2 -0
  161. package/dist/__tests__/render-feature-plan.unit.test.d.ts.map +1 -0
  162. package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts +2 -0
  163. package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts.map +1 -0
  164. package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts +2 -0
  165. package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts.map +1 -0
  166. package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts +2 -0
  167. package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts.map +1 -0
  168. package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts +2 -0
  169. package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts.map +1 -0
  170. package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts +2 -0
  171. package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts.map +1 -0
  172. package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts +2 -0
  173. package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts.map +1 -0
  174. package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts +2 -0
  175. package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts.map +1 -0
  176. package/dist/__tests__/render-feature-public-surface.test-d.d.ts +2 -0
  177. package/dist/__tests__/render-feature-public-surface.test-d.d.ts.map +1 -0
  178. package/dist/__tests__/render-feature-retry.unit.test.d.ts +2 -0
  179. package/dist/__tests__/render-feature-retry.unit.test.d.ts.map +1 -0
  180. package/dist/__tests__/render-feature-scheduling.unit.test.d.ts +2 -0
  181. package/dist/__tests__/render-feature-scheduling.unit.test.d.ts.map +1 -0
  182. package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts +2 -0
  183. package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts.map +1 -0
  184. package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts +2 -0
  185. package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts.map +1 -0
  186. package/dist/__tests__/render-feature-visibility-context.test-d.d.ts +2 -0
  187. package/dist/__tests__/render-feature-visibility-context.test-d.d.ts.map +1 -0
  188. package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts +2 -0
  189. package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts.map +1 -0
  190. package/dist/__tests__/render-feature-zero-work.unit.test.d.ts +2 -0
  191. package/dist/__tests__/render-feature-zero-work.unit.test.d.ts.map +1 -0
  192. package/dist/__tests__/render-graph-compute-raster-gpu.d.ts +7 -0
  193. package/dist/__tests__/render-graph-compute-raster-gpu.d.ts.map +1 -0
  194. package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts +2 -0
  195. package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts.map +1 -0
  196. package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts +2 -0
  197. package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts.map +1 -0
  198. package/dist/__tests__/render-graph-hzb-gpu.d.ts +7 -0
  199. package/dist/__tests__/render-graph-hzb-gpu.d.ts.map +1 -0
  200. package/dist/__tests__/render-graph-hzb.browser.test.d.ts +2 -0
  201. package/dist/__tests__/render-graph-hzb.browser.test.d.ts.map +1 -0
  202. package/dist/__tests__/render-graph-hzb.dawn.test.d.ts +2 -0
  203. package/dist/__tests__/render-graph-hzb.dawn.test.d.ts.map +1 -0
  204. package/dist/__tests__/render-graph-primitives.unit.test.d.ts +2 -0
  205. package/dist/__tests__/render-graph-primitives.unit.test.d.ts.map +1 -0
  206. package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts +12 -0
  207. package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts.map +1 -0
  208. package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts +2 -0
  209. package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts.map +1 -0
  210. package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts +2 -0
  211. package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts.map +1 -0
  212. package/dist/__tests__/render-scene-projection.unit.test.d.ts +2 -0
  213. package/dist/__tests__/render-scene-projection.unit.test.d.ts.map +1 -0
  214. package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts +2 -0
  215. package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts.map +1 -0
  216. package/dist/__tests__/renderer-lifecycle.integration.test.d.ts +2 -0
  217. package/dist/__tests__/renderer-lifecycle.integration.test.d.ts.map +1 -0
  218. package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts +2 -0
  219. package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts.map +1 -0
  220. package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts +2 -0
  221. package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts.map +1 -0
  222. package/dist/__tests__/shader-stage-surface.unit.test.d.ts +2 -0
  223. package/dist/__tests__/shader-stage-surface.unit.test.d.ts.map +1 -0
  224. package/dist/__tests__/ssao-config.unit.test.d.ts +2 -0
  225. package/dist/__tests__/ssao-config.unit.test.d.ts.map +1 -0
  226. package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts +2 -0
  227. package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts.map +1 -0
  228. package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts +2 -0
  229. package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts.map +1 -0
  230. package/dist/__tests__/standard-descriptors.test-d.d.ts +2 -0
  231. package/dist/__tests__/standard-descriptors.test-d.d.ts.map +1 -0
  232. package/dist/__tests__/standard-pipeline.dawn.test.d.ts +2 -0
  233. package/dist/__tests__/standard-pipeline.dawn.test.d.ts.map +1 -0
  234. package/dist/__tests__/standard-pipeline.integration.test.d.ts +2 -0
  235. package/dist/__tests__/standard-pipeline.integration.test.d.ts.map +1 -0
  236. package/dist/__tests__/standard-profile-oracle.unit.test.d.ts +2 -0
  237. package/dist/__tests__/standard-profile-oracle.unit.test.d.ts.map +1 -0
  238. package/dist/__tests__/surface-configuration.unit.test.d.ts +2 -0
  239. package/dist/__tests__/surface-configuration.unit.test.d.ts.map +1 -0
  240. package/dist/__tests__/texture-usage-surface.unit.test.d.ts +2 -0
  241. package/dist/__tests__/texture-usage-surface.unit.test.d.ts.map +1 -0
  242. package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts +2 -0
  243. package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts.map +1 -0
  244. package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts +2 -0
  245. package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts.map +1 -0
  246. package/dist/__tests__/urp-pipeline.unit.test.d.ts +2 -0
  247. package/dist/__tests__/urp-pipeline.unit.test.d.ts.map +1 -0
  248. package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts +2 -0
  249. package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts.map +1 -0
  250. package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts +2 -0
  251. package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts.map +1 -0
  252. package/dist/__tests__/visibility-diagnostics.integration.test.d.ts +2 -0
  253. package/dist/__tests__/visibility-diagnostics.integration.test.d.ts.map +1 -0
  254. package/dist/__tests__/visibility-extract.integration.test.d.ts +2 -0
  255. package/dist/__tests__/visibility-extract.integration.test.d.ts.map +1 -0
  256. package/dist/__tests__/visibility-extract.perf.test.d.ts +2 -0
  257. package/dist/__tests__/visibility-extract.perf.test.d.ts.map +1 -0
  258. package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts +2 -0
  259. package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts.map +1 -0
  260. package/dist/__tests__/visibility-hidden-report.unit.test.d.ts +2 -0
  261. package/dist/__tests__/visibility-hidden-report.unit.test.d.ts.map +1 -0
  262. package/dist/__tests__/visibility-instances.integration.test.d.ts +2 -0
  263. package/dist/__tests__/visibility-instances.integration.test.d.ts.map +1 -0
  264. package/dist/__tests__/visibility-multi-world.integration.test.d.ts +2 -0
  265. package/dist/__tests__/visibility-multi-world.integration.test.d.ts.map +1 -0
  266. package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts +2 -0
  267. package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts.map +1 -0
  268. package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts +2 -0
  269. package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts.map +1 -0
  270. package/dist/__tests__/visibility-public-surface.test-d.d.ts +2 -0
  271. package/dist/__tests__/visibility-public-surface.test-d.d.ts.map +1 -0
  272. package/dist/__tests__/visibility-resolver.unit.test.d.ts +2 -0
  273. package/dist/__tests__/visibility-resolver.unit.test.d.ts.map +1 -0
  274. package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts +2 -0
  275. package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts.map +1 -0
  276. package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts +2 -0
  277. package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts.map +1 -0
  278. package/dist/__tests__/vocabulary.unit.test.d.ts +2 -0
  279. package/dist/__tests__/vocabulary.unit.test.d.ts.map +1 -0
  280. package/dist/assembly/backend-contract.d.ts +37 -0
  281. package/dist/assembly/backend-contract.d.ts.map +1 -0
  282. package/dist/assembly/factory.d.ts +207 -0
  283. package/dist/assembly/factory.d.ts.map +1 -0
  284. package/dist/assembly/host-contract.d.ts +84 -0
  285. package/dist/assembly/host-contract.d.ts.map +1 -0
  286. package/dist/assembly/material/assembly.d.ts +21 -0
  287. package/dist/assembly/material/assembly.d.ts.map +1 -0
  288. package/dist/assembly/material/pipeline-projection.d.ts +30 -0
  289. package/dist/assembly/material/pipeline-projection.d.ts.map +1 -0
  290. package/dist/assets/asset-decoders.d.ts +5 -0
  291. package/dist/assets/asset-decoders.d.ts.map +1 -0
  292. package/dist/assets/render-asset-port.d.ts +17 -0
  293. package/dist/assets/render-asset-port.d.ts.map +1 -0
  294. package/dist/assets/resolve-render-asset.d.ts +6 -0
  295. package/dist/assets/resolve-render-asset.d.ts.map +1 -0
  296. package/dist/authoring.d.ts +12 -0
  297. package/dist/authoring.d.ts.map +1 -0
  298. package/dist/authoring.mjs +27 -0
  299. package/dist/authoring.mjs.map +1 -0
  300. package/dist/chunk-CQXZC5XI.mjs +182 -0
  301. package/dist/chunk-CQXZC5XI.mjs.map +1 -0
  302. package/dist/chunk-HCOGPHKS.mjs +93 -0
  303. package/dist/chunk-HCOGPHKS.mjs.map +1 -0
  304. package/dist/chunk-YEJIUW7D.mjs +1152 -0
  305. package/dist/chunk-YEJIUW7D.mjs.map +1 -0
  306. package/dist/cluster-binner.d.ts +152 -0
  307. package/dist/cluster-binner.d.ts.map +1 -0
  308. package/dist/components/__tests__/points-lines-admission.unit.test.d.ts +2 -0
  309. package/dist/components/__tests__/points-lines-admission.unit.test.d.ts.map +1 -0
  310. package/dist/components/__tests__/points-lines-schema.unit.test.d.ts +2 -0
  311. package/dist/components/__tests__/points-lines-schema.unit.test.d.ts.map +1 -0
  312. package/dist/components/__tests__/schema-contract.unit.test.d.ts +2 -0
  313. package/dist/components/__tests__/schema-contract.unit.test.d.ts.map +1 -0
  314. package/dist/components/__tests__/schema-parity.unit.test.d.ts +2 -0
  315. package/dist/components/__tests__/schema-parity.unit.test.d.ts.map +1 -0
  316. package/dist/components/__tests__/visibility-schema.unit.test.d.ts +2 -0
  317. package/dist/components/__tests__/visibility-schema.unit.test.d.ts.map +1 -0
  318. package/dist/components/camera.d.ts +311 -0
  319. package/dist/components/camera.d.ts.map +1 -0
  320. package/dist/components/directional-light.d.ts +76 -0
  321. package/dist/components/directional-light.d.ts.map +1 -0
  322. package/dist/components/glyph-text.d.ts +26 -0
  323. package/dist/components/glyph-text.d.ts.map +1 -0
  324. package/dist/components/index.d.ts +24 -0
  325. package/dist/components/index.d.ts.map +1 -0
  326. package/dist/components/instances.d.ts +41 -0
  327. package/dist/components/instances.d.ts.map +1 -0
  328. package/dist/components/layer.d.ts +34 -0
  329. package/dist/components/layer.d.ts.map +1 -0
  330. package/dist/components/light-helpers.d.ts +53 -0
  331. package/dist/components/light-helpers.d.ts.map +1 -0
  332. package/dist/components/lines.d.ts +5 -0
  333. package/dist/components/lines.d.ts.map +1 -0
  334. package/dist/components/mesh-filter.d.ts +24 -0
  335. package/dist/components/mesh-filter.d.ts.map +1 -0
  336. package/dist/components/mesh-renderer.d.ts +33 -0
  337. package/dist/components/mesh-renderer.d.ts.map +1 -0
  338. package/dist/components/point-light-shadow.d.ts +27 -0
  339. package/dist/components/point-light-shadow.d.ts.map +1 -0
  340. package/dist/components/point-light.d.ts +35 -0
  341. package/dist/components/point-light.d.ts.map +1 -0
  342. package/dist/components/points.d.ts +15 -0
  343. package/dist/components/points.d.ts.map +1 -0
  344. package/dist/components/post-process-params.d.ts +5 -0
  345. package/dist/components/post-process-params.d.ts.map +1 -0
  346. package/dist/components/scene-instance.d.ts +140 -0
  347. package/dist/components/scene-instance.d.ts.map +1 -0
  348. package/dist/components/skybox-background.d.ts +56 -0
  349. package/dist/components/skybox-background.d.ts.map +1 -0
  350. package/dist/components/skylight.d.ts +55 -0
  351. package/dist/components/skylight.d.ts.map +1 -0
  352. package/dist/components/sort-key.d.ts +44 -0
  353. package/dist/components/sort-key.d.ts.map +1 -0
  354. package/dist/components/spot-light.d.ts +81 -0
  355. package/dist/components/spot-light.d.ts.map +1 -0
  356. package/dist/components/sprite-animation.d.ts +74 -0
  357. package/dist/components/sprite-animation.d.ts.map +1 -0
  358. package/dist/components/sprite-instances.d.ts +51 -0
  359. package/dist/components/sprite-instances.d.ts.map +1 -0
  360. package/dist/components/sprite-playback-mode.d.ts +42 -0
  361. package/dist/components/sprite-playback-mode.d.ts.map +1 -0
  362. package/dist/components/sprite-region-override.d.ts +46 -0
  363. package/dist/components/sprite-region-override.d.ts.map +1 -0
  364. package/dist/components/tile-layer.d.ts +106 -0
  365. package/dist/components/tile-layer.d.ts.map +1 -0
  366. package/dist/components/tilemap.d.ts +25 -0
  367. package/dist/components/tilemap.d.ts.map +1 -0
  368. package/dist/components/visibility.d.ts +22 -0
  369. package/dist/components/visibility.d.ts.map +1 -0
  370. package/dist/construct-renderer.d.ts +19 -0
  371. package/dist/construct-renderer.d.ts.map +1 -0
  372. package/dist/construct-renderer.mjs +27462 -0
  373. package/dist/construct-renderer.mjs.map +1 -0
  374. package/dist/debug-draw-glue.d.ts +5 -0
  375. package/dist/debug-draw-glue.d.ts.map +1 -0
  376. package/dist/device/device-scope.d.ts +83 -0
  377. package/dist/device/device-scope.d.ts.map +1 -0
  378. package/dist/device/gpu-residency.d.ts +337 -0
  379. package/dist/device/gpu-residency.d.ts.map +1 -0
  380. package/dist/device/resource-types.d.ts +8 -0
  381. package/dist/device/resource-types.d.ts.map +1 -0
  382. package/dist/engine-metrics.d.ts +23 -0
  383. package/dist/engine-metrics.d.ts.map +1 -0
  384. package/dist/errors/ecs-validation.d.ts +3 -0
  385. package/dist/errors/ecs-validation.d.ts.map +1 -0
  386. package/dist/errors/index.d.ts +4 -0
  387. package/dist/errors/index.d.ts.map +1 -0
  388. package/dist/errors/recover.d.ts +105 -0
  389. package/dist/errors/recover.d.ts.map +1 -0
  390. package/dist/errors/render.d.ts +705 -0
  391. package/dist/errors/render.d.ts.map +1 -0
  392. package/dist/extract/visibility.d.ts +26 -0
  393. package/dist/extract/visibility.d.ts.map +1 -0
  394. package/dist/features/fullscreen.d.ts +19 -0
  395. package/dist/features/fullscreen.d.ts.map +1 -0
  396. package/dist/features/host.d.ts +106 -0
  397. package/dist/features/host.d.ts.map +1 -0
  398. package/dist/features/morph/morph-feature.d.ts +79 -0
  399. package/dist/features/morph/morph-feature.d.ts.map +1 -0
  400. package/dist/features/plan.d.ts +182 -0
  401. package/dist/features/plan.d.ts.map +1 -0
  402. package/dist/features/prepared-gpu-work.d.ts +117 -0
  403. package/dist/features/prepared-gpu-work.d.ts.map +1 -0
  404. package/dist/features/prepared-graphics-store.d.ts +66 -0
  405. package/dist/features/prepared-graphics-store.d.ts.map +1 -0
  406. package/dist/features/prepared-graphics.d.ts +215 -0
  407. package/dist/features/prepared-graphics.d.ts.map +1 -0
  408. package/dist/features/render-graph-compute.d.ts +13 -0
  409. package/dist/features/render-graph-compute.d.ts.map +1 -0
  410. package/dist/features/render-graph-contribution.d.ts +12 -0
  411. package/dist/features/render-graph-contribution.d.ts.map +1 -0
  412. package/dist/features/render-graph-raster.d.ts +38 -0
  413. package/dist/features/render-graph-raster.d.ts.map +1 -0
  414. package/dist/features/render-graph-resources.d.ts +11 -0
  415. package/dist/features/render-graph-resources.d.ts.map +1 -0
  416. package/dist/features/targets.d.ts +32 -0
  417. package/dist/features/targets.d.ts.map +1 -0
  418. package/dist/features/types.d.ts +68 -0
  419. package/dist/features/types.d.ts.map +1 -0
  420. package/dist/features/vocabulary.d.ts +14 -0
  421. package/dist/features/vocabulary.d.ts.map +1 -0
  422. package/dist/fullscreen-post-process-pass.d.ts +157 -0
  423. package/dist/fullscreen-post-process-pass.d.ts.map +1 -0
  424. package/dist/glyph-text-layout-system.d.ts +19 -0
  425. package/dist/glyph-text-layout-system.d.ts.map +1 -0
  426. package/dist/gpu-driven/batch-topology.d.ts +55 -0
  427. package/dist/gpu-driven/batch-topology.d.ts.map +1 -0
  428. package/dist/gpu-driven/production-raster.d.ts +51 -0
  429. package/dist/gpu-driven/production-raster.d.ts.map +1 -0
  430. package/dist/gpu-driven/view-gpu.d.ts +85 -0
  431. package/dist/gpu-driven/view-gpu.d.ts.map +1 -0
  432. package/dist/gpu-resource.d.ts +73 -0
  433. package/dist/gpu-resource.d.ts.map +1 -0
  434. package/dist/gpu-scene-schema.d.ts +78 -0
  435. package/dist/gpu-scene-schema.d.ts.map +1 -0
  436. package/dist/gpu-scene.d.ts +55 -0
  437. package/dist/gpu-scene.d.ts.map +1 -0
  438. package/dist/gpu-stage.d.ts +4 -0
  439. package/dist/gpu-stage.d.ts.map +1 -0
  440. package/dist/gpu-texture-usage.d.ts +6 -0
  441. package/dist/gpu-texture-usage.d.ts.map +1 -0
  442. package/dist/gpu-usage.d.ts +9 -0
  443. package/dist/gpu-usage.d.ts.map +1 -0
  444. package/dist/hdrp-buffers.d.ts +163 -0
  445. package/dist/hdrp-buffers.d.ts.map +1 -0
  446. package/dist/ibl/IblPipelineCache.d.ts +168 -0
  447. package/dist/ibl/IblPipelineCache.d.ts.map +1 -0
  448. package/dist/ibl/skylight-bind-group.d.ts +130 -0
  449. package/dist/ibl/skylight-bind-group.d.ts.map +1 -0
  450. package/dist/index.d.ts +31 -0
  451. package/dist/index.d.ts.map +1 -0
  452. package/dist/index.mjs +169 -0
  453. package/dist/index.mjs.map +1 -0
  454. package/dist/inspection-types.d.ts +72 -0
  455. package/dist/inspection-types.d.ts.map +1 -0
  456. package/dist/instance-buffer-cache.d.ts +56 -0
  457. package/dist/instance-buffer-cache.d.ts.map +1 -0
  458. package/dist/internal.d.ts +2 -0
  459. package/dist/internal.d.ts.map +1 -0
  460. package/dist/internal.mjs +3 -0
  461. package/dist/internal.mjs.map +1 -0
  462. package/dist/lifecycle.d.ts +62 -0
  463. package/dist/lifecycle.d.ts.map +1 -0
  464. package/dist/light-buffer-layout.d.ts +164 -0
  465. package/dist/light-buffer-layout.d.ts.map +1 -0
  466. package/dist/materials.d.ts +47 -0
  467. package/dist/materials.d.ts.map +1 -0
  468. package/dist/mesh-material-bindings.d.ts +43 -0
  469. package/dist/mesh-material-bindings.d.ts.map +1 -0
  470. package/dist/pbr-pipeline.d.ts +301 -0
  471. package/dist/pbr-pipeline.d.ts.map +1 -0
  472. package/dist/pipeline/standard-forward-lane.d.ts +5 -0
  473. package/dist/pipeline/standard-forward-lane.d.ts.map +1 -0
  474. package/dist/pipeline/standard-pipeline.d.ts +31 -0
  475. package/dist/pipeline/standard-pipeline.d.ts.map +1 -0
  476. package/dist/pipeline/standard-profile.d.ts +40 -0
  477. package/dist/pipeline/standard-profile.d.ts.map +1 -0
  478. package/dist/pipeline-builder.d.ts +122 -0
  479. package/dist/pipeline-builder.d.ts.map +1 -0
  480. package/dist/pipeline-spec-types.d.ts +24 -0
  481. package/dist/pipeline-spec-types.d.ts.map +1 -0
  482. package/dist/pipeline-spec.d.ts +367 -0
  483. package/dist/pipeline-spec.d.ts.map +1 -0
  484. package/dist/plugin.d.ts +4 -0
  485. package/dist/plugin.d.ts.map +1 -0
  486. package/dist/points-lines/__tests__/bounds.unit.test.d.ts +2 -0
  487. package/dist/points-lines/__tests__/bounds.unit.test.d.ts.map +1 -0
  488. package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts +2 -0
  489. package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts.map +1 -0
  490. package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts +2 -0
  491. package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts.map +1 -0
  492. package/dist/points-lines/__tests__/inspection.unit.test.d.ts +2 -0
  493. package/dist/points-lines/__tests__/inspection.unit.test.d.ts.map +1 -0
  494. package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts +2 -0
  495. package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts.map +1 -0
  496. package/dist/points-lines/__tests__/points-lines.bench.d.ts +2 -0
  497. package/dist/points-lines/__tests__/points-lines.bench.d.ts.map +1 -0
  498. package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts +2 -0
  499. package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts.map +1 -0
  500. package/dist/points-lines/__tests__/snapshot.unit.test.d.ts +2 -0
  501. package/dist/points-lines/__tests__/snapshot.unit.test.d.ts.map +1 -0
  502. package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts +2 -0
  503. package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts.map +1 -0
  504. package/dist/points-lines/admission.d.ts +36 -0
  505. package/dist/points-lines/admission.d.ts.map +1 -0
  506. package/dist/points-lines/bounds.d.ts +8 -0
  507. package/dist/points-lines/bounds.d.ts.map +1 -0
  508. package/dist/points-lines/expansion-cache.d.ts +28 -0
  509. package/dist/points-lines/expansion-cache.d.ts.map +1 -0
  510. package/dist/points-lines/inspection.d.ts +53 -0
  511. package/dist/points-lines/inspection.d.ts.map +1 -0
  512. package/dist/points-lines/prepare.d.ts +67 -0
  513. package/dist/points-lines/prepare.d.ts.map +1 -0
  514. package/dist/points-lines/record.d.ts +60 -0
  515. package/dist/points-lines/record.d.ts.map +1 -0
  516. package/dist/points-lines/snapshot.d.ts +49 -0
  517. package/dist/points-lines/snapshot.d.ts.map +1 -0
  518. package/dist/post-process-errors.d.ts +182 -0
  519. package/dist/post-process-errors.d.ts.map +1 -0
  520. package/dist/prepare/prepared-graphics-resolver.d.ts +59 -0
  521. package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -0
  522. package/dist/record/__tests__/material-bg-cache.unit.test.d.ts +2 -0
  523. package/dist/record/__tests__/material-bg-cache.unit.test.d.ts.map +1 -0
  524. package/dist/record/__tests__/material-slot-plan.unit.test.d.ts +2 -0
  525. package/dist/record/__tests__/material-slot-plan.unit.test.d.ts.map +1 -0
  526. package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts +2 -0
  527. package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts.map +1 -0
  528. package/dist/record/__tests__/video-texture-view.unit.test.d.ts +2 -0
  529. package/dist/record/__tests__/video-texture-view.unit.test.d.ts.map +1 -0
  530. package/dist/record/frame-lighting.d.ts +121 -0
  531. package/dist/record/frame-lighting.d.ts.map +1 -0
  532. package/dist/record/frame-snapshot.d.ts +429 -0
  533. package/dist/record/frame-snapshot.d.ts.map +1 -0
  534. package/dist/record/frame-targets.d.ts +20 -0
  535. package/dist/record/frame-targets.d.ts.map +1 -0
  536. package/dist/record/frame.d.ts +71 -0
  537. package/dist/record/frame.d.ts.map +1 -0
  538. package/dist/record/helpers.d.ts +102 -0
  539. package/dist/record/helpers.d.ts.map +1 -0
  540. package/dist/record/main-pass-geometry.d.ts +28 -0
  541. package/dist/record/main-pass-geometry.d.ts.map +1 -0
  542. package/dist/record/main-pass-material.d.ts +204 -0
  543. package/dist/record/main-pass-material.d.ts.map +1 -0
  544. package/dist/record/main-pass-sprite-draws.d.ts +43 -0
  545. package/dist/record/main-pass-sprite-draws.d.ts.map +1 -0
  546. package/dist/record/main-pass.d.ts +20 -0
  547. package/dist/record/main-pass.d.ts.map +1 -0
  548. package/dist/record/mesh-ssbo.d.ts +446 -0
  549. package/dist/record/mesh-ssbo.d.ts.map +1 -0
  550. package/dist/record/render-context.d.ts +252 -0
  551. package/dist/record/render-context.d.ts.map +1 -0
  552. package/dist/record/shadow-pass.d.ts +52 -0
  553. package/dist/record/shadow-pass.d.ts.map +1 -0
  554. package/dist/record/skybox-post-pass.d.ts +33 -0
  555. package/dist/record/skybox-post-pass.d.ts.map +1 -0
  556. package/dist/record/typed-frame-graph.d.ts +35 -0
  557. package/dist/record/typed-frame-graph.d.ts.map +1 -0
  558. package/dist/record/view-ubo.d.ts +45 -0
  559. package/dist/record/view-ubo.d.ts.map +1 -0
  560. package/dist/render-contract.d.ts +424 -0
  561. package/dist/render-contract.d.ts.map +1 -0
  562. package/dist/render-data.d.ts +143 -0
  563. package/dist/render-data.d.ts.map +1 -0
  564. package/dist/render-graph-primitives.d.ts +76 -0
  565. package/dist/render-graph-primitives.d.ts.map +1 -0
  566. package/dist/render-pipeline.d.ts +110 -0
  567. package/dist/render-pipeline.d.ts.map +1 -0
  568. package/dist/render-system-extract.d.ts +868 -0
  569. package/dist/render-system-extract.d.ts.map +1 -0
  570. package/dist/render-system.d.ts +125 -0
  571. package/dist/render-system.d.ts.map +1 -0
  572. package/dist/scene/render-scene-types.d.ts +61 -0
  573. package/dist/scene/render-scene-types.d.ts.map +1 -0
  574. package/dist/scene/render-scene.d.ts +112 -0
  575. package/dist/scene/render-scene.d.ts.map +1 -0
  576. package/dist/scene-instances/post-spawn-resolve-joints.d.ts +30 -0
  577. package/dist/scene-instances/post-spawn-resolve-joints.d.ts.map +1 -0
  578. package/dist/shadow-atlas.d.ts +117 -0
  579. package/dist/shadow-atlas.d.ts.map +1 -0
  580. package/dist/ssao-buffers.d.ts +50 -0
  581. package/dist/ssao-buffers.d.ts.map +1 -0
  582. package/dist/ssao-config.d.ts +28 -0
  583. package/dist/ssao-config.d.ts.map +1 -0
  584. package/dist/systems/active-camera.d.ts +53 -0
  585. package/dist/systems/active-camera.d.ts.map +1 -0
  586. package/dist/systems/pass-selector.d.ts +24 -0
  587. package/dist/systems/pass-selector.d.ts.map +1 -0
  588. package/dist/systems/skin-palette-allocator.d.ts +49 -0
  589. package/dist/systems/skin-palette-allocator.d.ts.map +1 -0
  590. package/dist/systems/skin-palette-types.d.ts +14 -0
  591. package/dist/systems/skin-palette-types.d.ts.map +1 -0
  592. package/dist/systems/transparent-sort-config.d.ts +112 -0
  593. package/dist/systems/transparent-sort-config.d.ts.map +1 -0
  594. package/dist/tilemap-chunk-extract-system.d.ts +143 -0
  595. package/dist/tilemap-chunk-extract-system.d.ts.map +1 -0
  596. package/dist/typed-render-graph-primitives.d.ts +57 -0
  597. package/dist/typed-render-graph-primitives.d.ts.map +1 -0
  598. package/dist/typed-shadow-passes.d.ts +11 -0
  599. package/dist/typed-shadow-passes.d.ts.map +1 -0
  600. package/package.json +94 -0
  601. package/src/__tests__/authoring-path.unit.test.ts +23 -0
  602. package/src/__tests__/backend-selection-rhi-capture.test-d.ts +21 -0
  603. package/src/__tests__/callback-inference.test-d.ts +8 -0
  604. package/src/__tests__/cluster-binner.test.ts +272 -0
  605. package/src/__tests__/cluster-grid-default-surface.unit.test.ts +20 -0
  606. package/src/__tests__/construct-renderer-identity.unit.test.ts +23 -0
  607. package/src/__tests__/device-scope-lifecycle.unit.test.ts +151 -0
  608. package/src/__tests__/device-scope-stale-matrix.unit.test.ts +42 -0
  609. package/src/__tests__/direct-extract-consumer-contract.test-d.ts +23 -0
  610. package/src/__tests__/direct-light-snapshot.unit.test.ts +61 -0
  611. package/src/__tests__/factory-contract.integration.test.ts +280 -0
  612. package/src/__tests__/fallback-row-stride-surface.unit.test.ts +15 -0
  613. package/src/__tests__/frame-observation.contract.test.ts +112 -0
  614. package/src/__tests__/fullscreen-feature-plan.unit.test.ts +32 -0
  615. package/src/__tests__/glyph-text-layout-recovery.unit.test.ts +167 -0
  616. package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +350 -0
  617. package/src/__tests__/gpu-driven-indirect-raster.browser.test.ts +12 -0
  618. package/src/__tests__/gpu-driven-indirect-raster.dawn.test.ts +16 -0
  619. package/src/__tests__/gpu-driven-production.integration.test.ts +436 -0
  620. package/src/__tests__/gpu-driven-scaling.unit.test.ts +87 -0
  621. package/src/__tests__/gpu-driven-view-gpu-evidence.ts +271 -0
  622. package/src/__tests__/gpu-driven-view-graph.integration.test.ts +290 -0
  623. package/src/__tests__/gpu-driven-view-reference.ts +111 -0
  624. package/src/__tests__/gpu-driven-view.browser.test.ts +30 -0
  625. package/src/__tests__/gpu-driven-view.dawn.test.ts +28 -0
  626. package/src/__tests__/gpu-driven-view.unit.test.ts +199 -0
  627. package/src/__tests__/gpu-resource-store-stride.unit.test.ts +59 -0
  628. package/src/__tests__/gpu-scene-render-graph-gpu.ts +308 -0
  629. package/src/__tests__/gpu-scene-render-graph.browser.test.ts +19 -0
  630. package/src/__tests__/gpu-scene-render-graph.dawn.test.ts +19 -0
  631. package/src/__tests__/gpu-scene-schema.unit.test.ts +16 -0
  632. package/src/__tests__/gpu-scene.dawn.test.ts +205 -0
  633. package/src/__tests__/gpu-scene.unit.test.ts +147 -0
  634. package/src/__tests__/ibl/face-uniforms.unit.test.ts +46 -0
  635. package/src/__tests__/infinite-grid-no-vertex-probe.unit.test.ts +92 -0
  636. package/src/__tests__/injection-kind-owner.test-d.ts +14 -0
  637. package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +728 -0
  638. package/src/__tests__/light-buffer-layout.unit.test.ts +40 -0
  639. package/src/__tests__/material-contract-inventory.unit.test.ts +24 -0
  640. package/src/__tests__/material-cooked-projection.unit.test.ts +150 -0
  641. package/src/__tests__/material-snapshot-mutation.integration.test.ts +53 -0
  642. package/src/__tests__/material-static-dynamic-route.unit.test.ts +94 -0
  643. package/src/__tests__/material-stride-surface.unit.test.ts +32 -0
  644. package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +106 -0
  645. package/src/__tests__/mesh-material-bindings.unit.test.ts +89 -0
  646. package/src/__tests__/mesh-stride-surface.unit.test.ts +16 -0
  647. package/src/__tests__/morph-culling-reentry.dawn.test.ts +157 -0
  648. package/src/__tests__/morph-feature-gpu-work.integration.test.ts +80 -0
  649. package/src/__tests__/morph-feature-plan.unit.test.ts +53 -0
  650. package/src/__tests__/morph-visual-evidence.integration.test.ts +80 -0
  651. package/src/__tests__/nineslice-handle-surface.unit.test.ts +19 -0
  652. package/src/__tests__/post-process-error-policy-owner.unit.test.ts +201 -0
  653. package/src/__tests__/prepared-buffer-kind-owner.test-d.ts +29 -0
  654. package/src/__tests__/prepared-graphics-capability.unit.test.ts +65 -0
  655. package/src/__tests__/prepared-graphics-generation.unit.test.ts +161 -0
  656. package/src/__tests__/prepared-graphics-lifecycle.unit.test.ts +138 -0
  657. package/src/__tests__/prepared-graphics-pipeline-warmup.unit.test.ts +29 -0
  658. package/src/__tests__/prepared-graphics-resolver.unit.test.ts +285 -0
  659. package/src/__tests__/prepared-graphics-snapshot.unit.test.ts +105 -0
  660. package/src/__tests__/prepared-graphics-store.unit.test.ts +154 -0
  661. package/src/__tests__/prepared-graphics-validation.unit.test.ts +176 -0
  662. package/src/__tests__/profiler-default-off.test.ts +22 -0
  663. package/src/__tests__/profiler-phase-catalog.test.ts +66 -0
  664. package/src/__tests__/profiler-phase-integration.test.ts +62 -0
  665. package/src/__tests__/profiler-phase-token.test.ts +79 -0
  666. package/src/__tests__/public-surface.test-d.ts +94 -0
  667. package/src/__tests__/recover-error-policy-owner.unit.test.ts +107 -0
  668. package/src/__tests__/render-error-code-owner.test-d.ts +116 -0
  669. package/src/__tests__/render-error-detail-ssot.test-d.ts +139 -0
  670. package/src/__tests__/render-error-exhaustive.test-d.ts +110 -0
  671. package/src/__tests__/render-feature-assembly.test-d.ts +43 -0
  672. package/src/__tests__/render-feature-context.test-d.ts +57 -0
  673. package/src/__tests__/render-feature-contract.test-d.ts +49 -0
  674. package/src/__tests__/render-feature-diagnostics.unit.test.ts +149 -0
  675. package/src/__tests__/render-feature-docs.unit.test.ts +89 -0
  676. package/src/__tests__/render-feature-errors.unit.test.ts +47 -0
  677. package/src/__tests__/render-feature-gpu-work.integration.test.ts +316 -0
  678. package/src/__tests__/render-feature-plan.test-d.ts +161 -0
  679. package/src/__tests__/render-feature-plan.unit.test.ts +170 -0
  680. package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +90 -0
  681. package/src/__tests__/render-feature-prepared-errors.test-d.ts +79 -0
  682. package/src/__tests__/render-feature-prepared-graphics-docs.unit.test.ts +80 -0
  683. package/src/__tests__/render-feature-prepared-graphics-isolation.unit.test.ts +72 -0
  684. package/src/__tests__/render-feature-prepared-graphics-negative.test-d.ts +36 -0
  685. package/src/__tests__/render-feature-prepared-graphics.test-d.ts +74 -0
  686. package/src/__tests__/render-feature-prepared-graphics.unit.test.ts +121 -0
  687. package/src/__tests__/render-feature-public-surface.test-d.ts +57 -0
  688. package/src/__tests__/render-feature-retry.unit.test.ts +87 -0
  689. package/src/__tests__/render-feature-scheduling.unit.test.ts +110 -0
  690. package/src/__tests__/render-feature-stage-failed-policy-owner.unit.test.ts +137 -0
  691. package/src/__tests__/render-feature-stage-fault-recovery.unit.test.ts +146 -0
  692. package/src/__tests__/render-feature-visibility-context.test-d.ts +33 -0
  693. package/src/__tests__/render-feature-visibility-context.unit.test.ts +37 -0
  694. package/src/__tests__/render-feature-zero-work.unit.test.ts +76 -0
  695. package/src/__tests__/render-graph-compute-raster-gpu.ts +342 -0
  696. package/src/__tests__/render-graph-compute-raster.browser.test.ts +16 -0
  697. package/src/__tests__/render-graph-compute-raster.dawn.test.ts +22 -0
  698. package/src/__tests__/render-graph-hzb-gpu.ts +239 -0
  699. package/src/__tests__/render-graph-hzb.browser.test.ts +16 -0
  700. package/src/__tests__/render-graph-hzb.dawn.test.ts +23 -0
  701. package/src/__tests__/render-graph-primitives.unit.test.ts +22 -0
  702. package/src/__tests__/render-graph-storage-indirect-gpu.ts +162 -0
  703. package/src/__tests__/render-graph-storage-indirect.browser.test.ts +21 -0
  704. package/src/__tests__/render-graph-storage-indirect.dawn.test.ts +28 -0
  705. package/src/__tests__/render-scene-projection.unit.test.ts +168 -0
  706. package/src/__tests__/renderer-factory-material-contract.unit.test.ts +121 -0
  707. package/src/__tests__/renderer-lifecycle.integration.test.ts +58 -0
  708. package/src/__tests__/rhi-backend-package-boundary.unit.test.ts +11 -0
  709. package/src/__tests__/scriptable-pack-consumer.test-d.ts +14 -0
  710. package/src/__tests__/shader-stage-surface.unit.test.ts +43 -0
  711. package/src/__tests__/ssao-config.unit.test.ts +36 -0
  712. package/src/__tests__/ssao-kernel-surface.unit.test.ts +14 -0
  713. package/src/__tests__/standard-clustered-pipeline.unit.test.ts +28 -0
  714. package/src/__tests__/standard-descriptors.test-d.ts +22 -0
  715. package/src/__tests__/standard-pipeline.dawn.test.ts +61 -0
  716. package/src/__tests__/standard-pipeline.integration.test.ts +124 -0
  717. package/src/__tests__/standard-profile-oracle.unit.test.ts +62 -0
  718. package/src/__tests__/surface-configuration.unit.test.ts +91 -0
  719. package/src/__tests__/texture-usage-surface.unit.test.ts +58 -0
  720. package/src/__tests__/typed-pipeline-topology.unit.test.ts +223 -0
  721. package/src/__tests__/urp-pipeline-targets.unit.test.ts +42 -0
  722. package/src/__tests__/urp-pipeline.unit.test.ts +14 -0
  723. package/src/__tests__/vertex-color-pipeline.unit.test.ts +132 -0
  724. package/src/__tests__/vertex-layout-consumer.unit.test.ts +25 -0
  725. package/src/__tests__/visibility-diagnostics.integration.test.ts +62 -0
  726. package/src/__tests__/visibility-extract.integration.test.ts +98 -0
  727. package/src/__tests__/visibility-extract.perf.test.ts +130 -0
  728. package/src/__tests__/visibility-feature-dedup.integration.test.ts +55 -0
  729. package/src/__tests__/visibility-hidden-report.unit.test.ts +36 -0
  730. package/src/__tests__/visibility-instances.integration.test.ts +46 -0
  731. package/src/__tests__/visibility-multi-world.integration.test.ts +86 -0
  732. package/src/__tests__/visibility-producer-matrix.integration.test.ts +168 -0
  733. package/src/__tests__/visibility-producer-matrix.unit.test.ts +96 -0
  734. package/src/__tests__/visibility-public-surface.test-d.ts +27 -0
  735. package/src/__tests__/visibility-resolver.unit.test.ts +85 -0
  736. package/src/__tests__/visibility-resource-short-circuit.unit.test.ts +80 -0
  737. package/src/__tests__/visibility-snapshot-contract.unit.test.ts +60 -0
  738. package/src/__tests__/vocabulary.unit.test.ts +21 -0
  739. package/src/assembly/backend-contract.ts +57 -0
  740. package/src/assembly/factory.ts +8130 -0
  741. package/src/assembly/host-contract.ts +101 -0
  742. package/src/assembly/material/assembly.ts +48 -0
  743. package/src/assembly/material/pipeline-projection.ts +63 -0
  744. package/src/assets/asset-decoders.ts +158 -0
  745. package/src/assets/render-asset-port.ts +44 -0
  746. package/src/assets/resolve-render-asset.ts +13 -0
  747. package/src/authoring.ts +17 -0
  748. package/src/cluster-binner.ts +700 -0
  749. package/src/components/__tests__/points-lines-admission.unit.test.ts +219 -0
  750. package/src/components/__tests__/points-lines-schema.unit.test.ts +56 -0
  751. package/src/components/__tests__/schema-contract.unit.test.ts +10 -0
  752. package/src/components/__tests__/schema-parity.unit.test.ts +25 -0
  753. package/src/components/__tests__/visibility-schema.unit.test.ts +35 -0
  754. package/src/components/camera.ts +512 -0
  755. package/src/components/directional-light.ts +120 -0
  756. package/src/components/glyph-text.ts +64 -0
  757. package/src/components/index.ts +54 -0
  758. package/src/components/instances.ts +206 -0
  759. package/src/components/layer.ts +69 -0
  760. package/src/components/light-helpers.ts +188 -0
  761. package/src/components/lines.ts +18 -0
  762. package/src/components/mesh-filter.ts +60 -0
  763. package/src/components/mesh-renderer.ts +61 -0
  764. package/src/components/point-light-shadow.ts +43 -0
  765. package/src/components/point-light.ts +65 -0
  766. package/src/components/points.ts +40 -0
  767. package/src/components/post-process-params.ts +35 -0
  768. package/src/components/scene-instance.ts +193 -0
  769. package/src/components/skybox-background.ts +103 -0
  770. package/src/components/skylight.ts +97 -0
  771. package/src/components/sort-key.ts +75 -0
  772. package/src/components/spot-light.ts +124 -0
  773. package/src/components/sprite-animation.ts +168 -0
  774. package/src/components/sprite-instances.ts +179 -0
  775. package/src/components/sprite-playback-mode.ts +79 -0
  776. package/src/components/sprite-region-override.ts +105 -0
  777. package/src/components/tile-layer.ts +167 -0
  778. package/src/components/tilemap.ts +48 -0
  779. package/src/components/visibility.ts +53 -0
  780. package/src/construct-renderer.ts +67 -0
  781. package/src/debug-draw-glue.ts +48 -0
  782. package/src/device/device-scope.ts +306 -0
  783. package/src/device/gpu-residency.ts +1822 -0
  784. package/src/device/resource-types.ts +20 -0
  785. package/src/engine-metrics.ts +82 -0
  786. package/src/errors/ecs-validation.ts +16 -0
  787. package/src/errors/index.ts +3 -0
  788. package/src/errors/recover.ts +161 -0
  789. package/src/errors/render.ts +1284 -0
  790. package/src/extract/visibility.ts +120 -0
  791. package/src/features/fullscreen.ts +46 -0
  792. package/src/features/host.ts +1363 -0
  793. package/src/features/morph/morph-feature.ts +377 -0
  794. package/src/features/plan.ts +447 -0
  795. package/src/features/prepared-gpu-work.ts +959 -0
  796. package/src/features/prepared-graphics-store.ts +449 -0
  797. package/src/features/prepared-graphics.ts +420 -0
  798. package/src/features/render-graph-compute.ts +69 -0
  799. package/src/features/render-graph-contribution.ts +75 -0
  800. package/src/features/render-graph-raster.ts +332 -0
  801. package/src/features/render-graph-resources.ts +38 -0
  802. package/src/features/targets.ts +70 -0
  803. package/src/features/types.ts +103 -0
  804. package/src/features/vocabulary.ts +24 -0
  805. package/src/fullscreen-post-process-pass.ts +363 -0
  806. package/src/glyph-text-layout-system.ts +421 -0
  807. package/src/gpu-driven/batch-topology.ts +245 -0
  808. package/src/gpu-driven/production-raster.ts +695 -0
  809. package/src/gpu-driven/view-gpu.ts +703 -0
  810. package/src/gpu-resource.ts +159 -0
  811. package/src/gpu-scene-schema.ts +136 -0
  812. package/src/gpu-scene.ts +722 -0
  813. package/src/gpu-stage.ts +9 -0
  814. package/src/gpu-texture-usage.ts +12 -0
  815. package/src/gpu-usage.ts +14 -0
  816. package/src/hdrp-buffers.ts +480 -0
  817. package/src/ibl/IblPipelineCache.ts +1006 -0
  818. package/src/ibl/skylight-bind-group.ts +513 -0
  819. package/src/index.ts +129 -0
  820. package/src/inspection-types.ts +80 -0
  821. package/src/instance-buffer-cache.ts +95 -0
  822. package/src/internal.ts +9 -0
  823. package/src/lifecycle.ts +168 -0
  824. package/src/light-buffer-layout.ts +346 -0
  825. package/src/materials.ts +214 -0
  826. package/src/mesh-material-bindings.ts +103 -0
  827. package/src/pbr-pipeline.ts +1137 -0
  828. package/src/pipeline/standard-forward-lane.ts +229 -0
  829. package/src/pipeline/standard-pipeline.ts +555 -0
  830. package/src/pipeline/standard-profile.ts +65 -0
  831. package/src/pipeline-builder.ts +382 -0
  832. package/src/pipeline-spec-types.ts +28 -0
  833. package/src/pipeline-spec.ts +1231 -0
  834. package/src/plugin.ts +69 -0
  835. package/src/points-lines/__tests__/bounds.unit.test.ts +21 -0
  836. package/src/points-lines/__tests__/cache-recovery.unit.test.ts +157 -0
  837. package/src/points-lines/__tests__/inspection-lanes.integration.test.ts +146 -0
  838. package/src/points-lines/__tests__/inspection.unit.test.ts +173 -0
  839. package/src/points-lines/__tests__/lane-structural.integration.test.ts +122 -0
  840. package/src/points-lines/__tests__/points-lines.bench.ts +400 -0
  841. package/src/points-lines/__tests__/raster-lane.integration.test.ts +44 -0
  842. package/src/points-lines/__tests__/snapshot.unit.test.ts +101 -0
  843. package/src/points-lines/__tests__/view-ubo.unit.test.ts +73 -0
  844. package/src/points-lines/admission.ts +238 -0
  845. package/src/points-lines/bounds.ts +23 -0
  846. package/src/points-lines/expansion-cache.ts +215 -0
  847. package/src/points-lines/inspection.ts +97 -0
  848. package/src/points-lines/prepare.ts +177 -0
  849. package/src/points-lines/record.ts +125 -0
  850. package/src/points-lines/snapshot.ts +130 -0
  851. package/src/post-process-errors.ts +302 -0
  852. package/src/prepare/prepared-graphics-resolver.ts +456 -0
  853. package/src/record/__tests__/material-bg-cache.unit.test.ts +41 -0
  854. package/src/record/__tests__/material-slot-plan.unit.test.ts +44 -0
  855. package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +41 -0
  856. package/src/record/__tests__/video-texture-view.unit.test.ts +90 -0
  857. package/src/record/frame-lighting.ts +1074 -0
  858. package/src/record/frame-snapshot.ts +500 -0
  859. package/src/record/frame-targets.ts +137 -0
  860. package/src/record/frame.ts +1598 -0
  861. package/src/record/helpers.ts +284 -0
  862. package/src/record/main-pass-geometry.ts +1065 -0
  863. package/src/record/main-pass-material.ts +1043 -0
  864. package/src/record/main-pass-sprite-draws.ts +1137 -0
  865. package/src/record/main-pass.ts +610 -0
  866. package/src/record/mesh-ssbo.ts +885 -0
  867. package/src/record/render-context.ts +384 -0
  868. package/src/record/shadow-pass.ts +698 -0
  869. package/src/record/skybox-post-pass.ts +593 -0
  870. package/src/record/typed-frame-graph.ts +461 -0
  871. package/src/record/view-ubo.ts +222 -0
  872. package/src/render-contract.ts +582 -0
  873. package/src/render-data.ts +385 -0
  874. package/src/render-graph-primitives.ts +811 -0
  875. package/src/render-pipeline.ts +259 -0
  876. package/src/render-system-extract.ts +4585 -0
  877. package/src/render-system.ts +1933 -0
  878. package/src/scene/render-scene-types.ts +67 -0
  879. package/src/scene/render-scene.ts +1087 -0
  880. package/src/scene-instances/post-spawn-resolve-joints.ts +165 -0
  881. package/src/shadow-atlas.ts +244 -0
  882. package/src/ssao-buffers.ts +334 -0
  883. package/src/ssao-config.ts +61 -0
  884. package/src/systems/active-camera.ts +116 -0
  885. package/src/systems/pass-selector.ts +49 -0
  886. package/src/systems/skin-palette-allocator.ts +251 -0
  887. package/src/systems/skin-palette-types.ts +14 -0
  888. package/src/systems/transparent-sort-config.ts +233 -0
  889. package/src/tilemap-chunk-extract-system.ts +1290 -0
  890. package/src/typed-render-graph-primitives.ts +541 -0
  891. package/src/typed-shadow-passes.ts +165 -0
@@ -0,0 +1,61 @@
1
+ // @forgeax/engine-render - MeshRenderer (multi-material array slot).
2
+ //
3
+ // feat-20260608-mesh-multi-section-primitive-multi-material-slot M2 / w7:
4
+ // the single `material` field is replaced with `materials` — an
5
+ // `array<shared<MaterialAsset>>` indexed by MeshAsset.materialSlots. Entries
6
+ // are sparse positional overrides: a missing/zero entry inherits the Mesh
7
+ // slot default, while a defaultless slot inherits the neutral engine material.
8
+ //
9
+ // The schema-vocab keyword `'array<shared<MaterialAsset>>'` (feat-20260614
10
+ // M5 -- migrated from `'array<handle<MaterialAsset>>'`) stores as a u32
11
+ // column slot array; the brand prevents cross-asset assignment at compile
12
+ // time. The `'shared<T>'` arm routes element retain/release through
13
+ // SharedRefStore (M4 / w13) on overwrite / archetype migration.
14
+ //
15
+ // charter mapping: proposition 1 (single import — `MeshRenderer` is the
16
+ // only material-binding component AI users see); proposition 3
17
+ // (machine-readable schema > prose); proposition 4 (explicit failure: the
18
+ // TS brand on `Handle<'MaterialAsset','shared'>` rejects cross-variant
19
+ // assignment at compile time); proposition 5 (consistent abstraction:
20
+ // shading model classification (`'unlit'` / `'standard'`) lives ONLY on
21
+ // the asset discriminant, NOT on the component name).
22
+ //
23
+ // RenderSystem consumption: `render-system-extract.ts` runs ONE archetype
24
+ // query (`world.query(MeshRenderer)`) and routes per entity by
25
+ // `mat.materialShaderId` (shader identity) to the unlit.wgsl or pbr.wgsl
26
+ // pipeline tag.
27
+
28
+ import { defineComponent } from '@forgeax/engine-ecs';
29
+
30
+ /**
31
+ * Mesh renderer (ECS component, multi-material array).
32
+ *
33
+ * Stores `materials: readonly Handle<'MaterialAsset','shared'>[]`
34
+ * (u32-stored array, indexed by MeshAsset.materialSlots). Submeshes point to
35
+ * those stable slots through `Submesh.materialSlot`. The asset's `passes[].shader`
36
+ * identity is the SSOT for which pipeline RenderSystem routes the entity
37
+ * to (record stage dispatches on `materialShaderId`).
38
+ *
39
+ * Defaults map carries `materials: []`: every slot inherits its Mesh-owned
40
+ * default, or the neutral engine material when that slot is intentionally
41
+ * defaultless.
42
+ *
43
+ * @example Spawn while inheriting every Mesh slot default:
44
+ * world.spawn({ component: MeshRenderer, data: {} });
45
+ *
46
+ * @example Spawn an unlit-targeted entity:
47
+ * import { MeshRenderer, Materials } from '@forgeax/engine-render';
48
+ * const matPayload = engine.assets.catalog(matGuid, Materials.unlit([1, 0, 0, 1])).value;
49
+ * const matHandle = world.allocSharedRef('MaterialAsset', matPayload);
50
+ * world.spawn({ component: MeshRenderer, data: { materials: [matHandle] } });
51
+ *
52
+ * @example Spawn a standard (PBR) entity:
53
+ * const matPayload = engine.assets.catalog(matGuid, Materials.standard({
54
+ * baseColor: [0.5, 0.5, 0.5, 1], metallic: 0, roughness: 0.4,
55
+ * })).value;
56
+ * const matHandle = world.allocSharedRef('MaterialAsset', matPayload);
57
+ * world.spawn({ component: MeshRenderer, data: { materials: [matHandle] } });
58
+ */
59
+ export const MeshRenderer = defineComponent('MeshRenderer', {
60
+ materials: { type: 'array<shared<MaterialAsset>>', default: [] },
61
+ });
@@ -0,0 +1,43 @@
1
+ // @forgeax/engine-runtime — PointLightShadow (omnidirectional point-light
2
+ // shadow mapping parameters; cube-array atlas variant).
3
+ //
4
+ // Schema: 6 f32 columns — mapSize (u32, stored as f32), depthBias, normalBias,
5
+ // nearPlane, farPlane, pcfKernelSize (u32, stored as f32). No fixed-extent
6
+ // field — cube map uses fov=90 perspective, not ortho.
7
+ //
8
+ // Atlas capacity is a renderer policy; ECS does not enforce a component
9
+ // cardinality bound.
10
+ // Co-located with DirectionalLight in components/ (research L1.2).
11
+ //
12
+ // Naming convention: bare entity name (AGENTS.md §Component naming), no
13
+ // Component suffix. Same defineComponent pattern and ShadowInvalidConfigError
14
+ // surface as the shadow fields merged into DirectionalLight (feat-20260621 M1).
15
+
16
+ import { defineComponent } from '@forgeax/engine-ecs';
17
+
18
+ /**
19
+ * Omnidirectional point-light shadow mapping parameters.
20
+ *
21
+ * The renderer may batch this component into a bounded atlas, but the ECS
22
+ * component remains a plain storage schema and carries no cardinality policy.
23
+ *
24
+ * @example Spawn a point light with default shadow config:
25
+ * world.spawn(
26
+ * { component: Transform, data: { pos: [0, 4, 0] } },
27
+ * { component: PointLight, data: { range: 25 } },
28
+ * { component: PointLightShadow, data: {} }, // 6 fields filled from defaults
29
+ * );
30
+ *
31
+ * @example Spawn with explicit map size and bias:
32
+ * world.spawn(
33
+ * { component: PointLightShadow, data: { mapSize: 1024, depthBias: 0.01 } },
34
+ * );
35
+ */
36
+ export const PointLightShadow = defineComponent('PointLightShadow', {
37
+ mapSize: { type: 'f32', default: 512 },
38
+ depthBias: { type: 'f32', default: 0.005 },
39
+ normalBias: { type: 'f32', default: 0.05 },
40
+ nearPlane: { type: 'f32', default: 0.1 },
41
+ farPlane: { type: 'f32', default: 25 },
42
+ pcfKernelSize: { type: 'f32', default: 3 },
43
+ });
@@ -0,0 +1,65 @@
1
+ // @forgeax/engine-render - PointLight (omnidirectional point-light parameters).
2
+ //
3
+ // Schema: color array<f32,3> + intensity f32 + range f32 (feat-20260709 M2:
4
+ // color collapsed from 3 per-axis scalar columns to one inline array<f32,3>).
5
+ // `position` comes from the Transform component; PointLight requires a
6
+ // companion Transform on the same entity (ECS query: `[Transform, PointLight]`).
7
+ // `range` units are meters; defaults to `10.0`. Runtime finite-range
8
+ // attenuation is the Three r184 squared window; the KHR unsquared curve is an
9
+ // import/reference boundary only. See `light-helpers.ts` for the host-side
10
+ // range projection.
11
+ //
12
+ // 0 light + standard material -> physically correct black render
13
+ // (feat-20260518-pbr-direct-lighting-mvp). The runtime once-warn channel
14
+ // (M5 / w25) collapses to "directionalCount + pointCount + spotCount === 0";
15
+ // see packages/runtime/README.md section Common pitfalls for the AI-user
16
+ // guidance after the M5 docs land.
17
+ //
18
+ // Naming convention: bare entity name aligned with Bevy ECS conventions
19
+ // (feat-20260513-component-naming-bevy-align). DirectionalLight / SpotLight
20
+ // follow the same single-semantic-entity rule (charter proposition 5).
21
+ //
22
+ // charter mapping: proposition 1 (single import + IDE autocomplete on
23
+ // payload.range) + proposition 3 (silent failure -> explicit failure;
24
+ // spawn-time fail-fast on range<0 / NaN with structured EcsError) +
25
+ // proposition 5 (consistent abstraction: shared payload shape with
26
+ // SpotLight; `range` semantics aligned with KHR_lights_punctual).
27
+
28
+ import { defineComponent } from '@forgeax/engine-ecs';
29
+
30
+ /**
31
+ * Omnidirectional point light (KHR_lights_punctual `point` type).
32
+ *
33
+ * `position` source: the companion `Transform` component on the same entity.
34
+ * Spawn via `world.spawn({ component: Transform, data: ... }, { component: PointLight, data: ... })`
35
+ * so the render system extract path can join the two via the
36
+ * `[Transform, PointLight]` ECS query.
37
+ *
38
+ * `color` is linear-space rgb in `[0, 1]` per channel; `intensity` is candela;
39
+ * `range` is in meters and defaults to `10.0`
40
+ * (KHR convention; `+Infinity` is the KHR no-truncation value, retained
41
+ * for KHR_lights_punctual `range: 0` bridging via `light-helpers.ts`).
42
+ * The runtime window is `clamp(1 - (d / range)^4, 0, 1)^2`; its no-cutoff
43
+ * boundary uses inverse-square decay with the shader safety floor. Exposure is
44
+ * applied after lighting and never multiplied into intensity.
45
+ *
46
+ * @example Spawn a single point light at (5, 3, 5):
47
+ * world.spawn(
48
+ * { component: Transform, data: { pos: [5, 3, 5] } },
49
+ * { component: PointLight, data: { intensity: 8, range: 25 } },
50
+ * );
51
+ *
52
+ * @example Minimal spawn -- defaults give neutral white at full strength, range 10m:
53
+ * world.spawn(
54
+ * { component: Transform, data: { pos: [0, 1, 0] } },
55
+ * { component: PointLight, data: {} },
56
+ * );
57
+ * // resolves to color=[1, 1, 1], intensity=1, range=10.0.
58
+ */
59
+ export const PointLight = defineComponent('PointLight', {
60
+ // color carries an explicit layer-2 default [1,1,1] (white); the array
61
+ // layer-3 fallback is all-zero, so the default MUST be explicit (D-5).
62
+ color: { type: 'array<f32, 3>', default: new Float32Array([1, 1, 1]) },
63
+ intensity: { type: 'f32', default: 1 },
64
+ range: { type: 'f32', default: 10.0 },
65
+ });
@@ -0,0 +1,40 @@
1
+ import { defineComponent } from '@forgeax/engine-ecs';
2
+
3
+ /** Public point raster shapes backed by the ECS enum column. */
4
+ export type PointShape = keyof typeof PointShapeValue;
5
+
6
+ /** Numeric labels stored by the public Points shape enum field. */
7
+ export const PointShapeValue = Object.freeze({
8
+ square: 0,
9
+ circle: 1,
10
+ } as const);
11
+
12
+ /** Decode the Points shape column without treating an unknown value as valid. */
13
+ export function pointShapeFromU32(value: number): PointShape | undefined {
14
+ switch (value) {
15
+ case PointShapeValue.square:
16
+ return 'square';
17
+ case PointShapeValue.circle:
18
+ return 'circle';
19
+ default:
20
+ return undefined;
21
+ }
22
+ }
23
+
24
+ /** Screen-space point style. Geometry and material remain on their own owners. */
25
+ export const Points = defineComponent(
26
+ 'Points',
27
+ {
28
+ sizePx: { type: 'f32', default: 4 },
29
+ shape: { type: 'enum', default: PointShapeValue.square, labels: PointShapeValue },
30
+ },
31
+ {
32
+ meta: {
33
+ quickStart: 'Attach Points to render point-list MeshAsset vertices in screen pixels.',
34
+ diagnostics: 'Inspect sizePx and decode shape with pointShapeFromU32.',
35
+ recovery: 'Use points-lines-invalid-style for non-finite or non-positive sizePx values.',
36
+ boundaries:
37
+ 'Points owns raster size and shape only; MeshFilter and MeshRenderer own geometry and material.',
38
+ },
39
+ },
40
+ );
@@ -0,0 +1,35 @@
1
+ // @forgeax/engine-render - PostProcessParams component.
2
+ //
3
+ // Schema: { shader: 'string', data: 'buffer' }.
4
+ //
5
+ // `shader` identifies the fullscreen post-process shader (the same id as passed to
6
+ // the feature host registers for `id`). `data` carries the per-frame params
7
+ // bytes as a variable-byte ECS managed buffer slot. The write side (world.spawn /
8
+ // world.set) accepts every AllowSharedBufferSource (Float32Array / ArrayBuffer /
9
+ // Uint8Array / typed array) and the ECS normalizes it to Uint8Array bytes
10
+ // (feat-20260621 V2 / AC-A4); the read side (world.get) returns Uint8Array, which
11
+ // satisfies AllowSharedBufferSource for GPU queue.writeBuffer ingestion.
12
+ //
13
+ // Single-semantic component — drops the `Component` suffix
14
+ // (AGENTS.md §Component naming rule #1). The `data` field uses the ECS 'buffer'
15
+ // vocab keyword (plan-strategy D-7) for variable-byte storage.
16
+ //
17
+ // Data flow (plan-strategy D-1):
18
+ // extract -> iterate PostProcessParams-bearing entities ->
19
+ // collect into Map<shaderId, AllowSharedBufferSource> snapshot ->
20
+ // dispatchFullscreenPass picks up per-shader data -> writeBuffer to eager UBO.
21
+ //
22
+ // Decision anchors:
23
+ // - requirements AC-A2 (data-driven, no imperative renderer.setParams mutator)
24
+ // - requirements AC-A4 (AllowSharedBufferSource type on the data field)
25
+ // - plan-strategy D-1 (new single-semantic ECS component for params)
26
+ // - plan-strategy D-7 (ECS 'buffer' vocab keyword for variable-byte storage)
27
+
28
+ import { defineComponent } from '@forgeax/engine-ecs';
29
+
30
+ const schema = {
31
+ shader: 'string',
32
+ data: 'buffer',
33
+ } as const;
34
+
35
+ export const PostProcessParams = defineComponent('PostProcessParams', schema);
@@ -0,0 +1,193 @@
1
+ // @forgeax/engine-runtime - SceneInstance component (feat-20260608-
2
+ // scene-nesting-ecs-fication M2 / w16).
3
+ //
4
+ // Single ECS fat component carrying everything that used to live on the
5
+ // old `SceneInstance` + `SceneInstanceContainer` pair (deleted
6
+ // in M3). Schema fits the ECS schema vocab (3 single-identifier fields):
7
+ //
8
+ // { source: 'shared<SceneAsset>',
9
+ // mapping: 'array<entity>',
10
+ // state: 'unique<SceneInstanceState>' }
11
+ //
12
+ // `source` carries the SceneAsset handle the synthetic root entity was
13
+ // instantiated from (Tier-A AssetUnion handle, AGENTS.md §Assets submodule).
14
+ // `mapping` is the LocalEntityId -> Entity table indexed positionally
15
+ // (mapping[localId] = spawned Entity); the ECS variable-array column gives
16
+ // us a SoA-friendly read path for query<SceneInstance> scans without
17
+ // touching the dynamic Map/Set state.
18
+ // `state` is a `ref<SceneInstanceState>` slot — World holds the live
19
+ // SceneInstanceState payload in its UniqueRefStore and World despawn
20
+ // auto-releases the ref u32 (the same path used by audio / physics
21
+ // payloads, plan-strategy §D-2). Each instantiateScene call calls
22
+ // `world.allocUniqueRef('SceneInstanceState', state)` once and stores the
23
+ // returned u32 in this column.
24
+ //
25
+ // Decision anchors:
26
+ // - plan-strategy §D-2 (single ref wraps SceneInstanceState dynamic
27
+ // structure; ECS schema vocab `\w+` rejects `ref<Map<...>>`)
28
+ // - plan-strategy §3.2 sequence (sequence diagram step 'set ... state:
29
+ // {entityToLocalId, detached, overrides, rootEntities}')
30
+ // - AGENTS.md §Component naming rule #1 (single-semantic component drops
31
+ // `Component` suffix)
32
+ // - charter F1 (single-import barrel: SceneInstance lives in
33
+ // `@forgeax/engine-render` next to Transform / Camera / DirectionalLight)
34
+ // - charter P3 (machine-readable schema: 3 closed fields)
35
+ // - charter P4 (consistent abstraction: instance == entity carrying
36
+ // SceneInstance — same `world.query({ read: [SceneInstance] })` /
37
+ // `world.get(root, SceneInstance)` path as another component)
38
+
39
+ import { defineComponent, type EntityHandle } from '@forgeax/engine-ecs';
40
+ import type { LocalEntityId, MountOverride } from '@forgeax/engine-types';
41
+
42
+ /**
43
+ * Per-component, per-field override record carried in `SceneInstanceState`.
44
+ *
45
+ * Composite key `<componentName>:<fieldName>` keeps the override map flat
46
+ * (single Map nesting level) so AI users walking `state.overrides` see one
47
+ * iteration depth — D-2 prefers a single SSOT over multi-Map nesting that
48
+ * would make iteration order ambiguous (charter F1: single mental model).
49
+ *
50
+ * The value is `unknown` because the per-component schema vocab lives in the
51
+ * ECS layer; runtime fail-fast via `EcsErrorCode = 'scene-override-type-
52
+ * mismatch'` (plan-strategy §D-9) catches type drift on the apply path.
53
+ *
54
+ * @internal Surface from `state.overrides` only; AI users never construct a
55
+ * record directly. Use `world.setSceneOverride(root, member, comp,
56
+ * field, value)` to write and `world.removeSceneOverride(root, member,
57
+ * comp, field)` to roll back to the source SceneAsset value.
58
+ */
59
+ export interface SceneInstanceOverrideRecord {
60
+ readonly comp: string;
61
+ /**
62
+ * Component-granular add-or-patch discriminant (feat-20260713 M1 / w4):
63
+ * present -> this record patches a single field; absent -> it adds/upserts
64
+ * the whole `comp` (M2 apply semantics). Mirrors `MountOverride.field`.
65
+ */
66
+ readonly field?: string;
67
+ readonly value: unknown;
68
+ }
69
+
70
+ /**
71
+ * Dynamic state payload for one SceneInstance — held in the World's
72
+ * UniqueRefStore behind a `ref<SceneInstanceState>` slot on the synthetic
73
+ * root entity. Mirrors the old class-based layout (plan-strategy §D-2 +
74
+ * design doc §11.2 internal-state-table) but flattened into plain JS Maps/Sets so
75
+ * AI users can iterate without indirection.
76
+ *
77
+ * Lifecycle:
78
+ * - allocated by `world.instantiateScene(handle, parent?)` — the W in
79
+ * `world.allocUniqueRef('SceneInstanceState', state)` returns the u32
80
+ * slot id stored in the SceneInstance.state column;
81
+ * - released by `world.despawn(root)` (the standard `ref<T>` release loop)
82
+ * or explicitly via `world.despawnScene(root)` / `world.despawnDescendants(root)`.
83
+ *
84
+ * AI users typically reach this struct only through the read path
85
+ * `world.get(root, SceneInstance).state.overrides.get(<comp>:<field>)` for
86
+ * inspection; mutation happens through the 8 World methods.
87
+ */
88
+ export interface SceneInstanceState {
89
+ /**
90
+ * SceneAsset handle the instance was instantiated from. Mirrors the
91
+ * SceneInstance.source column for AI users who already have a
92
+ * SceneInstanceState in hand and want the source handle without a second
93
+ * `world.get` round-trip.
94
+ */
95
+ readonly source: import('@forgeax/engine-types').Handle<'SceneAsset', 'shared'>;
96
+
97
+ /**
98
+ * Reverse mapping (live `Entity` -> source `LocalEntityId`). Used by
99
+ * `world.setSceneOverride` to validate the member entity belongs to this
100
+ * instance + by `world.detachSceneMember` / `world.reattachSceneMember`
101
+ * to translate caller-side Entity values back to their authored localId.
102
+ */
103
+ readonly entityToLocalId: Map<EntityHandle, LocalEntityId>;
104
+
105
+ /**
106
+ * LocalEntityIds of members the AI user marked detached via
107
+ * `world.detachSceneMember(root, member)`. The member entities stay
108
+ * alive in the World; only the bookkeeping marker moves so
109
+ * `world.despawnDescendants(root, { keepDetached: true })` can skip them.
110
+ * Detach is idempotent (set semantics).
111
+ */
112
+ readonly detachedLocalIds: Set<LocalEntityId>;
113
+
114
+ /**
115
+ * Per-member runtime overrides keyed by `<localId>` -> `<comp>:<field>`
116
+ * -> override record. mount-time overrides (authored on the SceneAsset's
117
+ * `mounts[].overrides`) populate this map at instantiate-time so AI
118
+ * users see them via the same read path as runtime
119
+ * `setSceneOverride` writes (single SSOT).
120
+ */
121
+ readonly overrides: Map<LocalEntityId, Map<string, SceneInstanceOverrideRecord>>;
122
+
123
+ /**
124
+ * Top-level root entities of the materialised tree (members without a
125
+ * ChildOf parent at instantiate time). The synthetic root entity that
126
+ * carries the SceneInstance component itself is NOT in this list — it is
127
+ * the parent of every member entity (plan-strategy §3.2 sequence step 7).
128
+ */
129
+ readonly rootEntities: EntityHandle[];
130
+
131
+ /** Synthetic roots of recursively mounted SceneAssets owned by this instance. */
132
+ readonly mountRoots: EntityHandle[];
133
+
134
+ /**
135
+ * Total slot count `entities.length + sum(mounts[].memberCount)` —
136
+ * captured at instantiate-time so cycle / count consistency checks
137
+ * (e.g. `world.getSceneAssetForInstance(root)` symmetry) can compare
138
+ * against the live SceneInstance.mapping column without re-reading the
139
+ * SceneAsset.
140
+ */
141
+ readonly totalSlots: number;
142
+
143
+ /**
144
+ * Mount-time override authored on the parent SceneAsset's `mounts[]`
145
+ * record. Captured at instantiate-time so `world.removeSceneOverride`
146
+ * can fall back to the mount-time value before going to the source
147
+ * SceneAsset value (plan-strategy §D-2).
148
+ */
149
+ readonly mountTimeOverrides: readonly MountOverride[];
150
+ }
151
+
152
+ /**
153
+ * SceneInstance ECS component — synthetic root entity payload for one
154
+ * materialised SceneAsset (instance == entity carrying SceneInstance,
155
+ * charter P4).
156
+ *
157
+ * AI users discover the component via IDE autocomplete on
158
+ * `@forgeax/engine-render` (single-import barrel; AGENTS.md §Components):
159
+ *
160
+ * ```ts
161
+ * import { SceneInstance } from '@forgeax/engine-render';
162
+ * for (const row of world.query({ read: [SceneInstance] }).unwrap()) {
163
+ * console.log(`root=${row.entity} source=${row.get(SceneInstance).source}`);
164
+ * }
165
+ *
166
+ * const inst = world.get(root, SceneInstance).value;
167
+ * const memberEntity = inst.mapping[localId]; // Uint32Array snapshot
168
+ * for (const detached of inst.state.detachedLocalIds) { /* ... *\/ }
169
+ * ```
170
+ *
171
+ * The component does not register a relationship — synthetic root +
172
+ * members are wired through the standard `ChildOf` (member -> root) so
173
+ * the existing `world.iterDescendants(root)` / Children mirror code paths
174
+ * apply unchanged (plan-strategy §D-5).
175
+ *
176
+ * @example Materialise + inspect a SceneAsset:
177
+ * const { root, diagnostics } = world.instantiateScene(handle).value;
178
+ * const inst = world.get(root, SceneInstance).value;
179
+ * // inst.source === handle, inst.mapping is Uint32Array(totalSlots)
180
+ * // inst.state holds entityToLocalId / detachedLocalIds / overrides /
181
+ * // rootEntities / mountRoots / totalSlots / mountTimeOverrides.
182
+ */
183
+ export const SceneInstance = defineComponent(
184
+ 'SceneInstance',
185
+ {
186
+ source: { type: 'shared<SceneAsset>' },
187
+ mapping: { type: 'array<entity>' },
188
+ // The unique slot is the ECS storage seam for the instance's structured
189
+ // runtime payload; keep the nested semantic visible to schema consumers.
190
+ state: { type: 'unique<SceneInstanceState>', shape: 'nested' },
191
+ },
192
+ { transient: true },
193
+ );
@@ -0,0 +1,103 @@
1
+ // @forgeax/engine-runtime - SkyboxBackground (environment cubemap render background).
2
+ //
3
+ // Schema: 3 fields -- equirect (Handle<EquirectAsset>, u32-stored handle)
4
+ // + mode (f32 enum column, discriminator) + rotation (quaternion xyzw,
5
+ // default identity). Naming convention follows the
6
+ // single-semantic component rule: no Component suffix (AGENTS.md rule #1).
7
+ //
8
+ // feat-20260630-equirect-kind-internalized-ibl-declarative-skyligh M3 / w16:
9
+ // the field is `equirect: shared<EquirectAsset>` (the retired
10
+ // `cubemap: shared<CubeTextureAsset>` is gone). The skybox reuses the same
11
+ // equirect handle as the Skylight; the cubemap projection is internal and
12
+ // driven by the render-system record arm (no user upload call).
13
+ //
14
+ // Plan-strategy D-5: mode is a f32 enum column (ECS columns are POD, no
15
+ // string unions in archetype storage). Consumer-facing type safety is
16
+ // provided by the `SkyboxMode` literal union + `skyboxModeFromF32` mapper
17
+ // (same pattern as cameraProjectionFromF32 in camera.ts:51,105,145,221-237).
18
+ //
19
+ // OOS-1: `mode: 'atmosphere'` implementation is deferred -- the union
20
+ // shape leaves room for additive growth without breaking the f32 enum
21
+ // encoding.
22
+ //
23
+ // AI user minimum spawn (charter P4):
24
+ // world.spawn({ component: SkyboxBackground, data: { equirect, mode: 0 } });
25
+ //
26
+ // Single component activates the skybox render pass transparently when a
27
+ // Skylight + tonemap active camera is present (skybox reuses the same
28
+ // equirect handle as Skylight).
29
+
30
+ import { defineComponent } from '@forgeax/engine-ecs';
31
+
32
+ /**
33
+ * Skybox mode literal union (AC-02 narrowing surface).
34
+ * Currently only 'cubemap' -- future 'atmosphere' deferred per OOS-1.
35
+ */
36
+ export type SkyboxMode = 'cubemap';
37
+
38
+ /** Numeric encoding of cubemap skybox mode (schema value for `mode`). */
39
+ export const SKYBOX_MODE_CUBEMAP = 0;
40
+
41
+ /**
42
+ * Map a `SkyboxBackground.mode` numeric value to the closed `SkyboxMode`
43
+ * string-literal union. Only member currently is 'cubemap'; the exhaustive
44
+ * switch is ready for future mode additions (e.g. 'atmosphere', OOS-1).
45
+ */
46
+ export function skyboxModeFromF32(value: number): SkyboxMode {
47
+ switch (value) {
48
+ case SKYBOX_MODE_CUBEMAP:
49
+ return 'cubemap';
50
+ // Future: case SKYBOX_MODE_ATMOSPHERE: return 'atmosphere';
51
+ }
52
+ // Unrecognised value: fall back to 'cubemap' (charter P3 -- no silent
53
+ // exception; the fallback preserves rendering on stale numerics while
54
+ // the exhaustive switch shape ensures AI users catch new members at
55
+ // compile time when a mode is added).
56
+ return 'cubemap';
57
+ }
58
+
59
+ /**
60
+ * SkyboxBackground: full-screen environment cubemap background.
61
+ *
62
+ * Renders a fullscreen triangle that reconstructs world-space view
63
+ * direction from the camera's inverseViewProj matrix (View UBO),
64
+ * samples a cubemap with the view direction, and writes an HDR color
65
+ * to the hdrColor render target (before the main geometry pass).
66
+ *
67
+ * The skybox pass is automatically activated when a SkyboxBackground
68
+ * entity exists, a Skylight entity provides the equirect source, and the
69
+ * active Camera has tonemap active. The skybox reuses the same equirect
70
+ * handle as the Skylight entity -- two independent components sharing the
71
+ * same GPU resource (the internally-projected cubemap).
72
+ *
73
+ * `equirect` is a `Handle<EquirectAsset>` resolved from a vite pack-index
74
+ * GUID via `engine.assets.loadByGuid<EquirectAsset>(guid)`. The cubemap
75
+ * projection is internal and driven by the render-system record arm; there
76
+ * is no user upload call.
77
+ *
78
+ * `mode` is a numeric discriminator column (`'f32'`). Use
79
+ * `SKYBOX_MODE_CUBEMAP` for the cubemap render path.
80
+ *
81
+ * `rotation` is an environment-space quaternion in `[x, y, z, w]` order.
82
+ * It rotates the sampled cubemap without changing the camera or rebaking the
83
+ * source equirectangular asset.
84
+ *
85
+ * @example Minimum spawn (defaults mode=0):
86
+ * // equirectHandle resolved from loadByGuid<EquirectAsset> (same handle as
87
+ * // the Skylight).
88
+ * world.spawn({ component: SkyboxBackground, data: { equirect: equirectHandle } });
89
+ *
90
+ * @example Single handle shared between Skylight (IBL) and SkyboxBackground:
91
+ * const hdrRes = await engine.assets.loadByGuid<EquirectAsset>(guid);
92
+ * if (!hdrRes.ok) throw hdrRes.error;
93
+ * world.spawn({ component: Skylight, data: { equirect: hdrRes.value } });
94
+ * world.spawn({ component: SkyboxBackground, data: { equirect: hdrRes.value } });
95
+ */
96
+ export const SkyboxBackground = defineComponent('SkyboxBackground', {
97
+ // The GPU skybox projection is render-owned presentation state; restore
98
+ // keeps the portable mode/rotation controls and lets the owner re-resolve
99
+ // the environment asset on the target world.
100
+ equirect: { type: 'shared<EquirectAsset>', simulationTransient: true },
101
+ mode: { type: 'f32', default: SKYBOX_MODE_CUBEMAP },
102
+ rotation: { type: 'array<f32, 4>', default: new Float32Array([0, 0, 0, 1]) },
103
+ });
@@ -0,0 +1,97 @@
1
+ // @forgeax/engine-runtime - Skylight (ambient environment light).
2
+ //
3
+ // Schema: 4 fields -- equirect (Handle<EquirectAsset>, u32-stored handle,
4
+ // OPTIONAL) + color (array<f32,3>, default [1,1,1] = white) + intensity (f32,
5
+ // default 1.0) + rotation (quaternion xyzw, default identity). feat-20260709 M2 collapsed colorR/G/B into one inline
6
+ // array<f32,3> column. Naming convention follows the DirectionalLight / PointLight /
7
+ // SpotLight family: no Component suffix (AGENTS.md rule #1).
8
+ //
9
+ // Plan-strategy D-6: Skylight component schema is registered but no
10
+ // independent ECS system is created. All Skylight processing happens inside
11
+ // RenderSystem's extract/record phases.
12
+ //
13
+ // AI user minimum spawn (AC-13, charter P4):
14
+ // world.spawn({ component: Skylight, data: {} }); // instant white ambient
15
+ //
16
+ // A single Skylight activates ambient lighting transparently. The `equirect`
17
+ // field is OPTIONAL: omit it for a constant solid-color ambient that needs NO
18
+ // async GPU precompute -- the engine binds a 1x1 white irradiance cube, so
19
+ // ambient = color * intensity * albedo is live on the very first frame (this
20
+ // is the fix for the downstream "scene is black until the async IBL cubemap
21
+ // finishes uploading" gap). Supply an equirect to upgrade to full image-based
22
+ // lighting (diffuse irradiance + specular prefilter); `color` * `intensity`
23
+ // still scales the IBL result, so both are live dynamic dials either way.
24
+ //
25
+ // feat-20260630-equirect-kind-internalized-ibl-declarative-skyligh M3 / w16:
26
+ // the field is `equirect: shared<EquirectAsset>` (the retired
27
+ // `cubemap: shared<CubeTextureAsset>` is gone). AI users declare the equirect
28
+ // source directly; the render-system record arm projects the cubemap + IBL
29
+ // chain internally and lazily (no user upload call) -- there is no
30
+ // uploadCubemapFromEquirect on the public surface.
31
+ //
32
+ // Edge cases handled by w18 / w19:
33
+ // - Multi-Skylight: first archetype hit wins, console.warn in dev+prod
34
+ // - intensity=0: ambient term = 0, mathematically valid, no warn
35
+ // - No equirect: solid-color ambient via the white fallback cube (no async)
36
+
37
+ import { defineComponent } from '@forgeax/engine-ecs';
38
+
39
+ /**
40
+ * Skylight ambient environment light.
41
+ *
42
+ * A single Skylight entity provides ambient lighting for all StandardMaterial
43
+ * surfaces. Two modes share one component:
44
+ *
45
+ * - **Solid-color ambient (no equirect).** Omit `equirect` for a constant
46
+ * ambient = `color` * `intensity` applied immediately, with no async GPU
47
+ * precompute. The engine samples a built-in 1x1 white irradiance cube, so a
48
+ * freshly-loaded scene is lit on its first frame instead of being black
49
+ * until an IBL upload finishes.
50
+ * - **Image-based lighting (with equirect).** Supply `equirect` to upgrade to
51
+ * diffuse irradiance + specular prefilter IBL. The engine runs the full
52
+ * precompute (equirect->cubemap, irradiance convolution, prefilter mip
53
+ * chain, BRDF LUT) transparently inside the render-system record arm;
54
+ * `color` * `intensity` then scale the IBL ambient.
55
+ *
56
+ * `equirect` is an OPTIONAL `Handle<EquirectAsset>` resolved from a vite
57
+ * pack-index GUID via `engine.assets.loadByGuid<EquirectAsset>(guid)`. The
58
+ * cubemap projection is internal and idempotent: the same equirect source
59
+ * always resolves to the same GPU cubemap (no user upload call).
60
+ *
61
+ * `color` is the linear-space ambient tint (default white [1, 1, 1]).
62
+ * `intensity` is a linear multiplier (default 1.0; 0 disables ambient). Both
63
+ * are read every frame, so they are live dynamic dials.
64
+ *
65
+ * `rotation` is an environment-space quaternion in `[x, y, z, w]` order.
66
+ * The default identity quaternion leaves the source orientation unchanged;
67
+ * changing it rotates the IBL at sample time without rebaking the source.
68
+ *
69
+ * @example Instant white ambient (no asset, no async):
70
+ * world.spawn({ component: Skylight, data: {} });
71
+ *
72
+ * @example Dim warm ambient:
73
+ * world.spawn({ component: Skylight, data: { color: [1, 0.9, 0.8], intensity: 0.3 } }); // color is [r, g, b]
74
+ *
75
+ * @example Full IBL from an HDR equirect (declarative -- no upload call):
76
+ * // 1. resolve GUID from vite pack-index (see forgeax-engine-vite-plugin-pack)
77
+ * import { AssetGuid } from '@forgeax/engine-pack/guid';
78
+ * const guidRes = AssetGuid.parse('019e4a26-3c29-7420-af5d-20f2724a16b0');
79
+ * if (!guidRes.ok) throw guidRes.error;
80
+ * // 2. load the HDR equirect via the GUID-addressed pack route
81
+ * const hdrRes = await engine.assets.loadByGuid<EquirectAsset>(guidRes.value);
82
+ * if (!hdrRes.ok) throw hdrRes.error;
83
+ * // 3. spawn the Skylight — the equirect handle activates the full IBL path;
84
+ * // the cubemap + IBL precompute happen lazily inside the record arm.
85
+ * world.spawn({ component: Skylight, data: { equirect: hdrRes.value } });
86
+ */
87
+ export const Skylight = defineComponent('Skylight', {
88
+ // The GPU equirect-to-cubemap projection is render-owned presentation
89
+ // state. Record/restore preserves the portable lighting controls while the
90
+ // render owner resolves this asset again on the target world.
91
+ equirect: { type: 'shared<EquirectAsset>', simulationTransient: true },
92
+ // color carries an explicit layer-2 default [1,1,1] (white); the array
93
+ // layer-3 fallback is all-zero, so the default MUST be explicit (D-5).
94
+ color: { type: 'array<f32, 3>', default: new Float32Array([1, 1, 1]) },
95
+ intensity: { type: 'f32', default: 1.0 },
96
+ rotation: { type: 'array<f32, 4>', default: new Float32Array([0, 0, 0, 1]) },
97
+ });