gdx.tiled

->empty-tiled-map

(->empty-tiled-map)

->static-tiled-map-tile

(->static-tiled-map-tile texture-region)

add-layer!

(add-layer! tiled-map & {:keys [name visible properties]})

cell->tile

(cell->tile cell)

cell-at

(cell-at tiled-map layer [x y])

Layer can be keyword or layer object. Position vector x y. If the layer is part of tiledmap, returns the TiledMapTileLayer$Cell at position.

copy-tile

Memoized function. Tiles are usually shared by multiple cells. https://libgdx.com/wiki/graphics/2d/tile-maps#cells No copied-tile for AnimatedTiledMapTile yet (there was no copy constructor/method)

get-layer

(get-layer tiled-map layer-name)

Returns the layer with name (string).

HasProperties

protocol

members

get-property

(get-property _ key)

Pass keyword key, looks up in properties.

m-props

(m-props _)

Returns instance of com.badlogic.gdx.maps.MapProperties

height

(height tiled-map)

layer-index

(layer-index tiled-map layer)

Returns nil or the integer index of the layer. Layer can be keyword or an instance of TiledMapTileLayer.

layer-name

(layer-name layer)

layers

(layers tiled-map)

load-map

(load-map file)

Has to be disposed.

map-positions

(map-positions tiled-map)

Returns a sequence of all x y positions in the tiledmap.

positions-with-property

(positions-with-property tiled-map layer property-key)

If the layer (keyword or layer object) does not exist returns nil. Otherwise returns a sequence of [x y value] for all tiles who have property-key.

property-value

(property-value tiled-map layer position property-key)

Returns the property value of the tile at the cell in layer. If there is no cell at this position in the layer returns :no-cell. If the property value is undefined returns :undefined. Layer is keyword or layer object.

put!

(put! properties key value)

put-all!

(put-all! properties other-properties)

remove-layer!

(remove-layer! tiled-map layer)

Removes the layer, layer can be keyword or an actual layer object.

set-tile!

(set-tile! layer [x y] tile)

visible?

(visible? layer)

width

(width tiled-map)