Physics · interface

PoolWorker

The part of a worker this pool uses.

Explained in Your first game, Rigid bodies.

interface PoolWorker
import type { PoolWorker } from '@driftengine/physics';

In depth

A browser Worker satisfies it and so does node:worker_threads, which is what lets the gate run the real entry point in Node instead of a stand-in that would prove nothing about threads.

Methods

postMessage

postMessage(value: unknown): void
ParameterTypeDescription
valueunknown

terminate

terminate(): void | Promise<number>