# Sandbox.UI.ModelPreview

An orbitable model preview with its own scene, lighting and camera.

- Kind: class
- Namespace: `Sandbox.UI`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.UI.ScenePanel](/api/Sandbox.UI.ScenePanel)
- Modifiers: sealed

## Constructors

- [`ModelPreview`](/api/Sandbox.UI.ModelPreview/.ctor): Frames the supplied model and enables drag to orbit and wheel to zoom.

## Properties

- [`WantsDrag`](/api/Sandbox.UI.ModelPreview/WantsDrag): Dragging the model orbits the camera around its bounds.

## Methods

- [`OnMouseWheel`](/api/Sandbox.UI.ModelPreview/OnMouseWheel): Changes camera distance relative to the fitted view.
- [`Tick`](/api/Sandbox.UI.ModelPreview/Tick): Keeps the model framed as the viewport or model bounds change.
