# Class: CubismParallelMotionManager (/jsdoc/pixi-vn-live2d/core/classes/CubismParallelMotionManager)



Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6179

## Extends [#extends]

* `ParallelMotionManager`\<`CubismMotion`, `CubismSpec.Motion`>

## Constructors [#constructors]

### Constructor [#constructor]

\> **new CubismParallelMotionManager**(`parent`): `CubismParallelMotionManager`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6182

#### Parameters [#parameters]

##### parent [#parent]

[`CubismInternalModel`](/jsdoc/pixi-vn-live2d/core/classes/CubismInternalModel)

#### Returns [#returns]

`CubismParallelMotionManager`

#### Overrides [#overrides]

`ParallelMotionManager<CubismMotion, CubismSpec.Motion>.constructor`

## Properties [#properties]

### destroyed [#destroyed]

\> **destroyed**: `boolean`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:776

Flags the instances has been destroyed.

#### Inherited from [#inherited-from]

`ParallelMotionManager.destroyed`

***

### manager [#manager]

\> **manager**: [`MotionManager`](/jsdoc/pixi-vn-live2d/core/classes/MotionManager)

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:760

#### Inherited from [#inherited-from-1]

`ParallelMotionManager.manager`

***

### parent [#parent-1]

\> `readonly` **parent**: [`InternalModel`](/jsdoc/pixi-vn-live2d/core/classes/InternalModel)

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:777

#### Inherited from [#inherited-from-2]

`ParallelMotionManager.parent`

***

### playing [#playing]

\> **playing**: `boolean`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:772

Flags there's a motion playing.

#### Inherited from [#inherited-from-3]

`ParallelMotionManager.playing`

***

### queueManager [#queuemanager]

\> `readonly` **queueManager**: `CubismMotionQueueManager`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6180

***

### settings [#settings]

\> `readonly` **settings**: [`CubismModelSettings`](/jsdoc/pixi-vn-live2d/core/classes/CubismModelSettings)

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6181

The ModelSettings reference.

#### Overrides [#overrides-1]

`ParallelMotionManager.settings`

***

### state [#state]

\> **state**: [`MotionState`](/jsdoc/pixi-vn-live2d/core/classes/MotionState)

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:768

Maintains the state of this MotionManager.

#### Inherited from [#inherited-from-4]

`ParallelMotionManager.state`

***

### tag [#tag]

\> **tag**: `string`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:759

Tag for logging.

#### Inherited from [#inherited-from-5]

`ParallelMotionManager.tag`

***

### prefixed [#prefixed]

\> `static` **prefixed**: `string` | `boolean`

Defined in: node\_modules/eventemitter3/index.d.ts:9

#### Inherited from [#inherited-from-6]

`ParallelMotionManager.prefixed`

## Methods [#methods]

### \_startMotion() [#_startmotion]

\> `protected&#x60; **\_startMotion**(`motion`, `onFinish?`, `ignoreParamIds?`, `loop?`): `number`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6185

Starts the Motion.

#### Parameters [#parameters-1]

##### motion [#motion]

`CubismMotion`

##### onFinish? [#onfinish]

(`motion`) => `void`

##### ignoreParamIds? [#ignoreparamids]

`string`\[]

##### loop? [#loop]

`boolean`

#### Returns [#returns-1]

`number`

#### Overrides [#overrides-2]

`ParallelMotionManager._startMotion`

***

### \_stopAllMotions() [#_stopallmotions]

\> `protected&#x60; **\_stopAllMotions**(): `void`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6186

Stops all playing motions.

#### Returns [#returns-2]

`void`

#### Overrides [#overrides-3]

`ParallelMotionManager._stopAllMotions`

***

### addListener() [#addlistener]

\> **addListener**\<`T`>(`event`, `fn`, `context?`): `this`

Defined in: node\_modules/eventemitter3/index.d.ts:45

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

##### T [#t]

`T` *extends* `string` | `symbol`

#### Parameters [#parameters-2]

##### event [#event]

`T`

##### fn [#fn]

(...`args`) => `void`

##### context? [#context]

`any`

#### Returns [#returns-3]

`this`

#### Inherited from [#inherited-from-7]

`ParallelMotionManager.addListener`

***

### destroy() [#destroy]

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

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6189

Destroys the instance.

#### Returns [#returns-4]

`void`

#### Emits [#emits]

