PIXI.BlobResource

class BlobResource extends PIXI.Resource

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

Constructor


new PIXI.BlobResource(source: string, options: PIXI.IBlobOptions) → {}
Parameters:
Name Type Attributes Description
source string

the URL of the texture file

options PIXI.IBlobOptions
options.autoLoad boolean

<optional>

whether to fetch the data immediately; you can fetch it later via BlobResource#load

options.width boolean

<optional>

the width in pixels.

options.height boolean

<optional>

the height in pixels.

Summary


Properties from BlobResource

ViewableBuffer
buffer
string
origin

Methods from BlobResource

Promise<PIXI.Resource>
load()

Loads the blob

Properties inherited from Resource

boolean
destroyed = false
number
height
boolean
internal
string
src

The url of the resource

boolean
valid
number
width
number
protected _height

Internal height of the resource.

number
protected _width

Internal width of the resource.

Methods inherited from Resource

void
bind(baseTexture: PIXI.BaseTexture)
void
destroy()
void
dispose()

Clean up anything, this happens when destroying is ready.

void
resize(width: number, height: number)
boolean
style(_renderer: PIXI.Renderer, _baseTexture: PIXI.BaseTexture, _glTexture: PIXI.GLTexture)
void
unbind(baseTexture: PIXI.BaseTexture)
void
update()

Has been updated trigger event.

boolean
upload(renderer: PIXI.Renderer, baseTexture: PIXI.BaseTexture, glTexture: PIXI.GLTexture)

Public Properties


buffer BlobResource.ts:56
buffer: ViewableBuffer

The viewable buffer on the data

origin BlobResource.ts:50
origin: string

The URL of the texture file

Public Methods


load BlobResource.ts:80
load() → {Promise<PIXI.Resource>}

Loads the blob

Returns:
Type Description
Promise<PIXI.Resource>

Powered by webdoc!