Type alias ScreenshotSettings

ScreenshotSettings: { alpha?: number; antialiasing?: boolean; autofocusScene?: boolean; beta?: number; enableStencilBuffer?: boolean; exclude?: ExcludedGeometryList; fileName?: string; height?: number; mimeType?: string; quality?: number; radius?: number; radiusFactor?: number; renderSprites?: boolean; samples?: number; target?: Vector3; useLayerMask?: boolean; width?: number }

Type declaration

  • Optional alpha?: number

    Camera alpha angle used for the screenshot, defaults to alpha angle of currently active camera

  • Optional antialiasing?: boolean

    Expert settings to tweak the screenshot image, see Babylon.js docs for further information

  • Optional autofocusScene?: boolean

    Can be used to automatically calculate camera radius and target, if these 2 settings are not defined explicitely

  • Optional beta?: number

    Camera beta angle used for the screenshot, defaults to beta angle of currently active camera

  • Optional enableStencilBuffer?: boolean

    Expert settings to tweak the screenshot image, see Babylon.js docs for further information

  • Optional exclude?: ExcludedGeometryList

    Optional list of geometry to be excluded from consideration

  • Optional fileName?: string

    If file name is given, the screenshot image will be downloaded and the base64 string will NOT be returned!

  • Optional height?: number

    Height of the final screenshot image, defaults to canvas height

  • Optional mimeType?: string

    "MIME type" of the returned screenshot image, defaults to image/png

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

  • Optional quality?: number

    Expert settings to tweak the screenshot image, see Babylon.js docs for further information

  • Optional radius?: number

    Camera radius used for the screenshot, default value depends on autofocusScene flag:

    • true: radius is calculated automatically so that the whole current scene content is visible
    • false: radius of currently active camera is used
  • Optional radiusFactor?: number

    Used to scale the calculated radius if radius property is not set and autofocusScene mode is active

  • Optional renderSprites?: boolean

    Expert settings to tweak the screenshot image, see Babylon.js docs for further information

  • Optional samples?: number

    Expert settings to tweak the screenshot image, see Babylon.js docs for further information

  • Optional target?: Vector3

    Camera target used for the screenshot, default value depends on autofocusScene flag:

    • true: center of the current scene content is set as camera target
    • false: target of currently active camera is used
  • Optional useLayerMask?: boolean

    Expert settings to tweak the screenshot image, see Babylon.js docs for further information

  • Optional width?: number

    Width of the final screenshot image, defaults to canvas width

Generated using TypeDoc