{"id":29146052,"url":"https://github.com/fuxy526/snowf","last_synced_at":"2025-10-07T06:16:03.973Z","repository":{"id":57364785,"uuid":"81535550","full_name":"Fuxy526/snowf","owner":"Fuxy526","description":"Javascript snowflakes generator -- Let it snow on your page! ❄ demo: https://fuxy526.github.io/snowf/","archived":false,"fork":false,"pushed_at":"2018-09-19T23:22:51.000Z","size":179,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-28T19:55:06.352Z","etag":null,"topics":["javascript-snowflakes-generator","snow","snowf","snowfall","snowflake"],"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/Fuxy526.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-02-10T06:44:39.000Z","updated_at":"2024-09-21T15:32:21.000Z","dependencies_parsed_at":"2022-09-13T21:01:10.600Z","dependency_job_id":null,"html_url":"https://github.com/Fuxy526/snowf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fuxy526/snowf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuxy526%2Fsnowf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuxy526%2Fsnowf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuxy526%2Fsnowf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuxy526%2Fsnowf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fuxy526","download_url":"https://codeload.github.com/Fuxy526/snowf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fuxy526%2Fsnowf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262850294,"owners_count":23374357,"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":["javascript-snowflakes-generator","snow","snowf","snowfall","snowflake"],"created_at":"2025-06-30T21:10:23.543Z","updated_at":"2025-10-07T06:15:58.935Z","avatar_url":"https://github.com/Fuxy526.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snowf\n\u003cp\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/snowf\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/snowf.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/snowf\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/snowf.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/snowf\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/snowf.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Javascript snowflakes generator -- Let it snow on your page! ❄\n\n![](demo/preview.gif)\n\n* All modern browsers are supported (Tested in Chrome, Firefox, Opera, Safari, IE9+ and Edge).\n\n### Install\n\n#### [npm](https://www.npmjs.com/package/snowf):\n\n```bash\nnpm install snowf --save\n```\n\n### Usage\n\nInclude snowf with script tag:\n\n```html\n\u003cscript src=\"snowf.min.js\"\u003e\u003c/script\u003e\n```\n\nOr use modules:\n\n```javascript\n// ES6\nimport snowf from 'snowf';\n\n// Commonjs\nvar snowf = require('snowf');\n\n```\n\nSimply init snowf like this:\n\n```javascript\nsnowf.init({\n\tsize: 5,\n\tamount: 50\n});\n```\n\n### Default Options\n\nArgument | Type | Default Value | Description\n:---: | :---: | :---: | ---\n**dom** | *HTMLDomElement, String* | *document.body* | The element that snowfall canvas append to.\n**amount** | *Number* | *50* | Number of snowflakes displayed at a time.\n**size** | *Number* | *5* | Size of snowflakes.\n**speed** | *Number* | *1.5* | Vertical speed of snowflakes. The larger, the snowflakes drop faster.\n**wind** | *Number* | *0* | Horizontal wind power. Wind will blow right if this is a positive number, and a negative number makes wind blow left.\n**color** | *String* | *'#fff'* | Color of snowflakes. This option accepts HEX or RGB color code, such as \"#fff\", \"#ffffff\", \"rgb(255,255,255)\".\n**opacity** | *Number* | *0.8* | The max opacity of snowflakes. The plugin will generate snowflakes with different opacity from 0 to this number.\n**swing** | *Number* | *1* | Swing offset of snowflakes. If you don't want them to swing, set this option as 0.\n**image** | *String* | *null* | Set this option to replace the snowflake with your image.\n**zIndex** | *Number* | *null* | Position of the canvas layer. Set the layer front or back by changing this value.\n\n### More Examples\n\n```javascript\nvar snow = snowf.init();\n\n// Adjust width and height of window:\nwindow.onresize = function() {\n  snow.resize();\n};\n\n// Reset the Snowf object and regenerate snowflakes:\nsnow.reset();\n\n// reset the Snowf object with new options:\nsnow.setOptions({\n\tamount: 80\n});\n\n// Change the wind power ( This will not reset the Snowf object ):\n// Arguments: (wind, time)\nsnow.wind(1);\nsnow.wind(2, 2000);\n\n// Change the vertical speed ( This will not reset the Snowf object )\nsnow.speed(2);\n```\n\n### Others\n\n#### [react-snowf](https://github.com/Fuxy526/react-snowf.git) (use snowf with React)\n\n#### [vue-snowf](https://github.com/Fuxy526/vue-snowf.git) (use snowf with Vue)\n\n### Licence\n\nsnowf is open source and released under the MIT Licence.\n\nCopyright (c) 2017 Fuxy526\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuxy526%2Fsnowf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuxy526%2Fsnowf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuxy526%2Fsnowf/lists"}