Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it.
If you pas in an options object, any settings in there will override those in the config object.
The structure of the JSON file is as follows:
{
'generator_info': // The name of the application that created the JSON data
'shapeName': {
'type': // The type of body
'label': // Optional body label
'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs
}
}
At the time of writing, only the Phaser Physics Tracer App exports in this format.
Creates a body using the supplied physics data, as provided by a JSON file.
The data file should be loaded as JSON:
Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it.
If you pas in an
optionsobject, any settings in there will override those in the config object.The structure of the JSON file is as follows:
At the time of writing, only the Phaser Physics Tracer App exports in this format.