Permalink
Browse files

Merge pull request #19 from robwalch/master

Fix: BBTree.log()
  • Loading branch information...
2 parents dec71ca + a0d9560 commit faa3f91a51a6b4a2ded54251364c09b901e6df8d @josephg committed Feb 1, 2013
Showing with 12 additions and 17 deletions.
  1. +5 −7 cp.js
  2. +2 −3 cp.min.js
  3. +3 −5 lib/cpBBTree.js
  4. +2 −2 lib/cpSpaceComponent.js
View
12 cp.js
@@ -2511,18 +2511,16 @@ BBTree.prototype.optimize = function()
var nodeRender = function(node, depth)
{
if(!node.isLeaf && depth <= 10){
- nodeRender(node.a, depth + 1);
- nodeRender(node.b, depth + 1);
+ nodeRender(node.A, depth + 1);
+ nodeRender(node.B, depth + 1);
}
-// var bb = node.bb;
-
var str = '';
for(var i = 0; i < depth; i++) {
str += ' ';
}
-// console.log(str + bb.b + ' ' + bb.t);
+ console.log(str + node.bb_b + ' ' + node.bb_t);
};
BBTree.prototype.log = function(){
@@ -4134,8 +4132,8 @@ Body.prototype.sleepWithGroup = function(group){
return;
}
- for(var i = 0; i < body.shapeList.length; i++){
- body.shapeList.update(this.p, this.rot);
+ for(var i = 0; i < this.shapeList.length; i++){
+ this.shapeList[i].update(this.p, this.rot);
}
space.deactivateBody(this);
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -755,18 +755,16 @@ BBTree.prototype.optimize = function()
var nodeRender = function(node, depth)
{
if(!node.isLeaf && depth <= 10){
- nodeRender(node.a, depth + 1);
- nodeRender(node.b, depth + 1);
+ nodeRender(node.A, depth + 1);
+ nodeRender(node.B, depth + 1);
}
-// var bb = node.bb;
-
var str = '';
for(var i = 0; i < depth; i++) {
str += ' ';
}
-// console.log(str + bb.b + ' ' + bb.t);
+ console.log(str + node.bb_b + ' ' + node.bb_t);
};
BBTree.prototype.log = function(){
View
@@ -309,8 +309,8 @@ Body.prototype.sleepWithGroup = function(group){
return;
}
- for(var i = 0; i < body.shapeList.length; i++){
- body.shapeList.update(this.p, this.rot);
+ for(var i = 0; i < this.shapeList.length; i++){
+ this.shapeList[i].update(this.p, this.rot);
}
space.deactivateBody(this);

0 comments on commit faa3f91

Please sign in to comment.