Toggle Sidebar B
AppearanceLight & dark mode D

Model Viewer

Three.js model viewer with orbit controls and lighting presets.

Default

Drag to rotate the model, scroll to zoom within the allowed range, and move the pointer for parallax and a slight tilt. Pick a model and an environment in the controls underneath.

Dark previewReplay previewOpen in new tab
0 %

Customize

Model
Environment
Horizontal Offset0.5
Vertical Offset0
Rotate Speed0.3

API Reference

ModelViewer

PropTypeDefaultDescription
urlstring-URL of the 3D model file (glb/gltf/fbx/obj).
widthnumber | string400Width of the canvas container.
heightnumber | string400Height of the canvas container.
modelXOffsetnumber0Horizontal offset of the model.
modelYOffsetnumber0Vertical offset of the model.
defaultRotationXnumber-50Initial rotation on the X axis in degrees.
defaultRotationYnumber20Initial rotation on the Y axis in degrees.
defaultZoomnumber0.5Initial zoom distance factor.
minZoomDistancenumber0.5Minimum zoom distance.
maxZoomDistancenumber10Maximum zoom distance.
enableMouseParallaxbooleantrueEnable mouse-based parallax effect.
enableManualRotationbooleantrueEnable manual rotation via drag.
enableHoverRotationbooleantrueEnable rotation on hover based on cursor.
enableManualZoombooleantrueEnable manual zoom via mouse wheel or gestures.
ambientIntensitynumber0.3Intensity of ambient light.
keyLightIntensitynumber1Intensity of key light.
fillLightIntensitynumber0.5Intensity of fill light.
rimLightIntensitynumber0.8Intensity of rim light.
environmentPresetstring'forest'Environment preset for scene lighting: apartment, city, dawn, forest, lobby, night, park, studio, sunset, warehouse or none.
autoFramebooleanfalseAutomatically frame the model in view.
fadeInbooleanfalseEnable fade-in transition on load.
autoRotatebooleanfalseEnable automatic rotation animation.
autoRotateSpeednumber0.35Speed of automatic rotation.
showScreenshotButtonbooleantrueShow the screenshot button overlay.
placeholderSrcstring-Placeholder image source while loading.
EventDescription
modelLoadedFires when the model finishes loading, after the fade-in when it is enabled.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Tab + EnterFocuses the screenshot button and saves the current view as a PNG.
  • The canvas is pointer driven. Describe the model in surrounding text when it carries meaning.