The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | /** |
| 2 | * Writes the faint section background patterns to `website/public/patterns/` |
| 3 | * from the exact Sri Yantra construction in `src/brand/sriYantra.ts`. |
| 4 | * |
| 5 | * Run: `bun scripts/generate-yantra-patterns.ts` |
| 6 | */ |
| 7 | |
| 8 | import { writeFile } from "node:fs/promises"; |
| 9 | import path from "node:path"; |
| 10 | import { fileURLToPath } from "node:url"; |
| 11 | import { MARMAS, MAX_MISS, PATTERN_NAMES, sriYantraPattern } from "../src/brand/sriYantra.ts"; |
| 12 | |
| 13 | const here = path.dirname(fileURLToPath(import.meta.url)); |
| 14 | const outDir = path.resolve(here, "../public/patterns"); |
| 15 | |
| 16 | await Promise.all( |
| 17 | PATTERN_NAMES.map((name) => writeFile(path.join(outDir, `${name}.svg`), sriYantraPattern(name))), |
| 18 | ); |
| 19 | console.log( |
| 20 | `Wrote ${PATTERN_NAMES.length} patterns to ${path.relative(process.cwd(), outDir)} (${MARMAS.length} marmas, max miss ${MAX_MISS.toExponential(1)}).`, |
| 21 | ); |