Skip to content

v1.4.3 — Render loop re-arms after idling (drag-freeze fix)

Choose a tag to compare

@Nano112 Nano112 released this 09 Jun 15:13
· 7 commits to master since this release

Fixes a regression from the on-demand render loop (1.4.0).

Fix

  • After the loop idled into a slow setTimeout poll, the animation-frame handle was left holding a stale, already-fired id. invalidate() used that handle to decide whether to restart the loop, saw it as "still pending", and scheduled nothing — so an OrbitControls mouse drag (or any invalidate()) begun after the scene had settled looked frozen until an explicit action forced a direct render.
  • The rAF / idle-poll bookkeeping is now owned by a small RenderLoopScheduler that clears the spent frame handle at the start of every tick, so the loop re-arms reliably on wake. The loop is also pinned continuous while a pointer is held, for smooth drags and a clean damping hand-off.
  • Adds unit tests covering the re-arm-after-idle regression.