# FeatureTable

class in `3d-tiles-renderer/core`

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

Parses a 3D Tiles feature table from a binary buffer, providing access to
per-feature properties stored as JSON scalars or typed binary arrays.

## Constructor

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

- `buffer`, `ArrayBuffer`
- `start`, `number`: Byte offset of the feature table within the buffer
- `headerLength`, `number`: Byte length of the JSON header
- `binLength`, `number`: Byte length of the binary body

## Properties

### .buffer: ArrayBuffer

The underlying buffer containing the feature table data.

### .binOffset: number

Byte offset of the binary body within the buffer.

### .binLength: number

Byte length of the binary body.

### .header: Object

Parsed JSON header object.

## Methods

### .getKeys

```js
.getKeys(  ): Array<string>
```

Returns all property key names defined in the feature table header, excluding `extensions`.

### .getData

```js
.getData( key: string, count: number, defaultComponentType?: string | null, defaultType?: string | null ): number | string | ArrayBufferView | null
```

Returns the value for the given property key. For binary properties, reads typed array data
from the binary body using the provided count, component type, and vector type.

- `key`, `string`
- `count`, `number`: Number of elements to read for binary properties
- `defaultComponentType`, `string | null`, optional, default `null`: Fallback component type (e.g. `'FLOAT'`, `'UNSIGNED_SHORT'`)
- `defaultType`, `string | null`, optional, default `null`: Fallback vector type (e.g. `'SCALAR'`, `'VEC3'`)

### .getBuffer

```js
.getBuffer( byteOffset: number, byteLength: number ): ArrayBuffer
```

Returns a slice of the binary body at the given offset and length.

- `byteOffset`, `number`
- `byteLength`, `number`
