{"id":17289692,"url":"https://github.com/rolyatmax/spring-animator","last_synced_at":"2025-04-14T11:21:58.821Z","repository":{"id":19656165,"uuid":"87590191","full_name":"rolyatmax/spring-animator","owner":"rolyatmax","description":"a little tool for easing values with spring forces for animations","archived":false,"fork":false,"pushed_at":"2023-03-03T01:32:56.000Z","size":658,"stargazers_count":10,"open_issues_count":9,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-28T00:41:27.560Z","etag":null,"topics":["animation","easing-values","physics","spring","spring-animation","spring-forces","transition"],"latest_commit_sha":null,"homepage":"https://rolyatmax.github.io/spring-animator/","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/rolyatmax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-07T22:00:05.000Z","updated_at":"2023-07-06T10:24:56.000Z","dependencies_parsed_at":"2023-01-13T20:30:37.424Z","dependency_job_id":null,"html_url":"https://github.com/rolyatmax/spring-animator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolyatmax%2Fspring-animator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolyatmax%2Fspring-animator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolyatmax%2Fspring-animator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolyatmax%2Fspring-animator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rolyatmax","download_url":"https://codeload.github.com/rolyatmax/spring-animator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868961,"owners_count":21174793,"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-values","physics","spring","spring-animation","spring-forces","transition"],"created_at":"2024-10-15T10:35:31.612Z","updated_at":"2025-04-14T11:21:58.786Z","avatar_url":"https://github.com/rolyatmax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-animator\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nA little tool for easing values with spring forces for animations.\n\nHere's [an example](https://rolyatmax.github.io/spring-animator/).\n\n## Install\n\nUse [npm](https://npmjs.com/) to install.\n\n```sh\nnpm install spring-animator --save\n```\n\n## Usage\n\n```js\nimport { createSpring } from 'spring-animator'\n\nconst stiffness = 0.003\nconst dampening = 0.1\nconst startingValue = 10\n\nconst spring = createSpring(stiffness, dampening, startingValue)\n\n// must first set a new destination value to animate towards\nspring.setDestination(15)\n\nspring.tick() // takes one step towards destination value\n\n// pass custom stiffness and dampening values for just this tick\nspring.tick(0.003, 0.1)\n\nconst value = spring.getCurrentValue() // returns the current value\n```\n\nI personally like these values:\n\n```js\n{\n  stiffness: 0.003,\n  dampening: 0.1\n}\n```\n\n## To run the example:\n\n```sh\nnpm install\nnpm start\n```\n\nAnd then make sure to open example/index.html in a browser!\n\nOr you can just try it out [here](https://rolyatmax.github.io/spring-animator/).\n\n[![NPM](https://nodei.co/npm/spring-animator.png)](https://www.npmjs.com/package/spring-animator)\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/rolyatmax/spring-animator/blob/master/LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolyatmax%2Fspring-animator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frolyatmax%2Fspring-animator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolyatmax%2Fspring-animator/lists"}