Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/dot-obj
A generic parser for the .obj 3D geometry format.
https://github.com/hughsk/dot-obj
Last synced: 8 days ago
JSON representation
A generic parser for the .obj 3D geometry format.
- Host: GitHub
- URL: https://github.com/hughsk/dot-obj
- Owner: hughsk
- License: other
- Created: 2013-09-24T00:02:01.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-28T12:27:56.000Z (about 11 years ago)
- Last Synced: 2024-10-17T16:41:27.555Z (22 days ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# dot-obj [![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
A generic parser for the
[.obj 3D geometry format](http://en.wikipedia.org/wiki/Wavefront_.obj_file).
This has been extracted from [mrdoob](http://github.com/mrdoob)'s
[THREE.OBJLoader](https://github.com/mrdoob/three.js/blob/21515188fd613a71f3d76199b7ae60857f168d25/examples/js/loaders/OBJLoader.js) class.[![dot-obj](https://nodei.co/npm/dot-obj.png?mini=true)](https://nodei.co/npm/dot-obj)
## Usage ##
### `require('dot-obj')(fileString)` ###
Takes a .obj file as a string and returns an array of objects, each with the
following properties:* `positions`: the vertex positions for this model.
* `cells`: the faces for this model - i.e. and indexed list of `positions` for
each face.
* `normals`: a list of vertex normals, if available.
* `uv`: a list of vertex UV coordinates, if available.