Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

es6-tween

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-tween - npm Package Compare versions

Comparing version 5.3.0 to 5.3.1

.idea/codeStyles/codeStyleConfig.xml

2

bundled/Tween.js

@@ -2019,3 +2019,3 @@ (function (global, factory) {

if (typeof end === 'number') {
object[property] = ((start + (end - start) * value) * DECIMAL | 0) / DECIMAL;
object[property] = start + (end - start) * value;
} else if (Array.isArray(end) && !Array.isArray(start)) {

@@ -2022,0 +2022,0 @@ object[property] = _interpolationFunctionCall(end, value, object[property]);

@@ -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 m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function f(i){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,r,n;e=i,n=o[r=t],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return i}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var u,s=t[Symbol.iterator]();!(n=(u=s.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var r="undefined"!=typeof window?window:"undefined"!=typeof global?global:this,i=r.requestAnimationFrame||function(t){return r.setTimeout(t,16)},C=function(){if("undefined"==typeof process||void 0===process.hrtime||process.versions&&void 0!==process.versions.electron){if(void 0!==r.performance&&void 0!==r.performance.now)return r.performance.now.bind(r.performance);var t=r.performance&&r.performance.timing&&r.performance.timing.navigationStart?r.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}}(),o=[],u=!1,s=!1,a=[],l=i,h=0,y=120,v=function(){for(var t=0;t<a.length;t++)a[t]()},p=function(t){var e=o.indexOf(t);-1<e&&o.splice(e,1),o.push(t),h=0,s&&!u?(l(_),u=!0):v()},d=function(t){for(var e=0;e<o.length;e++)if(t===o[e])return o[e];return null},x=function(t){var e=o.indexOf(t);-1!==e&&o.splice(e,1)},_=function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:C(),r=1<arguments.length?arguments[1]:void 0;if(y<=h)return h=0,u=!1;s&&u?l(t):v(),o.length||h++;for(var n=0,i=o.length;n<i;)o[n++].update(e,r),i>o.length&&n--,i=o.length;return!0},L={},g={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){return t*t*(2.70158*t-1.70158)},Out:function(t){return--t*t*(2.70158*t+1.70158)+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-g.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*g.Bounce.In(2*t):.5*g.Bounce.Out(2*t-1)+.5}},Stepped:{steps:function(e){return function(t){return(t*e|0)/e}}}},D="_chainedTweens",b="Callback",T="STRING_PROP",j=/\s+|([A-Za-z?().,{}:""[\]#%]+)|([-+]=+)?([-+]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]=?\d+)?/g;function k(t){if(t&&t.nodeType||void 0===t||"object"!==m(t))return t;if(Array.isArray(t))return[].concat(t);if("object"===m(t)){var e={};for(var r in t)e[r]=k(t[r]);return e}return t}var w=function(t){return isNaN(+t)||("+"===t[0]||"-"===t[0])&&"="===t[1]||""===t||" "===t},O=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,I=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"rgb("+(r=o>>16&255)+","+(n=o>>8&255)+","+(i=255&o)+")"};function A(t){return"string"!=typeof t?t:t.replace(O,I).match(j).map(function(t){return w(t)?t:+t})}function S(r,n,t,e,i){var o=t[r],u=e[r];if("string"==typeof o||"string"==typeof u){for(var s=Array.isArray(o)&&o[0]===T?o:A(o),a=Array.isArray(u)&&u[0]===T?u:A(u),f=1;f<s.length;)s[f]===a[f]&&"string"==typeof s[f-1]?(s.splice(f-1,2,s[f-1]+s[f]),a.splice(f-1,2,a[f-1]+a[f])):f++;s[f=0]===T&&s.shift(),a[0]===T&&a.shift();for(var l={isString:!0,length:s.length},h={isString:!0,length:a.length};f<l.length;)l[f]=s[f],h[f]=a[f],f++;return t[r]=l,e[r]=h,!0}if("object"===m(o)&&"object"===m(u)){if(Array.isArray(o))return o.map(function(t,e){return S(e,n[r],o,u)});for(var c in u)S(c,n[r],o,u);return!0}return!1}var E=Math.pow(10,4),M="rgba(",P=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"rgb(";return"number"==typeof t[e]&&(t[e-1]===r||t[e-3]===r||t[e-5]===r)};function U(t,e,r,n,i,o,u){var s=u?r:r[t],a=u?n:n[t];if(void 0===a)return s;if(void 0===s||"string"==typeof s||s===a)return a;if("object"===m(s)&&"object"===m(a)){if(!s||!a)return e[t];if("object"===m(s)&&s&&s.isString){for(var f="",l=0,h=s.length;l<h;l++){var c="number"==typeof s[l]&&"string"==typeof a[l]&&"="===a[l][1],y="number"!=typeof s[l]?s[l]:((c?s[l]+parseFloat(a[l][0]+a[l].substr(2))*i:s[l]+(a[l]-s[l])*i)*E|0)/E;(P(s,l)||P(s,l,M))&&(y|=0),f+=y,c&&1===o&&(s[l]=s[l]+parseFloat(a[l][0]+a[l].substr(2)))}return u||(e[t]=f),f}if(Array.isArray(s)&&s[0]!==T)for(var v=0,p=s.length;v<p;v++)s[v]!==a[v]&&U(v,e[t],s,a,i,o);else if("object"===m(s)&&s&&!s.isString)for(var d in s)s[d]!==a[d]&&U(d,e[t],s,a,i,o)}else if("number"==typeof s){var _="string"==typeof a;e[t]=((_?s+parseFloat(a[0]+a.substr(2))*i:s+(a-s)*i)*E|0)/E,_&&1===o&&(r[t]=e[t])}else"function"==typeof a&&(e[t]=a(i));return e[t]}var R,F=/([.[])/g,q=/\]/g,N=function(t,e){var i=t[e],o=e.replace(q,"").split(F),u=o.length-1,s=Array.isArray(t),a="object"===m(t)&&!s;return a?(t[e]=null,delete t[e]):s&&t.splice(e,1),o.reduce(function(t,e,r){s&&"."!==e&&"["!==e&&(e*=1);var n="["===o[r+1];if("."===e||"["===e)return"."===e?s=!(a=!0):"["===e&&(s=!(a=!1)),t;if(void 0===t[e]){if(s||a)return t[e]=r===u?i:s||n?[]:a?{}:null,a=s=!1,t[e]}else if(void 0!==t[e])return r===u&&(t[e]=i),t[e];return t},t)},B=function(t){if("object"===m(t)&&t)for(var e in t)if(-1!==e.indexOf(".")||-1!==e.indexOf("["))N(t,e);else if("object"===m(t[e])&&t[e]){var r=t[e];for(var n in r)if(-1!==n.indexOf(".")||-1!==n.indexOf("["))N(r,n);else if("object"===m(r[n])&&r[n]){var i=r[n];for(var o in i)-1===o.indexOf(".")&&-1===o.indexOf("[")||N(i,o)}}return t},Q={Linear:function(t,e,r){var n=t.length-1,i=n*e,o=Math.floor(i),u=Q.Utils.Linear;return e<0?u(t[0],t[1],i,r):1<e?u(t[n],t[n-1],n-i,r):u(t[o],t[n<o+1?n:o+1],i-o,r)},Bezier:function(t,e,r){for(var n=Q.Utils.Reset(r),i=t.length-1,o=Math.pow,u=Q.Utils.Bernstein,s=Array.isArray(n),a=0;a<=i;a++)if("number"==typeof n)n+=o(1-e,i-a)*o(e,a)*t[a]*u(i,a);else if(s)for(var f=0,l=n.length;f<l;f++)"number"==typeof n[f]?n[f]+=o(1-e,i-a)*o(e,a)*t[a][f]*u(i,a):n[f]=t[a][f];else if("object"===m(n))for(var h in n)"number"==typeof n[h]?n[h]+=o(1-e,i-a)*o(e,a)*t[a][h]*u(i,a):n[h]=t[a][h];else if("string"==typeof n){for(var c="",y=t[Math.round(i*e)],v=1,p=y.length;v<p;v++)c+=y[v];return c}return n},CatmullRom:function(t,e,r){var n=t.length-1,i=n*e,o=Math.floor(i),u=Q.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),u(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o,r)):e<0?u(t[1],t[1],t[0],t[0],-e,r):1<e?u(t[n-1],t[n-1],t[n],t[n],(0|e)-e,r):u(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"===m(t)){if(void 0!==t.length){if(t[0]===T){for(var i="",o=1,u=t.length;o<u;o++){var s="number"==typeof t[o]?t[o]+(e[o]-t[o])*r:e[o];(P(t,o)||P(t,o,M))&&(s|=0),i+=s}return i}for(var a=0,f=n.length;a<f;a++)n[a]=Q.Utils.Linear(t[a],e[a],r,n[a])}else for(var l in n)n[l]=Q.Utils.Linear(t[l],e[l],r,n[l]);return n}},Reset:function(t){if(Array.isArray(t)){for(var e=0,r=t.length;e<r;e++)t[e]=Q.Utils.Reset(t[e]);return t}if("object"===m(t)){for(var n in t)t[n]=Q.Utils.Reset(t[n]);return t}return"number"==typeof t?0:t},Bernstein:function(t,e){var r=Q.Utils.Factorial;return r(t)/r(e)/r(t-e)},Factorial:(R=[1],function(t){var e=1;if(R[t])return R[t];for(var r=t;1<r;r--)e*=r;return R[t]=e}),CatmullRom:function(t,e,r,n,i,o){if("string"==typeof t)return e;if("number"==typeof t){var u=.5*(r-t),s=.5*(n-e),a=i*i;return(2*e-2*r+u+s)*(i*a)+(-3*e+3*r-2*u-s)*a+u*i+e}if("object"===m(t)){if(void 0!==t.length){if(t[0]===T){for(var f="",l=1,h=t.length;l<h;l++){var c="number"==typeof t[l]?Q.Utils.CatmullRom(t[l],e[l],r[l],n[l],i):n[l];(P(t,l)||P(t,l,M))&&(c|=0),f+=c}return f}for(var y=0,v=o.length;y<v;y++)o[y]=Q.Utils.CatmullRom(t[y],e[y],r[y],n[y],i,o[y])}else for(var p in o)o[p]=Q.Utils.CatmullRom(t[p],e[p],r[p],n[p],i,o[p]);return o}}}},V={},z=function(t,e,r){if(!t||!t.nodeType)return e;var n=t.queueID||"q_"+Date.now();t.queueID||(t.queueID=n);var i=V[n];if(i){if(i.object===e&&t===i.tween.node&&r._startTime===i.tween._startTime)x(i.tween);else if("object"===m(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=f({},i.object,e)}return i.object}return"object"===m(e)&&e?(V[n]={tween:r,object:e,propNormaliseRequired:!1},V[n].object):e},G=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},W=0,Z=g.Linear.None,$=function(){function q(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,q),this.id=W++,!t||"object"!==m(t)||e||t.nodeType?t&&(t.nodeType||t.length||"string"==typeof t)&&(t=this.node=G(t),e=this.object=z(t,e,this)):(e=this.object=t,t=null),this._valuesEnd=null,this._valuesStart={},this._duration=1e3,this._easingFunction=Z,this._easingReverse=Z,this._interpolationFunction=Q.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._chainedTweensCount=0,this._prevTime=null,this}return e(q,null,[{key:"fromTo",value:function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};n.quickRender=n.quickRender?n.quickRender:!r;var i=new q(t,e).to(r,n);return n.quickRender&&(i.render().update(i._startTime),i._rendered=!1,i._onStartCallbackFired=!1),i}},{key:"to",value:function(t,e,r){return q.fromTo(t,null,e,r)}},{key:"from",value:function(t,e,r){return q.fromTo(t,e,null,r)}}]),e(q,[{key:"setMaxListener",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:15;return this._maxListener=t,this}},{key:"on",value:function(t,e){for(var r=this._maxListener,n=t+b,i=0;i<r;i++){var o=n+i;if(!this[o]){this[o]=e;break}}return this}},{key:"once",value:function(t,e){return this}},{key:"off",value:function(t,e){for(var r=this._maxListener,n=t+b,i=0;i<r;i++){var o=n+i;this[o]===e&&(this[o]=null)}return this}},{key:"emit",value:function(t,e,r,n,i){var o=this._maxListener,u=t+b;if(!this[u+0])return this;for(var s=0;s<o;s++){var a=u+s;this[a]&&this[a](e,r,n,i)}return this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"isStarted",value:function(){return this._onStartCallbackFired}},{key:"reverse",value:function(t){var e=this._reversed;return this._reversed=void 0!==t?t:!e,this}},{key:"reversed",value:function(){return this._reversed}},{key:"pause",value:function(){return this._isPlaying?(this._isPlaying=!1,x(this),this._pausedTime=C(),this.emit("pause",this.object)):this}},{key:"play",value:function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=C()-this._pausedTime,this._initTime=this._startTime,p(this),this._pausedTime=C(),this.emit("play",this.object))}},{key:"restart",value:function(t){return this._repeat=this._r,this.reassignValues(),p(this),this.emit("restart",this.object)}},{key:"seek",value:function(t,e){var r=this._duration,n=this._initTime,i=this._startTime,o=this._reversed,u=n+t;return this._isPlaying=!0,u<i&&n<=i&&(this._startTime-=r,this._reversed=!o),this.update(t,!1),this.emit("seek",t,this.object),e?this:this.pause()}},{key:"duration",value:function(t){return this._duration="function"==typeof t?t(this._duration):t,this}},{key:"to",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e3;if(this._valuesEnd=t,"number"==typeof e||"function"==typeof e)this._duration="function"==typeof e?e(this._duration):e;else if("object"===m(e))for(var r in e)if("function"==typeof this[r]){var n=c(Array.isArray(e[r])?e[r]:[e[r]],4),i=n[0],o=void 0===i?null:i,u=n[1],s=void 0===u?null:u,a=n[2],f=void 0===a?null:a,l=n[3],h=void 0===l?null:l;this[r](o,s,f,h)}return this}},{key:"render",value:function(){if(this._rendered)return this;var t=this._valuesStart,e=this._valuesEnd,r=this.object,n=this.node,i=this.InitialValues;if(B(r),B(e),n&&n.queueID&&V[n.queueID]){var o=V[n.queueID];o.propNormaliseRequired&&o.tween!==this&&(o.normalisedProp=!0,o.propNormaliseRequired=!1)}for(var u in n&&i&&(r&&0!==Object.keys(r).length?e&&0!==Object.keys(e).length||(e=this._valuesEnd=i(n,r)):r=this.object=z(n,i(n,e),this)),e){var s=r&&r[u]&&k(r[u]),a=e[u];if(!(L[u]&&L[u].init&&(L[u].init.call(this,s,a,u,r),void 0===s&&t[u]&&(s=t[u]),L[u].skipProcess))&&!("number"==typeof s&&isNaN(s)||null===s||null===a||!1===s||!1===a||void 0===s||void 0===a||s===a)){if(Array.isArray(a)&&!Array.isArray(s)){a.unshift(s);for(var f=0,l=a.length;f<l;f++)if("string"==typeof a[f]){for(var h=A(a[f]),c={length:h.length,isString:!0},y=0,v=h.length;y<v;y++)c[y]=h[y];a[f]=c}}"number"==typeof(t[u]=s)&&"string"==typeof a&&"="===a[1]||S(u,r,t,e)}}return q.Renderer&&this.node&&q.Renderer.init&&(q.Renderer.init.call(this,r,t,e),this.__render=!0),this}},{key:"start",value:function(t){return this._startTime=void 0!==t?"string"==typeof t?C()+parseFloat(t):t:C(),this._startTime+=this._delayTime,this._initTime=this._prevTime=this._startTime,this._onStartCallbackFired=!1,this._rendered=!1,this._isPlaying=!0,p(this),this}},{key:"stop",value:function(){var t=this._isPlaying,e=this._isFinite,r=this.object,n=this._startTime,i=this._duration,o=this._r,u=this._yoyo,s=this._reversed;if(!t)return this;var a=e?(o+1)%2==1:!s;return this._reversed=!1,u&&a?this.update(n):this.update(n+i),x(this),this.emit("stop",r)}},{key:"delay",value:function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this}},{key:"chainedTweens",value:function(){if(this._chainedTweensCount=arguments.length,!this._chainedTweensCount)return this;for(var t=0,e=this._chainedTweensCount;t<e;t++)this[D+t]=arguments[t];return this}},{key:"repeat",value:function(t){return this._repeat=this._duration?"function"==typeof t?t(this._repeat):t:0,this._r=this._repeat,this._isFinite=isFinite(t),this}},{key:"reverseDelay",value:function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this}},{key:"yoyo",value: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}},{key:"easing",value:function(t){return this._easingFunction=t,this}},{key:"interpolation",value:function(t){return"function"==typeof t&&(this._interpolationFunction=t),this}},{key:"reassignValues",value:function(t){var e=this._valuesStart,r=this.object,n=this._delayTime;for(var i in this._isPlaying=!0,this._startTime=void 0!==t?t:C(),this._startTime+=n,this._reversed=!1,p(this),e){var o=e[i];r[i]=o}return this}},{key:"update",value:function(t,e,r){var n,i,o,u=this._onStartCallbackFired,s=this._easingFunction,a=this._interpolationFunction,f=this._easingReverse,l=this._repeat,h=this._delayTime,c=this._reverseDelayTime,y=this._yoyo,v=this._reversed,p=this._startTime,d=this._prevTime,_=this._duration,m=this._valuesStart,g=this._valuesEnd,b=this.object,T=this._isFinite,j=this._isPlaying,k=this.__render,w=this._chainedTweensCount,O=0;if(_){var I=(t=void 0!==t?t:C())-d;if(this._prevTime=t,250<I&&(t-=I-50/3),!j||t<p&&!r)return!0;n=1<(n=(t-p)/_)?1:n,n=v?1-n:n}else n=1,l=0;if(u||(this._rendered||(this.render(),this._rendered=!0),this.emit("start",b),this._onStartCallbackFired=!0),i=v&&f||s,!b)return!0;for(o in g){var A=m[o];if(null!=A||L[o]&&L[o].update){var S=g[o],M=i[o]?i[o](n):"function"==typeof i?i(n):Z(n),P=a[o]?a[o]:"function"==typeof a?a:Q.Linear;"number"==typeof S?b[o]=((A+(S-A)*M)*E|0)/E:Array.isArray(S)&&!Array.isArray(A)?b[o]=P(S,M,b[o]):S&&S.update?S.update(M):"function"==typeof S?b[o]=S(M):"string"==typeof S&&"number"==typeof A?b[o]=A+parseFloat(S[0]+S.substr(2))*M:U(o,b,m,g,M,n),L[o]&&L[o].update&&L[o].update.call(this,b[o],A,S,M,n,o),O++}}if(!O)return x(this),!1;if(k&&q.Renderer&&q.Renderer.update&&q.Renderer.update.call(this,b,n),this.emit("update",b,n,t),1===n||v&&0===n){if(0<l&&0<_){if(T&&this._repeat--,y)this._reversed=!v;else for(o in g){var R=g[o];"string"==typeof R&&"number"==typeof m[o]&&(m[o]+=parseFloat(R[0]+R.substr(2)))}return this.emit(y&&!v?"reverse":"repeat",b),this._startTime=v&&c?t-c:t+h,!0}if(e||(this._isPlaying=!1,x(this),W--),this.emit("complete",b),this._repeat=this._r,w)for(var F=0;F<w;F++)this[D+F].start(t+_);return!1}return!0}}]),q}();t.Plugins=L,t.Selector=G,t.Interpolator=function(i,o){var u=Array.isArray(i),s="string"==typeof i?i:u?i.slice():f({},i);if(u)for(var t=0,e=i.length;t<e;t++)S(t,s,i,o);else if("object"===m(i))for(var r in i)S(r,s,i,o);else if("string"==typeof i){i=A(i),o=A(o);for(var n=1;n<i.length;)i[n]===o[n]&&"string"==typeof i[n-1]?(i.splice(n-1,2,i[n-1]+i[n]),o.splice(n-1,2,o[n-1]+o[n])):n++;for(var a={isString:!0,length:i.length};n<a.length;)a[n]=i[n],n++}return function(t){if(u)for(var e=0,r=i.length;e<r;e++)U(e,s,i,o,t);else if("object"===m(s))for(var n in i)U(n,s,i,o,t);else"string"==typeof s&&(s=U(0,0,i,o,t,t,!0));return s}},t.onTick=function(t){return o.push({update:t})},t.has=function(t){return null!==d(t)},t.get=d,t.getAll=function(){return o},t.removeAll=function(){o.length=0},t.remove=x,t.add=p,t.now=C,t.update=_,t.autoPlay=function(t){s=t},t.isRunning=function(){return u},t.onRequestTick=function(t){a.push(t)},t.FrameThrottle=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:120;y=t},t.Tween=$,t.Easing=g,t.Interpolation=Q,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 m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function f(i){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,r,n;e=i,n=o[r=t],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return i}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var u,s=t[Symbol.iterator]();!(n=(u=s.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var r="undefined"!=typeof window?window:"undefined"!=typeof global?global:this,i=r.requestAnimationFrame||function(t){return r.setTimeout(t,16)},C=function(){if("undefined"==typeof process||void 0===process.hrtime||process.versions&&void 0!==process.versions.electron){if(void 0!==r.performance&&void 0!==r.performance.now)return r.performance.now.bind(r.performance);var t=r.performance&&r.performance.timing&&r.performance.timing.navigationStart?r.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}}(),o=[],u=!1,s=!1,a=[],l=i,h=0,y=120,v=function(){for(var t=0;t<a.length;t++)a[t]()},p=function(t){var e=o.indexOf(t);-1<e&&o.splice(e,1),o.push(t),h=0,s&&!u?(l(_),u=!0):v()},d=function(t){for(var e=0;e<o.length;e++)if(t===o[e])return o[e];return null},x=function(t){var e=o.indexOf(t);-1!==e&&o.splice(e,1)},_=function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:C(),r=1<arguments.length?arguments[1]:void 0;if(y<=h)return h=0,u=!1;s&&u?l(t):v(),o.length||h++;for(var n=0,i=o.length;n<i;)o[n++].update(e,r),i>o.length&&n--,i=o.length;return!0},L={},g={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){return t*t*(2.70158*t-1.70158)},Out:function(t){return--t*t*(2.70158*t+1.70158)+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-g.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*g.Bounce.In(2*t):.5*g.Bounce.Out(2*t-1)+.5}},Stepped:{steps:function(e){return function(t){return(t*e|0)/e}}}},D="_chainedTweens",b="Callback",T="STRING_PROP",j=/\s+|([A-Za-z?().,{}:""[\]#%]+)|([-+]=+)?([-+]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]=?\d+)?/g;function k(t){if(t&&t.nodeType||void 0===t||"object"!==m(t))return t;if(Array.isArray(t))return[].concat(t);if("object"===m(t)){var e={};for(var r in t)e[r]=k(t[r]);return e}return t}var w=function(t){return isNaN(+t)||("+"===t[0]||"-"===t[0])&&"="===t[1]||""===t||" "===t},O=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,I=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"rgb("+(r=o>>16&255)+","+(n=o>>8&255)+","+(i=255&o)+")"};function A(t){return"string"!=typeof t?t:t.replace(O,I).match(j).map(function(t){return w(t)?t:+t})}function S(r,n,t,e,i){var o=t[r],u=e[r];if("string"==typeof o||"string"==typeof u){for(var s=Array.isArray(o)&&o[0]===T?o:A(o),a=Array.isArray(u)&&u[0]===T?u:A(u),f=1;f<s.length;)s[f]===a[f]&&"string"==typeof s[f-1]?(s.splice(f-1,2,s[f-1]+s[f]),a.splice(f-1,2,a[f-1]+a[f])):f++;s[f=0]===T&&s.shift(),a[0]===T&&a.shift();for(var l={isString:!0,length:s.length},h={isString:!0,length:a.length};f<l.length;)l[f]=s[f],h[f]=a[f],f++;return t[r]=l,e[r]=h,!0}if("object"===m(o)&&"object"===m(u)){if(Array.isArray(o))return o.map(function(t,e){return S(e,n[r],o,u)});for(var c in u)S(c,n[r],o,u);return!0}return!1}var M=Math.pow(10,4),P="rgba(",R=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"rgb(";return"number"==typeof t[e]&&(t[e-1]===r||t[e-3]===r||t[e-5]===r)};function E(t,e,r,n,i,o,u){var s=u?r:r[t],a=u?n:n[t];if(void 0===a)return s;if(void 0===s||"string"==typeof s||s===a)return a;if("object"===m(s)&&"object"===m(a)){if(!s||!a)return e[t];if("object"===m(s)&&s&&s.isString){for(var f="",l=0,h=s.length;l<h;l++){var c="number"==typeof s[l]&&"string"==typeof a[l]&&"="===a[l][1],y="number"!=typeof s[l]?s[l]:((c?s[l]+parseFloat(a[l][0]+a[l].substr(2))*i:s[l]+(a[l]-s[l])*i)*M|0)/M;(R(s,l)||R(s,l,P))&&(y|=0),f+=y,c&&1===o&&(s[l]=s[l]+parseFloat(a[l][0]+a[l].substr(2)))}return u||(e[t]=f),f}if(Array.isArray(s)&&s[0]!==T)for(var v=0,p=s.length;v<p;v++)s[v]!==a[v]&&E(v,e[t],s,a,i,o);else if("object"===m(s)&&s&&!s.isString)for(var d in s)s[d]!==a[d]&&E(d,e[t],s,a,i,o)}else if("number"==typeof s){var _="string"==typeof a;e[t]=((_?s+parseFloat(a[0]+a.substr(2))*i:s+(a-s)*i)*M|0)/M,_&&1===o&&(r[t]=e[t])}else"function"==typeof a&&(e[t]=a(i));return e[t]}var F,q=/([.[])/g,U=/\]/g,N=function(t,e){var i=t[e],o=e.replace(U,"").split(q),u=o.length-1,s=Array.isArray(t),a="object"===m(t)&&!s;return a?(t[e]=null,delete t[e]):s&&t.splice(e,1),o.reduce(function(t,e,r){s&&"."!==e&&"["!==e&&(e*=1);var n="["===o[r+1];if("."===e||"["===e)return"."===e?s=!(a=!0):"["===e&&(s=!(a=!1)),t;if(void 0===t[e]){if(s||a)return t[e]=r===u?i:s||n?[]:a?{}:null,a=s=!1,t[e]}else if(void 0!==t[e])return r===u&&(t[e]=i),t[e];return t},t)},B=function(t){if("object"===m(t)&&t)for(var e in t)if(-1!==e.indexOf(".")||-1!==e.indexOf("["))N(t,e);else if("object"===m(t[e])&&t[e]){var r=t[e];for(var n in r)if(-1!==n.indexOf(".")||-1!==n.indexOf("["))N(r,n);else if("object"===m(r[n])&&r[n]){var i=r[n];for(var o in i)-1===o.indexOf(".")&&-1===o.indexOf("[")||N(i,o)}}return t},Q={Linear:function(t,e,r){var n=t.length-1,i=n*e,o=Math.floor(i),u=Q.Utils.Linear;return e<0?u(t[0],t[1],i,r):1<e?u(t[n],t[n-1],n-i,r):u(t[o],t[n<o+1?n:o+1],i-o,r)},Bezier:function(t,e,r){for(var n=Q.Utils.Reset(r),i=t.length-1,o=Math.pow,u=Q.Utils.Bernstein,s=Array.isArray(n),a=0;a<=i;a++)if("number"==typeof n)n+=o(1-e,i-a)*o(e,a)*t[a]*u(i,a);else if(s)for(var f=0,l=n.length;f<l;f++)"number"==typeof n[f]?n[f]+=o(1-e,i-a)*o(e,a)*t[a][f]*u(i,a):n[f]=t[a][f];else if("object"===m(n))for(var h in n)"number"==typeof n[h]?n[h]+=o(1-e,i-a)*o(e,a)*t[a][h]*u(i,a):n[h]=t[a][h];else if("string"==typeof n){for(var c="",y=t[Math.round(i*e)],v=1,p=y.length;v<p;v++)c+=y[v];return c}return n},CatmullRom:function(t,e,r){var n=t.length-1,i=n*e,o=Math.floor(i),u=Q.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),u(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o,r)):e<0?u(t[1],t[1],t[0],t[0],-e,r):1<e?u(t[n-1],t[n-1],t[n],t[n],(0|e)-e,r):u(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"===m(t)){if(void 0!==t.length){if(t[0]===T){for(var i="",o=1,u=t.length;o<u;o++){var s="number"==typeof t[o]?t[o]+(e[o]-t[o])*r:e[o];(R(t,o)||R(t,o,P))&&(s|=0),i+=s}return i}for(var a=0,f=n.length;a<f;a++)n[a]=Q.Utils.Linear(t[a],e[a],r,n[a])}else for(var l in n)n[l]=Q.Utils.Linear(t[l],e[l],r,n[l]);return n}},Reset:function(t){if(Array.isArray(t)){for(var e=0,r=t.length;e<r;e++)t[e]=Q.Utils.Reset(t[e]);return t}if("object"===m(t)){for(var n in t)t[n]=Q.Utils.Reset(t[n]);return t}return"number"==typeof t?0:t},Bernstein:function(t,e){var r=Q.Utils.Factorial;return r(t)/r(e)/r(t-e)},Factorial:(F=[1],function(t){var e=1;if(F[t])return F[t];for(var r=t;1<r;r--)e*=r;return F[t]=e}),CatmullRom:function(t,e,r,n,i,o){if("string"==typeof t)return e;if("number"==typeof t){var u=.5*(r-t),s=.5*(n-e),a=i*i;return(2*e-2*r+u+s)*(i*a)+(-3*e+3*r-2*u-s)*a+u*i+e}if("object"===m(t)){if(void 0!==t.length){if(t[0]===T){for(var f="",l=1,h=t.length;l<h;l++){var c="number"==typeof t[l]?Q.Utils.CatmullRom(t[l],e[l],r[l],n[l],i):n[l];(R(t,l)||R(t,l,P))&&(c|=0),f+=c}return f}for(var y=0,v=o.length;y<v;y++)o[y]=Q.Utils.CatmullRom(t[y],e[y],r[y],n[y],i,o[y])}else for(var p in o)o[p]=Q.Utils.CatmullRom(t[p],e[p],r[p],n[p],i,o[p]);return o}}}},V={},z=function(t,e,r){if(!t||!t.nodeType)return e;var n=t.queueID||"q_"+Date.now();t.queueID||(t.queueID=n);var i=V[n];if(i){if(i.object===e&&t===i.tween.node&&r._startTime===i.tween._startTime)x(i.tween);else if("object"===m(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=f({},i.object,e)}return i.object}return"object"===m(e)&&e?(V[n]={tween:r,object:e,propNormaliseRequired:!1},V[n].object):e},G=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},W=0,Z=g.Linear.None,$=function(){function q(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,q),this.id=W++,!t||"object"!==m(t)||e||t.nodeType?t&&(t.nodeType||t.length||"string"==typeof t)&&(t=this.node=G(t),e=this.object=z(t,e,this)):(e=this.object=t,t=null),this._valuesEnd=null,this._valuesStart={},this._duration=1e3,this._easingFunction=Z,this._easingReverse=Z,this._interpolationFunction=Q.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._chainedTweensCount=0,this._prevTime=null,this}return e(q,null,[{key:"fromTo",value:function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};n.quickRender=n.quickRender?n.quickRender:!r;var i=new q(t,e).to(r,n);return n.quickRender&&(i.render().update(i._startTime),i._rendered=!1,i._onStartCallbackFired=!1),i}},{key:"to",value:function(t,e,r){return q.fromTo(t,null,e,r)}},{key:"from",value:function(t,e,r){return q.fromTo(t,e,null,r)}}]),e(q,[{key:"setMaxListener",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:15;return this._maxListener=t,this}},{key:"on",value:function(t,e){for(var r=this._maxListener,n=t+b,i=0;i<r;i++){var o=n+i;if(!this[o]){this[o]=e;break}}return this}},{key:"once",value:function(t,e){return this}},{key:"off",value:function(t,e){for(var r=this._maxListener,n=t+b,i=0;i<r;i++){var o=n+i;this[o]===e&&(this[o]=null)}return this}},{key:"emit",value:function(t,e,r,n,i){var o=this._maxListener,u=t+b;if(!this[u+0])return this;for(var s=0;s<o;s++){var a=u+s;this[a]&&this[a](e,r,n,i)}return this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"isStarted",value:function(){return this._onStartCallbackFired}},{key:"reverse",value:function(t){var e=this._reversed;return this._reversed=void 0!==t?t:!e,this}},{key:"reversed",value:function(){return this._reversed}},{key:"pause",value:function(){return this._isPlaying?(this._isPlaying=!1,x(this),this._pausedTime=C(),this.emit("pause",this.object)):this}},{key:"play",value:function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=C()-this._pausedTime,this._initTime=this._startTime,p(this),this._pausedTime=C(),this.emit("play",this.object))}},{key:"restart",value:function(t){return this._repeat=this._r,this.reassignValues(),p(this),this.emit("restart",this.object)}},{key:"seek",value:function(t,e){var r=this._duration,n=this._initTime,i=this._startTime,o=this._reversed,u=n+t;return this._isPlaying=!0,u<i&&n<=i&&(this._startTime-=r,this._reversed=!o),this.update(t,!1),this.emit("seek",t,this.object),e?this:this.pause()}},{key:"duration",value:function(t){return this._duration="function"==typeof t?t(this._duration):t,this}},{key:"to",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e3;if(this._valuesEnd=t,"number"==typeof e||"function"==typeof e)this._duration="function"==typeof e?e(this._duration):e;else if("object"===m(e))for(var r in e)if("function"==typeof this[r]){var n=c(Array.isArray(e[r])?e[r]:[e[r]],4),i=n[0],o=void 0===i?null:i,u=n[1],s=void 0===u?null:u,a=n[2],f=void 0===a?null:a,l=n[3],h=void 0===l?null:l;this[r](o,s,f,h)}return this}},{key:"render",value:function(){if(this._rendered)return this;var t=this._valuesStart,e=this._valuesEnd,r=this.object,n=this.node,i=this.InitialValues;if(B(r),B(e),n&&n.queueID&&V[n.queueID]){var o=V[n.queueID];o.propNormaliseRequired&&o.tween!==this&&(o.normalisedProp=!0,o.propNormaliseRequired=!1)}for(var u in n&&i&&(r&&0!==Object.keys(r).length?e&&0!==Object.keys(e).length||(e=this._valuesEnd=i(n,r)):r=this.object=z(n,i(n,e),this)),e){var s=r&&r[u]&&k(r[u]),a=e[u];if(!(L[u]&&L[u].init&&(L[u].init.call(this,s,a,u,r),void 0===s&&t[u]&&(s=t[u]),L[u].skipProcess))&&!("number"==typeof s&&isNaN(s)||null===s||null===a||!1===s||!1===a||void 0===s||void 0===a||s===a)){if(Array.isArray(a)&&!Array.isArray(s)){a.unshift(s);for(var f=0,l=a.length;f<l;f++)if("string"==typeof a[f]){for(var h=A(a[f]),c={length:h.length,isString:!0},y=0,v=h.length;y<v;y++)c[y]=h[y];a[f]=c}}"number"==typeof(t[u]=s)&&"string"==typeof a&&"="===a[1]||S(u,r,t,e)}}return q.Renderer&&this.node&&q.Renderer.init&&(q.Renderer.init.call(this,r,t,e),this.__render=!0),this}},{key:"start",value:function(t){return this._startTime=void 0!==t?"string"==typeof t?C()+parseFloat(t):t:C(),this._startTime+=this._delayTime,this._initTime=this._prevTime=this._startTime,this._onStartCallbackFired=!1,this._rendered=!1,this._isPlaying=!0,p(this),this}},{key:"stop",value:function(){var t=this._isPlaying,e=this._isFinite,r=this.object,n=this._startTime,i=this._duration,o=this._r,u=this._yoyo,s=this._reversed;if(!t)return this;var a=e?(o+1)%2==1:!s;return this._reversed=!1,u&&a?this.update(n):this.update(n+i),x(this),this.emit("stop",r)}},{key:"delay",value:function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this}},{key:"chainedTweens",value:function(){if(this._chainedTweensCount=arguments.length,!this._chainedTweensCount)return this;for(var t=0,e=this._chainedTweensCount;t<e;t++)this[D+t]=arguments[t];return this}},{key:"repeat",value:function(t){return this._repeat=this._duration?"function"==typeof t?t(this._repeat):t:0,this._r=this._repeat,this._isFinite=isFinite(t),this}},{key:"reverseDelay",value:function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this}},{key:"yoyo",value: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}},{key:"easing",value:function(t){return this._easingFunction=t,this}},{key:"interpolation",value:function(t){return"function"==typeof t&&(this._interpolationFunction=t),this}},{key:"reassignValues",value:function(t){var e=this._valuesStart,r=this.object,n=this._delayTime;for(var i in this._isPlaying=!0,this._startTime=void 0!==t?t:C(),this._startTime+=n,this._reversed=!1,p(this),e){var o=e[i];r[i]=o}return this}},{key:"update",value:function(t,e,r){var n,i,o,u=this._onStartCallbackFired,s=this._easingFunction,a=this._interpolationFunction,f=this._easingReverse,l=this._repeat,h=this._delayTime,c=this._reverseDelayTime,y=this._yoyo,v=this._reversed,p=this._startTime,d=this._prevTime,_=this._duration,m=this._valuesStart,g=this._valuesEnd,b=this.object,T=this._isFinite,j=this._isPlaying,k=this.__render,w=this._chainedTweensCount,O=0;if(_){var I=(t=void 0!==t?t:C())-d;if(this._prevTime=t,250<I&&(t-=I-50/3),!j||t<p&&!r)return!0;n=1<(n=(t-p)/_)?1:n,n=v?1-n:n}else n=1,l=0;if(u||(this._rendered||(this.render(),this._rendered=!0),this.emit("start",b),this._onStartCallbackFired=!0),i=v&&f||s,!b)return!0;for(o in g){var A=m[o];if(null!=A||L[o]&&L[o].update){var S=g[o],M=i[o]?i[o](n):"function"==typeof i?i(n):Z(n),P=a[o]?a[o]:"function"==typeof a?a:Q.Linear;"number"==typeof S?b[o]=A+(S-A)*M:Array.isArray(S)&&!Array.isArray(A)?b[o]=P(S,M,b[o]):S&&S.update?S.update(M):"function"==typeof S?b[o]=S(M):"string"==typeof S&&"number"==typeof A?b[o]=A+parseFloat(S[0]+S.substr(2))*M:E(o,b,m,g,M,n),L[o]&&L[o].update&&L[o].update.call(this,b[o],A,S,M,n,o),O++}}if(!O)return x(this),!1;if(k&&q.Renderer&&q.Renderer.update&&q.Renderer.update.call(this,b,n),this.emit("update",b,n,t),1===n||v&&0===n){if(0<l&&0<_){if(T&&this._repeat--,y)this._reversed=!v;else for(o in g){var R=g[o];"string"==typeof R&&"number"==typeof m[o]&&(m[o]+=parseFloat(R[0]+R.substr(2)))}return this.emit(y&&!v?"reverse":"repeat",b),this._startTime=v&&c?t-c:t+h,!0}if(e||(this._isPlaying=!1,x(this),W--),this.emit("complete",b),this._repeat=this._r,w)for(var F=0;F<w;F++)this[D+F].start(t+_);return!1}return!0}}]),q}();t.Plugins=L,t.Selector=G,t.Interpolator=function(i,o){var u=Array.isArray(i),s="string"==typeof i?i:u?i.slice():f({},i);if(u)for(var t=0,e=i.length;t<e;t++)S(t,s,i,o);else if("object"===m(i))for(var r in i)S(r,s,i,o);else if("string"==typeof i){i=A(i),o=A(o);for(var n=1;n<i.length;)i[n]===o[n]&&"string"==typeof i[n-1]?(i.splice(n-1,2,i[n-1]+i[n]),o.splice(n-1,2,o[n-1]+o[n])):n++;for(var a={isString:!0,length:i.length};n<a.length;)a[n]=i[n],n++}return function(t){if(u)for(var e=0,r=i.length;e<r;e++)E(e,s,i,o,t);else if("object"===m(s))for(var n in i)E(n,s,i,o,t);else"string"==typeof s&&(s=E(0,0,i,o,t,t,!0));return s}},t.onTick=function(t){return o.push({update:t})},t.has=function(t){return null!==d(t)},t.get=d,t.getAll=function(){return o},t.removeAll=function(){o.length=0},t.remove=x,t.add=p,t.now=C,t.update=_,t.autoPlay=function(t){s=t},t.isRunning=function(){return u},t.onRequestTick=function(t){a.push(t)},t.FrameThrottle=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:120;y=t},t.Tween=$,t.Easing=g,t.Interpolation=Q,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "es6-tween",
"version": "5.3.0",
"version": "5.3.1",
"description": "ES6 implementation of amazing tween.js",

@@ -53,2 +53,3 @@ "browser": "bundled/Tween.min.js",

"rollup-plugin-babel": "^4.0.0-beta.4",
"standard": "^12.0.1",
"uglify-js": "^3.3.5"

@@ -55,0 +56,0 @@ },

@@ -13,3 +13,3 @@ import { decompose, recompose, decomposeString } from './constants'

let isArray = Array.isArray(a)
let origin = typeof a === 'string' ? a : isArray ? a.slice() : {...a}
let origin = typeof a === 'string' ? a : isArray ? a.slice() : { ...a }
if (isArray) {

@@ -37,4 +37,4 @@ for (let i = 0, len = a.length; i < len; i++) {

let c = {isString: true, length: a.length}
let d = {isString: true, length: b.length}
let c = { isString: true, length: a.length }
let d = { isString: true, length: b.length }

@@ -41,0 +41,0 @@ while (i < c.length) {

@@ -32,4 +32,3 @@ import {

FRAME_MS,
TOO_LONG_FRAME_MS,
DECIMAL
TOO_LONG_FRAME_MS
} from './constants'

@@ -791,4 +790,3 @@

if (typeof end === 'number') {
object[property] =
(((start + (end - start) * value) * DECIMAL) | 0) / DECIMAL
object[property] = start + (end - start) * value
} else if (Array.isArray(end) && !Array.isArray(start)) {

@@ -795,0 +793,0 @@ object[property] = _interpolationFunctionCall(

@@ -46,3 +46,3 @@ import test from 'ava'

test('Value Interpolation', t => {
let obj = { a: 0, b: 'B value 1', c: { x: 2 }, d: [3], _e: 4, g: 5 }
let obj = { a: 0, b: 'B value 1', c: { x: 2 }, d: [3], _e: 4, g: 5, h: 0 }

@@ -57,3 +57,3 @@ Object.defineProperty(obj, 'e', {

new Tween(obj)
.to({ a: 1, b: 'B value 2', c: { x: 3 }, d: [4], _e: 5, g: '+=1' }, 100)
.to({ a: 1, b: 'B value 2', c: { x: 3 }, d: [4], _e: 5, g: '+=1', h: 250000 }, 100)
.start(0)

@@ -69,2 +69,3 @@

t.is(obj.g, 5)
t.is(obj.h, 0)

@@ -91,2 +92,5 @@ update(50)

t.is(obj.h, 125000, 'Big number interpolation not worked as excepted')
t.log('Big number interpolation worked as excepted')
update(100)

@@ -100,2 +104,3 @@

t.is(obj.g, 6)
t.is(obj.h, 250000, 'Big number interpolation ending value not worked as excepted')
})

@@ -102,0 +107,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc