Abstract
Protected
constructorOptional
options: MotionManagerOptionsOptional
currentAudio element of the current motion if a sound file is defined with it.
Readonly
Abstract
definitionsMotion definitions copied from ModelSettings.
Flags the instances has been destroyed.
Optional
Abstract
expressionCan be undefined if the settings defines no expression.
Readonly
Abstract
groupsMotion groups with particular internal usages. Currently there's only the idle
field,
which specifies the actual name of the idle motion group, so the idle motions
can be correctly found from the settings JSON of various Cubism versions.
Readonly
Abstract
motionIndicates the content type of the motion files, varies in different Cubism versions.
This will be used as xhr.responseType
.
The Motions. The structure is the same as 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
.
Flags there's a motion playing.
Readonly
settingsThe ModelSettings reference.
Maintains the state of this MotionManager.
Tag for logging.
Static
prefixedProtected
Abstract
_startProtected
Abstract
_stopOptional
context: anyAbstract
createCreates a Motion from the data.
The created Motion.
Content of the motion file. The format must be consistent with motionDataType.
The motion group.
The motion definition.
Abstract
getProtected
Abstract
getProtected
Abstract
getProtected
initShould be called in the constructor of derived class.
Optional
options: MotionManagerOptionsAbstract
isLoads a Motion in a motion group. Errors in this method will not be thrown, but be emitted with a "motionLoadError" event.
Promise that resolves with the Motion, or with undefined if it can't be loaded.
The motion group.
Index in the motion group.
Optional
fn: ListenerFnOptional
context: anyOptional
once: booleanAdd a listener for a given event.
Optional
context: anyAdd a one-time listener for a given event.
Optional
context: anyRemove all listeners, or those of the specified event.
Optional
event: string | symbolRemove the listeners of a given event.
Optional
fn: ListenerFnOptional
context: anyOptional
once: booleanProtected
setupSets up motions from the definitions, and preloads them according to the preload strategy.
Optional
options: MotionManagerOptionsStarts a motion as given priority.
Promise that resolves with true if the motion is successfully started, with false otherwise.
The motion group.
Index in the motion group.
The priority to be applied.
Starts a random Motion as given priority.
Promise that resolves with true if the motion is successfully started, with false otherwise.
The motion group.
Optional
priority: MotionPriorityThe priority to be applied.
Protected
Abstract
updateGenerated using TypeDoc
Handles the motion playback.
Emits
MotionManagerEvents