justgook / elm-tiled / Tiled.Layer


type Layer
    = Image ImageData
    | Object ObjectData
    | Tile TileData
    | InfiniteTile TileChunkedData

decode : Basics.Bool -> Json.Decode.Decoder Layer

encode : Layer -> Json.Encode.Value


type alias TileData =
{ 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 
}


type alias ImageData =
{ 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 
}


type alias ObjectData =
{ 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 
}


type DrawOrder
    = TopDown
    | Index


type alias Chunk =
{ data : List Basics.Int
, height : Basics.Int
, width : Basics.Int
, x : Basics.Int
, y : Basics.Int 
}


type alias TileChunkedData =
{ 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 
}

Internal

decodeDraworder : Json.Decode.Decoder DrawOrder

encodeDraworder : DrawOrder -> Json.Encode.Value