1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Tiled-compatible terrain autotile system
//!
//! This crate provides the WangFiller algorithm for automatic tile selection
//! based on terrain definitions, compatible with Tiled's terrain system.
//!
//! # Features
//! - Corner, Edge, and Mixed terrain set types
//! - Tiled-compatible Wang tile matching
//! - Runtime terrain modification support
//! - Legacy 47-tile blob format support
//!
//! # Example
//!
//! ```rust,ignore
//! use bevy_map_autotile::{
//! terrain::{TerrainSet, TerrainSetType, Color},
//! wang::{WangFiller, paint_terrain},
//! };
//! use uuid::Uuid;
//!
//! // Create a terrain set for a tileset
//! let mut terrain_set = TerrainSet::new(
//! "Ground".to_string(),
//! Uuid::new_v4(), // tileset ID
//! TerrainSetType::Corner,
//! );
//!
//! // Add terrain types
//! terrain_set.add_terrain("Grass".to_string(), Color::GREEN);
//! terrain_set.add_terrain("Dirt".to_string(), Color::rgb(0.6, 0.4, 0.2));
//!
//! // Define tile terrain data for each tile in the tileset
//! terrain_set.set_tile_terrain(0, 0, Some(0)); // Tile 0, corner 0 = Grass
//! // ... more tile definitions
//!
//! // Paint terrain onto a tile map
//! let mut tiles = vec![None; 100]; // 10x10 map
//! paint_terrain(&mut tiles, 10, 10, 5, 5, &terrain_set, 0);
//! ```
// Re-export main types at crate root
pub use ;
pub use ;
pub use ;
// Re-export legacy module contents for backward compatibility
pub use ;
// Re-export bevy_map_core
pub use bevy_map_core;