Pretext Projects

8 text-driven Canvas experiments. Built in 3 days. Zero DOM reads. All MIT.

8 projects 3 days ~142 commits ~10K+ lines

Built with @chenglou/pretext — a text layout library that bypasses the DOM entirely. One-time canvas measurement, then pure arithmetic at ~0.0002ms per call.

Pretext Playground Upgrade
Project 1

🐉 Pretext Playground Upgrade

Every character on screen is a physics body.

Three interactive demos: an ASCII dragon with fire/ice breath, a bioluminescent jellyfish abyss, and five animated ASCII art scenes. Structure-of-Arrays, zero GC in the game loop.

Ink & Vapor
Project 2

🖋️ Ink & Vapor

The boundary between permanence and impermanence is a line you draw.

A draggable wavy boundary splits the screen. Below: solid serif ink. Above: particles drifting on noise fields. 3 themes, vortex mode, and control panel sliders.

Exoskeleton
Project 3

🪲 Exoskeleton

A Digital Monograph on Insect Morphology.

An interactive digital book about entomology. Custom text layout engine (~3,000 lines), compound eye cursor, pheromone simulation, 75+ Vitest tests, and GitHub Actions CI.

Aether
Project 4

🌫️ Aether

Smoke-like fluid dynamics drive real text layout on Canvas 2D.

Move your mouse to inject ASCII smoke. Body text flows around high-density regions in real time. Multi-frequency velocity field with shockwave interaction.

TextVerse
Project 5

📖 TextVerse

Text that lives, not just sits.

Scroll-driven narrative where text is the protagonist. Particles assemble into words. Words become physics bodies you can launch projectiles at. Custom spring engine, 2000 bodies at 60fps.

Creature Lab
Project 6

🦠 Creature Lab

Every keystroke spawns a life form.

Type any character and watch organisms emerge. Five families — Herd Animals, Apex Predators, Wanderers, Scavengers, Titans. Punctuation triggers earthquakes, rain, and gravity wells.

GlyphStream
Project 7

✨ GlyphStream

Five generative algorithms — each a living system, every render unique.

A reusable ASCII art library: Flow Field, Typography, Reactive, Ambient, and Face Generator. Common component API, one dependency (pretext), import any component.

Typogenesis
Project 8

📰 Typogenesis

Where text breathes, flows, and becomes.

Multi-column editorial layout with text flowing around animated orb obstacles. Layout computation under 0.5ms. Dual themes, 1,200-particle flow field, GPU-composited transforms.