@mocanvas/mocanvas · function

getTangentOnBody

declare function getTangentOnBody(body: ArrowBody, t: number): Vec

Unit direction of travel at parameter t. On an elbow that is the direction of the leg t falls on, so t = 1 gives the direction of the final leg — which is where the end arrowhead points.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.