useFps
A hook to calculate the FPS
Loading...
Installation
npx shadcn@latest add @shadcnhooks/use-fpsAPI
interface UseFpsProps {
/**
* Calculate the FPS on every x frames.
* @default 10
*/
every?: number
}
/**
* A hook to calculate the FPS
* @param options - The options for the FPS
* @param options.every - The number of frames to calculate the FPS on
* @default { every: 10 }
* @returns The FPS
*/
export function useFps(options?: UseFpsProps): numberCredits
Last updated on