Orasund/pixelengine/3.0.1

NOTE: the latest version is 6.2.0

PixelEngine

The Libary may support more then just simple rendering. This module exists to take care of everything else. It provides a program that is already set up.

type alias PixelEngine flag model msg =
Program flag (Model model msg) (Msg msg)

an alias for the program

{ init : flags -> ( model, Cmd msg )
, update : msg -> model -> ( model, Cmd msg )
, subscriptions : model -> Sub msg
, view :
model
-> { title : String
, options : Options msg
, body : List (Area msg)
}
, controls : Input -> msg
}
-> Program flags (Model model msg) (Msg msg)

use this function as usual

{ init : flags -> ( model, Cmd msg )
, update : msg -> model -> ( model, Cmd msg )
, subscriptions : model -> Sub msg
, view :
model
-> { title : String
, options : Options msg
, body : List (Area msg)
}
, controls : ( String -> Input, Input -> msg )
}
-> Program flags (Model model msg) (Msg msg)

uses custom controls