Skip to main content

Type Alias: SceneEntities

type SceneEntities =
| (EntityLookup & {
spawn?: never;
})
| {
spawn: EntityTemplate;
byName?: never;
byUuid?: never;
resolve?: never;
linkage?: never;
};

Defined in: livelink.clients/livelink.agent/sources/data/EventMapping.ts:99

The entities of the 3dverse scene a mapping drives, and how an id carried by its events finds — or creates — one of them. Exactly one of four strategies:

  • byName — the entity whose name the id produces (a pattern embedding {id}, or a function);
  • byUuid — a fixed id → entity UUID table;
  • resolve — an arbitrary function, for lookups the two above cannot express;
  • spawn — no pre-existing entity: one is created per new id, from a template. Use it when the stream itself defines the population (one entity per vehicle serial number).

The first three find entities already in the scene and accept a linkage (see EntityLookup); spawn creates at the scene root, and so takes none.