New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tweeny.js

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

tweeny.js

A lightweight, bare bones, javascript animation engine with some handy easing functions.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

Tweeny.js

A lightweight ( 5kb minified ), bare bones, javascript animation engine with some handy easing functions.

Usage:

const tween = Tweeny.to({ foo: 24, bar: 50 }, 1000, {
  foo: 42,
  bar: 100,
  onUpdate: (obj) => console.log(obj.foo, obj.bar),
  onComplete: (obj) => console.log('Done!', obj),
  ease: Tweeny.ease.inOutElastic
})

// tween.pause()
// tween.play()
// tween.restart()
// tween.loop()
// tween.kill()

Controls

Each created tween has a set of controls available:

MethodDescription
pause()pause playing animation
play()play paused animation
restart()restart playing or paused animation
loop()loop animation until killed
kill()kill animation

Easing

Some helpful easing functions from https://gist.github.com/gre/1650294

Accessible through Tweeny.ease

EaseDescription
linearno easing, no acceleration
inQuadaccelerating from zero velocity
outQuaddecelerating to zero velocity
inOutQuadacceleration until halfway, then deceleration
inCubicaccelerating from zero velocity
outCubicdecelerating to zero velocity
inOutCubicacceleration until halfway, then deceleration
inQuartaccelerating from zero velocity
outQuartdecelerating to zero velocity
inOutQuartacceleration until halfway, then deceleration
inQuintaccelerating from zero velocity
outQuintdecelerating to zero velocity
inOutQuintacceleration until halfway, then deceleration
inElasticelastic bounce effect at the beginning
outElasticelastic bounce effect at the end
inOutElasticelastic bounce effect at the beginning and end
inSinaccelerating from zero velocity
outSinaccelerating to zero velocity
inOutSinacceleration until halfway, then deceleration

Keywords

FAQs

Package last updated on 05 Jun 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc