minimapFit
import { minimapFit } from 'pixi-silk/ui/minimap';
function minimapFit(
world: WorldRect,
width: number,
height: number,
padding?: number
): MinimapTransform;
Fits a world rectangle into a minimap of width by height, centred, with padding around it.
Parameters#
| Parameter | Type | Default value |
|---|---|---|
world | WorldRect | undefined |
width | number | undefined |
height | number | undefined |
padding | number | 8 |