Procedurally generated forrests.
-
npm i
-
npm run build
-
host
build/
Chunks:
the list of chunks
example:
{
"index": {
"biome": {
"name": "hills",
"groundColor": 0x009933
},
"ground": {},
"trees": []
}
}
Tree "API":
tree((root = { x, y }), height);
generates the tree.
returns:
-
leafColor: hex color code
-
branchColor: hex color code
-
branches: a list of lines
-
leaves: a list of lines or points
perlin noise: Joseph Gentle (https://github.com/josephg/noisejs)
L system rules: https://ameya98.github.io/WebPPL/generative_art/
MIT