Track active Chat Bubbles
A reference to the chat bubbles HTML container in which rendered bubbles should live
Create a chat bubble message for a certain token which is synchronized for display across all connected clients.
The speaking Token Document
The spoken message text
Optional
options: ChatBubbleOptions = {}Options which affect the bubble appearance
A promise which resolves with the created bubble HTML, or null
Speak a message as a particular Token, displaying it as a chat bubble
The speaking Token
The spoken message text
Optional
options: ChatBubbleOptions = {}Options which affect the bubble appearance
A Promise which resolves to the created bubble HTML element, or null
Determine the length of time for which to display a chat bubble. Research suggests that average reading speed is 200 words per minute. Since these are short-form messages, we multiply reading speed by 1.5. Clamp the result between 1 second (minimum) and 20 seconds (maximum)
The HTML message
The number of milliseconds for which to display the message
Private
_clearPrivate
Clear any existing chat bubble for a certain Token
Private
_renderHTMLPrivate
_getPrivate
_setPrivate
Assign styling parameters to the chat bubble, toggling either a left or right display (randomly)
The speaking Token
Chat bubble content
Positioning data
Static
_activate
The Chat Bubble Class This application displays a temporary message sent from a particular Token in the active Scene. The message is displayed on the HUD layer just above the Token.