Expand description

bevy_vector_shapes is a library for easily and ergonomically creating instanced vector shapes in Bevy.

§Usage

See the the examples for more details on all supported features.

use bevy::prelude::*;
// Import commonly used items
use bevy_vector_shapes::prelude::*;
fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        // Add the shape plugin:
        // - Shape2dPlugin for 2D cameras
        // - ShapePlugin for both 3D and 2D cameras
        .add_plugins(Shape2dPlugin::default())
        .add_startup_system(setup)
        .add_system(draw)
        .run();
}
fn setup(mut commands: Commands) {
    // Spawn the camera
    commands.spawn(Camera2dBundle::default());
}
fn draw(mut painter: ShapePainter) {
    // Draw a circle
    painter.circle(100.0);
}

Modules§

Structs§