Obj
The Obj component loads and displays OBJ (Wavefront) 3D model files. This is ideal for:
- Loading static 3D models from files
- Displaying pre-made assets
- Loading textured models with MTL files
- Importing models from 3D modeling software
Basic Usage
A minimal example that loads an OBJ file from a URL:
Key Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
key | str | - | Unique identifier for the model |
src | str | - | URL to the OBJ file |
buff | bytes | - | Binary OBJ data (alternative to src) |
text | str | - | OBJ file content as string (alternative to src) |
mtl | str | [0,0,0] | The source of the mtl file. Can be a url or a local file. |
materials | list[string] | [0,0,0] | A list of materials to be used for the obj file. |
Learn More
For detailed examples of using Obj, see:
- Loading 3D Meshes - Multiple mesh loading methods