Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sinclairzx81/zero
A 3D renderer written in JavaScript and rendered to the terminal.
https://github.com/sinclairzx81/zero
ascii-art graphics javascript nodejs rasterizer terminal
Last synced: 2 days ago
JSON representation
A 3D renderer written in JavaScript and rendered to the terminal.
- Host: GitHub
- URL: https://github.com/sinclairzx81/zero
- Owner: sinclairzx81
- License: other
- Created: 2016-10-10T11:59:07.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-06T04:40:30.000Z (over 2 years ago)
- Last Synced: 2024-12-13T13:02:49.216Z (9 days ago)
- Topics: ascii-art, graphics, javascript, nodejs, rasterizer, terminal
- Language: TypeScript
- Homepage:
- Size: 89.5 MB
- Stars: 2,422
- Watchers: 32
- Forks: 143
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-list - zero
README
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)
```bash
# 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:
- Programmable Vertex and Fragment shaders (in JavaScript)
- Perspective Z-Correct Texture Mapping
- Per Pixel Depth Buffering
- Adaptive Resolution on Terminal resize (TTY only)
- Support for 24bit true color (terminal must support 24-bit color)
- Matrix and Vector math libraries.
- A Scene GraphLicence MIT
### Building Locally
Clone this project and run the following from the terminal.
```bash
$ npm install
$ npm run build
# run it
$ node index
```