{"id":20188660,"url":"https://github.com/der3318/mouseclick-effect","last_synced_at":"2025-03-03T07:13:59.424Z","repository":{"id":92549078,"uuid":"371953299","full_name":"der3318/mouseclick-effect","owner":"der3318","description":"Javascript Canvas - Effect on Mouse Click","archived":false,"fork":false,"pushed_at":"2021-06-13T07:35:30.000Z","size":1025,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-13T18:33:38.482Z","etag":null,"topics":["matter-js","onclick","script"],"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/der3318.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}},"created_at":"2021-05-29T11:17:39.000Z","updated_at":"2021-06-13T07:38:38.000Z","dependencies_parsed_at":"2023-05-22T10:30:42.039Z","dependency_job_id":null,"html_url":"https://github.com/der3318/mouseclick-effect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/der3318%2Fmouseclick-effect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/der3318%2Fmouseclick-effect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/der3318%2Fmouseclick-effect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/der3318%2Fmouseclick-effect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/der3318","download_url":"https://codeload.github.com/der3318/mouseclick-effect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241622604,"owners_count":19992504,"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":["matter-js","onclick","script"],"created_at":"2024-11-14T03:30:07.392Z","updated_at":"2025-03-03T07:13:59.405Z","avatar_url":"https://github.com/der3318.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 🖱️ Mouse Click Effect\n\n![matter-js](https://img.shields.io/badge/matter--js-0.17.1-blue.svg)\n![quality](https://img.shields.io/badge/quality-experimental-green.svg)\n![browsers](https://img.shields.io/badge/browsers-chrome%20edge%20firefox-yellow.svg)\n![license](https://img.shields.io/badge/license-MIT%20(inherited)-blueviolet.svg)\n\nFancy onclick actions when using mouse in web apps. The plugin script is based on [matter-js](https://github.com/liabru/matter-js), which is a physics engine on html canvas.\n\n\n### ✨ How To Use\n\nFirst, finsh your own web frontend with basic functionality. Download and place [matter.js](https://github.com/liabru/matter-js/blob/master/build/matter.js), [mouseclick-effect.js](https://github.com/der3318/mouseclick-effect/blob/main/mouseclick-effect.js) and [star.jpg](https://github.com/der3318/mouseclick-effect/blob/main/star.jpg) into the same folder.\n\nAdd the canvas element and scripts to the starting section of \"body\":\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e \u003c!-- some stuff --\u003e \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ccanvas id=\"mouseclick-effect-canvas\" style=\"position: fixed; z-index: 1;\"\u003e\u003c/canvas\u003e\n    \u003cscript src=\"./matter.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"./mouseclick-effect.js\"\u003e\u003c/script\u003e\n    \u003c!-- main content --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nNoted that `z-index: 1;` is optional. Without the css styling property, the effect will be limited to only the blank spaces. On the order hand, when the z-index is specified, the canvas is put on top of the web app, while some of the mouse actions may not be propagated to the right layer:\n\n| Style | w/o z-index | w/ z-index |\n| :-: | :-: | :-: |\n| Sample | ![mode1.gif](/mode1.gif) | ![mode2.gif](/mode2.gif) |\n\n\n### 🔧 Configurations - Texture \u0026 Quantity\n\nModify [mouseclick-effect.js](https://github.com/der3318/mouseclick-effect/blob/main/mouseclick-effect.js) to set customized image (128×128 in pixels) and the instance count of the effect:\n\n```javascript\n// at the config section of mouseclick-effect.js\nvar textureFile = \"PATH-TO-THE-IMG-FILE\";\nvar quantity = PREFERRED-INSTANCE-COUNT;\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fder3318%2Fmouseclick-effect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fder3318%2Fmouseclick-effect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fder3318%2Fmouseclick-effect/lists"}