Update autoload.js

This commit is contained in:
nicocatxzc 2024-07-26 20:08:28 +08:00 committed by GitHub
parent bc08b5e19f
commit 0a88f9a60c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,6 +41,23 @@ if (screen.width >= 768) {
}); });
} }
// 加载 waifu.css live2d.min.js waifu-tips-.js适配移动端
if (screen.width < 768) {
Promise.all([
loadExternalResource(live2d_path + "waifu-mobie.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: "/live2djs/",
tools: ["hitokoto", "asteroids", "switch-model", "switch-texture", "photo", "info", "quit"]
});
});
}
console.log(` console.log(`
__,.ヘヽ. / , __,.ヘヽ. / ,
', !--i / /´ ', !--i / /´