An open API service indexing awesome lists of open source software.

https://github.com/federicoceratto/wave_function_collapse

Wave function collapse library for Nim
https://github.com/federicoceratto/wave_function_collapse

nim nim-lang nim-language procedural-generation procedural-textures wavefunctioncollapse

Last synced: 17 days ago
JSON representation

Wave function collapse library for Nim

Awesome Lists containing this project

README

        

== 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]