es6-tween
Advanced tools
Comparing version 5.0.2 to 5.0.3
@@ -1559,3 +1559,3 @@ (function (global, factory) { | ||
if (Plugins[property] && Plugins[property].update) { | ||
Plugins[property].update.call(this, object[property], start, end, value, elapsed); | ||
Plugins[property].update.call(this, object[property], start, end, value, elapsed, property); | ||
} | ||
@@ -1562,0 +1562,0 @@ propCount++; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TWEEN={})}(this,function(t){"use strict";function e(t){if(t&&t.nodeType||void 0===t||"object"!=typeof t)return t;if(Array.isArray(t))return[].concat(t);if("object"==typeof t){var r={};for(var n in t)r[n]=e(t[n]);return r}return t}function r(t){return"string"!=typeof t?t:t.replace(I,O).match(w).map(function(t){return A(t)?t:+t})}function n(t,e,i,o,s){var u=i[t],a=o[t];if("string"==typeof u||"string"==typeof a){for(var f=Array.isArray(u)&&u[0]===j?u:r(u),h=Array.isArray(a)&&a[0]===j?a:r(a),c=1;c<f.length;)f[c]===h[c]&&"string"==typeof f[c-1]?(f.splice(c-1,2,f[c-1]+f[c]),h.splice(c-1,2,h[c-1]+h[c])):c++;c=0,f[0]===j&&f.shift(),h[0]===j&&h.shift();for(var l={isString:!0,length:f.length},p={isString:!0,length:h.length};c<l.length;)l[c]=f[c],p[c]=h[c],c++;return i[t]=l,o[t]=p,!0}if("object"==typeof u&&"object"==typeof a){if(Array.isArray(u))return u.map(function(r,i){return n(i,e[t],u,a)});for(var y in a)n(y,e[t],u,a);return!0}return!1}function i(t,e,r,n,o,s,u){var a=u?r:r[t],f=u?n:n[t];if(void 0===f)return a;if(void 0===a||"string"==typeof a||a===f)return f;if("object"==typeof a&&"object"==typeof f){if(!a||!f)return e[t];if("object"==typeof a&&a&&a.isString){for(var h="",c=0,l=a.length;c<l;c++){var p="number"==typeof a[c]&&"string"==typeof f[c]&&"="===f[c][1],y="number"!=typeof a[c]?a[c]:((p?a[c]+parseFloat(f[c][0]+f[c].substr(2))*o:a[c]+(f[c]-a[c])*o)*M|0)/M;(P(a,c)||P(a,c,R))&&(y|=0),h+=y,p&&1===s&&(a[c]=a[c]+parseFloat(f[c][0]+f[c].substr(2)))}return u||(e[t]=h),h}if(Array.isArray(a)&&a[0]!==j)for(var c=0,l=a.length;c<l;c++)a[c]!==f[c]&&i(c,e[t],a,f,o,s);else if("object"==typeof a&&a&&!a.isString)for(var c in a)a[c]!==f[c]&&i(c,e[t],a,f,o,s)}else if("number"==typeof a){p="string"==typeof f;e[t]=((p?a+parseFloat(f[0]+f.substr(2))*o:a+(f-a)*o)*M|0)/M,p&&1===s&&(r[t]=e[t])}else"function"==typeof f&&(e[t]=f(o));return e[t]}var o,s="undefined"!=typeof window?window:"undefined"!=typeof global?global:this,u=s.requestAnimationFrame||function(t){return s.setTimeout(t,16)},a=s.cancelAnimationFrame||function(t){return s.clearTimeout(t)},f=function(){if("undefined"==typeof process||void 0===process.hrtime||process.versions&&void 0!==process.versions.electron){if(void 0!==s.performance&&void 0!==s.performance.now)return s.performance.now.bind(s.performance);var t=s.performance&&s.performance.timing&&s.performance.timing.navigationStart?s.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}}(),h=[],c=!1,l=!1,p=u,y=a,d=0,v=function(t){var e=h.indexOf(t);e>-1&&h.splice(e,1),h.push(t),d=0,l&&!c&&(o=p(g),c=!0)},_=function(t){for(var e=0;e<h.length;e++)if(t===h[e])return h[e];return null},m=function(t){var e=h.indexOf(t);-1!==e&&h.splice(e,1)},g=function(t,e){if(t=void 0!==t?t:f(),l&&c&&(o=p(g)),h.length||d++,d>120)return y(o),c=!1,d=0,!1;for(var r=0;r<h.length;)h[r++].update(t,e);return!0},b={},T={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-T.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*T.Bounce.In(2*t):.5*T.Bounce.Out(2*t-1)+.5}},Stepped:{steps:function(t){return function(e){return(e*t|0)/t}}}},j="STRING_PROP",w=/\s+|([A-Za-z?().,{}:""[\]#\%]+)|([-+]=+)?([-+]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]=?\d+)?/g,A=function(t){return isNaN(+t)||("+"===t[0]||"-"===t[0])&&"="===t[1]||""===t||" "===t},I=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,O=function(t,e){var r,n,i;3===e.length&&(e=(r=e[0])+r+(n=e[1])+n+(i=e[2])+i);var o=parseInt(e,16);return r=o>>16&255,n=o>>8&255,i=255&o,"rgb("+r+","+n+","+i+")"},M=Math.pow(10,4),R="rgba(",P=function(t,e,r){return void 0===r&&(r="rgb("),"number"==typeof t[e]&&(t[e-1]===r||t[e-3]===r||t[e-5]===r)},F=/([.\[])/g,S=/\]/g,q=function(t,e){var r=t[e],n=e.replace(S,"").split(F),i=n.length-1,o=Array.isArray(t),s="object"==typeof t&&!o;return s?(t[e]=null,delete t[e]):o&&t.splice(e,1),n.reduce(function(t,e,u){o&&"."!==e&&"["!==e&&(e*=1);var a="["===n[u+1];if("."===e||"["===e)return"."===e?(s=!0,o=!1):"["===e&&(s=!1,o=!0),t;if(void 0===t[e]){if(o||s)return t[e]=u===i?r:o||a?[]:s?{}:null,s=o=!1,t[e]}else if(void 0!==t[e])return u===i&&(t[e]=r),t[e];return t},t)},C=function(t){if("object"==typeof t&&t)for(var e in t)if(-1!==e.indexOf(".")||-1!==e.indexOf("["))q(t,e);else if("object"==typeof t[e]&&t[e]){var r=t[e];for(var n in r)if(-1!==n.indexOf(".")||-1!==n.indexOf("["))q(r,n);else if("object"==typeof r[n]&&r[n]){var i=r[n];for(var o in i)-1===o.indexOf(".")&&-1===o.indexOf("[")||q(i,o)}}return t},k={Linear:function(t,e,r){var n=t.length-1,i=n*e,o=Math.floor(i),s=k.Utils.Linear;return e<0?s(t[0],t[1],i,r):e>1?s(t[n],t[n-1],n-i,r):s(t[o],t[o+1>n?n:o+1],i-o,r)},Bezier:function(t,e,r){for(var n=k.Utils.Reset(r),i=t.length-1,o=Math.pow,s=k.Utils.Bernstein,u=Array.isArray(n),a=0;a<=i;a++)if("number"==typeof n)n+=o(1-e,i-a)*o(e,a)*t[a]*s(i,a);else if(u)for(var f=0,h=n.length;f<h;f++)"number"==typeof n[f]?n[f]+=o(1-e,i-a)*o(e,a)*t[a][f]*s(i,a):n[f]=t[a][f];else if("object"==typeof n)for(var f in n)"number"==typeof n[f]?n[f]+=o(1-e,i-a)*o(e,a)*t[a][f]*s(i,a):n[f]=t[a][f];else if("string"==typeof n){for(var c="",l=Math.round(i*e),p=t[l],y=1,h=p.length;y<h;y++)c+=p[y];return c}return n},CatmullRom:function(t,e,r){var n=t.length-1,i=n*e,o=Math.floor(i),s=k.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),s(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o,r)):e<0?s(t[1],t[1],t[0],t[0],-e,r):e>1?s(t[n-1],t[n-1],t[n],t[n],(0|e)-e,r):s(t[o?o-1:0],t[o],t[n<o+1?n:o+1],t[n<o+2?n:o+2],i-o,r)},Utils:{Linear:function(t,e,r,n){if("string"==typeof t)return e;if("number"==typeof t)return"function"==typeof t?t(r):t+(e-t)*r;if("object"==typeof t){if(void 0!==t.length){if(t[0]===j){for(var i="",o=1,s=t.length;o<s;o++){var u="number"==typeof t[o]?t[o]+(e[o]-t[o])*r:e[o];(P(t,o)||P(t,o,R))&&(u|=0),i+=u}return i}for(var a=0,s=n.length;a<s;a++)n[a]=k.Utils.Linear(t[a],e[a],r,n[a])}else for(var a in n)n[a]=k.Utils.Linear(t[a],e[a],r,n[a]);return n}},Reset:function(t){if(Array.isArray(t)){for(var e=0,r=t.length;e<r;e++)t[e]=k.Utils.Reset(t[e]);return t}if("object"==typeof t){for(var e in t)t[e]=k.Utils.Reset(t[e]);return t}return"number"==typeof t?0:t},Bernstein:function(t,e){var r=k.Utils.Factorial;return r(t)/r(e)/r(t-e)},Factorial:function(){var t=[1];return function(e){var r=1;if(t[e])return t[e];for(var n=e;n>1;n--)r*=n;return t[e]=r,r}}(),CatmullRom:function(t,e,r,n,i,o){if("string"==typeof t)return e;if("number"==typeof t){var s=.5*(r-t),u=.5*(n-e),a=i*i;return(2*e-2*r+s+u)*(i*a)+(-3*e+3*r-2*s-u)*a+s*i+e}if("object"==typeof t){if(void 0!==t.length){if(t[0]===j){for(var f="",h=1,c=t.length;h<c;h++){var l="number"==typeof t[h]?k.Utils.CatmullRom(t[h],e[h],r[h],n[h],i):n[h];(P(t,h)||P(t,h,R))&&(l|=0),f+=l}return f}for(var p=0,c=o.length;p<c;p++)o[p]=k.Utils.CatmullRom(t[p],e[p],r[p],n[p],i,o[p])}else for(var p in o)o[p]=k.Utils.CatmullRom(t[p],e[p],r[p],n[p],i,o[p]);return o}}}},x=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},L={},D=function(t,e,r){if(!t||!t.nodeType)return e;var n=t.queueID||"q_"+Date.now();t.queueID||(t.queueID=n);var i=L[n];if(i){if(i.object===e&&t===i.tween.node&&r._startTime===i.tween._startTime)m(i.tween);else if("object"==typeof e&&e&&i.object){for(var o in e)o in i.object&&(r._startTime===i.tween._startTime?delete i.object[o]:i.propNormaliseRequired=!0);i.object=x({},i.object,e)}return i.object}return"object"==typeof e&&e?(L[n]={tween:r,object:e,propNormaliseRequired:!1},L[n].object):e},U=function(t,e){return e?t?t===window||t===document?[t]:"string"==typeof t?!!document.querySelectorAll&&document.querySelectorAll(t):Array.isArray(t)?t:t.nodeType?[t]:[]:null:t?t===window||t===document?t:"string"==typeof t?!!document.querySelector&&document.querySelector(t):Array.isArray(t)?t[0]:t.nodeType?t:null:null},N=0,E=T.Linear.None,B=function(){function t(t,e){return this._chainedTweensCount=0,this.id=N++,!t||"object"!=typeof t||e||t.nodeType?t&&(t.nodeType||t.length||"string"==typeof t)&&(t=this.node=U(t),e=this.object=D(t,e,this)):(e=this.object=t,t=null),this._valuesEnd=null,this._valuesStart={},this._duration=1e3,this._easingFunction=E,this._easingReverse=E,this._interpolationFunction=k.Linear,this._startTime=0,this._initTime=0,this._delayTime=0,this._repeat=0,this._r=0,this._isPlaying=!1,this._yoyo=!1,this._reversed=!1,this._onStartCallbackFired=!1,this._pausedTime=null,this._isFinite=!0,this._maxListener=15,this._prevTime=null,this}return t.fromTo=function(e,r,n,i){void 0===i&&(i={}),i.quickRender=i.quickRender?i.quickRender:!n;var o=new t(e,r).to(n,i);return i.quickRender&&(o.render().update(o._startTime),o._rendered=!1,o._onStartCallbackFired=!1),o},t.to=function(e,r,n){return t.fromTo(e,null,r,n)},t.from=function(e,r,n){return t.fromTo(e,r,null,n)},t.prototype.setMaxListener=function(t){return void 0===t&&(t=15),this._maxListener=t,this},t.prototype.on=function(t,e){for(var r=this._maxListener,n=t+"Callback",i=0;i<r;i++){var o=n+i;if(!this[o]){this[o]=e;break}}return this},t.prototype.once=function(t,e){return this},t.prototype.off=function(t,e){for(var r=this._maxListener,n=t+"Callback",i=0;i<r;i++){var o=n+i;this[o]===e&&(this[o]=null)}return this},t.prototype.emit=function(t,e,r,n,i){var o=this._maxListener,s=t+"Callback";if(!this[s+0])return this;for(var u=0;u<o;u++){var a=s+u;this[a]&&this[a](e,r,n,i)}return this},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isStarted=function(){return this._onStartCallbackFired},t.prototype.reverse=function(t){var e=this._reversed;return this._reversed=void 0!==t?t:!e,this},t.prototype.reversed=function(){return this._reversed},t.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,m(this),this._pausedTime=f(),this.emit("pause",this.object)):this},t.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=f()-this._pausedTime,this._initTime=this._startTime,v(this),this._pausedTime=f(),this.emit("play",this.object))},t.prototype.restart=function(t){return this._repeat=this._r,this.reassignValues(),v(this),this.emit("restart",this.object)},t.prototype.seek=function(t,e){var r=this,n=r._duration,i=(r._repeat,r._initTime),o=r._startTime,s=(r._delayTime,r._reversed),u=i+t;return this._isPlaying=!0,u<o&&o>=i&&(this._startTime-=n,this._reversed=!s),this.update(t,!1),this.emit("seek",t,this.object),e?this:this.pause()},t.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},t.prototype.to=function(t,e,r){if(void 0===e&&(e=1e3),this._valuesEnd=t,"number"==typeof e||"function"==typeof e)this._duration="function"==typeof e?e(this._duration):e;else if("object"==typeof e)for(var n in e)if("function"==typeof this[n]){var i=Array.isArray(e[n])?e[n]:[e[n]],o=i[0],s=void 0===o?null:o,u=i[1],a=void 0===u?null:u,f=i[2],h=void 0===f?null:f,c=i[3],l=void 0===c?null:c;this[n](s,a,h,l)}return this},t.prototype.render=function(){if(this._rendered)return this;var i=this,o=i._valuesStart,s=i._valuesEnd,u=i.object,a=i.node,f=i.InitialValues;if(C(u),C(s),a&&a.queueID&&L[a.queueID]){var h=L[a.queueID];if(h.propNormaliseRequired&&h.tween!==this){for(var c in s);h.normalisedProp=!0,h.propNormaliseRequired=!1}}a&&f&&(u&&0!==Object.keys(u).length?s&&0!==Object.keys(s).length||(s=this._valuesEnd=f(a,u)):u=this.object=D(a,f(a,s),this));for(var c in s){var l=u&&u[c]&&e(u[c]),p=s[c];if(!(b[c]&&b[c].init&&(b[c].init.call(this,l,p,c,u),void 0===l&&o[c]&&(l=o[c]),b[c].skipProcess))&&!("number"==typeof l&&isNaN(l)||null===l||null===p||!1===l||!1===p||void 0===l||void 0===p||l===p)){if(Array.isArray(p)&&!Array.isArray(l)){p.unshift(l);for(var y=0,d=p.length;y<d;y++)if("string"==typeof p[y]){for(var v=r(p[y]),_={length:v.length,isString:!0},m=0,g=v.length;m<g;m++)_[m]=v[m];p[y]=_}}o[c]=l,"number"==typeof l&&"string"==typeof p&&"="===p[1]||n(c,u,o,s)}}return t.Renderer&&this.node&&t.Renderer.init&&(t.Renderer.init.call(this,u,o,s),this.__render=!0),this},t.prototype.start=function(t){return this._startTime=void 0!==t?"string"==typeof t?f()+parseFloat(t):t:f(),this._startTime+=this._delayTime,this._initTime=this._prevTime=this._startTime,this._onStartCallbackFired=!1,this._rendered=!1,this._isPlaying=!0,v(this),this},t.prototype.stop=function(){var t=this,e=t._isPlaying,r=t._isFinite,n=t.object,i=t._startTime,o=(t._delayTime,t._duration),s=t._r,u=t._yoyo,a=t._reversed;if(!e)return this;var f=r?(s+1)%2==1:!a;return this._reversed=!1,u&&f?this.update(i):this.update(i+o),m(this),this.emit("stop",n)},t.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this},t.prototype.chainedTweens=function(){if(this._chainedTweensCount=arguments.length,!this._chainedTweensCount)return this;for(var t=0,e=this._chainedTweensCount;t<e;t++)this["_chainedTweens"+t]=arguments[t];return this},t.prototype.repeat=function(t){return this._repeat=this._duration?"function"==typeof t?t(this._repeat):t:0,this._r=this._repeat,this._isFinite=isFinite(t),this},t.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},t.prototype.yoyo=function(t,e){return this._yoyo="function"==typeof t?t(this._yoyo):null===t?this._yoyo:t,t||(this._reversed=!1),this._easingReverse=e||null,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return"function"==typeof t&&(this._interpolationFunction=t),this},t.prototype.reassignValues=function(t){var e=this,r=e._valuesStart,n=e.object,i=e._delayTime;this._isPlaying=!0,this._startTime=void 0!==t?t:f(),this._startTime+=i,this._reversed=!1,v(this);for(var o in r){var s=r[o];n[o]=s}return this},t.prototype.update=function(e,r,n){var o,s,u,a=this,h=a._onStartCallbackFired,c=a._easingFunction,l=a._interpolationFunction,p=a._easingReverse,y=a._repeat,d=a._delayTime,v=a._reverseDelayTime,_=a._yoyo,g=a._reversed,T=a._startTime,j=a._prevTime,w=a._duration,A=a._valuesStart,I=a._valuesEnd,O=a.object,R=a._isFinite,P=a._isPlaying,F=a.__render,S=a._chainedTweensCount,q=0;if(w){var C=(e=void 0!==e?e:f())-j;if(this._prevTime=e,C>250&&(e-=C-50/3),!P||e<T&&!n)return!0;o=(o=(e-T)/w)>1?1:o,o=g?1-o:o}else o=1,y=0;if(h||(this._rendered||(this.render(),this._rendered=!0),this.emit("start",O),this._onStartCallbackFired=!0),s=g?p||c:c,!O)return!0;for(u in I){var x=A[u];if(void 0!==x&&null!==x||b[u]&&b[u].update){var L=I[u],D=s[u]?s[u](o):"function"==typeof s?s(o):E(o),U=l[u]?l[u]:"function"==typeof l?l:k.Linear;"number"==typeof L?O[u]=((x+(L-x)*D)*M|0)/M:Array.isArray(L)&&!Array.isArray(x)?O[u]=U(L,D,O[u]):L&&L.update?L.update(D):"function"==typeof L?O[u]=L(D):"string"==typeof L&&"number"==typeof x?O[u]=x+parseFloat(L[0]+L.substr(2))*D:i(u,O,A,I,D,o),b[u]&&b[u].update&&b[u].update.call(this,O[u],x,L,D,o),q++}}if(!q)return m(this),!1;if(F&&t.Renderer&&t.Renderer.update&&t.Renderer.update.call(this,O,o),this.emit("update",O,o,e),1===o||g&&0===o){if(y>0&&w>0){if(R&&this._repeat--,_)this._reversed=!g;else for(u in I)"string"==typeof(L=I[u])&&"number"==typeof A[u]&&(A[u]+=parseFloat(L[0]+L.substr(2)));return this.emit(_&&!g?"reverse":"repeat",O),this._startTime=g&&v?e-v:e+d,!0}if(r||(this._isPlaying=!1,m(this),N--),this.emit("complete",O),this._repeat=this._r,S)for(var B=0;B<S;B++)this["_chainedTweens"+B].start(e+w);return!1}return!0},t}();t.Plugins=b,t.Selector=U,t.Interpolator=function(t,e){var o=Array.isArray(t),s="string"==typeof t?t:o?t.slice():Object.assign({},t);if(o)for(var u=0,a=t.length;u<a;u++)n(u,s,t,e);else if("object"==typeof t)for(var u in t)n(u,s,t,e);else if("string"==typeof t){for(t=r(t),e=r(e),u=1;u<t.length;)t[u]===e[u]&&"string"==typeof t[u-1]?(t.splice(u-1,2,t[u-1]+t[u]),e.splice(u-1,2,e[u-1]+e[u])):u++;for(var f={isString:!0,length:t.length};u<f.length;)f[u]=t[u],u++}return function(r){if(o)for(var n=0,u=t.length;n<u;n++)i(n,s,t,e,r);else if("object"==typeof s)for(var n in t)i(n,s,t,e,r);else"string"==typeof s&&(s=i(0,0,t,e,r,r,!0));return s}},t.onTick=function(t){return h.push({update:t})},t.has=function(t){return null!==_(t)},t.get=_,t.getAll=function(){return h},t.removeAll=function(){h.length=0},t.remove=m,t.add=v,t.now=f,t.update=g,t.autoPlay=function(t){l=t},t.isRunning=function(){return c},t.Tween=B,t.Easing=T,t.Interpolation=k,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TWEEN={})}(this,function(t){"use strict";function e(t){if(t&&t.nodeType||void 0===t||"object"!=typeof t)return t;if(Array.isArray(t))return[].concat(t);if("object"==typeof t){var r={};for(var n in t)r[n]=e(t[n]);return r}return t}function r(t){return"string"!=typeof t?t:t.replace(I,O).match(w).map(function(t){return A(t)?t:+t})}function n(t,e,i,o,s){var u=i[t],a=o[t];if("string"==typeof u||"string"==typeof a){for(var f=Array.isArray(u)&&u[0]===j?u:r(u),h=Array.isArray(a)&&a[0]===j?a:r(a),c=1;c<f.length;)f[c]===h[c]&&"string"==typeof f[c-1]?(f.splice(c-1,2,f[c-1]+f[c]),h.splice(c-1,2,h[c-1]+h[c])):c++;c=0,f[0]===j&&f.shift(),h[0]===j&&h.shift();for(var l={isString:!0,length:f.length},p={isString:!0,length:h.length};c<l.length;)l[c]=f[c],p[c]=h[c],c++;return i[t]=l,o[t]=p,!0}if("object"==typeof u&&"object"==typeof a){if(Array.isArray(u))return u.map(function(r,i){return n(i,e[t],u,a)});for(var y in a)n(y,e[t],u,a);return!0}return!1}function i(t,e,r,n,o,s,u){var a=u?r:r[t],f=u?n:n[t];if(void 0===f)return a;if(void 0===a||"string"==typeof a||a===f)return f;if("object"==typeof a&&"object"==typeof f){if(!a||!f)return e[t];if("object"==typeof a&&a&&a.isString){for(var h="",c=0,l=a.length;c<l;c++){var p="number"==typeof a[c]&&"string"==typeof f[c]&&"="===f[c][1],y="number"!=typeof a[c]?a[c]:((p?a[c]+parseFloat(f[c][0]+f[c].substr(2))*o:a[c]+(f[c]-a[c])*o)*M|0)/M;(P(a,c)||P(a,c,R))&&(y|=0),h+=y,p&&1===s&&(a[c]=a[c]+parseFloat(f[c][0]+f[c].substr(2)))}return u||(e[t]=h),h}if(Array.isArray(a)&&a[0]!==j)for(var c=0,l=a.length;c<l;c++)a[c]!==f[c]&&i(c,e[t],a,f,o,s);else if("object"==typeof a&&a&&!a.isString)for(var c in a)a[c]!==f[c]&&i(c,e[t],a,f,o,s)}else if("number"==typeof a){p="string"==typeof f;e[t]=((p?a+parseFloat(f[0]+f.substr(2))*o:a+(f-a)*o)*M|0)/M,p&&1===s&&(r[t]=e[t])}else"function"==typeof f&&(e[t]=f(o));return e[t]}var o,s="undefined"!=typeof window?window:"undefined"!=typeof global?global:this,u=s.requestAnimationFrame||function(t){return s.setTimeout(t,16)},a=s.cancelAnimationFrame||function(t){return s.clearTimeout(t)},f=function(){if("undefined"==typeof process||void 0===process.hrtime||process.versions&&void 0!==process.versions.electron){if(void 0!==s.performance&&void 0!==s.performance.now)return s.performance.now.bind(s.performance);var t=s.performance&&s.performance.timing&&s.performance.timing.navigationStart?s.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}}(),h=[],c=!1,l=!1,p=u,y=a,d=0,v=function(t){var e=h.indexOf(t);e>-1&&h.splice(e,1),h.push(t),d=0,l&&!c&&(o=p(g),c=!0)},_=function(t){for(var e=0;e<h.length;e++)if(t===h[e])return h[e];return null},m=function(t){var e=h.indexOf(t);-1!==e&&h.splice(e,1)},g=function(t,e){if(t=void 0!==t?t:f(),l&&c&&(o=p(g)),h.length||d++,d>120)return y(o),c=!1,d=0,!1;for(var r=0;r<h.length;)h[r++].update(t,e);return!0},b={},T={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-T.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*T.Bounce.In(2*t):.5*T.Bounce.Out(2*t-1)+.5}},Stepped:{steps:function(t){return function(e){return(e*t|0)/t}}}},j="STRING_PROP",w=/\s+|([A-Za-z?().,{}:""[\]#\%]+)|([-+]=+)?([-+]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]=?\d+)?/g,A=function(t){return isNaN(+t)||("+"===t[0]||"-"===t[0])&&"="===t[1]||""===t||" "===t},I=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,O=function(t,e){var r,n,i;3===e.length&&(e=(r=e[0])+r+(n=e[1])+n+(i=e[2])+i);var o=parseInt(e,16);return r=o>>16&255,n=o>>8&255,i=255&o,"rgb("+r+","+n+","+i+")"},M=Math.pow(10,4),R="rgba(",P=function(t,e,r){return void 0===r&&(r="rgb("),"number"==typeof t[e]&&(t[e-1]===r||t[e-3]===r||t[e-5]===r)},F=/([.\[])/g,S=/\]/g,q=function(t,e){var r=t[e],n=e.replace(S,"").split(F),i=n.length-1,o=Array.isArray(t),s="object"==typeof t&&!o;return s?(t[e]=null,delete t[e]):o&&t.splice(e,1),n.reduce(function(t,e,u){o&&"."!==e&&"["!==e&&(e*=1);var a="["===n[u+1];if("."===e||"["===e)return"."===e?(s=!0,o=!1):"["===e&&(s=!1,o=!0),t;if(void 0===t[e]){if(o||s)return t[e]=u===i?r:o||a?[]:s?{}:null,s=o=!1,t[e]}else if(void 0!==t[e])return u===i&&(t[e]=r),t[e];return t},t)},C=function(t){if("object"==typeof t&&t)for(var e in t)if(-1!==e.indexOf(".")||-1!==e.indexOf("["))q(t,e);else if("object"==typeof t[e]&&t[e]){var r=t[e];for(var n in r)if(-1!==n.indexOf(".")||-1!==n.indexOf("["))q(r,n);else if("object"==typeof r[n]&&r[n]){var i=r[n];for(var o in i)-1===o.indexOf(".")&&-1===o.indexOf("[")||q(i,o)}}return t},k={Linear:function(t,e,r){var n=t.length-1,i=n*e,o=Math.floor(i),s=k.Utils.Linear;return e<0?s(t[0],t[1],i,r):e>1?s(t[n],t[n-1],n-i,r):s(t[o],t[o+1>n?n:o+1],i-o,r)},Bezier:function(t,e,r){for(var n=k.Utils.Reset(r),i=t.length-1,o=Math.pow,s=k.Utils.Bernstein,u=Array.isArray(n),a=0;a<=i;a++)if("number"==typeof n)n+=o(1-e,i-a)*o(e,a)*t[a]*s(i,a);else if(u)for(var f=0,h=n.length;f<h;f++)"number"==typeof n[f]?n[f]+=o(1-e,i-a)*o(e,a)*t[a][f]*s(i,a):n[f]=t[a][f];else if("object"==typeof n)for(var f in n)"number"==typeof n[f]?n[f]+=o(1-e,i-a)*o(e,a)*t[a][f]*s(i,a):n[f]=t[a][f];else if("string"==typeof n){for(var c="",l=Math.round(i*e),p=t[l],y=1,h=p.length;y<h;y++)c+=p[y];return c}return n},CatmullRom:function(t,e,r){var n=t.length-1,i=n*e,o=Math.floor(i),s=k.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),s(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o,r)):e<0?s(t[1],t[1],t[0],t[0],-e,r):e>1?s(t[n-1],t[n-1],t[n],t[n],(0|e)-e,r):s(t[o?o-1:0],t[o],t[n<o+1?n:o+1],t[n<o+2?n:o+2],i-o,r)},Utils:{Linear:function(t,e,r,n){if("string"==typeof t)return e;if("number"==typeof t)return"function"==typeof t?t(r):t+(e-t)*r;if("object"==typeof t){if(void 0!==t.length){if(t[0]===j){for(var i="",o=1,s=t.length;o<s;o++){var u="number"==typeof t[o]?t[o]+(e[o]-t[o])*r:e[o];(P(t,o)||P(t,o,R))&&(u|=0),i+=u}return i}for(var a=0,s=n.length;a<s;a++)n[a]=k.Utils.Linear(t[a],e[a],r,n[a])}else for(var a in n)n[a]=k.Utils.Linear(t[a],e[a],r,n[a]);return n}},Reset:function(t){if(Array.isArray(t)){for(var e=0,r=t.length;e<r;e++)t[e]=k.Utils.Reset(t[e]);return t}if("object"==typeof t){for(var e in t)t[e]=k.Utils.Reset(t[e]);return t}return"number"==typeof t?0:t},Bernstein:function(t,e){var r=k.Utils.Factorial;return r(t)/r(e)/r(t-e)},Factorial:function(){var t=[1];return function(e){var r=1;if(t[e])return t[e];for(var n=e;n>1;n--)r*=n;return t[e]=r,r}}(),CatmullRom:function(t,e,r,n,i,o){if("string"==typeof t)return e;if("number"==typeof t){var s=.5*(r-t),u=.5*(n-e),a=i*i;return(2*e-2*r+s+u)*(i*a)+(-3*e+3*r-2*s-u)*a+s*i+e}if("object"==typeof t){if(void 0!==t.length){if(t[0]===j){for(var f="",h=1,c=t.length;h<c;h++){var l="number"==typeof t[h]?k.Utils.CatmullRom(t[h],e[h],r[h],n[h],i):n[h];(P(t,h)||P(t,h,R))&&(l|=0),f+=l}return f}for(var p=0,c=o.length;p<c;p++)o[p]=k.Utils.CatmullRom(t[p],e[p],r[p],n[p],i,o[p])}else for(var p in o)o[p]=k.Utils.CatmullRom(t[p],e[p],r[p],n[p],i,o[p]);return o}}}},x=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},L={},D=function(t,e,r){if(!t||!t.nodeType)return e;var n=t.queueID||"q_"+Date.now();t.queueID||(t.queueID=n);var i=L[n];if(i){if(i.object===e&&t===i.tween.node&&r._startTime===i.tween._startTime)m(i.tween);else if("object"==typeof e&&e&&i.object){for(var o in e)o in i.object&&(r._startTime===i.tween._startTime?delete i.object[o]:i.propNormaliseRequired=!0);i.object=x({},i.object,e)}return i.object}return"object"==typeof e&&e?(L[n]={tween:r,object:e,propNormaliseRequired:!1},L[n].object):e},U=function(t,e){return e?t?t===window||t===document?[t]:"string"==typeof t?!!document.querySelectorAll&&document.querySelectorAll(t):Array.isArray(t)?t:t.nodeType?[t]:[]:null:t?t===window||t===document?t:"string"==typeof t?!!document.querySelector&&document.querySelector(t):Array.isArray(t)?t[0]:t.nodeType?t:null:null},N=0,E=T.Linear.None,B=function(){function t(t,e){return this._chainedTweensCount=0,this.id=N++,!t||"object"!=typeof t||e||t.nodeType?t&&(t.nodeType||t.length||"string"==typeof t)&&(t=this.node=U(t),e=this.object=D(t,e,this)):(e=this.object=t,t=null),this._valuesEnd=null,this._valuesStart={},this._duration=1e3,this._easingFunction=E,this._easingReverse=E,this._interpolationFunction=k.Linear,this._startTime=0,this._initTime=0,this._delayTime=0,this._repeat=0,this._r=0,this._isPlaying=!1,this._yoyo=!1,this._reversed=!1,this._onStartCallbackFired=!1,this._pausedTime=null,this._isFinite=!0,this._maxListener=15,this._prevTime=null,this}return t.fromTo=function(e,r,n,i){void 0===i&&(i={}),i.quickRender=i.quickRender?i.quickRender:!n;var o=new t(e,r).to(n,i);return i.quickRender&&(o.render().update(o._startTime),o._rendered=!1,o._onStartCallbackFired=!1),o},t.to=function(e,r,n){return t.fromTo(e,null,r,n)},t.from=function(e,r,n){return t.fromTo(e,r,null,n)},t.prototype.setMaxListener=function(t){return void 0===t&&(t=15),this._maxListener=t,this},t.prototype.on=function(t,e){for(var r=this._maxListener,n=t+"Callback",i=0;i<r;i++){var o=n+i;if(!this[o]){this[o]=e;break}}return this},t.prototype.once=function(t,e){return this},t.prototype.off=function(t,e){for(var r=this._maxListener,n=t+"Callback",i=0;i<r;i++){var o=n+i;this[o]===e&&(this[o]=null)}return this},t.prototype.emit=function(t,e,r,n,i){var o=this._maxListener,s=t+"Callback";if(!this[s+0])return this;for(var u=0;u<o;u++){var a=s+u;this[a]&&this[a](e,r,n,i)}return this},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isStarted=function(){return this._onStartCallbackFired},t.prototype.reverse=function(t){var e=this._reversed;return this._reversed=void 0!==t?t:!e,this},t.prototype.reversed=function(){return this._reversed},t.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,m(this),this._pausedTime=f(),this.emit("pause",this.object)):this},t.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=f()-this._pausedTime,this._initTime=this._startTime,v(this),this._pausedTime=f(),this.emit("play",this.object))},t.prototype.restart=function(t){return this._repeat=this._r,this.reassignValues(),v(this),this.emit("restart",this.object)},t.prototype.seek=function(t,e){var r=this,n=r._duration,i=(r._repeat,r._initTime),o=r._startTime,s=(r._delayTime,r._reversed),u=i+t;return this._isPlaying=!0,u<o&&o>=i&&(this._startTime-=n,this._reversed=!s),this.update(t,!1),this.emit("seek",t,this.object),e?this:this.pause()},t.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},t.prototype.to=function(t,e,r){if(void 0===e&&(e=1e3),this._valuesEnd=t,"number"==typeof e||"function"==typeof e)this._duration="function"==typeof e?e(this._duration):e;else if("object"==typeof e)for(var n in e)if("function"==typeof this[n]){var i=Array.isArray(e[n])?e[n]:[e[n]],o=i[0],s=void 0===o?null:o,u=i[1],a=void 0===u?null:u,f=i[2],h=void 0===f?null:f,c=i[3],l=void 0===c?null:c;this[n](s,a,h,l)}return this},t.prototype.render=function(){if(this._rendered)return this;var i=this,o=i._valuesStart,s=i._valuesEnd,u=i.object,a=i.node,f=i.InitialValues;if(C(u),C(s),a&&a.queueID&&L[a.queueID]){var h=L[a.queueID];if(h.propNormaliseRequired&&h.tween!==this){for(var c in s);h.normalisedProp=!0,h.propNormaliseRequired=!1}}a&&f&&(u&&0!==Object.keys(u).length?s&&0!==Object.keys(s).length||(s=this._valuesEnd=f(a,u)):u=this.object=D(a,f(a,s),this));for(var c in s){var l=u&&u[c]&&e(u[c]),p=s[c];if(!(b[c]&&b[c].init&&(b[c].init.call(this,l,p,c,u),void 0===l&&o[c]&&(l=o[c]),b[c].skipProcess))&&!("number"==typeof l&&isNaN(l)||null===l||null===p||!1===l||!1===p||void 0===l||void 0===p||l===p)){if(Array.isArray(p)&&!Array.isArray(l)){p.unshift(l);for(var y=0,d=p.length;y<d;y++)if("string"==typeof p[y]){for(var v=r(p[y]),_={length:v.length,isString:!0},m=0,g=v.length;m<g;m++)_[m]=v[m];p[y]=_}}o[c]=l,"number"==typeof l&&"string"==typeof p&&"="===p[1]||n(c,u,o,s)}}return t.Renderer&&this.node&&t.Renderer.init&&(t.Renderer.init.call(this,u,o,s),this.__render=!0),this},t.prototype.start=function(t){return this._startTime=void 0!==t?"string"==typeof t?f()+parseFloat(t):t:f(),this._startTime+=this._delayTime,this._initTime=this._prevTime=this._startTime,this._onStartCallbackFired=!1,this._rendered=!1,this._isPlaying=!0,v(this),this},t.prototype.stop=function(){var t=this,e=t._isPlaying,r=t._isFinite,n=t.object,i=t._startTime,o=(t._delayTime,t._duration),s=t._r,u=t._yoyo,a=t._reversed;if(!e)return this;var f=r?(s+1)%2==1:!a;return this._reversed=!1,u&&f?this.update(i):this.update(i+o),m(this),this.emit("stop",n)},t.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this},t.prototype.chainedTweens=function(){if(this._chainedTweensCount=arguments.length,!this._chainedTweensCount)return this;for(var t=0,e=this._chainedTweensCount;t<e;t++)this["_chainedTweens"+t]=arguments[t];return this},t.prototype.repeat=function(t){return this._repeat=this._duration?"function"==typeof t?t(this._repeat):t:0,this._r=this._repeat,this._isFinite=isFinite(t),this},t.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},t.prototype.yoyo=function(t,e){return this._yoyo="function"==typeof t?t(this._yoyo):null===t?this._yoyo:t,t||(this._reversed=!1),this._easingReverse=e||null,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return"function"==typeof t&&(this._interpolationFunction=t),this},t.prototype.reassignValues=function(t){var e=this,r=e._valuesStart,n=e.object,i=e._delayTime;this._isPlaying=!0,this._startTime=void 0!==t?t:f(),this._startTime+=i,this._reversed=!1,v(this);for(var o in r){var s=r[o];n[o]=s}return this},t.prototype.update=function(e,r,n){var o,s,u,a=this,h=a._onStartCallbackFired,c=a._easingFunction,l=a._interpolationFunction,p=a._easingReverse,y=a._repeat,d=a._delayTime,v=a._reverseDelayTime,_=a._yoyo,g=a._reversed,T=a._startTime,j=a._prevTime,w=a._duration,A=a._valuesStart,I=a._valuesEnd,O=a.object,R=a._isFinite,P=a._isPlaying,F=a.__render,S=a._chainedTweensCount,q=0;if(w){var C=(e=void 0!==e?e:f())-j;if(this._prevTime=e,C>250&&(e-=C-50/3),!P||e<T&&!n)return!0;o=(o=(e-T)/w)>1?1:o,o=g?1-o:o}else o=1,y=0;if(h||(this._rendered||(this.render(),this._rendered=!0),this.emit("start",O),this._onStartCallbackFired=!0),s=g?p||c:c,!O)return!0;for(u in I){var x=A[u];if(void 0!==x&&null!==x||b[u]&&b[u].update){var L=I[u],D=s[u]?s[u](o):"function"==typeof s?s(o):E(o),U=l[u]?l[u]:"function"==typeof l?l:k.Linear;"number"==typeof L?O[u]=((x+(L-x)*D)*M|0)/M:Array.isArray(L)&&!Array.isArray(x)?O[u]=U(L,D,O[u]):L&&L.update?L.update(D):"function"==typeof L?O[u]=L(D):"string"==typeof L&&"number"==typeof x?O[u]=x+parseFloat(L[0]+L.substr(2))*D:i(u,O,A,I,D,o),b[u]&&b[u].update&&b[u].update.call(this,O[u],x,L,D,o,u),q++}}if(!q)return m(this),!1;if(F&&t.Renderer&&t.Renderer.update&&t.Renderer.update.call(this,O,o),this.emit("update",O,o,e),1===o||g&&0===o){if(y>0&&w>0){if(R&&this._repeat--,_)this._reversed=!g;else for(u in I)"string"==typeof(L=I[u])&&"number"==typeof A[u]&&(A[u]+=parseFloat(L[0]+L.substr(2)));return this.emit(_&&!g?"reverse":"repeat",O),this._startTime=g&&v?e-v:e+d,!0}if(r||(this._isPlaying=!1,m(this),N--),this.emit("complete",O),this._repeat=this._r,S)for(var B=0;B<S;B++)this["_chainedTweens"+B].start(e+w);return!1}return!0},t}();t.Plugins=b,t.Selector=U,t.Interpolator=function(t,e){var o=Array.isArray(t),s="string"==typeof t?t:o?t.slice():Object.assign({},t);if(o)for(var u=0,a=t.length;u<a;u++)n(u,s,t,e);else if("object"==typeof t)for(var u in t)n(u,s,t,e);else if("string"==typeof t){for(t=r(t),e=r(e),u=1;u<t.length;)t[u]===e[u]&&"string"==typeof t[u-1]?(t.splice(u-1,2,t[u-1]+t[u]),e.splice(u-1,2,e[u-1]+e[u])):u++;for(var f={isString:!0,length:t.length};u<f.length;)f[u]=t[u],u++}return function(r){if(o)for(var n=0,u=t.length;n<u;n++)i(n,s,t,e,r);else if("object"==typeof s)for(var n in t)i(n,s,t,e,r);else"string"==typeof s&&(s=i(0,0,t,e,r,r,!0));return s}},t.onTick=function(t){return h.push({update:t})},t.has=function(t){return null!==_(t)},t.get=_,t.getAll=function(){return h},t.removeAll=function(){h.length=0},t.remove=m,t.add=v,t.now=f,t.update=g,t.autoPlay=function(t){l=t},t.isRunning=function(){return c},t.Tween=B,t.Easing=T,t.Interpolation=k,Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "es6-tween", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"description": "ES6 implementation of amazing tween.js", | ||
@@ -5,0 +5,0 @@ "browser": "bundled/Tween.min.js", |
@@ -5,4 +5,4 @@ # es6-tween | ||
[![size](http://img.badgesize.io/http://unpkg.com/es6-tween?cache=false)](http://unpkg.com/es6-tween) | ||
[![gzipsize](http://img.badgesize.io/http://unpkg.com/es6-tween?compression=gzip&cache=false)](http://unpkg.com/es6-tween) | ||
[![size](https://img.badgesize.io/https://unpkg.com/es6-tween?cache=false)](https://unpkg.com/es6-tween) | ||
[![gzipsize](https://img.badgesize.io/https://unpkg.com/es6-tween?compression=gzip&cache=false)](https://unpkg.com/es6-tween) | ||
[![CDNJS](https://img.shields.io/cdnjs/v/es6-tween.svg)](https://cdnjs.com/libraries/es6-tween) | ||
@@ -192,3 +192,3 @@ [![jsdelivr](https://img.shields.io/badge/cdn-jsdelivr-brightgreen.svg)](https://cdn.jsdelivr.net/npm/es6-tween) [![unpkg](https://img.shields.io/badge/cdn-unpkg-brightgreen.svg)](https://unpkg.com/es6-tween) [![npmcdn](https://img.shields.io/badge/cdn-npmcdn-brightgreen.svg)](https://npmcdn.com/es6-tween) | ||
* [Wiki page](https://github.com/tweenjs/es6-tween/wiki) | ||
* [Tutorial](http://learningthreejs.com/blog/2011/08/17/tweenjs-for-smooth-animation/) using tween.js with three.js | ||
* [Tutorial](https://learningthreejs.com/blog/2011/08/17/tweenjs-for-smooth-animation/) using tween.js with three.js | ||
@@ -220,3 +220,3 @@ ## Compatiblity Testing | ||
[All contributors](http://github.com/tweenjs/es6-tween/contributors). | ||
[All contributors](https://github.com/tweenjs/es6-tween/contributors). | ||
@@ -223,0 +223,0 @@ ## Thanks to: |
@@ -639,3 +639,3 @@ import { add, now, Plugins, remove } from './core'; | ||
if (Plugins[property] && Plugins[property].update) { | ||
Plugins[property].update.call(this, object[property], start, end, value, elapsed); | ||
Plugins[property].update.call(this, object[property], start, end, value, elapsed, property); | ||
} | ||
@@ -642,0 +642,0 @@ propCount++; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
463579
37
4525