🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

tt3de

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tt3de

0.1.0
PyPI
Maintainers
1

TinyTiny 3D Engine

A minimalistic 2D/3D engine implemented in Rust and bound to Python, designed to render 3D objects using ASCII art.

Features

  • Rendering Primitives: Supports points, lines, and triangles in both 2D and 3D contexts.
  • ASCII Output: Renders 3D scenes in a charming ASCII art style.
  • Color Shading Support: Renders with RGB colors and shading levels.
  • Materials: Supports 14 materials, including:
    • Texture Mapping: Supports textures up to 256x256 pixels.
    • Double Raster: Allows the use of 2 colors per ASCII character (background and foreground).
    • Perlin Noise: Basic Perlin noise mapped texture.

Setting Up the Development Version

To set up a development version of this engine:

  • Clone this repository:

    git clone <repo_url>
    
  • If you have Poetry, run:

    poetry install --with dev --no-root
    

    This will set up the dependencies.

  • If you don't have Poetry, follow these steps:

    python -m venv .venv
    source .venv/bin/activate
    python -m pip install poetry
    # Now you have Poetry in the virtual environment
    poetry install
    
  • Compile the Rust version locally:

    maturin develop
    
  • Run the Rust unit tests:

    cargo test
    
  • Run the Python unit tests:

    poetry run pytest
    
  • Check the demo:

    poetry run python demos/3d/some_models.py
    

Tips for Python Path in VSCode

Due to the mix of Python and Rust in this project, the Python code is located in the python folder. More information can be found here.

In launch.json for VSCode:

"env": {"PYTHONPATH": "${workspaceFolder}/python"}

In settings.json:

{
    "python.analysis.extraPaths": [
        "python"
    ]
}

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts