placeBox
import { placeBox } from 'pixi-silk/ui/layout';
function placeBox(
data: LayoutData,
window: ViewportRect,
out?: Placement
): Placement;
Where a record puts its box in a window: the fit scale of the window to the reference
resolution, then stretch per axis, then the corrections, then the alignment. Pure, so you can
check a layout record without a renderer. Writes into out when given, else returns a new object.
Parameters#
| Parameter | Type |
|---|---|
data | LayoutData |
window | ViewportRect |
out? | Placement |