bible-strong-avatar-lab README

README проекта с github.com/smontlouis/bible-strong-avatar-lab. Одним файлом markdown: README.md.

Bible Strong Avatar Lab

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.

What you can do

How the Studio works

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:

  1. Avatars — the library: pick, create, duplicate, import or delete an avatar, and build its body, colours and face.
  2. Pose — place the avatar by hand. Letting it go joins back to the clip where it waited.
  3. States — play a state of the catalogue, see the clips it draws and by which rule, and choose whether it hands over to the next state.
  4. Clips — play one clip alone and read it on its timeline.
  5. Export — download the character, copy the instructions for an integration, or open Photo Mode.

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.

The character and the catalogue

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

The character file

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.

Runtime packages

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.

For agents

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

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.

Getting started

Requirements

Install and run

pnpm install
pnpm dev

Open http://localhost:5173.

Available commands

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.

Validation

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.

Production build and deployment

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.

Technical overview

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.

Repository map

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.

Persistence and privacy

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.

Contributing

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.

License

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.

bible-strong-avatar-lab (smontlouis/bible-strong-avatar-lab)

Ищем в базе…

Что это?Bible Strong Avatar Lab — браузерная студия создания процедурных 2D-аватаров: вы проектируете тело, глаза и выражения лица, собираете их в анимации и экспортируете результат для использования в своём приложении.
Это инструмент дизайна или библиотека отрисовки?И то и другое: Studio — веб-приложение для проектирования аватаров, а экспортированный .avatar.json работает с отдельными npm-пакетами (@bible-strong/avatar-react или @bible-strong/avatar-web), которые отрисовывают его в вашем проекте на React или ванильном JS.
Как запустить Studio локально?Склонируйте репозиторий, установите зависимости через pnpm и выполните `pnpm dev`, который пересоздаст автономный движок и запустит dev-сервер Vite.
Нужно ли сначала установить Node и pnpm?Да: Node.js 22.12 или новее и pnpm 10.34, как заявлено в поле packageManager репозитория.
Можно ли спокойно полагаться на стабильность формата проекта?Нет — JSON-формат проекта — это явно pre-release схема, и совместимость гарантируется только для текущей схемы, если позже не добавят миграцию.
Можно ли пользоваться в любом браузере или нужна конкретная ОС?Это чисто клиентское веб-приложение на Vite без серверной части, так что оно работает в любом современном браузере независимо от операционной системы.
Где хранятся данные моего аватара?Всё хранится в local storage вашего браузера — ни аккаунта, ни бэкенда, ни сервера нет, так что очистка данных сайта сотрёт ваш проект, если вы не экспортировали JSON-бэкап.
Как на самом деле использовать экспортированный аватар в своём приложении?Установите @bible-strong/avatar-react (или @bible-strong/avatar-web для чистого JS/ESM), импортируйте экспортированный .avatar.json и передайте его в createAvatar; оба пакета зависят от @bible-strong/avatar-core для валидации, воспроизведения и геометрии.
Как Studio избегает того, чтобы правка одного аватара ломала другие с теми же выражениями?Аватары стартуют на общей базовой библиотеке поведения, но первая правка выражений или анимаций аватара копирует её в библиотеку конкретного аватара, так что дальнейшие изменения остаются изолированными (copy-on-write).
Можно ли снять снимок аватара вместо полного экспорта анимации?Да, Photo Mode экспортирует текущий отрисованный аватар в SVG или PNG с выбранным разрешением и прозрачным, сплошным, линейно-градиентным или радиально-градиентным фоном.
Какие языки поддерживает интерфейс Studio?Английский, французский и упрощённый китайский, синхронизируемые между src/i18n/index.ts и src/i18n/zh.ts.
Какие есть похожие проекты?floorplan-3d, shapeshift, Ledgerify, truanayangi, bloub, tweakcn, map-to-poster, youtubepro
Автор
smontlouis
Размер
8.8 MB
Звёзды
1.2K
Возраст
3 мес
Коммиты · 90 дней