โก Real-time performance
Blazing fast ASCII conversion powered by optimized WebGL shaders. Delivers smooth, low-latency visuals even at high resolutions.
Instantly transform any <canvas> and <video> into a dynamic grid of characters in real-time
textmode.js
? โ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.
Get up and running with textmode.js
in just a few steps:
npm install textmode.js
2a. Import and initialize with an existing <canvas> to capture:
import { textmode } from 'textmode.js';
// Reference your existing canvas element
const canvas = document.querySelector('canvas#myCanvas');
const textmodifier = await textmode.create(canvas);
2b. Import and initialize with an existing <video> to capture:
import { textmode } from 'textmode.js';
// Reference your existing video element
const video = document.querySelector('video#myVideo');
const textmodifier = await textmode.create(video);
2c. Import and use the standalone drawing API:
import { textmode } from 'textmode.js';
// Create a new textmodifier instance
const t = await textmode.create({
width: window.innerWidth,
height: window.innerHeight,
fontSize: 16,
});
// Start drawing with the textmode API
t.draw(() => {
t.background(128);
t.fill(255);
t.rect(50, 50, 200, 100);
});
Thatโs it! Your canvas will now be displayed as real-time ASCII/textmode art.
For advanced usage and customization, see the API documentation.
Experience textmode.js
in action with our interactive demos:
Join our growing community of creative developers:
Transform your canvas into ASCII art in minutes. Check out our API documentation and examples to begin your textmode journey.