Skip to content

Commit 1f12f42

Browse files
Update comments
1 parent 3ecd1dd commit 1f12f42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dist/autoload.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ function loadExternalResource(url, type) {
2525
});
2626
}
2727

28-
// 加载 live2d.min.js waifu.css waifu-tips.js
2928
// 如果担心手机上显示效果不佳,可以通过 `if (screen.width >= 768)` 来判断是否加载
3029
(async () => {
30+
// 避免图片资源跨域问题
3131
const OriginalImage = window.Image;
3232
window.Image = function(...args) {
3333
const img = new OriginalImage(...args);
3434
img.crossOrigin = "anonymous";
3535
return img;
3636
};
3737
window.Image.prototype = OriginalImage.prototype;
38+
// 加载 waifu.css waifu-tips.js
3839
await Promise.all([
3940
loadExternalResource(live2d_path + 'waifu.css', 'css'),
4041
loadExternalResource(live2d_path + 'waifu-tips.js', 'js')

0 commit comments

Comments
 (0)