renderer.setNodeSizeScale
setNodeSizeScale(value: number): voidScale every node's rendered diameter by value, uniformly.
This is the knob a scene animation wants. Outside map mode apparent size
goes as size × scale × 50 / depth, so 50 scene units is the depth at
which a node draws at exactly its configured size in CSS px. The
cinematics shots fly at a distance of 280–420 — 5.6× to 8.4× that
reference — so a 15 px node arrives on screen about 2 px wide and a route
that reads well in the overview reads as a field of dust in flight.
Raising the scale on take-off and restoring it on landing keeps both
readable without touching the layout, the shot's distance, or the
configured sizes.
The scale moves everything that is derived from node size together: the node itself, where edges meet it, the arrow back-off, self-loop radii, label sizing and the clickable area. setMaxScreenFraction still applies on top, so a large scale cannot let one node take the frame as the camera passes it.
Undo behavior: not undoable, like everything else on this class — and
that is why it lives here rather than on StyleApi, whose
setDefaultNodeSize goes through a recorded command. A flight that raised
and restored the scale through the command path would leave two entries on
the undo stack per flight, and an undo of a graph edit made before the
flight would have to walk back through them first.
Declarative equivalent: <GraphCanvas node={{ nodeScale }} />. The prop
seeds the value on mount; a call here overrides it until the prop changes.
value | number | Positive, finite multiplier; 1 leaves configured sizes
as they are. Out-of-range values warn and fall back to
DEFAULT_NODE_SIZE_SCALE. |
Returns: void