mesh-avatar-studio
Turn one illustration into an animated 2D mesh avatar with a coding agent and a local editor
翻译准备中
Turn any picture into a collectible card with a rare foil finish.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Turn any picture into a collectible card and give it a rare finish.
• Bring an image by choosing a file, dropping it anywhere, or pasting (Ctrl+V). Animated GIF, APNG and animated WebP keep moving on the card. It never leaves your browser.
• Pick a finish from the fanned hand at the bottom — each card in the hand is a live preview. The hand starts with seven finishes: the five editions of the game FOIL is modelled on (Base, Foil, Holographic, Polychrome and Negative), plus Prism and Glitch. Keys 1–9 and 0 pick the cards in the hand in order, ← → step through them.查看完整 README ↗Turn any picture into a collectible card and give it a rare foil finish.
Try it: https://dennougorilla.github.io/foil/
English · 日本語
Every detail, finish by finish: docs/features.md.
| Where | Finishes |
|---|---|
| Starting hand | Base, Foil, Holographic, Polychrome, Negative, Prism, Glitch |
| Metal pack | Platinum, Gold, Relief, Chameleon, Cosmo Holo |
| Jewel pack | Crystal, Opal, Raden, Kintsugi |
| Light pack | Galaxy, Aurora, Glow, Blacklight, Shallows |
| Nature pack | Sakura, Frost, Stardust, Rainy Window, Marble, Magma |
| Studio pack | Halftone, Warmth, Stained Glass, Flip Lenticular, 3D Lenticular, Shadowbox |
| Supporter pack | Confetti, Snow Globe, Fireworks |
36 finishes in all. The Supporter pack appears in the pack shop after you open one of the support links once. It is an honor system: there is no payment check. How packs and their opening are designed: docs/packs.md.
npm install
npm run dev # http://localhost:5173
npm run build # type-check + production build
npm test # unit tests (Node's built-in runner)
npm run shoot -- <outDir> [filter] # with the dev server running: capture the screenshot matrix
npm run e2e # with the dev server running: check the panel, every export, the packs, the binder, sharing and the phone stage
npm run e2e:pwa # after npm run build: check the manifest, the service worker, an offline launch, the Update chip and a shared picture
npm run perf # with the dev server running: the performance budget, every finish and the backdrop on a slowed-down phone page (docs/performance.md)
npm run og # with the dev server running: render public/og.png and the home-screen icons
node scripts/layering-check.mjs [--measure] # with the dev server running: single finishes unchanged pixel for pixel (against a reference URL), and the cost of a second finish
Rendering is WebGL2 (backdrops, cards, particles). The card shader's core and the seven open finishes live in src/gl/shaders.ts, each pack's finishes in src/gl/finishes/ (see docs/packs.md for adding one); the card face is composed in src/card/face.ts, its shapes are listed in src/card/shape.ts. Shaders never assume the 5 : 7 card: uCardK is the face's size in units of its short side ((1, 1.4) on the trading card) and uArt the art window in face uv. Design notes: docs/tcg.md (trading-card layout), docs/arrange.md (free placement), docs/layering.md (layers), docs/binder.md (binder), docs/pwa.md (home screen, offline, updates, share target), docs/backdrops.md (backdrops).
Pushes to main and pull requests are type-checked and built by .github/workflows/ci.yml; they do not deploy.
npm run release -- patch # or minor / major / an exact x.y.z; add --dry-run to only run the checks
From a clean main that is up to date with origin, this builds, bumps the version (commit + tag vX.Y.Z) and pushes both. The tag runs .github/workflows/release.yml, which deploys to GitHub Pages and publishes a GitHub Release with auto-generated notes (grouped by PR label, see .github/release.yml) and the built site as a zip. To redeploy without a release, run the Release workflow by hand from the Actions tab. The build exposes __APP_VERSION__ and __APP_COMMIT__ (short SHA) as globals.
FOIL is an unofficial fan project inspired by Balatro by LocalThunk, not affiliated with LocalThunk or Playstack, and uses none of the game's assets. Balatro is a registered trademark of LocalThunk LLC.
The Shadowbox and 3D Lenticular finishes use Depth Anything V2 Small (Apache-2.0), fetched at run time from the onnx-community conversion pinned to one revision and checked against its SHA-256, and ONNX Runtime Web (MIT). The model is not part of this repository. The typefaces (DotGothic16, Silkscreen, Yusei Magic, Shippori Mincho and Mochiy Pop One, all SIL Open Font License) are served by Google Fonts. Licenses of the bundled third-party code ship with the site as THIRD_PARTY_NOTICES.txt (from public/).
If FOIL made you smile: GitHub Sponsors · Buy Me a Coffee
MIT. See LICENSE.