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

    Interface FromMetaboxMessagePayloads

    Maps event names received from the Metabox iframe to their typed payloads. Used by Communicator.addEventListener to provide type-safe event subscriptions.

    Message format for MetaBox communication protocol. Wraps data for transmission between API and MetaBox.

    Payload type map for all incoming event types. Defines the data shape for each event name (configuratorDataUpdated, screenshotReady, viewportReady, etc.). Essential TypeScript reference for properly typing event handlers.

    Use as TypeScript type reference: api.addEventListener('configuratorDataUpdated', (data: FromMetaboxMessagePayloads['configuratorDataUpdated']) => {...}). Key events and their types: configuratorDataUpdated→ConfiguratorEnvelope, screenshotReady→string|null, viewportReady→boolean, showcaseStatusChanged→ShowCaseStatus.

    interface FromMetaboxMessagePayloads {
        configuratorDataUpdated: ConfiguratorEnvelope;
        dataChannelConnected: boolean;
        ecomConfiguratorDataUpdated: EcomConfigurator;
        getCameraResult: CameraCommandPayload;
        loadingStatusChanged: { loaderVisible: boolean; percents: number };
        screenshotReady: string | null;
        showcaseStatusChanged: ShowCaseStatus;
        statusMessageChanged: string | null;
        userInactivityDetected: {
            countdownVisible: boolean;
            remainingSecondsToDisconnect: number;
        };
        videoResolutionChanged: VideoResolution;
        videoStatsUpdated: VideoStats;
        viewportReady: boolean;
    }
    Index

    Properties

    configuratorDataUpdated: ConfiguratorEnvelope

    Dispatches every time the configurator data is updated. I.e., when the user changes the configuration. (Material, Product, Environment)

    dataChannelConnected: boolean

    Dispatches every time when the configurator connected/disconnected with Unreal Engine.

    ecomConfiguratorDataUpdated: EcomConfigurator

    Dispatches every time the ecom configurator data is updated (label, endpointUrl).

    getCameraResult: CameraCommandPayload

    Dispatches every time when the User sends get camera command new GetCamera() command.

    loadingStatusChanged: { loaderVisible: boolean; percents: number }

    Dispatches when the loading progress or loader visibility changes. percents is the smoothed progress value (0–100). loaderVisible indicates whether the loading overlay is currently shown.

    screenshotReady: string | null

    Dispatches every time when Unreal is sending an ordered render with a new GetScreenshot() command.

    showcaseStatusChanged: ShowCaseStatus

    Dispatches every time when while the configurator loads. Shows showcase status information on a scene.

    statusMessageChanged: string | null

    Dispatches at the moment while the configurator loads. Shows status information.

    userInactivityDetected: {
        countdownVisible: boolean;
        remainingSecondsToDisconnect: number;
    }

    Dispatches when user inactivity (AFK) is detected and the countdown to disconnect begins. remainingSecondsToDisconnect counts down (e.g. 15, 14, 13…) until the session is terminated. countdownVisible indicates whether the AFK countdown popup is currently shown.

    videoResolutionChanged: VideoResolution

    Dispatches every time when Unreal is changing its video stream size.

    videoStatsUpdated: VideoStats

    Dispatches periodically with aggregated video stream statistics.

    viewportReady: boolean

    Dispatches every time when the Unreal Viewport is visible/hidden.