Display ansi/ascii art in the browser via HTML5 Canvas.
An old project of mine from 2009 that I've been slowly refactoring to get up to speed on modern (post-2015) javascript and web technologies.
Requires Node.js and pnpm. All additional dev tooling (typescript, vite, biome, etc) is installed as dev dependencies.
pnpm install
pnpm build # outputs to dist/ansi.js
A basic demo page is included for local development.
pnpm dev
and load https://localhost:5173
Use the <ansi-file> custom element:
<ansi-file src="my-ansi.ans"></ansi-file>
src: URL of the ANSI file to render
font: URL of a PSF2 (linux console) format font. IBM VGA 9x16 is the default
cols: Column width to render by, defaults to 80
baud: Baud rate to display at
- Configurable color palettes/iCE color support
- Maybe write some actual tests, like an adult.
- Blink support