Skip to content

Conversation

@mintlu8
Copy link
Contributor

@mintlu8 mintlu8 commented Jun 7, 2024

Objective

Some use cases might require holding onto the previous state of the animation player for change detection.

Solution

Added clone and copy implementation to most animation types.
Added optimized clone_from implementations for the specific use case of holding a PreviousAnimationPlayer component.

@mintlu8 mintlu8 changed the title Made the core types of the new animation players clonable. Make the core types of the new animation players clonable. Jun 7, 2024
@mintlu8 mintlu8 changed the title Make the core types of the new animation players clonable. Make the component types of the new animation players clonable. Jun 7, 2024
@pcwalton pcwalton self-requested a review June 7, 2024 17:07
Copy link
Contributor

@pcwalton pcwalton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine.

@alice-i-cecile alice-i-cecile added this to the 0.14 milestone Jun 7, 2024
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Animation Make things move and change over time labels Jun 7, 2024
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jun 7, 2024
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
@alice-i-cecile alice-i-cecile enabled auto-merge June 7, 2024 21:48
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 7, 2024
Merged via the queue into bevyengine:main with commit 651f3d0 Jun 7, 2024
mockersf pushed a commit that referenced this pull request Jun 7, 2024
# Objective

Some use cases might require holding onto the previous state of the
animation player for change detection.

## Solution

Added `clone` and `copy` implementation to most animation types. 
Added optimized `clone_from` implementations for the specific use case
of holding a `PreviousAnimationPlayer` component.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
mockersf pushed a commit that referenced this pull request Jun 8, 2024
# Objective

Some use cases might require holding onto the previous state of the
animation player for change detection.

## Solution

Added `clone` and `copy` implementation to most animation types. 
Added optimized `clone_from` implementations for the specific use case
of holding a `PreviousAnimationPlayer` component.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
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-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants