[−][src]Crate wfc_tiled
Helper functions to use the Wave Function Collapse algorithm provided by the wfc
crate on tile-based maps.
You can load layer CSV files like the ones exported from Tiled, and save the result as another CSV or as a Tiled .tmx file for previewing inside the software.
As the underlying library only works on two dimensions, multiple layers are not supported.
You should start with the TilePattern struct.
Complete examples are provided in the crate's examples
folder.
Structs
Coord | General purpose coordinate |
ForbidInterface | |
ForbidNothing | |
ForceBorderForbid | Used to prevent wrapping on the edges in the result |
Size | A size cannot be created which would contain un-addressable cells.
That is, the maximum size has a width and height of one greater than the maximum |
TilePattern | Extracts a pattern from a tilemap and lets you run Wave Function Collapse on it. |
TileSet | |
WrapXY |
Enums
Orientation |
Traits
ForbidPattern | |
Wrap |
Functions
grid_to_csv | Save a Grid to a CSV file. |
grid_to_image | Convert a Grid to a DynamicImage. |
grid_to_tiled | Save a Grid to a Tiled .tmx file. |
Type Definitions
PatternId |