Object3D →
Group
This is almost identical to an Object3D. Its purpose is to make working with groups of objects syntactically clearer.
Code Example
const geometry = new THREE.BoxGeometry( 1, 1, 1 ); const material = new
THREE.MeshBasicMaterial( {color: 0x00ff00} ); const cubeA = new THREE.Mesh(
geometry, material ); cubeA.position.set( 100, 100, 0 ); const cubeB = new
THREE.Mesh( geometry, material ); cubeB.position.set( -100, -100, 0 );
//create a group and add the two cubes //These cubes can now be rotated /
scaled etc as a group const group = new THREE.Group(); group.add( cubeA );
group.add( cubeB ); scene.add( group );
Constructor
Group
function Group( ): void;
Properties
See the base Object3D class for common properties.
isGroup
isGroup: Boolean;
Read-only flag to check if a given object is of type Group.
type
type: String;
A string 'Group'. This should not be changed.
Methods
See the base Object3D class for common methods.