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

    Class ApplyZoom

    Represents a command to apply zoom and change the camera zoom on a scene. This class sends a command to the Metabox API to change zoom on a scene.

    Controls zoom functionality for the configurator; allowing users to adjust the zoom level of 3D objects and camera presets.

    Implements programmatic zoom on the pixel-streamed viewport. Use to build zoom slider controls, pinch-to-zoom on mobile, or 'zoom to detail' buttons. Takes a numeric delta: positive zooms in, negative zooms out (e.g., ApplyZoom(50) zooms in, ApplyZoom(-50) zooms out).

    Always use numeric delta values, not absolute zoom levels. Pair with a UI slider that sends incremental values. Debounce zoom input to ~100ms intervals to prevent overwhelming the Unreal stream. Pattern: api.sendCommandToMetabox(new ApplyZoom(50)).

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

    The zoom value to apply.

    Index

    Constructors

    Properties

    Constructors

    • Parameters

      • zoom: number

      Returns ApplyZoom

    Properties

    data: ToMetaBoxMessageEnvelope

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