PageSourceSearch

https://foundationinc.co/wp-content/cache/min/1/ajax/libs/ScrollMa…/plugins/animation.gsap.js?ver=1790876117

js foundationinc.co collected 2026-10-02 02:18:13 UTC 4,455 bytes, 35 lines download raw bytes

1/*!
2 * ScrollMagic v2.0.7 (2019-05-07)
3 * The javascript library for magical scroll interactions.
4 * (c) 2019 Jan Paepke (@janpaepke)
5 * Project Website: http://scrollmagic.io
6 * 
7 * @version 2.0.7
8 * @license Dual licensed under MIT license and GPL.
9 * @author Jan Paepke - [email protected]
10 *
11 * @file ScrollMagic GSAP Animation Plugin.
12 *
13 * requires: GSAP ~1.14
14 * Powered by the Greensock Animation Platform (GSAP): http://www.greensock.com/js
15 * Greensock License info at http://www.greensock.com/licensing/
16 */
17(function(root,factory){if(typeof define==='function'&&define.amd){define(['ScrollMagic','TweenMax','TimelineMax'],factory)}else if(typeof exports==='object'){require('gsap');factory(require('scrollmagic'),TweenMax,TimelineMax)}else{factory(root.ScrollMagic||(root.jQuery&&root.jQuery.ScrollMagic),root.TweenMax||root.TweenLite,root.TimelineMax||root.TimelineLite)}}(this,function(ScrollMagic,Tween,Timeline){"use strict";var NAMESPACE="animation.gsap";var console=window.console||{},err=Function.prototype.bind.call(console.error||console.log||function(){},console);if(!ScrollMagic){err("("+NAMESPACE+") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs.")}
18if(!Tween){err("("+NAMESPACE+") -> ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs.")}
19ScrollMagic.Scene.addOption("tweenChanges",!1,function(val){return!!val});ScrollMagic.Scene.extend(function(){var Scene=this,_tween;var log=function(){if(Scene._log){Array.prototype.splice.call(arguments,1,0,"("+NAMESPACE+")","->");Scene._log.apply(this,arguments)}};
19Scene.on("progress.plugin_gsap",function(){updateTweenProgress()});Scene.on("destroy.plugin_gsap",function(e){Scene.removeTween(e.reset)});var updateTweenProgress=function(){if(_tween){var
20progress=Scene.progress(),state=Scene.state();if(_tween.repeat&&_tween.repeat()===-1){if(state==='DURING'&&_tween.paused()){_tween.play()}else if(state!=='DURING'&&!_tween.paused()){_tween.pause()}}else if(progress!=_tween.progress()){if(Scene.duration()===0){if(progress>0){_tween.play()}else{_tween.reverse()}}else{if(Scene.tweenChanges()&&_tween.tweenTo){_tween.tweenTo(progress*_tween.duration())}else{_tween.progress(progress).pause()}}}}};Scene.setTween=function(TweenObject,duration,params){var newTween;if(arguments.length>1){if(arguments.length<3){params=duration;duration=1}
21TweenObject=Tween.to(TweenObject,duration,params)}
22try{if(Timeline){newTween=new Timeline({smoothChildTiming:!0}).add(TweenObject)}else{newTween=TweenObject}
23newTween.pause()}catch(e){log(1,"ERROR calling method 'setTween()': Supplied argument is not a valid TweenObject");return Scene}
24if(_tween){Scene.removeTween()}
25_tween=newTween;if(TweenObject.repeat&&TweenObject.repeat()===-1){_tween.repeat(-1);_tween.yoyo(TweenObject.yoyo())}
26if(Scene.tweenChanges()&&!_tween.tweenTo){log(2,"WARNING: tweenChanges will only work if the TimelineMax object is available for ScrollMagic.")}
27if(_tween&&Scene.controller()&&Scene.triggerElement()&&Scene.loglevel()>=2){var
28triggerTweens=Tween.getTweensOf(Scene.triggerElement()),vertical=Scene.controller().info("vertical");triggerTweens.forEach(function(value,index){var
29tweenvars=value.vars.css||value.vars,condition=vertical?(tweenvars.top!==undefined||tweenvars.bottom!==undefined):(tweenvars.left!==undefined||tweenvars.right!==undefined);if(condition){log(2,"WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!");return!1}})}
30if(parseFloat(TweenLite.version)>=1.14){var
31list=_tween.getChildren?_tween.getChildren(!0,!0,!1):[_tween],newCallback=function(){log(2,"WARNING: tween was overwritten by another. To learn how to avoid this issue see here: https://github.com/janpaepke/ScrollMagic/wiki/WARNING:-tween-was-overwritten-by-another")};for(var i=0,thisTween,oldCallback;i<list.length;i++){thisTween=list[i];if(oldCallback!==newCallback){oldCallback=thisTween.vars.onOverwrite;thisTween.vars.onOverwrite=function(){if(oldCallback){oldCallback.apply(this,arguments)}
32newCallback.apply(this,arguments)}}}}
33log(3,"added tween");updateTweenProgress();return Scene};Scene.removeTween=function(reset){if(_tween){if(reset){_tween.progress(0).pause()}
34_tween.kill();_tween=undefined;log(3,"removed tween (reset: "+(reset?"true":"false")+")")}
35return Scene}})}))

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.