animation.gsap.min.js 1.2 KB

12
  1. /* ScrollMagic v2.0.7 | (c) 2019 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */
  2. !function(a,b){"function"==typeof define&&define.amd?define(["ScrollMagic","TweenMax","TimelineMax"],b):"object"==typeof exports?(require("gsap"),b(require("scrollmagic"),TweenMax,TimelineMax)):b(a.ScrollMagic||a.jQuery&&a.jQuery.ScrollMagic,a.TweenMax||a.TweenLite,a.TimelineMax||a.TimelineLite)}(this,function(a,b,c){a.Scene.addOption("tweenChanges",!1,function(d){return !!d}),a.Scene.extend(function(){var e,f=this;f.on("progress.plugin_gsap",function(){d()}),f.on("destroy.plugin_gsap",function(g){f.removeTween(g.reset)});var d=function(){if(e){var g=f.progress(),h=f.state();e.repeat&&-1===e.repeat()?"DURING"===h&&e.paused()?e.play():"DURING"===h||e.paused()||e.pause():g!=e.progress()&&(0===f.duration()?0<g?e.play():e.reverse():f.tweenChanges()&&e.tweenTo?e.tweenTo(g*e.duration()):e.progress(g).pause())}};f.setTween=function(g,h,i){var j;1<arguments.length&&(arguments.length<3&&(i=h,h=1),g=b.to(g,h,i));try{(j=c?new c({smoothChildTiming:!0}).add(g):g).pause()}catch(g){return f}return e&&f.removeTween(),e=j,g.repeat&&-1===g.repeat()&&(e.repeat(-1),e.yoyo(g.yoyo())),d(),f},f.removeTween=function(g){return e&&(g&&e.progress(0).pause(),e.kill(),e=void 0),f}})});