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)
- returns raw buffer data wrapped in an RxJs observable (soon to be most.js)
- useable both on Node.js & client side
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)
})
- full attributes support (normals, uvs)