diff --git a/README.md b/README.md index 7f547f2..0936160 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# LUMEN — Generative Shader Studio +# LUMEN, the generative shader studio **[Try it live →](https://leonxlnx.github.io/lumenshaders/)** @@ -21,28 +21,34 @@ Requires a browser with WebGL2 (Chrome, Edge, Firefox). ## Controls -- **Randomize** (or press `R`): new style, palette, form, lighting and seed, tuned per art style so results stay good. +- **Randomize** (or press `R`): new style, palette, form, lighting and seed, tuned per art style so results stay good. Sometimes it invents a brand-new synth style. - **Style**: 9 art modes, each with its own renderer. "Keep style" locks the mode while randomizing. +- **Synth styles**: "New synth style" blends two renderers with a random mix operation (organic mask, screen, multiply, radial, diagonal) into a completely new look, with a blend slider. "Save style" keeps favorites in your browser as one-click chips. +- **Gradient sets**: the Set button renders 4 to 12 variations of the current design (same style and palette, different seeds) and downloads them as a ZIP of PNGs, ideal for using consistent art across one website. - **Color**: 16 curated palettes plus a harmonic palette generator, 4 editable colors + background, hue / saturation / exposure. - **Form**: seed, zoom, fbm detail, domain warp, turbulence, anisotropic stretch. - **Lighting**: intensity, gloss, light angle, iridescence, glow, contrast. - **Texture**: film grain, halftone/glyph density, ridge count, chromatic aberration, vignette, softness. - **Motion**: loop length and travel distance. Loops are seamless by construction (the noise field is sampled along a closed circle). -- **Share**: every design serializes to a compact code (`LMN1.…`). Copy it, send it to anyone, and pasting it into the Share box recreates the exact design — style, colors, seed, all parameters. "Copy link" produces a URL that loads the design directly. +- **Share**: every design serializes to a compact code (`LMN1.…`). Copy it, send it to anyone, and pasting it into the Share box recreates the exact design: style, colors, seed, all parameters. "Copy link" produces a URL that loads the design directly. - `Space` pauses, `S` saves a PNG. +Full guide: [docs page](https://leonxlnx.github.io/lumenshaders/docs.html). + ## Export +Every export button opens a dialog with a live preview and its settings before downloading. + - **PNG** up to 3840×2160, rendered offscreen at full quality. -- **Video** (WebM VP9/VP8) encoded offline with **WebCodecs** (`VideoEncoder`) and muxed by a built-in dependency-free WebM writer — no `MediaRecorder`, no realtime capture, no tab crashes. Configurable fps (24/30/60), resolution (720p–1440p) and exact length (1–8 loops or 5–60 seconds). +- **Video** (WebM VP9/VP8) encoded offline with **WebCodecs** (`VideoEncoder`) and muxed by a built-in dependency-free WebM writer: no `MediaRecorder`, no realtime capture, no tab crashes. Configurable fps (24/30/60), resolution (720p–1440p) and exact length (1–8 loops or 5–60 seconds). - **GIF** rendered deterministically frame by frame, encoded in-page with a dependency-free GIF89a encoder (median-cut palette + ordered dithering). Loop forever or play once. ## Files -- `index.html` / `styles.css` — app shell and design system -- `js/shaders.js` — the uber fragment shader with all 9 modes -- `js/engine.js` — WebGL2 engine and render loop -- `js/gifenc.js` — GIF encoder (quantizer + LZW) -- `js/webmmux.js` — WebM/Matroska muxer for WebCodecs output -- `js/exporter.js` — PNG / video / GIF pipelines -- `js/palettes.js`, `js/ui.js`, `js/main.js` — palettes, control builders, state and randomizer +- `index.html` / `styles.css`: app shell and design system +- `js/shaders.js`: the uber fragment shader with all 9 modes +- `js/engine.js`: WebGL2 engine and render loop +- `js/gifenc.js`: GIF encoder (quantizer + LZW) +- `js/webmmux.js`: WebM/Matroska muxer for WebCodecs output +- `js/exporter.js`: PNG / video / GIF pipelines +- `js/palettes.js`, `js/ui.js`, `js/main.js`: palettes, control builders, state and randomizer diff --git a/assets/apple-touch-icon.png b/assets/apple-touch-icon.png new file mode 100644 index 0000000..c1d0052 Binary files /dev/null and b/assets/apple-touch-icon.png differ diff --git a/assets/favicon.png b/assets/favicon.png new file mode 100644 index 0000000..f66bdf1 Binary files /dev/null and b/assets/favicon.png differ diff --git a/assets/icon-512.png b/assets/icon-512.png new file mode 100644 index 0000000..dd9265f Binary files /dev/null and b/assets/icon-512.png differ diff --git a/assets/og.png b/assets/og.png new file mode 100644 index 0000000..d1a5a1c Binary files /dev/null and b/assets/og.png differ diff --git a/docs.html b/docs.html new file mode 100644 index 0000000..2911d90 --- /dev/null +++ b/docs.html @@ -0,0 +1,174 @@ + + + + + +Docs, LUMEN generative shader studio + + + + + + + + + + +
+
+ + LUMEN + documentation +
+
+ Open the studio +
+
+ +
+
+

