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( | + | if(origin_camera.rotation.x > 0) |
{ | { | ||
- | + | origin_camera.rotation.x = 0; | |
} | } | ||
- | if( | + | if(origin_camera.rotation.x < -Math.PI/2) |
{ | { | ||
- | + | origin_camera.rotation.x = -Math.PI/2; | |
} | } | ||
lastMouseX = event.pageX; | lastMouseX = event.pageX; |
Revision as of 06:44, 25 September 2011