# Interface: CanvasTickersInterface (deprecated) (/pixi-vn/index/interfaces/CanvasTickersInterface)



Defined in: [src/tickers/interfaces/TickersInterface.ts:6](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L6)

## Deprecated [#deprecated]

Use `TickersInterface` from `@drincs/pixi-vn` instead.

## Properties [#properties]

### ~~currentTickers~~ [#currenttickers]

\> `readonly` **currentTickers**: `Map`\<`string`, [`TickerInfo`](/pixi-vn/index/interfaces/TickerInfo)\<`any`>>

Defined in: [src/tickers/interfaces/TickersInterface.ts:17](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L17)

Currently tickers that are running.

***

### ~~currentTickersSteps~~ [#currenttickerssteps]

\> `readonly` **currentTickersSteps**: `Map`\<`string`, `Map`\<`string`, [`TickersSequence`](/pixi-vn/index/interfaces/TickersSequence)>>

Defined in: [src/tickers/interfaces/TickersInterface.ts:21](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L21)

The steps of the tickers

## Methods [#methods]

### ~~add()~~ [#add]

\> **add**\<`TArgs`>(`canvasElementAlias`, `ticker`): `string` | `undefined`

Defined in: [src/tickers/interfaces/TickersInterface.ts:41](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L41)

Run a ticker. You can run multiple add with the same alias and different tickerClasses.
If you run a ticker with the same alias and tickerClass, the old ticker will be removed.
If already exists a sequence of tickers with the same alias, it will be removed.

#### Type Parameters [#type-parameters]

##### TArgs [#targs]

`TArgs` *extends* [`TickerArgs`](/pixi-vn/index/interfaces/TickerArgs)

#### Parameters [#parameters]

##### canvasElementAlias [#canvaselementalias]

`string` | `string`\[]

The alias of the canvas element that will use the ticker.

##### ticker [#ticker]

[`Ticker`](/pixi-vn/index/interfaces/Ticker)\<`TArgs`>

The ticker class to be run.

#### Returns [#returns]

`string` | `undefined`

The id of the ticker that was added.

#### Example [#example]

```ts
tickers.add("alien", new RotateTicker({ speed: 0.2 }))
```

***

### ~~addSequence()~~ [#addsequence]

\> **addSequence**(`alias`, `steps`, `currentStepNumber?`): `string` | `undefined`

Defined in: [src/tickers/interfaces/TickersInterface.ts:60](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L60)

Run a sequence of tickers.

#### Parameters [#parameters-1]

##### alias [#alias]

`string`

The alias of canvas element that will use the tickers.

##### steps [#steps]

[`Ticker`](/pixi-vn/index/interfaces/Ticker)\<`any`>\[]

The steps of the tickers.

##### currentStepNumber? [#currentstepnumber]

`number`

The current step number. It is used to continue the sequence of tickers.

#### Returns [#returns-1]

`string` | `undefined`

The id of tickers.

#### Example [#example-1]

```ts
tickers.addSequence("alien", [
    new RotateTicker({ speed: 0.1, clockwise: true }, 2), // runs for 2 seconds
    new RotateTicker({ speed: 0.2, clockwise: false }, 2),
])
```

#### Deprecated [#deprecated-1]

***

### ~~completeOnStepEnd()~~ [#completeonstepend]

\> **completeOnStepEnd**(`step`): `void`

Defined in: [src/tickers/interfaces/TickersInterface.ts:142](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L142)

Add a ticker that must be completed before the next step.
This method is used for example into a transition between scenes.

#### Parameters [#parameters-2]

##### step [#step]

The step that the ticker must be completed before the next step.

###### alias? [#alias-1]

`string`

If is a sequence of tickers, the alias of the sequence of tickers.

###### id [#id]

`string`

The id of the step.

#### Returns [#returns-2]

`void`

***

### ~~find()~~ [#find]

\> **find**\<`TArgs`>(`tickerId`, `args?`): [`Ticker`](/pixi-vn/index/interfaces/Ticker)\<`TArgs`> | `undefined`

Defined in: [src/tickers/interfaces/TickersInterface.ts:28](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L28)

Find a ticker by its id.

#### Type Parameters [#type-parameters-1]

##### TArgs [#targs-1]

`TArgs` *extends* [`TickerArgs`](/pixi-vn/index/interfaces/TickerArgs)

#### Parameters [#parameters-3]

##### tickerId [#tickerid]

`string`

The id of the ticker to be found.

##### args? [#args]

`TArgs`

The args of the ticker.

#### Returns [#returns-3]

[`Ticker`](/pixi-vn/index/interfaces/Ticker)\<`TArgs`> | `undefined`

The ticker if found, undefined otherwise.

***

### ~~forceCompletion()~~ [#forcecompletion]

\> **forceCompletion**(`id`, `alias?`): `Promise`\<`void`>

Defined in: [src/tickers/interfaces/TickersInterface.ts:158](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L158)

This method force the completion of the tickers that are running.
This funcions is called in the next step.

#### Parameters [#parameters-4]

##### id [#id-1]

`string`

The id of the ticker. If the alias provided, the id is the id of the sequence of tickers.

##### alias? [#alias-2]

`string`

The alias of the sequence of tickers.

#### Returns [#returns-4]

`Promise`\<`void`>

***

### ~~isPaused()~~ [#ispaused]

\> **isPaused**(`alias`, `tickerId?`): `boolean`

