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

Support animation of SVG color properties #484

Merged

Conversation

ewilligers
Copy link
Contributor

Animation of 'fill', 'flood-color', 'lighting-color', 'stop-color',
'stroke' is now supported.
web-animations/web-animations-js#81

assert.equal(webAnimations1.propertyInterpolation('color', 'transparent', '#004488')(0.5), 'rgba(0,68,136,0.500)');
assert.equal(webAnimations1.propertyInterpolation('color', 'red', 'green')(2), 'rgba(0,255,0,1)');
assert.equal(webAnimations1.propertyInterpolation('color', 'red', 'green')(-1), 'rgba(255,0,0,1)');
assert.equal(webAnimations1.propertyInterpolation('fill', 'transparent', '#004488')(0), 'transparent');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to use something other than 0 for the progress on this test, to distinguish successful interpolation from a 50-50 flip.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The subsequent line has the same from/to colors with 50% progress.

@ewilligers ewilligers force-pushed the additional-color-properties branch from 8e4a8de to 9023438 Compare August 9, 2016 05:16
@suzyh
Copy link
Contributor

suzyh commented Aug 9, 2016

lgtm

Animation of 'fill', 'flood-color', 'lighting-color', 'stop-color',
'stroke' is now supported.
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.

3 participants