@slidy/easing
Advanced tools
+1
-1
@@ -1,1 +0,1 @@ | ||
| "use strict";var Slidy=(()=>{var i=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var x=(n,c)=>{for(var s in c)i(n,s,{get:c[s],enumerable:!0})},m=(n,c,s,a)=>{if(c&&typeof c=="object"||typeof c=="function")for(let o of b(c))!f.call(n,o)&&o!==s&&i(n,o,{get:()=>c[o],enumerable:!(a=q(c,o))||a.enumerable});return n};var y=n=>m(i({},"__esModule",{value:!0}),n);var w={};x(w,{back:()=>l,bounce:()=>E,circ:()=>M,cubic:()=>t,elastic:()=>h,expo:()=>d,linear:()=>e,quad:()=>r,quart:()=>u,quint:()=>g,sine:()=>p});var e=n=>n,r=n=>n*n,t=n=>n*n*n,u=n=>n*n*n*n,g=n=>n*n*n*n*n,E=n=>1-(s=>s<.36363636363636365?7.5625*s*s:s<.7272727272727273?7.5625*(s-=.5454545454545454)*s+.75:s<.9090909090909091?7.5625*(s-=.8181818181818182)*s+.9375:7.5625*(s-=.9545454545454546)*s+.984375)(1-n),p=n=>1-Math.cos(n*Math.PI/2),d=n=>n===0?0:Math.pow(2,10*n-10),h=n=>{let c=2*Math.PI/3;return n===0?0:n===1?1:-Math.pow(2,10*n-10)*Math.sin((n*10-10.75)*c)},M=n=>1-Math.sqrt(1-Math.pow(n,2)),l=n=>2.70158*n*n*n-1.70158*n*n;return y(w);})(); | ||
| "use strict";var SlidyEasing=(()=>{var i=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var x=(n,c)=>{for(var s in c)i(n,s,{get:c[s],enumerable:!0})},m=(n,c,s,a)=>{if(c&&typeof c=="object"||typeof c=="function")for(let o of b(c))!f.call(n,o)&&o!==s&&i(n,o,{get:()=>c[o],enumerable:!(a=q(c,o))||a.enumerable});return n};var y=n=>m(i({},"__esModule",{value:!0}),n);var w={};x(w,{back:()=>l,bounce:()=>E,circ:()=>M,cubic:()=>t,elastic:()=>h,expo:()=>d,linear:()=>e,quad:()=>r,quart:()=>u,quint:()=>g,sine:()=>p});var e=n=>n,r=n=>n*n,t=n=>n*n*n,u=n=>n*n*n*n,g=n=>n*n*n*n*n,E=n=>1-(s=>s<.36363636363636365?7.5625*s*s:s<.7272727272727273?7.5625*(s-=.5454545454545454)*s+.75:s<.9090909090909091?7.5625*(s-=.8181818181818182)*s+.9375:7.5625*(s-=.9545454545454546)*s+.984375)(1-n),p=n=>1-Math.cos(n*Math.PI/2),d=n=>n===0?0:Math.pow(2,10*n-10),h=n=>{let c=2*Math.PI/3;return n===0?0:n===1?1:-Math.pow(2,10*n-10)*Math.sin((n*10-10.75)*c)},M=n=>1-Math.sqrt(1-Math.pow(n,2)),l=n=>2.70158*n*n*n-1.70158*n*n;return y(w);})(); |
+7
-3
| { | ||
| "name": "@slidy/easing", | ||
| "version": "1.0.4", | ||
| "version": "1.0.5", | ||
| "description": "Simple easing functions for inertion scrolling", | ||
@@ -25,3 +25,7 @@ "main": "dist/index.cjs", | ||
| ], | ||
| "author": "Valexr", | ||
| "author": { | ||
| "name": "Valexr", | ||
| "email": "valexr@gmail.com", | ||
| "url": "https://github.com/Valexr" | ||
| }, | ||
| "license": "MIT", | ||
@@ -35,3 +39,3 @@ "bugs": { | ||
| "dev:core": "node esbuild --dev", | ||
| "build": "rm -rf dist && node esbuild && tsc", | ||
| "build": "node esbuild && tsc", | ||
| "lint": "eslint './src/**/*.{js,ts}'", | ||
@@ -38,0 +42,0 @@ "lint:fix": "eslint --fix './src/**/*.{js,ts}'", |
+2
-2
@@ -65,7 +65,7 @@ [](https://www.npmjs.com/package/@slidy/easing) | ||
| <head> | ||
| <script src="https://unpkg.com/@slidy/easing"></script> | ||
| <script src="https://unpkg.com/@slidy/easing/dist/index.js"></script> | ||
| </head> | ||
| <script> | ||
| window.onload = () => easing = Slidy.linear() | ||
| window.onload = () => easing = SlidyEasing.linear() | ||
| </script> | ||
@@ -72,0 +72,0 @@ ``` |
8065
1.28%