Skip to content

ActivityPort

export interface ActivityPort {
isActive(): boolean;
}

A port to query whether the simulation subject is currently active. The Simulator refers to this port and automatically stops the loop when all contexts become inactive.

MethodDescription
isActive()Returns true if active

ClockPort and KineticsPort inherit this port. The Simulator checks isActive() on both Clock and Kinetics each frame, continuing the loop while either is active.