{"id":16752342,"url":"https://github.com/jprochazk/uecs","last_synced_at":"2025-03-21T22:32:12.230Z","repository":{"id":52594277,"uuid":"339490336","full_name":"jprochazk/uecs","owner":"jprochazk","description":"Micro ECS","archived":false,"fork":false,"pushed_at":"2024-02-12T07:10:41.000Z","size":1761,"stargazers_count":37,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T01:27:18.598Z","etag":null,"topics":["component","ecs","ecs-paradigm","entity","system"],"latest_commit_sha":null,"homepage":"https://jan-prochazka.eu/uecs/","language":"TypeScript","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/jprochazk.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-02-16T18:21:20.000Z","updated_at":"2024-09-15T20:11:52.000Z","dependencies_parsed_at":"2024-11-20T00:31:43.462Z","dependency_job_id":null,"html_url":"https://github.com/jprochazk/uecs","commit_stats":{"total_commits":62,"total_committers":3,"mean_commits":"20.666666666666668","dds":0.06451612903225812,"last_synced_commit":"857fd3db0d30b82784fd3262bbc4353688fd2dff"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprochazk%2Fuecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprochazk%2Fuecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprochazk%2Fuecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprochazk%2Fuecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jprochazk","download_url":"https://codeload.github.com/jprochazk/uecs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166694,"owners_count":20409178,"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":["component","ecs","ecs-paradigm","entity","system"],"created_at":"2024-10-13T02:46:42.585Z","updated_at":"2025-03-21T22:32:11.672Z","avatar_url":"https://github.com/jprochazk.png","language":"TypeScript","readme":"**μECS** is an [ECS](#what-is-ecs) library.\n\nIt is:\n* 🏋️ **Lightweight**, ~3kb unpacked\n* 💻 [**Easy to use**](#usage)\n* ⚡ [**Extremely fast**](#benchmark)\n\n**μECS** is available on [NPM](https://www.npmjs.com/package/uecs) and the [unpkg](https://unpkg.com/uecs@latest) CDN, for use in both browsers and Node.\n\n### What is ECS?\n\n**E**ntity **C**omponent **S**ystem is an architectural pattern. It it used to decouple a game's state from its logic, which makes reasoning about your game much easier. Instead of a complex game object hierarchy, you're left with *components*, composed into *entities*, all living in a shared *world*, manipulated by *systems*. It has the additional benefit of performing well on modern CPUs, due to being [data oriented](https://en.wikipedia.org/wiki/Data-oriented_design).\n\nFor a proper introduction to what ECS is, what it's aiming to fix and how it works, I recommend reading [this series of articles](http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/).\n\n### Usage\n\nVisit the [this page](https://jan-prochazka.eu/uecs/) to see a full walk-through of the entire API, auto-generated documentation (which contains more examples and API explanations), as well as a simple demo!\n\n```ts\nimport { World } from 'uecs';\n\nclass Position { x = 0; y = 0; }\nclass Velocity { x = 10; y = 10; }\n\nconst world = new World;\nfor (let i = 0; i \u003c 100; ++i) {\n    world.create(new Position, new Velocity);\n}\n\nfunction physics(world, dt) {\n    world.view(Position, Velocity).each((entity, position, velocity) =\u003e {\n        position.x += velocity.x * dt;\n        position.y += velocity.y * dt;\n    });\n}\n```\n\n### Benchmark\n\nThis library focuses on being small and simple, but without compromising on performance. **μECS** is one of the fastest ECS libraries available, according to [this benchmark](https://github.com/ddmills/js-ecs-benchmarks).\n\n### Notes\n\nEven though the library's version is currently below `1.0`, the API should be considered stable, because the library is feature-complete. The only thing that may change are the internals, in hopes of increasing performance or decreasing built size.\n\nThis is because *μECS* has been in the works for many months, but it was only made public recently. Now that it is, I'd like to see what people have to say about it- maybe there are some huge flaws which can be addressed before commiting to `1.0`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjprochazk%2Fuecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjprochazk%2Fuecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjprochazk%2Fuecs/lists"}