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

Animation constructor easing #136

Merged
merged 7 commits into from
Aug 12, 2014

Conversation

rjwright
Copy link
Contributor

@rjwright rjwright commented Aug 1, 2014

Fix bug #131.

Timing functions weren't working with explicitly constructed Animations because normalizeTimingInput was being called twice.

Now we store the raw timing input in TimedItem.timing, and the normalized timing in TimedItem._timing.

Timing is normalized at creation time for explicitly constructed timed items, and at play time (in scope.AnimationTimeline.prototype._play) for timed items created using Element.animate.

@shans ptal

@rjwright rjwright changed the title [WIP] Anim constructor easing Anim constructor easing Aug 11, 2014
@rjwright rjwright changed the title Anim constructor easing Animation constructor easing Aug 11, 2014
@alancutter
Copy link
Contributor

The update to mocha.js is unrelated, I'd prefer it to be in its own change as it's very large. We should probably fix the version of mocha so we don't run into this hassle with the git-status check.

@rjwright
Copy link
Contributor Author

I can do a separate CL for the mocha update, but I don't know how to remove the diff from this CL.

@@ -15,7 +15,8 @@
(function(shared, scope, testing) {

function groupChildDuration(node) {
return node.timing.delay + node.activeDuration + node.timing.endDelay;
var _timing = shared.normalizeTimingInput(node.timing);
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't want to be normalizing here if possible as this function gets called multiple times per frame.

Copy link
Contributor

Choose a reason for hiding this comment

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

should be OK to use node._timing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

so that we don't have to re-normalize when we compute durations.
@rjwright
Copy link
Contributor Author

@shans @alancutter ptal

shans added a commit that referenced this pull request Aug 12, 2014
@shans shans merged commit a0a35b6 into web-animations:master Aug 12, 2014
@rjwright rjwright deleted the AnimConstructorEasing branch October 27, 2014 06:41
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.

None yet

3 participants