Defined in: [src/tickers/interfaces/TickersInterface.ts:136](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L136)

Check if a ticker is paused.

#### Parameters [#parameters-5]

##### alias [#alias-3]

`string`

The alias of the canvas element that will use the ticker.

##### tickerId? [#tickerid-1]

`string`

The ticker that will be checked.

#### Returns [#returns-5]

`boolean`

If the ticker is paused.

***

### ~~onComplete()~~ [#oncomplete]

\> **onComplete**(`tickerId`, `options`): `void`

Defined in: [src/tickers/interfaces/TickersInterface.ts:159](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L159)

#### Parameters [#parameters-6]

##### tickerId [#tickerid-2]

`string`

##### options [#options]

###### aliasToRemoveAfter [#aliastoremoveafter]

`string`\[]

###### ignoreTickerSteps? [#ignoretickersteps]

`boolean`

###### stopTicker? [#stopticker]

`boolean`

###### tickerAliasToResume [#tickeraliastoresume]

`string`\[]

###### tickerIdToResume [#tickeridtoresume]

`string`\[]

#### Returns [#returns-6]

`void`

***

### ~~pause()~~ [#pause]

\> **pause**(`filters`): `string`\[]

Defined in: [src/tickers/interfaces/TickersInterface.ts:90](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L90)

Pause a ticker. If a paused ticker have a time to be removed, it will be removed after the time.

#### Parameters [#parameters-7]

##### filters [#filters]

\{ `canvasAlias`: `string`; `tickerIdsExcluded?`: `string`\[]; } | \{ `id`: `string` | `string`\[]; }

The filters to pause the ticker.

###### Type Literal [#type-literal]

\{ `canvasAlias`: `string`; `tickerIdsExcluded?`: `string`\[]; }

The filters to pause the ticker.

###### canvasAlias [#canvasalias]

`string`

The alias of the canvas element that will use the ticker.
Will pause all tickers that are connected to this canvas element.

###### tickerIdsExcluded? [#tickeridsexcluded]

`string`\[]

Ticker ids excluded from the pause. If not provided, all tickers will be paused.

***

###### Type Literal [#type-literal-1]

\{ `id`: `string` | `string`\[]; }

The filters to pause the ticker.

###### id [#id-2]

`string` | `string`\[]

The id of the ticker to be paused. If provided, only this ticker will be paused.

#### Returns [#returns-7]

`string`\[]

The ids of the paused tickers.

***

### ~~remove()~~ [#remove]

\> **remove**(`tickerId`): `void`

Defined in: [src/tickers/interfaces/TickersInterface.ts:84](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L84)

Remove a ticker by the id.

#### Parameters [#parameters-8]

##### tickerId [#tickerid-3]

`string` | `string`\[]

The id or an array of ids of the ticker to be removed.

#### Returns [#returns-8]

`void`

***

### ~~removeAll()~~ [#removeall]

\> **removeAll**(): `void`

Defined in: [src/tickers/interfaces/TickersInterface.ts:79](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L79)

Remove all tickers from the canvas.

#### Returns [#returns-9]

`void`

***

### ~~resume()~~ [#resume]

\> **resume**(`filters`): `void`

Defined in: [src/tickers/interfaces/TickersInterface.ts:114](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L114)

Resume a ticker.

#### Parameters [#parameters-9]

##### filters [#filters-1]

\{ `canvasAlias`: `string`; } | \{ `id`: `string` | `string`\[]; }

The filters to resume the ticker.

###### Type Literal [#type-literal-2]

\{ `canvasAlias`: `string`; }

The filters to resume the ticker.

###### canvasAlias [#canvasalias-1]

`string`

The alias of the canvas element that will use the ticker.
Will resume all tickers that are connected to this canvas element.

***

###### Type Literal [#type-literal-3]

\{ `id`: `string` | `string`\[]; }

The filters to resume the ticker.

###### id [#id-3]

`string` | `string`\[]

The id of the ticker to be resumed. If provided, only this ticker will be resumed.

#### Returns [#returns-10]

`void`

***

### ~~transfer()~~ [#transfer]

\> **transfer**(`oldAlias`, `newAlias`, `mode?`): `void`

Defined in: [src/tickers/interfaces/TickersInterface.ts:13](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L13)

Transfer the tickers from an old alias to a new alias.

#### Parameters [#parameters-10]

##### oldAlias [#oldalias]

`string`

Old alias

##### newAlias [#newalias]

`string`

New alias

##### mode? [#mode]

`"move"` | `"duplicate"`

If "move", the old alias will be removed from the ticker. If "duplicate", the old alias will be kept in the ticker.

#### Returns [#returns-11]

`void`

***

### ~~unlinkComponent()~~ [#unlinkcomponent]

\> **unlinkComponent**(`alias`, `ticker?`): `void`

Defined in: [src/tickers/interfaces/TickersInterface.ts:75](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/tickers/interfaces/TickersInterface.ts#L75)

Remove a connection between a canvas element and a ticker.
And remove the ticker if there is no canvas element connected to it.

#### Parameters [#parameters-11]

##### alias [#alias-4]

`string` | `string`\[]

The alias of the canvas element that will use the ticker.

##### ticker? [#ticker-1]

`string` | (() => [`Ticker`](/pixi-vn/index/interfaces/Ticker)\<`any`>)

The ticker class to be removed.

#### Returns [#returns-12]

`void`

#### Example [#example-2]

```ts
tickers.unlinkComponent("alien", RotateTicker)
```
