Skip to main content

XR8.CanvasScreenshot

Description​

Provides a camera pipeline module that can generate screenshots of the current scene.

Functions​

FunctionDescription
configureConfigures the expected result of canvas screenshots.
pipelineModuleCreates a camera pipeline module that, when installed, receives callbacks on when the camera has started and when the canvas size has changed.
setForegroundCanvasSets a foreground canvas to be displayed on top of the camera canvas. This must be the same dimensions as the camera canvas.
takeScreenshotReturns a Promise that when resolved, provides a buffer containing the JPEG compressed image. When rejected, an error message is provided.