summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/models
diff options
context:
space:
mode:
Diffstat (limited to 'assets/javascripts/rectangles/models')
-rw-r--r--assets/javascripts/rectangles/models/room.js2
-rw-r--r--assets/javascripts/rectangles/models/wall.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/assets/javascripts/rectangles/models/room.js b/assets/javascripts/rectangles/models/room.js
index 3636284..4c5643a 100644
--- a/assets/javascripts/rectangles/models/room.js
+++ b/assets/javascripts/rectangles/models/room.js
@@ -4,7 +4,7 @@ var FRONT = 0x1, BACK = 0x2, LEFT = 0x4, RIGHT = 0x8, FLOOR = 0x10, CEILING = 0x
window.Room = (function(){
var Room = function(opt){
- this.id = opt.id || clipper.rooms.length
+ this.id = opt.id || Rooms.list.length
this.rect = opt.rect
this.regions = []
this.walls = []
diff --git a/assets/javascripts/rectangles/models/wall.js b/assets/javascripts/rectangles/models/wall.js
index 8a74782..88eb75d 100644
--- a/assets/javascripts/rectangles/models/wall.js
+++ b/assets/javascripts/rectangles/models/wall.js
@@ -51,7 +51,7 @@ window.Wall = (function(){
Wall.prototype.bounds_for = function(img) {
var coord = this.side & FRONT_BACK ? this.rect.x : this.rect.y
return new Rect( new vec2( coord.a + img.width/2, coord.b - img.width/2 ),
- new vec2( img.height/2, clipper.rooms[this.room].height - img.height/2 ) )
+ new vec2( img.height/2, Rooms.list[this.room].height - img.height/2 ) )
}
Wall.prototype.fits = function(img){
if (this.side & FRONT_BACK && this.rect.x.length() < img.width) {
@@ -104,7 +104,7 @@ window.Wall = (function(){
Wall.prototype.siblings = function(){
var base = this
var match = base.side | base.half_side
- var walls = clipper.rooms[this.room].walls.filter(function(w){
+ var walls = Rooms.list[this.room].walls.filter(function(w){
return (w.side | w.half_side) & match
})
return walls;