MP_SDK | Matterport SDK
Usage of the SDK constitutes your agreement with the Matterport SDK Agreement. Email developers@matterport.com with any questions.

The entrypoint for connecting to the SDK and creating an MpSdk interface.

Hierarchy

  • MP_SDK

Index

Methods

Methods

connect

  • connect(target: ShowcaseBundleWindow, options?: Partial<ConnectOptions>): Promise<MpSdk>
  • connect(target: HTMLIFrameElement, applicationKey: string, unused: ""): Promise<MpSdk>
  • bundle

    Connect to the Bundle SDK and and create an MpSdk interface.

    const bundleIframe = document.getElementById<HTMLIFrameElement>('showcase');
    const showcaseWindow = bundleIframe.contentWindow as ShowcaseBundleWindow;
    showcaseWindow.MP_SDK.connect(showcaseWindow);
    

    Parameters

    Returns Promise<MpSdk>

  • embed

    Connect to the Embed SDK and and create an MpSdk interface.

    const showcaseIframe = document.getElementById<HTMLIFrameElement>('showcase');
    const showcaseWindow = window as ShowcaseEmbedWindow;
    showcaseWindow.MP_SDK.connect(showcaseIframe, `${APPLICATION_KEY}, '');
    

    Parameters

    • target: HTMLIFrameElement
    • applicationKey: string
    • unused: ""

    Returns Promise<MpSdk>