Skip to content

Edge Path Options

Every built-in path algorithm can be tuned per edge with a BlowEdgePathOptions: the bezier's curvature, a smooth step's corner radius, how far a step runs out of its handle before turning, and where along the route its bend sits.

curvatureflatradius + offset + bendoffset + bend
Bezier
…
Simple bezier
…
Smooth step
…
Step
…
bit Blow

Try it

  • Move Curvature: the bezier, which has to double back to reach its end, swings out further or tighter. The simple bezier beside it, doubling back the same way, does not change.
  • Move Corner radius: the smooth step's corners round off or turn square at 0. The step stays square.
  • Move Offset: the smooth step and the step run further straight out of each handle before their first turn.
  • Move Bend: the smooth step's and the step's middle segment slides from the source end (0) to the target end (1).
  • Drag any node: the tuned paths keep their settings as they follow it.
  • Defaults puts every slider back to the algorithm's own default.

How it works

  • An edge's PathOptions takes a BlowEdgePathOptions; every value is optional and falls back to the algorithm's default when null.
  • Curvature (0.25) applies to Bezier: how far the control points reach when the target lies behind the source handle. Between handles that face each other the reach is half the distance whatever it is.
  • SimpleBezier takes no options: its control points always sit halfway along the handle axis, which is why it stays put.
  • BorderRadius (5 for SmoothStep, 0 for Step) rounds the corners; Offset (20) is the straight run out of each handle; StepPosition (0.5) places the bend between the source (0) and the target (1). All three apply to both step types.
  • LoopRadius (60) sets how far a self-connection loops out; the Self-Connections example tunes it.
  • Each edge holds its own options object, retuned in place by the sliders: the canvas compares the values rather than the object, so changing them is enough to redraw. Clone() copies one, and BlowDefaultEdgeOptions.PathOptions is cloned into every new edge.
An unhandled error has occurred. Reload 🗙