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



Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5030

Handles the motion playback for Live2D models.
Responsible for loading, playing, and managing motion states and audio.

## Emits [#emits]

[MotionManagerEvents](/pixi-vn-live2d/core/interfaces/MotionManagerEvents)

## Extends [#extends]

* [`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager)\<`Live2DMotion`, [`Motion`](/pixi-vn-live2d/core/namespaces/Cubism2Spec/interfaces/Motion)>

## Constructors [#constructors]

### Constructor [#constructor]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5040

#### Parameters [#parameters]

##### parent [#parent]

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

#### Returns [#returns]

`CubismLegacyMotionManager`

#### Overrides [#overrides]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`constructor`](/pixi-vn-live2d/core/classes/MotionManager#constructor)

## Properties [#properties]

### currentAnalyzer? [#currentanalyzer]

\> `optional` **currentAnalyzer?**: `AnalyserNode`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3434

Analyzer element for the current sound being played.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`currentAnalyzer`](/pixi-vn-live2d/core/classes/MotionManager#currentanalyzer)

***

### currentAudio? [#currentaudio]

\> `optional` **currentAudio?**: `Sound`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3429

Audio element of the current motion if a sound file is defined with it.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`currentAudio`](/pixi-vn-live2d/core/classes/MotionManager#currentaudio)

***

### currentContext? [#currentcontext]

\> `optional` **currentContext?**: `AudioContext`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3439

Context element for the current sound being played.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`currentContext`](/pixi-vn-live2d/core/classes/MotionManager#currentcontext)

***

### definitions [#definitions]

\> `abstract` `readonly` **definitions**: `Partial`\<`Record`\<`string`, [`Motion`](/pixi-vn-live2d/core/namespaces/Cubism2Spec/interfaces/Motion)\[]>>

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5031

Motion definitions copied from ModelSettings.

#### Overrides [#overrides-1]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`definitions`](/pixi-vn-live2d/core/classes/MotionManager#definitions)

***

### destroyed [#destroyed]

\> **destroyed**: `boolean`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3449

Flags whether the instance has been destroyed.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`destroyed`](/pixi-vn-live2d/core/classes/MotionManager#destroyed)

***

### expressionManager? [#expressionmanager]

\> `abstract` `optional` **expressionManager?**: [`CubismLegacyExpressionManager`](/pixi-vn-live2d/core/classes/CubismLegacyExpressionManager)

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5039

Expression manager for handling model expressions.
Can be undefined if the settings define no expression.

#### Overrides [#overrides-2]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`expressionManager`](/pixi-vn-live2d/core/classes/MotionManager#expressionmanager)

***

### groups [#groups]

\> `abstract` `readonly` **groups**: `object`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5032

Motion groups with specific internal usages. Includes at least the 'idle' field.

#### idle [#idle]

\> `readonly` **idle**: `"idle"`

#### Overrides [#overrides-3]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`groups`](/pixi-vn-live2d/core/classes/MotionManager#groups)

***

### lipSyncIds [#lipsyncids]

\> `readonly` **lipSyncIds**: `string`\[]

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5037

***

### motionDataType [#motiondatatype]

\> `abstract` `readonly` **motionDataType**: `"arraybuffer"` = `"arraybuffer"`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5035

Indicates the content type of the motion files, varies in different Cubism versions.
Used as `xhr.responseType`.

#### Overrides [#overrides-4]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`motionDataType`](/pixi-vn-live2d/core/classes/MotionManager#motiondatatype)

***

### motionGroups [#motiongroups]

\> **motionGroups**: `Partial`\<`Record`\<`string`, (`Motion` | `undefined` | `null`)\[]>>

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3419

The Motions. The structure is the same as [definitions](#definitions), initially each group contains
an empty array, which means all motions will be `undefined`. When a Motion has been loaded,
it'll fill the place in which it should be; when it fails to load, the place will be filled
with `null`.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`motionGroups`](/pixi-vn-live2d/core/classes/MotionManager#motiongroups)

***

### parent [#parent-1]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3454

Reference to the parent InternalModel.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`parent`](/pixi-vn-live2d/core/classes/MotionManager#parent)

***

### playing [#playing]

\> **playing**: `boolean`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3444

Flags whether there is a motion currently playing.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`playing`](/pixi-vn-live2d/core/classes/MotionManager#playing)

***

### queueManager [#queuemanager]

\> `readonly` **queueManager**: `MotionQueueManager`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5036

***

### settings [#settings]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5038

The ModelSettings reference.

#### Overrides [#overrides-5]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`settings`](/pixi-vn-live2d/core/classes/MotionManager#settings)

***

### state [#state]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3424

Maintains the state of this MotionManager.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`state`](/pixi-vn-live2d/core/classes/MotionManager#state)

***

### tag [#tag]

\> **tag**: `string`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3378

Tag for logging.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`tag`](/pixi-vn-live2d/core/classes/MotionManager#tag)

***

### prefixed [#prefixed]

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

Defined in: node_modules/eventemitter3/index.d.ts:9

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`prefixed`](/pixi-vn-live2d/core/classes/MotionManager#prefixed)

## Methods [#methods]

### \_startMotion() [#_startmotion]

\> `abstract` `protected` **\_startMotion**(`motion`, `onFinish?`, `ignoreParamIds?`, `_loop?`): `number`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5047

Starts the Motion.

#### Parameters [#parameters-1]

##### motion [#motion]

`Live2DMotion`

The Motion to start.

##### onFinish? [#onfinish]

(`motion`) => `void`

Optional callback when finished.

##### ignoreParamIds? [#ignoreparamids]

`string`\[]

The ids to be ignored.

##### \_loop? [#_loop]

`boolean`

#### Returns [#returns-1]

`number`

An ID or token for the motion.

#### Overrides [#overrides-6]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`_startMotion`](/pixi-vn-live2d/core/classes/MotionManager#_startmotion)

***

### \_stopAllMotions() [#_stopallmotions]

\> `abstract` `protected` **\_stopAllMotions**(): `void`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5048

Stops all playing motions.

#### Returns [#returns-2]

`void`

#### Overrides [#overrides-7]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`_stopAllMotions`](/pixi-vn-live2d/core/classes/MotionManager#_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-10]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`addListener`](/pixi-vn-live2d/core/classes/MotionManager#addlistener)

***

### createMotion() [#createmotion]

\> `abstract` **createMotion**(`data`, `group`, `definition`): `Live2DMotion`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5043

Creates a Motion from the data.

#### Parameters [#parameters-3]

##### data [#data]

`ArrayBuffer`

Content of the motion file. The format must be consistent with [MotionManager#motionDataType](/pixi-vn-live2d/core/classes/MotionManager#motiondatatype).

##### group [#group]

`string`

The motion group.

##### definition [#definition]

[`Motion`](/pixi-vn-live2d/core/namespaces/Cubism2Spec/interfaces/Motion)

The motion definition.

#### Returns [#returns-4]

`Live2DMotion`

The created Motion.

#### Overrides [#overrides-8]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`createMotion`](/pixi-vn-live2d/core/classes/MotionManager#createmotion)

***

### destroy() [#destroy]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5050

Destroys the instance and releases all resources.

#### Returns [#returns-5]

`void`

#### Emits [#emits-1]

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

#### Overrides [#overrides-9]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`destroy`](/pixi-vn-live2d/core/classes/MotionManager#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-4]

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

`T`

##### args [#args]

...`any`\[]

#### Returns [#returns-6]

`boolean`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`emit`](/pixi-vn-live2d/core/classes/MotionManager#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-7]

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

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`eventNames`](/pixi-vn-live2d/core/classes/MotionManager#eventnames)

***

### getMotionAndApplyExpression() [#getmotionandapplyexpression]

\> `protected` **getMotionAndApplyExpression**(`group`, `index`, `expression?`): `Promise`\<`unknown`>

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3637

Loads a motion and applies the given expression with FORCE priority.

#### Parameters [#parameters-5]

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

`string`

The motion group.

##### index [#index]

`number`

The motion index.

##### expression? [#expression]

`string` | `number`

Expression to apply (optional).

#### Returns [#returns-8]

`Promise`\<`unknown`>

The loaded motion, or null if not started.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`getMotionAndApplyExpression`](/pixi-vn-live2d/core/classes/MotionManager#getmotionandapplyexpression)

***

### getMotionFile() [#getmotionfile]

\> `abstract` **getMotionFile**(`definition`): `string`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5044

Retrieves the motion's file path by its definition.

#### Parameters [#parameters-6]

##### definition [#definition-1]

[`Motion`](/pixi-vn-live2d/core/namespaces/Cubism2Spec/interfaces/Motion)

Motion definition.

#### Returns [#returns-9]

`string`

The file path extracted from the given definition. Not resolved.

#### Overrides [#overrides-10]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`getMotionFile`](/pixi-vn-live2d/core/classes/MotionManager#getmotionfile)

***

### getMotionName() [#getmotionname]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5045

Retrieves the motion's name by its definition.

#### Parameters [#parameters-7]

##### definition [#definition-2]

[`Motion`](/pixi-vn-live2d/core/namespaces/Cubism2Spec/interfaces/Motion)

Motion definition.

#### Returns [#returns-10]

`string`

The motion's name.

#### Overrides [#overrides-11]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`getMotionName`](/pixi-vn-live2d/core/classes/MotionManager#getmotionname)

***

### getSoundFile() [#getsoundfile]

\> `abstract` `protected` **getSoundFile**(`definition`): `string` | `undefined`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5046

Retrieves the motion's sound file by its definition.

#### Parameters [#parameters-8]

##### definition [#definition-3]

[`Motion`](/pixi-vn-live2d/core/namespaces/Cubism2Spec/interfaces/Motion)

Motion definition.

#### Returns [#returns-11]

`string` | `undefined`

The motion's sound file, or undefined.

#### Overrides [#overrides-12]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`getSoundFile`](/pixi-vn-live2d/core/classes/MotionManager#getsoundfile)

***

### init() [#init]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5041

Should be called in the constructor of derived class to initialize options and setup motions.

#### Parameters [#parameters-9]

##### options? [#options]

[`MotionManagerOptions`](/pixi-vn-live2d/core/interfaces/MotionManagerOptions)

Initialization options for the manager.

#### Returns [#returns-12]

`void`

#### Overrides [#overrides-13]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`init`](/pixi-vn-live2d/core/classes/MotionManager#init)

***

### initializeAudio() [#initializeaudio]

\> `protected` **initializeAudio**(`audio`, `volume`): `void`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3490

Initializes audio playback and sets up audio analysis for lipsync.

#### Parameters [#parameters-10]

##### audio [#audio]

`Sound`

The Sound to initialize.

##### volume [#volume]

`number`

The playback volume (0-1).

#### Returns [#returns-13]

`void`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`initializeAudio`](/pixi-vn-live2d/core/classes/MotionManager#initializeaudio)

***

### isFinished() [#isfinished]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5042

Checks if the motion playback has finished.

#### Returns [#returns-14]

`boolean`

#### Overrides [#overrides-14]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`isFinished`](/pixi-vn-live2d/core/classes/MotionManager#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-11]

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

`string` | `symbol`

#### Returns [#returns-15]

`number`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`listenerCount`](/pixi-vn-live2d/core/classes/MotionManager#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-12]

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

`T`

#### Returns [#returns-16]

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

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`listeners`](/pixi-vn-live2d/core/classes/MotionManager#listeners)

***

### loadMotion() [#loadmotion]

\> **loadMotion**(`group`, `index`): `Promise`\<`Live2DMotion` | `undefined`>

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3479

Loads a Motion in a motion group. Errors in this method will not be thrown,
but be emitted with a "motionLoadError" event.

#### Parameters [#parameters-13]

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

`string`

The motion group.

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

`number`

Index in the motion group.

#### Returns [#returns-17]

`Promise`\<`Live2DMotion` | `undefined`>

Promise that resolves with the Motion, or with undefined if it can't be loaded.

#### Emits [#emits-2]

[MotionManagerEvents.motionLoaded](/pixi-vn-live2d/core/interfaces/MotionManagerEvents#motionloaded)

#### Emits [#emits-3]

[MotionManagerEvents.motionLoadError](/pixi-vn-live2d/core/interfaces/MotionManagerEvents#motionloaderror)

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`loadMotion`](/pixi-vn-live2d/core/classes/MotionManager#loadmotion)

***

### motionLastFrame() [#motionlastframe]

\> `abstract` **motionLastFrame**(`group`, `index`, `expression?`): `Promise`\<`boolean`>

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5051

Play the last frame of the given motion, optionally applying an expression.

#### Parameters [#parameters-14]

##### group [#group-3]

`string`

Motion group.

##### index [#index-2]

`number`

Motion index.

##### expression? [#expression-1]

Expression to apply (optional).

###### expression? [#expression-2]

`string` | `number`

#### Returns [#returns-18]

`Promise`\<`boolean`>

Promise resolving to true if successful.

#### Overrides [#overrides-15]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`motionLastFrame`](/pixi-vn-live2d/core/classes/MotionManager#motionlastframe)

***

### mouthSync() [#mouthsync]

\> **mouthSync**(): `number`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3560

Move the mouth for lipsync.

#### Returns [#returns-19]

`number`

The current lipsync value.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`mouthSync`](/pixi-vn-live2d/core/classes/MotionManager#mouthsync)

***

### 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-15]

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

`T`

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

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

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

`any`

##### once? [#once]

`boolean`

#### Returns [#returns-20]

`this`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`off`](/pixi-vn-live2d/core/classes/MotionManager#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-16]

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

`T`

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

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

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

`any`

#### Returns [#returns-21]

`this`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`on`](/pixi-vn-live2d/core/classes/MotionManager#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-17]

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

`T`

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

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

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

`any`

#### Returns [#returns-22]

`this`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`once`](/pixi-vn-live2d/core/classes/MotionManager#once)

***

### 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-18]

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

`string` | `symbol`

#### Returns [#returns-23]

`this`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`removeAllListeners`](/pixi-vn-live2d/core/classes/MotionManager#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-19]

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

`T`

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

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

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

`any`

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

`boolean`

#### Returns [#returns-24]

`this`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`removeListener`](/pixi-vn-live2d/core/classes/MotionManager#removelistener)

***

### setupMotions() [#setupmotions]

\> `protected` **setupMotions**(`options?`): `void`

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3469

Sets up motions from the definitions, and preloads them according to the preload strategy.

#### Parameters [#parameters-20]

##### options? [#options-1]

[`MotionManagerOptions`](/pixi-vn-live2d/core/interfaces/MotionManagerOptions)

Options controlling which motions to preload.

#### Returns [#returns-25]

`void`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`setupMotions`](/pixi-vn-live2d/core/classes/MotionManager#setupmotions)

***

### speak() [#speak]

\> **speak**(`sound`, `volume?`): `Promise`\<`boolean`>

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3502

Only play sound with lip sync.

#### Parameters [#parameters-21]

##### sound [#sound]

`string`

The audio url or base64 content.

##### volume? [#volume-1]

Volume of the sound (0-1).

###### expression? [#expression-3]

`string` | `number`

###### onError? [#onerror]

(`e`) => `void`

###### onFinish? [#onfinish-1]

() => `void`

###### resetExpression? [#resetexpression]

`boolean`

###### volume? [#volume-2]

`number`

#### Returns [#returns-26]

`Promise`\<`boolean`>

Promise that resolves with true if the sound is playing, false otherwise.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`speak`](/pixi-vn-live2d/core/classes/MotionManager#speak)

***

### startMotion() [#startmotion]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3525

Starts a motion with the given priority.

#### Parameters [#parameters-22]

##### group [#group-4]

`string`

The motion group.

##### index [#index-3]

`number`

Index in the motion group.

##### priority? [#priority]

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

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

##### sound? [#sound-1]

[`MotionStartOptions`](/pixi-vn-live2d/core/interfaces/MotionStartOptions)

The audio url or base64 content.

#### Returns [#returns-27]

`Promise`\<`boolean`>

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

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`startMotion`](/pixi-vn-live2d/core/classes/MotionManager#startmotion)

***

### startRandomMotion() [#startrandommotion]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3540

Starts a random Motion as given priority.

#### Parameters [#parameters-23]

##### group [#group-5]

`string`

The motion group.

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

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

The priority to be applied. Default: IDLE (1).

##### sound? [#sound-2]

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

The audio url or base64 content.

#### Returns [#returns-28]

`Promise`\<`boolean`>

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

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`startRandomMotion`](/pixi-vn-live2d/core/classes/MotionManager#startrandommotion)

***

### stopAllMotions() [#stopallmotions]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3548

Stops all playing motions as well as the sound.

#### Returns [#returns-29]

`void`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`stopAllMotions`](/pixi-vn-live2d/core/classes/MotionManager#stopallmotions)

***

### stopSpeaking() [#stopspeaking]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3544

Stops current audio playback and lipsync.

#### Returns [#returns-30]

`void`

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`stopSpeaking`](/pixi-vn-live2d/core/classes/MotionManager#stopspeaking)

***

### update() [#update]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:3555

Updates parameters of the core model.

#### Parameters [#parameters-24]

##### model [#model]

`object`

The core model.

##### now [#now]

`number`

Current time in milliseconds.

#### Returns [#returns-31]

`boolean`

True if the parameters have been actually updated.

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

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`update`](/pixi-vn-live2d/core/classes/MotionManager#update)

***

### updateParameters() [#updateparameters]

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

Defined in: node_modules/untitled-pixi-live2d-engine/types/index.d.ts:5049

Updates parameters of the core model.

#### Parameters [#parameters-25]

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

`Live2DModelWebGL`

The core model.

##### \_now [#_now]

`number`

#### Returns [#returns-32]

`boolean`

True if the parameters have been actually updated.

#### Overrides [#overrides-16]

[`MotionManager`](/pixi-vn-live2d/core/classes/MotionManager).[`updateParameters`](/pixi-vn-live2d/core/classes/MotionManager#updateparameters)
