bead-grid-studio README

项目的 README,来自 github.com/zwhy149/bead-grid-studio。合并为一个 markdown 文件:README.md。

Bead Grid Studio — Local-first Fuse-bead Pattern Generator

Turn images into editable, printable fuse-bead patterns.
Color matching, per-cell color codes, board guides, and material counts run locally in your browser.

English · 日本語 · 한국어 · Français · 简体中文

🚀 Live Demo · ⬇ Offline / Release · 30s Quick Start · 💻 Core API (@bead-grid/core) · 📐 Schemas · ⚡ Benchmarks · 📊 Project Health · ⭐ Star on GitHub

CI License: Apache-2.0 Release Offline Downloads Core

Bead Grid Studio is a local-first fuse-bead pattern generator. It has no account, image-upload API, analytics SDK, or cloud conversion service.

Examples

Simple Graphic: original → fuse-bead pattern

Both sides use the repository's original rocket fixture. The right side is a screenshot of the real running app, not an AI-generated product mockup.

Original image Generated pattern, ready to edit
Original rocket fixture owned by the repository English desktop app generating the rocket fuse-bead pattern

Run npm run capture:docs to regenerate the screenshot from the same fixture. See Screenshots for complete desktop and mobile views.

What it helps you do

30-second Quick Start

  1. Open the live demo.
  2. Select Try a Sample. You do not need an image to see a real rocket pattern in seconds.
  3. Choose a long-side cell count or physical board; keep the recommendation if unsure.
  4. Adjust colors or touch up a few cells when needed.
  5. Select Start Making to place one color at a time, or use Export Pattern for a coded build sheet.
  6. Export the material CSV and save the JSON project when you need purchasing or progress records.

You can instead select Choose Image and use PNG, JPEG, WebP, or GIF. The image is decoded and converted only in the current browser.

Choose your path

Goal Fastest route Installation
Convert an image now Open the live demo None
Work offline or carry the app on a USB drive Download the portable HTML None
Batch conversion / Headless script automation CLI Tool (bead-grid) Node.js
Embed conversion engine in Node.js or web app @bead-grid/core package Node.js
Run inside Anna AI OS (AI Coach + Executa) Anna AI OS Edition Anna OS / npm run build:anna
Publish your own copy Fork and deployment guide GitHub account; Cloudflare optional
Modify or contribute code Developer Guide Node.js

Download the offline app

Regular users do not need the source code or Node.js. The offline app is one self-contained HTML file for modern browsers on Windows, macOS, and Linux:

  1. Open the latest Release.
  2. Expand Assets near the bottom of the Release page.
  3. Download the file named like bead-grid-studio-vX.Y.Z.html, where X.Y.Z is the version.
  4. Do not use GitHub's automatically generated Source code ZIP as the offline app.
  5. Double-click the HTML and open it with Chrome, Edge, Firefox, or Safari.

The portable HTML embeds the application, styles, Apache-2.0 license, and third-party notices with no CDN dependency. The Release also includes a ZIP and SHA256SUMS.txt; compare files only with checksums from the same Release:

# Windows PowerShell: run from the download directory
Get-FileHash .\bead-grid-studio-vX.Y.Z.html -Algorithm SHA256
Get-Content .\SHA256SUMS.txt
# Linux
sha256sum --check SHA256SUMS.txt

# macOS
shasum -a 256 bead-grid-studio-vX.Y.Z.html

On phones, prefer the hosted PWA and use the browser's “Add to Home Screen” action. The PWA must load once from HTTPS before its cached pages can open offline. Drafts live in the current browser's site data; export a JSON project before switching browsers or clearing that data.

Fork & Make It Yours

A Fork gives a developer a practical starting point to:

The shortest route is:

Fork → Enable GitHub Actions → Settings → Pages → Deploy

The repository already includes its build, complete QA, and Pages workflow; do not commit dist manually. Follow the Fork and deployment guide to obtain a GitHub Pages URL in a few minutes. The same guide covers Cloudflare Pages when you need a custom domain and security response headers.

Screenshots

English desktop workbench English mobile workbench
English desktop workbench English mobile workbench

The rocket in these screenshots is an original fixture under tests/fixtures/ and may be reused under this repository's license.

When the first result needs work

