GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

02Cars That Stop Behind the Car Ahead With a Gap at Red

Every frame the gap to the car ahead and the distance to the stop line decide acceleration and braking (gap 24 px, brake 0.07, accel 0.04); only cars that can still stop when the light turns yellow aim at the line, so queued cars keep their gap and none crosses on red.

Best forA traffic-flow explainer scene

SAFE_GAPBRAKE_DECELSTOP_LINE_XACCEL
Cars That Stop Behind the Car Ahead With a Gap at Red
Open in a new tab

02 Cars That Stop Behind the Car Ahead With a Gap at Red — Measured area 10.192% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · Traffic Light CSS: 9 Demos With Queues and Waves

The post this demo lives in

Traffic Light CSS: 9 Demos With Queues and Waves - preview of all 9 demosTraffic Light CSS: 9 Demos With Queues and WavesA traffic light css built as a color-swapping timer lets cars roll through red, signals drift out of step and pedestrian See all demos in this post

If you like this effect - similar demos