Skip to content

createCamera.orthographic#top

Summary

createCamera.orthographic#top gets or sets the top frustum plane in world units. For undistorted view framing, update top and bottom together with the same scale convention as left/right. Projection is recomputed lazily after changes.

Syntax

OrthographicCamera.top: number
camera.top = value;
const value = camera.top;

Parameters

This property does not take call parameters; assign a numeric value to set it.

Returns

number - Current top frustum boundary.

Example

const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);

const camera = wgpu.createCamera.orthographic();
camera.top = 40;
camera.bottom = -40;
console.log(camera.top);

See Also