PerspectiveCamera constructor

PerspectiveCamera({
  1. double fovRadiansY = 45 * degrees2Radians,
  2. Vector3? position,
  3. Vector3? target,
  4. Vector3? up,
  5. double fovNear = 0.1,
  6. double fovFar = 1000.0,
})

Creates a PerspectiveCamera.

All parameters are optional; omitting them yields the default placement (eye at (0, 0, -5), looking at the origin, +Y up) and a 45° vertical field of view with a 0.11000.0 clip range.

Implementation

PerspectiveCamera({
  this.fovRadiansY = 45 * degrees2Radians,
  Vector3? position,
  Vector3? target,
  Vector3? up,
  this.fovNear = 0.1,
  this.fovFar = 1000.0,
}) : position = position ?? Vector3(0, 0, -5),
     target = target ?? Vector3(0, 0, 0),
     up = up ?? Vector3(0, 1, 0);