[API] Add customisation of reroute bezier controls (#846)

Allows globally setting the bezier control point offset from the reroute
centre point. This can be increased to allow larger curves on longer
links, or set to 0 to completely disable the spline on inter-reroute
link segments.
This commit is contained in:
filtered
2025-03-24 17:10:57 +11:00
committed by GitHub
parent 642317f6bd
commit b1462a6274
2 changed files with 4 additions and 2 deletions

View File

@@ -4757,7 +4757,7 @@ export class LGraphCanvas implements ConnectionColorContext {
} else {
// Calculate start control for the next iter control point
const nextPos = reroutes[j + 1]?.pos ?? endPos
const dist = Math.min(80, distance(reroute.pos, nextPos) * 0.25)
const dist = Math.min(Reroute.maxSplineOffset, distance(reroute.pos, nextPos) * 0.25)
startControl = [dist * reroute.cos, dist * reroute.sin]
}
}