Function renderTargetToDataUrl

  • Converts a render target to a png/jpeg data url string. Note: this will clamp the values to [0, 1] and converts to srgb for float and half-float render targets.

    Parameters

    • renderer: WebGLRenderer
    • target: WebGLRenderTarget<Texture> | WebGLMultipleRenderTargets
    • mimeType: string = 'image/png'
    • quality: number = 90
    • textureIndex: number = 0

      index of the texture to use in the render target (only in case of multiple render target)

    Returns string