Event-site recipe
An event or launch page can carry more character than a product page. From 4.30, asciify-engine/kit has the pieces for its header, hero and footer: links that scramble on hover, a hero of frames that morph as hatched lines, a pointer that sprays hatching with coordinate tags, a globe of dots, a dithered glow, photos in two brand tones, and a wordmark that assembles as the page reaches it. Each is one call, draws through the page's one GPU context, idles when nothing moves, pauses off screen, shows settled stills under reduced motion and leaves your HTML working without WebGL2. See each one live on the components page.
Header
Keep the links real HTML. decode with scramble and a manual trigger leaves them plain until the pointer enters, flips their letters through other alphabets in the link's own font, then hands back to the HTML.
import { decode, navPill } from 'asciify-engine/kit';
navPill(nav); // a pill slides behind the hovered link
// Optional: each link scrambles on hover too.
for (const a of nav.querySelectorAll('a')) decode(a, { scramble: true, trigger: 'manual' });Hero
On your brand-coloured ground, morphField holds each frame and cross-fades to the next: with the default engraved lines, one picture's stripes thin away as the next one's thicken. Frames are image URLs, videos, canvases or functions that draw in white on black each frame, such as a turning scene. The headline's word sweeps into another alphabet and lands, in its own HTML text, and can greet in several languages in turn.
import { morphField, decode, cursorTrail } from 'asciify-engine/kit';
const hero = morphField(heroEl, { sources: frames, ink: '#ffffff', grid: true, onChange: i => (counter.textContent = `${i + 1}/${frames.length}`) });
// <h1><span class="word">Connect</span> 2026</h1>
decode(heroEl.querySelector('h1 .word'), { scramble: true, cycle: ['Connect', 'つながる', 'Conectar', '연결', 'Verbinden', '连接'] });
// One per page: hatched spray with coordinate tags, behind cards and text, a few patches appearing on their own.
cursorTrail({ style: 'spray', readout: true, ambient: 4, ink: '--ascii-ink', zIndex: -1 });| Option | Type | Default | Description |
|---|---|---|---|
sources | MorphSource[] | Image URLs or elements, canvases, videos, or (pen, w, h, now) => void drawings. | |
hold / transition | ms | 4200 / 750 | How long each frame holds, and how long a morph takes. |
grid | boolean | colour | false | A fine square-dot grid on the ground under the stripes. |
look.markAngle | degrees | -45 | Angle of the lines: 90 vertical, 0 horizontal. look.mark swaps them for dither, dots or characters. |
next() / go(i) | method | Step through the frames from your own controls; onChange keeps a counter in step. |
Sections
import { globe, ditherImage, ditherGradient, background, wordField } from 'asciify-engine/kit';
const earth = globe(globeEl, { ink: '--brand', points: venues, label: 'Where we meet' });
ditherImage(figure, { tones: ['--brand-deep', '--brand'], reveal: 'scroll' }); // gapped pixel squares
ditherGradient(ctaPanel, { ink: '--brand-tint' }); // a low glow under a fine tick screen
// Repeated words, legible, lit under the pointer.
background(sponsorsEl, { preset: wordField, look: { glyphOrder: 'text', textRepeat: 'row', charset: ' build connect protect ', hover: 'lantern' } });Footer
Close on the name, gathering out of scattered pieces as the visitor scrolls to it. Turn its own hover off so the page's cursor flows over it.
import { wordmark } from 'asciify-engine/kit';
wordmark(footerMark, { text: 'connect', assemble: 'scroll', look: { hover: 'none' } });