Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
testing | coverage |
---|---|
const Easing = require('easing')
const x = Easing(11,'linear')
// [ 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1 ]
const y = Easing(11,'quadratic')
// [ 0, 0.01, 0.04, 0.09, 0.16, 0.25, 0.36, 0.49, 0.64, 0.81, 1 ]
npm install --save easing
Simply include browser-easing.js
and you can directly use the Easing function globally
<script src="browser-easing.js"></script>
<script>
var x = Easing(11,'cubic');
console.log(x)
</script>
const Easing = require('easing')
For an array of 42 values that are linear,
Easing(42,'linear')
For an array of 100 values that are quadratic,
Easing(100,'quadratic')
For an array of 42 cubic values,
Easing(42,'cubic')
For an array of 1492 quartic values,
Easing(1492,'quartic')
Easing(25,'quintic')
Easing(333,'sinusoidal')
Easing(333,'sin')
Easing(314,'circular')
Easing(81,'exponential')
If we wanted to go from 0 to 1 back to 0 quadratically, simply call
Easing(100,'quadratic',{endToEnd:true});
If we want to go from 1 to 0 (or 1 to 0 back to 1) instead of 0 to 1, say 'linear' style, simply call
Easing(100,'linear',{invert:true});
You can mix and match these options.
MIT
FAQs
Easing Functions Without the Framework Cruft
The npm package easing receives a total of 379 weekly downloads. As such, easing popularity was classified as not popular.
We found that easing 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.