value |
str | Callable | None
| None | path to (.obj, .glb, .stl, .gltf, .splat, or .ply) file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the component. |
env_map |
str | None
| None | path to environment map file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the environment map. |
tonemapping |
Literal["standard", "aces"] | None
| None | tonemapping algorithm to use for rendering the scene. Should be one of "standard" or "aces". If not provided, defaults to "standard". |
exposure |
float
| 1.0 | exposure value to use for rendering the scene. Should be a float, increase this value to make the scene brighter, decrease to make it darker. Affects the exposure property of the camera. |
contrast |
float
| 1.0 | contrast value to use for rendering the scene. Should be a float, increase this value to make the scene more contrasted, decrease to make it less contrasted. Affects the contrast property of the camera. |
clear_color |
tuple[float, float, float, float] | None
| None | background color of scene, should be a tuple of 4 floats between 0 and 1 representing RGBA values. |
camera_position |
tuple[
int | float | None,
int | float | None,
int | float | None,
]
| None, None, None | initial camera position of scene, provided as a tuple of `(alpha, beta, radius)`. Each value is optional. If provided, `alpha` and `beta` should be in degrees reflecting the angular position along the longitudinal and latitudinal axes, respectively. Radius corresponds to the distance from the center of the object to the camera. |
zoom_speed |
float
| 1 | the speed of zooming in and out of the scene when the cursor wheel is rotated or when screen is pinched on a mobile device. Should be a positive float, increase this value to make zooming faster, decrease to make it slower. Affects the wheelPrecision property of the camera. |
pan_speed |
float
| 1 | the speed of panning the scene when the cursor is dragged or when the screen is dragged on a mobile device. Should be a positive float, increase this value to make panning faster, decrease to make it slower. Affects the panSensibility property of the camera. |
height |
int | str | None
| None | The height of the model3D component, specified in pixels if a number is passed, or in CSS units if a string is passed. |
label |
str | None
| None | The label for this component. Appears above the component and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component is assigned to. |
show_label |
bool | None
| None | if True, will display label. |
every |
float | None
| None | If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. |
container |
bool
| True | If True, will place the component in a container - providing some extra padding around the border. |
scale |
int | None
| None | relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True. |
min_width |
int
| 160 | minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first. |
interactive |
bool | None
| None | if True, will allow users to upload a file; if False, can only be used to display files. If not provided, this is inferred based on whether the component is used as an input or output. |
visible |
bool
| True | If False, component will be hidden. |
elem_id |
str | None
| None | An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. |
elem_classes |
list[str] | str | None
| None | An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles. |
render |
bool
| True | If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later. |
key |
int | str | None
| None | if assigned, will be used to assume identity across a re-render. Components that have the same key across a re-render will have their value preserved. |