{"id":18371012,"url":"https://github.com/emptyflash/bitfolly","last_synced_at":"2025-04-06T19:31:52.074Z","repository":{"id":64514541,"uuid":"573538102","full_name":"emptyflash/bitfolly","owner":"emptyflash","description":"Bytebeat+bitfield inspired environment for  livecoding visual art","archived":false,"fork":false,"pushed_at":"2023-08-02T15:04:58.000Z","size":2979,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T05:14:03.322Z","etag":null,"topics":["bitfield","bytebeat","generative-art","livecoding","visual-art"],"latest_commit_sha":null,"homepage":"https://emptyfla.sh/bitfolly","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emptyflash.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":"2022-12-02T17:50:12.000Z","updated_at":"2024-09-08T21:48:48.000Z","dependencies_parsed_at":"2024-11-05T23:42:51.141Z","dependency_job_id":"8b213478-c865-4be3-9fd0-c954626ed8c2","html_url":"https://github.com/emptyflash/bitfolly","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/emptyflash%2Fbitfolly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emptyflash%2Fbitfolly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emptyflash%2Fbitfolly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emptyflash%2Fbitfolly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emptyflash","download_url":"https://codeload.github.com/emptyflash/bitfolly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247539077,"owners_count":20955236,"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":["bitfield","bytebeat","generative-art","livecoding","visual-art"],"created_at":"2024-11-05T23:42:41.091Z","updated_at":"2025-04-06T19:31:51.300Z","avatar_url":"https://github.com/emptyflash.png","language":"JavaScript","readme":"# bitfolly\n\nBecause these bits are acting unwise.\n\nBitfolly is a livecoding tool for creating visuals using bitwise operations,\ninspired by [bytebeats](http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html) and [bitfield patterns](https://twitter.com/aemkei/status/1378106731386040322).\n\n## Usage and examples\n\nBitfolly programs are essentially a javascript shader that is compiled to run on the GPU by [gpu.js](https://github.com/gpujs/gpu.js)\n\nEach program is run for every pixel on the screen. The coordinates for the current pixel can\nbe accessed via the `x` and `y` variables.\n\nAdditionally, there is a `t` variable that is constantly increasing, which can be used to\nanimated your creations.\n\nHere's an example of a bitfolly program:\n```javascript\n(x\u0026y^t/20)%100\n```\nTo run a program in the editor, press \"Ctrl-Enter\" or click the ▶️ icon in the top right corner.\n\nMost javascript expressions can be used, for example, the javascript ternary operator:\n```javascript\n(t%1000\u003e500?x|y:x^y)%255\n```\n\nOr javascript `Math` functions:\n```javascript\n(x^y\u0026Math.sin(t/300)*255)%255\n```\n\nAdditional features include:\n* audioreactivity via the `a` array, `at` audio-based incrementor\n* feedback via the previous frame `p` texture.\n```javascript\nlet p0 = p[x\u0026y][y^x]\np0 *= 255\nc[0] = Math.tan(x^y^at/3) + 0.96 * p0[0]\nc[1] = Math.tan(x^y^at/5) + 0.96 * p0[1]\nc[2] = Math.tan(x^y^at/7) + 0.96 * p0[2]\n```\n\nVim mode can also be enabled by adding the `v=1` query param to the URL\n\n## Using in Hydra\n\nImport the global bundle and create a bitfolly object. To get the audio\nreactive variables you need to pass it a function that returns Hydra's\n`a.fft` array. Then just call the `update` function and initialize a\nHydra source with bitfolly's canvas.\n\n``` javascript\nawait import(\"https://emptyfla.sh/bitfolly/bundle-global.js\")\nwindow.bitfolly = window.bitfolly || new Bitfolly(() =\u003e a.fft)\nbitfolly.update(\"(x\u0026y^t/30)%255\")\ns0.init({\n    src: bitfolly.canvas\n})\nsrc(o0)\n    .diff(osc(1, 1, 1)\n        .modulate(src(s0), 10), .1)\n    .modulateScale(src(s0), [.01, -.01].fast(.3).smooth())\n    .modulateRotate(src(s0), [.02,-.02].fast(.7).smooth())\n    .out()\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptyflash%2Fbitfolly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femptyflash%2Fbitfolly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptyflash%2Fbitfolly/lists"}