# parse-wavefront-obj

> Wavefront OBJ parser

Latest version **1.0.3** (published 2016-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-wavefront-obj
pnpm add parse-wavefront-obj
yarn add parse-wavefront-obj
bun add parse-wavefront-obj
```

## 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.3 |
| Published | 2016-03-22 |
| First published | 2015-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | thibauts |
| Maintainers | thibauts |
| Keywords | obj, format, mesh, buffer |

## Links

- npm: https://www.npmjs.com/package/parse-wavefront-obj
- Repository: https://github.com/thibauts/parse-wavefront-obj
- Homepage: https://github.com/thibauts/parse-wavefront-obj#readme
- Issues: https://github.com/thibauts/parse-wavefront-obj/issues
- npm.io page: https://npm.io/package/parse-wavefront-obj

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-03-22
- 1.0.2 — 2016-03-22
- 1.0.1 — 2015-10-28
- 1.0.0 — 2015-05-08

## README

parse-wavefront-obj
===================
### Wavefront OBJ parser

Parses a [Wavefront OBJ](http://en.wikipedia.org/wiki/Wavefront_.obj_file) string or buffer. If you're looking for a stream parser check [this](https://github.com/mikolalysenko/parse-obj).

Supports vertex normals and UV coordinates. Doesn't support material libraries (though I'm open to PRs), nor multiple meshes embedded in the same file.

Install
-------

```bash
$ npm install parse-wavefront-obj
```

Usage
-----

```javascript
var parseOBJ = require('parse-wavefront-obj');
var fs = require('fs');

var buf = fs.readFileSync('mesh.obj');
var mesh = parseOBJ(buf);

console.log(mesh);
/*
{
  positions: [...],
  cells: [...],

  // The following attributes are available when defined 
  // in the original file

  vertexUVs: [...],     // array of UV coordinates
  faceUVs: [...],       // array of UV indices
  vertexNormals: [...], // array of vertex normals
  faceNormals: [...],   // array of normal indices
  name: 'foo'           // mesh name
}
*/
```

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