From e60ebaccc052b35aa103e8227dc3716710a383ee Mon Sep 17 00:00:00 2001 From: Brice Chevalier Date: Sat, 24 Mar 2018 16:49:23 +0900 Subject: [PATCH] reverted change to Body.set method --- src/body/Body.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/body/Body.js b/src/body/Body.js index abd7811..d47130c 100644 --- a/src/body/Body.js +++ b/src/body/Body.js @@ -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) {