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
Optionalrecursive: boolean
Specifies if the children of the node should also be added to the collection
A Topology Element or the list of Topology Elements which should be added to the current selection.
Returns Promise<void>
anchorXR
anchorXR(): 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).
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.
createClipPlane(normal?, point?, name?, thickness?, tangent?, disabled?, invisible?, exclusive?): number
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
Optionalnormal: number[] | Float32Array
The normal of the clip plane
Optionalpoint: number[] | Float32Array
An arbitrary point in space which lies on the clip plane
Optionalname: string
The name of the clip plane
Optionalthickness: number
The thickness of the clip plane
Optionaltangent: number[] | Float32Array
The tangent of the clip plane
Optionaldisabled: boolean
The state of the clip plane
Optionalinvisible: boolean
Invisible on the UI
Optionalexclusive: 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.
Optionalsettings: { Â Â Â Â 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; }
The whole SessionAPI is under consolidation and will be replaced in a future release.
Disconnects from a Session.
disconnectXR
disconnectXR(): Promise<void>
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
enableCapping
enableCapping(clipPlaneId): Promise<void>
Experimental
Enables the generated capping geometry.
Parameters
clipPlaneId: number
the id of the clip plane
Returns Promise<void>
endExplosion
endExplosion(): void
Restores the initial transformations of all exploded parts.
Returns void
enterXRInitMode
enterXRInitMode(xrInitOptions?): Promise<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.
Returns a Promise which resolved when the operation was successful or rejects in an error case
exportXRInitTemplate
exportXRInitTemplate(): Promise<string>
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.
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.
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.
getSelectedLeafNodes
getSelectedLeafNodes(): number[]
Returns a list of all selected nodes.
Returns number[]
An array which contains the IDs of all Nodes in the current Selection.
getSelectedNodes
getSelectedNodes(): number[]
Returns all selected leaf nodes.
Returns number[]
An array which contains the IDs of all leaf Nodes in the current Selection.
Get the array of XRCapability. The array of capabilities determines what parts of the API can be used. The capabilities
are mostly defined by the used device.
Returns an Array<XRCapability> containing the XR system's capabilities.
getXRMembers
getXRMembers(): number[]
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
Returns a Promise which resolved when the operation was successful or rejects in an error case
importConfig
importConfig(config): void
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
importSession
importSession(data, format?): Promise<any>
Imports a session from the data string of the given format.
Supported formats are: JSON.
Parameters
data: any
the content of the file.
Optionalformat: "xscn"
Returns Promise<any>
importXRInitTemplate
importXRInitTemplate(template): Promise<void>
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.
registerListener<T>(eventTypes, listener, nodeID?, observeSubTree?): number
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.
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.
Specifies whether the search result contains only those nodes which lie entirely in the search volume or if overlapping nodes are also included.
OptionalrootNodeID: 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.
seekXRPlayback
seekXRPlayback(frameIndex): Promise<void>
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.
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
Returns a Promise which resolves with the amount of frames in the playback if successful
and rejects otherwise
setXRPlaybackSpeed
setXRPlaybackSpeed(speed): void
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.
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
Stops spectating the currently spectated XRImage stream of a session member.
Returns void
storeSession
storeSession(): Promise<string | 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.
Can be used to track the progress of the transfer.
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.
transferSession(): Promise<string | void>
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.
unanchorXR
unanchorXR(): void
Experimental
Unanchors the model. This will have the effect that the model will no longer be anchored to the real world.
The id of the event listener that should be unregistered.
Returns void
waitFor
waitFor(state): Promise<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.
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.
The ContextAPI combines all functionality which can be applied on the WebvisContext.