{"id":26686968,"url":"https://github.com/kingbes/php-raylib","last_synced_at":"2025-10-29T15:41:40.222Z","repository":{"id":283026005,"uuid":"950439728","full_name":"KingBes/php-raylib","owner":"KingBes","description":"🔥 PHP-FFI 绑 定 raylib，实 现 享 受 视 频 游 戏 编 程。","archived":false,"fork":false,"pushed_at":"2025-10-24T10:02:11.000Z","size":56134,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-24T12:08:47.661Z","etag":null,"topics":["desktop","php","php-game","php-library","raylib-php"],"latest_commit_sha":null,"homepage":"http://raylib.kllxs.top/","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/KingBes.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-18T06:55:27.000Z","updated_at":"2025-10-24T10:02:15.000Z","dependencies_parsed_at":"2025-03-18T07:40:35.962Z","dependency_job_id":"c84b66ed-69bf-4922-b07e-4df2d488a80a","html_url":"https://github.com/KingBes/php-raylib","commit_stats":null,"previous_names":["kingbes/php-raylib"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/KingBes/php-raylib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingBes%2Fphp-raylib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingBes%2Fphp-raylib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingBes%2Fphp-raylib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingBes%2Fphp-raylib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KingBes","download_url":"https://codeload.github.com/KingBes/php-raylib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KingBes%2Fphp-raylib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281650117,"owners_count":26537952,"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-10-29T02:00:06.901Z","response_time":59,"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":["desktop","php","php-game","php-library","raylib-php"],"created_at":"2025-03-26T12:15:36.600Z","updated_at":"2025-10-29T15:41:40.207Z","avatar_url":"https://github.com/KingBes.png","language":"C","readme":"# php-raylib\n\n🔥 PHP-FFI 绑 定 raylib-v5.5，实 现 享 受 视 频 游 戏 编 程。\n\n[![php-raylib](https://apiv1.oschina.net/MjAyMi8xLzE2/gtags/v1/action/shard?type=1\u0026id=75836)](https://www.oschina.net/p/php-raylib)\n\n`可能完善度不高，欢迎 PR。`\n\n[文档](http://raylib.kllxs.top/)\n\n## 依赖\n\n- PHP 8.2+\n- FFI 扩展\n- windows\n- linux\n- macos\n\n## 安装\n\n```bash\ncomposer require kingbes/raylib\n```\n\n## 示例\n\n```php\n\u003c?php\n\nrequire dirname(__DIR__) . \"/vendor/autoload.php\";\n\nuse Kingbes\\Raylib\\Core; //核心\nuse Kingbes\\Raylib\\Text; // 文本\nuse Kingbes\\Raylib\\Utils; // 工具类\n\nCore::initWindow(800, 450, \"Hello World\"); //初始化窗口\n\nCore::setTargetFPS(60); //设置目标帧率\n\n// 白色\n$white = Utils::color(255, 255, 255);\n\n// 绿色\n$green = Utils::color(0, 255, 0);\n\n// 主循环\nwhile (!Core::windowShouldClose()) {\n    Core::beginDrawing(); //开始绘制\n\n    Core::clearBackground($white); // 清除背景\n\n    // 绘制文本\n    Text::drawText(\"Hello World\", 190, 200, 20, $green);\n\n    Core::endDrawing(); // 结束绘制\n}\n\n// 关闭窗口\nCore::closeWindow();\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingbes%2Fphp-raylib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkingbes%2Fphp-raylib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingbes%2Fphp-raylib/lists"}