Skip to content

five-on-it / packages/world/src/signals / signalColour

Function: signalColour() ​

signalColour(signal, group, tick): SignalColour

Defined in: packages/world/src/signals.ts:252

What a signalled junction shows a group of its approaches at a tick: the groups take turns, each green for SIGNAL_TIMING's green, then amber, then red for both while the box clears; red whenever the other group runs. Switched by hand, it shows what the switch says instead: green for its group and red for the other, red, or amber (flashing: signalFlashing).

Parameters ​

signal ​

SignalJunction

group ​

number

tick ​

number

Returns ​

SignalColour