From a4b357050d7e294318ce7756d22d9813ac1ef71e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 30 Aug 2017 23:56:18 +0100 Subject: [PATCH] You can pass in the config object as the children argument to a Group --- v3/src/gameobjects/group/GroupFactory.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v3/src/gameobjects/group/GroupFactory.js b/v3/src/gameobjects/group/GroupFactory.js index 36e86f135..8720fa3e6 100644 --- a/v3/src/gameobjects/group/GroupFactory.js +++ b/v3/src/gameobjects/group/GroupFactory.js @@ -2,6 +2,12 @@ var Group = require('./Group'); var GroupFactory = function (scene, children, config) { + if (typeof children === 'object' && config === undefined) + { + config = children; + children = []; + } + return new Group(scene, children, config); };