From 0a88f9a60c460694630a6d1a30db7318229343a8 Mon Sep 17 00:00:00 2001 From: nicocatxzc <114812330+nicocatxzc@users.noreply.github.com> Date: Fri, 26 Jul 2024 20:08:28 +0800 Subject: [PATCH] Update autoload.js --- autoload.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/autoload.js b/autoload.js index aee6b69..8b6f70f 100644 --- a/autoload.js +++ b/autoload.js @@ -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(` く__,.ヘヽ. / ,ー、 〉 \ ', !-─‐-i / /´