Skip to content

useFps

类别
导出体积
553 B
上次更改
2 months ago

反应式 FPS (每秒帧数)。

示例

使用方法

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

类型声明

ts
export interface UseFpsOptions {
  /**
   * 计算每 x 帧的 FPS。
   * @default 10
   */
  
every
?: number
} export declare function
useFps
(
options
?: UseFpsOptions):
ShallowRef
<number>

源码

源码演示文档

贡献者

一纸忘忧
Anthony Fu
SerKo
IlyaL
webfansplz
jelf

更新日志

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