sinclairzx81 / zero

A 3D renderer written in JavaScript and rendered to the terminal.
Other
2.42k stars 143 forks source link
ascii-art graphics javascript nodejs rasterizer terminal

Zero

A 3D renderer written in JavaScript and rendered to the terminal. No GPU required.

[![NPM package](https://badge.fury.io/js/zero-demo.svg)](https://www.npmjs.com/package/zero-demo)
# start the demo in ascii mode (default)
$ npx zero-demo@latest

# start the demo in 24-bit true color mode (experimental)
$ npx zero-demo@latest --color

Overview

Zero is a small graphics demo that implements a 3D renderer in JavaScript and renders it's output to a terminal via nodejs' stdout. Zero was written for fun and to push JavaScript performance. ASCII rendering has been tested on Windows, OSX and Linux terminals. ANSI 24-bit true color rendering has been tested on Cygwin (Windows) and Linux Mint terminals, but should work on most terminals that support true color.

This project and associative materials are offered as is to anyone who may find them of use.

Zero implements:

Licence MIT

Building Locally

Clone this project and run the following from the terminal.

$ npm install
$ npm run build
# run it
$ node index