AtlasResource
class AtlasResource extends PIXI.Resource
An AtlasResource
is used by AtlasAllocator to manage texture sources
Constructor
new AtlasResource(width: number, height: number) → {}
Creates an atlas resource.
Name | Type | Description |
---|---|---|
width | number | |
height | number |
Summary
Properties from AtlasResource
AtlasResourceItem[] |
The list of managed resources in the atlas. |
Methods from AtlasResource
boolean |
Uploads the atlas. |
void |
Uploads the atlas item to the GPU. |
Properties inherited from Resource
boolean |
|
number |
|
boolean |
|
string |
The url of the resource |
boolean |
|
number |
|
number |
Internal height of the resource. |
number |
Internal width of the resource. |
Methods inherited from Resource
void |
|
void |
|
void |
Clean up anything, this happens when destroying is ready. |
void |
|
boolean |
|
void |
|
void |
Has been updated trigger event. |
Promise<PIXI.Resource> |
|
Public Properties
managedItems: AtlasResourceItem[]
The list of managed resources in the atlas.
Public Methods
upload(renderer: PIXI.Renderer, baseTexture: PIXI.BaseTexture, glTexture: PIXI.GLTexture) → {boolean}
Uploads the atlas.
Name | Type | Description |
---|---|---|
renderer | PIXI.Renderer | |
baseTexture | PIXI.BaseTexture | |
glTexture | PIXI.GLTexture |
Type | Description |
---|---|
boolean |
Protected Methods
protected uploadItem(renderer: PIXI.Renderer, target: number, format: number, type: number, item: AtlasResourceItem) → {void}
Uploads the atlas item to the GPU.
Name | Type | Description |
---|---|---|
renderer | PIXI.Renderer |
The renderer holding the WebGL context. |
target | number |
The binding point of the base-texture. |
format | number |
The format of the base-texture. |
type | number |
The type of the base-texture data. |
item | AtlasResourceItem |
The item to upload. |
Type | Description |
---|---|
void |