Below is an example of using quaternion in Three.js.
http://jsdo.it/cx20/qqSi
// rotate
mesh1.rotation.x += Math.PI / 180;
mesh1.rotation.y += Math.PI / 180;
mesh1.rotation.z += Math.PI / 180;
// quaternion
var axis = new THREE.Vector3(1,1,1).normalize();
angle += Math.PI / 180;
var q = new THREE.Quaternion();
q.setFromAxisAngle(axis,angle);
mesh2.quaternion.copy(q);
How do I write the code in CZPG.js to do the same thing as above?
Below is an example of using quaternion in Three.js.
http://jsdo.it/cx20/qqSi
How do I write the code in CZPG.js to do the same thing as above?