Core · interface
FrameSource
A source of animation frames. window satisfies it, and so does an XRSession.
Explained in The loop.
interface FrameSourceimport type { FrameSource } from '@driftengine/core';In depth
Structural rather than a class, because both of the things that satisfy it are somebody else's: one is the browser's and one is a runtime's.
Methods
requestAnimationFrame
requestAnimationFrame(callback: (timeMs: number, frame?: unknown) => void): number| Parameter | Type | Description |
|---|---|---|
callback | (timeMs: number, frame?: unknown) => void |
cancelAnimationFrame
cancelAnimationFrame(handle: number): void| Parameter | Type | Description |
|---|---|---|
handle | number |