loadObj
Loads a 3D model from external files in different formats (OBJ/MTL, GLTF/GLB, FBX, DAE).Parameters
Configuration for the 3D model
Type of 3D model:
"mtl", "gltf", "fbx", or "dae"URL path to the model file (.obj, .glb, .gltf, .fbx, .dae)
URL path to .mtl file (required for OBJ models)
URL path to .bin file (for GLTF models)
Units for interpreting vertices:
"scene" or "meters". “meters” is recommended for precisionRotation along the three axes. Can be a number or
{x, y, z} object (e.g., {x: 90, y: 0, z: 0})Scale along the three axes. Can be a number or
{x, y, z} object (e.g., {x: 1, y: 1, z: 3})Position of the pivotal center:
"top", "bottom", "left", "right", "center", "top-left", "top-right", "bottom-left", "bottom-right", or "auto"Adjustment to correct center position in units per axis (e.g.,
{x: 0.5, y: 0.5, z: 0})Normalize specular values from some 3D models
GeoJSON feature instance for storing relevant data
Enable tooltip for this object
Enable bounding box for this object
Whether the object should be included in raycasting
Clone the object from cache. Set to false for unique instances when animations/textures don’t work well with cloning
Index of the default animation to play (ignored if the object has no animations)
Function to run after the object loads. Receives the loaded object as first argument
Example
sphere
Creates a sphere object.Parameters
Configuration for the sphere. Accepts standard Object3D options plus geometry-specific parameters
Returns
A sphere object that can be positioned and added to the scene
Example
line
Creates a line in full 3D space.Parameters
Configuration for the line
Array of lnglat coordinates to draw the line
Color of the line. This color will render precisely as specified, regardless of scene lighting
Line width in display pixels (not meters or scene units)
Line opacity (0-1)
Returns
A line object with the specified geometry and styling
Example
tube
Creates a tube object.Parameters
Configuration for the tube. Accepts standard Object3D options plus tube-specific parameters
Returns
A tube object that can be positioned and added to the scene
Example
extrusion
Creates an extruded shape.Parameters
Configuration for the extrusion
Nested array following GeoJSON polygon format, or a
THREE.Vector2 arrayReturns
An extruded shape object
Example
label
Creates a CSS2D label.Parameters
Configuration for the label
Returns
A CSS2D label object
Example
tooltip
Creates a tooltip.Parameters
Returns
A tooltip object
Example
Object3D
Wraps a Three.js object to make it compatible with Threebox positioning and methods.Parameters
Returns
A Threebox-compatible Object3D