Options
All
  • Public
  • Public/Protected
  • All
Menu

Resource that fetches texture data over the network and stores it in a buffer.

memberof

PIXI

Hierarchy

Index

Constructors

constructor

  • new BlobResource(source: string | Uint32Array | Float32Array | Uint8Array, options?: IBlobOptions): BlobResource
  • Parameters

    • source: string | Uint32Array | Float32Array | Uint8Array
    • Optional options: IBlobOptions

    Returns BlobResource

Properties

Protected _height

_height: number

Protected _width

_width: number

Protected buffer

data

data: Uint16Array | Uint32Array | Float32Array | Uint8Array

destroyed

destroyed: boolean

internal

internal: boolean

Protected loaded

loaded: boolean

Protected onError

onError: Runner

Protected onResize

onResize: Runner

Protected onUpdate

onUpdate: Runner

Protected origin

origin: string

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

load

  • Loads the blob

    Returns Promise<Resource>

Protected onBlobLoaded

  • onBlobLoaded(_data: ArrayBuffer): void
  • Parameters

    • _data: ArrayBuffer

    Returns void

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