-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for player skins via SkinsDB #284
Add support for player skins via SkinsDB #284
Conversation
Pull Request Test Coverage Report for Build 3710908515
💛 - Coveralls |
Default colors, see: [colors.txt](../server/static/colors.txt) | ||
Default colors, see: [colors directory](../public/colors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this refers to an old implementation, so I just updated this to the directory where colours are stored.
const marker = L.marker([player.pos.z, player.pos.x], {icon: this.getIcon(player)}); | ||
|
||
marker.bindPopup(this.createPopup(player)); | ||
marker.bindPopup(this.createPopup(player), {minWidth: 220}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the popup wider by default just because it looked a bit squashed with the player portrait included.
|
||
// no cached skin, we need to build the image | ||
let img = new Image(); | ||
img.onload = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The skins will load asyncronously, and then be added to the playerSkins
map/cache, so after a subsequent update they'll rerender.
@@ -69,7 +69,6 @@ See: [Incremental rendering](doc/incrementalrendering.md) | |||
## Planned Features | |||
|
|||
* Isometric view | |||
* Skin support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are other skin mods or methods of support still required, I can add this back.
wow, this looks awesome 😲 🎉 |
Adds support for SkinsDB, allowing display of custom player skins on the map.
The implementation will serve skin textures directly from the
skinsdb/textures
directory, and assemble previews on the client. I believe this should support older (32x64) and newer texture (64x64) skin formats. Overlays are not supported (yet?!).Also updated the popup when selecting a player, to show a preview of the player with their skin. Also added a small crown icon next to the name of players flagged as moderators in this popup.