<commit_before>define(["floom/particle", "floom/material", "physics/jello"], function(Particle, Material, Jello) {
	var Group = function(system, minX, minY, maxX, maxY, u, v, material) {
		this.material = material;
		
		for (var i = minX; i < maxX; i++)
	        for (var j = minY; j < maxY; j++)
	        	system.addParticle(new Particle(i, j, u, v, material));
	};
	
	return Group;
});
<commit_msg>create Springs in a Group if the Material is elastic<commit_after>define(["floom/particle", "floom/spring", "floom/material", "physics/jello"], function(Particle, Spring, Material, Jello) {
	var Group = function(system, minX, minY, maxX, maxY, u, v, material) {
		this.material = material;
		
		var map = [];
		for (var i = minX; i < maxX; i++) {
			map[map.length] = [];
	        for (var j = minY; j < maxY; j++) {
	        	var p = new Particle(i, j, u, v, material);
	        	system.addParticle(p);
	        	if(material.isElastic) {
	        		map[map.length-1].push(p);
	        	}
	        }
		}
    	if(material.isElastic) {
    		for(var i = 0; i < map.length; i++) {
    			for(var j = 1; j < map[0].length; j++) {
        			system.springs.push(new Spring(map[i][j-1], map[i][j], map[i][j-1].position.sub(map[i][j].position).length()));
    			}
    		}
    		for(var j = 0; j < map[0].length; j++) {
    			for(var i = 1; i < map.length; i++) {
        			system.springs.push(new Spring(map[i-1][j], map[i][j], map[i-1][j].position.sub(map[i][j].position).length()));
    			}
    		}
    		for(var i = 1; i < map.length; i++) {
    			for(var j = 1; j < map[0].length; j++) {
        			system.springs.push(new Spring(map[i-1][j-1], map[i][j], map[i-1][j-1].position.sub(map[i][j].position).length()));
    			}
    		}
    		for(var i = 0; i < map.length - 1; i++) {
    			for(var j = 1; j < map[0].length; j++) {
        			system.springs.push(new Spring(map[i+1][j-1], map[i][j], map[i+1][j-1].position.sub(map[i][j].position).length()));
    			}
    		}
    	}
	};
	
	return Group;
});

{'fraction_non_alphanumeric': 0.20359572400388726, 'fraction_numerical': 0.012633624878522837, 'mean_word_length': 2.315619967793881, 'pattern_counts': {'":': 0, '<': 15, '<?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': '2712370', 'n_tokens_mistral': 872, 'n_tokens_neox': 810, 'n_words': 165}