Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
nanotween
Advanced tools
Readme
1.5 KB is quite enough for full-featured and comfortable tweening
I made some researches with bundlephobia and size-limit and here's what I can say
For now, NanoTween is the smallest tweening library on NPM
library ¦ size
-----------¦-------
es6-tween ¦ 6.0 KB
tweenr ¦ 4.7 KB
shifty ¦ 4.2 KB
tweenjs ¦ 2.9 KB
tweeno ¦ 2.8 KB
nanotween ¦ 1.6 KB
npm install nanotween
yarn add nanotween
You can find complete guide and more examples on Wiki page
Simple countdown timer
import NanoTween from 'nanotween'
import { linear } from 'nanotween/easings'
// Start tweening process
const animate = () => {
requestAnimationFrame(animate)
Nanotween.update()
}
animate()
// Some element and duration in seconds
const el = document.getElementById('tween')
const duration = 10
// Create tween object
const tween = new NanoTween()
.duration(duration * 1000)
.repeat(3)
.easing(linear)
.on('update', progress => {
el.innerHTML = (progress * duration).toFixed(2)
})
.on('complete', () => alert('Time is over'))
// Start timer
tween.start()
FAQs
Tiny library for tweening
The npm package nanotween receives a total of 94 weekly downloads. As such, nanotween popularity was classified as not popular.
We found that nanotween 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.