Physics · interface

Executor

Explained in Your first game, Rigid bodies.

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

Properties

NameTypeDescription
namereadonlystringA name, so a figure taken from a benchmark says which character produced it.
failurereadonlyoptionalstring | nullSet once a character has given up and gone serial, with a sentence saying why. Null while healthy.

Methods

run

run(count: number, solver: IslandSolver): void
ParameterTypeDescription
countnumber
solverIslandSolver

disposeoptional

dispose?(): void

Release whatever the character holds. A pool terminates its workers.

More

Optional, and declared here rather than tested for with instanceof, because reaching the pool class from world.ts would put the whole pool in every consumer's bundle — including the ones that never ask for a worker. Measured at 2,629 bytes gzipped, which is the difference between this seam being a seam and being a static dependency.