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

    Class ResetConfiguration

    Represents a command to reset the configurator state to its defaults. This class sends a message to the Metabox API to restore product, materials, and environment selections to the values defined by the configurator template. To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.

    Resets the entire configurator state to defaults — product, product materials, environment, and environment materials all return to the template-defined initial values. Used to give users a clean 'Start Over' affordance without reloading the iframe.

    Powers 'Reset to Defaults' / 'Start Over' buttons in product configurators. Unlike ResetCamera (which only touches viewport state), ResetConfiguration wipes all user-applied selections back to template defaults. The configurator responds with a full ConfiguratorEnvelope via configuratorDataUpdated, so UI state derived from the envelope (selected swatches, current product, environment chips) will re-sync automatically.

    Call api.sendCommandToMetabox(new ResetConfiguration()). No parameters. Subscribe to configuratorDataUpdated BEFORE sending so you capture the reset envelope. If your UI maintains local selection state separate from the envelope, clear it in the same handler. Pair with ResetCamera if you also want the viewport returned to its default framing.

    import { ResetConfiguration, Communicator, ConfiguratorEnvelope } from '@3dsource/metabox-front-api';
    window.env3DSource.apiReady = (api: Communicator) => {

    //Subscribe to the event before sending the command to ensure you capture the response
    api.addEventListener('configuratorDataUpdated', (data: ConfiguratorEnvelope) => {
    console.log('Configurator reset to default state:', data);
    });

    api.sendCommandToMetabox(new ResetConfiguration());
    };
    Index

    Constructors

    Properties

    Constructors

    Properties

    data: ToMetaBoxMessageEnvelope

    The message envelope populated by subclass constructors and sent via Communicator.sendCommandToMetabox.