ContextAPI#
Interface ContextAPI
Hierarchy
- AnnotationAPI
- ClipPlaneAPI
- CollectionAPI
- ContextStateAPI
- ExplosionAPI
- FrameAPI
- HubAPI
- InstanceGraphAPI
- InteractionAPI
- LayerFilterAPI
- EventAPI
- MeasurementAPI
- DrawingAPI
- DrawingPlaneAPI
- QueryAPI
- SelectionAPI
- SessionAPI
- SettingsAPI
- SessionStorageAPI
- UtilityAPI
- AttachmentAPI
- AnimationAPI
- NodePathAPI
- RealityAPI
- TopologyAPI
- VariantsAPI
- CoordinateSystemAPI
- ContextAPI
Index
Methods
Methods
add
- add(options): number
-
Adds a new Node to the InstanceGraph.
Parameters
-
options: AddNodeOptions
Specifies the options for the new Node.
Returns number
The id of added Node
-
- add(dataURI, parentID?, usage?, label?, contentType?, initialProperties?, cacheStrategy?): number
-
Parameters
-
dataURI: string
Specifies the URI to the data resource.
-
Optional
parentID: numberSpecifies the parent Node ID of the added Node.
-
Optional
usage: UsageStringThe usage parameter allows to define how the resource should be inserted in the InstanceGraph.
-
Optional
label: stringSpecifies a custom label for the added Node.
-
Optional
contentType: stringSpecifies the MimeType of the data resource.
-
Optional
initialProperties: InitialNodePropertiesSpecifies initialProperties of the added Node.
-
Optional
cacheStrategy: CacheStrategySpecifies 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.
-
add Custom Node
- add
Custom Node(customNodeType, data, dataType?): 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
-
add To Collection
- add
To Collection(collectionID, nodeID, recursive?): void -
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: booleanSpecifies if the children of the node should also be added to the collection
Returns void
-
add To Selection
- add
To Selection(nodeID, silent?): Promise<ChangeSelectionResult> -
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: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
add Topology To Selection
- add
Topology To Selection(handle): Promise<void> -
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>
-
change Annotation
- change
Annotation(annotationId, properties): AnnotationProperties -
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.
-
- change
Annotation(annotationID, label?, visible?, anchorPosition?, labelPosition?, active?, transform?): void -
Parameters
-
annotationID: number
The ID of the Annotation.
-
Optional
label: stringThe text of the Annotation.
-
Optional
visible: booleanIndicates if the Annotation should be visible or hidden.
-
Optional
anchorPosition: number[] | Float32ArrayAnchor position in world space coordinates.
-
Optional
labelPosition: number[] | Float32ArrayThe position of the label.
-
Optional
active: booleanDEPRECATED
-
Optional
transform: number[] | Float32ArrayThe transformation of the Annotation.
Returns void
Deprecated
Changes an annotation.
-
change Clip Plane
- change
Clip Plane(clipPlaneId, properties): ClipPlaneProperties -
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.
-
- change
Clip Plane(clipPlaneID, normal?, point?, name?, thickness?, tangent?, disabled?, invisible?, exclusive?): void -
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[] | Float32ArrayThe new normal of the clip plane
-
Optional
point: number[] | Float32ArrayAn arbitrary new point in space which lies on the clip plane
-
Optional
name: stringThe new name for the clip plane
-
Optional
thickness: numberThe thickness for the clip plane
-
Optional
tangent: number[] | Float32ArrayThe tangent of the clip plane
-
Optional
disabled: booleanThe enabled state of the clip plane
-
Optional
invisible: booleanInvisible on the UI
-
Optional
exclusive: booleanset the exclusive flag to clip geometry when using exclusiveClipplanes property
Returns void
Deprecated
Calling changeClipPlane with single parameters is deprecated, please use ClipPlaneProperties instead.
-
change Clipping Room
- change
Clipping Room(properties?): ClipRoomProperties -
Changes one or more properties of the clip room.
Parameters
-
Optional
properties: ClipRoomPropertiesThe properties of the clip room you want change.
Returns ClipRoomProperties
An object with the changed properties.
-
- change
Clipping Room(name?, size?, transformation?, disabled?, invisible?): ClipRoomProperties -
Parameters
-
Optional
name: stringThe name of the clip room.
-
Optional
size: number[] | Float32ArrayThe size of the clip room.
-
Optional
transformation: number[] | Float32ArrayThe transformation of the clip room.
-
Optional
disabled: booleanThe disabled state of the clip room.
-
Optional
invisible: booleanThe 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.
-
change Drawing
- change
Drawing(drawingId, properties): DrawingProperties -
Changes one or more properties of a Drawing with the specified id.
Parameters
-
drawingId: number
The id of the Drawing.
-
properties: DrawingProperties
The properties of the Drawing.
Returns DrawingProperties
An object with the changed properties.
-
change Drawing Plane
- change
Drawing Plane(drawingPlaneId, properties): DrawingPlaneProperties Experimental
Changes one or more properties of a DrawingPlane with the specified ID.
Parameters
-
drawingPlaneId: number
The ID of the DrawingPlane you want to change.
-
properties: DrawingPlaneProperties
The properties of the DrawingPlane you want change.
Returns DrawingPlaneProperties
An Object with the changed Properties.
-
change Measurement
- change
Measurement(measurementID, properties): MeasurementProperties -
Changes one or more properties of a Measurement with the specified id.
Parameters
-
measurementID: number
The id of the Measurement you want to change.
-
properties: MeasurementProperties
The properties of the Measurement you want change.
Returns MeasurementProperties
An Object with the changed Properties.
-
change Setting
- change
Setting<T>(setting, value): boolean -
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
-
change Snapshot
- change
Snapshot(snapshotID, properties): SnapshotProperties -
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.
-
- change
Snapshot(snapshotID, name?, screenshotURL?, order?): SnapshotProperties -
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: stringThe new name of the Snapshot.
-
Optional
screenshotURL: stringThe new screenshot URL of the Snapshot.
-
Optional
order: numberThe order inside the List of Snapshots.
Returns SnapshotProperties
Deprecated
Calling changeSnapshot with single parameters is deprecated, please use SnapshotProperties instead.
-
clear
clear Selection
- clear
Selection(silent?): Promise<ChangeSelectionResult> -
Clears the current Selection.
Parameters
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
clear Topology Selection
clip Other Parts
collect Runtime Nodes Of Type
- collect
Runtime Nodes Of Type(nodeType, subType?): number[] -
Returns a list of all existing runtime Node ids of a specified type.
Parameters
-
nodeType: NodeType
The Node type to collect.
-
Optional
subType: stringThe sub type to collect. Only used for Custom-Nodes.
Returns number[]
A list of runtime Node ids of the specified type.
-
connect To Session
- connect
To Session(sessionID?, name?): Promise<SessionStateData> -
Parameters
-
Optional
sessionID: stringThe ID of the Session.
-
Optional
name: stringThe 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.
-
connectXRSession
- connectXRSession(): Promise<XRSessionState>
Experimental
Connects to the XR Session.
Returns Promise<XRSessionState>
Returns a Promise with the current XRSessionState.
create Animation Frames
- create
Animation Frames(name, frames): void -
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
-
create Annotation
- create
Annotation(properties?): number -
Creates a new Annotation.
Parameters
-
Optional
properties: AnnotationPropertiesInitial properties of the created Annotation.
Returns number
The id of the newly created Annotation.
-
- create
Annotation(nodeID, label, visible?, anchorPosition?, labelOffset?): number -
Parameters
-
nodeID: number
The ID of the node that the Annotation belongs to.
-
label: string
The text of the Annotation.
-
Optional
visible: booleanIndicates if the Annotation should be visible or hidden.
-
Optional
anchorPosition: number[] | Float32ArrayAnchor position in world space coordinates.
-
Optional
labelOffset: number[] | Float32ArrayThe offset between anchorPosition and where the label should be displayed.
Returns number
The ID of the new annotation.
Deprecated
Creates a new annotation.
-
create Attachment
- create
Attachment(dataType?): number -
Creates a new attachment.
Parameters
-
Optional
dataType: AttachmentTypeSpecifies the attachment data type.
Returns number
The attachment id.
-
create Box Volume
create Capping
- create
Capping(clipPlaneId): Promise<void> 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>
-
create Circular Arc Descriptor
- create
Circular Arc Descriptor(point0, point1, point2): {
descriptor: TopologyCircularArcDescriptor;
type: CIRCULAR_ARC;
} -
Create Circular arc descriptor by the three specified points.
Parameters
-
point0: [number, number, number]
The first point.
-
point1: [number, number, number]
The second point.
-
point2: [number, number, number]
The third point.
Returns {
descriptor: TopologyCircularArcDescriptor;
type: CIRCULAR_ARC;
}-
descriptor: TopologyCircularArcDescriptor
The attributes of the Topological Element.
-
type: CIRCULAR_ARC
The syb type of the Topological Element.
-
create Clip Plane
- create
Clip Plane(properties?): number -
Creates a new clip plane.
Parameters
-
Optional
properties: ClipPlanePropertiesInitial properties of the created clip plane.
Returns number
The id of the newly created clip plane.
-
- create
Clip Plane(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
-
Optional
normal: number[] | Float32ArrayThe normal of the clip plane
-
Optional
point: number[] | Float32ArrayAn arbitrary point in space which lies on the clip plane
-
Optional
name: stringThe name of the clip plane
-
Optional
thickness: numberThe thickness of the clip plane
-
Optional
tangent: number[] | Float32ArrayThe tangent of the clip plane
-
Optional
disabled: booleanThe state of the clip plane
-
Optional
invisible: booleanInvisible on the UI
-
Optional
exclusive: booleanset 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.
-
create Clipping Room
- create
Clipping Room(properties?): void -
Creates a new clip room.
Parameters
-
Optional
properties: ClipRoomPropertiesInitial properties of the created clip room.
Returns void
-
- create
Clipping Room(name?, size?, transformation?, disabled?, invisible?): void -
Parameters
-
Optional
name: stringThe name of the clip room.
-
Optional
size: number[] | Float32ArrayThe size of the clip room.
-
Optional
transformation: number[] | Float32ArrayThe transformation of the clip room.
-
Optional
disabled: booleanThe disabled state of the clip room.
-
Optional
invisible: booleanThe 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.
-
create Collection
- create
Collection(nodeIDlist?): number -
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.
-
- create
Collection(): number -
Creates a new, empty collection and returns its id.
Returns number
The id of the newly created collection.
create Drawing
- create
Drawing(data, properties?): number -
Creates a new Drawing from the Output of the ViewerDrawingAPI.
Parameters
-
data: ViewerDrawingResult
The data generated with the help of the ViewerDrawingAPI.
-
Optional
properties: DrawingPropertiesInitial properties of the created Drawing.
Returns number
The id of the newly created Drawing.
-
create Drawing Plane
- create
Drawing Plane(properties?): number Experimental
Creates a new DrawingPlane with the specified properties.
Parameters
-
Optional
properties: DrawingPlanePropertiesInitial properties of the created Drawing.
Returns number
The ID of the newly created Drawing.
-
create Explosion
create Measurement
- create
Measurement<T>(type, targets, properties?): number -
Creates a new Measurement.
Type Parameters
-
T extends keyof MeasurementTypeToTargetMap
Parameters
-
type: T
The type of the Measurement.
-
targets: MeasurementTypeToTargetMap[T]
The targets of the Measurement.
-
Optional
properties: MeasurementPropertiesThe properties of the Measurement.
Returns number
The ID of the created Measurement.
-
create Node Path Handles
- create
Node Path Handles(targets): Promise<NodePathHandle[]> -
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
-
create Point Descriptor
- create
Point Descriptor(point): {
descriptor: TopologyPointDescriptor;
type: POINT;
} -
Create Point descriptor by the specified point.
Parameters
-
point: [number, number, number]
The point.
Returns {
descriptor: TopologyPointDescriptor;
type: POINT;
}-
descriptor: TopologyPointDescriptor
The attributes of the Topological Element.
-
type: POINT
The syb type of the Topological Element.
-
create Snapshot
- create
Snapshot(name?, options?): Promise<number> -
Creates a Snapshot of the current.
Parameters
-
Optional
name: stringThe Name of the Snapshot.
-
Optional
options: SnapshotCreationOptionsOptions used for the Snapshot creation.
Returns Promise<number>
The Snapshot ID.
-
create Viewer
- create
Viewer(viewerID?, canvas?, settings?): ViewerAPI -
Creates a viewer element.
Parameters
-
Optional
viewerID: stringThe id of the viewer.
-
Optional
canvas: HTMLCanvasElementThe 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;
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;
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
-
aa
Setting: any -
background
Color: any -
capping
Effect Edge Color: any -
capping
Effect Enabled: any -
capping
Effect Inner Color: any -
color
Comparison First Color: any -
color
Comparison Matching Color: any -
color
Comparison Second Color: any -
colorize
Effect: any -
coord
Sys: any -
default
Field Of View: any -
disable
Specular Highlights: any -
double
Click Animation Volume Scale: any -
double
Click Time Window: any -
drawing
Arrowhead End: any -
drawing
Arrowhead Start: any -
drawing
Color: any -
drawing
Mode: any -
drawing
Size: any -
dynamic
Aux Contrast Enabled: any -
dynamicCOREnabled: any
-
dynamic
Clipping Distance: any -
dynamic
Clipping Enabled: any -
expand
On Viewer Selection: any -
face
Highlight Color: any -
face
Selection Color: any -
fit
View Factor: any -
fly
Navigation Speed: any -
fly
To On Double Click: any -
focus
On Double Click: any -
frustum
Culling: any -
gizmo
Scaling Factor: any -
gizmos
Enabled: any -
gpu
Memory Release Factor: any -
hover
Color: any -
init
View: any -
initial
Fit: any -
lighting
Environment: any -
line
Highlight Color: any -
line
Selection Color: any -
max
Dynamic Clip Distance: any -
maxGPUMemory: any
-
maxSRCCPUMemory: any
-
mouse
Invert Zooming Direction: any -
navigation
Mode: any -
navigation
Sampling: any -
navigation
Speed Factor: any -
navigation
Speed Throttle Factor: any -
pre
Selection Color: any -
projection
Type: any -
render
Aux On Top: any -
render
Mode: any -
render
Setup: any -
screen
Space Coverage Calculation Method: any -
selection
Color: any -
show
Aux On Navigation: any -
silhouette
Effect: any -
silhouette
Effect Color: any -
silhouette
Effect Exclusive Enabled: any -
small
Feature Culling: any -
small
Feature Pixel Threshold: any -
soc: any
-
spacemouse
Multiplier: any -
ssao
Enabled: any -
taa
Enabled: any -
topo
Geometry Color: any -
topo
Geometry Secondary Color: any -
topo
Points Enabled: any -
turntable
Lower Vertical Limit: any -
turntable
Upper Vertical Limit: any -
turntable
Vertical Limits Enabled: any -
use
Device Pixel Ratio: any -
vertex
Colors Enabled: any -
view
Perspective: any -
webgl
Preserve Drawingbuffer: any
-
Returns ViewerAPI
-
disable Capping
disconnect From Session
enable Capping
end Explosion
enterXRMember Init Mode
- enterXRMember
Init Mode(memberId, xrInitOptions?): Promise<boolean> Experimental
Enters the initialization phase for modeltracking. This is also used to reset the current modeltracking. It will also trigger a XRMemberStateChangedEvent event with FIXATED set to false. 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: XRInitOptionsSpecify initialization options. E.g. reset behavior of modeltracker. Default is softreset.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
exitXRMember Init Mode
- exitXRMember
Init Mode(memberId): Promise<boolean> Experimental
Exits the initialization phase for modeltracking, this will also anchor 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 whether the operation was successful or not.
-
exportXRInit Template
- exportXRInit
Template(memberId): Promise<string> Experimental
Exports init template for modeltracking. Usage: After a successful tracking session, the learned init template data can be exported with this function and stored for later.
Only supported if the XRMember has the MODELTRACKER capability.
The aquired data can be imported via importXRInitTemplate function
Parameters
-
memberId: number
the XRMember that the operation should be applied on
Returns Promise<string>
base64 encoded init template data
-
fetch Attachment Data
fixateXRMember
- fixateXRMember(memberId): Promise<boolean>
Experimental
Anchors the model at the current position. It will also trigger a XRMemberStateChangedEvent event with FIXATED set to true.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
get Annotation Data
- get
Annotation Data(annotationId): AnnotationData -
Parameters
-
annotationId: number
The ID of the Annotation.
Returns AnnotationData
The content and properties of an annotation.
Deprecated
-
get Annotations
get Attachment Data
- get
Attachment Data<T>(attachmentID?): T -
Returns the attachment data.
Type Parameters
-
T = any
Parameters
-
Optional
attachmentID: numberSpecifies the attachment object.
Returns T
The attached data
Deprecated
getAttachmentData is deprecated, please use fetchAttachmentData instead.
-
get Attachment DataURI
get Clip Planes
get Clip Room
get Collection
- get
Collection(collectionID): ICollection -
Parameters
-
collectionID: number
Returns ICollection
-
get Collection Elements
- get
Collection Elements(collectionID): Promise<number[]> -
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
-
get Collection Node Count
get Coordinate System Forward Vector
get Coordinate System Matrix
- get
Coordinate System Matrix(): Float32Array | [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] -
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
get Coordinate System Right Vector
get Coordinate System Up Vector
get Drawing Plane Data
- get
Drawing Plane Data(drawingPlaneId): DrawingPlaneProperties Experimental
Returns the DrawingPlane properties for the specified DrawingPlane ID.
Parameters
-
drawingPlaneId: number
The ID of the DrawingPlane you want to get the Data for.
Returns DrawingPlaneProperties
The requested DrawingPlane properties.
-
get Drawing Planes
get Drawings
get Enabled Aux Nodes
- get
Enabled Aux Nodes(nodeID?): Promise<number[]> -
Parameters
-
Optional
nodeID: numberSpecifies 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.
-
get Enabled Layer Filters
get Interaction Mode
- get
Interaction Mode(): InteractionMode -
Returns the current Interaction mode.
Returns InteractionMode
The current Interaction mode.
get Measurements
get Metadata
get Name
get Properties
- get
Properties<T>(nodeID, properties): Promise<PropertyType<T>[]> -
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.
-
get Property
- get
Property<T>(nodeID, property): Promise<PropertyType<T>> -
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.
-
get Registered Layer Filters
get Root Node Id
- get
Root Node Id(target, includeTarget?): number -
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: booleanControls 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.
-
get Selected Leaf Nodes
get Selected Nodes
get Selected Topology Handles
- get
Selected Topology Handles(): TopologyHandle[] -
Returns a list of all selected topology elements.
Returns TopologyHandle[]
A List of all selected Topology elements.
get Selection
- get
Selection(): Promise<number[]> -
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.
get Session MemberID
get Session Members
get Session State Data
get Shape Handle
- get
Shape Handle(handle): TopologyHandle -
Returns a handle to the corresponding Shape of the specified Topology Element.
Parameters
-
handle: TopologyHandle
The Topology Handle.
Returns TopologyHandle
- The corresponding Shape of the specified Topology Element.
-
get Snapshot Data
- get
Snapshot Data(snapshotID): {
attachmentID: number;
name: string;
order: number;
} -
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.
-
get Snapshots
get Statistics
- get
Statistics(nodeType?, nodeID?, recursive?): Promise<any> -
Traverses the subtree of a given nodeID and collects all statistics (currently only available for AUX-Nodes).
Parameters
-
Optional
nodeType: NodeTypeSpecifies the target Node type.
-
Optional
nodeID: numberSpecifies the entry point of the subtree traversal (default: 0).
-
Optional
recursive: boolean
Returns Promise<any>
An Object of Type/Count pairs.
-
get Topology Type
- get
Topology Type(handle): TopologyType -
Returns the type of the given topology element
Parameters
-
handle: TopologyHandle
The TopologyHandle.
Returns TopologyType
The type of the given topology element
-
get Viewer
get Viewers
getXRMember Info
- getXRMember
Info(memberId): XRMemberInfo Experimental
Get the XRMemberInfo for a given XRMember.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns XRMemberInfo
Returns an XRMemberInfo struct containing all relevant infos (memberId, XRCapabilities, sessionMemberData) for the given member.
-
getXRMember State
- getXRMember
State(memberId): XRMemberState Experimental
Get the runtime state of a given XRMember.
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 the memberId does not exist.
-
getXRMembers
getXRSession State
- getXRSession
State(): XRSessionState Experimental
Get the current XRSessionState. This method can be used to check if the XR session is currently connected.
Returns XRSessionState
Returns the current XRSessionState.
import Config
- import
Config(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;
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;
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;
slamProviderType: 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;
xrEnabled: any;
}Settings to import
-
aa
Setting: any -
additional
Cookies: any -
additional
Request Headers: any -
additionalWSQuery
Parameters: any -
application
Identifier: any -
aux
Mode Recursive Search: any -
aux
Mode Uncolor Faces On Leave: any -
background
Color: any -
boosterURL: any
-
capping
Effect Edge Color: any -
capping
Effect Enabled: any -
capping
Effect Inner Color: any -
capping
Geometry Color: any -
color
Comparison First Color: any -
color
Comparison Matching Color: any -
color
Comparison Second Color: any -
colorize
Effect: any -
context
Menu Function: any -
coord
Sys: any -
default
Field Of View: any -
default
Query Link Depth: any -
disable
Default Interaction: any -
disable
Specular Highlights: any -
double
Click Animation Volume Scale: any -
double
Click Time Window: any -
drawing
Arrowhead End: any -
drawing
Arrowhead Start: any -
drawing
Color: any -
drawing
Mode: any -
drawing
Size: any -
dynamic
Aux Contrast Enabled: any -
dynamicCOREnabled: any
-
dynamic
Clipping Distance: any -
dynamic
Clipping Enabled: any -
expand
On Viewer Selection: any -
face
Highlight Color: any -
face
Selection Color: any -
fit
View Factor: any -
fly
Navigation Speed: any -
fly
To On Double Click: any -
focus
On Double Click: any -
front
Plane Axis: any -
frustum
Culling: any -
gizmo
Scaling Factor: any -
gizmos
Enabled: any -
gpu
Memory Release Factor: any -
hover
Color: any -
hubURL: any
-
init
View: any -
initial
Fit: any -
initial
State Activation: any -
lighting
Environment: any -
line
Highlight Color: any -
line
Selection Color: any -
load
Remote Config File: any -
log
Level: any -
max
Active Scene Volume Diameter: any -
max
Concurrent Downloads: any -
max
Dynamic Clip Distance: any -
maxGPUMemory: any
-
maxSRCCPUMemory: any
-
measurement
Angular Tolerance: any -
measurement
Material Densities: any -
mouse
Invert Zooming Direction: any -
navigation
Mode: any -
navigation
Sampling: any -
navigation
Speed Factor: any -
navigation
Speed Throttle Factor: any -
notification
Log Levels: any -
parent
Select Enabled: any -
pre
Selection Color: any -
preferXHRWith
Credentials: any -
projection
Type: any -
render
Aux On Top: any -
render
Mode: any -
render
Setup: any -
screen
Space Coverage Calculation Method: any -
selection
Color: any -
session
Device Tags: any -
session
Forward Url: any -
session
Interactions: any -
session
Member Name: any -
show
Aux On Navigation: any -
silhouette
Effect: any -
silhouette
Effect Color: any -
silhouette
Effect Exclusive Enabled: any -
skip
Ssl Verify: any -
slam
Provider Type: any -
small
Feature Culling: any -
small
Feature Pixel Threshold: any -
snapshot
Content Selection: any -
soc: any
-
spacemouse
Multiplier: any -
ssao
Enabled: any -
taa
Enabled: any -
topo
Geometry Color: any -
topo
Geometry Secondary Color: any -
topo
Points Enabled: any -
turntable
Lower Vertical Limit: any -
turntable
Upper Vertical Limit: any -
turntable
Vertical Limits Enabled: any -
uri
Map: any -
use
Device Pixel Ratio: any -
vertex
Colors Enabled: any -
view
Perspective: any -
webgl
Preserve Drawingbuffer: any -
xr
Enabled: any
-
Returns void
-
import Session
importXRInit Template
- importXRInit
Template(memberId, template): Promise<void> Experimental
Imports init template for modeltracking. When using Model tracking, Init templates are captured during the tracking process. This initialization data is linked to previously visited view-points along the traveled camera path. Once the tracking is lost the templates are used to quickly reinitialize from similar view-points without the user having to align the line model with the real object.
Once the init template data is imported. It will stay until enterInitMode with resetInitTemplate set to true is called.
Only supported if the XRMember has the MODELTRACKER capability.
The input data can be aquired via exportXRInitTemplate function
Parameters
-
memberId: number
the XRMember that the operation should be applied on
-
template: string
Returns Promise<void>
-
invert Enabled States
invert Selection
- invert
Selection(silent?): Promise<ChangeSelectionResult> -
Inverts the current Selection.
Parameters
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
is Color Comparison Active
is Node Deletable
is Node Part Of Enabled Layers
is Node Part Of Enabled Variant
is Node Type
- is
Node Type(nodeID, nodeType): boolean -
Parameters
-
nodeID: number
-
nodeType: NodeType
Returns boolean
Checks the Node's type for the given Node id.
-
is Offline Storage Available
- is
Offline Storage Available(): Promise<boolean> -
Checks if offline storage is currently available which can be used to transfer a session via transferSession.
Returns Promise<boolean>
is Selected
is Topology Selected
- is
Topology Selected(handle): boolean -
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.
-
map Internal To Original Topology Handles
- map
Internal To Original Topology Handles(handles): Promise<OriginalTopologyHandle[]> -
Maps the given webvis internal topology handles to original topology handles.
Parameters
-
handles: TopologyHandle[]
A list of webvis internal topology handles.
Returns Promise<OriginalTopologyHandle[]>
Promise<Array<OriginalTopologyHandle|undefined>> - A list of the corresponding original topology handles.
-
map Original To Internal Topology Handles
- map
Original To Internal Topology Handles(nodeID, handles): Promise<TopologyHandle[]> -
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.
-
measure Between
- measure
Between(target0, target1): Promise<BetweenMeasurementResult> -
Measures the distance and if possible the angle between two measurement targets.
Parameters
-
target0: MeasurementTarget
The first measurement target.
-
target1: MeasurementTarget
The second measurement target.
Returns Promise<BetweenMeasurementResult>
The result of the Measurement between the two specified targets.
-
measure Tangent
- measure
Tangent(topology, point): Promise<TangentMeasurementResult> -
Measures the tangent of an edge at the specified point.
Parameters
-
topology: {
class: TOPOLOGY;
value: TopologyHandle;
}The topological target.
-
class: TOPOLOGY
Describes the MeasurementTargetClass of the target.
-
value: TopologyHandle
Describes the value of the target depending on the specified class.
-
-
point: {
class: POINT;
value: [number, number, number];
}The point target.
-
class: POINT
Describes the MeasurementTargetClass of the target.
-
value: [number, number, number]
Describes the value of the target depending on the specified class.
-
Returns Promise<TangentMeasurementResult>
The result of the tangent measurement.
-
measure Thickness
- measure
Thickness(topology, point): Promise<ThicknessMeasurementResult> -
Measures the thickness of a shape at the specified point.
Parameters
-
topology: {
class: TOPOLOGY;
value: TopologyHandle;
}The topological target.
-
class: TOPOLOGY
Describes the MeasurementTargetClass of the target.
-
value: TopologyHandle
Describes the value of the target depending on the specified class.
-
-
point: {
class: POINT;
value: [number, number, number];
}The point target.
-
class: POINT
Describes the MeasurementTargetClass of the target.
-
value: [number, number, number]
Describes the value of the target depending on the specified class.
-
Returns Promise<ThicknessMeasurementResult>
The result of the thickness measurement.
-
perform Explosion
process Interaction Input
- process
Interaction Input(interactionData): void -
Triggers an interaction on the current active interaction mode.
Parameters
-
interactionData: InteractionData
Definition of the triggered Interaction.
Returns void
-
promote Session Member
query
- query(query, nodeID?): Promise<QueryResult>
-
Executes the query on the specified subtree
Parameters
-
query: string | Query
-
Optional
nodeID: number
Returns Promise<QueryResult>
-
read Setting
register Custom Property
register Frame Listener
- register
Frame Listener(listener): void -
Registers a listener function which get called once per internal update tick.
Parameters
-
listener: FrameListener
The listener to register.
Returns void
-
register Listener
- register
Listener<T>(eventTypes, listener, nodeID?, observeSubTree?): number -
Registers the
listener
to the node with the matchingnodeID
and returns the id of the listener. TheobserveSubTree
flag allows to observe the whole subtree under the respective node with thelistener
. With theeventTypes
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
-
T extends WebVisEvent<T> = WebVisEvent
Parameters
-
eventTypes: EventType[]
The kind of events on which the event listener should listen.
-
listener: IEventListener<T>
The event listener.
-
Optional
nodeID: numberThe id of the node on which the event listener should be registered.
-
Optional
observeSubTree: booleanIndicates 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.
-
remove
- remove(nodeID?, safe?): Promise<RemoveState>
-
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: booleanPerforms a safe remove which interrupt the removal process if the Node is part of one or more Snapshots.
Returns Promise<RemoveState>
-
remove Animation Frames
remove Annotation
- remove
Annotation(annotationId, safe?): RemoveState -
Removes the Annotation from the scene and all related Snapshots.
Parameters
-
annotationId: number
The ID of the Annotation.
-
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the Annotation is part of one or more Snapshots.
Returns RemoveState
-
remove Attachment
- remove
Attachment(attachmentID?, safe?): RemoveState -
Removes the Attachment from the scene and all related Snapshots.
Parameters
-
Optional
attachmentID: numberSpecifies the attachment object.
-
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the Attachment is part of one or more Snapshots.
Returns RemoveState
-
remove Capping
remove Clip Plane
- remove
Clip Plane(clipPlaneId, safe?): RemoveState -
Removes a clip room with the specified id.
Parameters
-
clipPlaneId: number
The id of the clip room you want to remove.
-
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the ClipPlane is part of one or more Snapshots.
Returns RemoveState
-
remove Clipping Room
- remove
Clipping Room(safe?): RemoveState -
Removes the clip room from the scene and all related Snapshots.
Parameters
-
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the ClipRoom is part of one or more Snapshots.
Returns RemoveState
-
remove Collection
remove Drawing
- remove
Drawing(drawingId, safe?): 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: booleanPerforms a safe remove which interrupt the removal process if the Drawing is part of one or more Snapshots.
Returns RemoveState
-
remove Drawing Plane
- remove
Drawing Plane(drawingPlaneId, safe?): 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: booleanPerforms a safe remove which interrupt the removal process if the Drawing is part of one or more Snapshots.
Returns RemoveState
-
remove From Collection
- remove
From Collection(collectionID, nodeID, recursive?): 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: booleanSpecifies whether the children of the node should be removed from the collection too
Returns void
-
remove From Selection
- remove
From Selection(nodeID, silent?): Promise<ChangeSelectionResult> -
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: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
remove Measurement
- remove
Measurement(measurementID, safe?): RemoveState -
Removes the Measurement from the scene and all related Snapshots.
Parameters
-
measurementID: number
-
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the Measurement is part of one or more Snapshots.
Returns RemoveState
-
remove Session Member
remove Snapshot
remove Topology From Selection
- remove
Topology From Selection(handle): Promise<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>
-
remove Viewer
- remove
Viewer(viewer): void -
Removes a viewer element.
Parameters
-
viewer: ViewerAPI
The id of the viewer.
Returns void
-
request Active Scene Volume
request Annotation Data
- request
Annotation Data(annotationId): Promise<AnnotationProperties> -
Returns the AnnotationData for the specified Annotation id.
Parameters
-
annotationId: number
The id of the Annotation you want to request the data for.
Returns Promise<AnnotationProperties>
The requested Annotation data.
-
request Aux Root Node Ids
request Box Descriptor
- request
Box Descriptor(nodeIds): Promise<{
descriptor: TopologyBoxDescriptor;
type: BOX;
}> -
Returns a Box descriptor by the specified list of Node Ids.
Parameters
-
nodeIds: number[]
List of Node Ids.
Returns Promise<{
descriptor: TopologyBoxDescriptor;
type: BOX;
}>The Box descriptor for the given Node Ids.
-
request Clip Plane Data
- request
Clip Plane Data(clipPlaneId): Promise<ClipPlaneProperties> -
Returns the ClipPlaneData for the specified clip plane id.
Parameters
-
clipPlaneId: number
The id of the clip plane you want to request the data for.
Returns Promise<ClipPlaneProperties>
The requested clip plane data.
-
request Clip Room Data
- request
Clip Room Data(): Promise<ClipRoomProperties> -
Returns the ClipRoomData.
Returns Promise<ClipRoomProperties>
The requested clip room data.
request Drawing Data
- request
Drawing Data(drawingId): Promise<DrawingData> -
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.
-
request Full Scene Volume
request L3DInformation
request Measurement Data
- request
Measurement Data(measurementID): Promise<MeasurementProperties> -
Returns the MeasurementProperties for the specified Measurement id.
Parameters
-
measurementID: number
The id of the Measurement you want to request the data for.
Returns Promise<MeasurementProperties>
The requested Measurement properties.
-
request Node Ids By Box Volume
- request
Node Ids By Box Volume(boxVolume, includeOverlappingNodes?, includeDisabledNodes?, forceExpand?, scopeNodeId?): Promise<number[]> -
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: booleanSpecifies that the result should include Nodes which overlap the specified 3D world space Bounding Volume as well.
-
Optional
includeDisabledNodes: booleanSpecifies that the result should include Nodes which are disabled as well.
-
Optional
forceExpand: boolean -
Optional
scopeNodeId: numberSpecifies 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.
-
request Node Path Handle Map
- request
Node Path Handle Map(paths, scope?): Promise<NodePathHandleMap> -
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
-
request Node Path Strings
- request
Node Path Strings(handles, scope?, typePriorities?): Promise<string[]> -
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.
-
request Root Node Ids
- request
Root Node Ids(scopeNodeId?, recursive?): Promise<number[]> -
Returns a list of all existing root Node ids below the specified subtree.
Parameters
-
Optional
scopeNodeId: numberSpecifies the top one Node id of the subtree to be searched.
-
Optional
recursive: booleanSpecifies if the subtree is traversed recursively.
Returns Promise<number[]>
A list of root Node ids.
-
request Service States
- request
Service States(): Promise<Map<ServiceType, ServiceState>> -
Returns Promise<Map<ServiceType, ServiceState>>
All current state of all available Services.
request Snapshot Data
- request
Snapshot Data(snapshotID): Promise<void | SnapshotProperties> -
Parameters
-
snapshotID: number
Returns Promise<void | SnapshotProperties>
The data of the specified Snapshot.
-
request Supported Content Types
- request
Supported Content Types(): Promise<ContentType[]> -
Returns Promise<ContentType[]>
All supported data formats.
request Supported Render Setups
request Topology Descriptor
- request
Topology Descriptor(handle): Promise<TopologyDescriptor> -
Returns a detailed description of the Topology Element.
Parameters
-
handle: TopologyHandle
The Topology Element.
Returns Promise<TopologyDescriptor>
The detailed description of the Topological Element.
-
request Variants
requestXMember Capabilities
- requestXMember
Capabilities(memberId): Promise<boolean> 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 whether the operation was successful or not.
-
resetAR
reset Interaction Mode
reset Properties
- reset
Properties<T>(nodeID, properties, recursive?): Promise<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: booleanIf set to true, the properties are reset recursively.
Returns Promise<void>
-
reset Property
- reset
Property<T>(nodeID, property, recursive?): 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: booleanIf set to true, the properties are reset recursively.
Returns Promise<void>
-
reset Setting
- reset
Setting(setting): void -
Resets the value of a setting to the installation default.
Parameters
-
setting: ViewerSettingStrings | SettingStrings
The name of the setting that should be reset.
Returns void
-
reset User Settings
restore Session
restore Snapshot
- restore
Snapshot(snapshotID, options?): 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
-
snapshotID: number
-
Optional
options: SnapshotRestoreOptions
Returns Promise<void>
-
search By Volume
- search
By Volume(selectionBox, includeOverlappingNodes, rootNodeID?): Promise<number> -
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: numberRestricts 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.
-
select Collection
- select
Collection(collectionID, silent?): Promise<void | ChangeSelectionResult> -
Replaces the current Selection with the Nodes from the given Collection.
Parameters
-
collectionID: number
The ID of the Collection.
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<void | ChangeSelectionResult>
-
set Attachment Data
set Attachment DataURI
set Interaction Mode
- set
Interaction Mode(mode, keepColorCompareActive?): void -
Set the current interaction mode.
Parameters
-
mode: string | string[]
Specifies the interaction mode you want set.
-
Optional
keepColorCompareActive: booleanSpecifies 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
Interaction Mode(mode, keepColorCompareActive?): void -
Set the current interaction mode.
Parameters
-
mode: InteractionMode
Specifies the interaction mode you want set.
-
Optional
keepColorCompareActive: booleanSpecifies if the color comparison mode should stay active. (Default: false)
Returns void
-
set Layer Filter Enabled
- set
Layer Filter Enabled(name, enabled): SetLayerFilterEnabledResult -
Sets layers to enabled whose names are in the array of names.
Parameters
-
name: string
The name of the LayerFilter
-
enabled: boolean
The new enabled state.
Returns SetLayerFilterEnabledResult
-
set Parent
set Property
- set
Property<T>(nodeID, property, value, silent?): Promise<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: booleanThe silent flag indicates that no NODE_CHANGED event is fired.
Returns Promise<void>
-
set Selection
- set
Selection(nodeID, silent?): Promise<ChangeSelectionResult> -
Replaces the current Selection with the specified nodes.
Parameters
-
nodeID: number | number[]
The nodeID(s) to select.
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
set Topology Property
- set
Topology Property<T>(handle, property, value): Promise<PromiseSettledResult<void>[]> -
Sets a Property of one or multiple Topology Elements.
Type Parameters
-
T extends keyof TopologyPropertyTypeMap
Parameters
-
handle: TopologyHandle | TopologyHandle[]
-
property: T
The property which should be set.
-
value: TopologyPropertyTypeMap[T]
Returns Promise<PromiseSettledResult<void>[]>
-
set Topology Selection
- set
Topology Selection(handle): Promise<void> -
Selects the specified Topology Elements.
Parameters
-
handle: TopologyHandle | TopologyHandle[]
A Topology Element or a list of Topology Elements to select.
Returns Promise<void>
-
set Variant Enabled
setXRFusion Mode
- setXRFusion
Mode(memberId, xrFusionMode): Promise<boolean> Experimental
Sets the passed fusion mode for the given XRMember. The fusion mode determines which inputs will be used for the final visualization.
Parameters
-
memberId: number
the XRMember that the operation should be applied on
-
xrFusionMode: XRFusionMode
the fusion mode that should be set
Returns Promise<boolean>
returns a Promise which reports whether the operation was successful or not
-
setXRMember Settings
- setXRMember
Settings(memberId, settings): Promise<boolean> Experimental
This will change the XRMemberSettings for the specified XRMember.
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 whether the operation was successful or not.
-
show Expert Dialog
shutdown Session
startAR
- startAR(): Promise<boolean>
-
Returns Promise<boolean>
returns true if starting was successfull or false if it could not start AR
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)
startXRMember Spectate
- startXRMember
Spectate(memberId): Promise<boolean> Experimental
Puts the image stream in the background of the renderer. It will also trigger a XRMemberStateChangedEvent event with FOLLOWING set to true.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
stopAR
stopXRMember Spectate
- stopXRMember
Spectate(memberId): Promise<boolean> Experimental
Stops the image stream in the background of the renderer. It will also trigger a XRMemberStateChangedEvent event with FOLLOWING set to false.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
store Session
- store
Session(offline?, progressCallback?): Promise<string | void> -
Temporarily stores the Session in the infrastructure and returns an access handle.
Parameters
-
Optional
offline: boolean -
Optional
progressCallback: StoreSessionProgressCallback
Returns Promise<string | void>
The access handle of the stored Session.
-
transfer Session
- transfer
Session(progressCallback?): Promise<string | void> Experimental
Temporarily transfers the Session to a local storage and returns an access handle.
Parameters
-
Optional
progressCallback: StoreSessionProgressCallbackCan be used to track the progress of the transfer.
Returns Promise<string | void>
The access handle of the transferred Session.
-
unfixateXRMember
- unfixateXRMember(memberId): Promise<boolean>
Experimental
Unfixates the model. The model will move with the device. It will also trigger a XRMemberStateChangedEvent event with FIXATED set to false.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
unregister Frame Listener
- unregister
Frame Listener(listener): void -
Unregisters a previously registered listener via registerFrameListener.
Parameters
-
listener: FrameListener
The listener to unregister.
Returns void
-
unregister Listener
wait For
- wait
For(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.
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. -
The ContextAPI combines all functionality which can be applied on the WebvisContext.