{"id":13534245,"url":"https://github.com/NateTheGreatt/bitECS","last_synced_at":"2025-04-01T22:31:23.202Z","repository":{"id":37232939,"uuid":"252572653","full_name":"NateTheGreatt/bitECS","owner":"NateTheGreatt","description":"Functional, minimal, data-oriented, ultra-high performance ECS library written in JavaScript","archived":false,"fork":false,"pushed_at":"2024-05-22T20:58:59.000Z","size":2075,"stargazers_count":856,"open_issues_count":37,"forks_count":74,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-05-22T22:34:02.160Z","etag":null,"topics":["ecs","entitycomponentsystem","functional","game","game-development","game-engine","gamedev","high-performance","particles"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NateTheGreatt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"NateTheGreatt"}},"created_at":"2020-04-02T21:53:05.000Z","updated_at":"2024-05-27T18:04:13.868Z","dependencies_parsed_at":"2023-02-10T12:45:29.496Z","dependency_job_id":"65d75a09-5899-4808-abea-011a9c4c5d15","html_url":"https://github.com/NateTheGreatt/bitECS","commit_stats":{"total_commits":350,"total_committers":24,"mean_commits":"14.583333333333334","dds":"0.49142857142857144","last_synced_commit":"ec8726143806aa4423ce9d4cc601e0fdd8b97030"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NateTheGreatt%2FbitECS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NateTheGreatt%2FbitECS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NateTheGreatt%2FbitECS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NateTheGreatt%2FbitECS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NateTheGreatt","download_url":"https://codeload.github.com/NateTheGreatt/bitECS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246720563,"owners_count":20822916,"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":["ecs","entitycomponentsystem","functional","game","game-development","game-engine","gamedev","high-performance","particles"],"created_at":"2024-08-01T07:01:28.775Z","updated_at":"2025-04-01T22:31:23.190Z","avatar_url":"https://github.com/NateTheGreatt.png","language":"JavaScript","readme":":warning: [v0.4](https://github.com/NateTheGreatt/bitECS/blob/rc-0-4-0) coming soon! Read the [docs here](https://github.com/NateTheGreatt/bitECS/blob/rc-0-4-0/docs/Intro.md)\n\n\n\u003ch1 align=\"center\"\u003e\n❤ ❤ ❤ \u003cbr /\u003e\nbitECS\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/bitecs\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/bitecs.svg\" alt=\"Version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/bitecs\"\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/minzip/bitecs\" alt=\"Minzipped\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/bitecs\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dt/bitecs.svg\" alt=\"Downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/NateTheGreatt/bitECS/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://badgen.net/npm/license/bitecs\" alt=\"License\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nFunctional, minimal, \u003ca href=\"https://www.dataorienteddesign.com/dodbook/\"\u003edata-oriented\u003c/a\u003e, ultra-high performance \u003ca href=\"https://en.wikipedia.org/wiki/Entity_component_system\"\u003eECS\u003c/a\u003e library written using JavaScript TypedArrays.\n\u003c/p\u003e\n\n\u003c/center\u003e\n\n## ✨ Features\n\n|   |   |\n| --------------------------------- | ---------------------------------------- |\n| 🔮  Simple, declarative API       | 🔥  Blazing fast iteration               |\n| 🔍  Powerful \u0026 performant queries | 💾  Serialization included              |\n| 🍃  Zero dependencies             | 🌐  Node or browser                     |\n| 🤏  `~5kb` minzipped              | 🏷  TypeScript support                   |\n| ❤  Made with love                | 🔺 [glMatrix](https://github.com/toji/gl-matrix) support |\n\n### 📈 Benchmarks\n\n|                                                                 |                                                                           |\n| --------------------------------------------------------------- | ------------------------------------------------------------------------- |\n| [noctjs/ecs-benchmark](https://github.com/noctjs/ecs-benchmark) | [ddmills/js-ecs-benchmarks](https://github.com/ddmills/js-ecs-benchmarks) |\n\n## 💿 Install\n```\nnpm i bitecs\n```\n\n## 📘  Documentation\n|                  |\n| ---------------- |\n| 🏁  [Getting Started](https://github.com/NateTheGreatt/bitECS/blob/master/docs/INTRO.md) |\n| 📑  [API](https://github.com/NateTheGreatt/bitECS/blob/master/docs/API.md) |\n| ❔  [FAQ](https://github.com/NateTheGreatt/bitECS/blob/master/docs/FAQ.md) |\n| 🏛  [Tutorial](https://github.com/ourcade/phaser3-bitecs-getting-started) |\n\n## 🕹 Example\n\n```js\nimport {\n  createWorld,\n  Types,\n  defineComponent,\n  defineQuery,\n  addEntity,\n  addComponent,\n  pipe,\n} from 'bitecs'\n\nconst Vector3 = { x: Types.f32, y: Types.f32, z: Types.f32 }\nconst Position = defineComponent(Vector3)\nconst Velocity = defineComponent(Vector3)\n\nconst movementQuery = defineQuery([Position, Velocity])\n\nconst movementSystem = (world) =\u003e {\n  const { time: { delta } } = world\n  const ents = movementQuery(world)\n  for (let i = 0; i \u003c ents.length; i++) {\n    const eid = ents[i]\n    Position.x[eid] += Velocity.x[eid] * delta\n    Position.y[eid] += Velocity.y[eid] * delta\n    Position.z[eid] += Velocity.z[eid] * delta\n  }\n  return world\n}\n\nconst timeSystem = world =\u003e {\n  const { time } = world\n  const now = performance.now()\n  const delta = now - time.then\n  time.delta = delta\n  time.elapsed += delta\n  time.then = now\n  return world\n}\n\nconst pipeline = pipe(movementSystem, timeSystem)\n\nconst world = createWorld()\nworld.time = { delta: 0, elapsed: 0, then: performance.now() }\n\nconst eid = addEntity(world)\naddComponent(world, Position, eid)\naddComponent(world, Velocity, eid)\nVelocity.x[eid] = 1.23\nVelocity.y[eid] = 1.23\n\nsetInterval(() =\u003e {\n  pipeline(world)\n}, 16)\n```\n\n## 🔌 Powering\n\n\u003ca href=\"https://github.com/etherealengine/etherealengine/\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/5104160/275346499-878a74b0-11eb-463d-a70e-6cb7055683eb.png\" width=\"420\"/\u003e\u003c/a\u003e\n\n\u003ca href=\"https://github.com/thirdroom/thirdroom\"\u003e\u003cimg src=\"https://github.com/thirdroom/thirdroom/raw/main/docs/assets/logo.png\" width=\"420\"/\u003e\u003c/a\u003e\n\n\u003ca href=\"https://github.com/mozilla/hubs\"\u003e\u003cimg src=\"https://github.com/NateTheGreatt/bitECS/blob/master/mozilla-hubs.png\" width=\"420\"/\u003e\u003c/a\u003e\n\n\n","funding_links":["https://github.com/sponsors/NateTheGreatt"],"categories":["TypeScript","State Management","[ECS Libraries](#contents)","Libraries"],"sub_categories":["Visual Editor","JavaScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNateTheGreatt%2FbitECS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNateTheGreatt%2FbitECS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNateTheGreatt%2FbitECS/lists"}