Fix previewing alex textures

This commit is contained in:
Pig Fang 2019-05-04 13:31:46 +08:00
parent d418083495
commit 2eab303457
7 changed files with 15 additions and 0 deletions

View File

@ -58,6 +58,10 @@ export default {
props: {
skin: String,
cape: String,
model: {
type: String,
default: 'steve',
},
closetMode: Boolean,
title: {
type: String,
@ -106,6 +110,9 @@ export default {
}
this.viewer.capeUrl = url
},
model(value) {
this.viewer.playerObject.skin.slim = value === 'alex'
},
},
mounted() {
this.initPreviewer()

View File

@ -4,6 +4,7 @@
<previewer
:skin="type !== 'cape' && textureUrl"
:cape="type === 'cape' ? textureUrl : ''"
:model="type"
:init-position-z="60"
>
<template #footer>

View File

@ -91,6 +91,7 @@
<previewer
:skin="type !== 'cape' && texture"
:cape="type === 'cape' ? texture : ''"
:model="type"
/>
</div>
</div>

View File

@ -176,6 +176,7 @@ export default {
capeTotalPages: 1,
selectedSkin: 0,
skinUrl: '',
model: 'steve',
selectedCape: 0,
capeUrl: '',
linkToSkin: `${blessing.base_url}/skinlib?filter=skin`,
@ -236,6 +237,7 @@ export default {
} else {
this.skinUrl = `/textures/${hash}`
this.selectedSkin = tid
this.model = type
}
},
resetSelected() {

View File

@ -180,6 +180,7 @@ export default {
using3dPreviewer: true,
skinUrl: '',
capeUrl: '',
model: 'steve',
preview2d: {
skin: 0,
cape: 0,
@ -209,6 +210,7 @@ export default {
if (player.tid_skin) {
const { data: skin } = await this.$http.get(`/skinlib/info/${player.tid_skin}`)
this.skinUrl = `${this.baseUrl}/textures/${skin.hash}`
this.model = skin.type
} else {
this.skinUrl = ''
}

View File

@ -1,3 +1,4 @@
## Fixed
- Fixed dropdown menu of skin library for mobile users.
- Fixed previewing alex textures.

View File

@ -1,3 +1,4 @@
## 修复
- 修复移动端下皮肤库下拉菜单失效的问题
- 修复 Alex 材质的预览