pixi-silk/ui/minimap
Minimap: an overview of the world with the camera frame.
import { Minimap, minimapFit, minimapToWorld, unionRect } from 'pixi-silk/ui/minimap';
Classes#
| Class | Description |
|---|---|
| Minimap | A minimap of a Camera’s world: the content in small, and the view as a frame. Drag the frame to pan, click anywhere to jump there, and scroll to zoom. The map follows the camera on every frame it moves, and glides when the content or the view grows past it. |
Interfaces#
| Interface | Description |
|---|---|
| MinimapOptions | Options of Minimap. |
| MinimapState | The reactive state of a Minimap. |
| MinimapTransform | How world units map onto the minimap: map = world * scale + (x, y). |
Functions#
| Function | Description |
|---|---|
| minimapFit | Fits a world rectangle into a minimap of width by height, centred, with padding around it. |
| minimapToWorld | A minimap point in world units. |
| unionRect | The smallest rectangle around both. |
| worldRectToMinimap | A world rectangle on the minimap. |
| worldToMinimap | A world point on the minimap. |