Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge between Bevy and Vello types #46

Open
cpetzold opened this issue May 8, 2024 · 4 comments
Open

Bridge between Bevy and Vello types #46

cpetzold opened this issue May 8, 2024 · 4 comments

Comments

@cpetzold
Copy link
Contributor

cpetzold commented May 8, 2024

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.

@simbleau
Copy link
Member

simbleau commented May 9, 2024

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.

@cpetzold
Copy link
Contributor Author

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.

@simbleau
Copy link
Member

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

@nixon-voxell
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants