{"id":20057368,"url":"https://github.com/linux0hat/webphysicengine","last_synced_at":"2025-08-24T06:46:05.980Z","repository":{"id":230429829,"uuid":"779354585","full_name":"Linux0Hat/webPhysicEngine","owner":"Linux0Hat","description":"A physic engine on the web","archived":false,"fork":false,"pushed_at":"2025-05-25T19:26:11.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-25T20:32:55.848Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Linux0Hat.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":"2024-03-29T16:35:06.000Z","updated_at":"2025-05-25T19:26:15.000Z","dependencies_parsed_at":"2024-03-29T17:44:30.794Z","dependency_job_id":"5ef3aaf3-6e1c-437f-8eed-0ffb58a1b2fe","html_url":"https://github.com/Linux0Hat/webPhysicEngine","commit_stats":null,"previous_names":["linux0hat/webphysicengine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Linux0Hat/webPhysicEngine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linux0Hat%2FwebPhysicEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linux0Hat%2FwebPhysicEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linux0Hat%2FwebPhysicEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linux0Hat%2FwebPhysicEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Linux0Hat","download_url":"https://codeload.github.com/Linux0Hat/webPhysicEngine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linux0Hat%2FwebPhysicEngine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271809728,"owners_count":24825782,"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-24T02:00:11.135Z","response_time":111,"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":[],"created_at":"2024-11-13T12:58:45.909Z","updated_at":"2025-08-24T06:46:05.952Z","avatar_url":"https://github.com/Linux0Hat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Physic Engine\n\nWeb Physic Engine is a physic engine make in JavaScript for website.\nTest it on my website https://linuxhat.net/webPhysicEngine\n\n## How to Use\n\n### Config file\n\nA config file is build like this for a simple gravity simulation :\n\n_/config.json_\n\n```\n{\n  \"meterSize\": 100,\n  \"speed\": 1,\n  \"gravityX\": 0,\n  \"gravityY\": 9.81,\n  \"objects\": {\n    \"obj1\": {\n      \"type\": \"ball\",\n      \"x\": 50,\n      \"y\": 200,\n      \"vx\": 0,\n      \"vy\": -200,\n      \"radius\": 20,\n      \"color\": \"#0000FF\",\n      \"mass\": 10,\n      \"freeze\": false,\n      \"restitution_coef\": 0.8,\n      \"collision\": true\n    },\n    \"border1\": {\n      \"type\": \"ball\",\n      \"x\": 0,\n      \"y\": 800,\n      \"vx\": 0,\n      \"vy\": 0,\n      \"radius\": 400,\n      \"color\": \"#FF0000\",\n      \"mass\": 100,\n      \"freeze\": true,\n      \"restitution_coef\": 0.5,\n      \"collision\": true\n    },\n    \"border2\": {\n      \"type\": \"ball\",\n      \"x\": 800,\n      \"y\": 800,\n      \"vx\": 0,\n      \"vy\": 0,\n      \"radius\": 400,\n      \"color\": \"#FF0000\",\n      \"mass\": 100,\n      \"freeze\": true,\n      \"restitution_coef\": 0.5,\n      \"collision\": true\n    }\n  }\n}\n\n```\n\n### Create you game with\n\nAdd your code in the main loop.  \nExemple of a simple simulation with fps :\n\n```\nfunction mainLoop() {\n  var fps = 1000 / (new Date().getTime() - Timer);\n  document.getElementById(\"tps\").innerText = fps.toFixed(0);\n  updateObjectsPosition(objects);\n  updateObjectsVelocity(objects);\n  collideObjects(objects);\n  Timer = new Date().getTime();\n}\n```\n\n## License\n\n```\nPhotocasio © 2024 by Linux_Hat is licensed under\nAttribution-NonCommercial-ShareAlike 4.0 International\n```\n\nProject maintained by Linux_Hat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux0hat%2Fwebphysicengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinux0hat%2Fwebphysicengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux0hat%2Fwebphysicengine/lists"}