Type Alias ScreenshotOptions

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

Options for the screenshot2 function.

Type declaration

  • Optionalbackground?: Color | RGBAColor | ColorRepresentation

    The background of the screenshot. If not provided, the currently set background of the renderer/scene will be used

  • Optionalcamera?: Camera | ICamera | null

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

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

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

  • Optionalheight?: number

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

  • OptionalmimeType?: ScreenshotImageMimeType

    The mime type of the image

  • Optionalrender_events?: boolean

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

    true
    
  • Optionaltransparent?: boolean

    If true, the background will be transparent.

  • Optionalwidth?: number

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