A naive heightmap mesher that takes a 2D ndarray and returns a 3D mesh
Want to see pretty graphs? Log in now!
npm install heightmap-mesher
|2||downloads in the last week|
|9||downloads in the last month|
|Last Published By|
|Version||0.0.0 last updated 8 months ago|
|Keywords||ndarray, heightmap, terrain, 3d, webgl, mesher|
A naive heightmap mesher: takes a 2-dimensional
ndarray and returns a
that contains the required vertices to render the heightmap as a 3D mesh.
There's no optimisations, so this is mostly for convenience.
Should be pretty trivial to use in combination with ndarray-continuous for infinite terrain, too :)
Takes an 2D ndarray, where each value corresponds to a height in the map. The X and Z vertices will be between 0 and 1, and the Y vertices will be the same values you specify.
You can transform the model after the fact to scale the dimensions of the resulting mesh.