An implementation of the Wave Function Collapse algorithm written in Rust. This implementation strives to be as general as possible while staying as fast as possible.
- Works in any dimension from 1-6
- Works on any type which implements
WaveTileable - Wave can be collapsed in parallel for types which are also
SendandSync
The crate comes with a set of useful (and common) features that deal with wave function collapse.
image(default) Allows the user to easily crate and collapseWaves of images.parallel(default) Allows the user to collapse aWavein parallel for types which areSendandSync.wrappingAllows the user to create a wrappingWave. Currently, supported wrapping modes areTorusProjectivePlaneKleinBottle
The following command runs the image example, with the rooms.png sample on a
tiling window of sidelength 3.
cargo run --release --example image -- ./examples/image/samples/rooms.png 3