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

Fix keyframe types #6438

Merged
merged 13 commits into from
Sep 2, 2024
Merged

Fix keyframe types #6438

merged 13 commits into from
Sep 2, 2024

Conversation

Latropos
Copy link
Contributor

@Latropos Latropos commented Aug 21, 2024

Summary

The goal of this PR is to ban incorrect definitions of keyframe animations:

❌ Both `0` and `from` provided. ❌ Provided easing for timestamp 0 ❌ Both `100` and `to` provided.
const keyframeAnimation = 
    new Keyframe({
!   0: { opacity: 0 },
!   from: { opacity: 0 },
    50: { opacity: 0.5 },
    100: { opacity: 1 },
  })


const keyframeAnimation =
    new Keyframe({
    0: { 
      opacity: 0,
!     easing: Easing.exp,
     },
    50: { opacity: 0.5 },
    100: { opacity: 1 },
  })
const keyframeAnimation = 
    new Keyframe({
    0: { opacity: 0 },
    50: { opacity: 0.5 },
!    100: { opacity: 1 },    
!    to: { opacity: 0 },
  })

Test plan

Tested on example on runtime tests

Documentation update

Added a remark, how to use easing and updated types.

@Latropos Latropos marked this pull request as ready for review August 22, 2024 09:15
@Latropos Latropos requested a review from tjzel August 26, 2024 08:18
@Latropos Latropos added this pull request to the merge queue Sep 2, 2024
Merged via the queue into main with commit 3ca063f Sep 2, 2024
9 checks passed
@Latropos Latropos deleted the acynk/fix-keyframe-types branch September 2, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants