diff options
Diffstat (limited to 'assets/javascripts/rectangles/models/room.js')
| -rw-r--r-- | assets/javascripts/rectangles/models/room.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/assets/javascripts/rectangles/models/room.js b/assets/javascripts/rectangles/models/room.js index 4d83d56..f0ebc76 100644 --- a/assets/javascripts/rectangles/models/room.js +++ b/assets/javascripts/rectangles/models/room.js @@ -30,6 +30,18 @@ window.room = (function(){ this.$floor = $([]) this.$ceiling = $([]) } + + room.prototype.bind = function(){ + this.$walls.bind({ + mouseover: function(){ + }, + mousemove: function(e){ + }, + mousedown: function(){ + $(this).css("background-color", choice(window.palettes.colors)) + } + }) + } room.prototype.clipTo = function(r){ // for each of this rect's regions split the region if necessary @@ -86,9 +98,3 @@ window.room = (function(){ })() -function bitcount(v) { - v = v - ((v >>> 1) & 0x55555555); - v = (v & 0x33333333) + ((v >>> 2) & 0x33333333); - return ((v + (v >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24; -} - |
