OrthographicSize.pixelsPerUnit constructor

const OrthographicSize.pixelsPerUnit(
  1. double pixelsPerUnit
)

Shows one world unit per pixelsPerUnit logical pixels of the view, so on-screen size stays constant as the view resizes (more of the world shows in a bigger view).

For crisp pixel art with N screen pixels per art texel, pair it with a render scale that makes the render target 1/N of the view's physical size (Scene.renderScale = 1 / (N * devicePixelRatio)) and FilterQuality.none.

Implementation

const factory OrthographicSize.pixelsPerUnit(double pixelsPerUnit) =
    OrthographicPixelsPerUnit;