Genesis.World (genesis v0.5.1)
View SourceThe World is a GenServer that acts as a registry and manages the lifecycle of objects and aspects. It is responsible for creating, cloning, and destroying objects, as well as registering aspects and prefabs. It also manages the event routing for objects and aspects, ensuring that events are dispatched to the correct handlers.
Summary
Functions
Returns a specification to start this module under a supervisor.
Clones an object with all the aspects as the original object.
Creates a new object from a prefab. The prefab must be registered in the World before it can be used.
Destroys an object from the world.
Fetches the aspects of an object.
Waits for all object events to be processed. Returns a list of the events processed so far.
List all aspects registered in the world.
List all objects spawned in the world.
Creates a new unique object ID.
Registers an aspect module.
Registers a new prefab.
Sends a message to an object.
Starts the World process.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Clones an object with all the aspects as the original object.
Creates a new object from a prefab. The prefab must be registered in the World before it can be used.
Destroys an object from the world.
Fetches the aspects of an object.
Waits for all object events to be processed. Returns a list of the events processed so far.
List all aspects registered in the world.
List all objects spawned in the world.
Creates a new unique object ID.
Registers an aspect module.
Registers a new prefab.
Sends a message to an object.
Starts the World process.