|
| 1 | +# Showcase |
| 2 | + |
| 3 | +Budget-conformance props. **Not examples.** |
| 4 | + |
| 5 | +An example witnesses one API contract and carries a falsifier that makes a |
| 6 | +real assertion fail. A recognizable crate witnesses no API contract. |
| 7 | +Forcing one into `examples/` produces a vacuous check. Showcase pieces |
| 8 | +assert that generated geometry meets **declared asset budgets**. |
| 9 | + |
| 10 | +"It rendered without error" is not an assertion. A tolerance so wide |
| 11 | +nothing can violate it is not an assertion. |
| 12 | + |
| 13 | +This directory is a sibling of `examples/`, not nested under it. The |
| 14 | +manifest key is `showcase`. Counts are separate from the example total. |
| 15 | + |
| 16 | +## Conventions |
| 17 | + |
| 18 | +Every piece is a directory `showcase/<name>/` with a script, a README that |
| 19 | +includes an exit-code table, a falsifier, a `catalog.json` row, a gallery |
| 20 | +entry in `showcase/gallery.json`, and a rendered still. |
| 21 | + |
| 22 | +- **Deterministic.** Fixed seed (or no RNG). Identical output across runs |
| 23 | + on the same binary, and across Blender 4.5, 5.1, and 5.2. If a value |
| 24 | + legitimately cannot match across versions, the piece README names it, |
| 25 | + states a tolerance, and justifies it. DECIMATE COLLAPSE triangle counts |
| 26 | + are the usual suspect — prefer ratio bands, not exact counts. |
| 27 | +- **Budgets declared** in the script as named constants and documented in |
| 28 | + the piece README. Suggested axes: triangle count, material count, UV |
| 29 | + bounds, bounding-box dimensions, LOD ratios, collider triangle ceiling, |
| 30 | + export file written. |
| 31 | +- **Assertions recompute** those budgets from the generated result. They |
| 32 | + never restate constants the script set (`if n == DECLARED` where `n` was |
| 33 | + assigned `DECLARED` is not a check). |
| 34 | +- **Falsifier** breaks one pipeline stage so a **named** budget fails and |
| 35 | + the piece exits its documented code. Prove default and falsifier on |
| 36 | + 4.5.11, 5.1.2, and 5.2.1. |
| 37 | +- **Exit codes** are file-local: `0` success, argparse `2`, `3` and above |
| 38 | + in check order. `9` is legal. FATAL `sys.exit(1)` is a crash, never a |
| 39 | + named check. |
| 40 | +- **Rendered still and gallery entry.** Showcase pieces are visual by |
| 41 | + definition. The pathology / sidecar exemption does not apply. Call |
| 42 | + `examples/gallery_framing.check_framing` on the `--output` path only. |
| 43 | + Do not pass `deviation=`. Do not move or modify `gallery_framing.py` — |
| 44 | + import it by resolving the repo root (see the shipping-crate script). |
| 45 | +- **Composition.** The README names which shipped skills and snippets the |
| 46 | + piece composes. Duplicated helpers stay inlined or copied; showcase |
| 47 | + scripts do not import snippets as a package. |
| 48 | + |
| 49 | +## Layout |
| 50 | + |
| 51 | +```text |
| 52 | +showcase/ |
| 53 | + README.md # this file |
| 54 | + gallery.json # this tree's gallery index (pieces[]) |
| 55 | + <name>/ |
| 56 | + <name>.py |
| 57 | + README.md |
| 58 | + preview.webp |
| 59 | +``` |
| 60 | + |
| 61 | +Hero stills live at `docs/gallery/assets/<name>-hero.webp` like examples. |
| 62 | +`scripts/build_gallery.py` merges `showcase/gallery.json` into the same |
| 63 | +`docs/gallery/` site as examples, tagged `showcase`. |
| 64 | + |
| 65 | +## Smoke |
| 66 | + |
| 67 | +`tests/smoke/catalog.json` takes opaque script paths. A showcase row is |
| 68 | +enough; `blender-smoke.yml` has no path filter and runs the whole catalog |
| 69 | +on every PR. Measure wall-clock before adding the next piece. |
0 commit comments