ContextAPI

Interface ContextAPI

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

Hierarchy

Methods

add addCustomNode addToCollection addToSelection addTopologyToSelection changeAnnotation changeClipPlane changeClippingRoom changeDrawing changeMeasurement changeSetting changeSnapshot clearSelection clearTopologySelection clipOtherParts collectRuntimeNodesOfType connectToSession connectXRSession createAnimationFrames createAnnotation createAttachment createBoxVolume createCapping createClipPlane createClippingRoom createCollection createDrawing createExplosion createMeasurement createNodePathHandles createSnapshot createViewer disableCapping disconnectFromSession enableCapping endExplosion enterXRMemberInitMode exitXRMemberInitMode fetchAttachmentData fixateXRMember getAnnotationData getAnnotations getAttachmentData getAttachmentDataURI getClipPlanes getClipRoom getCollection getCollectionElements getCollectionNodeCount getDrawings getEnabledAuxNodes getEnabledLayerFilters getInteractionMode getMeasurementData getMeasurements getMetadata getName getProperties getProperty getRegisteredLayerFilters getRootNodeId getSelectedLeafNodes getSelectedNodes getSelectedTopologyHandles getSelection getSessionMemberID getSessionMembers getSessionStateData getSnapshotData getSnapshots getStatistics getTopologyType getViewer getViewers getXRMemberInfo getXRMemberState getXRMembers getXRSessionState importConfig importSession invertEnabledStates invertSelection isColorComparisonActive isNodeDeletable isNodePartOfEnabledLayers isNodePartOfEnabledVariant isNodeType isOfflineStorageAvailable isSelected isTopologySelected mapInternalToOriginalTopologyHandles mapOriginalToInternalTopologyHandles measureTangent performExplosion processInteractionInput promoteSessionMember query readSetting registerCustomProperty registerFrameListener registerListener remove removeAnimationFrames removeAnnotation removeAttachment removeCapping removeClipPlane removeClippingRoom removeCollection removeDrawing removeFromCollection removeFromSelection removeMeasurement removeSessionMember removeSnapshot removeTopologyFromSelection removeViewer requestActiveSceneVolume requestAdditionalMeasurementData requestAuxRootNodeIds requestClipPlaneData requestClipRoomData requestDrawingData requestFullSceneVolume requestL3DInformation requestNodeIdsByBoxVolume requestNodePathHandleMap requestNodePathStrings requestRootNodeIds requestSnapshotData requestSupportedContentTypes requestSupportedRenderSetups requestVariants requestXMemberCapabilities resetAR resetInteractionMode resetProperties resetProperty resetSetting resetUserSettings restoreMeasurement restoreSession restoreSnapshot searchByVolume selectCollection setAttachmentData setAttachmentDataURI setInteractionMode setLayerFilterEnabled setParent setProperty setSelection setTopologyProperty setTopologySelection setVariantEnabled setXRMemberSettings showExpertDialog shutdownSession startAR startXRMemberSpectate stopAR stopXRMemberSpectate storeSession unfixateXRMember unregisterFrameListener unregisterListener waitFor

