Template:Team:UC Davis/MutantWidget

From 2011.igem.org

(Difference between revisions)
Line 510: Line 510:
origin_camera.rotation.y += (-lastMouseX + event.pageX)/70;
origin_camera.rotation.y += (-lastMouseX + event.pageX)/70;
origin_camera.rotation.x += (-lastMouseY + event.pageY)/70;
origin_camera.rotation.x += (-lastMouseY + event.pageY)/70;
-
if(origin_camera.rotation.x > Math.PI/4)
+
if(origin_camera.rotation.x > Math.PI/8)
{
{
-
origin_camera.rotation.x = Math.PI/4;
+
origin_camera.rotation.x = Math.PI/8;
}
}
-
if(origin_camera.rotation.x < -Math.PI/4)
+
if(origin_camera.rotation.x < -Math.PI/8)
{
{
-
origin_camera.rotation.x = -Math.PI/4;
+
origin_camera.rotation.x = -Math.PI/8;
}
}
lastMouseX = event.pageX;
lastMouseX = event.pageX;

Revision as of 06:46, 25 September 2011