New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@lancercomet/fps-counter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lancercomet/fps-counter

Read fps.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@lancercomet/fps-counter

MyWebLibs npm version

A library to read fps.

Quick start

import { FpsCounter } from '@lancercomet/fps-counter'

const fpsCounter = new FpsCounter()
const unregisterTick = fpsCounter.onTick((fps: number) => {
  console.log('Fps:', fps)  
})
fpsCounter.start()

// Unregister tick from FpsCounter:
unregisterTick()

// Stop counting:
fpsCounter.stop()

// Read fps directly:
fpsCounter.fps

onTick triggers every frame.

You can pass use your own throttle function to take it easy.

License

Apache-2.0

Keywords

FPS

FAQs

Package last updated on 09 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts