Type alias ScreenshotSettings

ScreenshotSettings: { antialiasing?: boolean; fileName?: string; mimeType?: string; renderSprites?: boolean; samples?: number; size?: IScreenshotSize }

screenshot internally uses Babylon.js ScreenshotTools.CreateScreenshotUsingRenderTarget.
See this link for additional info about the properties.

Type declaration

  • Optional antialiasing?: boolean

    Default false

  • Optional fileName?: string

    NOTE: after update to Babylon.js V6: if file name is given, the screenshot image will be downloaded and the base64 string will NOT be returned!

  • Optional mimeType?: string

    Default image/png

    Info regarding JPEG:
    Use mimeType image/jpeg (not image/jpg) when creating jpeg's.
    Also ensure that viewer.scene.clearColor has an alpha value of 1 as jpeg's don't support transparency. Otherwise background will always be black for jpeg's.

  • Optional renderSprites?: boolean

    Default false

  • Optional samples?: number

    Default 1

  • Optional size?: IScreenshotSize

    Defaults to canvas width & height

Generated using TypeDoc