Skip to content

1681-engine / index / WorkerPainterOptions

Interface: WorkerPainterOptions<T> ​

Defined in: src/assets/workerPainter.ts:6

Type Parameters ​

Type Parameter
T

Properties ​

create ​

ts
create: () => Worker;

Defined in: src/assets/workerPainter.ts:8

Makes the worker, the first time something is painted: () => new Worker(new URL('./paint.ts', import.meta.url), { type: 'module' }).

Returns ​

Worker


message? ​

ts
optional message?: (item, id) => unknown;

Defined in: src/assets/workerPainter.ts:10

The message posted for an item (default { id, item }); the worker answers with a PaintReply naming that id.

Parameters ​

ParameterType
itemT
idstring

Returns ​

unknown

Released under the MIT License.