-
Name Type Description helpermodule:ol/webgl/Helper~WebGLHelper WebGL helper; mandatory.
sizeArray.<number> Expected size of the render target texture; note: this can be changed later on.
Methods
-
This will cause following calls to
#readAllor#readPixelto download the content of the render target into memory, which is an expensive operation. This content will be kept in cache but should be cleared after each new render. -
Returns the size of the render target texture
Returns:
Size of the render target texture
-
Returns the full content of the frame buffer as a series of r, g, b, a components in the 0-255 range (unsigned byte).
Returns:
Integer array of color values
-
Reads one pixel of the frame buffer as an array of r, g, b, a components in the 0-255 range (unsigned byte). If x and/or y are outside of existing data, an array filled with 0 is returned.
Name Type Description xnumber Pixel coordinate
ynumber Pixel coordinate
Returns:
Integer array with one color value (4 components)
-
Changes the size of the render target texture. Note: will do nothing if the size is already the same.
Name Type Description sizeArray.<number> Expected size of the render target texture
OpenLayers