Model Viewer

Customize Model Viewer

Width400px
Height1000px
Model X Offset0
Model Y Offset0
Default Rotation X0°
Default Rotation Y0°
Default Zoom1
Auto Rotate Speed1
Ambient Intensity0.5
Key Light Intensity1
Fill Light Intensity0.5
Rim Light Intensity0.5

Props

PropertyTypeDefaultDescription
urlstringrequiredURL of the 3D model file (supports glb, gltf, fbx, obj).
widthnumber | string400Width of the viewer container.
heightnumber | string400Height of the viewer container.
modelXOffsetnumber0Horizontal offset of the model.
modelYOffsetnumber0Vertical offset of the model.
defaultRotationXnumber-50Default rotation angle on X axis.
defaultRotationYnumber20Default rotation angle on Y axis.
defaultZoomnumber0.5Default zoom level.
minZoomDistancenumber0.5Minimum zoom distance.
maxZoomDistancenumber10Maximum zoom distance.
enableMouseParallaxbooleantrueEnable mouse parallax effect.
enableManualRotationbooleantrueEnable manual rotation with mouse/touch.
enableHoverRotationbooleantrueEnable rotation on hover.
enableManualZoombooleantrueEnable manual zoom with mouse/touch.
ambientIntensitynumber0.3Intensity of ambient lighting.
keyLightIntensitynumber1Intensity of key lighting.
fillLightIntensitynumber0.5Intensity of fill lighting.
rimLightIntensitynumber0.8Intensity of rim lighting.
environmentPresetstring"forest"Environment preset (city, sunset, night, dawn, studio, apartment, forest, park, none).
autoFramebooleanfalseAuto-frame the model to fit the view.
placeholderSrcstring-URL of placeholder image to show during loading.
showScreenshotButtonbooleantrueShow screenshot capture button.
fadeInbooleanfalseEnable fade-in animation when model loads.
autoRotatebooleanfalseEnable automatic rotation.
autoRotateSpeednumber0.35Speed of automatic rotation.
onModelLoaded() => void-Callback function when model is loaded.

Dependencies

three@react-three/fiber@react-three/drei

Created with ❤️ by Cybershoora