summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models/room.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/rectangles/models/room.js')
-rw-r--r--public/assets/javascripts/rectangles/models/room.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/public/assets/javascripts/rectangles/models/room.js b/public/assets/javascripts/rectangles/models/room.js
index d0478b3..61a7447 100644
--- a/public/assets/javascripts/rectangles/models/room.js
+++ b/public/assets/javascripts/rectangles/models/room.js
@@ -87,6 +87,12 @@ window.Room = (function(){
els.sort(compare_z)
}
+ // wall holds state for the last wall we created/saw..
+ // right now we keep walls subdivided where there are half-walls to simplify
+ // calculations involving placing media on walls, calculating wall boundaries, etc..
+ // one consequence of this is we can't place things on the walls above "doorways".
+ // in the future, we should have more robust placement algorithm, which takes
+ // this into account, and only use one wall "object" per plane
var wall
els.forEach(function(el){
@@ -116,6 +122,7 @@ window.Room = (function(){
function new_wall (el) {
return new Wall ({
+ id: base.id + "_" + (el.side | el.half_side) + "_" + walls.length,
room: base.id,
side: el.side | el.half_side,
half_side: el.half_side,