Camera

Represents a 2D camera used for rendering.

Controls the viewport's translation, allowing you to move the view of the world.

Properties

NameDescriptionType
posGet or set the camera's positionVec2

Methods

init


Create a new camera instance.

Parameters

  • pos (Optional) : The position of the camera. Defaults to (0, 0).

set


set() → None

Set this camera as the active one for rendering.

Only one camera can be active at a time.