GiantToadPixelCameraController constructor

GiantToadPixelCameraController({
  1. required CameraComponent camera,
  2. PositionComponent? target,
  3. double followSpeed = 12,
  4. Rect deadzone = Rect.zero,
  5. double lookAhead = 0,
  6. Rect? worldBounds,
  7. bool pixelSnap = true,
  8. double maxShake = 6,
})

Implementation

GiantToadPixelCameraController({
  required this.camera,
  this.target,
  this.followSpeed = 12,
  this.deadzone = Rect.zero,
  this.lookAhead = 0,
  this.worldBounds,
  this.pixelSnap = true,
  this.maxShake = 6,
}) {
  if (followSpeed < 0 || lookAhead < 0 || maxShake < 0) {
    throw ArgumentError(
      'Camera speed, look-ahead, and shake must be non-negative.',
    );
  }
}