- Автор
- smontlouis
- Размер
- 8.8 MB
- Звёзды
- 1.2K
- Обновлён
- КоммитNov 17Релизv1.0.1Nov 13
- Возраст
- 3 мес
- Коммиты · 90 дней
README проекта с github.com/smontlouis/bible-strong-avatar-lab. Одним файлом markdown: README.md.
Bible Strong Avatar Lab is a browser-based studio for procedural 2D avatars, and the engine that animates them. It combines 3D-inspired geometry with SVG rendering: you build a character, watch it play a shared catalogue of states, clips, faces and gestures, and export it for your own product.
Website: avatars.bible-strong.app · Source: GitHub
The application runs entirely in the browser. The library of avatars is stored locally; no account or backend is required.
idle, thinking, searching, happy…), see how it draws
its clips and hand over to the next state, or keep it.nod, bounce, spin) over whatever plays..avatar.json file, with the instructions to put it in a React,
React Native or JavaScript project.The stage is on the left and the inspector on the right, with a player at the bottom that says what plays and holds the face and the gestures laid over it. The inspector has five tabs:
The library is saved automatically in browser local storage. An avatar of the first version keeps only its character: its expressions and animations are not read.
A character is what an avatar is, apart from what it does: its body, colours, outline, nose, mouth, the build of its eyes and its perspective. Every character plays the same catalogue: about fifty states, the clips they draw, nine faces, three gestures and thirteen spinner patterns. The words are defined in CONTEXT.md.
Export downloads the character as <name>.avatar.json. The three renderers read it, and also
read an .avatar.json of the first version, of which they keep only the character.
Four MIT-licensed npm packages render a character. Choose by target:
| Target | Package |
|---|---|
| React DOM, React Native Web | @bible-strong/avatar-react |
| React Native (iOS, Android) | @bible-strong/avatar-react-native |
| Browser without React | @bible-strong/avatar-web |
| Your own renderer, or a test | @bible-strong/avatar-core |
The three renderers depend on avatar-core for reading files, the engine and geometry, and share
one vocabulary: createAvatar for a file known at build time, then state, lookAt, muted,
settleAfterMs, gestures and the rest over the shared catalogue.
Each package README is written to be followed step by step, by a person or by a coding agent:
setup, a minimal example, every prop, every error with its fix, and a checklist to verify the
integration. It ships in the npm tarball, so it is readable in node_modules. The Studio's
Export tab shows the install and a minimal example for each integration, and Copy
instructions for AI copies that package's README, with the avatar's file and names in its
examples.
The Studio serves its documentation as plain text for coding agents, built from the sources it
describes: /llms.txt (the index),
/llms-full.txt (every guide in one file), /docs/avatar-*.md (the package READMEs),
/characters/*.avatar.json (the Studio's own characters), /catalogue/clips.json and
/catalogue/states.json. /clip-authoring.md teaches how to write
a clip and hand it to the Studio as a link (#clip=…), which opens it as a draft; the draft lives
in the address, so a person and an agent sharing a tab work on the same clip.
src/agentDocs/ makes these pages.
Photo Mode exports the avatar on the stage as SVG or PNG. You can choose the resolution and use a transparent, solid, linear-gradient or radial-gradient background.
packageManager field)pnpm install
pnpm dev
Open http://localhost:5173.
| Command | Purpose |
|---|---|
pnpm dev |
Start Vite in development mode. |
pnpm typecheck |
Run TypeScript in strict, no-emit mode. |
pnpm test |
Run the Vitest suite once. |
pnpm test:watch |
Run Vitest in watch mode. |
pnpm build |
Create a production build in dist/. |
pnpm preview |
Serve the production build locally. |
pnpm format |
Format the repository with Prettier. |
pnpm check |
Run formatting, type checking, tests, and the production build. |
Before opening a pull request, run the complete local check:
pnpm check
The GitHub Actions workflow runs the same command on every push and pull request.
Create the static production bundle:
pnpm build
The deployable site is written to dist/. Serve it locally before publishing:
pnpm preview
The application is a client-only Vite site with no server runtime or environment variables. The build uses relative asset paths, so the contents of dist/ can be hosted at a domain root or a subpath, including a GitHub Pages project URL. Any static host that serves index.html can deploy it.
Vercel Web Analytics and Speed Insights are integrated in the React entry point. Enable both products in the Vercel project dashboard, then redeploy so their collection routes become available.
src/components/ui/ provide the interface layer.Geometry, the catalogue and the engine live in packages/avatar-core and remain
framework-independent. React state stores durable editor data; what changes at every frame is
drawn without going through React state.
| Path | Responsibility |
|---|---|
packages/ |
The runtime packages: core engine and its React, web and native renderers. |
src/app/ |
Application shell and global styles. |
src/components/ui/ |
Reusable interface primitives. |
src/features/editor/ |
The Studio: avatar library, body construction, stage, photo mode, and tests. |
src/i18n/ |
Localized interface copy and translation tests. |
src/lib/ |
Small shared utilities without product-domain ownership. |
docs/adr/ |
Accepted architecture decisions. |
legacy/ |
Self-contained HTML prototypes that preceded the React application. |
There is no remote backend in this repository. The avatar library and interface language preference are stored in the browser's local storage. Exported files are generated locally in the browser. Clearing site data removes the local library, so saving each character as JSON is the recommended backup mechanism.
The library keeps the storage key and the shape of the first version, whose expressions and animations are no longer read.
Keep domain calculations outside React components, keep what changes at every frame out of React state, and add focused tests for domain changes.
English, French, and Simplified Chinese interface copy must stay synchronized across src/i18n/index.ts and src/i18n/zh.ts.
For the domain vocabulary, invariants, and architecture boundaries, read CONTEXT.md.
The repository holds two things under two licenses.
| What | License |
|---|---|
The runtime packages under packages/ (@bible-strong/avatar-*) |
MIT |
| The Studio: everything else in this repository | GNU AGPL v3.0 |
The packages are what you install to show an avatar in your own product. Use them in any project, open or closed, commercial or not; keep the copyright notice.
The Studio is the editor served at avatars.bible-strong.app. You may use, study, modify and redistribute it. If you distribute it or offer a modified version to users over a network, you must make the corresponding source available under the same license and keep the notices.
What you create with the Studio is yours: an exported .avatar.json and the pictures carry no
license obligation from this project.
See each LICENSE file for the complete and legally authoritative terms.