Class Camera

A 3D camera encapsulating model, view, and projection matrices that may be bound to a vertex shader.

class Camera
  : NamedComponent ;

A World's primary camera is the Camera world Resource. Ancillary cameras may be added to render target Entities.

Constructors

NameDescription
this (bindingLocation) Initialize a new camera.

Fields

NameTypeDescription
invertY boolWhether the Y axis of the projection matrix shall be inverted.

Properties

NameTypeDescription
model[get] gfm.math.matrix.Matrix!(float,4,4)World-space model transformation matrix.
mvp[get] gfm.math.matrix.Matrix!(float,4,4)A combined model-view-projection matrix.
projection[get] gfm.math.matrix.Matrix!(float,4,4)Projection matrix, e.g. orthographic or perspective.
view[get] gfm.math.matrix.Matrix!(float,4,4)View matrix.

Methods

NameDescription
mouseRay (fovInRadians, cameraTarget, framebufferSize, mousePosition)