linebender / bevy_vello

An integration to render with Vello in Bevy game engine.

Home Page:https://linebender.org/bevy_vello/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bridge between Bevy and Vello types

cpetzold opened this issue · comments

I'm wondering if this crate would be the right place to provide mappings between Bevy and Vello primitives. Being able to use Bevy's Color and math types would make it feel more integrated when using the Scene API.

I'm a little concerned about overhead performance, personally.

We export vello,

https://github.com/loopystudios/bevy_vello/blob/d25d787f14c77533b9b038ad153847b0f13e1c46/src/lib.rs#L20

Which, vello will export peniko, kurbo, etc.

In other words:

  • bevy_vello::vello::peniko
  • bevy_vello::vello::kurbo

This gives you the Vello types

How would you expect to see Bevy types be used? I'm not against it.

Maybe this crate isn't the right place, but I was sort of thinking something along the lines of bevy's 2d gizmo API where you're working with glam Vec2 and bevy Color. And maybe it could also take bevy math 2d primitive shapes.

Can you give an example?

Because currently, the bevy types are used for the most part.

I think you should only need peniko, kurbo, etc.. when you build or encode a VelloScene/vello::Scene