# AnimClipElement

Class · extends [`AsyncElement`](https://api.playcanvas.com/web-components/classes/AsyncElement.md) · category: Components

Source: https://github.com/playcanvas/web-components/blob/252f001881302c266c8d727044408c32be2bb5e7/src/components/anim-clip.ts#L32

The AnimClipElement interface provides properties and methods for manipulating
[`<pc-anim-clip>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-anim-clip/)
elements. The AnimClipElement interface also inherits the properties and methods of the
[HTMLElement](https://developer.mozilla.org/docs/Web/API/HTMLElement) interface.

A clip declares one named animation on its parent `<pc-anim>`. `name` is both the clip's name
and the track looked up in the clip's source: an explicit `asset` (a `container`, an
`animation` `.glb`, or an `animclip` JSON), or, without one, the container of the `<pc-model>`
enclosing the parent `<pc-anim>`. A source holding a single track supplies it whatever it is
named; in a multi-track source the track named `name` is chosen, falling back to the first
with a warning. The element becomes ready once its resolved track is assigned.

**elementSummary** The `<pc-anim-clip>` element declares one named animation clip on its parent
`<pc-anim>`, taken from the `asset` it names or, without one, from the enclosing `<pc-model>`'s
own animations. Must be a direct child of `<pc-anim>`.

## Accessors

### asset

```ts
get asset(): string
set asset(value: string)
```

Gets the id of the `pc-asset` supplying the clip's track.

### loop

```ts
get loop(): boolean
set loop(value: boolean)
```

Gets whether the clip loops.

### name

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

Gets the name of the clip.

### speed

```ts
get speed(): number
set speed(value: number)
```

Gets the playback speed of the clip.

## Inherited from [AsyncElement](https://api.playcanvas.com/web-components/classes/AsyncElement.md)

- `get closestApp(): AppElement | null`
- `get closestEntity(): EntityBaseElement | null`
- `protected _onReady(): void`
- `protected _resetReady(): void`
- `ready(): Promise<AnimClipElement>`
