mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-27 13:59:01 -05:00
Matter.Composite tweaks
This commit is contained in:
parent
2c601093bf
commit
f80866c6de
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue