-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bfd665b
commit 02c6706
Showing
2 changed files
with
360 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.') } |
Oops, something went wrong.