diff options
Diffstat (limited to 'rect.js')
| -rw-r--r-- | rect.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -97,7 +97,7 @@ rect.prototype.split = function(r){ x_intervals.push( new vec2( r.x.b, this.x.b )) } - else if (r.x.contains(this.x.a) && r.x.contains(r.x.b)) { + else { // if (r.x.contains(this.x.a) && r.x.contains(r.x.b)) { x_intervals.push( new vec2( this.x.a, this.x.b )) } @@ -119,9 +119,11 @@ rect.prototype.split = function(r){ y_intervals.push( new vec2( r.y.b, this.y.b )) } - else if (r.y.contains(this.y.a) && this.y.contains(r.y.b)) { + else { // if (r.y.contains(this.y.a) && this.y.contains(r.y.b)) { y_intervals.push( new vec2( this.y.a, this.y.b )) } +if (zz) +console.log(x_intervals.length, y_intervals.length) x_intervals.forEach(function(x){ y_intervals.forEach(function(y){ @@ -131,3 +133,5 @@ rect.prototype.split = function(r){ return splits } +zz = false +document.body.addEventListener("click", function(){ zz = true })
\ No newline at end of file |
