{"id":16188232,"url":"https://github.com/pakastin/animationframes","last_synced_at":"2025-03-19T03:30:39.051Z","repository":{"id":15505726,"uuid":"78279531","full_name":"pakastin/animationframes","owner":"pakastin","description":"Minimalistic way to create JS animations!","archived":false,"fork":false,"pushed_at":"2022-07-20T07:54:21.000Z","size":73,"stargazers_count":56,"open_issues_count":8,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-28T14:47:32.932Z","etag":null,"topics":["animation","css","easing-functions","html5","javascript","js-animations"],"latest_commit_sha":null,"homepage":"","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/pakastin.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-01-07T13:07:40.000Z","updated_at":"2024-11-22T16:41:19.000Z","dependencies_parsed_at":"2022-08-07T08:01:09.867Z","dependency_job_id":null,"html_url":"https://github.com/pakastin/animationframes","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakastin%2Fanimationframes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakastin%2Fanimationframes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakastin%2Fanimationframes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakastin%2Fanimationframes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pakastin","download_url":"https://codeload.github.com/pakastin/animationframes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243965752,"owners_count":20375917,"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","easing-functions","html5","javascript","js-animations"],"created_at":"2024-10-10T07:25:31.710Z","updated_at":"2025-03-19T03:30:38.726Z","avatar_url":"https://github.com/pakastin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?maxAge=3600\u0026style=flat-square)](https://github.com/Flet/semistandard)\n[![npm](https://img.shields.io/npm/v/animationframes.svg?maxAge=60\u0026style=flat-square)](https://www.npmjs.com/package/animationframes)\n[![Twitter Follow](https://img.shields.io/twitter/follow/pakastin.svg?style=social\u0026maxAge=3600)](https://twitter.com/pakastin)\n\n# animationframes\nMinimalistic way to create JS animations (~1.5 KB). Use [prefix](https://github.com/pakastin/prefix) to auto-prefix CSS properties.\n\nBattle-tested in my [HTML5 Deck of Cards](https://deck-of-cards.js.org), [source](https://github.com/pakastin/deck-of-cards/blob/master/lib/card.js#L65).\n\n## install\n```\nnpm install animationframes\n```\n\n## usage\n\n```js\nimport AnimationFrames from 'animationframes';\n\nconst translate = (el, x, y) =\u003e el.style.transform = `translate(${x}%, ${y}%)`;\nconst { from } = AnimationFrames;\n\nconst el = document.createElement('h1');\n\nconst animation = new AnimationFrames({\n  delay: 0,\n  duration: 1000,\n  oninit () {\n    el.style.display = 'none';\n  },\n  onstart () {\n    el.style.display = '';\n  },\n  onprogress (e) {\n    translate(el, from(-100, e), 0);\n  },\n  onend () {\n    el.style.transform = '';\n  }\n});\n\nel.textContent = 'Hello world!';\n\ndocument.body.appendChild(el);\n```\nhttps://jsfiddle.net/w7zhurx3/\n\nAnother example: https://jsfiddle.net/1oj7y29g/1/\n\n## easings\nAvailable easings: https://github.com/pakastin/animationframes/blob/master/src/ease.js\n\n## oldskool\n```html\n\u003cscript src=\"https://pakastin.github.io/animationframes/animationframes.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nconst animation = new AnimationFrames( ... );\n...\n\u003c/script\u003e\n```\n\n## License\n[MIT](https://github.com/pakastin/animationframes/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakastin%2Fanimationframes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpakastin%2Fanimationframes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakastin%2Fanimationframes/lists"}