FPS

Reactive FPS (frames per second).

Usage

<script>
    import {fps} from "@sveu/browser"

    const result = fps()
</script>
<script>
    import {fps} from "@sveu/browser"

    const result = fps()
</script>
svelte

Example

0

<script>
    import { fps } from "@sveu/browser"

    const result = fps()
</script>

<h1>{$result}</h1>
<script>
    import { fps } from "@sveu/browser"

    const result = fps()
</script>

<h1>{$result}</h1>
svelte
1
2
3
4
5
6
7
Click fold/expand code

API

Options

Name Description Type Default
every Calculate the FPS on every x frames. number 10