es6-tween
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -8,6 +8,7 @@ (function (global, factory) { | ||
if ( Object.assign === undefined ) { | ||
Object.assign = function (first) { | ||
var args = [], len = arguments.length - 1; | ||
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; | ||
Object.assign = function () { | ||
var args = [], len = arguments.length; | ||
while ( len-- ) args[ len ] = arguments[ len ]; | ||
var first = args.shift(); | ||
args.map(function (obj) { | ||
@@ -22,3 +23,3 @@ for ( var p in obj ) { | ||
var ROOT = typeof(window) !== "undefined" ? window : typeof(global) !== "undefined" ? global : new Function('return this')(); | ||
var ROOT = typeof(window) !== "undefined" ? window : typeof(global) !== "undefined" ? global : {}; | ||
var _vendor = ['webkit', 'moz', 'ms', 'o']; | ||
@@ -29,6 +30,6 @@ var animFrame = 'AnimationFrame'; | ||
var cafSuffixForVendor2 = 'CancelRequest' + animFrame; | ||
var _timeout = ROOT.setTimeout; | ||
var _clearTimeout = ROOT.clearTimeout; | ||
var _timeout = setTimeout; | ||
var _clearTimeout = clearTimeout; | ||
if ( _timeout && ROOT.requestAnimationFrame === undefined ) { | ||
if ( ROOT.requestAnimationFrame === undefined ) { | ||
@@ -54,3 +55,3 @@ var _raf, now, lastTime = Date.now(), frameMs = (50 / 3), fpsSec = frameMs; | ||
if ( _clearTimeout && ROOT.cancelAnimationFrame === undefined && (ROOT.cancelAnimationFrame = ROOT.cancelRequestAnimationFrame) === undefined ) { | ||
if ( ROOT.cancelAnimationFrame === undefined && (ROOT.cancelAnimationFrame = ROOT.cancelRequestAnimationFrame) === undefined ) { | ||
var _caf; | ||
@@ -57,0 +58,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.TWEEN=t.TWEEN||{})}(this,function(t){"use strict";function n(t,n,e){void 0===t&&(t={}),void 0===n&&(n={}),void 0===e&&(e=R);var i=new e;for(var r in t)void 0!==n[r]?i[r]=n[r]:i[r]=t[r];return i}function e(t){for(var n="",e=0,i=t.length;e<i;e++)n+=t[e];return n}function i(t){var n=parseFloat(t);return"number"!=typeof n||isNaN(n)?t:n}function r(t){var n=t.from,e=t.to,i=t.duration;void 0===i&&(i=1e3);var r=t.easing;void 0===r&&(r=G);var o=t.events,a=t.instance,u=new R(n,a).to(e,i).easing(G);o&&(u._events=o),t.start=u.start.bind(u)}void 0===Object.assign&&(Object.assign=function(t){for(var n=[],e=arguments.length-1;e-- >0;)n[e]=arguments[e+1];return n.map(function(n){for(var e in n)t[e]=n[e]}),t});var o="undefined"!=typeof window?window:"undefined"!=typeof global?global:new Function("return this")(),a=["webkit","moz","ms","o"],u="AnimationFrame",s="Request"+u,c="Cancel"+u,f="CancelRequest"+u,h=o.setTimeout,p=o.clearTimeout;if(h&&void 0===o.requestAnimationFrame){var l,v,d=Date.now(),y=50/3,m=y;a.map(function(t){void 0===(l=o[t+s])&&(l=function(t){return h(function(){v=Date.now(),t(v-d),m=y+(Date.now()-v)},m)})}),void 0!==l&&(o.requestAnimationFrame=l)}if(p&&void 0===o.cancelAnimationFrame&&void 0===(o.cancelAnimationFrame=o.cancelRequestAnimationFrame)){var _;a.map(function(t){void 0===(_=o[t+c])&&void 0===(_=o[t+f])&&(_=function(t){return p(t)})}),void 0!==_&&(o.cancelAnimationFrame=_)}void 0===Array.isArray&&(Array.isArray=function(t){return void 0!==t&&"object"==typeof t&&t.length&&void 0!==t.push&&void 0!==t.splice});var b,g=[],w=!1,M=!1,T={},x="undefined"!=typeof window?window:"undefined"!=typeof global?global:{},F=function(){return g},I=function(t){M=t},O=function(){g=[]},j=function(t,n,e,i,r,o){var a=this,u=T[t];if(u)for(var s=u.length;s--;)u[s].call(a,n,e,i,r,o)},A=function(t,n){if(void 0!==t&&void 0!==T[t])if(void 0!==n)for(var e=T[name],i=0;i<e.length;)e[i]===n&&e.splice(i,1),i++;else T[name]=[]},E=function(t){g.push(t),M&&!w&&(q(),w=!0,j("start")),j("add",t,g)},P=function(t,n){void 0===T[t]&&(T[t]=[]),T[t].push(n)},S=function(t,n){void 0===T[t]&&(T[t]=[]),P(t,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];n.apply(void 0,e),A(t)})},C=function(t){g.filter(function(n){return n!==t});for(var n,e=0;e<g.length;)n=g[e],n===t&&(j("remove",t,g),g.splice(e,1)),e++},N=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!==x.performance&&void 0!==x.performance.now)return x.performance.now.bind(x.performance);var t=x.performance&&x.performance.timing&&x.performance.timing.navigationStart?x.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}(),q=function(t,n){if(t=void 0!==t?t:N(),M&&(b=requestAnimationFrame(q)),j("update",t,g),0===g.length)return w=!1,cancelAnimationFrame(b),j("stop",t),!1;for(var e=0;e<g.length;)g[e].update(t)||n?e++:g.splice(e,1);return!0};if(x.document){var k=x.document,D=0,z=0;k.addEventListener("visibilitychange",function(t){return 0!==g.length&&(document.hidden?z=N():(D=N()-z,g.map(function(t){return t._startTime+=D})),!0)})}var H={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(-10*t,2)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(-10*(t-1),2)+2)}},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(10*(t-1),2)*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(-10*t,2)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2,t<1?-.5*Math.pow(10*(t-1),2)*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(-10*(t-1),2)*Math.sin(5*(t-1.1)*Math.PI)+1)}},Back:{In:function(t){var n=1.70158;return t*t*((n+1)*t-n)},Out:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},InOut:function(t){var n=2.5949095;return(t*=2)<1?.5*(t*t*((n+1)*t-n)):.5*((t-=2)*t*((n+1)*t+n)+2)}},Bounce:{In:function(t){return 1-H.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*H.Bounce.In(2*t):.5*H.Bounce.Out(2*t-1)+.5}},Stepped:function(t){return function(n){return Math.floor(n*t)/t}},Noisy:function(t,n){var e=1-t;return function(i){return t*Math.random()+e*n(i)}},get bezier(){var t,n;return t=function(t,n,e,i,r){var o=Math.pow(1-t,3),a=3*Math.pow(1-t,2)*t,u=3*(1-t)*Math.pow(t,2);return t=Math.pow(t,3),{x:o*n.x+a*e.x+u*i.x+t*r.x,y:o*n.y+a*e.y+u*i.y+t*r.y}},n=function(t,n){var e,i,r=0,o=0,a=n.length,u=0,s=1,c=(s+u)/2;for(e=null;o<a&&(i=n[o],t>=i(0).x&&t<=i(1).x&&(e=i),null===e);)o++;if(!e)return 1;for(i=e(c).x;1e-4<Math.abs(t-i)&&100>r;)t>i?u=c:s=c,c=(s+u)/2,i=e(c).x,r++;return e(c).y},function(e){null==e&&(e={});var i=e.points,r=function(){var n,e=0,o=i.length;for(r=[],n=function(n,e){return r.push(function(i){return t(i,n,n.cp[n.cp.length-1],e.cp[0],e)})};e<o&&!(e>=i.length-1);)n(i[e],i[e+1]),e++;return r}();return function(t){return n(t,r)}}},easeInOut:function(t){var n,e;return null==t&&(t={}),n=null!=(e=t.friction)?e:H.easeInOut.defaults.friction,H.bezier({points:[{x:0,y:0,cp:[{x:.92-n/1e3,y:0}]},{x:1,y:1,cp:[{x:.08+n/1e3,y:1}]}]})},easeIn:function(t){var n,e;return null==t&&(t={}),n=null!=(e=t.friction)?e:H.easeIn.defaults.friction,H.bezier({points:[{x:0,y:0,cp:[{x:.92-n/1e3,y:0}]},{x:1,y:1,cp:[{x:1,y:1}]}]})},easeOut:function(t){var n,e;return null==t&&(t={}),n=null!=(e=t.friction)?e:H.easeOut.defaults.friction,H.bezier({points:[{x:0,y:0,cp:[{x:0,y:0}]},{x:1,y:1,cp:[{x:.08+n/1e3,y:1}]}]})},spring:function(t){var n,e,i,r,o;return null==t&&(t={}),Tools.extend(t,H.spring.defaults,!0),i=Math.max(1,t.frequency/20),r=Math.pow(20,t.friction/100),o=t.anticipationSize/1e3,n=function(n){var e,i;return i=o/(1-o),e=(i-0)/(i-0),(.8-e)/i*n*t.anticipationStrength/100+e},e=function(t){return Math.pow(r/10,-t)*(1-t)},function(t){var r,a,u,s;return s=t/(1-o)-o/(1-o),t<o?(u=o/(1-o)-o/(1-o),r=0/(1-o)-o/(1-o),u=Math.acos(1/n(u)),a=(Math.acos(1/n(r))-u)/(i*-o),r=n):(r=e,u=0,a=1),1-r(s)*Math.cos(i*(t-o)*a+u)}},bounce:function(t){var n,e,i,r;return null==t&&(t={}),Tools.extend(t,H.bounce.defaults),i=Math.max(1,t.frequency/20),r=Math.pow(20,t.friction/100),n=function(t){return Math.pow(r/10,-t)*(1-t)},e=function(t){return n(t)*Math.cos(i*t*1+-1.57)},e.initialForce=!0,e},gravity:function(t){var n,e,i,r,o,a;return null==t&&(t={}),Tools.extend(t,H.gravity.defaults),e=Math.min(t.bounciness/1250,.8),r=t.elasticity/1e3,i=[],n=function(){var i;for(i=Math.sqrt(.02),i={a:-i,b:i,H:1},t.initialForce&&(i.a=0,i.b*=2);.001<i.H;)n=i.b-i.a,i={a:i.b,b:i.b+n*e,H:i.H*e*e};return i.b}(),a=function(e,i,r,o){return n=i-e,e=2/n*o-1-2*e/n,r=e*e*r-r+1,t.initialForce&&(r=1-r),r},function(){var o,a,u;for(o=Math.sqrt(2/(100*n*n)),a={a:-o,b:o,H:1},t.initialForce&&(a.a=0,a.b*=2),i.push(a),u=[];1>a.b&&.001<a.H;)o=a.b-a.a,a={a:a.b,b:a.b+o*e,H:a.H*r},u.push(i.push(a));return u}(),o=function(n){var e,r;for(r=0,e=i[r];!(n>=e.a&&n<=e.b)&&(r+=1,e=i[r]););return e?a(e.a,e.b,e.H,n):t.initialForce?0:1},o.initialForce=t.initialForce,o},forceWithGravity:function(t){return null==t&&(t={}),Tools.extend(t,H.forceWithGravity.defaults),t.initialForce=!0,H.gravity(t)}};H.spring.defaults={frequency:300,friction:200,anticipationSize:0,anticipationStrength:0},H.bounce.defaults={frequency:300,friction:200},H.forceWithGravity.defaults=H.gravity.defaults={bounciness:400,elasticity:200},H.easeInOut.defaults=H.easeIn.defaults=H.easeOut.defaults={friction:500};var B={Linear:function(t,n){var e=t.length-1,i=e*n,r=Math.floor(i),o=B.Utils.Linear;return n<0?o(t[0],t[1],i):n>1?o(t[e],t[e-1],e-i):o(t[r],t[r+1>e?e:r+1],i-r)},Bezier:function(t,n){for(var e=0,i=t.length-1,r=Math.pow,o=B.Utils.Bernstein,a=0;a<=i;a++)e+=r(1-n,i-a)*r(n,a)*t[a]*o(i,a);return e},CatmullRom:function(t,n){var e=t.length-1,i=e*n,r=Math.floor(i),o=B.Utils.CatmullRom;return t[0]===t[e]?(n<0&&(r=Math.floor(i=e*(1+n))),o(t[(r-1+e)%e],t[r],t[(r+1)%e],t[(r+2)%e],i-r)):n<0?t[0]-(o(t[0],t[0],t[1],t[1],-i)-t[0]):n>1?t[e]-(o(t[e],t[e],t[e-1],t[e-1],i-e)-t[e]):o(t[r?r-1:0],t[r],t[e<r+1?e:r+1],t[e<r+2?e:r+2],i-r)},Utils:{Linear:function(t,n,e){return(n-t)*e+t},Bernstein:function(t,n){var e=B.Utils.Factorial;return e(t)/e(n)/e(t-n)},Factorial:function(){var t=[1];return function(n){var e=1;if(t[n])return t[n];for(var i=n;i>1;i--)e*=i;return t[n]=e,e}}(),CatmullRom:function(t,n,e,i,r){var o=.5*(e-t),a=.5*(i-n),u=r*r,s=r*u;return(2*n-2*e+o+a)*s+(-3*n+3*e-2*o-a)*u+o*r+n}}},L=/\s+|([A-Za-z?().,{}:""\[\]#]+)|([-+\/*%]+=)?([-+*\/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/gi,R=function t(n,e){return void 0===n&&(n={}),this.object=n,this._valuesStart=t.createEmptyConst(n),this._valuesEnd=t.createEmptyConst(n),this._duration=1e3,this._easingFunction=H.Linear.None,this._interpolationFunction=B.None,this._startTime=0,this._delayTime=0,this._repeat=0,this._r=null,this._isPlaying=!1,this._yoyo=!1,this._reversed=null,this._onStartCallbackFired=!1,this._pausedTime=null,e&&e.to?new t(n).to(e.to,e):this};R.createEmptyConst=function(t){return"number"==typeof t?0:Array.isArray(t)?[]:"object"==typeof t?{}:""},R.checkValidness=function(t){return void 0!==t&&null!==t&&""!==t&&NaN!==t&&t!==1/0},R.prototype.isPlaying=function(){return this._isPlaying},R.prototype.isStarted=function(){return this._onStartCallbackFired},R.prototype.reverse=function(){var t=this,n=t._reversed;return this._reversed=!n,this},R.prototype.reversed=function(){return this._reversed},R.prototype.off=function(t,n){if(!this._events||void 0===this._events[t])return this;if(void 0!==t&&void 0!==n)for(var e=this._events[t],i=0;i<e.length;)e[i]===n&&e.splice(i,1),i++;else void 0!==t&&void 0===n&&(this._events[t]=[]);return this},R.prototype.on=function(t,n){return this._events&&void 0!==this._events[t]||(this._events||(this._events={}),this._events[t]=[]),this._events[t].push(n),this},R.prototype.once=function(t,n){var e=this;return this._events&&void 0!==this._events[t]||(this._events||(this._events={}),this._events[t]=[]),this.on(t,function(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];n.call.apply(n,[e].concat(i)),e.off(t)})},R.prototype.emit=function(t,n,e,i,r,o){var a=this,u=this,s=u._events;if(!s)return this;var c=s[t];if(!c)return this;for(var f=c.length;f--;)c[f].call(a,n,e,i,r,o);return this},R.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,C(this),this._pausedTime=N(),this.emit("pause",this.object)):this},R.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=N()-this._pausedTime,E(this),this._pausedTime=N(),this.emit("play",this.object))},R.prototype.restart=function(t){return this._repeat=this._r,this._startTime=N()+(t?0:this._delayTime),this._isPlaying||E(this),this.emit("restart",this._object)},R.prototype.seek=function(t,n){return this._startTime=N()+Math.max(0,Math.min(t,this._duration)),this.emit("seek",t,this._object),n?this:this.pause()},R.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},R.prototype.to=function(t,n){var e=this;if(void 0===t&&(t={}),void 0===n&&(n=1e3),"number"==typeof t){var i={Number:t};this._valuesEnd=i}else this._valuesEnd=t;if("number"==typeof n)this._duration="function"==typeof n?n(this._duration):n;else if("object"==typeof n)for(var r in n)e[r]&&e[r]("function"==typeof n[r]?n[r](e._duration):n);return this},R.prototype.start=function(t){var e=this,r=this,o=r._startTime,a=r._delayTime,u=r._valuesEnd,s=(r._valuesStart,r.object);o=void 0!==t?t:N(),o+=a,this._startTime=o;for(var c in u){if("object"==typeof u[c])if(Array.isArray(u[c]))if("number"==typeof s[c])e._valuesEnd[c]=[s[c]].concat(u[c]);else{var f=n(e,{object:s[c],_valuesEnd:u[c],_events:void 0}).start().stop();e._valuesEnd[c]=f}else{var h=n(e,{object:s[c],_valuesEnd:u[c],_events:void 0}).start().stop();e._valuesStart[c]=1,e._valuesEnd[c]=h}else if("string"==typeof u[c]&&"string"==typeof s[c]&&L.test(s[c])&&L.test(u[c])){var p=s[c].match(L);p=p.map(i);var l=u[c].match(L);l=l.map(i);var v=n(e,{object:p,_valuesEnd:l,_events:{}}).start().stop();v.join=!0,e._valuesStart[c]=1,e._valuesEnd[c]=v}"function"==typeof s[c]&&(s[c]=e.object[c]=s[c](e)),"function"==typeof u[c]&&(e._valuesEnd[c]=u[c](e)),R.checkValidness(s[c])!==!1&&s[c]!==u[c]&&(e._valuesStart[c]=s[c])}return E(this),this._isPlaying=!0,this},R.prototype.stop=function(){var t=this,n=t._isPlaying,e=t.object;return n?(C(this),this._isPlaying=!1,this.stopChainedTweens(),this.emit("stop",e)):this},R.prototype.end=function(){var t=this,n=t._startTime,e=t._duration;return this.update(n+e)},R.prototype.stopChainedTweens=function(){var t=this,n=t._chainedTweens;return void 0===n&&(n=[]),n.map(function(t){return t.stop()}),this},R.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this},R.prototype.repeat=function(t){return this._repeat="function"==typeof t?t(this._repeat):t,this._r=this._repeat,this},R.prototype.repeatDelay=function(t){return this._repeatDelayTime="function"==typeof t?t(this._repeatDelayTime):t,this},R.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},R.prototype.yoyo=function(t){return this._yoyo="function"==typeof t?t(this._yoyo):t,this},R.prototype.easing=function(t){return this._easingFunction=t,this},R.prototype.interpolation=function(t){return this._interpolationFunction=t,this},R.prototype.chain=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return this._chainedTweens=t,this},R.prototype.get=function(t){return this.update(t),this.object},R.prototype.update=function(t){var n,i,r,o=this,a=this,u=a._onStartCallbackFired,s=a._chainedTweens,c=a._easingFunction,f=a._interpolationFunction,h=a._repeat,p=a._repeatDelayTime,l=a._reverseDelayTime,v=(a._delayTime,a._yoyo),d=a._reversed,y=a._startTime,m=a._duration,_=a._valuesStart,b=a._valuesEnd,g=a.object;if(t=void 0!==t?t:N(),t<y)return!0;u||(this.emit("start",g),this._onStartCallbackFired=!0),i=(t-y)/m,i=i>1?1:i,i=d?1-i:i,r=c(i);for(n in b)if(void 0!==_[n]){var w=_[n],M=b[n];if(M instanceof R){var T=M.get(t);M.join?g[n]=e(T):g[n]=T}else Array.isArray(M)?g[n]=f(M,r):"string"==typeof M?(M="+"===M.charAt(0)||"-"===M.charAt(0)?w+parseFloat(M):parseFloat(M),"number"==typeof M&&(g[n]=w+(M-w)*r)):"number"==typeof M&&(g[n]=w+(M-w)*r)}if(this.emit("update",g,r,i),1===i||d&&0===i){if(h){isFinite(h)&&this._repeat--;for(n in b)"string"==typeof b[n]&&"number"==typeof _[n]&&(o._valuesStart[n]=_[n]+parseFloat(b[n]));return this.emit(d?"reverse":"repeat",g),v&&(this._reversed=!d),!d&&p?this._startTime+=m+p:d&&l?this._startTime+=m+l:this._startTime+=m,!0}return this.emit("complete",g),s&&s.map(function(t){return t.start(y+m)}),!1}return!0};var U={filter:{grayscale:1,brightness:1,sepia:1,invert:1,saturate:1,contrast:1,blur:1,hueRotate:1,dropShadow:1},transform:{translate:1,translateX:1,translateY:1,translateZ:1,rotate:1,rotateX:1,rotateY:1,rotateZ:1,scale:1,scaleX:1,scaleY:1,scaleZ:1,skew:1,skewX:1,skewY:1}},W=function(){};W.DOM=function(t){var n=t.domNode,e=n.style;return{update:function(t,n){for(var i in n)e[i]=n[i]}}},W.Transform=function(t){var n=t.domNode,e=n.style;return{update:function(t,n){var i="";for(var r in n)"x"===r||"y"===r||"z"===r?i+=" translate3d( "+(n.x||"0px")+", "+(n.y||"0px")+", "+(n.z||"0px")+")":U.transform[r]&&(i+=" "+r+"( "+n[r]+")");i&&(e.transform=i)}}},W.Filter=function(t){var n=t.domNode,e=n.style;return{update:function(t,n){var i="";for(var r in n)U.filter[r]&&(i+=" "+r+"( "+n[r]+")");i&&(e.webkitFilter=e.filter=i)}}},W.Scroll=function(t){var n=t.domNode;return{update:function(t,e){for(var i in e)n[i]=e[i]}}};var X=function(t){this.domNode=t,this.plugins={};var n=this.plugins;return this.render=function(t){var e=this;for(var i in n)n[i]&&n[i].update&&n[i].update(e,t);return this},this.fetch=function(){var t=this;if(Object.keys(this.object).length)return this;for(var e in n)n[e]&&n[e].fetch&&n[e].fetch(t);return this},this.init=function(t){var e=this;for(var i in n)n[i]&&n[i].init&&n[i].init(e,t);return this},this},Y={object:{}};X.prototype.applyPlugin=function(t){return void 0!==W[t]&&(this.plugins[t]=W[t](this)),this},Y.object.set=function(t){return this.render(t)},X.prototype.cloneLayer=function(){return n(this,{},X)},X.prototype.appendTo=function(t){return t.appendChild(this.domNode),this},Object.defineProperties(X.prototype,Y);var Z=function(){return this._private={tweens:[],fullTime:0},this};Z.prototype.add=function(t){var n=this;if(t instanceof R)this._private.tweens.push(t);else if(Array.isArray(t)||"object"!=typeof t)"object"==typeof t&&t.map(function(t){n.add(t)});else{var e=new R({x:0});for(var i in t)e[i](t[i]);this.add(e)}return this},Z.prototype.start=function(){var t=this;return this._private.tweens.map(function(n){n.start(t._private.fullTime)}),this._private.fullTime=Math.max.apply(0,this._private.tweens.reduce(function(t,n){return n._duration>t?n._duration:t},0)),this};var G=function(t){return t};t.TweenInit=r,t.getAll=F,t.removeAll=O,t.remove=C,t.add=E,t.now=N,t.update=q,t.autoPlay=I,t.on=P,t.once=S,t.off=A,t.emit=j,t.Tween=R,t.Easing=H,t.Interpolation=B,t.Composite=X,t.Timeline=Z,t.Plugins=W,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.TWEEN=t.TWEEN||{})}(this,function(t){"use strict";function n(t,n,e){void 0===t&&(t={}),void 0===n&&(n={}),void 0===e&&(e=R);var i=new e;for(var r in t)void 0!==n[r]?i[r]=n[r]:i[r]=t[r];return i}function e(t){for(var n="",e=0,i=t.length;e<i;e++)n+=t[e];return n}function i(t){var n=parseFloat(t);return"number"!=typeof n||isNaN(n)?t:n}function r(t){var n=t.from,e=t.to,i=t.duration;void 0===i&&(i=1e3);var r=t.easing;void 0===r&&(r=G);var o=t.events,a=t.instance,u=new R(n,a).to(e,i).easing(G);o&&(u._events=o),t.start=u.start.bind(u)}void 0===Object.assign&&(Object.assign=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var e=t.shift();return t.map(function(t){for(var n in t)e[n]=t[n]}),e});var o="undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a=["webkit","moz","ms","o"],u="AnimationFrame",s="Request"+u,f="Cancel"+u,c="CancelRequest"+u,h=setTimeout,p=clearTimeout;if(void 0===o.requestAnimationFrame){var l,v,d=Date.now(),y=50/3,m=y;a.map(function(t){void 0===(l=o[t+s])&&(l=function(t){return h(function(){v=Date.now(),t(v-d),m=y+(Date.now()-v)},m)})}),void 0!==l&&(o.requestAnimationFrame=l)}if(void 0===o.cancelAnimationFrame&&void 0===(o.cancelAnimationFrame=o.cancelRequestAnimationFrame)){var _;a.map(function(t){void 0===(_=o[t+f])&&void 0===(_=o[t+c])&&(_=function(t){return p(t)})}),void 0!==_&&(o.cancelAnimationFrame=_)}void 0===Array.isArray&&(Array.isArray=function(t){return void 0!==t&&"object"==typeof t&&t.length&&void 0!==t.push&&void 0!==t.splice});var b,g=[],M=!1,w=!1,T={},x="undefined"!=typeof window?window:"undefined"!=typeof global?global:{},F=function(){return g},I=function(t){w=t},O=function(){g=[]},j=function(t,n,e,i,r,o){var a=this,u=T[t];if(u)for(var s=u.length;s--;)u[s].call(a,n,e,i,r,o)},A=function(t,n){if(void 0!==t&&void 0!==T[t])if(void 0!==n)for(var e=T[name],i=0;i<e.length;)e[i]===n&&e.splice(i,1),i++;else T[name]=[]},E=function(t){g.push(t),w&&!M&&(q(),M=!0,j("start")),j("add",t,g)},P=function(t,n){void 0===T[t]&&(T[t]=[]),T[t].push(n)},S=function(t,n){void 0===T[t]&&(T[t]=[]),P(t,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];n.apply(void 0,e),A(t)})},C=function(t){g.filter(function(n){return n!==t});for(var n,e=0;e<g.length;)n=g[e],n===t&&(j("remove",t,g),g.splice(e,1)),e++},N=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!==x.performance&&void 0!==x.performance.now)return x.performance.now.bind(x.performance);var t=x.performance&&x.performance.timing&&x.performance.timing.navigationStart?x.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}(),q=function(t,n){if(t=void 0!==t?t:N(),w&&(b=requestAnimationFrame(q)),j("update",t,g),0===g.length)return M=!1,cancelAnimationFrame(b),j("stop",t),!1;for(var e=0;e<g.length;)g[e].update(t)||n?e++:g.splice(e,1);return!0};if(x.document){var k=x.document,D=0,z=0;k.addEventListener("visibilitychange",function(t){return 0!==g.length&&(document.hidden?z=N():(D=N()-z,g.map(function(t){return t._startTime+=D})),!0)})}var H={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(-10*t,2)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(-10*(t-1),2)+2)}},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(10*(t-1),2)*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(-10*t,2)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2,t<1?-.5*Math.pow(10*(t-1),2)*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(-10*(t-1),2)*Math.sin(5*(t-1.1)*Math.PI)+1)}},Back:{In:function(t){var n=1.70158;return t*t*((n+1)*t-n)},Out:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},InOut:function(t){var n=2.5949095;return(t*=2)<1?.5*(t*t*((n+1)*t-n)):.5*((t-=2)*t*((n+1)*t+n)+2)}},Bounce:{In:function(t){return 1-H.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*H.Bounce.In(2*t):.5*H.Bounce.Out(2*t-1)+.5}},Stepped:function(t){return function(n){return Math.floor(n*t)/t}},Noisy:function(t,n){var e=1-t;return function(i){return t*Math.random()+e*n(i)}},get bezier(){var t,n;return t=function(t,n,e,i,r){var o=Math.pow(1-t,3),a=3*Math.pow(1-t,2)*t,u=3*(1-t)*Math.pow(t,2);return t=Math.pow(t,3),{x:o*n.x+a*e.x+u*i.x+t*r.x,y:o*n.y+a*e.y+u*i.y+t*r.y}},n=function(t,n){var e,i,r=0,o=0,a=n.length,u=0,s=1,f=(s+u)/2;for(e=null;o<a&&(i=n[o],t>=i(0).x&&t<=i(1).x&&(e=i),null===e);)o++;if(!e)return 1;for(i=e(f).x;1e-4<Math.abs(t-i)&&100>r;)t>i?u=f:s=f,f=(s+u)/2,i=e(f).x,r++;return e(f).y},function(e){null==e&&(e={});var i=e.points,r=function(){var n,e=0,o=i.length;for(r=[],n=function(n,e){return r.push(function(i){return t(i,n,n.cp[n.cp.length-1],e.cp[0],e)})};e<o&&!(e>=i.length-1);)n(i[e],i[e+1]),e++;return r}();return function(t){return n(t,r)}}},easeInOut:function(t){var n,e;return null==t&&(t={}),n=null!=(e=t.friction)?e:H.easeInOut.defaults.friction,H.bezier({points:[{x:0,y:0,cp:[{x:.92-n/1e3,y:0}]},{x:1,y:1,cp:[{x:.08+n/1e3,y:1}]}]})},easeIn:function(t){var n,e;return null==t&&(t={}),n=null!=(e=t.friction)?e:H.easeIn.defaults.friction,H.bezier({points:[{x:0,y:0,cp:[{x:.92-n/1e3,y:0}]},{x:1,y:1,cp:[{x:1,y:1}]}]})},easeOut:function(t){var n,e;return null==t&&(t={}),n=null!=(e=t.friction)?e:H.easeOut.defaults.friction,H.bezier({points:[{x:0,y:0,cp:[{x:0,y:0}]},{x:1,y:1,cp:[{x:.08+n/1e3,y:1}]}]})},spring:function(t){var n,e,i,r,o;return null==t&&(t={}),Tools.extend(t,H.spring.defaults,!0),i=Math.max(1,t.frequency/20),r=Math.pow(20,t.friction/100),o=t.anticipationSize/1e3,n=function(n){var e,i;return i=o/(1-o),e=(i-0)/(i-0),(.8-e)/i*n*t.anticipationStrength/100+e},e=function(t){return Math.pow(r/10,-t)*(1-t)},function(t){var r,a,u,s;return s=t/(1-o)-o/(1-o),t<o?(u=o/(1-o)-o/(1-o),r=0/(1-o)-o/(1-o),u=Math.acos(1/n(u)),a=(Math.acos(1/n(r))-u)/(i*-o),r=n):(r=e,u=0,a=1),1-r(s)*Math.cos(i*(t-o)*a+u)}},bounce:function(t){var n,e,i,r;return null==t&&(t={}),Tools.extend(t,H.bounce.defaults),i=Math.max(1,t.frequency/20),r=Math.pow(20,t.friction/100),n=function(t){return Math.pow(r/10,-t)*(1-t)},e=function(t){return n(t)*Math.cos(i*t*1+-1.57)},e.initialForce=!0,e},gravity:function(t){var n,e,i,r,o,a;return null==t&&(t={}),Tools.extend(t,H.gravity.defaults),e=Math.min(t.bounciness/1250,.8),r=t.elasticity/1e3,i=[],n=function(){var i;for(i=Math.sqrt(.02),i={a:-i,b:i,H:1},t.initialForce&&(i.a=0,i.b*=2);.001<i.H;)n=i.b-i.a,i={a:i.b,b:i.b+n*e,H:i.H*e*e};return i.b}(),a=function(e,i,r,o){return n=i-e,e=2/n*o-1-2*e/n,r=e*e*r-r+1,t.initialForce&&(r=1-r),r},function(){var o,a,u;for(o=Math.sqrt(2/(100*n*n)),a={a:-o,b:o,H:1},t.initialForce&&(a.a=0,a.b*=2),i.push(a),u=[];1>a.b&&.001<a.H;)o=a.b-a.a,a={a:a.b,b:a.b+o*e,H:a.H*r},u.push(i.push(a));return u}(),o=function(n){var e,r;for(r=0,e=i[r];!(n>=e.a&&n<=e.b)&&(r+=1,e=i[r]););return e?a(e.a,e.b,e.H,n):t.initialForce?0:1},o.initialForce=t.initialForce,o},forceWithGravity:function(t){return null==t&&(t={}),Tools.extend(t,H.forceWithGravity.defaults),t.initialForce=!0,H.gravity(t)}};H.spring.defaults={frequency:300,friction:200,anticipationSize:0,anticipationStrength:0},H.bounce.defaults={frequency:300,friction:200},H.forceWithGravity.defaults=H.gravity.defaults={bounciness:400,elasticity:200},H.easeInOut.defaults=H.easeIn.defaults=H.easeOut.defaults={friction:500};var B={Linear:function(t,n){var e=t.length-1,i=e*n,r=Math.floor(i),o=B.Utils.Linear;return n<0?o(t[0],t[1],i):n>1?o(t[e],t[e-1],e-i):o(t[r],t[r+1>e?e:r+1],i-r)},Bezier:function(t,n){for(var e=0,i=t.length-1,r=Math.pow,o=B.Utils.Bernstein,a=0;a<=i;a++)e+=r(1-n,i-a)*r(n,a)*t[a]*o(i,a);return e},CatmullRom:function(t,n){var e=t.length-1,i=e*n,r=Math.floor(i),o=B.Utils.CatmullRom;return t[0]===t[e]?(n<0&&(r=Math.floor(i=e*(1+n))),o(t[(r-1+e)%e],t[r],t[(r+1)%e],t[(r+2)%e],i-r)):n<0?t[0]-(o(t[0],t[0],t[1],t[1],-i)-t[0]):n>1?t[e]-(o(t[e],t[e],t[e-1],t[e-1],i-e)-t[e]):o(t[r?r-1:0],t[r],t[e<r+1?e:r+1],t[e<r+2?e:r+2],i-r)},Utils:{Linear:function(t,n,e){return(n-t)*e+t},Bernstein:function(t,n){var e=B.Utils.Factorial;return e(t)/e(n)/e(t-n)},Factorial:function(){var t=[1];return function(n){var e=1;if(t[n])return t[n];for(var i=n;i>1;i--)e*=i;return t[n]=e,e}}(),CatmullRom:function(t,n,e,i,r){var o=.5*(e-t),a=.5*(i-n),u=r*r,s=r*u;return(2*n-2*e+o+a)*s+(-3*n+3*e-2*o-a)*u+o*r+n}}},L=/\s+|([A-Za-z?().,{}:""\[\]#]+)|([-+\/*%]+=)?([-+*\/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/gi,R=function t(n,e){return void 0===n&&(n={}),this.object=n,this._valuesStart=t.createEmptyConst(n),this._valuesEnd=t.createEmptyConst(n),this._duration=1e3,this._easingFunction=H.Linear.None,this._interpolationFunction=B.None,this._startTime=0,this._delayTime=0,this._repeat=0,this._r=null,this._isPlaying=!1,this._yoyo=!1,this._reversed=null,this._onStartCallbackFired=!1,this._pausedTime=null,e&&e.to?new t(n).to(e.to,e):this};R.createEmptyConst=function(t){return"number"==typeof t?0:Array.isArray(t)?[]:"object"==typeof t?{}:""},R.checkValidness=function(t){return void 0!==t&&null!==t&&""!==t&&NaN!==t&&t!==1/0},R.prototype.isPlaying=function(){return this._isPlaying},R.prototype.isStarted=function(){return this._onStartCallbackFired},R.prototype.reverse=function(){var t=this,n=t._reversed;return this._reversed=!n,this},R.prototype.reversed=function(){return this._reversed},R.prototype.off=function(t,n){if(!this._events||void 0===this._events[t])return this;if(void 0!==t&&void 0!==n)for(var e=this._events[t],i=0;i<e.length;)e[i]===n&&e.splice(i,1),i++;else void 0!==t&&void 0===n&&(this._events[t]=[]);return this},R.prototype.on=function(t,n){return this._events&&void 0!==this._events[t]||(this._events||(this._events={}),this._events[t]=[]),this._events[t].push(n),this},R.prototype.once=function(t,n){var e=this;return this._events&&void 0!==this._events[t]||(this._events||(this._events={}),this._events[t]=[]),this.on(t,function(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];n.call.apply(n,[e].concat(i)),e.off(t)})},R.prototype.emit=function(t,n,e,i,r,o){var a=this,u=this,s=u._events;if(!s)return this;var f=s[t];if(!f)return this;for(var c=f.length;c--;)f[c].call(a,n,e,i,r,o);return this},R.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,C(this),this._pausedTime=N(),this.emit("pause",this.object)):this},R.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=N()-this._pausedTime,E(this),this._pausedTime=N(),this.emit("play",this.object))},R.prototype.restart=function(t){return this._repeat=this._r,this._startTime=N()+(t?0:this._delayTime),this._isPlaying||E(this),this.emit("restart",this._object)},R.prototype.seek=function(t,n){return this._startTime=N()+Math.max(0,Math.min(t,this._duration)),this.emit("seek",t,this._object),n?this:this.pause()},R.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},R.prototype.to=function(t,n){var e=this;if(void 0===t&&(t={}),void 0===n&&(n=1e3),"number"==typeof t){var i={Number:t};this._valuesEnd=i}else this._valuesEnd=t;if("number"==typeof n)this._duration="function"==typeof n?n(this._duration):n;else if("object"==typeof n)for(var r in n)e[r]&&e[r]("function"==typeof n[r]?n[r](e._duration):n);return this},R.prototype.start=function(t){var e=this,r=this,o=r._startTime,a=r._delayTime,u=r._valuesEnd,s=(r._valuesStart,r.object);o=void 0!==t?t:N(),o+=a,this._startTime=o;for(var f in u){if("object"==typeof u[f])if(Array.isArray(u[f]))if("number"==typeof s[f])e._valuesEnd[f]=[s[f]].concat(u[f]);else{var c=n(e,{object:s[f],_valuesEnd:u[f],_events:void 0}).start().stop();e._valuesEnd[f]=c}else{var h=n(e,{object:s[f],_valuesEnd:u[f],_events:void 0}).start().stop();e._valuesStart[f]=1,e._valuesEnd[f]=h}else if("string"==typeof u[f]&&"string"==typeof s[f]&&L.test(s[f])&&L.test(u[f])){var p=s[f].match(L);p=p.map(i);var l=u[f].match(L);l=l.map(i);var v=n(e,{object:p,_valuesEnd:l,_events:{}}).start().stop();v.join=!0,e._valuesStart[f]=1,e._valuesEnd[f]=v}"function"==typeof s[f]&&(s[f]=e.object[f]=s[f](e)),"function"==typeof u[f]&&(e._valuesEnd[f]=u[f](e)),R.checkValidness(s[f])!==!1&&s[f]!==u[f]&&(e._valuesStart[f]=s[f])}return E(this),this._isPlaying=!0,this},R.prototype.stop=function(){var t=this,n=t._isPlaying,e=t.object;return n?(C(this),this._isPlaying=!1,this.stopChainedTweens(),this.emit("stop",e)):this},R.prototype.end=function(){var t=this,n=t._startTime,e=t._duration;return this.update(n+e)},R.prototype.stopChainedTweens=function(){var t=this,n=t._chainedTweens;return void 0===n&&(n=[]),n.map(function(t){return t.stop()}),this},R.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this},R.prototype.repeat=function(t){return this._repeat="function"==typeof t?t(this._repeat):t,this._r=this._repeat,this},R.prototype.repeatDelay=function(t){return this._repeatDelayTime="function"==typeof t?t(this._repeatDelayTime):t,this},R.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},R.prototype.yoyo=function(t){return this._yoyo="function"==typeof t?t(this._yoyo):t,this},R.prototype.easing=function(t){return this._easingFunction=t,this},R.prototype.interpolation=function(t){return this._interpolationFunction=t,this},R.prototype.chain=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return this._chainedTweens=t,this},R.prototype.get=function(t){return this.update(t),this.object},R.prototype.update=function(t){var n,i,r,o=this,a=this,u=a._onStartCallbackFired,s=a._chainedTweens,f=a._easingFunction,c=a._interpolationFunction,h=a._repeat,p=a._repeatDelayTime,l=a._reverseDelayTime,v=(a._delayTime,a._yoyo),d=a._reversed,y=a._startTime,m=a._duration,_=a._valuesStart,b=a._valuesEnd,g=a.object;if(t=void 0!==t?t:N(),t<y)return!0;u||(this.emit("start",g),this._onStartCallbackFired=!0),i=(t-y)/m,i=i>1?1:i,i=d?1-i:i,r=f(i);for(n in b)if(void 0!==_[n]){var M=_[n],w=b[n];if(w instanceof R){var T=w.get(t);w.join?g[n]=e(T):g[n]=T}else Array.isArray(w)?g[n]=c(w,r):"string"==typeof w?(w="+"===w.charAt(0)||"-"===w.charAt(0)?M+parseFloat(w):parseFloat(w),"number"==typeof w&&(g[n]=M+(w-M)*r)):"number"==typeof w&&(g[n]=M+(w-M)*r)}if(this.emit("update",g,r,i),1===i||d&&0===i){if(h){isFinite(h)&&this._repeat--;for(n in b)"string"==typeof b[n]&&"number"==typeof _[n]&&(o._valuesStart[n]=_[n]+parseFloat(b[n]));return this.emit(d?"reverse":"repeat",g),v&&(this._reversed=!d),!d&&p?this._startTime+=m+p:d&&l?this._startTime+=m+l:this._startTime+=m,!0}return this.emit("complete",g),s&&s.map(function(t){return t.start(y+m)}),!1}return!0};var U={filter:{grayscale:1,brightness:1,sepia:1,invert:1,saturate:1,contrast:1,blur:1,hueRotate:1,dropShadow:1},transform:{translate:1,translateX:1,translateY:1,translateZ:1,rotate:1,rotateX:1,rotateY:1,rotateZ:1,scale:1,scaleX:1,scaleY:1,scaleZ:1,skew:1,skewX:1,skewY:1}},W=function(){};W.DOM=function(t){var n=t.domNode,e=n.style;return{update:function(t,n){for(var i in n)e[i]=n[i]}}},W.Transform=function(t){var n=t.domNode,e=n.style;return{update:function(t,n){var i="";for(var r in n)"x"===r||"y"===r||"z"===r?i+=" translate3d( "+(n.x||"0px")+", "+(n.y||"0px")+", "+(n.z||"0px")+")":U.transform[r]&&(i+=" "+r+"( "+n[r]+")");i&&(e.transform=i)}}},W.Filter=function(t){var n=t.domNode,e=n.style;return{update:function(t,n){var i="";for(var r in n)U.filter[r]&&(i+=" "+r+"( "+n[r]+")");i&&(e.webkitFilter=e.filter=i)}}},W.Scroll=function(t){var n=t.domNode;return{update:function(t,e){for(var i in e)n[i]=e[i]}}};var X=function(t){this.domNode=t,this.plugins={};var n=this.plugins;return this.render=function(t){var e=this;for(var i in n)n[i]&&n[i].update&&n[i].update(e,t);return this},this.fetch=function(){var t=this;if(Object.keys(this.object).length)return this;for(var e in n)n[e]&&n[e].fetch&&n[e].fetch(t);return this},this.init=function(t){var e=this;for(var i in n)n[i]&&n[i].init&&n[i].init(e,t);return this},this},Y={object:{}};X.prototype.applyPlugin=function(t){return void 0!==W[t]&&(this.plugins[t]=W[t](this)),this},Y.object.set=function(t){return this.render(t)},X.prototype.cloneLayer=function(){return n(this,{},X)},X.prototype.appendTo=function(t){return t.appendChild(this.domNode),this},Object.defineProperties(X.prototype,Y);var Z=function(){return this._private={tweens:[],fullTime:0},this};Z.prototype.add=function(t){var n=this;if(t instanceof R)this._private.tweens.push(t);else if(Array.isArray(t)||"object"!=typeof t)"object"==typeof t&&t.map(function(t){n.add(t)});else{var e=new R({x:0});for(var i in t)e[i](t[i]);this.add(e)}return this},Z.prototype.start=function(){var t=this;return this._private.tweens.map(function(n){n.start(t._private.fullTime)}),this._private.fullTime=Math.max.apply(0,this._private.tweens.reduce(function(t,n){return n._duration>t?n._duration:t},0)),this};var G=function(t){return t};t.TweenInit=r,t.getAll=F,t.removeAll=O,t.remove=C,t.add=E,t.now=N,t.update=q,t.autoPlay=I,t.on=P,t.once=S,t.off=A,t.emit=j,t.Tween=R,t.Easing=H,t.Interpolation=B,t.Composite=X,t.Timeline=Z,t.Plugins=W,Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "es6-tween", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "ES6 implementation of amazing tween.js", | ||
@@ -12,3 +12,3 @@ "main": "dist/TWEEN.js", | ||
"source": "rollup -c --sourcemap", | ||
"prepublish": "npm run source && npm run build", | ||
"prepublishOnly": "npm run source && npm run build", | ||
"dev": "rollup -c -w --sourcemap", | ||
@@ -15,0 +15,0 @@ "test": "npm run test-unit && npm run test-correctness && npm run test-style", |
@@ -9,3 +9,3 @@ import buble from 'rollup-plugin-buble'; | ||
let moduleName = 'Tween'; | ||
let moduleName = 'TWEEN'; | ||
let destFile = 'dist/' + moduleName; | ||
@@ -24,4 +24,4 @@ | ||
dest: destFile, // equivalent to --output | ||
moduleName: moduleName.toUpperCase(), | ||
moduleName: moduleName, | ||
plugins: plugins | ||
} |
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
309822
2857