16 releases (5 breaking)

0.6.1 Aug 14, 2024
0.6.0 Aug 9, 2024
0.5.1 Jul 16, 2024
0.4.2 May 26, 2024
0.1.0 Mar 26, 2024

#171 in Game dev

Download history 9/week @ 2024-08-19 5/week @ 2024-08-26 26/week @ 2024-09-02 16/week @ 2024-09-09 37/week @ 2024-09-16 72/week @ 2024-09-23 12/week @ 2024-09-30 7/week @ 2024-10-07 32/week @ 2024-10-14 11/week @ 2024-10-21 14/week @ 2024-10-28 55/week @ 2024-11-04 16/week @ 2024-11-18 64/week @ 2024-11-25 7/week @ 2024-12-02

88 downloads per month

(MIT OR Apache-2.0) AND OFL-1.1

125KB
3K SLoC

Bevy Vello

A vector graphics rendering integration for Bevy game engine using Vello.

Linebender Zulip MIT/Apache 2.0 Vello Following released Bevy versions
Dependency status Crates.io Docs Build status

bevy_vello is a cross-platform, 2D compute-centric vector graphics rendering library for Bevy. There is default support for rendering text and scenes, with additional opt-in features for SVG and Lottie. Experimental support for dotLottie is coming.

Quickstart to run the demo:

cargo run -p demo

Alt text

Bevy version support

bevy bevy_vello
0.14 0.5-0.6, main
0.13 0.1-0.4
< 0.13 unsupported

Cargo features

[!WARNING] The support of SVG and Lottie is limited. If there is an SVG-related issue, please file the issue in vello_svg. If there is a Lottie-related issue, please file the issue in velato. Please see the respective backends for for more information about limitations.

Cargo feature Description Default?
default_font Include a default font, containing only ASCII characters, at the cost of a 20kB binary size increase Yes
svg Render .svg files with vello_svg No
lottie Render .json Lottie files with velato No
experimental-dotLottie Render .lottie Lottie files. Work in Progress No

Examples

Cross platform (Bevy)

cargo run -p <demo name>

Web platform

Because Vello relies heavily on compute shaders, we rely on the emerging WebGPU standard to run on the web. Until browser support becomes widespread, it will probably be necessary to use development browser versions (e.g. Chrome Canary) and explicitly enable WebGPU.

This uses cargo-run-wasm to build the example for web, and host a local server for it

# Make sure the Rust toolchain supports the wasm32 target
rustup target add wasm32-unknown-unknown

# The binary name must also be explicitly provided as it differs from the package name
cargo run_wasm -p text

There is also a web demo available here on supporting web browsers.

[!WARNING] The web is not currently a primary target for Vello, and WebGPU implementations are incomplete, so you might run into issues running this example.

Community

Discussion of Vello development happens in the Linebender Zulip, specifically the #gpu stream. All public content can be read without logging in.

Contributions are welcome by pull request. The Rust code of conduct applies.

License

Licensed under either of

at your option

The files in subdirectories of the examples/assets directory are licensed solely under their respective licenses, available in the LICENSE file in their directories.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~52–90MB
~1.5M SLoC