ContextAPI¶
Interface ContextAPI
add(options: AddNodeOptions): number;
add(
dataURI: string,
parentID?: number,
usage?: UsageString,
label?: string,
contentType?: string,
initialProperties?: InitialNodeProperties,
cacheStrategy?: CacheStrategy,
): number;
addCustomNode(
customNodeType: string,
data: any,
dataType?: AttachmentType,
): number;
addToCollection(
collectionID: number,
nodeID: number,
recursive?: boolean,
): void;
addTopologyToSelection(
handle: TopologyHandle | TopologyHandle[],
): Promise<void>;
addToSelection(
nodeID: number | number[],
silent?: boolean,
): Promise<ChangeSelectionResult>;
anchorXR(): void;
changeAnnotation(
annotationId: number,
properties: AnnotationProperties,
): AnnotationProperties;
changeAnnotation(
annotationID: number,
label?: string,
visible?: boolean,
anchorPosition?: number[] | Float32Array<ArrayBufferLike>,
labelPosition?: number[] | Float32Array<ArrayBufferLike>,
active?: boolean,
transform?: number[] | Float32Array<ArrayBufferLike>,
): void;
changeClippingRoom(properties?: ClipRoomProperties): ClipRoomProperties;
changeClippingRoom(
name?: string,
size?: number[] | Float32Array<ArrayBufferLike>,
transformation?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
): ClipRoomProperties;
changeClipPlane(
clipPlaneId: number,
properties: ClipPlaneProperties,
): ClipPlaneProperties;
changeClipPlane(
clipPlaneID: number,
normal?: number[] | Float32Array<ArrayBufferLike>,
point?: number[] | Float32Array<ArrayBufferLike>,
name?: string,
thickness?: number,
tangent?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
exclusive?: boolean,
): void;
changeDrawing(
drawingId: number,
properties: DrawingProperties,
): DrawingProperties;
changeDrawingPlane(
drawingPlaneId: number,
properties: DrawingPlaneProperties,
): DrawingPlaneProperties;
changeMeasurement(
measurementID: number,
properties: MeasurementProperties,
): MeasurementProperties;
changeSetting<T extends string>(
setting: T,
value: ContextSettingType<T>,
): boolean;
changeSnapshot(
snapshotID: number,
properties: SnapshotProperties,
): SnapshotProperties;
changeSnapshot(
snapshotID: number,
name?: string,
screenshotURL?: string,
order?: number,
): SnapshotProperties;
clear(): Promise<void>;
clearSelection(silent?: boolean): Promise<ChangeSelectionResult>;
clearTopologySelection(): Promise<void>;
clipOtherParts(target: number | number[]): void;
collectRuntimeNodesOfType(nodeType: NodeType, subType?: string): number[];
connectToSession(
sessionID?: string,
name?: string,
): Promise<SessionStateData>;
connectXR(xrConfiguration?: XRConfiguration): Promise<void>;
createAnimationFrames(name: string, frames: AnimationFrame[]): void;
createAnnotation(properties?: AnnotationProperties): number;
createAnnotation(
nodeID: number,
label: string,
visible?: boolean,
anchorPosition?: number[] | Float32Array<ArrayBufferLike>,
labelOffset?: number[] | Float32Array<ArrayBufferLike>,
): number;
createAttachment(dataType?: AttachmentType): number;
createBoxVolume(
min?: [number, number, number],
max?: [number, number, number],
): BoxVolume;
createCapping(clipPlaneId: number): Promise<void>;
createCircularArcDescriptor(
point0: [number, number, number],
point1: [number, number, number],
point2: [number, number, number],
): { descriptor: TopologyCircularArcDescriptor; type: CIRCULAR_ARC };
createClippingRoom(properties?: ClipRoomProperties): void;
createClippingRoom(
name?: string,
size?: number[] | Float32Array<ArrayBufferLike>,
transformation?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
): void;
createClipPlane(properties?: ClipPlaneProperties): number;
createClipPlane(
normal?: number[] | Float32Array<ArrayBufferLike>,
point?: number[] | Float32Array<ArrayBufferLike>,
name?: string,
thickness?: number,
tangent?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
exclusive?: boolean,
): number;
createCollection(nodeIDlist?: number[]): number;
createCollection(): number;
createDrawing(
data: ViewerDrawingResult,
properties?: DrawingProperties,
): number;
createDrawingPlane(properties?: DrawingPlaneProperties): number;
createExplosion(centerNodeID?: number): void;
createMeasurement<T extends keyof MeasurementTypeToTargetMap>(
type: T,
targets: MeasurementTypeToTargetMap[T],
properties?: MeasurementProperties,
): number;
createNodePathHandles(targets: number[]): Promise<NodePathHandle[]>;
createPointDescriptor(
point: [number, number, number],
): { descriptor: TopologyPointDescriptor; type: POINT };
createSnapshot(
name?: string,
options?: SnapshotCreationOptions,
): Promise<number>;
createViewer(
viewerID?: string,
canvas?: HTMLCanvasElement,
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;
dynamicClippingDistance?: any;
dynamicClippingEnabled?: any;
dynamicCOREnabled?: 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;
initialFit?: any;
initView?: 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;
},
): ViewerAPI;
disableCapping(clipPlaneId: number): Promise<void>;
disconnectFromSession(): void;
disconnectXR(): Promise<void>;
enableCapping(clipPlaneId: number): Promise<void>;
endExplosion(): void;
enterXRInitMode(xrInitOptions?: XRInitOptions): Promise<void>;
exportXRInitTemplate(): Promise<string>;
fetchAttachmentData<T = any>(attachmentID?: number): Promise<T>;
getAnnotationData(annotationId: number): AnnotationData;
getAnnotations(): number[];
getAttachmentData<T = any>(attachmentID?: number): T;
getAttachmentDataURI(attachmentID?: number): string;
getClipPlanes(): number[];
getClipRoom(): number;
getCollection(collectionID: number): ICollection;
getCollectionElements(collectionID: number): Promise<number[]>;
getCollectionNodeCount(collectionID: number): Promise<number>;
getCoordinateSystemForwardVector(): | Float32Array<ArrayBufferLike>
| [number, number, number];
getCoordinateSystemMatrix(): | Float32Array<ArrayBufferLike>
| [
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
];
getCoordinateSystemRightVector(): | Float32Array<ArrayBufferLike>
| [number, number, number];
getCoordinateSystemUpVector(): | Float32Array<ArrayBufferLike>
| [number, number, number];
getDrawingPlaneData(drawingPlaneId: number): DrawingPlaneProperties;
getDrawingPlanes(): number[];
getDrawings(): number[];
getEnabledAuxNodes(nodeID?: number): Promise<number[]>;
getEnabledLayerFilters(): string[];
getInteractionMode(): InteractionMode;
getMeasurements(): number[];
getMetadata(nodeID: number): Promise<{ [key: string]: string }>;
getName(): string;
getProperties<T extends string>(
nodeID: number,
properties: T[],
): Promise<PropertyType<T>[]>;
getProperty<T extends string>(
nodeID: number,
property: T,
): Promise<PropertyType<T>>;
getRegisteredLayerFilters(): { [key: string]: boolean };
getRootNodeId(
target: number | TopologyHandle,
includeTarget?: boolean,
): number;
getSelectedLeafNodes(): number[];
getSelectedNodes(): number[];
getSelectedTopologyHandles(): TopologyHandle[];
getSelection(): Promise<number[]>;
getSessionMemberID(): number;
getSessionMembers(): Promise<SessionMemberData[]>;
getSessionStateData(): SessionStateData;
getShapeHandle(handle: TopologyHandle): TopologyHandle;
getSnapshotData(
snapshotID: number,
): { attachmentID: number; name: string; order: number };
getSnapshots(): number[];
getStatistics(
nodeType?: NodeType,
nodeID?: number,
recursive?: boolean,
): Promise<any>;
getTopologyType(handle: TopologyHandle): TopologyType;
getViewer(id?: string): ViewerAPI;
getViewers(): ViewerAPI[];
getXRCapabilities(): XRCapability[];
getXRMembers(): number[];
getXRPlaybackProperties(): XRPlaybackProperties;
getXRPlaybackState(): XRPlaybackState;
getXRState(): XRState;
hideXRBackgroundFeed(): Promise<void>;
importConfig(
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;
dynamicClippingDistance?: any;
dynamicClippingEnabled?: any;
dynamicCOREnabled?: 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;
initialFit?: any;
initialStateActivation?: any;
initView?: 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;
preferXHRWithCredentials?: any;
preSelectionColor?: 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;
},
): void;
importSession(data: any, format?: "xscn"): Promise<any>;
importXRInitTemplate(template: string): Promise<void>;
invertEnabledStates(): void;
invertSelection(silent?: boolean): Promise<ChangeSelectionResult>;
isColorComparisonActive(): boolean;
isNodeDeletable(nodeID: number): boolean;
isNodePartOfEnabledLayers(nodeID: number): Promise<boolean>;
isNodePartOfEnabledVariant(nodeId: number): Promise<boolean>;
isNodeType(nodeID: number, nodeType: NodeType): boolean;
isOfflineStorageAvailable(): Promise<boolean>;
isSelected(nodeID: number): Promise<boolean>;
isTopologySelected(handle: TopologyHandle): boolean;
mapInternalToOriginalTopologyHandles(
handles: TopologyHandle[],
): Promise<OriginalTopologyHandle[]>;
mapOriginalToInternalTopologyHandles(
nodeID: number,
handles: OriginalTopologyHandle[],
): Promise<TopologyHandle[]>;
measureBetween(
target0: MeasurementTarget,
target1: MeasurementTarget,
): Promise<BetweenMeasurementResult>;
measureTangent(
topology: { class: TOPOLOGY; value: TopologyHandle },
point: { class: POINT; value: [number, number, number] },
): Promise<TangentMeasurementResult>;
measureThickness(
topology: { class: TOPOLOGY; value: TopologyHandle },
point: { class: POINT; value: [number, number, number] },
): Promise<ThicknessMeasurementResult>;
performExplosion(explosionFactor: number): void;
processInteractionInput(interactionData: InteractionData): void;
promoteSessionMember(memberID: number): void;
query(query: string | Query, nodeID?: number): Promise<QueryResult>;
readSetting<T extends string>(setting: T): ContextSettingType<T>;
registerCustomProperty(
name: string,
defaultValue: any,
recursive?: boolean,
): void;
registerFrameListener(listener: FrameListener): void;
registerListener<T extends WebVisEvent = WebVisEvent>(
eventTypes: EventType[],
listener: IEventListener<T>,
nodeID?: number,
observeSubTree?: boolean,
): number;
remove(nodeID?: number | number[], safe?: boolean): Promise<RemoveState>;
removeAnimationFrames(name: string): void;
removeAnnotation(annotationId: number, safe?: boolean): RemoveState;
removeAttachment(attachmentID?: number, safe?: boolean): RemoveState;
removeCapping(clipPlaneId: number): Promise<void>;
removeClippingRoom(safe?: boolean): RemoveState;
removeClipPlane(clipPlaneId: number, safe?: boolean): RemoveState;
removeCollection(collectionID: number): void;
removeDrawing(drawingId: number, safe?: boolean): RemoveState;
removeDrawingPlane(drawingPlaneId: number, safe?: boolean): RemoveState;
removeFromCollection(
collectionID: number,
nodeID: number,
recursive?: boolean,
): void;
removeFromSelection(
nodeID: number | number[],
silent?: boolean,
): Promise<ChangeSelectionResult>;
removeMeasurement(measurementID: number, safe?: boolean): RemoveState;
removeSessionMember(memberID: number): void;
removeSnapshot(snapshotID: number): void;
removeTopologyFromSelection(
handle: TopologyHandle | TopologyHandle[],
): Promise<void>;
removeViewer(viewer: ViewerAPI): void;
requestActiveSceneVolume(): Promise<BoxVolume>;
requestAnnotationData(annotationId: number): Promise<AnnotationProperties>;
requestAuxRootNodeIds(scopeNodeId?: number): Promise<number[]>;
requestBoxDescriptor(
nodeIds: number[],
): Promise<{ descriptor: TopologyBoxDescriptor; type: BOX }>;
requestClipPlaneData(clipPlaneId: number): Promise<ClipPlaneProperties>;
requestClipRoomData(): Promise<ClipRoomProperties>;
requestDrawingData(drawingId: number): Promise<DrawingData>;
requestFullSceneVolume(): Promise<BoxVolume>;
requestHubVersion(): Promise<string>;
requestL3DInformation(targetNodeId: number): Promise<any>;
requestMeasurementData(
measurementID: number,
): Promise<MeasurementProperties>;
requestNodeIdsByBoxVolume(
boxVolume: BoxVolume,
includeOverlappingNodes?: boolean,
includeDisabledNodes?: boolean,
forceExpand?: boolean,
scopeNodeId?: number,
): Promise<number[]>;
requestNodePathHandleMap(
paths: string[],
scope?: number,
): Promise<NodePathHandleMap>;
requestNodePathStrings(
handles: NodePathHandle[],
scope?: number,
typePriorities?: NodePathFragmentType[],
): Promise<string[]>;
requestRootNodeIds(
scopeNodeId?: number,
recursive?: boolean,
): Promise<number[]>;
requestServiceStates(): Promise<Map<ServiceType, ServiceState>>;
requestSnapshotData(snapshotID: number): Promise<void | SnapshotProperties>;
requestSupportedContentTypes(): Promise<ContentType[]>;
requestSupportedRenderSetups(): Promise<{ name: string; value: string }[]>;
requestTopologyDescriptor(
handle: TopologyHandle,
): Promise<TopologyDescriptor>;
requestVariants(nodeId: number): Promise<VariantProperties[]>;
requestXRDeviceScreenshot(): Promise<string>;
resetInteractionMode(keepColorCompareActive?: boolean): void;
resetProperties<T extends string>(
nodeID: number,
properties: T[],
recursive?: boolean,
): Promise<void>;
resetProperty<T extends string>(
nodeID: number,
property: T,
recursive?: boolean,
): Promise<void>;
resetSetting(setting: ViewerSettingStrings | SettingStrings): void;
resetUserSettings(): void;
restoreSession(handle: string): Promise<void>;
restoreSnapshot(
snapshotID: number,
options?: SnapshotRestoreOptions,
): Promise<void>;
searchByVolume(
selectionBox: BoxVolume,
includeOverlappingNodes: boolean,
rootNodeID?: number,
): Promise<number>;
seekXRPlayback(frameIndex: number): Promise<void>;
selectCollection(
collectionID: number,
silent?: boolean,
): Promise<void | ChangeSelectionResult>;
setAttachmentData<T = any>(attachmentID?: number, data?: T): void;
setAttachmentDataURI(attachmentID?: number, dataURI?: string): void;
setInteractionMode(
mode: string | string[],
keepColorCompareActive?: boolean,
): void;
setInteractionMode(
mode: InteractionMode,
keepColorCompareActive?: boolean,
): void;
setLayerFilterEnabled(
name: string,
enabled: boolean,
): SetLayerFilterEnabledResult;
setParent(nodeID: number, newParentID: number): void;
setProperty<T extends string>(
nodeID: number | number[],
property: T,
value: PropertyType<T>,
silent?: boolean,
): Promise<void>;
setSelection(
nodeID: number | number[],
silent?: boolean,
): Promise<ChangeSelectionResult>;
setTopologyProperty<T extends keyof TopologyPropertyTypeMap>(
handle: TopologyHandle | TopologyHandle[],
property: T,
value: TopologyPropertyTypeMap[T],
): Promise<PromiseSettledResult<void>[]>;
setTopologySelection(
handle: TopologyHandle | TopologyHandle[],
): Promise<void>;
setVariantEnabled(variant: number, enabled: boolean): Promise<void>;
setXRPlaybackBoomerang(boomerang: boolean): Promise<void>;
setXRPlaybackFrameRange(
startFrame: number,
endFrame: number,
): Promise<number>;
setXRPlaybackSource(url: string): Promise<number>;
setXRPlaybackSpeed(speed: number): void;
showXRBackgroundFeed(): Promise<void>;
shutdownSession(): Promise<void>;
startXRPlayback(): void;
startXRSpectate(sessionMemberId: number): Promise<void>;
stopXRPlayback(): void;
stopXRSpectate(): void;
storeSession(): Promise<string | void>;
transferSession(
progressCallback: StoreSessionProgressCallback,
): Promise<string | void>;
transferSession(): Promise<string | void>;
unanchorXR(): void;
unregisterFrameListener(listener: FrameListener): void;
unregisterListener(listenerID: number): void;
waitFor(state: ContextState): Promise<void>;
}
Hierarchy (View Summary)
- 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: AddNodeOptions): 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
- options: AddNodeOptions
- add(
dataURI: string,
parentID?: number,
usage?: UsageString,
label?: string,
contentType?: string,
initialProperties?: InitialNodeProperties,
cacheStrategy?: 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
- dataURI: string
add Custom Node
- addCustomNode(
customNodeType: string,
data: any,
dataType?: AttachmentType,
): 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
- customNodeType: string
add To Collection
- addToCollection(collectionID: number, nodeID: number, recursive?: boolean): 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
- collectionID: number
add Topology To Selection
- addTopologyToSelection(handle: TopologyHandle | TopologyHandle[]): 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>
- handle: TopologyHandle | TopologyHandle[]
add To Selection
- addToSelection(
nodeID: number | number[],
silent?: boolean,
): 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>
- nodeID: number | number[]
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).
This will trigger a XRStateChangedEvent with XRState.anchored set to
true
.Returns void
change Annotation
- changeAnnotation(
annotationId: number,
properties: AnnotationProperties,
): 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.
- annotationId: number
- changeAnnotation(
annotationID: number,
label?: string,
visible?: boolean,
anchorPosition?: number[] | Float32Array<ArrayBufferLike>,
labelPosition?: number[] | Float32Array<ArrayBufferLike>,
active?: boolean,
transform?: number[] | Float32Array<ArrayBufferLike>,
): 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[] | Float32Array<ArrayBufferLike>Anchor position in world space coordinates.
Optional
labelPosition: number[] | Float32Array<ArrayBufferLike>The position of the label.
Optional
active: booleanDEPRECATED
Optional
transform: number[] | Float32Array<ArrayBufferLike>The transformation of the Annotation.
Returns void
- annotationID: number
change Clipping Room
- changeClippingRoom(properties?: ClipRoomProperties): 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.
- changeClippingRoom(
name?: string,
size?: number[] | Float32Array<ArrayBufferLike>,
transformation?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
): ClipRoomProperties Parameters
Optional
name: stringThe name of the clip room.
Optional
size: number[] | Float32Array<ArrayBufferLike>The size of the clip room.
Optional
transformation: number[] | Float32Array<ArrayBufferLike>The 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.
change Clip Plane
- changeClipPlane(
clipPlaneId: number,
properties: ClipPlaneProperties,
): 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.
- clipPlaneId: number
- changeClipPlane(
clipPlaneID: number,
normal?: number[] | Float32Array<ArrayBufferLike>,
point?: number[] | Float32Array<ArrayBufferLike>,
name?: string,
thickness?: number,
tangent?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
exclusive?: boolean,
): 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[] | Float32Array<ArrayBufferLike>The new normal of the clip plane
Optional
point: number[] | Float32Array<ArrayBufferLike>An 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[] | Float32Array<ArrayBufferLike>The 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
- clipPlaneID: number
change Drawing
- changeDrawing(
drawingId: number,
properties: DrawingProperties,
): 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.
- drawingId: number
change Drawing Plane
- changeDrawingPlane(
drawingPlaneId: number,
properties: DrawingPlaneProperties,
): 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.
- drawingPlaneId: number
change Measurement
- changeMeasurement(
measurementID: number,
properties: MeasurementProperties,
): 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.
- measurementID: number
change Setting
change Snapshot
- changeSnapshot(
snapshotID: number,
properties: SnapshotProperties,
): 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.
- snapshotID: number
- changeSnapshot(
snapshotID: number,
name?: string,
screenshotURL?: string,
order?: number,
): 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
- snapshotID: number
clear
clear Selection
- clearSelection(silent?: boolean): 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
- collectRuntimeNodesOfType(nodeType: NodeType, subType?: string): 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.
- nodeType: NodeType
connect To Session
connectXR
- connectXR(xrConfiguration?: XRConfiguration): Promise<void>
Experimental
Connect to the XR system with the given XRConfiguration. The configuration determines what parts of the API are desired to be used.
By default, XR will be connected with the following configuration:
const defaultXRConfiguration = {
imageSourceConfig:
{
type: XRImageSource.DEVICE
}
}If unspecified,
modelTrackingEnabled
andautoShowBackgroundFeed
will be inferred astrue
anddeviceScreenshotsEnabled
asfalse
automatically.Note: If a change of configuration is required after being initialized, the user has to disconnectXR and connect with the new configuration.
Parameters
Optional
xrConfiguration: XRConfigurationThe configuration for the XR system
Returns Promise<void>
Returns a Promise which resolved when the operation was successful or rejects in an error case
create Animation Frames
- createAnimationFrames(name: string, frames: AnimationFrame[]): 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
- name: string
create Annotation
- createAnnotation(properties?: AnnotationProperties): number
Creates a new Annotation.
Parameters
Optional
properties: AnnotationPropertiesInitial properties of the created Annotation.
Returns number
The id of the newly created Annotation.
- createAnnotation(
nodeID: number,
label: string,
visible?: boolean,
anchorPosition?: number[] | Float32Array<ArrayBufferLike>,
labelOffset?: number[] | Float32Array<ArrayBufferLike>,
): 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[] | Float32Array<ArrayBufferLike>Anchor position in world space coordinates.
Optional
labelOffset: number[] | Float32Array<ArrayBufferLike>The offset between anchorPosition and where the label should be displayed.
Returns number
The ID of the new annotation.
- nodeID: number
create Attachment
- createAttachment(dataType?: AttachmentType): number
Creates a new attachment.
Parameters
Optional
dataType: AttachmentTypeSpecifies the attachment data type.
Returns number
The attachment id.
create Box Volume
create Capping
- createCapping(clipPlaneId: number): 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>
- clipPlaneId: number
create Circular Arc Descriptor
- createCircularArcDescriptor(
point0: [number, number, number],
point1: [number, number, number],
point2: [number, number, number],
): { 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.
- point0: [number, number, number]
create Clipping Room
- createClippingRoom(properties?: ClipRoomProperties): void
Creates a new clip room.
Parameters
Optional
properties: ClipRoomPropertiesInitial properties of the created clip room.
Returns void
- createClippingRoom(
name?: string,
size?: number[] | Float32Array<ArrayBufferLike>,
transformation?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
): void Parameters
Optional
name: stringThe name of the clip room.
Optional
size: number[] | Float32Array<ArrayBufferLike>The size of the clip room.
Optional
transformation: number[] | Float32Array<ArrayBufferLike>The 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
create Clip Plane
- createClipPlane(properties?: ClipPlaneProperties): 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.
- createClipPlane(
normal?: number[] | Float32Array<ArrayBufferLike>,
point?: number[] | Float32Array<ArrayBufferLike>,
name?: string,
thickness?: number,
tangent?: number[] | Float32Array<ArrayBufferLike>,
disabled?: boolean,
invisible?: boolean,
exclusive?: boolean,
): 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[] | Float32Array<ArrayBufferLike>The normal of the clip plane
Optional
point: number[] | Float32Array<ArrayBufferLike>An 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[] | Float32Array<ArrayBufferLike>The 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
create Collection
- createCollection(nodeIDlist?: number[]): 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.
- createCollection(): number
Creates a new, empty collection and returns its id.
Returns number
The id of the newly created collection.
create Drawing
- createDrawing(data: ViewerDrawingResult, properties?: DrawingProperties): 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.
- data: ViewerDrawingResult
create Drawing Plane
- createDrawingPlane(properties?: DrawingPlaneProperties): 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
- createMeasurement<T extends keyof MeasurementTypeToTargetMap>(
type: T,
targets: MeasurementTypeToTargetMap[T],
properties?: MeasurementProperties,
): 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
- createNodePathHandles(targets: number[]): 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
- targets: number[]
create Point Descriptor
- createPointDescriptor(
point: [number, number, number],
): { 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.
- point: [number, number, number]
create Snapshot
- createSnapshot(
name?: string,
options?: SnapshotCreationOptions,
): 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
- createViewer(
viewerID?: string,
canvas?: HTMLCanvasElement,
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;
dynamicClippingDistance?: any;
dynamicClippingEnabled?: any;
dynamicCOREnabled?: 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;
initialFit?: any;
initView?: 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;
},
): 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;
dynamicClippingDistance?: any;
dynamicClippingEnabled?: any;
dynamicCOREnabled?: 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;
initialFit?: any;
initView?: any;
lightingEnvironment?: any;
lineHighlightColor?: any;
lineSelectionColor?: any;
maxDynamicClipDistance?: any;
maxGPUMemory?: any;
maxSRCCPUMemory?: any;
mouseInvertZoomingDirection?: any;
navigationMode?: any;
navigationSampling?: any;
navigationSpeedFactor?: any;
navigationSpeedThrottleFactor?: any;
outlineColor?: any;
outlineColorOccluded?: any;
outlineInnerRadius?: any;
outlineOuterRadius?: any;
preSelectionColor?: any;
projectionType?: any;
renderAuxOnTop?: any;
renderMode?: any;
renderSetup?: any;
screenSpaceCoverageCalculationMethod?: any;
selectionColor?: any;
showAuxOnNavigation?: any;
silhouetteEffect?: any;
silhouetteEffectColor?: any;
silhouetteEffectExclusiveEnabled?: any;
smallFeatureCulling?: any;
smallFeaturePixelThreshold?: any;
soc?: any;
spacemouseMultiplier?: any;
ssaoEnabled?: any;
taaEnabled?: any;
topoGeometryColor?: any;
topoGeometrySecondaryColor?: any;
topoPointsEnabled?: any;
turntableLowerVerticalLimit?: any;
turntableUpperVerticalLimit?: any;
turntableVerticalLimitsEnabled?: any;
useDevicePixelRatio?: any;
vertexColorsEnabled?: any;
viewPerspective?: any;
webglPreserveDrawingbuffer?: any;
}ViewerSettings
Returns ViewerAPI
disable Capping
disconnect From Session
disconnectXR
enable Capping
end Explosion
enterXRInit Mode
- enterXRInitMode(xrInitOptions?: 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 XRState.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 XRCapability.SUPPORTS_MODEL_TRACKING capability.
Parameters
Optional
xrInitOptions: XRInitOptionsThe options for the XR initialization mode
Returns Promise<void>
Returns a Promise which resolved when the operation was successful or rejects in an error case
exportXRInit Template
- 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.
This method is only available if the XR system has the XRCapability.SUPPORTS_MODEL_TRACKING capability.
The acquired data can be imported via importXRInitTemplate function.
Returns Promise<string>
Returns a Promise which contains the base64 encoded initialization template data when the operation was successful or rejects in an error case.
fetch Attachment Data
get Annotation Data
- getAnnotationData(annotationId: number): AnnotationData
Parameters
- annotationId: number
The ID of the Annotation.
Returns AnnotationData
The content and properties of an annotation.
- annotationId: number
get Annotations
get Attachment Data
- getAttachmentData<T = any>(attachmentID?: number): T
Returns the attachment data.
Type Parameters
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
- getCollection(collectionID: number): ICollection
Returns the collection with the given id.
Parameters
- collectionID: number
Specifies which collection should be returned
Returns ICollection
The collection with the given id
- collectionID: number
get Collection Elements
- getCollectionElements(collectionID: number): 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
- collectionID: number
get Collection Node Count
get Coordinate System Forward Vector
get Coordinate System Matrix
- getCoordinateSystemMatrix(): | Float32Array<ArrayBufferLike>
| [
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<ArrayBufferLike>
| [
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
- getDrawingPlaneData(drawingPlaneId: number): 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.
- drawingPlaneId: number
get Drawing Planes
get Drawings
get Enabled Aux Nodes
get Enabled Layer Filters
get Interaction Mode
- getInteractionMode(): InteractionMode
Returns the current Interaction mode.
Returns InteractionMode
The current Interaction mode.
get Measurements
get Metadata
get Name
get Properties
- getProperties<T extends string>(
nodeID: number,
properties: T[],
): Promise<PropertyType<T>[]> Returns the values of the properties on the Node with the matching id.
Type Parameters
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.
- nodeID: number
get Property
- getProperty<T extends string>(
nodeID: number,
property: T,
): Promise<PropertyType<T>> Returns the value of the property on the Node with the matching id.
Type Parameters
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.
- nodeID: number
get Registered Layer Filters
get Root Node Id
- getRootNodeId(target: number | TopologyHandle, includeTarget?: boolean): 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.
- target: number | TopologyHandle
get Selected Leaf Nodes
get Selected Nodes
get Selected Topology Handles
- getSelectedTopologyHandles(): TopologyHandle[]
Returns a list of all selected topology elements.
Returns TopologyHandle[]
A List of all selected Topology elements.
get Selection
- getSelection(): 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
- getShapeHandle(handle: TopologyHandle): 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.
- handle: TopologyHandle
get Snapshot Data
- getSnapshotData(
snapshotID: number,
): { attachmentID: number; name: string; order: number } Parameters
- snapshotID: number
Returns { attachmentID: number; name: string; order: number }
The data of the specified Snapshot.
Deprecated
getSnapshotData is deprecated, please use requestSnapshotData instead.
get Snapshots
get Statistics
- getStatistics(
nodeType?: NodeType,
nodeID?: number,
recursive?: boolean,
): 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
- getTopologyType(handle: TopologyHandle): TopologyType
Returns the type of the given topology element
Parameters
- handle: TopologyHandle
The TopologyHandle.
Returns TopologyType
The type of the given topology element
- handle: TopologyHandle
get Viewer
get Viewers
getXRCapabilities
- getXRCapabilities(): XRCapability[]
Experimental
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 XRCapability[]
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
getXRPlayback Properties
- getXRPlaybackProperties(): XRPlaybackProperties
Experimental
Get static information about the playback sequence.
Returns XRPlaybackProperties
The current XRPlaybackProperties
getXRPlayback State
- getXRPlaybackState(): XRPlaybackState
Experimental
Get real-time information about the current state of the playback.
Returns XRPlaybackState
The current XRPlaybackState
getXRState
hideXRBackground Feed
- hideXRBackgroundFeed(): Promise<void>
Experimental
Stops putting the image feed into the viewer's background. Also see showXRBackgroundFeed.
This will trigger a XRStateChangedEvent with XRState.backgroundFeedVisible set to
false
.Returns Promise<void>
Returns a Promise which resolved when the operation was successful or rejects in an error case
import Config
- importConfig(
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;
dynamicClippingDistance?: any;
dynamicClippingEnabled?: any;
dynamicCOREnabled?: 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;
initialFit?: any;
initialStateActivation?: any;
initView?: 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;
preferXHRWithCredentials?: any;
preSelectionColor?: 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;
},
): 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;
dynamicClippingDistance?: any;
dynamicClippingEnabled?: any;
dynamicCOREnabled?: 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;
initialFit?: any;
initialStateActivation?: any;
initView?: 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;
preferXHRWithCredentials?: any;
preSelectionColor?: 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
Returns void
- config: {
import Session
importXRInit Template
- importXRInitTemplate(template: string): 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 XRInitOptions.resetInitTemplate set to
true
is called.This method is only available if the XR system has the XRCapability.SUPPORTS_MODEL_TRACKING capability.
The input data can be aquired via the exportXRInitTemplate method.
Parameters
- template: string
Returns Promise<void>
Returns a Promise which resolved when the operation was successful or rejects in an error case
invert Enabled States
invert Selection
- invertSelection(silent?: boolean): 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 Offline Storage Available
- isOfflineStorageAvailable(): Promise<boolean>
Returns Promise<boolean>
Deprecated
isOfflineStorageAvailable is deprecated.
Checks if offline storage is currently available which can be used to transfer a session via transferSession.
is Selected
is Topology Selected
- isTopologySelected(handle: TopologyHandle): 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.
- handle: TopologyHandle
map Internal To Original Topology Handles
- mapInternalToOriginalTopologyHandles(
handles: TopologyHandle[],
): 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.
- handles: TopologyHandle[]
map Original To Internal Topology Handles
- mapOriginalToInternalTopologyHandles(
nodeID: number,
handles: OriginalTopologyHandle[],
): 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.
- nodeID: number
measure Between
- measureBetween(
target0: MeasurementTarget,
target1: MeasurementTarget,
): 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.
- target0: MeasurementTarget
measure Tangent
- measureTangent(
topology: { class: TOPOLOGY; value: TopologyHandle },
point: { class: POINT; value: [number, number, number] },
): 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.
- topology: { class: TOPOLOGY; value: TopologyHandle }
measure Thickness
- measureThickness(
topology: { class: TOPOLOGY; value: TopologyHandle },
point: { class: POINT; value: [number, number, number] },
): 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.
- topology: { class: TOPOLOGY; value: TopologyHandle }
perform Explosion
process Interaction Input
- processInteractionInput(interactionData: InteractionData): void
Triggers an interaction on the current active interaction mode.
Parameters
- interactionData: InteractionData
Definition of the triggered Interaction.
Returns void
- interactionData: InteractionData
promote Session Member
query
- query(query: string | Query, nodeID?: number): 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
- registerFrameListener(listener: FrameListener): void
Registers a listener function which get called once per internal update tick.
Parameters
- listener: FrameListener
The listener to register.
Returns void
- listener: FrameListener
register Listener
- registerListener<T extends WebVisEvent = WebVisEvent>(
eventTypes: EventType[],
listener: IEventListener<T>,
nodeID?: number,
observeSubTree?: boolean,
): 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 = 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?: number | number[], safe?: boolean): 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
- removeAnnotation(annotationId: number, safe?: boolean): 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
- annotationId: number
remove Attachment
- removeAttachment(attachmentID?: number, safe?: boolean): 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 Clipping Room
- removeClippingRoom(safe?: boolean): 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 Clip Plane
- removeClipPlane(clipPlaneId: number, safe?: boolean): 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
- clipPlaneId: number
remove Collection
remove Drawing
- removeDrawing(drawingId: number, safe?: boolean): RemoveState
Removes a Drawing with the specified id. If a Drawing is part of a Snapshot the removal will fail with the State RemoveState.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
- drawingId: number
remove Drawing Plane
- removeDrawingPlane(drawingPlaneId: number, safe?: boolean): RemoveState
Experimental
Removes a DrawingPlane with the specified ID. If a DrawingPlane is part of a Snapshot the removal will fail with the State RemoveState.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
- drawingPlaneId: number
remove From Collection
- removeFromCollection(
collectionID: number,
nodeID: number,
recursive?: boolean,
): 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
- collectionID: number
remove From Selection
- removeFromSelection(
nodeID: number | number[],
silent?: boolean,
): 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>
- nodeID: number | number[]
remove Measurement
- removeMeasurement(measurementID: number, safe?: boolean): 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
- removeTopologyFromSelection(
handle: TopologyHandle | TopologyHandle[],
): 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>
- handle: TopologyHandle | TopologyHandle[]
remove Viewer
request Active Scene Volume
request Annotation Data
- requestAnnotationData(annotationId: number): 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.
- annotationId: number
request Aux Root Node Ids
request Box Descriptor
- requestBoxDescriptor(
nodeIds: number[],
): 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.
- nodeIds: number[]
request Clip Plane Data
- requestClipPlaneData(clipPlaneId: number): 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.
- clipPlaneId: number
request Clip Room Data
- requestClipRoomData(): Promise<ClipRoomProperties>
Returns the ClipRoomData.
Returns Promise<ClipRoomProperties>
The requested clip room data.
request Drawing Data
- requestDrawingData(drawingId: number): 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.
- drawingId: number
request Full Scene Volume
request Hub Version
request L3DInformation
request Measurement Data
- requestMeasurementData(measurementID: number): 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.
- measurementID: number
request Node Ids By Box Volume
- requestNodeIdsByBoxVolume(
boxVolume: BoxVolume,
includeOverlappingNodes?: boolean,
includeDisabledNodes?: boolean,
forceExpand?: boolean,
scopeNodeId?: number,
): 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: booleanOptional
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.
- boxVolume: BoxVolume
request Node Path Handle Map
- requestNodePathHandleMap(
paths: string[],
scope?: number,
): 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
- paths: string[]
request Node Path Strings
- requestNodePathStrings(
handles: NodePathHandle[],
scope?: number,
typePriorities?: NodePathFragmentType[],
): 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.
- handles: NodePathHandle[]
request Root Node Ids
- requestRootNodeIds(scopeNodeId?: number, recursive?: boolean): 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
- requestServiceStates(): Promise<Map<ServiceType, ServiceState>>
Returns Promise<Map<ServiceType, ServiceState>>
All current state of all available Services.
request Snapshot Data
- requestSnapshotData(snapshotID: number): Promise<void | SnapshotProperties>
Parameters
- snapshotID: number
Returns Promise<void | SnapshotProperties>
The data of the specified Snapshot.
request Supported Content Types
- requestSupportedContentTypes(): Promise<ContentType[]>
Returns Promise<ContentType[]>
All supported data formats.
request Supported Render Setups
request Topology Descriptor
- requestTopologyDescriptor(handle: TopologyHandle): 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.
- handle: TopologyHandle
request Variants
- requestVariants(nodeId: number): Promise<VariantProperties[]>
Parameters
- nodeId: number
The ID of the Node.
Returns Promise<VariantProperties[]>
The Variant(s) for a given nodeID.
- nodeId: number
requestXRDevice Screenshot
reset Interaction Mode
reset Properties
- resetProperties<T extends string>(
nodeID: number,
properties: T[],
recursive?: boolean,
): Promise<void> Resets the value of the specified properties on the given Node.
Type Parameters
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>
- nodeID: number
reset Property
- resetProperty<T extends string>(
nodeID: number,
property: T,
recursive?: boolean,
): Promise<void> Resets the value of the property on the Node with the matching id.
Type Parameters
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>
- nodeID: number
reset Setting
- resetSetting(setting: ViewerSettingStrings | SettingStrings): 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
- setting: ViewerSettingStrings | SettingStrings
reset User Settings
restore Session
restore Snapshot
- restoreSnapshot(
snapshotID: number,
options?: SnapshotRestoreOptions,
): 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
- searchByVolume(
selectionBox: BoxVolume,
includeOverlappingNodes: boolean,
rootNodeID?: number,
): 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.
- selectionBox: BoxVolume
seekXRPlayback
- seekXRPlayback(frameIndex: number): 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.
Triggers a XRPlaybackStateChangedEvent.
Parameters
- frameIndex: number
The index of the frame to jump to
Returns Promise<void>
Returns a Promise which reports wether the operation was successful or not
- frameIndex: number
select Collection
- selectCollection(
collectionID: number,
silent?: boolean,
): 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>
- collectionID: number
set Attachment Data
set Attachment DataURI
set Interaction Mode
- setInteractionMode(
mode: string | string[],
keepColorCompareActive?: boolean,
): 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
- mode: string | string[]
- setInteractionMode(
mode: InteractionMode,
keepColorCompareActive?: boolean,
): 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
- mode: InteractionMode
set Layer Filter Enabled
- setLayerFilterEnabled(
name: string,
enabled: boolean,
): 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
- name: string
set Parent
set Property
- setProperty<T extends string>(
nodeID: number | number[],
property: T,
value: PropertyType<T>,
silent?: boolean,
): Promise<void> Sets the property named property to value on the Node with id nodeID.
Type Parameters
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>
- nodeID: number | number[]
set Selection
- setSelection(
nodeID: number | number[],
silent?: boolean,
): 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>
- nodeID: number | number[]
set Topology Property
- setTopologyProperty<T extends keyof TopologyPropertyTypeMap>(
handle: TopologyHandle | TopologyHandle[],
property: T,
value: TopologyPropertyTypeMap[T],
): 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
- setTopologySelection(handle: TopologyHandle | TopologyHandle[]): 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>
- handle: TopologyHandle | TopologyHandle[]
set Variant Enabled
setXRPlayback Boomerang
- setXRPlaybackBoomerang(boomerang: boolean): Promise<void>
Experimental
Specify whether the playback should "boomerang" (play forward and backward in a loop). This is useful for creating a seamless transition at the end of a sequence in terms of pose updates.
Parameters
- boomerang: boolean
Whether the playback should boomerang or not
Returns Promise<void>
Returns a Promise which reports whether the operation was successful or not
- boomerang: boolean
setXRPlayback Frame Range
- setXRPlaybackFrameRange(startFrame: number, endFrame: number): Promise<number>
Experimental
Sets the frame range to play back. The total amount of frames in a sequence can be found in the XRPlaybackProperties.
Triggers a XRPlaybackStateChangedEvent.
Parameters
- startFrame: number
The index of the first frame to play back
- endFrame: number
The index of the last frame to play back
Returns Promise<number>
Returns a Promise which resolves with the new amount of frames in the playback if successful and rejects otherwise
- startFrame: number
setXRPlayback Source
- setXRPlaybackSource(url: string): Promise<number>
Experimental
Set the URL pointing to the
manifest.json
file of the frame sequence to be played back.Triggers a XRPlaybackStateChangedEvent.
Parameters
- url: string
The URL of the frame sequence
Returns Promise<number>
Returns a Promise which resolves with the amount of frames in the playback if successful and rejects otherwise
- url: string
setXRPlayback Speed
- setXRPlaybackSpeed(speed: number): 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.
Triggers a XRPlaybackStateChangedEvent.
Parameters
- speed: number
The desired playback speed. Must be a value between 0 and 1.
Returns void
- speed: number
showXRBackground Feed
- showXRBackgroundFeed(): Promise<void>
Experimental
Starts putting the image feed into the viewer's background. Also see hideXRBackgroundFeed.
This will trigger a XRStateChangedEvent with XRState.backgroundFeedVisible set to
true
.Returns Promise<void>
Returns a Promise which resolved when the operation was successful or rejects in an error case
shutdown Session
startXRPlayback
- startXRPlayback(): void
Experimental
Start the XR playback.
Make sure to set the playback source before starting the playback. Triggers a XRPlaybackStateChangedEvent.
Returns void
startXRSpectate
- startXRSpectate(sessionMemberId: number): Promise<void>
Experimental
Starts spectating the XRImage stream published by the session member with the specified ID within a shared session. This will also hide any other background feed that is currently shown.
Parameters
- sessionMemberId: number
The session member id of the member to spectate
Returns Promise<void>
Returns a promise which resolves when the operation was successful or rejects in an error case
- sessionMemberId: number
stopXRPlayback
- stopXRPlayback(): void
Experimental
Stop the XR playback.
Triggers a XRPlaybackStateChangedEvent.
Returns void
stopXRSpectate
store Session
- 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.
Returns Promise<string | void>
The access handle of the stored Session.
transfer Session
- transferSession(
progressCallback: StoreSessionProgressCallback,
): Promise<string | void> Experimental
Parameters
- progressCallback: StoreSessionProgressCallback
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.
- progressCallback: StoreSessionProgressCallback
- 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.
This will trigger a XRStateChangedEvent with XRState.anchored set to
false
.Returns void
unregister Frame Listener
- unregisterFrameListener(listener: FrameListener): void
Unregisters a previously registered listener via registerFrameListener.
Parameters
- listener: FrameListener
The listener to unregister.
Returns void
- listener: FrameListener
unregister Listener
wait For
- waitFor(state: ContextState): 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.- state: ContextState
The ContextAPI combines all functionality which can be applied on the WebvisContext.