simple_wfc

Crates.iosimple_wfc
lib.rssimple_wfc
version0.1.0-alpha.7
created_at2025-11-11 05:23:58.934524+00
updated_at2025-11-12 18:53:46.270737+00
descriptionA simple implementation of wave-function collapse for procedural generation
homepage
repositoryhttps://github.com/finnbear/wfc
max_upload_size
id1926723
size83,217
Finn Bear (finnbear)

documentation

README

Simple WFC

Crates.io docs.rs

This crate is a simple implementation of Wave Function Collapse a.k.a. Model Synthesis.

Features

  • 2D
  • 3D
  • Custom collapse order
  • Periodic coordinate wrapping
  • Determinism (via custom rand::Rng)
  • Simple tiles
  • Overlapping tiles
    • Custom pattern size
    • Custom symmetry
  • Error reporting

Example (3x3 overlapping patterns)

____________________
__+---+__+---+______
__|+++|__|***|______
__|+++|__|***+---+__
__|+++|__|*******|__
__|+++|__|*******|__
__|+++|__|*******|__
__+---+__+-------+__
____________________
__________________________________________________
__________________________________________________
_+---+_________________________________+--+_______
_|***|______+-----+______+---------+___|**|_______
_|***|______|+++++|______|*********|___|**+----+__
_|***|______|+++++|______|*********|___|*******|__
_|***|______+-----+______+--+******|___|*******|__
_|***|______________________|******|___+-------+__
_+---+______________________+------+______________
_________+-----------+____________________________
_________|***********|_____________________+---+__
_+-------+***********|_____________+---+___|***|__
_|**************+----+_____+--+____|***|___|***|__
_|**************|__________|**|____|***|___|***|__
_+--------------+__________|**|____|***|___|***|__
____________________+---+__|**|____+---+___+---+__
____________________|***|__|**|___________________
____________________|***|__|**|___________________
____________________+---+__+--+___________________
__________________________________________________

Acknowledgements

This is a simplified and extended fork of kahuna.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 0

cargo fmt