@eva/plugin-transition 2.0.1-beta.2 → 2.0.1-beta.21

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.
@@ -697,10 +697,10 @@ var _EVA_IIFE_transition = function (exports, eva_js) {
697
697
  }
698
698
  this.callbacks.get(eventName).push(callback);
699
699
  }
700
- emit(eventName) {
700
+ emit(eventName, ...args) {
701
701
  const callbacks = this.callbacks.get(eventName);
702
702
  if (!callbacks || !callbacks.length) return;
703
- callbacks.forEach(fn => fn());
703
+ callbacks.forEach(fn => fn(...args));
704
704
  }
705
705
  checkFinish() {
706
706
  if (++this.finishCount == this.tweens.length) {
@@ -760,6 +760,7 @@ var _EVA_IIFE_transition = function (exports, eva_js) {
760
760
  name: timeline.name,
761
761
  value: props.value
762
762
  });
763
+ this.emit('update', props.value);
763
764
  });
764
765
  if (j === 0) {
765
766
  this.tweens[i] = tween;
@@ -886,6 +887,10 @@ var _EVA_IIFE_transition = function (exports, eva_js) {
886
887
  newAnimation(name) {
887
888
  const animation = new Animation(this.group[name], this.tweenGroup);
888
889
  animation.on('finish', () => this.emit('finish', name));
890
+ animation.on('update', value => this.emit('update', {
891
+ name,
892
+ value
893
+ }));
889
894
  this.animations[name] = animation;
890
895
  }
891
896
  }
@@ -1 +1 @@
1
- globalThis.EVA=globalThis.EVA||{},globalThis.EVA.plugin=globalThis.EVA.plugin||{};var _EVA_IIFE_transition=function(t,e){"use strict";var i,n={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-n.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*n.Bounce.In(2*t):.5*n.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()},r=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}(),o={Linear:function(t,e){var i=t.length-1,n=i*e,s=Math.floor(n),r=o.Utils.Linear;return e<0?r(t[0],t[1],n):e>1?r(t[i],t[i-1],i-n):r(t[s],t[s+1>i?i:s+1],n-s)},Bezier:function(t,e){for(var i=0,n=t.length-1,s=Math.pow,r=o.Utils.Bernstein,a=0;a<=n;a++)i+=s(1-e,n-a)*s(e,a)*t[a]*r(n,a);return i},CatmullRom:function(t,e){var i=t.length-1,n=i*e,s=Math.floor(n),r=o.Utils.CatmullRom;return t[0]===t[i]?(e<0&&(s=Math.floor(n=i*(1+e))),r(t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i],n-s)):e<0?t[0]-(r(t[0],t[0],t[1],t[1],-n)-t[0]):e>1?t[i]-(r(t[i],t[i],t[i-1],t[i-1],n-i)-t[i]):r(t[s?s-1:0],t[s],t[i<s+1?i:s+1],t[i<s+2?i:s+2],n-s)},Utils:{Linear:function(t,e,i){return(e-t)*i+t},Bernstein:function(t,e){var i=o.Utils.Factorial;return i(t)/i(e)/i(t-e)},Factorial:(i=[1],function(t){var e=1;if(i[t])return i[t];for(var n=t;n>1;n--)e*=n;return i[t]=e,e}),CatmullRom:function(t,e,i,n,s){var r=.5*(i-t),o=.5*(n-e),a=s*s;return(2*e-2*i+r+o)*(s*a)+(-3*e+3*i-2*r-o)*a+r*s+e}}},a=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),h=new r,u=function(){function t(t,e){void 0===e&&(e=h),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=n.Linear.None,this._interpolationFunction=o.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=a.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 s in i){var r=t[s],o=Array.isArray(r),a=o?"array":typeof r,h=!o&&Array.isArray(i[s]);if("undefined"!==a&&"function"!==a){if(h){var u=i[s];if(0===u.length)continue;u=u.map(this._handleRelativeValue.bind(this,r)),i[s]=[r].concat(u)}if("object"!==a&&!o||!r||h)void 0===e[s]&&(e[s]=r),o||(e[s]*=1),n[s]=h?i[s].slice().reverse():e[s]||0;else{for(var c in e[s]=o?[]:{},r)e[s][c]=r[c];n[s]=o?[]:{},this._setupProperties(r,e[s],i[s],n[s])}}}},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,h=this._chainedTweens.length;a<h;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 s in i)if(void 0!==e[s]){var r=e[s]||0,o=i[s],a=Array.isArray(t[s]),h=Array.isArray(o);!a&&h?t[s]=this._interpolationFunction(o,n):"object"==typeof o&&o?this._updateProperties(t[s],r,o,n):"number"==typeof(o=this._handleRelativeValue(r,o))&&(t[s]=r+(o-r)*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}();a.nextId;var c=h;c.getAll.bind(c),c.removeAll.bind(c),c.add.bind(c),c.remove.bind(c),c.update.bind(c);const l={linear:n.Linear.None,"ease-in":n.Quadratic.In,"ease-out":n.Quadratic.Out,"ease-in-out":n.Quadratic.InOut,"bounce-in":n.Bounce.In,"bounce-out":n.Bounce.Out,"bounce-in-out":n.Bounce.InOut,none:t=>~~t};class p{constructor(t,e){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=e}on(t,e){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(e)}emit(t){const e=this.callbacks.get(t);e&&e.length&&e.forEach((t=>t()))}checkFinish(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}}getObjectCache(t,e){const i=`${t.gameObject.id}${t.name}`;if(this.objectCache[i]||(this.objectCache[i]={}),this.objectCache[i][e])return this.objectCache[i][e];const n=e.split("."),s=n.length-1;let r=t;for(let t=0;t<s;t++)r=r[n[t]];return this.objectCache[i][e]={property:r,key:n[s]},this.objectCache[i][e]}doAnim({component:t,name:e,value:i}){const{property:n,key:s}=this.getObjectCache(t,e);n[s]=i}init(){let t;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach(((e,i)=>{for(let n=0;n<e.values.length-1;n++){const s=e.values[n],r=e.values[n+1],o=new u({value:s.value},this.tweenGroup).to({value:r.value}).duration(r.time-s.time).easing(l[s.tween]).onUpdate((t=>{this.doAnim({component:e.component,name:e.name,value:t.value})}));0===n?this.tweens[i]=o:t.chain(o),t=o}t&&t.onComplete((()=>this.checkFinishFunc()))}))}play(t=1,e){this.currentTime=e,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t}start(){this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((t=>t.start(this.currentTime)))}pause(){this.tweens.forEach((t=>t.pause(this.currentTime)))}resume(){this.tweens.forEach((t=>t.resume(this.currentTime)))}stop(){this.stoped=!0,this.tweens.forEach((t=>t.stop()))}destroy(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null}}class _ extends e.Component{constructor(){super(...arguments),this.animations={},this.group={},this.currentTime=0,this.needPlay=[]}init({group:t}={group:{}}){this.group=t,this.tweenGroup=new r}awake(){for(const t in this.group)this.newAnimation(t)}play(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})}stop(t){var e,i;if(t)null===(i=this.animations[t])||void 0===i||i.stop();else for(const t in this.animations)null===(e=this.animations[t])||void 0===e||e.stop()}onPause(){var t;for(const e in this.animations)null===(t=this.animations[e])||void 0===t||t.pause()}onResume(){var t;for(const e in this.animations)null===(t=this.animations[e])||void 0===t||t.resume()}onDestroy(){var t;for(const 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()}update(t){var e;this.currentTime=t.time;for(const e in this.animations)this.animations[e].currentTime=t.time;this.tweenGroup.update(t.time);for(const t of this.needPlay)null===(e=this.animations[t.name])||void 0===e||e.play(t.iteration,this.currentTime);this.needPlay.length=0}newAnimation(t){const e=new p(this.group[t],this.tweenGroup);e.on("finish",(()=>this.emit("finish",t))),this.animations[t]=e}}_.componentName="Transition";class d extends e.System{constructor(){super(...arguments),this.name="transition"}}return d.systemName="transition",t.Transition=_,t.TransitionSystem=d,Object.defineProperty(t,"__esModule",{value:!0}),t}({},EVA);globalThis.EVA.plugin.transition=globalThis.EVA.plugin.transition||_EVA_IIFE_transition;
1
+ globalThis.EVA=globalThis.EVA||{},globalThis.EVA.plugin=globalThis.EVA.plugin||{};var _EVA_IIFE_transition=function(t,e){"use strict";var i,n={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-n.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*n.Bounce.In(2*t):.5*n.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()},r=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]],a=!e;r&&!1===r.update(t,a)&&!e&&delete this._tweens[i[n]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),a={Linear:function(t,e){var i=t.length-1,n=i*e,s=Math.floor(n),r=a.Utils.Linear;return e<0?r(t[0],t[1],n):e>1?r(t[i],t[i-1],i-n):r(t[s],t[s+1>i?i:s+1],n-s)},Bezier:function(t,e){for(var i=0,n=t.length-1,s=Math.pow,r=a.Utils.Bernstein,o=0;o<=n;o++)i+=s(1-e,n-o)*s(e,o)*t[o]*r(n,o);return i},CatmullRom:function(t,e){var i=t.length-1,n=i*e,s=Math.floor(n),r=a.Utils.CatmullRom;return t[0]===t[i]?(e<0&&(s=Math.floor(n=i*(1+e))),r(t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i],n-s)):e<0?t[0]-(r(t[0],t[0],t[1],t[1],-n)-t[0]):e>1?t[i]-(r(t[i],t[i],t[i-1],t[i-1],n-i)-t[i]):r(t[s?s-1:0],t[s],t[i<s+1?i:s+1],t[i<s+2?i:s+2],n-s)},Utils:{Linear:function(t,e,i){return(e-t)*i+t},Bernstein:function(t,e){var i=a.Utils.Factorial;return i(t)/i(e)/i(t-e)},Factorial:(i=[1],function(t){var e=1;if(i[t])return i[t];for(var n=t;n>1;n--)e*=n;return i[t]=e,e}),CatmullRom:function(t,e,i,n,s){var r=.5*(i-t),a=.5*(n-e),o=s*s;return(2*e-2*i+r+a)*(s*o)+(-3*e+3*i-2*r-a)*o+r*s+e}}},o=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),h=new r,u=function(){function t(t,e){void 0===e&&(e=h),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=n.Linear.None,this._interpolationFunction=a.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=o.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 s in i){var r=t[s],a=Array.isArray(r),o=a?"array":typeof r,h=!a&&Array.isArray(i[s]);if("undefined"!==o&&"function"!==o){if(h){var u=i[s];if(0===u.length)continue;u=u.map(this._handleRelativeValue.bind(this,r)),i[s]=[r].concat(u)}if("object"!==o&&!a||!r||h)void 0===e[s]&&(e[s]=r),a||(e[s]*=1),n[s]=h?i[s].slice().reverse():e[s]||0;else{for(var l in e[s]=a?[]:{},r)e[s][l]=r[l];n[s]=a?[]:{},this._setupProperties(r,e[s],i[s],n[s])}}}},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 a=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),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 o=0,h=this._chainedTweens.length;o<h;o++)this._chainedTweens[o].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(t,e,i,n){for(var s in i)if(void 0!==e[s]){var r=e[s]||0,a=i[s],o=Array.isArray(t[s]),h=Array.isArray(a);!o&&h?t[s]=this._interpolationFunction(a,n):"object"==typeof a&&a?this._updateProperties(t[s],r,a,n):"number"==typeof(a=this._handleRelativeValue(r,a))&&(t[s]=r+(a-r)*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}();o.nextId;var l=h;l.getAll.bind(l),l.removeAll.bind(l),l.add.bind(l),l.remove.bind(l),l.update.bind(l);const c={linear:n.Linear.None,"ease-in":n.Quadratic.In,"ease-out":n.Quadratic.Out,"ease-in-out":n.Quadratic.InOut,"bounce-in":n.Bounce.In,"bounce-out":n.Bounce.Out,"bounce-in-out":n.Bounce.InOut,none:t=>~~t};class p{constructor(t,e){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=e}on(t,e){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(e)}emit(t,...e){const i=this.callbacks.get(t);i&&i.length&&i.forEach((t=>t(...e)))}checkFinish(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}}getObjectCache(t,e){const i=`${t.gameObject.id}${t.name}`;if(this.objectCache[i]||(this.objectCache[i]={}),this.objectCache[i][e])return this.objectCache[i][e];const n=e.split("."),s=n.length-1;let r=t;for(let t=0;t<s;t++)r=r[n[t]];return this.objectCache[i][e]={property:r,key:n[s]},this.objectCache[i][e]}doAnim({component:t,name:e,value:i}){const{property:n,key:s}=this.getObjectCache(t,e);n[s]=i}init(){let t;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach(((e,i)=>{for(let n=0;n<e.values.length-1;n++){const s=e.values[n],r=e.values[n+1],a=new u({value:s.value},this.tweenGroup).to({value:r.value}).duration(r.time-s.time).easing(c[s.tween]).onUpdate((t=>{this.doAnim({component:e.component,name:e.name,value:t.value}),this.emit("update",t.value)}));0===n?this.tweens[i]=a:t.chain(a),t=a}t&&t.onComplete((()=>this.checkFinishFunc()))}))}play(t=1,e){this.currentTime=e,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t}start(){this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((t=>t.start(this.currentTime)))}pause(){this.tweens.forEach((t=>t.pause(this.currentTime)))}resume(){this.tweens.forEach((t=>t.resume(this.currentTime)))}stop(){this.stoped=!0,this.tweens.forEach((t=>t.stop()))}destroy(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null}}class _ extends e.Component{constructor(){super(...arguments),this.animations={},this.group={},this.currentTime=0,this.needPlay=[]}init({group:t}={group:{}}){this.group=t,this.tweenGroup=new r}awake(){for(const t in this.group)this.newAnimation(t)}play(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})}stop(t){var e,i;if(t)null===(i=this.animations[t])||void 0===i||i.stop();else for(const t in this.animations)null===(e=this.animations[t])||void 0===e||e.stop()}onPause(){var t;for(const e in this.animations)null===(t=this.animations[e])||void 0===t||t.pause()}onResume(){var t;for(const e in this.animations)null===(t=this.animations[e])||void 0===t||t.resume()}onDestroy(){var t;for(const 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()}update(t){var e;this.currentTime=t.time;for(const e in this.animations)this.animations[e].currentTime=t.time;this.tweenGroup.update(t.time);for(const t of this.needPlay)null===(e=this.animations[t.name])||void 0===e||e.play(t.iteration,this.currentTime);this.needPlay.length=0}newAnimation(t){const e=new p(this.group[t],this.tweenGroup);e.on("finish",(()=>this.emit("finish",t))),e.on("update",(e=>this.emit("update",{name:t,value:e}))),this.animations[t]=e}}_.componentName="Transition";class d extends e.System{constructor(){super(...arguments),this.name="transition"}}return d.systemName="transition",t.Transition=_,t.TransitionSystem=d,Object.defineProperty(t,"__esModule",{value:!0}),t}({},EVA);globalThis.EVA.plugin.transition=globalThis.EVA.plugin.transition||_EVA_IIFE_transition;
@@ -32,11 +32,11 @@ class Animation {
32
32
  }
