{"id":13547615,"url":"https://github.com/coderitual/bounty","last_synced_at":"2025-05-16T00:07:03.525Z","repository":{"id":9694611,"uuid":"63018401","full_name":"coderitual/bounty","owner":"coderitual","description":"Javascript and SVG odometer effect library with motion blur","archived":false,"fork":false,"pushed_at":"2025-02-24T09:37:26.000Z","size":7961,"stargazers_count":821,"open_issues_count":13,"forks_count":51,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-19T02:55:35.476Z","etag":null,"topics":["animation","bounty","css","es6","filters","graphics","javascript","lib","odometer","prize","svg","svg-odometer","ui","webcomponents"],"latest_commit_sha":null,"homepage":"https://coderitual.github.io/bounty/examples/","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/coderitual.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-07-10T21:04:18.000Z","updated_at":"2025-04-16T16:15:27.000Z","dependencies_parsed_at":"2025-04-11T23:31:37.842Z","dependency_job_id":null,"html_url":"https://github.com/coderitual/bounty","commit_stats":{"total_commits":200,"total_committers":13,"mean_commits":"15.384615384615385","dds":0.47,"last_synced_commit":"ea224ac1d1abab4ca6398745b87a9db88c83fd3c"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderitual%2Fbounty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderitual%2Fbounty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderitual%2Fbounty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderitual%2Fbounty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderitual","download_url":"https://codeload.github.com/coderitual/bounty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442854,"owners_count":22071878,"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","bounty","css","es6","filters","graphics","javascript","lib","odometer","prize","svg","svg-odometer","ui","webcomponents"],"created_at":"2024-08-01T12:00:58.751Z","updated_at":"2025-05-16T00:06:58.512Z","avatar_url":"https://github.com/coderitual.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src =\"docs/bounty.PNG\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" style=\"font-size: 1.2rem;\"\u003eSVG library for transitioning numbers with motion blur\u003c/p\u003e\n\n[![npm version](https://badge.fury.io/js/bounty.svg)](https://www.npmjs.com/package/bounty)\n[![npm downloads](https://img.shields.io/npm/dt/bounty.svg?maxAge=2592000)](https://www.npmjs.com/package/bounty)\n\n\u003e JavaScript odometer or slot machine effect library for smoothly transitioning numbers with motion blur. Library uses functional approach and ES7 Function Bind Syntax. Internally based on SVG.\n\n\u003cp align=\"center\"\u003e\u003cimg src =\"docs/logo.gif\"/\u003e\u003c/p\u003e\n\nSee the **[live version](https://coderitual.github.io/bounty/examples/)**.\n\n## Installation\n\nTo install the stable version:\n\n`npm install --save bounty`\n\n## Examples\n\nThe API is really simple and straigthforward:\n\n```js\nimport bounty from `bounty`;\n\nbounty({ el: '.js-bounty', value: '£42,000,000' });\n```\n\nYou can use it with other **options**:\n\n```js\nimport bounty from `bounty`;\n\nbounty({\n  el: '.js-bounty',\n  value: '£42,000,000',\n  initialValue: '£900,000',\n  lineHeight: 1.35,\n  letterSpacing: 1,\n  animationDelay: 100,\n  letterAnimationDelay: 100,\n  duration: 3000\n});\n```\n\nIf you want to **control** ongoing animation just use methods from returned object:\n\n```js\nimport bounty from `bounty`;\n\nconst { cancel, pause, resume } = bounty({ el: '.js-bounty', value: '£42,000,000' });\n\nconst wait = (delay) =\u003e new Promise((resolve) =\u003e setTimeout(resolve, delay));\n\nconst pasueAndRun = async () =\u003e {\n  await wait(1500);\n  pause();\n  await wait(2000);\n  resume();\n  await wait(2000);\n  cancel();\n};\n\npasueAndRun();\n```\n\nLibrary is built using UMD thus the following usage in HTML is possible.\n\n```html\n\u003cdiv class=\"js-bounty\"\u003e\u003c/div\u003e\n\u003cscript src=\"/bounty.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  bounty.default({ el: \".js-bounty\", value: \"£42,000,000\" });\n\u003c/script\u003e\n```\n\nThe UMD build is also available on unpkg:\n\n```html\n\u003cscript src=\"https://unpkg.com/bounty@1.1.6/lib/bounty.js\"\u003e\u003c/script\u003e\n```\n\nYou can find the library on `window.bounty`.\n\n## That's it?\n\nYea! That's it. Other options like `font-family` and `font-size` are taken from **computed styles** so you can just style it like the other layers.\n\n```css\n.js-bounty {\n  font-size: 60px;\n  font-family: Roboto;\n  fill: #fff;\n  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);\n}\n```\n\n## How?\n\nIf you're interested how it's made, see the **[presentation](http://slides.com/coderitual/odoo-js)**.\n\n## Roadmap\n\nThere is a work in progress to implement additional features:\n\n- [ ] `from` `to` API.\n- [ ] Full ASCII transition support.\n- [ ] Control animation.\n- [ ] Introduce Webcomponents API `\u003csvg-bounty\u003e`\n\n\u003cp align=\"center\"\u003e\u003cimg src =\"docs/example2.gif\"/\u003e\u003c/p\u003e\n\n## License\n\nThe library is available under the MIT license. For more info, see the [LICENSE](LICENSE) file.\n","funding_links":[],"categories":["JavaScript","🚀 A series of exquisite and compact web page cool effects","es6"],"sub_categories":["SVG Animations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderitual%2Fbounty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderitual%2Fbounty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderitual%2Fbounty/lists"}