I need to showcase a rotating tetrahedron in an animated HTML5 graphic, using three.js.
Despite creating the object, it appears upside down instead of resting on the ground with one surface facing up, like in this reference image:
The current rotation code within the render() function isn't producing the desired result. The axis seems off, causing the object to rotate incorrectly.
object.useQuaternion = true;
var rotateQuaternion_ = new THREE.Quaternion();
rotateQuaternion_.setFromAxisAngle(new THREE.Vector3(0, 1, 1), 0.2 * (Math.PI / 180));
object.quaternion.multiplySelf(rotateQuaternion_);
object.quaternion.normalize();
(excerpt from Three.JS - how to set rotation axis)
Here is the current output: http://jsfiddle.net/DkhT3/
Any suggestions on accessing the correct axis to properly move/rotate the tetrahedron on the ground?
Thank you for any advice!