{"id":13573987,"url":"https://github.com/neu5/cannon-es-debugger-babylonjs","last_synced_at":"2025-04-04T13:30:42.641Z","repository":{"id":60360206,"uuid":"538131203","full_name":"neu5/cannon-es-debugger-babylonjs","owner":"neu5","description":"This is a debugger for use with cannon-es and BabylonJS","archived":false,"fork":false,"pushed_at":"2024-01-22T05:29:18.000Z","size":2239,"stargazers_count":8,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T07:17:53.238Z","etag":null,"topics":["babylonjs","cannon-es","cannonjs","debugger","physics"],"latest_commit_sha":null,"homepage":"https://neu5.github.io/cannon-es-debugger-babylonjs/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"pmndrs/cannon-es-debugger","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neu5.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-09-18T14:14:21.000Z","updated_at":"2023-11-27T03:53:13.000Z","dependencies_parsed_at":"2023-12-15T21:18:03.806Z","dependency_job_id":"9f807f62-9142-4922-9925-e1ead5077a35","html_url":"https://github.com/neu5/cannon-es-debugger-babylonjs","commit_stats":{"total_commits":109,"total_committers":8,"mean_commits":13.625,"dds":0.6055045871559632,"last_synced_commit":"28ea8c782d143d7dd3f82346945438c2f7c96b22"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neu5%2Fcannon-es-debugger-babylonjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neu5%2Fcannon-es-debugger-babylonjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neu5%2Fcannon-es-debugger-babylonjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neu5%2Fcannon-es-debugger-babylonjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neu5","download_url":"https://codeload.github.com/neu5/cannon-es-debugger-babylonjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247184890,"owners_count":20897847,"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":["babylonjs","cannon-es","cannonjs","debugger","physics"],"created_at":"2024-08-01T15:00:44.663Z","updated_at":"2025-04-04T13:30:39.381Z","avatar_url":"https://github.com/neu5.png","language":"HTML","funding_links":[],"categories":["Projects"],"sub_categories":[],"readme":"[![Deploy demo on GH Pages](https://github.com/neu5/cannon-es-debugger-babylonjs/actions/workflows/deploy-demo.yml/badge.svg)](https://github.com/neu5/cannon-es-debugger-babylonjs/actions/workflows/deploy-demo.yml)\n\n# cannon-es-debugger-babylonjs\n\nThis is a debugger for use with [cannon-es](https://github.com/pmndrs/cannon-es) and [BabylonJS](https://www.babylonjs.com/).\n\n## Example\n\nhttps://neu5.github.io/cannon-es-debugger-babylonjs/\n\n## Installation\n\n```\nyarn add cannon-es-debugger-babylonjs --dev\n```\n\nMake sure you also have `@babylonjs/core` and `cannon-es` installed.\n\n## Usage\n\nTo make it work in your BabylonJS + cannon-es project you need these three steps:\n\n1. import the `CannonDebugger` from the installed package\n\n```javascript\nimport CannonDebugger from \"cannon-es-debugger-babylonjs\";\n```\n\n2. initialise the cannonDebugger passing the `scene` and the `physicalWorld`\n\n```javascript\nconst cannonDebugger = new CannonDebugger(scene, physicalWorld);\n```\n\n3. update the cannonDebugger inside of your render loop\n\n```javascript\nengine.runRenderLoop(function () {\n  // make the next step with the physicalWorld\n  physicalWorld.fixedStep();\n  // update debugger\n  cannonDebugger.update();\n  // possibly you want to update your meshses positions\n  updateMeshPositions();\n  // render the scene\n  scene.render();\n});\n```\n\n## Credits\n\nThis is a debugger inspired by https://github.com/pmndrs/cannon-es-debugger which was adapted from the original cannon.js debugger written by Stefan Hedman [@schteppe](https://github.com/schteppe).\n\n### Development\n\nFirst install all the dependencies by running\n\n```\nyarn\n```\n\nor `npm install`\n\nNext create developer's build with watcher by running\n\n```\nyarn dev\n```\n\nand in another terminal window start serving the application with\n\n```\nyarn start\n```\n\nThis will show you the `index.html` at the `localhost:3000`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneu5%2Fcannon-es-debugger-babylonjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneu5%2Fcannon-es-debugger-babylonjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneu5%2Fcannon-es-debugger-babylonjs/lists"}