<commit_before>'use strict';

Ball.prototype = new Physijs.BoxMesh(
    new THREE.SphereGeometry(0.6, 32, 32),
    new THREE.MeshLambertMaterial({map: THREE.ImageUtils.loadTexture("assets/img/fire.png")})
);
Ball.prototype.constructor = Ball;

function Ball() {
    this.isLaunched = false;
}

Ball.prototype.init = function () {
    this.position.set(0, 15, 20);
    this.isLaunched = false;
    scene.add(this);
};

Ball.prototype.launch = function (velocity) {
    this.lastVelocity = velocity;
    this.setLinearVelocity(velocity);
};

Ball.prototype.isInCup = function (cup) {
    return this.position.x < cup.x + 1.5 && this.position.x > cup.x - 1.5
    && this.position.z < cup.z + 1.5 && this.position.z > cup.z - 1.5
    && this.position.y < 3;
};

Ball.prototype.isOverTable = function () {
    return this.position.x > scene.table.position.x - (scene.table.geometry.parameters.width / 2)
    && this.position.x < scene.table.position.x + (scene.table.geometry.parameters.width / 2)
    && this.position.z > scene.table.position.z - (scene.table.geometry.parameters.height / 2)
    && this.position.z < scene.table.position.z + (scene.table.geometry.parameters.height / 2);
};

Ball.prototype.isStopped = function () {
    return this.getLinearVelocity().x === 0 && this.getLinearVelocity().y === 0 && this.getLinearVelocity().z === 0;
};<commit_msg>Balle supprimée lorsqu'elle a + dépassé la table<commit_after>'use strict';

Ball.prototype = new Physijs.BoxMesh(
    new THREE.SphereGeometry(0.6, 32, 32),
    new THREE.MeshLambertMaterial({map: THREE.ImageUtils.loadTexture("assets/img/fire.png")})
);
Ball.prototype.constructor = Ball;

function Ball() {
    this.isLaunched = false;
}

Ball.prototype.init = function () {
    this.position.set(0, 15, 20);
    this.isLaunched = false;
    scene.add(this);
};

Ball.prototype.launch = function (velocity) {
    this.lastVelocity = velocity;
    this.setLinearVelocity(velocity);
};

Ball.prototype.isInCup = function (cup) {
    return this.position.x < cup.x + 1.5 && this.position.x > cup.x - 1.5
    && this.position.z < cup.z + 1.5 && this.position.z > cup.z - 1.5
    && this.position.y < 3;
};

Ball.prototype.isOverTable = function () {
    return this.position.x > scene.table.position.x - (scene.table.geometry.parameters.width / 2) - 5
    && this.position.x < scene.table.position.x + (scene.table.geometry.parameters.width / 2) + 5
    && this.position.z > scene.table.position.z - (scene.table.geometry.parameters.height / 2) - 5
    && this.position.z < scene.table.position.z + (scene.table.geometry.parameters.height / 2) + 5;
};

Ball.prototype.isStopped = function () {
    return this.getLinearVelocity().x === 0 && this.getLinearVelocity().y === 0 && this.getLinearVelocity().z === 0;
};
{'fraction_non_alphanumeric': 0.168892096715987, 'fraction_numerical': 0.020931071815229157, 'mean_word_length': 3.428115015974441, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '461069', 'n_tokens_mistral': 1009, 'n_tokens_neox': 936, 'n_words': 166}