1 line
23 KiB
JavaScript
1 line
23 KiB
JavaScript
window.es={},window.__extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var __generator=this&&this.__generator||function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};!function(e){var t=function(){function t(){}return t.prototype.recycleSelf=function(){},t.prototype.isRunning=function(){return this._isCurrentlyManagedByTweenManager&&!this._isPaused},t.prototype.start=function(){this._isCurrentlyManagedByTweenManager?this._isPaused=!1:(e.TweenManager.addTween(this),this._isCurrentlyManagedByTweenManager=!0,this._isPaused=!1)},t.prototype.pause=function(){this._isPaused=!0},t.prototype.resume=function(){this._isPaused=!1},t.prototype.stop=function(t){void 0===t&&(t=!1),e.TweenManager.removeTween(this),this._isCurrentlyManagedByTweenManager=!1,this._isPaused=!0},t}();e.AbstractTweenable=t}(es||(es={})),function(e){var t=function(){function e(e,t){this._target=e,this._propertyName=t}return e.prototype.getTargetObject=function(){return this._target},e.prototype.setTweenedValue=function(e){this._target[this._propertyName]=e},e.prototype.getTweenedValue=function(){return this._target[this._propertyName]},e}(),n=function(){function n(){}return n.NumberPropertyTo=function(n,r,i,a){var s=new t(n,r),o=e.TweenManager.cacheNumberTweens?e.Pool.obtain(e.NumberTween):new e.NumberTween;return o.initialize(s,i,a),o},n.Vector2PropertyTo=function(n,r,i,a){var s=new t(n,r),o=e.TweenManager.cacheVector2Tweens?e.Pool.obtain(e.Vector2Tween):new e.Vector2Tween;return o.initialize(s,i,a),o},n}();e.PropertyTweens=n}(es||(es={})),function(e){var t=function(t){function n(e,n,r){var i=t.call(this)||this;return i.dampingRatio=.23,i.angularFrequency=25,i._transform=e,i._targetType=n,i.setTargetValue(r),i}return __extends(n,t),Object.defineProperty(n.prototype,"targetType",{get:function(){return this._targetType},enumerable:!0,configurable:!0}),n.prototype.setTargetValue=function(t){this._velocity=e.Vector2.zero,this._targetValue=t,this._isCurrentlyManagedByTweenManager||this.start()},n.prototype.updateDampingRatioWithHalfLife=function(e){this.dampingRatio=-e/this.angularFrequency*Math.log(.5)},n.prototype.tick=function(){return this._isPaused||this.setTweenedValue(e.Lerps.fastSpring(this.getCurrentValueOfTweenedTargetType(),this._targetValue,this._velocity,this.dampingRatio,this.angularFrequency)),!1},n.prototype.setTweenedValue=function(t){switch(this._targetType){case e.TransformTargetType.position:this._transform.position=t;break;case e.TransformTargetType.localPosition:this._transform.localPosition=t;break;case e.TransformTargetType.scale:this._transform.scale=t;break;case e.TransformTargetType.localScale:this._transform.localScale=t;break;case e.TransformTargetType.rotationDegrees:this._transform.rotationDegrees=t.x;case e.TransformTargetType.localRotationDegrees:this._transform.localRotationDegrees=t.x}},n.prototype.getCurrentValueOfTweenedTargetType=function(){switch(this._targetType){case e.TransformTargetType.position:return this._transform.position;case e.TransformTargetType.localPosition:return this._transform.localPosition;case e.TransformTargetType.scale:return this._transform.scale;case e.TransformTargetType.localScale:return this._transform.localScale;case e.TransformTargetType.rotationDegrees:return new e.Vector2(this._transform.rotationDegrees);case e.TransformTargetType.localRotationDegrees:return new e.Vector2(this._transform.localRotationDegrees,0);default:return e.Vector2.zero}},n}(e.AbstractTweenable);e.TransformSpringTween=t}(es||(es={})),function(e){var t,n;!function(e){e[e.none=0]="none",e[e.restartFromBeginning=1]="restartFromBeginning",e[e.pingpong=2]="pingpong"}(t=e.LoopType||(e.LoopType={})),function(e){e[e.running=0]="running",e[e.paused=1]="paused",e[e.complete=2]="complete"}(n=e.TweenState||(e.TweenState={}));var r=function(){function r(){this._shouldRecycleTween=!0,this._tweenState=n.complete,this._timeScale=1}return r.prototype.setEaseType=function(e){return this._easeType=e,this},r.prototype.setDelay=function(e){return this._delay=e,this._elapsedTime=-this._delay,this},r.prototype.setDuration=function(e){return this._duration=e,this},r.prototype.setTimeScale=function(e){return this._timeScale=e,this},r.prototype.setIsTimeScaleIndependent=function(){return this._isTimeScaleIndependent=!0,this},r.prototype.setCompletionHandler=function(e){return this._completionHandler=e,this},r.prototype.setLoops=function(e,n,r){return void 0===n&&(n=1),void 0===r&&(r=0),this._loopType=e,this._delayBetweenLoops=r,n<0&&(n=-1),e==t.pingpong&&(n*=2),this._loops=n,this},r.prototype.setLoopCompletionHanlder=function(e){return this._loopCompleteHandler=e,this},r.prototype.setFrom=function(e){return this._isFromValueOverridden=!0,this._fromValue=e,this},r.prototype.prepareForReuse=function(e,t,n){return this.initialize(this._target,t,n),this},r.prototype.setRecycleTween=function(e){return this._shouldRecycleTween=e,this},r.prototype.setContext=function(e){return this.context=e,this},r.prototype.setNextTween=function(e){return this._nextTween=e,this},r.prototype.tick=function(){if(this._tweenState==n.paused)return!1;var r=0;!this._isRunningInReverse&&this._elapsedTime>=this._duration?(r=this._elapsedTime-this._duration,this._elapsedTime=this._duration,this._tweenState=n.complete):this._isRunningInReverse&&this._elapsedTime<=0&&(r=0-this._elapsedTime,this._elapsedTime=0,this._tweenState=n.complete),this._elapsedTime>=0&&this._elapsedTime<=this._duration&&this.updateValue(),this._loopType!=t.none&&this._tweenState==n.complete&&0!=this._loops&&this.handleLooping(r);var i=this._isTimeScaleIndependent?e.Time.unscaledDeltaTime:e.Time.deltaTime;return i*=this._timeScale,this._isRunningInReverse?this._elapsedTime-=i:this._elapsedTime+=i,this._tweenState==n.complete&&(this._completionHandler&&this._completionHandler(this),null!=this._nextTween&&(this._nextTween.start(),this._nextTween=null),!0)},r.prototype.recycleSelf=function(){this._shouldRecycleTween&&(this._target=null,this._nextTween=null)},r.prototype.isRunning=function(){return this._tweenState==n.running},r.prototype.start=function(){this._isFromValueOverridden||(this._fromValue=this._target.getTargetObject()),this._tweenState==n.complete&&(this._tweenState=n.running,e.TweenManager.addTween(this))},r.prototype.pause=function(){this._tweenState=n.paused},r.prototype.resume=function(){this._tweenState=n.running},r.prototype.stop=function(r){void 0===r&&(r=!1),this._tweenState=n.complete,r?(this._elapsedTime=this._isRunningInReverse?0:this._duration,this._loopType=t.none,this._loops=0):e.TweenManager.removeTween(this)},r.prototype.jumpToElapsedTime=function(t){this._elapsedTime=e.MathHelper.clamp(t,0,this._duration),this.updateValue()},r.prototype.reverseTween=function(){this._isRunningInReverse=!this._isRunningInReverse},r.prototype.waitForCompletion=function(){return __generator(this,function(e){switch(e.label){case 0:return this._tweenState==n.complete?[3,2]:[4,null];case 1:return e.sent(),[3,0];case 2:return[2]}})},r.prototype.getTargetObject=function(){return this._target.getTargetObject()},r.prototype.resetState=function(){this.context=null,this._completionHandler=this._loopCompleteHandler=null,this._isFromValueOverridden=!1,this._isTimeScaleIndependent=!1,this._tweenState=n.complete,this._isRelative=!1,this._easeType=e.TweenManager.defaultEaseType,null!=this._nextTween&&(this._nextTween.recycleSelf(),this._nextTween=null),this._delay=0,this._duration=0,this._timeScale=1,this._elapsedTime=0,this._loopType=t.none,this._delayBetweenLoops=0,this._loops=0,this._isRunningInReverse=!1},r.prototype.initialize=function(e,t,n){this.resetState(),this._target=e,this._toValue=t,this._duration=n},r.prototype.handleLooping=function(e){this._loops--,this._loopType==t.pingpong&&this.reverseTween(),this._loopType!=t.restartFromBeginning&&this._loops%2!=0||this._loopCompleteHandler&&this._completionHandler(this),0!=this._loops&&(this._tweenState=n.running,this._loopType==t.restartFromBeginning?this._elapsedTime=e-this._delayBetweenLoops:this._isRunningInReverse?this._elapsedTime+=this._delayBetweenLoops-e:this._elapsedTime=e-this._delayBetweenLoops,0==this._delayBetweenLoops&&e>0&&this.updateValue())},r}();e.Tween=r}(es||(es={})),function(e){var t=function(t){function n(e,n,r){var i=t.call(this)||this;return i.initialize(e,n,r),i}return __extends(n,t),n.create=function(){return e.TweenManager.cacheNumberTweens?e.Pool.obtain(n):new n},n.prototype.setIsRelative=function(){return this._isRelative=!0,this._toValue+=this._fromValue,this},n.prototype.updateValue=function(){this._target.setTweenedValue(e.Lerps.ease(this._easeType,this._fromValue,this._toValue,this._elapsedTime,this._duration))},n.prototype.recycleSelf=function(){t.prototype.recycleSelf.call(this),this._shouldRecycleTween&&e.TweenManager.cacheNumberTweens&&e.Pool.free(this)},n}(e.Tween);e.NumberTween=t;var n=function(t){function n(e,n,r){var i=t.call(this)||this;return i.initialize(e,n,r),i}return __extends(n,t),n.create=function(){return e.TweenManager.cacheVector2Tweens?e.Pool.obtain(n):new n},n.prototype.setIsRelative=function(){return this._isRelative=!0,this._toValue.add(this._fromValue),this},n.prototype.updateValue=function(){this._target.setTweenedValue(e.Lerps.easeVector2(this._easeType,this._fromValue,this._toValue,this._elapsedTime,this._duration))},n.prototype.recycleSelf=function(){t.prototype.recycleSelf.call(this),this._shouldRecycleTween&&e.TweenManager.cacheVector2Tweens&&e.Pool.free(this)},n}(e.Tween);e.Vector2Tween=n;var r=function(t){function n(e,n,r){var i=t.call(this)||this;return i.initialize(e,n,r),i}return __extends(n,t),n.create=function(){return e.TweenManager.cacheRectTweens?e.Pool.obtain(n):new n},n.prototype.setIsRelative=function(){return this._isRelative=!0,this._toValue=new e.Rectangle(this._toValue.x+this._fromValue.x,this._toValue.y+this._fromValue.y,this._toValue.width+this._fromValue.width,this._toValue.height+this._fromValue.height),this},n.prototype.updateValue=function(){this._target.setTweenedValue(e.Lerps.easeRectangle(this._easeType,this._fromValue,this._toValue,this._elapsedTime,this._duration))},n.prototype.recycleSelf=function(){t.prototype.recycleSelf.call(this),this._shouldRecycleTween&&e.TweenManager.cacheRectTweens&&e.Pool.free(this)},n}(e.Tween);e.RectangleTween=r}(es||(es={})),function(e){var t;!function(e){e[e.position=0]="position",e[e.localPosition=1]="localPosition",e[e.scale=2]="scale",e[e.localScale=3]="localScale",e[e.rotationDegrees=4]="rotationDegrees",e[e.localRotationDegrees=5]="localRotationDegrees"}(t=e.TransformTargetType||(e.TransformTargetType={}));var n=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return __extends(r,n),r.prototype.setTweenedValue=function(e){switch(this._targetType){case t.position:this._transform.position=e;break;case t.localPosition:this._transform.localPosition=e;break;case t.scale:this._transform.scale=e;break;case t.localScale:this._transform.localScale=e;break;case t.rotationDegrees:this._transform.rotationDegrees=e.x;case t.localRotationDegrees:this._transform.localRotationDegrees=e.x}},r.prototype.getTweenedValue=function(){switch(this._targetType){case t.position:return this._transform.position;case t.localPosition:return this._transform.localPosition;case t.scale:return this._transform.scale;case t.localScale:return this._transform.localScale;case t.rotationDegrees:return new e.Vector2(this._transform.rotationDegrees);case t.localRotationDegrees:return new e.Vector2(this._transform.localRotationDegrees,0)}},r.prototype.getTargetObject=function(){return this._transform},r.prototype.setTargetAndType=function(e,t){this._transform=e,this._targetType=t},r.prototype.updateValue=function(){this._targetType!=t.rotationDegrees&&this._targetType!=t.localRotationDegrees||this._isRelative?this.setTweenedValue(e.Lerps.easeVector2(this._easeType,this._fromValue,this._toValue,this._elapsedTime,this._duration)):this.setTweenedValue(e.Lerps.easeAngle(this._easeType,this._fromValue,this._toValue,this._elapsedTime,this._duration))},r.prototype.recycleSelf=function(){this._shouldRecycleTween&&(this._target=null,this._nextTween=null,this._transform=null,e.Pool.free(this))},r}(e.Vector2Tween);e.TransformVector2Tween=n}(es||(es={})),function(e){var t;!function(e){e[e.linear=0]="linear",e[e.sineIn=1]="sineIn",e[e.sineOut=2]="sineOut",e[e.sineInOut=3]="sineInOut",e[e.quadIn=4]="quadIn",e[e.quadOut=5]="quadOut",e[e.quadInOut=6]="quadInOut",e[e.quintIn=7]="quintIn",e[e.quintOut=8]="quintOut",e[e.quintInOut=9]="quintInOut",e[e.cubicIn=10]="cubicIn",e[e.cubicOut=11]="cubicOut",e[e.cubicInOut=12]="cubicInOut",e[e.quartIn=13]="quartIn",e[e.quartOut=14]="quartOut",e[e.quartInOut=15]="quartInOut",e[e.expoIn=16]="expoIn",e[e.expoOut=17]="expoOut",e[e.expoInOut=18]="expoInOut",e[e.circleIn=19]="circleIn",e[e.circleOut=20]="circleOut",e[e.circleInOut=21]="circleInOut",e[e.elasticIn=22]="elasticIn",e[e.elasticOut=23]="elasticOut",e[e.elasticInOut=24]="elasticInOut",e[e.punch=25]="punch",e[e.backIn=26]="backIn",e[e.backOut=27]="backOut",e[e.backInOut=28]="backInOut",e[e.bounceIn=29]="bounceIn",e[e.bounceOut=30]="bounceOut",e[e.bounceInOut=31]="bounceInOut"}(t=e.EaseType||(e.EaseType={}));var n=function(){function n(){}return n.oppositeEaseType=function(e){switch(e){case t.linear:return e;case t.backIn:return t.backOut;case t.backOut:return t.backIn;case t.backInOut:return e;case t.bounceIn:return t.bounceOut;case t.bounceOut:return t.bounceIn;case t.bounceInOut:return e;case t.circleIn:return t.circleOut;case t.circleOut:return t.circleIn;case t.circleInOut:return e;case t.cubicIn:return t.cubicOut;case t.cubicOut:return t.cubicIn;case t.circleInOut:case t.punch:return e;case t.expoIn:return t.expoOut;case t.expoOut:return t.expoIn;case t.expoInOut:return e;case t.quadIn:return t.quadOut;case t.quadOut:return t.quadIn;case t.quadInOut:return e;case t.quartIn:return t.quadOut;case t.quartOut:return t.quartIn;case t.quadInOut:return e;case t.sineIn:return t.sineOut;case t.sineOut:return t.sineIn;case t.sineInOut:default:return e}},n.ease=function(n,r,i){switch(n){case t.linear:return e.Easing.Linear.easeNone(r,i);case t.backIn:return e.Easing.Back.easeIn(r,i);case t.backOut:return e.Easing.Back.easeOut(r,i);case t.backInOut:return e.Easing.Back.easeInOut(r,i);case t.bounceIn:return e.Easing.Bounce.easeIn(r,i);case t.bounceOut:return e.Easing.Bounce.easeOut(r,i);case t.bounceInOut:return e.Easing.Bounce.easeInOut(r,i);case t.circleIn:return e.Easing.Circular.easeIn(r,i);case t.circleOut:return e.Easing.Circular.easeOut(r,i);case t.circleInOut:return e.Easing.Circular.easeInOut(r,i);case t.cubicIn:return e.Easing.Cubic.easeIn(r,i);case t.cubicOut:return e.Easing.Cubic.easeOut(r,i);case t.cubicInOut:return e.Easing.Cubic.easeInOut(r,i);case t.elasticIn:return e.Easing.Elastic.easeIn(r,i);case t.elasticOut:return e.Easing.Elastic.easeOut(r,i);case t.elasticInOut:return e.Easing.Elastic.easeInOut(r,i);case t.punch:return e.Easing.Elastic.punch(r,i);case t.expoIn:return e.Easing.Exponential.easeIn(r,i);case t.expoOut:return e.Easing.Exponential.easeOut(r,i);case t.expoInOut:return e.Easing.Exponential.easeInOut(r,i);case t.quadIn:return e.Easing.Quadratic.easeIn(r,i);case t.quadOut:return e.Easing.Quadratic.easeOut(r,i);case t.quadInOut:return e.Easing.Quadratic.easeInOut(r,i);case t.quadIn:return e.Easing.Quadratic.easeIn(r,i);case t.quadOut:return e.Easing.Quadratic.easeOut(r,i);case t.quadInOut:return e.Easing.Quadratic.easeInOut(r,i);case t.quintIn:return e.Easing.Quintic.easeIn(r,i);case t.quintOut:return e.Easing.Quintic.easeOut(r,i);case t.quintInOut:return e.Easing.Quintic.easeInOut(r,i);case t.sineIn:return e.Easing.Sinusoidal.easeIn(r,i);case t.sineOut:return e.Easing.Sinusoidal.easeOut(r,i);case t.sineInOut:return e.Easing.Sinusoidal.easeInOut(r,i);default:return e.Easing.Linear.easeNone(r,i)}},n}();e.EaseHelper=n}(es||(es={})),function(e){var t=function(t){function n(){var e=t.call(this)||this;return e._activeTweens=[],e._tempTweens=[],n._instance=e,e}return __extends(n,t),n.prototype.update=function(){this._isUpdating=!0;for(var e=this._activeTweens.length-1;e>=0;--e){var t=this._activeTweens[e];t.tick()&&this._tempTweens.push(t)}this._isUpdating=!1;for(e=0;e<this._tempTweens.length;e++)this._tempTweens[e].recycleSelf(),new linq.List(this._activeTweens).remove(this._tempTweens[e]);this._tempTweens.length=0},n.addTween=function(e){n._instance._activeTweens.push(e)},n.removeTween=function(e){n._instance._isUpdating?n._instance._tempTweens.push(e):(e.recycleSelf(),new linq.List(n._instance._activeTweens).remove(e))},n.stopAllTweens=function(e){void 0===e&&(e=!1);for(var t=n._instance._activeTweens.length-1;t>=0;--t)n._instance._activeTweens[t].stop(e)},n.allTweensWithContext=function(e){for(var t=[],r=0;r<n._instance._activeTweens.length;r++)n._instance._activeTweens[r].context==e&&t.push(n._instance._activeTweens[r]);return t},n.stopAllTweensWithContext=function(e,t){void 0===t&&(t=!1);for(var r=n._instance._activeTweens.length-1;r>=0;--r)n._instance._activeTweens[r].context==e&&n._instance._activeTweens[r].stop(t)},n.allTweenWithTarget=function(e){for(var t=[],r=0;r<n._instance._activeTweens.length;r++){if(n._instance._activeTweens[r])n._instance._activeTweens[r].getTargetObject()==e&&t.push(n._instance._activeTweens[r])}return t},n.stopAllTweensWithTarget=function(e,t){void 0===t&&(t=!1);for(var r=n._instance._activeTweens.length-1;r>=0;--r)if(n._instance._activeTweens[r]){var i=n._instance._activeTweens[r];i.getTargetObject()==e&&i.stop(t)}},n.defaultEaseType=e.EaseType.quartIn,n.removeAllTweensOnLevelLoad=!1,n.cacheNumberTweens=!0,n.cacheVector2Tweens=!0,n.cacheRectTweens=!0,n}(e.GlobalManager);e.TweenManager=t}(es||(es={})),function(e){!function(e){var t=function(){function e(){}return e.easeNone=function(e,t){return e/t},e}();e.Linear=t;var n=function(){function e(){}return e.easeIn=function(e,t){return(e/=t)*e},e.easeOut=function(e,t){return-1*(e/=t)*(e-2)},e.easeInOut=function(e,t){return(e/=t/2)<1?.5*e*e:-.5*(--e*(e-2)-1)},e}();e.Quadratic=n;var r=function(){function e(){}return e.easeIn=function(e,t){return(e/=t)*e*(2.70158*e-1.70158)},e.easeOut=function(e,t){return(e=e/t-1)*e*(2.70158*e+1.70158)+1},e.easeInOut=function(e,t){var n=1.70158;return(e/=t/2)<1?e*e*((1+(n*=1.525))*e-n)*.5:.5*((e-=2)*e*((1+(n*=1.525))*e+n)+2)},e}();e.Back=r;var i=function(){function e(){}return e.easeOut=function(e,t){return(e/=t)<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},e.easeIn=function(e,t){return 1-this.easeOut(t-e,t)},e.easeInOut=function(e,t){return e<t/2?.5*this.easeIn(2*e,t):.5*this.easeOut(2*e-t,t)+.5},e}();e.Bounce=i;var a=function(){function e(){}return e.easeIn=function(e,t){return-(Math.sqrt(1-(e/=t)*e)-1)},e.easeOut=function(e,t){return Math.sqrt(1-(e=e/t-1)*e)},e.easeInOut=function(e,t){return(e/=t/2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},e}();e.Circular=a;var s=function(){function e(){}return e.easeIn=function(e,t){return(e/=t)*e*e},e.easeOut=function(e,t){return(e=e/t-1)*e*e+1},e.easeInOut=function(e,t){return(e/=t/2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},e}();e.Cubic=s;var o=function(){function e(){}return e.easeIn=function(e,t){if(0==e)return 0;if(1==(e/=t))return 1;var n=.3*t,r=n/4;return-1*Math.pow(2,10*(e-=1))*Math.sin((e*t-r)*(2*Math.PI)/n)},e.easeOut=function(e,t){if(0==e)return 0;if(1==(e/=t))return 1;var n=.3*t,r=n/4;return 1*Math.pow(2,-10*e)*Math.sin((e*t-r)*(2*Math.PI)/n)+1},e.easeInOut=function(e,t){if(0==e)return 0;if(2==(e/=t/2))return 1;var n=t*(.3*1.5),r=n/4;return e<1?Math.pow(2,10*(e-=1))*Math.sin(e*t-r)*(2*Math.PI)/n*-.5:Math.pow(2,-10*(e-=1))*Math.sin((e*t-r)*(2*Math.PI)/n)*.5+1},e.punch=function(e,t){if(0==e)return 0;if(1==(e/=t))return 0;return Math.pow(2,-10*e)*Math.sin(e*(2*Math.PI)/.3)},e}();e.Elastic=o;var u=function(){function e(){}return e.easeIn=function(e,t){return 0==e?0:Math.pow(2,10*(e/t-1))},e.easeOut=function(e,t){return e==t?1:1-Math.pow(2,-10*e/t)},e.easeInOut=function(e,t){return 0==e?0:e==t?1:(e/=t/2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},e}();e.Exponential=u;var c=function(){function e(){}return e.easeIn=function(e,t){return(e/=t)*e*e*e},e.easeOut=function(e,t){return-1*((e=e/t-1)*e*e*e-1)},e.easeInOut=function(e,t){return(e/=t/2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},e}();e.Quartic=c;var l=function(){function e(){}return e.easeIn=function(e,t){return(e/=t)*e*e*e*e},e.easeOut=function(e,t){return(e=e/t-1)*e*e*e*e+1},e.easeInOut=function(e,t){return(e/=t/2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},e}();e.Quintic=l;var p=function(){function e(){}return e.easeIn=function(e,t){return-1*Math.cos(e/t*(Math.PI/2))+1},e.easeOut=function(e,t){return Math.sin(e/t*(Math.PI/2))},e.easeInOut=function(e,t){return-.5*(Math.cos(Math.PI*e/t)-1)},e}();e.Sinusoidal=p}(e.Easing||(e.Easing={}))}(es||(es={})),function(e){var t=function(){function t(){}return t.lerp=function(e,t,n){return e+(t-e)*n},t.lerpVector2=function(t,n,r){return new e.Vector2(t.x+(n.x-t.x)*r,t.y+(n.y-t.y)*r)},t.lerpRectangle=function(t,n,r){return new e.Rectangle(t.x+(n.x-t.x)*r,t.y+(n.x-t.y)*r,t.width+(n.width-t.width)*r,t.height+(n.height-t.height)*r)},t.angleLerp=function(t,n,r){var i=new e.Vector2(e.MathHelper.deltaAngle(t.x,n.x),e.MathHelper.deltaAngle(t.y,n.y));return new e.Vector2(t.x+i.x*r,t.y+i.y*r)},t.ease=function(t,n,r,i,a){return this.lerp(n,r,e.EaseHelper.ease(t,i,a))},t.easeVector2=function(t,n,r,i,a){return this.lerpVector2(n,r,e.EaseHelper.ease(t,i,a))},t.easeRectangle=function(t,n,r,i,a){return this.lerpRectangle(n,r,e.EaseHelper.ease(t,i,a))},t.easeAngle=function(t,n,r,i,a){return this.angleLerp(n,r,e.EaseHelper.ease(t,i,a))},t.fastSpring=function(t,n,r,i,a){return r.add(new e.Vector2(-2*e.Time.deltaTime*i*a).multiply(r).add(new e.Vector2(e.Time.deltaTime*a*a).multiply(e.Vector2.subtract(n,t)))),t.add(new e.Vector2(e.Time.deltaTime).multiply(r)),t},t}();e.Lerps=t}(es||(es={})); |