Skip to content

Group

Defined in: system/group.ts:31

Class for combining several Items into a group

var XJS = require('xjs');
var myScene;
var Group = XJS.Group;
xjs.Scene.getActiveScene()
.then(function(scene) {
myScene = scene;
return myScene.getItems();
}).then(function(items) {
var newGroup = new Group(items);
newGroup.addToScene();
})
  • Addable

new Group(itemArray?): Group

Defined in: system/group.ts:34

string[] | Item[]

Group

addToScene(value?): Promise<any>

Defined in: system/group.ts:64

param: (value?: number | Scene)

return: Promise<any>

Adds this group to the current scene by default. Accepts an optional parameter value, which, when supplied, points to the scene where item will be added instead. If ready config {listenToItemAdd: true} it returns item id, else returns boolean.

Note: There is yet no way to detect error responses for this action.

number | Scene

Promise<any>

Addable.addToScene


toStringArray(): string[]

Defined in: system/group.ts:38

string[]