Constructor
new core/LipsyncFeature(host, visemeOptionsopt, talkingOptionsopt, visemeLeadTimeopt)
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
host |
core/HostObject | Host that owns the feature. |
|||||||||||||||||||||||||||
visemeOptions |
Object |
<optional> |
Options for the viseme layers. Properties
|
||||||||||||||||||||||||||
talkingOptions |
Object |
<optional> |
Options for the talking layers. Properties
|
||||||||||||||||||||||||||
visemeLeadTime |
number |
<optional> |
.067 | The amount of time to instruct the |
Extends
Members
(readonly) host
Gets the host that manages the feature.
- Overrides:
(readonly) owner
Gets the engine owner object of the host.
- Overrides:
visemeLeadTime :number
Gets and sets the amount of time in seconds to negatively offset speechmark
emission by.
Type:
- number
Methods
discard()
Clean up once the feature is no longer in use. Remove the feature namespace
from the host and remove reference to the host.
- Overrides:
- Implements:
emit(message, valueopt)
Emit feature messages from the host. Feature messages will be prefixed with
the class name of the feature.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | The message to emit. |
|
value |
any |
<optional> |
Optional parameter to pass to listener callbacks. |
- Overrides:
installApi()
Adds a namespace to the host with the name of the feature to contain properties
and methods from the feature that users of the host need access to.
- Overrides:
- See:
listenTo(message, callback)
Listen to a feature message from the host object.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Message to listen for. |
callback |
function | The callback to execute when the message is received. |
- Overrides:
registerTalkingLayer(layerName, optionsopt)
Start keeping track of an animation layer that contains a looping animation
to be played during speech.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
layerName |
string | Name of the layer to keep track of. |
|||||||||||||||||||||
options |
Object |
<optional> |
Options for the layer. Properties
|
registerVisemeLayer(layerName, optionsopt, decayRateopt)
Start keeping track of an animation layer that owns a freeBlend animation
with blendWeights corresponding to visemes.
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
layerName |
string | Name of the layer to keep track of. |
|||||||||||||||||
options |
Object |
<optional> |
Options for the layer. Properties
|
||||||||||||||||
decayRate |
Object |
<optional> |
Properties
|
||||||||||||||||
options.blendTime |
number |
<optional> |
LipsyncFeature.DEFAULT_LAYER_OPTIONS.blendTime | Default amount of time to use when manipulating animation blendWeights. |
|||||||||||||||
options.easingFn |
function |
<optional> |
Default easing function to use when |
||||||||||||||||
options.visemeMap |
Object |
<optional> |
DefaultVisemeMap | Object containing key/value pairs of |
stopListening(message, callbackopt)
Stop listening to a message from the host object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | Message to stop listening for. |
|
callback |
function |
<optional> |
Optional callback to remove. If none is defined, |
- Overrides:
stopListeningByRegexp(regexp, callbackopt)
Stop listening to a message matching the given regular expression from the
host object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
regexp |
Regexp | The regular expression to stop listening for. |
|
callback |
function |
<optional> |
Optional callback to remove. If none is defined, |
- Overrides:
stopListeningToAll()
Stop listening to all messages.
- Overrides:
update(deltaTime)
Executes each time the host is updated.
Parameters:
Name | Type | Description |
---|---|---|
deltaTime |
number | Amount of time since the last host update was |
- Overrides: