
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
frame-duration
Advanced tools
A lib for calculating the duration of frame dynamically, based on requestAnimationFrame, default is 1000 / 30. The actual duration will be calculated after 15 frames.
A lib for calculating the duration of frame dynamically, based on requestAnimationFrame, default is 1000 / 30. The actual duration will be calculated after 15 frames.
https://github.com/livelybone/frame-duration.git
https://github.com/livelybone/frame-duration#readme
you can see the usage by run the example of the module, here is the step:
git clone https://github.com/livelybone/frame-duration.git
cd your-module-directory
npm i
(use taobao registry: npm i --registry=http://registry.npm.taobao.org
)npm run dev
http://127.0.0.1:3000/examples/test.html
) in your browsernpm i -S frame-duration
umd
bundleFrameDuration
See what method or params you can use in index.d.ts
import FrameDuration from 'frame-duration'
console.log(FrameDuration.duration) // -> 33.33
// Set default duration. Make sure that this only run at the start of app
FrameDuration.duration = 1000 / 60
// Duration after dynamic calculate
setTimeout(() => {
console.log(FrameDuration.duration) // -> 16.66
}, 1000)
Use in html, see what you can use in CDN: unpkg
<-- use what you want -->
<script src="https://unpkg.com/frame-duration/lib/umd/<--module-->.js"></script>
Or,see what you can use in CDN: jsdelivr
<script src="https://cdn.jsdelivr.net/npm/frame-duration/lib/umd/<--module-->.js"></script>
FAQs
A lib for calculating the duration of frame dynamically, based on requestAnimationFrame, default is 1000 / 30. The actual duration will be calculated after 15 frames.
The npm package frame-duration receives a total of 10 weekly downloads. As such, frame-duration popularity was classified as not popular.
We found that frame-duration demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.