@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.
- package/LICENSE +202 -0
- package/README.md +647 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/__tests__/authoring-path.unit.test.d.ts +2 -0
- package/dist/__tests__/authoring-path.unit.test.d.ts.map +1 -0
- package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts +2 -0
- package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts.map +1 -0
- package/dist/__tests__/callback-inference.test-d.d.ts +2 -0
- package/dist/__tests__/callback-inference.test-d.d.ts.map +1 -0
- package/dist/__tests__/cluster-binner.test.d.ts +2 -0
- package/dist/__tests__/cluster-binner.test.d.ts.map +1 -0
- package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/construct-renderer-identity.unit.test.d.ts +2 -0
- package/dist/__tests__/construct-renderer-identity.unit.test.d.ts.map +1 -0
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts +2 -0
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts +2 -0
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts.map +1 -0
- package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts +2 -0
- package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts.map +1 -0
- package/dist/__tests__/direct-light-snapshot.unit.test.d.ts +2 -0
- package/dist/__tests__/direct-light-snapshot.unit.test.d.ts.map +1 -0
- package/dist/__tests__/factory-contract.integration.test.d.ts +2 -0
- package/dist/__tests__/factory-contract.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/frame-observation.contract.test.d.ts +2 -0
- package/dist/__tests__/frame-observation.contract.test.d.ts.map +1 -0
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts +2 -0
- package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts +6 -0
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-production.integration.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-production.integration.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts +18 -0
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view-reference.d.ts +15 -0
- package/dist/__tests__/gpu-driven-view-reference.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view.browser.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-view.browser.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view.dawn.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-view.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-view.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts +7 -0
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-schema.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene-schema.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene.dawn.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene.unit.test.d.ts.map +1 -0
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts +2 -0
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts.map +1 -0
- package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts +2 -0
- package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts.map +1 -0
- package/dist/__tests__/injection-kind-owner.test-d.d.ts +2 -0
- package/dist/__tests__/injection-kind-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts +2 -0
- package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/light-buffer-layout.unit.test.d.ts +2 -0
- package/dist/__tests__/light-buffer-layout.unit.test.d.ts.map +1 -0
- package/dist/__tests__/material-contract-inventory.unit.test.d.ts +2 -0
- package/dist/__tests__/material-contract-inventory.unit.test.d.ts.map +1 -0
- package/dist/__tests__/material-cooked-projection.unit.test.d.ts +2 -0
- package/dist/__tests__/material-cooked-projection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts +2 -0
- package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts.map +1 -0
- package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts +2 -0
- package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts.map +1 -0
- package/dist/__tests__/material-stride-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/material-stride-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-material-bindings.unit.test.d.ts +2 -0
- package/dist/__tests__/mesh-material-bindings.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-stride-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/mesh-stride-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts +2 -0
- package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts +2 -0
- package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts.map +1 -0
- package/dist/__tests__/morph-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/morph-feature-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/morph-visual-evidence.integration.test.d.ts +2 -0
- package/dist/__tests__/morph-visual-evidence.integration.test.d.ts.map +1 -0
- package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts +2 -0
- package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-store.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-store.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts.map +1 -0
- package/dist/__tests__/profiler-default-off.test.d.ts +2 -0
- package/dist/__tests__/profiler-default-off.test.d.ts.map +1 -0
- package/dist/__tests__/profiler-phase-catalog.test.d.ts +2 -0
- package/dist/__tests__/profiler-phase-catalog.test.d.ts.map +1 -0
- package/dist/__tests__/profiler-phase-integration.test.d.ts +2 -0
- package/dist/__tests__/profiler-phase-integration.test.d.ts.map +1 -0
- package/dist/__tests__/profiler-phase-token.test.d.ts +2 -0
- package/dist/__tests__/profiler-phase-token.test.d.ts.map +1 -0
- package/dist/__tests__/public-surface.test-d.d.ts +2 -0
- package/dist/__tests__/public-surface.test-d.d.ts.map +1 -0
- package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-error-code-owner.test-d.d.ts +2 -0
- package/dist/__tests__/render-error-code-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-error-detail-ssot.test-d.d.ts +2 -0
- package/dist/__tests__/render-error-detail-ssot.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts +2 -0
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-assembly.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-assembly.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-context.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-context.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-contract.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-contract.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-docs.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-docs.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-errors.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-errors.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts +2 -0
- package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-plan.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-plan.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-public-surface.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-public-surface.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-retry.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-retry.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-scheduling.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-scheduling.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-visibility-context.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-visibility-context.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-zero-work.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-zero-work.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-compute-raster-gpu.d.ts +7 -0
- package/dist/__tests__/render-graph-compute-raster-gpu.d.ts.map +1 -0
- package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts +2 -0
- package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts +2 -0
- package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-hzb-gpu.d.ts +7 -0
- package/dist/__tests__/render-graph-hzb-gpu.d.ts.map +1 -0
- package/dist/__tests__/render-graph-hzb.browser.test.d.ts +2 -0
- package/dist/__tests__/render-graph-hzb.browser.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-hzb.dawn.test.d.ts +2 -0
- package/dist/__tests__/render-graph-hzb.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-primitives.unit.test.d.ts +2 -0
- package/dist/__tests__/render-graph-primitives.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts +12 -0
- package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts.map +1 -0
- package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts +2 -0
- package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts +2 -0
- package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/render-scene-projection.unit.test.d.ts +2 -0
- package/dist/__tests__/render-scene-projection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts +2 -0
- package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-lifecycle.integration.test.d.ts +2 -0
- package/dist/__tests__/renderer-lifecycle.integration.test.d.ts.map +1 -0
- package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts +2 -0
- package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts.map +1 -0
- package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts +2 -0
- package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts.map +1 -0
- package/dist/__tests__/shader-stage-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/shader-stage-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/ssao-config.unit.test.d.ts +2 -0
- package/dist/__tests__/ssao-config.unit.test.d.ts.map +1 -0
- package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts +2 -0
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts.map +1 -0
- package/dist/__tests__/standard-descriptors.test-d.d.ts +2 -0
- package/dist/__tests__/standard-descriptors.test-d.d.ts.map +1 -0
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts +2 -0
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/standard-pipeline.integration.test.d.ts +2 -0
- package/dist/__tests__/standard-pipeline.integration.test.d.ts.map +1 -0
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts +2 -0
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/surface-configuration.unit.test.d.ts +2 -0
- package/dist/__tests__/surface-configuration.unit.test.d.ts.map +1 -0
- package/dist/__tests__/texture-usage-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/texture-usage-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts +2 -0
- package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts.map +1 -0
- package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts +2 -0
- package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts.map +1 -0
- package/dist/__tests__/urp-pipeline.unit.test.d.ts +2 -0
- package/dist/__tests__/urp-pipeline.unit.test.d.ts.map +1 -0
- package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts +2 -0
- package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts.map +1 -0
- package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts +2 -0
- package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-diagnostics.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-diagnostics.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-extract.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-extract.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-extract.perf.test.d.ts +2 -0
- package/dist/__tests__/visibility-extract.perf.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-hidden-report.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-hidden-report.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-instances.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-instances.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-multi-world.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-multi-world.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-public-surface.test-d.d.ts +2 -0
- package/dist/__tests__/visibility-public-surface.test-d.d.ts.map +1 -0
- package/dist/__tests__/visibility-resolver.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-resolver.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts.map +1 -0
- package/dist/__tests__/vocabulary.unit.test.d.ts +2 -0
- package/dist/__tests__/vocabulary.unit.test.d.ts.map +1 -0
- package/dist/assembly/backend-contract.d.ts +37 -0
- package/dist/assembly/backend-contract.d.ts.map +1 -0
- package/dist/assembly/factory.d.ts +207 -0
- package/dist/assembly/factory.d.ts.map +1 -0
- package/dist/assembly/host-contract.d.ts +84 -0
- package/dist/assembly/host-contract.d.ts.map +1 -0
- package/dist/assembly/material/assembly.d.ts +21 -0
- package/dist/assembly/material/assembly.d.ts.map +1 -0
- package/dist/assembly/material/pipeline-projection.d.ts +30 -0
- package/dist/assembly/material/pipeline-projection.d.ts.map +1 -0
- package/dist/assets/asset-decoders.d.ts +5 -0
- package/dist/assets/asset-decoders.d.ts.map +1 -0
- package/dist/assets/render-asset-port.d.ts +17 -0
- package/dist/assets/render-asset-port.d.ts.map +1 -0
- package/dist/assets/resolve-render-asset.d.ts +6 -0
- package/dist/assets/resolve-render-asset.d.ts.map +1 -0
- package/dist/authoring.d.ts +12 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.mjs +27 -0
- package/dist/authoring.mjs.map +1 -0
- package/dist/chunk-CQXZC5XI.mjs +182 -0
- package/dist/chunk-CQXZC5XI.mjs.map +1 -0
- package/dist/chunk-HCOGPHKS.mjs +93 -0
- package/dist/chunk-HCOGPHKS.mjs.map +1 -0
- package/dist/chunk-YEJIUW7D.mjs +1152 -0
- package/dist/chunk-YEJIUW7D.mjs.map +1 -0
- package/dist/cluster-binner.d.ts +152 -0
- package/dist/cluster-binner.d.ts.map +1 -0
- package/dist/components/__tests__/points-lines-admission.unit.test.d.ts +2 -0
- package/dist/components/__tests__/points-lines-admission.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/points-lines-schema.unit.test.d.ts +2 -0
- package/dist/components/__tests__/points-lines-schema.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/schema-contract.unit.test.d.ts +2 -0
- package/dist/components/__tests__/schema-contract.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/schema-parity.unit.test.d.ts +2 -0
- package/dist/components/__tests__/schema-parity.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/visibility-schema.unit.test.d.ts +2 -0
- package/dist/components/__tests__/visibility-schema.unit.test.d.ts.map +1 -0
- package/dist/components/camera.d.ts +311 -0
- package/dist/components/camera.d.ts.map +1 -0
- package/dist/components/directional-light.d.ts +76 -0
- package/dist/components/directional-light.d.ts.map +1 -0
- package/dist/components/glyph-text.d.ts +26 -0
- package/dist/components/glyph-text.d.ts.map +1 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/instances.d.ts +41 -0
- package/dist/components/instances.d.ts.map +1 -0
- package/dist/components/layer.d.ts +34 -0
- package/dist/components/layer.d.ts.map +1 -0
- package/dist/components/light-helpers.d.ts +53 -0
- package/dist/components/light-helpers.d.ts.map +1 -0
- package/dist/components/lines.d.ts +5 -0
- package/dist/components/lines.d.ts.map +1 -0
- package/dist/components/mesh-filter.d.ts +24 -0
- package/dist/components/mesh-filter.d.ts.map +1 -0
- package/dist/components/mesh-renderer.d.ts +33 -0
- package/dist/components/mesh-renderer.d.ts.map +1 -0
- package/dist/components/point-light-shadow.d.ts +27 -0
- package/dist/components/point-light-shadow.d.ts.map +1 -0
- package/dist/components/point-light.d.ts +35 -0
- package/dist/components/point-light.d.ts.map +1 -0
- package/dist/components/points.d.ts +15 -0
- package/dist/components/points.d.ts.map +1 -0
- package/dist/components/post-process-params.d.ts +5 -0
- package/dist/components/post-process-params.d.ts.map +1 -0
- package/dist/components/scene-instance.d.ts +140 -0
- package/dist/components/scene-instance.d.ts.map +1 -0
- package/dist/components/skybox-background.d.ts +56 -0
- package/dist/components/skybox-background.d.ts.map +1 -0
- package/dist/components/skylight.d.ts +55 -0
- package/dist/components/skylight.d.ts.map +1 -0
- package/dist/components/sort-key.d.ts +44 -0
- package/dist/components/sort-key.d.ts.map +1 -0
- package/dist/components/spot-light.d.ts +81 -0
- package/dist/components/spot-light.d.ts.map +1 -0
- package/dist/components/sprite-animation.d.ts +74 -0
- package/dist/components/sprite-animation.d.ts.map +1 -0
- package/dist/components/sprite-instances.d.ts +51 -0
- package/dist/components/sprite-instances.d.ts.map +1 -0
- package/dist/components/sprite-playback-mode.d.ts +42 -0
- package/dist/components/sprite-playback-mode.d.ts.map +1 -0
- package/dist/components/sprite-region-override.d.ts +46 -0
- package/dist/components/sprite-region-override.d.ts.map +1 -0
- package/dist/components/tile-layer.d.ts +106 -0
- package/dist/components/tile-layer.d.ts.map +1 -0
- package/dist/components/tilemap.d.ts +25 -0
- package/dist/components/tilemap.d.ts.map +1 -0
- package/dist/components/visibility.d.ts +22 -0
- package/dist/components/visibility.d.ts.map +1 -0
- package/dist/construct-renderer.d.ts +19 -0
- package/dist/construct-renderer.d.ts.map +1 -0
- package/dist/construct-renderer.mjs +27462 -0
- package/dist/construct-renderer.mjs.map +1 -0
- package/dist/debug-draw-glue.d.ts +5 -0
- package/dist/debug-draw-glue.d.ts.map +1 -0
- package/dist/device/device-scope.d.ts +83 -0
- package/dist/device/device-scope.d.ts.map +1 -0
- package/dist/device/gpu-residency.d.ts +337 -0
- package/dist/device/gpu-residency.d.ts.map +1 -0
- package/dist/device/resource-types.d.ts +8 -0
- package/dist/device/resource-types.d.ts.map +1 -0
- package/dist/engine-metrics.d.ts +23 -0
- package/dist/engine-metrics.d.ts.map +1 -0
- package/dist/errors/ecs-validation.d.ts +3 -0
- package/dist/errors/ecs-validation.d.ts.map +1 -0
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/recover.d.ts +105 -0
- package/dist/errors/recover.d.ts.map +1 -0
- package/dist/errors/render.d.ts +705 -0
- package/dist/errors/render.d.ts.map +1 -0
- package/dist/extract/visibility.d.ts +26 -0
- package/dist/extract/visibility.d.ts.map +1 -0
- package/dist/features/fullscreen.d.ts +19 -0
- package/dist/features/fullscreen.d.ts.map +1 -0
- package/dist/features/host.d.ts +106 -0
- package/dist/features/host.d.ts.map +1 -0
- package/dist/features/morph/morph-feature.d.ts +79 -0
- package/dist/features/morph/morph-feature.d.ts.map +1 -0
- package/dist/features/plan.d.ts +182 -0
- package/dist/features/plan.d.ts.map +1 -0
- package/dist/features/prepared-gpu-work.d.ts +117 -0
- package/dist/features/prepared-gpu-work.d.ts.map +1 -0
- package/dist/features/prepared-graphics-store.d.ts +66 -0
- package/dist/features/prepared-graphics-store.d.ts.map +1 -0
- package/dist/features/prepared-graphics.d.ts +215 -0
- package/dist/features/prepared-graphics.d.ts.map +1 -0
- package/dist/features/render-graph-compute.d.ts +13 -0
- package/dist/features/render-graph-compute.d.ts.map +1 -0
- package/dist/features/render-graph-contribution.d.ts +12 -0
- package/dist/features/render-graph-contribution.d.ts.map +1 -0
- package/dist/features/render-graph-raster.d.ts +38 -0
- package/dist/features/render-graph-raster.d.ts.map +1 -0
- package/dist/features/render-graph-resources.d.ts +11 -0
- package/dist/features/render-graph-resources.d.ts.map +1 -0
- package/dist/features/targets.d.ts +32 -0
- package/dist/features/targets.d.ts.map +1 -0
- package/dist/features/types.d.ts +68 -0
- package/dist/features/types.d.ts.map +1 -0
- package/dist/features/vocabulary.d.ts +14 -0
- package/dist/features/vocabulary.d.ts.map +1 -0
- package/dist/fullscreen-post-process-pass.d.ts +157 -0
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -0
- package/dist/glyph-text-layout-system.d.ts +19 -0
- package/dist/glyph-text-layout-system.d.ts.map +1 -0
- package/dist/gpu-driven/batch-topology.d.ts +55 -0
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -0
- package/dist/gpu-driven/production-raster.d.ts +51 -0
- package/dist/gpu-driven/production-raster.d.ts.map +1 -0
- package/dist/gpu-driven/view-gpu.d.ts +85 -0
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -0
- package/dist/gpu-resource.d.ts +73 -0
- package/dist/gpu-resource.d.ts.map +1 -0
- package/dist/gpu-scene-schema.d.ts +78 -0
- package/dist/gpu-scene-schema.d.ts.map +1 -0
- package/dist/gpu-scene.d.ts +55 -0
- package/dist/gpu-scene.d.ts.map +1 -0
- package/dist/gpu-stage.d.ts +4 -0
- package/dist/gpu-stage.d.ts.map +1 -0
- package/dist/gpu-texture-usage.d.ts +6 -0
- package/dist/gpu-texture-usage.d.ts.map +1 -0
- package/dist/gpu-usage.d.ts +9 -0
- package/dist/gpu-usage.d.ts.map +1 -0
- package/dist/hdrp-buffers.d.ts +163 -0
- package/dist/hdrp-buffers.d.ts.map +1 -0
- package/dist/ibl/IblPipelineCache.d.ts +168 -0
- package/dist/ibl/IblPipelineCache.d.ts.map +1 -0
- package/dist/ibl/skylight-bind-group.d.ts +130 -0
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +169 -0
- package/dist/index.mjs.map +1 -0
- package/dist/inspection-types.d.ts +72 -0
- package/dist/inspection-types.d.ts.map +1 -0
- package/dist/instance-buffer-cache.d.ts +56 -0
- package/dist/instance-buffer-cache.d.ts.map +1 -0
- package/dist/internal.d.ts +2 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.mjs +3 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/lifecycle.d.ts +62 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/light-buffer-layout.d.ts +164 -0
- package/dist/light-buffer-layout.d.ts.map +1 -0
- package/dist/materials.d.ts +47 -0
- package/dist/materials.d.ts.map +1 -0
- package/dist/mesh-material-bindings.d.ts +43 -0
- package/dist/mesh-material-bindings.d.ts.map +1 -0
- package/dist/pbr-pipeline.d.ts +301 -0
- package/dist/pbr-pipeline.d.ts.map +1 -0
- package/dist/pipeline/standard-forward-lane.d.ts +5 -0
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -0
- package/dist/pipeline/standard-pipeline.d.ts +31 -0
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -0
- package/dist/pipeline/standard-profile.d.ts +40 -0
- package/dist/pipeline/standard-profile.d.ts.map +1 -0
- package/dist/pipeline-builder.d.ts +122 -0
- package/dist/pipeline-builder.d.ts.map +1 -0
- package/dist/pipeline-spec-types.d.ts +24 -0
- package/dist/pipeline-spec-types.d.ts.map +1 -0
- package/dist/pipeline-spec.d.ts +367 -0
- package/dist/pipeline-spec.d.ts.map +1 -0
- package/dist/plugin.d.ts +4 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/points-lines/__tests__/bounds.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/bounds.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/inspection.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/inspection.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/points-lines.bench.d.ts +2 -0
- package/dist/points-lines/__tests__/points-lines.bench.d.ts.map +1 -0
- package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/snapshot.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/snapshot.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts.map +1 -0
- package/dist/points-lines/admission.d.ts +36 -0
- package/dist/points-lines/admission.d.ts.map +1 -0
- package/dist/points-lines/bounds.d.ts +8 -0
- package/dist/points-lines/bounds.d.ts.map +1 -0
- package/dist/points-lines/expansion-cache.d.ts +28 -0
- package/dist/points-lines/expansion-cache.d.ts.map +1 -0
- package/dist/points-lines/inspection.d.ts +53 -0
- package/dist/points-lines/inspection.d.ts.map +1 -0
- package/dist/points-lines/prepare.d.ts +67 -0
- package/dist/points-lines/prepare.d.ts.map +1 -0
- package/dist/points-lines/record.d.ts +60 -0
- package/dist/points-lines/record.d.ts.map +1 -0
- package/dist/points-lines/snapshot.d.ts +49 -0
- package/dist/points-lines/snapshot.d.ts.map +1 -0
- package/dist/post-process-errors.d.ts +182 -0
- package/dist/post-process-errors.d.ts.map +1 -0
- package/dist/prepare/prepared-graphics-resolver.d.ts +59 -0
- package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -0
- package/dist/record/__tests__/material-bg-cache.unit.test.d.ts +2 -0
- package/dist/record/__tests__/material-bg-cache.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/material-slot-plan.unit.test.d.ts +2 -0
- package/dist/record/__tests__/material-slot-plan.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts +2 -0
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/video-texture-view.unit.test.d.ts +2 -0
- package/dist/record/__tests__/video-texture-view.unit.test.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts +121 -0
- package/dist/record/frame-lighting.d.ts.map +1 -0
- package/dist/record/frame-snapshot.d.ts +429 -0
- package/dist/record/frame-snapshot.d.ts.map +1 -0
- package/dist/record/frame-targets.d.ts +20 -0
- package/dist/record/frame-targets.d.ts.map +1 -0
- package/dist/record/frame.d.ts +71 -0
- package/dist/record/frame.d.ts.map +1 -0
- package/dist/record/helpers.d.ts +102 -0
- package/dist/record/helpers.d.ts.map +1 -0
- package/dist/record/main-pass-geometry.d.ts +28 -0
- package/dist/record/main-pass-geometry.d.ts.map +1 -0
- package/dist/record/main-pass-material.d.ts +204 -0
- package/dist/record/main-pass-material.d.ts.map +1 -0
- package/dist/record/main-pass-sprite-draws.d.ts +43 -0
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -0
- package/dist/record/main-pass.d.ts +20 -0
- package/dist/record/main-pass.d.ts.map +1 -0
- package/dist/record/mesh-ssbo.d.ts +446 -0
- package/dist/record/mesh-ssbo.d.ts.map +1 -0
- package/dist/record/render-context.d.ts +252 -0
- package/dist/record/render-context.d.ts.map +1 -0
- package/dist/record/shadow-pass.d.ts +52 -0
- package/dist/record/shadow-pass.d.ts.map +1 -0
- package/dist/record/skybox-post-pass.d.ts +33 -0
- package/dist/record/skybox-post-pass.d.ts.map +1 -0
- package/dist/record/typed-frame-graph.d.ts +35 -0
- package/dist/record/typed-frame-graph.d.ts.map +1 -0
- package/dist/record/view-ubo.d.ts +45 -0
- package/dist/record/view-ubo.d.ts.map +1 -0
- package/dist/render-contract.d.ts +424 -0
- package/dist/render-contract.d.ts.map +1 -0
- package/dist/render-data.d.ts +143 -0
- package/dist/render-data.d.ts.map +1 -0
- package/dist/render-graph-primitives.d.ts +76 -0
- package/dist/render-graph-primitives.d.ts.map +1 -0
- package/dist/render-pipeline.d.ts +110 -0
- package/dist/render-pipeline.d.ts.map +1 -0
- package/dist/render-system-extract.d.ts +868 -0
- package/dist/render-system-extract.d.ts.map +1 -0
- package/dist/render-system.d.ts +125 -0
- package/dist/render-system.d.ts.map +1 -0
- package/dist/scene/render-scene-types.d.ts +61 -0
- package/dist/scene/render-scene-types.d.ts.map +1 -0
- package/dist/scene/render-scene.d.ts +112 -0
- package/dist/scene/render-scene.d.ts.map +1 -0
- package/dist/scene-instances/post-spawn-resolve-joints.d.ts +30 -0
- package/dist/scene-instances/post-spawn-resolve-joints.d.ts.map +1 -0
- package/dist/shadow-atlas.d.ts +117 -0
- package/dist/shadow-atlas.d.ts.map +1 -0
- package/dist/ssao-buffers.d.ts +50 -0
- package/dist/ssao-buffers.d.ts.map +1 -0
- package/dist/ssao-config.d.ts +28 -0
- package/dist/ssao-config.d.ts.map +1 -0
- package/dist/systems/active-camera.d.ts +53 -0
- package/dist/systems/active-camera.d.ts.map +1 -0
- package/dist/systems/pass-selector.d.ts +24 -0
- package/dist/systems/pass-selector.d.ts.map +1 -0
- package/dist/systems/skin-palette-allocator.d.ts +49 -0
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -0
- package/dist/systems/skin-palette-types.d.ts +14 -0
- package/dist/systems/skin-palette-types.d.ts.map +1 -0
- package/dist/systems/transparent-sort-config.d.ts +112 -0
- package/dist/systems/transparent-sort-config.d.ts.map +1 -0
- package/dist/tilemap-chunk-extract-system.d.ts +143 -0
- package/dist/tilemap-chunk-extract-system.d.ts.map +1 -0
- package/dist/typed-render-graph-primitives.d.ts +57 -0
- package/dist/typed-render-graph-primitives.d.ts.map +1 -0
- package/dist/typed-shadow-passes.d.ts +11 -0
- package/dist/typed-shadow-passes.d.ts.map +1 -0
- package/package.json +94 -0
- package/src/__tests__/authoring-path.unit.test.ts +23 -0
- package/src/__tests__/backend-selection-rhi-capture.test-d.ts +21 -0
- package/src/__tests__/callback-inference.test-d.ts +8 -0
- package/src/__tests__/cluster-binner.test.ts +272 -0
- package/src/__tests__/cluster-grid-default-surface.unit.test.ts +20 -0
- package/src/__tests__/construct-renderer-identity.unit.test.ts +23 -0
- package/src/__tests__/device-scope-lifecycle.unit.test.ts +151 -0
- package/src/__tests__/device-scope-stale-matrix.unit.test.ts +42 -0
- package/src/__tests__/direct-extract-consumer-contract.test-d.ts +23 -0
- package/src/__tests__/direct-light-snapshot.unit.test.ts +61 -0
- package/src/__tests__/factory-contract.integration.test.ts +280 -0
- package/src/__tests__/fallback-row-stride-surface.unit.test.ts +15 -0
- package/src/__tests__/frame-observation.contract.test.ts +112 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +32 -0
- package/src/__tests__/glyph-text-layout-recovery.unit.test.ts +167 -0
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +350 -0
- package/src/__tests__/gpu-driven-indirect-raster.browser.test.ts +12 -0
- package/src/__tests__/gpu-driven-indirect-raster.dawn.test.ts +16 -0
- package/src/__tests__/gpu-driven-production.integration.test.ts +436 -0
- package/src/__tests__/gpu-driven-scaling.unit.test.ts +87 -0
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +271 -0
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +290 -0
- package/src/__tests__/gpu-driven-view-reference.ts +111 -0
- package/src/__tests__/gpu-driven-view.browser.test.ts +30 -0
- package/src/__tests__/gpu-driven-view.dawn.test.ts +28 -0
- package/src/__tests__/gpu-driven-view.unit.test.ts +199 -0
- package/src/__tests__/gpu-resource-store-stride.unit.test.ts +59 -0
- package/src/__tests__/gpu-scene-render-graph-gpu.ts +308 -0
- package/src/__tests__/gpu-scene-render-graph.browser.test.ts +19 -0
- package/src/__tests__/gpu-scene-render-graph.dawn.test.ts +19 -0
- package/src/__tests__/gpu-scene-schema.unit.test.ts +16 -0
- package/src/__tests__/gpu-scene.dawn.test.ts +205 -0
- package/src/__tests__/gpu-scene.unit.test.ts +147 -0
- package/src/__tests__/ibl/face-uniforms.unit.test.ts +46 -0
- package/src/__tests__/infinite-grid-no-vertex-probe.unit.test.ts +92 -0
- package/src/__tests__/injection-kind-owner.test-d.ts +14 -0
- package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +728 -0
- package/src/__tests__/light-buffer-layout.unit.test.ts +40 -0
- package/src/__tests__/material-contract-inventory.unit.test.ts +24 -0
- package/src/__tests__/material-cooked-projection.unit.test.ts +150 -0
- package/src/__tests__/material-snapshot-mutation.integration.test.ts +53 -0
- package/src/__tests__/material-static-dynamic-route.unit.test.ts +94 -0
- package/src/__tests__/material-stride-surface.unit.test.ts +32 -0
- package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +106 -0
- package/src/__tests__/mesh-material-bindings.unit.test.ts +89 -0
- package/src/__tests__/mesh-stride-surface.unit.test.ts +16 -0
- package/src/__tests__/morph-culling-reentry.dawn.test.ts +157 -0
- package/src/__tests__/morph-feature-gpu-work.integration.test.ts +80 -0
- package/src/__tests__/morph-feature-plan.unit.test.ts +53 -0
- package/src/__tests__/morph-visual-evidence.integration.test.ts +80 -0
- package/src/__tests__/nineslice-handle-surface.unit.test.ts +19 -0
- package/src/__tests__/post-process-error-policy-owner.unit.test.ts +201 -0
- package/src/__tests__/prepared-buffer-kind-owner.test-d.ts +29 -0
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +65 -0
- package/src/__tests__/prepared-graphics-generation.unit.test.ts +161 -0
- package/src/__tests__/prepared-graphics-lifecycle.unit.test.ts +138 -0
- package/src/__tests__/prepared-graphics-pipeline-warmup.unit.test.ts +29 -0
- package/src/__tests__/prepared-graphics-resolver.unit.test.ts +285 -0
- package/src/__tests__/prepared-graphics-snapshot.unit.test.ts +105 -0
- package/src/__tests__/prepared-graphics-store.unit.test.ts +154 -0
- package/src/__tests__/prepared-graphics-validation.unit.test.ts +176 -0
- package/src/__tests__/profiler-default-off.test.ts +22 -0
- package/src/__tests__/profiler-phase-catalog.test.ts +66 -0
- package/src/__tests__/profiler-phase-integration.test.ts +62 -0
- package/src/__tests__/profiler-phase-token.test.ts +79 -0
- package/src/__tests__/public-surface.test-d.ts +94 -0
- package/src/__tests__/recover-error-policy-owner.unit.test.ts +107 -0
- package/src/__tests__/render-error-code-owner.test-d.ts +116 -0
- package/src/__tests__/render-error-detail-ssot.test-d.ts +139 -0
- package/src/__tests__/render-error-exhaustive.test-d.ts +110 -0
- package/src/__tests__/render-feature-assembly.test-d.ts +43 -0
- package/src/__tests__/render-feature-context.test-d.ts +57 -0
- package/src/__tests__/render-feature-contract.test-d.ts +49 -0
- package/src/__tests__/render-feature-diagnostics.unit.test.ts +149 -0
- package/src/__tests__/render-feature-docs.unit.test.ts +89 -0
- package/src/__tests__/render-feature-errors.unit.test.ts +47 -0
- package/src/__tests__/render-feature-gpu-work.integration.test.ts +316 -0
- package/src/__tests__/render-feature-plan.test-d.ts +161 -0
- package/src/__tests__/render-feature-plan.unit.test.ts +170 -0
- package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +90 -0
- package/src/__tests__/render-feature-prepared-errors.test-d.ts +79 -0
- package/src/__tests__/render-feature-prepared-graphics-docs.unit.test.ts +80 -0
- package/src/__tests__/render-feature-prepared-graphics-isolation.unit.test.ts +72 -0
- package/src/__tests__/render-feature-prepared-graphics-negative.test-d.ts +36 -0
- package/src/__tests__/render-feature-prepared-graphics.test-d.ts +74 -0
- package/src/__tests__/render-feature-prepared-graphics.unit.test.ts +121 -0
- package/src/__tests__/render-feature-public-surface.test-d.ts +57 -0
- package/src/__tests__/render-feature-retry.unit.test.ts +87 -0
- package/src/__tests__/render-feature-scheduling.unit.test.ts +110 -0
- package/src/__tests__/render-feature-stage-failed-policy-owner.unit.test.ts +137 -0
- package/src/__tests__/render-feature-stage-fault-recovery.unit.test.ts +146 -0
- package/src/__tests__/render-feature-visibility-context.test-d.ts +33 -0
- package/src/__tests__/render-feature-visibility-context.unit.test.ts +37 -0
- package/src/__tests__/render-feature-zero-work.unit.test.ts +76 -0
- package/src/__tests__/render-graph-compute-raster-gpu.ts +342 -0
- package/src/__tests__/render-graph-compute-raster.browser.test.ts +16 -0
- package/src/__tests__/render-graph-compute-raster.dawn.test.ts +22 -0
- package/src/__tests__/render-graph-hzb-gpu.ts +239 -0
- package/src/__tests__/render-graph-hzb.browser.test.ts +16 -0
- package/src/__tests__/render-graph-hzb.dawn.test.ts +23 -0
- package/src/__tests__/render-graph-primitives.unit.test.ts +22 -0
- package/src/__tests__/render-graph-storage-indirect-gpu.ts +162 -0
- package/src/__tests__/render-graph-storage-indirect.browser.test.ts +21 -0
- package/src/__tests__/render-graph-storage-indirect.dawn.test.ts +28 -0
- package/src/__tests__/render-scene-projection.unit.test.ts +168 -0
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +121 -0
- package/src/__tests__/renderer-lifecycle.integration.test.ts +58 -0
- package/src/__tests__/rhi-backend-package-boundary.unit.test.ts +11 -0
- package/src/__tests__/scriptable-pack-consumer.test-d.ts +14 -0
- package/src/__tests__/shader-stage-surface.unit.test.ts +43 -0
- package/src/__tests__/ssao-config.unit.test.ts +36 -0
- package/src/__tests__/ssao-kernel-surface.unit.test.ts +14 -0
- package/src/__tests__/standard-clustered-pipeline.unit.test.ts +28 -0
- package/src/__tests__/standard-descriptors.test-d.ts +22 -0
- package/src/__tests__/standard-pipeline.dawn.test.ts +61 -0
- package/src/__tests__/standard-pipeline.integration.test.ts +124 -0
- package/src/__tests__/standard-profile-oracle.unit.test.ts +62 -0
- package/src/__tests__/surface-configuration.unit.test.ts +91 -0
- package/src/__tests__/texture-usage-surface.unit.test.ts +58 -0
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +223 -0
- package/src/__tests__/urp-pipeline-targets.unit.test.ts +42 -0
- package/src/__tests__/urp-pipeline.unit.test.ts +14 -0
- package/src/__tests__/vertex-color-pipeline.unit.test.ts +132 -0
- package/src/__tests__/vertex-layout-consumer.unit.test.ts +25 -0
- package/src/__tests__/visibility-diagnostics.integration.test.ts +62 -0
- package/src/__tests__/visibility-extract.integration.test.ts +98 -0
- package/src/__tests__/visibility-extract.perf.test.ts +130 -0
- package/src/__tests__/visibility-feature-dedup.integration.test.ts +55 -0
- package/src/__tests__/visibility-hidden-report.unit.test.ts +36 -0
- package/src/__tests__/visibility-instances.integration.test.ts +46 -0
- package/src/__tests__/visibility-multi-world.integration.test.ts +86 -0
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +168 -0
- package/src/__tests__/visibility-producer-matrix.unit.test.ts +96 -0
- package/src/__tests__/visibility-public-surface.test-d.ts +27 -0
- package/src/__tests__/visibility-resolver.unit.test.ts +85 -0
- package/src/__tests__/visibility-resource-short-circuit.unit.test.ts +80 -0
- package/src/__tests__/visibility-snapshot-contract.unit.test.ts +60 -0
- package/src/__tests__/vocabulary.unit.test.ts +21 -0
- package/src/assembly/backend-contract.ts +57 -0
- package/src/assembly/factory.ts +8130 -0
- package/src/assembly/host-contract.ts +101 -0
- package/src/assembly/material/assembly.ts +48 -0
- package/src/assembly/material/pipeline-projection.ts +63 -0
- package/src/assets/asset-decoders.ts +158 -0
- package/src/assets/render-asset-port.ts +44 -0
- package/src/assets/resolve-render-asset.ts +13 -0
- package/src/authoring.ts +17 -0
- package/src/cluster-binner.ts +700 -0
- package/src/components/__tests__/points-lines-admission.unit.test.ts +219 -0
- package/src/components/__tests__/points-lines-schema.unit.test.ts +56 -0
- package/src/components/__tests__/schema-contract.unit.test.ts +10 -0
- package/src/components/__tests__/schema-parity.unit.test.ts +25 -0
- package/src/components/__tests__/visibility-schema.unit.test.ts +35 -0
- package/src/components/camera.ts +512 -0
- package/src/components/directional-light.ts +120 -0
- package/src/components/glyph-text.ts +64 -0
- package/src/components/index.ts +54 -0
- package/src/components/instances.ts +206 -0
- package/src/components/layer.ts +69 -0
- package/src/components/light-helpers.ts +188 -0
- package/src/components/lines.ts +18 -0
- package/src/components/mesh-filter.ts +60 -0
- package/src/components/mesh-renderer.ts +61 -0
- package/src/components/point-light-shadow.ts +43 -0
- package/src/components/point-light.ts +65 -0
- package/src/components/points.ts +40 -0
- package/src/components/post-process-params.ts +35 -0
- package/src/components/scene-instance.ts +193 -0
- package/src/components/skybox-background.ts +103 -0
- package/src/components/skylight.ts +97 -0
- package/src/components/sort-key.ts +75 -0
- package/src/components/spot-light.ts +124 -0
- package/src/components/sprite-animation.ts +168 -0
- package/src/components/sprite-instances.ts +179 -0
- package/src/components/sprite-playback-mode.ts +79 -0
- package/src/components/sprite-region-override.ts +105 -0
- package/src/components/tile-layer.ts +167 -0
- package/src/components/tilemap.ts +48 -0
- package/src/components/visibility.ts +53 -0
- package/src/construct-renderer.ts +67 -0
- package/src/debug-draw-glue.ts +48 -0
- package/src/device/device-scope.ts +306 -0
- package/src/device/gpu-residency.ts +1822 -0
- package/src/device/resource-types.ts +20 -0
- package/src/engine-metrics.ts +82 -0
- package/src/errors/ecs-validation.ts +16 -0
- package/src/errors/index.ts +3 -0
- package/src/errors/recover.ts +161 -0
- package/src/errors/render.ts +1284 -0
- package/src/extract/visibility.ts +120 -0
- package/src/features/fullscreen.ts +46 -0
- package/src/features/host.ts +1363 -0
- package/src/features/morph/morph-feature.ts +377 -0
- package/src/features/plan.ts +447 -0
- package/src/features/prepared-gpu-work.ts +959 -0
- package/src/features/prepared-graphics-store.ts +449 -0
- package/src/features/prepared-graphics.ts +420 -0
- package/src/features/render-graph-compute.ts +69 -0
- package/src/features/render-graph-contribution.ts +75 -0
- package/src/features/render-graph-raster.ts +332 -0
- package/src/features/render-graph-resources.ts +38 -0
- package/src/features/targets.ts +70 -0
- package/src/features/types.ts +103 -0
- package/src/features/vocabulary.ts +24 -0
- package/src/fullscreen-post-process-pass.ts +363 -0
- package/src/glyph-text-layout-system.ts +421 -0
- package/src/gpu-driven/batch-topology.ts +245 -0
- package/src/gpu-driven/production-raster.ts +695 -0
- package/src/gpu-driven/view-gpu.ts +703 -0
- package/src/gpu-resource.ts +159 -0
- package/src/gpu-scene-schema.ts +136 -0
- package/src/gpu-scene.ts +722 -0
- package/src/gpu-stage.ts +9 -0
- package/src/gpu-texture-usage.ts +12 -0
- package/src/gpu-usage.ts +14 -0
- package/src/hdrp-buffers.ts +480 -0
- package/src/ibl/IblPipelineCache.ts +1006 -0
- package/src/ibl/skylight-bind-group.ts +513 -0
- package/src/index.ts +129 -0
- package/src/inspection-types.ts +80 -0
- package/src/instance-buffer-cache.ts +95 -0
- package/src/internal.ts +9 -0
- package/src/lifecycle.ts +168 -0
- package/src/light-buffer-layout.ts +346 -0
- package/src/materials.ts +214 -0
- package/src/mesh-material-bindings.ts +103 -0
- package/src/pbr-pipeline.ts +1137 -0
- package/src/pipeline/standard-forward-lane.ts +229 -0
- package/src/pipeline/standard-pipeline.ts +555 -0
- package/src/pipeline/standard-profile.ts +65 -0
- package/src/pipeline-builder.ts +382 -0
- package/src/pipeline-spec-types.ts +28 -0
- package/src/pipeline-spec.ts +1231 -0
- package/src/plugin.ts +69 -0
- package/src/points-lines/__tests__/bounds.unit.test.ts +21 -0
- package/src/points-lines/__tests__/cache-recovery.unit.test.ts +157 -0
- package/src/points-lines/__tests__/inspection-lanes.integration.test.ts +146 -0
- package/src/points-lines/__tests__/inspection.unit.test.ts +173 -0
- package/src/points-lines/__tests__/lane-structural.integration.test.ts +122 -0
- package/src/points-lines/__tests__/points-lines.bench.ts +400 -0
- package/src/points-lines/__tests__/raster-lane.integration.test.ts +44 -0
- package/src/points-lines/__tests__/snapshot.unit.test.ts +101 -0
- package/src/points-lines/__tests__/view-ubo.unit.test.ts +73 -0
- package/src/points-lines/admission.ts +238 -0
- package/src/points-lines/bounds.ts +23 -0
- package/src/points-lines/expansion-cache.ts +215 -0
- package/src/points-lines/inspection.ts +97 -0
- package/src/points-lines/prepare.ts +177 -0
- package/src/points-lines/record.ts +125 -0
- package/src/points-lines/snapshot.ts +130 -0
- package/src/post-process-errors.ts +302 -0
- package/src/prepare/prepared-graphics-resolver.ts +456 -0
- package/src/record/__tests__/material-bg-cache.unit.test.ts +41 -0
- package/src/record/__tests__/material-slot-plan.unit.test.ts +44 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +41 -0
- package/src/record/__tests__/video-texture-view.unit.test.ts +90 -0
- package/src/record/frame-lighting.ts +1074 -0
- package/src/record/frame-snapshot.ts +500 -0
- package/src/record/frame-targets.ts +137 -0
- package/src/record/frame.ts +1598 -0
- package/src/record/helpers.ts +284 -0
- package/src/record/main-pass-geometry.ts +1065 -0
- package/src/record/main-pass-material.ts +1043 -0
- package/src/record/main-pass-sprite-draws.ts +1137 -0
- package/src/record/main-pass.ts +610 -0
- package/src/record/mesh-ssbo.ts +885 -0
- package/src/record/render-context.ts +384 -0
- package/src/record/shadow-pass.ts +698 -0
- package/src/record/skybox-post-pass.ts +593 -0
- package/src/record/typed-frame-graph.ts +461 -0
- package/src/record/view-ubo.ts +222 -0
- package/src/render-contract.ts +582 -0
- package/src/render-data.ts +385 -0
- package/src/render-graph-primitives.ts +811 -0
- package/src/render-pipeline.ts +259 -0
- package/src/render-system-extract.ts +4585 -0
- package/src/render-system.ts +1933 -0
- package/src/scene/render-scene-types.ts +67 -0
- package/src/scene/render-scene.ts +1087 -0
- package/src/scene-instances/post-spawn-resolve-joints.ts +165 -0
- package/src/shadow-atlas.ts +244 -0
- package/src/ssao-buffers.ts +334 -0
- package/src/ssao-config.ts +61 -0
- package/src/systems/active-camera.ts +116 -0
- package/src/systems/pass-selector.ts +49 -0
- package/src/systems/skin-palette-allocator.ts +251 -0
- package/src/systems/skin-palette-types.ts +14 -0
- package/src/systems/transparent-sort-config.ts +233 -0
- package/src/tilemap-chunk-extract-system.ts +1290 -0
- package/src/typed-render-graph-primitives.ts +541 -0
- 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
|
+
});
|