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
Send
andSync
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 collapseWave
s of images.parallel
(default) Allows the user to collapse aWave
in parallel for types which areSend
andSync
.wrapping
Allows the user to create a wrappingWave
. Currently, supported wrapping modes areTorus
ProjectivePlane
KleinBottle
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