viewport property

Viewport viewport

The viewport is the "window" through which the game world is observed.

Imagine that the world is covered with an infinite sheet of paper, but there is a hole in it. That hole is the viewport: through that aperture the world can be observed. The viewport's size is equal to or smaller than the size of the game canvas. If it is smaller, then the viewport's position specifies where exactly it is placed on the canvas.


Viewport get viewport => _viewport;
void viewport=(Viewport newViewport)


set viewport(Viewport newViewport) {
  _viewport = newViewport;