Function
useAvatar
Here’s all properties of useAvatar hook.
Width and height inside style props must be set to fix the size of the canvas.
Requirement
Avatar Id
The identifier of the avatar.
Avatar Loaders
Scale
The avatar size control.
range: [-5, 5]
Rotation
The avatar rotation control.
On Avatar Loaded
The callback function when the avatar is loaded.
Function
Avatar Display
The avatar display component.
Connect Audio Context
The function is connecting the audio context. (Web Audio API)
Connect Audio Element
The function is connecting the audio element. (HTML Audio Element)
Connect Audio Node
The function is connecting the audio node. (Web Audio API)
Available Triggers
Available in ThreeJSPlugin and RivePlugin.
Get all available shape flow triggers. For example: [“happy”]
Example: const { availableTriggers } = useAvatar(...)
Trigger Event
Available in ThreeJSPlugin and RivePlugin.
Trigger the avatar blendshape motion when the function clicked!