{"id":13441220,"url":"https://github.com/itorr/sakana","last_synced_at":"2025-05-15T05:07:33.517Z","repository":{"id":57855446,"uuid":"527519851","full_name":"itorr/sakana","owner":"itorr","description":"🐟「Sakana!」石蒜模拟器","archived":false,"fork":false,"pushed_at":"2025-05-04T14:25:10.000Z","size":8893,"stargazers_count":2050,"open_issues_count":19,"forks_count":141,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-04T15:29:36.786Z","etag":null,"topics":["lycoris","lycoris-recoil","recoil","sakana","sayuri"],"latest_commit_sha":null,"homepage":"https://lab.magiconch.com/sakana/","language":"JavaScript","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/itorr.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}},"created_at":"2022-08-22T10:42:31.000Z","updated_at":"2025-05-04T14:25:14.000Z","dependencies_parsed_at":"2022-09-07T16:52:39.067Z","dependency_job_id":null,"html_url":"https://github.com/itorr/sakana","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/itorr%2Fsakana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itorr%2Fsakana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itorr%2Fsakana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itorr%2Fsakana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itorr","download_url":"https://codeload.github.com/itorr/sakana/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"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":["lycoris","lycoris-recoil","recoil","sakana","sayuri"],"created_at":"2024-07-31T03:01:31.288Z","updated_at":"2025-05-15T05:07:28.489Z","avatar_url":"https://github.com/itorr.png","language":"JavaScript","funding_links":[],"categories":["HarmonyOS","JavaScript"],"sub_categories":["Windows Manager"],"readme":"\u003ca href=\"https://lab.magiconch.com/sakana/?v=takina\" target=\"_blank\"\u003e\n  \u003cimg src=\"html/takina.png\" height=\"160px\"\u003e\n\u003c/a\u003e\u003ca href=\"https://lab.magiconch.com/sakana/?v=chisato\" target=\"_blank\"\u003e\n  \u003cimg src=\"html/chisato.png\" height=\"160px\"\u003e\n\u003c/a\u003e\n\n# 🐟「Sakana!」石蒜模拟器\n\n[![NPM](https://img.shields.io/npm/v/sakana)](https://www.npmjs.com/package/sakana)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n地址 https://lab.magiconch.com/sakana/\n\n\u003e さかなー－－－！！\n\n日本語リードミー \n[docs/ja/README.md](docs/ja/README.md) \n[#53](https://github.com/itorr/sakana/pull/53)\n[@OHMORIYUSUKE](https://github.com/OHMORIYUSUKE)\n\n支持引入多个模拟器了！ [约会版](https://lab.magiconch.com/sakana/deto.html)\n\n## 插画来源\n大伏アオ\n[@blue00f4](https://twitter.com/blue00f4)\n[Pixiv](https://pixiv.me/aoiroblue1340)\n\n**已从老师推特取得在网页中使用两张插画 (\n[その1](https://twitter.com/blue00f4/status/1551887529615687680)、[その2](https://twitter.com/blue00f4/status/1552066743853813760)\n) 的非商用授权**\n`ヾ(^▽^ヾ)`\n\n\n## 功能\n - 按住立牌拖拽、松手后立牌会向反方向弹跳\n - 点击底座切换角色\n - 手机开启陀螺仪权限、摇一摇可甩动立牌 [#12 待解决](https://github.com/itorr/sakana/pull/12)\n - 自走模式，以随机间隔、施加一个大小随机的力 [#7](https://github.com/itorr/sakana/pull/7) [@milkybird98](https://github.com/milkybird98)\n - 音效，在适当区间松手时的语音效果 [#9](https://github.com/itorr/sakana/pull/9) [@zthxxx](https://github.com/zthxxx)\n - 多语言支持 [#26](https://github.com/itorr/sakana/pull/26) [@dsrkafuu](https://github.com/dsrkafuu)\n \n### 请求参数\n\n - 添加 `?v=chisato` 请求参数，可获得 [锦木千束](https://lab.magiconch.com/sakana/?v=chisato) 专属链接\n - 添加 `?v=takina` 请求参数，可获得 [井上泷奈](https://lab.magiconch.com/sakana/?v=takina) 专属链接\n - 添加 `?alpha=true` 请求参数，可获得透明背景 [例](https://lab.magiconch.com/sakana/?alpha=true)\n - 添加 `?background=red` 请求参数，可自定义背景 `#FF00FF` `'#d77 url(chisato.png)'` 均可 [例](https://lab.magiconch.com/sakana/?background=%23d77%20url(chisato.png))\n - 添加 `?decay=0.99` 请求参数，自定义衰减 [无阻尼例](https://lab.magiconch.com/sakana/?decay=1) [#11](https://github.com/itorr/sakana/issues/11)\n - 添加 `?inertia=0.1` 请求参数，自定义惯性 [超慢速例](https://lab.magiconch.com/sakana/?inertia=0.001)\n - 添加 `?lang=en-US` 请求参数，自定义语言 [英文](https://lab.magiconch.com/sakana/?lang=en-US) [日语](https://lab.magiconch.com/sakana/?lang=ja-JP)\n - 添加 `?scale=auto` 请求参数，在小尺寸时适应高度调整缩放\n - 添加 `?scale=0.5` 请求参数，自定义元素缩放比例\n - 添加 `?translateY=200px` 请求参数，自定义元素垂直位移\n - 添加 `?r=60` 请求参数，初始角色右倾 60 度\n - 添加 `?y=100` 请求参数，初始角色下沉 100 单位\n\n#### 组合参数例\n - [超高速微阻尼千束英文例](https://lab.magiconch.com/sakana/?inertia=0.2\u0026decay=0.999\u0026v=chisato\u0026lang=en-US)\n - [超慢速无阻尼泷奈日文例](https://lab.magiconch.com/sakana/?inertia=0.001\u0026decay=1\u0026v=takina\u0026lang=ja-JP)\n - [两倍慢速无阻尼千束例](https://lab.magiconch.com/sakana/?inertia=0.01\u0026decay=1\u0026v=chisato\u0026scale=2\u0026translateY=140px)\n - [超小没劲强阻尼泷奈例](https://lab.magiconch.com/sakana/?inertia=0.02\u0026decay=0.9\u0026scale=0.3)\n - [默认六十度一百高泷奈例](https://lab.magiconch.com/sakana/?v=takina\u0026r=60\u0026y=100)\n\n\n## 引入到个人网站\n\n[示例](https://lab.magiconch.com/sakana/into.html)\n[源码](https://github.com/itorr/sakana/blob/main/html/into.html)\n\n```html\n\u003cdiv class=\"sakana-box\"\u003e\u003c/div\u003e\n```\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/sakana\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nSakana.init({\n  el:         '.sakana-box',     // 启动元素 node 或 选择器\n  scale:      .5,                // 缩放倍数\n  canSwitchCharacter: true,      // 允许换角色\n});\n\u003c/script\u003e\n```\n\n### NPM 安装与引入\n```bash\nnpm i sakana -d\n```\n\n```javascript\nimport Sakana from 'sakana';\n\nSakana.init({\n  el:         '.sakana-box',     // 启动元素 node 或 选择器\n  scale:      .5,                // 缩放倍数\n  canSwitchCharacter: true,      // 允许换角色\n});\n```\n\n### 选项与方法 \n```javascript\n// 设定静音\nSakana.setMute(true);\n\n// 获取静音状态\nconst { isMute } = Sakana.Voices;\n\n// 启动\nconst sakana = Sakana.init({\n  // 选项: 默认值\n  el:         '.sakana-box',     // 启动元素 node 或 选择器\n  character:  'takina',          // 启动角色 'chisato','takina' \n  inertia:    0.01,              // 惯性\n  decay:      0.99,              // 衰减\n  r:          60,                // 启动角度\n  y:          10,                // 启动高度\n  scale:      1,                 // 缩放倍数\n  translateY: 0,                 // 位移高度\n  canSwitchCharacter: false,     // 允许换角色\n  onSwitchCharacter(character){  // 切换角色回调\n    console.log(`${character} dayo~`);\n  },\n});\n\n// 设定归零角度\nsakana.setOriginRotate(10);\n\n// 获取角色运行状态\nconst v = sakana.getValue();\n\n// 确保运行\nsakana.confirmRunning();\n\n// 切换角色\nsakana.switchCharacter();\n\n// 暂停动作\nsakana.pause();\n\n// 恢复动作\nsakana.play();\n\n// 切换特定角色\nsakana.setCharacter('chisato');\n```\n\n\n### 放在窗口右下\n```css\nhtml .sakana-box{\n  position: fixed;\n  right: 0;\n  bottom: 0;\n  transform-origin: 100% 100%; /* 从右下开始变换 */\n}\n```\n\n## 本地调试\n`.less` 需要编译成 `.css` 样式文件 [#6](https://github.com/itorr/sakana/pull/6)\n\n## 编译\n - `npm i`\n - `npm run build`\n\n## GitHub\nhttps://github.com/itorr/sakana/\n\n## 衍生\n - 网页小组件版本 [Demo](https://sakana.dsrkafuu.net/) [@dsrkafuu/sakana-widget](https://github.com/dsrkafuu/sakana-widget) \n - 壁纸引擎 @而我撑伞 [BV1vN4y1F7ML](https://www.bilibili.com/video/BV1vN4y1F7ML) [创意工坊](https://steamcommunity.com/sharedfiles/filedetails/?id=2854221525)\n - 壁纸引擎 @麻匪 [BV1jG4y1k7oA](https://www.bilibili.com/video/bv1jG4y1k7oA) [创意工坊](https://steamcommunity.com/sharedfiles/filedetails/?id=2854192204)\n - VSCode 插件 [@UFOAlastor/sakana-hop](https://github.com/UFOAlastor/sakana-hop)\n - Unity 版本 [@zxsean/sakana_Unity](https://github.com/zxsean/sakana_Unity)\n - 只因你太美版本 [@SyMind/ji](https://github.com/SyMind/ji)\n\n## 微博\nhttps://weibo.com/1197780522/M2xbREtGI\n\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\nCopyright (c) 2022, itorr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitorr%2Fsakana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitorr%2Fsakana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitorr%2Fsakana/lists"}