decode : Basics.Bool -> Json.Decode.Decoder Layer
encode : Layer -> Json.Encode.Value
{ id : Basics.Int
, data : List Basics.Int
, name : String
, opacity : Basics.Float
, visible : Basics.Bool
, width : Basics.Int
, height : Basics.Int
, x : Basics.Float
, y : Basics.Float
, properties : Tiled.Properties.Properties
}
data
List of GIDs from Tileset
.name
Name assigned to this layerx
Horizontal layer offset in tiles. Always 0.y
Vertical layer offset in tiles. Always 0.width
Column count. Same as map width for fixed-size maps.height
Row count. Same as map height for fixed-size maps.opacity
Value between 0 and 1properties
A list of properties (name, value, type).visible
Whether layer is shown or hidden in editor{ id : Basics.Int
, image : String
, name : String
, opacity : Basics.Float
, visible : Basics.Bool
, x : Basics.Float
, y : Basics.Float
, transparentcolor : String
, properties : Tiled.Properties.Properties
}
image
- Image used as backgroundname
Name assigned to this layerx
Horizontal layer offset in tiles. Always 0.y
Vertical layer offset in tiles. Always 0.opacity
Value between 0 and 1properties
A list of properties (name, value, type).visible
Whether layer is shown or hidden in editor{ id : Basics.Int
, draworder : DrawOrder
, name : String
, objects : List Tiled.Object.Object
, opacity : Basics.Float
, visible : Basics.Bool
, x : Basics.Float
, y : Basics.Float
, color : String
, properties : Tiled.Properties.Properties
}
name
Name assigned to this layerx
Horizontal layer offset in tiles. Always 0.y
Vertical layer offset in tiles. Always 0.draworder
TopDown
(default)objects
List of objects. objectgroup only.opacity
Value between 0 and 1properties
A list of properties (name, value, type).visible
Whether layer is shown or hidden in editor{ data : List Basics.Int
, height : Basics.Int
, width : Basics.Int
, x : Basics.Int
, y : Basics.Int
}
data
array or string Array of unsigned int (GIDs) or base64-encoded dataheight
int Height in tileswidth
int Width in tilesx
int X coordinate in tilesy
int Y coordinate in tiles{ id : Basics.Int
, chunks : List Chunk
, name : String
, opacity : Basics.Float
, visible : Basics.Bool
, width : Basics.Int
, height : Basics.Int
, startx : Basics.Int
, starty : Basics.Int
, x : Basics.Float
, y : Basics.Float
, properties : Tiled.Properties.Properties
}
decodeDraworder : Json.Decode.Decoder DrawOrder
encodeDraworder : DrawOrder -> Json.Encode.Value