High-Performance ASCII Conversion
A zero-dependency TypeScript library for converting images, video, and text into ASCII art. Optimized for performance and flexibility.
Quick Start
Installation
npm install ts-ascii-engine
Basic Usage
import { AsciiGenerator, CharsetPreset } from 'ts-ascii-engine';
// Create generator
const generator = new AsciiGenerator({
charset: CharsetPreset.BLOCK,
width: 100,
colored: true
});
// Convert image
const img = document.querySelector('img');
const result = generator.convertImage(img);
// Display result
document.getElementById('output').innerHTML = result.html;
Interactive Demo
Try it yourself
Upload an image or generate a sample to see ASCII conversion in action.
Features
Zero Dependencies
Pure TypeScript implementation with no external libraries. Lightweight and fast.
Full TypeScript
Complete type definitions and IntelliSense support for the best developer experience.
High Performance
Optimized with typed arrays and minimal garbage collection. Process video at 30+ FPS.
Color Support
Preserve original colors in ASCII output for stunning visual effects.
Real-time Video
Convert webcam streams and video elements in real-time with smooth performance.
Secure by Design
Built-in input validation and sanitization to prevent common web vulnerabilities.