Skip to content

Commit

Permalink
add waifu
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed May 3, 2023
1 parent 93801ff commit 97de15d
Show file tree
Hide file tree
Showing 14 changed files with 5,236 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
# 设置gradio的并行线程数(不需要修改)
CONCURRENT_COUNT = 100

# 加一个看板娘装饰
ADD_WAIFU = False

# 设置用户名和密码(不需要修改)(相关功能不稳定,与gradio版本和网络都相关,如果本地使用不建议加这个)
# [("username", "password"), ("username2", "password2"), ...]
AUTHENTICATION = []
Expand Down
23 changes: 23 additions & 0 deletions docs/waifu_plugin/autoload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
try {
$("<link>").attr({href: "file=docs/waifu_plugin/waifu.css", rel: "stylesheet", type: "text/css"}).appendTo('head');
$('body').append('<div class="waifu"><div class="waifu-tips"></div><canvas id="live2d" class="live2d"></canvas><div class="waifu-tool"><span class="fui-home"></span> <span class="fui-chat"></span> <span class="fui-eye"></span> <span class="fui-user"></span> <span class="fui-photo"></span> <span class="fui-info-circle"></span> <span class="fui-cross"></span></div></div>');
$.ajax({url: "file=docs/waifu_plugin/waifu-tips.js", dataType:"script", cache: true, success: function() {
$.ajax({url: "file=docs/waifu_plugin/live2d.js", dataType:"script", cache: true, success: function() {
/* 可直接修改部分参数 */
live2d_settings['hitokotoAPI'] = "hitokoto.cn"; // 一言 API
live2d_settings['modelId'] = 5; // 默认模型 ID
live2d_settings['modelTexturesId'] = 1; // 默认材质 ID
live2d_settings['modelStorage'] = false; // 不储存模型 ID
live2d_settings['waifuSize'] = '210x187';
live2d_settings['waifuTipsSize'] = '187x52';
live2d_settings['canSwitchModel'] = true;
live2d_settings['canSwitchTextures'] = true;
live2d_settings['canSwitchHitokoto'] = false;
live2d_settings['canTakeScreenshot'] = false;
live2d_settings['canTurnToHomePage'] = false;
live2d_settings['canTurnToAboutPage'] = false;
/* 在 initModel 前添加 */
initModel("file=docs/waifu_plugin/waifu-tips.json");
}});
}});
} catch(err) { console.log("[Error] JQuery is not defined.") }
Binary file added docs/waifu_plugin/flat-ui-icons-regular.eot
Binary file not shown.
126 changes: 126 additions & 0 deletions docs/waifu_plugin/flat-ui-icons-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/waifu_plugin/flat-ui-icons-regular.ttf
Binary file not shown.
Binary file added docs/waifu_plugin/flat-ui-icons-regular.woff
Binary file not shown.
13 changes: 13 additions & 0 deletions docs/waifu_plugin/jquery-ui.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/waifu_plugin/jquery.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 97de15d

Please sign in to comment.