0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-26 13:49:01 -05:00

Matter.Composite tweaks

This commit is contained in:
liabru 2014-04-28 17:25:49 +01:00
parent 2c601093bf
commit f80866c6de

View file

@ -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;
}