{"id":22920860,"url":"https://github.com/capricorncd/tetris","last_synced_at":"2025-05-12T20:24:54.502Z","repository":{"id":26192045,"uuid":"107617164","full_name":"capricorncd/tetris","owner":"capricorncd","description":"Tetris Game. (俄罗斯方块/テトリス)","archived":false,"fork":false,"pushed_at":"2025-05-11T12:26:18.000Z","size":7720,"stargazers_count":14,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T20:24:23.392Z","etag":null,"topics":["audiocontext","game","tetris","tetris-game","typescript"],"latest_commit_sha":null,"homepage":"https://capricorncd.github.io/tetris/dist/","language":"TypeScript","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/capricorncd.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,"zenodo":null}},"created_at":"2017-10-20T01:28:48.000Z","updated_at":"2025-05-11T12:26:15.000Z","dependencies_parsed_at":"2024-03-23T15:24:32.181Z","dependency_job_id":"581d8032-9833-4b5c-a65c-c84d2b563a75","html_url":"https://github.com/capricorncd/tetris","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/capricorncd%2Ftetris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capricorncd%2Ftetris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capricorncd%2Ftetris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capricorncd%2Ftetris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capricorncd","download_url":"https://codeload.github.com/capricorncd/tetris/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253815157,"owners_count":21968581,"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":["audiocontext","game","tetris","tetris-game","typescript"],"created_at":"2024-12-14T07:17:14.035Z","updated_at":"2025-05-12T20:24:54.459Z","avatar_url":"https://github.com/capricorncd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetris Game / 俄罗斯方块\n\nTetris Game\n\n\u003cp align=\"left\"\u003e\n   \u003ca href=\"https://npmcharts.com/compare/zx-tetris?minimal=true\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/zx-tetris.svg?sanitize=true\" alt=\"Downloads\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://www.npmjs.com/package/zx-tetris\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/zx-tetris.svg?sanitize=true\" alt=\"Version\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://www.npmjs.com/package/zx-tetris\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/zx-tetris.svg?sanitize=true\" alt=\"License\"\u003e\u003c/a\u003e\n \u003c/p\u003e\n \n```shell script\nnpm i zx-tetris\n```\n\n## Start\n\n```bash\nnpm run dev\n```\n\nhttp://localhost:9000\n\n## 游戏截图\n\n![Tetris 俄罗斯方块](./preview.jpg)\n\n### Keyboard 键盘操作\n\nLeft: `←`, Right: `→`, Rotate: `↑`, Down: `↓`, OK: `Space`, Start/Pause: `Enter`, Restart: `Shift`\n\n## 扫码体验\n\n![Tetris 俄罗斯方块](./qrcode.png)\n\nhttps://capricorncd.github.io/tetris/dist\n\n## 初始化方法\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003cmeta charset=\"UTF-8\"\u003e\n  \u003cmeta name=\"viewport\"\n        content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"\u003e\n  \u003ctitle\u003eTetris - 俄罗斯方块单机版 - Capricorncd\u003c/title\u003e\n  \u003cstyle\u003e\n    body {background-color: #333;}\n    .game-box { float: left; margin-right: 10px; padding: 10px; width: 320px; height: 540px; border: 1px solid #999}\n  \u003c/style\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n\u003cdiv class=\"game-box\" id=\"TetrisA\"\u003e\u003c/div\u003e\n\n\u003cscript src=\"./tetris.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  new Tetris({\n    // 可选参数，默认为body\n    container: '#TetrisA',\n    // 错误回调\n    error: function (err) {\n      console.error(err)\n    },\n    // 游戏DOM结构创建完成回调\n    ready: function (res) {\n      console.log(res)\n    }\n  })\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\n```\n\n## Copyright and license\n\nhttps://github.com/capricorncd\n\nCode and documentation copyright 2018. Capricorncd. Code released under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapricorncd%2Ftetris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapricorncd%2Ftetris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapricorncd%2Ftetris/lists"}