<commit_before>var THREE = require("three");
var BoilerPlate = require("./Boilerplate");

var Visualizer = module.exports = function (x) {
    var scope = this;
    BoilerPlate.call(this);
    this.name = "Visualizer";
    this.renderer = null;

    this.init = function () {
        this.createEnvironment();
        window.setInterval(this.tst, 100);
    };

    this.createEnvironment = function () {
        this.renderer = new THREE.WebGLRenderer({
            antialias: true
        });
        this.renderer.setClearColor(0x0F0F0F);
        this.renderer.setSize(window.innerWidth, window.innerHeight);
        this.renderer.setPixelRatio(window.devicePixelRatio ? window.devicePixelRatio : 1);
        this.context = document.getElementById('visualizer');
        this.context.appendChild(this.renderer.domElement);

        this.scene = new THREE.Scene();

        this.camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
        this.scene.add(this.camera);

        // this.camera = new THREE.OrthographicCamera(
        //     window.innerWidth / - 2,
        //     window.innerWidth / 2,
        //     window.innerHeight / 2,
        //     window.innerHeight / - 2,
        //     -2000, 2000);

        // this.camera.position.x = 0;
        // this.camera.position.y = 0;
        this.camera.position.z = 20;
        // this.scene.add(this.camera);

        // this.base = new THREE.Object3D();
        // this.scene.add(this.base);

        var geometry = new THREE.BoxGeometry(1, 1, 1);
        var material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
        var cube = new THREE.Mesh(geometry, material);
        this.scene.add(cube);

        this.renderer.render(this.scene, this.camera)


        // this.render = function () {
        //     requestAnimationFrame(this.render);
        //     this.renderer.render(this.scene, this.camera);
        // };

    };
};
Visualizer.prototype = new BoilerPlate();<commit_msg>managed to make a simple animation to work<commit_after>var THREE = require("three");
var BoilerPlate = require("./Boilerplate");

var Visualizer = module.exports = function (x) {
    var scope = this;
    BoilerPlate.call(this);
    this.name = "Visualizer";
    this.renderer = null;

    this.init = function () {
        this.createEnvironment();
        this.render();
    };

    this.createEnvironment = function () {
        this.renderer = new THREE.WebGLRenderer({
            antialias: true
        });
        this.renderer.setClearColor(0x0F0F0F);
        this.renderer.setSize(window.innerWidth, window.innerHeight);
        this.renderer.setPixelRatio(window.devicePixelRatio ? window.devicePixelRatio : 1);
        this.context = document.getElementById('visualizer');
        this.context.appendChild(this.renderer.domElement);

        this.scene = new THREE.Scene();

        this.camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
        this.scene.add(this.camera);

        // this.camera = new THREE.OrthographicCamera(
        //     window.innerWidth / - 2,
        //     window.innerWidth / 2,
        //     window.innerHeight / 2,
        //     window.innerHeight / - 2,
        //     -2000, 2000);

        // this.camera.position.x = 0;
        // this.camera.position.y = 0;
        this.camera.position.z = 20;
        // this.scene.add(this.camera);

        // this.base = new THREE.Object3D();
        // this.scene.add(this.base);

        var geometry = new THREE.BoxGeometry(1, 1, 1);
        var material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
        this.cube = new THREE.Mesh(geometry, material);
        this.scene.add(this.cube);

        // this.renderer.render(this.scene, this.camera)


        // this.render = function () {
        //     requestAnimationFrame(function(){ 
        //         scope.render();
        //     });
        //     this.renderer.render(this.scene, this.camera);
        // };
        // this.render();
    };

    this.render = function () {
        requestAnimationFrame(function () {
            scope.render();
        });

        this.cube.rotation.x += 0.1;
        this.cube.rotation.y += 0.1;

        this.renderer.render(this.scene, this.camera);
    }
};
Visualizer.prototype = new BoilerPlate();
{'fraction_non_alphanumeric': 0.14055299539170507, 'fraction_numerical': 0.01912442396313364, 'mean_word_length': 2.076541459957477, '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': '5785285', 'n_tokens_mistral': 1363, 'n_tokens_neox': 1269, 'n_words': 223}