{"id":16252945,"url":"https://github.com/hexus/phaser-sat-example","last_synced_at":"2025-08-21T08:05:14.238Z","repository":{"id":149473266,"uuid":"56552108","full_name":"hexus/phaser-sat-example","owner":"hexus","description":"An experiment that uses sat-js with Phaser.","archived":false,"fork":false,"pushed_at":"2016-05-06T02:01:16.000Z","size":32,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T21:02:46.777Z","etag":null,"topics":["demo","example","phaser","sat","separating-axis-theorem"],"latest_commit_sha":null,"homepage":null,"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/hexus.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":"2016-04-19T00:35:14.000Z","updated_at":"2024-08-04T00:08:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"18d492e4-4933-4d5a-880e-5e68056235c8","html_url":"https://github.com/hexus/phaser-sat-example","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/hexus%2Fphaser-sat-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexus%2Fphaser-sat-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexus%2Fphaser-sat-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexus%2Fphaser-sat-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexus","download_url":"https://codeload.github.com/hexus/phaser-sat-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244019187,"owners_count":20384711,"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":["demo","example","phaser","sat","separating-axis-theorem"],"created_at":"2024-10-10T15:15:23.753Z","updated_at":"2025-08-21T08:05:14.230Z","avatar_url":"https://github.com/hexus.png","language":"JavaScript","readme":"# Phaser SAT Example\n\nAn example of using the Separating Axis Theorem for collision handling with\n[Phaser](https://github.com/photonstorm/phaser).\n\nCheck it out for yourself [here](http://hexus.github.io/phaser-sat-example/)!\n\n**PhaserSat.js** is a heavily commented Phaser scene that puts all of this\ntogether.\n\n![A screenshot of the Phaser SAT example in action](screenshot.png)\n\nI put this together because I'm terrible at maths and wanted to learn how to\nperform collision detection and response against sloped tiles. I wanted\nsomething like [this](http://www.metanetsoftware.com/technique/diagrams/tutA_demo.html)\nfrom a [fantastic tutorial](http://www.metanetsoftware.com/technique/tutorialA.html)\nby [Metanet](http://www.metanetsoftware.com/).\n\nEven though Phaser has its Ninja Physics engine, which is ported from the very\nexamples linked above, I wanted to see if it could be done more concisely.\n\nIn the end was able to achieve this thanks to the awesome\n[SAT.js](https://github.com/jriecken/sat-js) library and this\n[very handy tutorial](http://elancev.name/oliver/2D%20polygon.htm#tut4).\n\n## Installation\n\nInstall NPM, install Bower, and then install the Bower dependencies.\n\n```bash\nnpm install -g bower\nbower install\n```\n\nOpen up `index.html` in your browser!\n\n## Controls\n\n**WASD** to move.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexus%2Fphaser-sat-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexus%2Fphaser-sat-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexus%2Fphaser-sat-example/lists"}