Methods

  • Loads the resource behind the given dataURI and returns the id of the new contents root Node.

    Parameters

    • dataURI: string

      Specifies the URI of the data resource.

    • Optional parentID: number

      By specifying a parentID the resource can be added to an arbitrary Node instead of the tree root.

    • Optional usage: UsageString

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

    • Optional label: string

      The label can be used to set a string that is shown in the UI as a name of the Node.

    • Optional contentType: string

      With contentType the type of the input data can be specified with a MimeType or any other descriptor.

    • Optional initialProperties: { [key: string]: any }

      A map of properties to initialize the new Node.

      • [key: string]: any
    • Optional cacheStrategy: CacheStrategy

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

    Returns number

    The id of the new contents root Node

  • Variant of the add function, accepting a params object instead of explicit parameters. The params object is a map from parameter names to parameter values.

    Parameters

    • params: { [key: string]: any }

      The params object.

      • [key: string]: any

    Returns number

  • 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>

  • Changes an annotation.

    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: Float32Array | number[]

      Anchor position in world space coordinates.

    • Optional labelPosition: Float32Array | number[]

      The position of the label.

    • Optional active: boolean

      DEPRECATED

    • Optional transform: Float32Array | number[]

      The transformation of the annotation.

    Returns void

  • 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.

    Deprecated

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

    Parameters

    • clipPlaneID: number

      The ID of an existing clip plane which should be changed

    • Optional normal: Float32Array | number[]

      The new normal of the clip plane

    • Optional point: Float32Array | number[]

      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: Float32Array | number[]

      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

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

    Parameters

    • Optional properties: ClipRoomProperties

      The properties of the clip room you want change.

    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 a clip room with the specified id.

    Parameters

    • Optional name: string

      The name of the clip room.

    • Optional size: Float32Array | number[]

      The size of the clip room.

    • Optional transformation: Float32Array | number[]

      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.

  • 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.

    Deprecated

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

    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

    Returns SnapshotProperties

  • 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.

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

    Parameters

    • Optional sessionID: string

      The ID of the Session.

    • Optional name: string

      The ID of the Session.

    Returns Promise<SessionStateData>

  • 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

    • 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: Float32Array | number[]

      Anchor position in world space coordinates.

    • Optional labelOffset: Float32Array | number[]

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

    Returns number

    The ID of the new annotation.

  • 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.

    Deprecated

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

    Parameters

    • Optional normal: Float32Array | number[]

      The normal of the clip plane

    • Optional point: Float32Array | number[]

      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: Float32Array | number[]

      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

  • Creates a new clip room.

    Parameters

    Returns void

    The id of the newly created clip room.

  • Deprecated

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

    Creates a new clip room.

    Parameters

    • Optional name: string

      The name of the clip room.

    • Optional size: Float32Array | number[]

      The size of the clip room.

    • Optional transformation: Float32Array | number[]

      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

  • 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.

  • 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 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; 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; gizmoScalingFactor: any; gizmosEnabled: any; gpuMemoryReleaseFactor: 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; preSelectionColor: any; projectionType: any; renderAuxOnTop: any; renderMode: any; renderServiceCanvasRatio: any; renderSetup: any; screenSpaceCoverageCalculationMethod: any; selectionColor: any; showAuxOnNavigation: any; silhouetteEffect: any; silhouetteEffectColor: any; silhouetteEffectExclusiveEnabled: any; smallFeatureCulling: any; smallFeaturePixelThreshold: any; soc: any; spacemouseMultiplier: 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
      • 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
      • gizmoScalingFactor: any
      • gizmosEnabled: any
      • gpuMemoryReleaseFactor: 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
      • preSelectionColor: any
      • projectionType: any
      • renderAuxOnTop: any
      • renderMode: any
      • renderServiceCanvasRatio: any
      • renderSetup: any
      • screenSpaceCoverageCalculationMethod: any
      • selectionColor: any
      • showAuxOnNavigation: any
      • silhouetteEffect: any
      • silhouetteEffectColor: any
      • silhouetteEffectExclusiveEnabled: any
      • smallFeatureCulling: any
      • smallFeaturePixelThreshold: any
      • soc: any
      • spacemouseMultiplier: 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>

  • Disconnects from a Session.

    Returns void

  • 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

    enters the initialization phase for modeltracking, this is also used to reset the current modeltracking. It will also trigger REALITY_MODELTRACKERSTATE_CHANGED event with the ModelTrackingState.INIT set to true By default the modeltracking will be softreset. If you choose to reset different data on the modeltracker you can do so by specifying the xrInitOptions.

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    • Optional xrInitOptions: XRInitOptions

      Specify initOptions. E.g. reset behavior of modeltracker. Default is softreset.

    Returns Promise<boolean>

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

  • Experimental

    leaves the initialization phase for modeltracking, this will also fixate the model at the current position

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

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

  • Fetches & returns the attachment data.

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    Returns Promise<any>

    The attached data.

  • Experimental

    Fixates the model at the current position. It will also trigger REALITY_XRSTATE_CHANGED event with the XRState.FIXATED set to true

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

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

  • Returns the attachment data.

    Deprecated

    getAttachmentData is deprecated, please use fetchAttachmentData instead.

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    Returns any

    The attached data

  • 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.

    READONLY

    Parameters

    • collectionID: number

      The id of the node collection

    Returns Promise<number[]>

    Array of node IDs representing the node collection

  • 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 all available Drawing ids.

    Returns number[]

    An Array of all available Drawing ids.

  • 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.

    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

  • 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 id of the root Node for the given Node or Topology Element.

    • The id of the root Node for the given Node or Topology Element.

    Parameters

    • target: number | TopologyHandle

      Specifies a Node or Topology Element

    Returns number

  • 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.

    Deprecated

    getSelection is deprecated, please use getSelectedNodes instead.

    Returns Promise<number[]>

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

  • Returns number

    The ID of the SessionMember.

  • Returns Promise<SessionMemberData[]>

    The IDs of all SessionMembers.

  • Returns SessionStateData

    Information about the Session.

  • Deprecated

    getSnapshotData is deprecated, please use requestSnapshotData instead.

    Parameters

    • snapshotID: number

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

    The data of the specified Snapshot.

    • attachmentID: number
    • name: string
    • order: number
  • 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).

    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

    list all the available XR members in the current session

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns XRMemberInfo

    returns a struct containing all relevant infos (memberId, XRCapabilities, sessionMemberData) for the given member

  • Experimental

    Get the runtime state of a XR Member

    Parameters

    • memberId: number

      the XRMember that the state should be queried from

    Returns XRMemberState

    returns either the member state if the member exist or return undefined if xr is not connected or memberId does not exist

  • Experimental

    list all the available XR members in the current session

    Returns number[]

    returns a Promise with the list of all available XRMembers

  • Applies the specified set of settings to the context.

    Parameters

    • config: { aaSetting: any; additionalCookies: any; additionalRequestHeaders: any; additionalWSQueryParameters: any; annotationEditingEnabled: any; arkitConfigs: 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; customIconMap: any; customToolbarIconMap: any; defaultFieldOfView: any; defaultQueryLinkDepth: any; disableDefaultInteraction: any; disableSpecularHighlights: any; doubleClickAnimationVolumeScale: any; doubleClickTimeWindow: 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; gizmoScalingFactor: any; gizmosEnabled: any; gpuMemoryReleaseFactor: any; hubURL: any; initView: any; initialFit: any; initialStateActivation: any; language: any; lightingEnvironment: any; lineHighlightColor: any; lineSelectionColor: any; logLevel: any; maxActiveSceneVolumeDiameter: any; maxConcurrentDownloads: any; maxDynamicClipDistance: any; maxGPUMemory: any; maxSRCCPUMemory: any; measurementAngularTolerance: any; measurementMaterialDensities: any; modelviewPrintContentFunction: any; mouseInvertZoomingDirection: any; navigationMode: any; navigationSampling: any; navigationSpeedFactor: any; navigationSpeedThrottleFactor: any; notificationLogLevels: any; parentSelectEnabled: any; preSelectionColor: any; preferXHRWithCredentials: any; projectionType: any; renderAuxOnTop: any; renderMode: any; renderServiceCanvasRatio: 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; slamProviderType: any; smallFeatureCulling: any; smallFeaturePixelThreshold: any; snapshotContentSelection: any; soc: any; spacemouseMultiplier: any; topoGeometryColor: any; topoGeometrySecondaryColor: any; topoPointsEnabled: any; turntableLowerVerticalLimit: any; turntableUpperVerticalLimit: any; turntableVerticalLimitsEnabled: any; uriMap: any; useDevicePixelRatio: any; vertexColorsEnabled: any; viewPerspective: any; webglPreserveDrawingbuffer: any; xrEnabled: any; ´modelviewPrintResourceNameFunction: any }

      Settings to import

      • aaSetting: any
      • additionalCookies: any
      • additionalRequestHeaders: any
      • additionalWSQueryParameters: any
      • annotationEditingEnabled: any
      • arkitConfigs: 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
      • customIconMap: any
      • customToolbarIconMap: any
      • defaultFieldOfView: any
      • defaultQueryLinkDepth: any
      • disableDefaultInteraction: any
      • disableSpecularHighlights: any
      • doubleClickAnimationVolumeScale: any
      • doubleClickTimeWindow: 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
      • gizmoScalingFactor: any
      • gizmosEnabled: any
      • gpuMemoryReleaseFactor: any
      • hubURL: any
      • initView: any
      • initialFit: any
      • initialStateActivation: any
      • language: any
      • lightingEnvironment: any
      • lineHighlightColor: any
      • lineSelectionColor: any
      • logLevel: any
      • maxActiveSceneVolumeDiameter: any
      • maxConcurrentDownloads: any
      • maxDynamicClipDistance: any
      • maxGPUMemory: any
      • maxSRCCPUMemory: any
      • measurementAngularTolerance: any
      • measurementMaterialDensities: any
      • modelviewPrintContentFunction: any
      • mouseInvertZoomingDirection: any
      • navigationMode: any
      • navigationSampling: any
      • navigationSpeedFactor: any
      • navigationSpeedThrottleFactor: any
      • notificationLogLevels: any
      • parentSelectEnabled: any
      • preSelectionColor: any
      • preferXHRWithCredentials: any
      • projectionType: any
      • renderAuxOnTop: any
      • renderMode: any
      • renderServiceCanvasRatio: 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
      • slamProviderType: any
      • smallFeatureCulling: any
      • smallFeaturePixelThreshold: any
      • snapshotContentSelection: any
      • soc: any
      • spacemouseMultiplier: any
      • topoGeometryColor: any
      • topoGeometrySecondaryColor: any
      • topoPointsEnabled: any
      • turntableLowerVerticalLimit: any
      • turntableUpperVerticalLimit: any
      • turntableVerticalLimitsEnabled: any
      • uriMap: any
      • useDevicePixelRatio: any
      • vertexColorsEnabled: any
      • viewPerspective: any
      • webglPreserveDrawingbuffer: any
      • xrEnabled: any
      • ´modelviewPrintResourceNameFunction: 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>

  • 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.

  • 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.

  • Performs the actual Explosion.

    Parameters

    • explosionFactor: number

      The value by which the parts are expanded.

    Returns void

  • Promotes a SessionMember to the Role of the Moderator.

    Parameters

    • memberID: number

      The ID of the SessionMember.

    Returns void

  • 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 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 InstanceGraph. If no nodeID is supplied all Nodes are deleted.

    Parameters

    • Optional nodeID: number | number[]

      The id of the Node that should be removed.

    Returns Promise<void>

  • Removes an existing animation sequence.

    Parameters

    • name: string

      Specifies the name of the animation frames.

    Returns void

  • Removes an annotation.

    Parameters

    • annontationID: number

      The ID of the annotation.

    Returns void

  • Removes an existing attachment.

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    Returns void

  • 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.

    Returns void

  • 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>

  • The measurement for the given measurementID is removed.

    Parameters

    • measurementID: number

    Returns void

  • Removes a SessionMember from a Session.

    Parameters

    • memberID: number

      The ID of the SessionMember.

    Returns void

  • Deletes the Snapshot for given snapshotID.

    Parameters

    • snapshotID: number

    Returns void

  • Removes a viewer element.

    Parameters

    Returns void

  • Returns the active volume of currently loaded scene.

    Returns Promise<BoxVolume>

    The active volume of currently loaded scene.

  • Calculates the additional measurement information like thickness and displays it in the UI.

    Parameters

    • measurementID: number

      the ID of a Measurement

    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 the full volume of currently loaded scene.

    • The full volume of currently loaded scene.

    Returns Promise<BoxVolume>

  • 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.

  • Parameters

    • snapshotID: number

    Returns Promise<SnapshotProperties>

    The data of the specified Snapshot.

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

    All supported render setups.

  • Parameters

    • nodeId: number

      The ID of the Node.

    Returns Promise<VariantProperties[]>

    The Variant(s) for a given nodeID.

  • Experimental

    execute whatever is necessary to enable XRCapbilities on the given member, e.g. start the camera or forward to the booster

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

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

  • Deprecated

    restart modeltracker initialization for the local xr member

    Returns Promise<boolean>

    returns true if resetting was successfull or false if not

  • 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.

    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.

    Returns Promise<void>

  • Imports the Session for the given data handle from the infrastructure.

    Parameters

    • handle: string

    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.

  • 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.

    Parameters

    • Optional attachmentID: number

      Specifies the attachment object.

    • Optional data: any

      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.

    Deprecated

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

    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

  • 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<SetPropertyResults>

  • Replaces the current Selection with the specified nodes.

    Parameters

    • nodeID: number | number[]

      The nodeID(s) to select.

    • Optional silent: boolean

      If set to true, no event will be emitted.

    Returns Promise<ChangeSelectionResult>

  • Enables or disables a given Variant.

    Parameters

    • variant: number

      The ID of the Variant.

    • enabled: boolean

      The enabled state.

    Returns void

  • Experimental

    This will set settings for the specific xr member.

    modeltrackerQualityThreshold sets a normalized threshold for the modeltracker. The threshold determines the actual correspondence of the generated line model to the real world. A value of 1 means total correspondence, while a value of zero means no correspondence at all. Depending on that value the tracker will trigger a REALITY_MODELTRACKERSTATE_CHANGED event with the ModelTrackingState.SNAPPED to true and a REALITY_XRSTATE_CHANGED event with XRState.FIXATED set to true

    enableDebugImages will enable or disable the edge images to be send from the modeltracker. If set to true it will trigger REALITY_MODELTRACKER_EDGEIMG_RECEIVED events once an debug image arrives. Note: When enabled this will impact bandwidth and perfomance of the application, so we recommand using this only on demand.

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    • settings: XRMemberSettings

      The quality threshold for the modeltracker must be between 0 and 1

    Returns Promise<boolean>

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

  • Deprecated

    show expert dialog for developers or advanced users

    Returns Promise<boolean>

    returns true if the operation was successfull or false if not

  • Shuts down a Session and disconnects all joined SessionMembers.

    Returns Promise<void>

  • Deprecated

    start AR. Projects the camera stream in the background and starts searching for the given reference. The reference is defined by setting the realproperty on the particular node via the webvis API. E.g. webvis.setProperty(0, pluginAPI.realProperty, pluginAPI.realState.Enabled)

    Returns Promise<boolean>

    returns true if starting was successfull or false if it could not start AR

  • Experimental

    Puts the image stream in the background of the renderer. It will also trigger REALITY_XRSTATE_CHANGED event with the XRState.FOLLOWING set to true

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

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

  • Deprecated

    stop AR. Stop projecting the camera stream in the background and reset background to default color.

    Returns Promise<boolean>

    returns true if stopping was successfull or false if it could not stop AR

  • Experimental

    Stops the image stream in the background of the renderer. It will also trigger REALITY_XRSTATE_CHANGED event with the XRState.FOLLOWING set to false

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

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

  • Experimental

    Unfixates the model. The model will move with the device. It will also trigger REALITY_XRSTATE_CHANGED event with the XRState.FIXATED set to false

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

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

  • 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.

    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.

    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