[][src]Function wfc_tiled::grid_to_tiled

pub fn grid_to_tiled<P: AsRef<Path>>(
    grid: &Grid<u32>,
    path: P,
    tileset: TileSet
) -> Result<(), Box<dyn Error>>

Save a Grid to a Tiled .tmx file.

This is meant for previewing the output of TilePattern::run_collapse() in Tiled, although it can be edited normally.

It is fairly limited in that it creates a file with only one layer, one tileset and no extra settings.

Examples

use wfc_tiled::grid_to_tiled;
 
grid_to_tiled(&grid, "output.tmx")?;