{"id":13409042,"url":"https://github.com/tipsy/bubbly-bg","last_synced_at":"2026-10-19T12:03:14.090Z","repository":{"id":57190873,"uuid":"105246086","full_name":"tipsy/bubbly-bg","owner":"tipsy","description":"Beautiful bubbly backgrounds in less than 1kB (750 bytes gzipped)","archived":false,"fork":false,"pushed_at":"2025-10-29T23:16:12.000Z","size":2860,"stargazers_count":1618,"open_issues_count":0,"forks_count":93,"subscribers_count":30,"default_branch":"master","last_synced_at":"2026-08-24T22:48:13.549Z","etag":null,"topics":["animated-backgrounds","canvas","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tipsy.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}},"created_at":"2017-09-29T08:00:47.000Z","updated_at":"2026-08-15T14:05:01.000Z","dependencies_parsed_at":"2022-09-15T15:51:26.707Z","dependency_job_id":"3be14db0-7f6d-491d-9ba4-9cee8dd344bc","html_url":"https://github.com/tipsy/bubbly-bg","commit_stats":{"total_commits":81,"total_committers":6,"mean_commits":13.5,"dds":0.07407407407407407,"last_synced_commit":"b5c5f44aa1ddd24a32a97f8faa1a1b75fd8b23c2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tipsy/bubbly-bg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipsy%2Fbubbly-bg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipsy%2Fbubbly-bg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipsy%2Fbubbly-bg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipsy%2Fbubbly-bg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tipsy","download_url":"https://codeload.github.com/tipsy/bubbly-bg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipsy%2Fbubbly-bg/sbom","scorecard":{"id":887647,"data":{"date":"2025-08-11","repo":{"name":"github.com/tipsy/bubbly-bg","commit":"b5c5f44aa1ddd24a32a97f8faa1a1b75fd8b23c2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T10:36:21.418Z","repository_id":57190873,"created_at":"2025-08-24T10:36:21.418Z","updated_at":"2025-08-24T10:36:21.418Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38356447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["animated-backgrounds","canvas","javascript"],"created_at":"2024-07-30T20:00:57.521Z","updated_at":"2026-10-19T12:03:14.085Z","avatar_url":"https://github.com/tipsy.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Libraries",":clap: 欢迎参与​","Repository"],"sub_categories":["Particle animation","ui框架","Animation"],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🫧 bubbly-bg\n\n**Beautiful bubbly backgrounds in less than 1kB gzipped**\n\n[![npm version](https://img.shields.io/npm/v/bubbly-bg.svg)](https://www.npmjs.com/package/bubbly-bg)\n[![jsDelivr downloads](https://data.jsdelivr.com/v1/package/npm/bubbly-bg/badge)](https://www.jsdelivr.com/package/npm/bubbly-bg)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)\n[![Bundle Size](https://img.shields.io/badge/gzipped-841%20bytes-brightgreen.svg)](dist/bubbly-bg.js)\n\n[**Live Demo**](https://tipsy.github.io/bubbly-bg)\n\n![Bubbly animated](https://tipsy.github.io/bubbly-bg/bubbly.gif)\n\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n- 🪶 **Lightweight** - Only 1.6kB minified, 841 bytes gzipped\n- 🎨 **Customizable** - Full control over colors, gradients, and animations\n- 🚀 **Zero dependencies** - Pure vanilla JavaScript\n- 📦 **Easy to use** - Just include and call `bubbly()`\n- 🎯 **TypeScript support** - Full type definitions included\n- 🔧 **Flexible** - Works with your own canvas or creates one automatically\n\n## 🚀 Quick Start\n\nAdd bubbly to your webpage and call `bubbly()`:\n\n```html\n\u003cbody\u003e\n  ...\n  \u003cscript src=\"https://cdn.jsdelivr.net/npm/bubbly-bg@1.0.0/dist/bubbly-bg.js\"\u003e\u003c/script\u003e\n  \u003cscript\u003ebubbly();\u003c/script\u003e\n\u003c/body\u003e\n```\n\nThat's it! Bubbly creates a `canvas` element with `position: fixed` and `z-index: -1`, filling the viewport. It's plug-and-play for most projects.\n\n### Custom Canvas\n\nYou can also use your own canvas element:\n\n```javascript\nbubbly({ canvas: document.querySelector(\"#my-canvas\") });\n```\n\n## 📦 Installation\n\n### CDN\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/bubbly-bg@1.0.0/dist/bubbly-bg.js\"\u003e\u003c/script\u003e\n```\n\n### npm\n```bash\nnpm install bubbly-bg\n```\n\n### Direct Download\n[Download bubbly-bg.js](https://raw.githubusercontent.com/tipsy/bubbly-bg/master/dist/bubbly-bg.js)\n\n## ⚙️ Configuration\n\n### All Options\n\n```javascript\nbubbly({\n    canvas: document.querySelector(\"#background\"), // default is created and attached automatically\n    compose: \"lighter\", // default is \"lighter\"\n    animate: false, // default is true\n    background: (ctx) =\u003e \"#2AE\", // default background, can be a color string or function returning gradient\n    bubbles: {\n        count: 100, // default is Math.floor((canvas.width + canvas.height) * 0.02)\n        radius: () =\u003e 4 + Math.random() * 25, // default is () =\u003e 4 + Math.random() * window.innerWidth / 25\n        fill: () =\u003e `hsla(${Math.random() * 360}, 100%, 50%, ${Math.random() * 0.25})`, // default is () =\u003e `hsla(0, 0%, 100%, ${Math.random() * 0.1})`\n        angle: () =\u003e Math.random() * Math.PI * 2, // default is this\n        velocity: () =\u003e 0.1 + Math.random() * 0.5, // default is this\n        shadow: () =\u003e ({blur: 4, color: \"#fff\"}), // default is () =\u003e null\n        stroke: () =\u003e ({width: 2, color: \"#fff\"}), // default is () =\u003e null\n        objectCreator: () =\u003e ({...}) // advanced: custom bubble object creator\n    }\n});\n```\n\n### Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `canvas` | `HTMLCanvasElement` | auto-created | Canvas element to use |\n| `compose` | `string` | `\"lighter\"` | Global composite operation |\n| `animate` | `boolean` | `true` | Whether to animate bubbles |\n| `background` | `string \\| function` | `\"#2AE\"` | Background color or gradient function |\n| `bubbles.count` | `number` | auto-calculated | Number of bubbles |\n| `bubbles.radius` | `function` | auto-calculated | Function returning bubble radius |\n| `bubbles.fill` | `function` | white with opacity | Function returning bubble fill color |\n| `bubbles.angle` | `function` | random | Function returning movement angle |\n| `bubbles.velocity` | `function` | random | Function returning velocity |\n| `bubbles.shadow` | `function` | `null` | Function returning shadow config |\n| `bubbles.stroke` | `function` | `null` | Function returning stroke config |\n| `bubbles.objectCreator` | `function` | default creator | Advanced: custom bubble creator |\n\n## 🎨 Examples\n\n### Default (Blue with white bubbles)\n```javascript\nbubbly();\n```\n\n### Black/Red with red bubbles\n```javascript\nbubbly({\n    background: (ctx) =\u003e {\n        const gradient = ctx.createLinearGradient(0, 0, ctx.canvas.width, ctx.canvas.height);\n        gradient.addColorStop(0, \"#111\");\n        gradient.addColorStop(1, \"#422\");\n        return gradient;\n    },\n    bubbles: {\n        fill: () =\u003e `hsla(0, 100%, 50%, ${Math.random() * 0.25})`,\n        shadow: () =\u003e ({blur: 4, color: \"#fff\"})\n    }\n});\n```\n\n### Purple with multicolored bubbles\n```javascript\nbubbly({\n    background: (ctx) =\u003e {\n        const gradient = ctx.createLinearGradient(0, 0, ctx.canvas.width, ctx.canvas.height);\n        gradient.addColorStop(0, \"#4c004c\");\n        gradient.addColorStop(1, \"#1a001a\");\n        return gradient;\n    },\n    bubbles: {\n        fill: () =\u003e `hsla(${Math.random() * 360}, 100%, 50%, ${Math.random() * 0.25})`,\n        shadow: () =\u003e ({blur: 4, color: \"#fff\"})\n    }\n});\n```\n\n### Yellow/Pink with red/orange/yellow bubbles\n```javascript\nbubbly({\n    background: (ctx) =\u003e {\n        const gradient = ctx.createLinearGradient(0, 0, ctx.canvas.width, ctx.canvas.height);\n        gradient.addColorStop(0, \"#fff4e6\");\n        gradient.addColorStop(1, \"#ffe9e4\");\n        return gradient;\n    },\n    compose: \"source-over\",\n    bubbles: {\n        fill: () =\u003e `hsla(${Math.random() * 50}, 100%, 50%, .3)`,\n        shadow: () =\u003e ({blur: 1, color: \"#fff\"})\n    }\n});\n```\n\n## 🔧 Advanced Usage\n\n### Custom Bubble Creator\n\nFor complete control over bubble creation and rendering:\n\n```javascript\nbubbly({\n    bubbles: {\n        objectCreator: function() {\n            return {\n                x: Math.random() * canvas.width,\n                y: Math.random() * canvas.height,\n                r: 10,\n                a: Math.random() * Math.PI * 2,\n                v: 1,\n                draw: (ctx, bubble) =\u003e {\n                    // Custom drawing logic\n                    ctx.fillStyle = \"red\";\n                    ctx.fillRect(bubble.x, bubble.y, bubble.r, bubble.r);\n                }\n            };\n        }\n    }\n});\n```\n\n## 📝 TypeScript\n\nFull TypeScript definitions are included:\n\n```typescript\nimport { bubbly, BubblyConfig } from 'bubbly-bg';\n\nconst config: BubblyConfig = {\n    animate: true,\n    bubbles: {\n        count: 50\n    }\n};\n\nbubbly(config);\n```\n\n## 📄 License\n\nApache-2.0 © [David Åse](https://github.com/tipsy)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\n\n## ⭐ Show your support\n\nGive a ⭐️ if this project helped you!\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nMade with ❤️ by [David Åse](https://github.com/tipsy)\n\n\u003c/div\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftipsy%2Fbubbly-bg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftipsy%2Fbubbly-bg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftipsy%2Fbubbly-bg/lists"}