Builds the simulation's nodes and links from an artifact payload.
A contribution joining exactly two concepts becomes a direct link between them, carrying
itself as that link's GraphRelationship rather than a node of its own — a diamond
drawn only to join two things told the reader nothing a line couldn't, and doubled the
canvas's visual noise for it. A contribution joining three or more concepts at once still
gets its own node, since that is the one case a single line cannot express, and a
contribution attached to only one concept — a leaf, one account with nothing on its other
end to draw a line to — keeps its node for the same reason: there is no second point.
Origin prompts are a third node kind, attached by a direct origin reference — and their
links are kept in a separate array because they must not count toward degree. Attribution
is not connectedness, and counting it would inflate every well-attributed concept for a
reason that has nothing to do with how the conversation related it to anything.
Feed the simulation [...links, ...originLinks] so origin nodes have a force acting on
them; compute sizes from degree, which sees only links.
Parameters
payload: Partial<ConceptGraphPayload>
A ConceptGraphArtifact payload. Every array is optional: an artifact can exist before an event fills it in.
Builds the simulation's nodes and links from an artifact payload.
A contribution joining exactly two concepts becomes a direct link between them, carrying itself as that link's GraphRelationship rather than a node of its own — a diamond drawn only to join two things told the reader nothing a line couldn't, and doubled the canvas's visual noise for it. A contribution joining three or more concepts at once still gets its own node, since that is the one case a single line cannot express, and a contribution attached to only one concept — a leaf, one account with nothing on its other end to draw a line to — keeps its node for the same reason: there is no second point.
Origin prompts are a third node kind, attached by a direct
originreference — and their links are kept in a separate array because they must not count toward degree. Attribution is not connectedness, and counting it would inflate every well-attributed concept for a reason that has nothing to do with how the conversation related it to anything.Feed the simulation
[...links, ...originLinks]so origin nodes have a force acting on them; compute sizes fromdegree, which sees onlylinks.