From e196645bfb952fe54916ad2815ab725d0c6e60bc Mon Sep 17 00:00:00 2001 From: Lars Martens Date: Fri, 20 Aug 2021 22:15:36 +0200 Subject: [PATCH] Correct arm rotation --- README.md | 14 +++++++------- src/App.vue | 11 ++++------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 378a9d4..3522be9 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,19 @@ This project is currently being rewritten. This document should be changed to in ## TODO The following things still have to be done. Possibly in this order. -- [ ] Equipment +- [X] Equipment - [ ] Equipment locking - [ ] Can we scrape the MC wiki for a searchable dropdown list? https://minecraft.fandom.com/api.php ? * Only items that are available in a given minecraft version should show up - [ ] Colors for leather pieces - - [ ] Helmet: player name + - [X] Helmet: player name - [ ] Helmet: Image URL - [ ] Helmet: https://minecraft-heads.com -> but use Minecraft-URL or Player name and skip the give code thing, that was confusing anyways. Have a help popup that explains this functionality with a few screenshots. -- [ ] Custom name with styling options -- [ ] Code generation +- [X] Custom name with styling options +- [X] Code generation - [ ] Hide controls that are not relevant for the chosen minecraft version -- [ ] **Proper rotation conversion between Minecraft and ThreeJS** - - [ ] /summon or /give +- [X] **Proper rotation conversion between Minecraft and ThreeJS** +- [ ] /summon or /give - [ ] Hint for command block - [ ] Design - [ ] Save and load @@ -26,4 +26,4 @@ The following things still have to be done. Possibly in this order. - How to remove an invulnerable armor stand - [ ] Ask before exit - [ ] vue i18n -- [ ] vue element transitions \ No newline at end of file +- [ ] vue element transitions diff --git a/src/App.vue b/src/App.vue index cc80373..124d367 100644 --- a/src/App.vue +++ b/src/App.vue @@ -292,7 +292,6 @@ class Armorstand { // } // Now the pose - // TODO Somewhere a conversion between Minecraft and ThreeJS rotations must take place. let pose = [] if (!isXYZZero(this.body)) { pose.push("Body:"+xyzToTextArray(this.body)) @@ -307,12 +306,10 @@ class Armorstand { pose.push("RightLeg:"+xyzToTextArray(this.legRight)) } if (this.showArms){ - if (!isXYZZero(this.armLeft)) { - pose.push("LeftArm:"+xyzToTextArray(this.armLeft)) - } - if (!isXYZZero(this.armRight)) { - pose.push("RightArm:"+xyzToTextArray(this.armRight)) - } + // Arms will also be added if they are 0, because if we omit them, Minecraft + // will give the arms a default rotation that does not match our version. + pose.push("LeftArm:"+xyzToTextArray(this.armLeft)) + pose.push("RightArm:"+xyzToTextArray(this.armRight)) }