# MorphTarget

Class · category: Graphics

Source: https://github.com/playcanvas/engine/blob/f059dc005842f76e052cdf44d8370c8c7ec475ac/src/scene/morph-target.js#L11

A Morph Target (also known as Blend Shape) contains deformation data to apply to existing mesh.
Multiple morph targets can be blended together on a mesh. This is useful for effects that are
hard to achieve with conventional animation and skinning.

## Constructors

### constructor

```ts
new MorphTarget(options: object, ...args: any[])
```

Create a new MorphTarget instance.

**Parameters**

- `options` (`object`): Object for passing optional arguments.
    - `options.aabb` ([`BoundingBox`](https://api.playcanvas.com/engine/classes/BoundingBox.md), optional): Bounding box. Will be automatically generated, if
      undefined.
    - `options.defaultWeight` (`number`, optional): Default blend weight to use for this morph target.
    - `options.deltaNormals` (`ArrayLike<number>`, optional): An array of 3-dimensional vertex normal
      offsets.
    - `options.deltaPositions` (`ArrayLike<number>`): An array of 3-dimensional vertex position
      offsets.
    - `options.name` (`string`, optional): Name.
    - `options.preserveData` (`boolean`, optional): When true, the morph target keeps its data passed using the options,
      allowing the clone operation.
- `args` (`any[]`)

## Properties

### used

```ts
used: boolean = false
```

A used flag. A morph target can be used / owned by the Morph class only one time.

## Accessors

### defaultWeight

```ts
get defaultWeight(): number
```

Gets the default weight of the morph target.

### name

```ts
get name(): string
```

Gets the name of the morph target.

## Methods

### clone

```ts
clone(): MorphTarget
```

Returns an identical copy of the specified morph target. This can only be used if the morph target
was created with options.preserveData set to true.

**Returns** [`MorphTarget`](https://api.playcanvas.com/engine/classes/MorphTarget.md): A morph target instance containing the result of the cloning.
