Classes
Type Definitions
-
FauxMessageEvent{Object}
-
Properties:
Name Type Description dataObject Message data.
-
Job{Object}
-
Properties:
Name Type Description metaObject Job metadata.
inputsArray.<ImageData> Array of input data.
callbackJobCallback Called when the job is complete.
-
-
MinionData{Object}
-
Properties:
Name Type Description buffersArray.<ArrayBuffer> Array of buffers.
metaObject Operation metadata.
imageOpsboolean The operation is an image operation.
widthnumber The width of the image.
heightnumber The height of the image.
-
A function that takes an array of input data, performs some operation, and returns an array of output data. For
pixeltype operations, the function will be called with an array of pixels, where each pixel is an array of four numbers ([r, g, b, a]) in the range of 0 - 255. It should return a single pixel array. For'image'type operations, functions will be called with an array of ImageData and should return a single ImageData. The operations are called with a second "data" argument, which can be used for storage. The data object is accessible from raster events, where it can be initialized in "beforeoperations" and accessed again in "afteroperations". -
Options{Object}
-
Properties:
Name Type Description sourcesArray.<(module:ol/source/Source~Source|module:ol/layer/Layer~Layer)> Input sources or layers. For vector data, use an VectorImage layer.
operationOperation | undefined Raster operation. The operation will be called with data from input sources and the output will be assigned to the raster source.
libObject | undefined Functions that will be made available to operations run in a worker.
threadsnumber | undefined By default, operations will be run in a single worker thread. To avoid using workers altogether, set
threads: 0. For pixel operations, operations can be run in multiple worker threads. Note that there is additional overhead in transferring data to multiple workers, and that depending on the user's system, it may not be possible to parallelize the work.operationTypeRasterOperationType
(defaults to 'pixel')Operation type. Supported values are
'pixel'and'image'. By default,'pixel'operations are assumed, and operations will be called with an array of pixels from input sources. If set to'image', operations will be called with an array of ImageData objects from input sources.resolutionsArray.<number> | null | undefined Resolutions. If specified, raster operations will only be run at the given resolutions. By default, the resolutions of the first source with resolutions specified will be used, if any. Set to
nullto use any view resolution instead. -
ProcessorOptions{Object}
-
Properties:
Name Type Description threadsnumber Number of workers to spawn.
operationOperation The operation.
libObject.<string, function()> | undefined Functions that will be made available to operations run in a worker.
queuenumber The number of queued jobs to allow.
imageOpsboolean
(defaults to false)Pass all the image data to the operation instead of a single pixel.
-
RasterOperationType{'pixel'} {'image'}
-
Raster operation type. Supported values are
'pixel'and'image'. -
RasterSourceEventTypes{ImageSourceEventTypes} {'beforeoperations'} {'afteroperations'}
-