Whether neighboring tiles will be corrected to match up with any marked
changes once apply is called. This can cause a larger area to get
modified. Defaults to false
.
Whether the empty tile is considered when looking for matching tiles.
Defaults to true
.
Whether applied edits are mergeable with previous edits. Starts out as
false
and is automatically set to true
by apply.
The target layer of this edit object.
Applies the changes made through this object to the target layer. This object can be reused to make further changes.
Alternatively, get a copy of the modifications using generate.
Applies the changes made through this object to a new layer and returns that layer. This object can be reused to make further changes.
Sets the desired color for the given corner at the given vertex location.
The vertex location refers to a point in between the tiles, where (0, 0) is the top-left corner of the map and (mapWidth, mapHeight) is the bottom-right corner.
Changing the color of a corner affects all 4 tiles meeting at that corner.
Sets the desired color for the given corner at the given vertex location.
The vertex location refers to a point in between the tiles, where (0, 0) is the top-left corner of the map and (mapWidth, mapHeight) is the bottom-right corner.
Changing the color of a corner affects all 4 tiles meeting at that corner.
Sets the desired color for the given edge at the given location. Only the values WangIndex.Top, WangIndex.Left, WangIndex.Right and WangIndex.Bottom are supported.
Changing the color of an edge affects the 2 tiles connected by that edge.
Sets the desired color for the given edge at the given location. Only the values WangIndex.Top, WangIndex.Left, WangIndex.Right and WangIndex.Bottom are supported.
Changing the color of an edge affects the 2 tiles connected by that edge.
Sets the desired color for the given Wang index at the given location.
This is a low-level function, which only affects the given location and
does not automatically adjust any neighboring tiles. Use setCorner
or setEdge when that is desired or set correctionsEnabled
to true
.
Sets the desired color for the given Wang index at the given location.
This is a low-level function, which only affects the given location and
does not automatically adjust any neighboring tiles. Use setCorner
or setEdge when that is desired or set correctionsEnabled
to true
.
Generated using TypeDoc
This object enables modifying the tiles on a tile layer using a WangSet. For performance reasons, the changes are not applied directly. Call either the apply or generate function when you're done making changes.
Note that the result may vary since the changes are applied by looking for tiles matching the desired Wang colors, which includes a random factor in case of multiple matches.
Colors in a WangSet are numbered starting from 1. To request no Wang color, usually for Wang-aware erasing, use 0. The currently selected WangSet and color are available through MapEditor.currentWangSet and MapEditor.currentWangColorIndex.
An instance of this object is created by calling TileLayer.wangEdit.
1.10.2