justgook / elm-tiled / Tiled

Use the decode to get Level

Default Decoding

decode : Json.Decode.Decoder Level

Alias to Level.decode

encode : Level -> Json.Decode.Value

Alias to Level.encode

Helpers

gidInfo : Basics.Int -> GidInfo

The highest three bits of the gid store the flipped states. Bit 32 is used for storing whether the tile is horizontally flipped, bit 31 is used for the vertically flipped tiles and bit 30 indicates whether the tile is flipped (anti) diagonally, enabling tile rotation. These bits have to be read and cleared before you can find out which tileset a tile belongs to.


type alias GidInfo =
{ gid : Basics.Int
, fh : Basics.Bool
, fv : Basics.Bool
, fd : Basics.Bool 
}