Skip to content

Commit

Permalink
use jsd.onmicrosoft.cn
Browse files Browse the repository at this point in the history
  • Loading branch information
wuuconix committed Mar 21, 2023
1 parent 5025b33 commit e6bc928
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

+ 修改了waifu.css使模型出现在右侧
+ 修改了看板娘的z-index使得她出现在页面最上层
+[模型图片](https://fastly.jsdelivr.net/gh/wuuconix/live2d-cdn@latest/model/xiaomai/umaru2048/texture_00.png)加载完毕后再加载live2d与widget(避免了模型图片还没加载出来就已经在说话了的诡异场面)
+[模型图片](https://jsd.onmicrosoft.cn/gh/wuuconix/live2d-cdn@latest/model/xiaomai/umaru2048/texture_00.png)加载完毕后再加载live2d与widget(避免了模型图片还没加载出来就已经在说话了的诡异场面)

模型来自 [imuncle/live2d](https://github.com/imuncle/live2d)

Expand All @@ -19,9 +19,13 @@
在html文件中引入一个js文件即可。

```html
<script src="https://fastly.jsdelivr.net/gh/wuuconix/[email protected].5/autoload.js"></script>
<script src="https://jsd.onmicrosoft.cn/gh/wuuconix/[email protected].6/autoload.js"></script>
```

## 感谢

十分[渺软公益 CDN](https://cdn.onmicrosoft.cn/)对此项目的加速

## 在线预览

[https://wuuconix.github.io/live2d-cdn/](https://wuuconix.github.io/live2d-cdn/)
4 changes: 2 additions & 2 deletions autoload.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const live2d_path = "https://fastly.jsdelivr.net/gh/wuuconix/[email protected].5/";
const modelTextures = "https://fastly.jsdelivr.net/gh/wuuconix/[email protected].5/model/xiaomai/umaru2048/texture_00.png";
const live2d_path = "https://jsd.onmicrosoft.cn/gh/wuuconix/[email protected].6/";
const modelTextures = "https://jsd.onmicrosoft.cn/gh/wuuconix/[email protected].6/model/xiaomai/umaru2048/texture_00.png";

// 封装异步加载资源的方法
function loadExternalResource(url, type) {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://fastly.jsdelivr.net/gh/wuuconix/[email protected].5/autoload.js"></script>
<script src="https://jsd.onmicrosoft.cn/gh/wuuconix/[email protected].6/autoload.js"></script>
<title>预览</title>
</head>
<body>
Expand Down
3 changes: 2 additions & 1 deletion push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ sed -i "s/v[0-9].[0-9].[0-9]/v$version/g" README.md
sed -i "s/v[0-9].[0-9].[0-9]/v$version/g" index.html
git add . && git commit -m "$message" && \
git tag -a v$version -m "v$version: $message" && \
git push && git push origin v$version
git push && git push origin v$version
echo https://jsd.onmicrosoft.cn/gh/wuuconix/live2d-cdn@v$version/
2 changes: 1 addition & 1 deletion src/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const tools = {
window.ASTEROIDSPLAYERS.push(new Asteroids());
} else {
const script = document.createElement("script");
script.src = "https://fastly.jsdelivr.net/gh/stevenjoezhang/asteroids/asteroids.js";
script.src = "https://jsd.onmicrosoft.cn/gh/stevenjoezhang/asteroids/asteroids.js";
document.head.appendChild(script);
}
}
Expand Down
2 changes: 1 addition & 1 deletion waifu-tips.js

Large diffs are not rendered by default.

0 comments on commit e6bc928

Please sign in to comment.