Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Anim

Hierarchy

Index

Constructors

constructor

Properties

Protected _bus

_bus: EventBus = new EventBus(this)

Protected _cfg

_cfg: AnimInit

Protected _dir

_dir: "forward" | "backward"

Protected _loop

_loop: number = 0

Protected _targets

_targets: Array<HTMLElement | object> = []

Protected _timer

_timer: Timer = null

Methods

Protected _reset

  • _reset(): void
  • Returns void

Protected _resetTargets

  • _resetTargets(): void
  • Returns void

Protected _setupTimer

  • _setupTimer(): void
  • Returns void

config

  • config<T>(): T

direction

  • direction(): "forward" | "backward"
  • direction(d: "forward" | "backward"): this
  • Returns "forward" | "backward"

  • Parameters

    • d: "forward" | "backward"

    Returns this

getLooped

  • getLooped(): number
  • Returns number

getState

isRunning

  • isRunning(): boolean
  • Returns boolean

off

  • off(ev?: string): this
  • Parameters

    • Optional ev: string

    Returns this

on

pause

  • pause(): this
  • Pauses the animation.

    Returns this

Abstract play

  • Plays Animation from current position.

    Returns Promise<boolean>

    False indicates this animation is currently playing

replay

  • replay(): void
  • Returns void

stop

  • stop(): this
  • Stops the animation and resets the play head to its initial position.

    Returns this

targets