{"id":15629720,"url":"https://github.com/anko/image-to-box2d-body","last_synced_at":"2025-04-29T10:35:48.351Z","repository":{"id":60495351,"uuid":"50805974","full_name":"anko/image-to-box2d-body","owner":"anko","description":"proof-of-concept game build pipeline for converting an image to a Box2D body","archived":false,"fork":false,"pushed_at":"2019-01-02T09:56:59.000Z","size":221,"stargazers_count":25,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T12:11:19.342Z","etag":null,"topics":["box2d","convert","game-development","image-processing","physics","tutorial"],"latest_commit_sha":null,"homepage":"http://gamedev.stackexchange.com/a/115938/7804","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/anko.png","metadata":{"files":{"readme":"readme.markdown","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}},"created_at":"2016-02-01T01:41:04.000Z","updated_at":"2024-01-20T22:49:24.000Z","dependencies_parsed_at":"2022-09-30T11:40:21.448Z","dependency_job_id":null,"html_url":"https://github.com/anko/image-to-box2d-body","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/anko%2Fimage-to-box2d-body","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fimage-to-box2d-body/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fimage-to-box2d-body/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fimage-to-box2d-body/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anko","download_url":"https://codeload.github.com/anko/image-to-box2d-body/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251484706,"owners_count":21596798,"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":["box2d","convert","game-development","image-processing","physics","tutorial"],"created_at":"2024-10-03T10:28:19.172Z","updated_at":"2025-04-29T10:35:48.331Z","avatar_url":"https://github.com/anko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to convert drawn images into Box2D objects\n\n[This question][1] [nerd-sniped][2] me hard, so I went on a magical journey to\nfigure out how to turn a drawn raster image into Box2D objects.\n\n![sword and\nwand](https://cloud.githubusercontent.com/assets/5231746/12706961/9c9dfb1e-c88d-11e5-8738-f8927d8c9ffb.png) →\nthis pipeline → ![box2d sword and\nwand](https://cloud.githubusercontent.com/assets/5231746/12707020/646bb46a-c88e-11e5-9d6b-16a0cab0739b.gif)\n\nThis proof of concept expects to find an input file `input.png` in this project\nroot directory.  Then run `make`. \n\nYou should find a bunch of intermediate formats in `out/` and if you open\n`game.html`, you should see a Box2D debug view with your objects loaded.\n\nSee the [`makefile`][3] for how the build steps work.\n\n## Dependencies:\n\n-   `make`\n-   Node.js and npm\n\n    Run `npm install` in the project root directory to download Node.js\n    dependencies to the local `node_modules` directory.\n\n-   Inkscape\n-   potrace\n-   ImageMagick (`convert` and `mogrify`)\n\n## License\n\n[![CC0 license](https://licensebuttons.net/p/zero/1.0/88x31.png)][4]\n\nTo the extent possible under law, I waive all copyright and related or\nneighbouring rights to this work.\n\n[1]: http://gamedev.stackexchange.com/questions/109216/box2d-dynamic-assignment-of-fixture-shapes-based-on-sprite-alpha-channel\n[2]: https://xkcd.com/356/\n[3]: makefile\n[4]: http://creativecommons.org/publicdomain/zero/1.0/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanko%2Fimage-to-box2d-body","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanko%2Fimage-to-box2d-body","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanko%2Fimage-to-box2d-body/lists"}