Skip to main content

Function: clampScale()

function clampScale(
width,
height,
scale,
maxSide?,
maxPixels?
): number;

Effective scale so the canvas stays within the size limits.

Parameters​

width​

number

height​

number

scale​

number

maxSide?​

number = 16384

maxPixels?​

number = 16_777_216

Returns​

number