Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationEvent

Composed of a frame, and an action function

Hierarchy

  • AnimationEvent

Index

Constructors

Properties

Constructors

constructor

  • new AnimationEvent(frame: number, action: (currentFrame: number) => void, onlyOnce?: boolean | undefined): AnimationEvent
  • Initializes the animation event

    Parameters

    • frame: number

      The frame for which the event is triggered

    • action: (currentFrame: number) => void

      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

actionSearch playground for action

action: (currentFrame: number) => void

The event to perform when triggered

Type declaration

    • (currentFrame: number): void
    • Parameters

      • currentFrame: number

      Returns void

frameSearch playground for frame

frame: number

The frame for which the event is triggered

isDoneSearch playground for isDone

isDone: boolean

Specifies if the animation event is done

Optional onlyOnceSearch playground for onlyOnce

onlyOnce: boolean | undefined

Specifies if the event should be triggered only once

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method