fromJSON(json, id) {
		let data = json;

		if (typeof id !== "undefined") {
			data = json[id];
		}

		// Physic Editor Format (https://www.codeandweb.com/physicseditor)
		if (typeof data === "undefined") {
			throw new Error(
				"Identifier (" + id + ") undefined for the given JSON object)",
			);
		}

		if (data.length) {
			// go through all shapes and add them to the body
			for (let i = 0; i < data.length; i++) {
				this.addVertices(data[i].shape, i);
			}
			// apply density, friction and bounce properties from the first shape
			// Note : how to manage different mass or friction for all different shapes?
			this.mass = data[0].density || 0;
			this.friction.set(data[0].friction || 0, data[0].friction || 0);
			this.bounce = data[0].bounce || 0;
		}

		// return the amount of shapes added to the body
		return data.length;
	}
add collision mesh based on a JSON object
(this will also apply any physic properties defined in the given JSON file)
@param {object} json - a JSON object as exported from a Physics Editor tool
@param {string} [id] - an optional shape identifier within the given the json object
@see https://www.codeandweb.com/physicseditor
@returns {number} how many shapes were added to the body
@example
// define the body based on the banana shape
this.body.fromJSON(me.loader.getJSON("shapesdef").banana);
// or ...
this.body.fromJSON(me.loader.getJSON("shapesdef"), "banana");