[{"name":"Tiled","comment":" Use the [`decode`](#decode) to get [`Level`](Tiled-Level)\n\n\n# Default Decoding\n\n@docs decode, encode\n\n\n# Helpers\n\n@docs gidInfo, GidInfo\n\n","unions":[],"aliases":[{"name":"GidInfo","comment":" ","args":[],"type":"{ gid : Basics.Int, fh : Basics.Bool, fv : Basics.Bool, fd : Basics.Bool }"}],"values":[{"name":"decode","comment":" Alias to [`Level.decode`](Tiled.Level#decode)\n","type":"Json.Decode.Decoder Tiled.Level.Level"},{"name":"encode","comment":" Alias to [`Level.encode`](Tiled.Level#encode)\n","type":"Tiled.Level.Level -> Json.Decode.Value"},{"name":"gidInfo","comment":" 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.\n","type":"Basics.Int -> Tiled.GidInfo"}],"binops":[]},{"name":"Tiled.Extra.Property","comment":" Nested way to represent custom properties.\n\n@docs Property, convert, get, at, values, toList\n\n","unions":[{"name":"Property","comment":" Custom nested properties\n","args":[],"cases":[["Bool",["Basics.Bool"]],["Int",["Basics.Int"]],["Float",["Basics.Float"]],["String",["String.String"]],["Color",["String.String"]],["File",["String.String"]],["Group",["Dict.Dict String.String Tiled.Extra.Property.Property"]]]}],"aliases":[],"values":[{"name":"at","comment":" Same as [`get`](Tiled-Extra-Property#get) but path is List of keys\n\n    Property.get [ \"a\", \"b\", \"c\", \"d\" ] prop\n\n","type":"List.List String.String -> Tiled.Extra.Property.Property -> Maybe.Maybe Tiled.Extra.Property.Property"},{"name":"convert","comment":" Convert [`Tiled.Properties`](Tiled-Properties#Properties) to [`Tiled.Extra.Property`](Tiled-Extra-Property#Property) all properties that have `name.subName` or `name[subName]` is grouped as `Group` with nested properties of `subName`.\n\nExample:\n\n    {\n      \"prop1.a\": 1,\n      \"prop1.b\": 2,\n      \"prop1[c]\": 3,\n      \"prop2.a\": 4\n    }\n\nbecome:\n\n    {\n      \"prop1\": {\n        \"a\": 1,\n        \"b\": 2,\n        \"c\": 3\n      },\n      \"prop2\": {\n        \"a\": 4\n      }\n    }\n\n","type":"Tiled.Properties.Properties -> Tiled.Extra.Property.Property"},{"name":"get","comment":" Get deep property:\n\n    Property.get \"a.b.c.d\" prop\n\n","type":"String.String -> Tiled.Extra.Property.Property -> Maybe.Maybe Tiled.Extra.Property.Property"},{"name":"toList","comment":" Convert `Group` to List of key-value pairs\n","type":"Tiled.Extra.Property.Property -> List.List ( String.String, Tiled.Extra.Property.Property )"},{"name":"values","comment":" Convert `Group` to `List` of its values, or get list of single `Property`\n","type":"Tiled.Extra.Property.Property -> List.List Tiled.Extra.Property.Property"}],"binops":[]},{"name":"Tiled.Layer","comment":"\n\n@docs Layer, decode, encode\n@docs TileData, ImageData, ObjectData, DrawOrder, Chunk, TileChunkedData\n\n\n# Internal\n\n@docs decodeDraworder, encodeDraworder\n\n","unions":[{"name":"DrawOrder","comment":" ","args":[],"cases":[["TopDown",[]],["Index",[]]]},{"name":"Layer","comment":" ","args":[],"cases":[["Image",["Tiled.Layer.ImageData"]],["Object",["Tiled.Layer.ObjectData"]],["Tile",["Tiled.Layer.TileData"]],["InfiniteTile",["Tiled.Layer.TileChunkedData"]]]}],"aliases":[{"name":"Chunk","comment":"\n\n  - `data` array or string Array of unsigned int (GIDs) or base64-encoded data\n  - `height` int Height in tiles\n  - `width` int Width in tiles\n  - `x` int X coordinate in tiles\n  - `y` int Y coordinate in tiles\n\n","args":[],"type":"{ data : List.List Basics.Int, height : Basics.Int, width : Basics.Int, x : Basics.Int, y : Basics.Int }"},{"name":"ImageData","comment":"\n\n  - `image` - Image used as background\n  - `name` Name assigned to this layer\n  - `x` Horizontal layer offset in tiles. Always 0.\n  - `y` Vertical layer offset in tiles. Always 0.\n  - `opacity` Value between 0 and 1\n  - `properties` A list of properties (name, value, type).\n  - `visible` Whether layer is shown or hidden in editor\n\n","args":[],"type":"{ id : Basics.Int, image : String.String, name : String.String, opacity : Basics.Float, visible : Basics.Bool, x : Basics.Float, y : Basics.Float, transparentcolor : String.String, properties : Tiled.Properties.Properties }"},{"name":"ObjectData","comment":"\n\n  - `name` Name assigned to this layer\n  - `x` Horizontal layer offset in tiles. Always 0.\n  - `y` Vertical layer offset in tiles. Always 0.\n  - `draworder` [`TopDown`](Tiled.Layer#DrawOrder) (default)\n  - `objects` List of objects. objectgroup only.\n  - `opacity` Value between 0 and 1\n  - `properties` A list of properties (name, value, type).\n  - `visible` Whether layer is shown or hidden in editor\n\n","args":[],"type":"{ id : Basics.Int, draworder : Tiled.Layer.DrawOrder, name : String.String, objects : List.List Tiled.Object.Object, opacity : Basics.Float, visible : Basics.Bool, x : Basics.Float, y : Basics.Float, color : String.String, properties : Tiled.Properties.Properties }"},{"name":"TileChunkedData","comment":" ","args":[],"type":"{ id : Basics.Int, chunks : List.List Tiled.Layer.Chunk, name : String.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 }"},{"name":"TileData","comment":"\n\n  - `data` List of GIDs from [`Tileset`](Tiled.Tileset#Tileset).\n  - `name` Name assigned to this layer\n  - `x` Horizontal layer offset in tiles. Always 0.\n  - `y` Vertical layer offset in tiles. Always 0.\n  - `width` Column count. Same as map width for fixed-size maps.\n  - `height` Row count. Same as map height for fixed-size maps.\n  - `opacity` Value between 0 and 1\n  - `properties` A list of properties (name, value, type).\n  - `visible` Whether layer is shown or hidden in editor\n\n","args":[],"type":"{ id : Basics.Int, data : List.List Basics.Int, name : String.String, opacity : Basics.Float, visible : Basics.Bool, width : Basics.Int, height : Basics.Int, x : Basics.Float, y : Basics.Float, properties : Tiled.Properties.Properties }"}],"values":[{"name":"decode","comment":" ","type":"Basics.Bool -> Json.Decode.Decoder Tiled.Layer.Layer"},{"name":"decodeDraworder","comment":" ","type":"Json.Decode.Decoder Tiled.Layer.DrawOrder"},{"name":"encode","comment":" ","type":"Tiled.Layer.Layer -> Json.Encode.Value"},{"name":"encodeDraworder","comment":" ","type":"Tiled.Layer.DrawOrder -> Json.Encode.Value"}],"binops":[]},{"name":"Tiled.Level","comment":"\n\n@docs Level\n@docs decode, encode\n\n\n# Level Data\n\n@docs LevelData, StaggeredLevelData, ExtensibleLevelData\n\n\n# Helper Types\n\n@docs Axis, OddOrEven, RenderOrder\n\n","unions":[{"name":"Axis","comment":" Used in `staggeraxis` property of `Level` - (staggered / hexagonal maps only)\n","args":[],"cases":[["X",[]],["Y",[]]]},{"name":"Level","comment":" Tiled can export maps as JSON files. That is elm representation of that structure.\n","args":[],"cases":[["Orthogonal",["Tiled.Level.LevelData"]],["Isometric",["Tiled.Level.LevelData"]],["Staggered",["Tiled.Level.StaggeredLevelData"]],["Hexagonal",["Tiled.Level.StaggeredLevelData"]]]},{"name":"OddOrEven","comment":" Used in `staggerindex` property of `Level` - (staggered / hexagonal maps only)\n","args":[],"cases":[["Odd",[]],["Even",[]]]},{"name":"RenderOrder","comment":" Used in `renderorder` property of `Level` - (orthogonal maps only)\n","args":[],"cases":[["RightDown",[]],["RightUp",[]],["LeftDown",[]],["LeftUp",[]]]}],"aliases":[{"name":"ExtensibleLevelData","comment":" ","args":["addition"],"type":"{ addition | backgroundcolor : String.String, height : Basics.Int, infinite : Basics.Bool, layers : List.List Tiled.Layer.Layer, nextobjectid : Basics.Int, renderorder : Tiled.Level.RenderOrder, tiledversion : String.String, tileheight : Basics.Int, tilesets : List.List Tiled.Tileset.Tileset, tilewidth : Basics.Int, version : Basics.Float, width : Basics.Int, properties : Tiled.Properties.Properties }"},{"name":"LevelData","comment":" ","args":[],"type":"Tiled.Level.ExtensibleLevelData {}"},{"name":"StaggeredLevelData","comment":" ","args":[],"type":"Tiled.Level.ExtensibleLevelData { hexsidelength : Basics.Int, staggeraxis : Tiled.Level.Axis, staggerindex : Tiled.Level.OddOrEven }"}],"values":[{"name":"decode","comment":" ","type":"Json.Decode.Decoder Tiled.Level.Level"},{"name":"encode","comment":" ","type":"Tiled.Level.Level -> Json.Encode.Value"}],"binops":[]},{"name":"Tiled.Object","comment":"\n\n@docs Object, decode, encode\n@docs CommonDimension, CommonDimensionGid, CommonDimensionPolyPoints\n@docs Common, Dimension, Gid, PolyPoints\n\n","unions":[{"name":"Object","comment":" ","args":[],"cases":[["Point",["Tiled.Object.Common {}"]],["Rectangle",["Tiled.Object.CommonDimension"]],["Ellipse",["Tiled.Object.CommonDimension"]],["Polygon",["Tiled.Object.CommonDimensionPolyPoints"]],["PolyLine",["Tiled.Object.CommonDimensionPolyPoints"]],["Tile",["Tiled.Object.CommonDimensionGid"]]]}],"aliases":[{"name":"Common","comment":" Do i really need ID here?\n","args":["a"],"type":"{ a | id : Basics.Int, name : String.String, kind : String.String, visible : Basics.Bool, x : Basics.Float, y : Basics.Float, rotation : Basics.Float, properties : Tiled.Properties.Properties }"},{"name":"CommonDimension","comment":" ","args":[],"type":"Tiled.Object.Common (Tiled.Object.Dimension {})"},{"name":"CommonDimensionGid","comment":" ","args":[],"type":"Tiled.Object.Common (Tiled.Object.Dimension { gid : Tiled.Object.Gid })"},{"name":"CommonDimensionPolyPoints","comment":" ","args":[],"type":"Tiled.Object.Common (Tiled.Object.Dimension { points : List.List { x : Basics.Float, y : Basics.Float } })"},{"name":"Dimension","comment":" ","args":["a"],"type":"{ a | width : Basics.Float, height : Basics.Float }"},{"name":"Gid","comment":" ","args":[],"type":"Basics.Int"},{"name":"PolyPoints","comment":" ","args":[],"type":"List.List { x : Basics.Float, y : Basics.Float }"}],"values":[{"name":"decode","comment":" ","type":"Json.Decode.Decoder Tiled.Object.Object"},{"name":"encode","comment":" ","type":"Tiled.Object.Object -> Json.Encode.Value"}],"binops":[]},{"name":"Tiled.Properties","comment":"\n\n@docs Properties, Property\n@docs decode, encode\n\n","unions":[{"name":"Property","comment":" Custom properties values\n","args":[],"cases":[["Bool",["Basics.Bool"]],["Int",["Basics.Int"]],["Float",["Basics.Float"]],["String",["String.String"]],["Color",["String.String"]],["File",["String.String"]]]}],"aliases":[{"name":"Properties","comment":" ","args":[],"type":"Dict.Dict String.String Tiled.Properties.Property"}],"values":[{"name":"decode","comment":" ","type":"Json.Decode.Decoder Tiled.Properties.Properties"},{"name":"encode","comment":" ","type":"Tiled.Properties.Properties -> Json.Encode.Value"}],"binops":[]},{"name":"Tiled.Tileset","comment":"\n\n@docs Tileset, decode, encode\n@docs SourceTileData, EmbeddedTileData, ImageCollectionTileData\n@docs TilesData, ImageCollectionTileDataTile, TilesDataObjectgroup, SpriteAnimation\n\n\n## Decode tileset from file\n\n@docs decodeFile\n\n\n## Internal stuff\n\n@docs GridData\n\n\n## stuff to delete\n\n@docs decodeTilesData, encodeTilesData\n\n","unions":[{"name":"Tileset","comment":" ","args":[],"cases":[["Source",["Tiled.Tileset.SourceTileData"]],["Embedded",["Tiled.Tileset.EmbeddedTileData"]],["ImageCollection",["Tiled.Tileset.ImageCollectionTileData"]]]}],"aliases":[{"name":"EmbeddedTileData","comment":"\n\n  - `columns` The number of tile columns in the tileset\n  - `firstgid` GID corresponding to the first tile in the set\n  - `image` Image used for tiles in this set\n  - `imagewidth` Width of source image in pixels\n  - `imageheight` Height of source image in pixels\n  - `margin` Buffer between image edge and first tile (pixels)\n  - `name` Name given to this tileset\n  - `spacing` Spacing between adjacent tiles in image (pixels)\n  - `tilecount` The number of tiles in this tileset\n  - `tileheight` Maximum height of tiles in this set\n  - `tiles` Dict of TilesData [`TilesData`](#TilesData)\n  - `tilewidth` Maximum width of tiles in this set\n  - `properties` A list of properties (name, value, type).\n\n","args":[],"type":"{ columns : Basics.Int, firstgid : Basics.Int, image : String.String, imageheight : Basics.Int, imagewidth : Basics.Int, margin : Basics.Int, name : String.String, spacing : Basics.Int, tilecount : Basics.Int, tileheight : Basics.Int, tilewidth : Basics.Int, transparentcolor : String.String, tiles : Dict.Dict Basics.Int Tiled.Tileset.TilesData, properties : Tiled.Properties.Properties }"},{"name":"GridData","comment":" ","args":[],"type":"{ height : Basics.Int, orientation : String.String, width : Basics.Int }"},{"name":"ImageCollectionTileData","comment":"\n\n  - `columns` The number of tile columns in the tileset\n  - `firstgid` GID corresponding to the first tile in the set\n  - `margin` Buffer between image edge and first tile (pixels)\n  - `name` Name given to this tileset\n  - `spacing` Spacing between adjacent tiles in image (pixels)\n  - `tilecount` The number of tiles in this tileset\n  - `tileheight` Maximum height of tiles in this set\n  - `tiles` Dict of [`ImageCollectionTileDataTile`](#ImageCollectionTileDataTile)\n  - `tilewidth` Maximum width of tiles in this set\n  - `properties` A list of properties (name, value, type).\n\n","args":[],"type":"{ columns : Basics.Int, firstgid : Basics.Int, margin : Basics.Int, name : String.String, spacing : Basics.Int, tilecount : Basics.Int, tilewidth : Basics.Int, tileheight : Basics.Int, tiles : Dict.Dict Basics.Int Tiled.Tileset.ImageCollectionTileDataTile, properties : Tiled.Properties.Properties, grid : Maybe.Maybe Tiled.Tileset.GridData }"},{"name":"ImageCollectionTileDataTile","comment":" ","args":[],"type":"Tiled.Tileset.TilesDataPlain { image : String.String, imageheight : Basics.Int, imagewidth : Basics.Int }"},{"name":"SourceTileData","comment":"\n\n  - `firstgid` GID corresponding to the first tile in the set\n  - `source` url to `EmbeddedTileData`\n\n","args":[],"type":"{ firstgid : Basics.Int, source : String.String }"},{"name":"SpriteAnimation","comment":" ","args":[],"type":"{ duration : Basics.Int, tileid : Basics.Int }"},{"name":"TilesData","comment":" ","args":[],"type":"Tiled.Tileset.TilesDataPlain {}"},{"name":"TilesDataObjectgroup","comment":" ","args":[],"type":"{ draworder : Tiled.Layer.DrawOrder, name : String.String, objects : List.List Tiled.Object.Object, opacity : Basics.Int, visible : Basics.Bool, x : Basics.Int, y : Basics.Int }"}],"values":[{"name":"decode","comment":" ","type":"Json.Decode.Decoder Tiled.Tileset.Tileset"},{"name":"decodeFile","comment":" ","type":"Basics.Int -> Json.Decode.Decoder Tiled.Tileset.Tileset"},{"name":"decodeTilesData","comment":" ","type":"Json.Decode.Decoder (Maybe.Maybe (Tiled.Tileset.TilesDataPlain { id : Basics.Int }))"},{"name":"encode","comment":" ","type":"Tiled.Tileset.Tileset -> Json.Encode.Value"},{"name":"encodeTilesData","comment":" ","type":"( Basics.Int, Tiled.Tileset.TilesDataPlain a ) -> Json.Encode.Value"}],"binops":[]}]