Constraints data should be stored on a per-axis basis #331
Labels
code quality
Make the code cleaner or prettier.
performance
Layout go brr
usability
Make the library more comfortable to use
In Flex you usually access the constraints one axis at a time but the current API makes that awkward and fragile.
For example, look at the
text_constraint
function in the widget/text.rs:called with:
If the constraints data is stored per-axis:
it's much more natural:
In Bevy that is the worst it gets at the moment, but in Taffy there are lots of tangled sections like:
where most of the complexity would vanish with some sort of per-axis interface.
Originally posted by @ickshonpe in bevyengine/bevy#5513 (comment)
The text was updated successfully, but these errors were encountered: