Interactive 2D canvas ASCII portrait playground

sou | Ai & Tech @sonuv_dev · 2026-11-28 · 434.7K views · ♥ 218

Gemini 4

An interactive single-file 2D Canvas ASCII portrait app with 6 animation modes, spring-physics pointer interactions, shockwaves, and 4 palettes, built by Gemini 4 Neon from a portrait.

Full prompt

Build a single-file, zero-dependency interactive HTML5 + 2D Canvas web app titled "EMBER // ASCII" that turns the attached portrait into a real-time 60 fps kinetic ASCII typography engine with bold editorial art direction (no generic neon Matrix styling).

1. Image Sampling & Masking Pipeline
- Sample the attached image onto an offscreen canvas into a square grid (default 92×92, adjustable 52–156).
- Run a 4-edge flood-fill background detector (luma > 0.89 and saturation < 0.15) starting only from the outer edges so the exterior white background becomes transparent while interior highlights and the whites of the eyes stay intact.
- Compute per-cell attributes: RGB, luminance, saturation, warmth (red-minus-blue weighted by saturation for hair/highlights), teal/emerald detection, an eye-region focus anchor mask (keeping eyes sharp while surrounding hair moves freely), and perceptual visual weight `max(luma, r*0.88, g*0.85, sat*0.72)` so deep crimson/saturated tones map to bold dense glyphs instead of faint dots.

2. Real-Time 60 fps Animation Modes (6 Live Modes)
- Solar Wind (default): Curl-like directional wind waves weighted by the hair/warmth mask so hair whips right and upward while eyes stay locked, paired with rising ASCII ember sparks (`* + ' ^ · ~`) and subtle periodic glitch slices.
- Fracture: Rhythmic horizontal slice shearing, red/cyan chromatic aberration text echoes, and random glyph-scramble bursts that decode back into the portrait.
- 3D Vortex: Luminance-to-depth Z-projection with smooth 3D perspective tilt driven by cursor position (or auto-orbit when idle) plus concentric ripple waves.
- Decode: Cascading vertical character streams with luminous glitching heads that sweep down and lock onto the portrait's contours.
- Halftone: Living optical moiré interference waves modulating glyph density and subtle print displacement.
- Ignite: Rising thermal convection waves lifting glowing sparks off warm/bright pixels with soft motion trails.

3. Tactile Pointer Physics & Shockwaves
- Give every grid cell damped spring physics (`ox, oy, vx, vy`) and a `scramble` decay state.
- Moving the pointer/touch across the portrait creates a magnetic swirl, velocity wake, glyph scramble, and chromatic split that snaps elastically back into place.
- Clicking anywhere (or pressing Space / PULSE) fires an expanding radial shockwave ring that pushes glyphs outward, scrambles them into high-energy symbols, and pulls them back into crisp focus.

4. Typography, Palettes & Editorial Aesthetic
- 5 switchable glyph sets: Dense ASCII, Half-width Katakana (`ヲァィゥ...`), Unicode Blocks (`·▫▪░▒▓▄▀■█`), Editorial Type, and Binary (`01`).
- 4 switchable palettes:
1. Ember (default): Gamma-lifted vivid true-color (`pow(v/255, 0.74)`) on deep obsidian `#070607`.
2. Riso: Sunlit warm off-white paper `#f3efe6` with risograph crimson, emerald, and charcoal ink (automatically switches UI to light theme and inverts glyph density).
3. Thermal: Molten crimson-to-gold ramp while preserving emerald eye accents.
4. Ink: Crisp monochrome with selective emerald eye highlights.
- Frame the portrait on the canvas with a subtle 1px hairline border and corner registration marks.

5. Minimalist HUD, Procedural Audio & Exports
- Top bar: live FPS + grid dimensions badge, procedural Web Audio SFX toggle (muted by default; synthesizes dry sub-thumps, crisp filtered noise bursts, and mechanical switch ticks on pulses/clicks), Copy ASCII frame to clipboard, Export PNG snapshot, and Clean UI toggle (`H` key) that hides all controls for screen recording.
- Bottom floating glass dock: 6 mode pills, `TUNE` drawer toggle (Grid Density, Chaos/Energy, Flow Speed sliders + Glyph Set & Palette pills), and a `PULSE` trigger button.
- Ensure the layout is responsive across mobile, side-panel, and fullscreen desktop viewports with crisp HiDPI canvas scaling.

Source: the creator's own reply, copied verbatim.

Needs your own assets: the creator also gave the model reference files
View the original post on X ↗

Model and version are as stated by the creator. The work belongs to its creator; DM @GoSailGlobal to fix credit or remove it.

Get new Gemini 4 prompts by email

We'll only email you when there's a new Gemini 4 prompt worth trying. Free right away: the 50 most-viewed Claude 5.5 video prompts on one page, the same kind of 3D, physics and game builds, with the full text, the creator and the post each one came from.

More websites & ui prompts

← Back to the Gemini 4 library