mirror of
https://github.com/Buriburizaem0n/live2d.git
synced 2025-12-15 07:31:06 +00:00
changed meting-js server setting
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!--宠物播放器-->
|
||||
<script>
|
||||
const live2d_path = "https://www.luoyangdonghui.de/wp-content/uploads/live2d_test18/live2d/";
|
||||
const live2d_path = "https://www.luoyangdonghui.de/wp-content/uploads/live2d_test35/live2d/";
|
||||
</script>
|
||||
<meting-js server="netease" type="playlist" id="2142063878" theme="#339981" fixed="true" preload="none" autoplay="false" loop="all" volume="0.3" order="random" mutex="true"></meting-js>;
|
||||
<script>
|
||||
@@ -45,12 +45,10 @@ if (screen.width >= 768) {
|
||||
Promise.all([
|
||||
loadExternalResource(live2d_path + "waifu.css", "css"),
|
||||
loadExternalResource(live2d_path + "live2d.min.js", "js"),
|
||||
loadExternalResource(live2d_path + "waifu-tips.js", "js"),
|
||||
loadExternalResource(live2d_path + "/dist/waifu-tips.js", "js"),
|
||||
loadExternalResource("https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css", "css"),
|
||||
loadExternalResource("https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js", "js"),
|
||||
loadExternalResource("https://cdn.jsdelivr.net/npm/live2dcubismcore@1.0.2/live2dcubismcore.min.js", "js"),
|
||||
loadExternalResource("https://cdnjs.cloudflare.com/ajax/libs/pixi.js/6.5.2/browser/pixi.min.js", "js"),
|
||||
loadExternalResource("https://cdn.jsdelivr.net/npm/pixi-live2d-display@latest/dist/index.min.js", "js"),
|
||||
loadExternalResource("https://cdn.jsdelivr.net/npm/live2dcubismcore@1.0.2/live2dcubismcore.min.js", "js"),
|
||||
]).then(() => {
|
||||
loadExternalResource("https://cdn.jsdelivr.net/npm/meting@2.0.1/dist/Meting.min.js", "js");
|
||||
});
|
||||
|
||||
22
live2d/dist/auto.js
vendored
22
live2d/dist/auto.js
vendored
@@ -1,5 +1,25 @@
|
||||
const live2d_path = "https://www.luoyangdonghui.de/wp-content/uploads/live2d_test34/live2d/";
|
||||
<meting-js server="netease" type="playlist" id="2142063878" theme="#339981" fixed="true" preload="none" autoplay="false" loop="all" volume="0.3" order="random" mutex="true"></meting-js>;
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
// 创建 <meting-js> 元素
|
||||
const metingJs = document.createElement("meting-js");
|
||||
|
||||
// 设置 <meting-js> 的属性
|
||||
metingJs.setAttribute("server", "netease");
|
||||
metingJs.setAttribute("type", "playlist");
|
||||
metingJs.setAttribute("id", "2142063878");
|
||||
metingJs.setAttribute("theme", "#339981");
|
||||
metingJs.setAttribute("fixed", "true");
|
||||
metingJs.setAttribute("preload", "none");
|
||||
metingJs.setAttribute("autoplay", "false");
|
||||
metingJs.setAttribute("loop", "all");
|
||||
metingJs.setAttribute("volume", "0.3");
|
||||
metingJs.setAttribute("order", "random");
|
||||
metingJs.setAttribute("mutex", "true");
|
||||
|
||||
// 将 <meting-js> 插入到 body 中
|
||||
document.body.appendChild(metingJs);
|
||||
});
|
||||
|
||||
//封装异步加载资源的方法
|
||||
function loadExternalResource(url, type) {
|
||||
|
||||
Reference in New Issue
Block a user