Skip to content

Function: useImageFocus() ​

ts
function useImageFocus(srcs): Focus[] | undefined;

Guess each image's focal point (see estimateFocus) by loading it, for the focus and imageFocus props. Returns undefined until every image has been looked at; images that fail to load (or that the browser won't let a canvas read) get the middle.

Parameters ​

ParameterType
srcsreadonly string[] | undefined

Returns ​

Focus[] | undefined

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