AttachmentAPI#

Interface AttachmentAPI

With the AttachmentAPI you can access additional data attached to a node.

Hierarchy

Methods

  • Creates a new attachment.

    Parameters

    • Optional dataType: AttachmentType

      Specifies the attachment data type.

    Returns number

    The attachment id.

  • Fetches & returns the attachment data.

    Type Parameters

    • T = any

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    Returns Promise<T>

    The attached data.

  • Returns the attachment data.

    Type Parameters

    • T = any

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    Returns T

    The attached data

    Deprecated

    getAttachmentData is deprecated, please use fetchAttachmentData instead.

  • Returns the attachment data URI.

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    Returns string

  • Removes the Attachment from the scene and all related Snapshots.

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    • Optional safe: boolean

      Performs a safe remove which interrupt the removal process if the Attachment is part of one or more Snapshots.

    Returns RemoveState

  • Sets the attachment data.

    Type Parameters

    • T = any

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    • Optional data: T

      The new attachment data.

    Returns void

  • Sets the attachment data URI.

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    • Optional dataURI: string

      The attachment data URI.

    Returns void