# merge-vertices

> Merges mesh vertices having identical coordinates

Latest version **1.0.1** (published 2015-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install merge-vertices
pnpm add merge-vertices
yarn add merge-vertices
bun add merge-vertices
```

## 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.0.1 |
| Published | 2015-03-01 |
| First published | 2015-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | thibauts |
| Maintainers | thibauts |
| Keywords | merge, vertices |

## Links

- npm: https://www.npmjs.com/package/merge-vertices
- Repository: https://github.com/thibauts/merge-vertices
- Issues: https://github.com/thibauts/merge-vertices/issues
- npm.io page: https://npm.io/package/merge-vertices

## Recent versions

- 1.0.1 (latest) — 2015-03-01
- 1.0.0 — 2015-03-01

## README

merge-vertices
==============
### Merges mesh vertices having identical coordinates

Merges vertices having equal coordinates and reindexes the faces.

Install
-------

```bash
$ npm install merge-vertices
```

Usage
-----

```javascript
var mergeVertices = require('merge-vertices');

var mesh = {
  cells: [
    [0, 1, 2],
    [3, 4, 5]
  ],
  positions: [
    [ 0, 0, 0],
    [ 1, 0, 0],
    [ 0, 1, 0],
    [ 0, 0, 0],
    [-1, 0, 0],
    [ 0, 1, 0]
  ]
}

mesh = mergeVertices(mesh.cells, mesh.positions);

console.log(mesh);
/*
{ 
  cells: [ 
    [0, 1, 2], 
    [0, 3, 2] 
  ],
  positions: [ 
    [ 0, 0, 0], 
    [ 1, 0, 0], 
    [ 0, 1, 0], 
    [-1, 0, 0] 
  ] 
}
*/
```

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