<commit_before>define(function(require) {

    var THREE = require('THREE');

    function Appearance(options) {
        options = options || {};
        this.color = options.color;
        this.size = options.size || 1;
        this.selected = false;

        this.mesh = options.mesh || this.genericMesh();
    }

    Appearance.prototype.genericMesh = function() {
        var color = parseInt(this.color.replace('#', ''), 16);
        var geometry = new THREE.CubeGeometry(this.size, this.size, this.size);
        var material = new THREE.MeshBasicMaterial({
            color: new THREE.Color(color)
        });

        return new THREE.Mesh(geometry, material);
    };

    Appearance.prototype.onSelect = function() {
        this.selected = true;
    };

    Appearance.prototype.onUnselect = function() {
        this.selected = false;
    };

    Appearance.prototype.update = function(dt) {
        var position = this.entity.getComponent('Transform');
        if (!position) return;

        this.mesh.position.set(position.x, position.y, position.z);
    };

    return Appearance;
});<commit_msg>Give units shadows. Ish.<commit_after>define(function(require) {

    var THREE = require('THREE');

    function Appearance(options) {
        options = options || {};
        this.color = options.color;
        this.size = options.size || 1;
        this.selected = false;

        this.mesh = options.mesh || this.genericMesh();
    }

    Appearance.prototype.genericMesh = function() {
        var color = parseInt(this.color.replace('#', ''), 16);
        var geometry = new THREE.CubeGeometry(this.size, this.size, this.size);
        var material = new THREE.MeshLambertMaterial({
            color: new THREE.Color(color)
        });
        var mesh = new THREE.Mesh(geometry, material);
        mesh.castShadow = mesh.receiveShadow = true;

        return mesh;
    };

    Appearance.prototype.onSelect = function() {
        this.selected = true;
    };

    Appearance.prototype.onUnselect = function() {
        this.selected = false;
    };

    Appearance.prototype.update = function(dt) {
        var position = this.entity.getComponent('Transform');
        if (!position) return;

        this.mesh.position.set(position.x, position.y, position.z);
    };

    return Appearance;
});
{'fraction_non_alphanumeric': 0.13434125269978403, 'fraction_numerical': 0.002591792656587473, 'mean_word_length': 2.4413075780089155, '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': '204549', 'n_tokens_mistral': 673, 'n_tokens_neox': 634, 'n_words': 133}