From f80866c6de6c9d988a1b9bb13729b9403fcadc3a Mon Sep 17 00:00:00 2001 From: liabru Date: Mon, 28 Apr 2014 17:25:49 +0100 Subject: [PATCH] Matter.Composite tweaks --- src/body/Composite.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/body/Composite.js b/src/body/Composite.js index 8d9464c..6ea8fa0 100644 --- a/src/body/Composite.js +++ b/src/body/Composite.js @@ -363,11 +363,11 @@ var Composite = {}; * Searches the composite recursively for an object matching the type and id supplied, null if not found * @method get * @param {composite} composite - * @param {string} type * @param {number} id + * @param {string} type * @return {object} The requested object, if found */ - Composite.get = function(composite, type, id) { + Composite.get = function(composite, id, type) { var objects, object; @@ -379,7 +379,7 @@ var Composite = {}; objects = Composite.allConstraints(composite); break; case 'composite': - objects = Composite.allComposites(composite); + objects = Composite.allComposites(composite).concat(composite); break; }