diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-06-19 16:01:25 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-06-19 16:01:25 -0400 |
| commit | 615e285aba96554d0e29063d7491645810cb08b8 (patch) | |
| tree | ddc409898299dd90611c73a2ddf62a149c369734 /public/assets/javascripts/rectangles/models | |
| parent | 9a4730ac59f0cf83b2fdca3672a9f622db6c8aa2 (diff) | |
serialize/deserialize scenery
Diffstat (limited to 'public/assets/javascripts/rectangles/models')
| -rw-r--r-- | public/assets/javascripts/rectangles/models/room.js | 7 |
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, |
