@eva/plugin-transition 1.2.7-editor.1 → 1.2.7-editor.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{};var _EVA_IIFE_transition=function(t,e){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function n(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r,o={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-o.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*o.Bounce.In(2*t):.5*o.Bounce.Out(2*t-1)+.5}}},s="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},a=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(e){return t._tweens[e]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,e){void 0===t&&(t=s()),void 0===e&&(e=!1);var i=Object.keys(this._tweens);if(0===i.length)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n<i.length;n++){var r=this._tweens[i[n]],o=!e;r&&!1===r.update(t,o)&&!e&&delete this._tweens[i[n]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),u={Linear:function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n),o=u.Utils.Linear;return e<0?o(t[0],t[1],n):e>1?o(t[i],t[i-1],i-n):o(t[r],t[r+1>i?i:r+1],n-r)},Bezier:function(t,e){for(var i=0,n=t.length-1,r=Math.pow,o=u.Utils.Bernstein,s=0;s<=n;s++)i+=r(1-e,n-s)*r(e,s)*t[s]*o(n,s);return i},CatmullRom:function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n),o=u.Utils.CatmullRom;return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),o(t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i],n-r)):e<0?t[0]-(o(t[0],t[0],t[1],t[1],-n)-t[0]):e>1?t[i]-(o(t[i],t[i],t[i-1],t[i-1],n-i)-t[i]):o(t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2],n-r)},Utils:{Linear:function(t,e,i){return(e-t)*i+t},Bernstein:function(t,e){var i=u.Utils.Factorial;return i(t)/i(e)/i(t-e)},Factorial:(r=[1],function(t){var e=1;if(r[t])return r[t];for(var i=t;i>1;i--)e*=i;return r[t]=e,e}),CatmullRom:function(t,e,i,n,r){var o=.5*(i-t),s=.5*(n-e),a=r*r;return(2*e-2*i+o+s)*(r*a)+(-3*e+3*i-2*o-s)*a+o*r+e}}},h=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),p=new a,c=function(){function t(t,e){void 0===e&&(e=p),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=o.Linear.None,this._interpolationFunction=u.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=h.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?s()+parseFloat(t):t:s(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,e,i,n){for(var r in i){var o=t[r],s=Array.isArray(o),a=s?"array":typeof o,u=!s&&Array.isArray(i[r]);if("undefined"!==a&&"function"!==a){if(u){var h=i[r];if(0===h.length)continue;h=h.map(this._handleRelativeValue.bind(this,o)),i[r]=[o].concat(h)}if("object"!==a&&!s||!o||u)void 0===e[r]&&(e[r]=o),s||(e[r]*=1),n[r]=u?i[r].slice().reverse():e[r]||0;else{for(var p in e[r]=s?[]:{},o)e[r][p]=o[p];n[r]=s?[]:{},this._setupProperties(o,e[r],i[r],n[r])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(t){return void 0===t&&(t=s()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this)),this},t.prototype.resume=function(t){return void 0===t&&(t=s()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},t.prototype.group=function(t){return this._group=t,this},t.prototype.delay=function(t){return this._delayTime=t,this},t.prototype.repeat=function(t){return this._initialRepeat=t,this._repeat=t,this},t.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},t.prototype.yoyo=function(t){return this._yoyo=t,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return this._interpolationFunction=t,this},t.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},t.prototype.onStart=function(t){return this._onStartCallback=t,this},t.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},t.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},t.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},t.prototype.onStop=function(t){return this._onStopCallback=t,this},t.prototype.update=function(t,e){if(void 0===t&&(t=s()),void 0===e&&(e=!0),this._isPaused)return!0;var i,n,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=0===this._duration||n>1?1:n;var o=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(i in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[i]||(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,u=this._chainedTweens.length;a<u;a++)this._chainedTweens[a].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(t,e,i,n){for(var r in i)if(void 0!==e[r]){var o=e[r]||0,s=i[r],a=Array.isArray(t[r]),u=Array.isArray(s);!a&&u?t[r]=this._interpolationFunction(s,n):"object"==typeof s&&s?this._updateProperties(t[r],o,s,n):"number"==typeof(s=this._handleRelativeValue(o,s))&&(t[r]=o+(s-o)*n)}},t.prototype._handleRelativeValue=function(t,e){return"string"!=typeof e?e:"+"===e.charAt(0)||"-"===e.charAt(0)?t+parseFloat(e):parseFloat(e)},t.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];this._valuesStartRepeat[t]="string"==typeof i?this._valuesStartRepeat[t]+parseFloat(i):this._valuesEnd[t],this._valuesEnd[t]=e},t}(),l=p;l.getAll.bind(l),l.removeAll.bind(l),l.add.bind(l),l.remove.bind(l),l.update.bind(l);var f={linear:o.Linear.None,"ease-in":o.Quadratic.In,"ease-out":o.Quadratic.Out,"ease-in-out":o.Quadratic.InOut,"bounce-in":o.Bounce.In,"bounce-out":o.Bounce.Out,"bounce-in-out":o.Bounce.InOut,none:function(t){return~~t}},_=function(){function t(t,e){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=e}return t.prototype.on=function(t,e){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(e)},t.prototype.emit=function(t){var e=this.callbacks.get(t);e&&e.length&&e.forEach((function(t){return t()}))},t.prototype.checkFinish=function(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}},t.prototype.getObjectCache=function(t,e){var i=""+t.gameObject.id+t.name;if(this.objectCache[i]||(this.objectCache[i]={}),this.objectCache[i][e])return this.objectCache[i][e];for(var n=e.split("."),r=n.length-1,o=t,s=0;s<r;s++)o=o[n[s]];return this.objectCache[i][e]={property:o,key:n[r]},this.objectCache[i][e]},t.prototype.doAnim=function(t){var e=t.component,i=t.name,n=t.value,r=this.getObjectCache(e,i);r.property[r.key]=n},t.prototype.init=function(){var t,e=this;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach((function(i,n){for(var r=0;r<i.values.length-1;r++){var o=i.values[r],s=i.values[r+1],a=new c({value:o.value},e.tweenGroup).to({value:s.value}).duration(s.time-o.time).easing(f[o.tween]).onUpdate((function(t){e.doAnim({component:i.component,name:i.name,value:t.value})}));0===r?e.tweens[n]=a:t.chain(a),t=a}t&&t.onComplete((function(){return e.checkFinishFunc()}))}))},t.prototype.play=function(t,e){void 0===t&&(t=1),this.currentTime=e,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t},t.prototype.start=function(){var t=this;this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((function(e){return e.start(t.currentTime)}))},t.prototype.pause=function(){var t=this;this.tweens.forEach((function(e){return e.pause(t.currentTime)}))},t.prototype.resume=function(){var t=this;this.tweens.forEach((function(e){return e.resume(t.currentTime)}))},t.prototype.stop=function(){this.stoped=!0,this.tweens.forEach((function(t){return t.stop()}))},t.prototype.destroy=function(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null},t}(),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.animations={},e.group={},e.currentTime=0,e.needPlay=[],e}return n(e,t),e.prototype.init=function(t){var e=(void 0===t?{group:{}}:t).group;this.group=e,this.tweenGroup=new a},e.prototype.awake=function(){for(var t in this.group)this.newAnimation(t)},e.prototype.play=function(t,e){t||(t=Object.keys(this.group)[0]),t&&!this.animations[t]&&this.group[t]&&this.newAnimation(t),t&&this.animations[t]&&this.needPlay.push({name:t,iteration:e})},e.prototype.stop=function(t){var e,i;if(t)null===(i=this.animations[t])||void 0===i||i.stop();else for(var n in this.animations)null===(e=this.animations[n])||void 0===e||e.stop()},e.prototype.onPause=function(){var t;for(var e in this.animations)null===(t=this.animations[e])||void 0===t||t.pause()},e.prototype.onResume=function(){var t;for(var e in this.animations)null===(t=this.animations[e])||void 0===t||t.resume()},e.prototype.onDestroy=function(){var t;for(var e in this.animations)null===(t=this.animations[e])||void 0===t||t.destroy();this.tweenGroup.removeAll(),this.tweenGroup=null,this.group=null,this.animations=null,this.removeAllListeners()},e.prototype.update=function(t){var e,i,n;for(var r in this.currentTime=t.time,this.animations)this.animations[r].currentTime=t.time;this.tweenGroup.update(t.time);try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.needPlay),s=o.next();!s.done;s=o.next()){var a=s.value;null===(n=this.animations[a.name])||void 0===n||n.play(a.iteration,this.currentTime)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}this.needPlay.length=0},e.prototype.newAnimation=function(t){var e=this,i=new _(this.group[t],this.tweenGroup);i.on("finish",(function(){return e.emit("finish",t)})),this.animations[t]=i},e.componentName="Transition",e}(e.Component),y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="transition",e}return n(e,t),e.systemName="transition",e}(e.System);return t.Transition=d,t.TransitionSystem=y,Object.defineProperty(t,"__esModule",{value:!0}),t}({},EVA);window.EVA.plugin.transition=window.EVA.plugin.transition||_EVA_IIFE_transition;
1
+ window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{};var _EVA_IIFE_transition=function(t,e){"use strict";var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},i(t,e)};function n(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r,o={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-o.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*o.Bounce.In(2*t):.5*o.Bounce.Out(2*t-1)+.5}}},s="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},a=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(e){return t._tweens[e]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,e){void 0===t&&(t=s()),void 0===e&&(e=!1);var i=Object.keys(this._tweens);if(0===i.length)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n<i.length;n++){var r=this._tweens[i[n]],o=!e;r&&!1===r.update(t,o)&&!e&&delete this._tweens[i[n]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),u={Linear:function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n),o=u.Utils.Linear;return e<0?o(t[0],t[1],n):e>1?o(t[i],t[i-1],i-n):o(t[r],t[r+1>i?i:r+1],n-r)},Bezier:function(t,e){for(var i=0,n=t.length-1,r=Math.pow,o=u.Utils.Bernstein,s=0;s<=n;s++)i+=r(1-e,n-s)*r(e,s)*t[s]*o(n,s);return i},CatmullRom:function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n),o=u.Utils.CatmullRom;return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),o(t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i],n-r)):e<0?t[0]-(o(t[0],t[0],t[1],t[1],-n)-t[0]):e>1?t[i]-(o(t[i],t[i],t[i-1],t[i-1],n-i)-t[i]):o(t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2],n-r)},Utils:{Linear:function(t,e,i){return(e-t)*i+t},Bernstein:function(t,e){var i=u.Utils.Factorial;return i(t)/i(e)/i(t-e)},Factorial:(r=[1],function(t){var e=1;if(r[t])return r[t];for(var i=t;i>1;i--)e*=i;return r[t]=e,e}),CatmullRom:function(t,e,i,n,r){var o=.5*(i-t),s=.5*(n-e),a=r*r;return(2*e-2*i+o+s)*(r*a)+(-3*e+3*i-2*o-s)*a+o*r+e}}},h=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),p=new a,c=function(){function t(t,e){void 0===e&&(e=p),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=o.Linear.None,this._interpolationFunction=u.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=h.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?s()+parseFloat(t):t:s(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,e,i,n){for(var r in i){var o=t[r],s=Array.isArray(o),a=s?"array":typeof o,u=!s&&Array.isArray(i[r]);if("undefined"!==a&&"function"!==a){if(u){var h=i[r];if(0===h.length)continue;h=h.map(this._handleRelativeValue.bind(this,o)),i[r]=[o].concat(h)}if("object"!==a&&!s||!o||u)void 0===e[r]&&(e[r]=o),s||(e[r]*=1),n[r]=u?i[r].slice().reverse():e[r]||0;else{for(var p in e[r]=s?[]:{},o)e[r][p]=o[p];n[r]=s?[]:{},this._setupProperties(o,e[r],i[r],n[r])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(t){return void 0===t&&(t=s()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this)),this},t.prototype.resume=function(t){return void 0===t&&(t=s()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},t.prototype.group=function(t){return this._group=t,this},t.prototype.delay=function(t){return this._delayTime=t,this},t.prototype.repeat=function(t){return this._initialRepeat=t,this._repeat=t,this},t.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},t.prototype.yoyo=function(t){return this._yoyo=t,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return this._interpolationFunction=t,this},t.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},t.prototype.onStart=function(t){return this._onStartCallback=t,this},t.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},t.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},t.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},t.prototype.onStop=function(t){return this._onStopCallback=t,this},t.prototype.update=function(t,e){if(void 0===t&&(t=s()),void 0===e&&(e=!0),this._isPaused)return!0;var i,n,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=0===this._duration||n>1?1:n;var o=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(i in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[i]||(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,u=this._chainedTweens.length;a<u;a++)this._chainedTweens[a].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(t,e,i,n){for(var r in i)if(void 0!==e[r]){var o=e[r]||0,s=i[r],a=Array.isArray(t[r]),u=Array.isArray(s);!a&&u?t[r]=this._interpolationFunction(s,n):"object"==typeof s&&s?this._updateProperties(t[r],o,s,n):"number"==typeof(s=this._handleRelativeValue(o,s))&&(t[r]=o+(s-o)*n)}},t.prototype._handleRelativeValue=function(t,e){return"string"!=typeof e?e:"+"===e.charAt(0)||"-"===e.charAt(0)?t+parseFloat(e):parseFloat(e)},t.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];this._valuesStartRepeat[t]="string"==typeof i?this._valuesStartRepeat[t]+parseFloat(i):this._valuesEnd[t],this._valuesEnd[t]=e},t}(),l=p;l.getAll.bind(l),l.removeAll.bind(l),l.add.bind(l),l.remove.bind(l),l.update.bind(l);var f={linear:o.Linear.None,"ease-in":o.Quadratic.In,"ease-out":o.Quadratic.Out,"ease-in-out":o.Quadratic.InOut,"bounce-in":o.Bounce.In,"bounce-out":o.Bounce.Out,"bounce-in-out":o.Bounce.InOut,none:function(t){return~~t}},_=function(){function t(t,e){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=e}return t.prototype.on=function(t,e){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(e)},t.prototype.emit=function(t){var e=this.callbacks.get(t);e&&e.length&&e.forEach((function(t){return t()}))},t.prototype.checkFinish=function(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}},t.prototype.getObjectCache=function(t,e){var i=""+t.gameObject.id+t.name;if(this.objectCache[i]||(this.objectCache[i]={}),this.objectCache[i][e])return this.objectCache[i][e];for(var n=e.split("."),r=n.length-1,o=t,s=0;s<r;s++)o=o[n[s]];return this.objectCache[i][e]={property:o,key:n[r]},this.objectCache[i][e]},t.prototype.doAnim=function(t){var e=t.component,i=t.name,n=t.value,r=this.getObjectCache(e,i);r.property[r.key]=n},t.prototype.init=function(){var t,e=this;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach((function(i,n){for(var r=0;r<i.values.length-1;r++){var o=i.values[r],s=i.values[r+1],a=new c({value:o.value},e.tweenGroup).to({value:s.value}).duration(s.time-o.time).easing(f[o.tween]).onUpdate((function(t){e.doAnim({component:i.component,name:i.name,value:t.value})}));0===r?e.tweens[n]=a:t.chain(a),t=a}t&&t.onComplete((function(){return e.checkFinishFunc()}))}))},t.prototype.play=function(t,e){void 0===t&&(t=1),this.currentTime=e,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t},t.prototype.start=function(){var t=this;this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((function(e){return e.start(t.currentTime)}))},t.prototype.pause=function(){var t=this;this.tweens.forEach((function(e){return e.pause(t.currentTime)}))},t.prototype.resume=function(){var t=this;this.tweens.forEach((function(e){return e.resume(t.currentTime)}))},t.prototype.stop=function(){this.stoped=!0,this.tweens.forEach((function(t){return t.stop()}))},t.prototype.destroy=function(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null},t}(),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.animations={},e.group={},e.currentTime=0,e.needPlay=[],e}return n(e,t),e.prototype.init=function(t){var e=(void 0===t?{group:{}}:t).group;this.group=e,this.tweenGroup=new a},e.prototype.awake=function(){for(var t in this.group)this.newAnimation(t)},e.prototype.play=function(t,e){t||(t=Object.keys(this.group)[0]),t&&!this.animations[t]&&this.group[t]&&this.newAnimation(t),t&&this.animations[t]&&this.needPlay.push({name:t,iteration:e})},e.prototype.stop=function(t){var e,i;if(t)null===(i=this.animations[t])||void 0===i||i.stop();else for(var n in this.animations)null===(e=this.animations[n])||void 0===e||e.stop()},e.prototype.onPause=function(){var t;for(var e in this.animations)null===(t=this.animations[e])||void 0===t||t.pause()},e.prototype.onResume=function(){var t;for(var e in this.animations)null===(t=this.animations[e])||void 0===t||t.resume()},e.prototype.onDestroy=function(){var t;for(var e in this.animations)null===(t=this.animations[e])||void 0===t||t.destroy();this.tweenGroup.removeAll(),this.tweenGroup=null,this.group=null,this.animations=null,this.removeAllListeners()},e.prototype.update=function(t){var e,i,n;for(var r in this.currentTime=t.time,this.animations)this.animations[r].currentTime=t.time;this.tweenGroup.update(t.time);try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.needPlay),s=o.next();!s.done;s=o.next()){var a=s.value;null===(n=this.animations[a.name])||void 0===n||n.play(a.iteration,this.currentTime)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}this.needPlay.length=0},e.prototype.newAnimation=function(t){var e=this,i=new _(this.group[t],this.tweenGroup);i.on("finish",(function(){return e.emit("finish",t)})),this.animations[t]=i},e.componentName="Transition",e}(e.Component),y=d,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="transition",e}return n(e,t),e.systemName="transition",e}(e.System),m=v;return t.Transition=y,t.TransitionSystem=m,Object.defineProperty(t,"__esModule",{value:!0}),t}({},EVA);window.EVA.plugin.transition=window.EVA.plugin.transition||_EVA_IIFE_transition;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@tweenjs/tween.js"),n=require("@eva/eva.js"),i=function(t,n){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(t,n)};function e(t,n){function e(){this.constructor=t}i(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var o={linear:t.Easing.Linear.None,"ease-in":t.Easing.Quadratic.In,"ease-out":t.Easing.Quadratic.Out,"ease-in-out":t.Easing.Quadratic.InOut,"bounce-in":t.Easing.Bounce.In,"bounce-out":t.Easing.Bounce.Out,"bounce-in-out":t.Easing.Bounce.InOut,none:function(t){return~~t}},r=function(){function n(t,n){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=n}return n.prototype.on=function(t,n){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(n)},n.prototype.emit=function(t){var n=this.callbacks.get(t);n&&n.length&&n.forEach((function(t){return t()}))},n.prototype.checkFinish=function(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}},n.prototype.getObjectCache=function(t,n){var i=""+t.gameObject.id+t.name;if(this.objectCache[i]||(this.objectCache[i]={}),this.objectCache[i][n])return this.objectCache[i][n];for(var e=n.split("."),o=e.length-1,r=t,s=0;s<o;s++)r=r[e[s]];return this.objectCache[i][n]={property:r,key:e[o]},this.objectCache[i][n]},n.prototype.doAnim=function(t){var n=t.component,i=t.name,e=t.value,o=this.getObjectCache(n,i);o.property[o.key]=e},n.prototype.init=function(){var n,i=this;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach((function(e,r){for(var s=0;s<e.values.length-1;s++){var a=e.values[s],u=e.values[s+1],h=new t.Tween({value:a.value},i.tweenGroup).to({value:u.value}).duration(u.time-a.time).easing(o[a.tween]).onUpdate((function(t){i.doAnim({component:e.component,name:e.name,value:t.value})}));0===s?i.tweens[r]=h:n.chain(h),n=h}n&&n.onComplete((function(){return i.checkFinishFunc()}))}))},n.prototype.play=function(t,n){void 0===t&&(t=1),this.currentTime=n,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t},n.prototype.start=function(){var t=this;this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((function(n){return n.start(t.currentTime)}))},n.prototype.pause=function(){var t=this;this.tweens.forEach((function(n){return n.pause(t.currentTime)}))},n.prototype.resume=function(){var t=this;this.tweens.forEach((function(n){return n.resume(t.currentTime)}))},n.prototype.stop=function(){this.stoped=!0,this.tweens.forEach((function(t){return t.stop()}))},n.prototype.destroy=function(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null},n}(),s=function(n){function i(){var t=null!==n&&n.apply(this,arguments)||this;return t.animations={},t.group={},t.currentTime=0,t.needPlay=[],t}return e(i,n),i.prototype.init=function(n){var i=(void 0===n?{group:{}}:n).group;this.group=i,this.tweenGroup=new t.Group},i.prototype.awake=function(){for(var t in this.group)this.newAnimation(t)},i.prototype.play=function(t,n){t||(t=Object.keys(this.group)[0]),t&&!this.animations[t]&&this.group[t]&&this.newAnimation(t),t&&this.animations[t]&&this.needPlay.push({name:t,iteration:n})},i.prototype.stop=function(t){var n,i;if(t)null===(i=this.animations[t])||void 0===i||i.stop();else for(var e in this.animations)null===(n=this.animations[e])||void 0===n||n.stop()},i.prototype.onPause=function(){var t;for(var n in this.animations)null===(t=this.animations[n])||void 0===t||t.pause()},i.prototype.onResume=function(){var t;for(var n in this.animations)null===(t=this.animations[n])||void 0===t||t.resume()},i.prototype.onDestroy=function(){var t;for(var n in this.animations)null===(t=this.animations[n])||void 0===t||t.destroy();this.tweenGroup.removeAll(),this.tweenGroup=null,this.group=null,this.animations=null,this.removeAllListeners()},i.prototype.update=function(t){var n,i,e;for(var o in this.currentTime=t.time,this.animations)this.animations[o].currentTime=t.time;this.tweenGroup.update(t.time);try{for(var r=function(t){var n="function"==typeof Symbol&&t[Symbol.iterator],i=0;return n?n.call(t):{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}(this.needPlay),s=r.next();!s.done;s=r.next()){var a=s.value;null===(e=this.animations[a.name])||void 0===e||e.play(a.iteration,this.currentTime)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.needPlay.length=0},i.prototype.newAnimation=function(t){var n=this,i=new r(this.group[t],this.tweenGroup);i.on("finish",(function(){return n.emit("finish",t)})),this.animations[t]=i},i.componentName="Transition",i}(n.Component),a=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.name="transition",n}return e(n,t),n.systemName="transition",n}(n.System);exports.Transition=s,exports.TransitionSystem=a;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@tweenjs/tween.js"),n=require("@eva/eva.js"),i=function(t,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])},i(t,n)};function e(t,n){function e(){this.constructor=t}i(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var o={linear:t.Easing.Linear.None,"ease-in":t.Easing.Quadratic.In,"ease-out":t.Easing.Quadratic.Out,"ease-in-out":t.Easing.Quadratic.InOut,"bounce-in":t.Easing.Bounce.In,"bounce-out":t.Easing.Bounce.Out,"bounce-in-out":t.Easing.Bounce.InOut,none:function(t){return~~t}},r=function(){function n(t,n){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=n}return n.prototype.on=function(t,n){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(n)},n.prototype.emit=function(t){var n=this.callbacks.get(t);n&&n.length&&n.forEach((function(t){return t()}))},n.prototype.checkFinish=function(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}},n.prototype.getObjectCache=function(t,n){var i=""+t.gameObject.id+t.name;if(this.objectCache[i]||(this.objectCache[i]={}),this.objectCache[i][n])return this.objectCache[i][n];for(var e=n.split("."),o=e.length-1,r=t,s=0;s<o;s++)r=r[e[s]];return this.objectCache[i][n]={property:r,key:e[o]},this.objectCache[i][n]},n.prototype.doAnim=function(t){var n=t.component,i=t.name,e=t.value,o=this.getObjectCache(n,i);o.property[o.key]=e},n.prototype.init=function(){var n,i=this;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach((function(e,r){for(var s=0;s<e.values.length-1;s++){var a=e.values[s],u=e.values[s+1],h=new t.Tween({value:a.value},i.tweenGroup).to({value:u.value}).duration(u.time-a.time).easing(o[a.tween]).onUpdate((function(t){i.doAnim({component:e.component,name:e.name,value:t.value})}));0===s?i.tweens[r]=h:n.chain(h),n=h}n&&n.onComplete((function(){return i.checkFinishFunc()}))}))},n.prototype.play=function(t,n){void 0===t&&(t=1),this.currentTime=n,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t},n.prototype.start=function(){var t=this;this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((function(n){return n.start(t.currentTime)}))},n.prototype.pause=function(){var t=this;this.tweens.forEach((function(n){return n.pause(t.currentTime)}))},n.prototype.resume=function(){var t=this;this.tweens.forEach((function(n){return n.resume(t.currentTime)}))},n.prototype.stop=function(){this.stoped=!0,this.tweens.forEach((function(t){return t.stop()}))},n.prototype.destroy=function(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null},n}(),s=function(n){function i(){var t=null!==n&&n.apply(this,arguments)||this;return t.animations={},t.group={},t.currentTime=0,t.needPlay=[],t}return e(i,n),i.prototype.init=function(n){var i=(void 0===n?{group:{}}:n).group;this.group=i,this.tweenGroup=new t.Group},i.prototype.awake=function(){for(var t in this.group)this.newAnimation(t)},i.prototype.play=function(t,n){t||(t=Object.keys(this.group)[0]),t&&!this.animations[t]&&this.group[t]&&this.newAnimation(t),t&&this.animations[t]&&this.needPlay.push({name:t,iteration:n})},i.prototype.stop=function(t){var n,i;if(t)null===(i=this.animations[t])||void 0===i||i.stop();else for(var e in this.animations)null===(n=this.animations[e])||void 0===n||n.stop()},i.prototype.onPause=function(){var t;for(var n in this.animations)null===(t=this.animations[n])||void 0===t||t.pause()},i.prototype.onResume=function(){var t;for(var n in this.animations)null===(t=this.animations[n])||void 0===t||t.resume()},i.prototype.onDestroy=function(){var t;for(var n in this.animations)null===(t=this.animations[n])||void 0===t||t.destroy();this.tweenGroup.removeAll(),this.tweenGroup=null,this.group=null,this.animations=null,this.removeAllListeners()},i.prototype.update=function(t){var n,i,e;for(var o in this.currentTime=t.time,this.animations)this.animations[o].currentTime=t.time;this.tweenGroup.update(t.time);try{for(var r=function(t){var n="function"==typeof Symbol&&t[Symbol.iterator],i=0;return n?n.call(t):{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}(this.needPlay),s=r.next();!s.done;s=r.next()){var a=s.value;null===(e=this.animations[a.name])||void 0===e||e.play(a.iteration,this.currentTime)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.needPlay.length=0},i.prototype.newAnimation=function(t){var n=this,i=new r(this.group[t],this.tweenGroup);i.on("finish",(function(){return n.emit("finish",t)})),this.animations[t]=i},i.componentName="Transition",i}(n.Component),a=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.name="transition",n}return e(n,t),n.systemName="transition",n}(n.System);exports.Transition=s,exports.TransitionSystem=a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/plugin-transition",
3
- "version": "1.2.7-editor.1",
3
+ "version": "1.2.7-editor.4",
4
4
  "description": "@eva/plugin-transition",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-transition.esm.js",
@@ -18,7 +18,7 @@
18
18
  "license": "MIT",
19
19
  "homepage": "https://eva.js.org",
20
20
  "dependencies": {
21
- "@eva/eva.js": "1.2.7-editor.1",
21
+ "@eva/eva.js": "1.2.7-editor.4",
22
22
  "@tweenjs/tween.js": "^18.6.4",
23
23
  "sprite-timeline": "^1.10.2"
24
24
  }