Home Reference Source Test Repository
import {Tile} from 'dtile-tilemap/src/tile.js'
public class | source

Tile

A tile object containing tile ID, tileset ID and custom properties.

Constructor Summary

Public Constructor
public

constructor(options: object)

Tile constructor.

Member Summary

Public Members
public

Custom properties of the tile.

public

The tile ID of the tile.

public

The tileset ID of the tile.

Public Constructors

public constructor(options: object) source

Tile constructor.

Params:

NameTypeAttributeDescription
options object
  • optional
  • default: {}

Options for the tile. Can also be tile data you loaded from JSON or similar.

options.tileId number

Tile#tileId

options.tilesetId number

Tile#tilesetId

options.properties Map<string, *>
  • optional
  • default: {}

Tile#properties

Public Members

public properties: Map<string, *> source

Custom properties of the tile.

public tileId: number source

The tile ID of the tile.

public tilesetId: number source

The tileset ID of the tile.