OrbitCameraController constructor

OrbitCameraController({
  1. Vector3? target,
  2. double distance = 6.0,
  3. double azimuth = 0.0,
  4. double polar = 0.3,
  5. double minDistance = 0.1,
  6. double maxDistance = double.infinity,
  7. double minPolar = -_polarLimit,
  8. double maxPolar = _polarLimit,
  9. double rotateSpeed = math.pi,
  10. double dollySpeed = 0.15,
  11. double panSpeed = 1.0,
  12. double scrollSensitivity = 1 / 120,
  13. double smoothing = 0.12,
})

Creates an orbit controller framing target from distance at the given azimuth and polar angles (radians).

Implementation

OrbitCameraController({
  Vector3? target,
  double distance = 6.0,
  double azimuth = 0.0,
  double polar = 0.3,
  this.minDistance = 0.1,
  this.maxDistance = double.infinity,
  this.minPolar = -_polarLimit,
  this.maxPolar = _polarLimit,
  this.rotateSpeed = math.pi,
  this.dollySpeed = 0.15,
  this.panSpeed = 1.0,
  this.scrollSensitivity = 1 / 120,
  super.smoothing,
}) : _target = (target ?? Vector3.zero()).clone(),
     _targetGoal = (target ?? Vector3.zero()).clone(),
     _distance = distance,
     _distanceGoal = distance,
     _azimuth = azimuth,
     _azimuthGoal = azimuth,
     _polar = polar.clamp(minPolar, maxPolar),
     _polarGoal = polar.clamp(minPolar, maxPolar);