Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #19 from robwalch/master

Fix: BBTree.log()
  • Loading branch information...
commit faa3f91a51a6b4a2ded54251364c09b901e6df8d 2 parents dec71ca + a0d9560
@josephg authored
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
5 cp.min.js
2 additions, 3 deletions not shown
View
8 lib/cpBBTree.js
@@ -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
4 lib/cpSpaceComponent.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.