{"id":21524875,"url":"https://github.com/degjs/easing","last_synced_at":"2025-03-17T18:17:48.198Z","repository":{"id":9315913,"uuid":"61588336","full_name":"DEGJS/easing","owner":"DEGJS","description":"Javascript animation easing functions","archived":false,"fork":false,"pushed_at":"2023-01-03T15:16:34.000Z","size":113,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-02-24T11:54:35.233Z","etag":null,"topics":["animation-css"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEGJS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-20T23:53:55.000Z","updated_at":"2021-01-25T21:23:45.000Z","dependencies_parsed_at":"2023-01-13T15:17:07.480Z","dependency_job_id":null,"html_url":"https://github.com/DEGJS/easing","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEGJS%2Feasing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEGJS%2Feasing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEGJS%2Feasing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEGJS%2Feasing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEGJS","download_url":"https://codeload.github.com/DEGJS/easing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244085010,"owners_count":20395523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation-css"],"created_at":"2024-11-24T01:30:10.506Z","updated_at":"2025-03-17T18:17:48.180Z","avatar_url":"https://github.com/DEGJS.png","language":"JavaScript","readme":"# Easing\n![Run Tests](https://github.com/DEGJS/easing/workflows/Run%20Tests/badge.svg)\n\nA collection of animation easing functions in Javascript's ES6 module format. Easing functions specify the rate of change of a parameter over time. Learn more about easing [here](https://developers.google.com/web/fundamentals/design-and-ui/animations/the-basics-of-easing?hl=en).\n\n## Install\nEasing is an ES module. If your runtime environment does not support ES modules, you'll need a transpiler ([Babel](https://babeljs.io) is a nice one).\n\nIf you're using NPM, you can install Easing with the following command:\n\n```\n$ npm install @degjs/easing\n```\n\n## Usage\n```js\nimport { easeInOutCubic } from '@degjs/easing';\n\n// animate a value from 100 to 300 with ease-in-out easing over the course of 1 second\nlet currentIteration = 0,\n\ttotalIterations = 60,\n\tstartValue = 100,\n\tchangeInValue = 200,\n\teasedValue;\n\nwindow.requestAnimationFrame(onAnimationFrame);\n\nfunction onAnimationFrame() {\n\tif(currentIteration \u003c totalIterations) {\n\t\tcurrentIteration++;\n\t\teasedValue = easeInOutCubic(currentIteration, startValue, changeInValue, totalIterations);\n\t}\n}\n\n```\n\n## Methods\nAll methods take the same four parameters, defined below:\n#### currentIteration\nType: `Number`   \nThe current iteration. Think of this in terms of animation frames or seconds/milliseconds.\n\n#### startValue\nType: `Number`\nThe start value. This is the initial state of the value that will be animated.\n\n#### changeInValue\nType: `Number`\nThe amount of change in the value over the duration of the animation.\n\n#### totalIterations\nThe duration of the animation. Think of this in terms of animation frames or seconds/milliseconds.\n\n### .linear(currentIteration, startValue, changeInValue, totalIterations)\nA linear rate of change with no easing.\n### .easeOutCubic(currentIteration, startValue, changeInValue, totalIterations)\nStarts quickly and ends slowly.\n### .easeInCubic(currentIteration, startValue, changeInValue, totalIterations)\nStarts slowly and ends quickly.\n### .easeInOutCubic(currentIteration, startValue, changeInValue, totalIterations)\nStarts and ends slowly. ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdegjs%2Feasing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdegjs%2Feasing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdegjs%2Feasing/lists"}