Notch Notch Manual 0.9.23
 Light | Dark
GetViewportSize()

GetViewportSize()

Purpose #

Returns the size of the render viewport as an array of two numbers: width, height.

Syntax #

Array GetViewportSize()

Example #

function Init() {
    Log("Width: " + GetViewportSize()[0]);
    Log("Height: " + GetViewportSize()[1]);
}