<commit_before>/**
 * @author <NAME> (https://github.com/amarbajric)
 * @author <NAME> (https://github.com/deKilla)
 * @author <NAME> (https://github.com/timoooo)
 */

import Chart from './Chart';
import {animateZ} from "./utils/animation";
var THREE = require('three');
THREE.orbitControls = require('three-orbit-controls')(THREE);


class BarChart {

    //TODO: maybe use object ...
    constructor(name, type, jsonData, sceneConfig) {
        this.name = name;
        this.type = type;
        this.jsonData = jsonData;
        this.sceneConfig = sceneConfig;
        this.legendMap = new Map();
        this.object = this.create3DBarChart();
    }

    createSegment(lastBarStartX, lastRowColor) {
        let color;
        if (lastRowColor) {
                color =  this.lightenCol(lastRowColor, 15).getHex();
            }
        else {
            color = Math.random() * 0xffffff;
        }
        let barGeometry = new THREE.BoxGeometry(0.7, 0.7, 1, 10, 10, 10);
        //set the bottom of the bar as origin coordinates (bar will only scale up, not in both dirs)
        barGeometry.translate(0, 0, barGeometry.parameters.depth / 2);

        let segmentMat = new THREE.MeshPhongMaterial({
            color: color,
            shading: THREE.SmoothShading,
            shininess: 0.8,
        });

        let bar = new THREE.Mesh(barGeometry, segmentMat);
        bar.position.x = lastBarStartX;

        return bar;
    }

<commit_msg>modified barchart depth<commit_after>/**
 * @author <NAME> (https://github.com/amarbajric)
 * @author <NAME> (https://github.com/deKilla)
 * @author <NAME> (https://github.com/timoooo)
 */

import Chart from './Chart';
import {animateZ} from "./utils/animation";
var THREE = require('three');
THREE.orbitControls = require('three-orbit-controls')(THREE);


class BarChart {

    //TODO: maybe use object ...
    constructor(name, type, jsonData, sceneConfig) {
        this.name = name;
        this.type = type;
        this.jsonData = jsonData;
        this.sceneConfig = sceneConfig;
        this.legendMap = new Map();
        this.object = this.create3DBarChart();
    }

    createSegment(lastBarStartX, lastRowColor) {
        let color;
        if (lastRowColor) {
                color =  this.lightenCol(lastRowColor, 15).getHex();
            }
        else {
            color = Math.random() * 0xffffff;
        }
        let barGeometry = new THREE.BoxGeometry(0.7, 0.7, 0.8, 10, 10, 10);
        //set the bottom of the bar as origin coordinates (bar will only scale up, not in both dirs)
        barGeometry.translate(0, 0, barGeometry.parameters.depth / 2);

        let segmentMat = new THREE.MeshPhongMaterial({
            color: color,
            shading: THREE.SmoothShading,
            shininess: 0.8,
        });

        let bar = new THREE.Mesh(barGeometry, segmentMat);
        bar.position.x = lastBarStartX;

        return bar;
    }


{'fraction_non_alphanumeric': 0.12833675564681724, 'fraction_numerical': 0.01403148528405202, 'mean_word_length': 2.2622767857142856, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, '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': '1149877', 'n_tokens_mistral': 939, 'n_tokens_neox': 875, 'n_words': 220}