heightmap-contours

1.0.1 • Public • Published

heightmap-contours

stable

Generate a series of 2D contour meshes over a heightmap.

Usage

NPM

layers = heightmapContours(heightmap, [options])

heightmap is a 2D ndarray representing the heightmap. Its size ("shape") will determine the resolution of the final output.

Accepts the following options:

  • slices: the number of slices to make through the heightmap, hence the number of output layers.
  • border: boolean value. If true, add a border to the edges to ensure that all of the resulting layers are manifold (i.e. contain no gaps or forks). Defaults to true.

Returns an array of simplicial complexes, one for each layer starting from the top.

See Also

License

MIT, see LICENSE.md for details.

Package Sidebar

Install

npm i heightmap-contours

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • hughsk