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

Enable lenses to avoid change detection #124

Merged
merged 2 commits into from
Apr 26, 2024
Merged

Enable lenses to avoid change detection #124

merged 2 commits into from
Apr 26, 2024

Commits on Apr 26, 2024

  1. Enable lenses to avoid change detection

    Add the ability for all `Lens`es to avoid triggering change detection if
    they don't make any actual change to their target (component or asset).
    
    This change modifies the signature of `Lerp::lerp()` to take `&mut dyn
    Targetable<T>` instead of `&mut T`. The `Targetable<T>` acts as a
    `Mut<T>`, marking the target as changed only if actually dereferenced
    mutably.
    
    Note that we cannot use `Mut<T>` directly because we can't obtain a
    `Mut<A: Asset>` without marking the asset as mutable; see
    bevyengine/bevy#13104.
    
    Fixes #91
    djeedai committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    55517af View commit details
    Browse the repository at this point in the history
  2. Fix features

    djeedai committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    e92a559 View commit details
    Browse the repository at this point in the history