- Hydro
如何使用看板娘
- 2024-9-4 8:28:25 @
如题,同学在hydro刷出了看板娘,但是我没有。同学说可能带点随机,但我一次都没有出现过。请问有没有稳定出现看板娘的方法。
3 comments
-
linpj LV 4 @ 2024-9-12 13:05:05
在控制台输入这个:
// live2d_path 参数建议使用绝对路径 const live2d_path = "https://fastly.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/"; //const live2d_path = "/live2d-widget/"; // 封装异步加载资源的方法 function loadExternalResource(url, type) { return new Promise((resolve, reject) => { let tag; if (type === "css") { tag = document.createElement("link"); tag.rel = "stylesheet"; tag.href = url; } else if (type === "js") { tag = document.createElement("script"); tag.src = url; } if (tag) { tag.onload = () => resolve(url); tag.onerror = () => reject(url); document.head.appendChild(tag); } }); } // 加载 waifu.css live2d.min.js waifu-tips.js if (screen.width >= 768) { Promise.all([ loadExternalResource(live2d_path + "waifu.css", "css"), loadExternalResource(live2d_path + "live2d.min.js", "js"), loadExternalResource(live2d_path + "waifu-tips.js", "js") ]).then(() => { // 配置选项的具体用法见 README.md initWidget({ waifuPath: live2d_path + "waifu-tips.json", //apiPath: "https://live2d.fghrsh.net/api/", cdnPath: "https://fastly.jsdelivr.net/gh/fghrsh/live2d_api/", tools: ["hitokoto", "asteroids", "switch-model", "switch-texture", "photo", "info", "quit"] }); }); }
-
2024-9-7 18:12:43@
什么是看板娘呀?
-
2024-9-6 8:38:08@
我也一样
- 1