Viewport

The viewport is a clipped rectangular section of the window. Viewports are used for making split-screens, mini-maps and rendering the contents of a camera.

Figure 1: Example scene with two viewports

There is a default viewport found in the global display object. The default viewport object is the same size as the application window. Sprites, layers or other viewports added as child nodes have positions relative to the center of the viewport (for the default viewport this is also the center of the window). Each viewport also has a camera property. The viewport renders anything within the viewing range of this camera.