Intermact API Reference / @intermact/render-r3f / computeFit
Function: computeFit()
computeFit(
domain,fit,width,height):FitResult
Defined in: render-r3f/src/fit.ts:23
Compute the orthographic frustum that maps a scene domain into a pixel viewport under a fit strategy (design.md §9, §10): contain letterboxes, cover crops to fill, stretch matches the domain exactly (may distort).
Parameters
domain
x
Interval
y
Interval
fit
NonNullable<"contain" | "cover" | "stretch" | undefined>
width
number
height
number