{"id":17657525,"url":"https://github.com/zymulator/carbonator","last_synced_at":"2026-05-03T04:35:38.527Z","repository":{"id":57194321,"uuid":"186768709","full_name":"Zymulator/carbonator","owner":"Zymulator","description":"Carbonate the web 🍾","archived":false,"fork":false,"pushed_at":"2021-06-06T01:08:22.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T18:38:34.040Z","etag":null,"topics":["animation","beer","bubbles","canvas","carbonation","jquery","jquery-plugin","nitro","pop","soda","wow"],"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/Zymulator.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":"2019-05-15T07:05:03.000Z","updated_at":"2021-06-06T01:08:24.000Z","dependencies_parsed_at":"2022-08-24T14:42:25.818Z","dependency_job_id":null,"html_url":"https://github.com/Zymulator/carbonator","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zymulator%2Fcarbonator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zymulator%2Fcarbonator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zymulator%2Fcarbonator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zymulator%2Fcarbonator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zymulator","download_url":"https://codeload.github.com/Zymulator/carbonator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301954,"owners_count":20755512,"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","beer","bubbles","canvas","carbonation","jquery","jquery-plugin","nitro","pop","soda","wow"],"created_at":"2024-10-23T14:41:58.478Z","updated_at":"2026-05-03T04:35:38.476Z","avatar_url":"https://github.com/Zymulator.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Carbonator\n\nCarbonate the web.\n\nJQuery plugin based on [bubblr](https://github.com/mikeyhogarth/bubblr) by Mikey Hogarth.\n\n## Usage\n\nInstall the library:\n\n```\nnpm install --save carbonator\n```\n\nRequire the module:\n\n```javascript\nrequire('carbonator');\n```\n\nJQuery should now be able to initialize carbonation on an HTML `div` via the `carbonate` function:\n\n```javascript\n$('div.flat').carbonate();\n```\n\nA `canvas` element will be created and appended to the `div`, and will resize automatically to match its parent.\n\n### Options\n\nThe following options may be passed to the `carbonate` function:\n\n| option | description | default |\n|-|-|-|\n| `animationInterval` | inverval between animation frame requests (ms) | `1000 / 24` (24 FPS) |\n| `backgroundColor` | background color of the container element | `'transparent'` |\n| `bubbleColor` | color of the bubbles | `'white'` |\n| `bubbleDensity` | number of bubbles to draw per pixel of canvas area | `0.0005` |\n| `bubbleFlutter` | maximum range bubble may move in either direction (px/frame) | `0.1` |\n| `bubbleGrowthFactorMin` | minimum bubble growth rate | `1` (no growth) |\n| `bubbleGrowthFactorRange` | possible bubble growth rate in excess of minimum | `0.002` |\n| `bubbleOpacity` | opacity of the bubbles | `0.7` |\n| `bubbleRadiusMin` | minimum range of each bubble (px) | `1` |\n| `bubbleRadiusRange` | possible bubble radius in excess of minimum | `2` |\n| `bubbleSpeedMin` | minimum movement speed of each bubble (px/frame)| `3` |\n| `bubbleSpeedRange` | possible bubble movement speed in excess of minimum | `2` |\n| `hotspotDensity` | number of hotspots to generate per pixel of width | `0.0025` |\n| `hotspotProbabilityMin` | minimum chance per frame for hotspot to generate bubble | `0.25` |\n| `hotspotProbabilityMax` | maximum chance per frame for hotspot to generate bubble | `0.75` |\n| `hotspotRespawnRate` | chance per frame that hotspot will be deleted and regenerated at a different location | `1 / (24 * 10)` (about every 10 seconds) |\n| `beforeDraw` | `function` to call before drawing each frame (passed `Canvas​Rendering​Context2D`) † | `undefined` |\n| `afterDraw` | `function` to call after drawing each frame (passed `Canvas​Rendering​Context2D`) † | `undefined` |\n\n† callbacks are bound to the `Carbonator` instance; internal properties may therefore be accessed through `this`, but such behavior may be subject to breaking changes\n\n### You Might Not Need JQuery\n\nWhile this library is designed to be used as a JQuery plugin, JQuery is not required and is not included as a dependency.  Alternatively, the constructor may be accessed directly from the imported module, or through a function attached to itself:\n\n```javascript\nconst Carbonator = require('carbonator');\n\n// call via constructor\nnew Carbonator(document.querySelector('div.flat'), options);\n\n// call via factory method\nCarbonator.carbonate(document.querySelector('div.flat'), options);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzymulator%2Fcarbonator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzymulator%2Fcarbonator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzymulator%2Fcarbonator/lists"}