{"id":49585860,"url":"https://github.com/pkarnakov/ptoy","last_synced_at":"2026-05-03T22:35:17.322Z","repository":{"id":168084623,"uuid":"85436438","full_name":"pkarnakov/ptoy","owner":"pkarnakov","description":"Particle toy with bonds and portals","archived":false,"fork":false,"pushed_at":"2025-06-01T20:12:08.000Z","size":1339,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T05:53:30.620Z","etag":null,"topics":["cpp","game","opengl","particles","portal","webassembly"],"latest_commit_sha":null,"homepage":"http://pkarnakov.com/ptoy/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pkarnakov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2017-03-18T22:36:39.000Z","updated_at":"2025-06-01T20:12:11.000Z","dependencies_parsed_at":"2024-01-28T21:31:14.233Z","dependency_job_id":"b4aa0cb2-4179-4f9a-a356-611c779a2d36","html_url":"https://github.com/pkarnakov/ptoy","commit_stats":null,"previous_names":["pkarnakov/ptoy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pkarnakov/ptoy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarnakov%2Fptoy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarnakov%2Fptoy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarnakov%2Fptoy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarnakov%2Fptoy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkarnakov","download_url":"https://codeload.github.com/pkarnakov/ptoy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarnakov%2Fptoy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32587821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cpp","game","opengl","particles","portal","webassembly"],"created_at":"2026-05-03T22:35:16.724Z","updated_at":"2026-05-03T22:35:17.314Z","avatar_url":"https://github.com/pkarnakov.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ptoy\n\n[Play web version](https://pkarnakov.github.io/ptoy/ptoy.html)\n\n| Native | [Web](https://pkarnakov.github.io/ptoy/ptoy.html) |\n|:---:|:---:|\n|\u003cimg src=\"https://pkarnakov.github.io/ptoy/images/ptoy_native.png\" height=\"170\"\u003e|\u003cimg src=\"https://pkarnakov.github.io/ptoy/images/ptoy_web.png\" height=\"170\"\u003e |\n\n\nScreenshots from older version\n|   |   |   |\n|:---:|:---:|:---:|\n|\u003cimg src=\"https://pkarnakov.github.io/ptoy/images/screenshot0.png\" height=\"100\"\u003e|\u003cimg src=\"https://pkarnakov.github.io/ptoy/images/screenshot1.png\" height=\"100\"\u003e|\u003cimg src=\"https://pkarnakov.github.io/ptoy/images/screenshot2.png\" height=\"100\"\u003e|\n\n## Clone\n\n```\ngit clone https://github.com/pkarnakov/ptoy.git\n```\n\n## Requirements\n\n* Linux or Mac OS X\n* C++14 compiler\n* CMake (optional)\n* emscripten (optional to build WebAssembly)\n* SDL2\n* glew\n\n## Build\n\nBuild with CMake\n\n```\nmake\n```\n\nBuild without CMake, using `pkgconf` to find SDL2 and glew\n\n```\nmake legacy\n```\n\n## Run\n\n```\ncd build \u0026\u0026 ./ptoy\n```\n\n## Control\n\n### Keyboard\n\n* `r`: switch mouse to *Repulsion* mode\n* `a`: switch mouse to *Attraction* mode\n* `p`: switch mouse to *Pick* mode\n* `f`: switch mouse to *Freeze* mode\n* `o`: switch mouse to *Portal* mode\n* `b`: switch mouse to *Bonds* mode\n* `n`: switch mouse to *No action* mode\n* `g`: toggle gravity\n* `i`: remove last pair of portals\n* `space`: toggle pause\n* `q`: quit after pressing 3 times\n\n### Mouse\n\nClick actions depend on the mode selected by keyboard,\nall mouse buttons are equivalent.\n\nMode|Key|Click action\n:---|:---:|---\n*Repulsion* (default) |`r`| repulsive force\n*Attraction* |`a`| attractive force\n*Portal*  |`o`| draw portals (blue, then orange)\n*Pick*  |`p`| pick the closest particle\n*Freeze* |`f`| freeze/unfreeze particle\n*Bonds*  |`b`| draw bonds between particles\n*No action* |`n`| nothing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkarnakov%2Fptoy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkarnakov%2Fptoy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkarnakov%2Fptoy/lists"}