You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
layoutByKind(graph): a world nobody laid out, laid out from its graph as worldGraph answers it. Each kind gets a point on a circle, links pull, neighbours push apart, for 320 seeded steps (160 past 2,000 elements), and the points are fitted into a frame of -1 to 1 on the longer axis. Answers { method: 'by-kind', version: 1, points }, one { id, x, y } per node in node order (OwLayoutByKind). The kinds' points on the circle are a table of numbers baked into the package, never computed, so the same graph gives the same points to the last bit in every browser and in the Python package; the shared fixture test/fixtures/layout/by-kind.json (12 cases, 3,013 points) is compared exactly. The graph is first put in one order (nodes by id; links by source, field, index, then target, in code point order), so the order a caller hands the nodes and links in moves no point; the points come back in the caller's node order.
layoutAround(graph, focus, { steps }): one element at the centre, its neighbours on rings round it in kind order and then by name in code point order (never by locale), up to 60 on the first ring, and with steps: 2 their own neighbours further out, near the neighbour that reached them. Answers { method: 'around', version: 1, points }, one { id, depth, x, y } per element within the steps, in the caller's node order, after the same one order as layoutByKind (OwLayoutAround). A focus that is not a node, a steps that is not 1 or 2, or an unknown option is refused with a TypeError.