UNPKG

@thewtex/vtk.js-esm

Version:

Visualization Toolkit for the Web

27 lines (23 loc) 696 B
import { G as GenericWorker_1 } from './GenericWorker.js'; import { u as utils } from '../utils.js'; /** * A worker which convert chunks to a specified type. * @constructor * @param {String} destType the destination type. */ function ConvertWorker(destType) { GenericWorker_1.call(this, "ConvertWorker to " + destType); this.destType = destType; } utils.inherits(ConvertWorker, GenericWorker_1); /** * @see GenericWorker.processChunk */ ConvertWorker.prototype.processChunk = function (chunk) { this.push({ data : utils.transformTo(this.destType, chunk.data), meta : chunk.meta }); }; var ConvertWorker_1 = ConvertWorker; export { ConvertWorker_1 as C };