mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 21:47:59 +01:00
change rorate code
This commit is contained in:
parent
84e28bc598
commit
95ba0cfeb1
@ -160,10 +160,10 @@ class Interface extends React.Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
rotateX = () => this.rotate(new THREE.Vector3(0, 0, 1));
|
rotateX = () => this.rotate(new THREE.Vector3(0, 0, 1), Math.PI / 2.0);
|
||||||
rotateY = () => this.rotate(new THREE.Vector3(1, 0, 0));
|
rotateY = () => this.rotate(new THREE.Vector3(1, 0, 0), Math.PI / 2.0);
|
||||||
rotateZ = () => this.rotate(new THREE.Vector3(0, 1, 0));
|
rotateZ = () => this.rotate(new THREE.Vector3(0, 1, 0), Math.PI / 2.0);
|
||||||
rotate = (axis, angle = Math.PI / 2.0) => {
|
rotate = (axis, angle) => {
|
||||||
const { mesh, render } = this.state;
|
const { mesh, render } = this.state;
|
||||||
if (mesh) {
|
if (mesh) {
|
||||||
const quaternion = new THREE.Quaternion();
|
const quaternion = new THREE.Quaternion();
|
||||||
|
Loading…
Reference in New Issue
Block a user