The project does not promise lossless reproduction at 16 or 24 cells. It protects outlines, openings, and disconnected features when the target grid can represent them, then reports details that are physically smaller than one bead.

Command-line CLI & Automation

You can generate pattern specifications directly from your terminal or automated scripts:

# Generate 29x29 standard bead pattern with truecolor ANSI terminal preview
node bin/bead-grid.mjs tests/fixtures/rocket-badge.png -w 29 -h 29 --format ascii
node bin/bead-grid.mjs tests/fixtures/rocket-badge.png -w 29 --despeckle --format svg > rocket.svg

# Quantize using a custom 12-color starter palette and output JSON pattern
node bin/bead-grid.mjs image.png -w 29 -p examples/palettes/mini-starter-12.json -o pattern.json

See CLI Documentation and Node.js Integration Example.

Developer & Open-source Ecosystem

Bead Grid Studio is not only an end-user Web/PWA application. The repository also provides a complete, reusable open-source stack:

Architecture Overview

Web / PWA (Browser UI) ──────> Browser Adapter ──┐
Headless CLI (Node.js) ──────────────────────────┼──> @bead-grid/core
Node.js Pipeline / Script ───────────────────────┤     ├── Pattern Model & BOM
Automated Tests / Benchmarks ────────────────────┘     ├── OKLab / CIEDE2000 Matching
                                                       └── Open Schemas (2020-12)

For full system architecture diagrams and ASCII data flows, see ARCHITECTURE.md.

5-minute Developer Quick Start

Call the core engine directly in Node.js with zero browser dependencies:

import { generateBeadPattern } from './packages/core/src/index.js';

// Pass raw pixel data (data: Uint8ClampedArray/Uint8Array, width, height)
const pattern = await generateBeadPattern(imagePixelData, {
  cols: 29,
  rows: 29,
  palette: 'mard-compatible-base-221',
  processMode: 'cartoon',
  maxColors: 32,
});

console.log(`Total beads: ${pattern.statistics.totalBeads}`);
console.log(`Unique colors: ${pattern.statistics.usedColors}`);
console.log(`Top color code: ${pattern.materials[0].code} (${pattern.materials[0].count} beads)`);

Run executable integration examples:

node examples/node/index.mjs
node bin/bead-grid.mjs tests/fixtures/rocket-badge.png -w 29 -h 29 --format ascii
node bin/bead-grid.mjs tests/fixtures/rocket-badge.png -w 29 --despeckle --format svg > rocket.svg
npm run build:anna
npm run schema:validate

Run locally for development

Node.js 22.12 or newer is required:

git clone https://github.com/zwhy149/bead-grid-studio.git
cd bead-grid-studio
npm ci
npm run dev

Run test and benchmark suites:

npm run setup
npm run qa          # Runs source integrity, unit tests, and Playwright E2E
npm run benchmark   # Runs quantization performance benchmarks
npm run health      # Verifies local code health and public metrics

See the complete Developer Guide.

Current Focus & Roadmap

See ROADMAP.md for the full evidence-driven roadmap.

Community Showcase & Contributing

Verifiable project health data and adoption indicators are documented in docs/project-health.md and docs/USAGE_METRICS.md.

Maintainers can run npm run metrics to read Stars, Forks, Open Issues, and real Release asset download counts from GitHub's public API. The script is not included in the web app and never tracks app visitors.

For reproducible project-activity signals, community review records, release safeguards, and explicit evidence boundaries, see Project health and public impact evidence.

Main capabilities and engineering boundaries

Why a small grid cannot be “identical”

A grid is an information budget: 16×16 provides only 256 physical positions. A mark, thin letter, or highlight smaller than one cell cannot always remain an independent bead. The converter preserves representable structure and reports missing detail. See Algorithm and Known limitations.

Palette and physical color accuracy

The default palette is the base 221-code subset (A/B/C/D/E/F/G/H/M) from a pinned MIT-licensed source. Screen HEX values are approximations: displays, room light, printers, manufacturers, and production batches introduce differences. Verify expensive builds against the physical color card for the exact bead brand and batch. See Palette provenance.

MARD, Artkal, Hama, and Perler are third-party marks. This independent project is not affiliated with or endorsed by those brands. See TRADEMARKS.md.

Privacy and security

Report security issues privately through SECURITY.md. Do not attach private, customer, or unlicensed images to a public Issue. GitHub Pages does not apply the optional _headers file; see Deployment for the exact hosting boundary.

