Georgios Karnas cb10477324 Squash+Merge glTF feature branch (#877)
glTF docs (#809)
glTF instantiation and Scenegraph improvements (#810)
GLTF PBR example simplifications (#849)
GLTF scenegraph cleanup (#848)
Add GLTF example with GLTF-loader working (#857)
Add model selector in glTF example (#863)
Fix for #865 Buffer accessor does not work as expected (#872)
glTF: material and texture loading fixes (#866)
2019-02-04 19:19:31 -08:00

1.1 KiB

Group

A Group is a subclass of ScenegraphNode that holds a list of ScenegraphNode children. Since . A Group can be a child of another Group and thus be used to create hierarchical scene graphs.

Usage

Add a moon and a box models to the group.

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

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);

Properties

Model extends the ScenegraphNode class and inherits the transformation matrix properties from that class.

children : ScenegraphNode[]

Methods

constructor(props : Object)

Create an instance of Group.

setProps(props : Object)

Updates properties.

add(node : ScenegraphNode [, ...])

Add one or more ScenegraphNode objects to the Group.

group.add(model);

A variable argument list of ScenegraphNode instances.

remove(node: Node)

Removes an ScenegraphNode object from the Group.

group.remove(model);
  • model - (object) The scene graph node to be removed.