浏览代码

Cleaned up comments for easier reading

Mikael Emtinger 14 年之前
父节点
当前提交
46fdde937e
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      src/extras/cameras/RollCamera.js

+ 4 - 5
src/extras/cameras/RollCamera.js

@@ -38,7 +38,7 @@ THREE.RollCamera = function ( fov, aspect, near, far ) {
 
 	this.update = function() {
 	
-		// clamp forward up / down
+		// cap forward up / down
 		
 		if( this.forward.y > 0.9 ) {
 			
@@ -53,7 +53,7 @@ THREE.RollCamera = function ( fov, aspect, near, far ) {
 		}
 
 
-		// construct rotation matrix
+		// construct unrolled camera matrix
 	
 		zTemp.copy( this.forward );
 		yTemp.set( 0, 1, 0 );
@@ -65,15 +65,15 @@ THREE.RollCamera = function ( fov, aspect, near, far ) {
 		this.matrix.n21 = xTemp.y; this.matrix.n22 = yTemp.y; this.matrix.n23 = zTemp.y;
 		this.matrix.n31 = xTemp.z; this.matrix.n32 = yTemp.z; this.matrix.n33 = zTemp.z;
 		
-		// save position and calculate camera matrix
 		
+		// calculate roll matrix
 	
 		rollMatrix.identity();
 		rollMatrix.n11 = Math.cos( this.roll ); rollMatrix.n12 = -Math.sin( this.roll );
 		rollMatrix.n21 = Math.sin( this.roll ); rollMatrix.n22 =  Math.cos( this.roll );
 	
 	
-		// multiply camera with rotation and set 
+		// multiply camera with roll
 	
 		this.matrix.multiplySelf( rollMatrix );
 		this.matrixWorldNeedsUpdate = true;
@@ -84,7 +84,6 @@ THREE.RollCamera = function ( fov, aspect, near, far ) {
 		this.matrix.n14 = this.position.x;
 		this.matrix.n24 = this.position.y;
 		this.matrix.n34 = this.position.z;
-	
 		
 		
 		// call supr