new PIXI.CompressedTextureResource (source, options) overrides
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
source |
string | Uint8Array | Uint32Array |
the buffer/URL holding the compressed texture data |
||
options |
ICompressedTextureResourceOptions | |||
options.format |
PIXI.INTERNAL_FORMATS |
the compression format |
||
options.width |
number |
the image width in pixels. |
||
options.height |
number |
the image height in pixels. |
||
options.level |
number |
<optional> |
1 |
the mipmap levels stored in the compressed texture, including level 0. |
options.levelBuffers |
number |
<optional> |
the buffers for each mipmap level. |
Extends
Members
format PIXI.INTERNAL_FORMATS
The compression format
The number of mipmap levels stored in the resource buffer.
- Default Value:
- 1
Methods
upload (renderer, _texture, _glTexture) boolean overrides
Name | Type | Description |
---|---|---|
renderer |
PIXI.Renderer |
A reference to the current renderer |
_texture |
PIXI.BaseTexture |
the texture |
_glTexture |
PIXI.GLTexture |
texture instance for this webgl context |
Returns:
Type | Description |
---|---|
boolean |
Inherited Properties
From class PIXI.BlobResource
buffer ViewableBuffer inherited
The viewable buffer on the data
origin string inherited
The URL of the texture file
From class PIXI.Resource
destroyed boolean readonly inherited
If resource has been destroyed.
- Default Value:
- false
height number readonly inherited
The height of the resource.
internal boolean inherited
true
if resource is created by BaseTexture
useful for doing cleanup with BaseTexture destroy
and not cleaning up resources that were created
externally.
valid boolean readonly inherited
Has been validated
width number readonly inherited
The width of the resource.
_height number protected inherited
Internal height of the resource.
_width number protected inherited
Internal width of the resource.
Inherited Methods
From class PIXI.BlobResource
load () Promise<PIXI.Resource> inherited
Loads the blob
Returns:
Type | Description |
---|---|
Promise<PIXI.Resource> |
From class PIXI.Resource
bind (baseTexture) void inherited
Bind to a parent BaseTexture
Name | Type | Description |
---|---|---|
baseTexture |
PIXI.BaseTexture |
Parent texture |
destroy () void inherited
Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.
dispose () void inherited
Clean up anything, this happens when destroying is ready.
resize (width, height) void inherited
Trigger a resize event
Name | Type | Description |
---|---|---|
width |
number |
X dimension |
height |
number |
Y dimension |
style (_renderer, _baseTexture, _glTexture) boolean inherited
Set the style, optional to override
Name | Type | Description |
---|---|---|
_renderer |
PIXI.Renderer |
yeah, renderer! |
_baseTexture |
PIXI.BaseTexture |
the texture |
_glTexture |
PIXI.GLTexture |
texture instance for this webgl context |
Returns:
Type | Description |
---|---|
boolean |
|
unbind (baseTexture) void inherited
Unbind to a parent BaseTexture
Name | Type | Description |
---|---|---|
baseTexture |
PIXI.BaseTexture |
Parent texture |
update () void inherited
Has been updated trigger event.