0.0.11 • Published 6 years ago

voxel-generators v0.0.11

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

voxel-generators

Deterministic Random Numbers

  • .Random.seed(seed) : returns a new deterministic generator based on the provided seed.

Noise Generators

  • .Noise.perlin() : returns a factory that can create new noise by seed according to the perlin noise algorithm.
  • .Noise.simplex() : returns a factory that can create new noise by seed according to the simplex noise algorithm.

Noise Factories

Noise factories take 2D Noise algorithms and tile them across the map in a deterministic way

  • .SeamlessNoiseFactory(seed, NoiseClass, lower, upper, mapFn) : Generates 5 textures per chunk and blends them to create seamless edges(within a single biome) and extrudes that in the provided range
  • .TiledNoiseFactory(seed, NoiseClass, lower, upper, mapFn) : Generates 1 texture per chunk and extrudes that in the provided range

Object Generators

  • voxel-generators/objects/trees : returns an object that allows you to add a tree trees.add({x:<x>, y:<y>, z:<z>, height:<max height>, material:<material index>}), then can be passed into a geometry reducer.
  • voxel-generators/objects/houses : returns an object that allows you to add a house houses.add({x:<x>, y:<y>, z:<z>, size:<cube size>, material:<material index>}), then can be passed into a geometry reducer.

More docs to come

Testing

mocha

Enjoy,

-Abbey Hawk Sparrow

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago