visibleGameSize property

  1. @override
Vector2? get visibleGameSize

How much of the game world, in meters, ought to be visible through the viewport.

See Viewfinder.visibleGameSize.

Implementation

@override
Vector2? get visibleGameSize {
  final size = super.visibleGameSize;
  return size == null ? null : size / _metersToPixels;
}
  1. @override
set visibleGameSize (Vector2? value)

Implementation

@override
set visibleGameSize(Vector2? value) {
  // The base class picks the zoom from this size, and that zoom goes back
  // through the setter above, so the size has to be pre-scaled for the two
  // factors of [metersToPixels] to cancel out.
  super.visibleGameSize = value == null ? null : value * _metersToPixels;
}