ContextAPI#

Interface ContextAPI

The ContextAPI combines all functionality which can be applied on the WebvisContext.

Hierarchy

Methods

add addCustomNode addToCollection addToSelection addTopologyToSelection anchorXR changeAnnotation changeClipPlane changeClippingRoom changeDrawing changeDrawingPlane changeMeasurement changeSetting changeSnapshot clear clearSelection clearTopologySelection clipOtherParts collectRuntimeNodesOfType connectToSession connectXR createAnimationFrames createAnnotation createAttachment createBoxVolume createCapping createCircularArcDescriptor createClipPlane createClippingRoom createCollection createDrawing createDrawingPlane createExplosion createMeasurement createNodePathHandles createPointDescriptor createSnapshot createViewer disableCapping disconnectFromSession disconnectXR enableCapping endExplosion enterXRInitMode exportXRInitTemplate fetchAttachmentData getAnnotationData getAnnotations getAttachmentData getAttachmentDataURI getClipPlanes getClipRoom getCollection getCollectionElements getCollectionNodeCount getCoordinateSystemForwardVector getCoordinateSystemMatrix getCoordinateSystemRightVector getCoordinateSystemUpVector getDrawingPlaneData getDrawingPlanes getDrawings getEnabledAuxNodes getEnabledLayerFilters getInteractionMode getMeasurements getMetadata getName getProperties getProperty getRegisteredLayerFilters getRootNodeId getSelectedLeafNodes getSelectedNodes getSelectedTopologyHandles getSelection getSessionMemberID getSessionMembers getSessionStateData getShapeHandle getSnapshotData getSnapshots getStatistics getTopologyType getViewer getViewers getXRCapabilities getXRMembers getXRPlaybackProperties getXRPlaybackState getXRState hideXRBackgroundFeed importConfig importSession importXRInitTemplate invertEnabledStates invertSelection isColorComparisonActive isNodeDeletable isNodePartOfEnabledLayers isNodePartOfEnabledVariant isNodeType isOfflineStorageAvailable isSelected isTopologySelected mapInternalToOriginalTopologyHandles mapOriginalToInternalTopologyHandles measureBetween measureTangent measureThickness performExplosion processInteractionInput promoteSessionMember query readSetting registerCustomProperty registerFrameListener registerListener remove removeAnimationFrames removeAnnotation removeAttachment removeCapping removeClipPlane removeClippingRoom removeCollection removeDrawing removeDrawingPlane removeFromCollection removeFromSelection removeMeasurement removeSessionMember removeSnapshot removeTopologyFromSelection removeViewer requestActiveSceneVolume requestAnnotationData requestAuxRootNodeIds requestBoxDescriptor requestClipPlaneData requestClipRoomData requestDrawingData requestFullSceneVolume requestHubVersion requestL3DInformation requestMeasurementData requestNodeIdsByBoxVolume requestNodePathHandleMap requestNodePathStrings requestRootNodeIds requestServiceStates requestSnapshotData requestSupportedContentTypes requestSupportedRenderSetups requestTopologyDescriptor requestVariants requestXRDeviceScreenshot resetInteractionMode resetProperties resetProperty resetSetting resetUserSettings restoreSession restoreSnapshot searchByVolume seekXRPlayback selectCollection setAttachmentData setAttachmentDataURI setInteractionMode setLayerFilterEnabled setParent setProperty setSelection setTopologyProperty setTopologySelection setVariantEnabled setXRPlaybackBoomerang setXRPlaybackFrameRange setXRPlaybackSource setXRPlaybackSpeed showXRBackgroundFeed shutdownSession startXRPlayback startXRSpectate stopXRPlayback stopXRSpectate storeSession transferSession unanchorXR unregisterFrameListener unregisterListener waitFor

