{"id":15968550,"url":"https://github.com/smokku/hecs_rapier","last_synced_at":"2025-04-04T14:25:31.918Z","repository":{"id":149345703,"uuid":"392486091","full_name":"smokku/hecs_rapier","owner":"smokku","description":"Physics engine for hecs ECS","archived":false,"fork":false,"pushed_at":"2021-10-26T19:35:56.000Z","size":31,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T09:53:30.070Z","etag":null,"topics":["ecs","hecs","physics","rapier","rapier2d","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smokku.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-08-03T23:37:09.000Z","updated_at":"2021-11-07T22:32:51.000Z","dependencies_parsed_at":"2023-07-17T13:21:02.343Z","dependency_job_id":null,"html_url":"https://github.com/smokku/hecs_rapier","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smokku%2Fhecs_rapier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smokku%2Fhecs_rapier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smokku%2Fhecs_rapier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smokku%2Fhecs_rapier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smokku","download_url":"https://codeload.github.com/smokku/hecs_rapier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247192259,"owners_count":20899059,"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","hecs","physics","rapier","rapier2d","rust"],"created_at":"2024-10-07T19:02:22.542Z","updated_at":"2025-04-04T14:25:31.899Z","avatar_url":"https://github.com/smokku.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# physics engine _for hecs_\n\nPort of `bevy_rapier2d` to hecs ECS.\n\n## WARNING\n\n- This code requires hecs fork with entity change tracking: \u003chttps://github.com/smokku/hecs.git\u003e\n\n## Example\n\n```rust\nuse hecs_rapier as physics;\nuse hecs::World;\n\nlet mut world = World::new();\n\n/* Create structures necessary for the simulation. */\nlet gravity = vector![0.0, -9.81];\nlet integration_parameters = physics::IntegrationParameters::default();\nlet mut physics_pipeline = physics::PhysicsPipeline::new();\nlet mut island_manager = physics::IslandManager::new();\nlet mut broad_phase = physics::BroadPhase::new();\nlet mut narrow_phase = physics::NarrowPhase::new();\nlet mut joint_set = physics::JointSet::new();\nlet mut joints_entity_map = physics::JointsEntityMap::default();\nlet mut ccd_solver = physics::CCDSolver::new();\n// let physics_hooks = ();\nlet event_handler = ();\nlet mut modification_tracker = physics::ModificationTracker::default();\n\nwhile running {\n        physics::attach_bodies_and_colliders(\u0026mut world);\n        physics::create_joints(\u0026mut self.world, \u0026mut joint_set, \u0026mut joints_entity_map);\n        physics::finalize_collider_attach_to_bodies(\u0026mut world, \u0026mut modification_tracker);\n\n\n        physics::prepare_step(\u0026mut world, \u0026mut modification_tracker);\n\n        while need_to_step {\n\n            physics::step_world(\n                \u0026mut world,\n                \u0026gravity,\n                \u0026integration_parameters,\n                \u0026mut physics_pipeline,\n                \u0026mut modification_tracker,\n                \u0026mut island_manager,\n                \u0026mut broad_phase,\n                \u0026mut narrow_phase,\n                \u0026mut joint_set,\n                \u0026mut joints_entity_map,\n                \u0026mut ccd_solver,\n                \u0026event_handler,\n            );\n\n        }\n\n\n        physics::collect_removals(\u0026mut world, \u0026mut modification_tracker);\n\n        next_frame().await;\n        world.clear_trackers();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmokku%2Fhecs_rapier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmokku%2Fhecs_rapier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmokku%2Fhecs_rapier/lists"}