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

fatina

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fatina - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

49

build/fatina.d.ts

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

export declare let time: number;
export declare function Elapsed(): number;
export declare function Init(disableAutoTick?: boolean): boolean;
export declare function SetTimescale(scale: number): void;
export declare function Pause(): void;
export declare function Resume(): void;
export declare function Destroy(): void;
export declare function Update(timestamp: number): any;
export declare function Tween(obj: any, properties: string[]): ITween;
export declare function Sequence(): ISequence;
export declare function Ticker(name: string): ITicker;
export declare class Ticker extends EventList implements ITicker {
state: State;

@@ -29,3 +39,3 @@ private timescale;

}
export declare abstract class EventList {
first: INode | undefined;

@@ -38,2 +48,3 @@ last: INode | undefined;

}
export interface INode {
node_valid: boolean;

@@ -44,3 +55,3 @@ node_previous: INode | undefined;

}
export declare enum State {
Idle = 0,

@@ -52,3 +63,3 @@ Run = 1,

}
export interface IControl {
elapsed: number;

@@ -64,6 +75,6 @@ duration: number;

}
export interface IPlayable extends IControl {
state: State;
}
export interface ISequence extends IControl {
Default(): void;

@@ -88,3 +99,3 @@ Start(): ISequence;

}
export interface ITicker extends IControl {
AddTickListener(cb: (dt: number) => void): void;

@@ -94,3 +105,3 @@ RemoveTickListener(cb: (dt: number) => void): void;

}
export interface ITween extends IControl {
Default(): void;

@@ -113,6 +124,7 @@ Init(object: any, properties: string[]): void;

}
export declare let easeTypes: ((t: number, args?: any) => number)[];
export declare let easeNames: {
[id: string]: (t: number, args?: any) => number;
};
export declare enum EasingType {
Linear = 0,

@@ -150,3 +162,3 @@ InQuad = 1,

}
export declare abstract class BaseTween {
elapsed: number;

@@ -188,3 +200,3 @@ duration: number;

}
export declare class Callback extends BaseTween implements IPlayable {
private callback;

@@ -194,7 +206,7 @@ constructor(cb: () => void);

}
export declare class Delay extends BaseTween implements IPlayable {
constructor(duration: number);
private Tick(dt);
}
export declare class Sequence extends BaseTween implements ISequence, ITicker, IPlayable {
private eventTick;

@@ -234,3 +246,3 @@ private tweens;

}
export declare class Tween extends BaseTween implements ITween {
private object;

@@ -272,6 +284,1 @@ private properties;

@@ -0,0 +0,0 @@ (function webpackUniversalModuleDefinition(root, factory) {

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Fatina",[],e):"object"==typeof exports?exports.Fatina=e():t.Fatina=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function i(){return f.elapsed}function r(t){return!T&&(f||(f=new w.Ticker,f.Start()),"undefined"==typeof window||t||(v=_(d)),T=!0,!0)}function o(t){f.SetTimescale(t)}function s(){f.Pause()}function a(){f.Resume()}function u(){f&&f.Kill(),v&&I(v),T=!1}function h(t){T&&f&&(f.Tick(t),e.time+=t)}function p(t,e){return T||r(),new S.Tween(t,e).SetParent(f)}function c(){return T||r(),(new y.Sequence).SetParent(f)}function l(t){if(T||r(),!(t in E)){var e=new w.Ticker,n=e.Tick.bind(e);e.SetParent(f,n),f.AddTickListener(n),e.Start(),E[t]=e}return E[t]}function d(t){var e=t-O;m&&(e=1,m=!1),e>500&&(console.warn("[Fatina] Delta between two update was too high "+Math.round(e)+"ms. , Capped to 500ms."),e=500),h(e),O=t,v=_(d)}Object.defineProperty(e,"__esModule",{value:!0});var f,v,y=n(1),S=n(6),w=n(9),T=!1,m=!0,O=0,E={};e.time=0,e.Elapsed=i,e.Init=r,e.SetTimescale=o,e.Pause=s,e.Resume=a,e.Destroy=u,e.Update=h,e.Tween=p,e.Sequence=c,e.Ticker=l;var _,I;"undefined"!=typeof window&&(_=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,I=window.cancelAnimationFrame||window.mozCancelAnimationFrame)},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(4),s=n(5),a=n(3),u=function(t){function e(){var e=t.call(this)||this;return e.eventTick=[],e.tweens=[],e.sequenceIndex=0,e.tickCb=e.Tick.bind(e),e}return i(e,t),e.prototype.Start=function(){return t.prototype.Start.call(this),this},e.prototype.LoopInit=function(){this.sequenceIndex=0;for(var t=0;t<this.tweens.length;t++)for(var e=this.tweens[t],n=0;n<e.length;n++){var i=e[n];i.Reset()}},e.prototype.SetParent=function(e){return t.prototype.SetParent.call(this,e),this},e.prototype.AddTickListener=function(t){this.eventTick.unshift(t)},e.prototype.RemoveTickListener=function(t){var e=this.eventTick.indexOf(t);e!==-1&&this.eventTick.splice(e,1)},e.prototype.Tick=function(t){if(this.state!==a.State.Finished&&this.state!==a.State.Killed){var e=t*this.timescale;this.elapsed+=e,this.LocalTick(e)}},e.prototype.LocalTick=function(t,e){if(this.currentTween||this.NextTween(),this.currentTween){for(var n=this.eventTick.length-1;n>=0;n--)this.eventTick[n](t);e!==!0&&this.EmitEvent(this.eventUpdate,[t,0])}var i=t;if(this.currentTween){for(var n=0;n<this.currentTween.length;n++)if(this.currentTween[n].state!==a.State.Finished)return;var r=this.currentTween[0];if(i=r.elapsed-r.duration,this.EmitEvent(this.eventStepEnd,[this.currentTween[0]]),this.currentTween=void 0,this.sequenceIndex++,i>.01)return void this.LocalTick(i,!0)}this.currentTween||this.tweens.length!==this.sequenceIndex||(this.loop--,0===this.loop?this.Complete():this.ResetAndStart(i))},e.prototype.NextTween=function(){if(this.currentTween=this.tweens[this.sequenceIndex],this.currentTween){for(var t=0;t<this.currentTween.length;t++){var e=this.currentTween[t];e.Start()}this.EmitEvent(this.eventStepStart,[this.currentTween[0]])}},e.prototype.Append=function(t){return t.SetParent(this),this.tweens[this.tweens.length]=[t],this},e.prototype.AppendCallback=function(t){var e=new o.Callback(t);return e.SetParent(this),this.tweens[this.tweens.length]=[e],this},e.prototype.AppendInterval=function(t){var e=new s.Delay(t);return e.SetParent(this),this.tweens[this.tweens.length]=[e],this},e.prototype.Prepend=function(t){return t.SetParent(this),this.tweens.unshift([t]),this},e.prototype.PrependCallback=function(t){var e=new o.Callback(t);return e.SetParent(this),this.tweens.unshift([e]),this},e.prototype.PrependInterval=function(t){var e=new s.Delay(t);return e.SetParent(this),this.tweens.unshift([e]),this},e.prototype.Skip=function(){if(this.state===a.State.Killed||this.state===a.State.Finished)return void console.warn("cant skip this tween",this.state);for(var e=0;e<this.tweens.length;e++)for(var n=this.tweens[e],i=0;i<n.length;i++){var r=n[i];r.state!==a.State.Killed&&r.state!==a.State.Finished&&(0===r.elapsed&&this.EmitEvent(this.eventStepStart,[r]),r.Skip(),this.EmitEvent(this.eventStepEnd,[r]))}t.prototype.Skip.call(this)},e.prototype.Kill=function(){if(this.state===a.State.Killed||this.state===a.State.Finished)return void console.warn("cant kill this tween",this.state);for(var e=0;e<this.tweens.length;e++)for(var n=this.tweens[e],i=0;i<n.length;i++){var r=n[i];r.state!==a.State.Killed&&r.state!==a.State.Finished&&r.Kill()}t.prototype.Kill.call(this)},e.prototype.Join=function(t){return 0===this.tweens.length?this.Append(t):(t.SetParent(this),this.tweens[this.tweens.length-1].push(t),this)},e.prototype.SetTimescale=function(t){return this.timescale=t,this},e.prototype.SetLoop=function(t){return this.loop=Math.round(t),this},e.prototype.Default=function(){t.prototype.Default.call(this),this.tweens.length=0,this.currentTween=void 0,this.sequenceIndex=0},e.prototype.OnStart=function(t){return this.eventStart||(this.eventStart=new Array(0)),this.eventStart[this.eventStart.length]=t,this},e.prototype.OnUpdate=function(t){return this.eventUpdate||(this.eventUpdate=new Array(0)),this.eventUpdate[this.eventUpdate.length]=t,this},e.prototype.OnKilled=function(t){return this.eventKill||(this.eventKill=new Array(0)),this.eventKill[this.eventKill.length]=t,this},e.prototype.OnComplete=function(t){return this.eventComplete||(this.eventComplete=new Array(0)),this.eventComplete[this.eventComplete.length]=t,this},e.prototype.OnStepStart=function(t){return this.eventStepStart||(this.eventStepStart=new Array(0)),this.eventStepStart[this.eventStepStart.length]=t,this},e.prototype.OnStepEnd=function(t){return this.eventStepEnd||(this.eventStepEnd=new Array(0)),this.eventStepEnd[this.eventStepEnd.length]=t,this},e}(r.BaseTween);e.Sequence=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),r=function(){function t(){this.elapsed=0,this.duration=0,this.timescale=1,this.loop=1,this.state=i.State.Idle,this.firstStart=!0}return t.prototype.Start=function(){return this.state!==i.State.Idle?void console.warn("cant start this tween",this.state):(this.firstStart?this.Validate():this.CheckPosition(),this.state=i.State.Run,this.parent.AddTickListener(this.tickCb),void(this.firstStart&&(this.EmitEvent(this.eventStart),this.firstStart=!1)))},t.prototype.Reset=function(){this.state=i.State.Idle,this.parent&&this.parent.RemoveTickListener(this.tickCb),this.loop=1,this.LoopInit()},t.prototype.ResetAndStart=function(t){this.LoopInit(),this.state=i.State.Run,t>0&&this.tickCb(t)},t.prototype.Pause=function(){return this.state!==i.State.Run?void console.warn("cant pause this tween",this.state):(this.state=i.State.Pause,void(this.parent&&this.parent.RemoveTickListener(this.tickCb)))},t.prototype.Resume=function(){return this.state!==i.State.Pause?void console.warn("cant resume this tween",this.state):(this.state=i.State.Run,void this.parent.AddTickListener(this.tickCb))},t.prototype.Skip=function(){return this.state===i.State.Killed||this.state===i.State.Finished?void console.warn("cant skip this tween",this.state):(this.state===i.State.Idle&&this.EmitEvent(this.eventStart),this.elapsed=this.duration,void this.Complete())},t.prototype.Complete=function(){return this.state===i.State.Killed||this.state===i.State.Finished?void console.warn("cant complete this tween",this.state):(this.parent&&this.parent.RemoveTickListener(this.tickCb),this.state=i.State.Finished,void this.EmitEvent(this.eventComplete))},t.prototype.Kill=function(){return this.state===i.State.Killed||this.state===i.State.Finished?void console.warn("cant kill this tween",this.state):(this.parent&&this.parent.RemoveTickListener(this.tickCb),this.state=i.State.Killed,void this.EmitEvent(this.eventKill))},t.prototype.CheckPosition=function(){},t.prototype.Validate=function(){},t.prototype.LoopInit=function(){this.elapsed=0},t.prototype.SetParent=function(t){this.parent&&this.parent.RemoveTickListener(this.tickCb),this.parent=t},t.prototype.Default=function(){this.elapsed=0,this.duration=0,this.timescale=1,this.loop=1,this.firstStart=!0,this.state=i.State.Idle},t.prototype.Emit=function(t,e){try{t.apply(this,e)}catch(t){console.warn(t)}},t.prototype.EmitEvent=function(t,e){if(t)for(var n=0;n<t.length;n++)this.Emit(t[n],e)},t}();e.BaseTween=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n;!function(t){t[t.Idle=0]="Idle",t[t.Run=1]="Run",t[t.Pause=2]="Pause",t[t.Finished=3]="Finished",t[t.Killed=4]="Killed"}(n=e.State||(e.State={}))},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=function(t){function e(e){var n=t.call(this)||this;return n.callback=e,n.tickCb=n.Tick.bind(n),n}return i(e,t),e.prototype.Tick=function(t){this.elapsed+=t,this.duration=0,this.callback(),this.EmitEvent(this.eventUpdate,[t,1]),this.Complete()},e}(r.BaseTween);e.Callback=o},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=function(t){function e(e){var n=t.call(this)||this;return n.duration=e,n.tickCb=n.Tick.bind(n),n}return i(e,t),e.prototype.Tick=function(t){this.elapsed+=t;var e=Math.max(Math.min(this.elapsed/this.duration,1),0);this.EmitEvent(this.eventUpdate,[t,e]),this.elapsed>=this.duration&&this.Complete()},e}(r.BaseTween);e.Delay=o},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(7),s=n(1),a=n(3),u=n(8),h=function(t){function e(e,n){var i=t.call(this)||this;return i.relative=!1,i.object=e,i.properties=n,i.tickCb=i.Tick.bind(i),i}return i(e,t),e.prototype.Init=function(t,e){this.object=t,this.properties=e},e.prototype.Start=function(){return t.prototype.Start.call(this),this},e.prototype.Validate=function(){if(!this.object)throw new Error("Cant Tween a undefined object");for(var t=0;t<this.properties.length;t++){var e=this.properties[t];if(!(e in this.object))throw new Error("Cant Tween an unknown property"+e)}if(!this.parent)throw new Error("Cant Start a tween without ticker");this.ease||(this.ease=o.easeTypes[u.EasingType.Linear]),this.CheckPosition()},e.prototype.CheckPosition=function(){this.currentFrom||(this.currentFrom={}),this.currentTo||(this.currentTo={});for(var t=0;t<this.properties.length;t++){var e=this.properties[t];this.from?(this.currentFrom[e]=this.from[e],this.object[e]=this.from[e]):this.currentFrom[e]=this.object[e],this.relative?this.currentTo[e]=this.object[e]+this.to[e]:this.currentTo[e]=this.to[e]}},e.prototype.Tick=function(t){if(this.state!==a.State.Finished&&this.state!==a.State.Killed)for(this.remainsDt=t*this.timescale;this.remainsDt>0;){this.elapsed+=this.remainsDt;for(var e=Math.max(Math.min(this.elapsed/this.duration,1),0),n=this.ease(e),i=0;i<this.properties.length;i++){var r=this.properties[i];this.object[r]=this.currentFrom[r]+(this.currentTo[r]-this.currentFrom[r])*n}if(this.EmitEvent(this.eventUpdate,[this.remainsDt,e]),this.elapsed<this.duration)return;if(this.remainsDt=this.elapsed-this.duration,this.loop--,0===this.loop)return void this.Complete();this.CheckPosition(),this.ResetAndStart(0)}},e.prototype.SetParent=function(e){return t.prototype.SetParent.call(this,e),this},e.prototype.From=function(t){return this.from=t,this},e.prototype.To=function(t,e){return this.to=t,this.duration=e,this},e.prototype.SetLoop=function(t){return this.loop=Math.round(t),this},e.prototype.SetRelative=function(t){return this.relative=t,this},e.prototype.SetTimescale=function(t){return this.timescale=t,this},e.prototype.Modify=function(t,e){for(var n=0;n<this.properties.length;n++){var i=this.properties[n];t.hasOwnProperty(i)&&(this.object[i]+=t[i],e?this.currentTo[i]+=t[i]:this.currentFrom[i]+=t[i])}},e.prototype.ToSequence=function(){if(!this.parent)throw new Error("Cant convert to a sequence, parent ticker not defined");return(new s.Sequence).SetParent(this.parent).Append(this)},e.prototype.Easing=function(t){var e=t,n=!isNaN(parseFloat(e));if(n){var i=parseInt(e,10);if(i in o.easeTypes)return o.easeTypes[i]}if(e in o.easeNames)return o.easeNames[e];throw new Error("Unknown ease method "+t)},e.prototype.SetEasing=function(t){return this.ease=this.Easing(t),this},e.prototype.LoopInit=function(){this.elapsed=0},e.prototype.Default=function(){t.prototype.Default.call(this),this.object=void 0,this.properties.length=0,this.from=void 0,this.to=void 0,this.currentFrom=void 0,this.currentTo=void 0,this.relative=!1},e.prototype.OnStart=function(t){return this.eventStart||(this.eventStart=new Array(0)),this.eventStart[this.eventStart.length]=t,this},e.prototype.OnUpdate=function(t){return this.eventUpdate||(this.eventUpdate=new Array(0)),this.eventUpdate[this.eventUpdate.length]=t,this},e.prototype.OnKilled=function(t){return this.eventKill||(this.eventKill=new Array(0)),this.eventKill[this.eventKill.length]=t,this},e.prototype.OnComplete=function(t){return this.eventComplete||(this.eventComplete=new Array(0)),this.eventComplete[this.eventComplete.length]=t,this},e}(r.BaseTween);e.Tween=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=Math.PI,o=Math.PI/2,s=1.70158,a=[],u={};a[i.EasingType.Linear]=u.linear=function(t){return t},a[i.EasingType.InQuad]=u.inQuad=function(t){return t*t},a[i.EasingType.OutQuad]=u.outQuad=function(t){return 2*t-t*t},a[i.EasingType.InOutQuad]=u.inOutQuad=function(t){return t<.5?2*t*t:2*(2*t-t*t)-1},a[i.EasingType.InCubic]=u.inCubic=function(t){return t*t*t},a[i.EasingType.OutCubic]=u.outCubic=function(t){return 3*t-3*t*t+t*t*t},a[i.EasingType.InOutCubic]=u.inOutCubic=function(t){return t<.5?4*t*t*t:4*(3*t-3*t*t+t*t*t)-3},a[i.EasingType.InQuart]=u.inQuart=function(t){return t*t*t*t},a[i.EasingType.OutQuart]=u.outQuart=function(t){var e=t*t;return 4*t-6*e+4*e*t-e*e},a[i.EasingType.InOutQuart]=u.inOutQuart=function(t){if(t<.5)return 8*t*t*t*t;var e=t*t;return 8*(4*t-6*e+4*e*t-e*e)-7},a[i.EasingType.InSine]=u.inSine=function(t){return 1===t?1:1-Math.cos(o*t)},a[i.EasingType.OutSine]=u.outSine=function(t){return Math.sin(o*t)},a[i.EasingType.InOutSine]=u.inOutSine=function(t){return t<.5?(1-Math.cos(r*t))/2:(1+Math.sin(r*(t-.5)))/2},a[i.EasingType.InCirc]=u.inCirc=function(t){return 1-Math.sqrt(1-Math.pow(t,2))},a[i.EasingType.OutCirc]=u.outCirc=function(t){return Math.sqrt(1-Math.pow(1-t,2))},a[i.EasingType.InOutCirc]=u.inOutCirc=function(t){return t<.5?(1-Math.sqrt(1-4*t*t))/2:(1+Math.sqrt(-3+8*t-4*t*t))/2},a[i.EasingType.InQuint]=u.inQuint=function(t){return t*t*t*t*t},a[i.EasingType.OutQuint]=u.outQuint=function(t){return--t*t*t*t*t+1},a[i.EasingType.InOutQuint]=u.inOutQuint=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},a[i.EasingType.InExponential]=u.inExponential=function(t){return 1===t?1:0===t?0:Math.pow(1024,t-1)},a[i.EasingType.OutExponential]=u.outExponential=function(t){return 1===t?1:1-Math.pow(2,-10*t)},a[i.EasingType.InOutExponential]=u.inOutExponential=function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},a[i.EasingType.InElastic]=u.inElastic=function(t){return 0===t?0:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},a[i.EasingType.OutElastic]=u.outElastic=function(t){return 1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},a[i.EasingType.InOutElastic]=u.inOutElastic=function(t){return 0===t?0:1===t?1:(t*=2,t<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)},a[i.EasingType.InBack]=u.inBack=function(t){var e=s;return 1===t?1:t*t*((e+1)*t-e)},a[i.EasingType.OutBack]=u.outBack=function(t){var e=s;return 0===t?0:--t*t*((e+1)*t+e)+1},a[i.EasingType.InOutBack]=u.inOutBack=function(t){var e=1.525*s;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},a[i.EasingType.OutBounce]=u.outBounce=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},a[i.EasingType.InBounce]=u.inBounce=function(t){return 1-a[i.EasingType.OutBounce](1-t)},a[i.EasingType.InOutBounce]=u.inOutBounce=function(t){return t<.5?.5*a[i.EasingType.InBounce](2*t):.5*a[i.EasingType.OutBounce](2*t-1)+.5},e.easeTypes=a,e.easeNames=u},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n;!function(t){t[t.Linear=0]="Linear",t[t.InQuad=1]="InQuad",t[t.OutQuad=2]="OutQuad",t[t.InOutQuad=3]="InOutQuad",t[t.InCubic=4]="InCubic",t[t.OutCubic=5]="OutCubic",t[t.InOutCubic=6]="InOutCubic",t[t.InQuart=7]="InQuart",t[t.OutQuart=8]="OutQuart",t[t.InOutQuart=9]="InOutQuart",t[t.InSine=10]="InSine",t[t.OutSine=11]="OutSine",t[t.InOutSine=12]="InOutSine",t[t.InCirc=13]="InCirc",t[t.OutCirc=14]="OutCirc",t[t.InOutCirc=15]="InOutCirc",t[t.InQuint=16]="InQuint",t[t.OutQuint=17]="OutQuint",t[t.InOutQuint=18]="InOutQuint",t[t.InExponential=19]="InExponential",t[t.OutExponential=20]="OutExponential",t[t.InOutExponential=21]="InOutExponential",t[t.InElastic=22]="InElastic",t[t.OutElastic=23]="OutElastic",t[t.InOutElastic=24]="InOutElastic",t[t.InBack=25]="InBack",t[t.OutBack=26]="OutBack",t[t.InOutBack=27]="InOutBack",t[t.InBounce=28]="InBounce",t[t.OutBounce=29]="OutBounce",t[t.InOutBounce=30]="InOutBounce"}(n=e.EasingType||(e.EasingType={}))},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=n(10),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state=r.State.Idle,e.timescale=1,e.elapsed=0,e.duration=0,e.update=0,e.eventToAdd=[],e.eventToRemove=[],e}return i(e,t),e.prototype.SetParent=function(t,e){this.tick=e,this.parent=t},e.prototype.SetTimescale=function(t){this.timescale=t},e.prototype.AddTickListener=function(t){this.eventToAdd.push(t)},e.prototype.RemoveTickListener=function(t){this.eventToRemove.push(t)},e.prototype.UpdateListener=function(){if(this.eventToAdd.length>0){for(var t=0;t<this.eventToAdd.length;t++)this.Add(this.eventToAdd[t]);this.eventToAdd=[]}if(this.eventToRemove.length>0){for(var t=0;t<this.eventToRemove.length;t++)this.Remove(this.eventToRemove[t]);this.eventToRemove=[]}},e.prototype.Tick=function(t){if(this.state===r.State.Run){this.UpdateListener();for(var e=t*this.timescale,n=this.first;n;n=n.node_next)n(e);this.elapsed+=e,this.update++,this.UpdateListener()}},e.prototype.Start=function(){this.state===r.State.Idle&&(this.state=r.State.Run)},e.prototype.Pause=function(){this.state===r.State.Run&&(this.state=r.State.Pause)},e.prototype.Resume=function(){this.state===r.State.Pause&&(this.state=r.State.Run)},e.prototype.Kill=function(){this.state!==r.State.Killed&&this.state!==r.State.Finished&&(this.parent&&this.tick&&this.parent.RemoveTickListener(this.tick),this.state=r.State.Killed)},e.prototype.Skip=function(){throw new Error("The main ticker cannot be skipped")},e.prototype.Reset=function(){this.state=r.State.Idle},e}(o.EventList);e.Ticker=s},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.length=0}return t.prototype.Add=function(t){var e=this.GetNode(t,this.last,void 0,this);void 0===this.first?(this.first=e,this.last=e):void 0!==this.last&&(this.last.node_next=e,this.last=e),this.length+=1},t.prototype.Remove=function(t){var e=t;return void 0===e?void console.log("Trying to remove an object which is not a node"):void(e.node_list===this&&(void 0===e.node_next?this.last=e.node_previous:e.node_next.node_previous=e.node_previous,void 0===e.node_previous?this.first=e.node_next:e.node_previous.node_next=e.node_next,e.node_valid=!1,e.node_previous=void 0,e.node_next=void 0,e.node_list=void 0,this.length-=1))},t.prototype.GetNode=function(t,e,n,i){var r=t;return r.node_valid||(r.node_valid=!0,r.node_previous=e,r.node_next=n,r.node_list=i),r},t}();e.EventList=n}])});
//# sourceMappingURL=fatina.min.js.map
{
"name": "fatina",
"description": "Small & Light tweening library for web / games",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://kefniark.github.io/Fatina/",

@@ -6,0 +6,0 @@ "main": "build/fatina.js",

@@ -0,0 +0,0 @@ ![Logo](logo.png)

@@ -0,0 +0,0 @@ import { IControl } from './IControl';

@@ -0,0 +0,0 @@ import { Sequence as sequence } from './tweens/sequence';

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc