<commit_before>﻿'use strict';
/* global $: true */
/* global animation: true */
/* global boidWheights: true */

//Slider for selecting initial number of boids
//---------------------------------------------
$('#numBoidsSlider').slider({
    min: 0,
    max: 400,
    step: 10,
    value: animation.numBoids
});

$('#numBoidsVal').text(animation.numBoids);

$('#numBoidsSlider').on('slide', function (slideEvt) {
    $('#numBoidsVal').text(slideEvt.value);
    animation.numBoids = slideEvt.value;
});

//Sliders for weights
//--------------------
$('#slider1').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWheights.separation
});

$('#slider1val').text(boidWheights.separation);

$('#slider1').on('slide', function (slideEvt) {
    $('#slider1val').text(slideEvt.value);
    boidWheights.separation = slideEvt.value;
});

$('#slider2').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWheights.alginment
});
$('#slider2').on('slide', function (slideEvt) {

$('#slider2val').text(boidWheights.alginment);
    $('#slider2val').text(slideEvt.value);
    boidWheights.alginment = slideEvt.value;
});

$('#slider3').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWheights.cohesion
});
$('#slider3val').text(boidWheights.cohesion);

$('#slider3').on('slide', function (slideEvt) {
    $('#slider3val').text(slideEvt.value);
    boidWheights.cohesion = slideEvt.value;
});

$('#slider4').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWheights.obstacle
});
$('#slider4val').text(boidWheights.obstacle);

$('#slider4').on('slide', function (slideEvt) {
    $('#slider4val').text(slideEvt.value);
    boidWheights.obstacle = slideEvt.value;
});

$('#slider5').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWheights.predators
});

$('#slider5val').text(boidWheights.predators);

$('#slider5').on('slide', function (slideEvt) {
    $('#slider5val').text(slideEvt.value);
    boidWheights.predators = slideEvt.value;
});<commit_msg>Fixed typo<commit_after>﻿'use strict';
/* global $: true */
/* global animation: true */
/* global boidWeights: true */

//Slider for selecting initial number of boids
//---------------------------------------------
$('#numBoidsSlider').slider({
    min: 0,
    max: 400,
    step: 10,
    value: animation.numBoids
});

$('#numBoidsVal').text(animation.numBoids);

$('#numBoidsSlider').on('slide', function (slideEvt) {
    $('#numBoidsVal').text(slideEvt.value);
    animation.numBoids = slideEvt.value;
});

//Sliders for weights
//--------------------
$('#slider1').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWeights.separation
});

$('#slider1val').text(boidWeights.separation);

$('#slider1').on('slide', function (slideEvt) {
    $('#slider1val').text(slideEvt.value);
    boidWeights.separation = slideEvt.value;
});

$('#slider2').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWeights.alginment
});
$('#slider2').on('slide', function (slideEvt) {

$('#slider2val').text(boidWheights.alginment);
    $('#slider2val').text(slideEvt.value);
    boidWeights.alginment = slideEvt.value;
});

$('#slider3').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWeights.cohesion
});
$('#slider3val').text(boidWeights.cohesion);

$('#slider3').on('slide', function (slideEvt) {
    $('#slider3val').text(slideEvt.value);
    boidWeights.cohesion = slideEvt.value;
});

$('#slider4').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidheights.obstacle
});
$('#slider4val').text(boidWeights.obstacle);

$('#slider4').on('slide', function (slideEvt) {
    $('#slider4val').text(slideEvt.value);
    boidWeights.obstacle = slideEvt.value;
});

$('#slider5').slider({
    min: 0,
    max: 20,
    step: 0.1,
    value: boidWeights.predators
});

$('#slider5val').text(boidWeights.predators);

$('#slider5').on('slide', function (slideEvt) {
    $('#slider5val').text(slideEvt.value);
    boidWeights.predators = slideEvt.value;
});
{'fraction_non_alphanumeric': 0.23973973973973975, 'fraction_numerical': 0.025525525525525526, 'mean_word_length': 3.4809417040358746, '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': '5859101', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1478, 'n_words': 233}