Crate gemini_engine

Source
Expand description

Crates.io Stars Last commit Code size Crates.io Issues

§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

§Crate Structure

This library is made up of several modules:

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 CanDraw elements. Since every container itself implements Candraw, containers can often be combined by nesting inside of each other.
core
core declares 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 as Line or Triangle
view
This module is home to the View struct, a Canvas that is able to draw to stdout.
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 the gemini-engine crate, for example: