<commit_before>/*jslint plusplus: true, sloppy: true */
/*global MARCH: false, THREE: false, PerlinNoise: false, MarchingCubesGenerator: false*/

var mesh, renderer, camera, cubemesh, scene, controls, chunks, lastMousePos, projector, width, height;



$(document).ready(function () {
    //check browser compatibility status
    if (typeof (Worker) === "undefined") {
        alert("You browser must support Web Workers to run this application.");
        return;
    }

    // http://stackoverflow.com/questions/11476765/using-noise-to-generate-marching-cube-terrain
    
    //define constants
    var size = 50, stepSize = 1, chunkSize = 10;
    
    //gen terrain
    VOXEL.generate(size + 1, stepSize);

    //create the scene
    scene = new THREE.Scene();

    //iterate through chunks and create workers
    var chunkX, chunkY, chunkZ;
    chunks = [];
    for (chunkX = 0; chunkX < size; chunkX += chunkSize) {
        chunks[chunkX / chunkSize] = [];
        for (chunkY = 0; chunkY < size; chunkY += chunkSize) {
            chunks[chunkX / chunkSize][chunkY / chunkSize] = [];
            for (chunkZ = 0; chunkZ < size; chunkZ += chunkSize) {
                //create worker and pass chunk data
                var chunkData = { size: size, stepSize: stepSize, chunkSize: chunkSize, chunkX: chunkX, chunkY: chunkY, chunkZ: chunkZ, voxelData: VOXEL.voxels };
                var chunkWorker = new Worker("js/cubeworker.js");
                chunkWorker.onmessage = function (oEvent) {
                    //add to chunk array
                    data = oEvent.data;
                    var geometry = new THREE.Geometry();<commit_msg>Fixed chrome (no more 125 threads!)<commit_after>/*jslint plusplus: true, sloppy: true */
/*global MARCH: false, THREE: false, PerlinNoise: false, MarchingCubesGenerator: false*/

var mesh, renderer, camera, cubemesh, scene, controls, chunks, lastMousePos, projector, width, height;



$(document).ready(function () {
    //check browser compatibility status
    if (typeof (Worker) === "undefined") {
        alert("You browser must support Web Workers to run this application.");
        return;
    }

    // http://stackoverflow.com/questions/11476765/using-noise-to-generate-marching-cube-terrain
    
    //define constants
    var size = 64, stepSize = 1, chunkSize = 32;
    
    //gen terrain
    VOXEL.generate(size + 1, stepSize);

    //create the scene
    scene = new THREE.Scene();

    //iterate through chunks and create workers
    var chunkX, chunkY, chunkZ;
    chunks = [];
    for (chunkX = 0; chunkX < size; chunkX += chunkSize) {
        chunks[chunkX / chunkSize] = [];
        for (chunkY = 0; chunkY < size; chunkY += chunkSize) {
            chunks[chunkX / chunkSize][chunkY / chunkSize] = [];
            for (chunkZ = 0; chunkZ < size; chunkZ += chunkSize) {
                //create worker and pass chunk data
                var chunkData = { size: size, stepSize: stepSize, chunkSize: chunkSize, chunkX: chunkX, chunkY: chunkY, chunkZ: chunkZ, voxelData: VOXEL.voxels };
                var chunkWorker = new Worker("js/cubeworker.js");
                chunkWorker.onmessage = function (oEvent) {
                    //add to chunk array
                    data = oEvent.data;
                    var geometry = new THREE.Geometry();
{'fraction_non_alphanumeric': 0.1179843089921545, 'fraction_numerical': 0.011164755582377792, 'mean_word_length': 2.424586776859504, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2294755', 'n_tokens_mistral': 1024, 'n_tokens_neox': 943, 'n_words': 290}