wave_function_collapse icon indicating copy to clipboard operation
wave_function_collapse copied to clipboard

Wave function collapse library for Nim

== Wave Function Collapse

Pattern generation library based on https://github.com/mxgmn/WaveFunctionCollapse

CAUTION: The library is in beta stage.

image:https://img.shields.io/badge/status-beta-orange.svg[badge]

.Features: [none]

  • [x] 2D model generation
  • [ ] 3D model generation
  • [ ] 2D animated image generation
  • [x] Deterministic RNG
  • [x] Unit and functional tests

.Installation [source,bash]

$ # install Nim using APT or from the upstream website $ sudo apt-get install nim $ nimble install wave_function_collapse

.Testing [source,bash]

nim -p:. -d:lcg r tests/unit.nim

=== Examples:

image:https://raw.githubusercontent.com/FedericoCeratto/wave_function_collapse/master/tests/data/input/Red%20Maze.png[Red Maze, 32, role="left"] image:https://raw.githubusercontent.com/FedericoCeratto/wave_function_collapse/master/tests/data/output/RedMaze.png[Red Maze, role="right"]

image:https://raw.githubusercontent.com/FedericoCeratto/wave_function_collapse/master/tests/data/input/Colored%20City.png[Red Maze, 32, role="left"] image:https://raw.githubusercontent.com/FedericoCeratto/wave_function_collapse/master/tests/data/output/ColoredCity.gif[ColoredCity, role="right"]

image:https://raw.githubusercontent.com/FedericoCeratto/wave_function_collapse/master/tests/data/output/TrickKnot.gif[TrickKnot]