🐕 Bevy Keith
2D graphic library inspired by Piet (📦 piet) for the Bevy game engine.
Currently a purely immediate-mode library (the ), but with future plans to explore partial retaining to reduce CPU usage.
Usage
Add the KeithPlugin to your Bevy app:
default
.add_plugins
.add_plugin;
Add a Canvas component where you want to draw. If you add the Canvas on the same Entity as an OrthographicProjection component, then the canvas automatically resizes to the full orthographic camera area.
// Only for initial setup, or if controlled manually
let mut canvas = new;
// Optionally clear the canvas with a given color before drawing
canvas.set_background_color;
// Spawn on the same Entity as an OrthographicProjection for auto-resize
commands
.spawn_bundle
.insert;
Draw something on the Canvas via a RenderContext: