{"id":21656981,"url":"https://github.com/cotag/easy-animate","last_synced_at":"2026-05-05T20:36:41.338Z","repository":{"id":10782086,"uuid":"13050257","full_name":"cotag/easy-animate","owner":"cotag","description":"Request animation frame polyfil with optional AngularJS utility","archived":false,"fork":false,"pushed_at":"2014-07-10T12:32:25.000Z","size":228,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-25T07:08:33.804Z","etag":null,"topics":[],"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/cotag.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":"2013-09-23T23:58:26.000Z","updated_at":"2014-07-10T11:59:37.000Z","dependencies_parsed_at":"2022-09-03T18:21:02.135Z","dependency_job_id":null,"html_url":"https://github.com/cotag/easy-animate","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/cotag%2Feasy-animate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotag%2Feasy-animate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotag%2Feasy-animate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotag%2Feasy-animate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cotag","download_url":"https://codeload.github.com/cotag/easy-animate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554121,"owners_count":20471173,"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":[],"created_at":"2024-11-25T09:18:35.252Z","updated_at":"2026-05-05T20:36:41.295Z","avatar_url":"https://github.com/cotag.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# requestAnimationFrame polyfill\n\nBased on code from https://gist.github.com/paulirish/1579671\n\n1. Open bower.json\n2. Add `\"easy-animate\": \"~1.3.0\"` to your dependency list\n3. Run `bower install`\n4. In your application you can now add:\n   * `\u003cscript src=\"components/easy-animate/requestAnimationFrame.js\"\u003e\u003c/script\u003e`\n   * `\u003cscript src=\"components/easy-animate/angular-animate.js\"\u003e\u003c/script\u003e`\n\n\n## AngularJS Usage\n\nThe utility wraps a single call request animation frame in a promise that is resolved by the animation triggering.\nAdd `coAnimate` to your apps module dependancy list then use it as a service\n\n```javascript\n    $nextFrame().then(function() {\n        // animate here\n    });\n```\n\nor in the middle of a promise chain\n\n```javascript\n    $http.get(asset)\n        .then($nextFrame())\n        .then(function() {\n            // animate here\n        });\n```\n\nand when you want to animate based on data that may be updating multiple times per frame\n\n```javascript\n    var runAnimation = $animation(function apply(position) {\n            this.position = position;\n            this.text = currentText();    // For example\n        }, function compute() {\n            buildScene(this.position, this.text);\n        });\n\n    $document.bind('scroll', function(e) {\n        // Will call apply every time scroll is triggered\n        // Will only call compute on animation frames\n        runAnimation(e.pos_x);  // also for example\n    });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotag%2Feasy-animate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcotag%2Feasy-animate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotag%2Feasy-animate/lists"}