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

Index

Types

FadeProps

FadeProps: object

Pointer reticle fade properties.

Type declaration

  • Optional fadeIn?: FadeInProps
  • Optional fadeOut?: FadeOutProps

Intersection

Intersection: object

Type declaration

  • floorId: number | undefined
  • floorIndex: number | undefined

    floorIndex is only defined when the intersected object is MODEL.

  • normal: Vector3
  • object: Pointer.Colliders
  • position: Vector3

Properties

intersection

An observable intersection data object that can be subscribed to.

mpSdk.Pointer.intersection.subscribe(function (intersectionData) {
 // Changes to the intersection data have occurred.
 console.log('Intersection position:', intersectionData.position);
 console.log('Intersection normal:', intersectionData.normal);
});

Methods

editTexture

  • editTexture(textureId: string): Promise<void>
  • embed
    bundle

    Introduced 3.1.55.2-34-ga9934ccd93

    Change the texture of the pointer reticle.

    await mpSdk.Asset.registerTexture('customTextureId', 'https://[link.to/image]');
    
    // change the texture of the pointer reticle using a previously registered id.
    await mpSdk.Pointer.editTexture('customTextureId');
    

    Parameters

    • textureId: string

      The id of the texture to apply.

    Returns Promise<void>

registerTexture

  • registerTexture(textureId: string, textureSrc: string): Promise<void>
  • deprecated

    Use Asset.registerTexture to register new textures instead.

    Introduced 3.1.55.2-34-ga9934ccd93

    Parameters

    • textureId: string
    • textureSrc: string

    Returns Promise<void>

resetTexture

  • resetTexture(): Promise<void>
  • embed
    bundle

    Introduced 3.1.55.2-34-ga9934ccd93

    Resets the pointer reticle texture to the original texture.

    await mpSdk.Pointer.resetTexture();
    

    Returns Promise<void>

setFadeProps

  • embed
    bundle

    Introduced 3.1.55.2-34-ga9934ccd93

    Customizes the fade in/out behavior of the pointer reticle.

    Parameters

    Returns Promise<void>

setVisible

  • setVisible(visible: boolean): Promise<void>
  • embed
    bundle

    Introduced 3.1.55.2-34-ga9934ccd93

    This function controls the visibility of the pointer reticle.

    Parameters

    • visible: boolean

      pointer reticle visibility

    Returns Promise<void>