• Take a screenshot from the current scene.

    Parameters

    • opts: ScreenshotOptionsTexture

    Returns Texture | null

    The data url of the screenshot. Returns null if the screenshot could not be taken.

    const res = screenshot2({
    width: 1024,
    height: 1024,
    mimeType: "image/webp",
    transparent: true,
    })
    // use saveImage to download the image
    saveImage(res, "screenshot.webp");
  • Parameters

    • opts: ScreenshotOptionsDataUrl

    Returns string | null

Generated using TypeDoc