# three-simplicial-complex

> render simplicial complexes with ThreeJS

Latest version **69.0.6** (published 2015-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install three-simplicial-complex
pnpm add three-simplicial-complex
yarn add three-simplicial-complex
bun add three-simplicial-complex
```

## 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 | 69.0.6 |
| Published | 2015-01-06 |
| First published | 2014-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | three, bunny, simplicial, complex |

## Links

- npm: https://www.npmjs.com/package/three-simplicial-complex
- Repository: https://github.com/Jam3/three-simplicial-complex
- Issues: https://github.com/Jam3/three-simplicial-complex/issues
- npm.io page: https://npm.io/package/three-simplicial-complex

## Dependencies (1)

- [inherits](https://npm.io/package/inherits.md) ^2.0.1

## Recent versions

- 69.0.6 (latest) — 2015-01-06
- 69.0.5 — 2015-01-06
- 69.0.4 — 2014-12-01
- 69.0.3 — 2014-11-26
- 69.0.2 — 2014-11-26
- 69.0.1 — 2014-11-26
- 69.0.0 — 2014-11-26

## README

# three-simplicial-complex

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

![img](http://i.imgur.com/HXFvCyE.png)

Creates a THREE.Geometry from a 3D simplicial complex. See [demo](test.js) for an example.

```js
var Complex = require('three-simplicial-complex')(THREE)

var mesh = {
    positions: [ [25,25,25], [15,15,25], [50,50,25], [15,15,15], ... ],
    cells: [ [0,1,2], [1,3,2], ...]
}

var complex = Complex(mesh)
complex.position.x = 2
scene.add(complex)
```

This is useful for inter-op with modules like [icosphere](https://www.npmjs.org/package/icosphere), [bunny](https://www.npmjs.org/package/bunny), [stanford-dragon](https://www.npmjs.org/package/stanford-dragon), [mesh-combine](https://www.npmjs.org/package/mesh-combine), [extrude-polyline](https://www.npmjs.org/package/extrude-polyline), [teapot](https://www.npmjs.org/package/teapot), [triangulate-contours](https://www.npmjs.org/package/triangulate-contours), etc.

## Usage

[![NPM](https://nodei.co/npm/three-simplicial-complex.png)](https://nodei.co/npm/three-simplicial-complex/)

#### `geo = Complex([mesh])`

Creates a new THREE.Geometry with the given complex (optional), where `mesh` contains `{ positions, cells }`.

#### `geo.update(mesh)`

Updates the THREE.Geometry with the new simplicial complex.

#### Versioning

This uses an unusual versioning system to better support ThreeJS's (lack of) versioning. The major version of this repo will line up with ThreeJS releases (`69.0.0` => `r69`). The minor will be reserved for any new features, and patch for bug fixes and documentation/readme updates. In some rare cases, a minor feature may introduce a breaking change; so it's generally safest to use tilde or `save-exact` for this module.

## License

MIT, see [LICENSE.md](http://github.com/Jam3/three-simplicial-complex/blob/master/LICENSE.md) for details.

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