TextureAtlasPackerPage
Internal representation of a texture page during packing.
Each page manages its own bin packer instance and tracks which regions have been assigned to it. Pages grow dynamically and can be reset when repacking is needed.
Instance Members
spacing: IntPixel spacing between regions on this page. Matches the packer's spacing setting.
name: StringIdentifier for this page (e.g., "page0", "page1"). Used for debugging and texture naming.
width: IntCurrent width of this page in pixels. Grows from MIN_TEXTURE_SIZE to MAX_TEXTURE_SIZE as needed.
height: IntCurrent height of this page in pixels. Grows from MIN_TEXTURE_SIZE to MAX_TEXTURE_SIZE as needed.
regions: Array<TextureAtlasPackerRegion>All regions assigned to this page. Includes both regular regions and variants.
binPacker: binpacking.MaxRectsPackerBin packing algorithm instance for this page. Handles optimal placement of regions within the page bounds.
shouldResetTexture: BoolFlag indicating the page texture needs regeneration. Set when page size changes or regions are modified.
new(spacing: Int, name: String, width: Int, height: Int, regions: Array<TextureAtlasPackerRegion>, binPacker: binpacking.MaxRectsPacker, shouldResetTexture: Bool): Void| Name | Type | Description |
|---|---|---|
spacing |
Int | * Pixel spacing between regions on this page. Matches the packer's spacing setting. |
name |
String | * Identifier for this page (e.g., "page0", "page1"). Used for debugging and texture naming. |
width |
Int | * Current width of this page in pixels. Grows from MIN_TEXTURE_SIZE to MAX_TEXTURE_SIZE as needed. |
height |
Int | * Current height of this page in pixels. Grows from MIN_TEXTURE_SIZE to MAX_TEXTURE_SIZE as needed. |
regions |
Array<TextureAtlasPackerRegion> | * All regions assigned to this page. Includes both regular regions and variants. |
binPacker |
binpacking.MaxRectsPacker | * Bin packing algorithm instance for this page. Handles optimal placement of regions within the page bounds. |
shouldResetTexture |
Bool | * Flag indicating the page texture needs regeneration. Set when page size changes or regions are modified. |
Metadata
| Name | Parameters |
|---|---|
:structInit |
- |
:allow |
ceramic.TextureAtlasPacker |
:allow |
ceramic.TextureAtlasPackerRegion |