From 608fce96ccb4be6ebbd66e4fc62bd2a91038fb97 Mon Sep 17 00:00:00 2001 From: Lars Martens Date: Fri, 18 Dec 2020 20:18:01 +0100 Subject: [PATCH] Rotating head demo --- src/App.vue | 22 ++++++++-------------- src/components/Armorstand.vue | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/App.vue b/src/App.vue index ffe5118..45ab2dd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,7 +8,7 @@ - + @@ -30,6 +30,7 @@

Pose

+ @@ -37,9 +38,9 @@ - - - + + +
Rotation
Head
@@ -59,7 +60,9 @@ export default { renderer: new THREE.WebGLRenderer({alpha: true, antialias: true}), camera: new THREE.PerspectiveCamera(70, 400 / 400, 0.1, 100), ambientLight: new THREE.AmbientLight(0x333333), - rotation: {x: 30, y: 40, z: 0}, + pose: { + head: {x: 0, y: 0, z: 0}, + }, }; }, mounted() { @@ -76,14 +79,5 @@ export default { this.renderer.setSize(w, h); }, }, - computed: { - rotationInRad() { - return { - x: this.rotation.x/180*Math.PI, - y: this.rotation.y/180*Math.PI, - z: this.rotation.z/180*Math.PI, - }; - }, - }, } diff --git a/src/components/Armorstand.vue b/src/components/Armorstand.vue index f5969a8..bf240b2 100644 --- a/src/components/Armorstand.vue +++ b/src/components/Armorstand.vue @@ -63,7 +63,7 @@ - + @@ -80,12 +80,22 @@ \ No newline at end of file