Skip to content

scaleHalfLink

scaleHalfLink(g, s): HalfLinkGeometry

Defined in: network/half-link.ts:180

Uniformly scale a resolved half-arrow geometry’s coordinates by s (about the origin). Used to “bake” a screen-space shape for the retained SVG/Canvas path: the shape is solved in pixel space (node centres × k, sizes in px) — because the tip length (width^⅓), tip width (width^½) and outer bend (^0.4) are not linear in size, so they can’t be reproduced by pre-dividing the sizes — and the result is scaled by 1/k, so the Scene’s ×k view transform reproduces the exact pixel shape.

HalfLinkGeometry

number

HalfLinkGeometry