react-magician
react-magician copied to clipboard
Add Spring easing
Borrow from here for now: https://github.com/iamralpht/iamralpht.github.io/tree/master/physics
Use npm package when available.
Syntax-wise it should be something like:
fooBarAnimation: Animation.create({
'0ms': {
blockA: {
left: 0,
top: 0,
width: 0,
transform: 'rotate(0deg)'
},
blockB: {
left: 0,
top: 0
}
},
'100ms': {
blockA: {
easing: Spring({
spring: 2,
damping: 2
}),
left: 100
}
}
});
Also investigate other options, like gravity support.
Better solution, use: https://github.com/iamralpht/gravitas.js.