react-magician icon indicating copy to clipboard operation
react-magician copied to clipboard

Add Spring easing

Open SanderSpies opened this issue 10 years ago • 1 comments

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.

SanderSpies avatar Mar 16 '15 09:03 SanderSpies

Better solution, use: https://github.com/iamralpht/gravitas.js.

SanderSpies avatar Mar 16 '15 19:03 SanderSpies