mirror of
https://github.com/haselkern/Minecraft-ArmorStand.git
synced 2025-05-17 15:05:33 +00:00
Added positional input
This commit is contained in:
parent
990fe6d331
commit
6bd04f3ead
2 changed files with 16 additions and 4 deletions
|
@ -56,6 +56,12 @@
|
|||
<label><input type="checkbox" name="small">Small</label><br>
|
||||
|
||||
<table class="rotations">
|
||||
<tr>
|
||||
<td>Position:</td>
|
||||
<td>X:<input type="text" name="x-coord" size="5" value="~"></td>
|
||||
<td>Y:<input type="text" name="y-coord" size="5" value="~"></td>
|
||||
<td>Z:<input type="text" name="z-coord" size="5" value="~"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rotation:</td>
|
||||
<td colspan="3"><input type="range" name="rotation" min="-360" max="360" value="0"></td>
|
||||
|
|
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