Skip to main content

Camera2D

Description:

  A class for 2D camera object in the game engine.

Class Object: Camera2D Class.

Inherits from: Camera.

rotation

Type: Field.

Description:

  The rotation angle of the camera in degrees.

Signature:

rotation: number

zoom

Type: Field.

Description:

  The factor by which to zoom the camera. If set to 1.0, the view is normal sized. If set to 2.0, items will appear double in size.

Signature:

zoom: number

position

Type: Field.

Description:

  The position of the camera in the game world.

Signature:

position: Vec2