{"id":15414323,"url":"https://github.com/tannerlinsley/springer","last_synced_at":"2025-07-04T01:04:46.461Z","repository":{"id":57367984,"uuid":"88990783","full_name":"tannerlinsley/springer","owner":"tannerlinsley","description":"A spring that generates realistic easing functions","archived":false,"fork":false,"pushed_at":"2017-04-21T16:04:57.000Z","size":39,"stargazers_count":61,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T16:35:10.437Z","etag":null,"topics":["animation","easing","function","motion","physics","spring","tension","wobble"],"latest_commit_sha":null,"homepage":"http://codepen.io/tannerlinsley/pen/MmyMEK","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tannerlinsley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-21T14:12:28.000Z","updated_at":"2024-12-26T16:42:18.000Z","dependencies_parsed_at":"2022-08-23T20:11:00.975Z","dependency_job_id":null,"html_url":"https://github.com/tannerlinsley/springer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tannerlinsley/springer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Fspringer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Fspringer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Fspringer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Fspringer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tannerlinsley","download_url":"https://codeload.github.com/tannerlinsley/springer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Fspringer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261423709,"owners_count":23156062,"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","easing","function","motion","physics","spring","tension","wobble"],"created_at":"2024-10-01T17:02:36.191Z","updated_at":"2025-07-04T01:04:46.423Z","avatar_url":"https://github.com/tannerlinsley.png","language":"JavaScript","readme":"# Springer\nA spring that generates realistic easing functions\n\n\u003ca href=\"https://travis-ci.org/tannerlinsley/springer\" target=\"\\_parent\"\u003e\n  \u003cimg alt=\"\" src=\"https://travis-ci.org/tannerlinsley/springer.svg?branch=master\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://npmjs.com/package/springer\" target=\"\\_parent\"\u003e\n  \u003cimg alt=\"\" src=\"https://img.shields.io/npm/dm/springer.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://react-chat-signup.herokuapp.com/\" target=\"\\_parent\"\u003e\n  \u003cimg alt=\"\" src=\"https://img.shields.io/badge/slack-react--chat-blue.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/tannerlinsley/springer\" target=\"\\_parent\"\u003e\n  \u003cimg alt=\"\" src=\"https://img.shields.io/github/stars/tannerlinsley/springer.svg?style=social\u0026label=Star\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://twitter.com/tannerlinsley\" target=\"\\_parent\"\u003e\n  \u003cimg alt=\"\" src=\"https://img.shields.io/twitter/follow/tannerlinsley.svg?style=social\u0026label=Follow\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://cash.me/$tannerlinsley\" target=\"\\_parent\"\u003e\n  \u003cimg alt=\"\" src=\"https://img.shields.io/badge/%24-Donate-brightgreen.svg\" /\u003e\n\u003c/a\u003e\n\n## Features\n\n- **1 kb!** (minified)\n- Tension \u0026 Wobble parameters\n- No dependencies\n- Compatible with any animation library\n\n## Demo\n- [Greensock + Springer (Codepen)](http://codepen.io/tannerlinsley/pen/MmyMEK)\n- [React-Move + Springer Playground (Codepen)](http://codepen.io/tannerlinsley/pen/VbayBw?editors=0010)\n\n## Installation\n```bash\n$ yarn add springer\n# or\n$ npm install springer --only=dev\n```\n##### CDN\n```html\n\u003cscript src='https://unpkg.com/springer@latest/springer.js'\u003e\u003c/script\u003e\n```\n\n## Usage\n- `springer(tension, wobble)`\n  - `tension`\n    - The percentage of force the spring has before release.\n    - Min: `0`\n    - Max: `1`\n    - Default: `0.5`\n  - `wobble`\n    - The percentage of wobble, or malleability the spring exhibits\n    - Min: `0`\n    - Max: `1`\n    - Default: `0.5`\n- Returns an spring-based easing function\n\n## Example\n```javascript\nimport springer from 'springer' // or 'window.Springer.default' for script-tag users\n\nconst spring = springer(0.5, 0.8)\n\nconsole.log(spring(0))   // 0\nconsole.log(spring(0.2)) // 0.80516\nconsole.log(spring(0.4)) // 1.01897\nconsole.log(spring(0.6)) // 1.00010\nconsole.log(spring(0.8)) // 0.99974\nconsole.log(spring(1))   // 1\n```\n\n## Acknowledgements\n`Springer` is heavily inspired by [React-Motion](https://github.com/chenglou/react-motion) with he bulk of the difficult physics logic originally done by the amazing [Cheng Lou (chenglou)](https://github.com/chenglou). Thanks Cheng!\n\n## Contributing\nTo suggest a feature, create an issue if it does not already exist.\nIf you would like to help develop a suggested feature follow these steps:\n\n- Fork this repo\n- `$ yarn`\n- Implement your changes to files in the `src/` directory\n- Submit PR for review\n\n#### Scripts\n\n- `$ yarn run test` Runs the test suite\n- `$ yarn run prepublish` Builds for NPM distribution\n\n## Used By\n\n\u003ca href='https://nozzle.io' target=\"\\_parent\"\u003e\n  \u003cimg src='https://nozzle.io/img/logo-blue.png' alt='Nozzle Logo' style='width:300px;'/\u003e\n\u003c/a\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftannerlinsley%2Fspringer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftannerlinsley%2Fspringer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftannerlinsley%2Fspringer/lists"}