Changing Avatar Appearance
You can make the playerโs avatar invisible and add another object as a child of the player to create the appearance of changing the avatar.
โ ๏ธ
Make sure to add the avatar you want to change to the scene in advance.
const obj = WORLD.getObject("obj"); // Object to use for the new appearance
const btn = GUI.getObject('btn');
btn.onClick(function() {
PLAYER.children[0].visible = false; // Hide the player avatar
PLAYER.add(obj); // Add the object as a child of the player
obj.position.set(0, 0.5, 0); // Set the object's position
})