Parallax
Provides parallax effect given a ratio (0-1). Based upon TweenMax.
Code Example
// Create an array of keyframes, be sure to include frame ratio: 0 and ratio: 1 // x, y, opacity, backgroundColor... anything that could be tweened through TweenMax could be tweened. // Easing could be added between frames. var keyframes = ratio: 0 frame: {} ratio: 05 frame: x: 300 ratio: 1 frame: y: 300 ease: Power3easeOut ; // create parallax according to keyframes var parallax = keyframes;
Install with:
yarn add greensock-parallax