交互式 ASCII 肖像特效网页

sou | Ai & Tech @sonuv_dev · 2026-11-28 · 43.5万 播放 · ♥ 218

Gemini 4

由 Gemini 4 Neon 根据静态人像生成的单文件 2D Canvas 交互式 ASCII 网页应用,包含 6 种实时动画模式、弹簧物理指针交互、冲击波和 4 套配色方案。

完整提示词

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.

出处:作者本人的回复,原文照录。

需自备素材:作者还给了模型参考图或文件
去 X 看原帖 ↗

模型和版本以作者自述为准。作品版权归原作者,要更正署名或下架请私信 @GoSailGlobal。

更多「网页与界面」提示词

← 回到 Gemini 4 提示词合集