Skip to content

Update AnimatableProperty documentation, reduce crate dependencies #18543

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
merged 2 commits into from
Mar 26, 2025

Conversation

greeble-dev
Copy link
Contributor

@greeble-dev greeble-dev commented Mar 25, 2025

Objective

  • Remove the second to last bevy_animation dependency on bevy_render.
  • Update some older documentation to reflect later changes to the crate.

Narrative

I'm trying to make bevy_animation independent of bevy_render. The documentation for bevy_animation::AnimatableProperty is one of the last few dependencies. It uses bevy_render::Projection to demonstrate animating an arbitrary value, but I thought that could be easily swapped for something else.

I then realised that the rest of the documentation was a bit out of date. Originally AnimatableProperty was the only way to animate a property and so the documentation was quite detailed. But over time the crate has gained more documentation and other ways to hook up properties, leaving parts of the docs stale or covered elsewhere. So I've slimmed down the AnimatableProperty docs and added a link to the main alternative (animated_field).

I've probably swung too far towards brevity, so I can build them back up if preferred. Also the example is kinda contrived and doesn't show the range of AnimatableProperty, like being able to choose different components. And finally the memes might be a bit stale?

Showcase

image

Testing

cargo doc -p bevy_animation --no-deps --all-features
cargo test -p bevy_animation --doc --all-features

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation C-Code-Quality A section of code that is hard to understand or change A-Animation Make things move and change over time X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 25, 2025
@mweatherley mweatherley added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 26, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Mar 26, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 26, 2025
Merged via the queue into bevyengine:main with commit a02cdaa Mar 26, 2025
40 checks passed
mockersf pushed a commit that referenced this pull request Mar 26, 2025
…18543)

## Objective

- Remove the second to last `bevy_animation` dependency on
`bevy_render`.
- Update some older documentation to reflect later changes to the crate.

## Narrative

I'm trying to make `bevy_animation` independent of `bevy_render`. The
documentation for `bevy_animation::AnimatableProperty` is one of the
last few dependencies. It uses `bevy_render::Projection` to demonstrate
animating an arbitrary value, but I thought that could be easily swapped
for something else.

I then realised that the rest of the documentation was a bit out of
date. Originally `AnimatableProperty` was the only way to animate a
property and so the documentation was quite detailed. But over time the
crate has gained more documentation and other ways to hook up
properties, leaving parts of the docs stale or covered elsewhere. So
I've slimmed down the `AnimatableProperty` docs and added a link to the
main alternative (`animated_field`).

I've probably swung too far towards brevity, so I can build them back up
if preferred. Also the example is kinda contrived and doesn't show the
range of `AnimatableProperty`, like being able to choose different
components. And finally the memes might be a bit stale?

## Showcase


![image](https://github.com/user-attachments/assets/23f1c0bf-10ea-4602-a566-673abe5dace7)

## Testing

```
cargo doc -p bevy_animation --no-deps --all-features
cargo test -p bevy_animation --doc --all-features
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time C-Code-Quality A section of code that is hard to understand or change C-Docs An addition or correction to our documentation D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants