feat: render live players as 3D skinned models#792
Open
Apezdr wants to merge 1 commit intoBlueMap-Minecraft:masterfrom
Open
feat: render live players as 3D skinned models#792Apezdr wants to merge 1 commit intoBlueMap-Minecraft:masterfrom
Apezdr wants to merge 1 commit intoBlueMap-Minecraft:masterfrom
Conversation
Replace the 2D face-icon player marker with a full 3D skinview3d
PlayerObject, complete with skin texture, yaw/pitch rotation, and
optional cape support.
Server-side (Java):
- PlayerSkinUpdater: save full 64×64 skin to playerskins/{uuid}.png
alongside the existing face-crop playerheads/{uuid}.png; also fetch
and save the player's cape (if any) to playercapes/{uuid}.png using a
second Mojang session-server call; maintain a playersWithCapes set so
cape existence is known without a filesystem hit
- LivePlayersDataSupplier: accept a capeChecker predicate and emit a
hasCape boolean per player in the live JSON feed
- Plugin: wire skinUpdater::hasCape into LivePlayersDataSupplier
Frontend (JS/webapp):
- PlayerMarker: swap in skinview3d PlayerObject (scale 1/16, y+1 offset
so feet sit at ground level); replace MeshStandardMaterial with
MeshBasicMaterial (BlueMap has no Three.js scene lights); load skin
via loadSkinToCanvas/CanvasTexture with dimension validation and
steve_skin.png fallback; apply yaw to body and pitch to head each
frame; load cape only when server confirms hasCape=true (avoids 404
console noise for players without capes)
- PlayerMarkerSet: construct playerskins/ and playercapes/ URLs from the
playerheads base URL and pass them to PlayerMarker
- Add public/assets/steve_skin.png: proper 64×64 RGBA Steve skin
(extracted from Minecraft client JAR) as default fallback
- Add skinview3d ^3.4.1 dependency
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #95
Summary
PlayerObjectthat renders the player's complete Minecraft skin including arms, legs, and headplayerskins/{uuid}.png; frontend loads it vialoadSkinToCanvaswith dimension validation and a Steve fallback; Steve/Alex model type is auto-detected viainferModelTypeplayercapes/{uuid}.png; the live player JSON now includeshasCapeso the frontend only requests the cape texture when one actually exists — no 404 console noise for players without capesposition.y = 1.0) so feet sit at ground level; head tilts with pitch, body rotates with yaw each frameMeshStandardMaterialrendered black; swapped toMeshBasicMaterialafter construction while preserving theskin.map/modelTypesettersTest plan
playerskins/asset is unavailable