Module reference
Graphics/objects/GraphicsCamera module
Functions, objects and constants exposed by the Graphics/objects/GraphicsCamera module.
Object description
Represents a mutable camera used to transform world coordinates while drawing Graphics objects.
Availability: The GraphicsCamera object is available as new Graphics::GraphicsCamera() and is also returned by Graphics::create_camera().
Properties
The object exposes the following public properties:
xandy— world-space centre of the camera.zoom— positive view scale.
Example
YASS
$camera = new Graphics::GraphicsCamera() $camera->zoom = 2 Graphics::draw_sprite($window, $sprite, $camera)