Skip to content

Function: fitsTexture() ​

ts
function fitsTexture(capabilities, what, width, height, depth?): boolean;

Experimental

Whether a width × height texture (× depth for a 3D one) fits the device. When it does not, warns once per what and size, naming the limit; the caller then draws nothing.

Parameters ​

ParameterType
capabilitiesGpuCapabilities | undefined
whatstring
widthnumber
heightnumber
depth?number

Returns ​

boolean

Released under the MIT License.