Expand description
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§
- General purpose coordinate
- Used to prevent wrapping on the edges in the result
- 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
i32
. - Extracts a pattern from a tilemap and lets you run Wave Function Collapse on it.
Enums§
Traits§
Functions§
- Save a Grid to a CSV file.
- Convert a Grid to a DynamicImage.
- Save a Grid to a Tiled .tmx file.