wave-function-collapse
wave-function-collapse copied to clipboard
Wave function collapse procedural generation for arbitrary graphs
Wave Function Collapse
Wave function collapse implementation in Haskell.
This implementation works on a "Graph" rather than an image, so it scales to arbitrary dimensions. This means you can run WFC in 2D, 3D, or even do 3D animations over time: 4D! If you can express relationships between "cells" in your space you can solve it.
This lib is in early stages and will be changing a lot.
NOTE everything is completely undocumented and probably tough to figure out ATM. I'll clean it up eventually :)
You can see an example use-case in ./app/Main.hs, best of luck to you :)
Example
Building a simple tiling pattern with WFC using a text grid: