OrthographicProjection constructor

OrthographicProjection({
  1. OrthographicSize size = const OrthographicSize.height(10.0),
  2. double zoom = 1.0,
  3. Vector2? offset,
  4. double near = 0.0,
  5. double far = 1000.0,
})

Creates an OrthographicProjection showing size world units, divided by zoom and shifted by offset, between near and far.

Implementation

OrthographicProjection({
  this.size = const OrthographicSize.height(10.0),
  this.zoom = 1.0,
  Vector2? offset,
  this.near = 0.0,
  this.far = 1000.0,
}) : offset = offset ?? Vector2.zero();