linsyking/messenger-core/12.0.0

NOTE: the latest version is 20.0.0

Renamed to elm-messenger/messenger-core. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as linsyking/messenger-core still install under that name. 34 versions of 52 come from the new location (see their notes). 7 versions could not be recovered and cannot be installed.

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/elm-messenger/messenger-core.

What we checked: The repo moved to github.com/elm-messenger/messenger-core. Rebuilt with git archive from commit 2a699201e1ae of https://github.com/elm-messenger/messenger-core (zip prefix linsyking-messenger-core-1f7d8d2/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 e7036a9b9a03ce1e6d52f918d436b16396571601.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/linsyking/messenger-core/zipball/12.0.0/

Messenger.Component.Component

Component

A component is an object that you may put in your layers.

User components

These are components that you users can create with custom basedata.

Basedata is the data that components with the same type can share.

For example, you may want a game component to have some common properties like position, velocity, etc.

In this case, your basedata would be a record with these properties.

type alias AbstractComponent cdata userdata tar msg bdata scenemsg =
(Env cdata userdata)
tar
msg
( Renderable, Int )
bdata
(SceneOutputMsg scenemsg userdata)

Abstract component

type alias ConcreteUserComponent data cdata userdata tar msg bdata scenemsg =
ConcreteGeneralModel
data
(Env cdata userdata)
tar
msg
( Renderable, Int )
bdata
(SceneOutputMsg scenemsg userdata)

ConcreteUserComponent

ConcreteUserComponent
data
cdata
userdata
tar
msg
bdata
scenemsg
-> ComponentStorage cdata userdata tar msg bdata scenemsg

Generate abstract user component from concrete component.

Env cdata userdata
-> List (AbstractComponent cdata userdata tar msg bdata scenemsg)
-> ( List (AbstractComponent cdata userdata tar msg bdata scenemsg)
, List (MMsgBase msg scenemsg userdata)
, ( Env cdata userdata, Bool )
)

Update a list of abstract user components.

Env cdata userdata
-> Bool
-> List (AbstractComponent cdata userdata tar msg bdata scenemsg)
-> ( List (AbstractComponent cdata userdata tar msg bdata scenemsg)
, List (MMsgBase msg scenemsg userdata)
, ( Env cdata userdata, Bool )
)

Update a list of abstract user components with block indicator.

It block is True, this function will not update anything.

Env cdata userdata
-> List ( tar, msg )
-> List (AbstractComponent cdata userdata tar msg bdata scenemsg)
-> ( List (AbstractComponent cdata userdata tar msg bdata scenemsg)
, List (MMsgBase msg scenemsg userdata)
, Env cdata userdata
)

Update a list of abstract user components with targeted msgs.

View components

Env cdata userdata
-> List (AbstractComponent cdata userdata tar msg bdata scenemsg)
-> List ( Renderable, Int )

Generate render list for one list of components.

Useful when there are several component lists.

The output should be used as the input of viewComponentsRenderList.

viewComponentsRenderList : List ( Renderable, Int ) -> Renderable

View the render list of components.

Useful when there are several component lists.

The input should be generated by several genComponentsRenderList.

Env cdata userdata
-> List (AbstractComponent cdata userdata tar msg bdata scenemsg)
-> Renderable

View one list of abstract components.

Used when there is only one list of components

Type sugar

type alias ComponentInit cdata userdata msg data bdata =
Env cdata userdata -> msg -> ( data, bdata )

Component init type sugar

type alias ComponentUpdate cdata data userdata scenemsg tar msg bdata =
Env cdata userdata
-> data
-> bdata
-> ( ( data, bdata )
, List (MMsg tar msg scenemsg userdata)
, ( Env cdata userdata, Bool )
)

Component update type sugar

type alias ComponentUpdateRec cdata data userdata scenemsg tar msg bdata =
Env cdata userdata
-> msg
-> data
-> bdata
-> ( ( data, bdata )
, List (MMsg tar msg scenemsg userdata)
, Env cdata userdata
)

Component updaterec type sugar

type alias ComponentView cdata userdata data bdata =
Env cdata userdata -> data -> bdata -> ( Renderable, Int )

Component view type sugar

The second entry is the "z-index" of the component.

type alias ComponentMatcher data bdata tar =
data -> bdata -> tar -> Bool

Component matcher type sugar

type alias ComponentStorage cdata userdata tar msg bdata scenemsg =
msg
-> LevelComponentStorage cdata userdata tar msg bdata scenemsg

Component storage type sugar

type alias LevelComponentStorage cdata userdata tar msg bdata scenemsg =
Env cdata userdata
-> AbstractComponent cdata userdata tar msg bdata scenemsg

Level component storage type sugar