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 3.4.0 to 3.5.0

65

dist/Tween.js

@@ -607,21 +607,22 @@ (function (global, factory) {

for (var i = 0, len = ev.length; i < len; i++) {
var vs = s[i],
var vs = s && s[i],
ve = ev[i];
rv[i] = typeof ve === 'string' && ve.indexOf('=') === 1 ? ve : null;
s[i] = vs === ve ? null : isArray(ve) ?
isArray(vs) && ve.length === vs.length ? arrayTween(vs, ve, d) : parseInterpolatables(vs, ve) : isArray(vs) ? tweenThemTo(vs, ve) : typeof ve === 'object' ?
objectTween(vs, ve, d) : typeof ve === 'string' ?
stringTween(vs, ve, d) : vs;
s[i] = ve.nodeType ? ve : ve.update ? ve : vs === ve ? null : isArray(ve) ?
isArray(vs) && ve.length === vs.length ? arrayTween(vs, ve, d) : parseInterpolatables(vs, ve) : isArray(vs) ? tweenThemTo(vs, ve) : typeof vs === 'object' ?
objectTween(vs, ve, d) : typeof vs === 'string' ?
stringTween(vs, ve, d) : vs !== undefined ? vs : ve;
ev[i] = rv[i] !== null ? r2n(
vs, ve) : ve;
}
var minLength = Math.min(sv.length, ev.length);
return function (t) {
for (var i = 0, len = ev.length; i < len; i++) {
for (var i = 0; i < minLength; i++) {
var a = s[i],
b = ev[i],
r = rv[i];
if (a === null)
if (a === null || a === undefined)
{ continue; }
sv[i] = typeof a === 'number' ? (((a + (b - a) * t) * d) | 0) /
d : typeof a === 'function' ? a(t) : a.update ? a.update(t) : b;
d : typeof a === 'function' ? a(t) : a && a.update ? a.update(t) : b && b.update ? b.update(t) : b;
if (r && t === 1) {

@@ -667,10 +668,10 @@ s[i] = b;

for (var i in ev) {
s[i] = sv[i];
s[i] = sv && sv[i];
var vs = s[i],
ve = ev[i];
rv[i] = typeof ve === 'string' && ve.indexOf('=') === 1 ? ve : null;
s[i] = vs === ve ? null : isArray(ve) ?
isArray(vs) && ve.length === vs.length ? arrayTween(vs, ve, d) : parseInterpolatables(vs, ve) : isArray(vs) ? tweenThemTo(vs, ve) : typeof ve === 'object' ?
objectTween(vs, ve, d) : typeof ve === 'string' ?
stringTween(vs, ve, d) : vs;
s[i] = ve.nodeType ? ve : ve.update ? ve : vs === ve ? null : isArray(ve) ?
isArray(vs) && ve.length === vs.length ? arrayTween(vs, ve, d) : parseInterpolatables(vs, ve) : isArray(vs) ? tweenThemTo(vs, ve) : typeof vs === 'object' ?
objectTween(vs, ve, d) : typeof vs === 'string' ?
stringTween(vs, ve, d) : vs !== undefined ? vs : ve;
ev[i] = rv[i] !== null ? r2n(vs, ve) : ve;

@@ -683,6 +684,6 @@ }

r = rv[i];
if (a === null)
if (a === null || a === undefined)
{ continue; }
sv[i] = typeof a === 'number' ? (((a + (b - a) * t) * d) | 0) /
d : typeof a === 'function' ? a(t) : a.update ? a.update(t) : b;
d : typeof a === 'function' ? a(t) : a && a.update ? a.update(t) : b && b.update ? b.update(t) : b;
if (r && t === 1) {

@@ -703,3 +704,3 @@ s[i] = b;

}
return isArray(ev) ? isArray(sv) && sv.length === ev.length ? arrayTween(sv, ev, d) : parseInterpolatables(sv, ev) : isArray(sv) ? tweenThemTo(sv, ev) : typeof ev === 'object' ?
return ev.nodeType ? ev : sv.nodeType ? sv : isArray(ev) ? isArray(sv) && sv.length === ev.length ? arrayTween(sv, ev, d) : parseInterpolatables(sv, ev) : isArray(sv) ? tweenThemTo(sv, ev) : typeof ev === 'object' ?
objectTween(sv, ev, d) : typeof ev === 'string' ? stringTween(sv, ev, d) :

@@ -803,4 +804,2 @@ typeof ev === 'function' ? ev : function (t) {

var defaultEasing = Easing.Linear.None;
// Events list

@@ -832,3 +831,2 @@ var EVENT_UPDATE = 'update';

object = this.object = NodeCache(node, object);
this.object.node = node;
} else {

@@ -841,3 +839,3 @@ this.object = object;

this._duration = 1000;
this._easingFunction = defaultEasing;
this._easingFunction = Easing.Linear.None;

@@ -977,6 +975,4 @@ this._startTime = 0;

this._valuesEnd = _valuesEnd = intertween(object, _valuesEnd);
if (Renderer && this.node) {
this.__render = new Renderer(this, _valuesEnd);
this.__render = new Renderer(this, object, _valuesEnd);
}

@@ -991,9 +987,4 @@

this.render();
this._rendered = true;
add(this);
this.emit(EVENT_START, this.object);
this._isPlaying = true;

@@ -1071,7 +1062,9 @@

for (var property in _valuesEnd) {
var end = _valuesEnd[property];
var v0 = _valuesEnd(0);
if (typeof end === 'number' || typeof end === 'string') {
object[property] = end(0);
if (typeof v0 === 'object') {
var isArr = Array.isArray(v0);
for (var property in v0) {
if (isArr) { property *= 1; }
object[property] = v0[property];
}

@@ -1116,8 +1109,10 @@ }

this.render();
this.emit(EVENT_START, object);
this._rendered = true;
if (typeof _valuesEnd !== 'function') {
this._valuesEnd = _valuesEnd = intertween(object, _valuesEnd);
}
}
this.emit(EVENT_START, object);
this._onStartCallbackFired = true;

@@ -1124,0 +1119,0 @@ }

@@ -1,3 +0,3 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TWEEN=t.TWEEN||{})}(this,function(t){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:this;Object.assign||(Object.assign=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e.length;r<i;r++){var o=e[r];for(var s in o)t[s]=o[s]}return t}),Object.create||(Object.create=function(t){return Object.assign({},t||{})}),Array.isArray||(Array.isArray=function(t){return t&&t.push&&t.splice}),"undefined"==typeof requestAnimationFrame&&(e.requestAnimationFrame=function(t){return e.setTimeout(t,16)}),"undefined"==typeof cancelAnimationFrame&&(e.cancelAnimationFrame=function(t){return e.clearTimeout(t)});var n,r=[],i=!1,o=!1,s=e.requestAnimationFrame,a=e.cancelAnimationFrame,u=function(t){r.push(t),o&&!i&&(n=s(c),i=!0)},f=function(t){for(var e=0;e<r.length;e++)if(t===r[e])return r[e];return null},h=function(t){var e=r.indexOf(t);-1!==e&&r.splice(e,1),r.length||a(n)},p=function(){if("undefined"!=typeof process&&void 0!==process.hrtime)return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6};if(void 0!==e.performance&&void 0!==e.performance.now)return e.performance.now.bind(e.performance);var t=e.performance&&e.performance.timing&&e.performance.timing.navigationStart?e.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}(),c=function(t,e){t=void 0!==t?t:p(),n=s(c);var o=r.length;if(!o)return i=!1,a(n),!1;for(var u=0;u<o;u++)r[u].update(t,e);return!0},l={};if(e.document&&e.document.addEventListener){var d=0,y=0;e.document.addEventListener("visibilitychange",function(){if(document.hidden)y=p(),a(n),i=!1;else{d=p()-y;for(var t=0,e=r.length;t<e;t++)r[t]._startTime+=d;n=s(c),i=!0}return!0})}var v={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-v.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*v.Bounce.In(2*t):.5*v.Bounce.Out(2*t-1)+.5}}},_="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t){!function(e,n){t.exports?t.exports=n():e.InterTween=n()}("undefined"!=typeof window?window:_,function(){function t(t){var e=parseFloat(t);return"number"!=typeof e||isNaN(e)?t:e}function e(t,e){var n,r,i;3===e.length&&(e=(n=e[0])+n+(r=e[1])+r+(i=e[2])+i);var o=parseInt(e,16);return n=o>>16&_,r=o>>8&_,i=o&_,"rgb("+n+","+r+","+i+")"}function n(t){return"string"==typeof t?t.replace(v,""):t}function r(t,e){if("number"==typeof e)return e;var n=g[e.substr(0,2)],r=e.substr(2);if(1===n){var i=e[0]+r;return t+parseFloat(i)}return 2===n?t*+r:3===n?t/+r:4===n?t*(+r/100):e}function i(e){return b(e).match(d).map(t)}function o(t,e,n){if(n=void 0!==n?n:1e4,!d.test(e))return e;var o=i(t),s=i(e),a=f(o,s,n);if(a)return a;a=null;for(var u=null,h=null,p=[],y=0,v=s.length;y<v;y++){var _=s[y],m=o[y];p[y]="string"==typeof _&&1===_.indexOf("=")?e:null,l.test(_)?(u=y+2,h=y+11):c.test(_)&&(u=y,h=y+9),s[y]=m===_?null:null!==p[y]?r(m,_):"number"==typeof _?_-m:_}return function(t){for(var e="",i=0,a=s.length;i<a;i++){var f=o[i],c=s[i],l=p[i];e+="number"==typeof c?null!==u&&i>u&&i<h?f+c*t|0:((f+c*t)*n|0)/n:f,1===t&&null!==l&&(o[i]+=c,s[i]=r(o[i],l))}return e}}function s(t,e){for(var n=[],r=0,i=t.length;r<i;r++){var s=t[r];n[r]=m(s)?u(s,e):"object"==typeof s?h(s,e):"string"==typeof s?o(s,e):s}return function(e){for(var r=0,i=n.length;r<i;r++)t[r]=n[r](e);return t}}function a(t,e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];n[r]=p(0===r?t:e[r-1],o)}var s=e[e.length-1];n.push(p(s,s));var a=n.length-1;return function(t){var e=t*a,r=Math.floor(e),i=e-r;return(0,n[r])(i)}}function u(t,e,n){n=void 0!==n?n:1e4;for(var i=t.slice(),f=[],p=0,c=e.length;p<c;p++){var l=i[p],d=e[p];f[p]="string"==typeof d&&1===d.indexOf("=")?d:null,i[p]=l===d?null:m(d)?m(l)&&d.length===l.length?u(l,d,n):a(l,d):m(l)?s(l,d):"object"==typeof d?h(l,d,n):"string"==typeof d?o(l,d,n):l,e[p]=null!==f[p]?r(l,d):d}return function(o){for(var s=0,a=e.length;s<a;s++){var u=i[s],h=e[s],p=f[s];null!==u&&(t[s]="number"==typeof u?((u+(h-u)*o)*n|0)/n:"function"==typeof u?u(o):u.update?u.update(o):h,p&&1===o&&(i[s]=h,e[s]=r(i[s],p)))}return t}}function f(t,e,n){if(n=void 0!==n?n:1e4,2===e.length&&2===t.length&&-1!==T.indexOf(e[1])){var i=+t[0],o=+e[0],s=e[1],a="string"==typeof e[0]&&1===e[0].indexOf("=")?e[0]:null;return a&&(o=r(i,o)),function(t){var e=((i+(o-i)*t)*n|0)/n+s;return a&&1===t&&(o=r(i=o,a)),e}}return!1}function h(t,e,n){n=void 0!==n?n:1e4;var i={},f={};for(var p in e){f[p]=t[p];var c=f[p],l=e[p];i[p]="string"==typeof l&&1===l.indexOf("=")?l:null,f[p]=c===l?null:m(l)?m(c)&&l.length===c.length?u(c,l,n):a(c,l):m(c)?s(c,l):"object"==typeof l?h(c,l,n):"string"==typeof l?o(c,l,n):c,e[p]=null!==i[p]?r(c,l):l}return function(o){for(var s in e){var a=f[s],u=e[s],h=i[s];null!==a&&(t[s]="number"==typeof a?((a+(u-a)*o)*n|0)/n:"function"==typeof a?a(o):a.update?a.update(o):u,h&&1===o&&(f[s]=u,e[s]=r(f[s],h)))}return t}}function p(t,e,n){n=void 0!==n?n:1e4;var i="string"==typeof e&&"number"==typeof t&&1===e.indexOf("=")?e:null;return i&&(e=r(t,i)),m(e)?m(t)&&t.length===e.length?u(t,e,n):a(t,e):m(t)?s(t,e):"object"==typeof e?h(t,e,n):"string"==typeof e?o(t,e,n):"function"==typeof e?e:function(o){var s="number"==typeof e?((t+(e-t)*o)*n|0)/n:t;return i&&1===o&&(e=r(t+=e,i)),s}}var c=/rgb/g,l=/argb/g,d=/\s+|([A-Za-z?().,{}:""[\]#]+)|([-+/*%]+=)?([-+*/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,y=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,v=/\n|\r|\t/g,_=255,m=Array.isArray,g={"+=":1,"-=":1,"*=":2,"/=":3,"%=":4},b=function(t){return"string"!=typeof t?t:n(t).replace(y,e)},T=["px","pt","pc","deg","rad","turn","em","ex","cm","mm","dm","inch","in","rem","vw","vh","vmin","vmax","%"];return p})}),g={},b=function(t,e){return t?g[t]?e?Object.assign(g[t],e):g[t]:(g[t]=e,g[t]):e},T=function(){this._events={}};T.prototype.on=function(t,e){return this._events[t]||(this._events[t]=[]),this._events[t].push(e),this},T.prototype.once=function(t,e){var n=this;this._events[t]||(this._events[t]=[]);var r=this._events,i=r[t].length;return this._events[t].push(function(){for(var o=[],s=arguments.length;s--;)o[s]=arguments[s];e.apply(n,o),r[t].splice(i,1)}),this},T.prototype.off=function(t,e){var n=this._events;return void 0!==t&&n[t]?(e?this._events[t]=this._events[t].filter(function(t){return t!==e}):this._events[t].length=0,this):this},T.prototype.emit=function(t,e,n,r,i){var o=this._events[t];if(!o||!o.length)return this;for(var s=0,a=o.length;s<a;s++)o[s](e,n,r,i)};var O=v.Linear.None,w=0,M=function(t){function e(e,n){return t.call(this),this.id=w++,void 0===e||n||e.nodeType?void 0!==e&&(this.node=e,"object"==typeof n?(n=this.object=b(e,n),this.object.node=e):this.object=n):(n=this.object=e,e=null),this._valuesEnd=null,this._duration=1e3,this._easingFunction=O,this._startTime=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}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isStarted=function(){return this._onStartCallbackFired},e.prototype.reverse=function(){var t=this._reversed;return this._reversed=!t,this},e.prototype.reversed=function(){return this._reversed},e.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,h(this),this._pausedTime=p(),this.emit("pause",this.object)):this},e.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=p()-this._pausedTime,u(this),this._pausedTime=p(),this.emit("play",this.object))},e.prototype.restart=function(t){return this._repeat=this._r,this._startTime=p()+(t?0:this._delayTime),this._isPlaying||u(this),this.emit("restart",this._object)},e.prototype.seek=function(t,e){return this._startTime=p()+Math.max(0,Math.min(t,this._duration)),this.emit("seek",t,this._object),e?this:this.pause()},e.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},e.prototype.to=function(t,e){var n=this;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 r in e)n[r]&&(i=n)[r].apply(i,Array.isArray(e)?e:[e]);return this;var i},e.prototype.render=function(){var t=this;if(this._rendered)return this;var e=this,n=e._valuesEnd,r=e.object,i=e.Renderer;if("object"==typeof n)for(var o in n)l[o]&&(n[o]=new l[o](t,r[o],n[o]));return this._valuesEnd=n=m(r,n),i&&this.node&&(this.__render=new i(this,n)),this},e.prototype.start=function(t){return this._startTime=void 0!==t?t:p(),this._startTime+=this._delayTime,this.render(),this._rendered=!0,u(this),this.emit("start",this.object),this._isPlaying=!0,this},e.prototype.stop=function(){var t=this,e=t._isPlaying,n=t.object;return e?(h(this),this._isPlaying=!1,this.emit("stop",n)):this},e.prototype.end=function(){var t=this,e=t._startTime,n=t._duration;return this.update(e+n)},e.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this._startTime+=this._delayTime,this},e.prototype.repeat=function(t){return this._repeat="function"==typeof t?t(this._repeat):t,this._r=this._repeat,this._isFinite=isFinite(t),this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime="function"==typeof t?t(this._repeatDelayTime):t,this},e.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},e.prototype.yoyo=function(t){return this._yoyo="function"==typeof t?t(this._yoyo):t,this},e.prototype.easing=function(t){return this._easingFunction=t,this},e.prototype.reassignValues=function(){var t=this,e=t._valuesEnd,n=t.object;for(var r in e){var i=e[r];"number"!=typeof i&&"string"!=typeof i||(n[r]=i(0))}return this},e.prototype.get=function(t){return this.update(t),this.object},e.prototype.update=function(t,e){var n,r,i=this,o=i._onStartCallbackFired,s=i._easingFunction,a=i._repeat,u=i._repeatDelayTime,f=i._reverseDelayTime,c=i._yoyo,l=i._reversed,d=i._startTime,y=i._duration,v=i._valuesEnd,_=i.object,m=i._isFinite,g=i.__render;return(t=void 0!==t?t:p())<d||(o||(this._rendered||(this.render(),this.emit("start",_),this._rendered=!0),this._onStartCallbackFired=!0),n=(t-d)/y,n=n>1?1:n,n=l?1-n:n,r=s(n),_=v(r),g&&g.update(_,n),this.emit("update",_,r,n),!(1===n||l&&0===n)||(a?(m&&this._repeat--,c&&(this._reversed=!l),this._startTime=!l&&u?t+u:l&&f?t+f:t,!0):(e||h(this),this.emit("complete",_),this._repeat=this._r,!1)))},e}(T),j=function(){this.totalTime=0,this.labels=[],this.offsets=[]};j.prototype.parseLabel=function(t,e){var n=this,r=n.offsets,i=n.labels,o=i.indexOf(t);if("string"==typeof t&&-1!==t.indexOf("=")&&!e&&-1===o){var s=t.substr(t.indexOf("=")-1,2),a=t.split(s);e=2===a.length?s+a[1]:null,t=a[0],o=i.indexOf(t)}if(-1!==o&&t){var u=r[o]||0;if("number"==typeof e)u=e;else if("string"==typeof e&&-1!==e.indexOf("=")){var f=e.charAt(0);e=Number(e.substr(2)),"+"===f||"-"===f?u+=parseFloat(f+e):"*"===f?u*=e:"/"===f?u/=e:"%"===f&&(u*=e/100)}return u}return"number"==typeof e?e:0},j.prototype.addLabel=function(t,e){return this.labels.push(t),this.offsets.push(this.parseLabel(t,e)),this},j.prototype.setLabel=function(t,e){var n=this.labels.indexOf(t);return-1!==n&&this.offsets.splice(n,1,this.parseLabel(t,e)),this},j.prototype.eraseLabel=function(t){var e=this.labels.indexOf(t);return-1!==e&&(this.labels.splice(e,1),this.offsets.splice(e,1)),this};var I=0,x=function(t){function e(e){return t.call(this),this._totalDuration=0,this._startTime=p(),this._tweens={},this._elapsed=0,this._id=I++,this._defaultParams=e,this.position=new j,this.position.addLabel("afterLast",this._totalDuration),this.position.addLabel("afterInit",this._startTime),this}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addLabel=function(t,e){return this.position.addLabel(t,e),this},e.prototype.map=function(t){var e=this;for(var n in e._tweens){var r=e._tweens[n];t(r,+n),e._totalDuration=Math.max(e._totalDuration,r._duration+r._startTime)}return this},e.prototype.add=function(e,n){var r=this;if(Array.isArray(e))return e.map(function(t){r.add(t,n)}),this;"object"!=typeof e||e instanceof t||(e=new t(e.from).to(e.to,e));var i=this,o=i._defaultParams,s=i._totalDuration;if(o)for(var a in o)e[a](o[a]);var u="number"==typeof n?n:this.position.parseLabel(void 0!==n?n:"afterLast",null);return e._startTime=this._startTime,e._startTime+=u,this._totalDuration=Math.max(s,e._startTime+e._delayTime+e._duration),this._tweens[e.id]=e,this.position.setLabel("afterLast",this._totalDuration),this},e.prototype.restart=function(){return this._startTime+=p(),u(this),this.emit("restart")},e.prototype.easing=function(t){return this.map(function(e){return e.easing(t)})},e.prototype.interpolation=function(t){return this.map(function(e){return e.interpolation(t)})},e.prototype.reverse=function(){return this._reversed=!this._reversed,this.emit("reverse")},e.prototype.update=function(t){var e=this,n=e._tweens,r=e._totalDuration,i=e._repeatDelayTime,o=e._reverseDelayTime,s=e._startTime,a=e._reversed,u=e._yoyo,f=e._repeat,h=e._isFinite;if(t<s)return!0;var p=Math.min(1,Math.max(0,(t-s)/r));p=a?1-p:p,this._elapsed=p;var c=t-s,l=a?r-c:c;for(var d in n){var y=n[d];if(y.skip)y.skip=!1;else{if(y.update(l))continue;y.skip=!0}}if(this.emit("update",p,c),1===p||a&&0===p){if(f){h&&this._repeat--,this.emit(a?"reverse":"repeat"),u&&this.reverse(),this._startTime+=!a&&i?r+i:a&&o?r+o:r;for(var v in n){var _=n[v];_.skip&&(_.skip=!1),_.reassignValues()}return!0}this.emit("complete"),this._repeat=this._r;for(var m in n){var g=n[m];g.skip&&(g.skip=!1)}return!1}return!0},e.prototype.elapsed=function(t){return void 0!==t?this.update(t*this._totalDuration):this._elapsed},e.prototype.seek=function(t){return this.update(t<1.1?t*this._totalDuration:t)},e}(M);t.Plugins=l,t.Interpolator=m,t.has=function(t){return null!==f(t)},t.get=f,t.getAll=function(){return r},t.removeAll=function(){r.length=0,a(n)},t.remove=h,t.add=u,t.now=p,t.update=c,t.autoPlay=function(t){o=t},t.isRunning=function(){return i},t.Tween=M,t.Easing=v,t.Timeline=x,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=t.TWEEN||{})}(this,function(t){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:this;Object.assign||(Object.assign=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e.length;r<i;r++){var o=e[r];for(var s in o)t[s]=o[s]}return t}),Object.create||(Object.create=function(t){return Object.assign({},t||{})}),Array.isArray||(Array.isArray=function(t){return t&&t.push&&t.splice}),"undefined"==typeof requestAnimationFrame&&(e.requestAnimationFrame=function(t){return e.setTimeout(t,16)}),"undefined"==typeof cancelAnimationFrame&&(e.cancelAnimationFrame=function(t){return e.clearTimeout(t)});var n,r=[],i=!1,o=!1,s=e.requestAnimationFrame,a=e.cancelAnimationFrame,u=function(t){r.push(t),o&&!i&&(n=s(c),i=!0)},f=function(t){for(var e=0;e<r.length;e++)if(t===r[e])return r[e];return null},p=function(t){var e=r.indexOf(t);-1!==e&&r.splice(e,1),r.length||a(n)},h=function(){if("undefined"!=typeof process&&void 0!==process.hrtime)return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6};if(void 0!==e.performance&&void 0!==e.performance.now)return e.performance.now.bind(e.performance);var t=e.performance&&e.performance.timing&&e.performance.timing.navigationStart?e.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}(),c=function(t,e){t=void 0!==t?t:h(),n=s(c);var o=r.length;if(!o)return i=!1,a(n),!1;for(var u=0;u<o;u++)r[u].update(t,e);return!0},l={};if(e.document&&e.document.addEventListener){var d=0,y=0;e.document.addEventListener("visibilitychange",function(){if(document.hidden)y=h(),a(n),i=!1;else{d=h()-y;for(var t=0,e=r.length;t<e;t++)r[t]._startTime+=d;n=s(c),i=!0}return!0})}var v={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-v.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*v.Bounce.In(2*t):.5*v.Bounce.Out(2*t-1)+.5}}},_="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t){!function(e,n){t.exports?t.exports=n():e.InterTween=n()}("undefined"!=typeof window?window:_,function(){function t(t){var e=parseFloat(t);return"number"!=typeof e||isNaN(e)?t:e}function e(t,e){var n,r,i;3===e.length&&(e=(n=e[0])+n+(r=e[1])+r+(i=e[2])+i);var o=parseInt(e,16);return n=o>>16&_,r=o>>8&_,i=o&_,"rgb("+n+","+r+","+i+")"}function n(t){return"string"==typeof t?t.replace(v,""):t}function r(t,e){if("number"==typeof e)return e;var n=g[e.substr(0,2)],r=e.substr(2);if(1===n){var i=e[0]+r;return t+parseFloat(i)}return 2===n?t*+r:3===n?t/+r:4===n?t*(+r/100):e}function i(e){return b(e).match(d).map(t)}function o(t,e,n){if(n=void 0!==n?n:1e4,!d.test(e))return e;var o=i(t),s=i(e),a=f(o,s,n);if(a)return a;a=null;for(var u=null,p=null,h=[],y=0,v=s.length;y<v;y++){var _=s[y],m=o[y];h[y]="string"==typeof _&&1===_.indexOf("=")?e:null,l.test(_)?(u=y+2,p=y+11):c.test(_)&&(u=y,p=y+9),s[y]=m===_?null:null!==h[y]?r(m,_):"number"==typeof _?_-m:_}return function(t){for(var e="",i=0,a=s.length;i<a;i++){var f=o[i],c=s[i],l=h[i];e+="number"==typeof c?null!==u&&i>u&&i<p?f+c*t|0:((f+c*t)*n|0)/n:f,1===t&&null!==l&&(o[i]+=c,s[i]=r(o[i],l))}return e}}function s(t,e){for(var n=[],r=0,i=t.length;r<i;r++){var s=t[r];n[r]=m(s)?u(s,e):"object"==typeof s?p(s,e):"string"==typeof s?o(s,e):s}return function(e){for(var r=0,i=n.length;r<i;r++)t[r]=n[r](e);return t}}function a(t,e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];n[r]=h(0===r?t:e[r-1],o)}var s=e[e.length-1];n.push(h(s,s));var a=n.length-1;return function(t){var e=t*a,r=Math.floor(e),i=e-r;return(0,n[r])(i)}}function u(t,e,n){n=void 0!==n?n:1e4;for(var i=t.slice(),f=[],h=0,c=e.length;h<c;h++){var l=i&&i[h],d=e[h];f[h]="string"==typeof d&&1===d.indexOf("=")?d:null,i[h]=d.nodeType?d:d.update?d:l===d?null:m(d)?m(l)&&d.length===l.length?u(l,d,n):a(l,d):m(l)?s(l,d):"object"==typeof l?p(l,d,n):"string"==typeof l?o(l,d,n):void 0!==l?l:d,e[h]=null!==f[h]?r(l,d):d}var y=Math.min(t.length,e.length);return function(o){for(var s=0;s<y;s++){var a=i[s],u=e[s],p=f[s];null!==a&&void 0!==a&&(t[s]="number"==typeof a?((a+(u-a)*o)*n|0)/n:"function"==typeof a?a(o):a&&a.update?a.update(o):u&&u.update?u.update(o):u,p&&1===o&&(i[s]=u,e[s]=r(i[s],p)))}return t}}function f(t,e,n){if(n=void 0!==n?n:1e4,2===e.length&&2===t.length&&-1!==T.indexOf(e[1])){var i=+t[0],o=+e[0],s=e[1],a="string"==typeof e[0]&&1===e[0].indexOf("=")?e[0]:null;return a&&(o=r(i,o)),function(t){var e=((i+(o-i)*t)*n|0)/n+s;return a&&1===t&&(o=r(i=o,a)),e}}return!1}function p(t,e,n){n=void 0!==n?n:1e4;var i={},f={};for(var h in e){f[h]=t&&t[h];var c=f[h],l=e[h];i[h]="string"==typeof l&&1===l.indexOf("=")?l:null,f[h]=l.nodeType?l:l.update?l:c===l?null:m(l)?m(c)&&l.length===c.length?u(c,l,n):a(c,l):m(c)?s(c,l):"object"==typeof c?p(c,l,n):"string"==typeof c?o(c,l,n):void 0!==c?c:l,e[h]=null!==i[h]?r(c,l):l}return function(o){for(var s in e){var a=f[s],u=e[s],p=i[s];null!==a&&void 0!==a&&(t[s]="number"==typeof a?((a+(u-a)*o)*n|0)/n:"function"==typeof a?a(o):a&&a.update?a.update(o):u&&u.update?u.update(o):u,p&&1===o&&(f[s]=u,e[s]=r(f[s],p)))}return t}}function h(t,e,n){n=void 0!==n?n:1e4;var i="string"==typeof e&&"number"==typeof t&&1===e.indexOf("=")?e:null;return i&&(e=r(t,i)),e.nodeType?e:t.nodeType?t:m(e)?m(t)&&t.length===e.length?u(t,e,n):a(t,e):m(t)?s(t,e):"object"==typeof e?p(t,e,n):"string"==typeof e?o(t,e,n):"function"==typeof e?e:function(o){var s="number"==typeof e?((t+(e-t)*o)*n|0)/n:t;return i&&1===o&&(e=r(t+=e,i)),s}}var c=/rgb/g,l=/argb/g,d=/\s+|([A-Za-z?().,{}:""[\]#]+)|([-+/*%]+=)?([-+*/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,y=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,v=/\n|\r|\t/g,_=255,m=Array.isArray,g={"+=":1,"-=":1,"*=":2,"/=":3,"%=":4},b=function(t){return"string"!=typeof t?t:n(t).replace(y,e)},T=["px","pt","pc","deg","rad","turn","em","ex","cm","mm","dm","inch","in","rem","vw","vh","vmin","vmax","%"];return h})}),g={},b=function(t,e){return t?g[t]?e?Object.assign(g[t],e):g[t]:(g[t]=e,g[t]):e},T=function(){this._events={}};T.prototype.on=function(t,e){return this._events[t]||(this._events[t]=[]),this._events[t].push(e),this},T.prototype.once=function(t,e){var n=this;this._events[t]||(this._events[t]=[]);var r=this._events,i=r[t].length;return this._events[t].push(function(){for(var o=[],s=arguments.length;s--;)o[s]=arguments[s];e.apply(n,o),r[t].splice(i,1)}),this},T.prototype.off=function(t,e){var n=this._events;return void 0!==t&&n[t]?(e?this._events[t]=this._events[t].filter(function(t){return t!==e}):this._events[t].length=0,this):this},T.prototype.emit=function(t,e,n,r,i){var o=this._events[t];if(!o||!o.length)return this;for(var s=0,a=o.length;s<a;s++)o[s](e,n,r,i)};var O=0,w=function(t){function e(e,n){return t.call(this),this.id=O++,void 0===e||n||e.nodeType?void 0!==e&&(this.node=e,"object"==typeof n?n=this.object=b(e,n):this.object=n):(n=this.object=e,e=null),this._valuesEnd=null,this._duration=1e3,this._easingFunction=v.Linear.None,this._startTime=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}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isStarted=function(){return this._onStartCallbackFired},e.prototype.reverse=function(){var t=this._reversed;return this._reversed=!t,this},e.prototype.reversed=function(){return this._reversed},e.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,p(this),this._pausedTime=h(),this.emit("pause",this.object)):this},e.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=h()-this._pausedTime,u(this),this._pausedTime=h(),this.emit("play",this.object))},e.prototype.restart=function(t){return this._repeat=this._r,this._startTime=h()+(t?0:this._delayTime),this._isPlaying||u(this),this.emit("restart",this._object)},e.prototype.seek=function(t,e){return this._startTime=h()+Math.max(0,Math.min(t,this._duration)),this.emit("seek",t,this._object),e?this:this.pause()},e.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},e.prototype.to=function(t,e){var n=this;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 r in e)n[r]&&(i=n)[r].apply(i,Array.isArray(e)?e:[e]);return this;var i},e.prototype.render=function(){var t=this;if(this._rendered)return this;var e=this,n=e._valuesEnd,r=e.object,i=e.Renderer;if("object"==typeof n)for(var o in n)l[o]&&(n[o]=new l[o](t,r[o],n[o]));return i&&this.node&&(this.__render=new i(this,r,n)),this},e.prototype.start=function(t){return this._startTime=void 0!==t?t:h(),this._startTime+=this._delayTime,u(this),this._isPlaying=!0,this},e.prototype.stop=function(){var t=this,e=t._isPlaying,n=t.object;return e?(p(this),this._isPlaying=!1,this.emit("stop",n)):this},e.prototype.end=function(){var t=this,e=t._startTime,n=t._duration;return this.update(e+n)},e.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this._startTime+=this._delayTime,this},e.prototype.repeat=function(t){return this._repeat="function"==typeof t?t(this._repeat):t,this._r=this._repeat,this._isFinite=isFinite(t),this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime="function"==typeof t?t(this._repeatDelayTime):t,this},e.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},e.prototype.yoyo=function(t){return this._yoyo="function"==typeof t?t(this._yoyo):t,this},e.prototype.easing=function(t){return this._easingFunction=t,this},e.prototype.reassignValues=function(){var t=this,e=t._valuesEnd,n=t.object,r=e(0);if("object"==typeof r){var i=Array.isArray(r);for(var o in r)i&&(o*=1),n[o]=r[o]}return this},e.prototype.get=function(t){return this.update(t),this.object},e.prototype.update=function(t,e){var n,r,i=this,o=i._onStartCallbackFired,s=i._easingFunction,a=i._repeat,u=i._repeatDelayTime,f=i._reverseDelayTime,c=i._yoyo,l=i._reversed,d=i._startTime,y=i._duration,v=i._valuesEnd,_=i.object,g=i._isFinite,b=i.__render;return(t=void 0!==t?t:h())<d||(o||(this._rendered||(this.render(),this._rendered=!0,"function"!=typeof v&&(this._valuesEnd=v=m(_,v))),this.emit("start",_),this._onStartCallbackFired=!0),n=(t-d)/y,n=n>1?1:n,n=l?1-n:n,r=s(n),_=v(r),b&&b.update(_,n),this.emit("update",_,r,n),!(1===n||l&&0===n)||(a?(g&&this._repeat--,c&&(this._reversed=!l),this._startTime=!l&&u?t+u:l&&f?t+f:t,!0):(e||p(this),this.emit("complete",_),this._repeat=this._r,!1)))},e}(T),M=function(){this.totalTime=0,this.labels=[],this.offsets=[]};M.prototype.parseLabel=function(t,e){var n=this,r=n.offsets,i=n.labels,o=i.indexOf(t);if("string"==typeof t&&-1!==t.indexOf("=")&&!e&&-1===o){var s=t.substr(t.indexOf("=")-1,2),a=t.split(s);e=2===a.length?s+a[1]:null,t=a[0],o=i.indexOf(t)}if(-1!==o&&t){var u=r[o]||0;if("number"==typeof e)u=e;else if("string"==typeof e&&-1!==e.indexOf("=")){var f=e.charAt(0);e=Number(e.substr(2)),"+"===f||"-"===f?u+=parseFloat(f+e):"*"===f?u*=e:"/"===f?u/=e:"%"===f&&(u*=e/100)}return u}return"number"==typeof e?e:0},M.prototype.addLabel=function(t,e){return this.labels.push(t),this.offsets.push(this.parseLabel(t,e)),this},M.prototype.setLabel=function(t,e){var n=this.labels.indexOf(t);return-1!==n&&this.offsets.splice(n,1,this.parseLabel(t,e)),this},M.prototype.eraseLabel=function(t){var e=this.labels.indexOf(t);return-1!==e&&(this.labels.splice(e,1),this.offsets.splice(e,1)),this};var I=0,j=function(t){function e(e){return t.call(this),this._totalDuration=0,this._startTime=h(),this._tweens={},this._elapsed=0,this._id=I++,this._defaultParams=e,this.position=new M,this.position.addLabel("afterLast",this._totalDuration),this.position.addLabel("afterInit",this._startTime),this}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addLabel=function(t,e){return this.position.addLabel(t,e),this},e.prototype.map=function(t){var e=this;for(var n in e._tweens){var r=e._tweens[n];t(r,+n),e._totalDuration=Math.max(e._totalDuration,r._duration+r._startTime)}return this},e.prototype.add=function(e,n){var r=this;if(Array.isArray(e))return e.map(function(t){r.add(t,n)}),this;"object"!=typeof e||e instanceof t||(e=new t(e.from).to(e.to,e));var i=this,o=i._defaultParams,s=i._totalDuration;if(o)for(var a in o)e[a](o[a]);var u="number"==typeof n?n:this.position.parseLabel(void 0!==n?n:"afterLast",null);return e._startTime=this._startTime,e._startTime+=u,this._totalDuration=Math.max(s,e._startTime+e._delayTime+e._duration),this._tweens[e.id]=e,this.position.setLabel("afterLast",this._totalDuration),this},e.prototype.restart=function(){return this._startTime+=h(),u(this),this.emit("restart")},e.prototype.easing=function(t){return this.map(function(e){return e.easing(t)})},e.prototype.interpolation=function(t){return this.map(function(e){return e.interpolation(t)})},e.prototype.reverse=function(){return this._reversed=!this._reversed,this.emit("reverse")},e.prototype.update=function(t){var e=this,n=e._tweens,r=e._totalDuration,i=e._repeatDelayTime,o=e._reverseDelayTime,s=e._startTime,a=e._reversed,u=e._yoyo,f=e._repeat,p=e._isFinite;if(t<s)return!0;var h=Math.min(1,Math.max(0,(t-s)/r));h=a?1-h:h,this._elapsed=h;var c=t-s,l=a?r-c:c;for(var d in n){var y=n[d];if(y.skip)y.skip=!1;else{if(y.update(l))continue;y.skip=!0}}if(this.emit("update",h,c),1===h||a&&0===h){if(f){p&&this._repeat--,this.emit(a?"reverse":"repeat"),u&&this.reverse(),this._startTime+=!a&&i?r+i:a&&o?r+o:r;for(var v in n){var _=n[v];_.skip&&(_.skip=!1),_.reassignValues()}return!0}this.emit("complete"),this._repeat=this._r;for(var m in n){var g=n[m];g.skip&&(g.skip=!1)}return!1}return!0},e.prototype.elapsed=function(t){return void 0!==t?this.update(t*this._totalDuration):this._elapsed},e.prototype.seek=function(t){return this.update(t<1.1?t*this._totalDuration:t)},e}(w);t.Plugins=l,t.Interpolator=m,t.has=function(t){return null!==f(t)},t.get=f,t.getAll=function(){return r},t.removeAll=function(){r.length=0,a(n)},t.remove=p,t.add=u,t.now=h,t.update=c,t.autoPlay=function(t){o=t},t.isRunning=function(){return i},t.Tween=w,t.Easing=v,t.Timeline=j,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=dist/Tween.min.js.map
//# sourceMappingURL=Tween.min.js.map
{
"name": "es6-tween",
"version": "3.4.0",
"version": "3.5.0",
"description": "ES6 implementation of amazing tween.js",

@@ -53,4 +53,4 @@ "browser": "dist/Tween.min.js",

"dependencies": {
"intertween": "latest"
"intertween": "0.0.14"
}
}

@@ -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](http://img.badgesize.io/https://unpkg.com/es6-tween?cache=false)](http://unpkg.com/es6-tween)
[![gzipsize](http://img.badgesize.io/https://unpkg.com/es6-tween?compression=gzip&cache=false)](http://unpkg.com/es6-tween)
[![CDNJS](https://img.shields.io/cdnjs/v/es6-tween.svg)](https://cdnjs.com/libraries/es6-tween)

@@ -9,0 +9,0 @@ [![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)

@@ -23,6 +23,7 @@ import buble from 'rollup-plugin-buble'

nodeResolve({
main: true
main: true,
jsnext: true
}),
commonjs({
include: ['./node_modules/intertween/index.js']
include: ['node_modules/intertween/index.js']
})

@@ -29,0 +30,0 @@ ]

@@ -13,4 +13,2 @@ import {

const defaultEasing = Easing.Linear.None
// Events list

@@ -42,3 +40,2 @@ export const EVENT_UPDATE = 'update'

object = this.object = NodeCache(node, object)
this.object.node = node
} else {

@@ -51,3 +48,3 @@ this.object = object

this._duration = 1000
this._easingFunction = defaultEasing
this._easingFunction = Easing.Linear.None

@@ -179,6 +176,4 @@ this._startTime = 0

this._valuesEnd = _valuesEnd = InterTween(object, _valuesEnd)
if (Renderer && this.node) {
this.__render = new Renderer(this, _valuesEnd)
this.__render = new Renderer(this, object, _valuesEnd)
}

@@ -193,9 +188,4 @@

this.render()
this._rendered = true
add(this)
this.emit(EVENT_START, this.object)
this._isPlaying = true

@@ -276,7 +266,9 @@

for (let property in _valuesEnd) {
let end = _valuesEnd[property]
let v0 = _valuesEnd(0)
if (typeof end === 'number' || typeof end === 'string') {
object[property] = end(0)
if (typeof v0 === 'object') {
let isArr = Array.isArray(v0)
for (let property in v0) {
if (isArr) property *= 1
object[property] = v0[property]
}

@@ -322,8 +314,10 @@ }

this.render()
this.emit(EVENT_START, object)
this._rendered = true
if (typeof _valuesEnd !== 'function') {
this._valuesEnd = _valuesEnd = InterTween(object, _valuesEnd)
}
}
this.emit(EVENT_START, object)
this._onStartCallbackFired = true

@@ -330,0 +324,0 @@ }

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