fitContainer()
pixi-wheels / index / fitContainer
Function: fitContainer()
function fitContainer(
obj: Container,
box: Size,
options?: FitOptions
): number;
Defined in: utils/fit.ts:54
Scale any container (a Text, a Sprite, a Spine, a group) so its local
bounds fit box. Sets obj.scale uniformly and returns the factor. Measure
happens on the unscaled local bounds, so calling it again is idempotent.
Parameters#
| Parameter | Type |
|---|---|
obj | Container |
box | Size |
options | FitOptions |
Returns#
number