IBcfService
-
class
wvc.IBcfService()
Properties
-
wvc.IBcfService.serviceName inherited
serviceName:ServiceName
-
wvc.IBcfService.webViewer - webViewer: (undefined | WebViewer)
Methods
-
wvc.IBcfService.activateTopicAndRestoreMarkup() - activateTopicAndRestoreMarkup(topic: BCFTopic, markupViewId: string): Promise
Activates the first viewpoint of the given topic and, if a markup view ID is provided, restores the corresponding markup overlay and arms the camera auto-deactivation callback.
Parameters
topic: BCFTopic
The BCF topic whose viewpoint should be activated.markupViewId: string
Optional ID of the markup view to restore.Returns: Promise
Throws
If the viewer is not initialized.
-
wvc.IBcfService.addBCFFromBuffer() - addBCFFromBuffer(buffer: ArrayBuffer, fileName: string): Promise
Imports a BCF archive from an
ArrayBuffer(e.g., from a file upload) and registers its contents.Parameters
buffer: ArrayBuffer
The raw BCF archive data.fileName: string
The original file name, used as the BCF data set identifier.Returns: Promise
Throws
If the viewer is not initialized.
-
wvc.IBcfService.addTopicComment() - addTopicComment(topic: BCFTopic, text: string, captureView: unknown): Promise
Creates a comment on a BCF topic, including its viewpoint and snapshot.
Parameters
topic: BCFTopic
The BCF topic to add the comment to.text: string
The comment text.captureView: unknown
The active markup view to capture in the comment viewpoint, or null/undefined.Returns: Promise
An object containing the new comment’s ID.
-
wvc.IBcfService.captureSnapshotPng() - captureSnapshotPng(): Promise
Captures the current rendered frame as a PNG and returns the raw bytes.
Returns: Promise
PNG bytes of the snapshot, ornullif the viewer is uninitialized or capture fails.
-
wvc.IBcfService.clearActiveTopicMarkup() - clearActiveTopicMarkup(): Promise
Clears all active markup overlays and lines from the viewer.
Returns: Promise
-
wvc.IBcfService.clearTopicMarkupAutoDeactivate() - clearTopicMarkupAutoDeactivate(): void
Cancels the camera-change callback that automatically deactivates markup overlays when the camera moves after topic activation.
Returns: void
-
wvc.IBcfService.createBCFData() - createBCFData(name: string): BCFData
Creates a new, empty BCF data set with the provided name and registers it with the viewer.
Parameters
name: string
The display name for the new BCF data set.Returns: BCFData
Throws
If the viewer is not initialized.
-
wvc.IBcfService.createTopic() - createTopic(bcfData: BCFData, topicId: string): BCFTopic
Creates a bare BCF topic shell within the given data set. Prefer
setupTopicfor creating a fully initialized topic with markup, viewpoint, and snapshot.Parameters
bcfData: BCFData
The BCF data set to add the topic to.topicId: string
The unique ID (UUID) to assign to the new topic.Returns: BCFTopic
Throws
If the viewer is not initialized.
-
wvc.IBcfService.createViewpoint() - createViewpoint(viewpointFilename: string, captureView: unknown): Promise
Creates and returns a BCF viewpoint capturing the current viewer camera state, optionally including markup from
captureView.Parameters
viewpointFilename: string
The filename to assign to the viewpoint within the BCF archive.captureView: unknown
The markup view to include in the viewpoint, or null/undefined.Returns: Promise
Throws
If the viewer is not initialized.
-
wvc.IBcfService.getBCFData() - getBCFData(id: number): (None | BCFData)
Returns the BCF data set with the given ID, or
nullif not found or the viewer is unavailable.Parameters
id: number
The numeric ID of the BCF data set to retrieve.Returns: (None | BCFData)
-
wvc.IBcfService.getBCFMap() - getBCFMap(): Map
Returns all BCF data sets currently loaded in the viewer, keyed by their numeric IDs.
Returns: Map
-
wvc.IBcfService.getMarkupViewForBcfCapture() - getMarkupViewForBcfCapture(): unknown
Resolves the best available markup view for viewpoint capture.
Returns the currently active markup view if one exists, or falls back to the most recently modified non-empty view. Returns
nullif no suitable view is found.Returns: unknown
-
wvc.IBcfService.removeBCFData() - removeBCFData(id: number): void
Removes the BCF data set with the given ID from the viewer.
Parameters
id: number
The numeric ID of the BCF data set to remove.Returns: void
Throws
If the viewer is not initialized.
-
wvc.IBcfService.setupTopic() - setupTopic(bcfData: BCFData, title: string, captureView: unknown): Promise
Creates a fully initialized BCF topic: markup, title, viewpoint, snapshot, and registers it on the BCF data.
Parameters
bcfData: BCFData
The BCF data set to add the topic to.title: string
The human-readable topic title.captureView: unknown
The active markup view to capture in the topic viewpoint, or null/undefined.Returns: Promise
The fully initialized BCF topic.