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.
Layered scene is a pre-defined scene implementation provided by Messenger.
A layered scene can only handle a list of layers with fixed cdata, userdata, tar, msg and scenemsg types.
This creates a layered scene.
init creates the initial layered scene from env data and init msg.
settingsFunc is a user provided function to modify renderSettings each time the scene updates. If you don't need settingsFunc, simply provide a func _ _ _ = settings
init type sugar for normal (not prototype) layered scenes Receives Environment and sceneMsg (which stores the initial data), and return a record of data, for example this:
{ renderSettings = []
, commonData = cd
, layers =
[ Opening.layer NullLayerMsg envcd ]
}settingsFunc type sugar This function takes the environment, userevent, the data of the scene and add visual effects to the scene.
init type sugar for scene prototypes This defines the initializing function for a scene prototype. It should be like this:
LayeredSceneProtoInit SceneCommonData UserData LayerTarget (LayerMsg SceneMsg) SceneMsg (InitData SceneMsg)
It receives environment, the initial data to initialize the prototype, and return a layeredSceneData.
init type sugar for levels. Normally it is used internally. No need to worry about it.
Compose LayeredSceneProtoInit with LayeredSceneLevelInit.
Layered Scene Data.
Here is an example for it: