PlayerObject is visible by default when created

This commit is contained in:
yushijinhun 2020-01-18 22:59:07 +08:00
parent 4fa49974b0
commit 3af33ecda5
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
2 changed files with 2 additions and 2 deletions

View File

@ -405,7 +405,6 @@ export class PlayerObject extends Group {
this.skin = new SkinObject(skinTexture);
this.skin.name = "skin";
this.skin.visible = false;
this.add(this.skin);
this.cape = new CapeObject(capeTexture);
@ -413,7 +412,6 @@ export class PlayerObject extends Group {
this.cape.position.z = -2;
this.cape.position.y = -4;
this.cape.rotation.x = 25 * Math.PI / 180;
this.cape.visible = false;
this.add(this.cape);
}
}

View File

@ -69,6 +69,8 @@ export class SkinViewer {
this.playerObject = new PlayerObject(this.skinTexture, this.capeTexture);
this.playerObject.name = "player";
this.playerObject.skin.visible = false;
this.playerObject.cape.visible = false;
this.scene.add(this.playerObject);
// texture loading