diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-08-27 12:47:05 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-08-27 12:47:05 -0400 |
| commit | 098a330fab261885a86c7ae9a5b2ed294987dc6b (patch) | |
| tree | f74d98f414dd8eff9e1c10497b39f2bf7e8c2469 | |
| parent | 36b90395b85d6859dd78af9eb71c3df343e24841 (diff) | |
fix tests
5 files changed, 27 insertions, 11 deletions
diff --git a/public/assets/javascripts/rectangles/engine/rooms/builder.js b/public/assets/javascripts/rectangles/engine/rooms/builder.js index f321f71..5396ced 100644 --- a/public/assets/javascripts/rectangles/engine/rooms/builder.js +++ b/public/assets/javascripts/rectangles/engine/rooms/builder.js @@ -165,7 +165,6 @@ room.mx_ceiling.push(el) } }.bind(this)) - } else { // render floor and ceiling for the entire rectangle @@ -282,7 +281,6 @@ el.side = CEILING return el } - this.make_wall = function (klass) { var el = new MX.Object3D(".face" + (klass || "")) el.width = el.height = el.scaleX = el.scaleY = el.scaleZ = 1 @@ -293,7 +291,7 @@ el.side = 0 el.rect = null el.destroy = function(){ - this.el = this.rect = this.face = null + this.el = this.rect = this.face = null } // possible if walls are opaque diff --git a/public/assets/javascripts/rectangles/engine/rooms/grouper.js b/public/assets/javascripts/rectangles/engine/rooms/grouper.js index cde9fbb..2ec1ee7 100644 --- a/public/assets/javascripts/rectangles/engine/rooms/grouper.js +++ b/public/assets/javascripts/rectangles/engine/rooms/grouper.js @@ -83,7 +83,10 @@ collection.sort( useX ? sort.compare_zx : sort.compare_xz ) collection.forEach(function(mx){ - if (last_mx && last_mx.rect.eq(mx.rect)) { + if (mx.culled) { + return + } + if (last_mx && mx && last_mx.rect.eq(mx.rect)) { // culls half-walls if (last_mx.rect.id == mx.rect.id) { last_mx.height += mx.height/2 @@ -91,9 +94,11 @@ last_mx.face.y.b += mx.height/2 } last_mx.side = side - mx.culled = true - mx.destroy() - scene.remove(mx) + if (! mx.culled) { + scene.remove(mx) + mx.destroy() + mx.culled = true + } return } widthVec = mx.rect[useX ? 'x' : 'y'].clone() diff --git a/public/assets/javascripts/rectangles/models/surface.js b/public/assets/javascripts/rectangles/models/surface.js index 636f7c0..53977c8 100644 --- a/public/assets/javascripts/rectangles/models/surface.js +++ b/public/assets/javascripts/rectangles/models/surface.js @@ -147,9 +147,6 @@ Surface.prototype.index_for_x = function(x, min_i){ min_i = min_i || 0 - if (min_i >= this.faces.length-1) { - return -1 - } for (var i = min_i; i < this.faces.length; i++) { if (this.faces[i].x.contains(x)) { return i diff --git a/public/assets/javascripts/ui/editor/LightControl.js b/public/assets/javascripts/ui/editor/LightControl.js index 1bd660e..f35b19e 100644 --- a/public/assets/javascripts/ui/editor/LightControl.js +++ b/public/assets/javascripts/ui/editor/LightControl.js @@ -170,7 +170,6 @@ var LabColorPicker = function (parent, w, h) { var y = mix( norm(Lab[2], b_range[0], b_range[1]), 0, hh ) // move the cursor this.setLab(Lab) - console.log(rgba) return Lab } this.paint = function() { diff --git a/views/partials/meta.ejs b/views/partials/meta.ejs index ceaaba1..9916b34 100644 --- a/views/partials/meta.ejs +++ b/views/partials/meta.ejs @@ -1,3 +1,20 @@ + +<!-----+ +------+ +------+ +------+ +------+ +|`. `. |\ \ | | / /| .' .'| +| `+------+ | +------+ +------+ +------+ | +------+' | +| | | | | | | | | | | | | | ++ | | + | | | | | | + | | + + `. | | \| | | | | |/ | | .' + `+------+ +------+ +------+ +------+ +------+' + VVALLS - developed by okfoc.us + .+------+ +------+ +------+ +------+ +------+. + .' .'| / /| | | |\ \ |`. `. ++------+' | +------+ | +------+ | +------+ | `+------+ +| | | | | | | | | | | | | | +| | + | | + | | + | | + | | +| | .' | |/ | | \| | `. | | ++------+' +------+ +------+ +------+ `+------> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
