An immediate mode 2D drawing API for Bevy game engine

Overview

Bevy Canvas API prototype

Crates.io Crates.io docs Downloads GitHub Repo stars CI Bevy tracking

An unofficial immediate mode 2D drawing API for Bevy game engine.

Check the documentation or the examples to know how to use this API.

bevy_canvas showoff image

Goal

Developing a proof of concept to help Bevy contributors and give them a reference project to develop a full-featured official Canvas API for Bevy. Another goal is to provide the community a Bevy plugin to draw shapes, which will feed back into the primary goal.

How to contribute

Currently (May 2021) I'm not in the mood of adding new features to the library since I want to focus on other areas of Bevy. However, issues and pull requests are welcome. Here are some guidelines:

  • Write commit message titles, PR titles and issue titles in the imperative form.
  • Avoid overhauling pull requests without prior discussion. Examples are: adding complexity (deps, features) just for your use case or defeating the simple and extensible API philosophy. If you really think that something important needs to be done, open an issue and explain why a certain change is beneficial to the project and the community.

Is this going to replace bevy_prototype_lyon?

Probably not. While the goal is similar, there are some important differences:

  • Immediate mode graphics API. In bevy_canvas, shapes must be drawn every frame because there is no entity that stores the info about the shape. You just issue drawing commands. In bevy_prototype_lyon instead, you spawn an entity that emits draw commands by its own.
  • Shapes are rendered after the main pass. This can be an important limitation for your application if, for example, you want to draw a sprite on top of a shape, since the shape will always be rendered after the sprite. If that's the problem, use bevy_prototype_lyon, at least for now.

Known issues

  • MSAA not working
  • WebGL support absent

Feel free to open an issue and/or a PR to fix.

Bevy support table

bevy bevy_canvas
0.5 0.1
You might also like...
Concise Reference Book for the Bevy Game Engine

Unofficial Bevy Cheat Book Click here to read the book! Concise reference to programming in the Bevy game engine. Covers useful syntax, features, prog

Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions
Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions

Introduction Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions. (hand interaction with boxes missing

A physics lib for the bevy game engine based on physme

physimple Physimple aims to be the simplest(and capable) physics engine(currently for bevy) WARNING Beware for breaking changes with each update for n

Simple RUST game with the Bevy Engine

Simple RUST Game using the Bevy Engine YouTube videos for this code base: Episode 1 - Rust Game Development tutorial from Scratch with Bevy Engine Epi

A vdom-free reactive UI lib for the bevy game engine

ui4 ui4 is my fourth major attempt at making a UI dataflow library for the Bevy game engine. More specifically, it's a vdom-less UI library which uses

Hanabi — a particle system plugin for the Bevy game engine.

Hanabi — a particle system plugin for the Bevy game engine

Brine is my attempt at writing a Minecraft client in Rust using the Bevy game engine.
Brine is my attempt at writing a Minecraft client in Rust using the Bevy game engine.

Brine Brine is my attempt at writing a Minecraft client in Rust using the Bevy game engine. It's EXTREMELY work-in-progress. The thing that makes Brin

Bevy is a refreshingly simple data-driven game engine built in Rust

What is Bevy? Bevy is a refreshingly simple data-driven game engine built in Rust. It is free and open-source forever! WARNING Bevy is still in the ve

Plotting library for the Bevy game engine with a focus on esthetics and interactivity
Plotting library for the Bevy game engine with a focus on esthetics and interactivity

Plotting library for the Bevy game engine with a focus on esthetics and interactivity. It can handle both data points (see the "minimal", "markers", a

Owner
Federico Rinaldi
Federico Rinaldi
Minecraft-esque voxel engine prototype made with the bevy game engine. Pending bevy 0.6 release to undergo a full rewrite.

vx_bevy A voxel engine prototype made using the Bevy game engine. Goals and features Very basic worldgen Animated chunk loading (ala cube world) Optim

Lucas Arriesse 125 Dec 31, 2022
A prototype plugin providing a simple line drawing api for bevy.

bevy_debug_lines A prototype plugin providing a simple line drawing api for bevy. See docs.rs for documentation. Expect breakage on master. Click on t

Michael Palmos 92 Dec 31, 2022
Bevy Simple Portals is a Bevy game engine plugin aimed to create portals.

Portals for Bevy Bevy Simple Portals is a Bevy game engine plugin aimed to create portals. Those portals are (for now) purely visual and can be used t

Sélène Amanita 11 May 28, 2023
2d Endless Runner Game made with Bevy Game Engine

Cute-runner A 2d Endless Runner Game made with Bevy Game Engine. Table of contents Project Infos Usage Screenshots Disclaimer Project Infos Date: Sept

JoaoMarinho 2 Jul 15, 2022
A game of snake written in Rust using the Bevy game engine, targeting WebGL2

Snake using the Bevy Game Engine Prerequisites cargo install cargo-make Build and serve WASM version Set your local ip address in Makefile.toml (loca

Michael Dorst 0 Dec 26, 2021
A game made in one week for the Bevy engine's first game jam

¿Quien es el MechaBurro? An entry for the first Bevy game jam following the theme of "Unfair Advantage." It was made in one week using the wonderful B

mike 20 Dec 23, 2022
A Client/Server game networking plugin using QUIC, for the Bevy game engine.

Bevy Quinnet A Client/Server game networking plugin using QUIC, for the Bevy game engine. Bevy Quinnet QUIC as a game networking protocol Features Roa

Gilles Henaux 65 Feb 20, 2023
Basic first-person fly camera for the Bevy game engine

bevy_flycam A basic first-person fly camera for Bevy 0.4 Controls WASD to move horizontally SPACE to ascend LSHIFT to descend ESC to grab/release curs

Spencer Burris 85 Dec 23, 2022
Inspector plugin for the bevy game engine

bevy-inspector-egui This crate provides the ability to annotate structs with a #[derive(Inspectable)], which opens a debug interface using egui where

Jakob Hellermann 517 Dec 31, 2022
Crossterm plugin for the bevy game engine

What is bevy_crossterm? bevy_crossterm is a Bevy plugin that uses crossterm as a renderer. It provides custom components and events which allow users

null 79 Nov 2, 2022