On this page

Insality/defold-tweener/tweener.tweener

Timer Based Defold Tween Library

  • GitHub: Insality/defold-tweener — pinned to 2fe3aed
    1. Pick a release from Insality/defold-tweener releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as tweener from "tweener.tweener"

Functions

tween(tween_function: AnyTweenFunc, from: number, to: number, time: number, callback: (value: number, is_final_call: boolean) => void, dt?: number): Hash

Parameters

  • tween_function: AnyTweenFunc
  • from: number
  • to: number
  • time: number
  • callback: (value: number, is_final_call: boolean) => void
  • dt?: number

Returns

  • Hash

ease(tween_function: AnyTweenFunc, from: number, to: number, time: number, time_elapsed: number): number

Parameters

  • tween_function: AnyTweenFunc
  • from: number
  • to: number
  • time: number
  • time_elapsed: number

Returns

  • number

Variables

insine: TweenFunc

inquad: TweenFunc

incubic: TweenFunc

incirc: TweenFunc

inquart: TweenFunc

inquint: TweenFunc

inexpo: TweenFunc

inback: TweenFunc

inelastic: TweenFunc

inbounce: TweenFunc

outsine: TweenFunc

outquad: TweenFunc

outcubic: TweenFunc

outcirc: TweenFunc

outquart: TweenFunc

outquint: TweenFunc

outexpo: TweenFunc

outback: TweenFunc

outelastic: TweenFunc

outbounce: TweenFunc

inoutsine: TweenFunc

inoutquad: TweenFunc

inoutcubic: TweenFunc

inoutcirc: TweenFunc

inoutquart: TweenFunc

inoutquint: TweenFunc

inoutexpo: TweenFunc

inoutback: TweenFunc

inoutelastic: TweenFunc

inoutbounce: TweenFunc

outinsine: TweenFunc

outinquad: TweenFunc

outincubic: TweenFunc

outincirc: TweenFunc

outinquart: TweenFunc

outinquint: TweenFunc

outinexpo: TweenFunc

outinback: TweenFunc

outinelastic: TweenFunc

outinbounce: TweenFunc