惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
T
Threat Research - Cisco Blogs
H
Hacker News: Front Page
N
News and Events Feed by Topic
Know Your Adversary
Know Your Adversary
Cisco Talos Blog
Cisco Talos Blog
SecWiki News
SecWiki News
C
Cisco Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Tor Project blog
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Webroot Blog
Webroot Blog
Schneier on Security
Schneier on Security
P
Privacy & Cybersecurity Law Blog
H
Heimdal Security Blog
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
V
Vulnerabilities – Threatpost
T
Tenable Blog
T
Tailwind CSS Blog
P
Privacy International News Feed
WordPress大学
WordPress大学
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
博客园 - Franky
Hacker News: Ask HN
Hacker News: Ask HN
Jina AI
Jina AI
C
Cybersecurity and Infrastructure Security Agency CISA
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
雷峰网
雷峰网
Vercel News
Vercel News
A
About on SuperTechFans
爱范儿
爱范儿
Simon Willison's Weblog
Simon Willison's Weblog
AWS News Blog
AWS News Blog
The Last Watchdog
The Last Watchdog
Engineering at Meta
Engineering at Meta
Spread Privacy
Spread Privacy
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园 - 司徒正美
量子位
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recorded Future
Recorded Future
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Martin Fowler
Martin Fowler
Project Zero
Project Zero

HCLonely Blog

HCLonely Blog - 让OpenWrt控制台进入赛博空间:luci-theme-cyberpunk HCLonely Blog - Artitalk V4: 从Leancloud迁移至Vercel HCLonely Blog - 记一次hexo-bilibili-bangumi分时函数渲染优化 HCLonely Blog - IP签名图片生成服务 HCLonely Blog - 树莓派搭建私有在线PS网站 HCLonely Blog - 将 Node.js 项目打包为一个可执行文件 HCLonely Blog - 哔哩哔哩硬核会员搜题脚本 HCLonely Blog - 在静态网站上实现浏览记录功能 HCLonely Blog - 统一推送服务Nodejs API HCLonely Blog - 在线答题搜答案脚本 HCLonely Blog - 青年大学习安卓跳过方法 HCLonely Blog - 公主连结 Re:Dive 中文输入法词库 HCLonely Blog - 百度分析和谷歌分析适配 pjax HCLonely Blog - hexo-calendar 活动日历插件 HCLonely Blog - Git 免密、免 SSH 进行 push & pull HCLonely Blog - 一款基于 webstack 的 hexo 主题 HCLonely Blog - 使用 cron-job 解决 LeanCloud 因流控原因自动唤醒失败的问题 HCLonely Blog - Valine 添加验证码、博主标签及评论微信、QQ 通知 HCLonely Blog - 使用 Cloud Studio 在线搭建、编辑、部署 Hexo HCLonely Blog - 给你的网页添加一个 moc3 格式的 Live2d 模型 HCLonely Blog - Hexo-tag-steamgame 插件 HCLonely Blog - Hexo-online-server 在线编辑发布文章插件 HCLonely Blog - Hexo 博客美化
HCLonely Blog - 基于 NodeJs 的 live2d 后端 Api 服务器
博主:HCLonely · 2021-01-27 · via HCLonely Blog

本文最后更新于天前,内容可能已不再适用!

适用于live2d.user.js,live2d_demo的基于 Nodejs 的后端 Api.

使用方法

  1. 安装NodeJs,Git
  2. 克隆本项目git clone https://github.com/HCLonely/live2dNodeApi.git
  3. 定位到项目目录cd live2dNodeApi
  4. 安装依赖npm i -Scnpm i -S
  5. 启动服务器npm start

命令

命令功能额外说明
npm start启动 api 服务器
npm run update重新生成modelList.json文件用于增加或删除模型后更新模型列表
npm run check检测模型的主配置文件格式及模型文件的完整性
npm run screenshot生成模型的预览图,放在preview文件夹
npm run pre在网页上查看模型的预览图,需要先生成

配置

修改config.json文件进行配置:

{
  "port": 2333, // 监听端口,默认2333
  "ssl":{
    "enable":false, // 是否启用ssl
    "privateCrt":"", // ssl证书文件路径
    "privateKey":"" // ssl私钥文件路径
  }
}

模型目录结构

models
├─模型文件夹 # 同一角色不同皮肤,不同皮肤共用一个index.json文件
│  ├─index.json # 必须,或model.json
│  └─...
├─模型文件夹 # 同一角色不同皮肤,每个皮肤都有各自的index.json文件
│  ├─模型文件夹 # 单个模型
│  │  ├─index.json # 必须,或model.json
│  │  └─...
│  └─模型文件夹 # 单个模型
│      ├─index.json # 必须,或model.json
│      └─...
└─模型文件夹 # 单个模型
    ├─index.json # 必须,或model.json
    └─...

详情请参考models目录

常见问题

依赖安装慢

npm 安装慢

下载 Chromium 慢

更新模型后顺序乱了

请重命名模型文件夹进行排序,参考models目录。

赞赏作者

扫一扫支付