14 minutes
Sun Position
The lab
This course branches off Endless Rampage Highway, at lessons 1.4 and 1.8. You already own every component it uses, so it grants no credits. Its lab is the finished highway, free to series owners:
That writes public/scenes/EndlessHighway/scene.json. Copy it over your src/scenes/endlessrampage.json and reload. The clock starts in the late afternoon and runs fast, so the sun sets 43 s after you load.
Lesson 1.4 turned the hour into a sun height and a light direction. Lesson 1.8 handed that light to the moon. Two more numbers came along without their curves: the colour of the light, and the darkness that the headlights, the street lamps and the lane paint all key off. Both are curves of the sun's height. Here are those curves, and then you add a golden hour of your own.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.