getFps

Category Sensors

Get the current frames per second of the device.

Demo

fps : 0

Usage

<script>
	import { getFps } from '@sv-use/core';
 
	const fps = getFps();
</script>
Type definitions
type GetFpsOptions = {
    /** Re-calculate the frames per second every `x` frames. */
    every?: number;
};
type GetFpsReturn = {
    readonly current: number;
};
/**
 * @see https://svelte-librarian.github.io/sv-use/docs/core/sensors/get-fps
 */
export declare function getFps(options?: GetFpsOptions): GetFpsReturn;
export {};

Sources