A real-time ASCII art webcam filter that transforms your camera feed into retro-styled terminal art. A raw, zero dependency ASCII engine built on the HTML5 Canvas API.
- Real-time ASCII Conversion: Watch your webcam feed transform into ASCII art in real-time
- Dual Rendering Modes:
- DOTS Mode: Classic ASCII characters (·, °, o, O, 0, @)
- CRT Mode: Block characters for that retro terminal feel (░, ▒, ▓, █)
- Snapshot Capture: Save your ASCII art as PNG images
- Video Recording: Record your ASCII feed as WebM video
- Fully Responsive: Works seamlessly on desktop, tablet, and mobile devices
- Retro UI: Terminal-inspired interface with viewfinder overlay
Classic ASCII art using dot and circle characters for smooth gradients.
Retro terminal aesthetic with block characters for that classic scanline look.
View both the original webcam feed and ASCII conversion side-by-side.
- A modern web browser with webcam access
- Node.js and npm (for development)
- Clone the repository:
git clone https://github.com/NyxLumen/DotFrame.git
cd DotFrame- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
npm run build- MAIN OFF/ON: Toggle the original webcam feed visibility
- MODE: Switch between DOTS and BLOCKS rendering modes
- SNAP: Capture a snapshot of the current ASCII frame
- REC: Start/stop video recording
You can adjust the ASCII art quality by modifying these constants in main.js:
const CAPTURE_WIDTH = 640; // Camera capture resolution width
const CAPTURE_HEIGHT = 480; // Camera capture resolution height
const BASE_CELL_WIDTH = 6; // Cell sampling size (lower = more detail)- For better performance: Increase
BASE_CELL_WIDTH(8-10) or lower capture resolution (320x240) - For higher quality: Decrease
BASE_CELL_WIDTH(3-4) or increase capture resolution (1280x720) - Recommended balance:
BASE_CELL_WIDTH = 4with640x480resolution
- Vanilla JavaScript: No frameworks, pure JS
- HTML5 Canvas: For rendering ASCII art
- WebRTC: For webcam access via
getUserMedia - CSS3: Responsive design with modern CSS features
- Vite: Fast development and build tooling
dot-frame/
├── main.js # Main application logic and initialization
├── index.html # HTML structure
└── src/
├── Capture.js # Webcam capture handling
├── Engine.js # ASCII conversion engine
└── style.css # Styling and responsive design
The engine samples pixels from your webcam feed and converts them to ASCII characters based on luminance values, creating a live ASCII art stream at 60fps.
Uses the standard luminance formula for accurate brightness perception:
luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B;Captures the canvas stream at 60fps with VP9 codec support (falls back to standard WebM if unavailable).



