@forgeax/engine-runtime 0.1.7 → 0.1.19
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/README.md +45 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/__tests__/helpers/standard-material-manifest.d.ts +12 -0
- package/dist/__tests__/helpers/standard-material-manifest.d.ts.map +1 -0
- package/dist/__tests__/render-environment-consumer.integration.test.d.ts +2 -0
- package/dist/__tests__/render-environment-consumer.integration.test.d.ts.map +1 -0
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +1 -1
- package/dist/__tests__/render-feature-prepared-graphics.fixture.d.ts.map +1 -1
- package/dist/__tests__/renderer-host-fallback.unit.test.d.ts +2 -0
- package/dist/__tests__/renderer-host-fallback.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skinned-shadow-mixed.dawn.test.d.ts +2 -0
- package/dist/__tests__/skinned-shadow-mixed.dawn.test.d.ts.map +1 -0
- package/dist/backend-selection.d.ts.map +1 -1
- package/dist/index.mjs +20 -1
- package/dist/index.mjs.map +1 -1
- package/dist/renderer-host.d.ts +2 -1
- package/dist/renderer-host.d.ts.map +1 -1
- package/dist/renderer-host.mjs +21 -2
- package/dist/renderer-host.mjs.map +1 -1
- package/package.json +30 -30
- package/src/__tests__/dawn/instances-per-instance-pbr.dawn.test.ts +12 -11
- package/src/__tests__/errors.unit.test.ts +36 -0
- package/src/__tests__/extract-record-no-hardcoded-texture-fields.test.ts +4 -5
- package/src/__tests__/fullscreen-post-process-pass.dawn.test.ts +461 -18
- package/src/__tests__/geometry.unit.test.ts +3 -1
- package/src/__tests__/helpers/standard-material-manifest.ts +45 -0
- package/src/__tests__/material-texture-uv-scale.unit.test.ts +8 -14
- package/src/__tests__/materials.unit.test.ts +2 -0
- package/src/__tests__/pbr-pipeline.unit.test.ts +8 -8
- package/src/__tests__/pipeline-cache-keying.unit.test.ts +6 -4
- package/src/__tests__/pipeline.unit.test.ts +5 -2
- package/src/__tests__/render-environment-consumer.integration.test.ts +33 -0
- package/src/__tests__/render-error-exhaustive.test-d.ts +57 -0
- package/src/__tests__/render-feature-prepared-graphics.fixture.ts +10 -0
- package/src/__tests__/render-system-mega.test.ts +3 -1
- package/src/__tests__/render-system-record-multi-material-textureview.test.ts +3 -1
- package/src/__tests__/render-system-record-per-submesh-transparency.test.ts +3 -1
- package/src/__tests__/render-system-record.test.ts +8 -6
- package/src/__tests__/renderer-host-fallback.unit.test.ts +112 -0
- package/src/__tests__/renderer-lifecycle.integration.test.ts +10 -0
- package/src/__tests__/renderer-surface.unit.test.ts +66 -0
- package/src/__tests__/shadow-csm-cascade-loadop.test.ts +5 -1
- package/src/__tests__/shadow-csm-tile-consistency.test.ts +5 -1
- package/src/__tests__/skinned-shadow-mixed.dawn.test.ts +383 -0
- package/src/__tests__/sprite-lit-bgl-byte-identical.test.ts +7 -7
- package/src/__tests__/ssao-passes.test.ts +28 -12
- package/src/__tests__/systems.unit.test.ts +48 -31
- package/src/backend-selection.ts +4 -0
- package/src/renderer-host.ts +30 -3
package/README.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# `@forgeax/engine-runtime`
|
|
2
2
|
|
|
3
|
+
## Host entry and frame evidence
|
|
4
|
+
|
|
5
|
+
`createRenderer` is the host assembly entry. It selects the backend services
|
|
6
|
+
and returns the render package's single `Renderer` contract; game code does
|
|
7
|
+
not construct a device, graph, or second submit path. Pass the attached lease,
|
|
8
|
+
camera, and environment facts to `draw`, then bind diagnostics to the
|
|
9
|
+
returned `FrameReceipt`:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
const result = await createRenderer(canvas);
|
|
13
|
+
if (!result.ok) throw result.error;
|
|
14
|
+
const renderer = result.value;
|
|
15
|
+
const lease = renderer.attach(world);
|
|
16
|
+
if (!lease.ok) throw lease.error;
|
|
17
|
+
const frame = renderer.draw({
|
|
18
|
+
leases: [lease.value],
|
|
19
|
+
camera: { lease: lease.value },
|
|
20
|
+
environment: { lease: lease.value },
|
|
21
|
+
});
|
|
22
|
+
if (!frame.ok) throw frame.error;
|
|
23
|
+
const facts = renderer.inspect();
|
|
24
|
+
const observation = await renderer.observe(frame.value, { include: ['timings'] });
|
|
25
|
+
void facts;
|
|
26
|
+
void observation;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Progressive recovery index
|
|
30
|
+
|
|
31
|
+
Start with the public host route: `createRenderer`, `attach`, and `draw`. Then
|
|
32
|
+
use `inspect()` for detached state and `observe(receipt, request)` for evidence
|
|
33
|
+
bound to the successful receipt. If `draw` returns an error, use its closed
|
|
34
|
+
`code` and typed `detail` to repair the named producer or capability, and retry
|
|
35
|
+
the identical request. Do not parse text or reach into graph, device, or
|
|
36
|
+
history state.
|
|
37
|
+
|
|
38
|
+
Carrier manifests and schemas expose current source/build provenance, backend,
|
|
39
|
+
runner, and frame identity. Structural graph checks are distinct from real
|
|
40
|
+
Browser/Dawn readback and PNG evidence; a historical oracle is reference data,
|
|
41
|
+
not a runtime pass. `unavailable` remains an explicit result.
|
|
42
|
+
|
|
43
|
+
`inspect()` is detached and bounded. `observe()` is receipt-bound, so a
|
|
44
|
+
stale receipt is a structured failure rather than an implicit read of the
|
|
45
|
+
current frame. Repair the owner named by `error.detail`, then retry the same
|
|
46
|
+
request.
|
|
47
|
+
|
|
3
48
|
## Render happy path
|
|
4
49
|
|
|
5
50
|
`createRenderer -> attach -> draw -> inspect/observe/recover` assembles one
|