https://github.com/davidfig/fps
Yet another FPS indicator with graph
https://github.com/davidfig/fps
Last synced: about 1 year ago
JSON representation
Yet another FPS indicator with graph
- Host: GitHub
- URL: https://github.com/davidfig/fps
- Owner: davidfig
- License: mit
- Created: 2017-10-08T08:21:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-27T00:23:03.000Z (over 2 years ago)
- Last Synced: 2025-04-14T23:44:03.361Z (about 1 year ago)
- Language: TypeScript
- Size: 4.04 MB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yy-fps
A vanilla, easy-to-use FPS meter with colored graph and no dependencies or separate CSS files
## Features
* vanilla javascript written in typescript
* simple one call per loop
* no dependencies
* no CSS files required (styles can be changed by passing a style object)
* placement in any corner
* restyle any part
* toggle the meter on or off
## New v2
* rewrote entire codebase in typescript with same functionality as v1
* improved demo
* improved packaging
## Installation
npm i yy-fps
or
copy the dist/fps.min.js file to your app, and include it:
## Simple Example
import { FPS } from 'yy-fps'
const fps = new FPS()
// or if including the file directly:
// const fps = FPS.FPS()
// update function
function update() {
// do stuff like rendering and dancing
fps.frame()
requestAnimationFrame(update)
}
update()
## Live Example
https://davidfig.github.io/fps/
## Documentation
https://davidfig.github.io/fps/jsdoc
## License
MIT License
(c) 2021 [YOPEY YOPEY LLC](https://yopeyopey.com/) by [David Figatner](https://twitter.com/yopey_yopey/)