LdtkTilesetDefinition

ceramic.LdtkTilesetDefinition (Class)

Instance Members

The LdtkDefinitions object this tileset belongs to


ldtk
ceramicTileset: Tileset

The Ceramic tileset generated from this tileset


ldtk
cHei: Int

Grid-based height


ldtk
cWid: Int

Grid-based width


ldtk
customData: Array<LdtkTileCustomData>

An array of custom tile metadata


ldtk
embedAtlas: LdtkEmbedAtlas

If this value isn't None, then it means that this atlas uses an internal LDtk atlas image instead of a loaded one.


ldtk
enumTags: Array<LdtkEnumTag>

Tileset tags using Enum values specified by tagsSourceEnumId. This array contains 1 element per Enum value, which contains an array of all Tile IDs that are tagged with it.


ldtk
identifier: String

User defined unique identifier


ldtk
padding: Int

Distance in pixels from image borders


ldtk
pxHei: Int

Image height in pixels


ldtk
pxWid: Int

Image width in pixels


ldtk
relPath: String

Path to the source file, relative to the current project JSON file It can be null if no image was provided, or when using an embed atlas.


ldtk
spacing: Int

Space in pixels between all tiles


ldtk
tags: Array<String>

An array of user-defined tags to organize the Tilesets


ldtk
tagsSourceEnumUid: Int

Optional Enum definition UID used for this tileset meta-data


ldtk
tileGridSize: Int

The size of a tile in this tileset


ldtk
uid: Int

Unique Int identifier


ldtk
averageColors: Array<AlphaColor>

Array of colors (with alpha) for this tileset tiles. Can be useful to know if a tile is opaque or not.


ldtk
opaqueTiles: String

One char per tile from LDtk cachedPixelData.opaqueTiles: '1' when every pixel is opaque. Exact, unlike averageColors whose channels are quantized to 4 bits.


ldtk
emptyTiles: haxe.ds.Vector<Bool>

Per tile, true when every pixel has alpha 0, read once from the loaded texture (see TilemapLdtkParser.computeTilesetsPixelData()). null when this tileset has no texture (skipped, or no image) or when the backend can't read pixels back.


ldtk
opaqueTilesFromPixels: haxe.ds.Vector<Bool>

Per tile, true when every pixel has alpha 255. Same lifecycle as emptyTiles.


ldtk
textureSkipped: Bool

Set when the texture of this tileset was deliberately not loaded (skip option, or no texture loader), so that its absence is not reported as a load failure.


ldtk
tileIdByCustomData(data: String): Int
Name Type
data String
Returns
Int

ldtk
averageColor(tileId: Int): AlphaColor
Name Type
tileId Int
Returns
AlphaColor

ldtk
isTileEmpty(tileId: Int): Bool

true when the tile has no visible pixel. Only trusts pixels read from our own texture: LDtk's average color is too coarse for this (a tile with a few faint pixels averages to zero). Unknown means false.

Name Type
tileId Int
Returns
Bool

ldtk
isTileOpaque(tileId: Int): Bool

true when every pixel of the tile is opaque. Pixels read from our texture first, then LDtk opaqueTiles, then the average color as a last resort (its 4-bit alpha can hide a few fully transparent pixels).

Name Type
tileId Int
Returns
Bool

ldtk
toString(): String
Returns
String

Name Type Default
defs LdtkDefinitions (optional)
json haxe.DynamicAccess<Dynamic> (optional)