Expand description
Wave Function Collapse
Provides a simple implementation of the wave function collapse algorithm.
Wave function collapse works by iteratively “collapsing” a collecion of cells (such as a square grid) from all possible states to only the states possible with a given ruleset, selecting randomly where ambiguous.
Modules§
- grid_2d
- 2D grid.
- grid_3d
- 3D grid.
- overlapping
- Overlapping model.
- rules
- Collapse constraints.
Structs§
- Progress
- Incremental WFC progress.
- State
- One possible state at a location.
- State
Set - A superposition of multiple State’s.
Traits§
- Space
- Defines the space or “world” to run WFC on.
Functions§
- collapse
- Perform the wave function collapse algorithm on a given state-space with the provided collapse rule.