{"id":42307543,"url":"https://github.com/evgo2017/live2d-static-api","last_synced_at":"2026-01-27T11:12:12.398Z","repository":{"id":57701598,"uuid":"497637677","full_name":"evgo2017/live2d-static-api","owner":"evgo2017","description":"若你的项目使用 live2d.min.js，就可以使用此项目替代。静态服务器即可部署 api，无需动态服务器。","archived":false,"fork":false,"pushed_at":"2026-01-27T05:21:37.000Z","size":26515,"stargazers_count":21,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-27T07:08:22.302Z","etag":null,"topics":["api","live2d","live2d-api","vue-live2d"],"latest_commit_sha":null,"homepage":"https://vue-live2d.demo.evgo2017.com","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/evgo2017.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":"2022-05-29T15:57:06.000Z","updated_at":"2026-01-27T05:21:40.000Z","dependencies_parsed_at":"2025-04-29T10:44:52.770Z","dependency_job_id":null,"html_url":"https://github.com/evgo2017/live2d-static-api","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"0d5907511f5c077f08899a1de5f26f40981b23a1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evgo2017/live2d-static-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Flive2d-static-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Flive2d-static-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Flive2d-static-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Flive2d-static-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evgo2017","download_url":"https://codeload.github.com/evgo2017/live2d-static-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgo2017%2Flive2d-static-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["api","live2d","live2d-api","vue-live2d"],"created_at":"2026-01-27T11:12:11.903Z","updated_at":"2026-01-27T11:12:12.390Z","avatar_url":"https://github.com/evgo2017.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![live2d-static-api](https://socialify.git.ci/evgo2017/live2d-static-api/image?custom_description=live2d.min.js+api+%E9%9D%99%E6%80%81%E5%8C%96%E7%9A%84%E9%9B%B6%E7%BB%B4%E6%8A%A4%E6%96%B9%E6%A1%88\u0026custom_language=Node.js\u0026description=1\u0026forks=1\u0026language=1\u0026name=1\u0026owner=1\u0026stargazers=1\u0026theme=Light)\n\n## 🚀 快速预览\n\n*   **在线 DEMO**：[https://live2d.evgo2017.com](https://live2d.evgo2017.com)\n*   **配套应用示例：** [vue-live2d](https://github.com/evgo2017/vue-live2d)\n\n## 💡 如何使用？\n\n本项目的核心产出是 `indexes` 文件夹。你只需要将该文件夹部署，并获取其 URL 作为 apiPath 即可。更多信息参阅 [深度指南](./README-deep.md)。\n\n---\n\n## 🌟 核心理念：API 静态化\n\n**live2d-static-api** 是经典 `live2d.min.js` api、[fghrsh/live2d_api](https://github.com/fghrsh/live2d_api) (PHP 版) 等项目的**优化解决方案**。\n\n### 🔄 为什么要替代？\n\n如果你正在使用以下项目，本项目可以为你提供更稳定、更省心的体验：\n- **正在使用 `live2d.min.js` 及其衍生库**：只需更改 `apiPath`，即可无缝切换到静态资源。\n- **正在使用 `fghrsh/live2d_api`**：无需再折腾 PHP 环境、Docker 或负载均衡。\n- **各种看板娘组件 (`live2d-widget`, `live2d_demo` 等)**：受够了第三方接口的 404 和不稳定，本项目是你自行托管的最佳选择。\n\n### ⚡ 静态 API 的降维打击\n\n它的逻辑非常简单：**将原本需要后端处理的逻辑（PHP/Node.js）提前在编译阶段完成，生成纯 JSON 索引文件。**\n\n这样，你只需要把生成的文件夹扔进任何静态 Web 服务器（甚至 CDN），API 就能跑起来。\n\n### ⚡ 为什么选择静态 API？\n\n| 特性 | 传统动态 API (PHP/Node.js) | 本项目 (静态 API) |\n| :--- | :--- | :--- |\n| **服务器要求** | 必须安装 PHP/Node.js 环境 | 任意 Web 服务器 (Nginx, GitHub Pages, CDN) |\n| **维护成本** | 需维护服务进程、担心宕机 | **零维护**，部署即永久在线 |\n| **加载性能** | 受到后端处理速度限制 | **极致速度**，直接读取静态文件 |\n| **跨域处理** | 需要后端配置 CORS | 托管商(如 CDN)配置或天然支持 |\n| **安全性** | 存在脚本注入等风险 | **绝对安全**，仅分发静态资源 |\n\n## ✨ 特性\n\n-   **零门槛部署**：像发布网页一样发布 API。\n-   **全平台兼容**：适配所有前端构建工具及静态平台。\n-   **CDN 友好**：支持一键发布到 NPM 并通过 `unpkg` / `jsdelivr` 加速，国内访问极速稳定。\n-   **灵活可定制**：一键脚本，轻松生成属于你自己的模型索引。\n\n---\n\n## 🛠 进阶：修改与生成模型\n\n如果你想新增模型、修改服装或调整配置，只需在 `models` 文件夹中操作，然后运行编译脚本：\n\n### 编译指令\n```bash\n# 1. 默认编译（推荐）\nnpm run build\n\n# 2. 自定义参数编译\nnode build.js fromBasePath=models toBasePath=indexes isCompress=true\n```\n\n### 编译参数\n| 参数 | 含义 | 默认值 |\n| :--- | :--- | :--- |\n| `fromBasePath` | 模型原始资源路径 | `models` |\n| `toBasePath` | 生成的索引输出路径 | `indexes` |\n| `isCompress` | 生成的 JSON 索引是否压缩 | `true` |\n\n---\n\n## 📋 参考资料\n\n本项目逻辑灵感源自 [fghrsh/live2d_api](https://github.com/fghrsh/live2d_api)。\n在原项目的基础上，我们去除了对 PHP 环境的依赖，转而使用 Node.js 预编译 + 静态分发的模式。\n\n\u003e **作者自述**：\n\u003e “原版的 PHP 实现很棒，但我不想为了一个看板娘去折腾容器或后端环境。通过静态化处理，我发现不仅复杂度降低了，加载速度也更快了。这就是完美的解决方案。”\n\n## ⚖️ 版权说明\n\n*   **模型资源**：`models` 文件夹内的 Live2D 模型版权均属于原作者，**仅供研究学习，严禁用于商业用途**。\n*   **其他内容**：代码部分遵循 MIT 协议，版权属于 [evgo2017](https://github.com/evgo2017)。\n\n## 🤝 参与开发\n\n如果您发现问题，或希望贡献，欢迎提交 Pull Request。\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgo2017%2Flive2d-static-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevgo2017%2Flive2d-static-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgo2017%2Flive2d-static-api/lists"}