Add setTerrain functionality to TileLayerEdit by a-morphous · Pull Request #3758 · mapeditor/tiled (original) (raw)

@a-morphous

added 3 commits

June 1, 2023 14:14

@a-morphous

@a-morphous

…rates tiles for all of them

@a-morphous

@a-morphous

@a-morphous

@a-morphous

a-morphous

a-morphous

@bjorn

@bjorn

@bjorn

@bjorn

Even though I like WangPainter more, I'm sticking with WangFiller for now to keep the patch easier to read.

@bjorn

@bjorn

Instead of WangId.Top, you now type WangIndex.Top in JS. This allowed for more intuitively using the WangIndex type as a function parameter.

Also exposed the "corrections enabled" setting of WangFiller, which could be useful.

Finally, updated the JS API docs.

@bjorn

@bjorn

@bjorn

@bjorn

When corrections are disabled, and the Wang set is not complete, a matching tile is only placed when it will not make it impossible to place a matching tile on any of its neighboring cells.

For incomplete Wang sets with transitions to empty, it can happen that a matching tile requires an empty WangId as neighbor. However, the empty WangId is never explicitly part of a WangSet. As such, we should probably never discard a match when it requires an empty neighbor.

@bjorn

Since the TileLayerWangEdit allows the WangFiller to be reused, we need to make sure it starts off with a clean state.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})