Camera constructor

Camera({
  1. Vector3? position,
  2. double zoom = 1.0,
  3. double fov = 80.0,
  4. double near = 0.001,
  5. double far = 10000,
  6. double viewportWidth = 100.0,
  7. double viewportHeight = 100.0,
  8. CameraControls? cameraControls,
})

Implementation

Camera({
  Vector3? position,
  double zoom = 1.0,
  this.fov = 80.0,
  this.near = 0.001,
  this.far = 10000,
  this.viewportWidth = 100.0,
  this.viewportHeight = 100.0,
  CameraControls? cameraControls,
}) {
  if (position != null) position.copyInto(this.position);
  this.cameraControls = cameraControls ?? CameraControls();
  _zoom = zoom;
  _zoomStart = zoom;
}