From 95ba0cfeb160aec78c84555ed1b2f41cbd65cb04 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 5 Dec 2017 11:10:17 +0100 Subject: [PATCH] change rorate code --- src/interface/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interface/index.js b/src/interface/index.js index d08a7d1..b2dae05 100644 --- a/src/interface/index.js +++ b/src/interface/index.js @@ -160,10 +160,10 @@ class Interface extends React.Component { } }; - rotateX = () => this.rotate(new THREE.Vector3(0, 0, 1)); - rotateY = () => this.rotate(new THREE.Vector3(1, 0, 0)); - rotateZ = () => this.rotate(new THREE.Vector3(0, 1, 0)); - rotate = (axis, angle = Math.PI / 2.0) => { + rotateX = () => this.rotate(new THREE.Vector3(0, 0, 1), Math.PI / 2.0); + rotateY = () => this.rotate(new THREE.Vector3(1, 0, 0), Math.PI / 2.0); + rotateZ = () => this.rotate(new THREE.Vector3(0, 1, 0), Math.PI / 2.0); + rotate = (axis, angle) => { const { mesh, render } = this.state; if (mesh) { const quaternion = new THREE.Quaternion();