Open zicklag opened 3 years ago
i'm totally ok with mint
for interoperability (i've tested it and works for me), for the cint
i'll have to see what is it
i've looked at cint
and i see it serves exactly the same goals as mint
- i'm just curious about how would you like to handle these interop types - are you planning to make them as new vec2/rect/color types or you want original types implement From/Into with interop types?
i'm totally ok with mint for interoperability (i've tested it and works for me),
Cool!
i'm just curious about how would you like to handle these interop types - are you planning to make them as new vec2/rect/color types or you want original types implement From/Into with interop types?
Honestly I didn't know exactly how to approach it yet. I hadn't looked into it enough to know. The pain point I wanted to solve, though, was while using RAUI in Bevy I would like to be able to use the glam::Vec2
type that comes with the Bevy Prelude, without it causing problems if I try to include both the Bevy and RAUI preludes at the same time, because of overlapping and different Vec2
types from the Bevy and RAUI preludes.
However we accomplish that I'm good with it I think. I'd like to look into it a bit more to understand what that might look like in practice, but I'm not sure when I'll get the chance and I don't care if somebody else does it first.
I was thinking maybe it would be good to try out the
cint
andmint
crates for allowing RAUI to use any kind of color or math types instead of being forced to use thevek
types and RAUI's built-inColor
types.I haven't use either crate before and I'd have to see how it would turn out, but it would be really nice if I didn't have to isolate my UI code from the bevy prelude because of the
Vec3
andColor
types being different inside of RAUI.I've seen other crates add features for which math types they want to use. So RAUI could have
vek
,glam
, andnalgebra
features that would set type-aliases for the math types expected forVec2
,Vec3
, etc., and usingmint
we could make sure those types are converted to thevec
types if necessary when we need to do operations that require specific functions, maybe?I'm not positive this is a good idea or not, but I thought it worth thinking about.