{"id":21885648,"url":"https://github.com/sheraff/boids","last_synced_at":"2026-03-11T21:03:27.077Z","repository":{"id":81102090,"uuid":"284351284","full_name":"Sheraff/boids","owner":"Sheraff","description":"Boids behavior in Rust w/ Web Workers \u0026 OffscreenCanvas","archived":false,"fork":false,"pushed_at":"2023-01-20T22:43:54.000Z","size":313,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-20T03:28:35.472Z","etag":null,"topics":["offscreencanvas","rust","wasm","webassembly","webworker"],"latest_commit_sha":null,"homepage":"https://sheraff.github.io/boids/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sheraff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-08-01T22:47:37.000Z","updated_at":"2024-03-30T15:29:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f7c1e90-cb9b-406d-a574-2f6771298250","html_url":"https://github.com/Sheraff/boids","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sheraff/boids","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sheraff%2Fboids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sheraff%2Fboids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sheraff%2Fboids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sheraff%2Fboids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sheraff","download_url":"https://codeload.github.com/Sheraff/boids/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sheraff%2Fboids/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30400692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T21:02:20.017Z","status":"ssl_error","status_checked_at":"2026-03-11T20:59:32.667Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["offscreencanvas","rust","wasm","webassembly","webworker"],"created_at":"2024-11-28T10:28:28.544Z","updated_at":"2026-03-11T21:03:27.056Z","avatar_url":"https://github.com/Sheraff.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Implementation of [Boids](https://en.wikipedia.org/wiki/Boids)\n\n\n\u003cimg width=\"729\" alt=\"Screen Shot 2022-06-18 at 19 40 31\" src=\"https://user-images.githubusercontent.com/1325721/174450276-1f72fee0-1232-43f2-adfc-8eb2af7269c4.png\"\u003e\n\n\nBoids is an example of emergent behavior; that is, the complexity of Boids arises from the interaction of individual agents (the boids, in this case) adhering to a set of simple rules. The rules applied in the simplest Boids world are as follows:\n\n- separation: steer to avoid crowding local flockmates\n- alignment: steer towards the average heading of local flockmates\n- cohesion: steer to move towards the average position (center of mass) of local flockmates\n\n## JS version \n\nUses basic web worker for computation, w/ [`OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) to draw on the canvas off of the main thread.\n\nRequires no transpilation and can be served directly. Entry point (to be set in index.html) is /js/script.js\n\n## Rust version\n\nUses [Web Assembly](https://developer.mozilla.org/en-US/docs/WebAssembly) for computation, written in Rust. Also uses a [`Broadcast Channel`](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API) for basic interop between JS worker and WASM thread. And imports the [web-sys](https://rustwasm.github.io/wasm-bindgen/api/web_sys/) crate to call canvas methods efficiently.\n\nNeeds to be compiled\n\n```\nwasm-pack build --target web\n```\n\nEntry point (to be set in index.html) is /js/wasm.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheraff%2Fboids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheraff%2Fboids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheraff%2Fboids/lists"}