michaelvillar / dynamics.js

Javascript library to create physics-based animations
http://dynamicsjs.com
7.57k stars 414 forks source link

add support for css filters #27

Closed kilianc closed 8 years ago

kilianc commented 8 years ago

Unless I missed the part in the docs that mentions how to interpolate custom props or how to handle filters.

michaelvillar commented 8 years ago

You should be able to do so. dynamics interpolate strings too :)

kilianc commented 8 years ago

yo @michaelvillar link to an example?

simply doing filter: blur(20px) didn't work :/

michaelvillar commented 8 years ago

Here's an working example: https://gist.github.com/michaelvillar/fe9cfb41058293cffa62e117f13760d3 The trick is to se the filter to blur(0px) as the initial state. Dynamics doesn't work really well when default values aren't set, I should do this better.