From 1af8f41cc88e3c57bfabe6d4a5dcd83fc4a0e1bc Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Thu, 17 Apr 2014 02:32:53 -0400 Subject: further code bath, fix minimap orientation/translation --- assets/javascripts/rectangles/room.js | 39 ----------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 assets/javascripts/rectangles/room.js (limited to 'assets/javascripts/rectangles/room.js') diff --git a/assets/javascripts/rectangles/room.js b/assets/javascripts/rectangles/room.js deleted file mode 100644 index 8c9d67d..0000000 --- a/assets/javascripts/rectangles/room.js +++ /dev/null @@ -1,39 +0,0 @@ -window.room = (function(){ - - var room = function(opt){ - this.id = opt.id || clipper.rooms.length - this.rect = opt.rect - this.regions = [] - this.height = opt.height || 200 - this.focused = false - } - - room.prototype.toString = function(){ - return this.rect.toString() - } - - room.prototype.reset = function(){ - var copy = this.rect.clone() - copy.id = this.id - copy.sides = FRONT | BACK | LEFT | RIGHT - this.regions = [ copy ] - } - - room.prototype.clipTo = function(r){ - // for each of this rect's regions split the region if necessary - var regions = this.regions - var splits - - for (var i = 0, len = regions.length; i < len; i++) { - if (regions[i] && regions[i].intersects(r)) { - splits = regions[i].split(r) - regions = regions.concat(splits) - regions[i] = null - } - } - this.regions = regions - } - - return room - -})() -- cgit v1.2.3-70-g09d2