Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TileLayerEdit

This object enables modifying the tiles on a tile layer. Tile layers can't be modified directly for reasons of efficiency. The apply function needs to be called when you're done making changes.

An instance of this object is created by calling TileLayer.edit.

Hierarchy

  • TileLayerEdit

Index

Properties

Methods

Properties

mergeable

mergeable: boolean

Whether applied edits are mergeable with previous edits. Starts out as false and is automatically set to true by apply.

Readonly target

target: TileLayer

The target layer of this edit object.

Methods

apply

  • apply(): void
  • Applies the changes made through this object to the target layer. This object can be reused to make further changes.

    By default, the first time this method is called on a TileLayerEdit instance, it triggers a new undoable edit. Subsequent edits made through the same instance will merge with the previous step. To manually control whether the edit will be merged or not, set the mergeable property before calling apply.

setTile

  • setTile(x: number, y: number, tile: null | Tile, flags?: number): void

Generated using TypeDoc