Repository Structure & Architecture

For full system architecture diagrams and ASCII data flows, see ARCHITECTURE.md.

anna-app/                 Anna AI OS schema-4 app package (manifest, bead-studio Executa, Craft Coach skill)
packages/core/            Decoupled DOM-free core quantization engine & TypeScript definitions
schemas/                  Open data specifications (Pattern & Palette JSON Schema 2020-12)
bin/                      Headless Node.js CLI tool (bead-grid)
examples/                 Browser, Node.js, and CLI integration examples
src/                      Browser app, core modules, i18n, and palette data
public/                   PWA, offline cache, SEO, privacy, and legal pages
tests/unit/               Pure invariant tests & deterministic golden tests
tests/e2e/                Desktop, mobile, and browser tests
tests/fixtures/           Original or explicitly licensed fixtures
scripts/                  Source checks, metrics, and portable build
docs/                     Architecture, algorithm, deployment, provenance, and ADRs

License

Code is licensed under Apache-2.0. Third-party data and build-tool notices are in NOTICE. The license permits commercial reuse; it does not grant rights to the Bead Grid Studio name, logo, or third-party marks.

If the project genuinely saves you a manual redraw, consider starring it, sharing it with another maker, or filing a reproducible improvement. Stars never unlock features.

Support & Buy Me a Coffee ☕

If this local-first open-source tool helped your fuse-bead projects, saved you time with color matching, or made your crafting workflow more delightful:

Buying the author a coffee ☕ is warmly appreciated! Your kindness and encouragement keep this project actively maintained and continuously evolving.

WeChat Pay / Sponsor QR Code
WeChat Pay · Feel free to include your GitHub handle in the note so we can acknowledge you!

bead-grid-studio (zwhy149/bead-grid-studio)

正在搜索数据库…

这是什么?Bead Grid Studio 是一个本地优先的工具,把图片转换成可编辑、可打印的拼豆图纸,支持自动配色匹配、网格坐标和用料统计。
这是桌面应用、网站,还是需要安装的东西?它是一个完全在浏览器中运行的 Web 应用和 PWA;另有单文件离线 HTML 版本,可在没有网络的环境下使用。
怎么开始把图片变成拼豆图纸?打开在线版,点击示例图片或上传你自己的 PNG/JPG/WebP/GIF,选择网格尺寸或真实底板,调整颜色或用画笔修点,然后把图纸导出为 PNG,或把项目保存为 JSON。
使用它需要安装什么吗?普通用户无需安装任何东西,打开网页应用或下载离线 HTML 文件即可。只有想从源码构建的开发者才需要 Node.js 22.12 或更高版本。
小网格尺寸能完美还原我的图片吗?不能——16x16 网格只有 256 个格子,比一颗珠子还小的细节(细线、小字、反光)无法全部呈现;这个工具会尽量保住能保留的结构,并如实报告装不下的部分,而不是假装完美。
它能完全离线使用吗?可以,你可以从 Releases 下载一个自包含的单 HTML 文件,在任何现代浏览器中离线运行;也可以联网加载一次后,把 PWA 安装到主屏幕。
它用什么色卡来匹配珠子?它使用一个固定的 MIT 许可数据源,包含 221 色的基础子集(A-H、M 类),与 MARD 兼容;其中 220 种不透明颜色用于量化,透明的 H1 色保留给手动放置。
我可以 fork 它做自己的品牌版本吗?可以,项目明确支持 fork,用于部署自己的站点、更换品牌、添加经过验证的色卡、改进转换算法或新增语言,并提供到 GitHub Pages 或 Cloudflare Pages 的引导式部署流程。
除了生成图纸,它还提供哪些拼豆辅助功能?它包含一个逐色聚焦助手,一次只突出一种珠子颜色,并跟踪按颜色统计的完成进度(保存在本地),还能导出带色号、数量和完成状态的 UTF-8 CSV 用料清单。
它支持哪些图片格式和底板布局?它接受 PNG、JPG、WebP 和 GIF 图片,支持 2.6mm 和 5mm 等常见真实底板尺寸,图纸居中显示且不会拉伸变形。
作者
zwhy149
大小
2.8 MB
星标
215
时长
3个月
提交 · 90 天