<commit_before>var ZilShape = function(category, name, shape, width, height, depth, rotation, loading_delegate, use_boxes, progress_update, on_load) {
	this.category = category;
	this.name = name;
    this.use_boxes = use_boxes;
    this.is_transparent = false;
    var _shape = {};
    for(var key in shape) {
        var value = shape[key];
        if(!isNaN(key)) {
            // old type key
            var k = key;
            var x = (k / (512 * 512)) | 0;
            k -= x * 512 * 512;
            var y = (k / 512) | 0;
            k -= y * 512;
            var z = k;
            key = ZilShape._key(x, y, z);
        }
        _shape[key] = value;
    }
	this.shape = _shape; // what to persist
	this.width = width;
	this.height = height;
	this.depth = depth;
	this.bounds = { w: 0, h: 0, d: 0 };
	this.undo_shape = null;
    this.rotation = rotation ? rotation : 0;
    this.loading_delegate = loading_delegate;

	this.invalidate();
    this.calculate_bounds();

    this.loaded_shapes = {};
    this.shape_index = [];
    this.emitted_light = {};

    if(progress_update) {

        // part 1: load shapes
        var tasks = [];
        this.shape_keys = Object.keys(this.shape);
        for(var i = 0; i < this.shape_keys.length; i++) {
            tasks.push(ZIL_UTIL.bind(this, function(index) {
                var key = this.shape_keys[index];
                this.loaded_shapes[key] = this._get_shape_value(key);
            }));
        }

        this.run_tasks(tasks, 0, progress_update, "Loading map: " + this.name + "...", ZIL_UTIL.bind(this, function() {
            for(var i = 0; i < this.rotation; i++) this.rotate(1);

            // part 2: index shapes
            var tasks = [];
            this.shape_keys = Object.keys(this.loaded_shapes);
            for(var i = 0; i < this.shape_keys.length; i++) {<commit_msg>fixed black voxel at creature bug<commit_after>var ZilShape = function(category, name, shape, width, height, depth, rotation, loading_delegate, use_boxes, progress_update, on_load) {
	this.category = category;
	this.name = name;
    this.use_boxes = use_boxes;
    this.is_transparent = false;
    var _shape = {};
    for(var key in shape) {
        var value = shape[key];
        if(!isNaN(key)) {
            // old type key
            var k = key;
            var x = (k / (512 * 512)) | 0;
            k -= x * 512 * 512;
            var y = (k / 512) | 0;
            k -= y * 512;
            var z = k;
            key = ZilShape._key(x, y, z);
        }
        _shape[key] = value;
    }
	this.shape = _shape; // what to persist
	this.width = width;
	this.height = height;
	this.depth = depth;
	this.bounds = { w: 0, h: 0, d: 0 };
	this.undo_shape = null;
    this.rotation = rotation ? rotation : 0;
    this.loading_delegate = loading_delegate;

	this.invalidate();
    this.calculate_bounds();

    this.loaded_shapes = {};
    this.shape_index = [];
    this.emitted_light = {};

    if(progress_update) {

        // part 1: load shapes
        var tasks = [];
        this.shape_keys = Object.keys(this.shape);
        for(var i = 0; i < this.shape_keys.length; i++) {
            tasks.push(ZIL_UTIL.bind(this, function(index) {
                var key = this.shape_keys[index];
                var v = this._get_shape_value(key);
                if(v != null) this.loaded_shapes[key] = v;
            }));
        }

        this.run_tasks(tasks, 0, progress_update, "Loading map: " + this.name + "...", ZIL_UTIL.bind(this, function() {
            for(var i = 0; i < this.rotation; i++) this.rotate(1);

            // part 2: index shapes
            var tasks = [];
            this.shape_keys = Object.keys(this.loaded_shapes);
            for(var i = 0; i < this.shape_keys.length; i++) {
{'fraction_non_alphanumeric': 0.1407702523240372, 'fraction_numerical': 0.016467463479415672, 'mean_word_length': 1.9261849261849262, 'pattern_counts': {'":': 0, '<': 9, '<?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': '758925', 'n_tokens_mistral': 1294, 'n_tokens_neox': 1216, 'n_words': 302}