Skip to content

useFps

Category
Export Size
553 B
Last Changed
5 days 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

v13.6.0 on
d32f8 - refactor: add @__NO_SIDE_EFFECTS__ annotations to all pure functions (#4907)
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