Skip to main content

XR8.CanvasScreenshot.setForegroundCanvas()

XR8.CanvasScreenshot.setForegroundCanvas(canvas)

Description​

Sets a foreground canvas to be displayed on top of the camera canvas. This must be the same dimensions as the camera canvas.

Only required if you use separate canvases for camera feed vs virtual objects.

Parameters​

ParameterDescription
canvasThe canvas to use as a foreground in the screenshot

Returns​

None

Example​

const myOtherCanvas = document.getElementById('canvas2')
XR8.CanvasScreenshot.setForegroundCanvas(myOtherCanvas)