KineticsPort
Interface
Section titled “Interface”export interface KineticsPort extends ActivityPort { compute(dt: number, vector: Readonly<number[]>): void; readonly state: SimulationState;}PURPOSE
Section titled “PURPOSE”A port for multidimensional motion computation.
The Simulator calls compute() at each fixed timestep to update state toward the target vector.
| Member | Description |
|---|---|
compute(dt, vector) | Advances position and velocity one step toward the target vector |
state | Returns the current SimulationState (absolute position, relative displacement, velocity, activity level) |
isActive() | Returns true if activity level exceeds threshold (from ActivityPort) |
Inherits from ActivityPort.
Default implementation is the Kinetics class. Internally, it calls EnginePort.compute() for each dimension.
Implementing CloneableKineticsPort allows creating copies with the same configuration.