(data: { features: PicaFeaturesFlat }, tileJob: MathResizeAndUnsharpOptions)
| 10 | let mathLib: MathLib | null = null |
| 11 | |
| 12 | function resize_math (data: { features: PicaFeaturesFlat }, tileJob: MathResizeAndUnsharpOptions): Uint8Array { |
| 13 | if (!mathLib) mathLib = new MathLib(data.features) |
| 14 | |
| 15 | // Use multimath's sync auto-init. Avoid Promise use in old browsers, |
| 16 | // because polyfills are not propagated to webworker. |
| 17 | return mathLib.resizeAndUnsharp(tileJob) |
| 18 | } |
| 19 | |
| 20 | function resizeBitmap (data: WorkerResizePayload, tileJob: TileResizeBitmapJob): void { |
| 21 | let srcCanvas: OffscreenCanvas | null = new OffscreenCanvas(tileJob.width, tileJob.height) |
no test coverage detected
searching dependent graphs…