Model Stage
A 3D model viewer for glb, gltf, fbx and obj files. It frames and lights the model, turns it slowly, leans it toward the cursor, floats it over a soft shadow, and lets you drag with momentum, zoom and double click to reset.
pixikit.com/docs/components/model-stage
Customize
Width400px
Height400px
Environment
Environment intensity1.00
Exposure1.00
Intro
Auto rotate
Auto rotate speed0.40
Auto rotate delay2.0s
Drag rotate
Turntable
Zoom
Min zoom0.70
Max zoom2.0
Hover tilt0.15
Float0.30
Shadow
Shadow opacity0.45
Fit0.80
Offset x0.00
Offset y0.00
Start angle-35°
Tilt12°
Reset on double click
Background color
Props
31| Name | Type | Default | Description |
|---|---|---|---|
url | string | "" | The model file: glb, gltf, fbx or obj. Leave empty for a built-in torus knot. |
width | number | string | 400 | The width of the viewer; a number is px. It never grows past its container. |
height | number | string | 400 | The height of the viewer; a number is px. |
environment | string | "studio" | The lighting room: studio, city, sunset, dawn, warehouse, apartment, lobby, night, park, forest or none. |
environmentIntensity | number | 1 | The strength of the room's light and reflections. |
exposure | number | 1 | The overall brightness of the render. |
intro | "rise" | "spin" | "fade" | "none" | "rise" | How the model appears once it has loaded. |
autoRotate | boolean | true | The model turns slowly while idle. |
autoRotateSpeed | number | 0.4 | The speed of the idle turn. |
autoRotateDelay | number | 2 | Seconds after letting go before the idle turn eases back in. |
dragRotate | boolean | true | Drag to turn the model, with momentum on release. |
turntable | boolean | false | Dragging only turns left and right, like a product turntable. |
zoom | boolean | true | Pinch, or hold Ctrl or Cmd and scroll, to zoom; plain scrolling still scrolls the page. |
minZoom | number | 0.7 | How far out it zooms, as a multiple of the fitted view. |
maxZoom | number | 2 | How far in it zooms, as a multiple of the fitted view. |
hoverTilt | number | 0.15 | How much the model leans toward the cursor; 0 turns it off. |
float | number | 0.3 | A gentle float above the shadow; 0 turns it off. |
shadow | boolean | true | A soft contact shadow under the model. |
shadowOpacity | number | 0.45 | The darkness of the shadow. |
fit | number | 0.8 | How much of the viewer the model fills; it is framed automatically. |
offsetX | number | 0 | Moves the model sideways, -1 to 1. |
offsetY | number | 0 | Moves the model up or down, -1 to 1. |
startAngle | number | -30 | The starting angle around the model in degrees. |
tilt | number | 10 | The starting tilt toward the viewer in degrees. |
resetOnDoubleClick | boolean | true | A double click returns to the starting view. |
onModelLoaded | () => void | None | Called once the model has loaded. |
ref | Ref<ModelStageHandle> | None | Exposes capture(type?), which returns the current frame as an image data URL. |
backgroundColor | string | "transparent" | The backdrop colour; `transparent` lets the page show through. |
onError | (error: unknown) => void | None | Called when the file cannot be loaded. |
className | string | None | |
style | CSSProperties | None | Inline styles for the container. |