Conversation
| * {step: 100, properties: [{name: 'color', value: 'green'}]] | ||
| * | ||
| * @example | ||
| * Given a 2s animation: |
There was a problem hiding this comment.
We'll have to remove these comments, well clean up the example
|
@phil-linnell I think we have to discuss how predictable is the "accuracy" concept from the user perspective. I struggle all the time with the magic of 2 means 2 edge values plus one interpolated value. I think we need to find a way to make the relation obvious, either 3 == 3 keyframes or 1 == 1 interpolated value. Then internally we will adapt the value to our needs. |
|
@phil-linnell I fixed everything but the postcss tests. We should review that all computations for linear functions are what we think it is right. e.g. for a situation with accuracy 2 right now we create a set of keyframes with percentages 0%, 33.33%, 100%. I believe this is a regression as the expected value is 50% right? |
|
@arnau Re: 33.33%. Yes that doesn't seem to be right. You make a good point about the accuracy. In a way the second example (1 == 1 interpolated) makes more sense to me. It is a given that you have a beginning and end keyframe, i.e. 2 keyframes for free. the accuracy is then used to created the interpolated keyframes. So an accuracy of 2 would give additional 33.33 and 66.66. Hmmm, however I can't help but still feel the way we have it makes sense to me when I think about a "journey". I go from point a (0%) to b (100%). One step is straight there. So an accuracy of 1. 1 step. If I want to go from a to b with an accuracy of 2 then i would step at 50% before finishing at 100%. It's like drawing points on a graph. Sorry. I've very mixed feelings about this! |
|
I see your point with the number of steps, the question is, what is more straightforward to grasp? I think the one that is more obvious is the one we should use. |
edce49e to
52fa7ad
Compare
|
I fixed the 50% vs 33.33% issue by splitting Besides that, there is something funny going on with accuracy and step by linear. Let's focus on this next day. |
@arnau
Isolated the duration from the animation declaration and convert to milliseconds.
I wanted to do a test for the case of having no duration but I will need your help with that.
Need to pass it into keyframes() now