Skip to main content

Type Alias: EntityTemplate

type EntityTemplate = {
name: string | ((params: { id: string; event: IngestEvent }) => string);
components: ComponentsManifest | ((params: { id: string; event: IngestEvent }) => ComponentsManifest);
options?: EntityCreationOptions;
};

Defined in: livelink.clients/livelink.agent/sources/data/resolvers/SpawningEntityResolver.ts:16

Describes the entity the pipeline creates for each new id, under a mapping whose entities declares spawn.

Properties

name

name:
| string
| ((params: {
id: string;
event: IngestEvent;
}) => string);

Defined in: livelink.clients/livelink.agent/sources/data/resolvers/SpawningEntityResolver.ts:21

The name of the spawned entity. A string may embed the {id} placeholder (e.g. "AGV-{id}"); a function receives the id and the triggering event.


components

components:
| ComponentsManifest
| ((params: {
id: string;
event: IngestEvent;
}) => ComponentsManifest);

Defined in: livelink.clients/livelink.agent/sources/data/resolvers/SpawningEntityResolver.ts:27

The components of the spawned entity. A function receives the id and the triggering event, to derive initial values (e.g. the initial transform) from the first sighting.


options?

optional options?: EntityCreationOptions;

Defined in: livelink.clients/livelink.agent/sources/data/resolvers/SpawningEntityResolver.ts:33

Additional entity creation options. Consider delete_on_client_disconnection: true so spawned entities vanish with the agent.