melonJS
    Preparing search index...

    Interface TilesetDefinition

    interface TilesetDefinition {
        class?: string;
        columns?: number;
        fillmode?: string;
        firstgid?: number;
        image?: string | HTMLCanvasElement | HTMLImageElement | OffscreenCanvas;
        mapTileheight?: number;
        mapTilewidth?: number;
        margin?: number;
        name?: string;
        objectalignment?: string;
        spacing?: number;
        tilecount?: number;
        tileheight: number;
        tileoffset?: { x: number; y: number };
        tilerendersize?: string;
        tilewidth: number;
    }
    Index
    class?: string

    a class name, for the game's own use

    columns?: number

    the tiles per row the editor counted, to derive the number of tiles from when tilecount is not given; it does not change where a tile is in the image

    fillmode?: string

    "stretch" or "preserve-aspect-fit", with a tilerendersize of "grid"

    firstgid?: number

    the global id of the tileset's first tile

    image?: string | HTMLCanvasElement | HTMLImageElement | OffscreenCanvas

    the image the tiles are cut from, or the name it was loaded under

    mapTileheight?: number

    the height of the map's cells, when not the tile's

    mapTilewidth?: number

    the width of the map's cells, when not the tile's

    margin?: number

    the space around the tiles, in pixels

    name?: string

    the tileset name

    objectalignment?: string

    the point of a tile object that sits at its position

    spacing?: number

    the space between two tiles, in pixels

    tilecount?: number

    the number of tiles the editor numbered, which sets the tileset's last global id; it does not change where a tile is in the image

    tileheight: number

    the height of a tile, in pixels

    tileoffset?: { x: number; y: number }

    an offset every tile is drawn with, in pixels

    tilerendersize?: string

    "tile" to draw a tile at its own size, "grid" at the map's cell size

    tilewidth: number

    the width of a tile, in pixels