0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-17 12:42:17 -05:00

reverted change to Body.set method

This commit is contained in:
Brice Chevalier 2018-03-24 16:49:23 +09:00
parent b3220cf3e8
commit e60ebaccc0

View file

@ -182,11 +182,17 @@ var Axes = require('../geometry/Axes');
* Prefer to use the actual setter functions in performance critical situations.
* @method set
* @param {body} body
* @param {object} settings A map of properties and values to set on the body.
* @param {} settings A property name (or map of properties and values) to set on the body.
* @param {} value The value to set if `settings` is a single property name.
*/
Body.set = function(body, settings) {
var property,
value;
Body.set = function(body, settings, value) {
var property;
if (typeof settings === 'string') {
property = settings;
settings = {};
settings[property] = value;
}
for (property in settings) {