AgentRegistryAnimationEmitter

An AgentModel.AgentRegistryObserver that emits an AnimationEvent.AgentRegistered whenever an agent is registered with the model. Attach it with agentModel.attachRegistryObserver(AgentRegistryAnimationEmitter(agentModel)); the agent model is unchanged.

The agent's name is its identity in agent events, and the agent's runtime class name is used as its type (so the renderer can style by agent kind).

Note: the registry observer only fires for agents registered after it is attached (typically transient agents created during a run). Agents that already exist when the observer is attached (setup-time/permanent agents) are not re-announced here; the animation controller emits a one-time snapshot of those at attach (the wiring step). There is no removal hook on the registry, so AgentRemoved is not emitted yet.

Parameters

agentModel

the model whose agent registrations to observe (and whose animation sink to emit to)

Constructors

Link copied to clipboard
constructor(agentModel: AgentModel)

Functions

Link copied to clipboard
open override fun onAgentRegistered(agent: AgentLike)