Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renpenguin/display3d
A command line interface for rendering and animating 3D objects
https://github.com/renpenguin/display3d
3d ansi cli rust tui
Last synced: 6 days ago
JSON representation
A command line interface for rendering and animating 3D objects
- Host: GitHub
- URL: https://github.com/renpenguin/display3d
- Owner: renpenguin
- License: mit
- Created: 2024-01-06T19:20:15.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-13T17:52:46.000Z (11 days ago)
- Last Synced: 2025-01-13T18:43:23.842Z (11 days ago)
- Topics: 3d, ansi, cli, rust, tui
- Language: Rust
- Homepage: https://crates.io/crates/display3d
- Size: 199 KB
- Stars: 234
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-useful-projects - <img src="https://icon.horse/icon/github.com" height="20px" align="center"/>/redpenguinyt/display3d - CLI for rendering and animating 3D objects (Jump To / Other)
- awesome-useful-projects - <img src="https://icon.horse/icon/github.com" height="20px" align="center"/>/redpenguinyt/display3d - CLI for rendering and animating 3D objects (Jump To / Other)
README
display3d
[demo video of display3d](https://github.com/renpenguin/display3d/assets/79577742/6131167a-7b83-4c8e-96ec-c9715f3b4d23)
display3d is a command line interface for rendering and animating 3D objects using ANSI escape codes, written using [gemini-engine](https://crates.io/crates/gemini-engine) in the Rust programming language.
For a basic guide on how to use the tool, run `display3d --help`
# Supported formats
- .obj (combined with .mtl for colours). If you're exporting from Blender, set the forward axis to +Z and the up axis to +Y
- .stlPlease note that this form of rendering requires the terminal to support ANSI escape codes, support for which tends to be unreliable on Windows from installation to installation. If you are having issues getting an image on Linux or MacOS, please submit an issue request
# Installing
## Arch Linux
[display3d](https://aur.archlinux.org/packages/display3d/) is available as a package in the [AUR](https://aur.archlinux.org/). You can install it using your preferred AUR helper, e.g. `paru -S display3d`.
## Nix/NixOS
If you use Nix, you can install display3d from [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/di/ddisplay3d/default.nix). You can install it as `pkgs.display3d`
## Cargo
Make sure you have [rust and cargo](https://www.rust-lang.org/tools/install) installed, then run `cargo install display3d`. This will download, compile and install the latest stable release of display3d. You can then simply run `display3d` to access it
## Compile from source
Clone this repository with `git clone https://github.com/renpenguin/display3d.git` or download and unzip this repository. You must have [rust and cargo](https://www.rust-lang.org/tools/install) installed to compile display3d.
Build the project with `cargo build --release`. The binary will be saved to `/target/release/display3d`
# Example
To run the example spinning shark, run `display3d blahaj.obj -t 0,0,5.5`. You can get the `blahaj.obj` and `blahaj.mtl` (for colours, should be stored together with `blahaj.obj`) files in [the resource directory](https://github.com/renpenguin/display3d/tree/master/resources) of this repository.