{"id":13625929,"url":"https://github.com/lucaspoffo/shipyard_rapier","last_synced_at":"2025-04-16T10:33:49.617Z","repository":{"id":54703089,"uuid":"335179944","full_name":"lucaspoffo/shipyard_rapier","owner":"lucaspoffo","description":"Physics plugin with rapier for the shipyard ECS.","archived":false,"fork":false,"pushed_at":"2021-03-21T19:38:24.000Z","size":235,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T06:05:27.575Z","etag":null,"topics":["ecs","physics","rapier","shipyard"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/lucaspoffo.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}},"created_at":"2021-02-02T05:33:38.000Z","updated_at":"2024-09-01T16:53:07.000Z","dependencies_parsed_at":"2022-08-14T00:31:07.357Z","dependency_job_id":null,"html_url":"https://github.com/lucaspoffo/shipyard_rapier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaspoffo%2Fshipyard_rapier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaspoffo%2Fshipyard_rapier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaspoffo%2Fshipyard_rapier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaspoffo%2Fshipyard_rapier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucaspoffo","download_url":"https://codeload.github.com/lucaspoffo/shipyard_rapier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249228273,"owners_count":21233852,"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","physics","rapier","shipyard"],"created_at":"2024-08-01T21:02:05.988Z","updated_at":"2025-04-16T10:33:49.358Z","avatar_url":"https://github.com/lucaspoffo.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Shipyard Rapier\n\nPhysics plugin with [rapier](https://github.com/dimforge/rapier) for the [shipyard](https://github.com/leudz/shipyard) ECS.\n\n2D:  [![Crates.io](https://img.shields.io/crates/v/shipyard_rapier2d)](https://crates.io/crates/shipyard_rapier2d)\n[![Documentation](https://docs.rs/shipyard_rapier2d/badge.svg)](https://docs.rs/shipyard_rapier2d)\n\n3D:  [![Crates.io](https://img.shields.io/crates/v/shipyard_rapier3d)](https://crates.io/crates/shipyard_rapier3d)\n[![Documentation](https://docs.rs/shipyard_rapier3d/badge.svg)](https://docs.rs/shipyard_rapier3d)\n\n\u003c/div\u003e\n\n## How to use\n\nSetup the physics in the shipyard world:\n```rust\nlet world = World::new();\nworld.run(setup_physics).unwrap();\n```\n\nCreate an body and a collider component, add those to an existent entity, or create a new one:\n```rust\nlet body = RigidBodyBuilder::new_dynamic().translation(x, y);\nlet collider = ColliderBuilder::cuboid(rad, rad).density(1.0);\nall_storages.add_entity((body, collider));\n```\n\nIn your gameplay loop, execute the physics systems to simulate the world:\n```rust\n// Create rapier colliders, bodies and joints based on the shipyard components.\nworld.run(create_body_and_collider_system).unwrap();\nworld.run(create_joints_system).unwrap();\n\n// Step the world based on a frame rate.\nlet frame_time = 60.0 / 1000.0; // 60 fps simulation\nworld.run_with_data(step_world_system, frame_time).unwrap();\n\n// Remove any physics components from deleted entities.\nworld.run(destroy_body_and_collider_system).unwrap();\n```\n\nThis plugin is based of [bevy_rapier](https://github.com/dimforge/bevy_rapier/) plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucaspoffo%2Fshipyard_rapier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucaspoffo%2Fshipyard_rapier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucaspoffo%2Fshipyard_rapier/lists"}