# normals

> Estimates normals for meshes

Latest version **1.1.0** (published 2016-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install normals
pnpm add normals
yarn add normals
bun add normals
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-05-20 |
| First published | 2013-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | normal, mesh, normals, estimate, 3d, geometry |

## Links

- npm: https://www.npmjs.com/package/normals
- Repository: https://github.com/mikolalysenko/normals
- Homepage: https://github.com/mikolalysenko/normals#readme
- Issues: https://github.com/mikolalysenko/normals/issues
- npm.io page: https://npm.io/package/normals

## Recent versions

- 1.1.0 (latest) — 2016-05-20
- 1.0.1 — 2014-11-14
- 1.0.0 — 2014-11-14
- 0.1.0 — 2013-02-11
- 0.0.0 — 2013-02-06

## README

normals
=======
Estimates normals for surface meshes.

Installation
============
Using [npm](https://npmjs.org/):

    npm install normals
    
Example
=======
Here is how to compute the vertex and face normals for the Stanford bunny:

```js
    var bunny = require("bunny");
    bunny.vertexNormals = require("normals").vertexNormals(bunny.cells, bunny.positions[,epsilon]);
    bunny.faceNormals = require("normals").faceNormals(bunny.cells, bunny.positions[,epsilon]);
```

`require("normals").vertexNormals(cells, positions[,epsilon])`
----------------------------------------------------
This estimates the vertex normals for an oriented mesh.

* `cells` is an array of indexed vertex positions
* `positions` is an array of vertex positions

Returns: An array of length = `positions.length` of the per-vertex normals.


`require("normals").faceNormals(cells, positions[,epsilon])`
----------------------------------------------------
This estimates the face normals for an oriented mesh.

* `cells` is an array of indexed vertex positions
* `positions` is an array of vertex positions

Returns: An array of length = `cells.length` of the per-face normals.


Credits
=======
(c) 2013 Mikola Lysenko. BSD

---
_Source: https://npm.io/package/normals · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
