FrameScheduler

interface FrameScheduler

Per-platform vsync-aligned (or close-enough) frame scheduler. Implementations are expected to fire start's callback repeatedly until stop is called, with dtMs being the elapsed milliseconds since the previous tick (or since start for the first tick). The dtMs should be capped to a reasonable upper bound (e.g. 64 ms) so a missed frame can't teleport the camera.

Functions

Link copied to clipboard
abstract fun start(tick: (dtMs: Double) -> Unit)

Begins firing tick every render frame until stop is called.

Link copied to clipboard
abstract fun stop()

Stops firing. Safe to call when not started.