A flexible 3D rasterizer with multiple output interfaces. Currently supports WebAssembly (rendering to canvas) and command-line output.
![]() |
![]() |
|---|
- Load OBJ files (triangle faces only)
- Load image textures
- Rasterize triangles to screen
- Extensible interface system (implement your own render targets)
- Input handling (keys, timers, window resizing)
- Multiple output options
- WebAssembly (canvas rendering)
- Command-line ASCII output
- Rust toolchain
- For WASM:
wasm-pack - For Nix builds: Nix package manager, direnv (optional)
# CLI version
cd simple-3d-cli
cargo run
# WASM version
cd simple-3d-wasm
wasm-pack build --target web
# Then in another terminal
python -m http.server 9999# Command line version
bc
# WASM version
bw
# Then in another terminal
s- Place your
.objfile in theassetsfolder - Ensure your model uses only triangles for faces
- Modify the appropriate code to load your new asset
You can implement new output interfaces by creating a new implementation of the Interface trait. See existing implementations for reference.
simple-3d-core/- Core rasterizer logicsimple-3d-cli/- Command line interface implementationsimple-3d-wasm/- WebAssembly interface implementationassets/- Contains models and textures
Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.

