87 Minimap Viewport Projection. 87 of 95.

87/CAMERA BEHAVIOR/87 of 95

Minimap Viewport Projection

The small map should show where you are.

Best experienced with a pointer.

The problem

A minimap without a viewport rect leaves you guessing which region the main canvas is showing.

The solution

Viewport projection on the minimap links overview position to main canvas pan.

Experiment

Play with the values

0.18
1.2

How it works

  • The world is scaled down into the minimap's rectangle.
  • The main viewport is projected into that same scale as a rectangle.
  • Overview markers are drawn in minimap space so they match the canvas.
  • The rectangle updates whenever the main view pans or zooms.
  • A click on the minimap can seek the main camera to that world position.

Seen in

Code editors

Minimap thumbnails show the visible window over the full file height.

Strategy games

Radar maps outline the camera frustum so players know where they are looking.

Large canvases

Design boards project the current frame so distant content stays findable.

Photo viewers

Navigator panes show the cropped viewport over a full-resolution preview.

References