Tween

Module: engine.tween

Animate objects by tweening it's values.

new game.Tween(object)

Parameters:

  • object Object

Properties

_onStartCallbackFired Boolean

(No description yet)

_originalStartTime Number

(No description yet)

_repeats Number

(No description yet)

_shouldRemove Boolean

(No description yet)

_startTime Number

(No description yet)

_valuesEnd Object

(No description yet)

_valuesStart Object

(No description yet)

_valuesStartRepeat Object

(No description yet)

chainedTweens Array

List of chainged tweens.

currentTime Number

Current time of tween.

delayRepeat Boolean (Default: false)

Is delay repeating.

delayTime Number (Default: 0)

Tween's delay time.

duration Number (Default: 1000)

Tween duration.

easingFunction Function

Tween's easing function.

interpolationFunction Function

Tween's interpolation function.

object Object

Tween's target object.

onCompleteCallback Function

Tween's complete callback.

onRepeatCallback Function

Tween's repeat callback.

onStartCallback Function

Tween's start callback.

onUpdateCallback Function

Tween's update callback.

paused Boolean

Is tween paused.

playing Boolean

Is tween playing.

repeatCount Number

Tween's repeat count.

reversed Boolean

Is tween currently reversed.

yoyoEnabled Boolean

Is yoyo enabled.

Methods

_stopChainedTweens()

(No description yet)

_update()

(No description yet)

add(obj, props, time, [settings]) Tween Static

Shorthand for adding tween.

Parameters:

  • obj Object
  • props Object
  • time Number
  • settings Object (optional)
chain(tween)

Chain tween.

Parameters:

  • tween Tween
delay(time, repeat)

Set delay for tween.

Parameters:

  • time Number
  • repeat Boolean
easing(easing)

Set easing for tween.

Parameters:

  • easing String
getTweensForObject(object) Array Static

Get all tweens for specific object.

Parameters:

  • object Class
interpolation(interpolation)

Set interpolation for tween.

Parameters:

  • interpolation Function
onComplete(callback)

Set onComplete callback for tween.

Parameters:

  • callback Function
onRepeat(callback)

Set onRepeat callback for tween.

Parameters:

  • callback Function
onStart(callback)

Set onStart callback for tween.

Parameters:

  • callback Function
onUpdate(callback)

Set onUpdate callback for tween.

Parameters:

  • callback Function
pause()

Pause tween.

repeat(times)

Set repeat for tween.

Parameters:

  • times Number
resume()

Resume tween.

start()

Start tween.

stop()

Stop tween.

stopTweensForObject(object) Static

Stop all tweens for specific object.

Parameters:

  • object Class
to(properties, duration)

Set tween properties

Parameters:

  • properties Object
  • duration Number
yoyo(enabled)

Set tween to yoyo.

Parameters:

  • enabled Boolean

Attributes

Easing Object

(No description yet)

Interpolation Object

(No description yet)