Skip to main content

OBJLoader

The OBJLoader parses the OBJ half of the classic Wavefront OBJ/MTL format.

LoaderCharacteristic
File Extension.obj
File TypeText
File FormatWavefront OBJ file
Data FormatMesh
Decoder TypeSynchronous
Worker Thread SupportYes
Streaming SupportNo

Usage​

import {OBJLoader} from '@loaders.gl/obj';
import {load} from '@loaders.gl/core';

const data = await load(url, OBJLoader, options);

Options​

OptionTypeDefaultDescription

Remarks:

  • vertex colors are parsed as a COLOR_0 attribute when red, green and blue values are included after x y and z (this precludes specifying w). The color values range from 0 to 1.

Attribution​

OBJLoader is a port of three.js's OBJLoader under MIT License.