Fatina
Init
The first time you create a tween, Fatina will initialize itself automatically, using default values. If instead you prefer to initialize it yourself (recommended), call the method .init() once, BEFORE creating any tween (calling it afterwards will have no effect).
Controls
- pause() / resume(): void
- setTimescale(scale: number): void
Methods
- init(): voidThis method has to be called once to initialize Fatina
- update(dt: number): void
- tween(obj): TweenMethod used to create new tween
- transition(obj): TransitionMethod used to create new transition
- sequence(): SequenceMethod used to create new sequence
- pulse(obj, settings): ISequencePulse preset
- scale(obj, settings): ISequenceScale preset
- wobble(obj, settings): ISequenceWobble preset
- sonar(obj, settings): ISequenceSonar preset
- shake(obj, settings): ISequenceShake preset
- delay(duration) Delay
- setTimeout(fn, duration): voidThis is just a simple helper around Fatina.Delay
- setInterval(fn, duration): voidThis is just a simple helper around Fatina.Delay
- ticker(name: string): ITicker
Ticker
A Ticker is a container which provides a centralized tick to all his childrens.
By default, all the tweens are childs of the same default Ticker, but it's possible to change this behavior.
Properties
- isRunning: boolean
- isPaused: boolean
Controls
- pause() / resume(): void
- setTimescale(scale: number): void
- kill(): void
Methods
- addTick(listener: (dt: number) => void): void;
- removeTick(listener: (dt: number) => void): void;