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

Add a nannou_core crate. Switch from cgmath to glam. Remove geom::Graph. Remove generic Scalar param from Draw API. #754

Merged
merged 10 commits into from
Jun 20, 2021

Commits on Jun 20, 2021

  1. Add a new nannou_core crate. Switch core from cgmath to glam.

    See nannou-org#752 for motivation behind adding a `nannou_core` crate.
    
    Note that this commit does not yet replace the color, geom, math and
    rand modules within the `nannou` crate. This will be performed in a
    following commit.
    mitchmindtree committed Jun 20, 2021
    Configuration menu
    Copy the full SHA
    2f9671d View commit details
    Browse the repository at this point in the history
  2. Integrate nannou_core into main nannou crate

    This removes the color, math, rand and geom modules in favour of
    depending on the `nannou_core` crate. The `nannou_core` modules are
    re-exported within `nannou` in order to provide a near identical API to
    the existing one.
    
    The majority of changes here revolve around the change from `cgmath` to
    `glam`. The most notable changes include:
    
    - `geom::Vector2` -> `glam::Vec2`
    - `cgmath::Matrix4<f32>` -> `glam::Mat4`
    - `magnitude` -> `length`
    
    This change also removes the generic `Scalar` type parameter from the
    `Draw` API and related items in the hope of improving downstream compile
    times.
    
    Also removes the seemingly unused `geom::graph` module. Use-cases for
    this module and its abstractions were mostly made reduntatnt upon
    allowing for transformations to be applied to the `Draw` instance
    itself.
    mitchmindtree committed Jun 20, 2021
    Configuration menu
    Copy the full SHA
    54732b2 View commit details
    Browse the repository at this point in the history
  3. Refactor Rect and Cuboid methods for Point* and Vec* types

    This refactors the `Rect` and `Cuboid` methods to try to use `Point*`
    and `Vec*` types where possible for `Rect<f32>` and `Rect<f64>` in order
    to maintain an API closer to the original and avoid large sweeps amounts
    of breaking changes.
    
    Also exposes common `glam` types via the `nannou_core` `prelude` module.
    mitchmindtree committed Jun 20, 2021
    Configuration menu
    Copy the full SHA
    22257ac View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7f996a2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    75ef26a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f289271 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0826ecd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    96571b3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3a390da View commit details
    Browse the repository at this point in the history
  10. Update rand to 0.8

    danwilhelm authored and mitchmindtree committed Jun 20, 2021
    Configuration menu
    Copy the full SHA
    ad99a32 View commit details
    Browse the repository at this point in the history