# ViewportFrame

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [GuiObject](https://rapi.sleaze.dev/classes/GuiObject.md), [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md), [GuiBase](https://rapi.sleaze.dev/classes/GuiBase.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Gui
- HTML page: https://rapi.sleaze.dev/classes/ViewportFrame/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/ViewportFrame

[`GuiObject`](https://rapi.sleaze.dev/classes/GuiObject.md) that renders 3D objects inside its bounds.

## Properties

### Ambient

```luau
ViewportFrame.Ambient: Color3 = Color3.new(0.784314, 0.784314, 0.784314)
```

- Tags: Read capabilities: UI

The lighting hue applied to the area within the [`ViewportFrame`](https://rapi.sleaze.dev/classes/ViewportFrame.md).

### IsMirrored

```luau
ViewportFrame.IsMirrored: boolean = false
```

- Tags: Hidden, Not replicated, Roblox script security, Read capabilities: UI

### LightColor

```luau
ViewportFrame.LightColor: Color3 = Color3.new(0.54902, 0.54902, 0.54902)
```

- Tags: Read capabilities: UI

The color of the emitted light.

### LightDirection

```luau
ViewportFrame.LightDirection: Vector3 = Vector3.new(-1, -1, -1)
```

- Tags: Read capabilities: UI

A [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) representing the direction of the light source.

### CameraCFrame

```luau
ViewportFrame.CameraCFrame: CFrame = CFrame.identity
```

- Tags: Hidden, Not scriptable, Read capabilities: UI

### CameraFieldOfView

```luau
ViewportFrame.CameraFieldOfView: number = 1.22173059
```

- Tags: Hidden, Not scriptable, Read capabilities: UI

### CurrentCamera

```luau
ViewportFrame.CurrentCamera: Camera
```

- Tags: Not replicated, Read capabilities: UI, Load only

[`Camera`](https://rapi.sleaze.dev/classes/Camera.md) that is used to render children objects.

### ImageColor3

```luau
ViewportFrame.ImageColor3: Color3 = Color3.new(1, 1, 1)
```

- Tags: Read capabilities: UI

Determines how the rendered viewport image will be colorized.

### ImageTransparency

```luau
ViewportFrame.ImageTransparency: number = 0
```

- Tags: Read capabilities: UI

Determines the transparency of the rendered viewport image.

## Methods

### CaptureSnapshotAsync

```luau
ViewportFrame:CaptureSnapshotAsync(): string
```

- Tags: Yields, Roblox script security, Capabilities: UI

## Inherited members

- From [GuiObject](https://rapi.sleaze.dev/classes/GuiObject.md): `SelectionImageObject`, `ClipsDescendants`, `Draggable`, `Active`, `AnchorPoint`, `AutomaticSize`, `BackgroundColor3`, `BackgroundTransparency`, `BorderColor3`, `BorderMode`, `BorderSizePixel`, `InputSink`, `Interactable`, `LayoutOrder`, `Position`, `Rotation`, `SelectionRect2D`, `Sink`, `Size`, `SizeConstraint`, `Visible`, `ZIndex`, `BackgroundColor`, `BorderColor`, `Transparency`, `DragBeginConnectionCount`, `DragStoppedConnectionCount`, `MouseEnterConnectionCount`, `MouseLeaveConnectionCount`, `MouseMovedConnectionCount`, `MouseWheelBackwardConnectionCount`, `MouseWheelForwardConnectionCount`, `NextSelectionDown`, `NextSelectionLeft`, `NextSelectionRight`, `NextSelectionUp`, `Selectable`, `SelectionOrder`, `GuiState`, `TweenPositionInternal`, `TweenSizeAndPositionInternal`, `TweenSizeInternal`, `TweenPosition`, `TweenSize`, `TweenSizeAndPosition`, `InputBegan`, `InputChanged`, `InputEnded`, `MouseEnter`, `MouseLeave`, `MouseMoved`, `MouseWheelBackward`, `MouseWheelForward`, `SelectionGained`, `SelectionLost`, `TouchLongPress`, `TouchPan`, `TouchPinch`, `TouchRotate`, `TouchSwipe`, `TouchTap`, `DragBegin`, `DragStopped`
- From [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md): `AbsolutePosition`, `AbsoluteRotation`, `AbsoluteSize`, `ActiveQueryNames`, `ReplicatedInsertionOrder`, `ClippedRect`, `IsNotOccluded`, `RawRect2D`, `TotalGroupScale`, `AutoLocalize`, `RootLocalizationTable`, `Localize`, `SelectionBehaviorDown`, `SelectionBehaviorLeft`, `SelectionBehaviorRight`, `SelectionBehaviorUp`, `SelectionGroup`, `SelectionChanged`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
