Skip to content

Home > @unseenco/backstage-core > IRafDriver

IRafDriver interface

Public API for a custom requestAnimationFrame driver that advances Backstage's core ticker.

Signature:

typescript
export interface IRafDriver

Properties

PropertyModifiersTypeDescription
idnumberThe id of the driver. This is used for debugging purposes. It's guaranteed to be unique.
namestringThe name of the driver. This is used for debugging purposes.
tick(time: number) => voidThis is called by the driver when it's time to tick forward. The time param is of the same type returned by performance.now().
type'Backstage_RafDriver_PublicAPI'All raf derivers have have driver.type === 'Backstage_RafDriver_PublicAPI'