API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceFrameScheduler

@codexo/exojs / core / stable

Display-synchronised frame scheduling. The timestamp handed to the callback shares its origin with TimeSource.now, so the two can be compared and subtracted without conversion.

0
props
2
methods
0
events
Import
import { FrameScheduler } from '@codexo/exojs'

Display-synchronised frame scheduling. The timestamp handed to the callback shares its origin with TimeSource.now, so the two can be compared and subtracted without conversion.

Methods2
cancelFrame(handle: number): void
Cancel a frame scheduled by FrameScheduler.requestFrame.
requestFrame(callback: (timestamp: number) => void): number
Schedule callback for the next display frame and return a handle for FrameScheduler.cancelFrame. One-shot - a frame loop reschedules itself every frame. timestamp is the host's frame time. It is the time the frame was *scheduled for*, not the time the callback happened to run, so deltas derived from it are free of the jitter that reading a clock at the top of the callback introduces.
Source