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 SegmentComposer for a composable way to create animations #902

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RobertasJ
Copy link
Contributor

This should make it a lot easier to make animations that consist of multiple easing function run one after another.

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 87 lines in your changes missing coverage. Please review.

Project coverage is 75.77%. Comparing base (bdbcabf) to head (435bc4f).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/hooks/src/use_animation.rs 0.00% 87 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #902      +/-   ##
==========================================
- Coverage   76.06%   75.77%   -0.29%     
==========================================
  Files         207      207              
  Lines       23296    23383      +87     
==========================================
  Hits        17719    17719              
- Misses       5577     5664      +87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marc2332 marc2332 added the enhancement 🔥 New feature or request label Sep 22, 2024
Copy link
Owner

@marc2332 marc2332 left a comment

Choose a reason for hiding this comment

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

I wonder if a new struct is the right API, I feel like this should be built into AnimNum and AnimColor instead, wdyt?

@RobertasJ
Copy link
Contributor Author

It already is a replacement for AnimValue, we could just replace AnimValue with it and make an AnimVolor variant for that.

I also have no idea how to fix the is_running method on it rn as idk how the index is given.

@marc2332
Copy link
Owner

It already is a replacement for AnimValue, we could just replace AnimValue with it and make an AnimVolor variant for that.

I also have no idea how to fix the is_running method on it rn as idk how the index is given.

What do you mean by a variant? Like an enum variant? Wouldn't that be the same as having two structs?

@RobertasJ
Copy link
Contributor Author

RobertasJ commented Sep 24, 2024

I meant it as an another struct, its just simmilar enough that i called it a variant of the original

@marc2332
Copy link
Owner

I meant it as an another struct, its just simmilar enough that i called it a variant of the original

yeah but the thing is that the only difference is that you can have multiple steps, I just feel like we could just move this into the other two structs somehow

@RobertasJ
Copy link
Contributor Author

Yeah, we can do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants