mirror of
https://github.com/haselkern/Minecraft-ArmorStand.git
synced 2025-05-18 05:55:35 +00:00
Added positional input
This commit is contained in:
parent
990fe6d331
commit
6bd04f3ead
2 changed files with 16 additions and 4 deletions
14
js/main.js
14
js/main.js
|
@ -26,7 +26,9 @@ var mLegRight; //*
|
|||
var mArmLeft; //*
|
||||
var mArmRight; //*
|
||||
var armorstand, armorstandWrapper; //Group all the other elements
|
||||
|
||||
var xPos = "~"
|
||||
var yPos = "~"
|
||||
var zPos = "~"
|
||||
|
||||
//DATA -> Stuff that we'll use to generate the command. Fetched from the controls.
|
||||
var invisible = false;
|
||||
|
@ -288,9 +290,10 @@ function handleInput(){
|
|||
rightLeg.set(getRangeInput("rightLegX"), getRangeInput("rightLegY"), getRangeInput("rightLegZ"));
|
||||
leftArm.set(getRangeInput("leftArmX"), getRangeInput("leftArmY"), getRangeInput("leftArmZ"));
|
||||
rightArm.set(getRangeInput("rightArmX"), getRangeInput("rightArmY"), getRangeInput("rightArmZ"));
|
||||
|
||||
rotation = getRangeInput("rotation");
|
||||
|
||||
xPos = getInput("x-coord");
|
||||
yPos = getInput("y-coord");
|
||||
zPos = getInput("z-coord")
|
||||
updateUI();
|
||||
}
|
||||
function getCheckBoxInput(name){
|
||||
|
@ -379,7 +382,10 @@ function updateUI(){
|
|||
}
|
||||
|
||||
function generateCode(){
|
||||
var code = "/summon ArmorStand ~ ~ ~ {";
|
||||
var code = "/summon ArmorStand ";
|
||||
code += xPos + " " + yPos + " " + zPos + " {";
|
||||
|
||||
|
||||
|
||||
var tags = [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue