# three-obj-earcut

> Triangulates obj text, depends on three.js and earcut.

Latest version **1.0.1** (published 2023-04-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install three-obj-earcut
pnpm add three-obj-earcut
yarn add three-obj-earcut
bun add three-obj-earcut
```

## 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 | 2023-04-23 |
| First published | 2023-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | wxfred |
| Maintainers | wxfred |
| Keywords | obj, triangulation, threejs, earcut |

## Links

- npm: https://www.npmjs.com/package/three-obj-earcut
- Repository: https://github.com/wxfred/three-obj-earcut
- Homepage: https://github.com/wxfred/three-obj-earcut#readme
- Issues: https://github.com/wxfred/three-obj-earcut/issues
- npm.io page: https://npm.io/package/three-obj-earcut

## Dependencies (2)

- [three](https://npm.io/package/three.md) ^0.151.3
- [earcut](https://npm.io/package/earcut.md) ^2.2.4

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-04-23
- 1.0.0 — 2023-04-22
- 0.0.1 — 2023-04-22

## README

## Three Obj Earcut

[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/three-obj-earcut.svg?style=flat-square
[npm-url]: https://npmjs.org/package/three-obj-earcut
[download-image]: https://img.shields.io/npm/dm/three-obj-earcut.svg?style=flat-square
[download-url]: https://npmjs.org/package/three-obj-earcut

Triangulates obj text, depends on [three.js](https://github.com/mrdoob/three.js) and [earcut](https://github.com/mapbox/earcut), supports convex and concave polygon without holes.

Make sure your obj file contains normal coords, the first vertex's normal in a face will be used for rotation (rotate the face to parallel to the XY plane), because earcut handles 3D data as if it was projected onto the XY plane.

## Install

```bash
npm install --save three-obj-earcut
```

## Usage

```js
import triangulate from 'three-obj-earcut'
const result = triangulate(objText)
```

## License

[MIT](LICENSE)

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