Skip to content

Commit eaa57d6

Browse files
committed
feat(visualize): scale node size by degree (sqrt) so hubs read big
The old radius capped at degree ~17, so every well-connected node looked the same size. Use 3.5 + sqrt(degree)*2.1 (clamped) → the heavily-linked hubs (anthropic, agentic-systems, claude-code …) clearly stand out while leaves stay small, giving the nebula a visible importance hierarchy.
1 parent ec08e44 commit eaa57d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openkb/templates/graph.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
// build working nodes/edges from GRAPH (object-form edges: e.source/e.target)
244244
const nodes = GRAPH.nodes.map(n => ({
245245
...n, x:0, y:0, z:0, vx:0, vy:0, vz:0,
246-
r: 3.5 + Math.min(7, ((n.in || 0) + (n.out || 0)) * 0.42), // small crisp nodes, scaled by degree
246+
r: 3.5 + Math.min(18, Math.sqrt((n.in || 0) + (n.out || 0)) * 2.1), // sqrt-scaled by degree → hubs read big, leaves stay small
247247
col: colorOf(n.type), // cached color → no per-frame lookup
248248
alpha: 1, // per-node fade (legend toggle)
249249
sx:0, sy:0, rz:0, pp:1, hl:1, pinned:false // projection cache + smoothed highlight + pinned (drag to pull out)

0 commit comments

Comments
 (0)