Run this preprocessor in the provider's web worker. The processor function
must be self-contained; it cannot access closures or main-thread APIs.
OptionaloptionsStructured-cloneable values available as context.options; an empty
object is supplied when omitted.
A standalone function (serialized and reconstructed in the worker) or a URL
to a JavaScript module whose default export is the processor function.
Receives (input, context), where context.options
contains the configured options and context.utils
exposes worker-safe helpers such as WorkerPreProcessorUtils.decodeTga.
Serialized functions and module loading use dynamic code loading, which may
require unsafe-eval and module URLs to be permitted by the Content Security Policy.
Cross-origin module URLs must allow worker-origin CORS requests.
Receives WorkerPreProcessorInput (data and tile coordinates), not a
provider or ready callback; return the processed array or a Promise of it.
Utilities include base64 decoding, decompression, and
WorkerPreProcessorUtils.decodeTga for preparing ModelTextureData.
Run a single worker processor. For worker followed by main-thread processing, use PreProcessorPipelineOptions.