esm-obj

ESM Wavefront OBJ 3D model file format parser

This library is an ESM module for parsing Wavefront OBJ files into a JavaScript structure suitable for further processing or rendering.

Status

This library is not really maintained.

It can parse edges and faces, but ignores the other commands and throws on some I haven’t set to be ignored yet. I don’t know if I will develop it further to handle this better.

Installation

import parse from 'https://tomashubelbauer.github.io/esm-obj/index.js';

Usage

const mesh = parse(text);

The return values is an object with the following shape:

To-Do

Add the promised support for edge parsing

Add a test comprising of various OBJ files and their JSON representations

Consider adding support for more advanced OBJ shapes

Consider adding support for textures