Skip to content

Commit

Permalink
fixed indentation, removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
Andor committed Aug 27, 2010
1 parent a3287f8 commit a1c71e5
Show file tree
Hide file tree
Showing 13 changed files with 270 additions and 266 deletions.
4 changes: 2 additions & 2 deletions c3dl/actors/actor.js
Expand Up @@ -107,7 +107,7 @@ c3dl.Actor.prototype.getTransform = function ()
var mat = c3dl.makePoseMatrix(this.left, this.up, this.dir, this.pos);
var smat = c3dl.makeMatrix();
c3dl.setMatrix(smat, this.scaleVec[0], 0, 0, 0, 0, this.scaleVec[1], 0, 0, 0, 0,
this.scaleVec[2], 0, 0, 0, 0, 1);
this.scaleVec[2], 0, 0, 0, 0, 1);
mat = c3dl.multiplyMatrixByMatrix(mat, smat);
return mat;
}
Expand Down Expand Up @@ -169,7 +169,7 @@ c3dl.Actor.prototype.scale = function (scaleVec)
if (scaleVec[0] > 0.0 && scaleVec[1] > 0.0 && scaleVec[2] > 0.0)
{
this.scaleVec[0] = this.scaleVec[0] * scaleVec[0];
this.scaleVec[1] = this.scaleVec[1] * scaleVec[1];
this.scaleVec[1] = this.scaleVec[1] * scaleVec[1];
this.scaleVec[2] = this.scaleVec[2] * scaleVec[2];
}
}
Expand Down
1 change: 0 additions & 1 deletion c3dl/c3dapi.js
Expand Up @@ -86,7 +86,6 @@ c3dl_require('texture/textureutils.js');

//collada management
c3dl_require('collada/colladamanager.js');
//c3dl_require('collada/instancegeometry.js');
c3dl_require('collada/colladaloader.js');
c3dl_require('collada/colladaqueue.js');
c3dl_require('collada/geometry.js');
Expand Down
11 changes: 8 additions & 3 deletions c3dl/c3dlnamespace.js
Expand Up @@ -43,8 +43,11 @@ var c3dl =
*/
extend: function (baseObj, extObj)
{
for (var i in extObj)
if (extObj[i] != null && extObj[i] != undefined) baseObj[i] = extObj[i];
for (var i in extObj){
if (extObj[i] != null && extObj[i] != undefined){
baseObj[i] = extObj[i];
}
}
return baseObj;
},

Expand Down Expand Up @@ -97,7 +100,9 @@ var c3dl =
var tmpparent = o.__parent;
// Temporarily change our parent to be our parent's parent to
// avoid infinite recursion.
if (o.__parent.prototype.__parent) o.__parent = o.__parent.prototype.__parent;
if (o.__parent.prototype.__parent){
o.__parent = o.__parent.prototype.__parent;
}
tmpparent.prototype.constructor.apply(o);
delete o.__parent;
},
Expand Down
2 changes: 1 addition & 1 deletion c3dl/camera/camera.js
Expand Up @@ -40,7 +40,7 @@ c3dl.Camera.prototype.applyToWorld = function (aspectRatio)

// Create a projection matrix and store it inside a globally accessible place.
this.projMatrix = c3dl.makePerspective(this.fieldOfView, aspectRatio, this.nearClippingPlane,
this.farClippingPlane);
this.farClippingPlane);
c3dl.matrixMode(c3dl.PROJECTION);
c3dl.loadMatrix(this.projMatrix);
c3dl.matrixMode(c3dl.MODELVIEW);
Expand Down
2 changes: 1 addition & 1 deletion c3dl/camera/freecamera.js
Expand Up @@ -194,7 +194,7 @@ c3dl.FreeCamera.prototype.toString = function (delimiter)
// get the c3dl.Camera's toString()
var cameraToStr = c3dl._super(this, arguments, "toString");
var FreeCameraToStr = "c3dl.FreeCamera: " + delimiter + "angular velocity = " +
this.getAngularVel() + delimiter + "linear velocity = " + this.getLinearVel() + delimiter;
this.getAngularVel() + delimiter + "linear velocity = " + this.getLinearVel() + delimiter;
return cameraToStr + FreeCameraToStr;
}

Expand Down
2 changes: 1 addition & 1 deletion c3dl/camera/orbitcamera.js
Expand Up @@ -376,7 +376,7 @@ c3dl.OrbitCamera.prototype.setPosition = function (position)
this.pos = c3dl.copyObj(position);
var camPosToOrbitPoint = c3dl.subtractVectors(this.orbitPoint, this.pos);

// if the position was set such that the direction vector is parallel to the global
// if the position was set such that the direction vector is parallel to the global
// up axis, the cross product won't work. In that case, leave the left vector as it was.
if (c3dl.isVectorEqual([0, 0, 0], c3dl.vectorCrossProduct(camPosToOrbitPoint, [0, 1, 0])))
{
Expand Down

0 comments on commit a1c71e5

Please sign in to comment.