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

[Merged by Bors] - Move sprite::Rect into bevy_math #5686

Closed
wants to merge 4 commits into from

Commits on Aug 14, 2022

  1. Move sprite::Rect into bevy_math

    Promote the `Rect` utility of `sprite::Rect`, which defines a rectangle
    by its minimum and maximum corners, to the `bevy_math` crate to make it
    available as a general math type to all crates without the need to
    depend on the `bevy_sprite` crate.
    
    Implement `Reflect` for `Rect` directly into the `bevy_reflect` crate by
    having `bevy_reflect` depend on `bevy_math`. This looks like a new
    dependency, but the `bevy_reflect` was "cheating" for other math types
    by directly depending on `glam` to reflect other math types, thereby
    giving the illusion that there was no dependency on `bevy_math`. In
    practice conceptually Bevy's math types are reflected into the
    `bevy_reflect` crate to avoid a dependency of that crate to a "lower
    level" utility crate like `bevy_math` (which in turn would make
    `bevy_reflect` be a dependency of most other crates, and increase the
    risk of circular dependencies). So this change simply formalizes that
    dependency in `Cargo.toml`.
    
    The `Rect` struct is also augmented in this change with a collection of
    utility methods to improve its usability. A few uses cases are updated
    to use those new methods, resulting is more clear and concise syntax.
    
    Fixes bevyengine#5575
    djeedai committed Aug 14, 2022
    Configuration menu
    Copy the full SHA
    8da5904 View commit details
    Browse the repository at this point in the history
  2. CI fixes

    djeedai committed Aug 14, 2022
    Configuration menu
    Copy the full SHA
    85842f7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c81c3e6 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2022

  1. Configuration menu
    Copy the full SHA
    327d921 View commit details
    Browse the repository at this point in the history