Skip to content

defineSystemSet

defineSystemSet(name, options): SystemSet

Defined in: ecs/system.ts:330

Group systems under one name so ordering and run conditions are written once.

const physics = defineSystemSet('physics', {
systems: [applyForces, integrateVelocity],
runBefore: ['render'],
runIf: () => !paused,
});
app.addSystemSetToSchedule(Schedule.FixedUpdate, physics);

Members keep the order they are listed in; anything constraining 'physics' constrains all of them.

string

SystemSetOptions

SystemSet