Captures (part of) the given attachment of a framebuffer. The format of the underlying texture has to be gl.RGBA and the type has to be either gl.UNSIGNED_BYTE, gl.HALF_FLOAT or gl.FLOAT.
Framebuffer to capture.
Optional attachment to capture from. Is ignored for the default framebuffer.
Optional part of the framebuffer to capture.
Captures the gl.BACK buffer of the default framebuffer and writes it into the given framebuffer. Sets the color buffer source for the default framebuffer to gl.BACK.
Part of the framebuffer to capture.
Buffer to write the data into.
Captures the given attachment of the given framebuffer. Sets the color buffer source to the given attachment.
Framebuffer to capture.
Attachment to capture.
Part of the framebuffer to capture.
Buffer to write the data into.
Creates a data URL for the given image. The data will be encoded according to type. The type defaults to png, if no type is given. Quality can be only set for types using lossy compression. The default quality is 0.92.
Image to create the data URL for.
Optional format used for encoding.
Optional quality used for lossy compression.
Flips the given image data vertically.
Image data to flip.
Utility for capturing images directly from any framebuffer. This enables taking a screenshot bigger than the used canvas. Supports capturing of only part of the framebuffer. The resulting image can be transformed to a data URL. The data URL can then be used to embed the image inline in documents or to download it.