Giter Site home page Giter Site logo

d-t-666 / wave-function-collapse-p5 Goto Github PK

View Code? Open in Web Editor NEW
25.0 1.0 0.0 36.95 MB

Wave function collapse implemented in p5.js

Home Page: https://d-t-666.github.io/wave-function-collapse-p5

HTML 3.06% JavaScript 96.30% CSS 0.64%
wave-function-collapse algorithm p5js p5 p5js-experiment procedural-generation game-development

wave-function-collapse-p5's Introduction

Wave function collapse in p5js

This is an implementation of the all mighty Wave Function Collapse Algorithm (overlapping model) in p5.js

A gif of the demo working

How to run:

  • if you have python:
    1. cd into the project directory
    2. run python -m http.server
  • if you're using vscode:
    1. install live preview
    2. when done, click go live button on the bottom of the vscode window

Cool reference:

  1. The original WFC implementation on github
  2. the explanation we followed on grudbugs
  3. Efficient Computation boristhebrave.com
  4. Parallel Wave Function Collapse - Jan Orlowski and Amy Lee
  5. WFC in processing.py - solub on processing.org

Contribute!

  • just fork the repo, and make pr's

wave-function-collapse-p5's People

Contributors

d-t-666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wave-function-collapse-p5's Issues

Project Setup for P5 Web Editor!!!

Hi,

I have spent the last week trying to make a Wave Function Collapse project so I can play with it. But I have failed more times then I can remember.... I just looked it up and I have 13 failed attempts. So I gave in and tried to find if someone else made it and I can just use the code. The only results that were good was your project but it is not setup for the P5 Web Editor.

So I went ahead and copied all the code and made a few modifications for it to work since the Web Editor doesn't have support for async functions yet and I wanted to share it with yall! Maybe you could put a link to it on the home page of this repo so others can clone it using the Web Editors duplicate/save feature! But if not I thought y'all would still want to have access to it incase you ever want it and don't want to do what I just did!

Edit: If the page says it failed to load image, just retry it. That is happening because the images are being loaded in setup and not preload for technical reasons. So occasionally the loading process took to long and failed.

Thanks,
SpicyMelon

P5: https://editor.p5js.org/SpicyMelon/sketches/CbdqCao9k

Youtube: https://www.youtube.com/c/SpicyMelonYT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.