Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    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.

    Index

    Properties

    bubbles: object = {}

    Track active Chat Bubbles

    template: string = "templates/hud/chat-bubble.html"

    The Handlebars template used to render Chat Bubbles.

    Accessors

    • get element(): HTMLElement

      A reference to the chat bubbles HTML container in which rendered bubbles should live

      Returns HTMLElement

    Methods

    • Create a chat bubble message for a certain token which is synchronized for display across all connected clients.

      Parameters

      • token: TokenDocument

        The speaking Token Document

      • message: string

        The spoken message text

      • Optionaloptions: ChatBubbleOptions = {}

        Options which affect the bubble appearance

      Returns Promise<HTMLElement | null>

      A promise which resolves with the created bubble HTML, or null

    • Speak a message as a particular Token, displaying it as a chat bubble

      Parameters

      • token: Token

        The speaking Token

      • message: string

        The spoken message text

      • Optionaloptions: ChatBubbleOptions = {}

        Options which affect the bubble appearance

      Returns Promise<HTMLElement | null>

      A Promise which resolves to the created bubble HTML element, or null

    • Internal

      Activate Socket event listeners which apply to the ChatBubbles UI.

      Parameters

      • socket: Socket

        The active web socket connection

      Returns void