Module

Halogen.Canvas.Declarative

Package
purescript-declarative-canvas
Repository
UnrelatedString/purescript-halogen-declarative-canvas

#declarativeCanvas Source

declarativeCanvas :: forall query output m. MonadEffect m => Component query CanvasInput output m

The declarative canvas component, which is drawn on by passing instructions in its input.

#CanvasInput Source

type CanvasInput = { draw :: DrawInstructions, height :: Int, width :: Int }

The type of the render input given to a declarativeCanvas component. width and height define the dimensions of the canvas, while draw provides instructions for drawing its current state.

#DrawInstructions Source

type DrawInstructions = Context2D -> Effect Unit

The type of draw. Represents instructions for drawing on the canvas.