[{"name":"CellGrid","comment":" The CellGrid package provides a type for representing\na rectangular grid of cells. CellGrids can be created,\ntransformed, and rendered as either SVG or HTML.\n\n\n## Types\n\n@docs CellGrid, CellType\n\n\n## Constructing and rendering CellGrids\n\n@docs fromList, empty\n\n\n## Work with cells\n\n@docs map, mapWithIndex, foldl, transform, classifyCell, cellAtMatrixIndex, setValue, matrixIndex, matrixIndices, makeCellGrid\n\n","unions":[{"name":"CellGrid","comment":" A value of type `CellGrid a` is a rectangular array\nof values of type a.\n","args":["a"],"cases":[["CellGrid",["( Basics.Int, Basics.Int )","Array.Array a"]]]},{"name":"CellType","comment":" A cell can be in the interior of the grid,\non an edge, on in a cornder\n","args":[],"cases":[["Corner",[]],["Edge",[]],["Interior",[]]]}],"aliases":[],"values":[{"name":"cellAtMatrixIndex","comment":" Return the Maybe value of the cell at (i,j) from grid\n\n    > cellAtMatrixIndex (1,1) cg\n    Just 4 : Maybe Float\n\n","type":"( Basics.Int, Basics.Int ) -> CellGrid.CellGrid a -> Maybe.Maybe a"},{"name":"classifyCell","comment":" return the type of the cell at location (i,j). Thus\nclassifyCell grid (0,0) = Corner\n","type":"CellGrid.CellGrid a -> ( Basics.Int, Basics.Int ) -> CellGrid.CellType"},{"name":"empty","comment":" The empty cell grid. Useful in conjunction with `Maybe.withDefault`\n","type":"CellGrid.CellGrid a"},{"name":"foldl","comment":" Fold a reducer (a -> b -> b) over a CellGrid a)\n","type":"(a -> b -> b) -> b -> CellGrid.CellGrid a -> b"},{"name":"fromList","comment":" Construct a Maybe CellGrid from a list of values of type `a`.\nHere is a 2x2 cell grid of type `Float`:\n\n    > cg = fromList 2 2 [1.0,2.0,3.0,4.0]\n      Just (CellGrid (2,2) (Array.fromList [1,2,3,4]))\n      : Maybe (CellGrid Float)\n\nIf the length of the list is incompatible with the\ngiven number of rows and columns `Nothing` is returned.\n\n    > fromList 2 2 [1.0,2.0,3.0,4.0, 5.0]\n      Nothing : Maybe (CellGrid Float)\n\n","type":"Basics.Int -> Basics.Int -> List.List a -> Maybe.Maybe (CellGrid.CellGrid a)"},{"name":"makeCellGrid","comment":" Make a CellGrid Float using a temperatureMap. The latter\nassigns a Float to an integer tuple (row, col)\n","type":"( Basics.Int, Basics.Int ) -> (( Basics.Int, Basics.Int ) -> Basics.Float) -> CellGrid.CellGrid Basics.Float"},{"name":"map","comment":" Map a function over a CellGrid:\n\n    > map (\\x -> 2*x) cg\n    CellGrid (2,2) (Array.fromList [2,4,6,8])\n\n","type":"(a -> a) -> CellGrid.CellGrid a -> CellGrid.CellGrid a"},{"name":"mapWithIndex","comment":" Transform a CellGrid a with a function ((Int, Int) -> a -> a).\nUsed when the transformed value depends on its matrixIndex as well\nas its value\n","type":"(( Basics.Int, Basics.Int ) -> a -> a) -> CellGrid.CellGrid a -> CellGrid.CellGrid a"},{"name":"matrixIndex","comment":" Conversely, `(nRows, nCols) k` is the\n2D array index `(i,j)` of the element al index `k`\n","type":"( Basics.Int, Basics.Int ) -> Basics.Int -> ( Basics.Int, Basics.Int )"},{"name":"matrixIndices","comment":" Return a list of all matrix indices (i,j) of a grid.\nUseful for mapping.\n","type":"CellGrid.CellGrid a -> List.List ( Basics.Int, Basics.Int )"},{"name":"setValue","comment":" Set the value of the cell at location (i,j)\n","type":"CellGrid.CellGrid a -> ( Basics.Int, Basics.Int ) -> a -> CellGrid.CellGrid a"},{"name":"transform","comment":" Transform a CellGrid using a function\n\n    (Int, Int) -> CellGrid a -> a)\n\n","type":"(( Basics.Int, Basics.Int ) -> CellGrid.CellGrid a -> a) -> CellGrid.CellGrid a -> CellGrid.CellGrid a"}],"binops":[]},{"name":"CellGrid.Render","comment":" The CellGrid package provides a type for representing\na rectangular grid of cells. CellGrids can be created,\ntransformed, and rendered as either SVG or HTML.\n\n@docs Msg, renderAsHtml, renderAsSvg, CellRenderer\n\n","unions":[{"name":"Msg","comment":" The MouseClick message sends the matrix index (i,j)\nof the cell on which the user has clicked as well\nas the local (x,y) coordinates of the cell.\n","args":[],"cases":[["MouseClick",["( Basics.Int, Basics.Int )","( Basics.Float, Basics.Float )"]]]}],"aliases":[{"name":"CellRenderer","comment":" CellRenderer is a record that provides the information --\nsize and color --\nthat is needed to render a cell to SVG. `Color` is as\ndefined in the package `avh4/elm-color`, e.g. `Color.rgb 1 0 0`,\nwhich is bright red.\n","args":["a"],"type":"{ cellSize : Basics.Float, gridLineWidth : Basics.Float, cellColorizer : a -> Color.Color, defaultColor : Color.Color, gridLineColor : Color.Color }"}],"values":[{"name":"renderAsHtml","comment":" Render a cell grid as Html. The first two parameters\nare the width and height of the rendered grid in pixels.\n","type":"Basics.Float -> Basics.Float -> CellGrid.Render.CellRenderer a -> CellGrid.CellGrid a -> Html.Html CellGrid.Render.Msg"},{"name":"renderAsSvg","comment":" Render a cell grid as SVG\n","type":"CellGrid.Render.CellRenderer a -> CellGrid.CellGrid a -> TypedSvg.Core.Svg CellGrid.Render.Msg"}],"binops":[]},{"name":"CellGrid.WebGL","comment":" The CellGrid.WebGL package provides functions for rendereing CellGrid to WebGL\n\n\n## Types\n\n@docs Colorizer, Vertex\n\n\n## Rendering functions\n\n@docs cellGridToHtml, meshToHtml\n\n\n## Work with cells\n\n@docs meshFromCellGrid, meshWithColorizer\n\n","unions":[],"aliases":[{"name":"Colorizer","comment":" The type of a function which assigns a color to a cell, the\nlatter given by its row and column indices\n","args":[],"type":"( Basics.Int, Basics.Int ) -> Math.Vector3.Vec3"},{"name":"Vertex","comment":" The type of vertices of triangles: define position and color.\n","args":[],"type":"{ position : Math.Vector3.Vec3, color : Math.Vector3.Vec3 }"}],"values":[{"name":"cellGridToHtml","comment":" Render a CellGrid to a width\\_ x height\\_ rectangle on the screen using\na function temperatureMap which transforms scalars to color vectors\n","type":"Basics.Int -> Basics.Int -> CellGrid.CellGrid Basics.Float -> (Basics.Float -> Math.Vector3.Vec3) -> Html.Html msg"},{"name":"meshFromCellGrid","comment":" Create a mesh from a cell grid using a temperatureMap. The latter\nassigns to a temperature a triple of RGB values.\n","type":"( Basics.Float, Basics.Float ) -> (Basics.Float -> Math.Vector3.Vec3) -> CellGrid.CellGrid Basics.Float -> WebGL.Mesh CellGrid.WebGL.Vertex"},{"name":"meshToHtml","comment":" Render a WebGL \"drawing\" to a given rectangle on the screen.\n","type":"Basics.Int -> Basics.Int -> WebGL.Mesh CellGrid.WebGL.Vertex -> Html.Html msg"},{"name":"meshWithColorizer","comment":" Crreate a rows x cols Vertex Mesh representing an array of rectanagles of\nsize (dw, dh). The vertex colors (uniform over a rectangular cell) are determined by\nthe colorizer functionion which has type (Int, Int) -> Vec3\n","type":"CellGrid.WebGL.Colorizer -> ( Basics.Int, Basics.Int ) -> ( Basics.Float, Basics.Float ) -> WebGL.Mesh CellGrid.WebGL.Vertex"}],"binops":[]}]