Skip to content

Function: useImageFill() ​

ts
function useImageFill(src, options?): CellFill | undefined;

Load an image and color tiles from it (see imageFill): returns a fill to pass as fill, or undefined while the image loads (or if it fails), so the default fill shows meanwhile. maxSize caps the size the image is read at (default 256 px on the long side).

Parameters ​

ParameterType
srcstring | undefined
optionsImageFillOptions & object

Returns ​

CellFill | undefined

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