Type Alias Tileset

Tileset: {
    image: HTMLImageElement;
    margin?: Vector2;
    spacing?: Vector2;
    tileHeight: number;
    tileWidth: number;
    width: number;
}

Tileset configuration to be used with the TilemapRenderer

Type declaration

  • image: HTMLImageElement

    The tileset image element

  • Optionalmargin?: Vector2

    Margin of the tile in pixels (space in the top and the left)

  • Optionalspacing?: Vector2

    Spacing of the tile in pixels (space in the bottom and the right)

  • tileHeight: number
  • tileWidth: number
  • width: number