Shumoku Docs

Search documentation

Shared docs and current release

Loading search…

日本語

@shumoku/core · 0.4.0 · function

bpsToLinkWidthMode

Source

Map bits/sec to stroke width under the given mode. Unknown bandwidth returns 0 (caller decides the fallback), matching `bpsToLinkWidth`.

bpsToLinkWidthMode(bps: number | undefined, mode?: LinkWidthMode): number

Parameters

Parameter Type Description Default
bps number | undefined No additional description.
mode LinkWidthMode No additional description. 'log'

Returns

number

libs/@shumoku/core/src/layout/link-utils.ts:153