<commit_before>(function () {
    "use strict";

    var view = require("./scene");
    var dt = require("./dt");
    var cubes = require("./cubes");

    view.initialise(window.innerWidth, 500, 0x808080);
    view.appendTo(document.body);

    var number = 10;
    view.getCamera().position.z = number * 6;

    var group = cubes.initialise(number);
    group.rotation.x = Math.PI / 4;
    group.rotation.y = - Math.PI / 4;
    view.getScene().add(group);

    cubes.toRGB();
    view.render();

    /**
     * Interaction
     */
    var $ = require("./select");
    var R = require("../vendor/ramda/ramda");


    $("hsl").onclick = cubes.toHSL;
    $("rgb").onclick = cubes.toRGB;

    var setupSlider = function (type, minMax) {
        var slider = $(type + "-" + minMax);
        var valueText = $(type + "-" + minMax + "-value");

        slider.oninput = function () {
            valueText.innerHTML = slider.value;
        };

        slider.onchange = function () {
            cubes.setHSLLimit(type, minMax, slider.value);
            valueText.innerHTML = slider.value;
        };
    };

    var lift = R.liftN(2, R.curryN(2, setupSlider));
    lift(["saturation", "lightness"], ["max", "min"]);<commit_msg>updated events to eventListeners / fixed width on canvas<commit_after>(function () {
    "use strict";

    var $ = require("./select");

    var view = require("./scene");
    var dt = require("./dt");
    var cubes = require("./cubes");

    view.initialise(window.innerWidth - 40, 500, 0x808080);
    view.appendTo($("canvas"));

    var number = 10;
    view.getCamera().position.z = number * 6;

    var group = cubes.initialise(number);
    group.rotation.x = Math.PI / 4;
    group.rotation.y = - Math.PI / 4;
    view.getScene().add(group);

    cubes.toRGB();
    view.render();

    /**
     * Interaction
     */
    var R = require("../vendor/ramda/ramda");


    $("hsl").onclick = cubes.toHSL;
    $("rgb").onclick = cubes.toRGB;

    var setupSlider = function (type, minMax) {
        var slider = $(type + "-" + minMax);
        var valueText = $(type + "-" + minMax + "-value");

        slider.addEventListener("input", function () {
            valueText.innerHTML = slider.value;
        });

        slider.addEventListener("change", function () {
            cubes.setHSLLimit(type, minMax, slider.value);
            valueText.innerHTML = slider.value;
        });
    };

    var lift = R.liftN(2, R.curryN(2, setupSlider));
    lift(["saturation", "lightness"], ["max", "min"]);
{'fraction_non_alphanumeric': 0.18045112781954886, 'fraction_numerical': 0.014246141669964385, 'mean_word_length': 2.3394980184940555, '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': '575399', 'n_tokens_mistral': 872, 'n_tokens_neox': 797, 'n_words': 163}