A complex animation library leveraging GSAP and lodash for advanced animations in a single file.
To install masy-animation-library
, run:
npm install masy-animation-library
This will also install required dependencies: gsap
and lodash
.
To animate an element, import the animateElement
function and pass the selector and animation parameters:
const { animateElement } = require('masy-animation-library');
animateElement('#myElement', { duration: 2, opacity: 1, x: 100 });
This example will animate the element with id myElement
to opacity 1 and move it 100 pixels to the right over 2
seconds.