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