The art workshop's side door

The hand-drawn SVG token set wires in behind deliberately
undocumented query params — svgPlayers, svgCreatures, svgTerrain,
svgObjects, each =true — swapping that category's art everywhere it
draws: board tokens, lobby standees, roster. public/tokens-svg
symlinks research/tokens-svg, so under the dev server an edit to the
source art shows on the next refresh, and the production build copies
real files through the link. Nobody finds the door unless handed the
key; the photographed set remains the face of the game.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-17 11:27:28 -04:00
co-authored by Claude Fable 5
parent 93bdbb403a
commit e0e96ca5ca
50 changed files with 506 additions and 9 deletions
+17
View File
@@ -0,0 +1,17 @@
// The art workshop's side door (deliberately undocumented): query params
// like ?svgPlayers=true&svgTerrain=true swap token categories to the
// hand-drawn SVG set. public/tokens-svg symlinks research/tokens-svg, so
// under `npm run dev` an edit to the source art shows on refresh.
export type ArtCategory = "players" | "creatures" | "terrain" | "objects";
const q = new URLSearchParams(typeof location === "undefined" ? "" : location.search);
const SVG_ART: Record<ArtCategory, boolean> = {
players: q.get("svgPlayers") === "true",
creatures: q.get("svgCreatures") === "true",
terrain: q.get("svgTerrain") === "true",
objects: q.get("svgObjects") === "true",
};
export function tokenArt(file: string, cat: ArtCategory): string {
return SVG_ART[cat] ? `/tokens-svg/${file}.svg` : `/tokens/${file}.png`;
}