Skip to main content

Asciify

Converts images, videos, and 3D renders into ASCII art.

Asciify samples a texture, a video frame or a live WebGL render target and redraws it as a grid of characters. It draws character sprites onto a canvas rather than emitting text nodes, so a full frame costs one WebGL draw call; where WebGL2 is missing it falls back to Canvas2D, and a separate terminal renderer rasterizes to ANSI escapes for Node.

tip

The operator on the home page is drawn live by Asciify.

npm package@sister.software/asciify
Source codegithub.com/sister-software/asciify
Demosasciify.sister.software
LicenseMIT
PublisherNirrius, LLC, doing business as Sister Software

What it does​

  • Renders any HTMLImageElement, HTMLVideoElement, canvas or WebGL texture as text.
  • Keeps the whole pipeline on the GPU, so a full-screen animation runs at display refresh rate.
  • Exposes the character set, font, cell size, colors and pixel ratio as options.
  • Ships an AsciifyPass for use inside an existing Three.js render loop.

Usage​

bash
yarn add @sister.software/asciify
ts
import { createAsciify } from "@sister.software/asciify"

const canvas = document.createElement("canvas")
const asciify = createAsciify(canvas)

asciify.setSize(window.innerWidth, window.innerHeight)
await asciify.rasterizeImage(myImageElement)