{"id":27013400,"url":"https://github.com/villevli/physics2d-js","last_synced_at":"2025-08-15T14:05:49.735Z","repository":{"id":280491960,"uuid":"942119788","full_name":"villevli/physics2d-js","owner":"villevli","description":"A small 2d physics demo calculating collisions and forces between polygons","archived":false,"fork":false,"pushed_at":"2025-03-03T17:49:33.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T12:34:26.648Z","etag":null,"topics":["javascript","physics-2d","physics-simulation","vanilla-javascript"],"latest_commit_sha":null,"homepage":"https://villevli.github.io/physics2d-js/","language":"JavaScript","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/villevli.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-03T15:52:42.000Z","updated_at":"2025-03-10T18:45:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"948e0693-bd54-4a73-a10f-b9270c9a6e94","html_url":"https://github.com/villevli/physics2d-js","commit_stats":null,"previous_names":["villevli/physics2d-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/villevli/physics2d-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villevli%2Fphysics2d-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villevli%2Fphysics2d-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villevli%2Fphysics2d-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villevli%2Fphysics2d-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/villevli","download_url":"https://codeload.github.com/villevli/physics2d-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villevli%2Fphysics2d-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270579613,"owners_count":24610044,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["javascript","physics-2d","physics-simulation","vanilla-javascript"],"created_at":"2025-04-04T12:29:27.149Z","updated_at":"2025-08-15T14:05:49.714Z","avatar_url":"https://github.com/villevli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿A small 2d physics demo calculating collisions and forces between polygons.\nImplemented in JavaScript without libraries.\n\n## Controls\n- Click to give all objects an impulse towards the clicked point\n- Press \"c\" to create a 5-gon at the cursor\n- Press \"w\" to draw polygons without fill color\n- Press \"d\" to draw the normal vector of all collisions with red\n- Press \"space\" to pause the simulation and \"s\" to run one step\n- Press \"+\" to lessen gravity\n- Press \"-\" to increase gravity\n\n## Known issues\n- Friction not implemented\n- Sometimes polygons can overlap presumably due to collision checks not working when the corners (vertices) of two polygons collide each other directly\n- Sometimes when the browser is unfocused and focused again the existing polygons disappear. Did they fall outside the walls?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvillevli%2Fphysics2d-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvillevli%2Fphysics2d-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvillevli%2Fphysics2d-js/lists"}