sm.js module provides means to create and use state machines. State machines are very powerful tool for handling behavior and dynamic aspects of any software.
Classes
Namespaces
Methods
(static) defSM(definition) → {function}
Creates and returns a state machine constructor function based on the given state machine definition object. Using the returned constructor function one can create state machine instances one for each host object that needs to be handled by the given state machine definition.
Parameters:
Name | Type | Description |
---|---|---|
definition |
object | specification of the state machine |
Throws:
- Type
- Error
Returns:
state machine constructor function
- Type
- function