@3dsource/metabox-modular-configurator-api
    Preparing search index...

    Class ResetConfiguration

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

    Resets the entire modular configurator state to defaults — root and child components, all component material selections, 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 modular configurators where users have built up an assembly with multiple SetComponent / SetComponentMaterial calls. Unlike ResetCamera (which only touches viewport state), ResetConfiguration wipes all user-applied selections back to template defaults. The configurator responds with a full ModularConfiguratorEnvelope via configuratorDataUpdated, so UI state derived from the envelope (configurationTree, componentsByComponentType, material 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. After reset, the root component is back to the template default — no need to re-issue SetComponent for the root unless you want a different starting assembly. Pair with ResetCamera if you also want the viewport returned to its default framing.

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

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

    api.sendCommandToMetabox(new ResetConfiguration());
    };
    Index
    data: ToMetaBoxMessageEnvelope

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