luma.gl

Group - Scenegraph Grouping & Hierarchy

Group Method: add

Add an Object3D object to the Group.

Syntax:

group.add(o[, ...]);

Arguments:

A variable argument list of Object3D instances.

Examples:

Add a moon and a box models to the group. Taken from [lesson 12]http://uber.github.io/luma.gl/examples/lessons/12/). http://uber.github.io/luma.gl/examples/lessons/12/

// Add objects to the group
group.add(moon, box);

Group Method: remove

Removes an Object3D object from the Group.

Syntax:

group.remove(model);

Arguments:

model - (object) The model to be removed.

Examples:

Add a moon and a box models to the group. Then remove them.

// Add objects to the group
group.add(moon, box);
// Remove the moon
group.remove(moon);