Improved harness - with card selection

This commit is contained in:
2026-09-15 06:08:43 -07:00
parent 97ed7f05c8
commit 786f63a042
29 changed files with 1398 additions and 494 deletions

View File

@@ -6,10 +6,10 @@ The approved visual baseline is recorded in [`CURRENT-DEFAULTS.md`](CURRENT-DEFA
## Included proof scope
- David printed-ink, foil, and holographic presets
- Independently selectable paper, linen, metal, and wood substrates
- Timothy as the second-artwork fixture
- David color-based coverage and title-panel protection; automatic saturation/value coverage for Timothy
- Searchable accepted-card library sourced directly from `artifacts/cards`
- Low, Med, and High resolution plus Normal, Borderless, Textless, and Boundless printing controls
- Independently selectable finishes and paper, linen, metal, wood, and leather substrates
- Per-finish and per-material defaults editable from Lab and versioned in the repository
- Procedural rounded-card geometry generated from shared physical dimensions
- Deterministic linen normal map
- Card manipulation, camera inspection, zoom, frame-rate-independent flip/reset, interruption-safe sweep, and movable lighting
@@ -190,11 +190,19 @@ Timothy regression artwork and universal card back from the project root, and
generates the two finish masks and linen normal map. Startup and production builds
run this automatically. No spike assets are required.
Inspect/Lab and Pack load artwork and masks from `public/card-art`; the generated
David and Timothy fixtures are retained for shader regression checks. The app
uses the generated universal back and linen normal map. Card geometry is generated
Inspect/Lab and Pack discover approved card packages directly from `../artifacts/cards`.
The development server exposes only allowlisted runtime PNGs through a contained
asset route; no copies are required in `public/card-art`. The generated David and
Timothy files in `public/reference` remain shader-regression fixtures. The app uses
the generated universal back and linen normal map. Card geometry is generated
directly in Three.js from the dimensions recorded in the manifest.
The toolbar defaults to High and exposes Low, Med, High plus all four printings.
The Card button opens a searchable, rarity-filterable accepted-card drawer whose
lazy thumbnails always use Low/Normal. Pack supports the same resolution and
printing selection. It streams only the current and next front, sharing duplicate
assets and releasing outgoing textures; hidden High fronts are not loaded en masse.
The current runtime reference revision is `runtime-look-v4-2026-09-07`. The approved
linen, metal, and wood depth follow-ups change runtime shader behavior, not the
source artwork or generated normal map. The asset manifest therefore retains its
@@ -270,11 +278,11 @@ The browser/version, viewport, drawing-buffer resolution, texture settings, and
## Optional text masks
Place `[image-name]-text-mask.png` next to `[image-name].png` and the required
`[image-name]-mask.png` in `public/card-art`. It must match artwork dimensions
and be opaque grayscale: **white protects lettering, black retains the material**.
Generate it from the rendered text layer with a small, recorded feathered margin;
it is separate from finish coverage and card silhouette alpha.
Accepted Normal and Borderless packages provide `text-mask.png` beside `card.png`
and `finish-mask.png` in each resolution/printing directory. It must match artwork
dimensions and be opaque grayscale: **white protects lettering, black retains the
material**. Generate it from the rendered text layer with a small, recorded feathered
margin; it is separate from finish coverage and card silhouette alpha.
The catalog exposes `textMask` only when the optional file exists, validates it,
and includes its bytes in cache revisions. Inspect/Lab and selected pack cards load
@@ -318,6 +326,9 @@ motion timings; idle gaps are excluded. Timing windows reset on mode
changes. ResizeObserver handles canvas layout changes. Pack cards share two
geometry buffers while retaining their individual transforms and materials.
Diagnostic readouts and timing-recording controls are hidden by default. **Show diagnostics**
in the toolbar reveals them; the current card/material status remains visible either way.
The diagnostic display also reports median CPU scene-update/render-submission time,
draw calls, resident renderer texture count, and shader program count. CPU submission
time can include driver waits; it is not a direct GPU timing measurement. Resource
@@ -332,9 +343,9 @@ Card faces now cull inward-facing triangles; the wrapper remains double-sided fo
its curls/opening. Uniform-only edge changes reuse the material shader version.
The overlay no longer blurs the animated canvas beneath it.
Pack resources stay resident after switching modes to preserve its state
and avoid repeating preparation. Catalog entries alone do not load artwork:
Inspect/Lab load the current fixture, and Pack loads its selected artwork only.
Pack wrapper, geometry, and placeholder resources stay resident after switching
modes to preserve state. Catalog entries alone do not load artwork: Inspect/Lab load
the selected variant, while Pack keeps at most the current and next front acquired.
For a useful comparison, keep viewport, card, pose, lighting, and motion identical;
allow at least four seconds for the 240-frame window to turn over at 60 Hz (longer