mrdoob/three.js — Issue #1421: rectangular pyramid rotation
Author: vladimir123
Created: 2012-02-28 19:36:11+00:00
State: open

Hi, i have problem...
i looked at the example - http://mrdoob.github.com/three.js/examples/misc_camera_trackball.html
but i can't understand how to rotate my pyramid....

here is my code

[code]
function pyramide(){
piramide = new THREE.CubeGeometry( 100, 300, 100 );

piramide.vertices[0].position.multiplyScalar(0.01);
piramide.vertices[1].position.multiplyScalar(0.01);
piramide.vertices[4].position.multiplyScalar(0.01);
piramide.vertices[5].position.multiplyScalar(0.01);

pyramide_object = new THREE.Mesh( piramide, materials );
pyramide_object.position.set(0,80,0);

pyramide_object.updateMatrix();
pyramide_object.matrixAutoUpdate = false;

return pyramide_object;
}
[/code]