Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Raf

Hierarchy

  • Raf

Index

Constructors

constructor

  • new Raf(rafLoop: Function | null): Raf

Properties

isDisposed

isDisposed: boolean = false

isPlaying

isPlaying: boolean

isReadWriteOnly

isReadWriteOnly: boolean = false

Methods

dispose

  • dispose(): void

getCurrentFps

  • getCurrentFps(): number

getDelta

  • getDelta(inSeconds: boolean): number
  • Parameters

    • inSeconds: boolean

    Returns number

getElapsedTime

  • getElapsedTime(): number

getStartTime

  • getStartTime(): number

postWrite

  • postWrite(callback: Function): void
  • Parameters

    • callback: Function

    Returns void

preRead

  • preRead(callback: Function): void
  • Parameters

    • callback: Function

    Returns void

read

  • read(callback: Function): void
  • Parameters

    • callback: Function

    Returns void

runWhen

  • runWhen(callbackCondition: Function): void
  • Parameters

    • callbackCondition: Function

    Returns void

runWhenElementIsInview

  • runWhenElementIsInview(element: HTMLElement, intersectionObserverOptions: Object): Promise<void>
  • Parameters

    • element: HTMLElement
    • Optional intersectionObserverOptions: Object

    Returns Promise<void>

setFps

  • setFps(fps: number): void

setReadWriteMode

  • setReadWriteMode(value: boolean): void

start

  • start(force?: boolean): void
  • Parameters

    • Default value force: boolean = false

    Returns void

stop

  • stop(): void

unwatch

  • unwatch(callbackToRemove: Function): void
  • Parameters

    • callbackToRemove: Function

    Returns void

waitRead

  • waitRead(): Promise<void>

waitWrite

  • waitWrite(): Promise<void>

watch

  • watch(callback: Function): void
  • Parameters

    • callback: Function

    Returns void

write

  • write(callback: Function): void
  • Parameters

    • callback: Function

    Returns void