ScaleAnimation

Tily. ScaleAnimation

new ScaleAnimation(activeTile, start, finish, optionsopt)

Represents a scale animation for scaling active tiles.

Parameters
Name Type Attributes Description
activeTile Tily.ActiveTile | Tily.ActiveTileLayer

The active tile or active tile layer that this animation belongs to.

start Tily.utility.vec2

The starting scale.

finish Tily.utility.vec2

The finishing scale.

options AnimationOptions <optional>

An optional options object for configuring the animation.

Extends

Members

activeTile :Tily.ActiveTile|Tily.ActiveTileLayer

The active tile or active tile layer that this animation belongs to.

Inherited From:

alternate :boolean

Whether or not this animation's direction should alternate on each repeat.

Inherited From:

amount :number

The current interpolation amount between 0 and 1 (inclusive).

Inherited From:

currentTime :number

The current time elapsed since the transition began.

Inherited From:

easeFunction :easeFunction

The easing function to use while transitioning.

Inherited From:
Default Value:
  • Tily.utility.lerp

finish :any

The finishing value.

Inherited From:

finished :boolean

True if this transition has finished and can be discarded.

Inherited From:

(nullable) finishedCallback :finishedCallback

A callback function that will be called once the transition has finished.

Inherited From:
Default Value:
  • null

repeat :boolean

Whether or not this animation should repeat until stopped or only play once.

Inherited From:

repeatCallback :function

A function to call on each repetition of the animation.

Inherited From:

reverse :boolean

Whether or not this animation should play in reverse.

Inherited From:

running :boolean

True if this animation is currently running, false if the animation is currently paused.

Inherited From:
Default Value:
  • true

start :any

The starting value.

Inherited From:

totalTime :number

The total amount of time that this transition should take.

Inherited From:

Methods

pause()

Pause this animation.

Inherited From:

reset()

Reset this animation.

Inherited From:

run()

Un-pause this animation.

Inherited From:

update(elapsedTime)

Update the animation and set the active tile scale.

Overrides:
Parameters
Name Type Description
elapsedTime number

The number of seconds that have elapsed since the last update.