# ControllerModel

class in `gamepad-manager/three`, extends `Group`

```js
import { ControllerModel } from 'gamepad-manager/three';
```

Base class for the 3D controller models.

## Constructor

```js
new ControllerModel( url: string | URL )
```

- `url`, `string | URL`: The model file.

## Properties

### .loaded: Promise<void>

Resolves once the model has loaded.

## Methods

### .setButton

```js
.setButton( name: string, value: number )
```

Shows a button pressed, from 0 to 1.

- `name`, `string`
- `value`, `number`

### .setAxis

```js
.setAxis( name: string, value: number )
```

Shows a stick axis pushed, from -1 to 1.

- `name`, `string`
- `value`, `number`

### .setFromController

```js
.setFromController( controller: Controller )
```

Shows a controller's current state.

- `controller`, `Controller`

### .getTilt

```js
.getTilt( target: Vector3 ): Vector3
```

Gets the turning force the current presses apply to the controller, for tilting it slightly.

- `target`, `Vector3`

### .dispose

```js
.dispose(  )
```

Frees the model's geometry, materials and textures.
