Skip to content

Commit

Permalink
add skin swapping support
Browse files Browse the repository at this point in the history
  • Loading branch information
eyezahhhh committed Oct 26, 2022
1 parent bf6e7c7 commit c7758b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Models/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ class Player {
}
}

async setSkin(source) {
source = await ModelUtils.createMaterial(source);
this.skinTexture = source;
this.bodyPartNames.forEach(part => this[part].box.material = source);
}

async build(skinTexture, options = {}) {
if (options.slim != undefined) this.slim = !!options.slim;
const armWidth = 4 - this.slim;
Expand Down

0 comments on commit c7758b5

Please sign in to comment.