Surface Simplification via Quadric Error Metrics
npm install mesh-simplify
Surface Simplification via Quadric Error Metrics. An implementation of this paper, with influence from this C++ implementation.

``javascript`
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])distanceThreshold` is a number signifying the maximum distance two unconnected vertices in the original mesh can be considered collapse-able.
----------------------------------------------------
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.
See stackgl/contributing for details.
MIT. See LICENSE.md for details.