<commit_before>/* ------------------
PLANET GENERATOR
------------------ */

let planetGenerator = (function() {


    function createSphereFromPlanet(p) {
        let sphere = document.createElement('a-sphere');
        sphere.setAttribute('id', p.id);
        sphere.setAttribute('class', 'planet-sphere');
        sphere.setAttribute('radius', p.radius);
        sphere.setAttribute('src', p.texture);
        sphere.setAttribute('cursor-listener', "");
        return sphere;
    }

    function createRotationForPlanet(p) {
        let rotAnim = document.createElement('a-animation');
        rotAnim.setAttribute('attribute', 'rotation');
        rotAnim.setAttribute('dur', p.rotationPeriod);
        rotAnim.setAttribute('to', '0 360 0');
        rotAnim.setAttribute('repeat', 'indefinite');
        rotAnim.setAttribute('easing', 'linear');
        rotAnim.setAttribute('fill', 'forwards');
        return rotAnim;
    }

    function generateRotatingPlanet(p) {
        //let sphere = createSphereFromPlanet(planets[p]);
        let sphere = document.getElementById(p);

        if (sphere) {

        sphere.setAttribute('position', p.position);


<commit_msg>TEMP BUG FIX made better: modularised by setting "src" (texture) dynamically<commit_after>/* ------------------
PLANET GENERATOR
------------------ */

let planetGenerator = (function() {


    function createSphereFromPlanet(p) {
        let sphere = document.createElement('a-sphere');
        sphere.setAttribute('id', p.id);
        sphere.setAttribute('class', 'planet-sphere');
        sphere.setAttribute('radius', p.radius);
        sphere.setAttribute('src', p.texture);
        sphere.setAttribute('cursor-listener', "");
        return sphere;
    }

    function createRotationForPlanet(p) {
        let rotAnim = document.createElement('a-animation');
        rotAnim.setAttribute('attribute', 'rotation');
        rotAnim.setAttribute('dur', p.rotationPeriod);
        rotAnim.setAttribute('to', '0 360 0');
        rotAnim.setAttribute('repeat', 'indefinite');
        rotAnim.setAttribute('easing', 'linear');
        rotAnim.setAttribute('fill', 'forwards');
        return rotAnim;
    }

    function generateRotatingPlanet(p) {
        //let sphere = createSphereFromPlanet(planets[p]);
        let sphere = document.getElementById(p);

        if (sphere) {

        sphere.setAttribute('position', p.position);
        sphere.setAttribute('src', p.texture);
        // sphere.setAttribute('radius', p.radius); NO



{'fraction_non_alphanumeric': 0.16699880430450378, 'fraction_numerical': 0.0039856516540454365, 'mean_word_length': 2.7406855439642324, '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': '7181772', 'n_tokens_mistral': 682, 'n_tokens_neox': 675, 'n_words': 125}