LogoPixi’VN
coreClasses

Class: MotionState

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

Handles the state of a MotionManager.

Constructors

Constructor

> new MotionState(): MotionState

Returns

MotionState

Properties

currentGroup?

> optional currentGroup?: string

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

Group of current motion.


currentIndex?

> optional currentIndex?: number

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

Index of current motion in its group.


currentPriority

> currentPriority: MotionPriority

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

Priority of the current motion. Will be MotionPriority.NONE if there's no playing motion.


debug

> debug: boolean

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

When enabled, the states will be dumped to the logger when an exception occurs.


reservedGroup?

> optional reservedGroup?: string

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

Group of the reserved motion.


reservedIdleGroup?

> optional reservedIdleGroup?: string

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

Group of the reserved idle motion.


reservedIdleIndex?

> optional reservedIdleIndex?: number

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

Index of the reserved idle motion in its group.


reservedIndex?

> optional reservedIndex?: number

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

Index of the reserved motion in its group.


reservePriority

> reservePriority: MotionPriority

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

Priority of the reserved motion, which is still in loading and will be played once loaded. Will be MotionPriority.NONE if there's no reserved motion.


tag

> tag: string

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

Tag for logging.

Methods

complete()

> complete(): void

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

Notifies the motion playback has finished.

Returns

void


dump()

> dump(requestedGroup?, requestedIndex?): string

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

Dumps the state for debugging.

Parameters

requestedGroup?

string

requestedIndex?

number

Returns

string


isActive()

> isActive(group, index): boolean

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

Checks if a Motion is currently playing or has reserved.

Parameters

group

string

index

number

Returns

boolean

True if active.


reserve()

> reserve(group, index, priority): boolean

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

Reserves the playback for a motion.

Parameters

group

string

The motion group.

index

number

Index in the motion group.

priority

MotionPriority

The priority to be applied.

Returns

boolean

True if the reserving has succeeded.


reset()

> reset(): void

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

Resets the state.

Returns

void


setCurrent()

> setCurrent(group, index, priority): void

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

Sets the current motion.

Parameters

group

string | undefined

index

number | undefined

priority

MotionPriority

Returns

void


setReserved()

> setReserved(group, index, priority): void

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

Sets the reserved motion.

Parameters

group

string | undefined

index

number | undefined

priority

MotionPriority

Returns

void


setReservedIdle()

> setReservedIdle(group, index): void

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

Sets the reserved idle motion.

Parameters

group

string | undefined

index

number | undefined

Returns

void


shouldOverrideExpression()

> shouldOverrideExpression(): boolean

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

Checks if the model's expression should be overridden by the motion.

Returns

boolean


shouldRequestIdleMotion()

> shouldRequestIdleMotion(): boolean

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

Checks if an idle motion should be requests to play.

Returns

boolean


start()

> start(motion, group, index, priority): boolean

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

Requests the playback for a motion.

Parameters

motion

unknown

The Motion, can be undefined.

group

string

The motion group.

index

number

Index in the motion group.

priority

MotionPriority

The priority to be applied.

Returns

boolean

True if the request has been approved, i.e. the motion is allowed to play.

On this page