Methods

  • Adds a new Node to the InstanceGraph.

    Parameters

    Returns number

    The id of added Node

  • Parameters

    • dataURI: string

      Specifies the URI to the data resource.

    • Optional parentID: number

      Specifies the parent Node ID of the added Node.

    • Optional usage: UsageString

      The usage parameter allows to define how the resource should be inserted in the InstanceGraph.

    • Optional label: string

      Specifies a custom label for the added Node.

    • Optional contentType: string

      Specifies the MimeType of the data resource.

    • Optional initialProperties: InitialNodeProperties

      Specifies initialProperties of the added Node.

    • Optional cacheStrategy: CacheStrategy

      Specifies the strategy which is used when a data cache is requested from the Hub.

    Returns number

    The id of added Node

    Deprecated

    Adds a new Node to the InstanceGraph.

  • Creates a custom Node with custom data which is stored in an Attachment.

    Parameters

    • customNodeType: string

      {string} Specifies the custom Node type.

    • data: any

      {any} Specifies the data of the custom Node.

    • Optional dataType: AttachmentType

      {AttachmentType="json"} Specifies the type of the data.

    Returns number

  • Adds the node given by nodeID to the collection with id collectionID. If recursive is true, the descendants of the node are also added. Returns the number of nodes in the collection.

    Parameters

    • collectionID: number

      Specifies to which collection the node should be added

    • nodeID: number

      Specifies which node should be added to the collection

    • Optional recursive: boolean

      Specifies if the children of the node should also be added to the collection

    Returns void

  • Adds the given Nodes to the Selection.

    Parameters

    • nodeID: number | number[]

      The ID of the Node that should be added to the current Selection

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<ChangeSelectionResult>

  • Adds one or multiple Topology elements to the current selection.

    Parameters

    • handle: TopologyHandle | TopologyHandle[]

      A Topology Element or the list of Topology Elements which should be added to the current selection.

    Returns Promise<void>

  • Experimental

    Anchors the model at the current 3D pose. Visually, this will have the effect that the model will stay at the current position and orientation in the real world.

    Please note, that in a model-based tracking scenario, the model will get anchored automatically when the alignment of the model with the real world object is high enough that tracking can be performed (model is snapped).

    This will trigger a XRStateChangedEvent with anchored set to true.

    Returns void

  • Changes one or more properties of an Annotation with the specified id.

    Parameters

    • annotationId: number

      The id of the Annotation you want to change.

    • properties: AnnotationProperties

      The properties of the Annotation you want change.

    Returns AnnotationProperties

    An Object with the changed Properties.

  • Parameters

    • annotationID: number

      The ID of the Annotation.

    • Optional label: string

      The text of the Annotation.

    • Optional visible: boolean

      Indicates if the Annotation should be visible or hidden.

    • Optional anchorPosition: number[] | Float32Array

      Anchor position in world space coordinates.

    • Optional labelPosition: number[] | Float32Array

      The position of the label.

    • Optional active: boolean

      DEPRECATED

    • Optional transform: number[] | Float32Array

      The transformation of the Annotation.

    Returns void

    Deprecated

    Changes an annotation.

  • Changes one or more properties of a clip plane with the specified id.

    Parameters

    • clipPlaneId: number

      The id of the clip plane you want to change.

    • properties: ClipPlaneProperties

      The properties of the clip plane you want change.

    Returns ClipPlaneProperties

    An Object with the changed Properties.

  • Changes the properties of the clip plane defined by the clipPlaneID with the optional parameters normal, points and name.

    Parameters

    • clipPlaneID: number

      The ID of an existing clip plane which should be changed

    • Optional normal: number[] | Float32Array

      The new normal of the clip plane

    • Optional point: number[] | Float32Array

      An arbitrary new point in space which lies on the clip plane

    • Optional name: string

      The new name for the clip plane

    • Optional thickness: number

      The thickness for the clip plane

    • Optional tangent: number[] | Float32Array

      The tangent of the clip plane

    • Optional disabled: boolean

      The enabled state of the clip plane

    • Optional invisible: boolean

      Invisible on the UI

    • Optional exclusive: boolean

      set the exclusive flag to clip geometry when using exclusiveClipplanes property

    Returns void

    Deprecated

    Calling changeClipPlane with single parameters is deprecated, please use ClipPlaneProperties instead.

  • Changes one or more properties of the clip room.

    Parameters

    • Optional properties: ClipRoomProperties

      The properties of the clip room you want change.

    Returns ClipRoomProperties

    An object with the changed properties.

  • Parameters

    • Optional name: string

      The name of the clip room.

    • Optional size: number[] | Float32Array

      The size of the clip room.

    • Optional transformation: number[] | Float32Array

      The transformation of the clip room.

    • Optional disabled: boolean

      The disabled state of the clip room.

    • Optional invisible: boolean

      The invisible state of the clip room.

    Returns ClipRoomProperties

    An object with the changed properties.

    Deprecated

    Calling changeClippingRoom with single parameters is deprecated, please use ClipRoomProperties instead.

    Changes one or more properties of the clip room.

  • Changes the setting to the given value.

    Type Parameters

    • T extends string

    Parameters

    • setting: T

      A name that specifies a particular setting

    • value: ContextSettingType<T>

      The new value for the setting

    Returns boolean

    A boolean which indicates if the setting has changed

  • Changes one or more properties of a Snapshot with the specified ID.

    Parameters

    • snapshotID: number

      The ID of the Snapshot you want to change.

    • properties: SnapshotProperties

      The properties of the Snapshot you want to change.

    Returns SnapshotProperties

    An object with the changed Properties.

  • This changes the textual description of the Snapshot for given snapshotID to the value of text.

    Parameters

    • snapshotID: number

      The ID of the Snapshot.

    • Optional name: string

      The new name of the Snapshot.

    • Optional screenshotURL: string

      The new screenshot URL of the Snapshot.

    • Optional order: number

      The order inside the List of Snapshots.

    Returns SnapshotProperties

    Deprecated

    Calling changeSnapshot with single parameters is deprecated, please use SnapshotProperties instead.

  • Clears the whole Context by removing all Nodes, Snapshots, ClipPlanes, Drawings, Measurements, etc.

    Returns Promise<void>

  • Creates a clip room around the box volume of the specified node.

    Parameters

    • target: number | number[]

      ID(s) of the target Node(s).

    Returns void

  • Returns a list of all existing runtime Node ids of a specified type.

    Parameters

    • nodeType: NodeType

      The Node type to collect.

    • Optional subType: string

      The sub type to collect. Only used for Custom-Nodes.

    Returns number[]

    A list of runtime Node ids of the specified type.

  • Parameters

    • Optional sessionID: string

      The ID of the Session.

    • Optional name: string

      The ID of the Session.

    Returns Promise<SessionStateData>

    Deprecated

    The whole SessionAPI is under consolidation and will be replaced in a future release.

    Connects to a Session. If the ID does not exist, a new Session will be created.

  • Experimental

    Connect to the XR system with the given XRConfiguration. The configuration determines what parts of the API are desired to be used.

    By default, XR will be connected with the following configuration:

    const defaultXRConfiguration = {
    imageSourceConfig:
    {
    type: XRImageSource.DEVICE
    }
    }

    If unspecified, modelTrackingEnabled and autoShowBackgroundFeed will be inferred as true and deviceScreenshotsEnabled as false automatically.

    Note: If a change of configuration is required after being initialized, the user has to disconnectXR and connect with the new configuration.

    Parameters

    Returns Promise<void>

    Returns a Promise which resolved when the operation was successful or rejects in an error case

  • Creates a new keyframe-based animation sequence.

    Parameters

    • name: string

      The name of the animation sequence.

    • frames: AnimationFrame[]

      The keyframes of the animation sequence.

    Returns void

  • Creates a new Annotation.

    Parameters

    Returns number

    The id of the newly created Annotation.

  • Parameters

    • nodeID: number

      The ID of the node that the Annotation belongs to.

    • label: string

      The text of the Annotation.

    • Optional visible: boolean

      Indicates if the Annotation should be visible or hidden.

    • Optional anchorPosition: number[] | Float32Array

      Anchor position in world space coordinates.

    • Optional labelOffset: number[] | Float32Array

      The offset between anchorPosition and where the label should be displayed.

    Returns number

    The ID of the new annotation.

    Deprecated

    Creates a new annotation.

  • Creates a new attachment.

    Parameters

    • Optional dataType: AttachmentType

      Specifies the attachment data type.

    Returns number

    The attachment id.

  • Creates a new BoxVolume object.

    Parameters

    • Optional min: [number, number, number]
    • Optional max: [number, number, number]

    Returns BoxVolume

    A new Box Volume

  • Experimental

    Generates capping geometry for the surface that is cut by the clip plane. The generated surfaces allow measurements and all other operations which can be performed on usual geometry.

    Parameters

    • clipPlaneId: number

      the id of the clip plane

    Returns Promise<void>

  • Creates a new clip plane.

    Parameters

    Returns number

    The id of the newly created clip plane.

  • Creates a clip plane defined by the plane’s normal, positioned at an optional point (otherwise at the world space origin) and an optional name. Returns the ID of the clip plane.

    Parameters

    • Optional normal: number[] | Float32Array

      The normal of the clip plane

    • Optional point: number[] | Float32Array

      An arbitrary point in space which lies on the clip plane

    • Optional name: string

      The name of the clip plane

    • Optional thickness: number

      The thickness of the clip plane

    • Optional tangent: number[] | Float32Array

      The tangent of the clip plane

    • Optional disabled: boolean

      The state of the clip plane

    • Optional invisible: boolean

      Invisible on the UI

    • Optional exclusive: boolean

      set the exclusive flag to clip geometry when using exclusiveClipplanes property

    Returns number

    The ID of the newly created clip plane

    Deprecated

    Calling createClipPlane with single parameters is deprecated, please use ClipPlaneProperties instead.

  • Creates a new clip room.

    Parameters

    Returns void

  • Parameters

    • Optional name: string

      The name of the clip room.

    • Optional size: number[] | Float32Array

      The size of the clip room.

    • Optional transformation: number[] | Float32Array

      The transformation of the clip room.

    • Optional disabled: boolean

      The disabled state of the clip room.

    • Optional invisible: boolean

      The invisible state of the clip room.

    Returns void

    Deprecated

    Calling createClippingRoom with single parameters is deprecated, please use ClipRoomProperties instead.

    Creates a new clip room.

  • Returns the id of a new collection containing the nodes from the given list.

    Parameters

    • Optional nodeIDlist: number[]

      An array of node id's from which a new node collection should be created.

    Returns number

    The id of the newly created node collection.

  • Creates a new, empty collection and returns its id.

    Returns number

    The id of the newly created collection.

  • Experimental

    Creates a new DrawingPlane with the specified properties.

    Parameters

    Returns number

    The ID of the newly created Drawing.

  • Creates an Explosion (around a given point).

    Parameters

    • Optional centerNodeID: number

      The nodeID of the node around which center the explosion is created.

    Returns void

  • createNodePathHandles Creates and returns handles for the target node ids or topology selectors.

    Parameters

    • targets: number[]

      {Array} Array of target node ids to create the handles for

    Returns Promise<NodePathHandle[]>

    The array of handles

  • Creates a Snapshot of the current.

    Parameters

    • Optional name: string

      The Name of the Snapshot.

    • Optional options: SnapshotCreationOptions

      Options used for the Snapshot creation.

    Returns Promise<number>

    The Snapshot ID.

  • Creates a viewer element.

    Parameters

    • Optional viewerID: string

      The id of the viewer.

    • Optional canvas: HTMLCanvasElement

      The canvas which is attached to the viewer.

    • Optional settings: {
          aaSetting: any;
          backgroundColor: any;
          cappingEffectEdgeColor: any;
          cappingEffectEnabled: any;
          cappingEffectInnerColor: any;
          colorComparisonFirstColor: any;
          colorComparisonMatchingColor: any;
          colorComparisonSecondColor: any;
          colorizeEffect: any;
          coordSys: any;
          defaultFieldOfView: any;
          disableSpecularHighlights: any;
          doubleClickAnimationVolumeScale: any;
          doubleClickTimeWindow: any;
          drawingArrowheadEnd: any;
          drawingArrowheadStart: any;
          drawingColor: any;
          drawingMode: any;
          drawingSize: any;
          dynamicAuxContrastEnabled: any;
          dynamicCOREnabled: any;
          dynamicClippingDistance: any;
          dynamicClippingEnabled: any;
          expandOnViewerSelection: any;
          faceHighlightColor: any;
          faceSelectionColor: any;
          fitViewFactor: any;
          flyNavigationSpeed: any;
          flyToOnDoubleClick: any;
          focusOnDoubleClick: any;
          frustumCulling: any;
          ghostedSceneOpacity: any;
          gizmoScalingFactor: any;
          gizmosEnabled: any;
          gpuMemoryReleaseFactor: any;
          hoverColor: any;
          initView: any;
          initialFit: any;
          lightingEnvironment: any;
          lineHighlightColor: any;
          lineSelectionColor: any;
          maxDynamicClipDistance: any;
          maxGPUMemory: any;
          maxSRCCPUMemory: any;
          mouseInvertZoomingDirection: any;
          navigationMode: any;
          navigationSampling: any;
          navigationSpeedFactor: any;
          navigationSpeedThrottleFactor: any;
          outlineColor: any;
          outlineColorOccluded: any;
          outlineInnerRadius: any;
          outlineOuterRadius: any;
          preSelectionColor: any;
          projectionType: any;
          renderAuxOnTop: any;
          renderMode: any;
          renderSetup: any;
          screenSpaceCoverageCalculationMethod: any;
          selectionColor: any;
          showAuxOnNavigation: any;
          silhouetteEffect: any;
          silhouetteEffectColor: any;
          silhouetteEffectExclusiveEnabled: any;
          smallFeatureCulling: any;
          smallFeaturePixelThreshold: any;
          soc: any;
          spacemouseMultiplier: any;
          ssaoEnabled: any;
          taaEnabled: any;
          topoGeometryColor: any;
          topoGeometrySecondaryColor: any;
          topoPointsEnabled: any;
          turntableLowerVerticalLimit: any;
          turntableUpperVerticalLimit: any;
          turntableVerticalLimitsEnabled: any;
          useDevicePixelRatio: any;
          vertexColorsEnabled: any;
          viewPerspective: any;
          webglPreserveDrawingbuffer: any;
      }

      ViewerSettings

      • aaSetting: any
      • backgroundColor: any
      • cappingEffectEdgeColor: any
      • cappingEffectEnabled: any
      • cappingEffectInnerColor: any
      • colorComparisonFirstColor: any
      • colorComparisonMatchingColor: any
      • colorComparisonSecondColor: any
      • colorizeEffect: any
      • coordSys: any
      • defaultFieldOfView: any
      • disableSpecularHighlights: any
      • doubleClickAnimationVolumeScale: any
      • doubleClickTimeWindow: any
      • drawingArrowheadEnd: any
      • drawingArrowheadStart: any
      • drawingColor: any
      • drawingMode: any
      • drawingSize: any
      • dynamicAuxContrastEnabled: any
      • dynamicCOREnabled: any
      • dynamicClippingDistance: any
      • dynamicClippingEnabled: any
      • expandOnViewerSelection: any
      • faceHighlightColor: any
      • faceSelectionColor: any
      • fitViewFactor: any
      • flyNavigationSpeed: any
      • flyToOnDoubleClick: any
      • focusOnDoubleClick: any
      • frustumCulling: any
      • ghostedSceneOpacity: any
      • gizmoScalingFactor: any
      • gizmosEnabled: any
      • gpuMemoryReleaseFactor: any
      • hoverColor: any
      • initView: any
      • initialFit: any
      • lightingEnvironment: any
      • lineHighlightColor: any
      • lineSelectionColor: any
      • maxDynamicClipDistance: any
      • maxGPUMemory: any
      • maxSRCCPUMemory: any
      • mouseInvertZoomingDirection: any
      • navigationMode: any
      • navigationSampling: any
      • navigationSpeedFactor: any
      • navigationSpeedThrottleFactor: any
      • outlineColor: any
      • outlineColorOccluded: any
      • outlineInnerRadius: any
      • outlineOuterRadius: any
      • preSelectionColor: any
      • projectionType: any
      • renderAuxOnTop: any
      • renderMode: any
      • renderSetup: any
      • screenSpaceCoverageCalculationMethod: any
      • selectionColor: any
      • showAuxOnNavigation: any
      • silhouetteEffect: any
      • silhouetteEffectColor: any
      • silhouetteEffectExclusiveEnabled: any
      • smallFeatureCulling: any
      • smallFeaturePixelThreshold: any
      • soc: any
      • spacemouseMultiplier: any
      • ssaoEnabled: any
      • taaEnabled: any
      • topoGeometryColor: any
      • topoGeometrySecondaryColor: any
      • topoPointsEnabled: any
      • turntableLowerVerticalLimit: any
      • turntableUpperVerticalLimit: any
      • turntableVerticalLimitsEnabled: any
      • useDevicePixelRatio: any
      • vertexColorsEnabled: any
      • viewPerspective: any
      • webglPreserveDrawingbuffer: any

    Returns ViewerAPI

  • Experimental

    Disables the generated capping geometry.

    Parameters

    • clipPlaneId: number

      the id of the clip plane

    Returns Promise<void>

  • Returns void

    Deprecated

    The whole SessionAPI is under consolidation and will be replaced in a future release.

    Disconnects from a Session.

  • Experimental

    Disconnect from the XR system.

    This method should be called when the AR functionalities are no longer needed.

    Returns Promise<void>

    Returns a Promise which resolved when the operation was successful or rejects in an error case

  • Experimental

    Enables the generated capping geometry.

    Parameters

    • clipPlaneId: number

      the id of the clip plane

    Returns Promise<void>

  • Restores the initial transformations of all exploded parts.

    Returns void

  • Experimental

    Enter the XR initialization mode. The initialization mode is used as an entry point for model-based tracking. It unanchors any previously anchored model and starts the model-based tracking process. In this mode, the user can align the model with the real object (snapping). When the model is snapped, the anchored value will be set to true which will trigger a XRStateChangedEvent. By that, the init mode gets exited and the model is anchored to the real object. The model now gets tracked and moves with the device.

    Please note, that this method should only be called if the XR system has the SUPPORTS_MODEL_TRACKING capability.

    Parameters

    • Optional xrInitOptions: XRInitOptions

      The options for the XR initialization mode

    Returns Promise<void>

    Returns a Promise which resolved when the operation was successful or rejects in an error case

  • Experimental

    Exports an initialization template for model-based tracking.

    In a model-based tracking scenario, after a successful tracking session, the learned initialization data can be exported with this function and stored as a template for later.

    This method is only available if the XR system has the SUPPORTS_MODEL_TRACKING capability.

    The acquired data can be imported via importXRInitTemplate function.

    Returns Promise<string>

    Returns a Promise which contains the base64 encoded initialization template data when the operation was successful or rejects in an error case.

  • 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

  • Returns the ids of all available clip planes.

    Returns number[]

    The ids of all available clip planes.

  • Returns the id the clip room.

    Returns number

    The id the clip room.

  • Returns an array containing the ids of the nodes in the collection. Modifying the returned array results in undefined behavior.

    Parameters

    • collectionID: number

      The id of the node collection

    Returns Promise<number[]>

    Array of node IDs representing the node collection

    READONLY

  • Returns the number of elements inside a collection.

    Parameters

    • collectionID: number

      The id of the collection

    Returns Promise<number>

    Number of elements in a collection.

  • Returns the forward vector of the current coordinate system.

    Returns Float32Array | [number, number, number]

    The forward vector of the current coordinate system.

  • Returns a 4x4 rotation matrix which is used to transform the internal default right-handed coordinate system with X and Y as front plane axis to the configured one.

    Returns Float32Array | [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]

    The CoordinateSystem Matrix

  • Returns the right vector of the current coordinate system.

    Returns Float32Array | [number, number, number]

    Retuns

    The right vector of the current coordinate system.

  • Returns the up vector of the current coordinate system.

    Returns Float32Array | [number, number, number]

    The up vector of the current coordinate system.

  • Experimental

    Returns all available DrawingPlane IDs.

    Returns number[]

    An Array of all available DrawingPlane IDs.

  • Returns all available Drawing ids.

    Returns number[]

    An Array of all available Drawing ids.

  • Parameters

    • Optional nodeID: number

      Specifies the entry point of the subtree traversal (default: 0)

    Returns Promise<number[]>

    An Array of all enabled aux Node id's

    Deprecated

    This function will no longer be available in future webvis releases

    Traverses the subtree of a given nodeID and collects all enabled aux Nodes.

  • Returns the currently defined list of enabled LayerFilters.

    Returns string[]

    An array of strings representing the names of the enabled LayerFilters.

  • Returns a JSON object containing the metadata for the given nodeID.

    Parameters

    • nodeID: number

      The id of a Node.

    Returns Promise<{
        [key: string]: string;
    }>

    A JSON object containing the requested metadata.

  • Returns string

    The name of the context.

  • Returns the values of the properties on the Node with the matching id.

    Type Parameters

    • T extends string

    Parameters

    • nodeID: number

      The id of the Node whose properties should be read.

    • properties: T[]

      The names of the properties whose value should be read.

    Returns Promise<PropertyType<T>[]>

    The retrieved values of the Node's properties.

  • Returns the value of the property on the Node with the matching id.

    Type Parameters

    • T extends string

    Parameters

    • nodeID: number

      The id of the Node whose property should be read.

    • property: T

      The name of the property whose value should be read.

    Returns Promise<PropertyType<T>>

    The retrieved value of the Node property.

  • Returns the currently defined list of LayerFilters.

    Returns {
        [key: string]: boolean;
    }

    Returns the registered LayerFilters and their states.

    • [key: string]: boolean
  • Returns the root Node id of the given Node or Topology Element.

    Parameters

    • target: number | TopologyHandle

      Specifies the target Node or Topology Element.

    • Optional includeTarget: boolean

      Controls if the target Node itself can be returned as root Node. If set to false and a root Node id is passed in, it returns the next higher root Node id.

    Returns number

    • The root Node id of the given Node id or Topology handle.
  • Returns a list of all selected nodes.

    Returns number[]

    An array which contains the IDs of all Nodes in the current Selection.

  • Returns all selected leaf nodes.

    Returns number[]

    An array which contains the IDs of all leaf Nodes in the current Selection.

  • Returns a list of all selected nodes.

    Returns Promise<number[]>

    An array which contains the IDs of all leaf Nodes in the current Selection.

    Deprecated

    getSelection is deprecated, please use getSelectedNodes instead.

  • Returns number

    The ID of the SessionMember.

    Deprecated

    The whole SessionAPI is under consolidation and will be replaced in a future release.

  • Returns Promise<SessionMemberData[]>

    The IDs of all SessionMembers.

    Deprecated

    The whole SessionAPI is under consolidation and will be replaced in a future release.

  • Returns SessionStateData

    Information about the Session.

    Deprecated

    The whole SessionAPI is under consolidation and will be replaced in a future release.

  • Parameters

    • snapshotID: number

    Returns {
        attachmentID: number;
        name: string;
        order: number;
    }

    The data of the specified Snapshot.

    • attachmentID: number
    • name: string
    • order: number

    Deprecated

    getSnapshotData is deprecated, please use requestSnapshotData instead.

  • Returns the ids of all available Snapshots.

    Returns number[]

    The ids of all available Snapshots.

  • Traverses the subtree of a given nodeID and collects all statistics (currently only available for AUX-Nodes).

    Parameters

    • Optional nodeType: NodeType

      Specifies the target Node type.

    • Optional nodeID: number

      Specifies the entry point of the subtree traversal (default: 0).

    • Optional recursive: boolean

    Returns Promise<any>

    An Object of Type/Count pairs.

  • Parameters

    • Optional id: string

      The id of the viewer.

    Returns ViewerAPI

    The viewer element by the given id.

  • Experimental

    Returns an array of memberIDs of those session members which are currently using an XR device and have an active Reality connection. The array will not contain the session member ID of the current session member. If the session is not connected, the promise will reject with an error. If the session is connected, but no active Reality users are found, the promise will resolve with an empty array.

    Returns number[]

    The array of memberIDs of those session members that are currently publishing an XRImage stream

  • Experimental

    Get the runtime state of the XR system.

    Returns XRState

    Returns either the current XRState or undefined if the XR system is not connected.

  • Applies the specified set of settings to the context.

    Parameters

    • config: {
          aaSetting: any;
          additionalCookies: any;
          additionalRequestHeaders: any;
          additionalWSQueryParameters: any;
          applicationIdentifier: any;
          auxModeRecursiveSearch: any;
          auxModeUncolorFacesOnLeave: any;
          backgroundColor: any;
          boosterURL: any;
          cappingEffectEdgeColor: any;
          cappingEffectEnabled: any;
          cappingEffectInnerColor: any;
          cappingGeometryColor: any;
          colorComparisonFirstColor: any;
          colorComparisonMatchingColor: any;
          colorComparisonSecondColor: any;
          colorizeEffect: any;
          contextMenuFunction: any;
          coordSys: any;
          defaultFieldOfView: any;
          defaultQueryLinkDepth: any;
          disableDefaultInteraction: any;
          disableSpecularHighlights: any;
          doubleClickAnimationVolumeScale: any;
          doubleClickTimeWindow: any;
          drawingArrowheadEnd: any;
          drawingArrowheadStart: any;
          drawingColor: any;
          drawingMode: any;
          drawingSize: any;
          dynamicAuxContrastEnabled: any;
          dynamicCOREnabled: any;
          dynamicClippingDistance: any;
          dynamicClippingEnabled: any;
          expandOnViewerSelection: any;
          faceHighlightColor: any;
          faceSelectionColor: any;
          fitViewFactor: any;
          flyNavigationSpeed: any;
          flyToOnDoubleClick: any;
          focusOnDoubleClick: any;
          frontPlaneAxis: any;
          frustumCulling: any;
          ghostedSceneOpacity: any;
          gizmoScalingFactor: any;
          gizmosEnabled: any;
          gpuMemoryReleaseFactor: any;
          hoverColor: any;
          hubURL: any;
          initView: any;
          initialFit: any;
          initialStateActivation: any;
          lightingEnvironment: any;
          lineHighlightColor: any;
          lineSelectionColor: any;
          loadRemoteConfigFile: any;
          logLevel: any;
          maxActiveSceneVolumeDiameter: any;
          maxConcurrentDownloads: any;
          maxDynamicClipDistance: any;
          maxGPUMemory: any;
          maxSRCCPUMemory: any;
          measurementAngularTolerance: any;
          measurementMaterialDensities: any;
          mouseInvertZoomingDirection: any;
          navigationMode: any;
          navigationSampling: any;
          navigationSpeedFactor: any;
          navigationSpeedThrottleFactor: any;
          notificationLogLevels: any;
          outlineColor: any;
          outlineColorOccluded: any;
          outlineInnerRadius: any;
          outlineOuterRadius: any;
          parentSelectEnabled: any;
          preSelectionColor: any;
          preferXHRWithCredentials: any;
          projectionType: any;
          renderAuxOnTop: any;
          renderMode: any;
          renderSetup: any;
          screenSpaceCoverageCalculationMethod: any;
          selectionColor: any;
          sessionDeviceTags: any;
          sessionForwardUrl: any;
          sessionInteractions: any;
          sessionMemberName: any;
          showAuxOnNavigation: any;
          silhouetteEffect: any;
          silhouetteEffectColor: any;
          silhouetteEffectExclusiveEnabled: any;
          skipSslVerify: any;
          smallFeatureCulling: any;
          smallFeaturePixelThreshold: any;
          snapshotContentSelection: any;
          soc: any;
          spacemouseMultiplier: any;
          ssaoEnabled: any;
          taaEnabled: any;
          topoGeometryColor: any;
          topoGeometrySecondaryColor: any;
          topoPointsEnabled: any;
          turntableLowerVerticalLimit: any;
          turntableUpperVerticalLimit: any;
          turntableVerticalLimitsEnabled: any;
          uriMap: any;
          useDevicePixelRatio: any;
          vertexColorsEnabled: any;
          viewPerspective: any;
          webglPreserveDrawingbuffer: any;
          xrEnableDebugImages: any;
          xrFusionMode: any;
          xrImageCompressionQuality: any;
          xrImageResolutionProfile: any;
          xrModelTrackerQualityThreshold: any;
          xrModelTrackerSmoothingFactor: any;
      }

      Settings to import

      • aaSetting: any
      • additionalCookies: any
      • additionalRequestHeaders: any
      • additionalWSQueryParameters: any
      • applicationIdentifier: any
      • auxModeRecursiveSearch: any
      • auxModeUncolorFacesOnLeave: any
      • backgroundColor: any
      • boosterURL: any
      • cappingEffectEdgeColor: any
      • cappingEffectEnabled: any
      • cappingEffectInnerColor: any
      • cappingGeometryColor: any
      • colorComparisonFirstColor: any
      • colorComparisonMatchingColor: any
      • colorComparisonSecondColor: any
      • colorizeEffect: any
      • contextMenuFunction: any
      • coordSys: any
      • defaultFieldOfView: any
      • defaultQueryLinkDepth: any
      • disableDefaultInteraction: any
      • disableSpecularHighlights: any
      • doubleClickAnimationVolumeScale: any
      • doubleClickTimeWindow: any
      • drawingArrowheadEnd: any
      • drawingArrowheadStart: any
      • drawingColor: any
      • drawingMode: any
      • drawingSize: any
      • dynamicAuxContrastEnabled: any
      • dynamicCOREnabled: any
      • dynamicClippingDistance: any
      • dynamicClippingEnabled: any
      • expandOnViewerSelection: any
      • faceHighlightColor: any
      • faceSelectionColor: any
      • fitViewFactor: any
      • flyNavigationSpeed: any
      • flyToOnDoubleClick: any
      • focusOnDoubleClick: any
      • frontPlaneAxis: any
      • frustumCulling: any
      • ghostedSceneOpacity: any
      • gizmoScalingFactor: any
      • gizmosEnabled: any
      • gpuMemoryReleaseFactor: any
      • hoverColor: any
      • hubURL: any
      • initView: any
      • initialFit: any
      • initialStateActivation: any
      • lightingEnvironment: any
      • lineHighlightColor: any
      • lineSelectionColor: any
      • loadRemoteConfigFile: any
      • logLevel: any
      • maxActiveSceneVolumeDiameter: any
      • maxConcurrentDownloads: any
      • maxDynamicClipDistance: any
      • maxGPUMemory: any
      • maxSRCCPUMemory: any
      • measurementAngularTolerance: any
      • measurementMaterialDensities: any
      • mouseInvertZoomingDirection: any
      • navigationMode: any
      • navigationSampling: any
      • navigationSpeedFactor: any
      • navigationSpeedThrottleFactor: any
      • notificationLogLevels: any
      • outlineColor: any
      • outlineColorOccluded: any
      • outlineInnerRadius: any
      • outlineOuterRadius: any
      • parentSelectEnabled: any
      • preSelectionColor: any
      • preferXHRWithCredentials: any
      • projectionType: any
      • renderAuxOnTop: any
      • renderMode: any
      • renderSetup: any
      • screenSpaceCoverageCalculationMethod: any
      • selectionColor: any
      • sessionDeviceTags: any
      • sessionForwardUrl: any
      • sessionInteractions: any
      • sessionMemberName: any
      • showAuxOnNavigation: any
      • silhouetteEffect: any
      • silhouetteEffectColor: any
      • silhouetteEffectExclusiveEnabled: any
      • skipSslVerify: any
      • smallFeatureCulling: any
      • smallFeaturePixelThreshold: any
      • snapshotContentSelection: any
      • soc: any
      • spacemouseMultiplier: any
      • ssaoEnabled: any
      • taaEnabled: any
      • topoGeometryColor: any
      • topoGeometrySecondaryColor: any
      • topoPointsEnabled: any
      • turntableLowerVerticalLimit: any
      • turntableUpperVerticalLimit: any
      • turntableVerticalLimitsEnabled: any
      • uriMap: any
      • useDevicePixelRatio: any
      • vertexColorsEnabled: any
      • viewPerspective: any
      • webglPreserveDrawingbuffer: any
      • xrEnableDebugImages: any
      • xrFusionMode: any
      • xrImageCompressionQuality: any
      • xrImageResolutionProfile: any
      • xrModelTrackerQualityThreshold: any
      • xrModelTrackerSmoothingFactor: any

    Returns void

  • Imports a session from the data string of the given format. Supported formats are: JSON.

    Parameters

    • data: any

      the content of the file.

    • Optional format: "xscn"

    Returns Promise<any>

  • Experimental

    Imports an initialization template for model-based tracking.

    In a model-based tracking scenario, initialization templates are captured during the tracking process. This initialization data is linked to previously visited viewpoints along the traveled camera path. Once the tracking is lost the templates are used to quickly reinitialize from similar viewpoints without the user having to align the line model with the real object.

    Once the initialization template data is imported, it will persist until enterXRInitMode with resetInitTemplate set to true is called.

    This method is only available if the XR system has the SUPPORTS_MODEL_TRACKING capability.

    The input data can be aquired via the exportXRInitTemplate method.

    Parameters

    • template: string

    Returns Promise<void>

    Returns a Promise which resolved when the operation was successful or rejects in an error case

  • Checks if the color comparison mode is active.

    Returns boolean

    true if the color comparison mode is active, otherwise false.

  • Parameters

    • nodeID: number

    Returns boolean

    Returns true if a Node is deletable.

  • Returns true if the specified nodeID is part of an enabled Layer.

    Parameters

    • nodeID: number

      The nodeID which should be checked.

    Returns Promise<boolean>

  • Parameters

    • nodeId: number

      The ID of the Node.

    Returns Promise<boolean>

    True, if the Node is Part of an enabled Variant. False otherwise.

  • Parameters

    Returns boolean

    Checks the Node's type for the given Node id.

  • Returns Promise<boolean>

    Deprecated

    isOfflineStorageAvailable is deprecated.

    Checks if offline storage is currently available which can be used to transfer a session via transferSession.

  • Checks if the specified Node is part of the selection.

    Parameters

    • nodeID: number

      The ID of the node for which we would like to know if it is selected or not.

    Returns Promise<boolean>

    True of the given node is selected, otherwise false.

  • Checks if the specified Topology Element is part of the current selection.

    Parameters

    • handle: TopologyHandle

      The topology element which should be checked if it selected.

    Returns boolean

    A boolean value which indicates if the specified Topology Element is part of the current selection or not.

  • Maps the given original topology handles to webvis internal topology handles.

    Parameters

    • nodeID: number

      The Node which specifies the Part the topology relates to.

    • handles: OriginalTopologyHandle[]

      A list of original topology handles.

    Returns Promise<TopologyHandle[]>

    Promise<Array<TopologyHandle|undefined>> - A list of the corresponding webvis internal topology handles.

  • Performs the actual Explosion.

    Parameters

    • explosionFactor: number

      The value by which the parts are expanded.

    Returns void

  • Triggers an interaction on the current active interaction mode.

    Parameters

    • interactionData: InteractionData

      Definition of the triggered Interaction.

    Returns void

  • Parameters

    • memberID: number

      The ID of the SessionMember.

    Returns void

    Deprecated

    The whole SessionAPI is under consolidation and will be replaced in a future release.

    Promotes a SessionMember to the Role of the Moderator.

  • Executes the query on the specified subtree

    Parameters

    • query: string | Query
    • Optional nodeID: number

    Returns Promise<QueryResult>

  • Returns the value of a setting.

    Type Parameters

    • T extends string

    Parameters

    • setting: T

      The name of the setting that should be read

    Returns ContextSettingType<T>

    The value of the specified setting

  • Registering a new custom property.

    Parameters

    • name: string

      The name of the new property.

    • defaultValue: any

      Specifies the default value.

    • Optional recursive: boolean

      Defines whether the property is recursive.

    Returns void

  • Registers a listener function which get called once per internal update tick.

    Parameters

    Returns void

  • Registers the listener to the node with the matching nodeID and returns the id of the listener. The observeSubTree flag allows to observe the whole subtree under the respective node with the listener. With the eventTypes array, you can specify the types of events the listener should be reacting on. If an empty array is passed, the listener will react on all event types.

    Type Parameters

    Parameters

    • eventTypes: EventType[]

      The kind of events on which the event listener should listen.

    • listener: IEventListener<T>

      The event listener.

    • Optional nodeID: number

      The id of the node on which the event listener should be registered.

    • Optional observeSubTree: boolean

      Indicates whether the event listener should also listen to events in all child nodes. This has an effect on NODE_* events only.

    Returns number

    The id of the event listener.

  • Removes the Node for the given nodeID from the Scene and all related Snapshots. If no nodeID is supplied all Nodes are deleted.

    Parameters

    • Optional nodeID: number | number[]

      The id of the Node that should be removed.

    • Optional safe: boolean

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

    Returns Promise<RemoveState>

  • Removes an existing animation sequence.

    Parameters

    • name: string

      Specifies the name of the animation frames.

    Returns void

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

    Parameters

    • annotationId: number

      The ID of the Annotation.

    • Optional safe: boolean

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

    Returns RemoveState

  • 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

  • Experimental

    Removes the generated capping geometry.

    Parameters

    • clipPlaneId: number

      the id of the clip plane

    Returns Promise<void>

  • Removes a clip room with the specified id.

    Parameters

    • clipPlaneId: number

      The id of the clip room you want to remove.

    • Optional safe: boolean

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

    Returns RemoveState

  • Removes the clip room from the scene and all related Snapshots.

    Parameters

    • Optional safe: boolean

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

    Returns RemoveState

  • Removes a Drawing with the specified id. If a Drawing is part of a Snapshot the removal will fail with the State REFERENCED_BY_SNAPSHOT

    Parameters

    • drawingId: number

      The id of the to be removed Drawing.

    • Optional safe: boolean

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

    Returns RemoveState

  • Experimental

    Removes a DrawingPlane with the specified ID. If a DrawingPlane is part of a Snapshot the removal will fail with the State REFERENCED_BY_SNAPSHOT.

    Parameters

    • drawingPlaneId: number

      The ID of the Drawing you want to remove.

    • Optional safe: boolean

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

    Returns RemoveState

  • Removes a node given by nodeID from the collection with id collectionID. If recursive is true, the descendants of the node are also removed.

    Parameters

    • collectionID: number

      Specifies from which collection the node should be removed

    • nodeID: number

      Specifies which node should be removed from the collection

    • Optional recursive: boolean

      Specifies whether the children of the node should be removed from the collection too

    Returns void

  • Removes the given nodes from the Selection

    Parameters

    • nodeID: number | number[]

      The ID of the Node that should be removed from the current Selection

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<ChangeSelectionResult>

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

    Parameters

    • measurementID: number
    • Optional safe: boolean

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

    Returns RemoveState

  • Parameters

    • memberID: number

      The ID of the SessionMember.

    Returns void

    Deprecated

    The whole SessionAPI is under consolidation and will be replaced in a future release.

    Removes a SessionMember from a Session.

  • Deletes the Snapshot for given snapshotID.

    Parameters

    • snapshotID: number

    Returns void

  • Removes one or multiple Topology elements to the current selection.

    Parameters

    • handle: TopologyHandle | TopologyHandle[]

      A Topology Element or a list of Topology Elements which should be removed from the current selection.

    Returns Promise<void>

  • Removes a viewer element.

    Parameters

    Returns void

  • Returns a list of all existing aux root Node ids below the specified subtree.

    Parameters

    • Optional scopeNodeId: number

      Specifies the top one Node id of the subtree to be searched.

    Returns Promise<number[]>

    A list of aux root Node ids.

  • Returns the DrawingData for the specified Drawing id.

    Parameters

    • drawingId: number

      The id of the Drawing from which the data is requested.

    Returns Promise<DrawingData>

    The requested Drawing data.

  • Returns Promise<string>

    The current version of the connected instant3Dhub. May return undefined for older versions.

  • Returns the L3D information of the specified Node.

    Parameters

    • targetNodeId: number

      Specifies the target Node id.

    Returns Promise<any>

    The L3D information of the specified Node

  • Returns a List of all Node ids which are included or overlapped by the specified 3D world space Bounding Volume.

    Parameters

    • boxVolume: BoxVolume

      Specifies the 3D world space Bounding Volume.

    • Optional includeOverlappingNodes: boolean

      Specifies that the result should include Nodes which overlap the specified 3D world space Bounding Volume as well.

    • Optional includeDisabledNodes: boolean

      Specifies that the result should include Nodes which are disabled as well.

    • Optional forceExpand: boolean
    • Optional scopeNodeId: number

      Specifies the top one Node id of the subtree to be searched.

    Returns Promise<number[]>

    List of all NodeIds which are included or overlapped by the specified 3D world space Bounding Volume.

  • requestNodePathHandleMap Returns an object mapping from input paths to the respective handles.

    Parameters

    • paths: string[]

      {Array<string | NodePathHandle>} The array of node path strings or handles.

    • Optional scope: number

      {number} [scope=0] nodeID specifying the scope as starting point for the paths

    Returns Promise<NodePathHandleMap>

    The resulting object mapping paths to handles

  • requestNodePathStrings Returns string representations for the respective node path handles.

    Parameters

    • handles: NodePathHandle[]

      {Array}

    • Optional scope: number

      {number} nodeID specifying the scope as starting point for the path resolution

    • Optional typePriorities: NodePathFragmentType[]

      {Array} Array of priorities to control the fragments for the path string assembly.

    Returns Promise<string[]>

    String representation of the node path for the respective scope.

  • Returns a list of all existing root Node ids below the specified subtree.

    Parameters

    • Optional scopeNodeId: number

      Specifies the top one Node id of the subtree to be searched.

    • Optional recursive: boolean

      Specifies if the subtree is traversed recursively.

    Returns Promise<number[]>

    A list of root Node ids.

  • Returns Promise<{
        name: string;
        value: string;
    }[]>

    All supported render setups.

  • Experimental

    Request a screenshot of the webview's content inside the native XR device application.

    Returns Promise<string>

    Returns a Promise which contains the base64 encoded image data when the operation was successful or rejects in an error case.

  • Sets the current interaction mode back to the Default mode.

    Parameters

    • Optional keepColorCompareActive: boolean

      Specifies if the color comparison mode should stay active. (Default: false)

    Returns void

  • Resets the value of the specified properties on the given Node.

    Type Parameters

    • T extends string

    Parameters

    • nodeID: number

      The id of the Node whose property should be reset.

    • properties: T[]

      List of properties which should be reset.

    • Optional recursive: boolean

      If set to true, the properties are reset recursively.

    Returns Promise<void>

  • Resets the value of the property on the Node with the matching id.

    Type Parameters

    • T extends string

    Parameters

    • nodeID: number

      The id of the Node whose property should be reset.

    • property: T

      Property which should be reset.

    • Optional recursive: boolean

      If set to true, the properties are reset recursively.

    Returns Promise<void>

  • Restores a Session for the given access handle from the infrastructure.

    Parameters

    • handle: string

    Returns Promise<void>

  • Restores the Snapshot for the given snapshotID. The settings parameter allows to control the subset of the Snapshot data to be restored.

    Parameters

    Returns Promise<void>

  • Finds nodes within the given BoxVolume (created using the createBoxVolume() function). If includeOverlappingNodes is false, only nodes fully contained by the box volume are returned. The rootNodeID specifies the node from which the subtree is searched.

    Parameters

    • selectionBox: BoxVolume

      3-dimensional search volume.

    • includeOverlappingNodes: boolean

      Specifies whether the search result contains only those nodes which lie entirely in the search volume or if overlapping nodes are also included.

    • Optional rootNodeID: number

      Restricts the search to a subtree of a node with the given id.

    Returns Promise<number>

    A the id of the created collection of nodes that are fitting the given search criteria.

  • Experimental

    Jump to the frame with the specified index in the playback sequence. To get the total amount of frames in the sequence, see XRPlaybackProperties and getXRPlaybackProperties method.

    Triggers a XRPlaybackStateChangedEvent.

    Parameters

    • frameIndex: number

      The index of the frame to jump to

    Returns Promise<void>

    Returns a Promise which reports wether the operation was successful or not

  • Replaces the current Selection with the Nodes from the given Collection.

    Parameters

    • collectionID: number

      The ID of the Collection.

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<void | ChangeSelectionResult>

  • 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

  • Set the current interaction mode.

    Parameters

    • mode: string | string[]

      Specifies the interaction mode you want set.

    • Optional keepColorCompareActive: boolean

      Specifies if the color comparison mode should stay active. (Default: false)

    Returns void

    Deprecated

    Calling setInteractionMode with the mode parameter of type string or string[] is deprecated, please use the InteractionMode enum instead.

  • Set the current interaction mode.

    Parameters

    • mode: InteractionMode

      Specifies the interaction mode you want set.

    • Optional keepColorCompareActive: boolean

      Specifies if the color comparison mode should stay active. (Default: false)

    Returns void

  • Parameters

    • nodeID: number
    • newParentID: number

    Returns void

  • Sets the property named property to value on the Node with id nodeID.

    Type Parameters

    • T extends string

    Parameters

    • nodeID: number | number[]

      The id of the Node whose property has to be set.

    • property: T

      The name of the property that has to be set.

    • value: PropertyType<T>

      The new value of the specified property.

    • Optional silent: boolean

      The silent flag indicates that no NODE_CHANGED event is fired.

    Returns Promise<void>

  • Enables or disables a given Variant.

    Parameters

    • variant: number

      The ID of the Variant.

    • enabled: boolean

      The enabled state.

    Returns Promise<void>

  • Experimental

    Specify whether the playback should "boomerang" (play forward and backward in a loop). This is useful for creating a seamless transition at the end of a sequence in terms of pose updates.

    Parameters

    • boomerang: boolean

      Whether the playback should boomerang or not

    Returns Promise<void>

    Returns a Promise which reports whether the operation was successful or not

  • Experimental

    Sets the frame range to play back. The total amount of frames in a sequence can be found in the XRPlaybackProperties.

    Triggers a XRPlaybackStateChangedEvent.

    Parameters

    • startFrame: number

      The index of the first frame to play back

    • endFrame: number

      The index of the last frame to play back

    Returns Promise<number>

    Returns a Promise which resolves with the new amount of frames in the playback if successful and rejects otherwise

  • Experimental

    Set the URL pointing to the manifest.json file of the frame sequence to be played back.

    Triggers a XRPlaybackStateChangedEvent.

    Parameters

    • url: string

      The URL of the frame sequence

    Returns Promise<number>

    Returns a Promise which resolves with the amount of frames in the playback if successful and rejects otherwise

  • Experimental

    Set the desired playback speed. The specified speed must be a value between 0 and 1. It gives the playback speed as a fraction of the original FPS which is stored in the XRPlaybackProperties.

    Triggers a XRPlaybackStateChangedEvent.

    Parameters

    • speed: number

      The desired playback speed. Must be a value between 0 and 1.

    Returns void

  • Returns Promise<void>

    Deprecated

    The whole SessionAPI is under consolidation and will be replaced in a future release.

    Shuts down a Session and disconnects all joined SessionMembers.

  • Experimental

    Starts spectating the XRImage stream published by the session member with the specified ID within a shared session. This will also hide any other background feed that is currently shown.

    Parameters

    • sessionMemberId: number

      The session member id of the member to spectate

    Returns Promise<void>

    Returns a promise which resolves when the operation was successful or rejects in an error case

  • Experimental

    Stops spectating the currently spectated XRImage stream of a session member.

    Returns void

  • Temporarily stores the Session in the connected hub instance and returns an access handle. This function does not transfer Caches of referenced resources to the connected hub instance. For that, see transferSession.

    Returns Promise<string | void>

    The access handle of the stored Session.

  • Experimental

    Parameters

    Returns Promise<string | void>

    The access handle of the transferred Session.

    Deprecated

    transferSession with progress callback is deprecated. Please use transferSession without parameters and utilize the returned Promise instead!

    Temporarily stores the Session in the connected hub instance and returns an access handle. Transfers Caches of referenced resources to the connected hub instance if they are not already present.

  • Experimental

    Temporarily stores the Session in the connected hub instance and returns an access handle. Transfers Caches of referenced resources to the connected hub instance if they are not already present.

    Returns Promise<string | void>

    The access handle of the transferred Session.

  • Experimental

    Unanchors the model. This will have the effect that the model will no longer be anchored to the real world.

    This will trigger a XRStateChangedEvent with anchored set to false.

    Returns void

  • Removes the listener for the given listenerID.

    Parameters

    • listenerID: number

      The id of the event listener that should be unregistered.

    Returns void

  • Register a callback to a specific state. The callback is executed once when the state is reached. If webVis is already in that state the callback is triggered immediately.

    Parameters

    • state: ContextState

      The state for which a callback is registered

    Returns Promise<void>

    A promise which throws an error if the requested state is invalid

    The following states are allowed as target init - Is reached when webVis is fully configured and set up.
    resourceStateUpdated - Is reached when there is state information available for all resources (This information can also be "still transcoding").
    resourceProcessed - This is triggered when all resources are done transcoding.
    renderingFinished - This is triggered when webVis is done with rendering. So no more image changes are imminent.


Did you find this page useful? Please give it a rating:
Thank you for rating this page!
Any issues or feedback?
What kind of problem would you like to report?
Please tell us more about what's wrong: