- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
import type { AreaAllocator } from '@pixi-essentials/area-allocator';
import type { BaseTexture, Texture } from '@pixi/core';
import type { Rectangle } from '@pixi/math';
/**
* An entry of an issued texture from a TextureSlab.
*
* @public
*/
export type TextureEntry =
{
/**
* The area returned by the area allocator, with the `__mem_area` key.
*/
area: Rectangle;
/**
* The issued texture.
*/
texture: Texture;
};
/**
* A texture slab holds a managed base-texture that is used to issue allocated texture space. The
* texture allocator maintains a pool of these texture slabs.
*
* @public
*/
export type TextureSlab =
{
/**
* The area allocator that issues texture space.
*/
managedArea: AreaAllocator<any>;
/**
* The list of allocated textures and their area.
*/
managedTextures: TextureEntry[];
/**
* The base-texture that holds all the issued textures.
*/
slab: BaseTexture;
};