Skip to content

Commit a662465

Browse files
committed
chore: OSS packaging — README, LICENSE, CI, package.json, metadata
1 parent 5139b22 commit a662465

6 files changed

Lines changed: 186 additions & 82 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: pnpm/action-setup@v4
16+
with:
17+
version: 9
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 22
22+
cache: pnpm
23+
24+
- run: pnpm install --frozen-lockfile
25+
- run: pnpm lint
26+
- run: pnpm build

CONTRIBUTING.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Contributing to Glyph
2+
3+
## Development Setup
4+
5+
```bash
6+
git clone https://github.com/Codeptor/glyph.git
7+
cd glyph
8+
pnpm install
9+
pnpm dev
10+
```
11+
12+
## Code Style
13+
14+
- TypeScript strict mode
15+
- ESLint flat config (`eslint.config.js`)
16+
- Tailwind CSS v4 with shadcn/ui components
17+
18+
## Commits
19+
20+
- Concise, imperative messages: `fix: controls scroll`, `feat: add CRT bloom`
21+
- Scoped prefixes when relevant: `fix(engine):`, `feat(ui):`
22+
- Small, revertible commits
23+
24+
## Architecture
25+
26+
See `AGENTS.md` for detailed architecture docs.
27+
28+
Engine code lives in `src/engine/` — pure TypeScript, no React dependencies.
29+
UI code lives in `src/components/` — React + shadcn/ui.
30+
State lives in `src/store/` — Zustand.
31+
32+
## Adding an Art Style
33+
34+
1. Create `src/engine/styles/yourStyle.ts` implementing the `RenderFn` type from `styles/types.ts`
35+
2. Register it in `src/engine/styles/index.ts`
36+
3. Add the type to `ArtStyle` union in `src/types/index.ts`
37+
4. Add UI controls in `src/components/ControlsPanel.tsx`
38+
39+
## Adding a Dithering Algorithm
40+
41+
1. Define a `DiffusionKernel` in `src/engine/dither.ts` (see existing ones for pattern)
42+
2. Add to `DITHER_FUNCTIONS` record
43+
3. Add the type to `DitherAlgorithm` union in `src/types/index.ts`
44+
4. Add to UI dropdown in `src/components/ControlsPanel.tsx`

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Codeptor
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 65 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,78 @@
1-
# React + TypeScript + Vite
1+
# Glyph
22

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3+
Real-time ASCII art generator. Transform images and video into 9 art styles with live dithering, animated FX, and multi-layer compositing — entirely in the browser.
44

5-
Currently, two official plugins are available:
5+
## Features
66

7-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
8-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
7+
- **9 Art Styles** — Classic ASCII, Braille, Halftone, Dot Cross, Line, Particles, Claude Code, Retro, Terminal
8+
- **8 Dithering Algorithms** — Floyd-Steinberg, Bayer (8x8), Atkinson, Jarvis-Judice-Ninke, Stucki, Sierra, Sierra Lite, or none
9+
- **Animated FX** — Noise (simplex), Intervals, Beam, Glitch, CRT (phosphor mask + scanlines + bloom), Matrix Rain
10+
- **8 Color Modes** — Grayscale, Full Color, Matrix, Amber, Sepia, Cool Blue, Neon, Custom hex
11+
- **Multi-Layer System** — Stack multiple layers with independent settings
12+
- **Live Camera Input** — Webcam with device switching and quality control
13+
- **Export** — PNG (1x/2x/4x), self-contained HTML, React component (.tsx), JSON preset
14+
- **Presets** — Save/load/import parameter presets, 10+ built-in templates
15+
- **Keyboard Shortcuts** — Full shortcut system (press `?` to see all)
16+
- **Undo/Redo** — 50-state history with Ctrl+Z / Ctrl+Shift+Z
17+
- **Dark/Light Theme** — Toggle with one click
918

10-
## React Compiler
19+
## Tech Stack
1120

12-
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
21+
- **Rendering** — Canvas 2D, sRGB-correct luminance (BT.709), simplex noise
22+
- **Frontend** — React 19, TypeScript, Vite 8, Tailwind CSS v4, shadcn/ui, Zustand
23+
- **Storage** — IndexedDB (gallery + presets), fully client-side
1324

