Skip to content

VelocityIntegrationOptions

Defined in: src/modules/motion/motion.ts:31

Options for makeVelocityIntegrationSystem: name, an optional boundary, tag-scoping, and onMove / runAfter hooks.

TCtx extends VelocityIntegrationTickCtx

optional boundary?: VelocityIntegrationBoundary

Defined in: src/modules/motion/motion.ts:33


optional name?: string

Defined in: src/modules/motion/motion.ts:32


optional onMove?: (ctx, id, prev, next) => void

Defined in: src/modules/motion/motion.ts:51

Invoked once per entity whose position actually changed this tick, after any boundary handling. The prev snapshot is a plain value object, not the store entry itself, so it is safe to retain. Provides an escape hatch for games that keep a separate spatial index or dirty-flag queue in sync; the motion module itself does not touch either.

TCtx

EntityId

Readonly<Position>

Readonly<Position>

void


optional runAfter?: string[]

Defined in: src/modules/motion/motion.ts:34


optional tag?: TagDef

Defined in: src/modules/motion/motion.ts:42

Integrate only entities carrying this tag (in addition to having Position + Velocity). Unset integrates every velocity entity. The marker/query-filter idiom (like this engine’s own kinematics dynamicTag) — so a game that runs kinematics over its bodies can still integrate a disjoint set without double-integrating them.