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.
General model is designed to be an abstract interface of layers, components, etc..
A General model has the ability to:
MsgBase
Used when sending a msg to parent object.
Using SOMMsg when sending a SceneOutputMsg, which will be directly handled by Top-level.
Use OtherMsg when sending a normal message to parent.
Examples:
Filter SOMMsg from list of MsgBase.
Concrete General Model.
Users deal with the fields in concrete model. That is to say, you should implement the init,update,updaterec,view and matcher function in the model.
Rolled Abstract General Model.
Cannot be directedly modified. Used for storage.
Unroll a rolled abstract model. In this way, you retrieve the data from the storage. This is useful when you want to manipulate and calculate the reactions between components, like in collision handling process. For example, the following function called by the layer can read the position of from AbstractComponent. let x_data = unroll x posX=x_data.baseData.position in ...
Abstract a concrete model to an abstract model.
Initialize it with env and msg. Messenger will handle this for you.
View model list.
A general matcher type sugar
Similar to the matcher function implemented by user in the components and layers.
Change the update function to remap the result and return the changed abstract general model.
Change the updaterec function to remap the result and return the changed abstract general model.
The Basic Msg Model.
Using Other when sending msg to objects in the same type. Make sure the
othertarcan pass the matcher of target object.Examples: