Skip to content

Latest commit

 

History

History
49 lines (25 loc) · 1.41 KB

README.md

File metadata and controls

49 lines (25 loc) · 1.41 KB

Usco-obj-parser

GitHub version

obj format parser for USCO project

originally based on THREE.js CTM parser, but rather extensively modified. (not dependenant, or using three.js anymore)

Optimized for speed in the browser (webworkers etc)

General information

  • returns raw buffer data wrapped in an RxJs observable (soon to be most.js)
  • useable both on Node.js & client side

Usage

      import parse,  {outputs} from '../lib/obj-parser'

      let data = fs.readFileSync("mesh.obj",'binary')

      let objObs = parse(data) //we get an observable back

      objObs.forEach(function(parsedGeometry){
        //DO what you want with the data wich is something like {vertices,normals,etc}
        console.log(parsedGeometry) 
      })

TODO:

  • full attributes support (normals, uvs)

LICENSE

The MIT License (MIT)


Build Status Dependency Status devDependency Status