Render a CellGrid using WebGL.
See also the examples.
Note: WebGL can only handle grids of about
100x100. Drawing more cells exceeds the vertex limit, resulting in a partially blank image.CellGrid.Imagecan handle larger grids with ease.
An individual vertex.
Style an individual cell
cellStyle : CellStyle Bool
cellStyle =
{ toColor =
\b ->
if b then
Color.green
else
Color.red
, cellWidth = 10
, cellHeight = 10
}Create a mesh from a grid and a style for each cell.
Render a Mesh Vertex into an html element of the given width and height.
Internal functions exposed for testing.
Render a cell grid into an html element of the given width and height.
The cells are stretched to use up all available space. For customized cell sizes, see
meshToHtml.