Skip to content

useFps

Category
Export Size
497 B
Last Changed
4 months ago

Reactive FPS (frames per second).

Demo

Usage

js
import { useFps } from '@vueuse/core'

const fps = useFps()

Type Declarations

typescript
export interface UseFpsOptions {
  /**
   * Calculate the FPS on every x frames.
   * @default 10
   */
  every?: number
}
export declare function useFps(options?: UseFpsOptions): ShallowRef<number>

Source

SourceDemoDocs

Contributors

Anthony Fu
IlyaL
webfansplz
jelf

Changelog

v12.0.0-beta.1 on
0a9ed - feat!: drop Vue 2 support, optimize bundles and clean up (#4349)

Released under the MIT License.

Build faster with AI
New Masterclass to help you leverage AI in your Vue workflow.
Get Early Access