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:
parent
b3220cf3e8
commit
e60ebaccc0
1 changed files with 10 additions and 4 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue