<commit_before>/* jshint esversion: 6 */

import Visualization from "./visualization";

export default class Particle {

    constructor(data, x, y, width, height) {
        this.position = new PIXI.Point(x, y);
        this.destination = new PIXI.Point(x, y);

        // 2px every 1/60 second seem to be a good value
        this.speed = 2;

        this.size = {
            width,
            height,
            equals: function (width, height) {
                return this.width === width && this.height === height;
            }
        };
        this.newSize = {
            width,
            height
        };

        this.data = data;
        this.id = this.data["Row ID"];
        this.shouldAnimate = false;
        this.alpha = 1;

        this.shape = "rect";
    }

    transitionTo(x, y, width, height, type) {
        switch (type) {
            case "none":
                this.shouldAnimate = false;
                this.setPosition(x, y);
                this.setSize(width, height);
                break;

            case "direct":<commit_msg>refactore: changed speed for transition<commit_after>/* jshint esversion: 6 */

import Visualization from "./visualization";

export default class Particle {

    constructor(data, x, y, width, height) {
        this.position = new PIXI.Point(x, y);
        this.destination = new PIXI.Point(x, y);

        // 2px every 1/60 second seem to be a good value
        this.speed = 3;

        this.size = {
            width,
            height,
            equals: function (width, height) {
                return this.width === width && this.height === height;
            }
        };
        this.newSize = {
            width,
            height
        };

        this.data = data;
        this.id = this.data["Row ID"];
        this.shouldAnimate = false;
        this.alpha = 1;

        this.shape = "rect";
    }

    transitionTo(x, y, width, height, type) {
        switch (type) {
            case "none":
                this.shouldAnimate = false;
                this.setPosition(x, y);
                this.setSize(width, height);
                break;

            case "direct":
{'fraction_non_alphanumeric': 0.11485239852398524, 'fraction_numerical': 0.006457564575645757, 'mean_word_length': 1.4453213077790303, 'pattern_counts': {'":': 4, '<': 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': '5195013', 'n_tokens_mistral': 636, 'n_tokens_neox': 597, 'n_words': 165}