<commit_before>// Setup Leap loop with frame callback function
var controllerOptions = { /*port: 3000,*/ enableGestures: true };

var width = 960,
    height = 500;

var canvas = d3.select('div#canvas')
            .append('canvas')
            .attr('width', width)
            .attr('height', height).node(),
    ctx = canvas.getContext('2d');

var svg = d3.select('div#container')
    .append('svg')
    .attr('width', width)
    .attr('height', height)
    .append('g')
    .attr('transform', 'translate(' + [width/2, height/2] + ')')
    .append('circle')
    .attr('r', 10)
    .attr('fill', '#abcdef');;

var finger, prevPosition,
    color = d3.scale.category20c();

function drawIndexFinger() {
    svg.attr('transform', 'translate(' + [-finger.tipPosition[0], finger.tipPosition[1]] + ')');

    if (prevPosition) {
        ctx.strokeStyle = color('#123456');
        ctx.moveTo(prevPosition.tipPosition[0], +prevPosition.tipPosition[1]);
        ctx.lineTo(finger.tipPosition[0], +finger.tipPosition[1]);
        ctx.stroke();
        ctx.beginPath();
    }
    prevPosition = finger;
}

Leap.loop(controllerOptions, function(frame) {
    finger = frame.pointables[1]; //passing index finger only
    if(finger) drawIndexFinger();
});
<commit_msg>stroke width increased for drawing<commit_after>// Setup Leap loop with frame callback function
var controllerOptions = { port: 3000, enableGestures: true };

var width = 960,
    height = 500;

var canvas = d3.select('div#canvas')
            .append('canvas')
            .attr('width', width)
            .attr('height', height).node(),
    ctx = canvas.getContext('2d');

var svg = d3.select('div#container')
    .append('svg')
    .attr('width', width)
    .attr('height', height)
    .append('g')
    .attr('transform', 'translate(' + [width/2, height/2] + ')')
    .append('circle')
    .attr('r', 10)
    .attr('fill', '#abcdef');;

var finger, prevPosition,
    color = d3.scale.category20c();

function drawIndexFinger() {
    svg.attr('transform', 'translate(' + [-finger.tipPosition[0], finger.tipPosition[1]] + ')');

    if (prevPosition) {
        ctx.strokeStyle = color('#123456');
        ctx.moveTo(prevPosition.tipPosition[0], +prevPosition.tipPosition[1]);
        ctx.lineTo(finger.tipPosition[0], +finger.tipPosition[1]);
        ctx.lineWidth = 5;
        ctx.stroke();
        ctx.beginPath();
    }
    prevPosition = finger;
}

Leap.loop(controllerOptions, function(frame) {
    finger = frame.pointables[1]; //passing index finger only
    if(finger) drawIndexFinger();
});

{'fraction_non_alphanumeric': 0.178515625, 'fraction_numerical': 0.026171875, 'mean_word_length': 3.2330578512396695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5181055', 'n_tokens_mistral': 851, 'n_tokens_neox': 805, 'n_words': 166}