Class PAGLayer

Hierarchy

Constructors

Properties

wasmIns: any
isDestroyed: boolean = false

Methods

  • Returns a globally unique id for this object.

    Returns number

  • Returns the name of the layer.

    Returns string

  • A matrix object containing values that alter the scaling, rotation, and translation of the layer. Altering it does not change the animation matrix, and it will be concatenated to current animation matrix for displaying.

    Returns Matrix

  • Resets the matrix to its default value.

    Returns void

  • The final matrix for displaying, it is the combination of the matrix property and current matrix from animation.

    Returns Matrix

  • Returns the current alpha of the layer if previously set.

    Returns number

  • Set the alpha of the layer, which will be concatenated to the current animation opacity for displaying.

    Parameters

    • opacity: Number

    Returns void

  • Whether or not the layer is visible.

    Returns boolean

  • Set the visible of the layer.

    Parameters

    • visible: boolean

    Returns void

  • Ranges from 0 to PAGFile.numTexts - 1 if the layer type is text, or from 0 to PAGFile.numImages -1 if the layer type is image, otherwise returns -1.

    Returns number

  • Converts the time from the PAGLayer's (local) timeline to the PAGSurface (global) timeline. The time is in microseconds.

    Parameters

    • localTime: number

    Returns number

  • Converts the time from the PAGSurface (global) to the PAGLayer's (local) timeline timeline. The time is in microseconds.

    Parameters

    • globalTime: number

    Returns number

  • The duration of the layer in microseconds, indicates the length of the visible range.

    Returns number

  • Returns the frame rate of this layer.

    Returns number

  • The start time of the layer in microseconds, indicates the start position of the visible range in parent composition. It could be negative value.

    Returns number

  • Set the start time of the layer, in microseconds.

    Parameters

    • time: number

    Returns void

  • The current time of the layer in microseconds, the layer is invisible if currentTime is not in the visible range (startTime <= currentTime < startTime + duration).

    Returns number

  • Set the current time of the layer, in microseconds.

    Parameters

    • time: number

    Returns void

  • Returns the current progress of play position, the value ranges from 0.0 to 1.0.

    Returns number

  • Set the progress of play position, the value ranges from 0.0 to 1.0. A value of 0.0 represents the frame at startTime. A value of 1.0 represents the frame at the end of duration.

    Parameters

    • percent: number

    Returns void

  • Set the progress of play position to the previous frame.

    Returns void

  • Set the progress of play position to the next frame.

    Returns void

  • Returns a rectangle that defines the original area of the layer, which is not transformed by the matrix.

    Returns Rect

  • Indicate whether this layer is excluded from parent's timeline. If set to true, this layer's current time will not change when parent's current time changes.

    Returns boolean

  • Set the excludedFromTimeline flag of this layer.

    Parameters

    • value: boolean

    Returns void

  • Returns true if this layer is a PAGFile.

    Returns boolean

Generated using TypeDoc