33
33
  this.callbacks.get(eventName).push(callback);
34
34
  }
35
- emit(eventName) {
35
+ emit(eventName, ...args) {
36
36
  const callbacks = this.callbacks.get(eventName);
37
37
  if (!callbacks || !callbacks.length)
38
38
  return;
39
- callbacks.forEach(fn => fn());
39
+ callbacks.forEach(fn => fn(...args));
40
40
  }
41
41
  checkFinish() {
42
42
  if (++this.finishCount == this.tweens.length) {
@@ -88,6 +88,7 @@ class Animation {
88
88
  name: timeline.name,
89
89
  value: props.value,
90
90
  });
91
+ this.emit('update', props.value);
91
92
  });
92
93
  if (j === 0) {
93
94
  this.tweens[i] = tween;
@@ -210,6 +211,7 @@ class Transition extends eva_js.Component {
210
211
  newAnimation(name) {
211
212
  const animation = new Animation(this.group[name], this.tweenGroup);
212
213
  animation.on('finish', () => this.emit('finish', name));
214
+ animation.on('update', value => this.emit('update', { name, value }));
213
215
  this.animations[name] = animation;
214
216
  }
215
217
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@tweenjs/tween.js"),i=require("@eva/eva.js");const e={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:t=>~~t};class s{constructor(t,i){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=i}on(t,i){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(i)}emit(t){const i=this.callbacks.get(t);i&&i.length&&i.forEach((t=>t()))}checkFinish(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}}getObjectCache(t,i){const e=`${t.gameObject.id}${t.name}`;if(this.objectCache[e]||(this.objectCache[e]={}),this.objectCache[e][i])return this.objectCache[e][i];const s=i.split("."),n=s.length-1;let o=t;for(let t=0;t<n;t++)o=o[s[t]];return this.objectCache[e][i]={property:o,key:s[n]},this.objectCache[e][i]}doAnim({component:t,name:i,value:e}){const{property:s,key:n}=this.getObjectCache(t,i);s[n]=e}init(){let i;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach(((s,n)=>{for(let o=0;o<s.values.length-1;o++){const a=s.values[o],h=s.values[o+1],r=new t.Tween({value:a.value},this.tweenGroup).to({value:h.value}).duration(h.time-a.time).easing(e[a.tween]).onUpdate((t=>{this.doAnim({component:s.component,name:s.name,value:t.value})}));0===o?this.tweens[n]=r:i.chain(r),i=r}i&&i.onComplete((()=>this.checkFinishFunc()))}))}play(t=1,i){this.currentTime=i,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t}start(){this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((t=>t.start(this.currentTime)))}pause(){this.tweens.forEach((t=>t.pause(this.currentTime)))}resume(){this.tweens.forEach((t=>t.resume(this.currentTime)))}stop(){this.stoped=!0,this.tweens.forEach((t=>t.stop()))}destroy(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null}}class n extends i.Component{constructor(){super(...arguments),this.animations={},this.group={},this.currentTime=0,this.needPlay=[]}init({group:i}={group:{}}){this.group=i,this.tweenGroup=new t.Group}awake(){for(const t in this.group)this.newAnimation(t)}play(t,i){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:i})}stop(t){var i,e;if(t)null===(e=this.animations[t])||void 0===e||e.stop();else for(const t in this.animations)null===(i=this.animations[t])||void 0===i||i.stop()}onPause(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.pause()}onResume(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.resume()}onDestroy(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.destroy();this.tweenGroup.removeAll(),this.tweenGroup=null,this.group=null,this.animations=null,this.removeAllListeners()}update(t){var i;this.currentTime=t.time;for(const i in this.animations)this.animations[i].currentTime=t.time;this.tweenGroup.update(t.time);for(const t of this.needPlay)null===(i=this.animations[t.name])||void 0===i||i.play(t.iteration,this.currentTime);this.needPlay.length=0}newAnimation(t){const i=new s(this.group[t],this.tweenGroup);i.on("finish",(()=>this.emit("finish",t))),this.animations[t]=i}}n.componentName="Transition";class o extends i.System{constructor(){super(...arguments),this.name="transition"}}o.systemName="transition",exports.Transition=n,exports.TransitionSystem=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@tweenjs/tween.js"),i=require("@eva/eva.js");const e={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:t=>~~t};class s{constructor(t,i){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=i}on(t,i){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(i)}emit(t,...i){const e=this.callbacks.get(t);e&&e.length&&e.forEach((t=>t(...i)))}checkFinish(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}}getObjectCache(t,i){const e=`${t.gameObject.id}${t.name}`;if(this.objectCache[e]||(this.objectCache[e]={}),this.objectCache[e][i])return this.objectCache[e][i];const s=i.split("."),n=s.length-1;let a=t;for(let t=0;t<n;t++)a=a[s[t]];return this.objectCache[e][i]={property:a,key:s[n]},this.objectCache[e][i]}doAnim({component:t,name:i,value:e}){const{property:s,key:n}=this.getObjectCache(t,i);s[n]=e}init(){let i;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach(((s,n)=>{for(let a=0;a<s.values.length-1;a++){const o=s.values[a],h=s.values[a+1],r=new t.Tween({value:o.value},this.tweenGroup).to({value:h.value}).duration(h.time-o.time).easing(e[o.tween]).onUpdate((t=>{this.doAnim({component:s.component,name:s.name,value:t.value}),this.emit("update",t.value)}));0===a?this.tweens[n]=r:i.chain(r),i=r}i&&i.onComplete((()=>this.checkFinishFunc()))}))}play(t=1,i){this.currentTime=i,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t}start(){this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((t=>t.start(this.currentTime)))}pause(){this.tweens.forEach((t=>t.pause(this.currentTime)))}resume(){this.tweens.forEach((t=>t.resume(this.currentTime)))}stop(){this.stoped=!0,this.tweens.forEach((t=>t.stop()))}destroy(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null}}class n extends i.Component{constructor(){super(...arguments),this.animations={},this.group={},this.currentTime=0,this.needPlay=[]}init({group:i}={group:{}}){this.group=i,this.tweenGroup=new t.Group}awake(){for(const t in this.group)this.newAnimation(t)}play(t,i){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:i})}stop(t){var i,e;if(t)null===(e=this.animations[t])||void 0===e||e.stop();else for(const t in this.animations)null===(i=this.animations[t])||void 0===i||i.stop()}onPause(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.pause()}onResume(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.resume()}onDestroy(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.destroy();this.tweenGroup.removeAll(),this.tweenGroup=null,this.group=null,this.animations=null,this.removeAllListeners()}update(t){var i;this.currentTime=t.time;for(const i in this.animations)this.animations[i].currentTime=t.time;this.tweenGroup.update(t.time);for(const t of this.needPlay)null===(i=this.animations[t.name])||void 0===i||i.play(t.iteration,this.currentTime);this.needPlay.length=0}newAnimation(t){const i=new s(this.group[t],this.tweenGroup);i.on("finish",(()=>this.emit("finish",t))),i.on("update",(i=>this.emit("update",{name:t,value:i}))),this.animations[t]=i}}n.componentName="Transition";class a extends i.System{constructor(){super(...arguments),this.name="transition"}}a.systemName="transition",exports.Transition=n,exports.TransitionSystem=a;
@@ -28,11 +28,11 @@ class Animation {
28
28
  }
