Skip to content

CameraCompat ​

com.jsmacrosce.jsmacros.client.util.CameraCompat

Provides version-compatible access to a Camera's position and rotations.
Each method calls the accessor available in the current Minecraft source target.

Methods ​

position ​

static position(Camera camera): Vec3#
Returns the camera's stored position vector directly.

Parameters:

  • camera: non-null camera to read
Returns: the camera's raw position vector

xRot ​

static xRot(Camera camera): float#
Returns the camera's pitch (X rotation) in degrees.

Parameters:

  • camera: non-null camera to read
Returns: the camera's pitch in degrees

yRot ​

static yRot(Camera camera): float#
Returns the camera's yaw (Y rotation) in degrees.

Parameters:

  • camera: non-null camera to read
Returns: the camera's yaw in degrees