I think that to rotate the object 90 degrees clockwise using the TWEEN class, this will do. I think the Animation class is suitable for heavier materials (e.g. bone / skin morphs, etc.).
To use the twin class, follow 3 main steps:
- include the class in your file (
<script src="js/Tween.js"></script> ) - add your animation for the required event (
new TWEEN.Tween( cube.rotation ).to( { y:Math.random()}, 1000 ).easing( TWEEN.Easing.Quadratic.EaseOut).start(); ) - update animation in rendering loop (
TWEEN.update(); )
You can see an example of tween cubes for a start.
I changed the default cube example to enable animation:

<!doctype html> <html lang="en"> <head> <title>three.js canvas - geometry - cube</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> <style> body { font-family: Monospace; background-color: #f0f0f0; margin: 0px; overflow: hidden; } </style> </head> <body> <script src="../build/Three.js"></script> <script src="js/Tween.js"></script> <script src="js/RequestAnimationFrame.js"></script> <script src="js/Stats.js"></script> <script> var container, stats; var camera, scene, renderer; var cube, plane; var windowHalfX = window.innerWidth / 2; var windowHalfY = window.innerHeight / 2; var rad90 = Math.PI * .5; init(); animate(); function init() { container = document.createElement( 'div' ); document.body.appendChild( container ); var info = document.createElement( 'div' ); info.style.position = 'absolute'; info.style.top = '10px'; info.style.width = '100%'; info.style.textAlign = 'center'; info.innerHTML = 'click to tween'; container.appendChild( info ); camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 1000 ); camera.position.y = 150; camera.position.z = 500; scene = new THREE.Scene(); </script> </body> </html>
source share