Dunge
Features
- Simple but flexible API
- Desktop, WASM and Android support
- Pixel perfect render with custom layers
- Texture and color vertex modes
- Primitives for object positioning and camera view out of the box
Application area
The library is for personal use only. I use it to create my applications and I make API suitable exclusively for my problems. Perhaps in the future API will settle down and the library will be self-sufficient for other applications.
Getting Started
Let's render a colorful triangle for example. First, we need to add the dependency of dunge in the Cargo.toml:
cargo add dunge
Then, let's create a new window to draw something in it:
// Import some types
use ;
make_window creates a new instance of Canvas type and sets up window properties, it allows us to handle an input from users. run_blocking runs our application by calling the constructor of it and passes the Context object there. Context uses for creation and updating of meshes, textures, views, instances etc.
The App is our application type, we need to create it:
To be able to pass the App in run_blocking we need to implement a Loop trait for it:
Finally, let's run our code:
cargo run
Now you should see something like this:

Examples
See examples directory for more examples. To build and run an example do:
cargo r -p <example_name>