Skip to content

Function: useImageAspects() ​

ts
function useImageAspects(srcs): number[] | undefined;

Measure images' aspect ratios (width / height) by loading them, for the aspects and imageAspects props. Returns undefined until every image has loaded or failed (failed ones count as square), so content isn't reshuffled image by image as they arrive.

Parameters ​

ParameterType
srcsreadonly string[] | undefined

Returns ​

number[] | undefined

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).