PackedTextureTile
Internal texture tile implementation with grid allocation metadata.
PackedTextureTile extends TextureTile with additional information about its position and size within the packer's grid system. This allows the packer to track which grid cells are occupied and properly release them when the tile is no longer needed.
Instance Members
col: Int
The starting column index in the packer's grid.
Zero-based index indicating the leftmost column occupied by this tile. Set to -1 before allocation.
row: Int
The starting row index in the packer's grid.
Zero-based index indicating the topmost row occupied by this tile. Set to -1 before allocation.
usedCols: Int
Number of grid columns occupied by this tile.
Tiles larger than padWidth span multiple columns. Always at least 1 for allocated tiles.
usedRows: Int
Number of grid rows occupied by this tile.
Tiles larger than padHeight span multiple rows. Always at least 1 for allocated tiles.
new(texture: ceramic.Texture, frameX: Float, frameY: Float, frameWidth: Float, frameHeight: Float): Void
Creates a new packed texture tile.
Name | Type | Description |
---|---|---|
texture |
ceramic.Texture | The render texture containing this tile |
frameX |
Float | X position in the texture |
frameY |
Float | Y position in the texture |
frameWidth |
Float | Width of the tile |
frameHeight |
Float | Height of the tile |
Metadata
Name | Parameters |
---|---|
:allow |
ceramic.TextureTilePacker |