mirror of
https://github.com/haselkern/Minecraft-ArmorStand.git
synced 2025-05-17 15:05:33 +00:00
Add new properties, some style
This commit is contained in:
parent
acbfe92a10
commit
b8a514f8f9
4 changed files with 73 additions and 38 deletions
11
index.html
11
index.html
|
@ -1,13 +1,16 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/png" href="icon.png">
|
<link rel="icon" type="image/png" href="icon.png">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Minecraft Armor Stand</title>
|
<title>Minecraft Armor Stand</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
|
<body class="bg-gray-300">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
32
src/App.vue
32
src/App.vue
|
@ -1,12 +1,30 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="box-border">
|
||||||
<div class="w-3/5 h-screen float-left">
|
<div class="w-3/5 fixed h-screen">
|
||||||
<Scene :armorstand="armorstand" />
|
<Scene :armorstand="armorstand" />
|
||||||
</div>
|
</div>
|
||||||
<div class="w-2/5 float-right">
|
<div class="w-2/5 right-0 ml-60">
|
||||||
|
<div class="bg-white m-4 p-4 border border-gray-900">
|
||||||
|
<select v-model="mcVersion">
|
||||||
|
<option value="1.16">Minecraft 1.16 and above</option>
|
||||||
|
<option value="1.14">Minecraft 1.14 & 1.15</option>
|
||||||
|
<option value="1.13">Minecraft 1.13</option>
|
||||||
|
<option value="1.11">Minecraft 1.11 & 1.12</option>
|
||||||
|
<option value="1.9">Minecraft 1.9 & 1.10</option>
|
||||||
|
<option value="1.8">Minecraft 1.8</option>
|
||||||
|
</select>
|
||||||
|
<label><input v-model="armorstand.noBasePlate" type="checkbox">No Base Plate</label>
|
||||||
|
<label><input v-model="armorstand.noGravity" type="checkbox">No Gravity</label>
|
||||||
<label><input v-model="armorstand.showArms" type="checkbox">Show Arms</label>
|
<label><input v-model="armorstand.showArms" type="checkbox">Show Arms</label>
|
||||||
<label><input v-model="armorstand.small" type="checkbox">Small</label>
|
<label><input v-model="armorstand.small" type="checkbox">Small</label>
|
||||||
<label><input v-model="armorstand.noBasePlate" type="checkbox">No Base Plate</label>
|
<details>
|
||||||
|
<summary>Advanced</summary>
|
||||||
|
<label><input v-model="armorstand.invisible" type="checkbox">Invisible</label>
|
||||||
|
<label><input v-model="armorstand.invulnerable" type="checkbox">Invulnerable</label>
|
||||||
|
<label><input v-model="armorstand.persistenceRequired" type="checkbox">Persistence Required</label>
|
||||||
|
<label><input v-model="armorstand.marker" type="checkbox">Marker</label>
|
||||||
|
<label><input v-model="armorstand.centerCorrected" type="checkbox">Center Corrected</label>
|
||||||
|
</details>
|
||||||
<hr>
|
<hr>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -24,6 +42,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -62,12 +81,17 @@ class Armorstand {
|
||||||
return { x: 1, y: 1, z: 1 }
|
return { x: 1, y: 1, z: 1 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Return the code to generate this armorstand
|
||||||
|
getCode(mcVersion) {
|
||||||
|
// TODO Handle different versions
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
armorstand: new Armorstand(),
|
armorstand: new Armorstand(),
|
||||||
|
mcVersion: "1.16",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: { Scene, RotationSliderRow },
|
components: { Scene, RotationSliderRow },
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<Renderer ref="renderer" antialias :orbit-ctrl="{ enableDamping: false }" resize="true">
|
<Renderer ref="renderer" antialias resize alpha :orbit-ctrl="{ enableDamping: false, enablePan: false }">
|
||||||
<Camera :position="{ z: 10 }" />
|
<Camera :position="{ z: 10 }" />
|
||||||
<Scene>
|
<Scene>
|
||||||
<AmbientLight :intensity="0.3" />
|
<AmbientLight :intensity="0.3" />
|
||||||
<DirectionalLight :intensity="1" :position="{ x: 10, y: 9 }" />
|
<DirectionalLight :intensity="1" :position="{ x: 10, y: 9 }" />
|
||||||
|
|
||||||
<!-- This group contains armorstand + base plate -->
|
<!-- This group contains armorstand + base plate -->
|
||||||
<Group :position="{ y: -8 / 16 }">
|
<Group :position="{ y: -1 }">
|
||||||
<!--Baseplate-->
|
<!--Baseplate-->
|
||||||
<Group :position="{ y: -0.5 / 16 }">
|
<Group :position="{ y: -0.5 / 16 }">
|
||||||
<Box :visible="!armorstand.noBasePlate" :scale="{ x: 12 / 16, y: 1 / 16, z: 12 / 16 }">
|
<Box :visible="!armorstand.noBasePlate" :scale="{ x: 12 / 16, y: 1 / 16, z: 12 / 16 }">
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
</Box>
|
</Box>
|
||||||
</Group>
|
</Group>
|
||||||
<!--Armorstand-->
|
<!--Armorstand-->
|
||||||
<Group :scale="armorstand.getScale()">
|
<Group :scale="armorstand.getScale()" :rotation="{ y: armorstand.rotation / 180 * Math.PI }">
|
||||||
<!--Left Leg-->
|
<!--Left Leg-->
|
||||||
<Group
|
<Group
|
||||||
:rotation="convertRotation(armorstand.legLeft)"
|
:rotation="convertRotation(armorstand.legLeft)"
|
||||||
|
|
|
@ -1,8 +1,16 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
purge: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
|
||||||
darkMode: false, // or 'media' or 'class'
|
darkMode: false, // or 'media' or 'class'
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {
|
||||||
|
flex: {
|
||||||
|
"2": "2 2 0%",
|
||||||
|
"3": "3 3 0%",
|
||||||
|
},
|
||||||
|
margin: {
|
||||||
|
"60": "60%",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
variants: {
|
variants: {
|
||||||
extend: {},
|
extend: {},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue