Skip to content

Introduction

Welcome! textmode.js is a free, lightweight and framework-agnostic creative coding library for real-time ASCII art and textmode experiences in web browsers.

Transform any <canvas> or <video> element into dynamic ASCII representations with blazing-fast WebGL rendering. Whether you're using p5.js, three.js, or vanilla JavaScript, textmode.js seamlessly integrates with your existing projects to create interactive textmode games, live visual performances, and artistic installations.

For standalone projects, textmode.js provides its own p5.js-inspired drawing API, letting you create compelling ASCII experiences without additional dependencies. The library powers live coding performances, interactive installations, and digital art projects worldwide, bringing the nostalgic aesthetic of textmode art into modern web development.

Features

  • Dependency-free: No external libraries required, making it lightweight and easy to integrate into any project.
  • TTF/OTF font support: Load and use TrueType and OpenType fonts for rendering textmode art, allowing for a wide range of styles and characters.
  • Framework-agnostic: Use textmode.js with any JavaScript framework or library, such as p5.js, three.js, or even vanilla JavaScript.
  • Standalone drawing API: Use the built-in p5.js-like drawing API for creating textmode art without any other dependencies.
  • Injectable: Easily inject textmode.js into websites like YouTube to convert <video> or <canvas> elements into textmode representations for a unique viewing experience.
  • WebGL1/WebGL2 support: All shader code provided by textmode.js is written in GLSL ES 1.0, making it compatible with both WebGL1 and WebGL2 contexts, allowing for a wide range of devices to run your ASCII projects.
  • Exporting: Export your creations to various image formats, and as .txt, .svg and .json files for easy sharing, printing and plotting.
  • Typescript support: Fully typed library with TypeScript definitions, making it easy to integrate into TypeScript projects and ensuring type safety.