var _Group=function(){this._tweens={};this._tweensAddedDuringUpdate={};};_Group.prototype={getAll:function(){return Object.keys(this._tweens).map(function(tweenId){return this._tweens[tweenId];}.bind(this));},removeAll:function(){this._tweens={};},add:function(tween){this._tweens[tween.getId()]=tween;this._tweensAddedDuringUpdate[tween.getId()]=tween;},remove:function(tween){delete this._tweens[tween.getId()];delete this._tweensAddedDuringUpdate[tween.getId()];},update:function(time,preserve){var tweenIds=Object.keys(this._tweens);if(tweenIds.length===0){return false;} time=time!==undefined?time:TWEEN.now();while(tweenIds.length>0){this._tweensAddedDuringUpdate={};for(var i=0;i1)?1:elapsed;value=this._easingFunction(elapsed);for(property in this._valuesEnd){if(this._valuesStart[property]===undefined){continue;} var start=this._valuesStart[property]||0;var end=this._valuesEnd[property];if(end instanceof Array){this._object[property]=this._interpolationFunction(end,value);}else{if(typeof(end)==='string'){if(end.charAt(0)==='+'||end.charAt(0)==='-'){end=start+parseFloat(end);}else{end=parseFloat(end);}} if(typeof(end)==='number'){this._object[property]=start+(end-start)*value;}}} if(this._onUpdateCallback!==null){this._onUpdateCallback(this._object);} if(elapsed===1){if(this._repeat>0){if(isFinite(this._repeat)){this._repeat--;} for(property in this._valuesStartRepeat){if(typeof(this._valuesEnd[property])==='string'){this._valuesStartRepeat[property]=this._valuesStartRepeat[property]+parseFloat(this._valuesEnd[property]);} if(this._yoyo){var tmp=this._valuesStartRepeat[property];this._valuesStartRepeat[property]=this._valuesEnd[property];this._valuesEnd[property]=tmp;} this._valuesStart[property]=this._valuesStartRepeat[property];} if(this._yoyo){this._reversed=!this._reversed;} if(this._repeatDelayTime!==undefined){this._startTime=time+this._repeatDelayTime;}else{this._startTime=time+this._delayTime;} return true;}else{this.isPlaying=false;if(this._onCompleteCallback!==null){if(this._onCompleteCallbackScope!=null){this._onCompleteCallback.call(this._onCompleteCallbackScope);}else{this._onCompleteCallback(this._object);}} for(var i=0,numChainedTweens=this._chainedTweens.length;i1){return fn(v[m],v[m-1],m-f);} return fn(v[i],v[i+1>m?m:i+1],f-i);},Bezier:function(v,k){var b=0;var n=v.length-1;var pw=Math.pow;var bn=TWEEN.Interpolation.Utils.Bernstein;for(var i=0;i<=n;i++){b+=pw(1-k,n-i)*pw(k,i)*v[i]*bn(n,i);} return b;},CatmullRom:function(v,k){var m=v.length-1;var f=m*k;var i=Math.floor(f);var fn=TWEEN.Interpolation.Utils.CatmullRom;if(v[0]===v[m]){if(k<0){i=Math.floor(f=m*(1+k));} return fn(v[(i-1+m)%m],v[i],v[(i+1)%m],v[(i+2)%m],f-i);}else{if(k<0){return v[0]-(fn(v[0],v[0],v[1],v[1],-f)-v[0]);} if(k>1){return v[m]-(fn(v[m],v[m],v[m-1],v[m-1],f-m)-v[m]);} return fn(v[i?i-1:0],v[i],v[m1;i--){s*=i;} a[n]=s;return s;};})(),CatmullRom:function(p0,p1,p2,p3,t){var v0=(p2-p0)*0.5;var v1=(p3-p1)*0.5;var t2=t*t;var t3=t*t2;return(2*p1-2*p2+v0+v1)*t3+(-3*p1+3*p2-2*v0-v1)*t2+v0*t+p1;}}};(function(root){if(typeof define==='function'&&define.amd){define([],function(){return TWEEN;});}else if(typeof module!=='undefined'&&typeof exports==='object'){module.exports=TWEEN;}else if(root!==undefined){root.TWEEN=TWEEN;}})(this);