<commit_before>Bloob.BodyToJsonConverter = function() {};
Bloob.BodyToJsonConverter.bodyToJson = function(body) {
	return body.toJson();
	
	// first, use default blueprint
	resultJson.bluePrints.defaultBluePrint = {
		"class": "Body"
	};
	
	var world = map.world;
	for(var bodyIndex in world.mBodies) {
		var body = world.mBodies[bodyIndex];
		
		// generate base shape
		var shapeId = shapeIdGenerator.nextId();
		
		// build body information
		var bodyId = bodyIdGenerator.nextId();
		resultJson.bodies[bodyId] = {
			"shape": shapeId,
			"pointMasses": 0,
			"translate": body.mDerivedPos.copy(),
			"rotate": body.mDerivedAngle,
			"scale": {"x": 9, "y": 1.5},
			"isKinematic": body.mKinematic
		};
	}
	
	return resultJson;
};

Body.prototype.toJson = function() {
	return {
		"class": "Body",
		"shape": "i",
		"pointMasses": 1,
		"translate": {"x": 0, "y": 4},
		"rotate": 0,
		"isKinematic": false
	};
};

SpringBody.prototype.toJson = function() {
	var json = Body.prototype.toJson.apply(this, arguments);
	json.class = "SpringBody";
	json.edgeSpringK = 150.0;
	json.edgeSpringDamp = 5.0;
	json.shapeSpringK = 300.0;
	json.shapeSpringDamp = 15.0;
	json.internalSprings = [
		{
			"pointA": 0,
			"pointB": 14,
			"springK": 300,
			"damping": 10
		},
		{
			"pointA": 1,
			"pointB": 14,
			"springK": 300.0,
			"damping": 10.0
		}
	];
	return json;
};

PressureBody.prototype.toJson = function() {
	var json = SpringBody.prototype.toJson.apply(this, arguments);
	<commit_msg>added values of spring body to json<commit_after>Bloob.BodyToJsonConverter = function() {};
Bloob.BodyToJsonConverter.bodyToJson = function(body) {
	return body.toJson();
	
	// first, use default blueprint
	resultJson.bluePrints.defaultBluePrint = {
		"class": "Body"
	};
	
	var world = map.world;
	for(var bodyIndex in world.mBodies) {
		var body = world.mBodies[bodyIndex];
		
		// generate base shape
		var shapeId = shapeIdGenerator.nextId();
		
		// build body information
		var bodyId = bodyIdGenerator.nextId();
		resultJson.bodies[bodyId] = {
			"shape": shapeId,
			"pointMasses": 0,
			"translate": body.mDerivedPos.copy(),
			"rotate": body.mDerivedAngle,
			"scale": {"x": 9, "y": 1.5},
			"isKinematic": body.mKinematic
		};
	}
	
	return resultJson;
};

Body.prototype.toJson = function() {
	return {
		"class": "Body",
		"shape": "i",
		"pointMasses": 1,
		"translate": {"x": 0, "y": 4},
		"rotate": 0,
		"isKinematic": false
	};
};

SpringBody.prototype.toJson = function() {
	var json = Body.prototype.toJson.apply(this, arguments);

	// adjustments for spring bodies
	json.class = "SpringBody";
	json.edgeSpringK = this.mEdgeSpringK;
	json.edgeSpringDamp = this.mEdgeSpringDamp;
	json.shapeSpringK = this.mShapeSpringK;
	json.shapeSpringDamp = this.mShapeSpringDamp;
	json.internalSprings = this.mSprings;

	/*
	[
		{
			"pointA": 0,
			"pointB": 14,
			"springK": 300,
			"damping": 10
		},
		{
			"pointA": 1,
			"pointB": 14,
			"springK": 300.0,
			"damping": 10.0
		}
	]*/
	;
	return json;
};

PressureBody.prototype.toJson = function() {
	var json = SpringBody.prototype.toJson.apply(this, arguments);
	
{'fraction_non_alphanumeric': 0.16393442622950818, 'fraction_numerical': 0.020893603342976536, 'mean_word_length': 3.7151515151515153, 'pattern_counts': {'":': 50, '<': 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': '5618331', 'n_tokens_mistral': 1345, 'n_tokens_neox': 1143, 'n_words': 235}