Warning
Nightly releases are generated automatically from the latest source code and are intended for experimental purposes only. These builds may contain incomplete or untested features, bugs, or security vulnerabilities, and as such, are not for production use. Users should be aware that nightly releases may cause unexpected behavior, data loss, or system instability. Use of these releases is at the user's own risk, and it is advised to have adequate backups before testing. The software is provided as is with no guarantees or support.
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(xrAnchorOptions?: XRAnchorOptions): 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;
changeMaterial(
materialId: number,
properties: MaterialProperties,
): MaterialProperties;
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;
createMaterial(properties?: MaterialProperties): number;
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;
sceneOpacity?: 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;
transparencyMode?: 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;
getMaterialData(materialId: number): MaterialProperties;
getMaterials(): number[];
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;
batchedQueries?: 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;
sceneOpacity?: 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;
transparencyMode?: 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>;
measurePointsByDistance(
searchCurve: {
class: CURVE;
value: [[number, number, number], [number, number, number]][];
},
distanceCurves: { class: TOPOLOGY; value: TopologyHandle }[],
distance: number,
): Promise<DistanceConstraintMatch[]>;
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>;
removeMaterial(materialId: number, safe?: boolean): RemoveState;
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>;
requestXRScanshot(): Promise<XRScanshot>;
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
- MaterialAPI
- ContextAPI
Index
Methods
Methods
add
- add(options: AddNodeOptions): number
Adds a new node to the instance graph.
Parameters
- options: AddNodeOptions
Specifies the options for the new Node.
Returns number
The ID of the 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
Deprecated
This function will no longer be available in future webvis releases. Please use the add function with AddNodeOptions instead.
Adds a new Node to the InstanceGraph.
Triggers a NodeAddedEvent. In case of an error, a NodeErrorEvent is triggered.
- dataURI: string
add Custom Node
- addCustomNode(
customNodeType: string,
data: any,
dataType?: AttachmentType,
): number Creates a custom node along with custom data which is stored in an attachment.
The attached data can be accessed via the Property.ATTACHMENT property of the node.
Triggers a NodeAddedEvent. In case of an error, a NodeErrorEvent is triggered.
Parameters
- customNodeType: string
Specifies the custom node type.
- data: any
Specifies the data of the custom node.
Optional
dataType: AttachmentTypeSpecifies the type of the data. Default: "json".
Returns number
The ID of the newly created custom node.
- 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 specified nodes to the current selection.
Triggers a SelectionChangedEvent if silent is set to false.
Parameters
- nodeID: number | number[]
The ID or array of IDs of the nodes to add to the selection.
Optional
silent: booleanIf set to true, no event will be emitted. Default: false
Returns Promise<ChangeSelectionResult>
The result of the selection change.
- nodeID: number | number[]
anchorXR
- anchorXR(xrAnchorOptions?: XRAnchorOptions): 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
.The optional parameter XRAnchorOptions, in conjunction with XRAnchorOptions.anchorToSurface, can be used to anchor the model on a detected surface. By default, this is set to false, and the model is anchored at the current 3D pose of the device, as described above.
However, if set to true, and if the device running webvis supports XR and ray casting, a mathematical ray will be cast from the device into the real world. If this ray intersects with a detected surface, the scene will be transformed and anchored to this surface at the intersection point, with the Y axis alined orthogonally to the surface. On occasion, the model may need to be offset, so it does not appear to be imbedded in the surface it is anchored to. In order to achieve this, an optional parameter can be set in the XRAnchorOptions, by updating the XRAnchorOptions.xrAnchorOffsetTransform matrix.
Parameters
Optional
xrAnchorOptions: XRAnchorOptionsAn optional object that contains the anchorToSurface property.
Returns void
change Annotation
- changeAnnotation(
annotationId: number,
properties: AnnotationProperties,
): AnnotationProperties Changes one or more properties of an Annotation with the specified ID and triggers an AnnotationChangedEvent.
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
Deprecated
Changes an annotation. Should use a properties object AnnotationProperties as an argument rather than passing individual values.
- 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 Material
- changeMaterial(
materialId: number,
properties: MaterialProperties,
): MaterialProperties Experimental
Experimental. May be changed in the future without notice.
Changes one or more properties of a material with the specified ID and triggers a MaterialChangedEvent.
Parameters
- materialId: number
The ID of the material you want to change.
- properties: MaterialProperties
The properties of the material you want change.
Returns MaterialProperties
An object with the changed properties.
- materialId: number
change Measurement
- changeMeasurement(
measurementID: number,
properties: MeasurementProperties,
): MeasurementProperties Changes one or more properties of the measurement entity with the specified ID.
Triggers a MeasurementChangedEvent when the measurement entity has been changed.
Parameters
- measurementID: number
The ID of the measurement entity that should be changed.
- properties: MeasurementProperties
The properties that should be changed.
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.
Triggers a SelectionChangedEvent if silent is set to false.
Parameters
Optional
silent: booleanIf set to true, no event will be emitted. Default: false
Returns Promise<ChangeSelectionResult>
The result of the selection change.
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. See Property.SUBTYPE.
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 and triggers an AnnotationCreatedEvent.
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.
Deprecated
Creates a new annotation. Should use a properties object AnnotationProperties as an argument rather than passing individual values.
- nodeID: number
create Attachment
- createAttachment(dataType: AttachmentType): number
Creates a new attachment.
Triggers an AttachmentCreatedEvent.
Parameters
- dataType: AttachmentType
Specifies the attachment data type.
Returns number
The ID of the created attachment.
- dataType: AttachmentType
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 Material
- createMaterial(properties?: MaterialProperties): number
Experimental
Experimental. May be changed in the future without notice.
Creates a new material and triggers a MaterialCreatedEvent.
Parameters
Optional
properties: MaterialPropertiesInitial properties of the created material.
Returns number
The ID of the newly created material.
create Measurement
- createMeasurement<T extends keyof MeasurementTypeToTargetMap>(
type: T,
targets: MeasurementTypeToTargetMap[T],
properties?: MeasurementProperties,
): number Performs a measurement and creates a corresponding measurement entity in the webvis context. The different kinds of measurements that this function can perform are defined in the MeasurementType enum. Depending on the measurement type, different targets are required.
Triggers a MeasurementCreatedEvent when the measurement entity has been created, followed by a MeasurementChangedEvent when processing is complete and the result is available.
Type Parameters
- T extends keyof MeasurementTypeToTargetMap
The MeasurementType.
Parameters
- type: T
The type of the measurement, given as a MeasurementType.
- targets: MeasurementTypeToTargetMap[T]
The MeasurementTargets, as defined by the MeasurementType.
Optional
properties: MeasurementPropertiesAdditional properties of the measurement entity. These include the enabled state and positioning information.
Returns number
The ID of the created measurement.
- T extends keyof MeasurementTypeToTargetMap
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;
sceneOpacity?: 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;
transparencyMode?: 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;
sceneOpacity?: 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;
transparencyMode?: 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
- fetchAttachmentData<T = any>(attachmentID: number): Promise<T>
Fetches and returns the attachment data of the specified attachment.
Type Parameters
- T = any
The data type fitting the AttachmentType of the attachment data.
Parameters
- attachmentID: number
Specifies the attachment object.
Returns Promise<T>
The attached data.
- T = any
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
- attachmentID: number
Specifies the attachment object.
Returns T
The attached data
Deprecated
getAttachmentData is deprecated, please use fetchAttachmentData instead.
- attachmentID: number
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[]>
Readonly
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
- getEnabledAuxNodes(nodeID: number): Promise<number[]>
Parameters
- nodeID: number
Specifies the entry point of the subtree traversal. Default: 0
Returns Promise<number[]>
An Array of all enabled aux node IDs
Deprecated
This function will no longer be available in future webvis releases. Use the QueryAPI instead.
Traverses the subtree of a given node ID and collects all enabled aux nodes.
- nodeID: number
get Enabled Layer Filters
get Interaction Mode
- getInteractionMode(): InteractionMode
Returns the current Interaction mode.
Returns InteractionMode
The current Interaction mode.
get Material Data
- getMaterialData(materialId: number): MaterialProperties
Experimental
Experimental. May be changed in the future without notice.
Returns the properties of the material entity with the specified ID.
Parameters
- materialId: number
The ID of the material entity.
Returns MaterialProperties
The properties of the material entity.
- materialId: number
get Materials
get Measurements
get Metadata
get Name
get Properties
- getProperties<T extends string>(
nodeID: number,
properties: T[],
): Promise<PropertyType<T>[]> Returns the values of the specified properties of the given node.
Type Parameters
Parameters
- nodeID: number
The ID of the node whose properties should be read.
- properties: T[]
The names of the Properties whose values 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 specified property of the given node.
Type Parameters
Parameters
Returns Promise<PropertyType<T>>
The retrieved value of the node property.
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. Default: true
Returns number
The root node ID of the given node ID or topology handle.
- target: number | TopologyHandle
get Selected Leaf Nodes
get Selected Nodes
- getSelectedNodes(): number[]
Returns a list of all selected nodes. When a whole subtree is selected, only the parent node will be included in the returned array. To get the selected leaf nodes of the subtree, use getSelectedLeafNodes instead.
Returns number[]
An array which contains the IDs of all nodes in the current selection.
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 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 node ID and collects all statistics (currently only available for AUX nodes).
Parameters
Optional
nodeType: NodeTypeSpecifies the target node type. Default: NodeType.ALL
Optional
nodeID: numberSpecifies the node ID as 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;
batchedQueries?: 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;
sceneOpacity?: 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;
transparencyMode?: 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;
batchedQueries?: 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;
sceneOpacity?: 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;
transparencyMode?: 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
The base64 encoded initialization template data
Returns Promise<void>
Returns a Promise which resolved when the operation was successful or rejects in an error case
- template: string
invert Enabled States
- invertEnabledStates(): void
Inverts all enabled states.
Triggers a NodeChangedEvent.
Returns void
invert Selection
- invertSelection(silent?: boolean): Promise<ChangeSelectionResult>
Inverts the current selection.
Selected nodes will be unselected, and then all previously unselected leaf nodes will be selected. When all child nodes of a parent are selected, the selection moves up the hierarchy as usual.
For example, consider the following hierarchy:
Node 0 |- Node 1 |- Node 1.1 |- Node 1.2 |- Node 2 |- Node 2.1 |- Node 2.2
If the initial selection is only
Node 2.1
, callinginvertSelection
will result in the selection includingNode 2.2
,Node 1.1
,Node 1.2
, and therefore alsoNode 1
.Node 0
andNode 2
will not become selected, even though they were not selected initially. If getSelectedNodes is called at this point, it will return[Node 1, Node 2.2]
.Triggers a SelectionChangedEvent if silent is set to false.
Parameters
Optional
silent: booleanIf set to true, no event will be emitted. Default: false
Returns Promise<ChangeSelectionResult>
The result of the selection change.
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 applicable, the angle between two measurement targets. The result also includes the corresponding closest points on the targets.
If the targets intersect, the result will contain a representation of the intersection. Note that the intersection is not available for measurements involving target classes TOPOLOGY or NODE, except for the cases plane-face and face-face.
Parameters
- target0: MeasurementTarget
The first measurement target.
- target1: MeasurementTarget
The second measurement target.
Returns Promise<BetweenMeasurementResult>
The result of the measurement.
- target0: MeasurementTarget
measure Points By Distance
- measurePointsByDistance(
searchCurve: {
class: CURVE;
value: [[number, number, number], [number, number, number]][];
},
distanceCurves: { class: TOPOLOGY; value: TopologyHandle }[],
distance: number,
): Promise<DistanceConstraintMatch[]> Experimental
Attention: This function is experimental and may be changed or removed in future versions.
Returns points from a search space that have the specified distance to a set of measurement targets. The search space is defined by a measurement target. Currently only supports a search space that is defined by a curve and edges as distance targets.
Parameters
- searchCurve: { class: CURVE; value: [[number, number, number], [number, number, number]][] }
The curve on which to search.
- distanceCurves: { class: TOPOLOGY; value: TopologyHandle }[]
The targets from which the distance is measured.
- distance: number
The distance.
Returns Promise<DistanceConstraintMatch[]>
An array of points that match the distance constraint.
- searchCurve: { class: CURVE; value: [[number, number, number], [number, number, number]][] }
measure Tangent
- measureTangent(
topology: { class: TOPOLOGY; value: TopologyHandle },
point: { class: POINT; value: [number, number, number] },
): Promise<TangentMeasurementResult> Measures the tangent of an edge at a given point. The edge is specified by a measurement target that points to a corresponding TopologyHandle. If the point does not lie on the edge, the closest point on the edge is used.
Parameters
- topology: { class: TOPOLOGY; value: TopologyHandle }
The measurement target representing the edge via a TopologyHandle.
- point: { class: POINT; value: [number, number, number] }
The point at which the tangent should be measured.
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 a given point. The shape is specified by a measurement target that points to a corresponding TopologyHandle. If the point does not lie on the shape, the closest point on the shape is used. The thickness is measured along the line defined by the normal of the shape at the given point.
Parameters
- topology: { class: TOPOLOGY; value: TopologyHandle }
The measurement target representing the shape via a TopologyHandle.
- point: { class: POINT; value: [number, number, number] }
The point at which the thickness should be measured.
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
- registerCustomProperty(
name: string,
defaultValue: any,
recursive?: boolean,
): void Registers a new custom node property.
Custom properties allow developers to hook into the node hierarchy with custom data. This enables the creation of custom behaviors and interactions that can benefit from the NODE_* events, like the NodeChangedEvent, emitted by the InstanceGraphAPI.
Triggers a CustomPropertyRegisteredEvent
Parameters
- name: string
The name of the new property.
- defaultValue: any
Specifies the default value.
Optional
recursive: booleanDefines whether the property is recursive. Default: false
Returns void
- name: string
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 a listener for a set of EventTypes. If the given event types array is empty, the listener will react to all event types. The listener must implement the IEventListener interface. It will be called with events that extend the WebVisEvent base class. An event's
type
property specifies its EventType and determines its structure.Scoping listeners in the node hierarchy
Several EventTypes are linked to a specific node in the hierarchy. These include all that have a
NODE_
orTOPOLOGY_
prefix, as well as several animation-related event types.When registering a listener for these event types, a listening scope must be specified in the node hierarchy. This is done by setting the optional parameters
nodeID
andobserveSubTree
. TheobserveSubTree
flag determines whether the listener is scoped to only the specified node or the entire subtree under the node.By default, listeners are scoped to the global root node and
observeSubTree
isfalse
, such that listeners do not receive any events linked to added nodes. To listen to events from all nodes, setnodeID
to0
andobserveSubTree
totrue
.There are a few things to note when scoping listeners:
- NODE_ADDED events are linked to the parent node of the added node.
- NODE_CHANGED events behave differently depending on the node property that has changed. When the node property is recursive, the event is passed to all listeners in the subtree. When the change to the node property affects the node's ancestors, events will also be triggered for the ancestors.
Type Parameters
- T extends WebVisEvent = WebVisEvent
The type of event that the listener listens to. This can also be a union of multiple event types.
Parameters
- eventTypes: EventType[]
The types of events that the listener listens to. If an empty array is passed, the listener will listen to all event types.
- listener: IEventListener<T>
The event listener.
Optional
nodeID: numberThe ID of the node to which the listener should be scoped. Default:
0
Optional
observeSubTree: booleanIf set to true, the listener will be scoped to the whole subtree under the specified node. Default:
false
Returns number
- The ID of the event listener.
remove
- remove(nodeID?: number | number[], safe?: boolean): Promise<RemoveState>
Removes the node for the given node ID from the scene and all related snapshots. If no node ID is supplied, all nodes are deleted.
Triggers a NodeRemovedEvent.
Parameters
Optional
nodeID: number | number[]The ID of the node that should be removed or undefined to remove all nodes.
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the node is part of one or more snapshots. Default: false.
Returns Promise<RemoveState>
A promise that resolves with the RemoveState once the operation is complete.
remove Animation Frames
remove Annotation
- removeAnnotation(annotationId: number, safe?: boolean): RemoveState
Removes the Annotation from the scene and all related Snapshots and triggers an AnnotationRemovedEvent.
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.
Triggers an AttachmentRemovedEvent.
Parameters
- attachmentID: number
Specifies the attachment object.
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the attachment is part of one or more snapshots. If no safe remove, a snapshot could link to missing data. Default: false.
Returns RemoveState
The state of the removal process.
- attachmentID: number
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 specified nodes from the current selection.
Triggers a SelectionChangedEvent if silent is set to false.
Parameters
- nodeID: number | number[]
The ID or array of IDs of the nodes to remove from the selection.
Optional
silent: booleanIf set to true, no event will be emitted. Default: false
Returns Promise<ChangeSelectionResult>
The result of the selection change.
- nodeID: number | number[]
remove Material
- removeMaterial(materialId: number, safe?: boolean): RemoveState
Experimental
Experimental. May be changed in the future without notice.
Removes the material from the scene and all related snapshots and triggers a MaterialRemovedEvent.
Parameters
- materialId: number
The ID of the material.
Optional
safe: booleanPerforms a safe remove which interrupts the removal process if the material is part of one or more Snapshots. Default: false
Returns RemoveState
The resulting state of the removal process.
- materialId: number
remove Measurement
- removeMeasurement(measurementID: number, safe?: boolean): RemoveState
Removes the measurement entity with the specified ID from the webvis context and all related snapshots.
Triggers a MeasurementRemovedEvent when the measurement entity has been removed.
Parameters
- measurementID: number
The ID of the measurement entity that should be removed.
Optional
safe: booleanPerforms a safe remove which interrupts the removal process if the measurement is part of one or more snapshots. Default: false
Returns RemoveState
The resulting state of the removal process.
- measurementID: number
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
- requestAuxRootNodeIds(scopeNodeId?: number): Promise<number[]>
Returns a list of all existing AUX root node IDs below the specified subtree.
Parameters
Optional
scopeNodeId: numberSpecifies the top one node ID of the subtree to be searched. Default: 0
Returns Promise<number[]>
A list of 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
- requestFullSceneVolume(): Promise<BoxVolume>
Returns the full volume of the current scene. It is the smallest volume that contains all nodes of the scene, regardless of their Property.ENABLED state.
Returns Promise<BoxVolume>
request Hub Version
request L3DInformation
request Measurement Data
- requestMeasurementData(measurementID: number): Promise<MeasurementProperties>
Returns the properties of the measurement entity with the specified ID. These include the result of the measurement, as well as its type and targets.
Parameters
- measurementID: number
The ID of the measurement entity.
Returns Promise<MeasurementProperties>
The properties of the measurement entity.
- 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 that are included in or overlapped by the specified bounding volume.
Parameters
- boxVolume: BoxVolume
Specifies the bounding volume.
Optional
includeOverlappingNodes: booleanSpecifies whether the result should include nodes which overlap the specified bounding volume as well. Default: false
Optional
includeDisabledNodes: booleanSpecifies whether the result should include nodes which are disabled as well. Default: false
Optional
forceExpand: booleanIf set to true, L3D instances may be expanded to find their leaf nodes. Default: false
Optional
scopeNodeId: numberSpecifies the top one node ID of the subtree to be searched. Default: 0
Returns Promise<number[]>
List of all node IDs which are included or overlapped by the specified 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. Default: 0
Optional
recursive: booleanSpecifies if the subtree is traversed recursively. Default: false
Returns Promise<number[]>
A list of root node IDs.
request Service States
- requestServiceStates(): Promise<Map<ServiceType, ServiceState>>
Requests all available services of the backend and their current state.
Returns Promise<Map<ServiceType, ServiceState>>
Returns a Promise which contains a map of all available services and their states.
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[]>
Request a list of (model) data formats which are supported by the connected instance3Dhub-backend. If requested before the connection to the Hub is established, it will return the local list of content types.
Returns Promise<ContentType[]>
Returns a Promise which contains the list of all supported data formats.
request Supported Render Setups
- requestSupportedRenderSetups(): Promise<{ name: string; value: string }[]>
Request all supported render setups if one or more are available. The render setup is a key value pair where the key is the name of the render setup and the value could be used as an input value for the ViewerSettingStrings.RENDER_SETUP setting.
Returns Promise<{ name: string; value: string }[]>
Returns a Promise which contains the list of 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
requestXRScanshot
- requestXRScanshot(): Promise<XRScanshot>
Experimental
Requests a scanshot of the current view in the XR environment.
Returns Promise<XRScanshot>
The scanshot data.
reset Interaction Mode
reset Properties
- resetProperties<T extends string>(
nodeID: number,
properties: T[],
recursive?: boolean,
): Promise<void> Resets the value of the specified properties of the given node.
Triggers a NodePropertiesResetEvent. If the property has changed, this will additionally trigger a NodeChangedEvent.
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. Default: false
Returns Promise<void>
- nodeID: number
reset Property
- resetProperty<T extends string>(
nodeID: number,
property: T,
recursive?: boolean,
): Promise<void> Resets the value of the specified property of the given node.
Triggers a NodePropertiesResetEvent. If the property has changed, this will additionally trigger a NodeChangedEvent.
Type Parameters
Parameters
- nodeID: number
The ID of the node whose Property should be reset.
- property: T
The Property that should be reset.
Optional
recursive: booleanIf set to true, the properties are reset recursively. Default: false
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.
Triggers a SelectionChangedEvent if silent is set to false.
Parameters
- collectionID: number
The ID of the collection.
Optional
silent: booleanIf set to true, no event will be emitted. Default: false
Returns Promise<void | ChangeSelectionResult>
- collectionID: number
set Attachment Data
- setAttachmentData<T = any>(attachmentID: number, data: T): void
Sets the attachment data.
Triggers an AttachmentDataChangedEvent.
Type Parameters
Parameters
- attachmentID: number
Specifies the attachment object.
- data: T
The new attachment data.
Returns void
- attachmentID: number
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
- setParent(nodeID: number, newParentID: number): void
Sets a new parent for a given node ID.
Triggers a NodeChangedEvent.
Parameters
- nodeID: number
The ID of the node whose parent should be set.
- newParentID: number
The ID of the new parent node.
Returns void
- nodeID: number
set Property
- setProperty<T extends string>(
nodeID: number | number[],
property: T,
value: PropertyType<T>,
silent?: boolean,
): Promise<void> Sets the specified property to the given value on the node(s) with the specified ID(s).
Triggers a NodeChangedEvent. Depending on the property it can trigger additional events, e.g. ActiveSceneVolumeChangedEvent.
Type Parameters
Parameters
- nodeID: number | number[]
The ID(s) of the node(s) 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. Default: false
Returns Promise<void>
- nodeID: number | number[]
set Selection
- setSelection(
nodeID: number | number[],
silent?: boolean,
): Promise<ChangeSelectionResult> Replaces the current selection with the specified nodes.
Triggers a SelectionChangedEvent if silent is set to false.
Parameters
- nodeID: number | number[]
The ID or array of IDs of the nodes to select.
Optional
silent: booleanIf set to true, no event will be emitted. Default: false
Returns Promise<ChangeSelectionResult>
The result of the selection change.
- 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
The type of the property which should be set.
Parameters
- handle: TopologyHandle | TopologyHandle[]
- property: T
The property which should be set.
- value: TopologyPropertyTypeMap[T]
The new property value.
Returns Promise<PromiseSettledResult<void>[]>
A list of PromiseSettledResult which indicates the success of the operation.
- T extends keyof TopologyPropertyTypeMap
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.