Expand description
§Introduction
Gemini is a monospaced ASCII rendering engine, capable of rendering 2D and 3D graphics in a terminal or console and written in Rust. This is a loose port of gemini-py which was made in Python but was deprecated due to performance limitations.
IMPORTANT: You MUST use a monospace font in the terminal for the engine to render the view properly Looking for input? The console-input crate (also made by me) makes it easy to implement cross-platform input
As of now this is still a work in progress, so any feedback or issue requests would be very much appreciated :)
§Projects created using Gemini
- display3d, a command line tool for displaying 3d objects in the terminal
- A Tetris clone written using Gemini and console-input, an input library made for Gemini
§Crate Structure
This library is made up of several modules:
- coredeclares the relationship between any- Canvas(an object that can be drawn to) and the library’s primitives and anything else that can be drawn to the screen.
- viewdefines the- View, a- Canvascapable of displaying
- ascii,- containersand- primitiveswhich all offer different ways to draw to a- Canvas.- containersalso has a basic collision library!
- mesh3dand- view3d, which hold the- Mesh3dand- Viewportobjects respectively, and handle everything 3D-related.- Viewport
Re-exports§
- pub use gemini_mainloop as gameloop;
Modules§
- ascii
- This module holds the structs related to displaying text and ASCII art on a Canvas
- containers
- This modules holds some miscellaneous tools for containing and manipulating CanDrawelements. Since every container itself implementsCandraw, containers can often be combined by nesting inside of each other.
- core
- coredeclares the relationship between any- Canvas(an object that can be drawn to) and the library’s primitives and anything else that can be drawn to the screen.
- mesh3d
- This module contains the Mesh3D, which stores 3D objects as vertices and index faces
- primitives
- This module contains basic geometry primitives that implement CanDraw, such asLineorTriangle
- view
- This module is home to the Viewstruct, aCanvasthat is able to draw tostdout.
- view3d
- Gemini’s implementation of 3D rendering. Capable of rendering full 3D meshes as wireframes, solid colours or with lighting
Macros§
- fps_gameloop 
- You can use the fps_gameloop!macro to avoid writing a lot of boilerplate code. Take this block of code from a program written using thegemini-enginecrate, for example: