@3dsource/metabox-front-api
    Preparing search index...

    Interface Listener

    Represents a callback listener for specific message types. Used internally by EventDispatcher to store event listeners.

    Event listener interface. Allows subscription to specific events from the configurator to receive real-time data updates.

    Event listener interface. addEventListener() and removeEventListener() on Communicator. Subscribe to real-time configurator events: state changes, viewport readiness, screenshots, showcase status, camera results, resolution changes.

    Set up listeners BEFORE sending commands that trigger them. Always clean up with removeEventListener on component unmount. Key events: configuratorDataUpdated (every state change), viewportReady (init complete), screenshotReady (captures), getCameraResult (camera queries), showcaseStatusChanged (demo playback).

    interface Listener {
        callback: (data: unknown) => void;
        messageType: string;
    }
    Index

    Properties

    callback: (data: unknown) => void

    The callback function to execute when a message of the specified type is received

    messageType: string

    The message type this listener is registered for