English | 简体中文
An interactive 2D lab for exploring protected traffic-signal phases at three-, four-, and five-way intersections. Compare countdown policies, tune phase durations, and watch deterministic vehicle queues respond to independent left, through, and right signals.
Live application: shenzhepei.github.io/intersection-signal-lab
- Switch between explicit 3-way, 4-way, and 5-way route models.
- Inspect independent red, yellow, and green states for left, through, and right movements.
- Compare always-visible, last-10-seconds, and hidden countdown modes.
- Adjust through/right green, protected-left green, yellow, and all-red intervals.
- Pause, step, reset, and run the deterministic simulation at 0.5x, 1x, or 2x speed.
- Use the complete English and Simplified Chinese interface on desktop or mobile.
- Restore validated settings from local browser storage without a backend.
Requires Node.js 24 and pnpm 10.33.2.
pnpm install
pnpm devQuality checks:
pnpm typecheck
pnpm test:coverage
pnpm buildThe simulator uses right-hand traffic and practical protected teaching phases. Opposing approaches at a four-way intersection run together for through/right traffic and protected left turns. The main road at a three-way intersection is paired where movements are compatible; five-way approaches remain individually protected because the symmetric layout has no true opposing pair. Yellow and all-red clearance intervals separate every phase. A signal's red countdown represents time until its next green interval.
This application is an educational visualization. It is not certified traffic-engineering software and must not be used for field signal timing, regulatory compliance, or safety decisions.
MIT © 2026 shenzhepei
