Skip to main content

MatterportPin API Reference

MatterportPin is a PinAdapter for the Contextual Comments component and allows you to integrate Contextual Comments into a Matterport SDK application.

How to use

To initialize the MatterportPin you can follow our quickstart guide.

Usage

import { MatterportPin } from "@superviz/matterport-plugin";

// iframe where the Matterport will be loaded
const showcase = document.getElementById("showcase-id");

// Matterport SDK instance, after the iframe is loaded
const mpSdk = await showcaseWindow.MP_SDK.connect(showcaseWindow);

// Creating a MatterportPin adapter
const pinAdapter = new MatterportPin(mpSDK, showcase);

Properties

See below the parameters to use in the constructor of the MatterportPin:

NameTypeDescription
matterportSDKMatteportRequired. An instance of the Matterport SDK Bundle.
showcaseHTMLElementRequired. The element where the Matterport SDK Bundle is loaded.