# BatchTable

class in `3d-tiles-renderer/core`, extends `FeatureTable`

```js
import { BatchTable } from '3d-tiles-renderer/core';
```

Extends FeatureTable to provide indexed access to per-feature batch properties,
as found in B3DM and PNTS tiles.

## Constructor

```js
new BatchTable( buffer: ArrayBuffer, count: number, start: number, headerLength: number, binLength: number )
```

- `buffer`, `ArrayBuffer`
- `count`, `number`: Number of features in the batch
- `start`, `number`: Byte offset of the batch table within the buffer
- `headerLength`, `number`: Byte length of the JSON header
- `binLength`, `number`: Byte length of the binary body

## Properties

### .count: number

Total number of features in the batch.

### .extensions: Object

Parsed extension objects keyed by extension name.

## Methods

### .getDataFromId

```js
.getDataFromId( id: number, target?: Object ): Object
```

Returns an object with all properties of the batch table and its extensions for the
given feature id. A `target` object can be specified to store the result. Throws if
`id` is out of bounds.

- `id`, `number`: Feature index (0 to count - 1)
- `target`, `Object`, optional, default `{}`: Optional object to write properties into

### .getPropertyArray

```js
.getPropertyArray( key: string ): Array | TypedArray | null
```

Returns the array of values for the given property key across all features. Returns
`null` if the key is not in the table.

- `key`, `string`
