Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function drawSkeleton(
keypoints: Keypoint[],
minConfidence: number,
ctx: CanvasRenderingContext2D,
lineWidth: number = LINE_WIDTH,
strokeColor: string = STROKE_COLOR,
scale = 1
) {
const adjacentKeyPoints = getAdjacentKeyPoints(keypoints, minConfidence);
adjacentKeyPoints.forEach(keypoints => {
drawSegment(
toTuple(keypoints[0].position),
toTuple(keypoints[1].position),
ctx,
lineWidth,
strokeColor,
scale
);
});
}