{"id":16374570,"url":"https://github.com/43081j/funky","last_synced_at":"2026-03-26T14:30:15.977Z","repository":{"id":11536986,"uuid":"14021667","full_name":"43081j/funky","owner":"43081j","description":"funky.js HTML5 camera video effects library","archived":false,"fork":false,"pushed_at":"2021-01-05T20:22:51.000Z","size":28,"stargazers_count":116,"open_issues_count":2,"forks_count":19,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-02-20T00:16:06.178Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/43081j.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":"2013-10-31T16:03:20.000Z","updated_at":"2024-11-16T08:09:29.000Z","dependencies_parsed_at":"2022-09-18T05:47:30.857Z","dependency_job_id":null,"html_url":"https://github.com/43081j/funky","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/43081j%2Ffunky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/43081j%2Ffunky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/43081j%2Ffunky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/43081j%2Ffunky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/43081j","download_url":"https://codeload.github.com/43081j/funky/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239946871,"owners_count":19723014,"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":[],"created_at":"2024-10-11T03:17:37.552Z","updated_at":"2026-03-26T14:30:15.936Z","avatar_url":"https://github.com/43081j.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"funky.js\n===\n\n**funky.js** is a library used to add some funky effects and other transformations to webcam media using WebRTC and CSS filters (aka shaders).\n\nCurrently, Firefox does *not* provide full support for the `filter` property whereas Chrome does. For this reason, the Negative and Sepia effects will not function correctly unless using Chrome.\n\n**TODO**\n\n* Add a 'doodle' effect allowing the user to draw on the video\n* Add a save-as feature to save a snapshot\n* Sprite-like images overlaying the video\n\nDemo\n===\n\nA demo is hosted [here](//43081j.github.io/funky/).\n\nExample\n===\n\n```html\n\u003cdiv id=\"funky\"\u003e\u003c/div\u003e\n\u003cscript src=\"funky.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n\tvar funk = new funky('funky');\n\tfunk.on('error', function(e) {\n\t\tconsole.log(e);\n\t});\n\t// Add a negative effect\n\tfunk.effectNegative(true);\n\u003c/script\u003e\n```\n\nBuilt-in Effects\n===\n\n**funky.js** has several built-in effects which may be used like so:\n\n```javascript\nvar funk = new funky('container');\nfunky.effectNegative(true);\n```\n\nWhere `true` enables the effect and `false` disables it.\n\n* effectNegative\n    * add a negative effect to the video\n* effectVerticalFlip\n    * flip the video vertically\n* effectVerticalMirror\n    * mirror the video across the y-axis\n* effectEdgeDetection\n    * basic edge detection\n* effectPosterize\n    * give a poster-like effect\n* effectSepia\n    * alter colours to the sepia tone\n* effectRandomOffset\n    * give a scrambled effect on the pixels\n* effectEdgeDetectionAlt\n    * a better edge detection algorithm\n* effectScanLines\n    * introduce scan lines onto the video\n* effectRgbshifting\n    * Shifts RGB colors to left and right\n\nCustom Effects\n===\n\nTo create your own effects, simply pass a function to the `draw` event and it will be called every time a draw occurs.\n\n```javascript\nvar funk = new funky('container');\nfunk.on('draw', function(image, callback) {\n\t// do your processing here\n});\n```\n\n`image` is an `ImageData` instance, you may interact with the pixels directly using `image.data`, which is in the form `[r, g, b, a, r, g, b, a, ...]`.\n\n`callback` **must** be called when you are finished processing the pixels so **funky.js** knows to continue with drawing.\n\n`this` is the **funky.js** instance.\n\nMethods\n===\n\n* `on(event, callback)` Hook a callback into an event\n* `off(event, callback)` Remove a callback from an event\n\nEvents\n===\n\n* `draw` Called every time a draw occurs, `(image, callback)` will be passed to your callback\n* `error` Called every time an error occurs, `(error)` will be passed which contains an `error.code` property\n\nLicense\n===\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F43081j%2Ffunky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F43081j%2Ffunky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F43081j%2Ffunky/lists"}