-
Notifications
You must be signed in to change notification settings - Fork 4
How can I use quaternions? #9
Copy link
Copy link
Open
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels