Type alias ScreenshotOptions

ScreenshotOptions: {
    camera?: Camera | null;
    context?: Pick<Context, "scene" | "renderer" | "mainCamera" | "renderNow" | "updateAspect" | "updateSize">;
    download_filename?: string;
    height?: number;
    mimeType?: ScreenshotImageMimeType;
    render_events?: boolean;
    transparent?: boolean;
    width?: number;
}

Options for the screenshot2 function.

Type declaration

  • Optional camera?: Camera | null

    The camera to use for the screenshot. If not provided, the main camera of the context will be used.

  • Optional context?: Pick<Context, "scene" | "renderer" | "mainCamera" | "renderNow" | "updateAspect" | "updateSize">

    The context to take the screenshot from. If not provided, the current context will be used.

  • Optional download_filename?: string

    If set the screenshot will be downloaded using the provided filename.
    NOTE: if you need more control you can manually download the returned image using saveImage

    Default

    undefined
    
  • Optional height?: number

    The height of the screenshot - if not provided, the height of the current renderer will be used.

  • Optional mimeType?: ScreenshotImageMimeType

    The mime type of the image

  • Optional render_events?: boolean

    If true onBeforeRender and onAfterRender will be invoked on all renderers in the scene.

    Default

    true
    
  • Optional transparent?: boolean

    If true, the background will be transparent.

  • Optional width?: number

    The width of the screenshot - if not provided, the width of the current renderer will be used.

Generated using TypeDoc