AnimationEvent

Composed of a frame, and an action function

Hierarchy

  • AnimationEvent

Index

Constructors

Properties

Constructors

constructor

  • new AnimationEvent(frame: number, action: function, onlyOnce?: boolean | undefined): AnimationEvent
  • Initializes the animation event

    Parameters

    • frame: number

      The frame for which the event is triggered

    • action: function

      The event to perform when triggered

        • (currentFrame: number): void
        • Parameters

          • currentFrame: number

          Returns void

    • Optional onlyOnce: boolean | undefined

      Specifies if the event should be triggered only once

    Returns AnimationEvent

Properties

action

action: function

The event to perform when triggered

Type declaration

    • (currentFrame: number): void
    • Parameters

      • currentFrame: number

      Returns void

frame

frame: number

The frame for which the event is triggered

isDone

isDone: boolean

Specifies if the animation event is done

Optional onlyOnce

onlyOnce: boolean | undefined

Specifies if the event should be triggered only once

Generated using TypeDoc