Creates an instance of the AvatarSDK.
The HTMLIFrameElement that contains the avatar.
Configuration options for the SDK.
Establishes a connection with the avatar iframe. This method must be called before any other commands can be sent to the avatar. It returns a promise that resolves when the connection is established.
A promise that resolves when the connection is established.
Cleans up resources and removes event listeners. This should be called when the SDK is no longer needed to prevent memory leaks.
Interrupts the current speech or action.
A promise that resolves when the interrupt is complete.
Removes an event listener for a specific event.
The name of the event to remove the listener from.
The callback function to remove.
Registers an event listener for a specific event.
The name of the event to listen for.
The callback function to execute when the event is triggered.
Triggers a specific animation by name.
The name of the animation to play.
Whether the animation should loop.
A promise that resolves with the command result.
Sets the avatar's facial expression.
The name of the expression to set.
A promise that resolves with the command result.
Makes the avatar speak. Supports either:
Optionaloptions: SpeakOptionsA promise that resolves when the command is acknowledged by the iframe.
Makes the avatar speak. Supports either:
A promise that resolves when the command is acknowledged by the iframe.
The main class for interacting with the A.D.A.M. 3D avatar. This class provides methods for connecting to the avatar, making it speak, and controlling its animations and expressions.
Example