Import a Wavefront OBJ file from a Blob.
Parses vertex (v) and face (f) lines, triangulates n-gons via fan triangulation, and builds a solid by sewing the resulting triangular faces.
v
f
A Blob or File containing OBJ text data (.obj).
A Result wrapping the imported solid, or an error if parsing fails.
Result
const file = new File([objData], 'model.obj');const shape = unwrap(await importOBJ(file)); Copy
const file = new File([objData], 'model.obj');const shape = unwrap(await importOBJ(file));
Import a Wavefront OBJ file from a Blob.
Parses vertex (
v) and face (f) lines, triangulates n-gons via fan triangulation, and builds a solid by sewing the resulting triangular faces.