> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/gradio-app/gradio/llms.txt
> Use this file to discover all available pages before exploring further.

# Model3D

> Display and interact with 3D models

The Model3D component displays 3D models in various formats.

## Basic usage

```python theme={null}
import gradio as gr

def load_model():
    return "model.obj"

gr.Interface(
    fn=load_model,
    inputs=gr.Button("Load"),
    outputs=gr.Model3D()
).launch()
```

## Constructor

<ParamField path="value" type="str | Callable | None" default="None">
  Path or URL to 3D model file (.obj, .glb, .stl, .gltf, .splat, or .ply)
</ParamField>

<ParamField path="display_mode" type="Literal['solid', 'point_cloud', 'wireframe'] | None" default="None">
  Rendering mode:

  * `"solid"` - Solid object
  * `"point_cloud"` - Point cloud
  * `"wireframe"` - Wireframe view
</ParamField>

<ParamField path="clear_color" type="tuple[float, float, float, float] | None" default="None">
  Background color as RGBA tuple (values 0-1)
</ParamField>

<ParamField path="camera_position" type="tuple[int | float | None, ...] | None" default="(None, None, None)">
  Initial camera position as (alpha, beta, radius) in degrees and distance
</ParamField>

<ParamField path="zoom_speed" type="float" default="1">
  Speed of zooming. Higher values = faster zoom
</ParamField>

<ParamField path="pan_speed" type="float" default="1">
  Speed of panning. Higher values = faster pan
</ParamField>

<ParamField path="height" type="int | str | None" default="None">
  Component height
</ParamField>

## Events

* **change** - Triggered when model changes
* **upload** - Triggered when model is uploaded
* **edit** - Triggered when model is edited
* **clear** - Triggered when model is cleared

## Examples

### Wireframe mode

```python theme={null}
import gradio as gr

gr.Model3D(
    value="model.obj",
    display_mode="wireframe",
    clear_color=[0.2, 0.2, 0.2, 1.0]
)
```

### Custom camera position

```python theme={null}
import gradio as gr

gr.Model3D(
    value="model.glb",
    camera_position=(30, 45, 5),  # alpha=30°, beta=45°, radius=5
    zoom_speed=2.0
)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.