How LUMEN works

+

LUMEN generates looping abstract shader art in your browser: liquid chrome, silk, soft gradients, halftone fields and more. Everything renders in real time with WebGL2, every animation is a perfect loop, and everything you make can be exported or shared as a code.

+
+ +
+

Styles

+

Pick one of the 9 base styles in the Style section: Chrome, Silk, Bloom, Aura, Rays, Halftone, Glyphs, Reeded and Mosaic. Each one is its own renderer with its own character.

+

Synth styles go beyond the base set: New synth style blends two renderers with a random mix operation (organic mask, screen, multiply, radial or diagonal split) into a completely new look. The Synth blend slider controls how strongly the second layer shows. The big Randomize button also produces synth styles some of the time.

+

Found something you love? Save style stores it in your browser. Saved styles appear as chips you can reload with one click, and they survive page reloads.

+
+ +
+

Color

+ +
+ +
+

Form, lighting, texture, motion

+ + + + + + + + + +
SeedEvery design is deterministic. Same seed, same image. Type a number or roll a new one.
Zoom / DetailSize of the forms and the number of noise octaves.
Warp / TurbulenceHow much the field folds into itself and how much it churns while moving.
StretchAnisotropy. Positive stretches horizontally, negative vertically.
LightingIntensity, gloss tightness, light angle, iridescence and bloom glow.
TextureFilm grain, halftone and glyph density, ridge count, chromatic aberration, vignette, softness.
Loop lengthDuration of one seamless cycle, 2 to 12 seconds.
TravelHow far the field moves during one loop.
+
+ +
+

Share codes

+

Every design serializes to a compact code starting with LMN1. It contains the style, all five colors, the seed and every parameter.

+ +
+ +
+

Gradient sets

+

The Set button generates 4 to 12 variations of your current design that share the style, palette and all settings but use different seeds. They look like one family, which makes them perfect for a website: one for the hero, others for cards or section backgrounds.

+

Click a tile to apply that seed to the editor, or download the whole set as a ZIP of PNGs in one click.

+
+ +
+

Export

+

Each export button opens a dialog with a live preview and its settings, then downloads on confirm.

+ + + + +
PNGStills up to 3840 x 2160, rendered offscreen at full quality.
WebM videoEncoded offline with WebCodecs, VP9 or VP8, muxed by a built-in WebM writer. 24, 30 or 60 fps, exact length in loops or seconds.
GIFFrame-exact seamless loop, encoded in-page with a dependency-free GIF89a encoder. Optional dithering, loop forever or play once.
+

Loops are seamless by construction: the noise field is sampled along a closed circle, so the last frame flows exactly into the first.

+
+ +
+

Shortcuts

+ + + + +
RRandomize everything
SpacePlay or pause
SSave a PNG with current settings
+
+ +
+

Tech notes

+

LUMEN is a static page with zero dependencies: one WebGL2 uber-shader, a hand-written GIF encoder, a WebM muxer and a store-only ZIP writer. The source is on GitHub under the MIT license.

+
+
+ + + diff --git a/index.html b/index.html index 28348d2..93f6884 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,17 @@ -LUMEN — Generative Shader Studio +LUMEN, the generative shader studio + + + + + + + + + + @@ -43,6 +53,15 @@ GIF + +
+ + + Docs + @@ -57,7 +76,7 @@ - + ... seed 0000 @@ -77,7 +96,7 @@