{"id":13665010,"url":"https://github.com/liuhaopen/ecs","last_synced_at":"2025-04-10T04:45:34.408Z","repository":{"id":107996255,"uuid":"166360746","full_name":"liuhaopen/ecs","owner":"liuhaopen","description":"unity ecs framework implemented by Lua","archived":false,"fork":false,"pushed_at":"2021-06-23T15:00:23.000Z","size":153,"stargazers_count":62,"open_issues_count":2,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T06:03:05.963Z","etag":null,"topics":["ecs","entities","lua","luaecs","unityecs"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/liuhaopen.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}},"created_at":"2019-01-18T07:08:17.000Z","updated_at":"2025-03-03T07:18:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbdeadee-e229-4836-831f-a5a5abeafec3","html_url":"https://github.com/liuhaopen/ecs","commit_stats":null,"previous_names":["liuhaopen/luaecs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuhaopen%2Fecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuhaopen%2Fecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuhaopen%2Fecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuhaopen%2Fecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liuhaopen","download_url":"https://codeload.github.com/liuhaopen/ecs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161237,"owners_count":21057552,"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","entities","lua","luaecs","unityecs"],"created_at":"2024-08-02T05:03:14.982Z","updated_at":"2025-04-10T04:45:34.385Z","avatar_url":"https://github.com/liuhaopen.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# usage\n```\nlocal ecs = require \"ecs.ecs\"\n\nlocal world = ecs.world:new()\nlocal entity_mgr = world.entity_mgr\n\nlocal entity = entity_mgr:create_entity(\"move_info\", \"speed\", \"height\")\nentity_mgr:set_component(entity, \"move_info\", {x=1, y=2, z=3})\nlocal move_info = entity_mgr:get_component(entity, \"move_info\")\nentity_mgr:remove_component(entity, \"move_info\")\nentity_mgr:destroy_entity(entity)\n\nlocal move_sys = ecs.class(\"move_sys\", ecs.system)\nfunction move_sys:on_update()\n    self.filter = self.filter or ecs.all(\"move_info\", \"speed\")\n    --complex version: ecs.all(ecs.any(\"com1\", \"com2\"), ecs.any(\"com3\", \"com4\"), ecs.no(\"com5\", \"com6\"))\n    self:foreach(self.filter, function(ed)\n\ted.move_info.x = 3 \n\ted.speed = 4\n    end)\nend\nworld:add_system(move_sys)\n\nworld:update()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuhaopen%2Fecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliuhaopen%2Fecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuhaopen%2Fecs/lists"}