melonJS
    Preparing search index...

    Class TMXTileset

    a TMX Tile Set Object

    Index

    Constructors

    Properties

    _renderDh: number
    _renderDw: number
    _renderDxCenter: number
    _renderDyCenter: number
    _renderDyOffset: number
    _renderScaleY: number
    atlas: any
    class: string

    the tileset class (since Tiled 1.9, renamed back to type on tile/object in 1.10)

    fillmode: string

    fill mode when tiles are not rendered at native size (since Tiled 1.9)

    "stretch"
    
    firstgid: number

    the first global tile ID of this tileset

    image: any
    isAnimated: boolean

    Tileset contains animated tiles

    isCollection: boolean

    true if the tileset is a "Collection of Image" Tileset

    lastgid: number

    the last global tile ID of this tileset

    margin: number

    the margin around tiles in pixels

    0
    
    name: string

    the tileset name

    spacing: number

    the spacing between tiles in pixels

    0
    
    texture: any
    tileheight: number

    the height of each tile in pixels

    tileoffset: Vector2d

    tile drawing offset

    tilerendersize: string

    how tiles render relative to the grid (since Tiled 1.9)

    "tile"
    
    tilewidth: number

    the width of each tile in pixels

    Methods

    • return the tile image from a "Collection of Image" tileset

      Parameters

      • gid: number

      Returns HTMLImageElement | HTMLCanvasElement | undefined

      corresponding image or undefined

    • return the properties of the specified tile

      Parameters

      • tileId: number

        global tile ID

      Returns object | undefined

      tile properties or undefined