Skip to content

ViewportFrame ​

Renders 3D content inside a 2D UI. Maps to Roblox ViewportFrame.

luau
PeanutUI.ViewportFrame {
    currentCamera = workspace.CurrentCamera,
}

Properties ​

In addition to the shared widget properties:

PropertyTypeDescription
currentCameraCamera?Camera used to render the viewport.
imageColorColor3Tint color.
imageTransparencynumberTransparency.
ambientColor3Ambient light color.
lightColorColor3Light color.
lightDirectionVector3Light direction.

Events ​

ViewportFrame uses the shared widget events with no additions.