Link to Lens

Camera Constructor wrapper for GameMaker Studio 2.3.2+.

This is just a drop in for most of the camera_* functions presented in GameMaker Studio 2 as methods via a constructor, as .PascalCase().
It also outright removes having to supply a cameraID for every method. Leaving it down to just providing the arguments.
Most of the methods are chainable as well.

Use case:

// Creates a new Lens instance. Each instance carries its own cameraID.
cam = new Lens();


While most of it is pretty much plug in play (without having to supply CameraID), there's a few extra methods included.


Returns: an array that contains the results from .GetViewSpeedX() and .GetViewSpeedY()


Returns: CameraID


Basically the same as view_camera[view_num] = camID. but internally tracks the cameraID for when .free() is called.