Class BufferResource

Buffer resource with data of typed array.

Memberof

PIXI

Hierarchy (view full)

Constructors

Properties

The data of this resource.

destroyed: boolean

If resource has been destroyed.

Default

false
internal: boolean

true if resource is created by BaseTexture useful for doing cleanup with BaseTexture destroy and not cleaning up resources that were created externally.

src: string

The url of the resource

unpackAlignment: 1 | 2 | 4 | 8

The alignment of the rows in the data.

Accessors

  • get height(): number
  • The height of the resource.

    Returns number

  • get valid(): boolean
  • Has been validated

    Returns boolean

  • get width(): number
  • The width of the resource.

    Returns number

Methods

  • Bind to a parent BaseTexture

    Parameters

    Returns void

  • Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.

    Returns void

  • Destroy and don't use after this.

    Returns void

  • Trigger a resize event

    Parameters

    • width: number

      X dimension

    • height: number

      Y dimension

    Returns void

  • Set the style, optional to override

    Parameters

    Returns boolean

    • true is success
  • Has been updated trigger event.

    Returns void

  • Upload the texture to the GPU.

    Parameters

    Returns boolean

    • true is success
  • Used to auto-detect the type of resource.

    Parameters

    • source: unknown

      The source object

    Returns source is BufferType

    true if buffer source

Generated using TypeDoc