Skip to content

useFps

Category
Export Size
558 B
Last Changed
10 months ago

Reactive FPS (frames per second).

Demo

Usage

ts
import { 
useFps
} from '@vueuse/core'
const
fps
=
useFps
()

Type Declarations

ts
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
SerKo
IlyaL
webfansplz
jelf

Changelog

d32f8 - refactor: add @__NO_SIDE_EFFECTS__ annotations to all pure functions (#4907)
0a9ed - feat!: drop Vue 2 support, optimize bundles and clean up (#4349)

Released under the MIT License.