
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
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 8 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.