Options
All
  • Public
  • Public/Protected
  • All
Menu

Buffer resource with data of typed array.

memberof

PIXI

Hierarchy

Index

Constructors

constructor

  • new BufferResource(source: Uint16Array | Uint32Array | Float32Array | Uint8Array, options: ISize): BufferResource
  • Parameters

    • source: Uint16Array | Uint32Array | Float32Array | Uint8Array

      Source buffer

    • options: ISize

      Options

    Returns BufferResource

Properties

Protected _height

_height: number

Protected _width

_width: number

data

data: Uint16Array | Uint32Array | Float32Array | Uint8Array

destroyed

destroyed: boolean

internal

internal: boolean

Protected onError

onError: Runner

Protected onResize

onResize: Runner

Protected onUpdate

onUpdate: Runner

Accessors

height

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

    member

    {number}

    readonly

    Returns number

valid

  • get valid(): boolean
  • Has been validated

    readonly
    member

    {boolean}

    Returns boolean

width

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

    member

    {number}

    readonly

    Returns number

Methods

bind

destroy

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

    Returns void

dispose

  • dispose(): void
  • Destroy and don't use after this

    override

    Returns void

Protected load

  • This can be overridden to start preloading a resource or do any other prepare step.

    Returns Promise<Resource>

    Handle the validate event

resize

  • resize(width: number, height: number): void
  • Trigger a resize event

    Parameters

    • width: number

      X dimension

    • height: number

      Y dimension

    Returns void

style

unbind

update

  • update(): void
  • Has been updated trigger event

    Returns void

upload

Static test

  • test(source: unknown): source is Uint32Array | Float32Array | Uint8Array
  • Used to auto-detect the type of resource.

    static

    Parameters

    • source: unknown

      The source object

    Returns source is Uint32Array | Float32Array | Uint8Array

    true if

Generated using TypeDoc