Skip to content

Commit

Permalink
[Fix] Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-zklcdc committed Jul 11, 2021
1 parent bfd665b commit 02c6706
Show file tree
Hide file tree
Showing 2 changed files with 360 additions and 365 deletions.
34 changes: 20 additions & 14 deletions static/plugin/live2d/autoload.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
try {
$("<link>").attr({href: "/static/plugin/live2d/waifu.css?v=1.4.2", 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: "/static/plugin/live2d/waifu-tips.js?v=1.4.2", dataType:"script", cache: true, success: function() {
$.ajax({url: "/static/plugin/live2d/live2d.js?v=1.0.5", 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
/* 在 initModel 前添加 */
initModel("/static/plugin/live2d/waifu-tips.json");
}});
}});
} catch(err) { console.log("[Error] JQuery is not defined.") }
$('<link>').attr({href: '/static/plugin/live2d/waifu.css?v=1.4.2', 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: '/static/plugin/live2d/waifu-tips.js?v=1.4.2',
dataType: 'script',
cache: true,
success: function () {
$.ajax({url: '/static/plugin/live2d/live2d.js?v=1.0.5',
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'] = true // 不储存模型 ID
/* 在 initModel 前添加 */
initModel('/static/plugin/live2d/waifu-tips.json')
}})
}})
} catch (err) { console.log('[Error] JQuery is not defined.') }
Loading

0 comments on commit 02c6706

Please sign in to comment.