29
29
  this.callbacks.get(eventName).push(callback);
30
30
  }
31
- emit(eventName) {
31
+ emit(eventName, ...args) {
32
32
  const callbacks = this.callbacks.get(eventName);
33
33
  if (!callbacks || !callbacks.length)
34
34
  return;
35
- callbacks.forEach(fn => fn());
35
+ callbacks.forEach(fn => fn(...args));
36
36
  }
37
37
  checkFinish() {
38
38
  if (++this.finishCount == this.tweens.length) {
@@ -84,6 +84,7 @@ class Animation {
84
84
  name: timeline.name,
85
85
  value: props.value,
86
86
  });
87
+ this.emit('update', props.value);
87
88
  });
88
89
  if (j === 0) {
89
90
  this.tweens[i] = tween;
@@ -206,6 +207,7 @@ class Transition extends Component {
206
207
  newAnimation(name) {
207
208
  const animation = new Animation(this.group[name], this.tweenGroup);
208
209
  animation.on('finish', () => this.emit('finish', name));
210
+ animation.on('update', value => this.emit('update', { name, value }));
209
211
  this.animations[name] = animation;
210
212
  }
211
213
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/plugin-transition",
3
- "version": "2.0.1-beta.2",
3
+ "version": "2.0.1-beta.21",
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": "2.0.1-beta.2",
21
+ "@eva/eva.js": "2.0.1-beta.21",
22
22
  "@tweenjs/tween.js": "^18.6.4",
23
23
  "sprite-timeline": "^1.10.2"
24
24
  }