Hide cape if cape is empty
This commit is contained in:
parent
4897656425
commit
6d5ab8ed2e
@ -100,6 +100,10 @@ export default {
|
||||
this.viewer.skinUrl = url || SkinSteve
|
||||
},
|
||||
cape(url) {
|
||||
if (!url) {
|
||||
this.viewer.playerObject.cape.visible = false
|
||||
return
|
||||
}
|
||||
this.viewer.capeUrl = url
|
||||
},
|
||||
},
|
||||
|
@ -1,5 +1,8 @@
|
||||
/* eslint-disable max-params */
|
||||
/* eslint-disable max-classes-per-file */
|
||||
import {
|
||||
PlayerObject, SkinObject, CapeObject,
|
||||
} from 'skinview3d'
|
||||
|
||||
export class SkinViewer {
|
||||
disposed: boolean
|
||||
@ -12,6 +15,8 @@ export class SkinViewer {
|
||||
|
||||
camera: { position: { z: number } }
|
||||
|
||||
playerObject: PlayerObject
|
||||
|
||||
constructor() {
|
||||
this.skinUrl = ''
|
||||
this.capeUrl = ''
|
||||
@ -22,6 +27,10 @@ export class SkinViewer {
|
||||
z: 0,
|
||||
},
|
||||
}
|
||||
this.playerObject = {
|
||||
skin: {} as SkinObject,
|
||||
cape: {} as CapeObject,
|
||||
}
|
||||
}
|
||||
|
||||
dispose() {
|
||||
|
Loading…
Reference in New Issue
Block a user