[MotionManagerEvents.destroy](/jsdoc/pixi-vn-live2d/core/interfaces/MotionManagerEvents#destroy)

#### Overrides [#overrides-4]

`ParallelMotionManager.destroy`

***

### emit() [#emit]

\> **emit**\<`T`>(`event`, ...`args`): `boolean`

Defined in: node\_modules/eventemitter3/index.d.ts:32

Calls each of the listeners registered for a given event.

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

##### T [#t-1]

`T` *extends* `string` | `symbol`

#### Parameters [#parameters-3]

##### event [#event-1]

`T`

##### args [#args]

...`any`\[]

#### Returns [#returns-5]

`boolean`

#### Inherited from [#inherited-from-8]

`ParallelMotionManager.emit`

***

### eventNames() [#eventnames]

\> **eventNames**(): (`string` | `symbol`)\[]

Defined in: node\_modules/eventemitter3/index.d.ts:15

Return an array listing the events for which the emitter has registered
listeners.

#### Returns [#returns-6]

(`string` | `symbol`)\[]

#### Inherited from [#inherited-from-9]

`ParallelMotionManager.eventNames`

***

### getMotionName() [#getmotionname]

\> `protected` **getMotionName**(`definition`): `string`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6188

Retrieves the motion's name by its definition.

#### Parameters [#parameters-4]

##### definition [#definition]

`Motion`

#### Returns [#returns-7]

`string`

The motion's name.

#### Overrides [#overrides-5]

`ParallelMotionManager.getMotionName`

***

### init() [#init]

\> `protected` **init**(): `void`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6183

#### Returns [#returns-8]

`void`

***

### isFinished() [#isfinished]

\> **isFinished**(): `boolean`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6184

Checks if the motion playback has finished.

#### Returns [#returns-9]

`boolean`

#### Overrides [#overrides-6]

`ParallelMotionManager.isFinished`

***

### listenerCount() [#listenercount]

\> **listenerCount**(`event`): `number`

Defined in: node\_modules/eventemitter3/index.d.ts:27

Return the number of listeners listening to a given event.

#### Parameters [#parameters-5]

##### event [#event-2]

`string` | `symbol`

#### Returns [#returns-10]

`number`

#### Inherited from [#inherited-from-10]

`ParallelMotionManager.listenerCount`

***

### listeners() [#listeners]

\> **listeners**\<`T`>(`event`): (...`args`) => `void`\[]

Defined in: node\_modules/eventemitter3/index.d.ts:20

Return the listeners registered for a given event.

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

##### T [#t-2]

`T` *extends* `string` | `symbol`

#### Parameters [#parameters-6]

##### event [#event-3]

`T`

#### Returns [#returns-11]

(...`args`) => `void`\[]

#### Inherited from [#inherited-from-11]

`ParallelMotionManager.listeners`

***

### off() [#off]

\> **off**\<`T`>(`event`, `fn?`, `context?`, `once?`): `this`

Defined in: node\_modules/eventemitter3/index.d.ts:69

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

##### T [#t-3]

`T` *extends* `string` | `symbol`

#### Parameters [#parameters-7]

##### event [#event-4]

`T`

##### fn? [#fn-1]

(...`args`) => `void`

##### context? [#context-1]

`any`

##### once? [#once]

`boolean`

#### Returns [#returns-12]

`this`

#### Inherited from [#inherited-from-12]

`ParallelMotionManager.off`

***

### on() [#on]

\> **on**\<`T`>(`event`, `fn`, `context?`): `this`

Defined in: node\_modules/eventemitter3/index.d.ts:40

Add a listener for a given event.

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

##### T [#t-4]

`T` *extends* `string` | `symbol`

#### Parameters [#parameters-8]

##### event [#event-5]

`T`

##### fn [#fn-2]

(...`args`) => `void`

##### context? [#context-2]

`any`

#### Returns [#returns-13]

`this`

#### Inherited from [#inherited-from-13]

`ParallelMotionManager.on`

***

### once() [#once-1]

\> **once**\<`T`>(`event`, `fn`, `context?`): `this`

Defined in: node\_modules/eventemitter3/index.d.ts:54

Add a one-time listener for a given event.

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

##### T [#t-5]

`T` *extends* `string` | `symbol`

#### Parameters [#parameters-9]

##### event [#event-6]

`T`

##### fn [#fn-3]

(...`args`) => `void`

##### context? [#context-3]

`any`

#### Returns [#returns-14]

`this`

#### Inherited from [#inherited-from-14]

`ParallelMotionManager.once`

***

### playMotionLastFrame() [#playmotionlastframe]

\> **playMotionLastFrame**(`group`, `index`): `Promise`\<`boolean`>

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6190

#### Parameters [#parameters-10]

##### group [#group]

`string`

##### index [#index]

`number`

#### Returns [#returns-15]

`Promise`\<`boolean`>

#### Overrides [#overrides-7]

`ParallelMotionManager.playMotionLastFrame`

***

### removeAllListeners() [#removealllisteners]

\> **removeAllListeners**(`event?`): `this`

Defined in: node\_modules/eventemitter3/index.d.ts:79

Remove all listeners, or those of the specified event.

#### Parameters [#parameters-11]

##### event? [#event-7]

`string` | `symbol`

#### Returns [#returns-16]

`this`

#### Inherited from [#inherited-from-15]

`ParallelMotionManager.removeAllListeners`

***

### removeListener() [#removelistener]

\> **removeListener**\<`T`>(`event`, `fn?`, `context?`, `once?`): `this`

Defined in: node\_modules/eventemitter3/index.d.ts:63

Remove the listeners of a given event.

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

##### T [#t-6]

`T` *extends* `string` | `symbol`

#### Parameters [#parameters-12]

##### event [#event-8]

`T`

##### fn? [#fn-4]

(...`args`) => `void`

##### context? [#context-4]

`any`

##### once? [#once-2]

`boolean`

#### Returns [#returns-17]

`this`

#### Inherited from [#inherited-from-16]

`ParallelMotionManager.removeListener`

***

### startMotion() [#startmotion]

\> **startMotion**(`group`, `index`, `priority?`, `options?`): `Promise`\<`boolean`>

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:788

Starts a motion as given priority.

#### Parameters [#parameters-13]

##### group [#group-1]

`string`

The motion group.

##### index [#index-1]

`number`

Index in the motion group.

##### priority? [#priority]

[`MotionPriority`](/jsdoc/pixi-vn-live2d/core/enumerations/MotionPriority)

The priority to be applied. default: 2 (NORMAL)

##### options? [#options]

`string`\[] | [`ParallelMotionStartOptions`](/jsdoc/pixi-vn-live2d/core/interfaces/ParallelMotionStartOptions)

#### Returns [#returns-18]

`Promise`\<`boolean`>

Promise that resolves with true if the motion is successfully started, with false otherwise.

#### Inherited from [#inherited-from-17]

`ParallelMotionManager.startMotion`

***

### startRandomMotion() [#startrandommotion]

\> **startRandomMotion**(`group`, `priority?`, `loop?`): `Promise`\<`boolean`>

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:796

Starts a random Motion as given priority.

#### Parameters [#parameters-14]

##### group [#group-2]

`string`

The motion group.

##### priority? [#priority-1]

[`MotionPriority`](/jsdoc/pixi-vn-live2d/core/enumerations/MotionPriority)

The priority to be applied. (default: 1 `IDLE`)

##### loop? [#loop-1]

[`ParallelMotionStartRandomOptions`](/jsdoc/pixi-vn-live2d/core/type-aliases/ParallelMotionStartRandomOptions)

Whether the motion should loop. Overrides Cubism 3/4/5 motion JSON loop metadata when specified.

#### Returns [#returns-19]

`Promise`\<`boolean`>

Promise that resolves with true if the motion is successfully started, with false otherwise.

#### Inherited from [#inherited-from-18]

`ParallelMotionManager.startRandomMotion`

***

### stopAllMotions() [#stopallmotions]

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

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:800

Stops all playing motions as well as the sound.

#### Returns [#returns-20]

`void`

#### Inherited from [#inherited-from-19]

`ParallelMotionManager.stopAllMotions`

***

### update() [#update]

\> **update**(`model`, `now`): `boolean`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:807

Updates parameters of the core model.

#### Parameters [#parameters-15]

##### model [#model]

`object`

The core model.

##### now [#now]

`number`

Current time in milliseconds.

#### Returns [#returns-21]

`boolean`

True if the parameters have been actually updated.

#### Inherited from [#inherited-from-20]

`ParallelMotionManager.update`

***

### updateParameters() [#updateparameters]

\> `protected` **updateParameters**(`model`, `now`): `boolean`

Defined in: node\_modules/untitled-pixi-live2d-engine/types/index.d.ts:6187

Updates parameters of the core model.

#### Parameters [#parameters-16]

##### model [#model-1]

`CubismModel`

The core model.

##### now [#now-1]

`number`

Current time in milliseconds.

#### Returns [#returns-22]

`boolean`

True if the parameters have been actually updated.

#### Overrides [#overrides-8]

`ParallelMotionManager.updateParameters`
