The list above is a small selection of my favorite projects. There're a lot more on the Repos page. Check out my portfolio and my Glitch too!
This README is generated with a Python script and Github Actions. How it works
🌊💥 N-dimensional Wave Function Collapse with infinite canvas
Home Page: https://ndwfc.glitch.me/
License: MIT License
The list above is a small selection of my favorite projects. There're a lot more on the Repos page. Check out my portfolio and my Glitch too!
This README is generated with a Python script and Github Actions. How it works
Not really sure what's going on here but the example code doesn't work for me.
I copied over the ndwfc.js file into my project EXACTLY. For brevity I am not going to paste that here.
Also I am running it in a p5js project in the web editor. Here is my sketch.js file code:
function setup() {
createCanvas(800, 800);
nd = 2;
weights = [1, 1, 1];
rules = [
["x", 0, 1],
["x", 1, 0],
["y", 1, 2],
];
wfc = new WFC({ nd, weights, rules });
size = 5;
wfc.expand([-size, -size], [size, size]);
}
function draw() {
background(51);
if (frameCount % 100 == 0) {
var done = wfc.step();
if (done) {
size += 5;
wfc.expand([-size, -size], [size, size]);
}
console.log(wfc.readout());
}
}
When I run it it prints out this:
It seems like the issue is coming from the entropy or propogation part of the code as its running into NaNs. But I am confused why if the code I have is pretty much exactly the example code in the home page
Hi! I've been playing around with this for a project and it's great so far, but I'm trying to modify it so that it can allow for rules like Tile 0 is allowed to the left of Tile 1 if and only if Tile 0 is also to the right of Tile 2
or Tile 4 is only allowed on edges
. I am looking through the code to see if I can figure this out myself, but if you happen to see this, any tips would be appreciated.
Thank you!
I noticed the class function accepts a wave
parameter that isn't documented. I assumed I could use this to seed the wave and it kinda works.
// Works fine, first cell is 0
let wfc = new WFC({ nd, rules, weight, wave: { "0,0": 0 } });
// Doesn't work :( fills the wave with `undefined`
let wfc = new WFC({ nd, rules, weights, wave: { "1,0": 0 } });
Is it possible to provide one (or multiple) starting values and allow the wave to collapse around them?
Hello, under what license is this project released under ? I would like to study it to learn from it. Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.