# AnimBlendTree1D

Class · extends [`AnimBlendTree`](https://api.playcanvas.com/engine/classes/AnimBlendTree.md) · category: Animation

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/framework/anim/controller/anim-blend-tree-1d.js#L19

An AnimBlendTree that calculates its weights using the 1D algorithm from chapter 6 of
[Rune Skovbo Johansen's thesis](https://runevision.com/thesis/rune_skovbo_johansen_thesis.pdf).

The children sit at points along a single parameter, and the two whose points bracket the
current value share the weight between them. This is the tree for one-dimensional blends such
as idle, walk and run driven by a speed parameter.

## Constructors

### constructor

```ts
new AnimBlendTree1D(state: AnimState, parent: AnimBlendTree | null, name: string, point: number | Vec2, parameters: string[], children: any[], syncAnimations: boolean, createTree: Function, findParameter: Function)
```

Create a new BlendTree1D instance.

**Parameters**

- `state` ([`AnimState`](https://api.playcanvas.com/engine/classes/AnimState.md)): The AnimState that this AnimBlendTree belongs to.
- `parent` ([`AnimBlendTree`](https://api.playcanvas.com/engine/classes/AnimBlendTree.md) `| null`): The parent of the AnimBlendTree. If not null, the
  AnimNode is stored as part of a [AnimBlendTree](https://api.playcanvas.com/engine/classes/AnimBlendTree.md) hierarchy.
- `name` (`string`): The name of the BlendTree. Used when assigning an [AnimTrack](https://api.playcanvas.com/engine/classes/AnimTrack.md)
  to its children.
- `point` (`number |` [`Vec2`](https://api.playcanvas.com/engine/classes/Vec2.md)): The coordinate/vector that's used to determine the weight of
  this node when it's part of an [AnimBlendTree](https://api.playcanvas.com/engine/classes/AnimBlendTree.md).
- `parameters` (`string[]`): The anim component parameters which are used to calculate the
  current weights of the blend trees children.
- `children` (`any[]`): The child nodes that this blend tree should create. Can either
  be of type [AnimNode](https://api.playcanvas.com/engine/classes/AnimNode.md) or [AnimBlendTree](https://api.playcanvas.com/engine/classes/AnimBlendTree.md).
- `syncAnimations` (`boolean`): If true, the speed of each blended animation will be
  synchronized.
- `createTree` (`Function`): Used to create child blend trees of varying types.
- `findParameter` (`Function`): Used at runtime to get the current parameter values.
