From 60e86d8be94281d06d5327d6dad46b98e5df6a62 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 31 Oct 2014 16:53:44 -0400 Subject: enabling mobile routes --- public/assets/test/intersect2.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/assets/test') diff --git a/public/assets/test/intersect2.html b/public/assets/test/intersect2.html index fade288..3df9f30 100644 --- a/public/assets/test/intersect2.html +++ b/public/assets/test/intersect2.html @@ -55,7 +55,7 @@ var rect_room = new Room({ id: "rect", rect: rect, height: 2 }) var east_room = new Room({ id: "east", rect: east, height: 2 }) var corner_room = new Room({ id: "corner", rect: corner, height: 2 }) var peninsula_room = new Room({ id: "peninsula", rect: peninsula, height: 3 }) -var peninsula2_room = new Room({ id: "peninsula2", rect: peninsula2, height: 3 }) +var peninsula2_room = new Room({ id: "peninsula2", rect: peninsula2, height: 1 }) Rooms.add( rect_room ) Rooms.add( east_room ) -- cgit v1.2.3-70-g09d2 From f08fd6f6910d6cc774051ef9f85307ac8557d740 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 31 Oct 2014 18:51:20 -0400 Subject: intersect3 putting this to rest --- .../javascripts/rectangles/models/surface.js | 7 + public/assets/test/intersect3.html | 230 +++++++++++++++++++++ 2 files changed, 237 insertions(+) create mode 100644 public/assets/test/intersect3.html (limited to 'public/assets/test') diff --git a/public/assets/javascripts/rectangles/models/surface.js b/public/assets/javascripts/rectangles/models/surface.js index fc4aae4..f031665 100644 --- a/public/assets/javascripts/rectangles/models/surface.js +++ b/public/assets/javascripts/rectangles/models/surface.js @@ -12,6 +12,7 @@ var Surface = function (face){ this.bounds = new Rect (new vec2(0, 0), new vec2(0, 0)) + this.vec = new Rect (new vec2(0, 0), new vec2(0, 0)) this.faces = [] if (face) { this.add(face) @@ -161,6 +162,12 @@ return this.faces[i] } } + if (x < this.faces[0].x.a) { + return this.faces[0] + } + else { + return this.faces[this.faces.length-1] + } return null } diff --git a/public/assets/test/intersect3.html b/public/assets/test/intersect3.html new file mode 100644 index 0000000..4fec891 --- /dev/null +++ b/public/assets/test/intersect3.html @@ -0,0 +1,230 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2