AtlasAllocator
class AtlasAllocator extends TextureAllocator
This texture allocator auto-manages the base-texture with an AtlasResource. You can also
pass a texture source to allocate, mimicing Texture.from functionality.
Constructor
new AtlasAllocator() → {}
Summary
Methods from AtlasAllocator
| PIXI.Texture |
Allocates a texture backed by the given atlas source, with the given padding. |
| PIXI.Texture |
Allocates a texture backed by the given source, with default padding. |
| TextureSlab |
Creates a texture slab backed by an AtlasResource. |
Properties inherited from TextureAllocator
| number |
The height of texture slabs. |
| number |
The width of texture slabs. |
| TextureSlab[] |
The list of base-textures that are used to allocate texture space. |
Methods inherited from TextureAllocator
| void |
|
| T |
Creates a texture on the given base-texture at |
| T |
Issues a texture from the given texture slab, if possible. |
Public Methods
allocate(width: number, height: number, padding: number | AtlasResourceSource, source: AtlasResourceSource) → {PIXI.Texture}
Allocates a texture backed by the given atlas source, with the given padding.
| Name | Type | Attributes | Description |
|---|---|---|---|
| width | number | ||
| height | number | ||
| padding | number | AtlasResourceSource |
<optional> |
|
| source | AtlasResourceSource |
<optional> |
| Type | Description |
|---|---|
| PIXI.Texture |
allocate(width: number, height: number, source: AtlasResourceSource) → {PIXI.Texture}
Allocates a texture backed by the given source, with default padding.
| Name | Type | Attributes | Description |
|---|---|---|---|
| width | number | ||
| height | number | ||
| source | AtlasResourceSource |
<optional> |
| Type | Description |
|---|---|
| PIXI.Texture |
Protected Methods
protected createSlab() → {TextureSlab}
Creates a texture slab backed by an AtlasResource.
| Type | Description |
|---|---|
| TextureSlab |