Options
All
  • Public
  • Public/Protected
  • All
Menu

Class P3dAnimation

Hierarchy

  • P3dValueCached
    • P3dAnimation

Index

Accessors

duration

  • get duration(): number
  • Animation duration in seconds

    Returns number

id

  • get id(): string
  • Unique string identifier for the object

    Returns string

isPlaying

  • get isPlaying(): boolean
  • set isPlaying(value: boolean): void
  • Animation playback state

    Returns boolean

  • Animation playback state

    Parameters

    • value: boolean

    Returns void

loops

  • get loops(): number
  • set loops(value: number): void
  • Animation looping behavior: -1 is infinite loops. Otherwise a specific number of loops

    Returns number

  • Animation looping behavior: -1 is infinite loops. Otherwise a specific number of loops

    Parameters

    • value: number

    Returns void

name

  • get name(): string
  • Animation name

    Returns string

playFrom

  • get playFrom(): number
  • set playFrom(value: number): void
  • Limit animation playback range. By default between 0 and duration.

    Default: 0

    Returns number

  • Limit animation playback range. By default between 0 and duration.

    Default: 0

    Parameters

    • value: number

    Returns void

playTo

  • get playTo(): number
  • set playTo(value: number): void
  • Limit animation playback range. By default between 0 and duration.

    Default: duration

    Returns number

  • Limit animation playback range. By default between 0 and duration.

    Default: duration

    Parameters

    • value: number

    Returns void

speed

  • get speed(): number
  • set speed(value: number): void
  • Animation playback speed factor

    Returns number

  • Animation playback speed factor

    Parameters

    • value: number

    Returns void

time

  • get time(): number
  • set time(value: number): void
  • Current animation playback time in seconds

    Returns number

  • Current animation playback time in seconds

    Parameters

    • value: number

    Returns void

Methods

refresh

  • Refresh animation values to their current states in the embed. This can be useful for example when determining playback position of animations.

    (Normally values are updated only after calling listAnimations())

    Using via then() callback:

    animation.refresh().then(() => {
      // Log current playback position
      console.log(animation.time);
    });
    

    Or in async function:

    await animation.refresh();
    // Log current playback position
    console.log(animation.time);
    

    Returns Promise<P3dAnimation>

Generated using TypeDoc