🐕 Bevy Keith
2D graphic library inspired by Piet (📦 piet) for the Bevy game engine.
The library uses a custom Signed Distance Field (SDF) renderer, enabling anti-aliased shapes of any scale with very few draw calls (typically, single draw call per canvas). The pipeline renders at physical resolution even with high DPI, for crisp details.

Usage
Add a dependency to Cargo.toml:
[]
= "0.1"
Add the KeithPlugin to your Bevy app:
default
.add_plugins
.add_plugins;
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.background_color = Some;
// Spawn on the same Entity as an OrthographicProjection for auto-resize
commands
.spawn_bundle
.insert;
Draw something on the Canvas via a RenderContext:
Features
- Primitives
- Text
- Axis-aligned rectangle
- Fill
- Stroke
- Rounded corners
- Single line
- Polyline