Debug flag.
The reference to the pixel buffer.
Private
#rendererThe WebGL2 renderer.
Private
#glThe reference to a WebGL2 sync object.
Private
#formatThe texture format on which the Texture Extractor must work.
Private
#typeThe texture type on which the Texture Extractor must work.
Private
#readThe texture format on which the Texture Extractor should read.
Private
#gpuThe reference to the GPU buffer.
Private
#createTo know if we need to create a GPU buffer.
Private
#callerThe caller name associated with this instance of texture extractor (optional, used for debug)
Private
#generatedGenerated RenderTexture for textures.
Private
#compressorThe compressor worker wrapper
Private
#queueHandling of the concurrency for the extraction (by default a queue of 1)
Static
COMPRESSION_List of compression that could be applied with extraction
Private
#readReturns the read buffer width/height multiplier.
Extract a rectangular block of pixels from the texture (without un-pre-multiplying).
Options which configure extraction behavior
Private
#extractExtract a rectangular block of pixels from the texture (without un-pre-multiplying).
Options which configure extraction behavior
Private
#compressPrivate
#compressCompress the buffer into a worker and returns a base64 image
Buffer to convert into a compressed base64 image.
Width of the image.
Height of the image.
Format of the image.
Quality of the compression.
Private
#compressCompress the buffer locally (but expand the buffer into a worker) and returns a base64 image. The image format is forced to jpeg.
Buffer to convert into a compressed base64 image.
Width of the image.
Height of the image.
Quality of the compression.
Private
#readPrivate
#getGPUBufferRetrieve the content of the GPU buffer and put it pixels. Returns an object with the pixel buffer and dimensions.
The pixel buffer.
The width of the texture.
The height of the texture.
The size of the buffer.
Private
#getPrivate
#waitPrivate
#clearPrivate
#consolePrivate
#console
A class or interface that provide support for WebGL async read pixel/texture data extraction.