james-j-obrien/bevy_vector_shapes

A library for rendering vector shapes using the Bevy game engine

Rust

476

111 commits

updated Oct 12, 2026

See the code

README

Bevy Vector Shapes

crates.io docs.rs CI Bevy tracking

Bevy Vector Shapes

What is Bevy Vector Shapes?

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

WARNING

Bevy Vector Shapes is in the early stages of development. You may encounter issues, but feel free to report them.

Features

  • Variety of built in shape types: lines, rectangles, circles, arcs and regular polygons.
  • Traits to allow implementation of custom shape types.
  • Supports various bevy rendering features: 2D and 3D pipelines, transparency, alpha modes, render layers, bloom.
  • Canvas API for rendering shapes to a texture.
  • Ability to draw textures on shapes, including canvas textures.
  • Immediate and retained mode.
  • Local anti-aliasing for smoother looking shapes.
  • Optional billboarding for each shape type to ensure they are always facing the camera.
  • Shapes of the same type and rendering configuration are fully instanced together.
  • Compilation to wasm to run your projects in the browser.

Usage

See basic usage below and 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_systems(Startup, setup)
        .add_systems(Update, draw)
        .run();
}

fn setup(mut commands: Commands) {
    // Spawn the camera
    commands.spawn(Camera2d);
}

fn draw(mut painter: ShapePainter) {
    // Draw a circle
    painter.circle(100.0);
}
bevybevy_vector_shapes
0.200.14.0
0.190.13.1
0.180.12.1
0.170.11.1
0.160.10.0
0.150.9.3
0.140.8.2
0.130.7.0
0.120.6.0
0.110.5.2
0.100.4.6

Alternatives

  • bevy_smud: for generating custom sdf expressions at run time.
  • bevy_prototype_lyon: for generating meshes from 2D shapes and paths.
  • vello: for very efficient 2D shape rendering to images.

james-j-obrien/bevy_vector_shapes

A library for rendering vector shapes using the Bevy game engine

Rust

476

111 commits

updated Oct 12, 2026

See the code

README

Bevy Vector Shapes

crates.io docs.rs CI Bevy tracking

Bevy Vector Shapes

What is Bevy Vector Shapes?

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

WARNING

Bevy Vector Shapes is in the early stages of development. You may encounter issues, but feel free to report them.

Features

  • Variety of built in shape types: lines, rectangles, circles, arcs and regular polygons.
  • Traits to allow implementation of custom shape types.
  • Supports various bevy rendering features: 2D and 3D pipelines, transparency, alpha modes, render layers, bloom.
  • Canvas API for rendering shapes to a texture.
  • Ability to draw textures on shapes, including canvas textures.
  • Immediate and retained mode.
  • Local anti-aliasing for smoother looking shapes.
  • Optional billboarding for each shape type to ensure they are always facing the camera.
  • Shapes of the same type and rendering configuration are fully instanced together.
  • Compilation to wasm to run your projects in the browser.

Usage

See basic usage below and 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_systems(Startup, setup)
        .add_systems(Update, draw)
        .run();
}

fn setup(mut commands: Commands) {
    // Spawn the camera
    commands.spawn(Camera2d);
}

fn draw(mut painter: ShapePainter) {
    // Draw a circle
    painter.circle(100.0);
}
bevybevy_vector_shapes
0.200.14.0
0.190.13.1
0.180.12.1
0.170.11.1
0.160.10.0
0.150.9.3
0.140.8.2
0.130.7.0
0.120.6.0
0.110.5.2
0.100.4.6

Alternatives

  • bevy_smud: for generating custom sdf expressions at run time.
  • bevy_prototype_lyon: for generating meshes from 2D shapes and paths.
  • vello: for very efficient 2D shape rendering to images.

Project health

Latest release

0.14.0 · Oct 12, 2026

Releases this year

6

Significant stargazers

Stepan Koltsov

537 followers · starred Dec 2023

Jan Hohenheim

260 followers · starred May 2025

Richard Jones

565 followers · starred Jul 2023

Stephan Seitz

261 followers · starred Sep 2023