Skip to content

Commit

Permalink
set modelId to 0, fix a undefined bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wuuconix committed Mar 21, 2023
1 parent e6bc928 commit 33fabc8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
在html文件中引入一个js文件即可。

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

## 感谢
Expand Down
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://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";
const live2d_path = "https://jsd.onmicrosoft.cn/gh/wuuconix/[email protected].7/";
const modelTextures = "https://jsd.onmicrosoft.cn/gh/wuuconix/[email protected].7/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://jsd.onmicrosoft.cn/gh/wuuconix/[email protected].6/autoload.js"></script>
<script src="https://jsd.onmicrosoft.cn/gh/wuuconix/[email protected].7/autoload.js"></script>
<title>预览</title>
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions push.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version=$1
message=$2
npm run build
# edit autoload.js
sed -i "s/v[0-9].[0-9].[0-9]/v$version/g" autoload.js
# edit index.html
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function loadWidget(config) {
modelTexturesId = localStorage.getItem("modelTexturesId");
if (modelId === null) {
// 首次访问加载 指定模型 的 指定材质
modelId = 1; // 模型 ID
modelId = 0; // 模型 ID
modelTexturesId = 53; // 材质 ID
}
model.loadModel(modelId, modelTexturesId);
Expand Down
2 changes: 1 addition & 1 deletion waifu-tips.js

Large diffs are not rendered by default.

1 comment on commit 33fabc8

@vercel
Copy link

@vercel vercel bot commented on 33fabc8 Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

live2d-cdn – ./

live2d-cdn-git-main-wuuconix.vercel.app
live2d-cdn.vercel.app
live2d-cdn-wuuconix.vercel.app

Please sign in to comment.