<commit_before>var BlurShader = require('./BlurShader');
var js2glsl = require("js2glsl");

var shaderSpec = new BlurShader();


var IMG_WIDTH = 29;
var IMG_HEIGHT = 29;
var IMG_FLT_SZ = IMG_WIDTH * IMG_HEIGHT * 4;
var IMG_BYTE_SZ = IMG_FLT_SZ * 4;

var srcImgbytes;

var width = 39;
var height = 39;
var gl;
var shaderProgram;
var floatTexture;
var cubeVertexPositionBuffer;

function webGLStart() {
    var pixels;
    var testPatternButton = document.getElementById('test_pattern');
    testPatternButton.addEventListener('click', function (e) {
        // Test stripes for alignment
        pixels = new Float32Array(IMG_HEIGHT * IMG_WIDTH * 4);
        pixIdx = 0;
        for (var y = 0; y < IMG_HEIGHT; y++) {
            for (var x = 0; x < IMG_WIDTH; x++) {
                var color = 0.0;
                if (x == 0 || y == 0 || x == IMG_WIDTH - 1 || y == IMG_HEIGHT - 1) {
                    color = 1.0;
                }
                pixels[pixIdx + 0] = color;
                pixels[pixIdx + 1] = color;
                pixels[pixIdx + 2] = color;
                pixels[pixIdx + 3] = 1.0;
                pixIdx += 4;
            }
        }

        draw2D(pixels);
        var tex = createTexture(pixels, IMG_WIDTH, IMG_HEIGHT);
        //var tmp = new Float32Array(srcImgbytes, IMG_BYTE_SZ * (imageCount-1), IMG_FLT_SZ);
        //replaceTexture(tex, tmp, IMG_WIDTH, IMG_HEIGHT);
        drawScene(tex, false);

    });

    // File reader
    var fileInput = document.getElementById('fileInput');
    fileInput.addEventListener('change', function (e) {
        var file = fileInput.files[0];

        var reader = new FileReader();
<commit_msg>Use test pattern to ensure blur shader is working properly<commit_after>var BlurShader = require('./BlurShader');
var js2glsl = require("js2glsl");

var shaderSpec = new BlurShader();


var IMG_WIDTH = 29;
var IMG_HEIGHT = 29;
var IMG_FLT_SZ = IMG_WIDTH * IMG_HEIGHT * 4;
var IMG_BYTE_SZ = IMG_FLT_SZ * 4;

var srcImgbytes;

var width = 39;
var height = 39;
var gl;
var shaderProgram;
var floatTexture;
var cubeVertexPositionBuffer;

function webGLStart() {
    var pixels;
    var testPatternButton = document.getElementById('test_pattern');
    testPatternButton.addEventListener('click', function (e) {
        // Test stripes for alignment
        pixels = new Float32Array(IMG_HEIGHT * IMG_WIDTH * 4);
        pixIdx = 0;
        for (var y = 0; y < IMG_HEIGHT; y++) {
            for (var x = 0; x < IMG_WIDTH; x++) {
                var color = 0.0;
                if (x < 5 || y < 5 || x >= IMG_WIDTH - 5 || y >= IMG_HEIGHT - 5) {
                    color = 1.0;
                }
                pixels[pixIdx + 0] = color;
                pixels[pixIdx + 1] = color;
                pixels[pixIdx + 2] = color;
                pixels[pixIdx + 3] = 1.0;
                pixIdx += 4;
            }
        }

        draw2D(pixels);
        var tex = createTexture(pixels, IMG_WIDTH, IMG_HEIGHT);
        //var tmp = new Float32Array(srcImgbytes, IMG_BYTE_SZ * (imageCount-1), IMG_FLT_SZ);
        //replaceTexture(tex, tmp, IMG_WIDTH, IMG_HEIGHT);
        drawScene(tex, false);

    });

    // File reader
    var fileInput = document.getElementById('fileInput');
    fileInput.addEventListener('change', function (e) {
        var file = fileInput.files[0];

        var reader = new FileReader();

{'fraction_non_alphanumeric': 0.1188997338065661, 'fraction_numerical': 0.022478556640047324, 'mean_word_length': 2.184557438794727, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '837559', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1087, 'n_words': 289}