Socket
Book a DemoInstallSign in
Socket

mesh-simplify

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mesh-simplify

Surface Simplification via Quadric Error Metrics

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

mesh-simplify

experimental

Surface Simplification via Quadric Error Metrics. An implementation of this paper, with influence from this C++ implementation.

Usage

NPM

var bunny          = require('bunny')
var meshSimplify   = require('mesh-simplify')
var simplified     = meshSimplify(bunny.cells, bunny.positions)(1000);
console.log(simplified.positions.length) # <- 1000

require("mesh-simplify")(cells, positions[, faceNormals, distanceThreshold])

This returns a function that takes a target number of vertices and outputs a mesh with that number of vertices that approximates the input mesh. distanceThreshold is a number signifying the maximum distance two unconnected vertices in the original mesh can be considered collapse-able.

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

Keywords

ecosystem:stackgl

FAQs

Package last updated on 25 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts