Skip to main content
OpenTUI supports advanced 3D rendering in the terminal using Three.js and WebGPU. Render meshes, lights, shaders, and post-processing effects directly in your TUI.
3D rendering requires WebGPU support. Make sure you’re running on a system with WebGPU available (most modern systems support this through Dawn/wgpu).

Quick Start

Render a simple 3D cube:

ThreeCliRenderer

The ThreeCliRenderer bridges Three.js with OpenTUI’s terminal rendering.

Configuration

Rendering

Materials and Lighting

Material Types

Lighting

Geometries

Primitive Shapes

Post-Processing Effects

Apply effects to rendered frames:

Available Effects

  • applyScanlines(buffer, intensity) - CRT scanline effect
  • applyGrayscale(buffer) - Convert to grayscale
  • applySepia(buffer) - Sepia tone
  • applyInvert(buffer) - Invert colors
  • applyNoise(buffer, amount) - Add noise
  • applyChromaticAberration(buffer, offset) - RGB shift
  • applyAsciiArt(buffer) - ASCII art filter
  • BloomEffect - Glow effect
  • BlurEffect - Gaussian blur
  • VignetteEffect - Edge darkening
  • BrightnessEffect - Adjust brightness
  • DistortionEffect - Warp/distort image

Textures

Loading Textures

Normal Maps

Animation

Combine with OpenTUI’s timeline system:

Complete Example: Rotating Cube

Performance Tips

Use lower polygon counts for terminal rendering:
Some effects are expensive. Use sparingly:
Render at lower resolution for better performance:

Next Steps

Syntax Highlighting

Add tree-sitter code highlighting

Building Your First App

Complete tutorial for building apps