# BatchGroup

Class · category: Graphics

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/scene/batching/batch-group.js#L8

Holds mesh batching settings and a unique id. Created via [BatchManager#addGroup](https://api.playcanvas.com/engine/classes/BatchManager.md#addgroup).

## Constructors

### constructor

```ts
new BatchGroup(id: number, name: string, dynamic: boolean, maxAabbSize: number, layers?: number[])
```

Create a new BatchGroup instance.

**Parameters**

- `id` (`number`): Unique id. Can be assigned to model, render and element components.
- `name` (`string`): The name of the group.
- `dynamic` (`boolean`): Whether objects within this batch group should support
  transforming at runtime.
- `maxAabbSize` (`number`): Maximum size of any dimension of a bounding box around batched
  objects. [BatchManager#prepare](https://api.playcanvas.com/engine/classes/BatchManager.md#prepare) will split objects into local groups based on this
  size.
- `layers` (`number[]`, optional): Layer ID array. Default is [[LAYERID_WORLD](https://api.playcanvas.com/engine/variables/LAYERID_WORLD.md)]. The whole
  batch group will belong to these layers. Layers of source models will be ignored.

## Properties

### dynamic

```ts
dynamic: boolean
```

Whether objects within this batch group should support transforming at runtime.

### id

```ts
id: number
```

Unique id. Can be assigned to model, render and element components.

### layers

```ts
layers: number[]
```

Layer ID array. Default is [[LAYERID_WORLD](https://api.playcanvas.com/engine/variables/LAYERID_WORLD.md)]. The whole batch group will belong to
these layers. Layers of source models will be ignored.

### maxAabbSize

```ts
maxAabbSize: number
```

Maximum size of any dimension of a bounding box around batched objects.
[BatchManager#prepare](https://api.playcanvas.com/engine/classes/BatchManager.md#prepare) will split objects into local groups based on this size.

### name

```ts
name: string
```

Name of the group.
