Consistently orient manifold patches of a 2D simplicial complex
npm install consistently-orient
Depth-first traversal through 2D simplicial complex to consistently orient cells (and potentially fail with information about orientability).

``javascript`
var bunny = require('bunny')
var flippedCount = orient(cells);
require("consistently-orient")(cells)cells` in-place. Splits the complex into components defined by manifold connectivity (i.e. two cells are neighbors iff they share a manifold edge), and for each component attempts to consistently orient cells. Note that we choose the desired orientation arbitrarily, so a further global check is required if you need additional guarantees such as outward-facing normals.
----------------------------------------------------
Modifies
In the case of non-orientability (determined by reaching a contradiction while propagating orientation), raises an error.
The method we use for finding manifold patches is derived from this reference.
See stackgl/contributing for details.
MIT. See LICENSE.md for details.