14-
## Expanding the ESLint configuration
25+
## Quick Start
1526

16-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
27+
```bash
28+
pnpm install
29+
pnpm dev
30+
```
1731

18-
```js
19-
export default defineConfig([
20-
globalIgnores(['dist']),
21-
{
22-
files: ['**/*.{ts,tsx}'],
23-
extends: [
24-
// Other configs...
32+
Open `http://localhost:5173`, drop an image, and start tweaking.
2533

26-
// Remove tseslint.configs.recommended and replace with this
27-
tseslint.configs.recommendedTypeChecked,
28-
// Alternatively, use this for stricter rules
29-
tseslint.configs.strictTypeChecked,
30-
// Optionally, add this for stylistic rules
31-
tseslint.configs.stylisticTypeChecked,
34+
## Build
3235

33-
// Other configs...
34-
],
35-
languageOptions: {
36-
parserOptions: {
37-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
38-
tsconfigRootDir: import.meta.dirname,
39-
},
40-
// other options...
41-
},
42-
},
43-
])
36+
```bash
37+
pnpm build
38+
pnpm preview
4439
```
4540

46-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47-
48-
```js
49-
// eslint.config.js
50-
import reactX from 'eslint-plugin-react-x'
51-
import reactDom from 'eslint-plugin-react-dom'
52-
53-
export default defineConfig([
54-
globalIgnores(['dist']),
55-
{
56-
files: ['**/*.{ts,tsx}'],
57-
extends: [
58-
// Other configs...
59-
// Enable lint rules for React
60-
reactX.configs['recommended-typescript'],
61-
// Enable lint rules for React DOM
62-
reactDom.configs.recommended,
63-
],
64-
languageOptions: {
65-
parserOptions: {
66-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
67-
tsconfigRootDir: import.meta.dirname,
68-
},
69-
// other options...
70-
},
71-
},
72-
])
41+
## Keyboard Shortcuts
42+
43+
| Shortcut | Action |
44+
|----------|--------|
45+
| `Ctrl+S` | Save PNG |
46+
| `Ctrl+E` | Export dialog |
47+
| `Ctrl+Z` | Undo |
48+
| `Ctrl+Shift+Z` | Redo |
49+
| `Ctrl+R` | Randomize |
50+
| `F` | Fullscreen |
51+
| `H` | Toggle sidebar |
52+
| `[ / ]` | Switch layers |
53+
| `1-9` | Art style |
54+
| `?` | Shortcuts help |
55+
56+
## Architecture
57+
7358
```
59+
src/
60+
├── engine/ # Rendering pipeline (pure Canvas 2D, no WebGL)
61+
│ ├── AsciiRenderer.ts # Main render loop, canvas management
62+
│ ├── brightness.ts # sRGB linearization + BT.709 luminance
63+
│ ├── dither.ts # 8 dithering algorithms (generic diffusion kernel)
64+
│ ├── noise.ts # 2D/3D simplex noise + fBm
65+
│ ├── fx.ts # Pre-render (noise, intervals, beam, glitch) + post-render (CRT, matrix-rain)
66+
│ ├── charsets.ts # Character mapping tables
67+
│ ├── renderUtils.ts # Colors, edge detection, vignette, mouse interaction
68+
│ └── styles/ # 9 independent art style renderers
69+
├── components/ # React UI (shadcn/ui)
70+
├── store/ # Zustand state management
71+
├── hooks/ # Keyboard shortcuts
72+
├── lib/ # Export generators, DB, templates
73+
└── types/ # TypeScript type definitions
74+
```
75+
76+
## License
77+
78+
MIT

index.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66

7-
<title>ASC11 - ASCII Art Generator</title>
8-
<meta name="description" content="Transform images into stunning ASCII art with real-time dithering, multiple art styles, and WebGL effects. Free browser-based ASCII art generator." />
9-
<meta name="keywords" content="ascii art, dithering, ascii generator, image to ascii, braille art, halftone, webgl" />
10-
<meta name="author" content="ASC11" />
7+
<title>Glyph - ASCII Art Generator</title>
8+
<meta name="description" content="Transform images into stunning ASCII art with 9 art styles, 8 dithering algorithms, animated FX, and multi-layer compositing. Free, open-source, browser-based." />
9+
<meta name="keywords" content="ascii art, dithering, ascii generator, image to ascii, braille art, halftone, simplex noise, canvas 2d, open source" />
10+
<meta name="author" content="Codeptor" />
1111
<meta name="theme-color" content="#000000" />
1212

1313
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
@@ -17,24 +17,24 @@
1717
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=VT323&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
1818

1919
<meta property="og:type" content="website" />
20-
<meta property="og:title" content="ASC11 - ASCII Art Generator" />
21-
<meta property="og:description" content="Transform images into stunning ASCII art with real-time dithering, multiple art styles, and WebGL effects." />
22-
<meta property="og:url" content="https://asc11.com" />
20+
<meta property="og:title" content="Glyph - ASCII Art Generator" />
21+
<meta property="og:description" content="Transform images into stunning ASCII art with 9 art styles, 8 dithering algorithms, animated FX, and multi-layer compositing." />
22+
<meta property="og:url" content="https://github.com/Codeptor/glyph" />
2323
<meta property="og:image" content="/og-image.png" />
24-
<meta property="og:site_name" content="ASC11" />
24+
<meta property="og:site_name" content="Glyph" />
2525

2626
<meta name="twitter:card" content="summary_large_image" />
27-
<meta name="twitter:title" content="ASC11 - ASCII Art Generator" />
28-
<meta name="twitter:description" content="Transform images into stunning ASCII art with real-time dithering, multiple art styles, and WebGL effects." />
27+
<meta name="twitter:title" content="Glyph - ASCII Art Generator" />
28+
<meta name="twitter:description" content="Transform images into stunning ASCII art with 9 art styles, 8 dithering algorithms, animated FX, and multi-layer compositing." />
2929
<meta name="twitter:image" content="/og-image.png" />
3030

3131
<script type="application/ld+json">
3232
{
3333
"@context": "https://schema.org",
3434
"@type": "WebApplication",
35-
"name": "ASC11",
36-
"description": "Transform images into stunning ASCII art with real-time dithering, multiple art styles, and WebGL effects.",
37-
"url": "https://asc11.com",
35+
"name": "Glyph",
36+
"description": "Real-time ASCII art generator with 9 art styles, 8 dithering algorithms, and animated FX.",
37+
"url": "https://github.com/Codeptor/glyph",
3838
"applicationCategory": "DesignApplication",
3939
"operatingSystem": "Any",
4040
"offers": {
@@ -43,12 +43,12 @@
4343
"priceCurrency": "USD"
4444
},
4545
"featureList": [
46-
"Real-time ASCII art rendering",
47-
"Multiple art styles including classic, braille, halftone",
48-
"Floyd-Steinberg, Bayer, and Atkinson dithering",
49-
"WebGL overlay effects",
50-
"Camera input support",
51-
"Export as image or text"
46+
"9 art styles: Classic ASCII, Braille, Halftone, Line, Particles, and more",
47+
"8 dithering algorithms including Floyd-Steinberg, Bayer, Atkinson, Stucki",
48+
"Animated FX: Simplex noise, CRT with phosphor mask, Matrix Rain, Glitch",
49+
"Multi-layer compositing system",
50+
"Live camera input",
51+
"Export to PNG, HTML, React component, JSON preset"
5252
]
5353
}
5454
</script>

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
{
2-
"name": "asc11-temp",
3-
"private": true,
4-
"version": "0.0.0",
2+
"name": "glyph",
3+
"version": "1.0.0",
4+
"description": "Real-time ASCII art generator with 9 art styles, 8 dithering algorithms, and animated FX. Browser-based, no backend.",
5+
"author": "Codeptor",
6+
"license": "MIT",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/Codeptor/glyph.git"
10+
},
11+
"homepage": "https://github.com/Codeptor/glyph",
12+
"bugs": "https://github.com/Codeptor/glyph/issues",
513
"type": "module",
614
"scripts": {
715
"dev": "vite",

0 commit comments

Comments
 (0)